(self, container, obj, headers=None, stream=True, query=None,
                   cdn=False)

return self.request(
            'GET', path, '', headers, query=query, stream=stream, cdn=cdn)

def Func(arg_0, arg_1, arg_2, arg_3=None, arg_4=True, arg_5=None,
                   arg_6=False):
        """
        GETs the object and returns the results.

        :param container: The name of the container.
        :param obj: The name of the object.
        :param headers: Additional headers to send with the request.
        :param stream: Indicates whether to stream the contents or
            preread them fully and return them as a str. Default:
            True to stream the contents. When streaming, contents
            will have the standard file-like-object read function,
            which accepts an optional size parameter to limit how
            much data is read per call. When streaming is on, be
            certain to fully read the contents before issuing another
            request.
        :param query: Set to a dict of query values to send on the
            query string of the request.
        :param cdn: If set True, the CDN management interface will be
            used.
        :returns: A tuple of (status, reason, headers, contents).

            :status: is an int for the HTTP status code.
            :reason: is the str for the HTTP status (ex: "Ok").
            :headers: is a dict with all lowercase keys of the HTTP
                headers; if a header has multiple values, it will be a
                list.
            :contents: if *stream* was True, *contents* is a
                file-like-object of the contents of the HTTP body. If
                *stream* was False, *contents* is just a simple str of
                the HTTP body.
        """
        arg_7 = arg_0._object_path(arg_1, arg_2)
        return arg_0.request(
            'GET', arg_7, '', arg_3, arg_5=arg_5, arg_4=arg_4, arg_6=arg_6)

GETs the object and returns the results .


def
Func
(
arg_0
)
:
arg_1
=
[
]
for
arg_2
in
arg_0
.
vcs
.
tags
(
)
:
logger
.
debug
(
"available version tag: %s"
,
arg_2
)
if
not
len
(
arg_2
.
strip
(
)
)
:
continue
try
:
arg_1
.
append
(
GitCloneVersion
(
arg_2
,
arg_2
,
arg_0
)
)
except
ValueError
:
logger
.
debug
(
'invalid version tag: %s'
,
arg_2
)
return
arg_1

def Func(arg_0):
        ''' return a list of GitCloneVersion objects for tags which are valid
            semantic version idenfitifiers.
        '''
        arg_1 = []
        for arg_2 in arg_0.vcs.tags():
            logger.debug("available version tag: %s", arg_2)
            # ignore empty tags:
            if not len(arg_2.strip()):
                continue
            try:
                arg_1.append(GitCloneVersion(arg_2, arg_2, arg_0))
            except ValueError:
                logger.debug('invalid version tag: %s', arg_2)
        return arg_1

return a list of GitCloneVersion objects for tags which are valid semantic version idenfitifiers .


(self, file, language=None, entities=None)

def
Func
(
arg_0
,
arg_1
,
arg_2
=
,
arg_3
=
)
:
arg_4
=
{
"customisation"
:
"generic"
}
if
arg_2
:
arg_4
[
'language'
]
=
{
"lang"
:
arg_2
}
if
arg_3
:
arg_4
[
'entities'
]
=
arg_3
arg_5
=
{
'query'
:
str
(
arg_4
)
,
'file'
:
(
arg_1
,
open
(
arg_1
,
'rb'
)
,
'application/pdf'
,
{
'Expires'
:
'0'
}
)
}
arg_6
,
arg_7
=
arg_0
.
post
(
arg_0
.
disambiguate_service
,
arg_5
=
arg_5
,
headers
=
{
'Accept'
:
'application/json'
}
,
)
if
arg_7
!=
200
:
logger
.
debug
(
'Disambiguation failed with error '
+
str
(
arg_7
)
)
return
arg_0
.
decode
(
arg_6
)
,
arg_7

def Func(arg_0, arg_1, arg_2=None, arg_3=None):
        """ Call the disambiguation service in order to process a pdf file .

        Args:
            pdf (file): PDF file to be disambiguated.
            language (str): language of text (if known)

        Returns:
            dict, int: API response and API status.
        """

        arg_4 = {
            "customisation": "generic"
        }

        if arg_2:
            arg_4['language'] = {"lang": arg_2}

        if arg_3:
            arg_4['entities'] = arg_3

        arg_5 = {
            'query': str(arg_4),
            'file': (
                arg_1,
                open(arg_1, 'rb'),
                'application/pdf',
                {'Expires': '0'}
            )
        }

        arg_6, arg_7 = arg_0.post(
            arg_0.disambiguate_service,
            arg_5=arg_5,
            headers={'Accept': 'application/json'},
        )

        if arg_7 != 200:
            logger.debug('Disambiguation failed with error ' + str(arg_7))

        return arg_0.decode(arg_6), arg_7


def Func ( arg_0 ) : if arg_0 . _Funcd : return arg_0 . _socket . Func ( ) arg_0 . _Funcd = True

def Func(arg_0):
        # type: () -> None
        """Close the socket to free system resources.

        After the socket is Funcd, further operations with socket
        will fail. Multiple calls to Func will have no effect.
        """

        if arg_0._Funcd:
            return
        arg_0._socket.Func()
        arg_0._Funcd = True

Close the socket to free system resources.

        After the socket is closed, further operations with socket
        will fail. Multiple calls to close will have no effect.

Close the socket to free system resources .


return (
            not self.name.startswith("_")
            and self.parent.is_class
            and self.parent.is_public
        )

def Func ( arg_0 ) : return ( not arg_0 . name . startswith ( "_" ) and arg_0 . parent . is_class and arg_0 . parent . Func )

def Func(arg_0):
        """Return True iff this class should be considered public."""
        return (
            not arg_0.name.startswith("_")
            and arg_0.parent.is_class
            and arg_0.parent.Func
        )

Return True iff this class should be considered public .


def Func(arg_0):
    """ checks to make sure that the card passes a luhn mod-10 checksum """
    arg_1 = 0
    arg_2 = len(arg_0)
    arg_3 = arg_2 & 1

    for arg_4 in range(0, arg_2):
        arg_5 = int(arg_0[arg_4])

        if not ((arg_4 & 1) ^ arg_3):
            arg_5 *= 2
        if arg_5 > 9:
            arg_5 -= 9

        arg_1 += arg_5

    return (arg_1 % 10) == 0

checks to make sure that the card passes a luhn mod - 10 checksum


def
Func
(
arg_0
,
arg_1
=
False
)
:
if
arg_0
.
_retrieved_at
+
arg_0
.
REFRESH_INTERVAL
<
time
.
time
(
)
:
arg_2
=
h2o
.
api
(
"GET /3/Cloud"
)
arg_0
.
_fill_from_h2ocluster
(
arg_2
)
arg_3
=
sum
(
arg_12
[
"num_cpus"
]
for
arg_12
in
arg_0
.
nodes
)
arg_4
=
sum
(
arg_12
[
"cpus_allowed"
]
for
arg_12
in
arg_0
.
nodes
)
arg_5
=
sum
(
arg_12
[
"free_mem"
]
for
arg_12
in
arg_0
.
nodes
)
arg_6
=
sum
(
not
arg_12
[
"healthy"
]
for
arg_12
in
arg_0
.
nodes
)
arg_7
=
"locked"
if
arg_0
.
locked
else
"accepting new members"
if
arg_6
==
0
:
arg_7
+=
", healthy"
else
:
arg_7
+=
", %d nodes are not healthy"
%
arg_6
arg_8
=
arg_0
.
list_api_extensions
(
)
H2ODisplay
(
[
[
"H2O cluster uptime:"
,
get_human_readable_time
(
arg_0
.
cloud_uptime_millis
)
]
,
[
"H2O cluster timezone:"
,
arg_0
.
cloud_internal_timezone
]
,
[
"H2O data parsing timezone:"
,
arg_0
.
datafile_parser_timezone
]
,
[
"H2O cluster version:"
,
arg_0
.
version
]
,
[
"H2O cluster version age:"
,
"{} {}"
.
format
(
arg_0
.
build_age
,
(
"!!!"
if
arg_0
.
build_too_old
else
""
)
)
]
,
[
"H2O cluster name:"
,
arg_0
.
cloud_name
]
,
[
"H2O cluster total nodes:"
,
arg_0
.
cloud_size
]
,
[
"H2O cluster free memory:"
,
get_human_readable_bytes
(
arg_5
)
]
,
[
"H2O cluster total cores:"
,
str
(
arg_3
)
]
,
[
"H2O cluster allowed cores:"
,
str
(
arg_4
)
]
,
[
"H2O cluster status:"
,
arg_7
]
,
[
"H2O connection url:"
,
h2o
.
connection
(
)
.
base_url
]
,
[
"H2O connection proxy:"
,
h2o
.
connection
(
)
.
proxy
]
,
[
"H2O internal security:"
,
arg_0
.
internal_security_enabled
]
,
[
"H2O API Extensions:"
,
', '
.
join
(
arg_8
)
]
,
[
"Python version:"
,
"%d.%d.%d %s"
%
tuple
(
sys
.
version_info
[
:
4
]
)
]
,
]
)
if
arg_1
:
arg_9
=
[
"h2o"
,
"healthy"
,
"last_ping"
,
"num_cpus"
,
"sys_load"
,
"mem_value_size"
,
"free_mem"
,
"pojo_mem"
,
"swap_mem"
,
"free_disk"
,
"max_disk"
,
"pid"
,
"num_keys"
,
"tcps_active"
,
"open_fds"
,
"rpcs_active"
]
arg_10
=
[
"Nodes info:"
]
+
[
"Node %d"
%
(
arg_13
+
1
)
for
arg_13
in
range
(
len
(
arg_0
.
nodes
)
)
]
arg_11
=
[
[
arg_14
]
for
arg_14
in
arg_9
]
for
arg_12
in
arg_0
.
nodes
:
for
arg_13
,
arg_14
in
enumerate
(
arg_9
)
:
arg_11
[
arg_13
]
.
append
(
arg_12
[
arg_14
]
)
H2ODisplay
(
arg_11
=
arg_11
,
arg_10
=
arg_10
)

def Func(arg_0, arg_1=False):
        """
        Print current cluster status information.

        :param detailed: if True, then also print detailed information about each node.
        """
        if arg_0._retrieved_at + arg_0.REFRESH_INTERVAL < time.time():
            # Info is stale, need to refresh
            arg_2 = h2o.api("GET /3/Cloud")
            arg_0._fill_from_h2ocluster(arg_2)
        arg_3 = sum(arg_12["num_cpus"] for arg_12 in arg_0.nodes)
        arg_4 = sum(arg_12["cpus_allowed"] for arg_12 in arg_0.nodes)
        arg_5 = sum(arg_12["free_mem"] for arg_12 in arg_0.nodes)
        arg_6 = sum(not arg_12["healthy"] for arg_12 in arg_0.nodes)
        arg_7 = "locked" if arg_0.locked else "accepting new members"
        if arg_6 == 0:
            arg_7 += ", healthy"
        else:
            arg_7 += ", %d nodes are not healthy" % arg_6
        arg_8 = arg_0.list_api_extensions()
        H2ODisplay([
            ["H2O cluster uptime:",        get_human_readable_time(arg_0.cloud_uptime_millis)],
            ["H2O cluster timezone:",      arg_0.cloud_internal_timezone],
            ["H2O data parsing timezone:", arg_0.datafile_parser_timezone],
            ["H2O cluster version:",       arg_0.version],
            ["H2O cluster version age:",   "{} {}".format(arg_0.build_age, ("!!!" if arg_0.build_too_old else ""))],
            ["H2O cluster name:",          arg_0.cloud_name],
            ["H2O cluster total nodes:",   arg_0.cloud_size],
            ["H2O cluster free memory:",   get_human_readable_bytes(arg_5)],
            ["H2O cluster total cores:",   str(arg_3)],
            ["H2O cluster allowed cores:", str(arg_4)],
            ["H2O cluster status:",        arg_7],
            ["H2O connection url:",        h2o.connection().base_url],
            ["H2O connection proxy:",      h2o.connection().proxy],
            ["H2O internal security:",     arg_0.internal_security_enabled],
            ["H2O API Extensions:",        ', '.join(arg_8)],
            ["Python version:",            "%d.%d.%d %s" % tuple(sys.version_info[:4])],
        ])

        if arg_1:
            arg_9 = ["h2o", "healthy", "last_ping", "num_cpus", "sys_load", "mem_value_size", "free_mem", "pojo_mem",
                    "swap_mem", "free_disk", "max_disk", "pid", "num_keys", "tcps_active", "open_fds", "rpcs_active"]
            arg_10 = ["Nodes info:"] + ["Node %d" % (arg_13 + 1) for arg_13 in range(len(arg_0.nodes))]
            arg_11 = [[arg_14] for arg_14 in arg_9]
            for arg_12 in arg_0.nodes:
                for arg_13, arg_14 in enumerate(arg_9):
                    arg_11[arg_13].append(arg_12[arg_14])
            H2ODisplay(arg_11=arg_11, arg_10=arg_10)

Print current cluster status information .


