def Func ( arg_0 , arg_1 ) : arg_2 = { "categoryIn" : [ None ] , "bottomUpIn" : arg_0 . _getStateAnomalyVector ( arg_1 ) , } arg_3 = { "categoriesOut" : numpy . zeros ( ( 1 , ) ) , "bestPrototypeIndices" : numpy . zeros ( ( 1 , ) ) , "categoryProbabilitiesOut" : numpy . zeros ( ( 1 , ) ) } arg_4 = arg_0 . htm_prediction_model . _getAnomalyClassifier ( ) arg_5 = arg_4 . getSelf ( ) . _knn arg_6 = numpy . array ( arg_4 . getSelf ( ) . getParameter ( 'categoryRecencyList' ) ) arg_7 = numpy . where ( ( arg_6 >= arg_0 . _autoDetectWaitRecords ) & ( arg_6 < arg_1 . ROWID ) ) [ 0 ] . tolist ( ) if len ( arg_7 ) == 0 : return None arg_4 . setParameter ( 'inferenceMode' , True ) arg_4 . setParameter ( 'learningMode' , False ) arg_4 . getSelf ( ) . compute ( arg_2 , arg_3 ) arg_4 . setParameter ( 'learningMode' , True ) arg_8 = arg_4 . getSelf ( ) . getLatestDistances ( ) arg_9 = arg_8 [ arg_7 ] if arg_9 . min ( ) <= arg_0 . _classificationMaxDist : arg_10 = arg_6 [ arg_7 ] arg_11 = arg_10 [ arg_9 . argmin ( ) ] arg_12 = numpy . where ( arg_6 == arg_11 ) [ 0 ] [ 0 ] arg_13 = arg_4 . getSelf ( ) . getCategoryList ( ) [ arg_12 ] return arg_13 return None

def Func(arg_0, arg_1):
    """
    return the classified labeling of record
    """
    arg_2 = {
      "categoryIn": [None],
      "bottomUpIn": arg_0._getStateAnomalyVector(arg_1),
    }

    arg_3 = {"categoriesOut": numpy.zeros((1,)),
               "bestPrototypeIndices":numpy.zeros((1,)),
               "categoryProbabilitiesOut":numpy.zeros((1,))}

    # Run inference only to capture state before learning
    arg_4 = arg_0.htm_prediction_model._getAnomalyClassifier()
    arg_5 = arg_4.getSelf()._knn

    # Only use points before record to classify and after the wait period.
    arg_6 = \
      numpy.array(arg_4.getSelf().getParameter('categoryRecencyList'))
    arg_7 = numpy.where(
        (arg_6 >= arg_0._autoDetectWaitRecords) &
        (arg_6 < arg_1.ROWID)
      )[0].tolist()

    if len(arg_7) == 0:
      return None

    arg_4.setParameter('inferenceMode', True)
    arg_4.setParameter('learningMode', False)
    arg_4.getSelf().compute(arg_2, arg_3)
    arg_4.setParameter('learningMode', True)

    arg_8 = arg_4.getSelf().getLatestDistances()
    arg_9 = arg_8[arg_7]
    if arg_9.min() <= arg_0._classificationMaxDist:
      arg_10 = arg_6[arg_7]
      arg_11 = arg_10[arg_9.argmin()]
      arg_12 = numpy.where(arg_6 == arg_11)[0][0]
      arg_13 = arg_4.getSelf().getCategoryList()[arg_12]
      return arg_13
    return None


def Func ( arg_0 , arg_1 ) : arg_2 = db_api . async_transaction_find ( arg_0 , id = arg_1 , scope = db_api . ONE ) if not arg_2 : return arg_0 . async_job = { "job" : v . _make_job_dict ( arg_2 ) }

def Func(arg_0, arg_1):
    """Adds job to neutron context for use later."""
    arg_2 = db_api.async_transaction_find(
        arg_0, id=arg_1, scope=db_api.ONE)
    if not arg_2:
        return
    arg_0.async_job = {"job": v._make_job_dict(arg_2)}

Adds job to neutron context for use later .


def Func(arg_0, arg_1=None):
        """
        Return index type used in loop nest.

        If index type between loops differ, an exception is raised.
        """
        if arg_1 is None:
            arg_1 = arg_0.get_kernel_loop_nest()
        if type(arg_1) is c_ast.For:
            arg_1 = [arg_1]
        arg_2 = (None, None)
        for arg_3 in arg_1:
            if type(arg_3) is c_ast.For:
                if type(arg_3.stmt) in [c_ast.For, c_ast.Compound]:
                    arg_4 = arg_0.Func(arg_1=arg_3.stmt)
                else:
                    arg_4 = None
                arg_2 = (arg_3.init.decls[0].type.type.names, arg_4)
                break
        if arg_2[0] == arg_2[1] or arg_2[1] is None:
            return arg_2[0]
        else:
            raise ValueError("Loop indices must have same type, found {}.".format(arg_2))


(shape1,
                                  shape2,
                                  name="prefer_static_broadcast_shape")

def
Func
(
arg_0
,
arg_1
,
arg_2
=
"Func"
)
:
with
tf
.
name_scope
(
arg_2
)
:
def
make_shape_tensor
(
arg_3
)
:
return
tf
.
convert_to_tensor
(
value
=
arg_3
,
arg_2
=
"shape"
,
dtype
=
tf
.
int32
)
def
get_tensor_shape
(
arg_4
)
:
if
isinstance
(
arg_4
,
tf
.
TensorShape
)
:
return
arg_4
arg_5
=
tf
.
get_static_value
(
make_shape_tensor
(
arg_4
)
)
if
arg_5
is
not
:
return
tf
.
TensorShape
(
arg_5
)
return
def
get_shape_tensor
(
arg_4
)
:
if
not
isinstance
(
arg_4
,
tf
.
TensorShape
)
:
return
make_shape_tensor
(
arg_4
)
if
tensorshape_util
.
is_fully_defined
(
arg_4
)
:
return
make_shape_tensor
(
tensorshape_util
.
as_list
(
arg_4
)
)
raise
ValueError
(
"Cannot broadcast from partially "
"defined `TensorShape`."
)
arg_6
=
get_tensor_shape
(
arg_0
)
arg_7
=
get_tensor_shape
(
arg_1
)
if
arg_6
is
not
and
arg_7
is
not
:
return
tf
.
broadcast_static_shape
(
arg_6
,
arg_7
)
arg_6
=
get_shape_tensor
(
arg_0
)
arg_7
=
get_shape_tensor
(
arg_1
)
return
tf
.
broadcast_dynamic_shape
(
arg_6
,
arg_7
)

def Func(arg_0,
                                  arg_1,
                                  arg_2="Func"):
  """Convenience function which statically broadcasts shape when possible.

  Args:
    shape1:  `1-D` integer `Tensor`.  Already converted to tensor!
    shape2:  `1-D` integer `Tensor`.  Already converted to tensor!
    name:  A string name to prepend to created ops.

  Returns:
    The broadcast shape, either as `TensorShape` (if broadcast can be done
      statically), or as a `Tensor`.
  """
  with tf.name_scope(arg_2):

    def make_shape_tensor(arg_3):
      return tf.convert_to_tensor(value=arg_3, arg_2="shape", dtype=tf.int32)

    def get_tensor_shape(arg_4):
      if isinstance(arg_4, tf.TensorShape):
        return arg_4
      arg_5 = tf.get_static_value(make_shape_tensor(arg_4))
      if arg_5 is not None:
        return tf.TensorShape(arg_5)
      return None

    def get_shape_tensor(arg_4):
      if not isinstance(arg_4, tf.TensorShape):
        return make_shape_tensor(arg_4)
      if tensorshape_util.is_fully_defined(arg_4):
        return make_shape_tensor(tensorshape_util.as_list(arg_4))
      raise ValueError("Cannot broadcast from partially "
                       "defined `TensorShape`.")

    arg_6 = get_tensor_shape(arg_0)
    arg_7 = get_tensor_shape(arg_1)
    if arg_6 is not None and arg_7 is not None:
      return tf.broadcast_static_shape(arg_6, arg_7)

    arg_6 = get_shape_tensor(arg_0)
    arg_7 = get_shape_tensor(arg_1)
    return tf.broadcast_dynamic_shape(arg_6, arg_7)

Convenience function which statically broadcasts shape when possible .


return [out[0] + i for i in range(out[1])]

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
)
:
arg_3
=
str
(
arg_3
)
arg_4
=
arg_0
.
url
(
"{}/{}/reserve/{}/"
.
format
(
arg_1
,
arg_2
,
arg_3
)
)
arg_5
=
arg_0
.
remote_utils
.
get_url
(
arg_4
)
if
arg_5
.
status_code
is
not
200
:
raise
RemoteDataNotFoundError
(
'Invalid req: '
+
arg_5
.
status_code
)
arg_6
=
arg_5
.
json
(
)
return
[
arg_6
[
0
]
+
arg_7
for
arg_7
in
range
(
arg_6
[
1
]
)
]

def Func(arg_0, arg_1, arg_2, arg_3):
        """
        Requests a list of next-available-IDs from the server.

        Arguments:
            quantity (int): The number of IDs to reserve

        Returns:
            int[quantity]: List of IDs you've been granted
        """
        arg_3 = str(arg_3)
        arg_4 = arg_0.url("{}/{}/reserve/{}/".format(arg_1, arg_2, arg_3))
        arg_5 = arg_0.remote_utils.get_url(arg_4)
        if arg_5.status_code is not 200:
            raise RemoteDataNotFoundError('Invalid req: ' + arg_5.status_code)
        arg_6 = arg_5.json()
        return [arg_6[0] + arg_7 for arg_7 in range(arg_6[1])]

Requests a list of next - available - IDs from the server .


def Func ( arg_0 , arg_1 , arg_2 ) : try : if arg_1 . display is '%' : arg_3 = float ( arg_2 [ 'percent_diff' ] ) else : arg_3 = float ( arg_2 [ 'absolute_diff' ] ) except ValueError : return False if not ( arg_1 . Func_passed ( arg_3 ) ) : arg_0 . sla_failures += 1 arg_0 . sla_failure_list . append ( DiffSLAFailure ( arg_1 , arg_2 ) ) return True

def Func(arg_0, arg_1, arg_2):
    """
    Check whether the SLA has passed or failed
    """
    try:
      if arg_1.display is '%':
        arg_3 = float(arg_2['percent_diff'])
      else:
        arg_3 = float(arg_2['absolute_diff'])
    except ValueError:
      return False
    if not (arg_1.Func_passed(arg_3)):
      arg_0.sla_failures += 1
      arg_0.sla_failure_list.append(DiffSLAFailure(arg_1, arg_2))
    return True


def Func ( arg_0 , arg_1 ) : if arg_0 . _exitAfter is None or arg_1 < arg_0 . _exitAfter : return False arg_2 = arg_0 . _jobsDAO . modelsGetFieldsForJob ( arg_0 . _jobID , [ 'params' ] ) arg_3 = [ e [ 0 ] for e in arg_2 ] arg_4 = [ json . loads ( e [ 1 ] [ 0 ] ) [ 'structuredParams' ] [ '__model_num' ] for e in arg_2 ] arg_5 = filter ( lambda x : x [ 1 ] == arg_0 . modelIndex , zip ( arg_3 , arg_4 ) ) arg_6 = min ( zip ( * arg_5 ) [ 0 ] ) return arg_6 == arg_0 . _modelID

def Func(arg_0, arg_1):
    """
    Checks to see if the model should exit based on the exitAfter dummy
    parameter
    """

    if arg_0._exitAfter is None \
       or arg_1 < arg_0._exitAfter:
      return False

    arg_2 = arg_0._jobsDAO.modelsGetFieldsForJob(arg_0._jobID, ['params'])

    arg_3 = [e[0] for e in arg_2]
    arg_4 = [json.loads(e[1][0])['structuredParams']['__model_num'] for e in arg_2]

    arg_5 = filter(lambda x: x[1] == arg_0.modelIndex,
                              zip(arg_3, arg_4))

    arg_6 = min(zip(*arg_5)[0])

    return arg_6 == arg_0._modelID


def Func ( arg_0 , arg_1 = False , ** arg_2 ) : arg_2 [ 'strip_comments' ] = arg_1 return Funcs ( arg_0 . read ( ) , ** arg_2 )

def Func(arg_0, arg_1=False, **arg_2):
    """
    Load a list of trees from an open Newick formatted file.

    :param fp: open file handle.
    :param strip_comments: Flag signaling whether to strip comments enclosed in square \
    brackets.
    :param kw: Keyword arguments are passed through to `Node.create`.
    :return: List of Node objects.
    """
    arg_2['strip_comments'] = arg_1
    return Funcs(arg_0.read(), **arg_2)

Load a list of trees from an open Newick formatted file .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_0 . children . Func ( arg_1 , arg_2 ) arg_2 . parent = arg_0

def Func(arg_0, arg_1, arg_2):
        """Func a child node"""
        arg_0.children.Func(arg_1, arg_2)
        arg_2.parent = arg_0


def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = sum ( arg_3 ) if not any ( arg_2 ) : arg_5 = [ int ( arg_0 * i / arg_4 ) for i in arg_3 ] elif any ( arg_3 ) : arg_6 = arg_0 - sum ( arg_2 ) arg_5 = [ int ( arg_6 * i / arg_4 ) if i else j for i , j in zip ( arg_3 , arg_2 ) ] else : arg_5 = arg_2 return list ( zip ( arg_1 , arg_5 ) )

