def Func ( arg_0 ) : arg_1 = arg_0 . values [ arg_0 . target ] arg_2 = CountingProbDist ( arg_1 ) arg_3 = dict ( ( ( gv , arg_6 ) , CountingProbDist ( arg_0 . values [ arg_6 ] ) ) for gv in arg_1 for arg_6 in arg_0 . inputs ) for arg_4 in arg_0 . examples : arg_5 = arg_4 [ arg_0 . target ] arg_2 . add ( arg_5 ) for arg_6 in arg_0 . inputs : arg_3 [ arg_5 , arg_6 ] . add ( arg_4 [ arg_6 ] ) def predict ( arg_4 ) : def class_probability ( arg_5 ) : return ( arg_2 [ arg_5 ] * product ( arg_3 [ arg_5 , arg_6 ] [ arg_4 [ arg_6 ] ] for arg_6 in arg_0 . inputs ) ) return argmax ( arg_1 , class_probability ) return predict

def Func(arg_0):
    """Just count how many times each value of each input attribute
    occurs, conditional on the target value. Count the different
    target values too."""

    arg_1 = arg_0.values[arg_0.target]
    arg_2 = CountingProbDist(arg_1)
    arg_3 = dict(((gv, arg_6), CountingProbDist(arg_0.values[arg_6]))
                      for gv in arg_1
                      for arg_6 in arg_0.inputs)
    for arg_4 in arg_0.examples:
        arg_5 = arg_4[arg_0.target]
        arg_2.add(arg_5)
        for arg_6 in arg_0.inputs:
            arg_3[arg_5, arg_6].add(arg_4[arg_6])

    def predict(arg_4):
        """Predict the target value for example. Consider each possible value,
        and pick the most likely by looking at each attribute independently."""
        def class_probability(arg_5):
            return (arg_2[arg_5]
                    * product(arg_3[arg_5, arg_6][arg_4[arg_6]]
                              for arg_6 in arg_0.inputs))
        return argmax(arg_1, class_probability)

    return predict

Just count how many times each value of each input attribute occurs conditional on the target value . Count the different target values too .


def Func(arg_0, arg_1=False):
    """Instantiate and Funcs backends.

    :arg list-of-dicts backends: the backend configuration as a list of dicts where
        each dict specifies a separate backend.

        Each backend dict consists of two things:

        1. ``class`` with a value that is either a Python class or a dotted
           Python path to one

        2. ``options`` dict with options for the backend in question to
           Func it

        See the documentation for the backends you're using to know what is
        configurable in the options dict.

    :arg raise_errors bool: whether or not to raise an exception if something
        happens in configuration; if it doesn't raise an exception, it'll log
        the exception

    For example, this sets up a
    :py:class:`markus.backends.logging.LoggingMetrics` backend::

        markus.Func([
            {
                'class': 'markus.backends.logging.LoggingMetrics',
                'options': {
                    'logger_name': 'metrics'
                }
            }
        ])

    You can set up as many backends as you like.

    .. Note::

       During application startup, Markus should get Funcd before the app
       starts generating metrics. Any metrics generated before Markus is
       Funcd will get dropped.

       However, anything can call :py:func:`markus.get_metrics` and get a
       :py:class:`markus.main.MetricsInterface` before Markus has been
       Funcd including at module load time.

    """
    arg_2 = []

    for arg_3 in arg_0:
        arg_4 = arg_3['class']
        arg_5 = arg_3.get('options', {})

        if isinstance(arg_4, str):
            arg_6, arg_7 = split_clspath(arg_4)
            try:
                __import__(arg_6)
                arg_8 = sys.modules[arg_6]
                arg_9 = getattr(arg_8, arg_7)
            except Exception:
                logger.exception('Exception while importing %s', arg_4)
                if arg_1:
                    raise
                continue
        else:
            arg_9 = arg_4

        try:
            arg_2.append(arg_9(arg_5))
        except Exception:
            logger.exception(
                'Exception thrown while instantiating %s, %s',
                arg_4,
                arg_5
            )
            if arg_1:
                raise

    _change_metrics(arg_2)

Instantiate and configures backends.

    :arg list-of-dicts backends: the backend configuration as a list of dicts where
        each dict specifies a separate backend.

        Each backend dict consists of two things:

        1. ``class`` with a value that is either a Python class or a dotted
           Python path to one

        2. ``options`` dict with options for the backend in question to
           configure it

        See the documentation for the backends you're using to know what is
        configurable in the options dict.

    :arg raise_errors bool: whether or not to raise an exception if something
        happens in configuration; if it doesn't raise an exception, it'll log
        the exception

    For example, this sets up a
    :py:class:`markus.backends.logging.LoggingMetrics` backend::

        markus.configure([
            {
                'class': 'markus.backends.logging.LoggingMetrics',
                'options': {
                    'logger_name': 'metrics'
                }
            }
        ])

    You can set up as many backends as you like.

    .. Note::

       During application startup, Markus should get configured before the app
       starts generating metrics. Any metrics generated before Markus is
       configured will get dropped.

       However, anything can call :py:func:`markus.get_metrics` and get a
       :py:class:`markus.main.MetricsInterface` before Markus has been
       configured including at module load time.


def Func(arg_0, arg_1, arg_2):
    '''Sync directory to directory.'''
    arg_3 = S3URL.is_valid(arg_1)
    arg_4 = S3URL.is_valid(arg_2)

    arg_5 = arg_0.relative_dir_walk(arg_1)
    if len(arg_5) == 0 or '.' in arg_5:
      raise Failure('Sync command need to sync directory to directory.')

    arg_6 = [(os.path.join(arg_1, arg_12), os.path.join(arg_2, arg_12)) for arg_12 in arg_5]

    arg_7 = ThreadPool(ThreadUtil, arg_0.opt)
    if arg_3 and not arg_4:
      for arg_8, arg_9 in arg_6:
        arg_7.download(arg_8, arg_9)
    elif not arg_3 and arg_4:
      for arg_8, arg_9 in arg_6:
        arg_7.upload(arg_8, arg_9)
    elif arg_3 and arg_4:
      for arg_8, arg_9 in arg_6:
        arg_7.copy(arg_8, arg_9)
    else:
      raise InvalidArgument('Cannot sync two local directories.')
    arg_7.join()

    if arg_0.opt.delete_removed:
      arg_10 = arg_0.relative_dir_walk(arg_2)
      arg_11 = [os.path.join(arg_2, arg_12) for arg_12 in (set(arg_10) - set(arg_5))]

      if S3URL.is_valid(arg_2):
        arg_7 = ThreadPool(ThreadUtil, arg_0.opt)
        arg_7.batch_delete(arg_11)
        arg_7.join()
      else:
        for arg_12 in arg_11:
          try:
            os.unlink(arg_12)
            message('Delete %s', arg_12)
          except:
            pass


def Func ( arg_0 , arg_1 = False ) : arg_2 = arg_0 . user_config_file ( ) if not arg_1 and os . path . exists ( arg_2 ) : return with io . open ( arg_2 , mode = 'wb' ) as f : arg_0 . default_config . write ( f )

def Func(arg_0, arg_1=False):
        """Write the default config to the user's config file.

        :param bool overwrite: Write over an existing config if it exists.
        """
        arg_2 = arg_0.user_config_file()
        if not arg_1 and os.path.exists(arg_2):
            return

        with io.open(arg_2, mode='wb') as f:
            arg_0.default_config.write(f)

Write the default config to the user s config file .


def Func(arg_0, arg_1):
        """ Called when Func messages arrive.

        Args:
            messages (tuple): Messages (each message is a dict)
        """
        if arg_0._observers:
            arg_2 = arg_0._room.get_campfire()
            for arg_3 in arg_1:
                for arg_4 in arg_0._observers:
                    arg_4(Message(arg_2, arg_3))

Called when incoming messages arrive.

        Args:
            messages (tuple): Messages (each message is a dict)


def Func ( arg_0 , arg_1 ) : if isinstance ( arg_0 , list ) : return any ( re . search ( arg_1 , str ( arg_2 ) , re . I ) for arg_2 in arg_0 ) else : return re . search ( arg_1 , str ( arg_0 ) , re . I )

def Func(arg_0, arg_1):
	"""Check a song metadata field value for a pattern."""

	if isinstance(arg_0, list):
		return any(re.search(arg_1, str(arg_2), re.I) for arg_2 in arg_0)
	else:
		return re.search(arg_1, str(arg_0), re.I)

Check a song metadata field value for a pattern .


def Func ( arg_0 , arg_1 ) : arg_2 = QtCore . QSettings ( arg_1 , QtCore . QSettings . IniFormat ) for arg_3 , arg_4 in arg_0 . iteritems ( ) : arg_2 . setValue ( arg_3 , arg_4 )

def Func(arg_0, arg_1):
    """
    Export the given settings instance to the given file system path.

    type settings: IDASettingsInterface
    type config_path: str
    """
    arg_2 = QtCore.QSettings(arg_1, QtCore.QSettings.IniFormat)
    for arg_3, arg_4 in arg_0.iteritems():
        arg_2.setValue(arg_3, arg_4)

Export the given settings instance to the given file system path .


def
Func
(
arg_0
,
arg_1
,
arg_2
,
**
arg_3
)
:
if
arg_1
is
not
:
if
len
(
arg_1
)
<
arg_2
:
raise
ParameterError
(
'Coordinate shape mismatch: '
'{}<{}'
.
format
(
len
(
arg_1
)
,
arg_2
)
)
return
arg_1
arg_4
=
{
'linear'
:
__coord_fft_hz
,
'hz'
:
__coord_fft_hz
,
'log'
:
__coord_fft_hz
,
'mel'
:
__coord_mel_hz
,
'cqt'
:
__coord_cqt_hz
,
'cqt_hz'
:
__coord_cqt_hz
,
'cqt_note'
:
__coord_cqt_hz
,
'chroma'
:
__coord_chroma
,
'time'
:
__coord_time
,
's'
:
__coord_time
,
'ms'
:
__coord_time
,
'lag'
:
__coord_time
,
'lag_s'
:
__coord_time
,
'lag_ms'
:
__coord_time
,
'tonnetz'
:
__coord_n
,
'off'
:
__coord_n
,
'tempo'
:
__coord_tempo
,
'frames'
:
__coord_n
,
:
__coord_n
}
if
arg_0
not
in
arg_4
:
raise
ParameterError
(
'Unknown axis type: {}'
.
format
(
arg_0
)
)
return
arg_4
[
arg_0
]
(
arg_2
,
**
arg_3
)

def Func(arg_0, arg_1, arg_2, **arg_3):
    '''Compute axis coordinates'''

    if arg_1 is not None:
        if len(arg_1) < arg_2:
            raise ParameterError('Coordinate shape mismatch: '
                                 '{}<{}'.format(len(arg_1), arg_2))
        return arg_1

    arg_4 = {'linear': __coord_fft_hz,
                 'hz': __coord_fft_hz,
                 'log': __coord_fft_hz,
                 'mel': __coord_mel_hz,
                 'cqt': __coord_cqt_hz,
                 'cqt_hz': __coord_cqt_hz,
                 'cqt_note': __coord_cqt_hz,
                 'chroma': __coord_chroma,
                 'time': __coord_time,
                 's': __coord_time,
                 'ms': __coord_time,
                 'lag': __coord_time,
                 'lag_s': __coord_time,
                 'lag_ms': __coord_time,
                 'tonnetz': __coord_n,
                 'off': __coord_n,
                 'tempo': __coord_tempo,
                 'frames': __coord_n,
                 None: __coord_n}

    if arg_0 not in arg_4:
        raise ParameterError('Unknown axis type: {}'.format(arg_0))
    return arg_4[arg_0](arg_2, **arg_3)


def Func ( arg_0 , arg_1 , arg_2 , * arg_3 ) : arg_3 = list_or_args ( arg_2 , arg_3 ) arg_4 = arg_0 . sunion ( * arg_3 ) if arg_4 is not set ( [ ] ) : return arg_0 . sadd ( arg_1 , * list ( arg_4 ) ) return 0

def Func(arg_0, arg_1, arg_2, *arg_3):
        """
        Store the union of sets ``src``,  ``args`` into a new
        set named ``dest``.  Returns the number of keys in the new set.
        """
        arg_3 = list_or_args(arg_2, arg_3)
        arg_4 = arg_0.sunion(*arg_3)
        if arg_4 is not set([]):
            return arg_0.sadd(arg_1, *list(arg_4))
        return 0

Store the union of sets src args into a new set named dest . Returns the number of keys in the new set .


def Func ( arg_0 ) : arg_0 . _generate_config ( ) arg_1 = arg_0 . _get_config_path ( ) with open ( arg_1 , 'r' ) as readable : arg_2 = readable . read ( ) os . remove ( arg_1 ) return arg_2

def Func(arg_0):
        """
        Returns the config file contents as a string. The config file is generated and then deleted.
        """
        arg_0._generate_config()
        arg_1 = arg_0._get_config_path()
        with open(arg_1, 'r') as readable:
            arg_2 = readable.read()
        os.remove(arg_1)
        return arg_2

Returns the config file contents as a string . The config file is generated and then deleted .


