def
Func
(
arg_0
)
:
arg_1
=
{
}
if
arg_0
.
select
(
"div.user-info"
)
:
arg_2
=
arg_0
.
select
(
"div.user-info"
)
[
0
]
.
find_all
(
"a"
)
arg_3
=
arg_2
[
0
]
.
attrs
[
"href"
]
arg_1
[
'id'
]
=
re
.
search
(
r'\d+'
,
arg_3
)
.
group
(
0
)
arg_1
[
'username'
]
=
arg_2
[
0
]
.
text
arg_1
[
'reputation'
]
=
arg_0
.
select
(
'span.reputation-score'
)
[
0
]
.
text
arg_1
[
'badges'
]
=
arg_0
.
select
(
"span.badges"
)
[
0
]
.
attrs
[
"title"
]
try
:
arg_2
[
1
]
except
IndexError
:
pass
else
:
arg_1
[
'website'
]
=
arg_2
[
1
]
.
attrs
[
"href"
]
if
arg_0
.
select
(
"img.flag"
)
:
arg_4
=
arg_0
.
select
(
"img.flag"
)
[
0
]
.
attrs
[
"alt"
]
arg_1
[
'country'
]
=
re
.
sub
(
"flag of "
,
""
,
arg_4
)
return
arg_1

def Func(arg_0):
        """Parse the user information of a given HTML container.

        The method parses all the available user information in the container.
        If the class "user-info" exists, the method will get all the available
        information in the container. If not, if a class "tip" exists, it will be
        a wiki post with no user associated. Else, it can be an empty container.

        :param update_info: beautiful soup answer container element

        :returns: an object with the parsed information
        """
        arg_1 = {}
        if arg_0.select("div.user-info"):
            # Get all the <a> elements in the container. First <a> contains the user
            # information, second one (if exists), the website of the user.
            arg_2 = arg_0.select("div.user-info")[0].find_all("a")
            arg_3 = arg_2[0].attrs["href"]
            arg_1['id'] = re.search(r'\d+', arg_3).group(0)
            arg_1['username'] = arg_2[0].text
            arg_1['reputation'] = arg_0.select('span.reputation-score')[0].text
            arg_1['badges'] = arg_0.select("span.badges")[0].attrs["title"]
            try:
                arg_2[1]
            except IndexError:
                pass
            else:
                arg_1['website'] = arg_2[1].attrs["href"]
            if arg_0.select("img.flag"):
                arg_4 = arg_0.select("img.flag")[0].attrs["alt"]
                arg_1['country'] = re.sub("flag of ", "", arg_4)

        return arg_1

Parse the user information of a given HTML container .


def Func(arg_0, arg_1, arg_2=False):
        """Return the tautomer parent of a given molecule.

        :param mol: The input molecule.
        :type mol: rdkit.Chem.rdchem.Mol
        :param bool skip_standardize: Set to True if mol has already been standardized.
        :returns: The tautomer parent molecule.
        :rtype: rdkit.Chem.rdchem.Mol
        """
        if not arg_2:
            arg_1 = arg_0.standardize(arg_1)
        arg_3 = arg_0.canonicalize_tautomer(arg_1)
        arg_3 = arg_0.standardize(arg_3)
        return arg_3

Return the tautomer parent of a given molecule .


def
Func
(
arg_0
=
)
:
assert
arg_0
is
or
isinstance
(
arg_0
,
list
)
,
type
(
arg_0
)
if
arg_0
is
not
:
arg_0
=
set
(
item
if
isinstance
(
item
,
str
)
else
item
.
__qualname__
for
item
in
arg_0
)
arg_1
=
dict
(
(
task
.
qualified_name
,
task
)
for
task
in
_task_list
.
values
(
)
if
arg_0
is
or
task
.
qualified_name
in
arg_0
)
arg_2
=
get_plugin_list
(
)
for
arg_3
in
[
arg_3
for
arg_3
in
arg_2
.
values
(
)
if
arg_0
is
or
arg_3
.
__qualname__
in
arg_0
]
:
arg_4
=
[
arg_7
for
_
,
arg_7
in
inspect
.
getmembers
(
arg_3
)
if
inspect
.
isfunction
(
arg_7
)
and
hasattr
(
arg_7
,
"yaz_task_config"
)
]
if
len
(
arg_4
)
==
0
:
continue
arg_5
=
arg_1
for
arg_6
in
arg_3
.
__qualname__
.
split
(
"."
)
:
if
not
arg_6
in
arg_5
:
arg_5
[
arg_6
]
=
{
}
arg_5
=
arg_5
[
arg_6
]
for
arg_7
in
arg_4
:
logger
.
debug
(
"Found task %s"
,
arg_7
)
arg_5
[
arg_7
.
__name__
]
=
Task
(
plugin_class
=
arg_3
,
arg_7
=
arg_7
,
config
=
arg_7
.
yaz_task_config
)
return
arg_1

def Func(arg_0=None):
    """Returns a tree of Task instances

    The tree is comprised of dictionaries containing strings for
    keys and either dictionaries or Task instances for values.

    When WHITE_LIST is given, only the tasks and plugins in this
    list will become part of the task tree.  The WHITE_LIST may
    contain either strings, corresponding to the task of plugin
    __qualname__, or, preferable, the WHITE_LIST contains
    links to the task function or plugin class instead.
    """
    assert arg_0 is None or isinstance(arg_0, list), type(arg_0)

    if arg_0 is not None:
        arg_0 = set(item if isinstance(item, str) else item.__qualname__ for item in arg_0)

    arg_1 = dict((task.qualified_name, task)
                for task
                in _task_list.values()
                if arg_0 is None or task.qualified_name in arg_0)

    arg_2 = get_plugin_list()
    for arg_3 in [arg_3 for arg_3 in arg_2.values() if arg_0 is None or arg_3.__qualname__ in arg_0]:
        arg_4 = [arg_7
                 for _, arg_7
                 in inspect.getmembers(arg_3)
                 if inspect.isfunction(arg_7) and hasattr(arg_7, "yaz_task_config")]
        if len(arg_4) == 0:
            continue

        arg_5 = arg_1
        for arg_6 in arg_3.__qualname__.split("."):
            if not arg_6 in arg_5:
                arg_5[arg_6] = {}
            arg_5 = arg_5[arg_6]

        for arg_7 in arg_4:
            logger.debug("Found task %s", arg_7)
            arg_5[arg_7.__name__] = Task(plugin_class=arg_3, arg_7=arg_7, config=arg_7.yaz_task_config)

    return arg_1


def Func(arg_0, arg_1=None, arg_2=''):
        """
        Only gathers metadata statements and returns them.

        :param fos: Signed metadata statements from these Federation Operators
            should be added.
        :param context: context of the metadata exchange
        :return: Dictionary with signed Metadata Statements as values
        """

        if not arg_2:
            arg_2 = arg_0.context

        arg_3 = {}
        if arg_0.metadata_statements:
            try:
                arg_4 = arg_0.metadata_statements[arg_2]
            except KeyError:
                if arg_0.metadata_statements == {
                    'register': {},
                    'discovery': {},
                    'response': {}
                }:
                    # No superior so an FO then. Nothing to add ..
                    pass
                else:
                    logger.error(
                        'No metadata statements for this context: {}'.format(
                            arg_2))
                    raise ValueError('Wrong context "{}"'.format(arg_2))
            else:
                if arg_4 != {}:
                    if arg_1 is None:
                        arg_1 = list(arg_4.keys())

                    for arg_5 in arg_1:
                        try:
                            arg_6 = arg_4[arg_5]
                        except KeyError:
                            continue

                        if arg_6.startswith('http'):
                            arg_7 = 'metadata_statement_uris'
                        else:
                            arg_7 = 'metadata_statements'

                        try:
                            arg_3[arg_7][arg_5] = arg_6
                        except KeyError:
                            arg_3[arg_7] = Message()
                            arg_3[arg_7][arg_5] = arg_6

        return arg_3

Only gathers metadata statements and returns them .


(graph: BELGraph, edge_predicates: EdgePredicates)

def
Func
(
arg_0
:
arg_1
,
arg_2
:
arg_3
)
->
:
arg_4
=
count_passed_edge_filter
(
arg_0
,
arg_2
)
print
(
'{}/{} edges passed {}'
.
format
(
arg_4
,
arg_0
.
number_of_edges
(
)
,
(
', '
.
join
(
arg_5
.
__name__
for
arg_5
in
arg_2
)
if
isinstance
(
arg_2
,
Iterable
)
else
arg_2
.
__name__
)
)
)

def Func(arg_0: arg_1, arg_2: arg_3) -> None:
    """Print a summary of the number of edges passing a given set of filters."""
    arg_4 = count_passed_edge_filter(arg_0, arg_2)
    print('{}/{} edges passed {}'.format(
        arg_4, arg_0.number_of_edges(),
        (
            ', '.join(arg_5.__name__ for arg_5 in arg_2)
            if isinstance(arg_2, Iterable) else
            arg_2.__name__
        )
    ))

Print a summary of the number of edges passing a given set of filters .


(l = range(200), width = 40, indent = "  ")

def Func(arg_0 = arg_1(200), arg_2 = 40, arg_3 = "  "):
    """
    Converts a list-like to string with given line width.
    """
    arg_0 = [str(v) + "," for v in arg_0]
    arg_4 = 0
    arg_5 = "" + arg_3
    for arg_6 in arg_0:
        arg_7 = len(arg_6)
        if arg_4 + arg_7 > arg_2:
            arg_5 += "\n" + arg_3
            arg_4 = 0
        arg_5 += arg_6
        arg_4 += arg_7
    return arg_5.strip(",")

Converts a list - like to string with given line width .


def Func ( arg_0 ) : arg_1 = LoadPlanBuilder ( ) . add_all_steps ( arg_0 ) arg_2 = arg_1 . Func ( ) info . status . publish ( 'duration' , 0 ) info . status . publish ( 'steps' , [ ] ) info . status . publish ( 'instances' , arg_1 . instances ) return arg_2


def Func(arg_0, arg_1):
  """ Modifies up to maxChanges number of bits in the inputVal
  """
  arg_2 = np.random.random_integers(0, arg_1, 1)[0]

  if arg_2 == 0:
    return arg_0

  arg_3 = len(arg_0)

  arg_4 = np.random.random_integers(0, 41, arg_2)

  arg_5 = -1
  arg_6 = 0
  for arg_7 in xrange(arg_3):
    if arg_6 >= arg_2:
      break
    if arg_0[arg_7] == 1:
      arg_5 += 1
      if arg_5 in arg_4:
        if arg_7 != 0 and arg_0[arg_7-1] == 0:
          arg_0[arg_7-1] = 1
          arg_0[arg_7] = 0

  return arg_0


def Func ( arg_0 ) : arg_1 = Instruction ( name = arg_0 . name , num_qubits = sum ( [ qreg . size for qreg in arg_0 . qregs ] ) , num_clbits = sum ( [ creg . size for creg in arg_0 . cregs ] ) , params = [ ] ) arg_1 . control = None def find_bit_position ( arg_3 ) : if isinstance ( arg_3 [ 0 ] , QuantumRegister ) : arg_4 = arg_0 . qregs else : arg_4 = arg_0 . cregs arg_5 = arg_4 . index ( arg_3 [ 0 ] ) return sum ( [ arg_6 . size for arg_6 in arg_4 [ : arg_5 ] ] ) + arg_3 [ 1 ] arg_7 = arg_0 . data . copy ( ) if arg_1 . num_qubits > 0 : arg_8 = QuantumRegister ( arg_1 . num_qubits , 'q' ) if arg_1 . num_clbits > 0 : arg_9 = ClassicalRegister ( arg_1 . num_clbits , 'c' ) arg_7 = list ( map ( lambda x : ( x [ 0 ] , list ( map ( lambda y : ( arg_8 , find_bit_position ( y ) ) , x [ 1 ] ) ) , list ( map ( lambda y : ( arg_9 , find_bit_position ( y ) ) , x [ 2 ] ) ) ) , arg_7 ) ) arg_1 . definition = arg_7 return arg_1

def Func(arg_0):
    """Build an ``Instruction`` object from a ``QuantumCircuit``.

    The instruction is anonymous (not tied to a named quantum register),
    and so can be inserted into another circuit. The instruction will
    have the same string name as the circuit.

    Args:
        circuit (QuantumCircuit): the input circuit.

    Return:
        Instruction: an instruction equivalent to the action of the
            input circuit. Upon decomposition, this instruction will
            yield the components comprising the original circuit.
    """
    arg_1 = Instruction(name=arg_0.name,
                              num_qubits=sum([qreg.size for qreg in arg_0.qregs]),
                              num_clbits=sum([creg.size for creg in arg_0.cregs]),
                              params=[])
    arg_1.control = None

    def find_bit_position(arg_3):
        """find the index of a given bit (Register, int) within
        a flat ordered list of bits of the circuit
        """
        if isinstance(arg_3[0], QuantumRegister):
            arg_4 = arg_0.qregs
        else:
            arg_4 = arg_0.cregs
        arg_5 = arg_4.index(arg_3[0])
        return sum([arg_6.size for arg_6 in arg_4[:arg_5]]) + arg_3[1]

    arg_7 = arg_0.data.copy()

    if arg_1.num_qubits > 0:
        arg_8 = QuantumRegister(arg_1.num_qubits, 'q')
    if arg_1.num_clbits > 0:
        arg_9 = ClassicalRegister(arg_1.num_clbits, 'c')

    arg_7 = list(map(lambda x:
                          (x[0],
                           list(map(lambda y: (arg_8, find_bit_position(y)), x[1])),
                           list(map(lambda y: (arg_9, find_bit_position(y)), x[2]))), arg_7))
    arg_1.definition = arg_7

    return arg_1