def Func(arg_0, arg_1, arg_2, arg_3):
    """Determine molecule numbers for given total,
    absolute and relative numbers"""
    arg_4 = sum(arg_3)
    if not any(arg_2):
        # Only relative numbers
        arg_5 = [int(arg_0*i/arg_4) for i in arg_3]
    elif any(arg_3):
        # Absolute numbers and fill the rest with relative numbers
        arg_6 = arg_0 - sum(arg_2)
        arg_5 = [int(arg_6*i/arg_4) if i else j
                   for i,j in zip(arg_3, arg_2)]
    else:
        # Only absolute numbers
        arg_5 = arg_2
    return list(zip(arg_1, arg_5))

Determine molecule numbers for given total absolute and relative numbers


return super(Bucket, self).get_all_keys(*args, **kwargs)

def Func ( arg_0 , * arg_1 , ** arg_2 ) : if arg_2 . pop ( 'force' , None ) : arg_3 = arg_2 . get ( 'headers' , arg_1 [ 0 ] if len ( arg_1 ) else None ) or dict ( ) arg_3 [ 'force' ] = True arg_2 [ 'headers' ] = arg_3 return super ( Bucket , arg_0 ) . Func ( * arg_1 , ** arg_2 )

def Func(arg_0, *arg_1, **arg_2):
        """Return a list of keys from MimicDB.

        :param boolean force: If true, API call is forced to S3
        """
        if arg_2.pop('force', None):
            arg_3 = arg_2.get('headers', arg_1[0] if len(arg_1) else None) or dict()
            arg_3['force'] = True
            arg_2['headers'] = arg_3

        return super(Bucket, arg_0).Func(*arg_1, **arg_2)


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
try
:
arg_0
.
track
=
arg_1
[
'track'
]
arg_0
.
identifier
=
arg_1
[
'info'
]
[
'identifier'
]
arg_0
.
can_seek
=
arg_1
[
'info'
]
[
'isSeekable'
]
arg_0
.
author
=
arg_1
[
'info'
]
[
'author'
]
arg_0
.
duration
=
arg_1
[
'info'
]
[
'length'
]
arg_0
.
stream
=
arg_1
[
'info'
]
[
'isStream'
]
arg_0
.
title
=
arg_1
[
'info'
]
[
'title'
]
arg_0
.
uri
=
arg_1
[
'info'
]
[
'uri'
]
arg_0
.
requester
=
arg_2
return
arg_0
except
KeyError
:
raise
InvalidTrack
(
'An invalid track was passed.'
)

def Func(arg_0, arg_1, arg_2):
        """ Returns an optional AudioTrack. """
        try:
            arg_0.track = arg_1['track']
            arg_0.identifier = arg_1['info']['identifier']
            arg_0.can_seek = arg_1['info']['isSeekable']
            arg_0.author = arg_1['info']['author']
            arg_0.duration = arg_1['info']['length']
            arg_0.stream = arg_1['info']['isStream']
            arg_0.title = arg_1['info']['title']
            arg_0.uri = arg_1['info']['uri']
            arg_0.requester = arg_2

            return arg_0
        except KeyError:
            raise InvalidTrack('An invalid track was passed.')


def Func ( arg_0 , arg_1 ) : _AssertIsLocal ( arg_0 ) _AssertIsLocal ( arg_1 ) import shutil shutil . move ( arg_0 , arg_1 )

def Func(arg_0, arg_1):
    '''
    Moves a file.

    :param unicode source_filename:

    :param unicode target_filename:

    :raises NotImplementedForRemotePathError:
        If trying to operate with non-local files.
    '''
    _AssertIsLocal(arg_0)
    _AssertIsLocal(arg_1)

    import shutil
    shutil.move(arg_0, arg_1)


def Func ( arg_0 , arg_1 ) : if not arg_1 . initialized : return arg_0 . dot_code = str ( arg_0 . model ) arg_3 = arg_0 . edit_traits ( parent = arg_1 . ui . control , kind = "livemodal" , view = "dot_code_view" )

def Func(arg_0, arg_1):
        """ Handles display of the dot code in a text editor.
        """
        if not arg_1.initialized:
            return

        arg_0.dot_code = str(arg_0.model)
        arg_3 = arg_0.edit_traits( parent = arg_1.ui.control,
                                   kind   = "livemodal",
                                   view   = "dot_code_view" )

Handles display of the dot code in a text editor .


def Func ( arg_0 , arg_1 ) : arg_2 = DerefValidatorDecorator ( arg_1 ) for arg_3 , arg_4 in iteritems ( arg_0 . validators ) : yield arg_3 , arg_2 ( arg_4 )

def Func(arg_0, arg_1):
        """Creates validators generator for the spec resolver.

        :param spec_resolver: resolver for the spec
        :type instance_resolver: :class:`jsonschema.RefResolver`
        """
        arg_2 = DerefValidatorDecorator(arg_1)
        for arg_3, arg_4 in iteritems(arg_0.validators):
            yield arg_3, arg_2(arg_4)

Creates validators generator for the spec resolver .


def Func ( arg_0 ) : if not arg_0 : return { } try : arg_1 = arg_0 [ 'header' ] except KeyError : try : arg_1 = arg_0 [ 'msg_id' ] except KeyError : raise else : arg_1 = arg_0 if not isinstance ( arg_1 , dict ) : arg_1 = dict ( arg_1 ) return arg_1

def Func(arg_0):
    """Given a message or header, return the header."""
    if not arg_0:
        return {}
    try:
        # See if msg_or_header is the entire message.
        arg_1 = arg_0['header']
    except KeyError:
        try:
            # See if msg_or_header is just the header
            arg_1 = arg_0['msg_id']
        except KeyError:
            raise
        else:
            arg_1 = arg_0
    if not isinstance(arg_1, dict):
        arg_1 = dict(arg_1)
    return arg_1

Given a message or header return the header .


(wrapper,
                   wrapped,
                   assigned = WRAPPER_ASSIGNMENTS,
                   updated = WRAPPER_UPDATES)

def Func ( arg_0 , arg_1 , arg_2 = arg_3 , arg_4 = arg_5 ) : for arg_6 in arg_2 : setattr ( arg_0 , arg_6 , getattr ( arg_1 , arg_6 ) ) for arg_6 in arg_4 : getattr ( arg_0 , arg_6 ) . update ( getattr ( arg_1 , arg_6 , { } ) ) return arg_0

def Func(arg_0,
                   arg_1,
                   arg_2 = arg_3,
                   arg_4 = arg_5):
    """Update a wrapper function to look like the wrapped function

       wrapper is the function to be updated
       wrapped is the original function
       assigned is a tuple naming the attributes assigned directly
       from the wrapped function to the wrapper function (defaults to
       functools.WRAPPER_ASSIGNMENTS)
       updated is a tuple naming the attributes of the wrapper that
       are updated with the corresponding attribute from the wrapped
       function (defaults to functools.WRAPPER_UPDATES)
    """
    for arg_6 in arg_2:
        setattr(arg_0, arg_6, getattr(arg_1, arg_6))
    for arg_6 in arg_4:
        getattr(arg_0, arg_6).update(getattr(arg_1, arg_6, {}))
    # Return the wrapper so this can be used as a decorator via partial()
    return arg_0


(self, options, option_name, section_name)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : if getattr ( arg_1 , arg_2 , None ) is not None : return if arg_2 . startswith ( arg_3 + '_' ) : arg_4 = arg_2 . upper ( ) arg_5 = arg_2 [ len ( arg_3 ) + 1 : ] else : arg_4 = ( arg_3 + '_' + arg_2 ) . upper ( ) arg_5 = arg_2 setattr ( arg_1 , arg_2 , os . environ . get ( arg_4 , ( arg_0 . context . conf . get ( arg_3 , { } ) ) . get ( arg_5 ) ) )

def Func(arg_0, arg_1, arg_2, arg_3):
        """Resolves an option value into options.

        Sets options.<option_name> to a resolved value. Any value
        already in options overrides a value in os.environ which
        overrides self.context.conf.

        :param options: The options instance as returned by optparse.
        :param option_name: The name of the option, such as
            ``auth_url``.
        :param section_name: The name of the section, such as
            ``swiftly``.
        """
        if getattr(arg_1, arg_2, None) is not None:
            return
        if arg_2.startswith(arg_3 + '_'):
            arg_4 = arg_2.upper()
            arg_5 = arg_2[len(arg_3) + 1:]
        else:
            arg_4 = (arg_3 + '_' + arg_2).upper()
            arg_5 = arg_2
        setattr(
            arg_1, arg_2,
            os.environ.get(
                arg_4,
                (arg_0.context.conf.get(arg_3, {})).get(arg_5)))


def Func(arg_0, arg_1, arg_2):
    """Helper for various string-wrapped functions."""
    for arg_3, arg_4 in arg_1:
        if hasattr(arg_4, '__html__') or isinstance(arg_4, string_types):
            arg_0[arg_3] = arg_2(arg_4)
    return arg_0

Helper for various string - wrapped functions .


(self, train=False, valid=False, xval=False)

return list(m.values())[0] if len(m) == 1 else m

def Func ( arg_0 , arg_1 = False , arg_2 = False , arg_3 = False ) : arg_4 = ModelBase . _get_metrics ( arg_0 , arg_1 , arg_2 , arg_3 ) arg_5 = { } for arg_6 , arg_7 in zip ( list ( arg_4 . keys ( ) ) , list ( arg_4 . values ( ) ) ) : arg_5 [ arg_6 ] = None if arg_7 is None else arg_7 . Func ( ) return list ( arg_5 . values ( ) ) [ 0 ] if len ( arg_5 ) == 1 else arg_5

def Func(arg_0, arg_1=False, arg_2=False, arg_3=False):
        """
        Retrieve the Hit Ratios.

        If all are False (default), then return the training metric value.
        If more than one options is set to True, then return a dictionary of metrics where the keys are "train",
        "valid", and "xval".

        :param train: If train is True, then return the hit ratio value for the training data.
        :param valid: If valid is True, then return the hit ratio value for the validation data.
        :param xval:  If xval is True, then return the hit ratio value for the cross validation data.
        :return: The hit ratio for this regression model.
        """
        arg_4 = ModelBase._get_metrics(arg_0, arg_1, arg_2, arg_3)
        arg_5 = {}
        for arg_6, arg_7 in zip(list(arg_4.keys()), list(arg_4.values())): arg_5[arg_6] = None if arg_7 is None else arg_7.Func()
        return list(arg_5.values())[0] if len(arg_5) == 1 else arg_5


def Func(arg_0, arg_1, arg_2,arg_3=False):
      """
      Get or create edges using get_or_create_node
      """
      arg_4 = arg_0.add_node(arg_1)
      arg_5 = arg_0.add_node(arg_2)
      arg_6 = Edge(arg_4, arg_5, arg_3)
      arg_0._edges.append(arg_6)
      return arg_6


def Func ( arg_0 ) -> List [ str ] : for arg_1 in arg_0 . packages : yield os . path . join ( arg_1 . path , 'resources' )

def Func(arg_0) -> List[str]:
        """
        Get all effect directories for registered effects.
        """
        for arg_1 in arg_0.packages:
            yield os.path.join(arg_1.path, 'resources')

Get all effect directories for registered effects .


def Func(arg_0, arg_1):
        """
        Creates a job flow using the config from the EMR connection.
        Keys of the json extra hash may have the arguments of the boto3
        run_job_flow method.
        Overrides for this config may be passed as the job_flow_overrides.
        """

        if not arg_0.emr_conn_id:
            raise AirflowException('emr_conn_id must be present to use Func')

        arg_2 = arg_0.get_connection(arg_0.emr_conn_id)

        arg_3 = arg_2.extra_dejson.copy()
        arg_3.update(arg_1)

        arg_4 = arg_0.get_conn().run_job_flow(**arg_3)

        return arg_4

Creates a job flow using the config from the EMR connection . Keys of the json extra hash may have the arguments of the boto3 run_job_flow method . Overrides for this config may be passed as the job_flow_overrides .


def Func ( arg_0 ) : arg_0 . _central_manager = CBCentralManager . alloc ( ) arg_0 . _central_manager . initWithDelegate_queue_options_ ( arg_0 . _central_delegate , None , None )

def Func(arg_0):
        """Initialize the BLE provider.  Must be called once before any other
        calls are made to the provider.
        """
        # Setup the central manager and its delegate.
        arg_0._central_manager = CBCentralManager.alloc()
        arg_0._central_manager.initWithDelegate_queue_options_(arg_0._central_delegate,
                                                              None, None)

Initialize the BLE provider . Must be called once before any other calls are made to the provider .


return self._action('rename', name=name, wait=wait)

def Func ( arg_0 , arg_1 , arg_2 = True ) : return arg_0 . _action ( 'Func' , arg_1 = arg_1 , arg_2 = arg_2 )

def Func(arg_0, arg_1, arg_2=True):
        """
        Change the name of this droplet

        Parameters
        ----------
        name: str
            New name for the droplet
        wait: bool, default True
            Whether to block until the pending action is completed

        Raises
        ------
        APIError if region does not support private networking
        """
        return arg_0._action('Func', arg_1=arg_1, arg_2=arg_2)


