def Func(arg_0, arg_1):
        """Creates file group and returns ``FileGroup`` instance.

        It expects iterable object that contains ``File`` instances, e.g.::

            >>> file_1 = File('6c5e9526-b0fe-4739-8975-72e8d5ee6342')
            >>> file_2 = File('a771f854-c2cb-408a-8c36-71af77811f3b')
            >>> FileGroup.Func((file_1, file_2))
            <uploadcare.FileGroup 0513dda0-6666-447d-846f-096e5df9e2bb~2>

        """
        arg_2 = {}
        for arg_3, arg_4 in enumerate(arg_1):
            if isinstance(arg_4, File):
                arg_5 = 'files[{index}]'.format(arg_3=arg_3)
                arg_2[arg_5] = six.text_type(arg_4)
            else:
                raise InvalidParamError(
                    'all items have to be ``File`` instance'
                )
        if not arg_2:
            raise InvalidParamError('set of files is empty')

        arg_6 = uploading_request('POST', 'group/', arg_2=arg_2)

        arg_7 = arg_0.construct_from(arg_6)
        return arg_7

Creates file group and returns ``FileGroup`` instance.

        It expects iterable object that contains ``File`` instances, e.g.::

            >>> file_1 = File('6c5e9526-b0fe-4739-8975-72e8d5ee6342')
            >>> file_2 = File('a771f854-c2cb-408a-8c36-71af77811f3b')
            >>> FileGroup.create((file_1, file_2))
            <uploadcare.FileGroup 0513dda0-6666-447d-846f-096e5df9e2bb~2>

Creates file group and returns FileGroup instance .


def Func():  # pragma: no cover
    """Returns a list of includes to be given to `cnxepub.collation.collate`.

    """
    arg_0 = []
    arg_1 = '{baseUrl}/api/exercises?q={field}:"{{itemCode}}"'
    arg_2 = get_current_registry().settings
    arg_3 = arg_2.get('embeddables.exercise.base_url', None)
    arg_4 = [match.split(',', 1) for match in aslist(
        arg_2.get('embeddables.exercise.match', ''), flatten=False)]
    arg_5 = arg_2.get('embeddables.exercise.token', None)
    arg_6 = arg_2.get('mathmlcloud.url', None)
    arg_7 = arg_2.get('memcache_servers')
    if arg_7:
        arg_7 = arg_7.split()
    else:
        arg_7 = None

    if arg_3 and arg_4:
        arg_8 = None
        if arg_7:
            arg_8 = memcache.Client(arg_7, debug=0)
        for (arg_9, arg_10) in arg_4:
            arg_11 = arg_1.format(
                baseUrl=arg_3, field=arg_10)
            arg_0.append(exercise_callback_factory(arg_9,
                                                      arg_11,
                                                      arg_8,
                                                      arg_5,
                                                      arg_6))
    return arg_0

Returns a list of includes to be given to cnxepub . collation . collate .


def Func ( arg_0 , arg_1 = False , arg_2 = False ) : arg_3 = { } for arg_4 , arg_5 in arg_0 . variables . items ( ) : arg_6 , arg_7 = arg_5 if arg_7 is None : continue arg_3 [ arg_4 ] = reduce ( operator . mul , arg_7 , 1 ) if arg_1 : arg_8 = arg_0 . datatypes_size [ arg_6 ] arg_3 [ arg_4 ] *= arg_8 if arg_2 : return { arg_9 : arg_0 . subs_consts ( arg_10 ) for arg_9 , arg_10 in arg_3 . items ( ) } else : return arg_3

def Func(arg_0, arg_1=False, arg_2=False):
        """
        Return a dictionary with all arrays sizes.

        :param in_bytes: If True, output will be in bytes, not element counts.
        :param subs_consts: If True, output will be numbers and not symbolic.

        Scalar variables are ignored.
        """
        arg_3 = {}

        for arg_4, arg_5 in arg_0.variables.items():
            arg_6, arg_7 = arg_5

            # Skiping sclars
            if arg_7 is None:
                continue

            arg_3[arg_4] = reduce(operator.mul, arg_7, 1)

            # Multiply by bytes per element if requested
            if arg_1:
                arg_8 = arg_0.datatypes_size[arg_6]
                arg_3[arg_4] *= arg_8

        if arg_2:
            return {arg_9: arg_0.subs_consts(arg_10) for arg_9, arg_10 in arg_3.items()}
        else:
            return arg_3

Return a dictionary with all arrays sizes .


Much like parse.quote in that it returns a URL encoded string
    for the given value, protecting the safe characters; but this
    version also ensures the value is UTF-8 encoded.

def Func ( arg_0 , arg_1 = '/:' ) : if isinstance ( arg_0 , six . text_type ) : arg_0 = arg_0 . encode ( 'utf8' ) elif not isinstance ( arg_0 , six . string_types ) : arg_0 = str ( arg_0 ) return parse . Func ( arg_0 , arg_1 )

def Func(arg_0, arg_1='/:'):
    """
    Much like parse.Func in that it returns a URL encoded string
    for the given value, protecting the safe characters; but this
    version also ensures the value is UTF-8 encoded.
    """
    if isinstance(arg_0, six.text_type):
        arg_0 = arg_0.encode('utf8')
    elif not isinstance(arg_0, six.string_types):
        arg_0 = str(arg_0)
    return parse.Func(arg_0, arg_1)

Much like parse . quote in that it returns a URL encoded string for the given value protecting the safe characters ; but this version also ensures the value is UTF - 8 encoded .


def
Func
(
arg_0
,
arg_1
)
:
if
arg_1
:
arg_0
.
log
.
exception
(
'disconnected due to exception'
)
else
:
arg_0
.
log
.
info
(
'disconnected because of close/abort.'
)
arg_0
.
_closed
.
set
(
)

def Func(arg_0, arg_1):
        """Stop when connection is lost."""
        if arg_1:
            arg_0.log.exception('disconnected due to exception')
        else:
            arg_0.log.info('disconnected because of close/abort.')
        arg_0._closed.set()


return {
        'LOGGING_PATH': '{}.log'.format(logging_prefix),
        'STDOUT_PATH': '{}-stdout.log'.format(logging_prefix),
        'STDERR_PATH': '{}-stderr.log'.format(logging_prefix),
        'USER_PROJECT': user_project,
    }

def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
if
not
arg_1
.
endswith
(
'.log'
)
:
raise
ValueError
(
'Logging URI must end in ".log": {}'
.
format
(
arg_1
)
)
arg_3
=
arg_1
[
:
len
(
'.log'
)
]
return
{
'LOGGING_PATH'
:
'{}.log'
.
format
(
arg_3
)
,
'STDOUT_PATH'
:
'{}-stdout.log'
.
format
(
arg_3
)
,
'STDERR_PATH'
:
'{}-stderr.log'
.
format
(
arg_3
)
,
'USER_PROJECT'
:
arg_2
,
}

def Func(arg_0, arg_1, arg_2):
    """Returns the environment for actions that copy logging files."""
    if not arg_1.endswith('.log'):
      raise ValueError('Logging URI must end in ".log": {}'.format(arg_1))

    arg_3 = arg_1[:-len('.log')]
    return {
        'LOGGING_PATH': '{}.log'.format(arg_3),
        'STDOUT_PATH': '{}-stdout.log'.format(arg_3),
        'STDERR_PATH': '{}-stderr.log'.format(arg_3),
        'USER_PROJECT': arg_2,
    }

Returns the environment for actions that copy logging files .


def Func ( arg_0 , arg_1 , ** arg_2 ) : arg_1 = DictFilter ( arg_1 ) rewrite ( arg_0 , arg_1 , ** arg_2 ) return arg_1 . removed

def Func(arg_0, arg_1, **arg_2):
    """Rewrite a dsv file, filtering the rows.

    :param fname: Path to dsv file
    :param filter_: callable which accepts a `dict` with a row's data as single argument\
    returning a `Boolean` indicating whether to keep the row (`True`) or to discard it \
    `False`.
    :param kw: Keyword arguments to be passed `UnicodeReader` and `UnicodeWriter`.
    :return: The number of rows that have been removed.
    """
    arg_1 = DictFilter(arg_1)
    rewrite(arg_0, arg_1, **arg_2)
    return arg_1.removed


def Func ( arg_0 , arg_1 = None ) : import shapely . geometry ia . do_assert ( isinstance ( arg_0 , shapely . geometry . Polygon ) ) if arg_0 . exterior is None or len ( arg_0 . exterior . coords ) == 0 : return Polygon ( [ ] , arg_1 = arg_1 ) arg_2 = np . float32 ( [ [ x , y ] for ( x , y ) in arg_0 . exterior . coords ] ) return Polygon ( arg_2 , arg_1 = arg_1 )

def Func(arg_0, arg_1=None):
        """
        Create a polygon from a Shapely polygon.

        Note: This will remove any holes in the Shapely polygon.

        Parameters
        ----------
        polygon_shapely : shapely.geometry.Polygon
             The shapely polygon.

        label : None or str, optional
            The label of the new polygon.

        Returns
        -------
        imgaug.Polygon
            A polygon with the same exterior as the Shapely polygon.

        """
        # load shapely lazily, which makes the dependency more optional
        import shapely.geometry

        ia.do_assert(isinstance(arg_0, shapely.geometry.Polygon))
        # polygon_shapely.exterior can be None if the polygon was instantiated without points
        if arg_0.exterior is None or len(arg_0.exterior.coords) == 0:
            return Polygon([], arg_1=arg_1)
        arg_2 = np.float32([[x, y] for (x, y) in arg_0.exterior.coords])
        return Polygon(arg_2, arg_1=arg_1)

Create a polygon from a Shapely polygon .


def Func ( arg_0 , arg_1 , arg_2 = '37' ) : arg_3 = arg_0 . hgnc_collection . find ( { 'hgnc_symbol' : arg_1 , 'build' : arg_2 } ) if arg_3 . count ( ) == 0 : arg_3 = arg_0 . hgnc_collection . find ( { 'aliases' : arg_1 , 'build' : arg_2 } ) return arg_3

def Func(arg_0, arg_1, arg_2='37'):
        """Return a iterable with hgnc_genes.

        If the gene symbol is listed as primary the iterable will only have
        one result. If not the iterable will include all hgnc genes that have
        the symbol as an alias.

        Args:
            symbol(str)
            build(str)

        Returns:
            res(pymongo.Cursor(dict))
        """
        arg_3 = arg_0.hgnc_collection.find({'hgnc_symbol': arg_1, 'build':arg_2})
        if arg_3.count() == 0:
            arg_3 = arg_0.hgnc_collection.find({'aliases': arg_1, 'build':arg_2})

        return arg_3


return dict((str(k), convert_keys_to_string(v)) for k, v in dictionary.items())

def Func ( arg_0 ) : if not isinstance ( arg_0 , dict ) : return arg_0 return dict ( ( str ( arg_1 ) , Func ( arg_2 ) ) for arg_1 , arg_2 in arg_0 . items ( ) )

def Func(arg_0):
    '''Recursively converts dictionary keys to strings.'''
    if not isinstance(arg_0, dict):
        return arg_0
    return dict((str(arg_1), Func(arg_2)) for arg_1, arg_2 in arg_0.items())

Recursively converts dictionary keys to strings .


return (latest_stat.cumulative_count, prev_stat.cumulative_count) if params['cumulative'] else (latest_stat.count, prev_stat.count)

def Func ( arg_0 ) : arg_1 = get_gecko_params ( arg_0 , days_back = 7 ) arg_2 = Metric . objects . get ( uid = arg_1 [ 'uid' ] ) try : arg_3 = arg_2 . statistics . filter ( frequency = arg_1 [ 'frequency' ] ) . order_by ( '-date_time' ) [ 0 ] except IndexError : return ( 0 , 0 ) try : arg_4 = arg_2 . statistics . filter ( frequency = arg_1 [ 'frequency' ] , date_time__lte = arg_3 . date_time - timedelta ( days = arg_1 [ 'days_back' ] ) ) . order_by ( '-date_time' ) [ 0 ] except IndexError : return ( arg_3 . cumulative_count , 0 ) if arg_1 [ 'cumulative' ] else ( arg_3 . count , 0 ) return ( arg_3 . cumulative_count , arg_4 . cumulative_count ) if arg_1 [ 'cumulative' ] else ( arg_3 . count , arg_4 . count )

def Func(arg_0):
    """
    Returns a number widget for the specified metric's cumulative total.
    """

    arg_1 = get_gecko_params(arg_0, days_back=7)
    arg_2 = Metric.objects.get(uid=arg_1['uid'])
    try:
        arg_3 = arg_2.statistics.filter(frequency=arg_1['frequency']).order_by('-date_time')[0]
    except IndexError:
        return (0, 0)

    try:
        arg_4 = arg_2.statistics.filter(frequency=arg_1['frequency'],
            date_time__lte=arg_3.date_time-timedelta(days=arg_1['days_back'])).order_by('-date_time')[0]
    except IndexError:
        # if there is no previous stat
        return (arg_3.cumulative_count, 0) if arg_1['cumulative'] else (arg_3.count, 0)

    return (arg_3.cumulative_count, arg_4.cumulative_count) if arg_1['cumulative'] else (arg_3.count, arg_4.count)

Returns a number widget for the specified metric s cumulative total .