Build an Instruction object from a QuantumCircuit .


def Func(arg_0=''):
    """
    Load all the thermochemical data factsage files located at a path.

    :param path: Path at which the data files are located.
    """

    arg_4.clear()

    if arg_0 == '':
        arg_0 = default_data_path
    if not os.path.exists(arg_0):
        warnings.warn('The specified data file path does not exist. (%s)' % arg_0)
        return

    arg_1 = glob.glob(os.path.join(arg_0, 'Compound_*.txt'))

    for arg_2 in arg_1:
        arg_3 = Compound(_read_compound_from_factsage_file_(arg_2))
        arg_4[arg_3.formula] = arg_3

Load all the thermochemical data factsage files located at a path .


def Func ( arg_0 ) : arg_1 = { } arg_2 = { } arg_3 = { } arg_4 = [ ] if arg_0 . get ( 'peddy_ped' ) : arg_5 = open ( arg_0 [ 'peddy_ped' ] , 'r' ) for arg_6 in parse_peddy_ped ( arg_5 ) : arg_1 [ arg_6 [ 'sample_id' ] ] = arg_6 if arg_0 . get ( 'peddy_ped_check' ) : arg_5 = open ( arg_0 [ 'peddy_ped_check' ] , 'r' ) for arg_7 in parse_peddy_ped_check ( arg_5 ) : arg_2 [ ( arg_7 [ 'sample_a' ] , arg_7 [ 'sample_b' ] ) ] = arg_7 if arg_0 . get ( 'peddy_sex_check' ) : arg_5 = open ( arg_0 [ 'peddy_sex_check' ] , 'r' ) for arg_6 in parse_peddy_sex_check ( arg_5 ) : arg_3 [ arg_6 [ 'sample_id' ] ] = arg_6 if not arg_1 : return arg_8 = { } for arg_9 in arg_0 [ 'samples' ] : arg_10 = arg_9 [ 'sample_id' ] arg_8 [ arg_10 ] = arg_9 for arg_10 in arg_8 : arg_9 = arg_8 [ arg_10 ] if arg_10 in arg_1 : arg_9 [ 'predicted_ancestry' ] = arg_1 [ arg_10 ] . get ( 'ancestry-prediction' , 'UNKNOWN' ) if arg_10 in arg_3 : if arg_3 [ arg_10 ] [ 'error' ] : arg_9 [ 'confirmed_sex' ] = False else : arg_9 [ 'confirmed_sex' ] = True for arg_11 in [ 'mother' , 'father' ] : if arg_9 [ arg_11 ] != '0' : for arg_12 in arg_2 : if ( arg_10 in arg_12 and arg_9 [ arg_11 ] in arg_12 ) : if arg_2 [ arg_12 ] [ 'parent_error' ] : arg_8 [ arg_9 [ arg_11 ] ] [ 'confirmed_parent' ] = False else : if 'confirmed_parent' not in arg_8 [ arg_9 [ arg_11 ] ] : arg_8 [ arg_9 [ arg_11 ] ] [ 'confirmed_parent' ] = True

def Func(arg_0):
    """Add information from peddy outfiles to the individuals"""
    arg_1 = {}
    arg_2 = {}
    arg_3 = {}
    arg_4 = []

    if arg_0.get('peddy_ped'):
        arg_5 = open(arg_0['peddy_ped'], 'r')
        for arg_6 in parse_peddy_ped(arg_5):
            arg_1[arg_6['sample_id']] = arg_6

    if arg_0.get('peddy_ped_check'):
        arg_5 = open(arg_0['peddy_ped_check'], 'r')
        for arg_7 in parse_peddy_ped_check(arg_5):
            arg_2[(arg_7['sample_a'], arg_7['sample_b'])] = arg_7

    if arg_0.get('peddy_sex_check'):
        arg_5 = open(arg_0['peddy_sex_check'], 'r')
        for arg_6 in parse_peddy_sex_check(arg_5):
            arg_3[arg_6['sample_id']] = arg_6

    if not arg_1:
        return

    arg_8 = {}
    for arg_9 in arg_0['samples']:
        arg_10 = arg_9['sample_id']
        arg_8[arg_10] = arg_9

    for arg_10 in arg_8:
        arg_9 = arg_8[arg_10]
        # Check if peddy has inferred the ancestry
        if arg_10 in arg_1:
            arg_9['predicted_ancestry'] = arg_1[arg_10].get('ancestry-prediction', 'UNKNOWN')
        # Check if peddy has inferred the sex
        if arg_10 in arg_3:
            if arg_3[arg_10]['error']:
                arg_9['confirmed_sex'] = False
            else:
                arg_9['confirmed_sex'] = True

        # Check if peddy har confirmed parental relations
        for arg_11 in ['mother', 'father']:
            # If we are looking at individual with parents
            if arg_9[arg_11] != '0':
                # Check if the child/parent pair is in peddy data
                for arg_12 in arg_2:
                    if (arg_10 in arg_12 and arg_9[arg_11] in arg_12):
                        # If there is a parent error we mark that
                        if arg_2[arg_12]['parent_error']:
                            arg_8[arg_9[arg_11]]['confirmed_parent'] = False
                        else:
                            # Else if parent confirmation has not been done
                            if 'confirmed_parent' not in arg_8[arg_9[arg_11]]:
                                # Set confirmatio to True
                                arg_8[arg_9[arg_11]]['confirmed_parent'] = True


def Func(arg_0, arg_1):
        """
        Check that the list of components `comp` is compatible with both the
        varmap and modelstr for this Model
        """
        arg_2 = False
        arg_3 = [c.category for c in arg_1]

        # Check that the components are all provided, given the categories
        for arg_4, arg_5 in iteritems(arg_0.varmap):
            if arg_4 not in arg_0.modelstr['full']:
                log.warn('Component (%s : %s) not used in model.' % (arg_4,arg_5))

            if arg_5 not in arg_3:
                log.error('Map component (%s : %s) not found in list of components.' % (arg_4,arg_5))
                arg_2 = True

        if arg_2:
            raise ModelError('Component list incomplete or incorrect')

Check that the list of components comp is compatible with both the varmap and modelstr for this Model


def Func ( arg_0 , arg_1 ) : arg_1 . disconnect ( ) arg_0 . disconnect ( ) arg_0 . _Func ( arg_1 )

def Func(arg_0, arg_1):
        """Create a connection to an other mesh.

        .. warning:: Both meshes need to be disconnected and one needs to be
          a consumed and the other a produced mesh. You can check if a
          connection is possible using :meth:`can_Func`.

        .. seealso:: :meth:`is_consumed`, :meth:`is_produced`,
          :meth:`can_Func`
        """
        arg_1.disconnect()
        arg_0.disconnect()
        arg_0._Func(arg_1)

Create a connection to an other mesh.

        .. warning:: Both meshes need to be disconnected and one needs to be
          a consumed and the other a produced mesh. You can check if a
          connection is possible using :meth:`can_connect_to`.

        .. seealso:: :meth:`is_consumed`, :meth:`is_produced`,
          :meth:`can_connect_to`


def Func(arg_0, **arg_1):
        '''
        Get all organisations this member is attached to. Return a list of
        Organisation objects.

        Returns:
            list(Organisation): Return all organisations this member is
            attached to
        '''
        arg_2 = arg_0.Func_json(arg_0.base_uri,
                                                    arg_1=arg_1)

        arg_3 = []
        for arg_4 in arg_2:
            arg_3.append(
                arg_0.create_organisation(arg_4))

        return arg_3

Get all organisations this member is attached to . Return a list of Organisation objects .


def Func ( arg_0 , arg_1 ) : with tf . compat . v1 . name_scope ( 'Func' , values = [ arg_0 , arg_1 ] ) : arg_2 = dist_util . prefer_static_value ( tf . shape ( input = arg_0 ) ) [ 0 ] arg_3 = tfd . Independent ( distribution = tfd . Normal ( loc = dist_util . move_dimension ( arg_0 , 0 , - 2 ) , scale = tf . sqrt ( dist_util . move_dimension ( arg_1 , 0 , - 2 ) ) ) , reinterpreted_batch_ndims = 1 ) return tfd . MixtureSameFamily ( mixture_distribution = tfd . Categorical ( logits = tf . zeros ( [ arg_2 ] , dtype = arg_3 . dtype ) ) , components_distribution = arg_3 )

def Func(arg_0, arg_1):
  """Construct a predictive normal distribution that mixes over posterior draws.

  Args:
    means: float `Tensor` of shape
      `[num_posterior_draws, ..., num_timesteps]`.
    variances: float `Tensor` of shape
      `[num_posterior_draws, ..., num_timesteps]`.

  Returns:
    mixture_dist: `tfd.MixtureSameFamily(tfd.Independent(tfd.Normal))` instance
      representing a uniform mixture over the posterior samples, with
      `batch_shape = ...` and `event_shape = [num_timesteps]`.

  """
  # The inputs `means`, `variances` have shape
  #   `concat([
  #      [num_posterior_draws],
  #      sample_shape,
  #      batch_shape,
  #      [num_timesteps]])`
  # Because MixtureSameFamily mixes over the rightmost batch dimension,
  # we need to move the `num_posterior_draws` dimension to be rightmost
  # in the batch shape. This requires use of `Independent` (to preserve
  # `num_timesteps` as part of the event shape) and `move_dimension`.
  # TODO(b/120245392): enhance `MixtureSameFamily` to reduce along an
  # arbitrary axis, and eliminate `move_dimension` calls here.

  with tf.compat.v1.name_scope(
      'Func', values=[arg_0, arg_1]):
    arg_2 = dist_util.prefer_static_value(
        tf.shape(input=arg_0))[0]

    arg_3 = tfd.Independent(
        distribution=tfd.Normal(
            loc=dist_util.move_dimension(arg_0, 0, -2),
            scale=tf.sqrt(dist_util.move_dimension(arg_1, 0, -2))),
        reinterpreted_batch_ndims=1)

    return tfd.MixtureSameFamily(
        mixture_distribution=tfd.Categorical(
            logits=tf.zeros([arg_2],
                            dtype=arg_3.dtype)),
        components_distribution=arg_3)

Construct a predictive normal distribution that mixes over posterior draws .


def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
,
arg_4
)
:
if
arg_4
==
0
:
arg_0
.
connectEvent
.
set
(
)
arg_0
.
logger
.
info
(
"Connected successfully: %s"
%
(
arg_0
.
clientId
)
)
with
arg_0
.
_subLock
:
if
len
(
arg_0
.
_subscriptions
)
>
0
:
for
arg_5
in
arg_0
.
_subscriptions
:
(
arg_6
,
arg_7
)
=
arg_0
.
client
.
subscribe
(
arg_5
,
qos
=
arg_0
.
_subscriptions
[
arg_5
]
)
if
arg_6
!=
paho
.
MQTT_ERR_SUCCESS
:
arg_0
.
_logAndRaiseException
(
ConnectionException
(
"Unable to subscribe to %s"
%
arg_5
)
)
arg_0
.
logger
.
debug
(
"Restored %s previous subscriptions"
%
len
(
arg_0
.
_subscriptions
)
)
elif
arg_4
==
1
:
arg_0
.
_logAndRaiseException
(
ConnectionException
(
"Incorrect protocol version"
)
)
elif
arg_4
==
2
:
arg_0
.
_logAndRaiseException
(
ConnectionException
(
"Invalid client identifier"
)
)
elif
arg_4
==
3
:
arg_0
.
_logAndRaiseException
(
ConnectionException
(
"Server unavailable"
)
)
elif
arg_4
==
4
:
arg_0
.
_logAndRaiseException
(
ConnectionException
(
"Bad username or password: (%s, %s)"
%
(
arg_0
.
username
,
arg_0
.
password
)
)
)
elif
arg_4
==
5
:
arg_0
.
_logAndRaiseException
(
ConnectionException
(
"Not authorized: s (%s, %s, %s)"
%
(
arg_0
.
clientId
,
arg_0
.
username
,
arg_0
.
password
)
)
)
else
:
arg_0
.
_logAndRaiseException
(
ConnectionException
(
"Unexpected connection failure: %s"
%
(
arg_4
)
)
)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
        """
        Called when the broker responds to our connection request.

        The value of rc determines success or not:
            0: Connection successful
            1: Connection refused - incorrect protocol version
            2: Connection refused - invalid client identifier
            3: Connection refused - server unavailable
            4: Connection refused - bad username or password
            5: Connection refused - not authorised
            6-255: Currently unused.
        """
        if arg_4 == 0:
            arg_0.connectEvent.set()
            arg_0.logger.info("Connected successfully: %s" % (arg_0.clientId))

            # Restoring previous subscriptions
            with arg_0._subLock:
                if len(arg_0._subscriptions) > 0:
                    for arg_5 in arg_0._subscriptions:
                        # We use the underlying mqttclient subscribe method rather than _subscribe because we are
                        # claiming a lock on the subscriptions list and do not want anything else to modify it,
                        # which that method does
                        (arg_6, arg_7) = arg_0.client.subscribe(arg_5, qos=arg_0._subscriptions[arg_5])
                        if arg_6 != paho.MQTT_ERR_SUCCESS:
                            arg_0._logAndRaiseException(ConnectionException("Unable to subscribe to %s" % arg_5))
                    arg_0.logger.debug("Restored %s previous subscriptions" % len(arg_0._subscriptions))
        elif arg_4 == 1:
            arg_0._logAndRaiseException(ConnectionException("Incorrect protocol version"))
        elif arg_4 == 2:
            arg_0._logAndRaiseException(ConnectionException("Invalid client identifier"))
        elif arg_4 == 3:
            arg_0._logAndRaiseException(ConnectionException("Server unavailable"))
        elif arg_4 == 4:
            arg_0._logAndRaiseException(
                ConnectionException("Bad username or password: (%s, %s)" % (arg_0.username, arg_0.password))
            )
        elif arg_4 == 5:
            arg_0._logAndRaiseException(
                ConnectionException("Not authorized: s (%s, %s, %s)" % (arg_0.clientId, arg_0.username, arg_0.password))
            )
        else:
            arg_0._logAndRaiseException(ConnectionException("Unexpected connection failure: %s" % (arg_4)))

