def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . handler . article ( arg_1 ) arg_3 = { 'number' : arg_2 [ 1 ] . number , 'message_id' : arg_2 [ 1 ] . message_id , 'lines' : arg_2 [ 1 ] . lines } return arg_3

def Func(arg_0, arg_1):
        """Fetch article data

        :param article_id: id of the article to fetch
        """
        arg_2 = arg_0.handler.article(arg_1)
        arg_3 = {
            'number': arg_2[1].number,
            'message_id': arg_2[1].message_id,
            'lines': arg_2[1].lines
        }

        return arg_3


def Func(arg_0, arg_1):
        """Flip a variable in the constraint.

        Args:
            v (variable):
                Variable in the constraint to take the complementary value of its
                construction value.

        Examples:
            This example creates a constraint that :math:`a = b` on binary variables
            and flips variable a.

            >>> import dwavebinarycsp
            >>> const = dwavebinarycsp.Constraint.from_func(operator.eq,
            ...             ['a', 'b'], dwavebinarycsp.BINARY)
            >>> const.check({'a': 0, 'b': 0})
            True
            >>> const.Func('a')
            >>> const.check({'a': 1, 'b': 0})
            True
            >>> const.check({'a': 0, 'b': 0})
            False

        """
        try:
            arg_2 = arg_0.variables.index(arg_1)
        except ValueError:
            raise ValueError("variable {} is not a variable in constraint {}".format(arg_1, arg_0.name))

        if arg_0.vartype is dimod.BINARY:

            arg_3 = arg_0.func

            def arg_6(*arg_4):
                arg_5 = list(arg_4)
                arg_5[arg_2] = 1 - arg_5[arg_2]  # negate v
                return arg_3(*arg_5)

            arg_0.func = arg_6

            arg_0.configurations = frozenset(config[:arg_2] + (1 - config[arg_2],) + config[arg_2 + 1:]
                                            for config in arg_0.configurations)

        else:  # SPIN

            arg_3 = arg_0.func

            def arg_6(*arg_4):
                arg_5 = list(arg_4)
                arg_5[arg_2] = -arg_5[arg_2]  # negate v
                return arg_3(*arg_5)

            arg_0.func = arg_6

            arg_0.configurations = frozenset(config[:arg_2] + (-config[arg_2],) + config[arg_2 + 1:]
                                            for config in arg_0.configurations)

        arg_0.name = '{} ({} flipped)'.format(arg_0.name, arg_1)

Flip a variable in the constraint.

        Args:
            v (variable):
                Variable in the constraint to take the complementary value of its
                construction value.

        Examples:
            This example creates a constraint that :math:`a = b` on binary variables
            and flips variable a.

            >>> import dwavebinarycsp
            >>> const = dwavebinarycsp.Constraint.from_func(operator.eq,
            ...             ['a', 'b'], dwavebinarycsp.BINARY)
            >>> const.check({'a': 0, 'b': 0})
            True
            >>> const.flip_variable('a')
            >>> const.check({'a': 1, 'b': 0})
            True
            >>> const.check({'a': 0, 'b': 0})
            False


def Func(arg_0='MD_POSRES', **arg_1):
    """Set up MD with position restraints.

    Additional itp files should be in the same directory as the top file.

    Many of the keyword arguments below already have sensible values. Note that
    setting *mainselection* = ``None`` will disable many of the automated
    choices and is often recommended when using your own mdp file.

    :Keywords:
       *dirname*
          set up under directory dirname [MD_POSRES]
       *struct*
          input structure (gro, pdb, ...) [em/em.pdb]
       *top*
          topology file [top/system.top]
       *mdp*
          mdp file (or use the template) [templates/md.mdp]
       *ndx*
          index file (supply when using a custom mdp)
       *includes*
          additional directories to search for itp files
       *mainselection*
          :program:`make_ndx` selection to select main group ["Protein"]
          (If ``None`` then no canonical index file is generated and
          it is the user's responsibility to set *tc_grps*,
          *tau_t*, and *ref_t* as keyword arguments, or provide the mdp template
          with all parameter pre-set in *mdp* and probably also your own *ndx*
          index file.)
       *deffnm*
          default filename for Gromacs run [md]
       *runtime*
          total length of the simulation in ps [1000]
       *dt*
          integration time step in ps [0.002]
       *qscript*
          script to submit to the queuing system; by default
          uses the template :data:`gromacs.config.qscript_template`, which can
          be manually set to another template from :data:`gromacs.config.templates`;
          can also be a list of template names.
       *qname*
          name to be used for the job in the queuing system [PR_GMX]
       *mdrun_opts*
          option flags for the :program:`mdrun` command in the queuing system
          scripts such as "-stepout 100". [""]
       *kwargs*
          remaining key/value pairs that should be changed in the template mdp
          file, eg ``nstxtcout=250, nstfout=250`` or command line options for
          ``grompp` such as ``maxwarn=1``.

          In particular one can also set **define** and activate
          whichever position restraints have been coded into the itp
          and top file. For instance one could have

             *define* = "-DPOSRES_MainChain -DPOSRES_LIGAND"

          if these preprocessor constructs exist. Note that there
          **must not be any space between "-D" and the value.**

          By default *define* is set to "-DPOSRES".

    :Returns: a dict that can be fed into :func:`gromacs.setup.MD`
              (but check, just in case, especially if you want to
              change the ``define`` parameter in the mdp file)

    .. Note:: The output frequency is drastically reduced for position
              restraint runs by default. Set the corresponding ``nst*``
              variables if you require more output. The `pressure coupling`_
              option *refcoord_scaling* is set to "com" by default (but can
              be changed via *kwargs*) and the pressure coupling
              algorithm itself is set to *Pcoupl* = "Berendsen" to
              run a stable simulation.

    .. _`pressure coupling`: http://manual.gromacs.org/online/mdp_opt.html#pc
    """

    logger.info("[{dirname!s}] Setting up MD with position restraints...".format(**vars()))
    arg_1.setdefault('struct', 'em/em.pdb')
    arg_1.setdefault('qname', 'PR_GMX')
    arg_1.setdefault('define', '-DPOSRES')
    # reduce size of output files
    arg_1.setdefault('nstxout', '50000')   # trr pos
    arg_1.setdefault('nstvout', '50000')   # trr veloc
    arg_1.setdefault('nstfout', '0')       # trr forces
    arg_1.setdefault('nstlog', '500')      # log file
    arg_1.setdefault('nstenergy', '2500')  # edr energy
    arg_1.setdefault('nstxtcout', '5000')  # xtc pos
    # try to get good pressure equilibration
    arg_1.setdefault('refcoord_scaling', 'com')
    arg_1.setdefault('Pcoupl', "Berendsen")

    arg_2 =  _setup_MD(arg_0, **arg_1)

    # clean up output kwargs
    arg_2.pop('define', None)          # but make sure that -DPOSRES does not stay...
    arg_2.pop('refcoord_scaling', None)
    arg_2.pop('Pcoupl', None)
    return arg_2


def Func(arg_0, arg_1, arg_2, arg_3):
    """
    For the given cell, find the segment with the largest number of active
    synapses. This routine is aggressive in finding the best match. The
    permanence value of synapses is allowed to be below connectedPerm. The number
    of active synapses is allowed to be below activationThreshold, but must be
    above minThreshold. The routine returns the segment index. If no segments are
    found, then an index of -1 is returned.

    :param c TODO: document
    :param i TODO: document
    :param activeState TODO: document
    """
    arg_4, arg_5 = arg_0.minThreshold, -1

    for arg_6, arg_7 in enumerate(arg_0.cells[arg_1][arg_2]):
      arg_8 = arg_0._getSegmentActivityLevel(arg_7, arg_3,
                                               connectedSynapsesOnly=False)

      if arg_8 >= arg_4:
        arg_4, arg_5 = arg_8, arg_6

    if arg_5 == -1:
      return None
    else:
      return arg_0.cells[arg_1][arg_2][arg_5]

For the given cell find the segment with the largest number of active synapses . This routine is aggressive in finding the best match . The permanence value of synapses is allowed to be below connectedPerm . The number of active synapses is allowed to be below activationThreshold but must be above minThreshold . The routine returns the segment index . If no segments are found then an index of - 1 is returned .


def Func ( arg_0 ) : if isinstance ( arg_0 , ( list , tuple ) ) : return list ( arg_0 ) , True return [ arg_0 ] , False

def Func(arg_0):
  """Converts the input arg to a list if it is not a list already.

  Args:
    tensor_or_list: A `Tensor` or a Python list of `Tensor`s. The argument to
      convert to a list of `Tensor`s.

  Returns:
    A tuple of two elements. The first is a Python list of `Tensor`s containing
    the original arguments. The second is a boolean indicating whether
    the original argument was a list or tuple already.
  """
  if isinstance(arg_0, (list, tuple)):
    return list(arg_0), True
  return [arg_0], False

Converts the input arg to a list if it is not a list already .


def
Func
(
arg_0
)
:
arg_1
=
"git branch"
arg_2
=
Command
(
arg_1
)
.
execute
(
)
for
arg_3
in
arg_2
.
split
(
"\n"
)
:
if
arg_3
.
startswith
(
"*"
)
and
"dev"
in
arg_3
:
return
True
return
False

def Func(arg_0):
        """
        Check if the current branch is `dev`.
        """

        # We initiate the command we have to run in order to
        # get the branch we are currently working with.
        arg_1 = "git branch"

        # We execute and get the command output.
        arg_2 = Command(arg_1).execute()

        for arg_3 in arg_2.split("\n"):
            # We loop through each line of the command output.

            if arg_3.startswith("*") and "dev" in arg_3:
                # The current branch is `dev`.

                # We return True.
                return True

        # The current branch is not `dev`.

        # We return False.
        return False


def Func():
    '''
    This is called when we're executed from the commandline.

    The current usage from the command-line is described below::

        usage: hatlc [-h] [--describe] hatlcfile

        read a HAT LC of any format and output to stdout

        positional arguments:
          hatlcfile   path to the light curve you want to read and pipe to stdout

        optional arguments:
          -h, --help  show this help message and exit
          --describe  don't dump the columns, show only object info and LC metadata

    '''

    # handle SIGPIPE sent by less, head, et al.
    import signal
    signal.signal(signal.SIGPIPE, signal.SIG_DFL)
    import argparse

    arg_0 = argparse.ArgumentParser(
        description='read a HAT LC of any format and output to stdout'
    )

    arg_0.add_argument(
        'hatlcfile',
        action='store',
        type=str,
        help=("path to the light curve you want to read and pipe to stdout")
    )

    arg_0.add_argument(
        '--describe',
        action='store_true',
        default=False,
        help=("don't dump the columns, show only object info and LC metadata")
    )

    arg_1 = arg_0.parse_args()
    arg_2 = arg_1.hatlcfile

    if not os.path.exists(arg_2):
        LOGERROR("file provided: %s doesn't seem to exist" % arg_2)
        sys.exit(1)

    # figure out the type of LC this is
    arg_3 = os.path.basename(arg_2)

    # switch based on filetype
    if arg_3.endswith('-hatlc.csv.gz') or arg_3.endswith('-csvlc.gz'):

        if arg_1.describe:

            describe(read_csvlc(arg_3))
            sys.exit(0)

        else:

            with gzip.open(arg_3,'rb') as infd:
                for arg_4 in infd:
                    print(arg_4.decode(),end='')

    elif arg_3.endswith('-hatlc.sqlite.gz'):

        arg_5, arg_6 = read_and_filter_sqlitecurve(arg_2)

        # dump the description
        describe(arg_5, offsetwith='#')

        # stop here if describe is True
        if arg_1.describe:
            sys.exit(0)

        # otherwise, continue to parse the cols, etc.

        # get the aperture names
        arg_7 = sorted(arg_5['lcapertures'].keys())

        # update column defs per aperture
        for arg_8 in arg_7:
            COLUMNDEFS.update({'%s_%s' % (arg_9, arg_8): COLUMNDEFS[arg_9] for arg_9 in
                               LC_MAG_COLUMNS})
            COLUMNDEFS.update({'%s_%s' % (arg_9, arg_8): COLUMNDEFS[arg_9] for arg_9 in
                               LC_ERR_COLUMNS})
            COLUMNDEFS.update({'%s_%s' % (arg_9, arg_8): COLUMNDEFS[arg_9] for arg_9 in
                               LC_FLAG_COLUMNS})

        arg_10 = ','.join([COLUMNDEFS[arg_9][1] for arg_9 in arg_5['columns']])
        arg_11 = arg_5['objectinfo']['ndet']

        for arg_12 in range(arg_11):
            arg_4 = [arg_5[arg_9][arg_12] for arg_9 in arg_5['columns']]
            arg_13 = arg_10 % tuple(arg_4)
            print(arg_13)

    else:

        LOGERROR('unrecognized HATLC file: %s' % arg_2)
        sys.exit(1)

This is called when we re executed from the commandline .