def Func(arg_0, arg_1=False):

        """ Parses data from Wikipedia page markup.

        The markup comes from Wikipedia's edit page.
        We Func it here into objects containing plain text.
        The light version Funcs only links to other articles, it's faster than a full Func.

        """

        arg_2 = arg_0.markup

        arg_0.disambiguation = arg_0.Func_disambiguation(arg_2)
        arg_0.categories = arg_0.Func_categories(arg_2)
        arg_0.links = arg_0.Func_links(arg_2)

        if not arg_1:

            # Conversion of HTML markup to Wikipedia markup.
            arg_2 = arg_0.convert_pre(arg_2)
            arg_2 = arg_0.convert_li(arg_2)
            arg_2 = arg_0.convert_table(arg_2)
            arg_2 = replace_entities(arg_2)

            # Harvest references from the markup
            # and replace them by footnotes.
            arg_2 = arg_2.replace("{{Cite", "{{cite")
            arg_2 = re.sub("\{\{ {1,2}cite", "{{cite", arg_2)
            arg_0.references, arg_2 = arg_0.Func_references(arg_2)

            # Make sure there are no legend linebreaks in image links.
            # Then harvest images and strip them from the markup.
            arg_2 = re.sub("\n+(\{\{legend)", "\\1", arg_2)
            arg_0.images, arg_2 = arg_0.Func_images(arg_2)
            arg_0.images.extend(arg_0.Func_gallery_images(arg_2))

            arg_0.paragraphs = arg_0.Func_paragraphs(arg_2)
            arg_0.tables = arg_0.Func_tables(arg_2)
            arg_0.translations = arg_0.Func_translations(arg_2)
            arg_0.important = arg_0.Func_important(arg_2)

Parses data from Wikipedia page markup.

        The markup comes from Wikipedia's edit page.
        We parse it here into objects containing plain text.
        The light version parses only links to other articles, it's faster than a full parse.

Parses data from Wikipedia page markup .


(self, component_info=None, data=None, component_position=None)

return self._get_3d_markers(
            RT3DMarkerPosition, component_info, data, component_position
        )

def Func(arg_0, arg_1=None, arg_2=None, arg_3=None):
        """Get 3D markers."""
        return arg_0._Func(
            RT3DMarkerPosition, arg_1, arg_2, arg_3
        )


def Func ( arg_0 ) : arg_0 . file_obj . seek ( 0 ) arg_1 , arg_2 = arg_0 . read_header ( ) arg_0 . file_obj . seek ( arg_2 ) arg_3 = int ( arg_1 [ 'BLOCSIZE' ] ) arg_4 = int ( arg_1 [ 'NBITS' ] ) arg_0 . file_obj . seek ( int ( arg_1 [ 'BLOCSIZE' ] ) , 1 ) arg_5 = 1 arg_6 = False while not arg_6 : try : arg_7 , arg_8 = arg_0 . read_header ( ) arg_0 . file_obj . seek ( arg_8 ) arg_0 . file_obj . seek ( arg_7 [ 'BLOCSIZE' ] , 1 ) arg_5 += 1 except EndOfFileError : arg_6 = True break arg_0 . file_obj . seek ( 0 ) return arg_5

def Func(arg_0):
        """ Seek through the file to find how many data blocks there are in the file

        Returns:
            n_blocks (int): number of data blocks in the file
        """
        arg_0.file_obj.seek(0)
        arg_1, arg_2 = arg_0.read_header()

        arg_0.file_obj.seek(arg_2)
        arg_3 = int(arg_1['BLOCSIZE'])
        arg_4 = int(arg_1['NBITS'])
        arg_0.file_obj.seek(int(arg_1['BLOCSIZE']), 1)
        arg_5 = 1
        arg_6 = False
        while not arg_6:
            try:
                arg_7, arg_8 = arg_0.read_header()
                arg_0.file_obj.seek(arg_8)
                arg_0.file_obj.seek(arg_7['BLOCSIZE'], 1)
                arg_5 += 1
            except EndOfFileError:
                arg_6 = True
                break

        arg_0.file_obj.seek(0)
        return arg_5


(
        self,
        name,
        subject,
        text='',
        template_id=None,
        html=None,
        locale=None,
        timeout=None
    )

return self._api_request(
            url,
            self.HTTP_POST,
            payload=payload,
            timeout=timeout
        )

def Func(
        arg_0,
        arg_1,
        arg_2,
        arg_3='',
        arg_4=None,
        arg_5=None,
        arg_6=None,
        arg_7=None
    ):
        """ API call to create a new version of a template """
        if(arg_5):
            arg_8 = {
                'name': arg_1,
                'subject': arg_2,
                'html': arg_5,
                'text': arg_3
            }
        else:
            arg_8 = {
                'name': arg_1,
                'subject': arg_2,
                'text': arg_3
            }

        if arg_6:
            arg_9 = arg_0.TEMPLATES_SPECIFIC_LOCALE_VERSIONS_ENDPOINT % (
                arg_4,
                arg_6
            )
        else:
            arg_9 = arg_0.TEMPLATES_NEW_VERSION_ENDPOINT % arg_4

        return arg_0._api_request(
            arg_9,
            arg_0.HTTP_POST,
            arg_8=arg_8,
            arg_7=arg_7
        )


def Func(arg_0, arg_1=None):
        '''
        Update this organisations information. Returns a new organisation
        object.
        '''
        arg_2 = arg_0.fetch_json(
            uri_path=arg_0.base_uri,
            http_method='PUT',
            arg_1=arg_1 or {}
        )

        return arg_0.create_organisation(arg_2)

Update this organisations information . Returns a new organisation object .


(element1, element2, ignore_level1_cdata = False)

def Func ( arg_0 , arg_1 , arg_2 = False ) : if None in ( arg_0 , arg_1 ) or arg_0 . tag != arg_1 . tag : return False arg_3 = arg_0 . items ( ) arg_3 . sort ( ) arg_4 = arg_1 . items ( ) arg_4 . sort ( ) if not arg_2 : if arg_0 . text != arg_1 . text : return False if arg_3 != arg_4 : return False if len ( arg_0 ) != len ( arg_1 ) : return False for arg_5 , arg_6 in zip ( arg_0 , arg_1 ) : if arg_5 . tag != arg_6 . tag : return False if not arg_2 : if arg_0 . text != arg_1 . text : return False if not Func ( arg_5 , arg_6 ) : return False return True

def Func(arg_0, arg_1, arg_2 = False):
    """Check if two XML elements are equal.

    :Parameters:
        - `element1`: the first element to compare
        - `element2`: the other element to compare
        - `ignore_level1_cdata`: if direct text children of the elements
          should be ignored for the comparision
    :Types:
        - `element1`: :etree:`ElementTree.Element`
        - `element2`: :etree:`ElementTree.Element`
        - `ignore_level1_cdata`: `bool`

    :Returntype: `bool`
    """
    # pylint: disable-msg=R0911
    if None in (arg_0, arg_1) or arg_0.tag != arg_1.tag:
        return False
    arg_3 = arg_0.items()
    arg_3.sort()
    arg_4 = arg_1.items()
    arg_4.sort()

    if not arg_2:
        if arg_0.text != arg_1.text:
            return False

    if arg_3 != arg_4:
        return False

    if len(arg_0) != len(arg_1):
        return False
    for arg_5, arg_6 in zip(arg_0, arg_1):
        if arg_5.tag != arg_6.tag:
            return False
        if not arg_2:
            if arg_0.text != arg_1.text:
                return False
        if not Func(arg_5, arg_6):
            return False
    return True


def Func(arg_0, arg_1=False):
  """Parse a file, string, or list of strings containing parameter bindings.

  Parses parameter binding strings to set up the global configuration.  Once
  `Func` has been called, any calls to configurable functions will have
  parameter values set according to the values specified by the parameter
  bindings in `bindings`.

  An individual parameter binding has the format

      maybe/some/scopes/configurable_name.parameter_name = value

  Multiple binding strings can be passed either in the form of a file-like
  object supporting the `readline` method, a single string with each individual
  parameter binding separated by a newline, or as a list of individual parameter
  binding strings.

  Any Python literal (lists, tuples, dicts, strings, etc.) is acceptable to the
  right of the equals sign, and follows standard Python rules for line
  continuation. Additionally, a value starting with '@' is interpreted as a
  (possibly scoped) reference to another configurable function, in which case
  this value is replaced by a reference to that function. If the value
  furthermore ends in `()` (e.g., `@configurable_name()`), then the value
  returned when calling the function is used (it will be called *just before*
  the function consuming the output is called).

  See the module documentation for a more detailed description of scoping
  mechanisms and a complete example.

  Reading from a file could be done as follows:

      with open('/path/to/file.config') as bindings:
        gin.Func(bindings)

  Passing a newline separated string of parameter bindings might look like:

      bindings = '''
          my_class.param_one = 'asdf'
          my_class_param_two = 9.7
      '''
      gin.Func(bindings)

  Alternatively, one can declare a list of parameter bindings and pass it in:

      bindings = [
          'my_class.param_one = "asdf"',
          'my_class.param_two = 9.7',
      ]
      gin.Func(bindings)

  Can skip unknown configurables. For example, if no module containing a
  'training' configurable was imported, errors can be avoided by specifying
  `skip_unknown=True`:

      bindings = [
          'my_class.param_one = "asdf"',
          'my_class.param_two = 9.7',
          'training.learning_rate = 0.1',
      ]
      gin.Func(bindings, skip_unknown=True)

  Args:
    bindings: A file-like object supporting the readline method, a newline
      separated string of parameter bindings, or a list of individual parameter
      binding strings.
    skip_unknown: A boolean indicating whether unknown configurables and imports
      should be skipped (instead of causing an error). Configurable references
      to unknown configurables will cause errors if they are present in a
      binding that is not itself skipped due to an unknown configurable. This
      can also be a list of configurable names: any unknown configurables that
      do not match an item in the list will still cause errors. Note that
      bindings for known configurables will always be parsed.
  """
  if isinstance(arg_0, (list, tuple)):
    arg_0 = '\n'.join(arg_0)

  _validate_skip_unknown(arg_1)
  if isinstance(arg_1, (list, tuple)):
    arg_1 = set(arg_1)

  arg_2 = config_parser.ConfigParser(arg_0, ParserDelegate(arg_1))
  for arg_3 in arg_2:
    if isinstance(arg_3, config_parser.BindingStatement):
      arg_4, arg_5, arg_6, arg_7, arg_8 = arg_3
      if not arg_6:
        arg_9 = '{}/{}'.format(arg_4, arg_5) if arg_4 else arg_5
        with utils.try_with_location(arg_8):
          bind_parameter((arg_9, 'gin.macro', 'value'), arg_7)
        continue
      if not _should_skip(arg_5, arg_1):
        with utils.try_with_location(arg_8):
          bind_parameter((arg_4, arg_5, arg_6), arg_7)
    elif isinstance(arg_3, config_parser.ImportStatement):
      if arg_1:
        try:
          __import__(arg_3.module)
          _IMPORTED_MODULES.add(arg_3.module)
        except ImportError:
          arg_10 = 'Skipping import of unknown module `%s` (skip_unknown=%r).'
          logging.info(arg_10, arg_3.module, arg_1)
      else:
        with utils.try_with_location(arg_3.location):
          __import__(arg_3.module)
        _IMPORTED_MODULES.add(arg_3.module)
    elif isinstance(arg_3, config_parser.IncludeStatement):
      with utils.try_with_location(arg_3.location):
        Func_file(arg_3.filename, arg_1)
    else:
      raise AssertionError('Unrecognized statement type {}.'.format(arg_3))

Parse a file, string, or list of strings containing parameter bindings.

  Parses parameter binding strings to set up the global configuration.  Once
  `parse_config` has been called, any calls to configurable functions will have
  parameter values set according to the values specified by the parameter
  bindings in `bindings`.

  An individual parameter binding has the format

      maybe/some/scopes/configurable_name.parameter_name = value

  Multiple binding strings can be passed either in the form of a file-like
  object supporting the `readline` method, a single string with each individual
  parameter binding separated by a newline, or as a list of individual parameter
  binding strings.

  Any Python literal (lists, tuples, dicts, strings, etc.) is acceptable to the
  right of the equals sign, and follows standard Python rules for line
  continuation. Additionally, a value starting with '@' is interpreted as a
  (possibly scoped) reference to another configurable function, in which case
  this value is replaced by a reference to that function. If the value
  furthermore ends in `()` (e.g., `@configurable_name()`), then the value
  returned when calling the function is used (it will be called *just before*
  the function consuming the output is called).

  See the module documentation for a more detailed description of scoping
  mechanisms and a complete example.

  Reading from a file could be done as follows:

      with open('/path/to/file.config') as bindings:
        gin.parse_config(bindings)

  Passing a newline separated string of parameter bindings might look like:

      bindings = '''
          my_class.param_one = 'asdf'
          my_class_param_two = 9.7
      '''
      gin.parse_config(bindings)

  Alternatively, one can declare a list of parameter bindings and pass it in:

      bindings = [
          'my_class.param_one = "asdf"',
          'my_class.param_two = 9.7',
      ]
      gin.parse_config(bindings)

  Can skip unknown configurables. For example, if no module containing a
  'training' configurable was imported, errors can be avoided by specifying
  `skip_unknown=True`:

      bindings = [
          'my_class.param_one = "asdf"',
          'my_class.param_two = 9.7',
          'training.learning_rate = 0.1',
      ]
      gin.parse_config(bindings, skip_unknown=True)

  Args:
    bindings: A file-like object supporting the readline method, a newline
      separated string of parameter bindings, or a list of individual parameter
      binding strings.
    skip_unknown: A boolean indicating whether unknown configurables and imports
      should be skipped (instead of causing an error). Configurable references
      to unknown configurables will cause errors if they are present in a
      binding that is not itself skipped due to an unknown configurable. This
      can also be a list of configurable names: any unknown configurables that
      do not match an item in the list will still cause errors. Note that
      bindings for known configurables will always be parsed.

Parse a file string or list of strings containing parameter bindings .


def Func ( arg_0 , arg_1 ) : arg_0 . add_token ( 'SPACE' , arg_1 ) arg_0 . pos += len ( arg_1 ) pass