def Func(arg_0, arg_1):
        """Receive NAK in REBINDING state."""
        logger.debug("C3.1. Received NAK?, in RENEWING state.")
        if arg_0.process_received_nak(arg_1):
            logger.debug("C3.1: T. Received NAK, in RENEWING state, "
                         "raise INIT.")
            raise arg_0.INIT()


(in_profile, log=False, return_offset = True)

return (np.copy(np.einsum('ai,a->ai',tmp_prof,1.0/norm_vector)),
            (np.log(norm_vector) + tmp_prefactor) if return_offset else None)

def Func ( arg_0 , arg_1 = False , arg_2 = True ) : if arg_1 : arg_3 = arg_0 . max ( axis = 1 ) arg_4 = np . exp ( arg_0 . T - arg_3 ) . T else : arg_3 = 0.0 arg_4 = arg_0 arg_5 = arg_4 . sum ( axis = 1 ) return ( np . copy ( np . einsum ( 'ai,a->ai' , arg_4 , 1.0 / arg_5 ) ) , ( np . log ( arg_5 ) + arg_3 ) if arg_2 else None )

def Func(arg_0, arg_1=False, arg_2 = True):
    """return a normalized version of a profile matrix

    Parameters
    ----------
    in_profile : np.array
        shape Lxq, will be normalized to one across each row
    log : bool, optional
        treat the input as log probabilities
    return_offset : bool, optional
        return the log of the scale factor for each row

    Returns
    -------
    tuple
        normalized profile (fresh np object) and offset (if return_offset==True)
    """
    if arg_1:
        arg_3 = arg_0.max(axis=1)
        arg_4 = np.exp(arg_0.T - arg_3).T
    else:
        arg_3 = 0.0
        arg_4 = arg_0

    arg_5 = arg_4.sum(axis=1)
    return (np.copy(np.einsum('ai,a->ai',arg_4,1.0/arg_5)),
            (np.log(arg_5) + arg_3) if arg_2 else None)


def Func(arg_0, arg_1, arg_2, arg_3):
        ''' iterate through ner_xml_path to fuse with i_chunk into o_chunk '''
        ## prepare to iterate over the input chunk
        arg_4 = arg_2.__iter__()

        arg_5 = xml.dom.minidom.parse(open(arg_1))

        ## this converts our UTF-8 data into unicode strings, so when
        ## we want to compute byte offsets or construct tokens, we
        ## must .encode('utf8')
        for arg_6 in arg_5.getElementsByTagName('FILENAME'):
        #for stream_id, raw_ner in files(open(ner_xml_path).read().decode('utf8')):

            arg_7 = arg_4.next()

            ## get stream_id out of the XML
            arg_8 = arg_6.attributes.get('stream_id').value
            if arg_7.stream_id is None:
                assert not arg_8, 'out of sync: None != %r' % arg_8
                logger.critical('si.stream_id is None... ignoring')
                continue
            assert arg_8 and arg_8 == arg_7.stream_id, \
                '%s != %s' % (arg_8, arg_7.stream_id)

            if not arg_7.body:
                ## the XML better have had an empty clean_visible too...
                #assert not ner_dom....something
                continue

            arg_9 = Tagging()
            arg_9.tagger_id = arg_0.tagger_id  # pylint: disable=E1101

            '''
            ## get this one file out of its FILENAME tags
            tagged_doc_parts = list(files(ner_dom.toxml()))
            if not tagged_doc_parts:
                continue

            tagged_doc = tagged_doc_parts[0][1]

            ## hack
            hope_original = make_clean_visible(tagged_doc, '')
            open(ner_xml_path + '-clean', 'wb').write(hope_original.encode('utf-8'))
            print ner_xml_path + '-clean'
            '''

            #tagging.raw_tagging = tagged_doc
            arg_9.generation_time = streamcorpus.make_stream_time()
            arg_7.body.taggings[arg_0.tagger_id] = arg_9       # pylint: disable=E1101

            ## could consume lots of memory here by instantiating everything
            arg_14, arg_15, arg_16 = arg_0.get_sentences(arg_6)
            arg_7.body.sentences[arg_0.tagger_id] = arg_14    # pylint: disable=E1101
            arg_7.body.relations[arg_0.tagger_id] = arg_15    # pylint: disable=E1101
            arg_7.body.attributes[arg_0.tagger_id] = arg_16  # pylint: disable=E1101

            logger.debug('finished aligning tokens %s' % arg_7.stream_id)

            '''
            for num, sent in enumerate(sentences):
                for tok in sent.tokens:
                    print '%d\t%d\t%s' % (num, tok.offsets[OffsetType.LINES].first, repr(tok.token))
            '''

            if 'align_labels_by' in arg_0.config and arg_0.config['align_labels_by']:
                assert 'aligner_data' in arg_0.config, 'config missing "aligner_data"'
                arg_17 = AlignmentStrategies[ arg_0.config['align_labels_by'] ]
                arg_17( arg_7, arg_0.config['aligner_data'] )

            ## forcibly collect dereferenced objects
            gc.collect()

            try:
                arg_3.add(arg_7)
            except MemoryError, exc:
                arg_18 = traceback.format_exc(exc)
                arg_18 += make_memory_info_msg()
                logger.critical(arg_18)
                raise PipelineOutOfMemory(arg_18)

        ## all done, so close the o_chunk
        try:
            arg_3.close()
            logger.info('finished chunk for %r' % arg_1)
        except MemoryError, exc:
            arg_18 = traceback.format_exc(exc)
            arg_18 += make_memory_info_msg()
            logger.critical(arg_18)
            raise PipelineOutOfMemory(arg_18)


(self, window_name, object_name='', guiTimeOut=30)

def Func(arg_0, arg_1, arg_2='', arg_3=30):
        """
        Wait till a window does not exist.

        @param window_name: Window name to look for, either full name,
        LDTP's name convention, or a Unix glob.
        @type window_name: string
        @param object_name: Object name to look for, either full name,
        LDTP's name convention, or a Unix glob.
        @type object_name: string
        @param guiTimeOut: Wait timeout in seconds
        @type guiTimeOut: integer

        @return: 1 if GUI has gone away, 0 if not.
        @rtype: integer
        """
        arg_4 = 0
        while arg_4 < arg_3:
            if not arg_0.guiexist(arg_1, arg_2):
                return 1
            # Wait 1 second before retrying
            time.sleep(1)
            arg_4 += 1
        # Object and/or window still appears within the timeout period
        return 0


def Func(arg_0, arg_1=None):
  r"""Asserts all items are of the same base type.

  Args:
    items: List of graph items (e.g., `Variable`, `Tensor`, `SparseTensor`,
        `Operation`, or `IndexedSlices`). Can include `None` elements, which
        will be ignored.
    expected_type: Expected type. If not specified, assert all items are
        of the same base type.

  Returns:
    Validated type, or none if neither expected_type nor items provided.

  Raises:
    ValueError: If any types do not match.
  """
  arg_2 = arg_1
  arg_3 = False
  for arg_4 in arg_0:
    if arg_4 is not None:
      arg_5 = base_dtype(arg_4.dtype)
      if not arg_1:
        arg_1 = arg_5
      elif arg_1 != arg_5:
        arg_3 = True
        break
  if arg_3:
    # Loop back through and build up an informative error message (this is very
    # slow, so we don't do it unless we found an error above).
    arg_1 = arg_2
    arg_6 = None
    arg_7 = lambda x: x.name if hasattr(x, 'name') else str(x)
    for arg_4 in arg_0:
      if arg_4 is not None:
        arg_5 = base_dtype(arg_4.dtype)
        if not arg_1:
          arg_1 = arg_5
          arg_6 = arg_7(arg_4)
        elif arg_1 != arg_5:
          raise ValueError(
              '{}, type={}, must be of the same type ({}){}.'.format(
                  arg_7(arg_4),
                  arg_5,
                  arg_1,
                  ((' as {}'.format(arg_6))
                   if arg_6 else '')))
    return arg_1  # Should be unreachable
  else:
    return arg_1

r Asserts all items are of the same base type .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . src . lower ( ) if arg_3 [ arg_2 ] + arg_0 . settings . get ( 'delay' , DEFAULT_DELAY ) > time . time ( ) : return arg_3 [ arg_2 ] = time . time ( ) arg_0 . execute ( arg_1 )

def Func(arg_0, arg_1):
        """Press button. Check DEFAULT_DELAY.

        :param scapy.packet.Packet device: Scapy packet
        :return: None
        """
        arg_2 = arg_1.src.lower()
        if arg_3[arg_2] + arg_0.settings.get('delay', DEFAULT_DELAY) > time.time():
            return
        arg_3[arg_2] = time.time()
        arg_0.execute(arg_1)


return pkg_resources.Distribution(
            os.path.dirname(egg_info),
            project_name=dist_name,
            metadata=metadata)

def Func ( arg_0 ) : arg_1 = arg_0 . egg_info_path ( '' ) . rstrip ( '/' ) arg_2 = os . path . dirname ( arg_1 ) arg_3 = pkg_resources . PathMetadata ( arg_2 , arg_1 ) arg_4 = os . path . splitext ( os . path . basename ( arg_1 ) ) [ 0 ] return pkg_resources . Distribution ( os . path . dirname ( arg_1 ) , project_name = arg_4 , arg_3 = arg_3 )

def Func(arg_0):
        """Return a pkg_resources.Distribution built from self.egg_info_path"""
        arg_1 = arg_0.egg_info_path('').rstrip('/')
        arg_2 = os.path.dirname(arg_1)
        arg_3 = pkg_resources.PathMetadata(arg_2, arg_1)
        arg_4 = os.path.splitext(os.path.basename(arg_1))[0]
        return pkg_resources.Distribution(
            os.path.dirname(arg_1),
            project_name=arg_4,
            arg_3=arg_3)

Return a pkg_resources . Distribution built from self . egg_info_path


def Func ( arg_0 : arg_1 , arg_2 : arg_3 ) -> dict : arg_4 = { "REQUEST_METHOD" : arg_0 [ "method" ] , "SCRIPT_NAME" : arg_0 . get ( "root_path" , "" ) , "PATH_INFO" : arg_0 [ "path" ] , "QUERY_STRING" : arg_0 [ "query_string" ] . decode ( "ascii" ) , "SERVER_PROTOCOL" : f"HTTP/{scope['http_version']}" , "wsgi.version" : ( 1 , 0 ) , "wsgi.url_scheme" : arg_0 . get ( "scheme" , "http" ) , "wsgi.input" : io . BytesIO ( arg_2 ) , "wsgi.errors" : sys . stdout , "wsgi.multithread" : True , "wsgi.multiprocess" : True , "wsgi.run_once" : False , } arg_5 = arg_0 . get ( "server" ) or ( "localhost" , 80 ) arg_4 [ "SERVER_NAME" ] = arg_5 [ 0 ] arg_4 [ "SERVER_PORT" ] = arg_5 [ 1 ] if arg_0 . get ( "client" ) : arg_4 [ "REMOTE_ADDR" ] = arg_0 [ "client" ] [ 0 ] for arg_6 , arg_7 in arg_0 . get ( "headers" , [ ] ) : arg_6 = arg_6 . decode ( "latin1" ) if arg_6 == "content-length" : arg_8 = "CONTENT_LENGTH" elif arg_6 == "content-type" : arg_8 = "CONTENT_TYPE" else : arg_8 = f"HTTP_{name}" . upper ( ) . replace ( "-" , "_" ) arg_7 = arg_7 . decode ( "latin1" ) if arg_8 in arg_4 : arg_7 = arg_4 [ arg_8 ] + "," + arg_7 arg_4 [ arg_8 ] = arg_7 return arg_4

def Func(arg_0: arg_1, arg_2: arg_3) -> dict:
    """
    Builds a scope and request body into a WSGI environ object.
    """
    arg_4 = {
        "REQUEST_METHOD": arg_0["method"],
        "SCRIPT_NAME": arg_0.get("root_path", ""),
        "PATH_INFO": arg_0["path"],
        "QUERY_STRING": arg_0["query_string"].decode("ascii"),
        "SERVER_PROTOCOL": f"HTTP/{scope['http_version']}",
        "wsgi.version": (1, 0),
        "wsgi.url_scheme": arg_0.get("scheme", "http"),
        "wsgi.input": io.BytesIO(arg_2),
        "wsgi.errors": sys.stdout,
        "wsgi.multithread": True,
        "wsgi.multiprocess": True,
        "wsgi.run_once": False,
    }

    # Get server name and port - required in WSGI, not in ASGI
    arg_5 = arg_0.get("server") or ("localhost", 80)
    arg_4["SERVER_NAME"] = arg_5[0]
    arg_4["SERVER_PORT"] = arg_5[1]

    # Get client IP address
    if arg_0.get("client"):
        arg_4["REMOTE_ADDR"] = arg_0["client"][0]

    # Go through headers and make them into environ entries
    for arg_6, arg_7 in arg_0.get("headers", []):
        arg_6 = arg_6.decode("latin1")
        if arg_6 == "content-length":
            arg_8 = "CONTENT_LENGTH"
        elif arg_6 == "content-type":
            arg_8 = "CONTENT_TYPE"
        else:
            arg_8 = f"HTTP_{name}".upper().replace("-", "_")
        # HTTPbis say only ASCII chars are allowed in headers, but we latin1 just in case
        arg_7 = arg_7.decode("latin1")
        if arg_8 in arg_4:
            arg_7 = arg_4[arg_8] + "," + arg_7
        arg_4[arg_8] = arg_7
    return arg_4