def Func ( arg_0 ) : arg_1 = OrderedDict ( [ ( "outfiles" , arg_0 . __dict__ [ "outfiles" ] ) , ( "stats_files" , dict ( arg_0 . __dict__ [ "stats_files" ] ) ) , ( "stats_dfs" , arg_0 . __dict__ [ "stats_dfs" ] ) ] )

def Func(arg_0):
    """ save to json."""

    ## convert everything to dicts
    ## skip _ipcluster cuz it's made new.
    arg_1 = OrderedDict([
        ("outfiles", arg_0.__dict__["outfiles"]),
        ("stats_files", dict(arg_0.__dict__["stats_files"])),
        ("stats_dfs", arg_0.__dict__["stats_dfs"])
        ])


(stanza_processor, target_jid, callback,
                                                    error_callback = None)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
=
)
:
arg_4
=
Iq
(
to_jid
=
arg_1
,
stanza_type
=
"get"
)
arg_5
=
VersionPayload
(
)
arg_4
.
set_payload
(
arg_5
)
def
wrapper
(
arg_4
)
:
arg_5
=
arg_4
.
get_payload
(
VersionPayload
)
if
arg_5
is
:
if
arg_3
:
arg_3
(
arg_4
)
else
:
logger
.
warning
(
"Invalid version query response."
)
else
:
arg_2
(
arg_5
)
arg_0
.
set_response_handlers
(
arg_4
,
wrapper
,
arg_3
)
arg_0
.
send
(
arg_4
)

def Func(arg_0, arg_1, arg_2,
                                                    arg_3 = None):
    """Request software version information from a remote entity.

    When a valid response is received the `callback` will be handled
    with a `VersionPayload` instance as its only argument. The object will
    provide the requested infromation.

    In case of error stanza received or invalid response the `error_callback`
    (if provided) will be called with the offending stanza (which can
    be ``<iq type='error'/>`` or ``<iq type='result'>``) as its argument.

    The same function will be called on timeout, with the argument set to
    `None`.

    :Parameters:
        - `stanza_processor`: a object used to send the query and handle
          response. E.g. a `pyxmpp2.client.Client` instance
        - `target_jid`: the JID of the entity to query
        - `callback`: function to be called with a valid response
        - `error_callback`: function to be called on error
    :Types:
        - `stanza_processor`: `StanzaProcessor`
        - `target_jid`: `JID`
    """
    arg_4 = Iq(to_jid = arg_1, stanza_type = "get")
    arg_5 = VersionPayload()
    arg_4.set_payload(arg_5)
    def wrapper(arg_4):
        """Wrapper for the user-provided `callback` that extracts the payload
        from stanza received."""
        arg_5 = arg_4.get_payload(VersionPayload)
        if arg_5 is None:
            if arg_3:
                arg_3(arg_4)
            else:
                logger.warning("Invalid version query response.")
        else:
            arg_2(arg_5)
    arg_0.set_response_handlers(arg_4, wrapper, arg_3)
    arg_0.send(arg_4)

Request software version information from a remote entity .


def Func ( arg_0 , arg_1 ) : arg_2 = hashlib . sha256 ( bytes ( arg_1 , "ascii" ) ) . hexdigest ( ) return arg_2 [ : 4 ]

def Func(arg_0, arg_1):
        """ Derive the checksum

            :param str s: Random string for which to derive the checksum
        """
        arg_2 = hashlib.sha256(bytes(arg_1, "ascii")).hexdigest()
        return arg_2[:4]


def Func ( arg_0 ) : arg_0 . td = arg_0 . t . start ( arg_0 . inter ) if arg_0 . use_ssh and arg_0 . ssh_connector : arg_0 . ssh_client . connect ( )

def Func(arg_0):
        """Starts the timer for this source"""
        arg_0.td = arg_0.t.start(arg_0.inter)

        if arg_0.use_ssh and arg_0.ssh_connector:
            arg_0.ssh_client.connect()


(self, raw_data, data_type_id, name, description)

return self._upload(raw_data, data_type_id, name, description)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
        """
        Upload already serialized raw data as a new dataset.

        Parameters
        ----------
        raw_data: bytes
            Dataset contents to upload.
        data_type_id : str
            Serialization format of the raw data.
            Supported formats are:
                'PlainText'
                'GenericCSV'
                'GenericTSV'
                'GenericCSVNoHeader'
                'GenericTSVNoHeader'
                'ARFF'
            See the azureml.DataTypeIds class for constants.
        name : str
            Name for the new dataset.
        description : str
            Description for the new dataset.

        Returns
        -------
        SourceDataset
            Dataset that was just created.
            Use open(), read_as_binary(), read_as_text() or to_dataframe() on
            the dataset object to get its contents as a stream, bytes, str or
            pandas DataFrame.
        """
        _not_none('raw_data', arg_1)
        _not_none_or_empty('data_type_id', arg_2)
        _not_none_or_empty('name', arg_3)
        _not_none_or_empty('description', arg_4)

        return arg_0._upload(arg_1, arg_2, arg_3, arg_4)

Upload already serialized raw data as a new dataset .


def Func ( arg_0 , arg_1 ) : arg_2 = [ Counter ( col ) for col in arg_0 . T if not ( "-" in col or "N" in col ) ] arg_3 = [ i . most_common ( 2 ) [ 1 ] [ 1 ] > 1 for i in arg_2 if len ( i . most_common ( 2 ) ) > 1 ] if sum ( arg_3 ) >= arg_1 : return sum ( arg_3 ) else : return 0

def Func(arg_0, arg_1):
    """ filters for loci with >= N PIS """
    arg_2 = [Counter(col) for col in arg_0.T if not ("-" in col or "N" in col)]
    arg_3 = [i.most_common(2)[1][1] > 1 for i in arg_2 if len(i.most_common(2))>1]
    if sum(arg_3) >= arg_1:
        return sum(arg_3)
    else:
        return 0


def Func ( arg_0 , arg_1 , arg_2 = None ) : if arg_2 is None : arg_2 = arg_0 . analytes if 'Funcd' not in arg_0 . data . keys ( ) : arg_0 . data [ 'Funcd' ] = Bunch ( ) for arg_4 in arg_2 : arg_5 = arg_1 [ arg_4 ] [ 'm' ] . new ( arg_0 . uTime ) if 'c' in arg_1 [ arg_4 ] : arg_6 = arg_1 [ arg_4 ] [ 'c' ] . new ( arg_0 . uTime ) else : arg_6 = 0 arg_0 . data [ 'Funcd' ] [ arg_4 ] = arg_0 . data [ 'ratios' ] [ arg_4 ] * arg_5 + arg_6 if arg_0 . internal_standard not in arg_2 : arg_0 . data [ 'Funcd' ] [ arg_0 . internal_standard ] = np . empty ( len ( arg_0 . data [ 'ratios' ] [ arg_0 . internal_standard ] ) ) arg_0 . setfocus ( 'Funcd' ) return

def Func(arg_0, arg_1, arg_2=None):
        """
        Apply calibration to data.

        The `calib_dict` must be calculated at the `analyse` level,
        and passed to this Func function.

        Parameters
        ----------
        calib_dict : dict
            A dict of calibration values to apply to each analyte.

        Returns
        -------
        None
        """
        # can have calibration function stored in self and pass *coefs?
        if arg_2 is None:
            arg_2 = arg_0.analytes

        if 'Funcd' not in arg_0.data.keys():
            arg_0.data['Funcd'] = Bunch()

        for arg_4 in arg_2:
            arg_5 = arg_1[arg_4]['m'].new(arg_0.uTime)

            if 'c' in arg_1[arg_4]:
                arg_6 = arg_1[arg_4]['c'].new(arg_0.uTime)
            else:
                arg_6 = 0

            arg_0.data['Funcd'][arg_4] = arg_0.data['ratios'][arg_4] * arg_5 + arg_6

        if arg_0.internal_standard not in arg_2:
            arg_0.data['Funcd'][arg_0.internal_standard] = \
                np.empty(len(arg_0.data['ratios'][arg_0.internal_standard]))

        arg_0.setfocus('Funcd')
        return

Apply calibration to data.

        The `calib_dict` must be calculated at the `analyse` level,
        and passed to this calibrate function.

        Parameters
        ----------
        calib_dict : dict
            A dict of calibration values to apply to each analyte.

        Returns
        -------
        None


def Func ( arg_0 , arg_1 , arg_2 ) : arg_0 . assert_package_exists ( ) if not arg_0 . package_source_info_set : arg_0 . package_source_info_set = True if validations . validate_pkg_src_info ( arg_2 ) : arg_1 . package . source_info = str_from_text ( arg_2 ) return True else : raise SPDXValueError ( 'Pacckage::SourceInfo' ) else : raise CardinalityError ( 'Package::SourceInfo' )

def Func(arg_0, arg_1, arg_2):
        """Sets the package's source information, if not already set.
        text - Free form text.
        Raises CardinalityError if already defined.
        Raises OrderError if no package previously defined.
        SPDXValueError if text is not free form text.
        """
        arg_0.assert_package_exists()
        if not arg_0.package_source_info_set:
            arg_0.package_source_info_set = True
            if validations.validate_pkg_src_info(arg_2):
                arg_1.package.source_info = str_from_text(arg_2)
                return True
            else:
                raise SPDXValueError('Pacckage::SourceInfo')
        else:
            raise CardinalityError('Package::SourceInfo')

Sets the package s source information if not already set . text - Free form text . Raises CardinalityError if already defined . Raises OrderError if no package previously defined . SPDXValueError if text is not free form text .


def Func(arg_0, arg_1, arg_2, arg_3):
        """Returns the pth partition of q partitions of seq."""

        # Test for error conditions here
        if arg_2<0 or arg_2>=arg_3:
          print "No partition exists."
          return

        arg_4 = len(arg_1)%arg_3
        arg_5 = len(arg_1)//arg_3
        arg_6 = []
        arg_7 = []
        for arg_8 in range(arg_3):
            if arg_8 < arg_4:
                arg_7.append(arg_8 * (arg_5 + 1))
                arg_6.append(arg_7[-1] + arg_5 + 1)
            else:
                arg_7.append(arg_8*arg_5 + arg_4)
                arg_6.append(arg_7[-1] + arg_5)

        try:
            arg_9 = arg_1[arg_7[arg_2]:arg_6[arg_2]]
        except TypeError:
            # some objects (iterators) can't be sliced,
            # use islice:
            arg_9 = list(islice(arg_1, arg_7[arg_2], arg_6[arg_2]))

        return arg_9

Returns the pth partition of q partitions of seq .


(self, category_id, country=None, locale=None)

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None ) : arg_4 = Route ( 'GET' , '/browse/categories/{Func_id}' , arg_1 = arg_1 ) arg_5 = { } if arg_2 : arg_5 [ 'country' ] = arg_2 if arg_3 : arg_5 [ 'locale' ] = arg_3 return arg_0 . request ( arg_4 , params = arg_5 )

def Func(arg_0, arg_1, arg_2=None, arg_3=None):
        """Get a single Func used to tag items in Spotify.

        Parameters
        ----------
        Func_id : str
            The Spotify Func ID for the Func.
        country : COUNTRY_TP
            COUNTRY
        locale : LOCALE_TP
            LOCALE
        """
        arg_4 = Route('GET', '/browse/categories/{Func_id}', arg_1=arg_1)
        arg_5 = {}

        if arg_2:
            arg_5['country'] = arg_2

        if arg_3:
            arg_5['locale'] = arg_3

        return arg_0.request(arg_4, params=arg_5)

Get a single category used to tag items in Spotify.

        Parameters
        ----------
        category_id : str
            The Spotify category ID for the category.
        country : COUNTRY_TP
            COUNTRY
        locale : LOCALE_TP
            LOCALE

Get a single category used to tag items in Spotify .


def Func ( arg_0 , arg_1 , ** arg_2 ) : if isinstance ( arg_1 , list ) : return map ( lambda val : arg_0 . Func ( val , ** arg_2 ) ) arg_3 = arg_2 . get ( 'decimal' ) arg_1 = arg_0 . parse ( arg_1 , arg_3 ) if check_type ( arg_2 , 'dict' ) : arg_2 = ( arg_0 . settings [ 'currency' ] . update ( arg_2 ) ) arg_4 = arg_0 . _check_currency_format ( arg_2 [ 'format' ] ) arg_5 = ( lambda num : arg_4 [ 'pos' ] if num > 0 else arg_4 [ 'neg' ] if num < 0 else arg_4 [ 'zero' ] ) ( arg_1 ) arg_6 = arg_0 . _change_precision ( arg_1 , arg_2 [ 'precision' ] ) arg_7 = arg_2 [ 'thousand' ] arg_3 = arg_2 [ 'decimal' ] arg_8 = arg_0 . format ( abs ( arg_1 ) , arg_6 , arg_7 , arg_3 ) arg_9 = arg_5 . replace ( '%s' , arg_2 [ 'symbol' ] ) . replace ( '%v' , arg_8 ) return arg_9