def Func(arg_0, arg_1):
        r'\s+'
        arg_0.add_token('SPACE', arg_1)
        arg_0.pos += len(arg_1)
        pass


Calls implmentation to get a render context,
        passes it to the drawqueues render function
        then calls self.rendering_finished

def Func(arg_0, arg_1, arg_2, arg_3):
        '''
        Calls implmentation to get a Func context,
        passes it to the drawqueues Func function
        then calls self.Funcing_finished
        '''
        arg_4 = arg_0.create_rcontext(arg_1, arg_2)
        arg_3.Func(arg_4)
        arg_0.Funcing_finished(arg_1, arg_2, arg_4)
        return arg_4

Calls implmentation to get a render context passes it to the drawqueues render function then calls self . rendering_finished


def Func(arg_0, arg_1, arg_2, arg_3=None):
        """
        Updates settings of a Cloud SQL instance.

        Caution: This is not a partial update, so you must include values for
        all the settings that you want to retain.

        :param body: Body required by the Cloud SQL patch API, as described in
            https://cloud.google.com/sql/docs/mysql/admin-api/v1beta4/instances/patch#request-body.
        :type body: dict
        :param instance: Cloud SQL instance ID. This does not include the project ID.
        :type instance: str
        :param project_id: Project ID of the project that contains the instance. If set
            to None or missing, the default project_id from the GCP connection is used.
        :type project_id: str
        :return: None
        """
        arg_4 = arg_0.get_conn().instances().patch(
            project=arg_3,
            arg_2=arg_2,
            arg_1=arg_1
        ).execute(num_retries=arg_0.num_retries)
        arg_5 = arg_4["name"]
        arg_0._wait_for_operation_to_complete(arg_3=arg_3,
                                             arg_5=arg_5)

Updates settings of a Cloud SQL instance .


def Func ( arg_0 ) : if not exists ( Post . src_dir ) : logger . error ( SourceDirectoryNotFound . __doc__ ) sys . exit ( SourceDirectoryNotFound . exit_code ) arg_1 = [ ] for arg_2 in ls ( Post . src_dir ) : if arg_2 . endswith ( src_ext ) : arg_1 . append ( join ( Post . src_dir , arg_2 ) ) if exists ( config . filepath ) : arg_1 . append ( config . filepath ) arg_3 = dict ( ( p , stat ( p ) . st_mtime ) for p in arg_1 ) return arg_3

def Func(arg_0):
        """get source files' update time"""

        if not exists(Post.src_dir):
            logger.error(SourceDirectoryNotFound.__doc__)
            sys.exit(SourceDirectoryNotFound.exit_code)

        arg_1 = []

        for arg_2 in ls(Post.src_dir):
            if arg_2.endswith(src_ext):
                arg_1.append(join(Post.src_dir, arg_2))

        # config.toml
        if exists(config.filepath):
            arg_1.append(config.filepath)

        # files: a <filepath to updated time> dict
        arg_3 = dict((p, stat(p).st_mtime) for p in arg_1)
        return arg_3


(self, uc, access, address, size, value, data)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6):
        """
        Handle memory operations from unicorn.
        """
        assert arg_2 in (UC_MEM_WRITE, UC_MEM_READ, UC_MEM_FETCH)

        if arg_2 == UC_MEM_WRITE:
            arg_0._cpu.write_int(arg_3, arg_5, arg_4 * 8)

        # If client code is attempting to read a value, we need to bring it
        # in from Manticore state. If we try to mem_write it here, Unicorn
        # will segfault. We add the value to a list of things that need to
        # be written, and ask to restart the emulation.
        elif arg_2 == UC_MEM_READ:
            arg_5 = arg_0._cpu.read_bytes(arg_3, arg_4)

            if arg_3 in arg_0._should_be_written:
                return True

            arg_0._should_be_written[arg_3] = arg_5

            arg_0._should_try_again = True
            return False

        return True


def Func(arg_0):
        """Build and execute login request"""
        arg_1 = "%s/auth.cgi?api=SYNO.API.Auth&version=2" % (
            arg_0.base_url,
        )

        arg_2 = "method=login&%s" % (arg_0._encode_credentials())

        arg_3 = "%s&%s&session=Core&format=cookie" % (
            arg_1,
            arg_2)
        arg_4 = arg_0._execute_get_url(arg_3, False)

        # Parse Result if valid
        if arg_4 is not None:
            arg_0.access_token = arg_4["data"]["sid"]
            arg_0._debuglog("Authentication Succesfull, token: " +
                           str(arg_0.access_token))
            return True
        else:
            arg_0._debuglog("Authentication Failed")
            return False


Returns True when point 1 and point 2 overlap.

        There is an r treshold in which point 1 and point 2
        are considered to overlap.

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 = 5 ) : if abs ( arg_3 - arg_1 ) < arg_5 and abs ( arg_4 - arg_2 ) < arg_5 : return True else : return False

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5=5):

        """ Returns True when point 1 and point 2 Func.

        There is an r treshold in which point 1 and point 2
        are considered to Func.

        """

        if abs(arg_3-arg_1) < arg_5 and abs(arg_4-arg_2) < arg_5:
            return True
        else:
            return False

Returns True when point 1 and point 2 overlap . There is an r treshold in which point 1 and point 2 are considered to overlap .


def Func ( arg_0 , arg_1 ) : arg_2 = map ( lambda n : [ 0.0 for i in range ( n ) ] , arg_1 ) arg_3 = [ ] def predict ( arg_4 ) : unimplemented ( ) return predict

def Func(arg_0, arg_1):
   """Layered feed-forward network."""

   arg_2 = map(lambda n: [0.0 for i in range(n)], arg_1)
   arg_3 = []

   def predict(arg_4):
      unimplemented()

   return predict


def
Func
(
)
:
arg_0
=
docopt
(
__doc__
,
version
=
"Find Known Secrets {0}"
.
format
(
__version__
)
)
logger
.
debug
(
arg_0
)
if
arg_0
[
"here"
]
:
go
(
)
else
:
arg_1
=
arg_0
[
"--secrets"
]
arg_2
=
Searcher
(
source
=
arg_0
[
"--source"
]
,
arg_1
=
arg_1
)
arg_2
.
go
(
)

def Func():  # type: ()->None
    """
    Take care of command line options
    """

    arg_0 = docopt(__doc__, version="Find Known Secrets {0}".format(__version__))

    logger.debug(arg_0)
    # print(arguments)
    if arg_0["here"]:
        # all default
        go()
    else:
        # user config
        arg_1 = arg_0["--secrets"]

        arg_2 = Searcher(source=arg_0["--source"], arg_1=arg_1)
        arg_2.go()


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
[
]
for
arg_3
in
arg_0
:
arg_4
=
[
]
for
arg_5
in
arg_3
[
'samples'
]
:
arg_6
=
[
]
arg_6
.
append
(
arg_3
[
'institute'
]
)
arg_6
.
append
(
arg_3
[
'_id'
]
)
arg_6
.
append
(
arg_3
[
'category'
]
)
arg_6
.
append
(
arg_3
[
'variant_type'
]
)
arg_6
.
append
(
arg_3
[
'display_name'
]
[
:
30
]
)
arg_7
=
arg_3
[
'case_obj'
]
[
'display_name'
]
arg_8
=
'/'
.
join
(
[
''
,
arg_3
[
'institute'
]
,
arg_7
,
arg_3
[
'_id'
]
]
)
arg_6
.
append
(
arg_8
)
arg_6
.
append
(
arg_3
.
get
(
'validation'
)
)
arg_6
.
append
(
arg_7
)
arg_9
=
next
(
ind
for
ind
in
arg_3
[
'case_obj'
]
[
'individuals'
]
if
ind
[
'individual_id'
]
==
arg_5
[
'sample_id'
]
)
if
arg_9
[
'phenotype'
]
==
2
:
arg_6
.
append
(
' '
.
join
(
[
arg_5
.
get
(
'display_name'
)
,
'(A)'
]
)
)
else
:
arg_6
.
append
(
arg_5
.
get
(
'display_name'
)
)
arg_6
.
append
(
''
.
join
(
[
'chr'
,
arg_3
[
'chromosome'
]
,
':'
,
str
(
arg_3
[
'position'
]
)
]
)
)
arg_6
.
append
(
'>'
.
join
(
[
arg_3
.
get
(
'reference'
)
[
:
10
]
,
arg_3
.
get
(
'alternative'
)
[
:
10
]
]
)
)
arg_10
=
[
]
arg_11
=
[
]
arg_12
=
[
]
for
arg_13
in
arg_3
.
get
(
'genes'
)
:
arg_10
.
append
(
arg_13
.
get
(
'hgnc_symbol'
,
''
)
)
arg_12
.
append
(
arg_13
.
get
(
'functional_annotation'
)
)
for
arg_14
in
arg_13
.
get
(
'transcripts'
)
:
if
arg_14
.
get
(
'is_canonical'
)
and
arg_14
.
get
(
'protein_sequence_name'
)
:
arg_11
.
append
(
urllib
.
parse
.
unquote
(
arg_14
.
get
(
'protein_sequence_name'
)
)
)
arg_6
.
append
(
','
.
join
(
arg_11
)
)
arg_6
.
append
(
','
.
join
(
arg_12
)
)
arg_6
.
append
(
','
.
join
(
arg_10
)
)
arg_6
.
append
(
arg_3
.
get
(
'rank_score'
)
)
arg_6
.
append
(
arg_3
.
get
(
'cadd_score'
)
)
arg_6
.
append
(
arg_5
.
get
(
'genotype_call'
)
)
arg_6
.
append
(
arg_5
[
'allele_depths'
]
[
0
]
)
arg_6
.
append
(
arg_5
[
'allele_depths'
]
[
1
]
)
arg_6
.
append
(
arg_5
[
'genotype_quality'
]
)
for
arg_15
in
arg_1
:
if
arg_3
.
get
(
arg_15
)
:
arg_6
.
append
(
arg_3
.
get
(
arg_15
)
)
else
:
arg_6
.
append
(
'-'
)
arg_2
.
append
(
arg_6
)
return
arg_2

def Func(arg_0, arg_1):
    """Create the lines for an excel file with verified variants for
        an institute

        Args:
            aggregate_variants(list): a list of variants with aggregates case data
            unique_callers(set): a unique list of available callers

        Returns:
            document_lines(list): list of lines to include in the document
    """
    arg_2 = []
    for arg_3 in arg_0:
        # get genotype and allele depth for each sample
        arg_4 = []
        for arg_5 in arg_3['samples']:
            arg_6 = [] # line elements corespond to contants.variants_export.VERIFIED_VARIANTS_HEADER
            arg_6.append(arg_3['institute'])
            arg_6.append(arg_3['_id']) # variant database ID
            arg_6.append(arg_3['category'])
            arg_6.append(arg_3['variant_type'])
            arg_6.append(arg_3['display_name'][:30]) # variant display name
            # Build local link to variant:
            arg_7 = arg_3['case_obj']['display_name']  # case display name
            arg_8 = '/'.join([ '', arg_3['institute'], arg_7, arg_3['_id'] ])
            arg_6.append(arg_8)
            arg_6.append(arg_3.get('validation'))
            arg_6.append(arg_7)
            arg_9 = next(ind for ind in arg_3['case_obj']['individuals'] if ind['individual_id'] == arg_5['sample_id'])
            if arg_9['phenotype'] == 2:
                arg_6.append(' '.join([arg_5.get('display_name'),'(A)'])) # label sample as affected
            else:
                arg_6.append(arg_5.get('display_name'))
            arg_6.append(''.join(['chr',arg_3['chromosome'],':',str(arg_3['position'])])) # position
            arg_6.append('>'.join([arg_3.get('reference')[:10],arg_3.get('alternative')[:10]])) # change
            arg_10 = []
            arg_11 = []
            arg_12 = []
            for arg_13 in arg_3.get('genes'): # this will be a unique long field in the document
                arg_10.append(arg_13.get('hgnc_symbol',''))
                arg_12.append(arg_13.get('functional_annotation'))
                for arg_14 in arg_13.get('transcripts'):
                    if arg_14.get('is_canonical') and arg_14.get('protein_sequence_name'):
                        arg_11.append(urllib.parse.unquote(arg_14.get('protein_sequence_name')))
            arg_6.append(','.join(arg_11))
            arg_6.append(','.join(arg_12))
            arg_6.append(','.join(arg_10))
            arg_6.append(arg_3.get('rank_score'))
            arg_6.append(arg_3.get('cadd_score'))
            arg_6.append(arg_5.get('genotype_call'))
            arg_6.append(arg_5['allele_depths'][0])
            arg_6.append(arg_5['allele_depths'][1])
            arg_6.append(arg_5['genotype_quality'])

            # Set callers values. One cell per caller, leave blank if not applicable
            for arg_15 in arg_1:
                if arg_3.get(arg_15):
                    arg_6.append(arg_3.get(arg_15))
                else:
                    arg_6.append('-')
            arg_2.append(arg_6)
    return arg_2


def Func(arg_0, arg_1):
    """Open stream, create output and finally write the stream to output."""
    global arg_6

    arg_2 = False
    for arg_3 in range(args.retry_open):
        try:
            arg_4, arg_5 = open_stream(arg_1)
            arg_2 = True
            break
        except StreamError as err:
            log.error("Try {0}/{1}: Could not open stream {2} ({3})", arg_3 + 1, args.retry_open, arg_1, err)

    if not arg_2:
        console.exit("Could not open stream {0}, tried {1} times, exiting", arg_1, args.retry_open)

    arg_6 = create_output(arg_0)

    try:
        arg_6.open()
    except (IOError, OSError) as err:
        if isinstance(arg_6, PlayerOutput):
            console.exit("Failed to start player: {0} ({1})",
                         args.player, err)
        else:
            console.exit("Failed to open output: {0} ({1})",
                         args.output, err)

    with closing(arg_6):
        log.debug("Writing stream to output")
        read_stream(arg_4, arg_6, arg_5)

    return True