Builds a scope and request body into a WSGI environ object .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_1 . beginEditBlock ( ) arg_1 . removeSelectedText ( ) arg_3 = arg_1 . position ( ) arg_0 . _insert_html ( arg_1 , arg_2 ) arg_4 = arg_1 . position ( ) arg_1 . setPosition ( arg_3 , QtGui . QTextCursor . KeepAnchor ) arg_5 = arg_1 . selection ( ) . toPlainText ( ) arg_1 . setPosition ( arg_4 ) arg_1 . endEditBlock ( ) return arg_5

def Func(arg_0, arg_1, arg_2):
        """ Inserts HTML using the specified cursor, then returns its plain text
            version.
        """
        arg_1.beginEditBlock()
        arg_1.removeSelectedText()

        arg_3 = arg_1.position()
        arg_0._insert_html(arg_1, arg_2)
        arg_4 = arg_1.position()
        arg_1.setPosition(arg_3, QtGui.QTextCursor.KeepAnchor)
        arg_5 = arg_1.selection().toPlainText()

        arg_1.setPosition(arg_4)
        arg_1.endEditBlock()
        return arg_5

Inserts HTML using the specified cursor then returns its plain text version .


def Func(arg_0, arg_1, arg_2):
        """
        Checks for the existence of a file in Google Cloud Storage.

        :param bucket_name: The Google cloud storage bucket where the object is.
        :type bucket_name: str
        :param object_name: The name of the blob_name to check in the Google cloud
            storage bucket.
        :type object_name: str
        """
        arg_3 = arg_0.get_conn()
        arg_4 = arg_3.get_bucket(arg_1=arg_1)
        arg_5 = arg_4.blob(blob_name=arg_2)
        return arg_5.Func()

Checks for the existence of a file in Google Cloud Storage .


(children, name=None, deterministic=False, random_state=None)

return SomeOf(n=1, children=children, random_order=False, name=name, deterministic=deterministic,
                  random_state=random_state)

def Func ( arg_0 , arg_1 = None , arg_2 = False , arg_3 = None ) : return SomeOf ( n = 1 , arg_0 = arg_0 , random_order = False , arg_1 = arg_1 , arg_2 = arg_2 , arg_3 = arg_3 )

def Func(arg_0, arg_1=None, arg_2=False, arg_3=None):
    """
    Augmenter that always executes exactly one of its children.

    dtype support::

        See ``imgaug.augmenters.meta.SomeOf``.

    Parameters
    ----------
    children : list of imgaug.augmenters.meta.Augmenter
        The choices of augmenters to apply.

    name : None or str, optional
        See :func:`imgaug.augmenters.meta.Augmenter.__init__`.

    deterministic : bool, optional
        See :func:`imgaug.augmenters.meta.Augmenter.__init__`.

    random_state : None or int or numpy.random.RandomState, optional
        See :func:`imgaug.augmenters.meta.Augmenter.__init__`.

    Examples
    --------
    >>> imgs = [np.ones((10, 10))]
    >>> seq = iaa.Func([
    >>>     iaa.Fliplr(1.0),
    >>>     iaa.Flipud(1.0)
    >>> ])
    >>> imgs_aug = seq.augment_images(imgs)

    flips each image either horizontally or vertically.

    >>> seq = iaa.Func([
    >>>     iaa.Fliplr(1.0),
    >>>     iaa.Sequential([
    >>>         iaa.GaussianBlur(1.0),
    >>>         iaa.Dropout(0.05),
    >>>         iaa.AdditiveGaussianNoise(0.1*255)
    >>>     ]),
    >>>     iaa.Noop()
    >>> ])
    >>> imgs_aug = seq.augment_images(imgs)

    either flips each image horizontally, or adds blur+dropout+noise or does
    nothing.

    """
    return SomeOf(n=1, arg_0=arg_0, random_order=False, arg_1=arg_1, arg_2=arg_2,
                  arg_3=arg_3)

Augmenter that always executes exactly one of its children.

    dtype support::

        See ``imgaug.augmenters.meta.SomeOf``.

    Parameters
    ----------
    children : list of imgaug.augmenters.meta.Augmenter
        The choices of augmenters to apply.

    name : None or str, optional
        See :func:`imgaug.augmenters.meta.Augmenter.__init__`.

    deterministic : bool, optional
        See :func:`imgaug.augmenters.meta.Augmenter.__init__`.

    random_state : None or int or numpy.random.RandomState, optional
        See :func:`imgaug.augmenters.meta.Augmenter.__init__`.

    Examples
    --------
    >>> imgs = [np.ones((10, 10))]
    >>> seq = iaa.OneOf([
    >>>     iaa.Fliplr(1.0),
    >>>     iaa.Flipud(1.0)
    >>> ])
    >>> imgs_aug = seq.augment_images(imgs)

    flips each image either horizontally or vertically.

    >>> seq = iaa.OneOf([
    >>>     iaa.Fliplr(1.0),
    >>>     iaa.Sequential([
    >>>         iaa.GaussianBlur(1.0),
    >>>         iaa.Dropout(0.05),
    >>>         iaa.AdditiveGaussianNoise(0.1*255)
    >>>     ]),
    >>>     iaa.Noop()
    >>> ])
    >>> imgs_aug = seq.augment_images(imgs)

    either flips each image horizontally, or adds blur+dropout+noise or does
    nothing.

Augmenter that always executes exactly one of its children .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . api_request ( "/1/boards/{board_id}/lists/open" . format ( board_id = arg_1 ) , fields = 'name' ) arg_3 = arg_0 . config . get ( 'include_lists' , to_type = aslist ) if arg_3 : arg_2 = [ l for l in arg_2 if l [ 'name' ] in arg_3 ] arg_4 = arg_0 . config . get ( 'exclude_lists' , to_type = aslist ) if arg_4 : arg_2 = [ l for l in arg_2 if l [ 'name' ] not in arg_4 ] return arg_2

def Func(arg_0, arg_1):
        """
        Returns a list of the filtered lists for the given board
        This filters the trello lists according to the configuration values of
        trello.include_lists and trello.exclude_lists.
        """
        arg_2 = arg_0.api_request(
            "/1/boards/{board_id}/lists/open".format(board_id=arg_1),
            fields='name')

        arg_3 = arg_0.config.get('include_lists', to_type=aslist)
        if arg_3:
            arg_2 = [l for l in arg_2 if l['name'] in arg_3]

        arg_4 = arg_0.config.get('exclude_lists', to_type=aslist)
        if arg_4:
            arg_2 = [l for l in arg_2 if l['name'] not in arg_4]

        return arg_2

Returns a list of the filtered lists for the given board This filters the trello lists according to the configuration values of trello . include_lists and trello . exclude_lists .


def Func(arg_0):
        """
        Returns the components of this name, as a sequence of 2-tuples.

        :return: The components of this name.
        :rtype: :py:class:`list` of ``name, value`` tuples.
        """
        arg_1 = []
        for arg_2 in range(_lib.X509_NAME_entry_count(arg_0._name)):
            arg_3 = _lib.X509_NAME_get_entry(arg_0._name, arg_2)

            arg_4 = _lib.X509_NAME_ENTRY_get_object(arg_3)
            arg_5 = _lib.X509_NAME_ENTRY_get_data(arg_3)

            arg_6 = _lib.OBJ_obj2nid(arg_4)
            arg_7 = _lib.OBJ_nid2sn(arg_6)

            # ffi.string does not handle strings containing NULL bytes
            # (which may have been generated by old, broken software)
            arg_8 = _ffi.buffer(_lib.ASN1_STRING_data(arg_5),
                                _lib.ASN1_STRING_length(arg_5))[:]
            arg_1.append((_ffi.string(arg_7), arg_8))

        return arg_1

Returns the components of this name as a sequence of 2 - tuples .


def
Func
(
arg_0
,
arg_1
)
:
if
not
isinstance
(
arg_1
,
bytes
)
:
raise
TypeError
(
"profiles must be a byte string."
)
_openssl_assert
(
_lib
.
SSL_CTX_Func
(
arg_0
.
_context
,
arg_1
)
==
0
)

def Func(arg_0, arg_1):
        """
        Enable support for negotiating SRTP keying material.

        :param bytes profiles: A colon delimited list of protection profile
            names, like ``b'SRTP_AES128_CM_SHA1_80:SRTP_AES128_CM_SHA1_32'``.
        :return: None
        """
        if not isinstance(arg_1, bytes):
            raise TypeError("profiles must be a byte string.")

        _openssl_assert(
            _lib.SSL_CTX_Func(arg_0._context, arg_1) == 0
        )

Enable support for negotiating SRTP keying material .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . obj [ 'adapter' ] arg_3 = [ "hgnc_id" , "hgnc_symbol" , "disease_associated_transcripts" , "reduced_penetrance" , "genetic_disease_models" , "mosaicism" , "database_entry_version" ] arg_4 = parse_genes ( arg_1 ) arg_2 . add_hgnc_id ( arg_4 ) click . echo ( "#{0}" . format ( '\t' . join ( arg_3 ) ) ) for arg_5 in arg_4 : if arg_5 . get ( 'hgnc_id' ) : arg_6 = [ ] for arg_7 in arg_3 : arg_6 . append ( str ( arg_5 [ arg_7 ] ) if arg_5 . get ( arg_7 ) else '' ) click . echo ( '\t' . join ( arg_6 ) )

def Func(arg_0, arg_1):
    """Convert a gene panel with hgnc symbols to a new one with hgnc ids."""
    arg_2 = arg_0.obj['adapter']
    arg_3 = ["hgnc_id","hgnc_symbol","disease_associated_transcripts",
                 "reduced_penetrance", "genetic_disease_models", "mosaicism",
                 "database_entry_version"]

    arg_4 = parse_genes(arg_1)

    arg_2.add_hgnc_id(arg_4)

    click.echo("#{0}".format('\t'.join(arg_3)))
    for arg_5 in arg_4:
        if arg_5.get('hgnc_id'):
            arg_6 = []
            for arg_7 in arg_3:
                arg_6.append(str(arg_5[arg_7]) if arg_5.get(arg_7) else '')

            click.echo('\t'.join(arg_6))

Convert a gene panel with hgnc symbols to a new one with hgnc ids .


def
Func
(
arg_0
)
:
arg_1
=
re
.
compile
(
"^## .+$"
,
re
.
MULTILINE
)
.
split
(
arg_0
)
arg_2
=
re
.
findall
(
"^## .+?$"
,
arg_0
,
re
.
MULTILINE
)
arg_1
.
pop
(
0
)
arg_3
=
[
]
def
func
(
arg_4
,
arg_5
)
:
arg_6
=
Func_heading
(
arg_4
)
arg_6
[
"content"
]
=
arg_5
arg_3
.
append
(
arg_6
)
list
(
map
(
func
,
arg_2
,
arg_1
)
)
return
arg_3

def Func(arg_0):
    """
    Parse the given ChangeLog data into a list of Hashes.

    @param [String] data File data from the ChangeLog.md
    @return [Array<Hash>] Parsed data, e.g. [{ 'version' => ..., 'url' => ..., 'date' => ..., 'content' => ...}, ...]
    """

    arg_1 = re.compile("^## .+$", re.MULTILINE).split(arg_0)
    arg_2 = re.findall("^## .+?$", arg_0, re.MULTILINE)
    arg_1.pop(0)
    arg_3 = []

    def func(arg_4, arg_5):
        arg_6 = Func_heading(arg_4)
        arg_6["content"] = arg_5
        arg_3.append(arg_6)

    list(map(func, arg_2, arg_1))
    return arg_3

Parse the given ChangeLog data into a list of Hashes .


def Func(arg_0, arg_1):
  '''
  distribute Heron packages to all nodes
  '''
  Log.info("Distributing heron package to nodes (this might take a while)...")
  arg_2 = arg_0[Role.MASTERS]
  arg_3 = arg_0[Role.SLAVES]

  arg_4 = tempfile.NamedTemporaryFile(suffix=".tmp").name
  Log.debug("TAR file %s to %s" % (arg_1["heron_dir"], arg_4))
  make_tarfile(arg_4, arg_1["heron_dir"])
  arg_5 = arg_2.union(arg_3)

  scp_package(arg_4, arg_5, arg_1)


def Func ( arg_0 , arg_1 , arg_2 = True ) : arg_0 . _assert_valid_stash ( ) arg_3 = arg_0 . _storage . Func ( arg_1 ) . copy ( ) if not arg_3 . Func ( 'value' ) : return None if arg_2 : arg_3 [ 'value' ] = arg_0 . _decrypt ( arg_3 [ 'value' ] ) audit ( storage = arg_0 . _storage . db_path , action = 'GET' , message = json . dumps ( dict ( arg_1 = arg_1 ) ) ) return arg_3

def Func(arg_0, arg_1, arg_2=True):
        """Return a key with its parameters if it was found.
        """
        arg_0._assert_valid_stash()

        arg_3 = arg_0._storage.Func(arg_1).copy()
        if not arg_3.Func('value'):
            return None
        if arg_2:
            arg_3['value'] = arg_0._decrypt(arg_3['value'])

        audit(
            storage=arg_0._storage.db_path,
            action='GET',
            message=json.dumps(dict(arg_1=arg_1)))

        return arg_3

Return a key with its parameters if it was found .