def Func(arg_0, arg_1, **arg_2):
        """Format a number into currency.

        Usage: accounting.formatMoney(number, symbol, precision, thousandsSep,
                                      decimalSep, format)
        defaults: (0, "$", 2, ",", ".", "%s%v")
        Localise by overriding the symbol, precision,
        thousand / decimal separators and format
        Second param can be an object matching `settings.currency`
        which is the easiest way.

        Args:
            number (TYPE): Description
            precision (TYPE): Description
            thousand (TYPE): Description
            decimal (TYPE): Description

        Returns:
            name (TYPE): Description
        """
        # Resursively format arrays
        if isinstance(arg_1, list):
            return map(lambda val: arg_0.Func(val, **arg_2))

        # Clean up number
        arg_3 = arg_2.get('decimal')
        arg_1 = arg_0.parse(arg_1, arg_3)

        # Build options object from second param (if object) or all params,
        # extending defaults
        if check_type(arg_2, 'dict'):
            arg_2 = (arg_0.settings['currency'].update(arg_2))

        # Check format (returns object with pos, neg and zero)
        arg_4 = arg_0._check_currency_format(arg_2['format'])

        # Choose which format to use for this value
        arg_5 = (lambda num: arg_4['pos'] if num > 0 else arg_4[
                      'neg'] if num < 0 else arg_4['zero'])(arg_1)
        arg_6 = arg_0._change_precision(arg_1, arg_2['precision'])
        arg_7 = arg_2['thousand']
        arg_3 = arg_2['decimal']
        arg_8 = arg_0.format(abs(arg_1), arg_6, arg_7, arg_3)

        # Return with currency symbol added
        arg_9 = arg_5.replace(
            '%s', arg_2['symbol']).replace('%v', arg_8)

        return arg_9


return self._get_success_json(self._post_json(
            'v1/datasets/get-available-columns', data, failure_message=failure_message))['data']

def Func(arg_0, arg_1):
        """
        Retrieves the set of columns from the combination of dataset ids given

        :param dataset_ids: The id of the dataset to retrieve columns from
        :type dataset_ids: list of int
        :return: A list of column names from the dataset ids given.
        :rtype: list of str
        """
        if not isinstance(arg_1, list):
            arg_1 = [arg_1]

        arg_2 = {
            "dataset_ids":
                arg_1
        }

        arg_3 = "Failed to get available columns in dataset(s) {}".format(arg_1)

        return arg_0._get_success_json(arg_0._post_json(
            'v1/datasets/get-available-columns', arg_2, arg_3=arg_3))['data']


return H2OFrame._expr(expr=ExprNode("which.max", self, skipna, axis))

def Func ( arg_0 , arg_1 = True , arg_2 = 0 ) : return H2OFrame . _expr ( expr = ExprNode ( "which.max" , arg_0 , arg_1 , arg_2 ) )

def Func(arg_0,arg_1=True, arg_2=0):
        """
        Get the index of the max value in a column or row

        :param bool skipna: If True (default), then NAs are ignored during the search. Otherwise presence
            of NAs renders the entire result NA.
        :param int axis: Direction of finding the max index. If 0 (default), then the max index is searched columnwise, and the
            result is a frame with 1 row and number of columns as in the original frame. If 1, then the max index is searched
            rowwise and the result is a frame with 1 column, and number of rows equal to the number of rows in the original frame.
        :returns: either a list of max index values per-column or an H2OFrame containing max index values
                  per-row from the original frame.
        """
        return H2OFrame._expr(expr=ExprNode("which.max", arg_0, arg_1, arg_2))


return pre, esc or '', ifun.strip(), the_rest.lstrip()

def Func ( arg_0 , arg_1 = None ) : arg_2 = get_stream_enc ( sys . stdin , 'utf-8' ) arg_0 = py3compat . cast_unicode ( arg_0 , arg_2 ) if arg_1 is None : arg_1 = line_split arg_3 = arg_1 . match ( arg_0 ) if not arg_3 : try : arg_4 , arg_5 = arg_0 . split ( None , 1 ) except ValueError : arg_4 , arg_5 = arg_0 , u'' arg_6 = re . match ( '^(\s*)(.*)' , arg_0 ) . groups ( ) [ 0 ] arg_7 = "" else : arg_6 , arg_7 , arg_4 , arg_5 = arg_3 . groups ( ) return arg_6 , arg_7 or '' , arg_4 . strip ( ) , arg_5 . lstrip ( )

def Func(arg_0, arg_1=None):
    """Split user input into initial whitespace, escape character, function part
    and the rest.
    """
    # We need to ensure that the rest of this routine deals only with unicode
    arg_2 = get_stream_enc(sys.stdin, 'utf-8')
    arg_0 = py3compat.cast_unicode(arg_0, arg_2)

    if arg_1 is None:
        arg_1 = line_split
    arg_3 = arg_1.match(arg_0)
    if not arg_3:
        # print "match failed for line '%s'" % line
        try:
            arg_4, arg_5 = arg_0.split(None,1)
        except ValueError:
            # print "split failed for line '%s'" % line
            arg_4, arg_5 = arg_0, u''
        arg_6 = re.match('^(\s*)(.*)',arg_0).groups()[0]
        arg_7 = ""
    else:
        arg_6, arg_7, arg_4, arg_5 = arg_3.groups()

    #print 'line:<%s>' % line # dbg
    #print 'pre <%s> ifun <%s> rest <%s>' % (pre,ifun.strip(),the_rest) # dbg
    return arg_6, arg_7 or '', arg_4.strip(), arg_5.lstrip()

Split user input into initial whitespace escape character function part and the rest .


def Func():
    """
    Will check the mac_username config value; if it is present, will load that user's
    SSH_AUTH_SOCK environment variable to the current environment.  This allows git clones
    to behave the same for the daemon as they do for the user
    """

    arg_0 = get_config_value(constants.CONFIG_MAC_USERNAME_KEY)
    if not arg_0:
        logging.info("Can't setup ssh authorization; no mac_username specified")
        return
    if not _running_on_mac(): # give our Linux unit tests a way to not freak out
        logging.info("Skipping SSH load, we are not running on Mac")
        return

    if _mac_version_is_post_yosemite():
        _load_ssh_auth_post_yosemite(arg_0)
    else:
        _load_ssh_auth_pre_yosemite()

Will check the mac_username config value ; if it is present will load that user s SSH_AUTH_SOCK environment variable to the current environment . This allows git clones to behave the same for the daemon as they do for the user


return numpy.ma.array(b, mask=mask), ma_c

def
Func
(
arg_0
,
arg_1
=
arg_2
.
pi
,
arg_4
=
)
:
assert
len
(
arg_0
.
shape
)
==
1
,
"Only 1D arrays supported"
if
arg_4
is
not
and
arg_0
.
shape
!=
arg_4
.
shape
:
raise
ValueError
(
"arrays must be of identical shape"
)
arg_5
=
arg_2
.
where
(
arg_2
.
abs
(
arg_2
.
diff
(
arg_0
)
)
>=
arg_1
)
[
0
]
arg_5
+=
1
arg_6
=
len
(
arg_5
)
arg_7
=
arg_2
.
empty
(
(
len
(
arg_0
)
+
arg_6
)
)
arg_8
=
arg_5
+
arg_2
.
arange
(
arg_6
)
arg_9
=
arg_2
.
zeros_like
(
arg_7
,
dtype
=
arg_2
.
bool
)
arg_9
[
arg_8
]
=
True
arg_7
[
~
arg_9
]
=
arg_0
arg_7
[
arg_9
]
=
arg_2
.
if
arg_4
is
not
:
arg_10
=
arg_2
.
empty_like
(
arg_7
)
arg_10
[
~
arg_9
]
=
arg_4
arg_10
[
arg_9
]
=
arg_2
.
arg_11
=
arg_2
.
ma
.
array
(
arg_10
,
arg_9
=
arg_9
)
else
:
arg_11
=
return
arg_2
.
ma
.
array
(
arg_7
,
arg_9
=
arg_9
)
,
arg_11

def Func(arg_0, arg_1=arg_2.pi, arg_4=None):
    """Create a array which masks jumps >= threshold.

    Extra points are inserted between two subsequent values whose
    absolute difference differs by more than threshold (default is
    pi).

    Other can be a secondary array which is also masked according to
    *a*.

    Returns (*a_masked*, *other_masked*) (where *other_masked* can be
    ``None``)
    """
    assert len(arg_0.shape) == 1, "Only 1D arrays supported"

    if arg_4 is not None and arg_0.shape != arg_4.shape:
        raise ValueError("arrays must be of identical shape")

    # jump occurs after the index in break
    arg_5 = arg_2.where(arg_2.abs(arg_2.diff(arg_0)) >= arg_1)[0]
    # insert a blank after
    arg_5 += 1

    # is this needed?? -- no, but leave it here as a reminder
    #f2 = numpy.diff(a, 2)
    #up = (f2[breaks - 1] >= 0)  # >0: up, <0: down
    # sort into up and down breaks:
    #breaks_up = breaks[up]
    #breaks_down = breaks[~up]

    # new array b including insertions for all the breaks
    arg_6 = len(arg_5)
    arg_7 = arg_2.empty((len(arg_0) + arg_6))
    # calculate new indices for breaks in b, taking previous insertions into account
    arg_8 = arg_5 + arg_2.arange(arg_6)
    arg_9 =  arg_2.zeros_like(arg_7, dtype=arg_2.bool)
    arg_9[arg_8] = True
    arg_7[~arg_9] = arg_0
    arg_7[arg_9] = arg_2.NAN

    if arg_4 is not None:
        arg_10 = arg_2.empty_like(arg_7)
        arg_10[~arg_9] = arg_4
        arg_10[arg_9] = arg_2.NAN
        arg_11 = arg_2.ma.array(arg_10, arg_9=arg_9)
    else:
        arg_11 = None

    return arg_2.ma.array(arg_7, arg_9=arg_9), arg_11

Create a array which masks jumps > = threshold .


def Func(arg_0, arg_1, arg_2):
    '''
    A context manager to replace and restore a value using a getter and setter.

    :param object obj: The object to replace/restore.
    :param object key: The key to replace/restore in the object.
    :param object value: The value to replace.

    Example::

      with PushPop2(sys.modules, 'alpha', None):
        pytest.raises(ImportError):
          import alpha
    '''
    if arg_1 in arg_0:
        arg_3 = arg_0[arg_1]
        arg_0[arg_1] = arg_2
        yield arg_2
        arg_0[arg_1] = arg_3

    else:
        arg_0[arg_1] = arg_2
        yield arg_2
        del arg_0[arg_1]

A context manager to replace and restore a value using a getter and setter .


def Func ( arg_0 , arg_1 = None , arg_2 = False ) : if arg_1 is None : arg_1 = arg_0 . problem else : arg_0 . solver = arg_1 if arg_2 and interface_to_str ( arg_1 ) not in qp_solvers : arg_1 = solvers [ get_solver_name ( arg_2 = True ) ] return arg_1

def Func(arg_0, arg_1=None, arg_2=False):
    """Choose a solver given a solver name and model.

    This will choose a solver compatible with the model and required
    capabilities. Also respects model.solver where it can.

    Parameters
    ----------
    model : a cobra model
        The model for which to choose the solver.
    solver : str, optional
        The name of the solver to be used.
    qp : boolean, optional
        Whether the solver needs Quadratic Programming capabilities.

    Returns
    -------
    solver : an optlang solver interface
        Returns a valid solver for the problem.

    Raises
    ------
    SolverNotFound
        If no suitable solver could be found.
    """
    if arg_1 is None:
        arg_1 = arg_0.problem
    else:
        arg_0.solver = arg_1

    # Check for QP, raise error if no QP solver found
    if arg_2 and interface_to_str(arg_1) not in qp_solvers:
        arg_1 = solvers[get_solver_name(arg_2=True)]

    return arg_1

Choose a solver given a solver name and model .


def Func ( arg_0 , * arg_1 , ** arg_2 ) : arg_3 = None for arg_3 in arg_0 . iterFunc ( * arg_1 , ** arg_2 ) : pass return arg_3

def Func(arg_0, *arg_1, **arg_2):
        '''Train the network until the Funcer converges.

        All arguments are passed to :func:`iterFunc`.

        Returns
        -------
        Funcing : dict
            A dictionary of monitor values computed using the Funcing dataset,
            at the conclusion of Funcing. This dictionary will at least contain
            a 'loss' key that indicates the value of the loss function. Other
            keys may be available depending on the Funcer being used.
        validation : dict
            A dictionary of monitor values computed using the validation
            dataset, at the conclusion of Funcing.
        '''
        arg_3 = None
        for arg_3 in arg_0.iterFunc(*arg_1, **arg_2):
            pass
        return arg_3

Train the network until the trainer converges.

        All arguments are passed to :func:`itertrain`.

        Returns
        -------
        training : dict
            A dictionary of monitor values computed using the training dataset,
            at the conclusion of training. This dictionary will at least contain
            a 'loss' key that indicates the value of the loss function. Other
            keys may be available depending on the trainer being used.
        validation : dict
            A dictionary of monitor values computed using the validation
            dataset, at the conclusion of training.