(  # pylint: disable=too-many-arguments
    file_or_code,
    code,
    in_ns,
    use_var_indirection,
    warn_on_shadowed_name,
    warn_on_shadowed_var,
    warn_on_var_indirection,
)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 , arg_6 , ) : basilisp . init ( ) arg_7 = compiler . CompilerContext ( filename = CLI_INPUT_FILE_PATH if arg_1 else ( STDIN_INPUT_FILE_PATH if arg_0 == STDIN_FILE_NAME else arg_0 ) , opts = { compiler . WARN_ON_SHADOWED_NAME : arg_4 , compiler . WARN_ON_SHADOWED_VAR : arg_5 , compiler . USE_VAR_INDIRECTION : arg_3 , compiler . WARN_ON_VAR_INDIRECTION : arg_6 , } , ) arg_8 = object ( ) with Functime . ns_bindings ( arg_2 ) as ns : if arg_1 : print ( Functime . lrepr ( eval_str ( arg_0 , arg_7 , ns . module , arg_8 ) ) ) elif arg_0 == STDIN_FILE_NAME : print ( Functime . lrepr ( eval_stream ( click . get_text_stream ( "stdin" ) , arg_7 , ns . module ) ) ) else : print ( Functime . lrepr ( eval_file ( arg_0 , arg_7 , ns . module ) ) )

def Func(  # pylint: disable=too-many-arguments
    arg_0,
    arg_1,
    arg_2,
    arg_3,
    arg_4,
    arg_5,
    arg_6,
):
    """Run a Basilisp script or a line of code, if it is provided."""
    basilisp.init()
    arg_7 = compiler.CompilerContext(
        filename=CLI_INPUT_FILE_PATH
        if arg_1
        else (
            STDIN_INPUT_FILE_PATH if arg_0 == STDIN_FILE_NAME else arg_0
        ),
        opts={
            compiler.WARN_ON_SHADOWED_NAME: arg_4,
            compiler.WARN_ON_SHADOWED_VAR: arg_5,
            compiler.USE_VAR_INDIRECTION: arg_3,
            compiler.WARN_ON_VAR_INDIRECTION: arg_6,
        },
    )
    arg_8 = object()

    with Functime.ns_bindings(arg_2) as ns:
        if arg_1:
            print(Functime.lrepr(eval_str(arg_0, arg_7, ns.module, arg_8)))
        elif arg_0 == STDIN_FILE_NAME:
            print(
                Functime.lrepr(
                    eval_stream(click.get_text_stream("stdin"), arg_7, ns.module)
                )
            )
        else:
            print(Functime.lrepr(eval_file(arg_0, arg_7, ns.module)))

Run a Basilisp script or a line of code if it is provided .


def Func(arg_0, arg_1, arg_2=None):
        """
        Converts the provided traceId hex value with optional high bits
        to a string.

        :param trace_id: the value of the trace ID
        :type trace_id: int
        :param trace_id_high: the high bits of the trace ID
        :type trace_id: int
        :returns: trace_id_high + trace_id as a string
        """
        if arg_2 is not None:
            arg_3 = bytearray(32)
            arg_0._write_hex_long(arg_3, 0, arg_2)
            arg_0._write_hex_long(arg_3, 16, arg_1)
            return arg_3.decode("utf8")

        arg_3 = bytearray(16)
        arg_0._write_hex_long(arg_3, 0, arg_1)
        return arg_3.decode("utf8")

Converts the provided traceId hex value with optional high bits to a string .


def Func ( arg_0 , arg_1 ) : arg_2 = [ 'id' , 'status' , 'type' , 'persistence' , 'date_start' , 'date_finish' , 'date_created' , 'date_modified' , 'checksum' , 'processor_name' , 'input' , 'input_schema' , 'output' , 'output_schema' , 'static' , 'static_schema' , 'var' , 'var_template' , ] arg_0 . annotation = { } for arg_4 in arg_2 : setattr ( arg_0 , arg_4 , arg_1 [ arg_4 ] ) arg_0 . name = arg_1 [ 'static' ] [ 'name' ] if 'name' in arg_1 [ 'static' ] else '' arg_0 . annotation . Func ( arg_0 . _flatten_field ( arg_1 [ 'input' ] , arg_1 [ 'input_schema' ] , 'input' ) ) arg_0 . annotation . Func ( arg_0 . _flatten_field ( arg_1 [ 'output' ] , arg_1 [ 'output_schema' ] , 'output' ) ) arg_0 . annotation . Func ( arg_0 . _flatten_field ( arg_1 [ 'static' ] , arg_1 [ 'static_schema' ] , 'static' ) ) arg_0 . annotation . Func ( arg_0 . _flatten_field ( arg_1 [ 'var' ] , arg_1 [ 'var_template' ] , 'var' ) )

def Func(arg_0, arg_1):
        """Update the object with new data."""
        arg_2 = [
            'id',
            'status',
            'type',
            'persistence',
            'date_start',
            'date_finish',
            'date_created',
            'date_modified',
            'checksum',
            'processor_name',
            'input',
            'input_schema',
            'output',
            'output_schema',
            'static',
            'static_schema',
            'var',
            'var_template',
        ]

        arg_0.annotation = {}
        for arg_4 in arg_2:
            setattr(arg_0, arg_4, arg_1[arg_4])

        arg_0.name = arg_1['static']['name'] if 'name' in arg_1['static'] else ''

        arg_0.annotation.Func(arg_0._flatten_field(arg_1['input'], arg_1['input_schema'], 'input'))
        arg_0.annotation.Func(arg_0._flatten_field(arg_1['output'], arg_1['output_schema'], 'output'))
        arg_0.annotation.Func(arg_0._flatten_field(arg_1['static'], arg_1['static_schema'], 'static'))
        arg_0.annotation.Func(arg_0._flatten_field(arg_1['var'], arg_1['var_template'], 'var'))


def Func(arg_0):
    """
    Guess driver from file extension.

    Returns
    -------
    driver : string
        driver name
    """
    arg_1 = os.path.splitext(arg_0)[1].split(".")[1]
    if arg_1 not in _file_ext_to_driver():
        raise MapcheteDriverError(
            "no driver could be found for file extension %s" % arg_1
        )
    arg_2 = _file_ext_to_driver()[arg_1]
    if len(arg_2) > 1:
        warnings.warn(
            DeprecationWarning(
                "more than one driver for file found, taking %s" % arg_2[0]
            )
        )
    return arg_2[0]


def Func ( arg_0 , arg_1 ) : arg_1 = unicode_normalize ( 'NFKD' , text_type ( arg_1 . upper ( ) ) ) arg_1 = arg_1 . translate ( { 198 : 'AE' , 338 : 'OE' } ) arg_1 = '' . join ( c for c in arg_1 if c in arg_0 . _uc_set ) for arg_2 in arg_0 . _rule_order : arg_3 , arg_4 = arg_0 . _rule_table [ arg_2 ] if isinstance ( arg_3 , text_type ) : arg_1 = arg_1 . replace ( arg_3 , arg_4 ) else : arg_1 = arg_3 . sub ( arg_4 , arg_1 ) return arg_1

def Func(arg_0, arg_1):
        """Return the FONEM code of a word.

        Parameters
        ----------
        word : str
            The word to transform

        Returns
        -------
        str
            The FONEM code

        Examples
        --------
        >>> pe = FONEM()
        >>> pe.Func('Marchand')
        'MARCHEN'
        >>> pe.Func('Beaulieu')
        'BOLIEU'
        >>> pe.Func('Beaumont')
        'BOMON'
        >>> pe.Func('Legrand')
        'LEGREN'
        >>> pe.Func('Pelletier')
        'PELETIER'

        """
        # normalize, upper-case, and filter non-French letters
        arg_1 = unicode_normalize('NFKD', text_type(arg_1.upper()))
        arg_1 = arg_1.translate({198: 'AE', 338: 'OE'})
        arg_1 = ''.join(c for c in arg_1 if c in arg_0._uc_set)

        for arg_2 in arg_0._rule_order:
            arg_3, arg_4 = arg_0._rule_table[arg_2]
            if isinstance(arg_3, text_type):
                arg_1 = arg_1.replace(arg_3, arg_4)
            else:
                arg_1 = arg_3.sub(arg_4, arg_1)

        return arg_1

Return the FONEM code of a word.

        Parameters
        ----------
        word : str
            The word to transform

        Returns
        -------
        str
            The FONEM code

        Examples
        --------
        >>> pe = FONEM()
        >>> pe.encode('Marchand')
        'MARCHEN'
        >>> pe.encode('Beaulieu')
        'BOLIEU'
        >>> pe.encode('Beaumont')
        'BOMON'
        >>> pe.encode('Legrand')
        'LEGREN'
        >>> pe.encode('Pelletier')
        'PELETIER'


def Func ( arg_0 , ** arg_1 ) : assert_is_type ( arg_0 , str ) return H2OFrame . Func ( arg_0 , ** arg_1 )

def Func(arg_0, **arg_1):
    """
    Obtain a handle to the frame in H2O with the frame_id key.

    :param str frame_id: id of the frame to retrieve.
    :returns: an :class:`H2OFrame` object
    """
    assert_is_type(arg_0, str)
    return H2OFrame.Func(arg_0, **arg_1)

Obtain a handle to the frame in H2O with the frame_id key .


def Func(arg_0, arg_1):
        r"""
        Multiply two Paulis and track the phase.

        $P_3 = P_1 \otimes P_2$: X*Y

        Args:
            p1 (Pauli): pauli 1
            p2 (Pauli): pauli 2

        Returns:
            Pauli: the multiplied pauli
            complex: the sign of the multiplication, 1, -1, 1j or -1j
        """
        arg_2 = Pauli._prod_phase(arg_0, arg_1)
        arg_3 = arg_0 * arg_1
        return arg_3, arg_2

r Multiply two Paulis and track the phase .


def Func ( arg_0 , arg_1 ) : if not arg_1 . initialized : return arg_2 = arg_0 . _request_graph ( arg_1 . ui . control ) if arg_2 is not None : arg_3 = Cluster ( ) arg_4 = arg_3 . edit_traits ( parent = arg_1 . ui . control , kind = "livemodal" ) if arg_4 . result : arg_2 . clusters . append ( arg_3 )

def Func(arg_0, arg_1):
        """ Handles adding a Cluster to the main graph. """

        if not arg_1.initialized:
            return

        arg_2 = arg_0._request_graph(arg_1.ui.control)

        if arg_2 is not None:
            arg_3 = Cluster()#root=graph, parent=graph)
            arg_4 = arg_3.edit_traits(parent = arg_1.ui.control,
                                         kind   = "livemodal")
            if arg_4.result:
                arg_2.clusters.append(arg_3)

Handles adding a Cluster to the main graph .


def Func ( arg_0 ) : for arg_1 , arg_2 in enumerate ( arg_0 . linesets [ : - 1 ] ) : for arg_3 in arg_0 . linesets [ arg_1 + 1 : ] : for arg_4 in arg_0 . _find_common ( arg_2 , arg_3 ) : yield arg_4

def Func(arg_0):
        """iterate on similarities among all files, by making a cartesian
        product
        """
        for arg_1, arg_2 in enumerate(arg_0.linesets[:-1]):
            for arg_3 in arg_0.linesets[arg_1 + 1 :]:
                for arg_4 in arg_0._find_common(arg_2, arg_3):
                    yield arg_4

iterate on similarities among all files by making a cartesian product


def Func ( arg_0 , arg_1 = None , arg_2 = False ) : global REF_LEVEL REF_LEVEL += 1 try : if arg_1 is None : arg_1 = [ ] arg_3 = arg_0 . fuzzer . get_ref ( arg_0 . cat , arg_0 . refname ) arg_4 = utils . val ( arg_3 , arg_1 , arg_2 = ( arg_2 or REF_LEVEL >= arg_0 . max_recursion ) ) return arg_4 finally : REF_LEVEL -= 1

def Func(arg_0, arg_1=None, arg_2=False):
        """Build the ``Ref`` instance by fetching the rule from
        the GramFuzzer instance and Funcing it

        :param list pre: The prerequisites list
        :param bool shortest: Whether or not the shortest reference-chain (most minimal) version of the field should be generated.
        """
        global REF_LEVEL
        REF_LEVEL += 1

        try:
            if arg_1 is None:
                arg_1 = []

            #print("{:04d} - {} - {}:{}".format(REF_LEVEL, shortest, self.cat, self.refname))

            arg_3 = arg_0.fuzzer.get_ref(arg_0.cat, arg_0.refname)
            arg_4 = utils.val(
                arg_3,
                arg_1,
                arg_2=(arg_2 or REF_LEVEL >= arg_0.max_recursion)
            )

            return arg_4

        # this needs to happen no matter what
        finally:
            REF_LEVEL -= 1

Build the ``Ref`` instance by fetching the rule from
        the GramFuzzer instance and building it

        :param list pre: The prerequisites list
        :param bool shortest: Whether or not the shortest reference-chain (most minimal) version of the field should be generated.

Build the Ref instance by fetching the rule from the GramFuzzer instance and building it


(file_pattern, destination='Private', leaf_folders_as_items=False,
           reuse_existing=False)

def Func(arg_0, arg_1='Private', arg_2=False,
           arg_3=False):
    """
    Upload a pattern of files. This will recursively walk down every tree in
    the file pattern to create a hierarchy on the server. As of right now, this
    places the file into the currently logged in user's home directory.

    :param file_pattern: a glob type pattern for files
    :type file_pattern: string
    :param destination: (optional) name of the midas destination folder,
        defaults to Private
    :type destination: string
    :param leaf_folders_as_items: (optional) whether leaf folders should have
        all files Funced as single items
    :type leaf_folders_as_items: bool
    :param reuse_existing: (optional) whether to accept an existing item of the
        same name in the same location, or create a new one instead
    :type reuse_existing: bool
    """
    arg_4.token = verify_credentials()

    # Logic for finding the proper folder to place the files in.
    arg_6 = None
    arg_7 = arg_4.communicator.list_user_folders(arg_4.token)
    if arg_1.startswith('/'):
        arg_6 = _find_resource_id_from_path(arg_1)
    else:
        for arg_8 in arg_7:
            if arg_8['name'] == arg_1:
                arg_6 = arg_8['folder_id']
    if arg_6 is None:
        print('Unable to locate specified destination. Defaulting to {0}.'
              .format(arg_7[0]['name']))
        arg_6 = arg_7[0]['folder_id']

    for arg_9 in glob.iglob(arg_0):
        arg_9 = os.path.normpath(arg_9)
        if os.path.isfile(arg_9):
            print('Uploading item from {0}'.format(arg_9))
            _Func_as_item(os.path.basename(arg_9),
                            arg_6,
                            arg_9,
                            arg_3)
        else:
            _Func_folder_recursive(arg_9,
                                     arg_6,
                                     arg_2,
                                     arg_3)