def Func ( arg_0 ) : arg_1 = PyFunceble . OUTPUT_DIRECTORY + PyFunceble . OUTPUTS [ "parent_directory" ] if not arg_1 . endswith ( PyFunceble . directory_separator ) : arg_1 += PyFunceble . directory_separator arg_2 = [ ] for arg_3 , arg_4 , arg_5 in PyFunceble . walk ( arg_1 ) : for arg_6 in arg_5 : if arg_6 not in [ ".gitignore" , ".keep" ] : if arg_3 . endswith ( PyFunceble . directory_separator ) : arg_2 . append ( arg_3 + arg_6 ) else : arg_2 . append ( arg_3 + PyFunceble . directory_separator + arg_6 ) return arg_2

def Func(arg_0):
        """
        Return the list of file to delete.
        """

        # We initiate the directory we have to look for.
        arg_1 = PyFunceble.OUTPUT_DIRECTORY + PyFunceble.OUTPUTS["parent_directory"]

        if not arg_1.endswith(PyFunceble.directory_separator):  # pragma: no cover
            # For safety, if it does not ends with the directory separator, we append it
            # to its end.
            arg_1 += PyFunceble.directory_separator

        # We initiate a variable which will save the list of file to delete.
        arg_2 = []

        for arg_3, arg_4, arg_5 in PyFunceble.walk(arg_1):
            # We walk in the directory and get all files and sub-directories.

            for arg_6 in arg_5:
                # If there is files in the current sub-directory, we loop
                # through the list of files.

                if arg_6 not in [".gitignore", ".keep"]:
                    # The file is not into our list of file we do not have to delete.

                    if arg_3.endswith(PyFunceble.directory_separator):
                        # The root ends with the directory separator.

                        # We construct the path and append the full path to the result.
                        arg_2.append(arg_3 + arg_6)
                    else:
                        # The root directory does not ends with the directory separator.

                        # We construct the path by appending the directory separator
                        # between the root and the filename and append the full path to
                        # the result.
                        arg_2.append(
                            arg_3 + PyFunceble.directory_separator + arg_6
                        )  # pragma: no cover

        # We return our list of file to delete.
        return arg_2


(clsname, name, driver, base=GromacsCommand)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = arg_4 ) : arg_5 = { 'command_name' : arg_1 , 'driver' : arg_2 , '__doc__' : property ( arg_3 . _get_gmx_docs ) } return type ( arg_0 , ( arg_3 , ) , arg_5 )

def Func(arg_0, arg_1, arg_2, arg_3=arg_4):
    """ Factory for GromacsCommand derived types. """
    arg_5 = {
        'command_name': arg_1,
        'driver': arg_2,
        '__doc__': property(arg_3._get_gmx_docs)
    }
    return type(arg_0, (arg_3,), arg_5)

Factory for GromacsCommand derived types .


def
Func
(
arg_0
,
arg_1
)
:
if
not
arg_0
or
not
re
.
match
(
'^('
+
PARTS
[
arg_1
]
+
')$'
,
arg_0
)
:
raise
ValueError
(
'{} should match {}'
.
format
(
arg_1
,
PARTS
[
arg_1
]
)
)

def Func(arg_0, arg_1):
    """Raise an exception if string doesn't match a part's regex

    :param string: str
    :param part: a key in the PARTS dict
    :raises: ValueError, TypeError
    """
    if not arg_0 or not re.match('^(' + PARTS[arg_1] + ')$', arg_0):
        raise ValueError('{} should match {}'.format(arg_1, PARTS[arg_1]))

Raise an exception if string doesn t match a part s regex


def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_3 = sys . getsizeof ( arg_1 ) if arg_2 is None : arg_2 = set ( ) arg_4 = id ( arg_1 ) if arg_4 in arg_2 : return 0 arg_2 . add ( arg_4 ) if isinstance ( arg_1 , dict ) : arg_3 += sum ( [ arg_0 . Func ( arg_5 , arg_2 ) for arg_5 in arg_1 . values ( ) ] ) arg_3 += sum ( [ arg_0 . Func ( arg_6 , arg_2 ) for arg_6 in arg_1 . keys ( ) ] ) elif hasattr ( arg_1 , '__dict__' ) : arg_3 += arg_0 . Func ( arg_1 . __dict__ , arg_2 ) elif hasattr ( arg_1 , '__iter__' ) and not isinstance ( arg_1 , ( str , bytes , bytearray ) ) : arg_3 += sum ( [ arg_0 . Func ( arg_7 , arg_2 ) for arg_7 in arg_1 ] ) return arg_3

def Func(arg_0, arg_1, arg_2=None):
        """Recursively finds size of objects"""
        arg_3 = sys.getsizeof(arg_1)
        if arg_2 is None:
            arg_2 = set()
        arg_4 = id(arg_1)
        if arg_4 in arg_2:
            return 0
        # Important mark as seen *before* entering recursion to gracefully handle
        # self-referential objects
        arg_2.add(arg_4)
        if isinstance(arg_1, dict):
            arg_3 += sum([arg_0.Func(arg_5, arg_2) for arg_5 in arg_1.values()])
            arg_3 += sum([arg_0.Func(arg_6, arg_2) for arg_6 in arg_1.keys()])
        elif hasattr(arg_1, '__dict__'):
            arg_3 += arg_0.Func(arg_1.__dict__, arg_2)
        elif hasattr(arg_1, '__iter__') and not isinstance(arg_1, (str, bytes, bytearray)):
            arg_3 += sum([arg_0.Func(arg_7, arg_2) for arg_7 in arg_1])
        return arg_3


def
Func
(
arg_0
)
:
def
tile_string
(
arg_1
)
:
if
arg_1
>
0
:
return
'% 5d'
%
(
2
**
arg_1
,
)
return
"     "
arg_2
=
'-'
*
25
print
(
arg_2
)
for
arg_3
in
range
(
4
)
:
print
(
"|"
+
"|"
.
join
(
[
tile_string
(
arg_4
)
for
arg_4
in
arg_0
.
_state
[
arg_3
,
:
]
]
)
+
"|"
)
print
(
arg_2
)

def Func(arg_0):
        """Prints the current state."""

        def tile_string(arg_1):
            """Concert value to string."""
            if arg_1 > 0:
                return '% 5d' % (2 ** arg_1,)
            return "     "

        arg_2 = '-' * 25
        print(arg_2)
        for arg_3 in range(4):
            print("|" + "|".join([tile_string(arg_4) for arg_4 in arg_0._state[arg_3, :]]) + "|")
            print(arg_2)


(graph: BELGraph, complex_node: ComplexAbundance, member_node: BaseEntity)

return any(  # TODO can't you look in the members of the complex object (if it's enumerated)
        v == member_node
        for _, v, data in graph.out_edges(complex_node, data=True)
        if data[RELATION] == HAS_COMPONENT
    )

def Func(arg_0: arg_1, arg_2: arg_3, arg_4: arg_5) -> bool:
    """Does the given complex contain the member?"""
    return any(  # TODO can't you look in the members of the complex object (if it's enumerated)
        arg_7 == arg_4
        for arg_6, arg_7, arg_8 in arg_0.out_edges(arg_2, arg_8=True)
        if arg_8[RELATION] == HAS_COMPONENT
    )


(self, name, interfaces, targetPlatform)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = Entity ( arg_1 ) arg_4 . _name = arg_1 + "_inst" for arg_6 , arg_7 in arg_0 . params . items ( ) : arg_4 . generics . append ( arg_7 ) if isinstance ( arg_2 , set ) : arg_8 = arg_2 else : arg_8 = set ( arg_2 ) for arg_9 in arg_2 : arg_10 = portItemfromSignal ( arg_9 , arg_4 ) arg_10 . registerInternSig ( arg_9 ) arg_4 . ports . append ( arg_10 ) arg_9 . hidden = False removeUnconnectedSignals ( arg_0 ) markVisibilityOfSignals ( arg_0 , arg_1 , arg_0 . signals , arg_8 ) for arg_12 in arg_3 . beforeHdlArchGeneration : arg_12 ( arg_0 ) arg_13 = Architecture ( arg_4 ) for arg_14 in statements_to_HWProcesses ( arg_0 . statements ) : arg_13 . processes . append ( arg_14 ) for arg_9 in arg_0 . signals : if arg_9 not in arg_8 and not arg_9 . hidden : arg_13 . variables . append ( arg_9 ) for arg_15 in arg_0 . subUnits : arg_13 . componentInstances . append ( arg_15 ) for arg_16 in distinctBy ( arg_0 . subUnits , lambda x : x . name ) : arg_13 . components . append ( arg_16 ) arg_0 . synthesised = True return [ arg_4 , arg_13 ]

def Func(arg_0, arg_1, arg_2, arg_3):
        """
        Build Entity and Architecture instance out of netlist representation
        """
        arg_4 = Entity(arg_1)
        arg_4._name = arg_1 + "_inst"  # instance name

        # create generics
        for arg_6, arg_7 in arg_0.params.items():
            arg_4.generics.append(arg_7)

        # interface set for faster lookup
        if isinstance(arg_2, set):
            arg_8 = arg_2
        else:
            arg_8 = set(arg_2)

        # create ports
        for arg_9 in arg_2:
            arg_10 = portItemfromSignal(arg_9, arg_4)
            arg_10.registerInternSig(arg_9)
            arg_4.ports.append(arg_10)
            arg_9.hidden = False

        removeUnconnectedSignals(arg_0)
        markVisibilityOfSignals(arg_0, arg_1, arg_0.signals, arg_8)

        for arg_12 in arg_3.beforeHdlArchGeneration:
            arg_12(arg_0)

        arg_13 = Architecture(arg_4)
        for arg_14 in statements_to_HWProcesses(arg_0.statements):
            arg_13.processes.append(arg_14)

        # add signals, variables etc. in architecture
        for arg_9 in arg_0.signals:
            if arg_9 not in arg_8 and not arg_9.hidden:
                arg_13.variables.append(arg_9)

        # instantiate subUnits in architecture
        for arg_15 in arg_0.subUnits:
            arg_13.componentInstances.append(arg_15)

        # add components in architecture
        for arg_16 in distinctBy(arg_0.subUnits, lambda x: x.name):
            arg_13.components.append(arg_16)

        arg_0.synthesised = True

        return [arg_4, arg_13]


def Func ( arg_0 ) : if not isinstance ( arg_0 , type ) : class arg_0 ( arg_0 , object ) : pass return arg_0 . __mro__ [ 1 : ] return arg_0 . __mro__

def Func(arg_0):
    """Get an mro for a type or classic class"""
    if not isinstance(arg_0, type):
        class arg_0(arg_0, object): pass
        return arg_0.__mro__[1:]
    return arg_0.__mro__


def Func(arg_0, arg_1=False):
    """
    Parse a zonefile into a dict
    """
    arg_0 = remove_comments(arg_0)
    arg_0 = flatten(arg_0)
    arg_0 = remove_class(arg_0)
    arg_0 = add_default_name(arg_0)
    arg_2 = parse_lines(arg_0, arg_1=arg_1)
    return arg_2


def
Func
(
arg_0
)
:
arg_1
=
arg_0
.
_fd
.
read
(
1
)
if
arg_1
==
b''
:
return
0
while
(
bytearray
(
arg_1
)
[
1
]
&
0x80
)
>>
7
==
1
:
arg_2
=
arg_0
.
_fd
.
read
(
1
)
if
arg_2
==
b''
:
raise
EOFError
(
'unexpected EOF.'
)
arg_1
+=
arg_2
arg_3
,
arg_4
=
decodeVarint
(
arg_1
,
0
)
return
arg_3

def Func(arg_0):
        """Read a varint from file, parse it, and return the decoded integer.
        """
        arg_1 = arg_0._fd.read(1)
        if arg_1 == b'':
            return 0

        while (bytearray(arg_1)[-1] & 0x80) >> 7 == 1:  # while the MSB is 1
            arg_2 = arg_0._fd.read(1)
            if arg_2 == b'':
                raise EOFError('unexpected EOF.')
            arg_1 += arg_2

        arg_3, arg_4 = decodeVarint(arg_1, 0)

        return arg_3

Read a varint from file parse it and return the decoded integer .


def Func(arg_0, arg_1, arg_2, arg_3=1):
        # type: (str, str, float) -> None
        """Send a Set metric with the specified unique value"""

        if arg_0._should_send_metric(arg_1, arg_3):
            arg_2 = str(arg_2)
            arg_0._request(
                Set(
                    arg_0._create_metric_name_for_request(arg_1),
                    arg_2,
                    arg_3
                ).to_request()
            )


def Func(arg_0):
    """
    Initialise the logging by adding an observer to the global log publisher.

    :param str log_level: The minimum log level to log messages for.
    """
    arg_1 = LogLevelFilterPredicate(
        LogLevel.levelWithName(arg_0))
    arg_1.setLogLevelForNamespace(
        'twisted.web.client._HTTP11ClientFactory', LogLevel.warn)
    arg_2 = FilteringLogObserver(
        textFileLogObserver(sys.stdout), [arg_1])
    globalLogPublisher.addObserver(arg_2)

Initialise the logging by adding an observer to the global log publisher .


def Func(arg_0, arg_1):
        """
        Retrieve the last analog data value received for the specified pin.

        :param pin: Selected pin

        :return: The last value entered into the analog response table.
        """
        with arg_0.data_lock:
            arg_2 = arg_0._command_handler.analog_response_table[arg_1][arg_0._command_handler.RESPONSE_TABLE_PIN_DATA_VALUE]
        return arg_2