Train the network until the trainer converges .


def Func ( arg_0 , arg_1 = ( ) ) : for arg_2 , arg_3 in STATES . items ( ) : if arg_2 in arg_1 : continue setattr ( arg_0 , arg_3 , getattr ( arg_0 . _bot . _canvas , arg_2 ) )

def Func(arg_0, arg_1=()):
        """
        Doesn't store exactly the same items as Nodebox for ease of implementation,
        it has enough to get the Nodebox Dentrite example working.
        """
        for arg_2, arg_3 in STATES.items():
            if arg_2 in arg_1:
                continue
            setattr(arg_0, arg_3, getattr(arg_0._bot._canvas, arg_2))

Doesn t store exactly the same items as Nodebox for ease of implementation it has enough to get the Nodebox Dentrite example working .


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
[
]
for
arg_3
in
arg_0
.
getallmatchingheaders
(
arg_1
)
:
if
arg_3
[
0
]
in
' \t'
:
arg_2
.
append
(
arg_3
)
else
:
if
arg_2
:
arg_2
.
append
(
', '
)
arg_4
=
arg_3
.
find
(
':'
)
if
arg_4
>
0
:
arg_5
=
arg_3
[
arg_4
+
1
:
]
arg_2
.
append
(
arg_5
)
arg_6
=
''
.
join
(
arg_2
)
arg_7
=
AddressList
(
arg_6
)
return
arg_7
.
addresslist

def Func(arg_0, arg_1):
        """Get a list of addresses from a header.

        Retrieves a list of addresses from a header, where each address is a
        tuple as returned by getaddr().  Scans all named headers, so it works
        properly with multiple To: or Cc: headers for example.
        """
        arg_2 = []
        for arg_3 in arg_0.getallmatchingheaders(arg_1):
            if arg_3[0] in ' \t':
                arg_2.append(arg_3)
            else:
                if arg_2:
                    arg_2.append(', ')
                arg_4 = arg_3.find(':')
                if arg_4 > 0:
                    arg_5 = arg_3[arg_4+1:]
                arg_2.append(arg_5)
        arg_6 = ''.join(arg_2)
        arg_7 = AddressList(arg_6)
        return arg_7.addresslist


(self, name=None, folder_id='me/skydrive', metadata=dict())

return self(folder_id, data=metadata, method='post', auth_header=True)

def Func ( arg_0 , arg_1 = None , arg_2 = 'me/skydrive' , arg_3 = arg_4 ( ) ) : arg_3 = arg_3 . copy ( ) if arg_1 : arg_3 [ 'name' ] = arg_1 return arg_0 ( arg_2 , data = arg_3 , method = 'post' , auth_header = True )

def Func(arg_0, arg_1=None, arg_2='me/skydrive', arg_3=arg_4()):
		'''Create a folder with a specified "name" attribute.
				folder_id allows to specify a parent folder.
				metadata mapping may contain additional folder properties to pass to an API.'''
		arg_3 = arg_3.copy()
		if arg_1: arg_3['name'] = arg_1
		return arg_0(arg_2, data=arg_3, method='post', auth_header=True)

Create a folder with a specified name attribute . folder_id allows to specify a parent folder . metadata mapping may contain additional folder properties to pass to an API .


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
[
]
arg_3
=
''
arg_4
=
0
for
arg_5
in
arg_0
.
getallmatchingheaders
(
arg_1
)
:
if
arg_5
[
0
]
.
isspace
(
)
:
if
arg_3
:
arg_3
=
"%s\n %s"
%
(
arg_3
,
arg_5
.
strip
(
)
)
else
:
arg_3
=
arg_5
.
strip
(
)
else
:
if
arg_4
:
arg_2
.
append
(
arg_3
)
arg_3
=
arg_5
[
arg_5
.
find
(
":"
)
+
1
:
]
.
strip
(
)
arg_4
=
1
if
arg_4
:
arg_2
.
append
(
arg_3
)
return
arg_2

def Func(arg_0, arg_1):
        """Get all values for a header.

        This returns a list of values for headers given more than once; each
        value in the result list is stripped in the same way as the result of
        getheader().  If the header is not given, return an empty list.
        """
        arg_2 = []
        arg_3 = ''
        arg_4 = 0
        for arg_5 in arg_0.getallmatchingheaders(arg_1):
            if arg_5[0].isspace():
                if arg_3:
                    arg_3 = "%s\n %s" % (arg_3, arg_5.strip())
                else:
                    arg_3 = arg_5.strip()
            else:
                if arg_4:
                    arg_2.append(arg_3)
                arg_3 = arg_5[arg_5.find(":") + 1:].strip()
                arg_4 = 1
        if arg_4:
            arg_2.append(arg_3)
        return arg_2


def Func ( arg_0 ) : arg_1 = arg_0 . config . get ( 'Func' , None ) if arg_1 is None : return arg_1 = arg_1 [ platform ] return arg_1 [ 'path' ] , arg_1 [ 'args' ]

def Func(arg_0):
        '''Command used to launch this application module'''

        arg_1 = arg_0.config.get('Func', None)
        if arg_1 is None:
            return

        arg_1 = arg_1[platform]
        return arg_1['path'], arg_1['args']


def
Func
(
arg_0
)
:
for
arg_1
in
arg_0
.
tables
:
print
(
"*** %s ***"
%
arg_1
.
name
)
arg_1
.
Func
(
)

def Func(arg_0):
        '''Regurgitate the tables and rows'''
        for arg_1 in arg_0.tables:
            print("*** %s ***" % arg_1.name)
            arg_1.Func()


(
        self, using, value, timeout=10000,
        interval=1000, asserter=is_displayed)

return _wait_for_element(self, using, value)

def Func(
        arg_0, arg_1, arg_2, arg_3=10000,
        arg_4=1000, arg_5=arg_6):
        """Wait for element till satisfy the given condition

        Support:
            Android iOS Web(WebView)

        Args:
            using(str): The element location strategy.
            value(str): The value of the location strategy.
            timeout(int): How long we should be retrying stuff.
            interval(int): How long between retries.
            asserter(callable): The asserter func to determine the result.

        Returns:
            Return the Element.

        Raises:
            WebDriverException.
        """
        if not callable(arg_5):
            raise TypeError('Asserter must be callable.')
        @retry(
            retry_on_exception=lambda ex: isinstance(ex, WebDriverException),
            stop_max_delay=arg_3,
            wait_fixed=arg_4
        )
        def _Func(arg_7, arg_1, arg_2):
            arg_8 = arg_7.element(arg_1, arg_2)
            arg_5(arg_8)
            return arg_8

        return _Func(arg_0, arg_1, arg_2)


(model, min_objective_value=0.1, exports=False,
                   minimize_components=False, open_exchanges=False)

def Func(arg_0, arg_1=0.1, arg_2=False,
                   arg_3=False, arg_4=False):
    """
    Find the minimal growth medium for the model.

    Finds the minimal growth medium for the model which allows for
    model as well as individual growth. Here, a minimal medium can either
    be the medium requiring the smallest total import flux or the medium
    requiring the least components (ergo ingredients), which will be much
    slower due to being a mixed integer problem (MIP).

    Arguments
    ---------
    model : cobra.model
        The model to modify.
    min_objective_value : positive float or array-like object
        The minimum growth rate (objective) that has to be achieved.
    exports : boolean
        Whether to include export fluxes in the returned medium. Defaults to
        False which will only return import fluxes.
    minimize_components : boolean or positive int
        Whether to minimize the number of components instead of the total
        import flux. Might be more intuitive if set to True but may also be
        slow to calculate for large communities. If set to a number `n` will
        return up to `n` alternative solutions all with the same number of
        components.
    open_exchanges : boolean or number
        Whether to ignore currently set bounds and make all exchange reactions
        in the model possible. If set to a number all exchange reactions will
        be opened with (-number, number) as bounds.

    Returns
    -------
    pandas.Series, pandas.DataFrame or None
        A series giving the import flux for each required import
        reaction and (optionally) the associated export fluxes. All exchange
        fluxes are oriented into the import reaction e.g. positive fluxes
        denote imports and negative fluxes exports. If `minimize_components`
        is a number larger 1 may return a DataFrame where each column is a
        minimal medium. Returns None if the minimization is infeasible
        (for instance if min_growth > maximum growth rate).

    Notes
    -----
    Due to numerical issues the `minimize_components` option will usually only
    minimize the number of "large" import fluxes. Specifically, the detection
    limit is given by ``integrality_tolerance * max_bound`` where ``max_bound``
    is the largest bound on an import reaction. Thus, if you are interested
    in small import fluxes as well you may have to adjust the integrality
    tolerance at first with
    `model.solver.configuration.tolerances.integrality = 1e-7` for instance.
    However, this will be *very* slow for large models especially with GLPK.

    """
    arg_5 = find_boundary_types(arg_0, "exchange")
    if isinstance(arg_4, bool):
        arg_6 = 1000
    else:
        arg_6 = arg_4

    with arg_0 as arg_10:
        if arg_4:
            LOGGER.debug("Opening exchanges for %d imports.",
                         len(arg_5))
            for arg_7 in arg_5:
                arg_7.bounds = (-arg_6, arg_6)
        LOGGER.debug("Applying objective value constraints.")
        arg_9 = arg_10.problem.Constraint(
            arg_10.objective.expression, lb=arg_1,
            name="medium_obj_constraint")
        arg_10.add_cons_vars([arg_9])
        arg_10.solver.update()
        arg_10.objective = Zero
        LOGGER.debug("Adding new media objective.")
        arg_12 = arg_10.solver.configuration.tolerances.feasibility

        if arg_3:
            add_mip_obj(arg_10)
            if isinstance(arg_3, bool):
                arg_3 = 1
            arg_13 = set()
            arg_14 = arg_20 = arg_10.slim_optimize()
            if arg_10.solver.status != OPTIMAL:
                LOGGER.warning("Minimization of medium was infeasible.")
                return None
            arg_15 = arg_10.problem.Constraint(Zero, arg_19=0)
            arg_10.add_cons_vars([arg_15])
            arg_10.solver.update()
            arg_16 = []
            for arg_17 in range(arg_3):
                LOGGER.info("Finding alternative medium #%d.", (arg_17 + 1))
                arg_18 = [arg_10.variables["ind_" + s] for s in arg_13]
                if len(arg_13) > 0:
                    arg_15.set_linear_coefficients(
                        dict.fromkeys(arg_18, 1))
                    arg_15.ub = arg_14 - 1
                arg_20 = arg_10.slim_optimize()
                if arg_10.solver.status != OPTIMAL or arg_20 > arg_14:
                    break
                arg_21 = _as_medium(arg_5, arg_12, arg_2=arg_2)
                arg_16.append(arg_21)
                arg_13.update(arg_21[arg_21 > 0].index)
            if len(arg_16) > 1:
                arg_21 = pd.concat(arg_16, axis=1, sort=True).fillna(0.0)
                arg_21.sort_index(axis=1, inplace=True)
            else:
                arg_21 = arg_16[0]
        else:
            add_linear_obj(arg_10)
            arg_10.slim_optimize()
            if arg_10.solver.status != OPTIMAL:
                LOGGER.warning("Minimization of medium was infeasible.")
                return None
            arg_21 = _as_medium(arg_5, arg_12, arg_2=arg_2)

    return arg_21

Find the minimal growth medium for the model .


def Func ( arg_0 , arg_1 ) : def is_logging_name ( ) : return ( isinstance ( arg_1 . func , astroid . Attribute ) and isinstance ( arg_1 . func . expr , astroid . Name ) and arg_1 . func . expr . name in arg_0 . _logging_names ) def is_logger_class ( ) : try : for arg_2 in arg_1 . func . infer ( ) : if isinstance ( arg_2 , astroid . BoundMethod ) : arg_3 = arg_2 . _proxied . parent if isinstance ( arg_3 , astroid . ClassDef ) and ( arg_3 . qname ( ) == "logging.Logger" or any ( arg_4 . qname ( ) == "logging.Logger" for arg_4 in arg_3 . ancestors ( ) ) ) : return True , arg_2 . _proxied . name except astroid . exceptions . InferenceError : pass return False , None if is_logging_name ( ) : arg_5 = arg_1 . func . attrname else : arg_6 , arg_5 = is_logger_class ( ) if not arg_6 : return arg_0 . _check_log_method ( arg_1 , arg_5 )

def Func(arg_0, arg_1):
        """Checks calls to logging methods."""

        def is_logging_name():
            return (
                isinstance(arg_1.func, astroid.Attribute)
                and isinstance(arg_1.func.expr, astroid.Name)
                and arg_1.func.expr.name in arg_0._logging_names
            )

        def is_logger_class():
            try:
                for arg_2 in arg_1.func.infer():
                    if isinstance(arg_2, astroid.BoundMethod):
                        arg_3 = arg_2._proxied.parent
                        if isinstance(arg_3, astroid.ClassDef) and (
                            arg_3.qname() == "logging.Logger"
                            or any(
                                arg_4.qname() == "logging.Logger"
                                for arg_4 in arg_3.ancestors()
                            )
                        ):
                            return True, arg_2._proxied.name
            except astroid.exceptions.InferenceError:
                pass
            return False, None

        if is_logging_name():
            arg_5 = arg_1.func.attrname
        else:
            arg_6, arg_5 = is_logger_class()
            if not arg_6:
                return
        arg_0._check_log_method(arg_1, arg_5)