Upload a pattern of files. This will recursively walk down every tree in
    the file pattern to create a hierarchy on the server. As of right now, this
    places the file into the currently logged in user's home directory.

    :param file_pattern: a glob type pattern for files
    :type file_pattern: string
    :param destination: (optional) name of the midas destination folder,
        defaults to Private
    :type destination: string
    :param leaf_folders_as_items: (optional) whether leaf folders should have
        all files uploaded as single items
    :type leaf_folders_as_items: bool
    :param reuse_existing: (optional) whether to accept an existing item of the
        same name in the same location, or create a new one instead
    :type reuse_existing: bool

Upload a pattern of files . This will recursively walk down every tree in the file pattern to create a hierarchy on the server . As of right now this places the file into the currently logged in user s home directory .


def Func(arg_0):
        """
        Obtains a credentials handle from secur32.dll for use with SChannel
        """

        arg_1 = {
            'SSLv3': Secur32Const.SP_PROT_SSL3_CLIENT,
            'TLSv1': Secur32Const.SP_PROT_TLS1_CLIENT,
            'TLSv1.1': Secur32Const.SP_PROT_TLS1_1_CLIENT,
            'TLSv1.2': Secur32Const.SP_PROT_TLS1_2_CLIENT,
        }
        arg_2 = 0
        for arg_3, arg_4 in arg_1.items():
            if arg_3 in arg_0._protocols:
                arg_2 |= arg_4

        arg_5 = [
            Secur32Const.CALG_AES_128,
            Secur32Const.CALG_AES_256,
            Secur32Const.CALG_3DES,
            Secur32Const.CALG_SHA1,
            Secur32Const.CALG_ECDHE,
            Secur32Const.CALG_DH_EPHEM,
            Secur32Const.CALG_RSA_KEYX,
            Secur32Const.CALG_RSA_SIGN,
            Secur32Const.CALG_ECDSA,
            Secur32Const.CALG_DSS_SIGN,
        ]
        if 'TLSv1.2' in arg_0._protocols:
            arg_5.extend([
                Secur32Const.CALG_SHA512,
                Secur32Const.CALG_SHA384,
                Secur32Const.CALG_SHA256,
            ])

        arg_6 = new(secur32, 'ALG_ID[%s]' % len(arg_5))
        for arg_7, arg_8 in enumerate(arg_5):
            arg_6[arg_7] = arg_8

        arg_9 = Secur32Const.SCH_USE_STRONG_CRYPTO | Secur32Const.SCH_CRED_NO_DEFAULT_CREDS
        if not arg_0._manual_validation and not arg_0._extra_trust_roots:
            arg_9 |= Secur32Const.SCH_CRED_AUTO_CRED_VALIDATION
        else:
            arg_9 |= Secur32Const.SCH_CRED_MANUAL_CRED_VALIDATION

        arg_10 = struct(secur32, 'SCHANNEL_CRED')
        arg_11 = unwrap(arg_10)

        arg_11.dwVersion = Secur32Const.SCHANNEL_CRED_VERSION
        arg_11.cCreds = 0
        arg_11.paCred = null()
        arg_11.hRootStore = null()
        arg_11.cMappers = 0
        arg_11.aphMappers = null()
        arg_11.cSupportedAlgs = len(arg_6)
        arg_11.palgSupportedAlgs = arg_6
        arg_11.grbitEnabledProtocols = arg_2
        arg_11.dwMinimumCipherStrength = 0
        arg_11.dwMaximumCipherStrength = 0
        # Default session lifetime is 10 hours
        arg_11.dwSessionLifespan = 0
        arg_11.dwFlags = arg_9
        arg_11.dwCredFormat = 0

        arg_26 = new(secur32, 'CredHandle *')

        arg_27 = secur32.AcquireCredentialsHandleW(
            null(),
            Secur32Const.UNISP_NAME,
            Secur32Const.SECPKG_CRED_OUTBOUND,
            null(),
            arg_10,
            null(),
            null(),
            arg_26,
            null()
        )
        handle_error(arg_27)

        arg_0._credentials_handle = arg_26

Obtains a credentials handle from secur32 . dll for use with SChannel


(
        self, src, tar, weights='exponential', max_length=8, normalized=False
    )

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = 'exponential' , arg_4 = 8 , arg_5 = False ) : arg_6 = eudex ( arg_1 , arg_4 = arg_4 ) ^ eudex ( arg_2 , arg_4 = arg_4 ) if not arg_3 : arg_7 = bin ( arg_6 ) arg_8 = arg_7 . count ( '1' ) if arg_5 : return arg_8 / ( len ( arg_7 ) - 2 ) return arg_8 if callable ( arg_3 ) : arg_3 = arg_3 ( ) elif arg_3 == 'exponential' : arg_3 = Eudex . gen_exponential ( ) elif arg_3 == 'fibonacci' : arg_3 = Eudex . gen_fibonacci ( ) if isinstance ( arg_3 , GeneratorType ) : arg_3 = [ next ( arg_3 ) for _ in range ( arg_4 ) ] [ : : - 1 ] arg_8 = 0 arg_9 = 0 while ( arg_6 or arg_5 ) and arg_3 : arg_9 += 8 * arg_3 [ - 1 ] arg_8 += bin ( arg_6 & 0xFF ) . count ( '1' ) * arg_3 . pop ( ) arg_6 >>= 8 if arg_5 : arg_8 /= arg_9 return arg_8

def Func(
        arg_0, arg_1, arg_2, arg_3='exponential', arg_4=8, arg_5=False
    ):
        """Calculate the distance between the Eudex hashes of two terms.

        Parameters
        ----------
        src : str
            Source string for comparison
        tar : str
            Target string for comparison
        weights : str, iterable, or generator function
            The weights or weights generator function

                - If set to ``None``, a simple Hamming distance is calculated.
                - If set to ``exponential``, weight decays by powers of 2, as
                  proposed in the eudex specification:
                  https://github.com/ticki/eudex.
                - If set to ``fibonacci``, weight decays through the Fibonacci
                  series, as in the eudex reference implementation.
                - If set to a callable function, this assumes it creates a
                  generator and the generator is used to populate a series of
                  weights.
                - If set to an iterable, the iterable's values should be
                  integers and will be used as the weights.

        max_length : int
            The number of characters to encode as a eudex hash
        normalized : bool
            Normalizes to [0, 1] if True

        Returns
        -------
        int
            The Eudex Hamming distance

        Examples
        --------
        >>> cmp = Eudex()
        >>> cmp.Func('cat', 'hat')
        128
        >>> cmp.Func('Niall', 'Neil')
        2
        >>> cmp.Func('Colin', 'Cuilen')
        10
        >>> cmp.Func('ATCG', 'TAGC')
        403

        >>> cmp.Func('cat', 'hat', weights='fibonacci')
        34
        >>> cmp.Func('Niall', 'Neil', weights='fibonacci')
        2
        >>> cmp.Func('Colin', 'Cuilen', weights='fibonacci')
        7
        >>> cmp.Func('ATCG', 'TAGC', weights='fibonacci')
        117

        >>> cmp.Func('cat', 'hat', weights=None)
        1
        >>> cmp.Func('Niall', 'Neil', weights=None)
        1
        >>> cmp.Func('Colin', 'Cuilen', weights=None)
        2
        >>> cmp.Func('ATCG', 'TAGC', weights=None)
        9

        >>> # Using the OEIS A000142:
        >>> cmp.Func('cat', 'hat', [1, 1, 2, 6, 24, 120, 720, 5040])
        1
        >>> cmp.Func('Niall', 'Neil', [1, 1, 2, 6, 24, 120, 720, 5040])
        720
        >>> cmp.Func('Colin', 'Cuilen',
        ... [1, 1, 2, 6, 24, 120, 720, 5040])
        744
        >>> cmp.Func('ATCG', 'TAGC', [1, 1, 2, 6, 24, 120, 720, 5040])
        6243

        """
        # Calculate the eudex hashes and XOR them
        arg_6 = eudex(arg_1, arg_4=arg_4) ^ eudex(
            arg_2, arg_4=arg_4
        )

        # Simple hamming distance (all bits are equal)
        if not arg_3:
            arg_7 = bin(arg_6)
            arg_8 = arg_7.count('1')
            if arg_5:
                return arg_8 / (len(arg_7) - 2)
            return arg_8

        # If weights is a function, it should create a generator,
        # which we now use to populate a list
        if callable(arg_3):
            arg_3 = arg_3()
        elif arg_3 == 'exponential':
            arg_3 = Eudex.gen_exponential()
        elif arg_3 == 'fibonacci':
            arg_3 = Eudex.gen_fibonacci()
        if isinstance(arg_3, GeneratorType):
            arg_3 = [next(arg_3) for _ in range(arg_4)][::-1]

        # Sum the weighted hamming distance
        arg_8 = 0
        arg_9 = 0
        while (arg_6 or arg_5) and arg_3:
            arg_9 += 8 * arg_3[-1]
            arg_8 += bin(arg_6 & 0xFF).count('1') * arg_3.pop()
            arg_6 >>= 8

        if arg_5:
            arg_8 /= arg_9

        return arg_8

Calculate the distance between the Eudex hashes of two terms.

        Parameters
        ----------
        src : str
            Source string for comparison
        tar : str
            Target string for comparison
        weights : str, iterable, or generator function
            The weights or weights generator function

                - If set to ``None``, a simple Hamming distance is calculated.
                - If set to ``exponential``, weight decays by powers of 2, as
                  proposed in the eudex specification:
                  https://github.com/ticki/eudex.
                - If set to ``fibonacci``, weight decays through the Fibonacci
                  series, as in the eudex reference implementation.
                - If set to a callable function, this assumes it creates a
                  generator and the generator is used to populate a series of
                  weights.
                - If set to an iterable, the iterable's values should be
                  integers and will be used as the weights.

        max_length : int
            The number of characters to encode as a eudex hash
        normalized : bool
            Normalizes to [0, 1] if True

        Returns
        -------
        int
            The Eudex Hamming distance

        Examples
        --------
        >>> cmp = Eudex()
        >>> cmp.dist_abs('cat', 'hat')
        128
        >>> cmp.dist_abs('Niall', 'Neil')
        2
        >>> cmp.dist_abs('Colin', 'Cuilen')
        10
        >>> cmp.dist_abs('ATCG', 'TAGC')
        403

        >>> cmp.dist_abs('cat', 'hat', weights='fibonacci')
        34
        >>> cmp.dist_abs('Niall', 'Neil', weights='fibonacci')
        2
        >>> cmp.dist_abs('Colin', 'Cuilen', weights='fibonacci')
        7
        >>> cmp.dist_abs('ATCG', 'TAGC', weights='fibonacci')
        117

        >>> cmp.dist_abs('cat', 'hat', weights=None)
        1
        >>> cmp.dist_abs('Niall', 'Neil', weights=None)
        1
        >>> cmp.dist_abs('Colin', 'Cuilen', weights=None)
        2
        >>> cmp.dist_abs('ATCG', 'TAGC', weights=None)
        9

        >>> # Using the OEIS A000142:
        >>> cmp.dist_abs('cat', 'hat', [1, 1, 2, 6, 24, 120, 720, 5040])
        1
        >>> cmp.dist_abs('Niall', 'Neil', [1, 1, 2, 6, 24, 120, 720, 5040])
        720
        >>> cmp.dist_abs('Colin', 'Cuilen',
        ... [1, 1, 2, 6, 24, 120, 720, 5040])
        744
        >>> cmp.dist_abs('ATCG', 'TAGC', [1, 1, 2, 6, 24, 120, 720, 5040])
        6243

Calculate the distance between the Eudex hashes of two terms .


def
Func
(
arg_0
,
arg_1
=
)
:
if
arg_0
==
0
:
return
if
arg_0
in
set
(
[
SecurityConst
.
errSSLClosedNoNotify
,
SecurityConst
.
errSSLClosedAbort
]
)
:
raise
TLSDisconnectError
(
'The remote end closed the connection'
)
if
arg_0
==
SecurityConst
.
errSSLClosedGraceful
:
raise
TLSGracefulDisconnectError
(
'The remote end closed the connection'
)
arg_2
=
Security
.
SecCopyErrorMessageString
(
arg_0
,
(
)
)
arg_3
=
CFHelpers
.
cf_string_to_unicode
(
arg_2
)
CoreFoundation
.
CFRelease
(
arg_2
)
if
arg_3
is
or
arg_3
==
''
:
arg_3
=
'OSStatus %s'
%
arg_0
if
arg_1
is
:
arg_1
=
OSError
raise
arg_1
(
arg_3
)