Retrieve the last analog data value received for the specified pin .


def Func(arg_0, arg_1, arg_2, arg_3=None):
        """
        Obtain keying material for application use.

        :param: label - a disambiguating label string as described in RFC 5705
        :param: olen - the length of the exported key material in bytes
        :param: context - a per-association context value
        :return: the exported key material bytes or None
        """
        arg_4 = _no_zero_allocator("unsigned char[]", arg_2)
        arg_5 = _ffi.NULL
        arg_6 = 0
        arg_7 = 0
        if arg_3 is not None:
            arg_5 = arg_3
            arg_6 = len(arg_3)
            arg_7 = 1
        arg_8 = _lib.SSL_Func(arg_0._ssl, arg_4, arg_2,
                                                  arg_1, len(arg_1),
                                                  arg_5, arg_6,
                                                  arg_7)
        _openssl_assert(arg_8 == 1)
        return _ffi.buffer(arg_4, arg_2)[:]

Obtain keying material for application use .


def Func ( arg_0 ) : arg_1 = open ( arg_0 , 'rb' ) arg_1 . seek ( 0 ) arg_2 = arg_1 . read ( 1000 ) arg_3 = arg_2 . find ( 'HEADER_END' ) + len ( 'HEADER_END' ) return arg_3

def Func(arg_0):
    ''' Script to find the header size of a filterbank file'''

    # open datafile
    arg_1=open(arg_0,'rb')
    # go to the start of the file
    arg_1.seek(0)
    #read some region larger than the header.
    arg_2 = arg_1.read(1000)
    arg_3 = arg_2.find('HEADER_END')+len('HEADER_END')

    return arg_3


def
Func
(
arg_0
,
arg_1
)
:
if
not
isinstance
(
arg_1
,
list
)
:
raise
ValueError
(
"positions must be a a list of numbers"
)
if
not
all
(
(
is_number
(
arg_2
)
and
arg_2
>=
0
)
for
arg_2
in
arg_1
)
:
raise
ValueError
(
"positions must be positive nubmers"
)
arg_3
=
[
'Func'
]
arg_3
.
extend
(
[
'{:f}'
.
format
(
arg_2
)
for
arg_2
in
arg_1
]
)
arg_0
.
effects
.
extend
(
arg_3
)
arg_0
.
effects_log
.
append
(
'Func'
)
return
arg_0

def Func(arg_0, arg_1):
        '''Delay one or more audio channels such that they start at the given
        positions.

        Parameters
        ----------
        positions: list of floats
            List of times (in seconds) to Func each audio channel.
            If fewer positions are given than the number of channels, the
            remaining channels will be unaffected.

        '''
        if not isinstance(arg_1, list):
            raise ValueError("positions must be a a list of numbers")

        if not all((is_number(arg_2) and arg_2 >= 0) for arg_2 in arg_1):
            raise ValueError("positions must be positive nubmers")

        arg_3 = ['Func']
        arg_3.extend(['{:f}'.format(arg_2) for arg_2 in arg_1])

        arg_0.effects.extend(arg_3)
        arg_0.effects_log.append('Func')
        return arg_0

Delay one or more audio channels such that they start at the given
        positions.

        Parameters
        ----------
        positions: list of floats
            List of times (in seconds) to delay each audio channel.
            If fewer positions are given than the number of channels, the
            remaining channels will be unaffected.

Delay one or more audio channels such that they start at the given positions .


def Func ( arg_0 ) : for arg_1 , arg_2 in iteritems ( arg_0 ) : arg_0 [ arg_1 ] = _transform ( arg_2 , key = ( arg_1 , ) ) arg_3 = { 'access_token' : SETTINGS [ 'access_token' ] , 'data' : arg_0 } return arg_3

def Func(arg_0):
    """
    Returns the full payload as a string.
    """

    for arg_1, arg_2 in iteritems(arg_0):
        arg_0[arg_1] = _transform(arg_2, key=(arg_1,))

    arg_3 = {
        'access_token': SETTINGS['access_token'],
        'data': arg_0
    }

    return arg_3


(data, P, NFFT=None, detrend='mean', sampling=1.,
                       scale_by_freq=True, window='hamming')

def Func(arg_0, arg_1, arg_2=None, arg_3='mean', arg_4=1.,
                       arg_5=True, arg_6='hamming'):
    r"""Return Daniell's periodogram.

    To reduce fast fluctuations of the spectrum one idea proposed by daniell
    is to average each value with points in its neighboorhood. It's like
    a low filter.

    .. math:: \hat{P}_D[f_i]= \frac{1}{2P+1} \sum_{n=i-P}^{i+P} \tilde{P}_{xx}[f_n]

    where P is the number of points to average.

    Daniell's periodogram is the convolution of the spectrum with a low filter:

    .. math:: \hat{P}_D(f)=   \hat{P}_{xx}(f)*H(f)

    Example::

        >>> Func(data, 8)

    if N/P is not integer, the final values of the original PSD are not used.

    using Func(data, 0) should give the original PSD.

    """
    arg_7 = speriodogram(arg_0, arg_2=arg_2, arg_3=arg_3, arg_4=arg_4,
                   arg_5=arg_5, arg_6=arg_6)

    if len(arg_7) % 2 == 1:
        arg_8 = 'real'
    else:
        arg_8 = 'complex'

    arg_9 = len(arg_7)
    arg_10 = 2 * arg_1 + 1
    if arg_8 == 'real': #must get odd value
        arg_11 = np.ceil(arg_7.size/float(arg_10))
        if arg_11 % 2 == 0:
            arg_11 = arg_7.size/arg_10
    else:
        arg_11 = np.ceil(arg_7.size/float(arg_10))
        if arg_11 % 2 == 1:
            arg_11 = arg_7.size/arg_10

    arg_12 = np.zeros(int(arg_11)) # keep integer division
    for arg_13 in range(0, arg_12.size):
        arg_14 = 0 #needed to know the number of valid averaged values
        for arg_15 in range(arg_13*arg_10-arg_1, arg_13*arg_10+arg_1+1): #+1 to have P values on each sides
            if arg_15 > 0 and arg_15<arg_9: #needed to start the average
                arg_14 += 1
                arg_12[arg_13] += arg_7[arg_15]
        arg_12[arg_13] /= float(arg_14)

    #todo: check this
    if arg_8 == 'complex':
        arg_16 = np.linspace(0, arg_4, len(arg_12))
    else:
        arg_17 = 1. / arg_4
        arg_16 = np.linspace(0,arg_4/2., len(arg_12))
    #psd.refreq(2*psd.size()/A.freq());
    #psd.retime(-1./psd.freq()+1./A.size());

    return arg_12, arg_16