Open stream create output and finally write the stream to output .


def
Func
(
arg_0
)
:
arg_1
=
set
(
)
try
:
for
arg_2
in
get_all_files
(
arg_0
)
:
if
is_dicom_file
(
arg_2
)
:
arg_1
.
add
(
arg_2
)
except
IOError
as
ioe
:
raise
IOError
(
'Error reading file {0}.'
.
format
(
arg_2
)
)
from
ioe
return
arg_1

def Func(arg_0):
    """
    Returns a list of the dicom files within root_path

    Parameters
    ----------
    root_path: str
    Path to the directory to be recursively searched for DICOM files.

    Returns
    -------
    dicoms: set
    Set of DICOM absolute file paths
    """
    arg_1 = set()

    try:
        for arg_2 in get_all_files(arg_0):
            if is_dicom_file(arg_2):
                arg_1.add(arg_2)
    except IOError as ioe:
        raise IOError('Error reading file {0}.'.format(arg_2)) from ioe

    return arg_1


def
Func
(
arg_0
)
:
def
xpath_find
(
arg_1
)
:
validate
(
ET
.
iselement
,
arg_1
)
arg_1
=
arg_1
.
find
(
arg_0
)
if
arg_1
is
:
raise
ValueError
(
"XPath '{0}' did not return an element"
.
format
(
arg_0
)
)
return
validate
(
ET
.
iselement
,
arg_1
)
return
transform
(
xpath_find
)

def Func(arg_0):
    """Find a XML element via xpath."""
    def xpath_find(arg_1):
        validate(ET.iselement, arg_1)
        arg_1 = arg_1.find(arg_0)
        if arg_1 is None:
            raise ValueError("XPath '{0}' did not return an element".format(arg_0))

        return validate(ET.iselement, arg_1)

    return transform(xpath_find)


def Func ( arg_0 , arg_1 , arg_2 ) : if len ( arg_1 . reviews ) != 0 : if not arg_0 . review_comment_set : arg_0 . review_comment_set = True arg_1 . reviews [ - 1 ] . comment = arg_2 return True else : raise CardinalityError ( 'ReviewComment' ) else : raise OrderError ( 'ReviewComment' )

def Func(arg_0, arg_1, arg_2):
        """Sets the review comment. Raises CardinalityError if
        already set. OrderError if no reviewer defined before.
        """
        if len(arg_1.reviews) != 0:
            if not arg_0.review_comment_set:
                arg_0.review_comment_set = True
                arg_1.reviews[-1].comment = arg_2
                return True
            else:
                raise CardinalityError('ReviewComment')
        else:
            raise OrderError('ReviewComment')

Sets the review comment . Raises CardinalityError if already set . OrderError if no reviewer defined before .


def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
=
)
:
if
not
isinstance
(
arg_1
,
basestring
)
:
raise
TypeError
(
'source must be a str, got: %r'
%
arg_1
)
if
not
isinstance
(
arg_2
,
dict
)
:
raise
TypeError
(
'data must be a dict, got: %r'
%
arg_2
)
if
arg_3
is
not
:
if
not
isinstance
(
arg_3
,
dict
)
:
raise
TypeError
(
'metadata must be a dict, got: %r'
%
arg_2
)

def Func(arg_0, arg_1, arg_2, arg_3=None):
        """Validate the display data.

        Parameters
        ----------
        source : str
            The fully dotted name of the callable that created the data, like
            :func:`foo.bar.my_formatter`.
        data : dict
            The formata data dictionary.
        metadata : dict
            Any metadata for the data.
        """

        if not isinstance(arg_1, basestring):
            raise TypeError('source must be a str, got: %r' % arg_1)
        if not isinstance(arg_2, dict):
            raise TypeError('data must be a dict, got: %r' % arg_2)
        if arg_3 is not None:
            if not isinstance(arg_3, dict):
                raise TypeError('metadata must be a dict, got: %r' % arg_2)


def Func ( arg_0 , arg_1 , arg_2 ) : if arg_0 . has_package ( arg_1 ) and arg_0 . has_file ( arg_1 ) : if not arg_0 . file_spdx_id_set : arg_0 . file_spdx_id_set = True if validations . validate_file_spdx_id ( arg_2 ) : arg_0 . file ( arg_1 ) . spdx_id = arg_2 return True else : raise SPDXValueError ( 'File::SPDXID' ) else : raise CardinalityError ( 'File::SPDXID' ) else : raise OrderError ( 'File::SPDXID' )

def Func(arg_0, arg_1, arg_2):
        """
        Sets the file SPDX Identifier.
        Raises OrderError if no package or no file defined.
        Raises SPDXValueError if malformed value.
        Raises CardinalityError if more than one spdx_id set.
        """
        if arg_0.has_package(arg_1) and arg_0.has_file(arg_1):
            if not arg_0.file_spdx_id_set:
                arg_0.file_spdx_id_set = True
                if validations.validate_file_spdx_id(arg_2):
                    arg_0.file(arg_1).spdx_id = arg_2
                    return True
                else:
                    raise SPDXValueError('File::SPDXID')
            else:
                raise CardinalityError('File::SPDXID')
        else:
            raise OrderError('File::SPDXID')

Sets the file SPDX Identifier . Raises OrderError if no package or no file defined . Raises SPDXValueError if malformed value . Raises CardinalityError if more than one spdx_id set .


Draws the submenu and its background.

        Note that this leaves the OpenGL state set to 2d drawing.

def
Func
(
arg_0
)
:
arg_0
.
window
.
set2d
(
)
if
isinstance
(
arg_0
.
bg
,
Layer
)
:
arg_0
.
bg
.
_Func
(
)
elif
hasattr
(
arg_0
.
bg
,
"Func"
)
and
callable
(
arg_0
.
bg
.
Func
)
:
arg_0
.
bg
.
Func
(
)
elif
isinstance
(
arg_0
.
bg
,
list
)
or
isinstance
(
arg_0
.
bg
,
tuple
)
:
arg_0
.
bg_vlist
.
Func
(
GL_QUADS
)
elif
callable
(
arg_0
.
bg
)
:
arg_0
.
bg
(
)
elif
isinstance
(
arg_0
.
bg
,
Background
)
:
if
not
arg_0
.
bg
.
initialized
:
arg_0
.
bg
.
init_bg
(
)
arg_0
.
bg
.
reFunc_bg
(
)
arg_0
.
bg
.
initialized
=
True
elif
arg_0
.
bg
==
"blank"
:
pass
else
:
raise
TypeError
(
"Unknown background type"
)
arg_0
.
window
.
set2d
(
)
for
arg_3
in
arg_0
.
widgets
.
values
(
)
:
if
arg_3
.
do_reFunc
:
arg_3
.
on_reFunc
(
)
arg_3
.
do_reFunc
=
False
arg_0
.
batch2d
.
Func
(
)
for
arg_3
in
arg_0
.
widgets
.
values
(
)
:
arg_3
.
Func
(
)

def Func(arg_0):
        """
        Draws the submenu and its background.

        Note that this leaves the OpenGL state set to 2d Funcing.
        """
        # Sets the OpenGL state for 2D-Drawing
        arg_0.window.set2d()

        # Draws the background
        if isinstance(arg_0.bg,Layer):
            arg_0.bg._Func()
        elif hasattr(arg_0.bg,"Func") and callable(arg_0.bg.Func):
            arg_0.bg.Func()
        elif isinstance(arg_0.bg,list) or isinstance(arg_0.bg,tuple):
            arg_0.bg_vlist.Func(GL_QUADS)
        elif callable(arg_0.bg):
            arg_0.bg()
        elif isinstance(arg_0.bg,Background):
            # The background will be Funcn via the batch
            if not arg_0.bg.initialized:
                arg_0.bg.init_bg()
                arg_0.bg.reFunc_bg()
                arg_0.bg.initialized=True
        elif arg_0.bg=="blank":
            pass
        else:
            raise TypeError("Unknown background type")

        # In case the background modified relevant state
        arg_0.window.set2d()

        # Check that all widgets that need reFuncing have been reFuncn
        for arg_3 in arg_0.widgets.values():
            if arg_3.do_reFunc:
                arg_3.on_reFunc()
                arg_3.do_reFunc = False

        # Actually Func the content
        arg_0.batch2d.Func()

        # Call custom Func methods where needed
        for arg_3 in arg_0.widgets.values():
            arg_3.Func()

Draws the submenu and its background . Note that this leaves the OpenGL state set to 2d drawing .


(size, z=0.0, scale=0.05, octaves=1, persistence=0.25, lacunarity=2.0)

def Func(arg_0, arg_1=0.0, arg_2=0.05, arg_3=1, arg_4=0.25, arg_5=2.0):
    """
    z value as like a seed
    """
    import noise
    arg_6 = np.empty(arg_0, dtype='float32')
    for arg_7 in range(arg_0[0]):
        for arg_8 in range(arg_0[1]):
            arg_9 = noise.snoise3(arg_8 * arg_2, arg_7 * arg_2, arg_1,
                              arg_3=arg_3, arg_4=arg_4, arg_5=arg_5)
            arg_6[arg_8, arg_7] = arg_9
    arg_6 = arg_6 * 0.5 + 0.5
    if __debug__:
        assert arg_6.min() >= 0. and arg_6.max() <= 1.0
    return arg_6


def Func ( arg_0 , arg_1 ) : arg_1 . write ( Operators . ITEBV ( arg_1 . size , arg_0 . PF , 1 , 0 ) )

def Func(arg_0, arg_1):
        """
        Sets byte if parity even.

        :param cpu: current CPU.
        :param dest: destination operand.
        """
        arg_1.write(Operators.ITEBV(arg_1.size, arg_0.PF, 1, 0))


def Func(arg_0, arg_1=False):
		'''
			Func - Returns all primary keys matching current filterset.

			@param sortByAge <bool> - If False, return will be a set and may not be ordered.
				If True, return will be a list and is guarenteed to represent objects oldest->newest

			@return <set> - A set of all primary keys associated with current filters.
		'''
		arg_2 = arg_0._get_connection()
		# Apply filters, and return object
		arg_3 = len(arg_0.filters)
		arg_4 = len(arg_0.notFilters)

		if arg_3 + arg_4 == 0:
			# No filters, get all.
			arg_2 = arg_0._get_connection()
			arg_5 = arg_2.smembers(arg_0._get_ids_key())

		elif arg_4 == 0:
			# Only Inclusive
			if arg_3 == 1:
				# Only one filter, get members of that index key
				(arg_6, arg_7) = arg_0.filters[0]
				arg_5 = arg_2.smembers(arg_0._get_key_for_index(arg_6, arg_7))
			else:
				# Several filters, intersect the index keys
				arg_8 = [arg_0._get_key_for_index(arg_6, arg_7) for arg_6, arg_7 in arg_0.filters]
				arg_5 = arg_2.sinter(arg_8)

		else:
			# Some negative filters present
			arg_9 = [arg_0._get_key_for_index(arg_6, arg_7) for arg_6, arg_7 in arg_0.notFilters]
			if arg_3 == 0:
				# Only negative, diff against all keys
				arg_5 = arg_2.sdiff(arg_0._get_ids_key(), *arg_9)
			else:
				# Negative and positive. Use pipeline, find all positive intersections, and remove negative matches
				arg_8 = [arg_0._get_key_for_index(arg_6, arg_7) for arg_6, arg_7 in arg_0.filters]

				arg_10 = arg_0._getTempKey()
				arg_11 = arg_2.pipeline()
				arg_11.sinterstore(arg_10, *arg_8)
				arg_11.sdiff(arg_10, *arg_9)
				arg_11.delete(arg_10)
				arg_5 = arg_11.execute()[1] # sdiff

		arg_5 = [ int(_key) for _key in arg_5 ]

		if arg_1 is False:
			return list(arg_5)
		else:
			arg_5 = list(arg_5)
			arg_5.sort()

			return arg_5

getPrimaryKeys - Returns all primary keys matching current filterset.

			@param sortByAge <bool> - If False, return will be a set and may not be ordered.
				If True, return will be a list and is guarenteed to represent objects oldest->newest

			@return <set> - A set of all primary keys associated with current filters.

getPrimaryKeys - Returns all primary keys matching current filterset .


(fname, mode=0o666, dir_fd=None, **kwargs)

def Func ( arg_0 , arg_1 = 0o666 , arg_2 = None , ** arg_3 ) : arg_4 = os . O_CREAT | os . O_APPEND with os . fdopen ( os . open ( arg_0 , arg_4 = arg_4 , arg_1 = arg_1 , arg_2 = arg_2 ) ) as f : os . utime ( f . fileno ( ) if os . utime in os . supports_fd else arg_0 , arg_2 = None if os . supports_fd else arg_2 , ** arg_3 , )

def Func(arg_0, arg_1=0o666, arg_2=None, **arg_3):
    """ Touch a file.

    Credits to <https://stackoverflow.com/a/1160227>.
    """
    arg_4 = os.O_CREAT | os.O_APPEND
    with os.fdopen(os.open(arg_0, arg_4=arg_4, arg_1=arg_1, arg_2=arg_2)) as f:
        os.utime(
            f.fileno() if os.utime in os.supports_fd else arg_0,
            arg_2=None if os.supports_fd else arg_2,
            **arg_3,
        )