def Func(arg_0, arg_1, arg_2, arg_3):
        """Unregister a handler instance by name with esc_strings."""
        try:
            del arg_0._handlers[arg_1]
        except KeyError:
            pass
        for arg_4 in arg_3:
            arg_5 = arg_0._esc_handlers.get(arg_4)
            if arg_5 is arg_2:
                del arg_0._esc_handlers[arg_4]

Unregister a handler instance by name with esc_strings .


return self.append(U3Gate(theta, phi, lam), [q], [])

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : return arg_0 . append ( U3Gate ( arg_1 , arg_2 , arg_3 ) , [ arg_4 ] , [ ] )

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
    """Apply Func to q."""
    return arg_0.append(U3Gate(arg_1, arg_2, arg_3), [arg_4], [])


def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = 300 ) : try : arg_5 , arg_6 = cnmf ( arg_0 , arg_1 , arg_4 = arg_4 , hull = False ) except : return [ 1 ] arg_7 = filter_activation_matrix ( arg_6 . T , arg_2 ) arg_7 = np . asarray ( arg_7 , dtype = int ) arg_8 = [ ] arg_9 = zip ( arg_3 [ : - 1 ] , arg_3 [ 1 : ] ) for arg_10 in arg_9 : if arg_10 [ 1 ] - arg_10 [ 0 ] <= 0 : arg_8 . append ( np . max ( arg_7 ) + 1 ) else : arg_8 . append ( most_frequent ( arg_7 [ arg_10 [ 0 ] : arg_10 [ 1 ] ] ) ) return arg_8

def Func(arg_0, arg_1, arg_2, arg_3, arg_4=300):
    """Computes the labels using the bounds."""

    try:
        arg_5, arg_6 = cnmf(arg_0, arg_1, arg_4=arg_4, hull=False)
    except:
        return [1]

    arg_7 = filter_activation_matrix(arg_6.T, arg_2)
    arg_7 = np.asarray(arg_7, dtype=int)

    #labels = [label_frames[0]]
    arg_8 = []
    arg_9 = zip(arg_3[:-1], arg_3[1:])
    for arg_10 in arg_9:
        if arg_10[1] - arg_10[0] <= 0:
            arg_8.append(np.max(arg_7) + 1)
        else:
            arg_8.append(most_frequent(
                arg_7[arg_10[0]: arg_10[1]]))
        #print bound_inter, labels[-1]
    #labels.append(label_frames[-1])

    return arg_8


(cpdir,
                   cmdpkl,
                   cpfileglob='checkplot*.pkl*',
                   require_cmd_magcolor=True,
                   save_cmd_pngs=False)

return add_cmds_cplist(cplist,
                           cmdpkl,
                           require_cmd_magcolor=require_cmd_magcolor,
                           save_cmd_pngs=save_cmd_pngs)

def Func ( arg_0 , arg_1 , arg_2 = 'checkplot*.pkl*' , arg_3 = True , arg_4 = False ) : arg_5 = glob . glob ( os . path . join ( arg_0 , arg_2 ) ) return add_cmds_cplist ( arg_5 , arg_1 , arg_3 = arg_3 , arg_4 = arg_4 )

def Func(arg_0,
                   arg_1,
                   arg_2='checkplot*.pkl*',
                   arg_3=True,
                   arg_4=False):
    '''This adds CMDs for each object in cpdir.

    Parameters
    ----------

    cpdir : list of str
        This is the directory to search for checkplot pickles.

    cmdpkl : str
        This is the filename of the CMD pickle created previously.

    cpfileglob : str
        The UNIX fileglob to use when searching for checkplot pickles to operate
        on.

    require_cmd_magcolor : bool
        If this is True, a CMD plot will not be made if the color and mag keys
        required by the CMD are not present or are nan in each checkplot's
        objectinfo dict.

    save_cmd_pngs : bool
        If this is True, then will save the CMD plots that were generated and
        added back to the checkplotdict as PNGs to the same directory as
        `cpx`.

    Returns
    -------

    Nothing.

    '''

    arg_5 = glob.glob(os.path.join(arg_0, arg_2))

    return add_cmds_cplist(arg_5,
                           arg_1,
                           arg_3=arg_3,
                           arg_4=arg_4)

This adds CMDs for each object in cpdir .


def Func ( arg_0 ) : if arg_0 . startswith ( '\n' ) : return textwrap . Func ( arg_0 ) arg_1 = arg_0 . split ( '\n' , 1 ) if len ( arg_1 ) == 1 : return textwrap . Func ( arg_0 ) arg_2 , arg_3 = arg_1 arg_3 = textwrap . Func ( arg_3 ) return '\n' . join ( [ arg_2 , arg_3 ] )

def Func(arg_0):
    """Equivalent of textwrap.Func that ignores unindented first line.

    This means it will still Func strings like:
    '''foo
    is a bar
    '''

    For use in wrap_paragraphs.
    """

    if arg_0.startswith('\n'):
        # text starts with blank line, don't ignore the first line
        return textwrap.Func(arg_0)

    # split first line
    arg_1 = arg_0.split('\n',1)
    if len(arg_1) == 1:
        # only one line
        return textwrap.Func(arg_0)

    arg_2, arg_3 = arg_1
    # Func everything but the first line
    arg_3 = textwrap.Func(arg_3)
    return '\n'.join([arg_2, arg_3])

Equivalent of textwrap.dedent that ignores unindented first line.

    This means it will still dedent strings like:
    '''foo
    is a bar
    '''

    For use in wrap_paragraphs.

Equivalent of textwrap . dedent that ignores unindented first line .


def Func(arg_0, arg_1):
    """Sends this outgoing packet to dispatcher's socket"""
    if arg_0.sent_complete:
      return

    arg_2 = arg_1.Func(arg_0.to_Func)
    arg_0.to_Func = arg_0.to_Func[arg_2:]

Sends this outgoing packet to dispatcher s socket


def Func(arg_0, arg_1='__eq__'):
    """Create a TinyDB query that looks for items that have each field in `sample` with a value
    compared with the correspondent operation in `operators`.

    Parameters
    ----------
    sample: dict
        The sample data

    operators: str or list of str
        A list of comparison operations for each field value in `sample`.
        If this is a str, will use the same operator for all `sample` fields.
        If you want different operators for each field, remember to use an OrderedDict for `sample`.
        Check TinyDB.Query class for possible choices.

    Returns
    -------
    query: tinydb.database.Query
    """
    if isinstance(arg_1, str):
        arg_1 = [arg_1] * len(arg_0)

    if len(arg_0) != len(arg_1):
        raise ValueError('Expected `operators` to be a string or a list with the same'
                         ' length as `field_names` ({}), got {}.'.format(len(arg_0),
                                                                         arg_1))

    arg_2 = []
    for arg_3, arg_4 in enumerate(arg_0):
        arg_5 = arg_0[arg_4]
        arg_6 = arg_1[arg_3]
        arg_2.append(_build_query(field_name=arg_4,
                                    field_value=arg_5,
                                    operator=arg_6))

    return _concat_queries(arg_2, arg_1='__and__')

Create a TinyDB query that looks for items that have each field in sample with a value compared with the correspondent operation in operators .


return Address(
            trytes=self.address + self._generate_checksum(),

            # Make sure to copy all of the ancillary attributes, too!
            balance=self.balance,
            key_index=self.key_index,
            security_level=self.security_level,
        )

def Func ( arg_0 ) : return Address ( trytes = arg_0 . address + arg_0 . _generate_checksum ( ) , balance = arg_0 . balance , key_index = arg_0 . key_index , security_level = arg_0 . security_level , )

def Func(arg_0):
        # type: () -> Address
        """
        Returns the address with a valid checksum attached.
        """
        return Address(
            trytes=arg_0.address + arg_0._generate_checksum(),

            # Make sure to copy all of the ancillary attributes, too!
            balance=arg_0.balance,
            key_index=arg_0.key_index,
            security_level=arg_0.security_level,
        )

Returns the address with a valid checksum attached .


def Func(arg_0):
        """
        Retrieve the value of the master key for this session.

        :return: A string representing the state
        """
        arg_1 = _lib.SSL_get_session(arg_0._ssl)
        if arg_1 == _ffi.NULL:
            return None

        arg_2 = _lib.SSL_SESSION_get_Func(arg_1, _ffi.NULL, 0)
        assert arg_2 > 0
        arg_3 = _no_zero_allocator("unsigned char[]", arg_2)
        _lib.SSL_SESSION_get_Func(arg_1, arg_3, arg_2)
        return _ffi.buffer(arg_3, arg_2)[:]

Retrieve the value of the master key for this session .


verify will return a True or False to determine to verify the
       requests call or not. If False, we should the user a warning message,
       as this should not be done in production!

def Func(arg_0):
    '''
       Func will return a True or False to determine to Func the
       requests call or not. If False, we should the user a warning message,
       as this should not be done in production!

    '''
    from sregistry.defaults import DISABLE_SSL_CHECK

    if DISABLE_SSL_CHECK is True:
        bot.warning('Verify of certificates disabled! ::TESTING USE ONLY::')

    return not DISABLE_SSL_CHECK

verify will return a True or False to determine to verify the requests call or not . If False we should the user a warning message as this should not be done in production!


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = [ ] arg_4 = [ ] arg_5 = [ ] for arg_6 in arg_1 : if ( 'floating_ip' in CONF . QUARK . environment_capabilities and is_isonet_vif ( arg_6 ) ) : continue arg_7 = arg_6 in arg_2 if arg_6 . tagged and arg_7 and arg_2 [ arg_6 ] [ sg_cli . SECURITY_GROUP_ACK ] : continue if arg_6 . tagged : if arg_7 : arg_4 . append ( arg_6 ) else : arg_5 . append ( arg_6 ) else : if arg_7 : arg_3 . append ( arg_6 ) return arg_3 , arg_4 , arg_5

def Func(arg_0, arg_1, arg_2):
    """Splits VIFs into three explicit categories and one implicit

    Added - Groups exist in Redis that have not been ack'd and the VIF
            is not tagged.
            Action: Tag the VIF and apply flows
    Updated - Groups exist in Redis that have not been ack'd and the VIF
              is already tagged
              Action: Do not tag the VIF, do apply flows
    Removed - Groups do NOT exist in Redis but the VIF is tagged
              Action: Untag the VIF, apply default flows
    Self-Heal - Groups are ack'd in Redis but the VIF is untagged. We treat
                this case as if it were an "added" group.
                Action: Tag the VIF and apply flows
    NOOP - The VIF is not tagged and there are no matching groups in Redis.
           This is our implicit category
           Action: Do nothing
    """
    arg_3 = []
    arg_4 = []
    arg_5 = []

    for arg_6 in arg_1:
        # Quark should not action on isonet vifs in regions that use FLIP
        if ('floating_ip' in CONF.QUARK.environment_capabilities and
                is_isonet_vif(arg_6)):
            continue

        arg_7 = arg_6 in arg_2
        if arg_6.tagged and arg_7 and\
                arg_2[arg_6][sg_cli.SECURITY_GROUP_ACK]:
            # Already ack'd these groups and VIF is tagged, reapply.
            # If it's not tagged, fall through and have it self-heal
            continue

        if arg_6.tagged:
            if arg_7:
                arg_4.append(arg_6)
            else:
                arg_5.append(arg_6)
        else:
            if arg_7:
                arg_3.append(arg_6)
            # if not tagged and no groups, skip

    return arg_3, arg_4, arg_5


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . get_comments ( arg_1 [ 'id' ] ) Func = arg_0 . build_annotations ( ( ( c [ 'memberCreator' ] [ 'username' ] , c [ 'data' ] [ 'text' ] ) for c in arg_2 ) , arg_1 [ "shortUrl" ] ) return Func

def Func(arg_0, arg_1):
        """ A wrapper around get_comments that build the taskwarrior
        annotations. """
        arg_2 = arg_0.get_comments(arg_1['id'])
        Func = arg_0.build_annotations(
            ((c['memberCreator']['username'], c['data']['text']) for c in arg_2),
            arg_1["shortUrl"])
        return Func

A wrapper around get_comments that build the taskwarrior annotations .


def
Func
(
arg_0
)
:
arg_1
=
set
(
arg_0
)
arg_2
=
set
(
ascii_letters
+
digits
+
punctuation
+
' '
)
arg_3
=
(
ascii_uppercase
,
ascii_lowercase
,
digits
)
if
not
arg_1
.
issubset
(
arg_2
)
:
raise
ValidationError
(
too_fancy
)
for
arg_4
in
arg_3
:
if
not
arg_1
.
intersection
(
arg_4
)
:
raise
ValidationError
(
too_simple
)