r"""Return Daniell's periodogram.

    To reduce fast fluctuations of the spectrum one idea proposed by daniell
    is to average each value with points in its neighboorhood. It's like
    a low filter.

    .. math:: \hat{P}_D[f_i]= \frac{1}{2P+1} \sum_{n=i-P}^{i+P} \tilde{P}_{xx}[f_n]

    where P is the number of points to average.

    Daniell's periodogram is the convolution of the spectrum with a low filter:

    .. math:: \hat{P}_D(f)=   \hat{P}_{xx}(f)*H(f)

    Example::

        >>> DaniellPeriodogram(data, 8)

    if N/P is not integer, the final values of the original PSD are not used.

    using DaniellPeriodogram(data, 0) should give the original PSD.


def Func(arg_0, arg_1, arg_2):
        """
        Geodesic acceleration correction to the LM step.

        Parameters
        ----------
            damped_JTJ : numpy.ndarray
                The damped JTJ used to calculate the initial step.
            delta0 : numpy.ndarray
                The initial LM step.

        Returns
        -------
            corr : numpy.ndarray
                The correction to the original LM step.
        """
        #Get the derivative:
        arg_3 = arg_0.update_function(arg_0.param_vals)
        arg_4 = arg_0.calc_residuals().copy()
        arg_3 = arg_0.update_function(arg_0.param_vals + arg_2)
        arg_5 = arg_0.calc_residuals().copy()
        arg_3 = arg_0.update_function(arg_0.param_vals - arg_2)
        arg_6 = arg_0.calc_residuals().copy()
        arg_7 = (arg_6 + arg_5 - 2*arg_4)

        arg_8, arg_9, arg_10, arg_11 = np.linalg.lstsq(arg_1, np.dot(arg_0.J, arg_7),
                rcond=arg_0.min_eigval)
        arg_8 *= -0.5
        return arg_8

Geodesic acceleration correction to the LM step .


(self, filename, file_format=None, type=None, typequote='"')

def Func(arg_0, arg_1, arg_2=None, arg_3=None, arg_4='"'):
        """Func density to file using the given format.

        The format can also be deduced from the suffix of the filename
        though the *format* keyword takes precedence.

        The default format for Func() is 'dx'.  Use 'dx' for
        visualization.

        Implemented formats:

        dx
            :mod:`OpenDX`
        pickle
            pickle (use :meth:`Grid.load` to restore); :meth:`Grid.save`
            is simpler than ``Func(format='python')``.

        Parameters
        ----------

        filename : str
            name of the output file

        file_format : {'dx', 'pickle', None} (optional)
            output file format, the default is "dx"

        type : str (optional)
            for DX, set the output DX array type, e.g., "double" or "float".
            By default (``None``), the DX type is determined from the numpy
            dtype of the array of the grid (and this will typically result in
            "double").

            .. versionadded:: 0.4.0

        typequote : str (optional)
            For DX, set the character used to quote the type string;
            by default this is a double-quote character, '"'.
            Custom parsers like the one from NAMD-GridForces (backend for MDFF)
            expect no quotes, and typequote='' may be used to appease them.

            .. versionadded:: 0.5.0

        """
        arg_5 = arg_0._get_Funcer(arg_1, arg_2=arg_2)
        arg_5(arg_1, arg_3=arg_3, arg_4=arg_4)

export density to file using the given format.

        The format can also be deduced from the suffix of the filename
        though the *format* keyword takes precedence.

        The default format for export() is 'dx'.  Use 'dx' for
        visualization.

        Implemented formats:

        dx
            :mod:`OpenDX`
        pickle
            pickle (use :meth:`Grid.load` to restore); :meth:`Grid.save`
            is simpler than ``export(format='python')``.

        Parameters
        ----------

        filename : str
            name of the output file

        file_format : {'dx', 'pickle', None} (optional)
            output file format, the default is "dx"

        type : str (optional)
            for DX, set the output DX array type, e.g., "double" or "float".
            By default (``None``), the DX type is determined from the numpy
            dtype of the array of the grid (and this will typically result in
            "double").

            .. versionadded:: 0.4.0

        typequote : str (optional)
            For DX, set the character used to quote the type string;
            by default this is a double-quote character, '"'.
            Custom parsers like the one from NAMD-GridForces (backend for MDFF)
            expect no quotes, and typequote='' may be used to appease them.

            .. versionadded:: 0.5.0

export density to file using the given format .


def Func ( arg_0 , arg_1 ) : with open ( arg_1 , 'w' ) as f : for arg_2 in arg_0 : f . write ( "%s\n" % arg_2 )

def Func(arg_0, arg_1):
    """Output the positions of an image to a positions.dat file.

    Positions correspond to a set of pixels in the lensed source galaxy that are anticipated to come from the same \
    multiply-imaged region of the source-plane. Mass models which do not trace the pixels within a threshold value of \
    one another are resampled during the non-linear search.

    Positions are stored in a .dat file, where each line of the file gives a list of list of (y,x) positions which \
    correspond to the same region of the source-plane. Thus, multiple source-plane regions can be input over multiple \
    lines of the same positions file.

    Parameters
    ----------
    positions : [[[]]]
        The lists of positions (e.g. [[[1.0, 1.0], [2.0, 2.0]], [[3.0, 3.0], [4.0, 4.0]]])
    positions_path : str
        The path to the positions .dat file containing the positions (e.g. '/path/to/positions.dat')
    """
    with open(arg_1, 'w') as f:
        for arg_2 in arg_0:
            f.write("%s\n" % arg_2)

Output the positions of an image to a positions . dat file .


def Func():
    """
    Prints the complete YAML.

    """
    arg_0 = requests.get(TRELLO_API_DOC).content
    arg_1 = html.fromstring(arg_0)

    arg_2 = arg_1.xpath('//a[contains(@class, "reference internal")]/@href')
    arg_3 = [requests.get(TRELLO_API_DOC + u)
             for u in arg_2 if u.endswith('index.html')]

    arg_4 = []
    for arg_5 in arg_3:
        arg_1 = html.fromstring(arg_5.content)
        arg_6 = arg_1.xpath('//div[@class="section"]/h2/..')
        for arg_7 in arg_6:
            arg_8 = etree.tostring(arg_7).decode('utf-8')
            arg_9 = html2text(arg_8).splitlines()
            arg_10 = EP_DESC_REGEX.match(arg_9[0])
            if not arg_10:
                continue
            arg_11, arg_12 = arg_10.groups()
            arg_9[0] = ' '.join([arg_11, arg_12])
            arg_13 = b64encode(gzip.compress('\n'.join(arg_9).encode('utf-8')))
            arg_4.append((arg_11, arg_12, arg_13))

    print(yaml.dump(create_tree(arg_4)))


return self._assoc_or_create('success', parent, child, **kwargs)

def Func ( arg_0 , arg_1 , arg_2 = None , ** arg_3 ) : return arg_0 . _assoc_or_create ( 'success' , arg_1 , arg_2 , ** arg_3 )

def Func(arg_0, arg_1, arg_2=None, **arg_3):
        """Add a node to run on success.

        =====API DOCS=====
        Add a node to run on success.

        :param parent: Primary key of parent node to associate success node to.
        :type parent: int
        :param child: Primary key of child node to be associated.
        :type child: int
        :param `**kwargs`: Fields used to create child node if ``child`` is not provided.
        :returns: Dictionary of only one key "changed", which indicates whether the association succeeded.
        :rtype: dict

        =====API DOCS=====
        """
        return arg_0._assoc_or_create('success', arg_1, arg_2, **arg_3)


def
Func
(
arg_0
,
arg_1
)
:
logger
.
debug
(
'Adapter state change: {0}'
.
format
(
arg_1
)
)
if
arg_1
==
5
:
arg_0
.
_powered_off
.
clear
(
)
arg_0
.
_powered_on
.
set
(
)
elif
arg_1
==
4
:
arg_0
.
_powered_on
.
clear
(
)
arg_0
.
_powered_off
.
set
(
)

def Func(arg_0, arg_1):
        """Called when the power state changes."""
        logger.debug('Adapter state change: {0}'.format(arg_1))
        # Handle when powered on.
        if arg_1 == 5:
            arg_0._powered_off.clear()
            arg_0._powered_on.set()
        # Handle when powered off.
        elif arg_1 == 4:
            arg_0._powered_on.clear()
            arg_0._powered_off.set()


(
        self, callback_uri=None, ax_attrs=["name", "email", "language",
                                           "username"])

def Func ( arg_0 , arg_1 = None , arg_2 = [ "name" , "email" , "language" , "username" ] ) : arg_1 = arg_1 or arg_0 . request . uri arg_3 = arg_0 . _openid_args ( arg_1 , arg_2 = arg_2 ) arg_0 . redirect ( arg_0 . _OPENID_ENDPOINT + "?" + urllib . urlencode ( arg_3 ) )

def Func(
        arg_0, arg_1=None, arg_2=["name", "email", "language",
                                           "username"]):

        """Returns the authentication URL for this service.

        After authentication, the service will redirect back to the given
        callback URI.

        We request the given attributes for the authenticated user by
        default (name, email, language, and username). If you don't need
        all those attributes for your app, you can request fewer with
        the ax_attrs keyword argument.
        """
        arg_1 = arg_1 or arg_0.request.uri
        arg_3 = arg_0._openid_args(arg_1, arg_2=arg_2)
        arg_0.redirect(arg_0._OPENID_ENDPOINT + "?" + urllib.urlencode(arg_3))

Returns the authentication URL for this service .


def
Func
(
arg_0
,
arg_1
=
,
arg_2
=
)
:
if
arg_1
is
:
arg_1
=
os
.
environ
.
get
(
'PATH'
,
''
)
.
split
(
os
.
pathsep
)
if
isinstance
(
arg_1
,
six
.
string_types
)
:
arg_1
=
[
arg_1
]
if
arg_2
is
:
arg_2
=
get_pathext
(
)
arg_2
=
[
arg_5
for
arg_5
in
arg_2
.
lower
(
)
.
split
(
os
.
pathsep
)
if
len
(
arg_5
)
]
if
os
.
path
.
splitext
(
arg_0
)
[
1
]
.
lower
(
)
in
arg_2
:
arg_2
=
[
''
]
for
arg_3
in
arg_1
:
arg_4
=
os
.
path
.
join
(
arg_3
,
arg_0
)
for
arg_5
in
arg_2
:
arg_6
=
arg_4
+
arg_5
if
os
.
path
.
isfile
(
arg_6
)
:
return
arg_6
if
os
.
path
.
isfile
(
arg_4
)
:
return
arg_4
raise
BadCommand
(
'Cannot find command %r'
%
arg_0
)

def Func(arg_0, arg_1=None, arg_2=None):
    """Searches the PATH for the given command and returns its path"""
    if arg_1 is None:
        arg_1 = os.environ.get('PATH', '').split(os.pathsep)
    if isinstance(arg_1, six.string_types):
        arg_1 = [arg_1]
    # check if there are funny path extensions for executables, e.g. Windows
    if arg_2 is None:
        arg_2 = get_pathext()
    arg_2 = [arg_5 for arg_5 in arg_2.lower().split(os.pathsep) if len(arg_5)]
    # don't use extensions if the command ends with one of them
    if os.path.splitext(arg_0)[1].lower() in arg_2:
        arg_2 = ['']
    # check if we find the command on PATH
    for arg_3 in arg_1:
        # try without extension first
        arg_4 = os.path.join(arg_3, arg_0)
        for arg_5 in arg_2:
            # then including the extension
            arg_6 = arg_4 + arg_5
            if os.path.isfile(arg_6):
                return arg_6
        if os.path.isfile(arg_4):
            return arg_4
    raise BadCommand('Cannot find command %r' % arg_0)


def Func ( arg_0 , arg_1 ) : arg_0 . f . write ( '\n' . join ( super ( PostgresFileWriter , arg_0 ) . Func ( arg_1 ) ) )

def Func(arg_0, arg_1):
        """Write DDL of `table` constraints to the output file

        :Parameters:
          - `table`: an instance of a :py:class:`mysql2pgsql.lib.mysql_reader.MysqlReader.Table` object that represents the table to read/write.

        Returns None
        """
        arg_0.f.write('\n'.join(super(PostgresFileWriter, arg_0).Func(arg_1)))

Write DDL of table constraints to the output file


return len(self.lcsseq(src, tar)) / max(len(src), len(tar))

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_1 == arg_2 : return 1.0 elif not arg_1 or not arg_2 : return 0.0 return len ( arg_0 . lcsseq ( arg_1 , arg_2 ) ) / max ( len ( arg_1 ) , len ( arg_2 ) )

def Func(arg_0, arg_1, arg_2):
        r"""Return the longest common subsequence Funcilarity of two strings.

        Longest common subsequence Funcilarity (:math:`Func_{LCSseq}`).

        This employs the LCSseq function to derive a Funcilarity metric:
        :math:`Func_{LCSseq}(s,t) = \frac{|LCSseq(s,t)|}{max(|s|, |t|)}`

        Parameters
        ----------
        src : str
            Source string for comparison
        tar : str
            Target string for comparison

        Returns
        -------
        float
            LCSseq Funcilarity

        Examples
        --------
        >>> sseq = LCSseq()
        >>> sseq.Func('cat', 'hat')
        0.6666666666666666
        >>> sseq.Func('Niall', 'Neil')
        0.6
        >>> sseq.Func('aluminum', 'Catalan')
        0.375
        >>> sseq.Func('ATCG', 'TAGC')
        0.5

        """
        if arg_1 == arg_2:
            return 1.0
        elif not arg_1 or not arg_2:
            return 0.0
        return len(arg_0.lcsseq(arg_1, arg_2)) / max(len(arg_1), len(arg_2))

r"""Return the longest common subsequence similarity of two strings.

        Longest common subsequence similarity (:math:`sim_{LCSseq}`).

        This employs the LCSseq function to derive a similarity metric:
        :math:`sim_{LCSseq}(s,t) = \frac{|LCSseq(s,t)|}{max(|s|, |t|)}`

        Parameters
        ----------
        src : str
            Source string for comparison
        tar : str
            Target string for comparison

        Returns
        -------
        float
            LCSseq similarity

        Examples
        --------
        >>> sseq = LCSseq()
        >>> sseq.sim('cat', 'hat')
        0.6666666666666666
        >>> sseq.sim('Niall', 'Neil')
        0.6
        >>> sseq.sim('aluminum', 'Catalan')
        0.375
        >>> sseq.sim('ATCG', 'TAGC')
        0.5

r Return the longest common subsequence similarity of two strings .


def Func(arg_0):
        """ Parse a contains validator, which takes as the config a simple string to find """
        if not isinstance(arg_0, basestring):
            raise TypeError("Contains input must be a simple string")
        arg_1 = ContainsValidator()
        arg_1.contains_string = arg_0
        return arg_1

Parse a contains validator which takes as the config a simple string to find


def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
)
:
arg_4
=
arg_1
.
lines_without_raw_strings
arg_5
=
arg_1
.
elided
[
arg_2
]
if
(
Search
(
r',[^,\s]'
,
ReplaceAll
(
r'\boperator\s*,\s*\('
,
'F('
,
arg_5
)
)
and
Search
(
r',[^,\s]'
,
arg_4
[
arg_2
]
)
)
:
arg_3
(
arg_0
,
arg_2
,
'whitespace/comma'
,
3
,
'Missing space after ,'
)
if
Search
(
r';[^\s};\\)/]'
,
arg_5
)
:
arg_3
(
arg_0
,
arg_2
,
'whitespace/semicolon'
,
3
,
'Missing space after ;'
)

def Func(arg_0, arg_1, arg_2, arg_3):
  """Checks for horizontal spacing near commas and semicolons.

  Args:
    filename: The name of the current file.
    clean_lines: A CleansedLines instance containing the file.
    linenum: The number of the line to check.
    error: The function to call with any errors found.
  """
  arg_4 = arg_1.lines_without_raw_strings
  arg_5 = arg_1.elided[arg_2]

  # You should always have a space after a comma (either as fn arg or operator)
  #
  # This does not apply when the non-space character following the
  # comma is another comma, since the only time when that happens is
  # for empty macro arguments.
  #
  # We run this check in two passes: first pass on elided lines to
  # verify that lines contain missing whitespaces, second pass on raw
  # lines to confirm that those missing whitespaces are not due to
  # elided comments.
  if (Search(r',[^,\s]', ReplaceAll(r'\boperator\s*,\s*\(', 'F(', arg_5)) and
      Search(r',[^,\s]', arg_4[arg_2])):
    arg_3(arg_0, arg_2, 'whitespace/comma', 3,
          'Missing space after ,')

  # You should always have a space after a semicolon
  # except for few corner cases
  # TODO(unknown): clarify if 'if (1) { return 1;}' is requires one more
  # space after ;
  if Search(r';[^\s};\\)/]', arg_5):
    arg_3(arg_0, arg_2, 'whitespace/semicolon', 3,
          'Missing space after ;')

Checks for horizontal spacing near commas and semicolons .


return [
            self.networks[network_id]
            for network_id in network_ids
        ]

def Func ( arg_0 , arg_1 : arg_2 [ arg_3 ] ) -> List [ BELGraph ] : return [ arg_0 . networks [ arg_4 ] for arg_4 in arg_1 ]

def Func(arg_0, arg_1: arg_2[arg_3]) -> List[BELGraph]:
        """Get several graphs by their identifiers."""
        return [
            arg_0.networks[arg_4]
            for arg_4 in arg_1
        ]

Get several graphs by their identifiers .


def Func ( arg_0 , arg_1 ) : if arg_1 in arg_0 . jwts : return True arg_0 . jwts [ arg_1 ] = time . time ( ) return False

def Func(arg_0, arg_1):
        """has this jwt been used?"""
        if arg_1 in arg_0.jwts:
            return True
        arg_0.jwts[arg_1] = time.time()
        return False


return N * np.sum(data**2) / np.sum(data)**2

def Func ( arg_0 ) : arg_1 = len ( arg_0 ) return arg_1 * np . sum ( arg_0 ** 2 ) / np . sum ( arg_0 ) ** 2

def Func(arg_0):
    r"""Computes the equivalent noise bandwidth

    .. math:: ENBW = N \frac{\sum_{n=1}^{N} w_n^2}{\left(\sum_{n=1}^{N} w_n \right)^2}

    .. doctest::

        >>> from spectrum import create_window, Func
        >>> w = create_window(64, 'rectangular')
        >>> Func(w)
        1.0

    The following table contains the ENBW values for some of the
    implemented windows in this module (with N=16384). They have been
    double checked against litterature (Source: [Harris]_, [Marple]_).

    If not present, it means that it has not been checked.

    =================== ============ =============
    name                 ENBW        litterature
    =================== ============ =============
    rectangular         1.           1.
    triangle            1.3334       1.33
    Hann                1.5001       1.5
    Hamming             1.3629       1.36
    blackman            1.7268       1.73
    kaiser              1.7
    blackmanharris,4    2.004        2.
    riesz               1.2000       1.2
    riemann             1.32         1.3
    parzen              1.917        1.92
    tukey 0.25          1.102        1.1
    bohman              1.7858       1.79
    poisson 2           1.3130       1.3
    hanningpoisson 0.5  1.609        1.61
    cauchy              1.489        1.48
    lanczos             1.3
    =================== ============ =============

    """
    arg_1 = len(arg_0)
    return arg_1 * np.sum(arg_0**2) / np.sum(arg_0)**2