Called when the broker responds to our connection request .


def Func ( arg_0 , arg_1 ) : arg_2 = URIRef ( str ( arg_1 . spdx_id ) ) arg_3 = ( arg_2 , RDF . type , arg_0 . spdx_namespace . Annotation ) arg_0 . graph . add ( arg_3 ) arg_4 = Literal ( arg_1 . annotator . to_value ( ) ) arg_0 . graph . add ( ( arg_2 , arg_0 . spdx_namespace . annotator , arg_4 ) ) arg_5 = Literal ( arg_1 . annotation_date_iso_format ) arg_6 = ( arg_2 , arg_0 . spdx_namespace . annotationDate , arg_5 ) arg_0 . graph . add ( arg_6 ) if arg_1 . has_comment : arg_7 = Literal ( arg_1 . comment ) arg_8 = ( arg_2 , RDFS . comment , arg_7 ) arg_0 . graph . add ( arg_8 ) arg_9 = Literal ( arg_1 . annotation_type ) arg_10 = ( arg_2 , arg_0 . spdx_namespace . annotationType , arg_9 ) arg_0 . graph . add ( arg_10 ) return arg_2

def Func(arg_0, arg_1):
        """
        Return an annotation node.
        """
        arg_2 = URIRef(str(arg_1.spdx_id))
        arg_3 = (arg_2, RDF.type, arg_0.spdx_namespace.Annotation)
        arg_0.graph.add(arg_3)

        arg_4 = Literal(arg_1.annotator.to_value())
        arg_0.graph.add((arg_2, arg_0.spdx_namespace.annotator, arg_4))
        arg_5 = Literal(arg_1.annotation_date_iso_format)
        arg_6 = (arg_2, arg_0.spdx_namespace.annotationDate, arg_5)
        arg_0.graph.add(arg_6)
        if arg_1.has_comment:
            arg_7 = Literal(arg_1.comment)
            arg_8 = (arg_2, RDFS.comment, arg_7)
            arg_0.graph.add(arg_8)
        arg_9 = Literal(arg_1.annotation_type)
        arg_10 = (arg_2, arg_0.spdx_namespace.annotationType, arg_9)
        arg_0.graph.add(arg_10)

        return arg_2


def Func ( arg_0 ) : arg_1 = Api ( ) arg_1 . authenticate ( ) return arg_1 . fetch_video ( arg_0 . video_id )

def Func(arg_0):
        """
        Connects to Youtube Api and retrieves the video Func object

        Return:
            gdata.youtube.YouTubeVideoEntry
        """
        arg_1 = Api()
        arg_1.authenticate()
        return arg_1.fetch_video(arg_0.video_id)

Connects to Youtube Api and retrieves the video entry object

        Return:
            gdata.youtube.YouTubeVideoEntry


def Func(arg_0, arg_1):
        """
        Pushes a value onto the stack.

        Decrements the stack pointer and then stores the source operand on the top of the stack.

        :param cpu: current CPU.
        :param src: source operand.
        """
        # http://stackoverflow.com/questions/11291151/how-push-imm-encodes
        arg_2 = arg_1.size
        arg_3 = arg_1.read()
        if arg_2 != 64 and arg_2 != arg_0.address_bit_size // 2:
            arg_3 = Operators.SEXTEND(arg_3, arg_2, arg_0.address_bit_size)
            arg_2 = arg_0.address_bit_size
        arg_0.push(arg_3, arg_2)


(self, tar, name, contents, mode=DEFAULT_FILE_MODE)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = arg_5 ) : arg_6 = BytesIO ( arg_3 . encode ( 'utf8' ) ) arg_7 = tarfile . TarInfo ( arg_2 = arg_2 ) arg_7 . size = len ( arg_3 ) arg_7 . mtime = 0 arg_7 . type = tarfile . REGTYPE arg_7 . mode = int ( arg_4 , 8 ) arg_1 . addfile ( tarinfo = arg_7 , fileobj = arg_6 )

def Func(arg_0, arg_1, arg_2, arg_3, arg_4=arg_5):
        """
        Adds a single file in tarfile instance.

        :param tar: tarfile instance
        :param name: string representing filename or path
        :param contents: string representing file contents
        :param mode: string representing file mode, defaults to 644
        :returns: None
        """
        arg_6 = BytesIO(arg_3.encode('utf8'))
        arg_7 = tarfile.TarInfo(arg_2=arg_2)
        arg_7.size = len(arg_3)
        # mtime must be 0 or any checksum operation
        # will return a different digest even when content is the same
        arg_7.mtime = 0
        arg_7.type = tarfile.REGTYPE
        arg_7.mode = int(arg_4, 8)  # permissions converted to decimal notation
        arg_1.addfile(tarinfo=arg_7, fileobj=arg_6)

Adds a single file in tarfile instance .


def Func(arg_0):
        """Increasing volume of the device."""
        arg_0._volume_level += arg_0._volume_step / arg_0._max_volume
        arg_0._device.vol_up(num=arg_0._volume_step)


(setter, width, height,
               image_path='', image_obj=None, offset=(0, 0),
               bgcolor=COLORS.Off, brightness=255)

def Func(arg_0, arg_1, arg_2,
               arg_3='', arg_4=None, arg_5=(0, 0),
               arg_6=arg_7.Off, arg_9=255):
    """Display an image on a matrix."""
    arg_6 = color_scale(arg_6, arg_9)

    arg_10 = arg_4
    if arg_3 and not arg_10:
        from PIL import Image

        arg_10 = Image.open(arg_3)
    elif not arg_10:
        raise ValueError('Must provide either image_path or image_obj')

    arg_11 = min(arg_1 - arg_5[0], arg_10.size[0])
    arg_12 = min(arg_2 - arg_5[1], arg_10.size[1])
    arg_13 = arg_5[0]
    arg_14 = arg_5[1]

    for arg_15 in range(arg_13, arg_11 + arg_13):
        for arg_16 in range(arg_14, arg_12 + arg_14):
            arg_17, arg_18, arg_19, arg_20 = (0, 0, 0, 255)
            arg_21 = arg_10.getpixel((arg_15 - arg_13, arg_16 - arg_14))

            if isinstance(arg_21, int):
                raise ValueError('Image must be in RGB or RGBA format!')
            if len(arg_21) == 3:
                arg_17, arg_18, arg_19 = arg_21
            elif len(arg_21) == 4:
                arg_17, arg_18, arg_19, arg_20 = arg_21
            else:
                raise ValueError('Image must be in RGB or RGBA format!')

            if arg_20 == 0:
                arg_17, arg_18, arg_19 = arg_6
            else:
                arg_17, arg_18, arg_19 = color_scale((arg_17, arg_18, arg_19), arg_20)

            if arg_9 != 255:
                arg_17, arg_18, arg_19 = color_scale((arg_17, arg_18, arg_19), arg_9)

            arg_0(arg_15, arg_16, (arg_17, arg_18, arg_19))


(self, string_data, share_name, directory_name, file_name, **kwargs)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, **arg_5):
        """
        Upload a string to Azure File Share.

        :param string_data: String to load.
        :type string_data: str
        :param share_name: Name of the share.
        :type share_name: str
        :param directory_name: Name of the directory.
        :type directory_name: str
        :param file_name: Name of the file.
        :type file_name: str
        :param kwargs: Optional keyword arguments that
            `FileService.create_file_from_text()` takes.
        :type kwargs: object
        """
        arg_0.connection.create_file_from_text(arg_2, arg_3,
                                              arg_4, arg_1, **arg_5)


def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
,
arg_4
)
:
LOG
.
info
(
"Creating event for Funcing {0} to {1}"
.
format
(
arg_3
[
'name'
]
.
encode
(
'utf-8'
)
,
arg_2
[
'display_name'
]
)
)
arg_0
.
create_event
(
arg_1
=
arg_1
,
arg_2
=
arg_2
,
arg_3
=
arg_3
,
arg_4
=
arg_4
,
category
=
'case'
,
verb
=
'Func'
,
subject
=
arg_2
[
'display_name'
]
)
LOG
.
info
(
"Updating {0} to be Funced with {1}"
.
format
(
arg_2
[
'display_name'
]
,
arg_3
[
'name'
]
)
)
arg_5
=
arg_0
.
case_collection
.
find_one_and_update
(
{
'_id'
:
arg_2
[
'_id'
]
}
,
{
'$addToSet'
:
{
'Funcees'
:
arg_3
[
'_id'
]
}
}
,
return_document
=
pymongo
.
ReturnDocument
.
AFTER
)
return
arg_5

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
        """Assign a user to a case.

        This function will create an Event to log that a person has been Funced
        to a case. Also the user will be added to case "Funcees".

        Arguments:
            institute (dict): A institute
            case (dict): A case
            user (dict): A User object
            link (str): The url to be used in the event

        Returns:
            updated_case(dict)
        """
        LOG.info("Creating event for Funcing {0} to {1}"
                    .format(arg_3['name'].encode('utf-8'), arg_2['display_name']))

        arg_0.create_event(
            arg_1=arg_1,
            arg_2=arg_2,
            arg_3=arg_3,
            arg_4=arg_4,
            category='case',
            verb='Func',
            subject=arg_2['display_name']
        )
        LOG.info("Updating {0} to be Funced with {1}"
                    .format(arg_2['display_name'], arg_3['name']))

        arg_5 = arg_0.case_collection.find_one_and_update(
            {'_id': arg_2['_id']},
            {'$addToSet': {'Funcees': arg_3['_id']}},
            return_document=pymongo.ReturnDocument.AFTER
        )
        return arg_5

Assign a user to a case.

        This function will create an Event to log that a person has been assigned
        to a case. Also the user will be added to case "assignees".

        Arguments:
            institute (dict): A institute
            case (dict): A case
            user (dict): A User object
            link (str): The url to be used in the event

        Returns:
            updated_case(dict)


return {
            'genomic_coordinates': genomic_coordinates,
            'variant': variant_sbid,
            'allele': allele,
            'row_id': row.ID,
            'reference_allele': row.REF,
            'alternate_alleles': alternate_alleles,
            'info': self._parse_info(row.INFO),
            'qual': row.QUAL,
            'filter': row.FILTER
        }

def Func(arg_0, arg_1, arg_2, arg_3):
        """Return a parsed dictionary for JSON."""

        def _variant_sbid(**arg_4):
            """Generates a SolveBio variant ID (SBID)."""
            return '{build}-{chromosome}-{start}-{stop}-{allele}'\
                .format(**arg_4).upper()

        if arg_2 == '.':
            # Try to use the ref, if '.' is supplied for alt.
            arg_2 = arg_1.REF or arg_2

        arg_5 = {
            'build': arg_0.genome_build,
            'chromosome': arg_1.CHROM,
            'start': arg_1.POS,
            'stop': arg_1.POS + len(arg_1.REF) - 1
        }

        # SolveBio standard variant format
        arg_6 = _variant_sbid(arg_2=arg_2,
                                     **arg_5)

        return {
            'genomic_coordinates': arg_5,
            'variant': arg_6,
            'allele': arg_2,
            'row_id': arg_1.ID,
            'reference_allele': arg_1.REF,
            'alternate_alleles': arg_3,
            'info': arg_0._parse_info(arg_1.INFO),
            'qual': arg_1.QUAL,
            'filter': arg_1.FILTER
        }


def Func ( arg_0 ) : try : return sorted ( list ( set ( arg_0 . main_list ) ) , key = str . lower ) except TypeError : return arg_0 . main_list

def Func(arg_0):
        """
        Return a well Functed list. Basicaly, it's sort a list and remove duplicate.

        :return: A sorted, without duplicate, list.
        :rtype: list
        """

        try:
            return sorted(list(set(arg_0.main_list)), key=str.lower)

        except TypeError:  # pragma: no cover
            return arg_0.main_list

Return a well formatted list. Basicaly, it's sort a list and remove duplicate.

        :return: A sorted, without duplicate, list.
        :rtype: list

Return a well formatted list . Basicaly it s sort a list and remove duplicate .


def Func ( arg_0 , arg_1 ) : arg_2 = [ ] for arg_3 in arg_1 . get_children ( ) : if isinstance ( arg_3 , astroid . ClassDef ) : arg_2 . extend ( arg_0 . _check_classdef_metaclasses ( arg_3 , arg_1 ) ) for arg_4 , arg_5 in arg_2 : arg_4 . pop ( arg_5 , None )