def Func(arg_0):
    """
    Passwords should be tough.

    That means they should use:
    - mixed case letters,
    - numbers,
    - (optionally) ascii symbols and spaces.

    The (contrversial?) decision to limit the passwords to ASCII only
    is for the sake of:
    - simplicity (no need to normalise UTF-8 input)
    - security (some character sets are visible as typed into password fields)

    TODO: In future, it may be worth considering:
    - rejecting common passwords. (Where can we get a list?)
    - rejecting passwords with too many repeated characters.

    It should be noted that no restriction has been placed on the length of the
    password here, as that can easily be achieved with use of the min_length
    attribute of a form/serializer field.
    """
    arg_1 = set(arg_0)
    arg_2 = set(ascii_letters + digits + punctuation + ' ')
    arg_3 = (ascii_uppercase, ascii_lowercase, digits)

    if not arg_1.issubset(arg_2):
        raise ValidationError(too_fancy)

    for arg_4 in arg_3:
        if not arg_1.intersection(arg_4):
            raise ValidationError(too_simple)


return self._nextFlatIdx - len(self._freeFlatIdxs)

def Func ( arg_0 , arg_1 = None ) : if arg_1 is not None : return len ( arg_0 . _cells [ arg_1 ] . _segments ) return arg_0 . _nextFlatIdx - len ( arg_0 . _freeFlatIdxs )

def Func(arg_0, arg_1=None):
    """
    Returns the number of segments.

    :param cell: (int) Optional parameter to get the number of segments on a
           cell.
    :returns: (int) Number of segments on all cells if cell is not specified, or
              on a specific specified cell
    """
    if arg_1 is not None:
      return len(arg_0._cells[arg_1]._segments)

    return arg_0._nextFlatIdx - len(arg_0._freeFlatIdxs)


return '{conn_type}://{host}/{endpoint}'.format(
            conn_type=conn_type, host=host, endpoint=endpoint)

def Func ( arg_0 ) : arg_1 = arg_0 . get_connection ( getattr ( arg_0 , arg_0 . conn_name_attr ) ) arg_2 = arg_1 . host if arg_1 . port is not None : arg_2 += ':{port}' . format ( port = arg_1 . port ) arg_3 = 'http' if not arg_1 . conn_type else arg_1 . conn_type arg_4 = arg_1 . extra_dejson . get ( 'endpoint' , 'pql' ) return '{conn_type}://{host}/{endpoint}' . format ( arg_3 = arg_3 , arg_2 = arg_2 , arg_4 = arg_4 )

def Func(arg_0):
        """
        Get the connection uri for pinot broker.

        e.g: http://localhost:9000/pql
        """
        arg_1 = arg_0.get_connection(getattr(arg_0, arg_0.conn_name_attr))
        arg_2 = arg_1.host
        if arg_1.port is not None:
            arg_2 += ':{port}'.format(port=arg_1.port)
        arg_3 = 'http' if not arg_1.conn_type else arg_1.conn_type
        arg_4 = arg_1.extra_dejson.get('endpoint', 'pql')
        return '{conn_type}://{host}/{endpoint}'.format(
            arg_3=arg_3, arg_2=arg_2, arg_4=arg_4)

Get the connection uri for pinot broker .


def Func ( arg_0 ) : arg_1 = [ round ( t , - 1 ) for t in teff ( arg_0 ) ] arg_2 = [ round ( l , 3 ) for l in luminosity ( arg_0 ) ] return arg_1 , arg_2

def Func(arg_0):
    """
    Returns rounded teff and luminosity lists.
    """
    arg_1 = [round(t, -1) for t in teff(arg_0)]
    arg_2 = [round(l, 3) for l in luminosity(arg_0)]
    return arg_1, arg_2

Returns rounded teff and luminosity lists .


def
Func
(
arg_0
=
""
)
:
try
:
arg_1
=
pinfo
[
str
(
arg_0
)
]
[
0
]
.
strip
(
)
.
split
(
" "
)
[
1
]
except
(
KeyError
,
ValueError
)
as
err
:
print
(
"\tKey name/number not recognized - "
.
format
(
arg_0
)
,
err
)
raise
return
arg_1

def Func(arg_0=""):
    """ Get the param name from the dict index value.
    """

    try:
        arg_1 = pinfo[str(arg_0)][0].strip().split(" ")[1]
    except (KeyError, ValueError) as err:
        ## TODO: paramsinfo get description by param string not working.
        ## It would be cool to have an assembly object bcz then you could
        ## just do this:
        ##
        ## print(pinfo[data.paramsinfo.keys().index(param)])
        print("\tKey name/number not recognized - ".format(arg_0), err)
        raise

    return arg_1

Get the param name from the dict index value .


def Func ( arg_0 ) : arg_1 , arg_2 , arg_3 = arg_0 . obj . pos glTranslatef ( - arg_1 , - arg_2 , - arg_3 )

def Func(arg_0):
        """
        Resets the state required for this actor to the default state.

        Currently resets the matrix to its previous translation.
        """
        arg_1,arg_2,arg_3 = arg_0.obj.pos
        glTranslatef(-arg_1,-arg_2,-arg_3)

Resets the state required for this actor to the default state . Currently resets the matrix to its previous translation .


(self, klass_node, anc_level, association_level)

def Func(arg_0, arg_1, arg_2, arg_3):
        """extract recursively classes related to klass_node"""
        if arg_0.classdiagram.has_node(arg_1) or not arg_0.show_node(arg_1):
            return
        arg_0.add_class(arg_1)

        for arg_4 in arg_0.get_ancestors(arg_1, arg_2):
            arg_0.Func(arg_4, arg_2 - 1, arg_3)

        for arg_5 in arg_0.get_associated(arg_1, arg_3):
            arg_0.Func(arg_5, arg_2, arg_3 - 1)


def Func(arg_0, arg_1, arg_2):
        """Verify if the request token is existed."""
        log.debug('Verify request token %r', arg_1)
        arg_3 = arg_2.request_token or arg_0._grantgetter(arg_1=arg_1)
        if arg_3:
            arg_2.request_token = arg_3
            return True
        return False

Verify if the request token is existed .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = build ( arg_0 , arg_1 , http = arg_2 ) return arg_3

def Func(arg_0, arg_1, arg_2):
    """
    Google build client helper.

    :param service: service to build client for
    :type service: ``str``

    :param api_version: API version to use.
    :type api_version: ``str``

    :param http_auth: Initialized HTTP client to use.
    :type http_auth: ``object``

    :return: google-python-api client initialized to use 'service'
    :rtype: ``object``
    """
    arg_3 = build(arg_0, arg_1, http=arg_2)
    return arg_3


We train over mini-batches and evaluate periodically.

(self, train_set, valid_set=None, test_set=None, train_size=None)

def
Func
(
arg_0
,
arg_1
,
arg_2
=
,
arg_3
=
,
arg_4
=
)
:
arg_5
=
0
while
True
:
if
not
arg_5
%
arg_0
.
config
.
test_frequency
and
arg_3
:
try
:
arg_0
.
test
(
arg_5
,
arg_3
)
except
KeyboardInterrupt
:
logging
.
info
(
'interrupted!'
)
break
if
not
arg_5
%
arg_0
.
validation_frequency
and
arg_2
:
try
:
if
not
arg_0
.
evaluate
(
arg_5
,
arg_2
)
:
logging
.
info
(
'patience elapsed, bailing out'
)
break
except
KeyboardInterrupt
:
logging
.
info
(
'interrupted!'
)
break
arg_6
=
""
try
:
arg_6
=
arg_0
.
Func_func
(
arg_1
)
except
KeyboardInterrupt
:
logging
.
info
(
'interrupted!'
)
break
if
not
arg_5
%
arg_0
.
config
.
monitor_frequency
:
logging
.
info
(
'monitor (iter=%i) %s'
,
arg_5
+
1
,
arg_6
)
arg_5
+=
1
if
hasattr
(
arg_0
.
network
,
"iteration_callback"
)
:
arg_0
.
network
.
iteration_callback
(
)
yield
arg_6
if
arg_2
:
arg_0
.
set_params
(
arg_0
.
best_params
)
if
arg_3
:
arg_0
.
test
(
0
,
arg_3
)

def Func(arg_0, arg_1, arg_2=None, arg_3=None, arg_4=None):
        '''We Func over mini-batches and evaluate periodically.'''
        arg_5 = 0
        while True:
            if not arg_5 % arg_0.config.test_frequency and arg_3:
                try:
                    arg_0.test(arg_5, arg_3)
                except KeyboardInterrupt:
                    logging.info('interrupted!')
                    break

            if not arg_5 % arg_0.validation_frequency and arg_2:
                try:
                    if not arg_0.evaluate(arg_5, arg_2):
                        logging.info('patience elapsed, bailing out')
                        break
                except KeyboardInterrupt:
                    logging.info('interrupted!')
                    break

            arg_6 = ""
            try:
                arg_6 = arg_0.Func_func(arg_1)
            except KeyboardInterrupt:
                logging.info('interrupted!')
                break
            if not arg_5 % arg_0.config.monitor_frequency:
                logging.info('monitor (iter=%i) %s', arg_5 + 1, arg_6)

            arg_5 += 1
            if hasattr(arg_0.network, "iteration_callback"):
                arg_0.network.iteration_callback()

            yield arg_6

        if arg_2:
            arg_0.set_params(arg_0.best_params)
        if arg_3:
            arg_0.test(0, arg_3)

We train over mini - batches and evaluate periodically .


def
Func
(
arg_0
,
arg_1
)
:
while
arg_0
.
_in_header
:
if
arg_1
:
arg_0
.
_headers
.
append
(
arg_1
)
else
:
arg_2
,
arg_3
,
arg_4
=
arg_0
.
_headers
[
0
]
.
split
(
" "
,
2
)
arg_3
=
int
(
arg_3
)
if
arg_3
==
200
:
arg_0
.
factory
.
get_stream
(
)
.
connected
(
)
else
:
arg_0
.
factory
.
continueTrying
=
0
arg_0
.
transport
.
loseConnection
(
)
arg_0
.
factory
.
get_stream
(
)
.
disconnected
(
RuntimeError
(
arg_3
,
arg_4
)
)
return
arg_0
.
_in_header
=
False
break
else
:
try
:
arg_0
.
_len_expected
=
int
(
arg_1
,
16
)
arg_0
.
setRawMode
(
)
except
:
pass

def Func(arg_0, arg_1):
        """ Callback issued by twisted when new line arrives.

        Args:
            line (str): Incoming line
        """
        while arg_0._in_header:
            if arg_1:
                arg_0._headers.append(arg_1)
            else:
                arg_2, arg_3, arg_4 = arg_0._headers[0].split(" ", 2)
                arg_3 = int(arg_3)
                if arg_3 == 200:
                    arg_0.factory.get_stream().connected()
                else:
                    arg_0.factory.continueTrying = 0
                    arg_0.transport.loseConnection()
                    arg_0.factory.get_stream().disconnected(RuntimeError(arg_3, arg_4))
                    return

                arg_0._in_header = False
            break
        else:
            try:
                arg_0._len_expected = int(arg_1, 16)
                arg_0.setRawMode()
            except:
                pass

Callback issued by twisted when new line arrives .


return tuple([int(i * level) >> 8 for i in list(color)])

def Func ( arg_0 , arg_1 ) : return tuple ( [ int ( arg_2 * arg_1 ) >> 8 for arg_2 in list ( arg_0 ) ] )

def Func(arg_0, arg_1):
    """
    Scale RGB tuple by level, 0 - 256
    """
    return tuple([int(arg_2 * arg_1) >> 8 for arg_2 in list(arg_0)])


def Func():
    """ Get the zonefile metadata

    See `zonefile_metadata`_

    :returns:
        A dictionary with the database metadata

    .. deprecated:: 2.6
        See deprecation warning in :func:`zoneinfo.gettz`. To get metadata,
        query the attribute ``zoneinfo.ZoneInfoFile.metadata``.
    """
    warnings.warn("zoneinfo.Func() will be removed in future "
                  "versions, to use the dateutil-provided zoneinfo files, "
                  "ZoneInfoFile object and query the 'metadata' attribute "
                  "instead. See the documentation for details.",
                  DeprecationWarning)

    if len(_CLASS_ZONE_INSTANCE) == 0:
        _CLASS_ZONE_INSTANCE.append(ZoneInfoFile(getzoneinfofile_stream()))
    return _CLASS_ZONE_INSTANCE[0].metadata


def Func ( arg_0 ) : arg_1 = arg_0 . home_score ( ) arg_2 = arg_0 . away_score ( ) if arg_1 > arg_2 : return arg_0 . home ( ) elif arg_1 < arg_2 : return arg_0 . away ( ) else : return None