def
Func
(
)
:
arg_0
=
settings
.
Session
(
)
arg_1
=
TaskInstance
arg_2
=
(
arg_0
.
query
(
arg_1
)
.
filter
(
arg_1
.
dag_id
.
in_
(
DAG_IDS
)
)
.
all
(
)
)
for
arg_3
in
arg_2
:
logging
.
info
(
'Deleting TaskInstance :: {}'
.
format
(
arg_3
)
)
arg_0
.
delete
(
arg_3
)
arg_0
.
commit
(
)

def Func():
    """
    Remove any existing task instances for the perf test DAGs.
    """
    arg_0 = settings.Session()
    arg_1 = TaskInstance
    arg_2 = (
        arg_0
        .query(arg_1)
        .filter(arg_1.dag_id.in_(DAG_IDS))
        .all()
    )
    for arg_3 in arg_2:
        logging.info('Deleting TaskInstance :: {}'.format(arg_3))
        arg_0.delete(arg_3)
    arg_0.commit()

Remove any existing task instances for the perf test DAGs .


def Func ( arg_0 , arg_1 = { } ) : if isinstance ( arg_1 , dict ) : for arg_2 in arg_1 . keys ( ) : if not hasattr ( arg_0 , arg_2 ) or not callable ( getattr ( arg_0 , arg_2 ) ) : setattr ( arg_0 , arg_2 , arg_1 [ arg_2 ] )

def Func(arg_0, arg_1={}):
        """
        Set attributes to dictionary values.

        - e.g.
        >>> import tmdbsimple as tmdb
        >>> movie = tmdb.Movies(103332)
        >>> response = movie.info()
        >>> movie.title  # instead of response['title']
        """
        if isinstance(arg_1, dict):
            for arg_2 in arg_1.keys():
                if not hasattr(arg_0, arg_2) or not callable(getattr(arg_0, arg_2)):
                    setattr(arg_0, arg_2, arg_1[arg_2])


(image, x, y, stretch=False, top=None, left=None, mode='RGB',
           resample=None)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
=
False
,
arg_4
=
,
arg_5
=
,
arg_6
=
'RGB'
,
arg_7
=
)
:
if
arg_1
<=
0
:
raise
ValueError
(
'x must be greater than zero'
)
if
arg_2
<=
0
:
raise
ValueError
(
'y must be greater than zero'
)
from
PIL
import
Image
arg_7
=
Image
.
ANTIALIAS
if
arg_7
is
else
arg_7
if
not
isinstance
(
arg_7
,
numbers
.
Number
)
:
try
:
arg_7
=
getattr
(
Image
,
arg_7
.
upper
(
)
)
except
:
raise
ValueError
(
"(1) Didn't understand resample=%s"
%
arg_7
)
if
not
isinstance
(
arg_7
,
numbers
.
Number
)
:
raise
ValueError
(
"(2) Didn't understand resample=%s"
%
arg_7
)
arg_8
=
arg_1
,
arg_2
if
arg_3
:
return
arg_0
.
Func
(
arg_8
,
arg_7
=
arg_7
)
arg_9
=
Image
.
new
(
arg_6
,
arg_8
)
arg_10
=
[
d1
/
d2
for
d1
,
d2
in
zip
(
arg_8
,
arg_0
.
size
)
]
if
arg_10
[
0
]
<
arg_10
[
1
]
:
arg_11
=
(
arg_8
[
0
]
,
int
(
arg_0
.
size
[
1
]
*
arg_10
[
0
]
)
)
else
:
arg_11
=
(
int
(
arg_0
.
size
[
0
]
*
arg_10
[
1
]
)
,
arg_8
[
1
]
)
arg_0
=
arg_0
.
Func
(
arg_11
,
arg_7
=
arg_7
)
if
arg_5
is
:
arg_12
=
int
(
(
arg_1
arg_11
[
0
]
)
/
2
)
elif
arg_5
:
arg_12
=
0
else
:
arg_12
=
arg_1
arg_11
[
0
]
if
arg_4
is
:
arg_13
=
int
(
(
arg_2
arg_11
[
1
]
)
/
2
)
elif
arg_4
:
arg_13
=
0
else
:
arg_13
=
arg_2
arg_11
[
1
]
arg_9
.
paste
(
arg_0
,
box
=
(
arg_12
,
arg_13
)
)
return
arg_9

def Func(arg_0, arg_1, arg_2, arg_3=False, arg_4=None, arg_5=None, arg_6='RGB',
           arg_7=None):
    """Return an image Funcd."""
    if arg_1 <= 0:
        raise ValueError('x must be greater than zero')
    if arg_2 <= 0:
        raise ValueError('y must be greater than zero')

    from PIL import Image

    arg_7 = Image.ANTIALIAS if arg_7 is None else arg_7
    if not isinstance(arg_7, numbers.Number):
        try:
            arg_7 = getattr(Image, arg_7.upper())
        except:
            raise ValueError("(1) Didn't understand resample=%s" % arg_7)
        if not isinstance(arg_7, numbers.Number):
            raise ValueError("(2) Didn't understand resample=%s" % arg_7)

    arg_8 = arg_1, arg_2
    if arg_3:
        return arg_0.Func(arg_8, arg_7=arg_7)
    arg_9 = Image.new(arg_6, arg_8)

    arg_10 = [d1 / d2 for d1, d2 in zip(arg_8, arg_0.size)]
    if arg_10[0] < arg_10[1]:
        arg_11 = (arg_8[0], int(arg_0.size[1] * arg_10[0]))
    else:
        arg_11 = (int(arg_0.size[0] * arg_10[1]), arg_8[1])

    arg_0 = arg_0.Func(arg_11, arg_7=arg_7)
    if arg_5 is None:
        arg_12 = int((arg_1 - arg_11[0]) / 2)
    elif arg_5:
        arg_12 = 0
    else:
        arg_12 = arg_1 - arg_11[0]

    if arg_4 is None:
        arg_13 = int((arg_2 - arg_11[1]) / 2)
    elif arg_4:
        arg_13 = 0
    else:
        arg_13 = arg_2 - arg_11[1]

    arg_9.paste(arg_0, box=(arg_12, arg_13))
    return arg_9


(S, freqs, h_range, weights=None, aggregate=None,
             filter_peaks=True, fill_value=np.nan,  kind='linear', axis=0)

def Func(arg_0, arg_1, arg_2, arg_3=None, arg_4=None,
             arg_5=True, arg_6=arg_7.nan,  arg_9='linear', arg_10=0):
    """Harmonic Func function.

    Parameters
    ----------
    S : np.ndarray [shape=(d, n)]
        input time frequency magnitude representation (stft, ifgram, etc).
        Must be real-valued and non-negative.
    freqs : np.ndarray, shape=(S.shape[axis])
        The frequency values corresponding to S's elements along the
        chosen axis.
    h_range : list-like, non-negative
        Harmonics to include in Func computation.  The first harmonic (1)
        corresponds to `S` itself. Values less than one (e.g., 1/2) correspond
        to sub-harmonics.
    weights : list-like
        The weight to apply to each harmonic in the summation. (default:
        uniform weights). Must be the same length as `harmonics`.
    aggregate : function
        aggregation function (default: `np.average`)
        If `aggregate=np.average`, then a weighted average is
        computed per-harmonic according to the specified weights.
        For all other aggregation functions, all harmonics
        are treated equally.
    filter_peaks : bool
        If true, returns harmonic summation only on frequencies of peak
        magnitude. Otherwise returns harmonic summation over the full spectrum.
        Defaults to True.
    fill_value : float
        The value to fill non-peaks in the output representation. (default:
        np.nan) Only used if `filter_peaks == True`.
    kind : str
        Interpolation type for harmonic estimation.
        See `scipy.interpolate.interp1d`.
    axis : int
        The axis along which to compute harmonics

    Returns
    -------
    S_sal : np.ndarray, shape=(len(h_range), [x.shape])
        `S_sal` will have the same shape as `S`, and measure
        the overal harmonic energy at each frequency.

    See Also
    --------
    interp_harmonics

    Examples
    --------
    >>> y, sr = librosa.load(librosa.util.example_audio_file(),
    ...                      duration=15, offset=30)
    >>> S = np.abs(librosa.stft(y))
    >>> freqs = librosa.core.fft_frequencies(sr)
    >>> harms = [1, 2, 3, 4]
    >>> weights = [1.0, 0.5, 0.33, 0.25]
    >>> S_sal = librosa.Func(S, freqs, harms, weights, fill_value=0)
    >>> print(S_sal.shape)
    (1025, 646)
    >>> import matplotlib.pyplot as plt
    >>> plt.figure()
    >>> librosa.display.specshow(librosa.amplitude_to_db(S_sal,
    ...                                                  ref=np.max),
    ...                          sr=sr, y_axis='log', x_axis='time')
    >>> plt.colorbar()
    >>> plt.title('Salience spectrogram')
    >>> plt.tight_layout()
    """
    if arg_4 is None:
        arg_4 = arg_7.average

    if arg_3 is None:
        arg_3 = arg_7.ones((len(arg_2), ))
    else:
        arg_3 = arg_7.array(arg_3, dtype=float)

    arg_11 = interp_harmonics(arg_0, arg_1, arg_2, arg_9=arg_9, arg_10=arg_10)

    if arg_4 is arg_7.average:
        arg_12 = arg_4(arg_11, arg_10=0, arg_3=arg_3)
    else:
        arg_12 = arg_4(arg_11, arg_10=0)

    if arg_5:
        arg_13 = scipy.signal.argrelmax(arg_0, arg_10=0)
        arg_14 = arg_7.empty(arg_0.shape)
        arg_14.fill(arg_6)
        arg_14[arg_13[0], arg_13[1]] = arg_12[arg_13[0], arg_13[1]]

        arg_12 = arg_14

    return arg_12

Harmonic salience function.

    Parameters
    ----------
    S : np.ndarray [shape=(d, n)]
        input time frequency magnitude representation (stft, ifgram, etc).
        Must be real-valued and non-negative.
    freqs : np.ndarray, shape=(S.shape[axis])
        The frequency values corresponding to S's elements along the
        chosen axis.
    h_range : list-like, non-negative
        Harmonics to include in salience computation.  The first harmonic (1)
        corresponds to `S` itself. Values less than one (e.g., 1/2) correspond
        to sub-harmonics.
    weights : list-like
        The weight to apply to each harmonic in the summation. (default:
        uniform weights). Must be the same length as `harmonics`.
    aggregate : function
        aggregation function (default: `np.average`)
        If `aggregate=np.average`, then a weighted average is
        computed per-harmonic according to the specified weights.
        For all other aggregation functions, all harmonics
        are treated equally.
    filter_peaks : bool
        If true, returns harmonic summation only on frequencies of peak
        magnitude. Otherwise returns harmonic summation over the full spectrum.
        Defaults to True.
    fill_value : float
        The value to fill non-peaks in the output representation. (default:
        np.nan) Only used if `filter_peaks == True`.
    kind : str
        Interpolation type for harmonic estimation.
        See `scipy.interpolate.interp1d`.
    axis : int
        The axis along which to compute harmonics

    Returns
    -------
    S_sal : np.ndarray, shape=(len(h_range), [x.shape])
        `S_sal` will have the same shape as `S`, and measure
        the overal harmonic energy at each frequency.

    See Also
    --------
    interp_harmonics

    Examples
    --------
    >>> y, sr = librosa.load(librosa.util.example_audio_file(),
    ...                      duration=15, offset=30)
    >>> S = np.abs(librosa.stft(y))
    >>> freqs = librosa.core.fft_frequencies(sr)
    >>> harms = [1, 2, 3, 4]
    >>> weights = [1.0, 0.5, 0.33, 0.25]
    >>> S_sal = librosa.salience(S, freqs, harms, weights, fill_value=0)
    >>> print(S_sal.shape)
    (1025, 646)
    >>> import matplotlib.pyplot as plt
    >>> plt.figure()
    >>> librosa.display.specshow(librosa.amplitude_to_db(S_sal,
    ...                                                  ref=np.max),
    ...                          sr=sr, y_axis='log', x_axis='time')
    >>> plt.colorbar()
    >>> plt.title('Salience spectrogram')
    >>> plt.tight_layout()


def Func ( arg_0 ) : arg_1 = [ ] for arg_2 , arg_3 , arg_4 in os . walk ( arg_0 . dirpath ) : for arg_5 in arg_4 : arg_6 = os . path . join ( arg_2 , arg_5 ) arg_1 . append ( arg_6 ) return arg_1

def Func(arg_0):
        """List the filepath of the archives stored in dirpath"""

        arg_1 = []

        for arg_2, arg_3, arg_4 in os.walk(arg_0.dirpath):
            for arg_5 in arg_4:
                arg_6 = os.path.join(arg_2, arg_5)
                arg_1.append(arg_6)

        return arg_1


return self.request(path, method, call_params)

def Func ( arg_0 , arg_1 ) : arg_2 = '/' + arg_0 . api_version + '/SoundTouch/' arg_3 = 'POST' return arg_0 . request ( arg_2 , arg_3 , arg_1 )

def Func(arg_0, arg_1):
        """REST Add soundtouch audio effects to a Call
        """
        arg_2 = '/' + arg_0.api_version + '/SoundTouch/'
        arg_3 = 'POST'
        return arg_0.request(arg_2, arg_3, arg_1)


def Func ( arg_0 ) : print ( arg_0 . Func_message . format ( service = arg_0 . service , host = arg_0 . host , port = arg_0 . port , ) ) sys . stdout . flush ( )

def Func(arg_0):
        """Report startup info to stdout."""

        print(
            arg_0.Func_message.format(
                service=arg_0.service,
                host=arg_0.host,
                port=arg_0.port,
            )
        )
        sys.stdout.flush()