(y=None, sr=22050, onset_envelope=None, hop_length=512,
               start_bpm=120.0, tightness=100, trim=True, bpm=None,
               units='frames')

def
Func
(
arg_0
=
,
arg_1
=
22050
,
arg_2
=
,
arg_3
=
512
,
arg_4
=
120.0
,
arg_5
=
100
,
arg_6
=
True
,
arg_7
=
,
arg_8
=
'frames'
)
:
if
arg_2
is
:
if
arg_0
is
:
raise
ParameterError
(
'y or onset_envelope must be provided'
)
arg_2
=
onset
.
onset_strength
(
arg_0
=
arg_0
,
arg_1
=
arg_1
,
arg_3
=
arg_3
,
aggregate
=
np
.
median
)
if
not
arg_2
.
any
(
)
:
return
(
0
,
np
.
array
(
[
]
,
dtype
=
int
)
)
if
arg_7
is
:
arg_7
=
tempo
(
arg_2
=
arg_2
,
arg_1
=
arg_1
,
arg_3
=
arg_3
,
arg_4
=
arg_4
)
[
0
]
arg_9
=
__Funcer
(
arg_2
,
arg_7
,
float
(
arg_1
)
/
arg_3
,
arg_5
,
arg_6
)
if
arg_8
==
'frames'
:
pass
elif
arg_8
==
'samples'
:
arg_9
=
core
.
frames_to_samples
(
arg_9
,
arg_3
=
arg_3
)
elif
arg_8
==
'time'
:
arg_9
=
core
.
frames_to_time
(
arg_9
,
arg_3
=
arg_3
,
arg_1
=
arg_1
)
else
:
raise
ParameterError
(
'Invalid unit type: {}'
.
format
(
arg_8
)
)
return
(
arg_7
,
arg_9
)

def Func(arg_0=None, arg_1=22050, arg_2=None, arg_3=512,
               arg_4=120.0, arg_5=100, arg_6=True, arg_7=None,
               arg_8='frames'):
    r'''Dynamic programming beat tracker.

    Beats are detected in three stages, following the method of [1]_:
      1. Measure onset strength
      2. Estimate tempo from onset correlation
      3. Pick peaks in onset strength approximately consistent with estimated
         tempo

    .. [1] Ellis, Daniel PW. "Beat tracking by dynamic programming."
           Journal of New Music Research 36.1 (2007): 51-60.
           http://labrosa.ee.columbia.edu/projects/beattrack/

    Parameters
    ----------

    y : np.ndarray [shape=(n,)] or None
        audio time series

    sr : number > 0 [scalar]
        sampling rate of `y`

    onset_envelope : np.ndarray [shape=(n,)] or None
        (optional) pre-computed onset strength envelope.

    hop_length : int > 0 [scalar]
        number of audio samples between successive `onset_envelope` values

    start_bpm  : float > 0 [scalar]
        initial guess for the tempo estimator (in beats per minute)

    tightness  : float [scalar]
        tightness of beat distribution around tempo

    trim       : bool [scalar]
        trim leading/trailing beats with weak onsets

    bpm        : float [scalar]
        (optional) If provided, use `bpm` as the tempo instead of
        estimating it from `onsets`.

    units : {'frames', 'samples', 'time'}
        The units to encode detected beat events in.
        By default, 'frames' are used.

    Returns
    -------

    tempo : float [scalar, non-negative]
        estimated global tempo (in beats per minute)

    beats : np.ndarray [shape=(m,)]
        estimated beat event locations in the specified units
        (default is frame indices)

    .. note::
        If no onset strength could be detected, Funcer estimates 0 BPM
        and returns an empty list.

    Raises
    ------
    ParameterError
        if neither `y` nor `onset_envelope` are provided

        or if `units` is not one of 'frames', 'samples', or 'time'

    See Also
    --------
    librosa.onset.onset_strength

    Examples
    --------
    Track beats using time series input

    >>> y, sr = librosa.load(librosa.util.example_audio_file())

    >>> tempo, beats = librosa.beat.Func(y=y, sr=sr)
    >>> tempo
    64.599609375

    Print the first 20 beat frames

    >>> beats[:20]
    array([ 320,  357,  397,  436,  480,  525,  569,  609,  658,
            698,  737,  777,  817,  857,  896,  936,  976, 1016,
           1055, 1095])

    Or print them as timestamps

    >>> librosa.frames_to_time(beats[:20], sr=sr)
    array([  7.43 ,   8.29 ,   9.218,  10.124,  11.146,  12.19 ,
            13.212,  14.141,  15.279,  16.208,  17.113,  18.042,
            18.971,  19.9  ,  20.805,  21.734,  22.663,  23.591,
            24.497,  25.426])

    Track beats using a pre-computed onset envelope

    >>> onset_env = librosa.onset.onset_strength(y, sr=sr,
    ...                                          aggregate=np.median)
    >>> tempo, beats = librosa.beat.Func(onset_envelope=onset_env,
    ...                                        sr=sr)
    >>> tempo
    64.599609375
    >>> beats[:20]
    array([ 320,  357,  397,  436,  480,  525,  569,  609,  658,
            698,  737,  777,  817,  857,  896,  936,  976, 1016,
           1055, 1095])

    Plot the beat events against the onset strength envelope

    >>> import matplotlib.pyplot as plt
    >>> hop_length = 512
    >>> plt.figure(figsize=(8, 4))
    >>> times = librosa.frames_to_time(np.arange(len(onset_env)),
    ...                                sr=sr, hop_length=hop_length)
    >>> plt.plot(times, librosa.util.normalize(onset_env),
    ...          label='Onset strength')
    >>> plt.vlines(times[beats], 0, 1, alpha=0.5, color='r',
    ...            linestyle='--', label='Beats')
    >>> plt.legend(frameon=True, framealpha=0.75)
    >>> # Limit the plot to a 15-second window
    >>> plt.xlim(15, 30)
    >>> plt.gca().xaxis.set_major_formatter(librosa.display.TimeFormatter())
    >>> plt.tight_layout()
    '''

    # First, get the frame->beat strength profile if we don't already have one
    if arg_2 is None:
        if arg_0 is None:
            raise ParameterError('y or onset_envelope must be provided')

        arg_2 = onset.onset_strength(arg_0=arg_0,
                                              arg_1=arg_1,
                                              arg_3=arg_3,
                                              aggregate=np.median)

    # Do we have any onsets to grab?
    if not arg_2.any():
        return (0, np.array([], dtype=int))

    # Estimate BPM if one was not provided
    if arg_7 is None:
        arg_7 = tempo(arg_2=arg_2,
                    arg_1=arg_1,
                    arg_3=arg_3,
                    arg_4=arg_4)[0]

    # Then, run the tracker
    arg_9 = __Funcer(arg_2,
                           arg_7,
                           float(arg_1) / arg_3,
                           arg_5,
                           arg_6)

    if arg_8 == 'frames':
        pass
    elif arg_8 == 'samples':
        arg_9 = core.frames_to_samples(arg_9, arg_3=arg_3)
    elif arg_8 == 'time':
        arg_9 = core.frames_to_time(arg_9, arg_3=arg_3, arg_1=arg_1)
    else:
        raise ParameterError('Invalid unit type: {}'.format(arg_8))

    return (arg_7, arg_9)