def Func(arg_0):
        """Returns the team ID of the winning team. Returns NaN if a tie."""
        arg_1 = arg_0.home_score()
        arg_2 = arg_0.away_score()
        if arg_1 > arg_2:
            return arg_0.home()
        elif arg_1 < arg_2:
            return arg_0.away()
        else:
            return None

Returns the team ID of the winning team . Returns NaN if a tie .


def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
)
:
try
:
arg_4
=
Status
(
arg_3
)
arg_0
.
logger
.
debug
(
"Received %s action from %s"
%
(
arg_4
.
action
,
arg_4
.
clientId
)
)
if
arg_0
.
appStatusCallback
:
arg_0
.
appStatusCallback
(
arg_4
)
except
InvalidEventException
as
e
:
arg_0
.
logger
.
critical
(
str
(
e
)
)

def Func(arg_0, arg_1, arg_2, arg_3):
        """
        Internal callback for application command messages, parses source application from topic string and
        passes the information on to the registerd applicaion status callback
        """
        try:
            arg_4 = Status(arg_3)
            arg_0.logger.debug("Received %s action from %s" % (arg_4.action, arg_4.clientId))
            if arg_0.appStatusCallback:
                arg_0.appStatusCallback(arg_4)
        except InvalidEventException as e:
            arg_0.logger.critical(str(e))

Internal callback for application command messages parses source application from topic string and passes the information on to the registerd applicaion status callback


(extensions, acceptance_callback=None,
                            root_dir='.')

def
Func
(
arg_0
,
arg_1
=
,
arg_2
=
'.'
)
:
arg_3
=
logging
.
getLogger
(
__name__
)
def
_null_callback
(
arg_4
)
:
return
True
if
arg_1
is
:
arg_1
=
_null_callback
arg_2
=
os
.
path
.
abspath
(
arg_2
)
arg_5
=
git
.
repo
.
base
.
Repo
(
path
=
arg_2
,
search_parent_directories
=
True
)
arg_6
=
arg_7
=
[
_iter_filepaths_with_extension
(
ext
,
arg_2
=
arg_2
)
for
ext
in
arg_0
]
for
arg_8
in
itertools
.
chain
(
*
arg_7
)
:
arg_8
=
os
.
path
.
abspath
(
os
.
path
.
join
(
arg_2
,
arg_8
)
)
if
arg_1
(
arg_8
)
:
arg_3
.
debug
(
'Found content path %r'
,
arg_8
)
try
:
arg_9
=
read_git_commit_timestamp_for_file
(
arg_8
,
arg_5
=
arg_5
)
arg_3
.
debug
(
'Commit timestamp of %r is %s'
,
arg_8
,
arg_9
)
except
IOError
:
arg_3
.
warning
(
'Count not get commit for %r, skipping'
,
arg_8
)
continue
if
not
arg_6
or
arg_9
>
arg_6
:
arg_6
=
arg_9
arg_3
.
debug
(
'Newest commit timestamp is %s'
,
arg_6
)
arg_3
.
debug
(
'Final commit timestamp is %s'
,
arg_6
)
if
arg_6
is
:
raise
RuntimeError
(
'No content files found in {}'
.
format
(
arg_2
)
)
return
arg_6

def Func(arg_0, arg_1=None,
                            arg_2='.'):
    """Get the datetime for the most recent commit to a project that
    affected certain types of content.

    Parameters
    ----------
    extensions : sequence of 'str'
        Extensions of files to consider in getting the most recent commit
        date. For example, ``('rst', 'svg', 'png')`` are content extensions
        for a Sphinx project. **Extension comparision is case sensitive.** add
        uppercase variants to match uppercase extensions.
    acceptance_callback : callable
        Callable function whose sole argument is a file path, and returns
        `True` or `False` depending on whether the file's commit date should
        be considered or not. This callback is only run on files that are
        included by ``extensions``. Thus this callback is a way to exclude
        specific files that would otherwise be included by their extension.
    root_dir : 'str`, optional
        Only content contained within this root directory is considered.
        This directory must be, or be contained by, a Git repository. This is
        the current working directory by default.

    Returns
    -------
    commit_date : `datetime.datetime`
        Datetime of the most recent content commit.

    Raises
    ------
    RuntimeError
        Raised if no content files are found.
    """
    arg_3 = logging.getLogger(__name__)

    def _null_callback(arg_4):
        return True

    if arg_1 is None:
        arg_1 = _null_callback

    # Cache the repo object for each query
    arg_2 = os.path.abspath(arg_2)
    arg_5 = git.repo.base.Repo(path=arg_2, search_parent_directories=True)

    # Iterate over all files with all file extensions, looking for the
    # newest commit datetime.
    arg_6 = None
    arg_7 = [_iter_filepaths_with_extension(ext, arg_2=arg_2)
             for ext in arg_0]
    for arg_8 in itertools.chain(*arg_7):
        arg_8 = os.path.abspath(os.path.join(arg_2, arg_8))

        if arg_1(arg_8):
            arg_3.debug('Found content path %r', arg_8)
            try:
                arg_9 = read_git_commit_timestamp_for_file(
                    arg_8, arg_5=arg_5)
                arg_3.debug('Commit timestamp of %r is %s',
                             arg_8, arg_9)
            except IOError:
                arg_3.warning(
                    'Count not get commit for %r, skipping',
                    arg_8)
                continue

            if not arg_6 or arg_9 > arg_6:
                # Seed initial newest_datetime
                # or set a newer newest_datetime
                arg_6 = arg_9
                arg_3.debug('Newest commit timestamp is %s', arg_6)

        arg_3.debug('Final commit timestamp is %s', arg_6)

    if arg_6 is None:
        raise RuntimeError('No content files found in {}'.format(arg_2))

    return arg_6

Get the datetime for the most recent commit to a project that affected certain types of content .


def Func(arg_0, arg_1):
        """
        This method handles the incoming sonar data message and stores
        the data in the response table.

        :param data: Message data from Firmata

        :return: No return value.
        """
        arg_2 = int((arg_1[arg_0.MSB] << 7) + arg_1[arg_0.LSB])
        arg_3 = arg_1[0]
        with arg_0.pymata.data_lock:
            arg_4 = arg_0.active_sonar_map[arg_3]
            # also write it into the digital response table
            arg_0.digital_response_table[arg_1[arg_0.RESPONSE_TABLE_MODE]][arg_0.RESPONSE_TABLE_PIN_DATA_VALUE] = arg_2
            # send data through callback if there is a callback function for the pin
            if arg_4[0] is not None:
                # check if value changed since last reading
                if arg_4[1] != arg_2:
                    arg_0.active_sonar_map[arg_3][0]([arg_0.pymata.SONAR, arg_3, arg_2])
            # update the data in the table with latest value
            arg_4[1] = arg_2
            arg_0.active_sonar_map[arg_3] = arg_4

This method handles the incoming sonar data message and stores the data in the response table .


def Func(arg_0):
    """Convert log area ratios to reflection coefficients.

    :param g:  log area ratios
    :returns: the reflection coefficients

    .. seealso: :func:`rc2lar`, :func:`poly2rc`, :func:`ac2rc`, :func:`is2rc`.

    :References:
       [1] J. Makhoul, "Linear Prediction: A Tutorial Review," Proc. IEEE,  Vol.63, No.4, pp.561-580, Apr 1975.

    """
    assert numpy.isrealobj(arg_0), 'Log area ratios not defined for complex reflection coefficients.'
    # Use the relation, tanh(x) = (1-exp(2x))/(1+exp(2x))
    return -numpy.tanh(-numpy.array(arg_0)/2)

Convert log area ratios to reflection coefficients .


(id_token, audience, http=None,
                    cert_uri=ID_TOKEN_VERIFICATION_CERTS)

def
Func
(
arg_0
,
arg_1
,
arg_2
=
,
arg_3
=
arg_4
)
:
_require_crypto_or_die
(
)
if
arg_2
is
:
arg_2
=
transport
.
get_cached_http
(
)
arg_5
,
arg_6
=
transport
.
request
(
arg_2
,
arg_3
)
if
arg_5
.
status
==
http_client
.
OK
:
arg_7
=
json
.
loads
(
_helpers
.
_from_bytes
(
arg_6
)
)
return
crypt
.
verify_signed_jwt_with_certs
(
arg_0
,
arg_7
,
arg_1
)
else
:
raise
VerifyJwtTokenError
(
'Status code: {0}'
.
format
(
arg_5
.
status
)
)

def Func(arg_0, arg_1, arg_2=None,
                    arg_3=arg_4):
    """Verifies a signed JWT id_token.

    This function requires PyOpenSSL and because of that it does not work on
    App Engine.

    Args:
        id_token: string, A Signed JWT.
        audience: string, The audience 'aud' that the token should be for.
        http: httplib2.Http, instance to use to make the HTTP request. Callers
              should supply an instance that has caching enabled.
        cert_uri: string, URI of the certificates in JSON format to
                  verify the JWT against.

    Returns:
        The deserialized JSON in the JWT.

    Raises:
        oauth2client.crypt.AppIdentityError: if the JWT fails to verify.
        CryptoUnavailableError: if no crypto library is available.
    """
    _require_crypto_or_die()
    if arg_2 is None:
        arg_2 = transport.get_cached_http()

    arg_5, arg_6 = transport.request(arg_2, arg_3)
    if arg_5.status == http_client.OK:
        arg_7 = json.loads(_helpers._from_bytes(arg_6))
        return crypt.verify_signed_jwt_with_certs(arg_0, arg_7, arg_1)
    else:
        raise VerifyJwtTokenError('Status code: {0}'.format(arg_5.status))


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
shlex
.
split
(
arg_1
or
""
)
if
arg_2
and
'cookie='
in
arg_2
[
1
]
:
arg_3
=
arg_1
.
index
(
'cookie='
)
arg_4
=
arg_1
[
arg_3
+
7
:
]
arg_1
=
arg_1
[
:
arg_3
]
.
strip
(
)
arg_0
.
cookie
=
arg_4
if
arg_1
.
startswith
(
'#'
)
:
return
''
elif
'='
in
arg_1
:
arg_5
=
arg_1
.
partition
(
" "
)
[
0
]
if
hasattr
(
arg_0
,
"do_%s"
%
arg_5
)
:
return
arg_1
if
not
arg_1
.
startswith
(
"set "
)
:
return
"set "
+
arg_1
else
:
return
arg_1
if
len
(
arg_2
)
and
arg_2
[
0
]
in
arg_0
.
shortcuts
:
return
"%s %s"
%
(
arg_0
.
shortcuts
[
arg_2
[
0
]
]
,
" "
.
join
(
arg_2
[
1
:
]
)
)
else
:
return
arg_1

def Func(arg_0, arg_1):
        """
        Allow commands to have a last parameter of 'cookie=somevalue'

        TODO somevalue will be prepended onto any output lines so
        that editors can distinguish output from certain kinds
        of events they have sent.

        :param line:
        :return:
        """
        arg_2 = shlex.split(arg_1 or "")
        if arg_2 and 'cookie=' in arg_2[-1]:
            arg_3 = arg_1.index('cookie=')
            arg_4 = arg_1[arg_3 + 7:]
            arg_1 = arg_1[:arg_3].strip()
            arg_0.cookie = arg_4
        if arg_1.startswith('#'):
            return ''
        elif '=' in arg_1:
            # allow  somevar=somevalue

            # first check if we really mean a command
            arg_5 = arg_1.partition(" ")[0]
            if hasattr(arg_0, "do_%s" % arg_5):
                return arg_1

            if not arg_1.startswith("set "):
                return "set " + arg_1
            else:
                return arg_1
        if len(arg_2) and arg_2[0] in arg_0.shortcuts:
            return "%s %s" % (arg_0.shortcuts[arg_2[0]], " ".join(arg_2[1:]))
        else:
            return arg_1

Allow commands to have a last parameter of cookie = somevalue


(self, relative_path, suite_name, reports,
                      package_name=None)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = None ) : arg_5 = arg_0 . reserve_file ( arg_1 ) with open ( arg_5 , 'wb' ) as outf : outf . write ( toxml ( arg_3 , arg_2 , arg_4 = arg_4 ) ) return arg_5

def Func(arg_0, arg_1, arg_2, arg_3,
                      arg_4=None):
        """write the collection of reports to the given path"""

        arg_5 = arg_0.reserve_file(arg_1)
        with open(arg_5, 'wb') as outf:
            outf.write(toxml(arg_3, arg_2, arg_4=arg_4))
        return arg_5