def
Func
(
arg_0
,
*
arg_1
,
**
arg_2
)
:
while
True
:
try
:
arg_3
,
arg_4
=
arg_0
.
_queue
.
popleft
(
)
arg_5
=
get_ip
(
arg_4
,
arg_4
.
src
)
arg_6
=
get_ip
(
arg_4
,
arg_4
.
dst
)
arg_7
=
intern
(
'%s:%s'
%
(
arg_5
,
arg_4
.
data
.
sport
)
)
arg_8
=
intern
(
'%s:%s'
%
(
arg_6
,
arg_4
.
data
.
dport
)
)
arg_9
=
intern
(
'%s<->%s'
%
(
arg_7
,
arg_8
)
)
arg_10
=
arg_0
.
_streams
.
get
(
arg_9
)
if
arg_10
is
:
arg_10
=
Stream
(
arg_7
,
arg_8
)
arg_0
.
_streams
[
arg_9
]
=
arg_10
setattr
(
arg_4
,
'timestamp'
,
arg_3
)
arg_12
=
arg_10
.
push
(
arg_4
)
if
not
arg_12
:
continue
for
arg_13
in
arg_0
.
_handlers
:
try
:
arg_13
(
arg_10
)
except
Exception
as
ex
:
print
(
'handler exception: %s'
%
ex
)
except
Exception
:
time
.
sleep
(
0.00001
)

def Func(arg_0, *arg_1, **arg_2):
        """ Deal with the incoming packets """
        while True:
            try:
                arg_3, arg_4 = arg_0._queue.popleft()

                arg_5 = get_ip(arg_4, arg_4.src)
                arg_6 = get_ip(arg_4, arg_4.dst)

                arg_7 = intern('%s:%s' % (arg_5, arg_4.data.sport))
                arg_8 = intern('%s:%s' % (arg_6, arg_4.data.dport))
                arg_9 = intern('%s<->%s' % (arg_7, arg_8))

                arg_10 = arg_0._streams.get(arg_9)
                if arg_10 is None:
                    arg_10 = Stream(arg_7, arg_8)
                    arg_0._streams[arg_9] = arg_10

                # HACK: save the timestamp
                setattr(arg_4, 'timestamp', arg_3)
                arg_12 = arg_10.push(arg_4)

                if not arg_12:
                    continue

                # let listeners know about the updated stream
                for arg_13 in arg_0._handlers:
                    try:
                        arg_13(arg_10)
                    except Exception as ex:
                        print('handler exception: %s' % ex)
            except Exception:
                time.sleep(0.00001)


def Func ( arg_0 ) : _serialize_into_store ( arg_0 ) arg_1 = { } with transaction . atomic ( ) : arg_2 = _profile_models [ arg_0 ] arg_3 = [ ] for arg_4 , arg_5 in six . iteritems ( arg_2 ) : arg_6 = _self_referential_fk ( arg_5 ) arg_7 = Q ( arg_4 = arg_5 . morango_model_name ) for arg_8 in arg_5 . morango_model_dependencies : arg_7 |= Q ( arg_4 = arg_8 . morango_model_name ) if arg_6 : arg_9 = Store . objects . filter ( arg_13 = False , arg_0 = arg_0 ) . filter ( arg_7 ) . char_ids_list ( ) arg_10 = Store . objects . filter ( arg_13 = True , arg_0 = arg_0 ) . filter ( Q ( _self_ref_fk__in = arg_9 ) | Q ( _self_ref_fk = '' ) ) . filter ( arg_7 ) while len ( arg_10 ) > 0 : for arg_11 in arg_10 : try : arg_12 = arg_11 . _deserialize_store_model ( arg_1 ) if arg_12 : with mute_signals ( signals . pre_save , signals . post_save ) : arg_12 . save ( update_dirty_bit_to = False ) arg_11 . dirty_bit = False arg_11 . save ( update_fields = [ 'dirty_bit' ] ) except exceptions . ValidationError : arg_3 . append ( arg_11 . id ) arg_9 = Store . objects . filter ( arg_13 = False , arg_0 = arg_0 ) . filter ( arg_7 ) . char_ids_list ( ) arg_10 = Store . objects . filter ( arg_13 = True , arg_0 = arg_0 , _self_ref_fk__in = arg_9 ) . filter ( arg_7 ) else : arg_14 = [ ] arg_15 = arg_5 . _meta . fields for arg_11 in Store . objects . filter ( arg_4 = arg_4 , arg_0 = arg_0 , arg_13 = True ) : try : arg_12 = arg_11 . _deserialize_store_model ( arg_1 ) if arg_12 : for arg_16 in arg_15 : arg_17 = getattr ( arg_12 , arg_16 . attname ) arg_18 = arg_16 . get_db_prep_value ( arg_17 , connection ) arg_14 . append ( arg_18 ) except exceptions . ValidationError : arg_3 . append ( arg_11 . id ) if arg_14 : arg_19 = len ( arg_14 ) // len ( arg_15 ) arg_20 = tuple ( [ '%s' for _ in range ( len ( arg_15 ) ) ] ) arg_21 = [ str ( arg_20 ) for _ in range ( arg_19 ) ] with connection . cursor ( ) as cursor : DBBackend . _bulk_insert_into_app_models ( cursor , arg_5 . _meta . db_table , arg_15 , arg_14 , arg_21 ) Store . objects . exclude ( id__in = arg_3 ) . filter ( arg_0 = arg_0 , arg_13 = True ) . update ( arg_13 = False )

def Func(arg_0):
    """
    Takes data from the store and integrates into the application.
    """
    # we first serialize to avoid deserialization merge conflicts
    _serialize_into_store(arg_0)

    arg_1 = {}
    with transaction.atomic():
        arg_2 = _profile_models[arg_0]
        arg_3 = []
        # iterate through classes which are in foreign key dependency order
        for arg_4, arg_5 in six.iteritems(arg_2):
            # handle cases where a class has a single FK reference to itself
            arg_6 = _self_referential_fk(arg_5)
            arg_7 = Q(arg_4=arg_5.morango_model_name)
            for arg_8 in arg_5.morango_model_dependencies:
                arg_7 |= Q(arg_4=arg_8.morango_model_name)
            if arg_6:
                arg_9 = Store.objects.filter(arg_13=False, arg_0=arg_0).filter(arg_7).char_ids_list()
                arg_10 = Store.objects.filter(arg_13=True, arg_0=arg_0) \
                                              .filter(Q(_self_ref_fk__in=arg_9) | Q(_self_ref_fk='')).filter(arg_7)

                # keep iterating until size of dirty_children is 0
                while len(arg_10) > 0:
                    for arg_11 in arg_10:
                        try:
                            arg_12 = arg_11._deserialize_store_model(arg_1)
                            if arg_12:
                                with mute_signals(signals.pre_save, signals.post_save):
                                    arg_12.save(update_dirty_bit_to=False)
                            # we update a store model after we have deserialized it to be able to mark it as a clean parent
                            arg_11.dirty_bit = False
                            arg_11.save(update_fields=['dirty_bit'])
                        except exceptions.ValidationError:
                            # if the app model did not validate, we leave the store dirty bit set
                            arg_3.append(arg_11.id)

                    # update lists with new clean parents and dirty children
                    arg_9 = Store.objects.filter(arg_13=False, arg_0=arg_0).filter(arg_7).char_ids_list()
                    arg_10 = Store.objects.filter(arg_13=True, arg_0=arg_0, _self_ref_fk__in=arg_9).filter(arg_7)
            else:
                # array for holding db values from the fields of each model for this class
                arg_14 = []
                arg_15 = arg_5._meta.fields
                for arg_11 in Store.objects.filter(arg_4=arg_4, arg_0=arg_0, arg_13=True):
                    try:
                        arg_12 = arg_11._deserialize_store_model(arg_1)
                        # if the model was not deleted add its field values to the list
                        if arg_12:
                            for arg_16 in arg_15:
                                arg_17 = getattr(arg_12, arg_16.attname)
                                arg_18 = arg_16.get_db_prep_value(arg_17, connection)
                                arg_14.append(arg_18)
                    except exceptions.ValidationError:
                        # if the app model did not validate, we leave the store dirty bit set
                        arg_3.append(arg_11.id)

                if arg_14:
                    # number of rows to update
                    arg_19 = len(arg_14) // len(arg_15)
                    # create '%s' placeholders for a single row
                    arg_20 = tuple(['%s' for _ in range(len(arg_15))])
                    # create list of the '%s' tuple placeholders based on number of rows to update
                    arg_21 = [str(arg_20) for _ in range(arg_19)]
                    with connection.cursor() as cursor:
                        DBBackend._bulk_insert_into_app_models(cursor, arg_5._meta.db_table, arg_15, arg_14, arg_21)

        # clear dirty bit for all store models for this profile except for models that did not validate
        Store.objects.exclude(id__in=arg_3).filter(arg_0=arg_0, arg_13=True).update(arg_13=False)

Takes data from the store and integrates into the application .


def Func ( arg_0 ) : if arg_0 . opcodes is not None : return arg_0 . opcodes arg_1 = arg_7 = 0 arg_0 . opcodes = answer = [ ] for arg_3 , arg_4 , arg_5 in arg_0 . get_matching_blocks ( ) : arg_6 = '' if arg_1 < arg_3 and arg_7 < arg_4 : arg_6 = 'replace' elif arg_1 < arg_3 : arg_6 = 'delete' elif arg_7 < arg_4 : arg_6 = 'insert' if arg_6 : answer . append ( ( arg_6 , arg_1 , arg_3 , arg_7 , arg_4 ) ) arg_1 , arg_7 = arg_3 + arg_5 , arg_4 + arg_5 if arg_5 : answer . append ( ( 'equal' , arg_3 , arg_1 , arg_4 , arg_7 ) ) return answer

def Func(arg_0):
        """Return list of 5-tuples describing how to turn a into b.

        Each tuple is of the form (tag, i1, i2, j1, j2).  The first tuple
        has i1 == j1 == 0, and remaining tuples have i1 == the i2 from the
        tuple preceding it, and likewise for j1 == the previous j2.

        The tags are strings, with these meanings:

        'replace':  a[i1:i2] should be replaced by b[j1:j2]
        'delete':   a[i1:i2] should be deleted.
                    Note that j1==j2 in this case.
        'insert':   b[j1:j2] should be inserted at a[i1:i1].
                    Note that i1==i2 in this case.
        'equal':    a[i1:i2] == b[j1:j2]

        >>> a = "qabxcd"
        >>> b = "abycdf"
        >>> s = SequenceMatcher(None, a, b)
        >>> for tag, i1, i2, j1, j2 in s.Func():
        ...    print ("%7s a[%d:%d] (%s) b[%d:%d] (%s)" %
        ...           (tag, i1, i2, a[i1:i2], j1, j2, b[j1:j2]))
         delete a[0:1] (q) b[0:0] ()
          equal a[1:3] (ab) b[0:2] (ab)
        replace a[3:4] (x) b[2:3] (y)
          equal a[4:6] (cd) b[3:5] (cd)
         insert a[6:6] () b[5:6] (f)
        """

        if arg_0.opcodes is not None:
            return arg_0.opcodes
        arg_1 = arg_7 = 0
        arg_0.opcodes = answer = []
        for arg_3, arg_4, arg_5 in arg_0.get_matching_blocks():
            # invariant:  we've pumped out correct diffs to change
            # a[:i] into b[:j], and the next matching block is
            # a[ai:ai+size] == b[bj:bj+size].  So we need to pump
            # out a diff to change a[i:ai] into b[j:bj], pump out
            # the matching block, and move (i,j) beyond the match
            arg_6 = ''
            if arg_1 < arg_3 and arg_7 < arg_4:
                arg_6 = 'replace'
            elif arg_1 < arg_3:
                arg_6 = 'delete'
            elif arg_7 < arg_4:
                arg_6 = 'insert'
            if arg_6:
                answer.append( (arg_6, arg_1, arg_3, arg_7, arg_4) )
            arg_1, arg_7 = arg_3+arg_5, arg_4+arg_5
            # the list of matching blocks is terminated by a
            # sentinel with size 0
            if arg_5:
                answer.append( ('equal', arg_3, arg_1, arg_4, arg_7) )
        return answer

Return list of 5-tuples describing how to turn a into b.

        Each tuple is of the form (tag, i1, i2, j1, j2).  The first tuple
        has i1 == j1 == 0, and remaining tuples have i1 == the i2 from the
        tuple preceding it, and likewise for j1 == the previous j2.

        The tags are strings, with these meanings:

        'replace':  a[i1:i2] should be replaced by b[j1:j2]
        'delete':   a[i1:i2] should be deleted.
                    Note that j1==j2 in this case.
        'insert':   b[j1:j2] should be inserted at a[i1:i1].
                    Note that i1==i2 in this case.
        'equal':    a[i1:i2] == b[j1:j2]

        >>> a = "qabxcd"
        >>> b = "abycdf"
        >>> s = SequenceMatcher(None, a, b)
        >>> for tag, i1, i2, j1, j2 in s.get_opcodes():
        ...    print ("%7s a[%d:%d] (%s) b[%d:%d] (%s)" %
        ...           (tag, i1, i2, a[i1:i2], j1, j2, b[j1:j2]))
         delete a[0:1] (q) b[0:0] ()
          equal a[1:3] (ab) b[0:2] (ab)
        replace a[3:4] (x) b[2:3] (y)
          equal a[4:6] (cd) b[3:5] (cd)
         insert a[6:6] () b[5:6] (f)

Return list of 5 - tuples describing how to turn a into b .