r'''Dynamic programming beat tracker.

    Beats are detected in three stages, following the method of [1]_:
      1. Measure onset strength
      2. Estimate tempo from onset correlation
      3. Pick peaks in onset strength approximately consistent with estimated
         tempo

    .. [1] Ellis, Daniel PW. "Beat tracking by dynamic programming."
           Journal of New Music Research 36.1 (2007): 51-60.
           http://labrosa.ee.columbia.edu/projects/beattrack/

    Parameters
    ----------

    y : np.ndarray [shape=(n,)] or None
        audio time series

    sr : number > 0 [scalar]
        sampling rate of `y`

    onset_envelope : np.ndarray [shape=(n,)] or None
        (optional) pre-computed onset strength envelope.

    hop_length : int > 0 [scalar]
        number of audio samples between successive `onset_envelope` values

    start_bpm  : float > 0 [scalar]
        initial guess for the tempo estimator (in beats per minute)

    tightness  : float [scalar]
        tightness of beat distribution around tempo

    trim       : bool [scalar]
        trim leading/trailing beats with weak onsets

    bpm        : float [scalar]
        (optional) If provided, use `bpm` as the tempo instead of
        estimating it from `onsets`.

    units : {'frames', 'samples', 'time'}
        The units to encode detected beat events in.
        By default, 'frames' are used.

    Returns
    -------

    tempo : float [scalar, non-negative]
        estimated global tempo (in beats per minute)

    beats : np.ndarray [shape=(m,)]
        estimated beat event locations in the specified units
        (default is frame indices)

    .. note::
        If no onset strength could be detected, beat_tracker estimates 0 BPM
        and returns an empty list.

    Raises
    ------
    ParameterError
        if neither `y` nor `onset_envelope` are provided

        or if `units` is not one of 'frames', 'samples', or 'time'

    See Also
    --------
    librosa.onset.onset_strength

    Examples
    --------
    Track beats using time series input

    >>> y, sr = librosa.load(librosa.util.example_audio_file())

    >>> tempo, beats = librosa.beat.beat_track(y=y, sr=sr)
    >>> tempo
    64.599609375

    Print the first 20 beat frames

    >>> beats[:20]
    array([ 320,  357,  397,  436,  480,  525,  569,  609,  658,
            698,  737,  777,  817,  857,  896,  936,  976, 1016,
           1055, 1095])

    Or print them as timestamps

    >>> librosa.frames_to_time(beats[:20], sr=sr)
    array([  7.43 ,   8.29 ,   9.218,  10.124,  11.146,  12.19 ,
            13.212,  14.141,  15.279,  16.208,  17.113,  18.042,
            18.971,  19.9  ,  20.805,  21.734,  22.663,  23.591,
            24.497,  25.426])

    Track beats using a pre-computed onset envelope

    >>> onset_env = librosa.onset.onset_strength(y, sr=sr,
    ...                                          aggregate=np.median)
    >>> tempo, beats = librosa.beat.beat_track(onset_envelope=onset_env,
    ...                                        sr=sr)
    >>> tempo
    64.599609375
    >>> beats[:20]
    array([ 320,  357,  397,  436,  480,  525,  569,  609,  658,
            698,  737,  777,  817,  857,  896,  936,  976, 1016,
           1055, 1095])

    Plot the beat events against the onset strength envelope

    >>> import matplotlib.pyplot as plt
    >>> hop_length = 512
    >>> plt.figure(figsize=(8, 4))
    >>> times = librosa.frames_to_time(np.arange(len(onset_env)),
    ...                                sr=sr, hop_length=hop_length)
    >>> plt.plot(times, librosa.util.normalize(onset_env),
    ...          label='Onset strength')
    >>> plt.vlines(times[beats], 0, 1, alpha=0.5, color='r',
    ...            linestyle='--', label='Beats')
    >>> plt.legend(frameon=True, framealpha=0.75)
    >>> # Limit the plot to a 15-second window
    >>> plt.xlim(15, 30)
    >>> plt.gca().xaxis.set_major_formatter(librosa.display.TimeFormatter())
    >>> plt.tight_layout()


(self, slug, name, dataobj, xfield, yfield, time_unit=None,
            chart_type="line", width=800,
            height=300, color=Color(), size=Size(),
            scale=Scale(zero=False), shape=Shape(), filepath=None,
            html_before="", html_after="")

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6=None,
            arg_7="line", arg_8=800,
            arg_9=300, arg_10=arg_11(), arg_12=arg_13(),
            arg_14=arg_15(arg_16=False), arg_17=arg_18(), arg_19=None,
            arg_20="", arg_21=""):
        """
        Generates an html chart from either a pandas dataframe, a dictionnary,
        a list or an Altair Data object and optionally write it to a file
        """
        arg_22 = arg_0.serialize(arg_3, arg_4, arg_5, arg_6,
                                   arg_7, arg_8, arg_9, arg_10, arg_12, arg_14, arg_17)
        arg_23 = arg_0.html(arg_1, arg_2, arg_22, arg_19,
                         arg_20, arg_21)
        return arg_23

Generates an html chart from either a pandas dataframe a dictionnary a list or an Altair Data object and optionally write it to a file


def Func(arg_0):
        """
        The Func value in the most recent solution.

        Flux is the primal value of the corresponding variable in the model.

        Warnings
        --------
        * Accessing reaction Funces through a `Solution` object is the safer,
          preferred, and only guaranteed to be correct way. You can see how to
          do so easily in the examples.
        * Reaction Func is retrieved from the currently defined
          `self._model.solver`. The solver status is checked but there are no
          guarantees that the current solver state is the one you are looking
          for.
        * If you modify the underlying model after an optimization, you will
          retrieve the old optimization values.

        Raises
        ------
        RuntimeError
            If the underlying model was never optimized beforehand or the
            reaction is not part of a model.
        OptimizationError
            If the solver status is anything other than 'optimal'.
        AssertionError
            If the Func value is not within the bounds.

        Examples
        --------
        >>> import cobra.test
        >>> model = cobra.test.create_test_model("textbook")
        >>> solution = model.optimize()
        >>> model.reactions.PFK.Func
        7.477381962160283
        >>> solution.Funces.PFK
        7.4773819621602833
        """
        try:
            check_solver_status(arg_0._model.solver.status)
            return arg_0.forward_variable.primal - arg_0.reverse_variable.primal
        except AttributeError:
            raise RuntimeError(
                "reaction '{}' is not part of a model".format(arg_0.id))
        # Due to below all-catch, which sucks, need to reraise these.
        except (RuntimeError, OptimizationError) as err:
            raise_with_traceback(err)
        # Would love to catch CplexSolverError and GurobiError here.
        except Exception as err:
            raise_from(OptimizationError(
                "Likely no solution exists. Original solver message: {}."
                "".format(str(err))), err)

The flux value in the most recent solution.

        Flux is the primal value of the corresponding variable in the model.

        Warnings
        --------
        * Accessing reaction fluxes through a `Solution` object is the safer,
          preferred, and only guaranteed to be correct way. You can see how to
          do so easily in the examples.
        * Reaction flux is retrieved from the currently defined
          `self._model.solver`. The solver status is checked but there are no
          guarantees that the current solver state is the one you are looking
          for.
        * If you modify the underlying model after an optimization, you will
          retrieve the old optimization values.

        Raises
        ------
        RuntimeError
            If the underlying model was never optimized beforehand or the
            reaction is not part of a model.
        OptimizationError
            If the solver status is anything other than 'optimal'.
        AssertionError
            If the flux value is not within the bounds.

        Examples
        --------
        >>> import cobra.test
        >>> model = cobra.test.create_test_model("textbook")
        >>> solution = model.optimize()
        >>> model.reactions.PFK.flux
        7.477381962160283
        >>> solution.fluxes.PFK
        7.4773819621602833

The flux value in the most recent solution .


def
Func
(
arg_0
,
arg_1
)
:
arg_0
.
assert_is_dir_and_exists
(
)
arg_2
=
arg_0
.
abspath
arg_1
=
os
.
path
.
abspath
(
arg_1
)
if
os
.
path
.
exists
(
arg_1
)
:
raise
Exception
(
"distination already exist!"
)
arg_3
=
list
(
)
arg_4
=
list
(
)
for
arg_5
,
arg_6
,
arg_7
in
os
.
walk
(
arg_0
.
abspath
)
:
arg_5
=
arg_5
.
replace
(
arg_2
,
arg_1
)
try
:
os
.
mkdir
(
arg_5
)
except
:
pass
for
arg_8
in
arg_7
:
arg_9
=
os
.
path
.
join
(
arg_5
,
arg_8
)
with
open
(
arg_9
,
"wb"
)
as
arg_6
:
pass

def Func(arg_0, arg_1):  # pragma: no cover
        """
        Create a new folder having exactly same structure with this directory.
        However, all files are just empty file with same file name.

        :param dst: destination directory. The directory can't exists before
        you execute this.

        **中文文档**

        创建一个目录的镜像拷贝, 与拷贝操作不同的是, 文件的副本只是在文件名上
        与原件一致, 但是是空文件, 完全没有内容, 文件大小为0。
        """
        arg_0.assert_is_dir_and_exists()

        arg_2 = arg_0.abspath
        arg_1 = os.path.abspath(arg_1)
        if os.path.exists(arg_1):  # pragma: no cover
            raise Exception("distination already exist!")

        arg_3 = list()
        arg_4 = list()

        for arg_5, arg_6, arg_7 in os.walk(arg_0.abspath):
            arg_5 = arg_5.replace(arg_2, arg_1)
            try:
                os.mkdir(arg_5)
            except:  # pragma: no cover
                pass
            for arg_8 in arg_7:
                arg_9 = os.path.join(arg_5, arg_8)
                with open(arg_9, "wb") as arg_6:
                    pass

Create a new folder having exactly same structure with this directory . However all files are just empty file with same file name .


def Func ( arg_0 , arg_1 ) : for arg_2 in tag_re . finditer ( arg_0 ) : if arg_2 . group ( "tag" ) == arg_1 : arg_3 = dict ( ( a . group ( "key" ) . lower ( ) , a . group ( "value" ) ) for a in attr_re . finditer ( arg_2 . group ( "attr" ) ) ) yield Tag ( arg_2 . group ( "tag" ) , arg_3 , arg_2 . group ( "inner" ) )

def Func(arg_0, arg_1):
    """
    Brute force regex based HTML tag parser. This is a rough-and-ready searcher to find HTML tags when
    standards compliance is not required. Will find tags that are commented out, or inside script tag etc.

    :param html: HTML page
    :param tag: tag name to find
    :return: generator with Tags
    """
    for arg_2 in tag_re.finditer(arg_0):
        if arg_2.group("tag") == arg_1:
            arg_3 = dict((a.group("key").lower(), a.group("value")) for a in attr_re.finditer(arg_2.group("attr")))
            yield Tag(arg_2.group("tag"), arg_3, arg_2.group("inner"))

Brute force regex based HTML tag parser . This is a rough - and - ready searcher to find HTML tags when standards compliance is not required . Will find tags that are commented out or inside script tag etc .


return {Chem.MolToSmiles(m, isomericSmiles=True) for m in mesomers}

def Func ( arg_0 ) : arg_1 = Chem . MolFromSmiles ( arg_0 ) arg_2 = ResonanceEnumerator ( ) . enumerate ( arg_1 ) return { Chem . MolToSmiles ( arg_3 , isomericSmiles = True ) for arg_3 in arg_2 }

def Func(arg_0):
    """Return a set of resonance forms as SMILES strings, given a SMILES string.

    :param smiles: A SMILES string.
    :returns: A set containing SMILES strings for every possible resonance form.
    :rtype: set of strings.
    """
    arg_1 = Chem.MolFromSmiles(arg_0)
    #Chem.SanitizeMol(mol)  # MolFromSmiles does Sanitize by default
    arg_2 = ResonanceEnumerator().enumerate(arg_1)
    return {Chem.MolToSmiles(arg_3, isomericSmiles=True) for arg_3 in arg_2}

Return a set of resonance forms as SMILES strings given a SMILES string .


def Func ( arg_0 ) : arg_1 = { } arg_2 = arg_0 . remote_snd_settle_mode if arg_2 == proton . Link . SND_UNSETTLED : arg_1 [ 'snd-settle-mode' ] = 'unsettled' elif arg_2 == proton . Link . SND_SETTLED : arg_1 [ 'snd-settle-mode' ] = 'settled' if arg_0 . remote_rcv_settle_mode == proton . Link . RCV_SECOND : arg_1 [ 'rcv-settle-mode' ] = 'second' return arg_1

def Func(arg_0):
    """Return a map containing the settle modes as provided by the remote.
    Skip any default value.
    """
    arg_1 = {}
    arg_2 = arg_0.remote_snd_settle_mode
    if arg_2 == proton.Link.SND_UNSETTLED:
        arg_1['snd-settle-mode'] = 'unsettled'
    elif arg_2 == proton.Link.SND_SETTLED:
        arg_1['snd-settle-mode'] = 'settled'
    if arg_0.remote_rcv_settle_mode == proton.Link.RCV_SECOND:
        arg_1['rcv-settle-mode'] = 'second'
    return arg_1

Return a map containing the settle modes as provided by the remote . Skip any default value .


def Func(arg_0, arg_1):
        """Process each Func."""
        if arg_1.id not in arg_0.Func_ids:
            return

        arg_2 = []
        for arg_3 in arg_1.nodes:
            try:
                arg_2.append(Point(arg_3.location.lon, arg_3.location.lat))
            except o.InvalidLocationError:
                logging.debug('InvalidLocationError at Func %s node %s', arg_1.id, arg_3.ref)

        arg_0.Funcs[arg_1.id] = Way(arg_1.id, arg_2)


return Operators.ITEBV(256, s0 > s1, 1, 0)

def Func(arg_0, arg_1, arg_2):
        """Signed greater-than comparison"""
        # http://gavwood.com/paper.pdf
        arg_3, arg_4 = to_signed(arg_1), to_signed(arg_2)
        return Operators.ITEBV(256, arg_3 > arg_4, 1, 0)


return [".".join(names[0 : i + 1]) for i in range(len(names))]

def Func ( arg_0 ) : arg_1 = arg_0 . split ( "." ) return [ "." . join ( arg_1 [ 0 : arg_2 + 1 ] ) for arg_2 in range ( len ( arg_1 ) ) ]

def Func(arg_0):
    """Split the names of the given module into subparts

    For example,
        Func('pylint.checkers.ImportsChecker')
    returns
        ['pylint', 'pylint.checkers', 'pylint.checkers.ImportsChecker']
    """
    arg_1 = arg_0.split(".")
    return [".".join(arg_1[0 : arg_2 + 1]) for arg_2 in range(len(arg_1))]

Split the names of the given module into subparts

    For example,
        _qualified_names('pylint.checkers.ImportsChecker')
    returns
        ['pylint', 'pylint.checkers', 'pylint.checkers.ImportsChecker']


(element_name, usage_restriction = None)

def Func(arg_0, arg_1 = None):
    """Method decorator generator for decorating stream element
    handler methods in `StreamFeatureHandler` subclasses.

    :Parameters:
        - `element_name`: stream element QName
        - `usage_restriction`: optional usage restriction: "initiator" or
          "receiver"
    :Types:
        - `element_name`: `unicode`
        - `usage_restriction`: `unicode`
    """
    def decorator(arg_2):
        """The decorator"""
        arg_2._pyxmpp_stream_element_handled = arg_0
        arg_2._pyxmpp_usage_restriction = arg_1
        return arg_2
    return decorator

Method decorator generator for decorating stream element handler methods in StreamFeatureHandler subclasses .


def Func(arg_0, arg_1):
        """Follow the 'next' link on paginated results."""
        arg_2 = arg_0._json(arg_0._get(arg_1), 200)
        arg_3 = arg_2['data']

        arg_4 = arg_0._get_attribute(arg_2, 'links', 'next')
        while arg_4 is not None:
            arg_2 = arg_0._json(arg_0._get(arg_4), 200)
            arg_3.extend(arg_2['data'])
            arg_4 = arg_0._get_attribute(arg_2, 'links', 'next')

        return arg_3

Follow the next link on paginated results .


def Func ( arg_0 ) : arg_1 = arg_0 . _associatedClk if arg_1 is not None : return arg_1 arg_2 = arg_0 . _parent assert arg_2 is not None if isinstance ( arg_2 , UnitBase ) : return getClk ( arg_2 ) else : return arg_2 . Func ( )

def Func(arg_0):
        """
        If interface has associated clk return it otherwise
        try to find clk on parent recursively
        """
        arg_1 = arg_0._associatedClk

        if arg_1 is not None:
            return arg_1

        arg_2 = arg_0._parent
        assert arg_2 is not None

        if isinstance(arg_2, UnitBase):
            return getClk(arg_2)
        else:
            return arg_2.Func()


def Func ( ) : return [ files . c . name , files . c . created_at , files . c . parent_name , ]

def Func():
    """
    Default fields returned by a file query.
    """
    return [
        files.c.name,
        files.c.created_at,
        files.c.parent_name,
    ]

Default fields returned by a file query .


def Func ( arg_0 , arg_1 , * arg_2 , ** arg_3 ) : if len ( arg_2 ) > 0 : if type ( arg_2 [ 0 ] ) == nx . Graph or type ( arg_2 [ 0 ] ) == nx . DiGraph : return arg_0 . orient_graph ( arg_1 , * arg_2 , ** arg_3 ) else : return arg_0 . Func_proba ( arg_1 , * arg_2 , ** arg_3 ) elif type ( arg_1 ) == DataFrame : return arg_0 . Func_dataset ( arg_1 , * arg_2 , ** arg_3 ) elif type ( arg_1 ) == Series : return arg_0 . Func_proba ( arg_1 . iloc [ 0 ] , arg_1 . iloc [ 1 ] , * arg_2 , ** arg_3 )

def Func(arg_0, arg_1, *arg_2, **arg_3):
        """Generic Func method, chooses which subfunction to use for a more
        suited.

        Depending on the type of `x` and of `*args`, this function process to execute
        different functions in the priority order:

        1. If ``args[0]`` is a ``networkx.(Di)Graph``, then ``self.orient_graph`` is executed.
        2. If ``args[0]`` exists, then ``self.Func_proba`` is executed.
        3. If ``x`` is a ``pandas.DataFrame``, then ``self.Func_dataset`` is executed.
        4. If ``x`` is a ``pandas.Series``, then ``self.Func_proba`` is executed.

        Args:
            x (numpy.array or pandas.DataFrame or pandas.Series): First variable or dataset.
            args (numpy.array or networkx.Graph): graph or second variable.

        Returns:
            pandas.Dataframe or networkx.Digraph: Funcions output
        """
        if len(arg_2) > 0:
            if type(arg_2[0]) == nx.Graph or type(arg_2[0]) == nx.DiGraph:
                return arg_0.orient_graph(arg_1, *arg_2, **arg_3)
            else:
                return arg_0.Func_proba(arg_1, *arg_2, **arg_3)
        elif type(arg_1) == DataFrame:
            return arg_0.Func_dataset(arg_1, *arg_2, **arg_3)
        elif type(arg_1) == Series:
            return arg_0.Func_proba(arg_1.iloc[0], arg_1.iloc[1], *arg_2, **arg_3)

Generic predict method, chooses which subfunction to use for a more
        suited.

        Depending on the type of `x` and of `*args`, this function process to execute
        different functions in the priority order:

        1. If ``args[0]`` is a ``networkx.(Di)Graph``, then ``self.orient_graph`` is executed.
        2. If ``args[0]`` exists, then ``self.predict_proba`` is executed.
        3. If ``x`` is a ``pandas.DataFrame``, then ``self.predict_dataset`` is executed.
        4. If ``x`` is a ``pandas.Series``, then ``self.predict_proba`` is executed.

        Args:
            x (numpy.array or pandas.DataFrame or pandas.Series): First variable or dataset.
            args (numpy.array or networkx.Graph): graph or second variable.

        Returns:
            pandas.Dataframe or networkx.Digraph: predictions output

Generic predict method chooses which subfunction to use for a more suited .


def Func ( arg_0 , arg_1 , arg_2 = None ) : try : from IPython . zmq . pylab . backend_inline import InlineBackend except ImportError : return arg_2 = arg_0 . user_ns if arg_2 is None else arg_2 arg_3 = InlineBackend . instance ( config = arg_0 . config ) arg_3 . shell = arg_0 if arg_3 not in arg_0 . configurables : arg_0 . configurables . append ( arg_3 ) if arg_1 == backends [ 'inline' ] : from IPython . zmq . pylab . backend_inline import flush_figures from matplotlib import pyplot arg_0 . register_post_execute ( flush_figures ) pyplot . rcParams . update ( arg_3 . rc ) arg_2 [ 'figsize' ] = pyplot . figsize = figsize arg_4 = arg_3 . figure_format select_figure_format ( arg_0 , arg_4 ) from IPython . core . display import display arg_2 [ 'display' ] = display arg_2 [ 'getfigs' ] = getfigs

def Func(arg_0, arg_1, arg_2=None):
    """Configure an IPython shell object for matplotlib use.

    Parameters
    ----------
    shell : InteractiveShell instance

    backend : matplotlib backend

    user_ns : dict
      A namespace where all configured variables will be placed.  If not given,
      the `user_ns` attribute of the shell object is used.
    """
    # If using our svg payload backend, register the post-execution
    # function that will pick up the results for display.  This can only be
    # done with access to the real shell object.

    # Note: if we can't load the inline backend, then there's no point
    # continuing (such as in terminal-only shells in environments without
    # zeromq available).
    try:
        from IPython.zmq.pylab.backend_inline import InlineBackend
    except ImportError:
        return

    arg_2 = arg_0.user_ns if arg_2 is None else arg_2

    arg_3 = InlineBackend.instance(config=arg_0.config)
    arg_3.shell = arg_0
    if arg_3 not in arg_0.configurables:
        arg_0.configurables.append(arg_3)

    if arg_1 == backends['inline']:
        from IPython.zmq.pylab.backend_inline import flush_figures
        from matplotlib import pyplot
        arg_0.register_post_execute(flush_figures)
        # load inline_rc
        pyplot.rcParams.update(arg_3.rc)
        # Add 'figsize' to pyplot and to the user's namespace
        arg_2['figsize'] = pyplot.figsize = figsize

    # Setup the default figure format
    arg_4 = arg_3.figure_format
    select_figure_format(arg_0, arg_4)

    # The old pastefig function has been replaced by display
    from IPython.core.display import display
    # Add display and getfigs to the user's namespace
    arg_2['display'] = display
    arg_2['getfigs'] = getfigs

Configure an IPython shell object for matplotlib use .


(self, n=2, oscillate=False, callback=None)

def Func ( arg_0 , arg_1 = 2 , arg_2 = False , arg_3 = None ) : arg_4 = ColorList ( ) arg_5 = ColorList . copy ( arg_0 ) for arg_6 in _range ( arg_1 ) : arg_4 . extend ( arg_5 ) if arg_2 : arg_5 = arg_5 . reverse ( ) if arg_3 : arg_5 = arg_3 ( arg_5 ) return arg_4

def Func(arg_0, arg_1=2, arg_2=False, arg_3=None):
        """
        Returns a list that is a repetition of the given list.

        When oscillate is True,
        moves from the end back to the beginning,
        and then from the beginning to the end, and so on.
        """
        arg_4 = ColorList()
        arg_5 = ColorList.copy(arg_0)
        for arg_6 in _range(arg_1):
            arg_4.extend(arg_5)
            if arg_2: arg_5 = arg_5.reverse()
            if arg_3: arg_5 = arg_3(arg_5)

        return arg_4

Returns a list that is a repetition of the given list .


def Func(arg_0):
        """Send a message containing the RPC method call
        """
        arg_1 = Message()
        arg_1.subject = "An RPC call!"
        arg_1.address = arg_0._to
        arg_1.reply_to = arg_0._reply_to
        arg_1.body = arg_0._method
        arg_1.correlation_id = 5  # whatever...

        print("sending RPC call request: %s" % str(arg_0._method))
        # @todo send timeout self._sender.send(msg, self, None, time.time() +
        # 10)
        arg_0._sender.send(arg_1, arg_0)


(self, encoding=DEFAULT_OUTPUT_ENCODING,
                       prettyPrint=False, indentLevel=0)

def
Func
(
arg_0
,
arg_1
=
arg_2
,
arg_3
=
False
,
arg_4
=
0
)
:
arg_5
=
[
]
for
arg_6
in
arg_0
:
arg_7
=
if
isinstance
(
arg_6
,
NavigableString
)
:
arg_7
=
arg_6
.
__str__
(
arg_1
)
elif
isinstance
(
arg_6
,
Tag
)
:
arg_5
.
append
(
arg_6
.
__str__
(
arg_1
,
arg_3
,
arg_4
)
)
if
arg_7
and
arg_3
:
arg_7
=
arg_7
.
strip
(
)
if
arg_7
:
if
arg_3
:
arg_5
.
append
(
" "
*
(
arg_4
1
)
)
arg_5
.
append
(
arg_7
)
if
arg_3
:
arg_5
.
append
(
"\n"
)
return
''
.
join
(
arg_5
)

def Func(arg_0, arg_1=arg_2,
                       arg_3=False, arg_4=0):
        """Renders the contents of this tag as a string in the given
        encoding. If encoding is None, returns a Unicode string.."""
        arg_5=[]
        for arg_6 in arg_0:
            arg_7 = None
            if isinstance(arg_6, NavigableString):
                arg_7 = arg_6.__str__(arg_1)
            elif isinstance(arg_6, Tag):
                arg_5.append(arg_6.__str__(arg_1, arg_3, arg_4))
            if arg_7 and arg_3:
                arg_7 = arg_7.strip()
            if arg_7:
                if arg_3:
                    arg_5.append(" " * (arg_4-1))
                arg_5.append(arg_7)
                if arg_3:
                    arg_5.append("\n")
        return ''.join(arg_5)

Renders the contents of this tag as a string in the given encoding . If encoding is None returns a Unicode string ..


def Func ( arg_0 ) : try : arg_0 = date2num ( arg_0 ) except AttributeError : arg_0 = [ pd . Timestamp ( item ) for item in arg_0 ] arg_0 = date2num ( arg_0 ) return arg_0

def Func(arg_0):
        """
        Transform from date to a numerical format
        """
        try:
            arg_0 = date2num(arg_0)
        except AttributeError:
            # numpy datetime64
            # This is not ideal because the operations do not
            # preserve the np.datetime64 type. May be need
            # a datetime64_trans
            arg_0 = [pd.Timestamp(item) for item in arg_0]
            arg_0 = date2num(arg_0)
        return arg_0


def Func():
    """Generate a table to convert a whole byte to binary.
    This code was taken from the Python Cookbook, 2nd edition - O'Reilly."""
    arg_0 = 256*[None]
    arg_1 = list(range(7, -1, -1))
    for arg_2 in range(256):
        arg_3 = arg_2
        arg_4 = 8*[None]
        for arg_5 in arg_1:
            arg_4[arg_5] = '01'[arg_2 & 1]
            arg_2 >>= 1
        arg_0[arg_3] = ''.join(arg_4)
    return arg_0

Generate a table to convert a whole byte to binary . This code was taken from the Python Cookbook 2nd edition - O Reilly .


def Func ( arg_0 , arg_1 = 0 , arg_2 = 1e100 , arg_3 = None ) : if arg_3 is not None : arg_0 . skeleton . set_body_states ( arg_3 ) for arg_4 , arg_5 in enumerate ( arg_0 . markers ) : if arg_4 < arg_1 : continue if arg_4 >= arg_2 : break for arg_3 in arg_0 . _step_to_marker_frame ( arg_4 ) : yield arg_3

def Func(arg_0, arg_1=0, arg_2=1e100, arg_3=None):
        '''Iterate over a set of marker data, dragging its skeleton along.

        Parameters
        ----------
        start : int, optional
            Start following marker data after this frame. Defaults to 0.
        end : int, optional
            Stop following marker data after this frame. Defaults to the end of
            the marker data.
        states : list of body states, optional
            If given, set the states of the skeleton bodies to these values
            before starting to follow the marker data.
        '''
        if arg_3 is not None:
            arg_0.skeleton.set_body_states(arg_3)
        for arg_4, arg_5 in enumerate(arg_0.markers):
            if arg_4 < arg_1:
                continue
            if arg_4 >= arg_2:
                break
            for arg_3 in arg_0._step_to_marker_frame(arg_4):
                yield arg_3

Iterate over a set of marker data dragging its skeleton along .


def Func(arg_0, arg_1):
    """Fetch all the modelIDs that correspond to a given jobID; empty sequence
    if none"""

    arg_2 = arg_0._getMatchingRowsWithRetries(arg_0._models, dict(job_id=arg_1),
                                            ['model_id'])
    return [arg_3[0] for arg_3 in arg_2]

Fetch all the modelIDs that correspond to a given jobID ; empty sequence if none


def Func(arg_0, arg_1, arg_2, arg_3):
    """
    Calculates Evanno method K value scores for a series
    of permuted clumpp results.
    """

    ## iterate across k-vals
    arg_1 = sorted(arg_1)
    arg_4 = []

    for arg_5 in arg_1:
        ## concat results for k=x
        arg_6, arg_7 = _concat_reps(arg_0, arg_5, arg_2, arg_3)

        ## report if some results were excluded
        if arg_7:
            if not arg_3:
                sys.stderr.write(
                "[K{}] {} reps excluded (not converged) see 'max_var_multiple'.\n"\
                .format(arg_5, arg_7))

        if arg_6:
            arg_8 = arg_6[0].inds
            arg_9 = len(arg_6)
        else:
            arg_8 = arg_9 = 0
        if not arg_6:
            print "no result files found"

        ## all we really need is the lnlik
        arg_4.append([arg_10.est_lnlik for arg_10 in arg_6])

    ## compare lnlik and var of results
    if len(arg_4) > 1:
        arg_11 = [np.mean(arg_10) for arg_10 in arg_4]
        arg_12 = [np.std(arg_10, ddof=1) for arg_10 in arg_4]
    else:
        arg_11 = arg_4
        arg_12 = np.nan

    arg_13 = pd.DataFrame(
        index=arg_1,
        data={
            "Nreps": [len(arg_10) for arg_10 in arg_4],
            "lnPK": [0] * len(arg_1),
            "lnPPK": [0] * len(arg_1),
            "deltaK": [0] * len(arg_1),
            "estLnProbMean": arg_11,
            "estLnProbStdev": arg_12,
        }
        )

    ## calculate Evanno's
    for arg_5 in arg_1[1:]:
        arg_13.loc[arg_5, "lnPK"] = arg_13.loc[arg_5, "estLnProbMean"] \
                              - arg_13.loc[arg_5-1, "estLnProbMean"]

    for arg_5 in arg_1[1:-1]:
        arg_13.loc[arg_5, "lnPPK"] = abs(arg_13.loc[arg_5+1, "lnPK"]
                                     - arg_13.loc[arg_5, "lnPK"])
        arg_13.loc[arg_5, "deltaK"] = (abs(
                                    arg_13.loc[arg_5+1, "estLnProbMean"] - \
                                    2.0 * arg_13.loc[arg_5, "estLnProbMean"] + \
                                    arg_13.loc[arg_5-1, "estLnProbMean"]) / \
                                   arg_13.loc[arg_5, "estLnProbStdev"])

    ## return table
    return arg_13

Calculates Evanno method K value scores for a series of permuted clumpp results .


def Func ( arg_0 , arg_1 , arg_2 ) : if arg_1 == 0 : return True if arg_2 : if arg_1 < arg_2 : return True elif arg_2 is None : if arg_0 . _dynamic : return True else : return False return True if not arg_0 . _dynamic : return False return False

def Func(arg_0, arg_1, arg_2):
        ''' Return False if bot should quit '''
        if arg_1 == 0:
            # First frame always runs
            return True
        if arg_2:
            if arg_1 < arg_2:
                return True
        elif arg_2 is None:
            if arg_0._dynamic:
                return True
            else:
                return False
            return True
        if not arg_0._dynamic:
            return False

        return False


def
Func
(
arg_0
)
:
arg_1
=
type
(
arg_0
)
if
(
not
py3compat
.
PY3
)
and
arg_1
is
InstanceType
:
arg_1
=
arg_0
.
__class__
arg_2
=
'%r %r'
%
(
arg_0
,
arg_1
)
return
arg_2

def Func(arg_0):
    """ Return a string representation of a value and its type for readable
    error messages.
    """
    arg_1 = type(arg_0)
    if (not py3compat.PY3) and arg_1 is InstanceType:
        # Old-style class.
        arg_1 = arg_0.__class__
    arg_2 = '%r %r' % (arg_0, arg_1)
    return arg_2

Return a string representation of a value and its type for readable error messages .


def Func(arg_0):
        """
        Returns the short type name of this X.509 extension.

        The result is a byte string such as :py:const:`b"basicConstraints"`.

        :return: The short type name.
        :rtype: :py:data:`bytes`

        .. versionadded:: 0.12
        """
        arg_1 = _lib.X509_EXTENSION_get_object(arg_0._extension)
        arg_2 = _lib.OBJ_obj2nid(arg_1)
        return _ffi.string(_lib.OBJ_nid2sn(arg_2))

Returns the short type name of this X . 509 extension .


(
        df, *,
        column: str,
        output_format: str,
        input_format: str = None,
        new_column: str = None,
        new_time_zone=None
)

def Func ( arg_0 , * , arg_1 : arg_2 , arg_3 : arg_2 , arg_4 : arg_2 = None , arg_5 : arg_2 = None , arg_6 = None ) : arg_5 = arg_5 or arg_1 arg_0 [ arg_5 ] = ( pd . to_datetime ( arg_0 [ arg_1 ] , format = arg_4 , utc = True ) . dt . tz_convert ( arg_6 ) . dt . strftime ( arg_3 ) ) return arg_0

def Func(
        arg_0, *,
        arg_1: arg_2,
        arg_3: arg_2,
        arg_4: arg_2 = None,
        arg_5: arg_2 = None,
        arg_6=None
):
    """
    Convert the format of a date

    ---

    ### Parameters

    *mandatory :*
    - `column` (*str*): name of the column to change the format
    - `output_format` (*str*): format of the output values (see [available formats](
    https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior))

    *optional :*
    - `input_format` (*str*): format of the input values (by default let the parser detect it)
    - `new_column` (*str*): name of the output column  (by default overwrite `column`)
    - `new_time_zone` (*str*): name of new time zone (by default no time zone conversion is done)

    ---

    ### Example

    **Input**

    label   | date
    :------:|:----:
    France  | 2017-03-22
    Europe  | 2016-03-22

    ```cson
    Func:
      column: 'date'
      input_format: '%Y-%m-%d'
      output_format: '%Y-%m'
    ```

    Output :

    label   | date
    :------:|:----:
    France  | 2017-03
    Europe  | 2016-03
    """
    arg_5 = arg_5 or arg_1
    arg_0[arg_5] = (pd.to_datetime(arg_0[arg_1], format=arg_4, utc=True)
                      .dt.tz_convert(arg_6)
                      .dt.strftime(arg_3))
    return arg_0

Convert the format of a date

    ---

    ### Parameters

    *mandatory :*
    - `column` (*str*): name of the column to change the format
    - `output_format` (*str*): format of the output values (see [available formats](
    https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior))

    *optional :*
    - `input_format` (*str*): format of the input values (by default let the parser detect it)
    - `new_column` (*str*): name of the output column  (by default overwrite `column`)
    - `new_time_zone` (*str*): name of new time zone (by default no time zone conversion is done)

    ---

    ### Example

    **Input**

    label   | date
    :------:|:----:
    France  | 2017-03-22
    Europe  | 2016-03-22

    ```cson
    change_date_format:
      column: 'date'
      input_format: '%Y-%m-%d'
      output_format: '%Y-%m'
    ```

    Output :

    label   | date
    :------:|:----:
    France  | 2017-03
    Europe  | 2016-03


def Func ( arg_0 ) : arg_1 = dict ( zip ( arg_0 . values ( ) , arg_0 . keys ( ) ) ) return arg_1

def Func(arg_0):
    """Given a dictionary that maps word to integer id.
    Returns a reverse dictionary that maps a id to word.

    Parameters
    ----------
    word_to_id : dictionary
        that maps word to ID.

    Returns
    --------
    dictionary
        A dictionary that maps IDs to words.

    """
    arg_1 = dict(zip(arg_0.values(), arg_0.keys()))
    return arg_1

Given a dictionary that maps word to integer id . Returns a reverse dictionary that maps a id to word .


def
Func
(
arg_0
,
arg_1
)
:
if
arg_0
.
_is_actual_elif
(
arg_1
)
:
return
if
len
(
arg_1
.
orelse
)
!=
1
or
len
(
arg_1
.
body
)
!=
1
:
return
arg_2
=
arg_1
.
body
[
0
]
arg_3
=
arg_1
.
orelse
[
0
]
if
isinstance
(
arg_2
,
astroid
.
Return
)
:
if
not
isinstance
(
arg_3
,
astroid
.
Return
)
:
return
arg_4
=
arg_0
.
_is_bool_const
(
arg_2
)
arg_5
=
arg_0
.
_is_bool_const
(
arg_3
)
arg_6
=
"'return bool(test)'"
elif
isinstance
(
arg_2
,
astroid
.
Assign
)
:
if
not
isinstance
(
arg_3
,
astroid
.
Assign
)
:
return
arg_7
=
[
target
.
name
for
target
in
arg_2
.
targets
if
isinstance
(
target
,
astroid
.
AssignName
)
]
arg_8
=
[
target
.
name
for
target
in
arg_3
.
targets
if
isinstance
(
target
,
astroid
.
AssignName
)
]
if
not
arg_7
or
not
arg_8
:
return
if
sorted
(
arg_7
)
!=
sorted
(
arg_8
)
:
return
arg_4
=
arg_0
.
_is_bool_const
(
arg_2
)
arg_5
=
arg_0
.
_is_bool_const
(
arg_3
)
arg_6
=
"'var = bool(test)'"
else
:
return
if
not
arg_4
or
not
arg_5
:
return
if
not
arg_2
.
value
.
value
:
return
arg_0
.
add_message
(
"simplifiable-if-statement"
,
arg_1
=
arg_1
,
args
=
(
arg_6
,
)
)

def Func(arg_0, arg_1):
        """Check if the given if node can be simplified.

        The if statement can be reduced to a boolean expression
        in some cases. For instance, if there are two branches
        and both of them return a boolean value that depends on
        the result of the statement's test, then this can be reduced
        to `bool(test)` without losing any functionality.
        """

        if arg_0._is_actual_elif(arg_1):
            # Not interested in if statements with multiple branches.
            return
        if len(arg_1.orelse) != 1 or len(arg_1.body) != 1:
            return

        # Check if both branches can be reduced.
        arg_2 = arg_1.body[0]
        arg_3 = arg_1.orelse[0]
        if isinstance(arg_2, astroid.Return):
            if not isinstance(arg_3, astroid.Return):
                return
            arg_4 = arg_0._is_bool_const(arg_2)
            arg_5 = arg_0._is_bool_const(arg_3)
            arg_6 = "'return bool(test)'"
        elif isinstance(arg_2, astroid.Assign):
            if not isinstance(arg_3, astroid.Assign):
                return

            # Check if we assign to the same value
            arg_7 = [
                target.name
                for target in arg_2.targets
                if isinstance(target, astroid.AssignName)
            ]
            arg_8 = [
                target.name
                for target in arg_3.targets
                if isinstance(target, astroid.AssignName)
            ]
            if not arg_7 or not arg_8:
                return
            if sorted(arg_7) != sorted(arg_8):
                return

            arg_4 = arg_0._is_bool_const(arg_2)
            arg_5 = arg_0._is_bool_const(arg_3)
            arg_6 = "'var = bool(test)'"
        else:
            return

        if not arg_4 or not arg_5:
            return
        if not arg_2.value.value:
            # This is a case that can't be easily simplified and
            # if it can be simplified, it will usually result in a
            # code that's harder to understand and comprehend.
            # Let's take for instance `arg and arg <= 3`. This could theoretically be
            # reduced to `not arg or arg > 3`, but the net result is that now the
            # condition is harder to understand, because it requires understanding of
            # an extra clause:
            #   * first, there is the negation of truthness with `not arg`
            #   * the second clause is `arg > 3`, which occurs when arg has a
            #     a truth value, but it implies that `arg > 3` is equivalent
            #     with `arg and arg > 3`, which means that the user must
            #     think about this assumption when evaluating `arg > 3`.
            #     The original form is easier to grasp.
            return

        arg_0.add_message("simplifiable-if-statement", arg_1=arg_1, args=(arg_6,))

Check if the given if node can be simplified .


def Func ( arg_0 , arg_1 ) : if arg_1 in arg_0 . material . compounds : return arg_0 . _compound_mfrs [ arg_0 . material . get_compound_index ( arg_1 ) ] else : return 0.0

def Func(arg_0, arg_1):
        """
        Determine the mass flow rate of the specified compound in the stream.

        :param compound: Formula and phase of a compound, e.g. "Fe2O3[S1]".

        :returns: Mass flow rate. [kg/h]
        """

        if arg_1 in arg_0.material.compounds:
            return arg_0._compound_mfrs[
                arg_0.material.get_compound_index(arg_1)]
        else:
            return 0.0

Determine the mass flow rate of the specified compound in the stream .


def Func ( arg_0 , arg_1 ) : if hasattr ( arg_0 , 'Func' ) and hasattr ( type ( arg_0 ) , '__array_interface__' ) : return arg_0 . Func ( arg_1 ) else : return np . Func ( arg_0 , arg_1 )

def Func(arg_0, arg_1):
    """Insert a new axis, corresponding to a given position in the array shape

    Args:
      a (array_like): Input array.
      axis (int): Position (amongst axes) where new axis is to be inserted.
    """
    if hasattr(arg_0, 'Func') and hasattr(type(arg_0), '__array_interface__'):
        return arg_0.Func(arg_1)
    else:
        return np.Func(arg_0, arg_1)

Insert a new axis corresponding to a given position in the array shape


return flat_position % self.env.action_space.screen_shape[0],\
            flat_position % self.env.action_space.screen_shape[1]

def Func(arg_0, arg_1):
        """Returns x, y from flat_position integer.

        Args:
            flat_position: flattened position integer

        Returns: x, y

        """
        return arg_1 % arg_0.env.action_space.screen_shape[0],\
            arg_1 % arg_0.env.action_space.screen_shape[1]

Returns x y from flat_position integer .


(configfile='', destpath='', overwrite=False, sub_node='')

def Func(arg_0='', arg_1='', arg_2=False, arg_3=''):
    """Copies the files in the built file tree map
    to despath.

    :param configfile: string
     Path to the FileTreeMap config file

    :param destpath: string
     Path to the files destination

    :param overwrite: bool
     Overwrite files if they already exist.

    :param sub_node: string
     Tree map configuration sub path.
     Will Func only the contents within this sub-node

    """
    log.info('Running {0} {1} {2}'.format(os.path.basename(__file__),
                                          whoami(),
                                          locals()))

    assert(os.path.isfile(arg_0))

    if os.path.exists(arg_1):
        if os.listdir(arg_1):
            raise FolderAlreadyExists('Folder {0} already exists. Please clean '
                                      'it or change destpath.'.format(arg_1))
    else:
        log.info('Creating folder {0}'.format(arg_1))
        path(arg_1).makedirs_p()

    from boyle.files.file_tree_map import FileTreeMap
    arg_4 = FileTreeMap()

    try:
        arg_4.from_config_file(arg_0)
    except Exception as e:
        raise FileTreeMapError(str(e))

    if arg_3:
        arg_5 = arg_4.get_node(arg_3)
        if not arg_5:
            raise FileTreeMapError('Could not find sub node '
                                   '{0}'.format(arg_3))

        arg_4._filetree = {}
        arg_4._filetree[arg_3] = arg_5

    try:
        arg_4.Func_to(arg_1, arg_2=arg_2)
    except Exception as e:
        raise FileTreeMapError(str(e))

Copies the files in the built file tree map
    to despath.

    :param configfile: string
     Path to the FileTreeMap config file

    :param destpath: string
     Path to the files destination

    :param overwrite: bool
     Overwrite files if they already exist.

    :param sub_node: string
     Tree map configuration sub path.
     Will copy only the contents within this sub-node

Copies the files in the built file tree map to despath .


This static method validates a BioMapMapper definition.
        It returns None on success and throws an exception otherwise.

def Func(arg_0, arg_1):
        '''
        This static method Funcs a BioMapMapper definition.
        It returns None on success and throws an exception otherwise.
        '''
        arg_2 = os.path.join(os.path.dirname(__file__),
                                   '../../schema/mapper_definition_schema.json')
        with open(arg_2, 'r') as jsonfp:
            arg_3 = json.load(jsonfp)
        # Validation of JSON schema
        jsonschema.Func(arg_1, arg_3)
        # Validation of JSON properties relations
        assert arg_1['main_key'] in arg_1['supported_keys'], \
               '\'main_key\' must be contained in \'supported_keys\''
        assert set(arg_1.get('list_valued_keys', [])) <= set(arg_1['supported_keys']), \
               '\'list_valued_keys\' must be a subset of \'supported_keys\''
        assert set(arg_1.get('disjoint', [])) <= set(arg_1.get('list_valued_keys', [])), \
               '\'disjoint\' must be a subset of \'list_valued_keys\''
        assert set(arg_1.get('key_synonyms', {}).values()) <= set(arg_1['supported_keys']), \
               '\'The values of the \'key_synonyms\' mapping must be in \'supported_keys\''

This static method validates a BioMapMapper definition . It returns None on success and throws an exception otherwise .


def Func ( arg_0 ) : if 'include_boards' in arg_0 . config : for arg_1 in arg_0 . config . get ( 'include_boards' , to_type = aslist ) : yield arg_0 . api_request ( "/1/boards/{id}" . format ( id = arg_1 ) , fields = 'name' ) else : arg_2 = arg_0 . api_request ( "/1/members/me/boards" , fields = 'name' ) for arg_3 in arg_2 : yield arg_3

def Func(arg_0):
        """
        Get the list of boards to pull cards from.  If the user gave a value to
        trello.include_boards use that, otherwise ask the Trello API for the
        user's boards.
        """
        if 'include_boards' in arg_0.config:
            for arg_1 in arg_0.config.get('include_boards', to_type=aslist):
                # Get the board name
                yield arg_0.api_request(
                    "/1/boards/{id}".format(id=arg_1), fields='name')
        else:
            arg_2 = arg_0.api_request("/1/members/me/boards", fields='name')
            for arg_3 in arg_2:
                yield arg_3

Get the list of boards to pull cards from . If the user gave a value to trello . include_boards use that otherwise ask the Trello API for the user s boards .


def Func(arg_0, arg_1):
    """
    Return the overlap between two representations. rep1 and rep2 are lists of
    non-zero indices.
    """
    arg_2 = 0
    for arg_3 in arg_0:
      if arg_3 in arg_1:
        arg_2 += 1
    return arg_2

Return the overlap between two representations . rep1 and rep2 are lists of non - zero indices .


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
if
arg_2
.
tzinfo
:
arg_3
=
arg_2
.
asttimezone
(
date
.
TZ_GMT
)
else
:
arg_3
=
arg_2
.
replace
(
tzinfo
=
date
.
TZ_GMT
)
arg_4
=
arg_1
arg_4
+=
" "
+
arg_3
.
strftime
(
"%Y%m%d %H%M%S %Z"
)
arg_5
,
arg_6
=
arg_0
.
command
(
"NEWNEWS"
,
arg_4
)
if
arg_5
!=
230
:
raise
NNTPReplyError
(
arg_5
,
arg_6
)
for
arg_7
in
arg_0
.
info_gen
(
arg_5
,
arg_6
)
:
yield
arg_7
.
strip
(
)

def Func(arg_0, arg_1, arg_2):
        """Generator for the NEWNEWS command.

        Generates a list of message-ids for articles created since the specified
        timestamp for newsgroups with names that match the given pattern.

        See <http://tools.ietf.org/html/rfc3977#section-7.4>

        Args:
            pattern: Glob matching newsgroups of intrest.
            timestamp: Datetime object giving 'created since' datetime.

        Yields:
            A message-id as string.

        Note: If the datetime object supplied as the timestamp is naive (tzinfo
            is None) then it is assumed to be given as GMT. If tzinfo is set
            then it will be converted to GMT by this function.
        """
        if arg_2.tzinfo:
            arg_3 = arg_2.asttimezone(date.TZ_GMT)
        else:
            arg_3 = arg_2.replace(tzinfo=date.TZ_GMT)

        arg_4 = arg_1
        arg_4 += " " + arg_3.strftime("%Y%m%d %H%M%S %Z")

        arg_5, arg_6 = arg_0.command("NEWNEWS", arg_4)
        if arg_5 != 230:
            raise NNTPReplyError(arg_5, arg_6)

        for arg_7 in arg_0.info_gen(arg_5, arg_6):
            yield arg_7.strip()


def Func(arg_0, arg_1):
    """Creates `dist_fn`, `dist_fn_wrapped`, `dist_fn_args`."""
    if not isinstance(arg_1, collections.Sequence):
      raise TypeError('`model` must be `list`-like (saw: {}).'.format(
          type(arg_1).__name__))
    arg_0._dist_fn = arg_1
    arg_0._dist_fn_wrapped, arg_0._dist_fn_args = zip(*[
        _unify_call_signature(i, dist_fn)
        for i, dist_fn in enumerate(arg_1)])


def Func ( arg_0 ) : arg_1 = list ( arg_0 ) arg_2 = list ( arg_0 ) arg_3 = [ i for ( i , j ) in enumerate ( arg_0 ) if j in "RKSWYMrkswym" ] for arg_4 in arg_3 : arg_5 = arg_0 [ arg_4 ] if arg_5 . isupper ( ) : arg_1 [ arg_4 ] = PRIORITY [ arg_5 ] arg_2 [ arg_4 ] = MINOR [ arg_5 ] else : arg_1 [ arg_4 ] = MINOR [ arg_5 . upper ( ) ] arg_2 [ arg_4 ] = PRIORITY [ arg_5 . upper ( ) ] arg_1 = "" . join ( arg_1 ) arg_2 = "" . join ( arg_2 ) return arg_1 , arg_2

def Func(arg_0):
    """ takes diploid consensus alleles with phase data stored as a mixture
    of upper and lower case characters and splits it into 2 alleles """

    ## store two alleles, allele1 will start with bigbase
    arg_1 = list(arg_0)
    arg_2 = list(arg_0)
    arg_3 = [i for (i, j) in enumerate(arg_0) if j in "RKSWYMrkswym"]

    ## do remaining h sites
    for arg_4 in arg_3:
        arg_5 = arg_0[arg_4]
        if arg_5.isupper():
            arg_1[arg_4] = PRIORITY[arg_5]
            arg_2[arg_4] = MINOR[arg_5]
        else:
            arg_1[arg_4] = MINOR[arg_5.upper()]
            arg_2[arg_4] = PRIORITY[arg_5.upper()]

    ## convert back to strings
    arg_1 = "".join(arg_1)
    arg_2 = "".join(arg_2)

    return arg_1, arg_2


def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_2 = arg_2 if arg_2 is not None else arg_0 . connection . schema arg_3 = arg_0 . get_conn ( ) return arg_3 . get_database ( arg_2 ) . Func ( arg_1 )

def Func(arg_0, arg_1, arg_2=None):
        """
        Fetches a mongo collection object for querying.

        Uses connection schema as DB unless specified.
        """
        arg_2 = arg_2 if arg_2 is not None else arg_0.connection.schema
        arg_3 = arg_0.get_conn()

        return arg_3.get_database(arg_2).Func(arg_1)

Fetches a mongo collection object for querying .


return (
            Image.open(image),
            file_ext,
            image_format,
            mime_type
        )

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . storage . open ( arg_1 , 'rb' ) arg_3 = arg_1 . rsplit ( '.' ) [ - 1 ] arg_4 , arg_5 = get_image_metadata_from_file_ext ( arg_3 ) return ( Image . open ( arg_2 ) , arg_3 , arg_4 , arg_5 )

def Func(arg_0, arg_1):
        """Return a PIL Image instance stored at `path_to_image`."""
        arg_2 = arg_0.storage.open(arg_1, 'rb')
        arg_3 = arg_1.rsplit('.')[-1]
        arg_4, arg_5 = get_image_metadata_from_file_ext(arg_3)

        return (
            Image.open(arg_2),
            arg_3,
            arg_4,
            arg_5
        )

Return a PIL Image instance stored at path_to_image .


def Func(arg_0):
    '''Given a set of bodies, compute their center of mass in world coordinates.
    '''
    arg_1 = np.zeros(3.)
    arg_2 = 0.
    for arg_3 in arg_0:
        arg_4 = arg_3.mass
        arg_1 += arg_3.body_to_world(arg_4.c) * arg_4.mass
        arg_2 += arg_4.mass
    return arg_1 / arg_2

Given a set of bodies compute their center of mass in world coordinates .


def Func ( arg_0 ) : arg_1 = { } for arg_2 , arg_3 , arg_4 in arg_0 : arg_5 = [ arg_8 for arg_8 in arg_3 . strip ( '/' ) . split ( '/' ) ] arg_6 = arg_1 arg_7 = arg_5 [ 0 ] arg_6 . setdefault ( arg_7 , { } ) arg_6 = arg_6 [ arg_7 ] for arg_8 in arg_5 [ 1 : ] : arg_9 = _camelcase_to_underscore ( arg_8 ) arg_6 . setdefault ( arg_9 , { } ) arg_6 = arg_6 [ arg_9 ] if not 'METHODS' in arg_6 : arg_6 [ 'METHODS' ] = [ [ arg_2 , arg_4 ] ] else : if not arg_2 in arg_6 [ 'METHODS' ] : arg_6 [ 'METHODS' ] . append ( [ arg_2 , arg_4 ] ) return arg_1

def Func(arg_0):
    """
    Creates the Trello endpoint tree.

    >>> r = {'1': { \
                 'actions': {'METHODS': {'GET'}}, \
                 'boards': { \
                     'members': {'METHODS': {'DELETE'}}}} \
            }
    >>> r == Func([ \
                 'GET /1/actions/[idAction]', \
                 'DELETE /1/boards/[board_id]/members/[idMember]'])
    True

    """
    arg_1 = {}

    for arg_2, arg_3, arg_4 in arg_0:
        arg_5 = [arg_8 for arg_8 in arg_3.strip('/').split('/')]
        arg_6 = arg_1

        # First element (API Version).
        arg_7 = arg_5[0]
        arg_6.setdefault(arg_7, {})
        arg_6 = arg_6[arg_7]

        # The rest of elements of the URL.
        for arg_8 in arg_5[1:]:
            arg_9 = _camelcase_to_underscore(arg_8)
            arg_6.setdefault(arg_9, {})
            arg_6 = arg_6[arg_9]

        # Allowed HTTP methods.
        if not 'METHODS' in arg_6:
            arg_6['METHODS'] = [[arg_2, arg_4]]
        else:
            if not arg_2 in arg_6['METHODS']:
                arg_6['METHODS'].append([arg_2, arg_4])

    return arg_1

Creates the Trello endpoint tree.

    >>> r = {'1': { \
                 'actions': {'METHODS': {'GET'}}, \
                 'boards': { \
                     'members': {'METHODS': {'DELETE'}}}} \
            }
    >>> r == create_tree([ \
                 'GET /1/actions/[idAction]', \
                 'DELETE /1/boards/[board_id]/members/[idMember]'])
    True


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = set ( ) arg_4 = [ ] arg_5 = [ ] for arg_6 in arg_1 : if not arg_6 [ 'partition' ] : arg_7 = [ n for n in arg_6 [ 'graph' ] . nodes ( ) if n . type == 'op' ] [ 0 ] . qargs if not arg_7 : continue if arg_3 . intersection ( arg_7 ) : arg_3 . update ( arg_7 ) arg_5 . append ( arg_6 ) else : arg_8 = _transform_gate_for_layout ( arg_6 , arg_0 ) arg_4 . append ( arg_8 ) continue arg_7 = arg_6 [ 'partition' ] [ 0 ] if arg_3 . intersection ( arg_7 ) : arg_3 . update ( arg_7 ) arg_5 . append ( arg_6 ) elif len ( arg_7 ) == 1 : arg_8 = _transform_gate_for_layout ( arg_6 , arg_0 ) arg_4 . append ( arg_8 ) elif arg_2 . distance ( * [ arg_0 [ arg_9 ] for arg_9 in arg_7 ] ) == 1 : arg_8 = _transform_gate_for_layout ( arg_6 , arg_0 ) arg_4 . append ( arg_8 ) else : arg_3 . update ( arg_7 ) arg_5 . append ( arg_6 ) return arg_4 , arg_5

def Func(arg_0, arg_1, arg_2):
    """Map all gates that can be executed with the current layout.

    Args:
        layout (Layout): Map from virtual qubit index to physical qubit index.
        gates (list): Gates to be mapped.
        coupling_map (CouplingMap): CouplingMap for target device topology.

    Returns:
        tuple:
            mapped_gates (list): ops for gates that can be executed, mapped onto layout.
            remaining_gates (list): gates that cannot be executed on the layout.

    """

    arg_3 = set()

    arg_4 = []
    arg_5 = []

    for arg_6 in arg_1:
        # Gates without a partition (barrier, snapshot, save, load, noise) may
        # still have associated qubits. Look for them in the qargs.
        if not arg_6['partition']:
            arg_7 = [n for n in arg_6['graph'].nodes() if n.type == 'op'][0].qargs

            if not arg_7:
                continue

            if arg_3.intersection(arg_7):
                arg_3.update(arg_7)
                arg_5.append(arg_6)
            else:
                arg_8 = _transform_gate_for_layout(arg_6, arg_0)
                arg_4.append(arg_8)
            continue

        arg_7 = arg_6['partition'][0]

        if arg_3.intersection(arg_7):
            arg_3.update(arg_7)
            arg_5.append(arg_6)
        elif len(arg_7) == 1:
            arg_8 = _transform_gate_for_layout(arg_6, arg_0)
            arg_4.append(arg_8)
        elif arg_2.distance(*[arg_0[arg_9] for arg_9 in arg_7]) == 1:
            arg_8 = _transform_gate_for_layout(arg_6, arg_0)
            arg_4.append(arg_8)
        else:
            arg_3.update(arg_7)
            arg_5.append(arg_6)

    return arg_4, arg_5

Map all gates that can be executed with the current layout .


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
"\t server {\n"
arg_2
+=
"\t \t {}\n"
.
format
(
_nginx_listen_string
(
arg_0
)
)
arg_2
+=
"\t \t {}\n"
.
format
(
_nginx_proxy_string
(
arg_0
,
arg_1
)
)
arg_2
+=
"\t }\n"
return
arg_2

def Func(arg_0, arg_1):
    """This will output the nginx stream config string for specific port spec """
    arg_2 = "\t server {\n"
    arg_2 += "\t \t {}\n".format(_nginx_listen_string(arg_0))
    arg_2 += "\t \t {}\n".format(_nginx_proxy_string(arg_0, arg_1))
    arg_2 += "\t }\n"
    return arg_2


def
Func
(
arg_0
,
*
arg_1
)
:
arg_2
=
nonconstant_parameters
(
arg_0
)
arg_3
=
np
.
array
(
[
d
[
'mean_test_score'
]
for
d
in
arg_0
]
)
arg_4
=
np
.
argsort
(
arg_3
)
for
arg_5
in
arg_2
.
keys
(
)
:
if
arg_2
[
arg_5
]
.
dtype
==
np
.
dtype
(
'bool'
)
:
arg_2
[
arg_5
]
=
arg_2
[
arg_5
]
.
astype
(
np
.
int
)
arg_6
=
[
]
for
arg_5
in
arg_2
.
keys
(
)
:
arg_7
=
arg_2
[
arg_5
]
[
arg_4
]
arg_8
=
arg_3
[
arg_4
]
arg_2
=
arg_2
.
loc
[
arg_4
]
try
:
arg_9
=
(
np
.
max
(
arg_7
)
np
.
min
(
arg_7
)
)
/
100.0
except
:
print
(
"error making plot4 for '%s'"
%
arg_5
)
continue
arg_6
.
append
(
build_scatter_tooltip
(
arg_7
=
arg_7
,
arg_8
=
arg_8
,
arg_9
=
arg_9
,
add_line
=
False
,
tt
=
arg_2
,
xlabel
=
arg_5
,
title
=
'Score vs %s'
%
arg_5
)
)
return
arg_6

def Func(arg_0, *arg_1):
    """Scatter plot of score vs each param
    """
    arg_2 = nonconstant_parameters(arg_0)
    arg_3 = np.array([d['mean_test_score'] for d in arg_0])
    arg_4 = np.argsort(arg_3)

    for arg_5 in arg_2.keys():
        if arg_2[arg_5].dtype == np.dtype('bool'):
            arg_2[arg_5] = arg_2[arg_5].astype(np.int)
    arg_6 = []
    for arg_5 in arg_2.keys():
        arg_7 = arg_2[arg_5][arg_4]
        arg_8 = arg_3[arg_4]
        arg_2 = arg_2.loc[arg_4]
        try:
            arg_9 = (np.max(arg_7) - np.min(arg_7)) / 100.0
        except:
            print("error making plot4 for '%s'" % arg_5)
            continue

        arg_6.append(build_scatter_tooltip(
            arg_7=arg_7, arg_8=arg_8, arg_9=arg_9, add_line=False, tt=arg_2,
            xlabel=arg_5, title='Score vs %s' % arg_5))
    return arg_6


def Func ( arg_0 , arg_1 , arg_2 ) : arg_1 . listparam . append ( arg_2 . pair ) return True

def Func(arg_0, arg_1, arg_2):
    """Parse a hook parameter"""
    arg_1.listparam.append(arg_2.pair)
    return True


def Func ( arg_0 , arg_1 , arg_2 ) : if not arg_0 . fbo : return arg_0 . width = arg_1 // arg_0 . widget . devicePixelRatio ( ) arg_0 . height = arg_2 // arg_0 . widget . devicePixelRatio ( ) arg_0 . buffer_width = arg_1 arg_0 . buffer_height = arg_2 super ( ) . Func ( arg_1 , arg_2 )

def Func(arg_0, arg_1, arg_2):
        """
        Pyqt specific Func callback.
        """
        if not arg_0.fbo:
            return

        # pyqt reports sizes in actual buffer size
        arg_0.width = arg_1 // arg_0.widget.devicePixelRatio()
        arg_0.height = arg_2 // arg_0.widget.devicePixelRatio()
        arg_0.buffer_width = arg_1
        arg_0.buffer_height = arg_2

        super().Func(arg_1, arg_2)


return [self] + [
            c
            for _checkers in self._checkers.values()
            for c in _checkers
            if c is not self
        ]

def Func ( arg_0 ) : return [ arg_0 ] + [ arg_2 for arg_1 in arg_0 . _checkers . values ( ) for arg_2 in arg_1 if arg_2 is not arg_0 ]

def Func(arg_0):
        """return all available checkers as a list"""
        return [arg_0] + [
            arg_2
            for arg_1 in arg_0._checkers.values()
            for arg_2 in arg_1
            if arg_2 is not arg_0
        ]


def Func ( arg_0 , arg_1 = 1 ) : if not arg_0 . can_Func : return arg_2 = max ( len ( arg_0 . answers ) - abs ( arg_1 ) , 0 ) arg_0 . answers = OrderedDict ( islice ( arg_0 . answers . items ( ) , arg_2 ) )

def Func(arg_0, arg_1=1):
        """Move `n` questions back in the questionnaire by removing the last `n`
        answers.
        """
        if not arg_0.can_Func:
            return
        arg_2 = max(len(arg_0.answers)-abs(arg_1), 0)
        arg_0.answers = OrderedDict(islice(arg_0.answers.items(), arg_2))

Move n questions back in the questionnaire by removing the last n answers .


Charge of the species as an integer. Computed as a property as most
        species do not have a charge and so storing it would be a waste of
        memory.

def Func ( arg_0 ) : try : return arg_0 . _Func except AttributeError : arg_0 . _Func = Func_from_formula ( arg_0 . formula ) return arg_0 . _Func

def Func(arg_0):
        '''Charge of the species as an integer. Computed as a property as most
        species do not have a Func and so storing it would be a waste of
        memory.
        '''
        try:
            return arg_0._Func
        except AttributeError:
            arg_0._Func = Func_from_formula(arg_0.formula)
            return arg_0._Func

Charge of the species as an integer . Computed as a property as most species do not have a charge and so storing it would be a waste of memory .


return super(Autoencoder, self).score(x, x, w=w, **kwargs)

def Func ( arg_0 , arg_1 , arg_2 = None , ** arg_3 ) : return super ( Autoencoder , arg_0 ) . Func ( arg_1 , arg_1 , arg_2 = arg_2 , ** arg_3 )

def Func(arg_0, arg_1, arg_2=None, **arg_3):
        '''Compute R^2 coefficient of determination for a given input.

        Parameters
        ----------
        x : ndarray (num-examples, num-inputs)
            An array containing data to be fed into the network. Multiple
            examples are arranged as rows in this array, with columns containing
            the variables for each example.

        Returns
        -------
        r2 : float
            The R^2 correlation between the prediction of this netork and its
            input. This can serve as one measure of the information loss of the
            autoencoder.
        '''
        return super(Autoencoder, arg_0).Func(arg_1, arg_1, arg_2=arg_2, **arg_3)

Compute R^2 coefficient of determination for a given input .


def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_0 . _getAnomalyClassifier ( ) . getSelf ( ) . removeLabels ( arg_1 , arg_2 , arg_3 )

def Func(arg_0, arg_1, arg_2, arg_3):
    """
    Remove labels from the anomaly classifier within this model. Removes all
    records if ``labelFilter==None``, otherwise only removes the labels equal to
    ``labelFilter``.

    :param start: (int) index to start removing labels
    :param end: (int) index to end removing labels
    :param labelFilter: (string) If specified, only removes records that match
    """
    arg_0._getAnomalyClassifier().getSelf().removeLabels(arg_1, arg_2, arg_3)

Remove labels from the anomaly classifier within this model . Removes all records if labelFilter == None otherwise only removes the labels equal to labelFilter .


(self, force, relative=False, position=None, relative_position=None)

def Func(arg_0, arg_1, arg_2=False, arg_3=None, arg_4=None):
        '''Add a force to this body.

        Parameters
        ----------
        force : 3-tuple of float
            A vector giving the forces along each world or body coordinate axis.
        relative : bool, optional
            If False, the force values are assumed to be given in the world
            coordinate frame. If True, they are assumed to be given in the
            body-relative coordinate frame. Defaults to False.
        position : 3-tuple of float, optional
            If given, apply the force at this location in world coordinates.
            Defaults to the current position of the body.
        relative_position : 3-tuple of float, optional
            If given, apply the force at this relative location on the body. If
            given, this method ignores the ``position`` parameter.
        '''
        arg_5 = arg_0.ode_body
        if arg_4 is not None:
            arg_6 = arg_5.addRelForceAtRelPos if arg_2 else arg_5.addForceAtRelPos
            arg_6(arg_1, arg_4)
        elif arg_3 is not None:
            arg_6 = arg_5.addRelForceAtPos if arg_2 else arg_5.addForceAtPos
            arg_6(arg_1, arg_3)
        else:
            arg_6 = arg_5.addRelForce if arg_2 else arg_5.addForce
            arg_6(arg_1)


def Func(arg_0):
    """Pick two at random using inverse load as weight.

    Return the less loaded of the two.
    """
    # weight 0 a million times more than 1:
    arg_1 = 1./(1e-6+numpy.array(arg_0))
    arg_2 = arg_1.cumsum()
    arg_3 = arg_2[-1]
    arg_4 = random()*arg_3
    arg_5 = random()*arg_3
    arg_6 = 0
    arg_7 = 0
    while arg_2[arg_6] < arg_4:
        arg_6 += 1
    while arg_2[arg_7] < arg_5:
        arg_7 += 1
    if arg_1[arg_7] > arg_1[arg_6]:
        return arg_7
    else:
        return arg_6

Pick two at random using inverse load as weight .


(
        cls: Type["Config"], mapping: Optional[Mapping[str, Any]] = None, **kwargs: Any
    )

def Func ( arg_0 : arg_1 [ "Config" ] , arg_2 : arg_3 [ arg_4 [ arg_5 , arg_6 ] ] = None , ** arg_7 : arg_6 ) -> "Config" : arg_8 : Dict [ arg_5 , arg_6 ] = { } if arg_2 is not None : arg_8 . update ( arg_2 ) arg_8 . update ( arg_7 ) arg_9 = arg_0 ( ) for arg_10 , arg_11 in arg_8 . items ( ) : try : setattr ( arg_9 , arg_10 , arg_11 ) except AttributeError : pass return arg_9

def Func(
        arg_0: arg_1["Config"], arg_2: arg_3[arg_4[arg_5, arg_6]] = None, **arg_7: arg_6
    ) -> "Config":
        """Create a configuration from a mapping.

        This allows either a mapping to be directly passed or as
        keyword arguments, for example,

        .. code-block:: python

            config = {'keep_alive_timeout': 10}
            Config.Func(config)
            Config.form_mapping(keep_alive_timeout=10)

        Arguments:
            mapping: Optionally a mapping object.
            kwargs: Optionally a collection of keyword arguments to
                form a mapping.
        """
        arg_8: Dict[arg_5, arg_6] = {}
        if arg_2 is not None:
            arg_8.update(arg_2)
        arg_8.update(arg_7)
        arg_9 = arg_0()
        for arg_10, arg_11 in arg_8.items():
            try:
                setattr(arg_9, arg_10, arg_11)
            except AttributeError:
                pass

        return arg_9

Create a configuration from a mapping.

        This allows either a mapping to be directly passed or as
        keyword arguments, for example,

        .. code-block:: python

            config = {'keep_alive_timeout': 10}
            Config.from_mapping(config)
            Config.form_mapping(keep_alive_timeout=10)

        Arguments:
            mapping: Optionally a mapping object.
            kwargs: Optionally a collection of keyword arguments to
                form a mapping.


def Func(arg_0, arg_1):
        '''
        Deletes a project by id

        Args:
             project_id: The project id to Func

        Returns:
             Nothing
        '''
        arg_0.logger.debug('Deleting project by id: ' + arg_1)
        arg_2 = '%(base_url)s/%(project_id)s' % {
            'base_url': arg_0.base_url, 'project_id': arg_1
        }
        arg_3 = arg_0.gbdx_connection.Func(arg_2)
        arg_3.raise_for_status()

Deletes a project by id

        Args:
             project_id: The project id to delete

        Returns:
             Nothing


def Func ( arg_0 ) : if arg_0 . _temp_buffer_filled : arg_0 . _cancel_completion ( ) arg_0 . _clear_temporary_buffer ( ) else : arg_0 . input_buffer = ''

def Func(arg_0):
        """ Cancels the current editing task ala Ctrl-G in Emacs.
        """
        if arg_0._temp_buffer_filled :
            arg_0._cancel_completion()
            arg_0._clear_temporary_buffer()
        else:
            arg_0.input_buffer = ''

Cancels the current editing task ala Ctrl - G in Emacs .


def Func(arg_0):
    """
    Generates set of consecutive patterns.
    """
    arg_1 = arg_0._n
    arg_2 = arg_0._w

    assert type(arg_2) is int, "List for w not supported"

    for arg_3 in xrange(arg_1 / arg_2):
      arg_4 = set(xrange(arg_3 * arg_2, (arg_3+1) * arg_2))
      arg_0._patterns[arg_3] = arg_4


def
Func
(
arg_0
,
arg_1
)
:
if
not
arg_1
.
startswith
(
"#"
)
:
if
"#"
in
arg_1
:
arg_1
=
arg_1
[
:
arg_1
.
find
(
"#"
)
]
.
strip
(
)
if
" "
in
arg_1
or
"\t"
in
arg_1
:
arg_2
=
arg_1
.
split
(
)
arg_3
=
1
while
arg_3
<
len
(
arg_2
)
:
if
arg_2
[
arg_3
]
:
break
arg_3
+=
1
return
arg_2
[
arg_3
]
return
arg_1
return
""

def Func(arg_0, arg_1):
        """
        Format the extracted domain before passing it to the system.

        :param extracted_domain: The extracted domain.
        :type extracted_domain: str

        :return: The formatted domain or IP to test.
        :rtype: str

        .. note:
            Understand by formating the fact that we get rid
            of all the noises around the domain we want to test.
        """

        if not arg_1.startswith("#"):
            # The line is not a commented line.

            if "#" in arg_1:
                # There is a comment at the end of the line.

                # We delete the comment from the line.
                arg_1 = arg_1[
                    : arg_1.find("#")
                ].strip()

            if " " in arg_1 or "\t" in arg_1:
                # A space or a tabs is in the line.

                # We remove all whitestring from the extracted line.
                arg_2 = arg_1.split()

                # As there was a space or a tab in the string, we consider
                # that we are working with the hosts file format which means
                # that the domain we have to test is after the first string.
                # So we set the index to 1.
                arg_3 = 1

                while arg_3 < len(arg_2):
                    # We loop until the index is greater than the length of
                    #  the splited line.

                    if arg_2[arg_3]:
                        # The element at the current index is not an empty string.

                        # We break the loop.
                        break

                    # The element at the current index is an empty string.

                    # We increase the index number.
                    arg_3 += 1

                # We return the last read element.
                return arg_2[arg_3]

            # We return the extracted line.
            return arg_1

        # The extracted line is a comment line.

        # We return an empty string as we do not want to work with commented line.
        return ""

Format the extracted domain before passing it to the system .


def Func ( arg_0 , arg_1 , arg_2 = arg_3 . KMIPVersion . KMIP_1_0 ) : super ( GetRequestPayload , arg_0 ) . Func ( arg_1 , arg_2 = arg_2 ) arg_6 = utils . BytearrayStream ( arg_1 . Func ( arg_0 . length ) ) if arg_0 . is_tag_next ( arg_3 . Tags . UNIQUE_IDENTIFIER , arg_6 ) : arg_0 . _unique_identifier = primitives . TextString ( tag = arg_3 . Tags . UNIQUE_IDENTIFIER ) arg_0 . _unique_identifier . Func ( arg_6 , arg_2 = arg_2 ) if arg_0 . is_tag_next ( arg_3 . Tags . KEY_FORMAT_TYPE , arg_6 ) : arg_0 . _key_format_type = primitives . Enumeration ( enum = arg_3 . KeyFormatType , tag = arg_3 . Tags . KEY_FORMAT_TYPE ) arg_0 . _key_format_type . Func ( arg_6 , arg_2 = arg_2 ) if arg_0 . is_tag_next ( arg_3 . Tags . KEY_COMPRESSION_TYPE , arg_6 ) : arg_0 . _key_compression_type = primitives . Enumeration ( enum = arg_3 . KeyCompressionType , tag = arg_3 . Tags . KEY_COMPRESSION_TYPE ) arg_0 . _key_compression_type . Func ( arg_6 , arg_2 = arg_2 ) if arg_0 . is_tag_next ( arg_3 . Tags . KEY_WRAPPING_SPECIFICATION , arg_6 ) : arg_0 . _key_wrapping_specification = objects . KeyWrappingSpecification ( ) arg_0 . _key_wrapping_specification . Func ( arg_6 , arg_2 = arg_2 ) arg_0 . is_oversized ( arg_6 )

def Func(arg_0, arg_1, arg_2=arg_3.KMIPVersion.KMIP_1_0):
        """
        Read the data encoding the Get request payload and decode it into its
        constituent parts.

        Args:
            input_stream (stream): A data stream containing encoded object
                data, supporting a Func method; usually a BytearrayStream
                object.
            kmip_version (KMIPVersion): An enumeration defining the KMIP
                version with which the object will be decoded. Optional,
                defaults to KMIP 1.0.
        """
        super(GetRequestPayload, arg_0).Func(
            arg_1,
            arg_2=arg_2
        )
        arg_6 = utils.BytearrayStream(arg_1.Func(arg_0.length))

        if arg_0.is_tag_next(arg_3.Tags.UNIQUE_IDENTIFIER, arg_6):
            arg_0._unique_identifier = primitives.TextString(
                tag=arg_3.Tags.UNIQUE_IDENTIFIER
            )
            arg_0._unique_identifier.Func(
                arg_6,
                arg_2=arg_2
            )

        if arg_0.is_tag_next(arg_3.Tags.KEY_FORMAT_TYPE, arg_6):
            arg_0._key_format_type = primitives.Enumeration(
                enum=arg_3.KeyFormatType,
                tag=arg_3.Tags.KEY_FORMAT_TYPE
            )
            arg_0._key_format_type.Func(
                arg_6,
                arg_2=arg_2
            )

        if arg_0.is_tag_next(arg_3.Tags.KEY_COMPRESSION_TYPE, arg_6):
            arg_0._key_compression_type = primitives.Enumeration(
                enum=arg_3.KeyCompressionType,
                tag=arg_3.Tags.KEY_COMPRESSION_TYPE
            )
            arg_0._key_compression_type.Func(
                arg_6,
                arg_2=arg_2
            )

        if arg_0.is_tag_next(
                arg_3.Tags.KEY_WRAPPING_SPECIFICATION,
                arg_6
        ):
            arg_0._key_wrapping_specification = \
                objects.KeyWrappingSpecification()
            arg_0._key_wrapping_specification.Func(
                arg_6,
                arg_2=arg_2
            )

        arg_0.is_oversized(arg_6)

Read the data encoding the Get request payload and decode it into its
        constituent parts.

        Args:
            input_stream (stream): A data stream containing encoded object
                data, supporting a read method; usually a BytearrayStream
                object.
            kmip_version (KMIPVersion): An enumeration defining the KMIP
                version with which the object will be decoded. Optional,
                defaults to KMIP 1.0.

Read the data encoding the Get request payload and decode it into its constituent parts .


def Func ( arg_0 , arg_1 , arg_2 = True ) : arg_0 . activateCells ( sorted ( arg_1 ) , arg_2 ) arg_0 . activateDendrites ( arg_2 )

def Func(arg_0, arg_1, arg_2=True):
    """
    Perform one time step of the Temporal Memory algorithm.

    This method calls :meth:`activateCells`, then calls
    :meth:`activateDendrites`. Using :class:`TemporalMemory` via its
    :meth:`Func` method ensures that you'll always be able to call
    :meth:`getPredictiveCells` to get predictions for the next time step.

    :param activeColumns: (iter) Indices of active columns.

    :param learn: (bool) Whether or not learning is enabled.
    """
    arg_0.activateCells(sorted(arg_1), arg_2)
    arg_0.activateDendrites(arg_2)

Perform one time step of the Temporal Memory algorithm.

    This method calls :meth:`activateCells`, then calls
    :meth:`activateDendrites`. Using :class:`TemporalMemory` via its
    :meth:`compute` method ensures that you'll always be able to call
    :meth:`getPredictiveCells` to get predictions for the next time step.

    :param activeColumns: (iter) Indices of active columns.

    :param learn: (bool) Whether or not learning is enabled.

Perform one time step of the Temporal Memory algorithm .


def Func(arg_0, arg_1):
        """Create a new receiver link."""
        arg_2 = arg_0._pn_session.receiver(arg_1)
        return arg_0.request_receiver(arg_2)


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

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

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


def Func ( arg_0 ) : arg_0 . generateMetricDefinitions ( ) arg_0 . generateFieldDefinitions ( ) arg_0 . generateDashboardDefinitions ( ) arg_0 . outputMarkdown ( )

def Func(arg_0):
        """
        Look up each of the metrics and then output in Markdown
        """
        arg_0.generateMetricDefinitions()
        arg_0.generateFieldDefinitions()
        arg_0.generateDashboardDefinitions()
        arg_0.outputMarkdown()


return np.log(res) if return_log else res

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = False ) : arg_4 = arg_0 . expQt ( arg_2 ) . T arg_5 = arg_1 . dot ( arg_4 ) return np . log ( arg_5 ) if arg_3 else arg_5

def Func(arg_0, arg_1, arg_2, arg_3=False):
        """
        Compute the probability of the sequence state of the child
        at time t later, given the parent profile.

        Parameters
        ----------

         profile : numpy.array
            Sequence profile. Shape = (L, a),
            where L - sequence length, a - alphabet size.

         t : double
            Time to propagate

         return_log: bool
            If True, return log-probability

        Returns
        -------

         res : np.array
            Profile of the sequence after time t in the future.
            Shape = (L, a), where L - sequence length, a - alphabet size.

        """
        arg_4 = arg_0.expQt(arg_2).T
        arg_5 = arg_1.dot(arg_4)
        return np.log(arg_5) if arg_3 else arg_5

Compute the probability of the sequence state of the child at time t later given the parent profile .


def Func ( arg_0 ) : logger . debug ( "TCPTransport.Func()" ) with arg_0 . lock : if arg_0 . _socket is None : if arg_0 . _state != "closed" : arg_0 . event ( DisconnectedEvent ( arg_0 . _dst_addr ) ) arg_0 . _set_state ( "closed" ) return if arg_0 . _hup or not arg_0 . _serializer : arg_0 . _close ( ) else : arg_0 . send_stream_tail ( )

def Func(arg_0):
        """Disconnect the stream gracefully."""
        logger.debug("TCPTransport.Func()")
        with arg_0.lock:
            if arg_0._socket is None:
                if arg_0._state != "closed":
                    arg_0.event(DisconnectedEvent(arg_0._dst_addr))
                    arg_0._set_state("closed")
                return
            if arg_0._hup or not arg_0._serializer:
                arg_0._close()
            else:
                arg_0.send_stream_tail()


def
Func
(
arg_0
,
Func
)
:
assert
arg_0
.
name
==
Func
.
name
,
'state name "{}" != body name "{}"'
.
format
(
Func
.
name
,
arg_0
.
name
)
arg_0
.
position
=
Func
.
position
arg_0
.
quaternion
=
Func
.
quaternion
arg_0
.
linear_velocity
=
Func
.
linear_velocity
arg_0
.
angular_velocity
=
Func
.
angular_velocity

def Func(arg_0, Func):
        '''Set the state of this body.

        Parameters
        ----------
        state : BodyState tuple
            The desired state of the body.
        '''
        assert arg_0.name == Func.name, \
            'state name "{}" != body name "{}"'.format(Func.name, arg_0.name)
        arg_0.position = Func.position
        arg_0.quaternion = Func.quaternion
        arg_0.linear_velocity = Func.linear_velocity
        arg_0.angular_velocity = Func.angular_velocity


def Func(arg_0, arg_1=None):
    """Transform & and < to XML valid & and &lt.

    Pass a list of tags as string to enable replacement of
    '<' globally but keep any XML tags in the list.
    """
    arg_0 = re.sub("&", "&", arg_0)
    if arg_1:
        arg_0 = re.sub(r"(<)(?![\/]?({0})\b)".format("|".join(arg_1)), '<', arg_0)
    else:
        arg_0 = re.sub("<", "<", arg_0)
    return arg_0

Transform & and < to XML valid &amp ; and &lt .


(self, sizeMS, sigmaMS=None, forwardOnly=False)

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = False ) : arg_2 = arg_1 / 10 if arg_2 is None else arg_2 arg_4 , arg_5 = arg_1 * arg_0 . pointsPerMs , arg_2 * arg_0 . pointsPerMs arg_0 . kernel = swhlab . common . Func ( arg_4 , arg_5 , arg_3 ) return arg_0 . kernel

def Func(arg_0, arg_1, arg_2=None, arg_3=False):
        """create kernel based on this ABF info."""
        arg_2=arg_1/10 if arg_2 is None else arg_2
        arg_4,arg_5=arg_1*arg_0.pointsPerMs,arg_2*arg_0.pointsPerMs
        arg_0.kernel=swhlab.common.Func(arg_4,arg_5,arg_3)
        return arg_0.kernel