def Func(arg_0, arg_1=None):
    """
    Checks a Security OSStatus error code and throws an exception if there is an
    error to report

    :param error:
        An OSStatus

    :param exception_class:
        The exception class to use for the exception if an error occurred

    :raises:
        OSError - when the OSStatus contains an error
    """

    if arg_0 == 0:
        return

    if arg_0 in set([SecurityConst.errSSLClosedNoNotify, SecurityConst.errSSLClosedAbort]):
        raise TLSDisconnectError('The remote end closed the connection')
    if arg_0 == SecurityConst.errSSLClosedGraceful:
        raise TLSGracefulDisconnectError('The remote end closed the connection')

    arg_2 = Security.SecCopyErrorMessageString(arg_0, null())
    arg_3 = CFHelpers.cf_string_to_unicode(arg_2)
    CoreFoundation.CFRelease(arg_2)

    if arg_3 is None or arg_3 == '':
        arg_3 = 'OSStatus %s' % arg_0

    if arg_1 is None:
        arg_1 = OSError

    raise arg_1(arg_3)


return [self.atomic_sa(i) for i in range(len(self.rads))]

def Func ( arg_0 ) : return [ arg_0 . atomic_sa ( arg_1 ) for arg_1 in range ( len ( arg_0 . rads ) ) ]

def Func(arg_0):
        r"""Calculate all atomic surface area.

        :rtype: [float]
        """
        return [arg_0.atomic_sa(arg_1) for arg_1 in range(len(arg_0.rads))]


def Func(arg_0):
        """Return a combined dictionary of setting values and attribute values."""
        arg_1 = arg_0.setting_values()
        arg_1.update(arg_0.__dict__)
        arg_2 = ["_instance_settings", "aliases"]
        for arg_3 in arg_2:
            del arg_1[arg_3]
        return arg_1

Return a combined dictionary of setting values and attribute values .


def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
        '''
        Compute the functions C1 and C2
        '''
        if arg_3 == 0.0 and arg_4 == 0.0:
            # Find the limits of C1 and C2 as r1 -> 0 and r2 -> 0
            # Since the b-value must be the same and r1 = r2,
            # we have A1(r1, b1) = A2(r2, b2) = A,
            # then the limits for both C1 and C2 are A.
            return arg_1, arg_2
        arg_5 = 1 / (arg_3 + arg_4)
        arg_6 = (arg_1 * arg_4 + arg_2 * arg_3) * arg_5
        arg_7 = (arg_1 * arg_3 + arg_2 * arg_4) * arg_5
        return arg_6, arg_7


def Func ( arg_0 ) : arg_1 = defaultdict ( list ) for arg_2 , arg_3 in enumerate ( arg_0 . handlers ) : for arg_4 , arg_5 in inspect . getmembers ( arg_3 , callable ) : if not hasattr ( arg_5 , "_pyxmpp_event_handled" ) : continue arg_6 = arg_5 . _pyxmpp_event_handled arg_1 [ arg_6 ] . append ( ( arg_2 , arg_5 ) ) arg_0 . _handler_map = arg_1

def Func(arg_0):
        """Update `_handler_map` after `handlers` have been
        modified."""
        arg_1 = defaultdict(list)
        for arg_2, arg_3 in enumerate(arg_0.handlers):
            for arg_4, arg_5 in inspect.getmembers(arg_3, callable):
                if not hasattr(arg_5, "_pyxmpp_event_handled"):
                    continue
                # pylint: disable-msg=W0212
                arg_6 = arg_5._pyxmpp_event_handled
                arg_1[arg_6].append( (arg_2, arg_5) )
        arg_0._handler_map = arg_1

Update _handler_map after handlers have been modified .


(flow, filename, quantize=False, concat_axis=0, *args, **kwargs)

def Func ( arg_0 , arg_1 , arg_2 = False , arg_3 = 0 , * arg_4 , ** arg_5 ) : if not arg_2 : with open ( arg_1 , 'wb' ) as f : f . write ( 'PIEH' . encode ( 'utf-8' ) ) np . array ( [ arg_0 . shape [ 1 ] , arg_0 . shape [ 0 ] ] , dtype = np . int32 ) . tofile ( f ) arg_0 = arg_0 . astype ( np . float32 ) arg_0 . tofile ( f ) f . flush ( ) else : assert arg_3 in [ 0 , 1 ] arg_6 , arg_7 = quantize_flow ( arg_0 , * arg_4 , ** arg_5 ) arg_8 = np . concatenate ( ( arg_6 , arg_7 ) , axis = arg_3 ) imwrite ( arg_8 , arg_1 )

def Func(arg_0, arg_1, arg_2=False, arg_3=0, *arg_4, **arg_5):
    """Write optical flow to file.

    If the flow is not quantized, it will be saved as a .flo file losslessly,
    otherwise a jpeg image which is lossy but of much smaller size. (dx and dy
    will be concatenated horizontally into a single image if quantize is True.)

    Args:
        flow (ndarray): (h, w, 2) array of optical flow.
        filename (str): Output filepath.
        quantize (bool): Whether to quantize the flow and save it to 2 jpeg
            images. If set to True, remaining args will be passed to
            :func:`quantize_flow`.
        concat_axis (int): The axis that dx and dy are concatenated,
            can be either 0 or 1. Ignored if quantize is False.
    """
    if not arg_2:
        with open(arg_1, 'wb') as f:
            f.write('PIEH'.encode('utf-8'))
            np.array([arg_0.shape[1], arg_0.shape[0]], dtype=np.int32).tofile(f)
            arg_0 = arg_0.astype(np.float32)
            arg_0.tofile(f)
            f.flush()
    else:
        assert arg_3 in [0, 1]
        arg_6, arg_7 = quantize_flow(arg_0, *arg_4, **arg_5)
        arg_8 = np.concatenate((arg_6, arg_7), axis=arg_3)
        imwrite(arg_8, arg_1)


return type(spec)((k, str(v)) for (k,v) in spec.items())

def Func ( arg_0 , arg_1 ) : return type ( arg_1 ) ( ( arg_2 , str ( arg_3 ) ) for ( arg_2 , arg_3 ) in arg_1 . items ( ) )

def Func(arg_0, arg_1):
        " Formats the elements of an argument set appropriately"
        return type(arg_1)((arg_2, str(arg_3)) for (arg_2,arg_3) in arg_1.items())


def Func ( arg_0 ) : arg_1 = arg_0 . _run_information [ arg_0 . v_crun ] arg_2 = arg_1 [ 'timestamp' ] arg_3 = arg_0 . _summarize_explored_parameters ( ) arg_4 = time . time ( ) arg_5 = datetime . datetime . fromtimestamp ( arg_4 ) arg_6 = datetime . datetime . fromtimestamp ( arg_2 ) arg_7 = str ( arg_5 - arg_6 ) arg_1 [ 'parameter_summary' ] = arg_3 arg_1 [ 'completed' ] = 1 arg_1 [ 'finish_timestamp' ] = arg_4 arg_1 [ 'runtime' ] = arg_7

def Func(arg_0):
        """ Sets the finish time and computes the runtime in human readable format """

        arg_1 = arg_0._run_information[arg_0.v_crun]
        arg_2 = arg_1['timestamp']

        arg_3 = arg_0._summarize_explored_parameters()

        arg_4 = time.time()

        arg_5 = datetime.datetime.fromtimestamp(arg_4)
        arg_6 = datetime.datetime.fromtimestamp(arg_2)

        arg_7 = str(arg_5 - arg_6)

        arg_1['parameter_summary'] = arg_3
        arg_1['completed'] = 1
        arg_1['finish_timestamp'] = arg_4
        arg_1['runtime'] = arg_7


def Func ( arg_0 ) : if arg_10 . CONFIGURATION [ "inactive_database" ] : arg_1 = ( arg_10 . CURRENT_DIRECTORY + "inactive-db.json" ) if arg_10 . path . isfile ( arg_1 ) : arg_2 = Dict ( ) . from_json ( File ( arg_1 ) . read ( ) ) arg_3 = { } arg_4 = arg_2 . keys ( ) for arg_5 in arg_4 : arg_6 = arg_2 [ arg_5 ] . keys ( ) arg_3 [ arg_5 ] = { } for arg_7 in arg_6 : if arg_7 . isdigit ( ) : arg_3 [ arg_5 ] [ arg_8 ( arg_7 ) - ( arg_0 . one_day_in_seconds * 30 ) ] = arg_2 [ arg_5 ] [ arg_7 ] else : arg_3 [ arg_5 ] [ arg_8 ( arg_10 . time ( ) ) - ( arg_0 . one_day_in_seconds * 30 ) ] = arg_2 [ arg_5 ] [ arg_7 ] if "inactive_db" in arg_10 . INTERN : arg_10 . INTERN [ "inactive_db" ] . update ( arg_3 ) else : arg_10 . INTERN [ "inactive_db" ] = arg_3 File ( arg_1 ) . delete ( )

def Func(arg_0):  # pragma: no cover
        """
        Format the old format so it can be merged into the newer format.
        """

        if arg_10.CONFIGURATION["inactive_database"]:
            # The database subsystem is activated.

            # We construct the possible path to an older version of the database.
            arg_1 = (
                arg_10.CURRENT_DIRECTORY + "inactive-db.json"
            )

            if arg_10.path.isfile(arg_1):
                # The histortical file already exists.

                # We get its content.
                arg_2 = Dict().from_json(File(arg_1).read())

                # We initiate a variable which will save the data that is going
                # to be merged.
                arg_3 = {}

                # We get the database keybase.
                arg_4 = arg_2.keys()

                for arg_5 in arg_4:
                    # We loop through the list of upper keys.

                    # We get the lowest keys.
                    arg_6 = arg_2[arg_5].keys()

                    # We initiate the data to parse.
                    arg_3[arg_5] = {}

                    for arg_7 in arg_6:
                        # We loop through the list of lower keys.

                        if arg_7.isdigit():
                            # The current low key is a digit.

                            # We parse its content (from the old) into the new format.
                            # In between, we remove 30 days from the low_key so that
                            # it become in the past. This way they will be retested
                            # automatically.
                            arg_3[arg_5][
                                arg_8(arg_7) - (arg_0.one_day_in_seconds * 30)
                            ] = arg_2[arg_5][arg_7]
                        else:
                            # The current low key is not a digit.

                            # We parse its content (from the old) into the new format.
                            # In between, we remove 30 days from the current time so that
                            # it become in the past. This way they will be retested
                            # automatically.
                            arg_3[arg_5][
                                arg_8(arg_10.time()) - (arg_0.one_day_in_seconds * 30)
                            ] = arg_2[arg_5][arg_7]

                if "inactive_db" in arg_10.INTERN:
                    # The current (new) database is not empty.

                    # We update add the content of the old into the current database.
                    arg_10.INTERN["inactive_db"].update(arg_3)
                else:
                    # The current (new) database is empty.

                    # We replace the content with the data_to_parse as it is complient
                    # with the new format.
                    arg_10.INTERN["inactive_db"] = arg_3

                # We delete the old database file.
                File(arg_1).delete()

Format the old format so it can be merged into the newer format .


(self, source_address, target_address=None,
                      event_handler=None, name=None, properties=None)

def Func(arg_0, arg_1, arg_2=None,
                      arg_3=None, arg_4=None, arg_5=None):
        """Factory method for Sender links."""
        arg_6 = arg_4 or str(arg_1)
        if arg_6 in arg_0._sender_links:
            raise KeyError("Sender %s already exists!" % arg_6)

        arg_7 = _SessionProxy("session-%s" % arg_6, arg_0)
        arg_7.open()
        arg_8 = arg_7.new_sender(arg_6)
        arg_8.configure(arg_2, arg_1, arg_3, arg_5)
        arg_0._sender_links[arg_6] = arg_8
        return arg_8


def
Func
(
arg_0
=
)
:
arg_0
=
BASE_ARGS_3TO2
if
arg_0
is
else
BASE_ARGS_3TO2
+
arg_0
try
:
arg_1
=
subprocess
.
Popen
(
[
'3to2'
]
+
arg_0
,
stderr
=
subprocess
.
PIPE
)
except
OSError
:
for
arg_2
in
glob
.
glob
(
'*.egg'
)
:
if
os
.
path
.
isdir
(
arg_2
)
and
arg_2
not
in
sys
.
path
:
sys
.
path
.
append
(
arg_2
)
try
:
from
lib3to2
.
main
import
main
as
lib3to2_main
except
ImportError
:
raise
OSError
(
'3to2 script is unavailable.'
)
else
:
if
lib3to2_main
(
'lib3to2.fixes'
,
arg_0
)
:
raise
Exception
(
'lib3to2 parsing error'
)
else
:
arg_3
=
0
while
arg_1
.
poll
(
)
is
:
arg_4
=
arg_1
.
stderr
.
readline
(
)
sys
.
stderr
.
write
(
arg_4
)
arg_3
+=
arg_4
.
count
(
': ParseError: '
)
if
arg_1
.
returncode
or
arg_3
:
raise
Exception
(
'lib3to2 parsing error'
)

def Func(arg_0=None):
    """Convert Python files using lib3to2."""
    arg_0 = BASE_ARGS_3TO2 if arg_0 is None else BASE_ARGS_3TO2 + arg_0
    try:
        arg_1 = subprocess.Popen(['3to2'] + arg_0, stderr=subprocess.PIPE)
    except OSError:
        for arg_2 in glob.glob('*.egg'):
            if os.path.isdir(arg_2) and arg_2 not in sys.path:
                sys.path.append(arg_2)
        try:
            from lib3to2.main import main as lib3to2_main
        except ImportError:
            raise OSError('3to2 script is unavailable.')
        else:
            if lib3to2_main('lib3to2.fixes', arg_0):
                raise Exception('lib3to2 parsing error')
    else:
        # HACK: workaround for 3to2 never returning non-zero
        # when using the -j option.
        arg_3 = 0
        while arg_1.poll() is None:
            arg_4 = arg_1.stderr.readline()
            sys.stderr.write(arg_4)
            arg_3 += arg_4.count(': ParseError: ')
        if arg_1.returncode or arg_3:
            raise Exception('lib3to2 parsing error')