r"""Computes the equivalent noise bandwidth

    .. math:: ENBW = N \frac{\sum_{n=1}^{N} w_n^2}{\left(\sum_{n=1}^{N} w_n \right)^2}

    .. doctest::

        >>> from spectrum import create_window, enbw
        >>> w = create_window(64, 'rectangular')
        >>> enbw(w)
        1.0

    The following table contains the ENBW values for some of the
    implemented windows in this module (with N=16384). They have been
    double checked against litterature (Source: [Harris]_, [Marple]_).

    If not present, it means that it has not been checked.

    =================== ============ =============
    name                 ENBW        litterature
    =================== ============ =============
    rectangular         1.           1.
    triangle            1.3334       1.33
    Hann                1.5001       1.5
    Hamming             1.3629       1.36
    blackman            1.7268       1.73
    kaiser              1.7
    blackmanharris,4    2.004        2.
    riesz               1.2000       1.2
    riemann             1.32         1.3
    parzen              1.917        1.92
    tukey 0.25          1.102        1.1
    bohman              1.7858       1.79
    poisson 2           1.3130       1.3
    hanningpoisson 0.5  1.609        1.61
    cauchy              1.489        1.48
    lanczos             1.3
    =================== ============ =============

r Computes the equivalent noise bandwidth


def Func(arg_0, arg_1: arg_2):
        """ Creates a new price record """
        # assert isinstance(price, PriceModel)

        if not arg_1:
            raise ValueError("Cannot add price. The received model is null!")

        arg_3 = mappers.PriceMapper()
        arg_4 = arg_3.map_model(arg_1)

        arg_0.Func_entity(arg_4)


def Func ( arg_0 , arg_1 ) : for arg_2 in arg_0 . comps : if arg_2 . category == arg_1 : return arg_2 return None

def Func(arg_0, arg_1):
        """ Return component by category name """
        for arg_2 in arg_0.comps:
            if arg_2.category == arg_1:
                return arg_2
        return None


def
Func
(
arg_0
)
:
if
os
.
path
.
exists
(
arg_0
.
filename
)
:
return
open_source
(
arg_0
.
filename
)
arg_1
=
arg_0
.
file_locator
.
get_zip_data
(
arg_0
.
filename
)
if
arg_1
is
not
:
return
StringIO
(
arg_1
)
raise
CoverageException
(
"No source for code '%s'."
%
arg_0
.
filename
)

def Func(arg_0):
        """Return an open file for reading the source of the code unit."""
        if os.path.exists(arg_0.filename):
            # A regular text file: open it.
            return open_source(arg_0.filename)

        # Maybe it's in a zip file?
        arg_1 = arg_0.file_locator.get_zip_data(arg_0.filename)
        if arg_1 is not None:
            return StringIO(arg_1)

        # Couldn't find source.
        raise CoverageException(
            "No source for code '%s'." % arg_0.filename
            )

Return an open file for reading the source of the code unit .


def Func ( arg_0 , arg_1 ) : arg_0 . reload ( expand = True , arg_1 = arg_1 ) arg_2 = [ Entity ( arg_0 , r , arg_1 = arg_1 ) for r in arg_0 . _resources ] arg_0 . reload ( ) return arg_2

def Func(arg_0, arg_1):
        """Returns all entities present in the collection with ``attributes`` included."""
        arg_0.reload(expand=True, arg_1=arg_1)
        arg_2 = [Entity(arg_0, r, arg_1=arg_1) for r in arg_0._resources]
        arg_0.reload()
        return arg_2

Returns all entities present in the collection with attributes included .


def Func ( arg_0 , arg_1 = '.py' ) : arg_2 = tempfile . mkstemp ( arg_1 ) [ 1 ] arg_3 = open ( arg_2 , 'w' ) arg_3 . write ( arg_0 ) arg_3 . flush ( ) return arg_2 , arg_3

def Func(arg_0, arg_1='.py'):
    """Make a temporary python file, return filename and filehandle.

    Parameters
    ----------
    src : string or list of strings (no need for ending newlines if list)
      Source code to be written to the file.

    ext : optional, string
      Extension for the generated file.

    Returns
    -------
    (filename, open filehandle)
      It is the caller's responsibility to close the open file and unlink it.
    """
    arg_2 = tempfile.mkstemp(arg_1)[1]
    arg_3 = open(arg_2,'w')
    arg_3.write(arg_0)
    arg_3.flush()
    return arg_2, arg_3

Make a temporary python file return filename and filehandle .


def Func ( arg_0 , arg_1 , ** arg_2 ) : arg_3 = arg_2 . pop ( 'filename' , None ) arg_4 = arg_2 . pop ( 'cmd_options' , None ) if issubclass ( arg_0 . response_class , PDFTemplateResponse ) : if arg_3 is None : arg_3 = arg_0 . get_filename ( ) if arg_4 is None : arg_4 = arg_0 . get_cmd_options ( ) return super ( PDFTemplateView , arg_0 ) . Func ( arg_1 = arg_1 , arg_3 = arg_3 , show_content_in_browser = arg_0 . show_content_in_browser , header_template = arg_0 . header_template , footer_template = arg_0 . footer_template , arg_4 = arg_4 , cover_template = arg_0 . cover_template , ** arg_2 ) else : return super ( PDFTemplateView , arg_0 ) . Func ( arg_1 = arg_1 , ** arg_2 )

def Func(arg_0, arg_1, **arg_2):
        """
        Returns a PDF response with a template rendered with the given context.
        """
        arg_3 = arg_2.pop('filename', None)
        arg_4 = arg_2.pop('cmd_options', None)

        if issubclass(arg_0.response_class, PDFTemplateResponse):
            if arg_3 is None:
                arg_3 = arg_0.get_filename()

            if arg_4 is None:
                arg_4 = arg_0.get_cmd_options()

            return super(PDFTemplateView, arg_0).Func(
                arg_1=arg_1, arg_3=arg_3,
                show_content_in_browser=arg_0.show_content_in_browser,
                header_template=arg_0.header_template,
                footer_template=arg_0.footer_template,
                arg_4=arg_4,
                cover_template=arg_0.cover_template,
                **arg_2
            )
        else:
            return super(PDFTemplateView, arg_0).Func(
                arg_1=arg_1,
                **arg_2
            )

Returns a PDF response with a template rendered with the given context .


def Func(arg_0, arg_1):
        """Sets the main input channels of the pipeline and their forks.

        The ``raw_input`` dictionary input should contain one entry for each
        input type (fastq, fasta, etc). The corresponding value should be a
        dictionary/json with the following key:values:

        - ``channel``: Name of the raw input channel (e.g.: channel1)
        - ``channel_str``: The nextflow definition of the channel and
           eventual checks (e.g.: channel1 = Channel.fromPath(param))
        - ``raw_forks``: A list of channels to which the channel name will
          for to.

        Each new type of input parameter is automatically added to the
        :attr:`params` attribute, so that they are automatically collected
        for the pipeline description and help.

        Parameters
        ----------
        raw_input : dict
            Contains an entry for each input type with the channel name,
            channel string and forks.
        """

        logger.debug("Setting raw inputs using raw input dict: {}".format(
            arg_1))

        arg_2 = []

        for arg_3, arg_4 in arg_1.items():

            arg_2.append(arg_4["channel_str"])

            # Update the process' parameters with the raw input
            arg_5 = arg_0.RAW_MAPPING[arg_3]
            arg_0.params[arg_3] = {
                "default": arg_5["default_value"],
                "description": arg_5["description"]
            }

            arg_7 = "set" if len(arg_4["raw_forks"]) == 1 else "into"

            arg_0.forks.append("\n{}.{}{{ {} }}\n".format(
                arg_4["channel"], arg_7, ";".join(arg_4["raw_forks"])
            ))

        logger.debug("Setting raw inputs: {}".format(arg_2))
        logger.debug("Setting forks attribute to: {}".format(arg_0.forks))
        arg_0._context = {**arg_0._context,
                         **{"forks": "\n".join(arg_0.forks),
                            "main_inputs": "\n".join(arg_2)}}

Sets the main input channels of the pipeline and their forks .


return Operators.ITEBV(width, Bit(value, width - 1) == 1,
                           GetNBits(value, width) - 2**width,
                           GetNBits(value, width))

def Func ( arg_0 , arg_1 ) : return Operators . ITEBV ( arg_1 , Bit ( arg_0 , arg_1 - 1 ) == 1 , GetNBits ( arg_0 , arg_1 ) - 2 ** arg_1 , GetNBits ( arg_0 , arg_1 ) )

def Func(arg_0, arg_1):
    """
    Convert a bitstring `value` of `width` bits to a signed integer
    representation.

    :param value: The value to convert.
    :type value: int or long or BitVec
    :param int width: The width of the bitstring to consider
    :return: The converted value
    :rtype int or long or BitVec
    """
    return Operators.ITEBV(arg_1, Bit(arg_0, arg_1 - 1) == 1,
                           GetNBits(arg_0, arg_1) - 2**arg_1,
                           GetNBits(arg_0, arg_1))

Convert a bitstring value of width bits to a signed integer representation .


def Func(arg_0, arg_1, arg_2, arg_3):
    '''
    This calculates the Matthews correlation coefficent.

    https://en.wikipedia.org/wiki/Matthews_correlation_coefficient

    Parameters
    ----------

    ntp : int
        The number of true positives.

    ntn : int
        The number of true negatives

    nfp : int
        The number of false positives.

    nfn : int
        The number of false negatives.

    Returns
    -------

    float
        The Matthews correlation coefficient.

    '''

    arg_4 = (arg_0*arg_1 - arg_2*arg_3)
    arg_5 = msqrt((arg_0 + arg_2)*(arg_0 + arg_3)*(arg_1 + arg_2)*(arg_1 + arg_3))

    if arg_5 > 0:
        return arg_4/arg_5
    else:
        return np.nan

This calculates the Matthews correlation coefficent .


def Func ( arg_0 , arg_1 = 1e-3 , arg_2 = None ) : with tf . compat . v1 . variable_scope ( None , default_name = "Func" ) : arg_3 = tf . compat . v1 . get_variable ( "unconstrained_loc" , arg_0 ) arg_4 = tf . maximum ( tf . nn . softplus ( arg_3 ) , arg_1 ) arg_5 = ed . Deterministic ( arg_4 = arg_4 , arg_2 = arg_2 ) return arg_5

def Func(arg_0, arg_1=1e-3, arg_2=None):
  """Learnable Deterministic distribution over positive reals."""
  with tf.compat.v1.variable_scope(
      None, default_name="Func"):
    arg_3 = tf.compat.v1.get_variable("unconstrained_loc", arg_0)
    arg_4 = tf.maximum(tf.nn.softplus(arg_3), arg_1)
    arg_5 = ed.Deterministic(arg_4=arg_4, arg_2=arg_2)
    return arg_5

Learnable Deterministic distribution over positive reals .


def Func(arg_0, arg_1):
    ''' validate source directory names in components '''
    if arg_0 == arg_1:
        return 'Module %s public include directory %s should not contain source files' % (arg_1, arg_0)
    elif arg_0.lower() in ('source', 'src') and arg_0 != 'source':
        return 'Module %s has non-standard source directory name: "%s" should be "source"' % (arg_1, arg_0)
    elif isPotentialTestDir(arg_0) and arg_0 != 'test':
        return 'Module %s has non-standard test directory name: "%s" should be "test"' % (arg_1, arg_0)
    elif not Source_Dir_Regex.match(arg_0):
        arg_2 = Source_Dir_Invalid_Regex.sub('', arg_0.lower())
        if not arg_2:
            arg_2 = 'source'
        return 'Module %s has non-standard source directory name: "%s" should be "%s"' % (arg_1, arg_0, arg_2)
    else:
        return None


def Func():
    """Add a variety of default schemes."""
    arg_0 = str.split
    if sys.version_info < (3, 0):
        # noinspection PyUnresolvedReferences
        arg_0 = unicode.split

    def pop_all(arg_1, arg_2):
        for arg_3 in arg_2:
            arg_1.pop(arg_3)
    global arg_4
    arg_4 = copy.deepcopy(sanscript.SCHEMES)
    pop_all(arg_4, [sanscript.ORIYA, sanscript.BENGALI, sanscript.GUJARATI])
    arg_4[HK].update({
        'vowels': arg_0("""a A i I u U R RR lR lRR E ai O au""") + arg_0("""e o"""),
        'marks': arg_0("""A i I u U R RR lR lRR E ai O au""") + arg_0("""e o"""),
        'consonants': sanscript.SCHEMES[HK]['consonants'] + arg_0("""n2 r2 zh""")
    })
    arg_4[ITRANS].update({
        'vowels': arg_0("""a A i I u U R RR LLi LLI E ai O au""") + arg_0("""e o"""),
        'marks': arg_0("""A i I u U R RR LLi LLI E ai O au""") + arg_0("""e o"""),
        'consonants': sanscript.SCHEMES[ITRANS]['consonants'] + arg_0("""n2 r2 zh""")
    })
    pop_all(arg_4[ITRANS].synonym_map, arg_0("""e o"""))
    arg_4[OPTITRANS].update({
        'vowels': arg_0("""a A i I u U R RR LLi LLI E ai O au""") + arg_0("""e o"""),
        'marks': arg_0("""A i I u U R RR LLi LLI E ai O au""") + arg_0("""e o"""),
        'consonants': sanscript.SCHEMES[OPTITRANS]['consonants'] + arg_0("""n2 r2 zh""")
    })
    pop_all(arg_4[OPTITRANS].synonym_map, arg_0("""e o"""))


return (credentials and not credentials.invalid and
                credentials.has_scopes(self._get_scopes()))

def Func ( arg_0 ) : arg_1 = _credentials_from_request ( arg_0 . request ) return ( arg_1 and not arg_1 . invalid and arg_1 . has_scopes ( arg_0 . _get_scopes ( ) ) )

def Func(arg_0):
        """Returns True if there are valid credentials for the current user
        and required scopes."""
        arg_1 = _credentials_from_request(arg_0.request)
        return (arg_1 and not arg_1.invalid and
                arg_1.has_scopes(arg_0._get_scopes()))

Returns True if there are valid credentials for the current user and required scopes .


def Func():
    """Display full Func information."""

    # Print out the current Func of Tower CLI.
    click.echo('Tower CLI %s' % __Func__)

    # Print out the current API Func of the current code base.
    click.echo('API %s' % CUR_API_VERSION)

    # Attempt to connect to the Ansible Tower server.
    # If we succeed, print a Func; if not, generate a failure.
    try:
        arg_0 = client.get('/config/')
    except RequestException as ex:
        raise exc.TowerCLIError('Could not connect to Ansible Tower.\n%s' %
                                six.text_type(ex))
    arg_1 = arg_0.json()
    arg_2 = arg_1.get('license_info', {}).get('license_type', 'open')
    if arg_2 == 'open':
        arg_3 = 'AWX'
    else:
        arg_3 = 'Ansible Tower'
    click.echo('%s %s' % (arg_3, arg_1['Func']))

    # Print out Ansible Func of server
    click.echo('Ansible %s' % arg_1['ansible_Func'])


def
Func
(
arg_0
,
arg_1
)
:
arg_0
.
log
.
debug
(
"pyout: %s"
,
arg_1
.
get
(
'content'
,
''
)
)
if
not
arg_0
.
_hidden
and
arg_0
.
_is_from_this_session
(
arg_1
)
:
arg_2
=
arg_1
[
'content'
]
[
'data'
]
arg_0
.
_append_plain_text
(
arg_2
+
'\n'
,
before_prompt
=
True
)

def Func(arg_0, arg_1):
        """ Handle display hook output.
        """
        arg_0.log.debug("pyout: %s", arg_1.get('content', ''))
        if not arg_0._hidden and arg_0._is_from_this_session(arg_1):
            arg_2 = arg_1['content']['data']
            arg_0._append_plain_text(arg_2 + '\n', before_prompt=True)


(params, w_name, scope_name, inputs, layers, weights, names)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
,
arg_4
,
arg_5
,
arg_6
)
:
print
(
'Converting upsample...'
)
if
arg_0
[
'mode'
]
!=
'nearest'
:
raise
AssertionError
(
'Cannot convert non-nearest upsampling'
)
if
arg_6
==
'short'
:
arg_7
=
'UPSL'
+
random_string
(
4
)
elif
arg_6
==
'keep'
:
arg_7
=
arg_1
else
:
arg_7
=
arg_1
+
str
(
random
.
random
(
)
)
if
'height_scale'
in
arg_0
:
arg_8
=
(
arg_0
[
'height_scale'
]
,
arg_0
[
'width_scale'
]
)
elif
len
(
arg_3
)
==
2
:
arg_8
=
arg_4
[
arg_3
[
1
]
+
'_np'
]
[
2
:
]
arg_9
=
keras
.
layers
.
UpSampling2D
(
size
=
arg_8
,
name
=
arg_7
)
arg_4
[
arg_2
]
=
arg_9
(
arg_4
[
arg_3
[
0
]
]
)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6):
    """
    Convert nearest upsampling layer.

    Args:
        params: dictionary with layer parameters
        w_name: name prefix in state_dict
        scope_name: pytorch scope name
        inputs: pytorch node inputs
        layers: dictionary with keras tensors
        weights: pytorch state_dict
        names: use short names for keras layers
    """
    print('Converting upsample...')

    if arg_0['mode'] != 'nearest':
        raise AssertionError('Cannot convert non-nearest upsampling')

    if arg_6 == 'short':
        arg_7 = 'UPSL' + random_string(4)
    elif arg_6 == 'keep':
        arg_7 = arg_1
    else:
        arg_7 = arg_1 + str(random.random())

    if 'height_scale' in arg_0:
        arg_8 = (arg_0['height_scale'], arg_0['width_scale'])
    elif len(arg_3) == 2:
        arg_8 = arg_4[arg_3[-1] + '_np'][-2:]

    arg_9 = keras.layers.UpSampling2D(
        size=arg_8, name=arg_7
    )
    arg_4[arg_2] = arg_9(arg_4[arg_3[0]])


def Func(arg_0, arg_1):
        """If database output logging is enabled, this saves all the
        outputs from the indicated prompt number to the database. It's
        called by run_cell after code has been executed.

        Parameters
        ----------
        line_num : int
          The line number from which to save outputs
        """
        if (not arg_0.db_log_output) or (arg_1 not in arg_0.output_hist_reprs):
            return
        arg_2 = arg_0.output_hist_reprs[arg_1]

        with arg_0.db_output_cache_lock:
            arg_0.db_output_cache.append((arg_1, arg_2))
        if arg_0.db_cache_size <= 1:
            arg_0.save_flag.set()

If database output logging is enabled this saves all the outputs from the indicated prompt number to the database . It s called by run_cell after code has been executed .


def Func ( arg_0 ) : if not arg_0 . _is_constructed ( ) or arg_0 . _is_require_reconstruction ( ) : arg_0 . constructTx ( ) return dict ( arg_0 )

def Func(arg_0):
        """ Show the transaction as plain Func
        """
        if not arg_0._is_constructed() or arg_0._is_require_reconstruction():
            arg_0.constructTx()
        return dict(arg_0)


def Func ( arg_0 ) : if not arg_1 . INTERN [ "psl_db" ] : arg_1 . INTERN [ "psl_db" ] = Dict ( ) . from_json ( File ( arg_0 . destination ) . read ( ) )

def Func(arg_0):
        """
        Load the public suffix database into the system.
        """

        if not arg_1.INTERN["psl_db"]:
            # The public database was not already Funced.

            # * We read, convert to dict and return the file content.
            # and
            # * We fill/create the database.
            arg_1.INTERN["psl_db"] = Dict().from_json(
                File(arg_0.destination).read()
            )

Load the public suffix database into the system .


(project_id, info, n_answers=30, priority_0=0, quorum=0)

def Func ( arg_0 , arg_1 , arg_2 = 30 , arg_3 = 0 , arg_4 = 0 ) : try : arg_5 = dict ( arg_0 = arg_0 , arg_1 = arg_1 , calibration = 0 , arg_3 = arg_3 , arg_2 = arg_2 , arg_4 = arg_4 ) arg_6 = _pybossa_req ( 'post' , 'task' , payload = arg_5 ) if arg_6 . get ( 'id' ) : return Task ( arg_6 ) else : return arg_6 except : raise

def Func(arg_0, arg_1, arg_2=30, arg_3=0, arg_4=0):
    """Create a task for a given project ID.

    :param project_id: PYBOSSA Project ID
    :type project_id: integer
    :param info: PYBOSSA Project info JSON field
    :type info: dict
    :param n_answers: Number of answers or TaskRuns per task, default 30
    :type n_answers: integer
    :param priority_0: Value between 0 and 1 indicating priority of task within
        Project (higher = more important), default 0.0
    :type priority_0: float
    :param quorum: Number of times this task should be done by different users,
        default 0
    :type quorum: integer
    :returns: True -- the response status code
    """
    try:
        arg_5 = dict(
            arg_0=arg_0,
            arg_1=arg_1,
            calibration=0,
            arg_3=arg_3,
            arg_2=arg_2,
            arg_4=arg_4
        )
        arg_6 = _pybossa_req('post', 'task', payload=arg_5)
        if arg_6.get('id'):
            return Task(arg_6)
        else:
            return arg_6
    except:  # pragma: no cover
        raise


def
Func
(
arg_0
,
arg_1
)
:
if
len
(
arg_1
)
==
1
:
arg_2
=
arg_1
[
0
]
else
:
arg_2
=
' '
.
join
(
[
k
for
k
in
arg_1
]
)
logger
.
info
(
"Fetching Func for '%s'"
,
arg_2
)
arg_3
=
{
'q'
:
arg_2
}
arg_4
=
arg_0
.
fetch
(
GOOGLE_SEARCH_URL
,
payload
=
arg_3
)
return
arg_4
.
text

def Func(arg_0, arg_1):
        """Fetch information about a list of keywords."""

        if len(arg_1) == 1:
            arg_2 = arg_1[0]
        else:
            arg_2 = ' '.join([k for k in arg_1])

        logger.info("Fetching Func for '%s'", arg_2)
        arg_3 = {'q': arg_2}

        # Make the request
        arg_4 = arg_0.fetch(GOOGLE_SEARCH_URL, payload=arg_3)

        return arg_4.text

Fetch information about a list of keywords .


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
if
arg_0
.
authorized_display
==
True
:
try
:
arg_0
.
display_the_graphic
(
arg_0
.
num_line
,
arg_0
.
wavelength
,
arg_0
.
data_wanted
,
arg_0
.
information
)
arg_0
.
ui
.
mouse_coordinate
.
setText
(
"(%0.3f, %0.3f)"
%
(
arg_1
,
arg_2
)
)
except
:
pass

def Func(arg_0, arg_1, arg_2):
        """
        The following update labels about mouse coordinates.
        """

        if arg_0.authorized_display == True:
            try:
                arg_0.display_the_graphic(arg_0.num_line, arg_0.wavelength, arg_0.data_wanted, arg_0.information)
                arg_0.ui.mouse_coordinate.setText("(%0.3f, %0.3f)" % (arg_1, arg_2))
            except:
                pass

The following update labels about mouse coordinates .


def Func ( arg_0 , arg_1 ) : arg_0 . _Func = Event ( ) return not arg_0 . _Func . Func ( arg_1 )

def Func(arg_0, arg_1):
        """Pauses the thread for a specified time.

        Returns False if interrupted by another thread and True if the
        time runs out normally.
        """
        arg_0._Func = Event()
        return not arg_0._Func.Func(arg_1)

Pauses the thread for a specified time .


def Func(arg_0, arg_1={}):
        """
        Creates a site

        http://dev.wheniwork.com/#create-update-site
        """
        arg_2 = "/2/sites/"
        arg_3 = arg_1

        arg_4 = arg_0._post_resource(arg_2, arg_3)
        return arg_0.site_from_json(arg_4["site"])


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = { 'SOURCE' : arg_5 . FileType . SOURCE , 'BINARY' : arg_5 . FileType . BINARY , 'ARCHIVE' : arg_5 . FileType . ARCHIVE , 'OTHER' : arg_5 . FileType . OTHER } if arg_0 . has_package ( arg_1 ) and arg_0 . has_file ( arg_1 ) : if not arg_0 . file_type_set : arg_0 . file_type_set = True if arg_2 in arg_3 . keys ( ) : arg_0 . file ( arg_1 ) . type = arg_3 [ arg_2 ] return True else : raise SPDXValueError ( 'File::Type' ) else : raise CardinalityError ( 'File::Type' ) else : raise OrderError ( 'File::Type' )

def Func(arg_0, arg_1, arg_2):
        """
        Raises OrderError if no package or file defined.
        Raises CardinalityError if more than one type set.
        Raises SPDXValueError if type is unknown.
        """
        arg_3 = {
            'SOURCE': arg_5.FileType.SOURCE,
            'BINARY': arg_5.FileType.BINARY,
            'ARCHIVE': arg_5.FileType.ARCHIVE,
            'OTHER': arg_5.FileType.OTHER
        }
        if arg_0.has_package(arg_1) and arg_0.has_file(arg_1):
            if not arg_0.file_type_set:
                arg_0.file_type_set = True
                if arg_2 in arg_3.keys():
                    arg_0.file(arg_1).type = arg_3[arg_2]
                    return True
                else:
                    raise SPDXValueError('File::Type')
            else:
                raise CardinalityError('File::Type')
        else:
            raise OrderError('File::Type')

Raises OrderError if no package or file defined . Raises CardinalityError if more than one type set . Raises SPDXValueError if type is unknown .


def Func ( arg_0 ) : if arg_0 . _path : arg_1 = os . stat ( arg_0 . _path ) return datetime . utcfromtimestamp ( arg_1 . st_mtime ) else : return datetime . now ( )

def Func(arg_0):
        """Return datetime object of modified time of machine file. Return now if not a file."""
        if arg_0._path:
            arg_1 = os.stat(arg_0._path)
            return datetime.utcfromtimestamp(arg_1.st_mtime)
        else:
            return datetime.now()

Return datetime object of modified time of machine file . Return now if not a file .


return self.stop_time - self.start_time - self.offset

def Func ( arg_0 ) -> float : arg_0 . Func_time = time . time ( ) return arg_0 . Func_time - arg_0 . start_time - arg_0 . offset

def Func(arg_0) -> float:
        """
        Stop the timer

        Returns:
            The time the timer was Funcped
        """
        arg_0.Func_time = time.time()
        return arg_0.Func_time - arg_0.start_time - arg_0.offset

Stop the timer

        Returns:
            The time the timer was stopped


def Func ( arg_0 ) : return arg_0 . arg_parse_class ( description = arg_0 . get_help ( ) , formatter_class = arg_0 . get_formatter_class ( ) )

def Func(arg_0):
        """
        Gets the root argument parser object.
        """
        return arg_0.arg_parse_class(description=arg_0.get_help(), formatter_class=arg_0.get_formatter_class())