def Func(arg_0, arg_1):
        """ Update consumption analysis for metaclasses. """
        arg_2 = []  # [(scope_locals, consumed_key)]

        for arg_3 in arg_1.get_children():
            if isinstance(arg_3, astroid.ClassDef):
                arg_2.extend(arg_0._check_classdef_metaclasses(arg_3, arg_1))

        # Pop the consumed items, in order to avoid having
        # unused-import and unused-variable false positives
        for arg_4, arg_5 in arg_2:
            arg_4.pop(arg_5, None)

Update consumption analysis for metaclasses .


def Func ( arg_0 , ** arg_1 ) : if arg_0 . conflict_target or arg_0 . conflict_action : arg_2 = arg_0 . _build_Func_compiler ( [ arg_1 ] ) arg_3 = arg_2 . execute_sql ( return_id = True ) arg_4 = arg_0 . model . _meta . pk . name return arg_3 [ 0 ] [ arg_4 ] return super ( ) . create ( ** arg_1 ) . pk

def Func(arg_0, **arg_1):
        """Creates a new record in the database.

        This allows specifying custom conflict behavior using .on_conflict().
        If no special behavior was specified, this uses the normal Django create(..)

        Arguments:
            fields:
                The fields of the row to create.

        Returns:
            The primary key of the record that was created.
        """

        if arg_0.conflict_target or arg_0.conflict_action:
            arg_2 = arg_0._build_Func_compiler([arg_1])
            arg_3 = arg_2.execute_sql(return_id=True)

            arg_4 = arg_0.model._meta.pk.name
            return arg_3[0][arg_4]

        # no special action required, use the standard Django create(..)
        return super().create(**arg_1).pk


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

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

   Args:
        params: dictionary with layer parameters
        w_name: name prefix in state_dict
        scope_name: pytorch scope name
        inputs: pytorch node inputs
        layers: dictionary with keras tensors
        weights: pytorch state_dict
        names: use short names for keras layers
    """
    print('Converting transpose ...')
    if arg_0['perm'][0] != 0:
        if arg_3[0] in arg_4:
            print('!!! Cannot permute batch dimension. Result may be wrong !!!')
            arg_4[arg_2] = arg_4[arg_3[0]]
        else:
            print('Skip weight matrix transpose, result may be wrong.')
    else:
        if arg_6:
            arg_7 = 'PERM' + random_string(4)
        else:
            arg_7 = arg_1 + str(random.random())
        arg_8 = keras.layers.Permute(arg_0['perm'][1:], name=arg_7)
        arg_4[arg_2] = arg_8(arg_4[arg_3[0]])


def Func ( arg_0 ) : arg_1 = np . array ( range ( arg_0 . _n ) , np . uint32 ) for arg_2 in xrange ( arg_0 . _num ) : arg_0 . _random . shuffle ( arg_1 ) arg_3 = arg_1 [ 0 : arg_0 . _getW ( ) ] arg_0 . _patterns [ arg_2 ] = set ( arg_3 )

def Func(arg_0):
    """
    Generates set of random patterns.
    """
    arg_1 = np.array(range(arg_0._n), np.uint32)
    for arg_2 in xrange(arg_0._num):
      arg_0._random.shuffle(arg_1)
      arg_3 = arg_1[0:arg_0._getW()]
      arg_0._patterns[arg_2] = set(arg_3)


def Func ( arg_0 , arg_1 = None ) : arg_2 = { 'folder' : arg_1 } if arg_1 else { } return arg_0 . _get ( 'file/runningconverts' , arg_2 = arg_2 )

def Func(arg_0, arg_1=None):
        """Shows running file converts by folder

        Note:
            If folder_id is not provided, ``Home`` folder will be used.

        Args:
            folder_id (:obj:`str`, optional): id of the folder to list conversions of files exist in it.

        Returns:
            list: list of dictionaries, each dictionary represents a file conversion info. ::

                      [
                        {
                          "name": "Geysir.AVI",
                          "id": "3565411",
                          "status": "pending",
                          "last_update": "2015-08-23 19:41:40",
                          "progress": 0.32,
                          "retries": "0",
                          "link": "https://openload.co/f/f02JFG293J8/Geysir.AVI",
                          "linkextid": "f02JFG293J8"
                        },
                        ....
                      ]

        """
        arg_2 = {'folder': arg_1} if arg_1 else {}
        return arg_0._get('file/runningconverts', arg_2=arg_2)


def Func(arg_0, arg_1):
        """Returns annotation comment or None if found none or more than one.
        Reports errors.
        """
        arg_2 = list(arg_0.graph.triples((arg_1, RDFS.comment, None)))
        if len(arg_2) > 1:
            arg_0.error = True
            arg_4 = 'Annotation can have at most one comment.'
            arg_0.logger.log(arg_4)
            return
        else:
            return six.text_type(arg_2[0][2])

Returns annotation comment or None if found none or more than one . Reports errors .


def Func(arg_0):
        """
        Returns an instance of the formset
        """
        arg_1 = arg_0.get_formset()
        if hasattr(arg_0, 'get_extra_form_kwargs'):
            arg_2 = type(arg_0).__name__
            raise DeprecationWarning(
                'Calling {0}.get_extra_form_kwargs is no longer supported. '
                'Set `form_kwargs` in {0}.formset_kwargs or override '
                '{0}.get_formset_kwargs() directly.'.format(arg_2),
            )
        return arg_1(**arg_0.get_formset_kwargs())


def
Func
(
arg_0
,
arg_1
)
:
try
:
arg_2
=
User
.
objects
.
get
(
username
=
arg_1
)
except
User
.
DoesNotExist
:
raise
serializers
.
ValidationError
(
"User does not exist"
)
try
:
arg_3
=
models
.
EnterpriseCustomerUser
.
objects
.
get
(
user_id
=
arg_2
.
pk
)
except
models
.
EnterpriseCustomerUser
.
DoesNotExist
:
raise
serializers
.
ValidationError
(
"User has no EnterpriseCustomerUser"
)
arg_0
.
enterprise_customer_user
=
arg_3
return
arg_1

def Func(arg_0, arg_1):
        """
        Verify that the username has a matching user, and that the user has an associated EnterpriseCustomerUser.
        """
        try:
            arg_2 = User.objects.get(username=arg_1)
        except User.DoesNotExist:
            raise serializers.ValidationError("User does not exist")

        try:
            arg_3 = models.EnterpriseCustomerUser.objects.get(user_id=arg_2.pk)
        except models.EnterpriseCustomerUser.DoesNotExist:
            raise serializers.ValidationError("User has no EnterpriseCustomerUser")

        arg_0.enterprise_customer_user = arg_3
        return arg_1

Verify that the username has a matching user and that the user has an associated EnterpriseCustomerUser .


(regex, view, kwargs=None, name=None, prefix='')

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None , arg_4 = '' ) : from djapiauth . auth import api_auth if isinstance ( arg_1 , six . string_types ) : return url ( arg_0 , api_auth ( import_by_path ( arg_4 + "." + arg_1 if arg_4 else arg_1 ) ) ) elif isinstance ( arg_1 , ( list , tuple ) ) : return url ( arg_0 , arg_1 , arg_3 , arg_4 , ** arg_2 ) else : return url ( arg_0 , api_auth ( arg_1 ) )

def Func(arg_0, arg_1, arg_2=None, arg_3=None, arg_4=''):
    """
    if view is string based, must be a full path
    """
    from djapiauth.auth import api_auth
    if isinstance(arg_1, six.string_types):  # view is a string, must be full path
        return url(arg_0, api_auth(import_by_path(arg_4 + "." + arg_1 if arg_4 else arg_1)))
    elif isinstance(arg_1, (list, tuple)):  # include
        return url(arg_0, arg_1, arg_3, arg_4, **arg_2)
    else:  # view is an object
        return url(arg_0, api_auth(arg_1))

if view is string based must be a full path


def Func ( arg_0 ) : if not arg_0 . visit_events : return float ( 'inf' ) else : return min ( arg_0 . visit_events , key = lambda event : event . arr_time_ut ) . arr_time_ut

def Func(arg_0):
        """
        Get the earliest visit time of the stop.
        """
        if not arg_0.visit_events:
            return float('inf')
        else:
            return min(arg_0.visit_events, key=lambda event: event.arr_time_ut).arr_time_ut

Get the earliest visit time of the stop .


def Func(arg_0, arg_1):
        """
        Build a KeyWrappingSpecification struct from a dictionary.

        Args:
            value (dict): A dictionary containing the key/value pairs for a
                KeyWrappingSpecification struct.

        Returns:
            KeyWrappingSpecification: a KeyWrappingSpecification struct

        Raises:
            TypeError: if the input argument is invalid
        """
        if arg_1 is None:
            return None
        if not isinstance(arg_1, dict):
            raise TypeError("Key wrapping specification must be a dictionary.")

        arg_2 = arg_0._build_encryption_key_information(
            arg_1.get('encryption_key_information')
        )
        arg_3 = arg_0._build_mac_signature_key_information(
            arg_1.get('mac_signature_key_information')
        )

        arg_4 = cobjects.KeyWrappingSpecification(
            wrapping_method=arg_1.get('wrapping_method'),
            encryption_key_information=arg_2,
            mac_signature_key_information=arg_3,
            attribute_names=arg_1.get('attribute_names'),
            encoding_option=arg_1.get('encoding_option')
        )
        return arg_4

Build a KeyWrappingSpecification struct from a dictionary .


def Func ( arg_0 ) : arg_1 = ( ( arg_2 [ 0 ] , arg_2 [ 1 ] ) for t in arg_0 . tiers . values ( ) for arg_2 in t [ 0 ] . values ( ) ) for arg_2 in { arg_2 for b in arg_1 for arg_2 in b } ^ set ( arg_0 . timeslots ) : del ( arg_0 . timeslots [ arg_2 ] )

def Func(arg_0):
        """Clean up all unused timeslots.

        .. warning:: This can and will take time for larger tiers.

        When you want to do a lot of operations on a lot of tiers please unset
        the flags for cleaning in the functions so that the cleaning is only
        performed afterwards.
        """
        arg_1 = ((arg_2[0], arg_2[1]) for t in arg_0.tiers.values() for arg_2 in t[0].values())
        for arg_2 in {arg_2 for b in arg_1 for arg_2 in b} ^ set(arg_0.timeslots):
            del(arg_0.timeslots[arg_2])


def Func(arg_0):
        """
        Return free space in bytes.
        """
        arg_1 = "df -k | grep -vE '^Filesystem|tmpfs|cdrom|none|udev|cgroup' | awk '{ print($1 \" \" $4 }'"
        arg_2 = [_ for _ in arg_0.run(arg_1).strip().split('\n') if _.startswith('/')]
        assert len(arg_2) == 1, 'Ambiguous devices: %s' % str(arg_2)
        arg_3, arg_4 = arg_2[0].split(' ')
        arg_5 = int(arg_4) * 1024
        arg_0.vprint('free_space (bytes):', arg_5)
        return arg_5


def Func(arg_0=None, arg_1=1, arg_2=None):
    """Enter debugger read loop after your program has crashed.

    exc is a triple like you get back from sys.exc_info.  If no exc
    parameter, is supplied, the values from sys.last_type,
    sys.last_value, sys.last_traceback are used. And if these don't
    exist either we'll assume that sys.exc_info() contains what we
    want and frameno is the index location of where we want to start.

    'frameno' specifies how many frames to ignore in the traceback.
    The default is 1, that is, we don't need to show the immediate
    call into Func. If you have wrapper functions that call
    this one, you may want to increase frameno.
    """

    if arg_2 is None:
        # Check for a global debugger object
        if arg_3.debugger_obj is None:
            arg_3.debugger_obj = arg_3.Trepan()
            pass
        arg_2 = arg_3.debugger_obj
        pass
    arg_5 = re.compile("^<.+>$")

    if arg_0[0] is None:
        # frameno+1 because we are about to add one more level of call
        # in get_last_or_frame_exception
        arg_0 = get_last_or_frame_exception()
        if arg_0[0] is None:
            print("Can't find traceback for Func "
                  "in sys.last_traceback or sys.exec_info()")
            return
        pass
    arg_6, arg_7, arg_8 = arg_0
    arg_2.core.execution_status = ('Terminated with unhandled exception %s'
                                 % arg_6)

    # tb has least-recent traceback entry first. We want the most-recent
    # entry. Also we'll pick out a mainpyfile name if it hasn't previously
    # been set.
    if arg_8 is not None:
        while arg_8.tb_next is not None:
            arg_11 = arg_8.tb_frame.f_code.co_filename
            if (arg_2.mainpyfile and 0 == len(arg_2.mainpyfile)
                and not arg_5.match(arg_11)):
                arg_2.mainpyfile = arg_11
                pass
            arg_8 = arg_8.tb_next
            pass
        arg_2.core.processor.curframe = arg_8.tb_frame
        pass

    if 0 == len(arg_2.program_sys_argv):
        # Fake program (run command) args since we weren't called with any
        arg_2.program_sys_argv = list(arg_17.argv[1:])
        arg_2.program_sys_argv[:0] = [arg_2.mainpyfile]

    # if 0 == len(dbg._sys_argv):
    #     # Fake script invocation (restart) args since we don't have any
    #     dbg._sys_argv = list(dbg.program_sys_argv)
    #     dbg._sys_argv[:0] = [__title__]

    try:
        # # FIXME: This can be called from except hook in which case we
        # # need this. Dunno why though.
        # try:
        #     _pydb_trace.set_trace(t.tb_frame)
        # except:
        #     pass

        # Possibly a bug in Python 2.5. Why f.f_lineno is
        # not always equal to t.tb_lineno, I don't know.
        arg_16 = arg_8.tb_frame
        if arg_16 and arg_16.f_lineno != arg_8.tb_lineno : arg_16 = arg_16.f_back
        arg_2.core.processor.event_processor(arg_16, 'exception', arg_0, 'Trepan3k:pm')
    except DebuggerRestart:
        while True:
            arg_17.argv = list(arg_2._program_sys_argv)
            arg_2.msg("Restarting %s with arguments:\n\t%s"
                  % (arg_2.filename(arg_2.mainpyfile),
                     " ".join(arg_2._program_sys_argv[1:])))
            try:
                arg_2.run_script(arg_2.mainpyfile)
            except DebuggerRestart:
                pass
            pass
    except DebuggerQuit:
        pass
    return

Enter debugger read loop after your program has crashed.

    exc is a triple like you get back from sys.exc_info.  If no exc
    parameter, is supplied, the values from sys.last_type,
    sys.last_value, sys.last_traceback are used. And if these don't
    exist either we'll assume that sys.exc_info() contains what we
    want and frameno is the index location of where we want to start.

    'frameno' specifies how many frames to ignore in the traceback.
    The default is 1, that is, we don't need to show the immediate
    call into post_mortem. If you have wrapper functions that call
    this one, you may want to increase frameno.

Enter debugger read loop after your program has crashed .


def
Func
(
arg_0
)
:
arg_1
,
arg_2
=
arg_0
.
command
(
"LIST OVERVIEW.FMT"
)
if
arg_1
!=
215
:
raise
NNTPReplyError
(
arg_1
,
arg_2
)
for
arg_3
in
arg_0
.
info_gen
(
arg_1
,
arg_2
)
:
try
:
arg_4
,
arg_5
=
arg_3
.
rstrip
(
)
.
split
(
":"
)
except
ValueError
:
raise
NNTPDataError
(
"Invalid LIST OVERVIEW.FMT"
)
if
arg_5
and
not
arg_4
:
arg_4
,
arg_5
=
arg_5
,
arg_4
if
arg_5
and
arg_5
!=
"full"
:
raise
NNTPDataError
(
"Invalid LIST OVERVIEW.FMT"
)
yield
(
arg_4
,
arg_5
==
"full"
)

def Func(arg_0):
        """Generator for the LIST OVERVIEW.FMT

        See list_overview_fmt() for more information.

        Yields:
            An element in the list returned by list_overview_fmt().
        """
        arg_1, arg_2 = arg_0.command("LIST OVERVIEW.FMT")
        if arg_1 != 215:
            raise NNTPReplyError(arg_1, arg_2)

        for arg_3 in arg_0.info_gen(arg_1, arg_2):
            try:
                arg_4, arg_5 = arg_3.rstrip().split(":")
            except ValueError:
                raise NNTPDataError("Invalid LIST OVERVIEW.FMT")
            if arg_5 and not arg_4:
                arg_4, arg_5 = arg_5, arg_4
            if arg_5 and arg_5 != "full":
                raise NNTPDataError("Invalid LIST OVERVIEW.FMT")
            yield (arg_4, arg_5 == "full")


def Func ( * arg_0 , ** arg_1 ) : arg_2 = arg_1 . pop ( 'key' , lambda x : x ) assert not arg_1 arg_3 = more_itertools . collate ( * arg_0 , arg_2 = arg_2 ) arg_4 = itertools . groupby ( arg_3 , arg_2 = arg_2 ) arg_5 = ( tuple ( g ) for k , g in arg_4 ) def has_dupes ( arg_6 ) : return len ( arg_6 ) > 1 return filter ( has_dupes , arg_5 )

def Func(*arg_0, **arg_1):
	"""
	Yield duplicate items from any number of sorted iterables of items

	>>> items_a = [1, 2, 3]
	>>> items_b = [0, 3, 4, 5, 6]
	>>> list(Func(items_a, items_b))
	[(3, 3)]

	It won't behave as you expect if the iterables aren't ordered

	>>> items_b.append(1)
	>>> list(Func(items_a, items_b))
	[(3, 3)]
	>>> list(Func(items_a, sorted(items_b)))
	[(1, 1), (3, 3)]

	This function is most interesting when it's operating on a key
	of more complex objects.

	>>> items_a = [dict(email='joe@example.com', id=1)]
	>>> items_b = [dict(email='joe@example.com', id=2), dict(email='other')]
	>>> dupe, = Func(items_a, items_b, key=operator.itemgetter('email'))
	>>> dupe[0]['email'] == dupe[1]['email'] == 'joe@example.com'
	True
	>>> dupe[0]['id']
	1
	>>> dupe[1]['id']
	2
	"""
	arg_2 = arg_1.pop('key', lambda x: x)
	assert not arg_1
	arg_3 = more_itertools.collate(*arg_0, arg_2=arg_2)
	arg_4 = itertools.groupby(arg_3, arg_2=arg_2)
	arg_5 = (
		tuple(g)
		for k, g in arg_4
	)

	def has_dupes(arg_6):
		return len(arg_6) > 1
	return filter(has_dupes, arg_5)

Yield duplicate items from any number of sorted iterables of items

	>>> items_a = [1, 2, 3]
	>>> items_b = [0, 3, 4, 5, 6]
	>>> list(duplicates(items_a, items_b))
	[(3, 3)]

	It won't behave as you expect if the iterables aren't ordered

	>>> items_b.append(1)
	>>> list(duplicates(items_a, items_b))
	[(3, 3)]
	>>> list(duplicates(items_a, sorted(items_b)))
	[(1, 1), (3, 3)]

	This function is most interesting when it's operating on a key
	of more complex objects.

	>>> items_a = [dict(email='joe@example.com', id=1)]
	>>> items_b = [dict(email='joe@example.com', id=2), dict(email='other')]
	>>> dupe, = duplicates(items_a, items_b, key=operator.itemgetter('email'))
	>>> dupe[0]['email'] == dupe[1]['email'] == 'joe@example.com'
	True
	>>> dupe[0]['id']
	1
	>>> dupe[1]['id']
	2


return super(Keys, self).update(id, name=name)

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

def Func(arg_0, arg_1, arg_2):
        """id or fingerprint"""
        return super(Keys, arg_0).Func(arg_1, arg_2=arg_2)


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

return _wait_for_elements(self, using, value)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
=
10000
,
arg_4
=
1000
,
arg_5
=
arg_6
)
:
if
not
callable
(
arg_5
)
:
raise
TypeError
(
'Asserter must be callable.'
)
@
retry
(
retry_on_exception
=
lambda
ex
:
isinstance
(
ex
,
WebDriverException
)
,
stop_max_delay
=
arg_3
,
wait_fixed
=
arg_4
)
def
_Func
(
arg_7
,
arg_1
,
arg_2
)
:
arg_8
=
arg_7
.
elements
(
arg_1
,
arg_2
)
if
not
len
(
arg_8
)
:
raise
WebDriverException
(
'no such element'
)
else
:
arg_9
=
arg_8
[
0
]
arg_5
(
arg_9
)
return
arg_8
return
_Func
(
arg_0
,
arg_1
,
arg_2
)

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

        Support:
            Android iOS Web(WebView)

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

        Returns:
            Return the list of Element if any of them satisfy the condition.

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

        return _Func(arg_0, arg_1, arg_2)


return self._call(
            JSONRPCMethods.GET_RAW_TRANSACTION.value, params=[tx_hash, int(verbose), ], **kwargs)

def Func ( arg_0 , arg_1 , arg_2 = True , ** arg_3 ) : return arg_0 . _call ( JSONRPCMethods . GET_RAW_TRANSACTION . value , params = [ arg_1 , int ( arg_2 ) , ] , ** arg_3 )

def Func(arg_0, arg_1, arg_2=True, **arg_3):
        """ Returns detailed information associated with a specific transaction hash.

        :param tx_hash: transaction hash
        :param verbose:
            a boolean indicating whether the detailed transaction information should be returned in
            JSON format (otherwise the transaction information is returned as an hexadecimal string
            by the JSON-RPC endpoint)
        :type tx_hash: str
        :type verbose: bool
        :return:
            dictionary containing the transaction information (or an hexadecimal string if verbose
            is set to False)
        :rtype: dict or str

        """
        return arg_0._call(
            JSONRPCMethods.GET_RAW_TRANSACTION.value, params=[arg_1, int(arg_2), ], **arg_3)

Returns detailed information associated with a specific transaction hash .


def Func ( arg_0 , arg_1 = '' ) : for arg_2 in arg_0 . _Func . get_range ( ) : logger . debug ( arg_2 ) if not arg_2 [ 0 ] . startswith ( arg_1 ) : continue arg_3 = json . loads ( arg_2 [ 1 ] [ 'task_data' ] ) arg_3 [ 'task_key' ] = arg_2 [ 0 ] yield arg_3

def Func(arg_0, arg_1=''):
        '''
        generate the data objects for every task
        '''
        for arg_2 in arg_0._Func.get_range():
            logger.debug(arg_2)
            if not arg_2[0].startswith(arg_1):
                continue
            arg_3 = json.loads(arg_2[1]['task_data'])
            arg_3['task_key'] = arg_2[0]
            yield arg_3


def Func ( ) : arg_0 = os . path . dirname ( os . path . abspath ( __file__ ) ) arg_1 = os . path . join ( arg_0 , "experimentDescriptionSchema.json" ) return json . loads ( open ( arg_1 , 'r' ) . read ( ) )

def Func():
  """
  Returns the experiment description schema. This implementation loads it in
  from file experimentDescriptionSchema.json.

  Parameters:
  --------------------------------------------------------------------------
  Returns:    returns a dict representing the experiment description schema.
  """
  arg_0 = os.path.dirname(os.path.abspath(__file__))
  arg_1 = os.path.join(arg_0, "experimentDescriptionSchema.json")
  return json.loads(open(arg_1, 'r').read())

Returns the experiment description schema . This implementation loads it in from file experimentDescriptionSchema . json .


def Func ( arg_0 , arg_1 ) : arg_2 , arg_3 , arg_4 = la . svd ( arg_0 , lapack_driver = 'gesvd' ) arg_5 = np . diag ( arg_1 ( arg_3 ) ) return arg_2 . dot ( arg_5 ) . dot ( arg_4 )

def Func(arg_0, arg_1):
    """Apply real scalar function to singular values of a matrix.

    Args:
        a (array_like): (N, N) Matrix at which to evaluate the function.
        func (callable): Callable object that evaluates a scalar function f.

    Returns:
        ndarray: funm (N, N) Value of the matrix function specified by func
        evaluated at `A`.
    """
    arg_2, arg_3, arg_4 = la.svd(arg_0, lapack_driver='gesvd')
    arg_5 = np.diag(arg_1(arg_3))
    return arg_2.dot(arg_5).dot(arg_4)

Apply real scalar function to singular values of a matrix .


def Func(arg_0, arg_1):
        """Start the watcher, registering new watches if any."""
        arg_0._loop = arg_1

        arg_0._fd = LibC.inotify_init()
        for arg_4, (arg_5, arg_6) in arg_0.requests.items():
            arg_0._Func_watch(arg_4, arg_5, arg_6)

        # We pass ownership of the fd to the transport; it will close it.
        arg_0._stream, arg_0._transport = yield from aioutils.stream_from_fd(arg_0._fd, arg_1)

Start the watcher registering new watches if any .


def Func ( arg_0 ) : if arg_0 . input_tensor : if type ( arg_0 . input_tensor ) == int : arg_1 = dim_to_var ( arg_0 . input_tensor , name = "x" ) else : arg_1 = arg_0 . input_tensor else : arg_1 = T . matrix ( 'x' ) arg_0 . input_variables . append ( arg_1 ) arg_0 . _output = arg_1 arg_0 . _test_output = arg_1

def Func(arg_0):
        """
        Set up variables.
        """
        if arg_0.input_tensor:
            if type(arg_0.input_tensor) == int:
                arg_1 = dim_to_var(arg_0.input_tensor, name="x")
            else:
                arg_1 = arg_0.input_tensor
        else:
            arg_1 = T.matrix('x')
        arg_0.input_variables.append(arg_1)
        arg_0._output = arg_1
        arg_0._test_output = arg_1


def Func ( arg_0 , arg_1 = arg_2 ) : get_provider ( ) . _central_manager . scanForPeripheralsWithServices_options_ ( None , None ) arg_0 . _is_scanning = True

def Func(arg_0, arg_1=arg_2):
        """Start scanning for BLE devices."""
        get_provider()._central_manager.scanForPeripheralsWithServices_options_(None, None)
        arg_0._is_scanning = True


def Func(arg_0):
        """
        Parse the event definition node, and return an instance of Event
        """
        arg_1 = first(
            arg_0.xpath('.//bpmn:messageEventDefinition'))
        if arg_1 is not None:
            return arg_0.get_message_event_definition(arg_1)

        arg_2 = first(
            arg_0.xpath('.//bpmn:timerEventDefinition'))
        if arg_2 is not None:
            return arg_0.get_timer_event_definition(arg_2)

        raise NotImplementedError(
            'Unsupported Intermediate Catch Event: %r', ET.tostring(arg_0.node))

Parse the event definition node and return an instance of Event


def Func ( arg_0 , arg_1 , arg_2 , arg_3 = False ) : ia . do_assert ( len ( arg_0 . exterior ) > 0 ) arg_4 = [ ] for arg_5 , arg_6 in arg_0 . exterior : arg_7 = ( arg_5 - arg_1 ) ** 2 + ( arg_6 - arg_2 ) ** 2 arg_4 . append ( arg_7 ) arg_4 = np . sqrt ( arg_4 ) arg_8 = np . argmin ( arg_4 ) if arg_3 : return arg_8 , arg_4 [ arg_8 ] return arg_8

def Func(arg_0, arg_1, arg_2, arg_3=False):
        """
        Find the index of the point within the exterior that is closest to the given coordinates.

        "Closeness" is here defined based on euclidean distance.
        This method will raise an AssertionError if the exterior contains no points.

        Parameters
        ----------
        x : number
            X-coordinate around which to search for close points.

        y : number
            Y-coordinate around which to search for close points.

        return_distance : bool, optional
            Whether to also return the distance of the closest point.

        Returns
        -------
        int
            Index of the closest point.

        number
            Euclidean distance to the closest point.
            This value is only returned if `return_distance` was set to True.

        """
        ia.do_assert(len(arg_0.exterior) > 0)
        arg_4 = []
        for arg_5, arg_6 in arg_0.exterior:
            arg_7 = (arg_5 - arg_1) ** 2 + (arg_6 - arg_2) ** 2
            arg_4.append(arg_7)
        arg_4 = np.sqrt(arg_4)
        arg_8 = np.argmin(arg_4)
        if arg_3:
            return arg_8, arg_4[arg_8]
        return arg_8

Find the index of the point within the exterior that is closest to the given coordinates .


def
Func
(
arg_0
,
arg_1
=
8
,
arg_2
=
'l'
,
arg_3
=
,
arg_4
=
,
arg_5
=
True
,
**
arg_6
)
:
arg_7
,
arg_8
,
arg_9
,
arg_10
,
arg_11
=
get_diff
(
arg_0
,
arg_2
,
**
arg_6
)
arg_12
=
Waterfall
(
arg_0
,
max_load
=
150
)
arg_13
=
arg_12
.
header
[
'tsamp'
]
arg_14
=
arg_12
.
data
arg_12
=
arg_15
,
arg_16
,
arg_17
,
arg_18
=
get_stokes
(
arg_14
,
arg_2
)
arg_19
=
gain_offsets
(
arg_15
,
arg_16
,
arg_17
,
arg_18
,
arg_13
,
arg_1
,
arg_2
,
**
arg_6
)
arg_20
=
convert_to_coarse
(
arg_11
,
arg_1
)
arg_21
,
arg_22
=
foldcal
(
np
.
expand_dims
(
arg_14
[
:
,
0
,
:
]
,
axis
=
1
)
,
arg_13
,
**
arg_6
)
arg_23
,
arg_24
=
foldcal
(
np
.
expand_dims
(
arg_14
[
:
,
1
,
:
]
,
axis
=
1
)
,
arg_13
,
**
arg_6
)
if
arg_3
==
:
plt
.
subplot
(
211
)
else
:
arg_25
=
plt
.
axes
(
arg_3
)
plt
.
setp
(
arg_25
.
get_xticklabels
(
)
,
visible
=
False
)
plt
.
plot
(
arg_20
,
arg_19
,
'ko'
,
markersize
=
2
)
plt
.
ylabel
(
r'$\frac{\Delta G}{2}$'
,
rotation
=
90
)
if
arg_2
==
'l'
:
plt
.
title
(
'XY Gain Difference'
)
if
arg_2
==
'c'
:
plt
.
title
(
'LR Gain Difference'
)
plt
.
grid
(
True
)
if
arg_4
==
:
plt
.
subplot
(
212
)
else
:
arg_26
=
plt
.
axes
(
arg_4
,
sharex
=
arg_25
)
if
arg_2
==
'l'
:
plt
.
plot
(
arg_11
,
arg_21
,
'b-'
,
label
=
'XX'
)
plt
.
plot
(
arg_11
,
arg_23
,
'r-'
,
label
=
'YY'
)
if
arg_2
==
'c'
:
plt
.
plot
(
arg_11
,
arg_21
,
'b-'
,
label
=
'LL'
)
plt
.
plot
(
arg_11
,
arg_23
,
'r-'
,
label
=
'RR'
)
plt
.
xlabel
(
'Frequency (MHz)'
)
plt
.
ylabel
(
'Power (Counts)'
)
if
arg_5
==
True
:
plt
.
legend
(
)

def Func(arg_0,arg_1=8,arg_2='l',arg_3=None,arg_4=None,arg_5=True,**arg_6):
    '''
    Plots the calculated gain offsets of each coarse channel along with
    the time averaged power spectra of the X and Y feeds
    '''
    #Get ON-OFF ND spectra
    arg_7,arg_8,arg_9,arg_10,arg_11 = get_diff(arg_0,arg_2,**arg_6)
    arg_12 = Waterfall(arg_0,max_load=150)
    arg_13 = arg_12.header['tsamp']
    arg_14 = arg_12.data
    arg_12 = None
    arg_15,arg_16,arg_17,arg_18 = get_stokes(arg_14,arg_2)

    #Get phase offsets and convert to degrees
    arg_19 = gain_offsets(arg_15,arg_16,arg_17,arg_18,arg_13,arg_1,arg_2,**arg_6)
    arg_20 = convert_to_coarse(arg_11,arg_1)

    #Get X and Y spectra for the noise diode ON and OFF
    #If using circular feeds these correspond to LL and RR
    arg_21,arg_22 = foldcal(np.expand_dims(arg_14[:,0,:],axis=1),arg_13,**arg_6)
    arg_23,arg_24 = foldcal(np.expand_dims(arg_14[:,1,:],axis=1),arg_13,**arg_6)

    if arg_3==None:
        plt.subplot(211)
    else:
        arg_25 = plt.axes(arg_3)
        plt.setp(arg_25.get_xticklabels(),visible=False)
    plt.plot(arg_20,arg_19,'ko',markersize=2)
    plt.ylabel(r'$\frac{\Delta G}{2}$',rotation=90)
    if arg_2=='l':
        plt.title('XY Gain Difference')
    if arg_2=='c':
        plt.title('LR Gain Difference')
    plt.grid(True)

    if arg_4==None:
        plt.subplot(212)
    else:
        arg_26 = plt.axes(arg_4,sharex=arg_25)
    if arg_2=='l':
        plt.plot(arg_11,arg_21,'b-',label='XX')
        plt.plot(arg_11,arg_23,'r-',label='YY')
    if arg_2=='c':
        plt.plot(arg_11,arg_21,'b-',label='LL')
        plt.plot(arg_11,arg_23,'r-',label='RR')
    plt.xlabel('Frequency (MHz)')
    plt.ylabel('Power (Counts)')
    if arg_5==True:
        plt.legend()


def Func(arg_0, arg_1: arg_2) -> Generator[int, None, None]:
        """Yield all the sub-span indices excluding self._span."""
        arg_3, arg_4 = arg_0._span
        arg_5 = arg_0._type_to_spans[arg_1]
        # Do not yield self._span by bisecting for s < ss.
        # The second bisect is an optimization and should be on [se + 1],
        # but empty spans are not desired thus [se] is used.
        arg_6 = bisect(arg_5, [arg_3])
        for arg_7 in arg_5[arg_6:bisect(arg_5, [arg_4], arg_6)]:
            if arg_7[1] <= arg_4:
                yield arg_7

Yield all the sub - span indices excluding self . _span .


def Func ( arg_0 ) : arg_1 = [ ] arg_2 = [ ] arg_3 = [ ] for arg_4 in iter ( arg_0 . _connections . values ( ) ) : if arg_4 . needs_input > 0 : arg_1 . append ( arg_4 ) if arg_4 . has_output > 0 : arg_2 . append ( arg_4 ) if arg_4 . deadline : heapq . heappush ( arg_3 , ( arg_4 . next_tick , arg_4 ) ) arg_5 = [ ] while arg_3 : arg_6 = heapq . heappop ( arg_3 ) arg_5 . append ( arg_6 [ 1 ] ) return ( arg_1 , arg_2 , arg_5 )

def Func(arg_0):
        """A utility to help determine which connections need
        processing. Returns a triple of lists containing those connections that
        0) need to read from the network, 1) need to write to the network, 2)
        waiting for pending timers to expire.  The timer list is sorted with
        the connection next expiring at index 0.
        """
        arg_1 = []
        arg_2 = []
        arg_3 = []
        for arg_4 in iter(arg_0._connections.values()):
            if arg_4.needs_input > 0:
                arg_1.append(arg_4)
            if arg_4.has_output > 0:
                arg_2.append(arg_4)
            if arg_4.deadline:
                heapq.heappush(arg_3, (arg_4.next_tick, arg_4))
        arg_5 = []
        while arg_3:
            arg_6 = heapq.heappop(arg_3)
            arg_5.append(arg_6[1])

        return (arg_1, arg_2, arg_5)

A utility to help determine which connections need processing . Returns a triple of lists containing those connections that 0 ) need to read from the network 1 ) need to write to the network 2 ) waiting for pending timers to expire . The timer list is sorted with the connection next expiring at index 0 .


def Func(arg_0, arg_1=None, arg_2=None):
        """
        Return tuple of compiler and compiler flags.

        Selects compiler and flags from machine description file, commandline arguments or call
        arguements.
        """
        if arg_0._args:
            arg_1 = arg_1 or arg_0._args.compiler
            arg_2 = arg_2 or arg_0._args.compiler_flags
        if arg_1 is None:
            # Select first available compiler in machine description file's compiler dict
            for arg_3 in arg_0['compiler'].keys():
                # Making sure compiler is available:
                if find_executable(arg_3) is not None:
                    arg_1 = arg_3
                    break
            else:
                raise RuntimeError("No compiler ({}) was found. Add different one in machine file, "
                                   "via --compiler argument or make sure it will be found in "
                                   "$PATH.".format(list(arg_0['compiler'].keys())))
        if arg_2 is None:
            # Select from machine description file
            arg_2 = arg_0['compiler'].get(arg_1, '')

        return arg_1, arg_2.split(' ')

Return tuple of compiler and compiler flags .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . _get_image ( arg_1 ) QtGui . QApplication . clipboard ( ) . setImage ( arg_2 )

def Func(arg_0, arg_1):
        """ Copies the ImageResource with 'name' to the clipboard.
        """
        arg_2 = arg_0._get_image(arg_1)
        QtGui.QApplication.clipboard().setImage(arg_2)

Copies the ImageResource with name to the clipboard .


return not self.is_out_of_image(image, fully=True, partly=True)

def Func ( arg_0 , arg_1 ) : return not arg_0 . is_out_of_image ( arg_1 , fully = True , partly = True )

def Func(arg_0, arg_1):
        """
        Estimate whether the polygon is fully inside the image area.

        Parameters
        ----------
        image : (H,W,...) ndarray or tuple of int
            Image dimensions to use.
            If an ndarray, its shape will be used.
            If a tuple, it is assumed to represent the image shape and must contain at least two integers.

        Returns
        -------
        bool
            True if the polygon is fully inside the image area.
            False otherwise.

        """
        return not arg_0.is_out_of_image(arg_1, fully=True, partly=True)

Estimate whether the polygon is fully inside the image area .


def Func(arg_0, arg_1=None):
    """Discover the proper class and return instance for a given Monero Func.

    :param addr: the Func as a string-like object
    :param label: a label for the Func (defaults to `None`)

    :rtype: :class:`Address`, :class:`SubAddress` or :class:`IntegratedAddress`
    """
    arg_0 = str(arg_0)
    if _ADDR_REGEX.match(arg_0):
        arg_2 = bytearray(unhexlify(base58.decode(arg_0)))[0]
        if arg_2 in Address._valid_netbytes:
            return Address(arg_0, arg_1=arg_1)
        elif arg_2 in SubAddress._valid_netbytes:
            return SubAddress(arg_0, arg_1=arg_1)
        raise ValueError("Invalid Func netbyte {nb:x}. Allowed values are: {allowed}".format(
            nb=arg_2,
            allowed=", ".join(map(
                lambda b: '%02x' % b,
                sorted(Address._valid_netbytes + SubAddress._valid_netbytes)))))
    elif _IADDR_REGEX.match(arg_0):
        return IntegratedAddress(arg_0)
    raise ValueError("Address must be either 95 or 106 characters long base58-encoded string, "
        "is {addr} ({len} chars length)".format(arg_0=arg_0, len=len(arg_0)))

Discover the proper class and return instance for a given Monero address.

    :param addr: the address as a string-like object
    :param label: a label for the address (defaults to `None`)

    :rtype: :class:`Address`, :class:`SubAddress` or :class:`IntegratedAddress`

Discover the proper class and return instance for a given Monero address .


(self, name=None, default_name=None, values=None)

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = None ) : with tf . compat . v1 . name_scope ( arg_0 . name ) : with tf . compat . v1 . name_scope ( arg_1 , arg_2 , arg_3 = arg_3 or [ ] ) as scope : yield scope

def Func(arg_0, arg_1=None, arg_2=None, arg_3=None):
    """Helper function to standardize op scope."""
    with tf.compat.v1.name_scope(arg_0.name):
      with tf.compat.v1.name_scope(
          arg_1, arg_2, arg_3=arg_3 or []) as scope:
        yield scope

Helper function to standardize op scope .


def Func ( arg_0 , arg_1 ) : if None in arg_0 . files : arg_2 = arg_0 . files . index ( None ) arg_0 . files [ arg_2 ] = arg_1 else : arg_2 = len ( arg_0 . files ) arg_0 . files . append ( arg_1 ) return arg_2

def Func(arg_0, arg_1):
        """
        Adds a file descriptor to the current file descriptor list

        :rtype: int
        :param f: the file descriptor to add.
        :return: the index of the file descriptor in the file descr. list
        """
        if None in arg_0.files:
            arg_2 = arg_0.files.index(None)
            arg_0.files[arg_2] = arg_1
        else:
            arg_2 = len(arg_0.files)
            arg_0.files.append(arg_1)
        return arg_2


def Func ( arg_0 ) : if Real is float : return list ( arg_0 . intersections . keys ( ) ) else : return [ ( float ( arg_1 [ 0 ] ) , float ( arg_1 [ 1 ] ) ) for arg_1 in arg_0 . intersections . keys ( ) ]

def Func(arg_0):
        """
        Return a list of unordered intersection points.
        """
        if Real is float:
            return list(arg_0.intersections.keys())
        else:
            return [(float(arg_1[0]), float(arg_1[1])) for arg_1 in arg_0.intersections.keys()]

Return a list of unordered intersection points .


def
Func
(
arg_0
,
arg_1
=
''
)
:
from
ubelt
import
util_cmd
import
re
arg_2
=
'cmd /S /C "{}"'
arg_3
=
'dir /-C "{}"{}'
.
format
(
arg_0
,
arg_1
)
arg_4
=
arg_2
.
format
(
arg_3
)
arg_5
=
util_cmd
.
cmd
(
arg_4
,
shell
=
True
)
if
arg_5
[
'ret'
]
!=
0
:
from
ubelt
import
util_format
print
(
'Failed command:'
)
print
(
arg_5
[
'command'
]
)
print
(
util_format
.
repr2
(
arg_5
,
nl
=
1
)
)
raise
OSError
(
str
(
arg_5
)
)
arg_6
=
arg_5
[
'out'
]
.
split
(
'\n'
)
[
5
:
3
]
arg_7
=
re
.
compile
(
'( +)'
)
for
arg_8
in
arg_6
:
arg_9
=
arg_7
.
split
(
arg_8
)
arg_10
,
arg_11
,
arg_12
,
arg_11
,
arg_13
,
arg_11
,
arg_14
,
arg_11
=
arg_9
[
:
8
]
arg_15
=
''
.
join
(
arg_9
[
8
:
]
)
if
arg_15
==
'.'
or
arg_15
==
'..'
:
continue
if
arg_14
in
[
'<JUNCTION>'
,
'<SYMLINKD>'
,
'<SYMLINK>'
]
:
arg_16
=
arg_15
.
find
(
':'
)
arg_17
=
arg_15
[
:
arg_16
]
.
rfind
(
'['
)
arg_15
=
arg_15
[
:
arg_17
1
]
arg_18
=
arg_15
[
arg_17
+
1
:
1
]
yield
arg_14
,
arg_15
,
arg_18
else
:
yield
arg_14
,
arg_15
,

def Func(arg_0, arg_1=''):
    """
    Using the windows cmd shell to get information about a directory
    """
    from ubelt import util_cmd
    import re
    arg_2 = 'cmd /S /C "{}"'  # the /S will preserve all inner quotes
    arg_3 = 'dir /-C "{}"{}'.format(arg_0, arg_1)
    arg_4 = arg_2.format(arg_3)
    arg_5 = util_cmd.cmd(arg_4, shell=True)
    if arg_5['ret'] != 0:
        from ubelt import util_format
        print('Failed command:')
        print(arg_5['command'])
        print(util_format.repr2(arg_5, nl=1))
        raise OSError(str(arg_5))
    # parse the output of dir to get some info
    # Remove header and footer
    arg_6 = arg_5['out'].split('\n')[5:-3]
    arg_7 = re.compile('( +)')
    for arg_8 in arg_6:
        arg_9 = arg_7.split(arg_8)
        arg_10, arg_11, arg_12, arg_11, arg_13, arg_11, arg_14, arg_11 = arg_9[:8]
        arg_15 = ''.join(arg_9[8:])
        # if type is a junction then name will also contain the linked loc
        if arg_15 == '.' or arg_15 == '..':
            continue
        if arg_14 in ['<JUNCTION>', '<SYMLINKD>', '<SYMLINK>']:
            # colons cannot be in path names, so use that to find where
            # the name ends
            arg_16 = arg_15.find(':')
            arg_17 = arg_15[:arg_16].rfind('[')
            arg_15 = arg_15[:arg_17 - 1]
            arg_18 = arg_15[arg_17 + 1:-1]
            yield arg_14, arg_15, arg_18
        else:
            yield arg_14, arg_15, None


def Func ( arg_0 , arg_1 ) : for arg_2 , arg_3 in iitems ( arg_1 ) : arg_0 . lines . setdefault ( arg_2 , { } ) . update ( arg_3 )

def Func(arg_0, arg_1):
        """Add executed line data.

        `line_data` is { filename: { lineno: None, ... }, ...}

        """
        for arg_2, arg_3 in iitems(arg_1):
            arg_0.lines.setdefault(arg_2, {}).update(arg_3)


def Func ( arg_0 , arg_1 ) : arg_2 = [ ] for arg_3 , arg_4 in zip ( arg_0 , arg_1 ) : arg_2 . append ( int ( ceil ( 1.0 * arg_4 / arg_3 ) ) ) return arg_2

def Func(arg_0, arg_1):
        """
        Obtain number of chunks for the given dimensions and chunk sizes.

        Given a plan for the number of chunks along each dimension,
        calculate the number of chunks that this will lead to.

        Parameters
        ----------
        plan: tuple or array-like
            Size of chunks (in number of elements) along each dimensions.
            Length must be equal to the number of dimensions.

        shape : tuple
             Shape of array to be chunked.
        """
        arg_2 = []
        for arg_3, arg_4 in zip(arg_0, arg_1):
            arg_2.append(int(ceil(1.0 * arg_4/arg_3)))
        return arg_2

Obtain number of chunks for the given dimensions and chunk sizes .


def Func(arg_0):
        """Read and return the dataset contents as a pandas DataFrame."""
        #TODO: figure out why passing in the opened stream directly gives invalid data
        arg_1 = arg_0.read_as_binary()
        arg_2 = BytesIO(arg_1)
        return deserialize_dataframe(arg_2, arg_0.data_type_id)

Read and return the dataset contents as a pandas DataFrame .


def Func ( arg_0 , arg_1 ) : arg_2 = re . match ( six . text_type ( '(?P<note>[A-G][b#]*)(?P<mod>.*)' ) , six . text_type ( arg_0 ) ) if not arg_2 : return arg_0 arg_3 = arg_2 . group ( 'note' ) arg_4 = librosa . midi_to_note ( librosa . note_to_midi ( arg_3 ) + arg_1 , octave = False ) return arg_4 + arg_2 . group ( 'mod' )

def Func(arg_0, arg_1):
    '''Transpose a chord label by some number of semitones

    Parameters
    ----------
    label : str
        A chord string

    n_semitones : float
        The number of semitones to move `label`

    Returns
    -------
    label_Func : str
        The Funcd chord label

    '''

    # Otherwise, split off the note from the modifier
    arg_2 = re.match(six.text_type('(?P<note>[A-G][b#]*)(?P<mod>.*)'),
                     six.text_type(arg_0))

    if not arg_2:
        return arg_0

    arg_3 = arg_2.group('note')

    arg_4 = librosa.midi_to_note(librosa.note_to_midi(arg_3) + arg_1,
                                    octave=False)

    return arg_4 + arg_2.group('mod')

Transpose a chord label by some number of semitones

    Parameters
    ----------
    label : str
        A chord string

    n_semitones : float
        The number of semitones to move `label`

    Returns
    -------
    label_transpose : str
        The transposed chord label


def Func(arg_0, arg_1, arg_2=None):
        """
        Build a trainer and run main_loop.

        Parameters
        ----------
        X : array_like
            Training examples.
        y : array_like, optional
            Labels.
        """
        from pylearn2.config import yaml_parse
        from pylearn2.train import Train

        # build trainer
        arg_3 = arg_0.get_params()
        arg_4 = Template(arg_0.yaml_string).substitute(arg_3)
        arg_0.trainer = yaml_parse.load(arg_4)
        assert isinstance(arg_0.trainer, Train)
        if arg_0.trainer.dataset is not None:
            raise ValueError('Train YAML database must evaluate to None.')
        arg_0.trainer.dataset = arg_0._get_dataset(arg_1, arg_2)

        # update monitoring dataset(s)
        if (hasattr(arg_0.trainer.algorithm, 'monitoring_dataset') and
                arg_0.trainer.algorithm.monitoring_dataset is not None):
            arg_7 = arg_0.trainer.algorithm.monitoring_dataset
            if len(arg_7) == 1 and '' in arg_7:
                arg_7[''] = arg_0.trainer.dataset
            else:
                arg_7['train'] = arg_0.trainer.dataset
            arg_0.trainer.algorithm._set_monitoring_dataset(arg_7)
        else:
            arg_0.trainer.algorithm._set_monitoring_dataset(
                arg_0.trainer.dataset)

        # run main loop
        arg_0.trainer.main_loop()


def
Func
(
arg_0
)
:
if
not
isinstance
(
arg_0
,
six
.
string_types
)
:
raise
ValueError
(
"The attribute name must be a string."
)
for
arg_1
in
attribute_name_tag_table
:
if
arg_0
==
arg_1
[
0
]
:
return
arg_1
[
1
]
raise
ValueError
(
"Unrecognized attribute name: '{}'"
.
format
(
arg_0
)
)

def Func(arg_0):
    """
    A utility function that converts an attribute name string into the
    corresponding attribute tag.

    For example: 'State' -> enums.Tags.STATE

    Args:
        value (string): The string name of the attribute.

    Returns:
        enum: The Tags enumeration value that corresponds to the attribute
            name string.

    Raises:
        ValueError: if the attribute name string is not a string or if it is
            an unrecognized attribute name
    """
    if not isinstance(arg_0, six.string_types):
        raise ValueError("The attribute name must be a string.")

    for arg_1 in attribute_name_tag_table:
        if arg_0 == arg_1[0]:
            return arg_1[1]

    raise ValueError("Unrecognized attribute name: '{}'".format(arg_0))

A utility function that converts an attribute name string into the corresponding attribute tag .


def Func ( arg_0 , arg_1 , arg_2 ) : if arg_0 . has_package ( arg_1 ) and arg_0 . has_file ( arg_1 ) : if not arg_0 . file_copytext_set : arg_0 . file_copytext_set = True if validations . validate_file_cpyright ( arg_2 ) : if isinstance ( arg_2 , string_types ) : arg_0 . file ( arg_1 ) . copyright = str_from_text ( arg_2 ) else : arg_0 . file ( arg_1 ) . copyright = arg_2 return True else : raise SPDXValueError ( 'File::CopyRight' ) else : raise CardinalityError ( 'File::CopyRight' ) else : raise OrderError ( 'File::CopyRight' )

def Func(arg_0, arg_1, arg_2):
        """Raises OrderError if no package or file defined.
        Raises SPDXValueError if not free form text or NONE or NO_ASSERT.
        Raises CardinalityError if more than one.
        """
        if arg_0.has_package(arg_1) and arg_0.has_file(arg_1):
            if not arg_0.file_copytext_set:
                arg_0.file_copytext_set = True
                if validations.validate_file_cpyright(arg_2):
                    if isinstance(arg_2, string_types):
                        arg_0.file(arg_1).copyright = str_from_text(arg_2)
                    else:
                        arg_0.file(arg_1).copyright = arg_2  # None or NoAssert
                    return True
                else:
                    raise SPDXValueError('File::CopyRight')
            else:
                raise CardinalityError('File::CopyRight')
        else:
            raise OrderError('File::CopyRight')

Raises OrderError if no package or file defined . Raises SPDXValueError if not free form text or NONE or NO_ASSERT . Raises CardinalityError if more than one .


def Func(arg_0, arg_1, arg_2):
        """Save word to storage"""
        arg_3 = arg_0.address
        arg_0._publish('will_evm_write_storage', arg_3, arg_1, arg_2)
        #refund = Operators.ITEBV(256,
        #                         previous_value != 0,
        #                         Operators.ITEBV(256, value != 0, 0, GSTORAGEREFUND),
        #                         0)

        if istainted(arg_0.pc):
            for arg_4 in get_taints(arg_0.pc):
                arg_2 = taint_with(arg_2, arg_4)
        arg_0.world.set_storage_data(arg_3, arg_1, arg_2)
        arg_0._publish('did_evm_write_storage', arg_3, arg_1, arg_2)


(cls, enterprise_customer, manage_learners_form, request, email_list=None)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4=None):
        """
        Bulk link users by email.

        Arguments:
            enterprise_customer (EnterpriseCustomer): learners will be linked to this Enterprise Customer instance
            manage_learners_form (ManageLearnersForm): bound ManageLearners form instance
            request (django.http.request.HttpRequest): HTTP Request instance
            email_list (iterable): A list of pre-processed email addresses to handle using the form
        """
        arg_5 = []
        arg_6 = set()
        arg_7 = []
        arg_8 = []
        arg_9 = arg_2.cleaned_data[ManageLearnersForm.Fields.BULK_UPLOAD]
        if arg_4:
            arg_10 = [{ManageLearnersForm.CsvColumns.EMAIL: arg_13} for arg_13 in arg_4]
        else:
            arg_10 = parse_csv(arg_9, expected_columns={ManageLearnersForm.CsvColumns.EMAIL})

        try:
            for arg_11, arg_12 in enumerate(arg_10):
                arg_13 = arg_12[ManageLearnersForm.CsvColumns.EMAIL]
                try:
                    arg_14 = validate_email_to_link(arg_13, ignore_existing=True)
                except ValidationError as exc:
                    arg_15 = _("Error at line {line}: {message}\n").format(line=arg_11 + 1, arg_15=exc)
                    arg_5.append(arg_15)
                else:
                    if arg_14:
                        arg_7.append((arg_13, arg_14.enterprise_customer))
                    elif arg_13 in arg_6:
                        arg_8.append(arg_13)
                    else:
                        arg_6.add(arg_13)
        except ValidationError as exc:
            arg_5.append(exc)

        if arg_5:
            arg_2.add_error(
                ManageLearnersForm.Fields.GENERAL_ERRORS, ValidationMessages.BULK_LINK_FAILED
            )
            for arg_16 in arg_5:
                arg_2.add_error(ManageLearnersForm.Fields.BULK_UPLOAD, arg_16)
            return

        # There were no errors. Now do the actual linking:
        for arg_13 in arg_6:
            EnterpriseCustomerUser.objects.link_user(arg_1, arg_13)

        # Report what happened:
        arg_17 = len(arg_6)
        messages.success(arg_3, ungettext(
            "{count} new learner was added to {enterprise_customer_name}.",
            "{count} new learners were added to {enterprise_customer_name}.",
            arg_17
        ).format(arg_17=arg_17, enterprise_customer_name=arg_1.name))
        arg_18 = [
            arg_13 for arg_13, customer in arg_7 if customer == arg_1
        ]
        arg_19 = [
            arg_13 for arg_13, __ in arg_7 if arg_13 not in arg_18
        ]
        if arg_18:
            messages.warning(
                arg_3,
                _(
                    "The following learners were already associated with this Enterprise "
                    "Customer: {list_of_emails}"
                ).format(
                    list_of_emails=", ".join(arg_18)
                )
            )
        if arg_19:
            messages.warning(
                arg_3,
                _(
                    "The following learners are already associated with "
                    "another Enterprise Customer. These learners were not "
                    "added to {enterprise_customer_name}: {list_of_emails}"
                ).format(
                    enterprise_customer_name=arg_1.name,
                    list_of_emails=", ".join(arg_19),
                )
            )
        if arg_8:
            messages.warning(
                arg_3,
                _(
                    "The following duplicate email addresses were not added: "
                    "{list_of_emails}"
                ).format(
                    list_of_emails=", ".join(arg_8)
                )
            )
        # Build a list of all the emails that we can act on further; that is,
        # emails that we either linked to this customer, or that were linked already.
        arg_20 = list(arg_6) + arg_18

        return arg_20


def
Func
(
arg_0
,
arg_1
)
:
if
(
arg_1
<
0
)
or
(
arg_1
>=
arg_0
.
_numPatterns
)
:
raise
RuntimeError
(
"index out of bounds"
)
arg_2
=
arg_0
.
_partitionIdList
[
arg_1
]
if
arg_2
==
numpy
.
inf
:
return
else
:
return
arg_2

def Func(arg_0, arg_1):
    """
    Gets the partition id given an index.

    :param i: index of partition
    :returns: the partition id associated with pattern i. Returns None if no id
        is associated with it.
    """
    if (arg_1 < 0) or (arg_1 >= arg_0._numPatterns):
      raise RuntimeError("index out of bounds")
    arg_2 = arg_0._partitionIdList[arg_1]
    if arg_2 == numpy.inf:
      return None
    else:
      return arg_2


def Func(arg_0):
    """Delete experiment group.

    Uses [Caching](/references/polyaxon-cli/#caching)
    """
    arg_1, arg_2, arg_3 = get_project_group_or_local(arg_0.obj.get('project'),
                                                            arg_0.obj.get('group'))

    if not click.confirm("Are sure you want to Func experiment group `{}`".format(arg_3)):
        click.echo('Existing without deleting experiment group.')
        sys.exit(0)

    try:
        arg_4 = PolyaxonClient().experiment_group.Func_experiment_group(
            arg_1, arg_2, arg_3)
        # Purge caching
        GroupManager.purge()
    except (PolyaxonHTTPError, PolyaxonShouldExitError, PolyaxonClientException) as e:
        Printer.print_error('Could not Func experiment group `{}`.'.format(arg_3))
        Printer.print_error('Error message `{}`.'.format(e))
        sys.exit(1)

    if arg_4.status_code == 204:
        Printer.print_success("Experiment group `{}` was Func successfully".format(arg_3))


def Func ( arg_0 , arg_1 = None ) : arg_2 = arg_0 . cacher . tryload ( arg_1 = arg_1 ) return arg_2

def Func(arg_0, arg_1=None):
        """
        Returns the stamp certificate if it exists
        """
        arg_2 = arg_0.cacher.tryload(arg_1=arg_1)
        return arg_2


(data, adj_matrix, gpu=None, gpu_id=0, **kwargs)

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = 0 , ** arg_4 ) : arg_2 = SETTINGS . get_default ( arg_2 = arg_2 ) arg_5 = 'cuda:{}' . format ( arg_3 ) if arg_2 else 'cpu' arg_6 = th . FloatTensor ( arg_0 ) . to ( arg_5 ) arg_7 = CGNN_model ( arg_1 , arg_0 . shape [ 0 ] , arg_3 = arg_3 , ** arg_4 ) . to ( arg_5 ) arg_7 . reset_parameters ( ) return arg_7 . run ( arg_6 , ** arg_4 )

def Func(arg_0, arg_1, arg_2=None, arg_3=0, **arg_4):
    """Evaluate a graph taking account of the hardware."""
    arg_2 = SETTINGS.get_default(arg_2=arg_2)
    arg_5 = 'cuda:{}'.format(arg_3) if arg_2 else 'cpu'
    arg_6 = th.FloatTensor(arg_0).to(arg_5)
    arg_7 = CGNN_model(arg_1, arg_0.shape[0], arg_3=arg_3, **arg_4).to(arg_5)
    arg_7.reset_parameters()
    return arg_7.run(arg_6, **arg_4)

Evaluate a graph taking account of the hardware .


def Func ( arg_0 , arg_1 = None ) : try : return dict ( site . each_context ( arg_1 ) . items ( ) + arg_0 . items ( ) ) except AttributeError : return arg_0

def Func(arg_0, arg_1=None):
    """
    Add admin global context, for compatibility with Django 1.7
    """
    try:
        return dict(site.each_context(arg_1).items() + arg_0.items())
    except AttributeError:
        return arg_0

Add admin global context for compatibility with Django 1 . 7


def Func ( arg_0 , arg_1 , arg_2 ) : if arg_0 . authentication : arg_3 = arg_0 . authentication . get_user ( ) arg_1 . update ( { 'auth' : arg_3 . firebase_auth_token } ) arg_2 . update ( arg_0 . authentication . authenticator . HEADERS )

def Func(arg_0, arg_1, arg_2):
        """
        Method that simply adjusts authentication credentials for the
        request.
        `params` is the querystring of the request.
        `headers` is the header of the request.

        If auth instance is not provided to this class, this method simply
        returns without doing anything.
        """
        if arg_0.authentication:
            arg_3 = arg_0.authentication.get_user()
            arg_1.update({'auth': arg_3.firebase_auth_token})
            arg_2.update(arg_0.authentication.authenticator.HEADERS)

Method that simply adjusts authentication credentials for the request . params is the querystring of the request . headers is the header of the request .


return self.request("raft", "configuration", params=params, method="get").json()

def Func ( arg_0 , arg_1 = False ) : arg_2 = { "stale" : arg_1 } return arg_0 . request ( "raft" , "configuration" , arg_2 = arg_2 , method = "get" ) . json ( )

def Func(arg_0, arg_1=False):
        """ Query the status of a client node registered with Nomad.

            https://www.nomadproject.io/docs/http/operator.html

            returns: dict
            optional arguments:
              - stale, (defaults to False), Specifies if the cluster should respond without an active leader.
                                            This is specified as a querystring parameter.
            raises:
              - nomad.api.exceptions.BaseNomadException
              - nomad.api.exceptions.URLNotFoundNomadException
        """

        arg_2 = {"stale": arg_1}
        return arg_0.request("raft", "configuration", arg_2=arg_2, method="get").json()

Query the status of a client node registered with Nomad .


(array, wordWidth, start, end,
                       reinterpretElmToType=None)

def Func(arg_0, arg_1, arg_2, arg_3,
                       arg_4=None):
    """
    Gets value of bits between selected range from memory

    :param start: bit address of start of bit of bits
    :param end: bit address of first bit behind bits
    :return: instance of BitsVal (derived from SimBits type) which contains
        copy of selected bits
    """
    arg_5 = 0
    arg_6 = Bits(arg_3 - arg_2, None).fromPy(None)

    while arg_2 != arg_3:
        assert arg_2 < arg_3, (arg_2, arg_3)

        arg_7 = arg_2 // arg_1

        arg_8 = arg_0[arg_7]
        if arg_4 is not None:
            arg_8 = arg_8._reinterpret_cast(arg_4)

        arg_9 = (arg_7 + 1) * arg_1
        arg_10 = min(arg_3, arg_9) - arg_2
        arg_11 = arg_2 % arg_1

        arg_12 = selectBitRange(arg_8.val, arg_11, arg_10)
        arg_13 = selectBitRange(arg_8.vldMask, arg_11, arg_10)
        arg_14 = arg_8.updateTime

        arg_15 = mask(arg_10)
        arg_6.val |= (arg_12 & arg_15) << arg_5
        arg_6.vldMask |= (arg_13 & arg_15) << arg_5
        arg_6.updateMask = max(arg_6.updateTime, arg_14)

        arg_5 += arg_10
        arg_2 += arg_10

    return arg_6


def Func(arg_0, arg_1, arg_2):
    """
    Equation B.8 in Clauset

    Given a data set, an xmin value, and an alpha "scaling parameter", computes
    the log-likelihood (the value to be maximized)
    """
    if not scipyOK:
        raise ImportError("Can't import scipy.  Need scipy for zeta function.")
    from scipy.special import arg_6 as arg_6

    arg_3 = arg_0[arg_0>=arg_1]
    arg_4 = len(arg_3)

    arg_5 = np.log(arg_3).sum()

    arg_6 = arg_6(arg_2, arg_1)

    arg_7 = -1*arg_4*log(arg_6) - arg_2 * arg_5

    return arg_7


def Func(arg_0, arg_1):
        """
        Validate the provided reset key.

        Returns:
            The validated key.

        Raises:
            serializers.ValidationError:
                If the provided key does not exist.
        """
        if not models.PasswordResetToken.valid_tokens.filter(arg_1=arg_1).exists():
            raise serializers.ValidationError(
                _("The provided reset token does not exist, or is expired.")
            )

        return arg_1


def Func ( arg_0 , arg_1 = False ) : arg_2 = None arg_3 = False for arg_4 in arg_0 : if _IS_UCS2 and ( _SURROGATE_MIN <= ord ( arg_4 ) <= _SURROGATE_MAX ) : arg_3 = arg_4 continue elif arg_3 : arg_4 = arg_3 + arg_4 arg_3 = False if arg_1 and arg_4 . isupper ( ) : arg_2 = 1 break arg_5 = bidirectional ( arg_4 ) if arg_5 in ( 'AL' , 'R' ) : arg_2 = 1 break elif arg_5 == 'L' : arg_2 = 0 break if arg_2 is None : arg_2 = 0 return arg_2

def Func(arg_0, arg_1=False):
    """Get the paragraph base embedding level. Returns 0 for LTR,
    1 for RTL.

    `text` a unicode object.

    Set `upper_is_rtl` to True to treat upper case chars as strong 'R'
    for debugging (default: False).

    """

    arg_2 = None

    arg_3 = False
    # P2
    for arg_4 in arg_0:
        # surrogate in case of ucs2
        if _IS_UCS2 and (_SURROGATE_MIN <= ord(arg_4) <= _SURROGATE_MAX):
            arg_3 = arg_4
            continue
        elif arg_3:
            arg_4 = arg_3 + arg_4
            arg_3 = False

        # treat upper as RTL ?
        if arg_1 and arg_4.isupper():
            arg_2 = 1
            break

        arg_5 = bidirectional(arg_4)

        if arg_5 in ('AL', 'R'):
            arg_2 = 1
            break

        elif arg_5 == 'L':
            arg_2 = 0
            break

    # P3
    if arg_2 is None:
        arg_2 = 0

    return arg_2

Get the paragraph base embedding level . Returns 0 for LTR 1 for RTL .