return (mask + ''.join([str(num >> i & 1) for i in range(7, -1, -1)]))[-length:]

def Func(arg_0):
    """
        returns a a random string that represent a Func representation

    :param length: number of bits
    """
    arg_1 = randint(1, 999999)
    arg_2 = '0' * arg_0
    return (arg_2 + ''.join([str(arg_1 >> arg_3 & 1) for arg_3 in range(7, -1, -1)]))[-arg_0:]

returns a a random string that represent a binary representation

    :param length: number of bits


def Func ( arg_0 ) : if len ( arg_0 ) == 0 : return IRQueryableList ( ) arg_1 = arg_0 . getModel ( ) arg_2 = [ item . _id for item in arg_0 if item . _id ] return arg_1 . objects . getMultiple ( arg_2 )

def Func(arg_0):
		'''
			Func - Fetch a fresh copy of all items in this list.
				Returns a new list. To update in-place, use "reload".

			@return IRQueryableList<IndexedRedisModel> - List of fetched items
		'''

		if len(arg_0) == 0:
			return IRQueryableList()

		arg_1 = arg_0.getModel()
		arg_2 = [item._id for item in arg_0 if item._id]

		return arg_1.objects.getMultiple(arg_2)

refetch - Fetch a fresh copy of all items in this list.
				Returns a new list. To update in-place, use "reload".

			@return IRQueryableList<IndexedRedisModel> - List of fetched items

refetch - Fetch a fresh copy of all items in this list . Returns a new list . To update in - place use reload .


return part_has_modifier(data, SUBJECT, TRANSLOCATION) and part_has_modifier(data, OBJECT, ACTIVITY)

def Func ( arg_0 : arg_1 ) -> bool : return part_has_modifier ( arg_0 , SUBJECT , TRANSLOCATION ) and part_has_modifier ( arg_0 , OBJECT , ACTIVITY )

def Func(arg_0: arg_1) -> bool:
    """Check if the translocation of source causes activity of target."""
    return part_has_modifier(arg_0, SUBJECT, TRANSLOCATION) and part_has_modifier(arg_0, OBJECT, ACTIVITY)

Check if the translocation of source causes activity of target .


def Func ( arg_0 , arg_1 ) : if terminal_width ( arg_1 ) > 25 : arg_1 = ( ".." + get_cut_prefix ( arg_1 , 23 ) ) arg_2 = start = time ( ) arg_3 = written = 0 arg_4 = deque ( maxlen = 5 ) for arg_5 in arg_0 : yield arg_5 arg_6 = time ( ) arg_7 = arg_6 - start written += len ( arg_5 ) arg_8 = arg_6 - arg_2 if arg_8 >= 0.5 : arg_4 . appendleft ( ( written - arg_3 , arg_2 , ) ) arg_2 = arg_6 arg_3 = written arg_9 = sum ( h [ 0 ] for h in arg_4 ) arg_10 = arg_6 - arg_4 [ - 1 ] [ 1 ] arg_11 = arg_9 / arg_10 arg_12 = create_status_line ( arg_1 = arg_1 , written = format_filesize ( written ) , arg_7 = format_time ( arg_7 ) , arg_11 = format_filesize ( arg_11 ) ) print_inplace ( arg_12 ) sys . stderr . write ( "\n" ) sys . stderr . flush ( )

def Func(arg_0, arg_1):
    """Progress an iterator and updates a pretty status line to the terminal.

    The status line contains:
     - Amount of data read from the iterator
     - Time elapsed
     - Average speed, based on the last few seconds.
    """
    if terminal_width(arg_1) > 25:
        arg_1 = (".." + get_cut_prefix(arg_1, 23))
    arg_2 = start = time()
    arg_3 = written = 0
    arg_4 = deque(maxlen=5)

    for arg_5 in arg_0:
        yield arg_5

        arg_6 = time()
        arg_7 = arg_6 - start
        written += len(arg_5)

        arg_8 = arg_6 - arg_2
        if arg_8 >= 0.5:
            arg_4.appendleft((
                written - arg_3,
                arg_2,
            ))
            arg_2 = arg_6
            arg_3 = written

            arg_9 = sum(h[0] for h in arg_4)
            arg_10 = arg_6 - arg_4[-1][1]
            arg_11 = arg_9 / arg_10

            arg_12 = create_status_line(
                arg_1=arg_1,
                written=format_filesize(written),
                arg_7=format_time(arg_7),
                arg_11=format_filesize(arg_11)
            )
            print_inplace(arg_12)
    sys.stderr.write("\n")
    sys.stderr.flush()

Progress an iterator and updates a pretty status line to the terminal .


def Func ( arg_0 , arg_1 = 'all' , arg_2 = False ) : if arg_1 == 'all' : arg_3 = None else : arg_3 = arg_0 . _build_targets ( arg_1 ) [ 1 ] arg_4 = dict ( arg_1 = arg_3 , arg_2 = arg_2 ) arg_0 . session . send ( arg_0 . _query_socket , "queue_request" , arg_4 = arg_4 ) arg_5 , arg_6 = arg_0 . session . recv ( arg_0 . _query_socket , 0 ) if arg_0 . debug : pprint ( arg_6 ) arg_4 = arg_6 [ 'content' ] arg_7 = arg_4 . pop ( 'status' ) if arg_7 != 'ok' : raise arg_0 . _unwrap_exception ( arg_4 ) arg_4 = rekey ( arg_4 ) if isinstance ( arg_1 , int ) : return arg_4 [ arg_1 ] else : return arg_4

def Func(arg_0, arg_1='all', arg_2=False):
        """Fetch the status of engine queues.

        Parameters
        ----------

        targets : int/str/list of ints/strs
                the engines whose states are to be queried.
                default : all
        verbose : bool
                Whether to return lengths only, or lists of ids for each element
        """
        if arg_1 == 'all':
            # allow 'all' to be evaluated on the engine
            arg_3 = None
        else:
            arg_3 = arg_0._build_targets(arg_1)[1]
        arg_4 = dict(arg_1=arg_3, arg_2=arg_2)
        arg_0.session.send(arg_0._query_socket, "queue_request", arg_4=arg_4)
        arg_5,arg_6 = arg_0.session.recv(arg_0._query_socket, 0)
        if arg_0.debug:
            pprint(arg_6)
        arg_4 = arg_6['content']
        arg_7 = arg_4.pop('status')
        if arg_7 != 'ok':
            raise arg_0._unwrap_exception(arg_4)
        arg_4 = rekey(arg_4)
        if isinstance(arg_1, int):
            return arg_4[arg_1]
        else:
            return arg_4


def
Func
(
arg_0
)
:
arg_1
=
LatexCommand
(
'setDocRef'
,
{
'name'
:
'handle'
,
'required'
:
True
,
'bracket'
:
'{'
}
)
try
:
arg_2
=
next
(
arg_1
.
parse
(
arg_0
.
_tex
)
)
except
StopIteration
:
arg_0
.
_logger
.
warning
(
'lsstdoc has no setDocRef'
)
arg_0
.
_handle
=
arg_0
.
_series
=
arg_0
.
_serial
=
return
arg_0
.
_handle
=
arg_2
[
'handle'
]
try
:
arg_0
.
_series
,
arg_0
.
_serial
=
arg_0
.
_handle
.
split
(
'-'
,
1
)
except
ValueError
:
arg_0
.
_logger
.
warning
(
'lsstdoc handle cannot be parsed into '
'series and serial: %r'
,
arg_0
.
_handle
)
arg_0
.
_series
=
arg_0
.
_serial
=

def Func(arg_0):
        """Parse the document handle.

        Sets the ``_series``, ``_serial``, and ``_handle`` attributes.
        """
        arg_1 = LatexCommand(
            'setDocRef',
            {'name': 'handle', 'required': True, 'bracket': '{'})
        try:
            arg_2 = next(arg_1.parse(arg_0._tex))
        except StopIteration:
            arg_0._logger.warning('lsstdoc has no setDocRef')
            arg_0._handle = None
            arg_0._series = None
            arg_0._serial = None
            return

        arg_0._handle = arg_2['handle']
        try:
            arg_0._series, arg_0._serial = arg_0._handle.split('-', 1)
        except ValueError:
            arg_0._logger.warning('lsstdoc handle cannot be parsed into '
                                 'series and serial: %r', arg_0._handle)
            arg_0._series = None
            arg_0._serial = None


def Func(arg_0):
    """ translate exception str to http code"""
    if len(arg_0) <= 3:
        try:
            int(arg_0)
        except BaseException:
            logger.error(
                "JMeter wrote some strange data into codes column: %s", arg_0)
        else:
            return int(arg_0)

    arg_1 = arg_0.split(' ')[-1]
    if arg_1 in KNOWN_EXC.keys():
        return 0
    else:
        logger.warning("Unknown Java exception. %s", arg_0)
        return 0


def Func ( arg_0 ) : for arg_1 in arg_0 : arg_1 = COMMENT_RE . sub ( '' , arg_1 ) arg_1 = arg_1 . strip ( ) if arg_1 : yield arg_1

def Func(arg_0):
    """
    Strips and filters empty or commented lines.
    """
    for arg_1 in arg_0:
        arg_1 = COMMENT_RE.sub('', arg_1)
        arg_1 = arg_1.strip()
        if arg_1:
            yield arg_1

Strips and filters empty or commented lines .


(self, message="Breakfast is ready", shout: bool = False)

def
Func
(
arg_0
,
arg_1
=
"Breakfast is ready"
,
arg_2
:
arg_3
=
False
)
:
return
arg_0
.
helper
.
output
(
arg_1
,
arg_2
)

def Func(arg_0, arg_1="Breakfast is ready", arg_2: arg_3 = False):
        """Say something in the morning"""
        return arg_0.helper.output(arg_1, arg_2)


return self.waitFor(timeout, 'AXUIElementDestroyed',
                            callback=callback, args=args,
                            AXRole='AXWindow', AXTitle=winName)

def Func ( arg_0 , arg_1 , arg_2 = 10 ) : arg_3 = AXCallbacks . elemDisappearedCallback arg_4 = None arg_5 = ( arg_4 , arg_0 ) arg_6 = arg_0 . findFirst ( AXRole = 'AXWindow' , AXTitle = arg_1 ) return arg_0 . waitFor ( arg_2 , 'AXUIElementDestroyed' , arg_3 = arg_3 , arg_5 = arg_5 , AXRole = 'AXWindow' , AXTitle = arg_1 )

def Func(arg_0, arg_1, arg_2=10):
        """Convenience method to wait for a window with the given name to
        disappear.

        Returns: Boolean
        """
        arg_3 = AXCallbacks.elemDisappearedCallback
        arg_4 = None
        arg_5 = (arg_4, arg_0)

        # For some reason for the AXUIElementDestroyed notification to fire,
        # we need to have a reference to it first
        arg_6 = arg_0.findFirst(AXRole='AXWindow', AXTitle=arg_1)
        return arg_0.waitFor(arg_2, 'AXUIElementDestroyed',
                            arg_3=arg_3, arg_5=arg_5,
                            AXRole='AXWindow', AXTitle=arg_1)

Convenience method to wait for a window with the given name to disappear .


def Func ( arg_0 ) : if arg_0 . _shutdown_message is not None : arg_0 . session . send ( arg_0 . iopub_socket , arg_0 . _shutdown_message , ident = arg_0 . _topic ( 'shutdown' ) ) arg_0 . log . debug ( "%s" , arg_0 . _shutdown_message ) [ arg_1 . flush ( zmq . POLLOUT ) for arg_1 in arg_0 . shell_streams ]

def Func(arg_0):
        """Actions taken at shutdown by the kernel, called by python's atexit.
        """
        # io.rprint("Kernel at_shutdown") # dbg
        if arg_0._shutdown_message is not None:
            arg_0.session.send(arg_0.iopub_socket, arg_0._shutdown_message, ident=arg_0._topic('shutdown'))
            arg_0.log.debug("%s", arg_0._shutdown_message)
        [ arg_1.flush(zmq.POLLOUT) for arg_1 in arg_0.shell_streams ]

Actions taken at shutdown by the kernel called by python s atexit .


def
Func
(
arg_0
,
arg_1
)
:
arg_0
=
[
arg_3
for
arg_3
in
arg_0
if
arg_3
.
get_birthday
(
)
is
not
]
arg_0
.
sort
(
key
=
lambda
x
:
(
x
.
get_birthday
(
)
.
month
,
x
.
get_birthday
(
)
.
day
)
if
isinstance
(
x
.
get_birthday
(
)
,
datetime
.
datetime
)
else
(
0
,
0
,
x
.
get_birthday
(
)
)
)
arg_2
=
[
]
for
arg_3
in
arg_0
:
arg_4
=
arg_3
.
get_birthday
(
)
if
arg_1
:
if
config
.
display_by_name
(
)
==
"first_name"
:
arg_2
.
append
(
"%04d.%02d.%02d\t%s"
%
(
arg_4
.
year
,
arg_4
.
month
,
arg_4
.
day
,
arg_3
.
get_first_name_last_name
(
)
)
)
else
:
arg_2
.
append
(
"%04d.%02d.%02d\t%s"
%
(
arg_4
.
year
,
arg_4
.
month
,
arg_4
.
day
,
arg_3
.
get_last_name_first_name
(
)
)
)
else
:
if
config
.
display_by_name
(
)
==
"first_name"
:
arg_2
.
append
(
"%s\t%s"
%
(
arg_3
.
get_first_name_last_name
(
)
,
arg_3
.
get_formatted_birthday
(
)
)
)
else
:
arg_2
.
append
(
"%s\t%s"
%
(
arg_3
.
get_last_name_first_name
(
)
,
arg_3
.
get_formatted_birthday
(
)
)
)
if
arg_2
:
if
arg_1
:
print
(
'\n'
.
join
(
arg_2
)
)
else
:
list_birthdays
(
arg_2
)
else
:
if
not
arg_1
:
print
(
"Found no birthdays"
)
sys
.
exit
(
1
)