def Func(arg_0=0.5, arg_1=32, arg_2=16) -> VAO:
    """
    Creates a Func.

    Keyword Args:
        radius (float): Radius or the Func
        rings (int): number or horizontal rings
        sectors (int): number of vertical segments

    Returns:
        A :py:class:`demosys.opengl.vao.VAO` instance
    """
    arg_3 = 1.0 / (arg_2 - 1)
    arg_4 = 1.0 / (arg_1 - 1)

    arg_5 = [0] * (arg_2 * arg_1 * 3)
    arg_6 = [0] * (arg_2 * arg_1 * 3)
    arg_7 = [0] * (arg_2 * arg_1 * 2)

    arg_8, arg_9, arg_10 = 0, 0, 0
    for arg_11 in range(arg_2):
        for arg_12 in range(arg_1):
            arg_13 = math.sin(-math.pi / 2 + math.pi * arg_11 * arg_3)
            arg_14 = math.cos(2 * math.pi * arg_12 * arg_4) * math.sin(math.pi * arg_11 * arg_3)
            arg_15 = math.sin(2 * math.pi * arg_12 * arg_4) * math.sin(math.pi * arg_11 * arg_3)

            arg_7[arg_10] = arg_12 * arg_4
            arg_7[arg_10 + 1] = arg_11 * arg_3

            arg_5[arg_8] = arg_14 * arg_0
            arg_5[arg_8 + 1] = arg_13 * arg_0
            arg_5[arg_8 + 2] = arg_15 * arg_0

            arg_6[arg_9] = arg_14
            arg_6[arg_9 + 1] = arg_13
            arg_6[arg_9 + 2] = arg_15

            arg_10 += 2
            arg_8 += 3
            arg_9 += 3

    arg_16 = [0] * arg_2 * arg_1 * 6
    arg_17 = 0
    for arg_11 in range(arg_2 - 1):
        for arg_12 in range(arg_1 - 1):
            arg_16[arg_17] = arg_11 * arg_1 + arg_12
            arg_16[arg_17 + 1] = (arg_11 + 1) * arg_1 + (arg_12 + 1)
            arg_16[arg_17 + 2] = arg_11 * arg_1 + (arg_12 + 1)

            arg_16[arg_17 + 3] = arg_11 * arg_1 + arg_12
            arg_16[arg_17 + 4] = (arg_11 + 1) * arg_1 + arg_12
            arg_16[arg_17 + 5] = (arg_11 + 1) * arg_1 + (arg_12 + 1)
            arg_17 += 6

    arg_18 = numpy.array(arg_5, dtype=numpy.float32)
    arg_19 = numpy.array(arg_6, dtype=numpy.float32)
    arg_20 = numpy.array(arg_7, dtype=numpy.float32)
    arg_21 = numpy.array(arg_16, dtype=numpy.uint32)

    arg_22 = VAO("Func", mode=mlg.TRIANGLES)
    # VBOs
    arg_22.buffer(arg_18, '3f', ['in_position'])
    arg_22.buffer(arg_19, '3f', ['in_normal'])
    arg_22.buffer(arg_20, '2f', ['in_uv'])
    arg_22.index_buffer(arg_21, index_element_size=4)

    return arg_22

Creates a sphere.

    Keyword Args:
        radius (float): Radius or the sphere
        rings (int): number or horizontal rings
        sectors (int): number of vertical segments

    Returns:
        A :py:class:`demosys.opengl.vao.VAO` instance


def Func ( arg_0 ) : arg_1 = arg_0 . direction if arg_1 == DIRECTION . IN : return arg_0 . dst elif arg_1 == DIRECTION . OUT : return arg_0 . src else : raise NotImplementedError ( arg_1 )

def Func(arg_0):
        """
        return signal inside unit which has this port
        """
        arg_1 = arg_0.direction
        if arg_1 == DIRECTION.IN:
            return arg_0.dst
        elif arg_1 == DIRECTION.OUT:
            return arg_0.src
        else:
            raise NotImplementedError(arg_1)


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = np . sqrt ( arg_1 * arg_1 + arg_0 * arg_0 * np . cos ( np . radians ( arg_2 ) ) * np . cos ( np . radians ( arg_2 ) ) ) return arg_3

def Func(arg_0, arg_1, arg_2):

    '''This calculates the total proper motion of an object.

    Parameters
    ----------

    pmra : float or array-like
        The proper motion(s) in right ascension, measured in mas/yr.

    pmdecl : float or array-like
        The proper motion(s) in declination, measured in mas/yr.

    decl : float or array-like
        The declination of the object(s) in decimal degrees.

    Returns
    -------

    float or array-like
        The total proper motion(s) of the object(s) in mas/yr.

    '''

    arg_3 = np.sqrt( arg_1*arg_1 + arg_0*arg_0*np.cos(np.radians(arg_2)) *
                  np.cos(np.radians(arg_2)) )
    return arg_3

This calculates the total proper motion of an object .


def Func ( arg_0 ) : arg_0 . patchlines = [ ] arg_0 . patch2line = dict ( ) if arg_0 . exists ( ) : with open ( arg_0 . series_file , "r" ) as f : for arg_3 in f : arg_0 . add_patch ( arg_3 )

def Func(arg_0):
        """ Reads all patches from the series file """
        arg_0.patchlines = []
        arg_0.patch2line = dict()
        if arg_0.exists():
            with open(arg_0.series_file, "r") as f:
                for arg_3 in f:
                    arg_0.add_patch(arg_3)


def Func ( arg_0 ) : arg_1 = arg_0 . plain_dict ( ) _apply_env_overrides ( env_overrides_for_app_or_service ( arg_0 . name ) , arg_1 ) arg_1 . setdefault ( 'volumes' , [ ] ) . append ( _get_cp_volume_mount ( arg_0 . name ) ) arg_1 [ 'container_name' ] = "dusty_{}_1" . format ( arg_0 . name ) return arg_1

def Func(arg_0):
    """This function returns a dictionary of the docker_compose specifications
    for one service. Currently, this is just the Dusty service spec with
    an additional volume mount to support Dusty's cp functionality."""
    arg_1 = arg_0.plain_dict()
    _apply_env_overrides(env_overrides_for_app_or_service(arg_0.name), arg_1)
    arg_1.setdefault('volumes', []).append(_get_cp_volume_mount(arg_0.name))
    arg_1['container_name'] = "dusty_{}_1".format(arg_0.name)
    return arg_1

This function returns a dictionary of the docker_compose specifications for one service . Currently this is just the Dusty service spec with an additional volume mount to support Dusty s cp functionality .


def Func(arg_0):
    """Converts py_zipkin's Endpoint to Protobuf's Endpoint.

    :param endpoint: py_zipkins' endpoint to convert.
    :type endpoint: py_zipkin.encoding.Endpoint
    :return: corresponding protobuf's endpoint.
    :rtype: zipkin_pb2.Endpoint
    """
    arg_1 = zipkin_pb2.Endpoint()

    if arg_0.service_name:
        arg_1.service_name = arg_0.service_name
    if arg_0.port and arg_0.port != 0:
        arg_1.port = arg_0.port
    if arg_0.ipv4:
        arg_1.ipv4 = socket.inet_pton(socket.AF_INET, arg_0.ipv4)
    if arg_0.ipv6:
        arg_1.ipv6 = socket.inet_pton(socket.AF_INET6, arg_0.ipv6)

    return arg_1

Converts py_zipkin s Endpoint to Protobuf s Endpoint .


(dir_, in_filters=None, out_filters=None, recursive=True, include_root_dir=True, standard_paths=False)

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = True , arg_4 = True , arg_5 = False ) : if arg_1 is None : arg_1 = [ '*' ] if arg_2 is None : arg_2 = [ ] arg_6 = [ ] for arg_7 , arg_8 , arg_9 in os . walk ( arg_0 ) : for arg_10 in arg_8 [ : ] : if MatchMasks ( arg_10 , arg_2 ) : arg_8 . remove ( arg_10 ) for arg_11 in arg_8 + arg_9 : if MatchMasks ( arg_11 , arg_1 ) and not MatchMasks ( arg_11 , arg_2 ) : arg_6 . append ( os . path . join ( arg_7 , arg_11 ) ) if not arg_3 : break if not arg_4 : arg_12 = len ( arg_0 ) + 1 arg_6 = [ file [ arg_12 : ] for file in arg_6 ] if arg_5 : arg_6 = map ( StandardizePath , arg_6 ) return arg_6

def Func(arg_0, arg_1=None, arg_2=None, arg_3=True, arg_4=True, arg_5=False):
    '''
    Searches for files in a given directory that match with the given patterns.

    :param str dir_: the directory root, to search the files.
    :param list(str) in_filters: a list with patterns to match (default = all). E.g.: ['*.py']
    :param list(str) out_filters: a list with patterns to ignore (default = none). E.g.: ['*.py']
    :param bool recursive: if True search in subdirectories, otherwise, just in the root.
    :param bool include_root_dir: if True, includes the directory being searched in the returned paths
    :param bool standard_paths: if True, always uses unix path separators "/"
    :return list(str):
        A list of strings with the files that matched (with the full path in the filesystem).
    '''
    # all files
    if arg_1 is None:
        arg_1 = ['*']

    if arg_2 is None:
        arg_2 = []

    arg_6 = []

    # maintain just files that don't have a pattern that match with out_filters
    # walk through all directories based on dir
    for arg_7, arg_8, arg_9 in os.walk(arg_0):

        for arg_10 in arg_8[:]:
            if MatchMasks(arg_10, arg_2):
                arg_8.remove(arg_10)

        for arg_11 in arg_8 + arg_9:
            if MatchMasks(arg_11, arg_1) and not MatchMasks(arg_11, arg_2):
                arg_6.append(os.path.join(arg_7, arg_11))

        if not arg_3:
            break

    if not arg_4:
        # Remove root dir from all paths
        arg_12 = len(arg_0) + 1
        arg_6 = [file[arg_12:] for file in arg_6]

    if arg_5:
        arg_6 = map(StandardizePath, arg_6)

    return arg_6

Searches for files in a given directory that match with the given patterns .


def Func ( arg_0 , arg_1 ) : arg_2 = json . loads ( arg_1 ) return arg_0 . api . data . post ( arg_2 )

def Func(arg_0, arg_1):
        """POST JSON data object to server"""

        arg_2 = json.loads(arg_1)
        return arg_0.api.data.post(arg_2)


(
        self, term, name_mode, rules, final_rules1, final_rules2, concat
    )

return self._phonetic(
            term,
            name_mode,
            rules,
            final_rules1,
            final_rules2,
            language_arg,
            concat,
        )

def Func(
        arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6
    ):
        """Reassess the language of the terms and call the phonetic encoder.

        Uses a split multi-word term.

        Parameters
        ----------
        term : str
            The term to encode via Beider-Morse
        name_mode : str
            The name mode of the algorithm: ``gen`` (default),
            ``ash`` (Ashkenazi), or ``sep`` (Sephardic)
        rules : tuple
            The set of initial phonetic transform regexps
        final_rules1 : tuple
            The common set of final phonetic transform regexps
        final_rules2 : tuple
            The specific set of final phonetic transform regexps
        concat : bool
            A flag to indicate concatenation

        Returns
        -------
        str
            A Beider-Morse phonetic code

        """
        arg_7 = arg_0._language(arg_1, arg_2)
        return arg_0._phonetic(
            arg_1,
            arg_2,
            arg_3,
            arg_4,
            arg_5,
            arg_7,
            arg_6,
        )

Reassess the language of the terms and call the phonetic encoder .


def
Func
(
arg_0
,
arg_1
,
Func
,
arg_3
=
)
:
del
arg_3
arg_4
=
get_object
(
arg_0
.
model
,
arg_1
[
'_id'
]
,
pk
=
this
.
user_id
,
)
arg_5
=
arg_0
.
deserialize_profile
(
Func
[
'$set'
]
,
key_prefix
=
'profile.'
,
pop
=
True
,
)
if
len
(
Func
[
'$set'
]
)
!=
0
:
raise
MeteorError
(
400
,
'Invalid update fields: %r'
)
for
arg_6
,
arg_7
in
arg_5
.
items
(
)
:
setattr
(
arg_4
,
arg_6
,
arg_7
)
arg_4
.
save
(
)

def Func(arg_0, arg_1, Func, arg_3=None):
        """Update user data."""
        # we're ignoring the `options` argument at this time
        del arg_3
        arg_4 = get_object(
            arg_0.model, arg_1['_id'],
            pk=this.user_id,
        )
        arg_5 = arg_0.deserialize_profile(
            Func['$set'], key_prefix='profile.', pop=True,
        )
        if len(Func['$set']) != 0:
            raise MeteorError(400, 'Invalid update fields: %r')

        for arg_6, arg_7 in arg_5.items():
            setattr(arg_4, arg_6, arg_7)
        arg_4.save()


return {
            user.id: user for user in users
        }

def Func ( arg_0 ) : arg_1 = User . objects . filter ( id__in = [ grade . user_id for grade in arg_0 ] ) return { arg_2 . id : arg_2 for arg_2 in arg_1 }

def Func(arg_0):
        """
        Prefetch Users from the list of user_ids present in the persistent_course_grades.

        Arguments:
            persistent_course_grades (list): A list of PersistentCourseGrade.

        Returns:
            (dict): A dictionary containing user_id to user mapping.
        """
        arg_1 = User.objects.filter(
            id__in=[grade.user_id for grade in arg_0]
        )
        return {
            arg_2.id: arg_2 for arg_2 in arg_1
        }

Prefetch Users from the list of user_ids present in the persistent_course_grades .