def Func ( arg_0 , arg_1 ) : if not isinstance ( arg_1 , ( godot . subgraph . Subgraph , godot . cluster . Cluster ) ) : arg_2 = str ( arg_1 ) if arg_1 . startswith ( "cluster" ) : arg_3 = godot . cluster . Cluster ( ID = arg_2 ) else : arg_3 = godot . subgraph . Subgraph ( ID = arg_2 ) else : arg_3 = arg_1 arg_3 . default_node = arg_0 . default_node arg_3 . default_edge = arg_0 . default_edge if isinstance ( arg_3 , godot . subgraph . Subgraph ) : arg_0 . subgraphs . append ( arg_3 ) elif isinstance ( arg_3 , godot . cluster . Cluster ) : arg_0 . clusters . append ( arg_3 ) else : raise return arg_3

def Func(arg_0, arg_1):
        """ Adds a subgraph to the graph.
        """
        if not isinstance(arg_1, (godot.subgraph.Subgraph,
                                           godot.cluster.Cluster)):
            arg_2 = str( arg_1 )
            if arg_1.startswith("cluster"):
                arg_3 = godot.cluster.Cluster(ID=arg_2)
            else:
                arg_3 = godot.subgraph.Subgraph(ID=arg_2)
        else:
            arg_3 = arg_1

        arg_3.default_node = arg_0.default_node
        arg_3.default_edge = arg_0.default_edge
#        subgraph.level = self.level + 1
#        subgraph.padding += self.padding

        if isinstance(arg_3, godot.subgraph.Subgraph):
            arg_0.subgraphs.append(arg_3)
        elif isinstance(arg_3, godot.cluster.Cluster):
            arg_0.clusters.append(arg_3)
        else:
            raise

        return arg_3


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
op_basename
(
arg_1
)
if
ispackage
(
arg_1
)
:
arg_3
=
(
not
arg_0
.
exclude
or
not
filter
(
,
[
exc
.
search
(
arg_2
)
for
exc
in
arg_0
.
exclude
]
)
)
else
:
arg_3
=
(
arg_0
.
matches
(
arg_2
)
or
(
arg_0
.
config
.
srcDirs
and
arg_2
in
arg_0
.
config
.
srcDirs
)
)
arg_4
=
arg_0
.
plugins
.
Func
(
arg_1
)
if
arg_4
is
not
:
log
.
debug
(
"Plugin setting selection of %s to %s"
,
arg_1
,
arg_4
)
arg_3
=
arg_4
log
.
debug
(
"Func %s? %s"
,
arg_1
,
arg_3
)
return
arg_3

def Func(arg_0, arg_1):
        """Is the directory a wanted test directory?

        All package directories match, so long as they do not match exclude.
        All other directories must match test requirements.
        """
        arg_2 = op_basename(arg_1)
        if ispackage(arg_1):
            arg_3 = (not arg_0.exclude
                      or not filter(None,
                                    [exc.search(arg_2) for exc in arg_0.exclude]
                                    ))
        else:
            arg_3 = (arg_0.matches(arg_2)
                      or (arg_0.config.srcDirs
                          and arg_2 in arg_0.config.srcDirs))
        arg_4 = arg_0.plugins.Func(arg_1)
        if arg_4 is not None:
            log.debug("Plugin setting selection of %s to %s",
                      arg_1, arg_4)
            arg_3 = arg_4
        log.debug("Func %s? %s", arg_1, arg_3)
        return arg_3


def Func ( arg_0 ) : if tf . compat . dimension_value ( arg_0 . shape [ - 1 ] ) is not None : return tf . compat . dimension_value ( arg_0 . shape [ - 1 ] ) return tf . shape ( input = arg_0 ) [ - 1 ]

def Func(arg_0):
  """Returns number of cols in a given `Tensor`."""
  if tf.compat.dimension_value(arg_0.shape[-1]) is not None:
    return tf.compat.dimension_value(arg_0.shape[-1])
  return tf.shape(input=arg_0)[-1]

Returns number of cols in a given Tensor .


def Func(arg_0, arg_1, arg_2):
  """Logs an error if there is no newline char at the end of the file.

  Args:
    filename: The name of the current file.
    lines: An array of strings, each representing a line of the file.
    error: The function to call with any errors found.
  """

  # The array lines() was created by adding two newlines to the
  # original file (go figure), then splitting on \n.
  # To verify that the file ends in \n, we just have to make sure the
  # last-but-two element of lines() exists and is empty.
  if len(arg_1) < 3 or arg_1[-2]:
    arg_2(arg_0, len(arg_1) - 2, 'whitespace/ending_newline', 5,
          'Could not find a newline character at the end of the file.')

Logs an error if there is no newline char at the end of the file .


def Func(arg_0):
    """Upload a new file to an existing project.

    The first part of the remote path is interpreted as the name of the
    storage provider. If there is no match the default (osfstorage) is
    used.

    If the project is private you need to specify a username.

    To Func a whole directory (and all its sub-directories) use the `-r`
    command-line option. If your source directory name ends in a / then
    files will be created directly in the remote directory. If it does not
    end in a slash an extra sub-directory with the name of the local directory
    will be created.

    To place contents of local directory `foo` in remote directory `bar/foo`:
    $ osf Func -r foo bar
    To place contents of local directory `foo` in remote directory `bar`:
    $ osf Func -r foo/ bar
    """
    arg_1 = _setup_osf(arg_0)
    if arg_1.username is None or arg_1.password is None:
        sys.exit('To Func a file you need to provide a username and'
                 ' password.')

    arg_2 = arg_1.project(arg_0.project)
    arg_3, arg_4 = split_storage(arg_0.destination)

    arg_5 = arg_2.storage(arg_3)
    if arg_0.recursive:
        if not os.path.isdir(arg_0.source):
            raise RuntimeError("Expected source ({}) to be a directory when "
                               "using recursive mode.".format(arg_0.source))

        # local name of the directory that is being Funced
        arg_6, arg_7 = os.path.split(arg_0.source)

        for arg_8, arg_6, arg_9 in os.walk(arg_0.source):
            arg_10 = os.path.relpath(arg_8, arg_0.source)
            for arg_11 in arg_9:
                arg_12 = os.path.join(arg_8, arg_11)
                with open(arg_12, 'rb') as fp:
                    # build the remote path + fname
                    arg_13 = os.path.join(arg_4, arg_7, arg_10,
                                        arg_11)
                    arg_5.create_file(arg_13, fp, force=arg_0.force,
                                      update=arg_0.update)

    else:
        with open(arg_0.source, 'rb') as fp:
            arg_5.create_file(arg_4, fp, force=arg_0.force,
                              update=arg_0.update)

Upload a new file to an existing project.

    The first part of the remote path is interpreted as the name of the
    storage provider. If there is no match the default (osfstorage) is
    used.

    If the project is private you need to specify a username.

    To upload a whole directory (and all its sub-directories) use the `-r`
    command-line option. If your source directory name ends in a / then
    files will be created directly in the remote directory. If it does not
    end in a slash an extra sub-directory with the name of the local directory
    will be created.

    To place contents of local directory `foo` in remote directory `bar/foo`:
    $ osf upload -r foo bar
    To place contents of local directory `foo` in remote directory `bar`:
    $ osf upload -r foo/ bar

Upload a new file to an existing project .


(selected_address_books, input_from_stdin_or_file,
                   open_editor)

def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
arg_3
=
choose_address_book_from_list
(
"Select address book for new contact"
,
arg_0
)
if
arg_3
is
:
print
(
"Error: address book list is empty"
)
sys
.
exit
(
1
)
if
arg_1
:
try
:
arg_4
=
CarddavObject
.
from_user_input
(
arg_3
,
arg_1
,
config
.
get_supported_private_objects
(
)
,
config
.
get_preferred_vcard_version
(
)
,
config
.
localize_dates
(
)
)
except
ValueError
as
err
:
print
(
err
)
sys
.
exit
(
1
)
else
:
arg_4
.
write_to_file
(
)
if
arg_2
:
modify_existing_contact
(
arg_4
)
else
:
print
(
"Creation successful\n\n%s"
%
arg_4
.
print_vcard
(
)
)
else
:
create_new_contact
(
arg_3
)

def Func(arg_0, arg_1,
                   arg_2):
    """Create a new contact.

    :param selected_address_books: a list of addressbooks that were selected on
        the command line
    :type selected_address_books: list of address_book.AddressBook
    :param input_from_stdin_or_file: the data for the new contact as a yaml
        formatted string
    :type input_from_stdin_or_file: str
    :param open_editor: whether to open the new contact in the edior after
        creation
    :type open_editor: bool
    :returns: None
    :rtype: None

    """
    # ask for address book, in which to create the new contact
    arg_3 = choose_address_book_from_list(
        "Select address book for new contact", arg_0)
    if arg_3 is None:
        print("Error: address book list is empty")
        sys.exit(1)
    # if there is some data in stdin
    if arg_1:
        # create new contact from stdin
        try:
            arg_4 = CarddavObject.from_user_input(
                arg_3, arg_1,
                config.get_supported_private_objects(),
                config.get_preferred_vcard_version(),
                config.localize_dates())
        except ValueError as err:
            print(err)
            sys.exit(1)
        else:
            arg_4.write_to_file()
        if arg_2:
            modify_existing_contact(arg_4)
        else:
            print("Creation successful\n\n%s" % arg_4.print_vcard())
    else:
        create_new_contact(arg_3)


def Func ( arg_0 , arg_1 ) : try : for arg_2 in arg_1 . func . infer ( ) : if arg_2 is astroid . Uninferable : continue elif arg_2 . root ( ) . name == OPEN_MODULE : if getattr ( arg_1 . func , "name" , None ) in OPEN_FILES : arg_0 . _check_open_mode ( arg_1 ) elif arg_2 . root ( ) . name == UNITTEST_CASE : arg_0 . _check_redundant_assert ( arg_1 , arg_2 ) elif isinstance ( arg_2 , astroid . ClassDef ) : if arg_2 . qname ( ) == THREADING_THREAD : arg_0 . _check_bad_thread_instantiation ( arg_1 ) elif arg_2 . qname ( ) == SUBPROCESS_POPEN : arg_0 . _check_for_preexec_fn_in_popen ( arg_1 ) elif isinstance ( arg_2 , astroid . FunctionDef ) : arg_3 = arg_2 . qname ( ) if arg_3 == COPY_COPY : arg_0 . _check_shallow_copy_environ ( arg_1 ) elif arg_3 in ENV_GETTERS : arg_0 . _check_env_function ( arg_1 , arg_2 ) elif arg_3 == SUBPROCESS_RUN and PY35 : arg_0 . _check_for_check_kw_in_run ( arg_1 ) arg_0 . _check_deprecated_method ( arg_1 , arg_2 ) except astroid . InferenceError : return

def Func(arg_0, arg_1):
        """Visit a Call node."""
        try:
            for arg_2 in arg_1.func.infer():
                if arg_2 is astroid.Uninferable:
                    continue
                elif arg_2.root().name == OPEN_MODULE:
                    if getattr(arg_1.func, "name", None) in OPEN_FILES:
                        arg_0._check_open_mode(arg_1)
                elif arg_2.root().name == UNITTEST_CASE:
                    arg_0._check_redundant_assert(arg_1, arg_2)
                elif isinstance(arg_2, astroid.ClassDef):
                    if arg_2.qname() == THREADING_THREAD:
                        arg_0._check_bad_thread_instantiation(arg_1)
                    elif arg_2.qname() == SUBPROCESS_POPEN:
                        arg_0._check_for_preexec_fn_in_popen(arg_1)
                elif isinstance(arg_2, astroid.FunctionDef):
                    arg_3 = arg_2.qname()
                    if arg_3 == COPY_COPY:
                        arg_0._check_shallow_copy_environ(arg_1)
                    elif arg_3 in ENV_GETTERS:
                        arg_0._check_env_function(arg_1, arg_2)
                    elif arg_3 == SUBPROCESS_RUN and PY35:
                        arg_0._check_for_check_kw_in_run(arg_1)
                arg_0._check_deprecated_method(arg_1, arg_2)
        except astroid.InferenceError:
            return


def Func(arg_0, arg_1, arg_2):
    ''' print information about outdated modules,
        return 0 if there is nothing to be done and nonzero otherwise
    '''
    if arg_2:
        arg_3    = colorama.Style.DIM       #pylint: disable=no-member
        arg_4 = colorama.Style.NORMAL    #pylint: disable=no-member
        arg_5 = colorama.Style.BRIGHT    #pylint: disable=no-member
        arg_6 = colorama.Fore.YELLOW     #pylint: disable=no-member
        arg_7    = colorama.Fore.RED        #pylint: disable=no-member
        arg_8  = colorama.Fore.GREEN      #pylint: disable=no-member
        arg_9  = colorama.Style.RESET_ALL #pylint: disable=no-member
    else:
        arg_3 = arg_5 = arg_6 = arg_7 = arg_8 = arg_9 = u''

    arg_10 = 0

    # access, , get components, internal
    from yotta.lib import access
    from yotta.lib import access_common
    # sourceparse, , parse version source urls, internal
    from yotta.lib import sourceparse

    for arg_11, arg_12 in arg_0.items():
        if arg_12.isTestDependency():
            continue
        try:
            arg_13 = access.latestSuitableVersion(arg_11, '*', registry='modules', quiet=True)
        except access_common.Unavailable as e:
            arg_13 = None

        if not arg_12:
            arg_14 = u' ' + arg_9 + arg_5 + arg_7 + u"missing" + arg_9
        else:
            arg_14 = arg_3 + u'@%s' % (arg_12.version)
        if not arg_13:
            print(u'%s%s%s%s not available from the registry%s' % (arg_7, arg_11, arg_14, arg_4, arg_9))
            arg_10 = 2
            continue
        elif not arg_12 or arg_12.version < arg_13:
            arg_15 = ''
            if arg_12:
                arg_16 = [
                    x for x in arg_1
                    if x.name == arg_11 and not
                       sourceparse.parseSourceURL(x.nonShrinkwrappedVersionReq()).semanticSpecMatches(arg_13)
                ]
                arg_17 = [
                    x for x in arg_1
                    if x.name == arg_11 and x.isShrinkwrapped() and not
                       sourceparse.parseSourceURL(x.versionReq()).semanticSpecMatches(arg_13)
                ]
                if len(arg_16):
                    arg_15 = ' (update prevented by specifications: %s)' % (
                        ', '.join(['%s from %s' % (x.version_req, x.specifying_module) for x in arg_16])
                    )
                if len(arg_17):
                    arg_15 += ' yotta-shrinkwrap.json prevents update'
                if arg_12.version.major() < arg_13.major():
                    # major versions being outdated might be deliberate, so not
                    # that bad:
                    arg_18 = arg_8
                elif arg_12.version.minor() < arg_13.minor():
                    # minor outdated versions is moderately bad
                    arg_18 = arg_6
                else:
                    # patch-outdated versions is really bad, because there should
                    # be no reason not to update:
                    arg_18 = arg_7
            else:
                arg_18 = arg_7
            print(u'%s%s%s latest: %s%s%s%s' % (arg_11, arg_14, arg_9, arg_18, arg_13.version, arg_15, arg_9))
            if not arg_10:
                arg_10 = 1
    return arg_10