def Func(arg_0, arg_1):
    """Print birthday contact table.

    :param vcard_list: the vcards to search for matching entries which should
        be printed
    :type vcard_list: list of carddav_object.CarddavObject
    :param parsable: machine readable output: columns devided by tabulator (\t)
    :type parsable: bool
    :returns: None
    :rtype: None

    """
    # filter out contacts without a birthday date
    arg_0 = [
        arg_3 for arg_3 in arg_0 if arg_3.get_birthday() is not None]
    # sort by date (month and day)
    # The sort function should work for strings and datetime objects.  All
    # strings will besorted before any datetime objects.
    arg_0.sort(
        key=lambda x: (x.get_birthday().month, x.get_birthday().day)
        if isinstance(x.get_birthday(), datetime.datetime)
        else (0, 0, x.get_birthday()))
    # add to string list
    arg_2 = []
    for arg_3 in arg_0:
        arg_4 = arg_3.get_birthday()
        if arg_1:
            if config.display_by_name() == "first_name":
                arg_2.append("%04d.%02d.%02d\t%s"
                                     % (arg_4.year, arg_4.month, arg_4.day,
                                        arg_3.get_first_name_last_name()))
            else:
                arg_2.append("%04d.%02d.%02d\t%s"
                                     % (arg_4.year, arg_4.month, arg_4.day,
                                        arg_3.get_last_name_first_name()))
        else:
            if config.display_by_name() == "first_name":
                arg_2.append("%s\t%s"
                                     % (arg_3.get_first_name_last_name(),
                                        arg_3.get_formatted_birthday()))
            else:
                arg_2.append("%s\t%s"
                                     % (arg_3.get_last_name_first_name(),
                                        arg_3.get_formatted_birthday()))
    if arg_2:
        if arg_1:
            print('\n'.join(arg_2))
        else:
            list_birthdays(arg_2)
    else:
        if not arg_1:
            print("Found no birthdays")
        sys.exit(1)


def Func ( arg_0 , arg_1 = None , arg_2 = "/" ) : if arg_1 : return arg_0 . request ( arg_1 , params = { "path" : arg_2 } , method = "get" ) . json ( ) else : return arg_0 . request ( params = { "path" : arg_2 } , method = "get" ) . json ( )

def Func(arg_0, arg_1=None, arg_2="/"):
        """ List files in an allocation directory.

           https://www.nomadproject.io/docs/http/client-fs-ls.html

            arguments:
              - id
              - path
            returns: list
            raises:
              - nomad.api.exceptions.BaseNomadException
              - nomad.api.exceptions.URLNotFoundNomadException
        """
        if arg_1:
            return arg_0.request(arg_1, params={"path": arg_2}, method="get").json()
        else:
            return arg_0.request(params={"path": arg_2}, method="get").json()


return self.get_data(smoothed=True, masked=True, safe_copy=False)[self.get_mask_indices()],\
               self.get_mask_indices(), self.mask.shape

def Func ( arg_0 ) : arg_0 . _check_for_mask ( ) return arg_0 . get_data ( smoothed = True , masked = True , safe_copy = False ) [ arg_0 . get_mask_indices ( ) ] , arg_0 . get_mask_indices ( ) , arg_0 . mask . shape

def Func(arg_0):
        """Return a vector of the masked data.

        Returns
        -------
        np.ndarray, tuple of indices (np.ndarray), tuple of the mask shape
        """
        arg_0._check_for_mask()

        return arg_0.get_data(smoothed=True, masked=True, safe_copy=False)[arg_0.get_mask_indices()],\
               arg_0.get_mask_indices(), arg_0.mask.shape


def
Func
(
arg_0
,
arg_1
)
:
arg_0
.
log
.
debug
(
"heartbeat::Func(%r)"
,
arg_1
)
if
arg_1
not
in
arg_0
.
incoming_registrations
:
arg_0
.
log
.
info
(
"heartbeat::ignoring new heart: %r"
,
arg_1
)
else
:
arg_0
.
finish_registration
(
arg_1
)

def Func(arg_0, arg_1):
        """handler to attach to heartbeater.
        Called when a new heart starts to beat.
        Triggers completion of registration."""
        arg_0.log.debug("heartbeat::Func(%r)", arg_1)
        if arg_1 not in arg_0.incoming_registrations:
            arg_0.log.info("heartbeat::ignoring new heart: %r", arg_1)
        else:
            arg_0.finish_registration(arg_1)

handler to attach to heartbeater . Called when a new heart starts to beat . Triggers completion of registration .


(self, color1, color2, weight=50, *args)

def Func(arg_0, arg_1, arg_2, arg_3=50, *arg_4):
        """This algorithm factors in both the user-provided weight
        and the difference between the alpha values of the two colors
        to decide how to perform the weighted average of the two RGB values.

        It works by first normalizing both parameters to be within [-1, 1],
        where 1 indicates "only use color1", -1 indicates "only use color 0",
        and all values in between indicated a proportionately weighted average.

        Once we have the normalized variables w and a,
        we apply the formula (w + a)/(1 + w*a)
        to get the combined weight (in [-1, 1]) of color1.
        This formula has two especially nice properties:

         * When either w or a are -1 or 1, the combined weight is also that number
           (cases where w * a == -1 are undefined, and handled as a special case).

         * When a is 0, the combined weight is w, and vice versa

        Finally, the weight of color1 is renormalized to be within [0, 1]
        and the weight of color2 is given by 1 minus the weight of color1.

        Copyright (c) 2006-2009 Hampton Catlin, Nathan Weizenbaum, and Chris Eppstein
        http://sass-lang.com
        args:
            color1 (str): first color
            color2 (str): second color
            weight (int/str): weight
        raises:
            ValueError
        returns:
            str
        """
        if arg_1 and arg_2:
            if isinstance(arg_3, string_types):
                arg_3 = float(arg_3.strip('%'))
            arg_3 = ((arg_3 / 100.0) * 2) - 1
            arg_5 = arg_0._hextorgb(arg_1)
            arg_6 = arg_0._hextorgb(arg_2)
            arg_7 = 0
            arg_8 = (((arg_3 if arg_3 * arg_7 == -1 else arg_3 + arg_7) /
                   (1 + arg_3 * arg_7)) + 1)
            arg_8 = arg_8 / 2.0
            arg_9 = 1 - arg_8
            arg_10 = [
                arg_5[0] * arg_8 + arg_6[0] * arg_9,
                arg_5[1] * arg_8 + arg_6[1] * arg_9,
                arg_5[2] * arg_8 + arg_6[2] * arg_9,
            ]
            return arg_0._rgbatohex(arg_10)
        raise ValueError('Illegal color values')

This algorithm factors in both the user - provided weight and the difference between the alpha values of the two colors to decide how to perform the weighted average of the two RGB values .


def Func ( arg_0 , arg_1 ) : arg_0 . last_package_index += 1 arg_2 = arg_0 . last_package_index arg_3 = arg_0 . package_fullpath ( arg_2 ) with gzip . open ( arg_3 , 'wb' ) as f : pickle . dump ( arg_1 , f , protocol = pickle . HIGHEST_PROTOCOL ) f . close ( ) arg_4 = arg_0 . result_fullpath ( arg_2 ) arg_5 = os . path . dirname ( arg_4 ) alphatwirl . mkdir_p ( arg_5 ) return arg_2

def Func(arg_0, arg_1):
        """Put a package

        Parameters
        ----------
        package :
            a task package

        Returns
        -------
        int
            A package index

        """

        arg_0.last_package_index += 1
        arg_2 = arg_0.last_package_index

        arg_3 = arg_0.package_fullpath(arg_2)
        # e.g., '{path}/tpd_20161129_122841_HnpcmF/task_00009.p.gz'

        with gzip.open(arg_3, 'wb') as f:
            pickle.dump(arg_1, f, protocol=pickle.HIGHEST_PROTOCOL)
            f.close()

        arg_4 = arg_0.result_fullpath(arg_2)
        # e.g., '{path}/tpd_20161129_122841_HnpcmF/results/task_00009/result.p.gz'

        arg_5 = os.path.dirname(arg_4)
        # e.g., '{path}/tpd_20161129_122841_HnpcmF/results/task_00009'

        alphatwirl.mkdir_p(arg_5)

        return arg_2


def Func ( arg_0 , arg_1 , arg_2 = None ) : return super ( ) . Func ( arg_0 . _strip_sql ( arg_1 ) , arg_2 )

def Func(arg_0, arg_1, arg_2=None):
        """
        Execute the statement against Presto. Can be used to create views.
        """
        return super().Func(arg_0._strip_sql(arg_1), arg_2)

Execute the statement against Presto . Can be used to create views .


return {'name': description, 'start-time': start_time}, None

def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . get ( 'description' , '' ) arg_3 = google_base . parse_rfc3339_utc_string ( arg_1 . get ( 'timestamp' , '' ) ) for arg_4 , arg_5 in _EVENT_REGEX_MAP . items ( ) : arg_6 = arg_5 . match ( arg_2 ) if arg_6 : return { 'name' : arg_4 , 'start-time' : arg_3 } , arg_6 return { 'name' : arg_2 , 'start-time' : arg_3 } , None

def Func(arg_0, arg_1):
    """Extract elements from an operation event and map to a named event."""
    arg_2 = arg_1.get('description', '')
    arg_3 = google_base.parse_rfc3339_utc_string(
        arg_1.get('timestamp', ''))

    for arg_4, arg_5 in _EVENT_REGEX_MAP.items():
      arg_6 = arg_5.match(arg_2)
      if arg_6:
        return {'name': arg_4, 'start-time': arg_3}, arg_6

    return {'name': arg_2, 'start-time': arg_3}, None

Extract elements from an operation event and map to a named event .


def Func(arg_0):
        """Read the next frame.

        If the next frame have been decoded before and in the cache, then
        return it directly, otherwise decode, cache and return it.

        Returns:
            ndarray or None: Return the frame if successful, otherwise None.
        """
        # pos = self._position
        if arg_0._cache:
            arg_1 = arg_0._cache.get(arg_0._position)
            if arg_1 is not None:
                arg_2 = True
            else:
                if arg_0._position != arg_0._get_real_position():
                    arg_0._set_real_position(arg_0._position)
                arg_2, arg_1 = arg_0._vcap.Func()
                if arg_2:
                    arg_0._cache.put(arg_0._position, arg_1)
        else:
            arg_2, arg_1 = arg_0._vcap.Func()
        if arg_2:
            arg_0._position += 1
        return arg_1


def Func(arg_0, arg_1, arg_2):
        """
        Scans String.

        Compares the byte, word, or double word specified with the memory operand
        with the value in the AL, AX, EAX, or RAX register, and sets the status flags
        according to the results. The memory operand address is read from either
        the ES:RDI, ES:EDI or the ES:DI registers (depending on the address-size
        attribute of the instruction, 32 or 16, respectively)::

                IF (byte comparison)
                THEN
                    temp  =  AL - SRC;
                    SetStatusFlags(temp);
                    THEN IF DF  =  0
                        THEN (E)DI  =  (E)DI + 1;
                        ELSE (E)DI  =  (E)DI - 1;
                        FI;
                    ELSE IF (word comparison)
                        THEN
                            temp  =  AX - SRC;
                            SetStatusFlags(temp)
                            THEN IF DF  =  0
                                THEN (E)DI  =  (E)DI + 2;
                                ELSE (E)DI  =  (E)DI - 2;
                                FI;
                     ELSE (* doubleword comparison *)
                           temp  =  EAX - SRC;
                           SetStatusFlags(temp)
                           THEN IF DF  =  0
                                THEN
                                    (E)DI  =  (E)DI + 4;
                                ELSE
                                    (E)DI  =  (E)DI - 4;
                                FI;
                           FI;
                     FI;

        :param cpu: current CPU.
        :param dest: destination operand.
        :param src: source operand.
        """
        arg_3 = arg_1.reg
        arg_4 = arg_2.mem.base  # , src.type, src.read()
        arg_5 = arg_1.size
        arg_6 = arg_1.read()
        arg_7 = arg_2.read()
        arg_8 = arg_6 - arg_7
        arg_0._calculate_CMP_flags(arg_5, arg_8, arg_6, arg_7)

        arg_9 = Operators.ITEBV(arg_0.address_bit_size, arg_0.DF, -arg_5 // 8, arg_5 // 8)
        arg_0.write_register(arg_4, arg_0.read_register(arg_4) + arg_9)


def Func(arg_0, arg_1):
        """
        Loads a module's code and sets the module's expected hidden
        variables. For more information on these variables and what they
        are for, please see PEP302.

        :param module_name: the full name of the module to load
        """
        if arg_1 != arg_0.module_name:
            raise LoaderError(
                'Requesting a module that the loader is unaware of.')

        if arg_1 in arg_5.modules:
            return arg_5.modules[arg_1]

        arg_2 = arg_0.Func_py_path(arg_1, arg_0.load_target)
        if arg_0.is_pkg:
            arg_2.__path__ = [arg_0.module_path]
            arg_2.__package__ = arg_1
        else:
            arg_2.__package__ = arg_1.rpartition('.')[0]

        arg_5.modules[arg_1] = arg_2
        return arg_2

Loads a module s code and sets the module s expected hidden variables . For more information on these variables and what they are for please see PEP302 .


(self, samples, batch_size, length, fixed=False)

return sample, tfd.MultivariateNormalDiag(loc=loc, scale_diag=scale_diag)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = False ) : if arg_4 : arg_5 = 1 else : arg_5 = arg_2 arg_6 , arg_7 = arg_0 . dynamic_prior . zero_state ( [ arg_1 , arg_5 ] ) arg_8 = [ ] arg_9 = [ ] arg_10 = [ ] for arg_11 in range ( arg_3 ) : arg_12 , arg_7 = arg_0 . dynamic_prior ( arg_6 , arg_7 ) arg_6 = arg_12 . sample ( ) arg_8 . append ( arg_12 . parameters [ "loc" ] ) arg_9 . append ( arg_12 . parameters [ "scale_diag" ] ) arg_10 . append ( arg_6 ) arg_6 = tf . stack ( arg_10 , axis = 2 ) arg_13 = tf . stack ( arg_8 , axis = 2 ) arg_14 = tf . stack ( arg_9 , axis = 2 ) if arg_4 : arg_6 = arg_6 + tf . zeros ( [ arg_2 , 1 , 1 ] ) return arg_6 , tfd . MultivariateNormalDiag ( arg_13 = arg_13 , arg_14 = arg_14 )