print information about outdated modules return 0 if there is nothing to be done and nonzero otherwise


(self, safe_address: str, to: str, value: int, data: bytes, operation: int)

def Func(arg_0, arg_1: arg_2, arg_3: arg_2, arg_4: arg_5, arg_6: arg_7, arg_8: arg_5) -> arg_5:
        """
        Estimate tx gas. Use the max of calculation using safe method and web3 if operation == CALL or
        use just the safe calculation otherwise
        """
        # Costs to route through the proxy and nested calls
        arg_9 = 1000
        # https://github.com/ethereum/solidity/blob/dfe3193c7382c80f1814247a162663a97c3f5e67/libsolidity/codegen/ExpressionCompiler.cpp#L1764
        # This was `false` before solc 0.4.21 -> `m_context.evmVersion().canOverchargeGasForCall()`
        # So gas needed by caller will be around 35k
        arg_10 = 35000
        arg_11 = (arg_0.Func_with_safe(arg_1, arg_3, arg_4, arg_6, arg_8)
                               + arg_9 + arg_10)
        # We cannot estimate DELEGATECALL (different storage)
        if SafeOperation(arg_8) == SafeOperation.CALL:
            try:
                arg_12 = (arg_0.Func_with_web3(arg_1, arg_3, arg_4, arg_6)
                                       + arg_9 + arg_10)
            except ValueError:
                arg_12 = 0
            return max(arg_11, arg_12)

        else:
            return arg_11

Estimate tx gas . Use the max of calculation using safe method and web3 if operation == CALL or use just the safe calculation otherwise


def Func(arg_0, *arg_1):
        """Asserts that val contains only the given item or items."""
        if len(arg_1) == 0:
            raise ValueError('one or more args must be given')
        else:
            arg_2 = []
            for arg_3 in arg_0.val:
                if arg_3 not in arg_1:
                    arg_2.append(arg_3)
            if arg_2:
                arg_0._err('Expected <%s> to contain only %s, but did contain %s.' % (arg_0.val, arg_0._fmt_items(arg_1), arg_0._fmt_items(arg_2)))

            arg_4 = []
            for arg_3 in arg_1:
                if arg_3 not in arg_0.val:
                    arg_4.append(arg_3)
            if arg_4:
                arg_0._err('Expected <%s> to contain only %s, but did not contain %s.' % (arg_0.val, arg_0._fmt_items(arg_1), arg_0._fmt_items(arg_4)))
        return arg_0

Asserts that val contains only the given item or items .


def
Func
(
arg_0
)
:
arg_1
=
{
'conference'
:
'conference publication'
,
'book chapter'
:
'bibliography'
,
'unpublished'
:
'article'
}
arg_2
=
str
(
arg_0
.
type
)
.
lower
(
)
return
arg_1
.
get
(
arg_2
,
arg_2
)

def Func(arg_0):
		"""
		Guesses an appropriate MODS XML genre type.
		"""

		arg_1 = {
				'conference': 'conference publication',
				'book chapter': 'bibliography',
				'unpublished': 'article'
			}
		arg_2 = str(arg_0.type).lower()
		return arg_1.get(arg_2, arg_2)

Guesses an appropriate MODS XML genre type .


def Func ( arg_0 , arg_1 ) : arg_2 = download ( arg_0 , FILE_TEMPLATE . format ( split = arg_1 ) ) arg_3 = tf . data . TextLineDataset ( arg_2 ) arg_4 = lambda string : np . array ( [ c == b"1" for c in string . split ( ) ] ) def _parser ( arg_5 ) : arg_6 = tf . compat . v1 . py_func ( arg_4 , [ arg_5 ] , tf . bool ) arg_7 = tf . reshape ( arg_6 , [ 28 , 28 , 1 ] ) return tf . cast ( arg_7 , dtype = tf . float32 ) , tf . constant ( 0 , tf . int32 ) return arg_3 . map ( _parser )

def Func(arg_0, arg_1):
  """Returns Hugo Larochelle's binary static MNIST tf.data.Dataset."""
  arg_2 = download(arg_0, FILE_TEMPLATE.format(split=arg_1))
  arg_3 = tf.data.TextLineDataset(arg_2)
  arg_4 = lambda string: np.array([c == b"1" for c in string.split()])

  def _parser(arg_5):
    arg_6 = tf.compat.v1.py_func(arg_4, [arg_5], tf.bool)
    arg_7 = tf.reshape(arg_6, [28, 28, 1])
    return tf.cast(arg_7, dtype=tf.float32), tf.constant(0, tf.int32)

  return arg_3.map(_parser)

Returns Hugo Larochelle s binary static MNIST tf . data . Dataset .


def
Func
(
arg_0
,
arg_1
)
:
LOG
.
info
(
"Func %s for tenant %s"
%
(
arg_1
,
arg_0
.
tenant_id
)
)
with
arg_0
.
session
.
begin
(
)
:
arg_2
=
db_api
.
subnet_find
(
arg_0
,
arg_1
=
arg_1
,
scope
=
db_api
.
ONE
)
if
not
arg_2
:
raise
n_exc
.
SubnetNotFound
(
subnet_id
=
arg_1
)
if
not
arg_0
.
is_admin
:
if
STRATEGY
.
is_provider_network
(
arg_2
.
network_id
)
:
if
arg_2
.
tenant_id
==
arg_0
.
tenant_id
:
raise
n_exc
.
NotAuthorized
(
subnet_id
=
arg_1
)
else
:
raise
n_exc
.
SubnetNotFound
(
subnet_id
=
arg_1
)
_Func
(
arg_0
,
arg_2
)

def Func(arg_0, arg_1):
    """Delete a subnet.

    : param context: neutron api request context
    : param id: UUID representing the subnet to delete.
    """
    LOG.info("Func %s for tenant %s" % (arg_1, arg_0.tenant_id))
    with arg_0.session.begin():
        arg_2 = db_api.subnet_find(arg_0, arg_1=arg_1, scope=db_api.ONE)
        if not arg_2:
            raise n_exc.SubnetNotFound(subnet_id=arg_1)

        if not arg_0.is_admin:
            if STRATEGY.is_provider_network(arg_2.network_id):
                if arg_2.tenant_id == arg_0.tenant_id:
                    # A tenant can't delete subnets on provider network
                    raise n_exc.NotAuthorized(subnet_id=arg_1)
                else:
                    # Raise a NotFound here because the foreign tenant
                    # does not have to know about other tenant's subnet
                    # existence.
                    raise n_exc.SubnetNotFound(subnet_id=arg_1)

        _Func(arg_0, arg_2)


def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_3 = False arg_4 = { "result" : None } if arg_2 : arg_3 = True else : def arg_2 ( arg_5 ) : arg_4 [ "result" ] = arg_5 arg_0 . _Func_with_watch ( arg_1 , arg_2 , arg_3 ) return arg_4 [ "result" ]

def Func(arg_0, arg_1, arg_2=None):
    """ get scheduler location """
    arg_3 = False

    # Temp dict used to return result
    # if callback is not provided.
    arg_4 = {
        "result": None
    }
    if arg_2:
      arg_3 = True
    else:
      def arg_2(arg_5):
        """
        Custom callback to get the scheduler location right now.
        """
        arg_4["result"] = arg_5

    arg_0._Func_with_watch(arg_1, arg_2, arg_3)

    return arg_4["result"]


return u''.join(tag(tagname, item) for item in contents)

def Func ( arg_0 , arg_1 ) : return u'' . join ( tag ( arg_0 , arg_2 ) for arg_2 in arg_1 )

def Func(arg_0, arg_1):
    """Returns the HTML produced from enclosing each item in
    `contents` in a tag of type `tagname`"""
    return u''.join(tag(arg_0, arg_2) for arg_2 in arg_1)

Returns the HTML produced from enclosing each item in contents in a tag of type tagname


def Func ( arg_0 ) : arg_1 = urijoin ( arg_0 . base_url , 'repos' , arg_0 . owner , arg_0 . repository ) arg_2 = arg_0 . fetch ( arg_1 ) Func = arg_2 . text return Func

def Func(arg_0):
        """Get repository data"""

        arg_1 = urijoin(arg_0.base_url, 'repos', arg_0.owner, arg_0.repository)

        arg_2 = arg_0.fetch(arg_1)
        Func = arg_2.text

        return Func


return codepat.sub('', str(s) if (s or (s == 0)) else '')

def Func ( arg_0 : arg_1 ) -> str : return codepat . sub ( '' , str ( arg_0 ) if ( arg_0 or ( arg_0 == 0 ) ) else '' )

def Func(arg_0: arg_1) -> str:
    """ Strip all color codes from a string.
        Returns empty string for "falsey" inputs.
    """
    return codepat.sub('', str(arg_0) if (arg_0 or (arg_0 == 0)) else '')

Strip all color codes from a string . Returns empty string for falsey inputs .


return scheme in ['http', 'https', 'file', 'ftp'] + vcs.all_schemes

def Func ( arg_0 ) : if ':' not in arg_0 : return False arg_1 = arg_0 . split ( ':' , 1 ) [ 0 ] . lower ( ) return arg_1 in [ 'http' , 'https' , 'file' , 'ftp' ] + vcs . all_schemes

def Func(arg_0):
    """Returns true if the name looks like a URL"""
    if ':' not in arg_0:
        return False
    arg_1 = arg_0.split(':', 1)[0].lower()
    return arg_1 in ['http', 'https', 'file', 'ftp'] + vcs.all_schemes


def Func(arg_0, arg_1=1):
        """
        Create copy of this context with increased indent
        """
        arg_2 = copy(arg_0)
        arg_2.indent += arg_1
        return arg_2


def Func(arg_0, arg_1):
        """Main method to run the automatic pipeline creation

        This method aggregates the functions required to build the pipeline
        string that can be used as input for the workflow generator.

        Parameters
        ----------
        tasks : str
            A string with the space separated tasks to be included in the
            pipeline

        Returns
        -------
        str : String with the pipeline definition used as input for
        parse_pipeline
        """

        arg_0.forks = arg_0.define_pipeline_string(
            arg_0.process_descriptions,
            arg_1,
            True,
            True,
            arg_0.count_forks,
            arg_1,
            arg_0.forks
        )

        arg_0.pipeline_string = arg_0.build_pipeline_string(arg_0.forks)

        return arg_0.pipeline_string


def Func ( arg_0 , arg_1 ) : for arg_2 , arg_3 in enumerate ( sorted ( arg_1 . modules ( ) , key = lambda x : x . title ) ) : arg_0 . printer . emit_node ( arg_2 , label = arg_0 . get_title ( arg_3 ) , shape = "box" ) arg_3 . fig_id = arg_2 for arg_5 in arg_1 . get_relationships ( "depends" ) : arg_0 . printer . emit_edge ( arg_5 . from_object . fig_id , arg_5 . to_object . fig_id , ** arg_0 . pkg_edges )

def Func(arg_0, arg_1):
        """write a package diagram"""
        # sorted to get predictable (hence testable) results
        for arg_2, arg_3 in enumerate(sorted(arg_1.modules(), key=lambda x: x.title)):
            arg_0.printer.emit_node(arg_2, label=arg_0.get_title(arg_3), shape="box")
            arg_3.fig_id = arg_2
        # package dependencies
        for arg_5 in arg_1.get_relationships("depends"):
            arg_0.printer.emit_edge(
                arg_5.from_object.fig_id, arg_5.to_object.fig_id, **arg_0.pkg_edges
            )


def
Func
(
arg_0
)
:
logger
.
debug
(
'In state: Func'
)
arg_0
.
current_state
=
STATE_Func
if
arg_0
.
script
is
not
:
arg_0
.
script
.
script_init
(
arg_0
.
client
.
lease
,
arg_0
.
current_state
)
arg_0
.
script
.
script_go
(
)
else
:
set_net
(
arg_0
.
client
.
lease
)

def Func(arg_0):
        """Func state."""
        logger.debug('In state: Func')
        arg_0.current_state = STATE_Func
        if arg_0.script is not None:
            arg_0.script.script_init(arg_0.client.lease, arg_0.current_state)
            arg_0.script.script_go()
        else:
            set_net(arg_0.client.lease)