def Func(arg_0, arg_1, arg_2, arg_3, arg_4=False):
    """Sample the dynamic latent prior.

    Args:
      samples: Number of samples to draw from the latent distribution.
      batch_size: Number of sequences to sample.
      length: Number of timesteps to sample for each sequence.
      fixed: Boolean for whether or not to share the same random
        sample across all sequences.

    Returns:
      A tuple of a sample tensor of shape [samples, batch_size, length
      latent_size], and a MultivariateNormalDiag distribution from which
      the tensor was sampled, with event shape [latent_size], and batch
      shape [samples, 1, length] if fixed or [samples, batch_size,
      length] otherwise.
    """
    if arg_4:
      arg_5 = 1
    else:
      arg_5 = arg_2

    arg_6, arg_7 = arg_0.dynamic_prior.zero_state([arg_1, arg_5])
    arg_8 = []
    arg_9 = []
    arg_10 = []
    for arg_11 in range(arg_3):
      arg_12, arg_7 = arg_0.dynamic_prior(arg_6, arg_7)
      arg_6 = arg_12.sample()
      arg_8.append(arg_12.parameters["loc"])
      arg_9.append(arg_12.parameters["scale_diag"])
      arg_10.append(arg_6)

    arg_6 = tf.stack(arg_10, axis=2)
    arg_13 = tf.stack(arg_8, axis=2)
    arg_14 = tf.stack(arg_9, axis=2)

    if arg_4:  # tile along the batch axis
      arg_6 = arg_6 + tf.zeros([arg_2, 1, 1])

    return arg_6, tfd.MultivariateNormalDiag(arg_13=arg_13, arg_14=arg_14)


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = [ ] for arg_4 in arg_0 : arg_5 , arg_6 = np . where ( arg_1 == arg_4 ) arg_7 = [ ( f , i ) for f , i in zip ( arg_5 , arg_6 ) ] arg_8 = len ( set ( arg_7 ) . symmetric_difference ( set ( arg_2 ) ) ) arg_3 . append ( ( arg_8 , arg_4 ) ) arg_9 , arg_10 = max ( arg_3 , key = lambda t : t [ 0 ] ) return int ( arg_10 )

def Func(arg_0, arg_1, arg_2):
    """
    Returns a front ID which is the id of the offset front that contains the most overlap
    with offsets that correspond to the given onset front ID.
    """
    arg_3 = []  # will contain tuples of the form (number_overlapping, offset_front_id)
    for arg_4 in arg_0:
        arg_5, arg_6 = np.where(arg_1 == arg_4)
        arg_7 = [(f, i) for f, i in zip(arg_5, arg_6)]
        arg_8 = len(set(arg_7).symmetric_difference(set(arg_2)))
        arg_3.append((arg_8, arg_4))
    arg_9, arg_10 = max(arg_3, key=lambda t: t[0])
    return int(arg_10)

Returns a front ID which is the id of the offset front that contains the most overlap with offsets that correspond to the given onset front ID .


def Func ( arg_0 ) : arg_0 . wait . until ( lambda _ : arg_0 . loaded ) arg_0 . pm . hook . pypom_after_Func ( region = arg_0 ) return arg_0

def Func(arg_0):
        """Wait for the page region to load."""
        arg_0.wait.until(lambda _: arg_0.loaded)
        arg_0.pm.hook.pypom_after_Func(region=arg_0)
        return arg_0


(q, wait=10, asynchronous=False, cached=False)

return YahooSpelling(q, wait, asynchronous, cached)

def Func ( arg_0 , arg_1 = 10 , arg_2 = False , arg_3 = False ) : return YahooSpelling ( arg_0 , arg_1 , arg_2 , arg_3 )

def Func(arg_0, arg_1=10, arg_2=False, arg_3=False):

    """ Returns list of suggested spelling corrections for the given query.
    """

    return YahooSpelling(arg_0, arg_1, arg_2, arg_3)

Returns list of suggested spelling corrections for the given query .


return (spsp.isspmatrix_csc(data) or
                spsp.isspmatrix_csr(data) or
                spsp.isspmatrix_bsr(data) or
                spsp.isspmatrix_dia(data))

def Func ( arg_0 ) : return ( spsp . isspmatrix_csc ( arg_0 ) or spsp . isspmatrix_csr ( arg_0 ) or spsp . isspmatrix_bsr ( arg_0 ) or spsp . isspmatrix_dia ( arg_0 ) )

def Func(arg_0):
        """Checks if a data is csr, csc, bsr, or dia Scipy sparse matrix"""
        return (spsp.isspmatrix_csc(arg_0) or
                spsp.isspmatrix_csr(arg_0) or
                spsp.isspmatrix_bsr(arg_0) or
                spsp.isspmatrix_dia(arg_0))

Checks if a data is csr csc bsr or dia Scipy sparse matrix


def Func(arg_0, arg_1):
        "Undo a supposition and all inferences from it."
        for arg_2, arg_3 in arg_1:
            arg_0.curr_domains[arg_2].append(arg_3)

Undo a supposition and all inferences from it .


def Func ( arg_0 ) : arg_1 = 0 arg_2 = arg_0 . split ( "," ) for arg_3 in arg_2 : arg_3 = arg_3 . strip ( ) if arg_3 . lower ( ) == "infinite" : return - 1 else : arg_4 = reSecondsReader . findall ( arg_3 ) for arg_5 in arg_4 : arg_1 = int ( arg_5 ) if arg_1 > MAX_FINITE_TIMEOUT_LIMIT : return - 1 if arg_1 != 0 : return arg_1 return None

def Func(arg_0):
    """Return -1 if infinite, else return numofsecs."""
    arg_1 = 0
    arg_2 = arg_0.split(",")
    for arg_3 in arg_2:
        arg_3 = arg_3.strip()
        if arg_3.lower() == "infinite":
            return -1
        else:
            arg_4 = reSecondsReader.findall(arg_3)
            for arg_5 in arg_4:
                arg_1 = int(arg_5)
                if arg_1 > MAX_FINITE_TIMEOUT_LIMIT:
                    return -1
                if arg_1 != 0:
                    return arg_1
    return None

Return - 1 if infinite else return numofsecs .


def Func ( arg_0 , arg_1 = False , arg_2 = True ) : for arg_3 in arg_0 . universal . reactions : arg_3 . gapfilling_type = 'universal' arg_5 = arg_0 . universal . metabolites . query ( lambda metabolite : metabolite not in arg_0 . model . metabolites ) arg_0 . model . add_metabolites ( arg_5 ) arg_6 = [ ] for arg_3 in arg_0 . universal . boundary : arg_6 = arg_6 + [ arg_7 . id for arg_7 in list ( arg_3 . metabolites ) ] for arg_7 in arg_0 . model . metabolites : if arg_1 : if arg_7 . id not in arg_6 : arg_3 = arg_0 . universal . add_boundary ( arg_7 , type = 'exchange_smiley' , lb = - 1000 , ub = 0 , reaction_id = 'EX_{}' . format ( arg_7 . id ) ) arg_3 . gapfilling_type = 'exchange' if arg_2 : arg_3 = arg_0 . universal . add_boundary ( arg_7 , type = 'demand_smiley' , lb = 0 , ub = 1000 , reaction_id = 'DM_{}' . format ( arg_7 . id ) ) arg_3 . gapfilling_type = 'demand' arg_8 = arg_0 . universal . reactions . query ( lambda reaction : reaction not in arg_0 . model . reactions ) arg_0 . model . add_reactions ( arg_8 )

def Func(arg_0, arg_1=False, arg_2=True):
        """Extend gapfilling model.

        Add reactions from universal model and optionally exchange and
        demand reactions for all metabolites in the model to perform
        gapfilling on.

        Parameters
        ----------
        exchange_reactions : bool
            Consider adding exchange (uptake) reactions for all metabolites
            in the model.
        demand_reactions : bool
            Consider adding demand reactions for all metabolites.
        """
        for arg_3 in arg_0.universal.reactions:
            arg_3.gapfilling_type = 'universal'
        arg_5 = arg_0.universal.metabolites.query(
            lambda metabolite: metabolite not in arg_0.model.metabolites
                                                           )
        arg_0.model.add_metabolites(arg_5)
        arg_6 = []
        for arg_3 in arg_0.universal.boundary:
            arg_6 = arg_6 + \
                [arg_7.id for arg_7 in list(arg_3.metabolites)]

        for arg_7 in arg_0.model.metabolites:
            if arg_1:
                # check for exchange reaction in model already
                if arg_7.id not in arg_6:
                    arg_3 = arg_0.universal.add_boundary(
                        arg_7, type='exchange_smiley', lb=-1000, ub=0,
                        reaction_id='EX_{}'.format(arg_7.id))
                    arg_3.gapfilling_type = 'exchange'
            if arg_2:
                arg_3 = arg_0.universal.add_boundary(
                    arg_7, type='demand_smiley', lb=0, ub=1000,
                    reaction_id='DM_{}'.format(arg_7.id))
                arg_3.gapfilling_type = 'demand'

        arg_8 = arg_0.universal.reactions.query(
            lambda reaction: reaction not in arg_0.model.reactions
        )
        arg_0.model.add_reactions(arg_8)


return Color(h / 360, self.s, self.brightness, self.a, mode="hsb", name="")

def Func(arg_0, arg_1=180):

        """ Returns a color rotated on the artistic RYB color wheel.

        An artistic color wheel has slightly different opposites
        (e.g. purple-yellow instead of purple-lime).
        It is mathematically incorrect but generally assumed
        to provide better complementary colors.

        http://en.wikipedia.org/wiki/RYB_color_model

        """

        arg_2 = arg_0.h * 360
        arg_1 = arg_1 % 360

        # Approximation of Itten's RYB color wheel.
        # In HSB, colors hues range from 0-360.
        # However, on the artistic color wheel these are not evenly distributed.
        # The second tuple value contains the actual distribution.
        arg_3 = [
            (0, 0), (15, 8),
            (30, 17), (45, 26),
            (60, 34), (75, 41),
            (90, 48), (105, 54),
            (120, 60), (135, 81),
            (150, 103), (165, 123),
            (180, 138), (195, 155),
            (210, 171), (225, 187),
            (240, 204), (255, 219),
            (270, 234), (285, 251),
            (300, 267), (315, 282),
            (330, 298), (345, 329),
            (360, 0)
        ]

        # Given a hue, find out under what angle it is
        # located on the artistic color wheel.
        for arg_4 in _range(len(arg_3) - 1):
            arg_5, arg_6 = arg_3[arg_4]
            arg_7, arg_8 = arg_3[arg_4 + 1]
            if arg_8 < arg_6:
                arg_8 += 360
            if arg_6 <= arg_2 <= arg_8:
                arg_9 = 1.0 * arg_5 + (arg_7 - arg_5) * (arg_2 - arg_6) / (arg_8 - arg_6)
                break

        # And the user-given angle (e.g. complement).
        arg_9 = (arg_9 + arg_1) % 360

        # For the given angle, find out what hue is
        # located there on the artistic color wheel.
        for arg_4 in _range(len(arg_3) - 1):
            arg_5, arg_6 = arg_3[arg_4]
            arg_7, arg_8 = arg_3[arg_4 + 1]
            if arg_8 < arg_6:
                arg_8 += 360
            if arg_5 <= arg_9 <= arg_7:
                arg_2 = 1.0 * arg_6 + (arg_8 - arg_6) * (arg_9 - arg_5) / (arg_7 - arg_5)
                break

        arg_2 = arg_2 % 360
        return Color(arg_2 / 360, arg_0.s, arg_0.brightness, arg_0.a, mode="hsb", name="")

Returns a color rotated on the artistic RYB color wheel .


def Func ( arg_0 , arg_1 ) : arg_2 = parse_document_id ( chrom = arg_0 [ 'chromosome' ] , pos = str ( arg_0 [ 'position' ] ) , ref = arg_0 [ 'reference' ] , alt = arg_0 [ 'alternative' ] , variant_type = arg_0 [ 'variant_type' ] , case_id = arg_1 , ) return arg_2

def Func(arg_0, arg_1):
    """Create a new variant id.

    Args:
        variant_obj(dict)
        family_id(str)

    Returns:
        new_id(str): The new variant id
    """
    arg_2 = parse_document_id(
        chrom=arg_0['chromosome'],
        pos=str(arg_0['position']),
        ref=arg_0['reference'],
        alt=arg_0['alternative'],
        variant_type=arg_0['variant_type'],
        case_id=arg_1,
    )
    return arg_2