def Func ( arg_0 , arg_1 , arg_2 ) : return arg_0 . _getAnomalyClassifier ( ) . getSelf ( ) . getLabels ( arg_1 , arg_2 )

def Func(arg_0, arg_1, arg_2):
    """
    Get labels from the anomaly classifier within this model.

    :param start: (int) index to start getting labels
    :param end: (int) index to end getting labels
    """
    return arg_0._getAnomalyClassifier().getSelf().getLabels(arg_1, arg_2)

Get labels from the anomaly classifier within this model .


def Func(*arg_0):
    """
    Swift annotation for adding function to process Func notification.

    if event_type include wildcard, will put {pattern: function} into process_wildcard dict
    else will put {event_type: function} into process dict

    :param arg: event_type of notification
    """
    check_event_type(Openstack.Swift, *arg_0)
    arg_1 = arg_0[0]

    def decorator(arg_2):
        if arg_1.find("*") != -1:
            arg_3 = pre_compile(arg_1)
            arg_4[arg_3] = arg_2
        else:
            arg_5[arg_1] = arg_2
        log.info("add function {0} to process event_type:{1}".format(arg_2.__name__, arg_1))

        @functools.wraps(arg_2)
        def wrapper(*arg_6, **arg_7):
            arg_2(*arg_6, **arg_7)

        return wrapper

    return decorator

Swift annotation for adding function to process swift notification.

    if event_type include wildcard, will put {pattern: function} into process_wildcard dict
    else will put {event_type: function} into process dict

    :param arg: event_type of notification

Swift annotation for adding function to process swift notification .


def
Func
(
)
:
arg_0
=
[
x
for
x
in
options
.
setup
.
packages
if
'.'
not
in
x
]
sh
(
'Func {param} {files}'
.
format
(
param
=
options
.
paved
.
pycheck
.
Func
.
param
,
files
=
' '
.
join
(
arg_0
)
)
)

def Func():
    '''passive check of python programs by Func.

    requirements:
     - Func_ should be installed. ``easy_install Func``

    options.paved.pycheck.Func.param

    .. _Func: http://pypi.python.org/pypi/Func
    '''

    # filter out  subpackages
    arg_0 = [x for x in options.setup.packages if '.' not in x]

    sh('Func {param} {files}'.format(param=options.paved.pycheck.Func.param, files=' '.join(arg_0)))

passive check of python programs by pyflakes.

    requirements:
     - pyflakes_ should be installed. ``easy_install pyflakes``

    options.paved.pycheck.pyflakes.param

    .. _pyflakes: http://pypi.python.org/pypi/pyflakes

passive check of python programs by pyflakes .


return request.user.is_authenticated and request.user.is_active and request.user.is_staff

def Func ( arg_0 , arg_1 ) : return arg_1 . user . is_authenticated and arg_1 . user . is_active and arg_1 . user . is_staff

def Func(arg_0, arg_1):
        """ Can add this object """
        return arg_1.user.is_authenticated and arg_1.user.is_active and arg_1.user.is_staff


return QuerysetReport(
        "Credit note refunds",
        ["id", "creditnoterefund__reference", "amount"],
        notes_refunded,
        link_view=views.credit_note,
    )

def
Func
(
)
:
arg_0
=
commerce
.
CreditNote
.
refunded
(
)
return
QuerysetReport
(
"Credit note refunds"
,
[
"id"
,
"creditnoterefund__reference"
,
"amount"
]
,
arg_0
,
link_view
=
views
.
credit_note
,
)

def Func():
    ''' Shows all of the credit notes that have been generated. '''
    arg_0 = commerce.CreditNote.refunded()
    return QuerysetReport(
        "Credit note refunds",
        ["id", "creditnoterefund__reference", "amount"],
        arg_0,
        link_view=views.credit_note,
    )

Shows all of the credit notes that have been generated .


return '/'.join(chain((self.endpoint,), map(str, args)))

def Func ( arg_0 , * arg_1 ) : return '/' . join ( chain ( ( arg_0 . endpoint , ) , map ( str , arg_1 ) ) )

def Func(arg_0, *arg_1):
        """
        Build path with endpoint and args

        :param args: Tokens in the endpoint URL
        :type args: :py:class:`unicode`
        """
        return '/'.join(chain((arg_0.endpoint,), map(str, arg_1)))


def Func(arg_0, arg_1, arg_2, arg_3):
        "Assign var, and keep track of conflicts."
        arg_4 = arg_3.get(arg_1, None)
        if arg_2 != arg_4:
            if arg_4 is not None: # Remove old val if there was one
                arg_0.record_conflict(arg_3, arg_1, arg_4, -1)
            arg_0.record_conflict(arg_3, arg_1, arg_2, +1)
            CSP.Func(arg_0, arg_1, arg_2, arg_3)

Assign var and keep track of conflicts .


return tf.cast(
      tf.reduce_prod(input_tensor=tf.gather(tf.shape(input=x), axis)), x.dtype)

def Func ( arg_0 , arg_1 = None ) : if arg_1 is None : return tf . cast ( tf . size ( input = arg_0 ) , arg_0 . dtype ) return tf . cast ( tf . reduce_prod ( input_tensor = tf . gather ( tf . shape ( input = arg_0 ) , arg_1 ) ) , arg_0 . dtype )

def Func(arg_0, arg_1=None):
  """Get number of elements of `x` in `axis`, as type `x.dtype`."""
  if arg_1 is None:
    return tf.cast(tf.size(input=arg_0), arg_0.dtype)
  return tf.cast(
      tf.reduce_prod(input_tensor=tf.gather(tf.shape(input=arg_0), arg_1)), arg_0.dtype)

Get number of elements of x in axis as type x . dtype .


def Func ( arg_0 ) : arg_1 = { "name" : arg_0 . name , "ip_address" : arg_0 . ip_address , } arg_2 = arg_0 . get_data ( "domains" , type = POST , params = arg_1 ) return arg_2

def Func(arg_0):
        """
            Create new doamin
        """
        # URL https://api.digitalocean.com/v2/domains
        arg_1 = {
            "name": arg_0.name,
            "ip_address": arg_0.ip_address,
        }

        arg_2 = arg_0.get_data("domains", type=POST, params=arg_1)
        return arg_2


(self, window_name, object_name, row_index,
                               column_index, row_text)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 ) : try : arg_6 = getcellvalue ( arg_1 , arg_2 , arg_3 , arg_4 ) if re . searchmatch ( arg_5 , arg_6 ) : return 1 except LdtpServerException : pass return 0

def Func(arg_0, arg_1, arg_2, arg_3,
                               arg_4, arg_5):
        """
        Verify partial table cell value

        @param window_name: Window name to type in, either full name,
        LDTP's name convention, or a Unix glob.
        @type window_name: string
        @param object_name: Object name to type in, either full name,
        LDTP's name convention, or a Unix glob.
        @type object_name: string
        @param row_index: Row index to get
        @type row_index: integer
        @param column_index: Column index to get, default value 0
        @type column_index: integer
        @param row_text: Row text to match
        @type string

        @return: 1 on success 0 on failure.
        @rtype: integer
        """
        try:
            arg_6 = getcellvalue(arg_1, arg_2, arg_3, arg_4)
            if re.searchmatch(arg_5, arg_6):
                return 1
        except LdtpServerException:
            pass
        return 0


def Func():
    """Return a random taxation ID number for a natural person."""
    arg_0 = [7, 2, 4, 10, 3, 5, 9, 4, 6, 8]
    arg_1 = [3, 7, 2, 4, 10, 3, 5, 9, 4, 6, 8]
    arg_2 = [random.randint(1, 9) for _ in range(12)]

    # get the 11th digit of the INN
    arg_3 = [v * arg_0[i] for i, v in enumerate(arg_2[:-2])]
    arg_2[10] = sum(arg_3) % 11 % 10

    # get the 12th digit of the INN
    arg_4 = [v * arg_1[i] for i, v in enumerate(arg_2[:-1])]
    arg_2[11] = sum(arg_4) % 11 % 10

    return "".join(map(str, arg_2))

Return a random taxation ID number for a natural person .


def Func(arg_0, arg_1, arg_2):
        """Check for overlapping ranges."""
        def _contains(arg_3, arg_4):
            return (arg_3 >= arg_4[0] and
                    arg_3 <= arg_4[1])

        def _is_overlap(arg_4, arg_5):
            return (_contains(arg_4[0], arg_5) or
                    _contains(arg_4[1], arg_5) or
                    _contains(arg_5[0], arg_4) or
                    _contains(arg_5[1], arg_4))

        for arg_6 in arg_2:
            if _is_overlap(arg_1, arg_6):
                return True
        return False


def Func(arg_0):
        """
        Get trip counts per day between the start and end day of the feed.

        Returns
        -------
        trip_counts : pandas.DataFrame
            Has columns "date_str" (dtype str) "trip_counts" (dtype int)
        """
        arg_1 = "SELECT date, count(*) AS number_of_trips FROM day_trips GROUP BY date"
        # this yields the actual data
        arg_2 = pd.read_sql_query(arg_1, arg_0.conn, index_col="date")
        # the rest is simply code for filling out "gaps" in the time span
        # (necessary for some visualizations)
        arg_3 = arg_2.index.max()
        arg_4 = arg_2.index.min()
        arg_5 = datetime.datetime.strptime(arg_4, '%Y-%m-%d')
        arg_6 = datetime.datetime.strptime(arg_3, '%Y-%m-%d')
        arg_7 = (arg_6 - arg_5).days
        arg_8 = [arg_5 + datetime.timedelta(days=x) for x in range(arg_7 + 1)]
        arg_9 = []
        arg_10 = []
        for arg_11 in arg_8:
            arg_12 = arg_11.strftime("%Y-%m-%d")
            arg_10.append(arg_12)
            try:
                arg_13 = arg_2.loc[arg_12, 'number_of_trips']
            except KeyError:
                # set value to 0 if dsut is not present, i.e. when no trips
                # take place on that day
                arg_13 = 0
            arg_9.append(arg_13)
        # check that all date_strings are included (move this to tests?)
        for arg_12 in arg_2.index:
            assert arg_12 in arg_10
        arg_14 = {"date": arg_8, "date_str": arg_10, "trip_counts": arg_9}
        return pd.DataFrame(arg_14)

Get trip counts per day between the start and end day of the feed .


def Func ( arg_0 ) : def wrapper ( arg_1 , * arg_2 , ** arg_3 ) : if arg_1 . last_updated + timedelta ( minutes = 5 ) < zulu . now ( ) : arg_1 . refresh ( ) return arg_0 ( arg_1 , * arg_2 , ** arg_3 ) return wrapper

def Func(arg_0):
    """Decorator for Backend that ensures rates are fresh within last 5 mins"""
    def wrapper(arg_1, *arg_2, **arg_3):
        if arg_1.last_updated + timedelta(minutes=5) < zulu.now():
            arg_1.refresh()
        return arg_0(arg_1, *arg_2, **arg_3)
    return wrapper


def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = None ) : arg_0 . X = arg_1 arg_0 . y = arg_2 arg_0 . sentences = arg_3

def Func(arg_0, arg_1=None, arg_2=None, arg_3=None):
        """
        Add Func to flow

        """
        arg_0.X = arg_1
        arg_0.y = arg_2
        arg_0.sentences = arg_3


def Func(arg_0):
  """Generator that yields a task-specific view of the job.

  This generator exists to make it easy for callers to iterate over the tasks
  in a JobDescriptor. Each pass yields a new JobDescriptor with a single task.

  Args:
    job_descriptor: A JobDescriptor with 1 or more tasks.

  Yields:
    A JobDescriptor with a single task.
  """
  for arg_1 in arg_0.task_descriptors:
    arg_2 = JobDescriptor(arg_0.job_metadata, arg_0.job_params,
                       arg_0.job_resources, [arg_1])
    yield arg_2

Generator that yields a task - specific view of the job .


def Func(arg_0):
    """
    Decorator for warning user of depricated functions before use.

    Args:
        newmethod (str): Name of method to use instead.
    """
    def decorator(arg_1):
        @wraps(arg_1)
        def wrapper(*arg_2, **arg_3):
            warnings.simplefilter('always', DeprecationWarning)
            warnings.warn(
                "Function {} is depricated, please use {} instead.".format(arg_1.__name__, arg_0),
                category=DeprecationWarning, stacklevel=2
            )
            warnings.simplefilter('default', DeprecationWarning)
            return arg_1(*arg_2, **arg_3)
        return wrapper
    return decorator

Decorator for warning user of depricated functions before use .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_0 . vcdWriter arg_3 . date ( datetime . now ( ) ) arg_3 . timescale ( 1 ) arg_0 . vcdRegisterInterfaces ( arg_2 , None ) arg_0 . vcdRegisterRemainingSignals ( arg_2 ) arg_3 . enddefinitions ( )

def Func(arg_0, arg_1, arg_2):
        """
        This method is called before first step of simulation.
        """
        arg_3 = arg_0.vcdWriter
        arg_3.date(datetime.now())
        arg_3.timescale(1)

        arg_0.vcdRegisterInterfaces(arg_2, None)
        arg_0.vcdRegisterRemainingSignals(arg_2)

        arg_3.enddefinitions()

This method is called before first step of simulation .


(self, date=(datetime.date.today()),
        organization='llnl',dict_to_write={}, path_ending_type='')

def
Func
(
arg_0
,
arg_1
=
(
arg_2
.
date
.
today
(
)
)
,
arg_4
=
'llnl'
,
arg_5
=
{
}
,
arg_6
=
''
)
:
for
arg_7
in
arg_5
:
if
len
(
arg_5
[
arg_7
]
)
!=
0
:
arg_8
=
(
'../github-data/'
+
arg_4
+
'/'
+
arg_7
+
'/'
+
arg_6
+
'/'
+
str
(
arg_1
)
+
'.json'
)
arg_0
.
checkDir
(
arg_8
)
with
open
(
arg_8
,
'w'
)
as
out
:
out
.
write
(
json
.
dumps
(
arg_5
[
arg_7
]
,
sort_keys
=
True
,
indent
=
4
,
separators
=
(
','
,
': '
)
)
)
out
.
close
(
)

def Func(arg_0, arg_1=(arg_2.date.today()),
        arg_4='llnl',arg_5={}, arg_6=''):
        """
        Writes all traffic data to file in JSON form.
        """
        for arg_7 in arg_5:
            if len(arg_5[arg_7]) != 0:#don't need to write out empty lists
                arg_8 = ('../github-data/' + arg_4 + '/' + arg_7 + '/' +
                     arg_6 + '/' + str(arg_1) + '.json')
                arg_0.checkDir(arg_8)
                with open(arg_8, 'w') as out:
                    out.write(json.dumps(arg_5[arg_7], sort_keys=True,
                        indent=4, separators=(',', ': ')))
                out.close()

Writes all traffic data to file in JSON form .


def Func(arg_0, arg_1, arg_2):
        """
        Return whether the input course or program exist.
        """
        arg_3 = arg_1 and CourseApiClient().get_course_details(arg_1)
        arg_4 = arg_2 and CourseCatalogApiServiceClient().program_exists(arg_2)
        return arg_3 or arg_4

Return whether the input course or program exist .


return column.ColumnStringArrow(sl.bytes, sl.indices, sl.length, sl.offset, string_sequence=sl)

def Func(arg_0, arg_1):
    """Extract a character from each sample at the specified position from a string column.
    Note that if the specified position is out of bound of the string sample, this method returns '', while pandas retunrs nan.

    :param int i: The index location, at which to extract the character.
    :returns: an expression containing the extracted characters.

    Example:

    >>> import vaex
    >>> text = ['Something', 'very pretty', 'is coming', 'our', 'way.']
    >>> df = vaex.from_arrays(text=text)
    >>> df
      #  text
      0  Something
      1  very pretty
      2  is coming
      3  our
      4  way.

    >>> df.text.str.get(5)
    Expression = Func(text, 5)
    Length: 5 dtype: str (expression)
    ---------------------------------
    0    h
    1    p
    2    m
    3
    4
    """
    arg_0 = _to_string_sequence(arg_0)
    if arg_1 == -1:
        arg_2 = arg_0.slice_string_end(-1)
    else:
        arg_2 = arg_0.slice_string(arg_1, arg_1+1)
    return column.ColumnStringArrow(arg_2.bytes, arg_2.indices, arg_2.length, arg_2.offset, string_sequence=arg_2)

Extract a character from each sample at the specified position from a string column.
    Note that if the specified position is out of bound of the string sample, this method returns '', while pandas retunrs nan.

    :param int i: The index location, at which to extract the character.
    :returns: an expression containing the extracted characters.

    Example:

    >>> import vaex
    >>> text = ['Something', 'very pretty', 'is coming', 'our', 'way.']
    >>> df = vaex.from_arrays(text=text)
    >>> df
      #  text
      0  Something
      1  very pretty
      2  is coming
      3  our
      4  way.

    >>> df.text.str.get(5)
    Expression = str_get(text, 5)
    Length: 5 dtype: str (expression)
    ---------------------------------
    0    h
    1    p
    2    m
    3
    4

Extract a character from each sample at the specified position from a string column . Note that if the specified position is out of bound of the string sample this method returns while pandas retunrs nan .


def Func ( arg_0 , arg_1 , arg_2 = None , * arg_3 , ** arg_4 ) : arg_5 = arg_0 . _rdd . map ( arg_1 ) if arg_2 is None : return arg_0 . __class__ ( arg_5 , noblock = True , ** arg_0 . get_params ( ) ) if arg_2 is np . ndarray : return ArrayRDD ( arg_5 , bsize = arg_0 . bsize , noblock = True ) elif arg_2 is sp . spmatrix : return SparseRDD ( arg_5 , bsize = arg_0 . bsize , noblock = True ) else : return BlockRDD ( arg_5 , bsize = arg_0 . bsize , arg_2 = arg_2 , noblock = True )

def Func(arg_0, arg_1, arg_2=None, *arg_3, **arg_4):
        """Equivalent to map, compatibility purpose only.
        Column parameter ignored.
        """
        arg_5 = arg_0._rdd.map(arg_1)

        if arg_2 is None:
            return arg_0.__class__(arg_5, noblock=True, **arg_0.get_params())
        if arg_2 is np.ndarray:
            return ArrayRDD(arg_5, bsize=arg_0.bsize, noblock=True)
        elif arg_2 is sp.spmatrix:
            return SparseRDD(arg_5, bsize=arg_0.bsize, noblock=True)
        else:
            return BlockRDD(arg_5, bsize=arg_0.bsize, arg_2=arg_2, noblock=True)

Equivalent to map compatibility purpose only . Column parameter ignored .


def Func(arg_0):
        """Called by the environment to make some initial configurations before performing the
        individual runs.

        Checks if all parameters marked for presetting were preset. If not raises a
        DefaultReplacementError.

        Locks all parameters.

        Removal of potential results of previous runs in case the trajectory was expanded to avoid
        mixing up undesired shortcuts in natural naming.

        """
        if len(arg_0._changed_default_parameters):
            raise pex.PresettingError(
                'The following parameters were supposed to replace a '
                'default value, but it was never tried to '
                'add default values with these names: %s' %
                str(arg_0._changed_default_parameters))

        arg_0.f_lock_parameters()
        arg_0.f_lock_derived_parameters()

Called by the environment to make some initial configurations before performing the individual runs .


def Func(arg_0, arg_1, arg_2):
        """Parse an instruction.

        :param row: the row of the instruction
        :param specification: the specification of the instruction
        :return: the instruction in the row
        """
        arg_3 = arg_0._as_instruction(arg_2)
        return arg_0._spec.new_Func(arg_1, arg_3)


def
Func
(
arg_0
,
arg_1
,
**
arg_2
)
:
arg_3
=
arg_1
.
cursor
(
)
if
arg_2
and
arg_0
.
Func_where
:
arg_4
=
arg_0
.
Func_where
.
format
(
**
arg_2
)
else
:
arg_4
=
''
arg_3
.
execute
(
'INSERT INTO %s '
'SELECT * FROM source.%s %s'
%
(
arg_0
.
table
,
arg_0
.
table
,
arg_4
)
)

def Func(arg_0, arg_1, **arg_2):
        """Copy data from one table to another while filtering data at the same time

        Parameters
        ----------
        conn: sqlite3 DB connection.  It must have a second database
            attached as "other".
        **where : keyword arguments
            specifying (start_ut and end_ut for filtering, see the Func_where clause in the subclasses)
        """
        arg_3 = arg_1.cursor()
        if arg_2 and arg_0.Func_where:
            arg_4 = arg_0.Func_where.format(**arg_2)
            # print(Func_where)
        else:
            arg_4 = ''
        arg_3.execute('INSERT INTO %s '
                    'SELECT * FROM source.%s %s' % (arg_0.table, arg_0.table, arg_4))

Copy data from one table to another while filtering data at the same time

        Parameters
        ----------
        conn: sqlite3 DB connection.  It must have a second database
            attached as "other".
        **where : keyword arguments
            specifying (start_ut and end_ut for filtering, see the copy_where clause in the subclasses)


def Func ( arg_0 , arg_1 ) : arg_0 . __validate_storage_path ( arg_1 ) try : arg_2 = arg_0 . api_client . get_entity_by_query ( arg_1 = arg_1 ) except StorageNotFoundException : return False return arg_2 and 'uuid' in arg_2

def Func(arg_0, arg_1):
        '''Check if a certain path Func in the storage service.

        Args:
            path (str): The path to be checked

        Returns:
            True if the path Func, False otherwise

        Raises:
            StorageArgumentException: Invalid arguments
            StorageForbiddenException: Server response code 403
            StorageNotFoundException: Server response code 404
            StorageException: other 400-600 error codes
        '''

        arg_0.__validate_storage_path(arg_1)
        try:
            arg_2 = arg_0.api_client.get_entity_by_query(arg_1=arg_1)
        except StorageNotFoundException:
            return False

        return arg_2 and 'uuid' in arg_2

Check if a certain path exists in the storage service.

        Args:
            path (str): The path to be checked

        Returns:
            True if the path exists, False otherwise

        Raises:
            StorageArgumentException: Invalid arguments
            StorageForbiddenException: Server response code 403
            StorageNotFoundException: Server response code 404
            StorageException: other 400-600 error codes

Check if a certain path exists in the storage service .


def Func(arg_0):
  """Takes Edward probabilistic program and returns its log joint function.

  Args:
    model: Python callable which executes the generative process of a
      computable probability distribution using `ed.RandomVariable`s.

  Returns:
    A log-joint probability function. Its inputs are `model`'s original inputs
    and random variables which appear during the program execution. Its output
    is a scalar tf.Tensor.

  #### Examples

  Below we define Bayesian logistic regression as an Edward program,
  representing the model's generative process. We apply `Func` in
  order to represent the model in terms of its joint probability function.

  ```python
  from tensorflow_probability import edward2 as ed

  def logistic_regression(features):
    coeffs = ed.Normal(loc=0., scale=1.,
                       sample_shape=features.shape[1], name="coeffs")
    outcomes = ed.Bernoulli(logits=tf.tensordot(features, coeffs, [[1], [0]]),
                            name="outcomes")
    return outcomes

  log_joint = ed.Func(logistic_regression)

  features = tf.random_normal([3, 2])
  coeffs_value = tf.random_normal([2])
  outcomes_value = tf.round(tf.random_uniform([3]))
  output = log_joint(features, coeffs=coeffs_value, outcomes=outcomes_value)
  ```

  """
  def log_joint_fn(*arg_1, **arg_2):
    """Log-probability of inputs according to a joint probability distribution.

    Args:
      *args: Positional arguments. They are the model's original inputs and can
        alternatively be specified as part of `kwargs`.
      **kwargs: Keyword arguments, where for each key-value pair `k` and `v`,
        `v` is passed as a `value` to the random variable(s) whose keyword
        argument `name` during construction is equal to `k`.

    Returns:
      Scalar tf.Tensor, which represents the model's log-probability summed
      over all Edward random variables and their dimensions.

    Raises:
      TypeError: If a random variable in the model has no specified value in
        `**kwargs`.
    """
    arg_3 = []

    def interceptor(arg_4, *arg_5, **arg_6):
      """Overrides a random variable's `value` and accumulates its log-prob."""
      # Set value to keyword argument indexed by `name` (an input tensor).
      arg_7 = arg_6.get("name")
      if arg_7 is None:
        raise KeyError("Random variable constructor {} has no name "
                       "in its arguments.".format(arg_4.__name__))

      # If no value is explicitly passed in for an RV, default to the value
      # from the RV constructor. This may have been set explicitly by the user
      # or forwarded from a lower-level interceptor.
      arg_8 = arg_6.get("value")
      arg_9 = arg_2.get(arg_7, arg_8)
      if arg_9 is None:
        raise LookupError("Keyword argument specifying value for {} is "
                          "missing.".format(arg_7))
      arg_6["value"] = arg_9

      arg_10 = arg_4(*arg_5, **arg_6)
      arg_11 = tf.reduce_sum(input_tensor=arg_10.distribution.log_prob(arg_10.value))
      arg_3.append(arg_11)
      return arg_10

    arg_12 = _get_function_inputs(arg_0, arg_2)
    with interception(interceptor):
      arg_0(*arg_1, **arg_12)
    arg_11 = sum(arg_3)
    return arg_11
  return log_joint_fn

Takes Edward probabilistic program and returns its log joint function.

  Args:
    model: Python callable which executes the generative process of a
      computable probability distribution using `ed.RandomVariable`s.

  Returns:
    A log-joint probability function. Its inputs are `model`'s original inputs
    and random variables which appear during the program execution. Its output
    is a scalar tf.Tensor.

  #### Examples

  Below we define Bayesian logistic regression as an Edward program,
  representing the model's generative process. We apply `make_log_joint_fn` in
  order to represent the model in terms of its joint probability function.

  ```python
  from tensorflow_probability import edward2 as ed

  def logistic_regression(features):
    coeffs = ed.Normal(loc=0., scale=1.,
                       sample_shape=features.shape[1], name="coeffs")
    outcomes = ed.Bernoulli(logits=tf.tensordot(features, coeffs, [[1], [0]]),
                            name="outcomes")
    return outcomes

  log_joint = ed.make_log_joint_fn(logistic_regression)

  features = tf.random_normal([3, 2])
  coeffs_value = tf.random_normal([2])
  outcomes_value = tf.round(tf.random_uniform([3]))
  output = log_joint(features, coeffs=coeffs_value, outcomes=outcomes_value)
  ```

Takes Edward probabilistic program and returns its log joint function .


def Func(arg_0, arg_1, arg_2):
        """Check the spacing of a single equals sign."""
        if arg_0._has_valid_type_annotation(arg_1, arg_2):
            arg_0._check_space(arg_1, arg_2, (_MUST, _MUST))
        elif arg_0._inside_brackets("(") or arg_0._inside_brackets("lambda"):
            arg_0._check_space(arg_1, arg_2, (_MUST_NOT, _MUST_NOT))
        else:
            arg_0._check_space(arg_1, arg_2, (_MUST, _MUST))

Check the spacing of a single equals sign .


def Func(arg_0, arg_1=False):
        """Configure the index to work with"""

        try:
            arg_2 = requests.get(arg_0)
        except requests.exceptions.ConnectionError:
            arg_3 = "Error connecting to Elastic Search (index: %s)" % arg_0
            raise ElasticSearchError(arg_3=arg_3)

        if arg_2.status_code != 200:
            # The index does not exist
            arg_2 = requests.put(arg_0)

            if arg_2.status_code != 200:
                logger.info("Can't create index %s (%s)", arg_0, arg_2.status_code)
                arg_3 = "Error creating Elastic Search index %s" % arg_0
                raise ElasticSearchError(arg_3=arg_3)

            logger.info("Index %s created", arg_0)
            return True
        elif arg_2.status_code == 200 and arg_1:
            requests.delete(arg_0)
            requests.put(arg_0)
            logger.info("Index deleted and created (index: %s)", arg_0)
            return True

        return False


def Func ( arg_0 ) : arg_1 = { } arg_2 = False for arg_3 in arg_0 : if arg_3 . startswith ( '--' ) : if '=' in arg_3 : arg_4 = arg_3 . split ( '=' ) [ 0 ] [ 2 : ] arg_5 = arg_3 . split ( '=' ) [ 1 ] arg_1 [ arg_4 ] = arg_5 else : arg_4 = arg_3 [ 2 : ] arg_2 = True elif arg_2 : arg_1 [ arg_4 ] = arg_3 arg_2 = False return arg_1

def Func(arg_0):
    """
    Parse arguments not consumed by arg parser into a dicitonary
    """
    arg_1 = {}
    arg_2 = False
    for arg_3 in arg_0:
        if arg_3.startswith('--'):
            if '=' in arg_3:
                arg_4 = arg_3.split('=')[0][2:]
                arg_5 = arg_3.split('=')[1]
                arg_1[arg_4] = arg_5
            else:
                arg_4 = arg_3[2:]
                arg_2 = True
        elif arg_2:
            arg_1[arg_4] = arg_3
            arg_2 = False

    return arg_1


def Func ( arg_0 ) : arg_0 . userId = arg_0 ( "GET" , "{0}/users/self/profile" . format ( arg_0 . API_USER ) , auth = arg_0 . Auth . SkypeToken ) . json ( ) . get ( "username" )

def Func(arg_0):
        """
        Ask Skype for the authenticated user's identifier, and store it on the connection object.
        """
        arg_0.userId = arg_0("GET", "{0}/users/self/profile".format(arg_0.API_USER),
                           auth=arg_0.Auth.SkypeToken).json().get("username")

Ask Skype for the authenticated user s identifier and store it on the connection object .


(field, center=None, size=6.0, cmap='bone_r', vmin=0, vmax=1,
        orientation='vertical', figpad=1.09, off=0.01)

def Func(arg_0, arg_1=None, arg_2=6.0, arg_3='bone_r', arg_4=0, arg_5=1,
        arg_6='vertical', arg_7=1.09, arg_8=0.01):
    """
    Plot two parts of the ortho view, the two sections given by ``orientation``.
    """
    arg_1 = arg_1 or [arg_10//2 for arg_10 in arg_0.shape]
    arg_9 = []
    for arg_10,arg_11 in enumerate(arg_1):
        arg_12 = [np.s_[:]]*len(arg_1)
        arg_12[arg_10] = arg_11
        arg_9.append(tuple(arg_12))

    arg_13,arg_14,arg_15 = [float(arg_10) for arg_10 in arg_0.shape]
    arg_16 = float(arg_15 + arg_13)
    arg_17 = float(arg_14 + arg_13)

    def show(arg_0, arg_18, arg_19, arg_20=False):
        arg_21 = arg_0[arg_19] if not arg_20 else arg_0[arg_19].T
        arg_18.imshow(
            arg_21, arg_3=arg_3, interpolation='nearest',
            arg_4=arg_4, arg_5=arg_5
        )
        arg_18.set_xticks([])
        arg_18.set_yticks([])
        arg_18.grid('off')

    if arg_6.startswith('v'):
        # rect = l,b,w,h
        log.info('{} {} {} {} {} {}'.format(arg_15, arg_14, arg_13, arg_16, arg_17, arg_15/arg_17))
        arg_22 = arg_15/arg_17
        arg_23 = arg_14/arg_17
        arg_24 = 1 / (1 + 3*arg_8)
        arg_25 = pl.figure(figsize=(arg_2*arg_22, arg_2*arg_24))
        arg_26 = arg_25.add_axes((arg_8, arg_24*(1-arg_23)+2*arg_8, arg_24, arg_24*arg_23))
        arg_27 = arg_25.add_axes((arg_8, arg_8,           arg_24, arg_24*(1-arg_23)))

        show(arg_0, arg_26, arg_9[0])
        show(arg_0, arg_27, arg_9[1])
    else:
        # rect = l,b,w,h
        arg_22 = arg_14/arg_16
        arg_23 = arg_15/arg_16
        arg_24 = 1 / (1 + 3*arg_8)
        arg_25 = pl.figure(figsize=(arg_2*arg_24, arg_2*arg_22))
        arg_26 = arg_25.add_axes((arg_8,    arg_8,   arg_24*arg_23, arg_24))
        arg_27 = arg_25.add_axes((2*arg_8+arg_24*arg_23, arg_8, arg_24*(1-arg_23), arg_24))

        show(arg_0, arg_26, arg_9[0])
        show(arg_0, arg_27, arg_9[2], arg_20=True)

    return arg_25, arg_26, arg_27

Plot two parts of the ortho view the two sections given by orientation .


def Func ( arg_0 , arg_1 ) : arg_2 , arg_3 = arg_0 . get_coordinate_pointers ( arg_1 ) arg_4 = ctypes . c_uint64 ( 0 ) core . rt . Index_Intersects_Func ( arg_0 . handle , arg_2 , arg_3 , arg_0 . properties . dimension , ctypes . byref ( arg_4 ) ) return arg_4 . value

def Func(arg_0, arg_1):
        """Return number of objects that intersect the given coordinates.

        :param coordinates: sequence or array
            This may be an object that satisfies the numpy array
            protocol, providing the index's dimension * 2 coordinate
            pairs representing the `mink` and `maxk` coordinates in
            each dimension defining the bounds of the query window.

        The following example queries the index for any objects any objects
        that were stored in the index intersect the bounds given in the
        coordinates::

            >>> from rtree import index
            >>> idx = index.Index()
            >>> idx.insert(4321,
            ...            (34.3776829412, 26.7375853734, 49.3776829412,
            ...             41.7375853734),
            ...            obj=42)

            >>> print(idx.Func((0, 0, 60, 60)))
            1

        """
        arg_2, arg_3 = arg_0.get_coordinate_pointers(arg_1)

        arg_4 = ctypes.c_uint64(0)

        core.rt.Index_Intersects_Func(arg_0.handle,
                                       arg_2,
                                       arg_3,
                                       arg_0.properties.dimension,
                                       ctypes.byref(arg_4))

        return arg_4.value

Return number of objects that intersect the given coordinates.

        :param coordinates: sequence or array
            This may be an object that satisfies the numpy array
            protocol, providing the index's dimension * 2 coordinate
            pairs representing the `mink` and `maxk` coordinates in
            each dimension defining the bounds of the query window.

        The following example queries the index for any objects any objects
        that were stored in the index intersect the bounds given in the
        coordinates::

            >>> from rtree import index
            >>> idx = index.Index()
            >>> idx.insert(4321,
            ...            (34.3776829412, 26.7375853734, 49.3776829412,
            ...             41.7375853734),
            ...            obj=42)

            >>> print(idx.count((0, 0, 60, 60)))
            1

Return number of objects that intersect the given coordinates .


(filtered_mean,
                              filtered_cov,
                              predicted_mean,
                              predicted_cov,
                              next_posterior_mean,
                              next_posterior_cov,
                              transition_matrix)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 , arg_6 ) : arg_7 = arg_6 . matmul ( arg_1 ) arg_8 = tf . linalg . cholesky ( arg_3 ) arg_9 = tf . linalg . cholesky_solve ( arg_8 , arg_7 ) arg_10 = ( arg_0 + tf . linalg . matmul ( arg_9 , arg_4 - arg_2 , adjoint_a = True ) ) arg_11 = ( arg_1 + tf . linalg . matmul ( arg_9 , tf . linalg . matmul ( arg_5 - arg_3 , arg_9 ) , adjoint_a = True ) ) return ( arg_10 , arg_11 )

def Func(arg_0,
                              arg_1,
                              arg_2,
                              arg_3,
                              arg_4,
                              arg_5,
                              arg_6):
  """Backward update for a Kalman smoother.

  Give the `filtered_mean` mu(t | t), `filtered_cov` sigma(t | t),
  `predicted_mean` mu(t+1 | t) and `predicted_cov` sigma(t+1 | t),
  as returns from the `forward_filter` function, as well as
  `next_posterior_mean` mu(t+1 | 1:T) and `next_posterior_cov` sigma(t+1 | 1:T),
  if the `transition_matrix` of states from time t to time t+1
  is given as A(t+1), the 1 step backward smoothed distribution parameter
  could be calculated as:
  p(z(t) | Obs(1:T)) = N( mu(t | 1:T), sigma(t | 1:T)),
  mu(t | 1:T) = mu(t | t) + J(t) * (mu(t+1 | 1:T) - mu(t+1 | t)),
  sigma(t | 1:T) = sigma(t | t)
                   + J(t) * (sigma(t+1 | 1:T) - sigma(t+1 | t) * J(t)',
  J(t) = sigma(t | t) * A(t+1)' / sigma(t+1 | t),
  where all the multiplications are matrix multiplication, and `/` is
  the matrix inverse. J(t) is the backward Kalman gain matrix.

  The algorithm can be intialized from mu(T | 1:T) and sigma(T | 1:T),
  which are the last step parameters returned by forward_filter.

  Args:
    filtered_mean: `Tensor` with event shape `[latent_size, 1]` and
      batch shape `B`, containing mu(t | t).
    filtered_cov: `Tensor` with event shape `[latent_size, latent_size]` and
      batch shape `B`, containing sigma(t | t).
    predicted_mean: `Tensor` with event shape `[latent_size, 1]` and
      batch shape `B`, containing mu(t+1 | t).
    predicted_cov: `Tensor` with event shape `[latent_size, latent_size]` and
      batch shape `B`, containing sigma(t+1 | t).
    next_posterior_mean: `Tensor` with event shape `[latent_size, 1]` and
      batch shape `B`, containing mu(t+1 | 1:T).
    next_posterior_cov: `Tensor` with event shape `[latent_size, latent_size]`
      and batch shape `B`, containing sigma(t+1 | 1:T).
    transition_matrix: `LinearOperator` with shape
      `[latent_size, latent_size]` and batch shape broadcastable
      to `B`.

  Returns:
    posterior_mean: `Tensor` with event shape `[latent_size, 1]` and
      batch shape `B`, containing mu(t | 1:T).
    posterior_cov: `Tensor` with event shape `[latent_size, latent_size]` and
      batch shape `B`, containing sigma(t | 1:T).
  """
  # Compute backward Kalman gain:
  # J = F * T' * P^{-1}
  # Since both F(iltered) and P(redictive) are cov matrices,
  # thus self-adjoint, we can take the transpose.
  # computation:
  #      = (P^{-1} * T * F)'
  #      = (P^{-1} * tmp_gain_cov) '
  #      = (P \ tmp_gain_cov)'
  arg_7 = arg_6.matmul(arg_1)
  arg_8 = tf.linalg.cholesky(arg_3)
  arg_9 = tf.linalg.cholesky_solve(arg_8, arg_7)

  arg_10 = (arg_0 +
                    tf.linalg.matmul(arg_9,
                                     arg_4 - arg_2,
                                     adjoint_a=True))
  arg_11 = (
      arg_1 +
      tf.linalg.matmul(arg_9,
                       tf.linalg.matmul(
                           arg_5 - arg_3, arg_9),
                       adjoint_a=True))

  return (arg_10, arg_11)


def Func ( arg_0 , arg_1 , * arg_2 , ** arg_3 ) : arg_4 = arg_3 . pop ( 'n_samples' , 1000 ) arg_5 = np . empty ( arg_4 ) arg_6 = arg_3 . pop ( 'factor_returns' , None ) for arg_7 in range ( arg_4 ) : arg_8 = np . random . randint ( len ( arg_1 ) , size = len ( arg_1 ) ) arg_9 = arg_1 . iloc [ arg_8 ] . reset_index ( drop = True ) if arg_6 is not None : arg_10 = arg_6 . iloc [ arg_8 ] . reset_index ( drop = True ) arg_5 [ arg_7 ] = arg_0 ( arg_9 , arg_10 , * arg_2 , ** arg_3 ) else : arg_5 [ arg_7 ] = arg_0 ( arg_9 , * arg_2 , ** arg_3 ) return arg_5

def Func(arg_0, arg_1, *arg_2, **arg_3):
    """Performs a bootstrap analysis on a user-defined function returning
    a summary statistic.

    Parameters
    ----------
    func : function
        Function that either takes a single array (commonly returns)
        or two arrays (commonly returns and factor returns) and
        returns a single value (commonly a summary
        statistic). Additional args and kwargs are passed as well.
    returns : pd.Series
        Daily returns of the strategy, noncumulative.
         - See full explanation in tears.create_full_tear_sheet.
    factor_returns : pd.Series, optional
        Daily noncumulative returns of the benchmark factor to which betas are
        computed. Usually a benchmark such as market returns.
         - This is in the same style as returns.
    n_samples : int, optional
        Number of bootstrap samples to draw. Default is 1000.
        Increasing this will lead to more stable / accurate estimates.

    Returns
    -------
    numpy.ndarray
        Bootstrapped sampling distribution of passed in func.
    """

    arg_4 = arg_3.pop('n_samples', 1000)
    arg_5 = np.empty(arg_4)

    arg_6 = arg_3.pop('factor_returns', None)

    for arg_7 in range(arg_4):
        arg_8 = np.random.randint(len(arg_1), size=len(arg_1))
        arg_9 = arg_1.iloc[arg_8].reset_index(drop=True)
        if arg_6 is not None:
            arg_10 = arg_6.iloc[arg_8].reset_index(drop=True)
            arg_5[arg_7] = arg_0(arg_9, arg_10,
                          *arg_2, **arg_3)
        else:
            arg_5[arg_7] = arg_0(arg_9,
                          *arg_2, **arg_3)

    return arg_5

Performs a bootstrap analysis on a user - defined function returning a summary statistic .


def Func ( arg_0 ) : arg_1 = record_get_field_instances ( arg_0 . record , '260' ) for arg_2 in arg_1 : for arg_3 , ( arg_4 , arg_5 ) in enumerate ( arg_2 [ 0 ] ) : if arg_4 == 'c' : arg_2 [ 0 ] [ arg_3 ] = ( 'c' , arg_5 [ : 4 ] ) elif arg_4 == 't' : del arg_2 [ 0 ] [ arg_3 ] if not arg_1 : arg_6 = record_get_field_values ( arg_0 . record , "773" , code = "y" ) if arg_6 : record_add_field ( arg_0 . record , "260" , subfields = [ ( "c" , arg_6 [ 0 ] [ : 4 ] ) ] ) else : arg_7 = record_get_field_values ( arg_0 . record , "269" , code = "c" ) if arg_7 : record_add_field ( arg_0 . record , "260" , subfields = [ ( "c" , arg_7 [ 0 ] [ : 4 ] ) ] )

def Func(arg_0):
        """260 Date normalization."""
        arg_1 = record_get_field_instances(arg_0.record, '260')
        for arg_2 in arg_1:
            for arg_3, (arg_4, arg_5) in enumerate(arg_2[0]):
                if arg_4 == 'c':
                    arg_2[0][arg_3] = ('c', arg_5[:4])
                elif arg_4 == 't':
                    del arg_2[0][arg_3]
        if not arg_1:
            arg_6 = record_get_field_values(arg_0.record, "773", code="y")
            if arg_6:
                record_add_field(
                    arg_0.record, "260", subfields=[("c", arg_6[0][:4])])
            else:
                arg_7 = record_get_field_values(arg_0.record, "269", code="c")
                if arg_7:
                    record_add_field(
                        arg_0.record, "260", subfields=[("c", arg_7[0][:4])])


def Func ( arg_0 , arg_1 ) : arg_2 = ACCOUNTS_API . format ( arg_1 ) + "/reports" arg_3 = [ ] for arg_4 in arg_0 . _get_resource ( arg_2 ) : arg_3 . append ( ReportType ( data = arg_4 , arg_1 = arg_1 ) ) return arg_3

def Func(arg_0, arg_1):
        """
        Returns the list of reports for the canvas account id.

        https://canvas.instructure.com/doc/api/account_reports.html#method.account_reports.available_reports
        """
        arg_2 = ACCOUNTS_API.format(arg_1) + "/reports"

        arg_3 = []
        for arg_4 in arg_0._get_resource(arg_2):
            arg_3.append(ReportType(data=arg_4, arg_1=arg_1))
        return arg_3

Returns the list of reports for the canvas account id .


def
Func
(
arg_0
,
arg_1
,
arg_2
=
,
**
arg_3
)
:
arg_2
=
arg_0
.
format
if
arg_2
is
else
arg_2
arg_4
=
getattr
(
arg_0
,
"save_%s"
%
arg_2
,
)
if
arg_4
is
:
raise
ValueError
(
"Unknown format '%s'."
%
arg_2
)
arg_4
(
arg_1
,
**
arg_3
)

def Func(arg_0, arg_1, arg_2=None, **arg_3):
        """ Save the object to a given file like object in the given format.
        """
        arg_2 = arg_0.format if arg_2 is None else arg_2
        arg_4 = getattr(arg_0, "save_%s" % arg_2, None)
        if arg_4 is None:
            raise ValueError("Unknown format '%s'." % arg_2)
        arg_4(arg_1, **arg_3)

Save the object to a given file like object in the given format .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_1 . read ( ) arg_4 = Operators . SEXTEND ( arg_2 . read ( ) , arg_2 . size , arg_1 . size ) arg_0 . _calculate_Func_flags ( arg_1 . size , arg_3 - arg_4 , arg_3 , arg_4 )

def Func(arg_0, arg_1, arg_2):
        """
        Compares two operands.

        Compares the first source operand with the second source operand and sets the status flags
        in the EFLAGS register according to the results. The comparison is performed by subtracting
        the second operand from the first operand and then setting the status flags in the same manner
        as the SUB instruction. When an immediate value is used as an operand, it is sign-extended to
        the length of the first operand::

                temp  =  SRC1 - SignExtend(SRC2);
                ModifyStatusFlags; (* Modify status flags in the same manner as the SUB instruction*)

        The CF, OF, SF, ZF, AF, and PF flags are set according to the result.

        :param cpu: current CPU.
        :param dest: destination operand.
        :param src: source operand.
        """
        arg_3 = arg_1.read()
        arg_4 = Operators.SEXTEND(arg_2.read(), arg_2.size, arg_1.size)

        # Affected Flags o..szapc
        arg_0._calculate_Func_flags(arg_1.size, arg_3 - arg_4, arg_3, arg_4)


def Func ( arg_0 ) : for arg_1 in web_exceptions . __all__ : arg_2 = getattr ( web_exceptions , arg_1 ) if arg_2 . status_code == arg_0 . status : arg_3 = dict ( headers = arg_0 . headers , reason = arg_0 . reason , ) if issubclass ( arg_2 , web_exceptions . _HTTPMove ) : raise arg_2 ( arg_0 . headers [ 'Location' ] , ** arg_3 ) raise arg_2 ( ** arg_3 )

def Func(arg_0):
    """Raise an appropriate error for a given response.

    Arguments:
      response (:py:class:`aiohttp.ClientResponse`): The API response.

    Raises:
      :py:class:`aiohttp.web_exceptions.HTTPException`: The appropriate
        error for the response's status.

    """
    for arg_1 in web_exceptions.__all__:
        arg_2 = getattr(web_exceptions, arg_1)
        if arg_2.status_code == arg_0.status:
            arg_3 = dict(
                headers=arg_0.headers,
                reason=arg_0.reason,
            )
            if issubclass(arg_2, web_exceptions._HTTPMove):  # pylint: disable=protected-access
                raise arg_2(arg_0.headers['Location'], **arg_3)
            raise arg_2(**arg_3)

Raise an appropriate error for a given response .


def Func ( arg_0 ) : Func = c_long ( ) _WinHttpRequest . _Status ( arg_0 , byref ( Func ) ) return int ( Func . value )

def Func(arg_0):
        ''' Gets status of response. '''

        Func = c_long()
        _WinHttpRequest._Status(arg_0, byref(Func))
        return int(Func.value)


def Func(arg_0, arg_1=None, arg_2=False):
        """
        Refreshes the task instance from the database based on the primary key

        :param lock_for_update: if True, indicates that the database should
            lock the TaskInstance (issuing a FOR UPDATE clause) until the
            session is committed.
        """
        arg_3 = TaskInstance

        arg_4 = arg_1.query(arg_3).filter(
            arg_3.dag_id == arg_0.dag_id,
            arg_3.task_id == arg_0.task_id,
            arg_3.execution_date == arg_0.execution_date)

        if arg_2:
            arg_5 = arg_4.with_for_update().first()
        else:
            arg_5 = arg_4.first()
        if arg_5:
            arg_0.state = arg_5.state
            arg_0.start_date = arg_5.start_date
            arg_0.end_date = arg_5.end_date
            # Get the raw value of try_number column, don't read through the
            # accessor here otherwise it will be incremeneted by one already.
            arg_0.try_number = arg_5._try_number
            arg_0.max_tries = arg_5.max_tries
            arg_0.hostname = arg_5.hostname
            arg_0.pid = arg_5.pid
            arg_0.executor_config = arg_5.executor_config
        else:
            arg_0.state = None


def Func ( arg_0 , arg_1 , arg_2 = False ) : if not arg_0 . isatty : arg_0 . fobj . Func ( '%s\n' % arg_1 ) return arg_3 = len ( arg_1 ) arg_0 . max_len = max ( arg_0 . max_len , arg_3 ) arg_0 . fobj . Func ( "\r%-*s" % ( arg_0 . max_len , arg_1 ) ) if arg_2 or not arg_0 . isatty : arg_0 . fobj . Func ( '\n' ) arg_0 . max_len = 0

def Func(arg_0, arg_1, arg_2=False):
        """Use ``\\r`` to overdraw the current line with the given text.

        This function transparently handles tracking how much overdrawing is
        necessary to erase the previous line when used consistently.

        :param text: The text to be outputted
        :param newline: Whether to start a new line and reset the length count.
        :type text: :class:`~__builtins__.str`
        :type newline: :class:`~__builtins__.bool`
        """
        if not arg_0.isatty:
            arg_0.fobj.Func('%s\n' % arg_1)
            return

        arg_3 = len(arg_1)
        arg_0.max_len = max(arg_0.max_len, arg_3)

        arg_0.fobj.Func("\r%-*s" % (arg_0.max_len, arg_1))
        if arg_2 or not arg_0.isatty:
            arg_0.fobj.Func('\n')
            arg_0.max_len = 0

Use \\ r to overdraw the current line with the given text .


def Func ( arg_0 , arg_1 , ** arg_2 ) : arg_3 = arg_0 . feed_forward ( arg_1 , ** arg_2 ) return arg_3 [ arg_0 . layers [ - 1 ] . output_name ] . argmax ( axis = - 1 )

def Func(arg_0, arg_1, **arg_2):
        '''Compute a greedy classification for the given set of data.

        Parameters
        ----------
        x : ndarray (num-examples, num-variables)
            An array containing examples to classify. Examples are given as the
            rows in this array.

        Returns
        -------
        k : ndarray (num-examples, )
            A vector of class index values, one per row of input data.
        '''
        arg_3 = arg_0.feed_forward(arg_1, **arg_2)
        return arg_3[arg_0.layers[-1].output_name].argmax(axis=-1)

Compute a greedy classification for the given set of data .


return self.type in [
            self._TYPE_PASTE,
            self._TYPE_TEXT,
            self._TYPE_TWEET
        ]

def Func ( arg_0 ) : return arg_0 . type in [ arg_0 . _TYPE_PASTE , arg_0 . _TYPE_TEXT , arg_0 . _TYPE_TWEET ]

def Func(arg_0):
        """ Tells if this message is a text message.

        Returns:
            bool. Success
        """
        return arg_0.type in [
            arg_0._TYPE_PASTE,
            arg_0._TYPE_TEXT,
            arg_0._TYPE_TWEET
        ]

Tells if this message is a text message .


def Func(arg_0, **arg_1):
    """Checks the health of a sample from the FastQC summary file.

    Parses the FastQC summary file and tests whether the sample is good
    or not. There are four categories that cannot fail, and two that
    must pass in order for the sample pass this check. If the sample fails
    the quality checks, a list with the failing categories is also returned.

    Categories that cannot fail::

        fail_sensitive = [
            "Per base sequence quality",
            "Overrepresented sequences",
            "Sequence Length Distribution",
            "Per sequence GC content"
        ]

    Categories that must pass::

        must_pass = [
            "Per base N content",
            "Adapter Content"
        ]

    Parameters
    ----------
    summary_file: str
        Path to FastQC summary file.

    Returns
    -------
    x : bool
        Returns ``True`` if the sample passes all tests. ``False`` if not.
    summary_info : list
        A list with the FastQC categories that failed the tests. Is empty
        if the sample passes all tests.
    """

    # Store the summary categories that cannot fail. If they fail, do not
    # proceed with this sample
    arg_2 = arg_1.get("fail_sensitive", [
        "Per base sequence quality",
        "Overrepresented sequences",
        "Sequence Length Distribution",
        "Per sequence GC content"
    ])
    logger.debug("Fail sensitive categories: {}".format(arg_2))

    # Store summary categories that must pass. If they do not, do not proceed
    # with that sample
    arg_3 = arg_1.get("must_pass", [
        "Per base N content",
        "Adapter Content"
    ])
    logger.debug("Must pass categories: {}".format(arg_3))

    arg_4 = arg_1.get("warning_fail_sensitive", [
        "Per base sequence quality",
        "Overrepresented sequences",

    ])

    arg_5 = arg_1.get("warning_must_pass", [
        "Per base sequence content"
    ])

    # Get summary dictionary
    arg_6 = get_summary(arg_0)

    # This flag will change to False if one of the tests fails
    arg_7 = True
    # List of failing categories
    arg_8 = []
    # List of warning categories
    arg_9 = []

    for arg_10, arg_11 in arg_6.items():

        logger.debug("Assessing category {} with result {}".format(arg_10, arg_11))

        # FAILURES
        # Check for fail sensitive
        if arg_10 in arg_2 and arg_11 == "FAIL":
            arg_7 = False
            arg_8.append("{}:{}".format(arg_10, arg_11))
            logger.error("Category {} failed a fail sensitive "
                         "category".format(arg_10))

        # Check for must pass
        if arg_10 in arg_3 and arg_11 != "PASS":
            arg_7 = False
            arg_8.append("{}:{}".format(arg_10, arg_11))
            logger.error("Category {} failed a must pass category".format(
                arg_10))

        # WARNINGS
        # Check for fail sensitive
        if arg_10 in arg_4 and arg_11 == "FAIL":
            arg_9.append("Failed category: {}".format(arg_10))
            logger.warning("Category {} flagged at a fail sensitive "
                           "category".format(arg_10))

        if arg_10 in arg_5 and arg_11 != "PASS":
            arg_9.append("Did not pass category: {}".format(arg_10))
            logger.warning("Category {} flagged at a must pass "
                           "category".format(arg_10))

    # Passed all tests
    return arg_7, arg_8, arg_9

Checks the health of a sample from the FastQC summary file .


(self, x_analyte, y_analyte, window=15,
                           r_threshold=0.9, p_threshold=0.05, filt=True, recalc=False)

def Func(arg_0, arg_1, arg_2, arg_3=15,
                           arg_4=0.9, arg_5=0.05, arg_6=True, arg_7=False):
        """
        Calculate correlation filter.

        Parameters
        ----------
        x_analyte, y_analyte : str
            The names of the x and y analytes to correlate.
        window : int, None
            The rolling window used when calculating the correlation.
        r_threshold : float
            The correlation index above which to exclude data.
            Note: the absolute pearson R value is considered, so
            negative correlations below -`r_threshold` will also
            be excluded.
        p_threshold : float
            The significant level below which data are excluded.
        filt : bool
            Whether or not to apply existing filters to the data before
            calculating this filter.
        recalc : bool
            If True, the correlation is re-calculated, even if it is already present.

        Returns
        -------
        None
        """
        # make window odd
        if arg_3 % 2 != 1:
            arg_3 += 1

        arg_8 = locals()
        del(arg_8['self'])

        arg_9 = arg_0.filt.maxset + 1

        arg_10 = '{:}_{:}_{:.0f}'.format(arg_1, arg_2, arg_3)

        arg_0.calc_correlation(arg_1, arg_2, arg_3, arg_6, arg_7)
        arg_11, arg_12 = arg_0.correlations[arg_10]

        arg_13 = (abs(arg_11) > arg_4) & (arg_12 < arg_5)
        arg_13 = ~arg_13

        arg_14 = arg_1 + '_' + arg_2 + '_corr'

        arg_0.filt.add(arg_14=arg_14,
                      arg_6=arg_13,
                      info=(arg_1 + ' vs. ' + arg_2 +
                            ' correlation filter.'),
                      arg_8=arg_8, arg_9=arg_9)
        arg_0.filt.off(arg_6=arg_14)
        arg_0.filt.on(analyte=arg_2, arg_6=arg_14)

        return


def Func(arg_0, arg_1, arg_2):
    """64bit counter aggregator with wrapping
    """
    if arg_1 < arg_0:
        arg_3 = 18446744073709551615 - arg_0
        return (arg_3 + arg_1) / float(arg_2)

    return (arg_1 - arg_0) / float(arg_2)


return H2OFrame._expr(expr=ExprNode("setDomain", self, False, levels), cache=self._ex._cache)

def Func ( arg_0 , arg_1 ) : assert_is_type ( arg_1 , [ str ] ) return H2OFrame . _expr ( expr = ExprNode ( "setDomain" , arg_0 , False , arg_1 ) , cache = arg_0 . _ex . _cache )

def Func(arg_0, arg_1):
        """
        Replace the levels of a categorical column.

        New levels must be aligned with the old domain. This call has copy-on-write semantics.

        :param List[str] levels: A list of strings specifying the new levels. The number of new
            levels must match the number of old levels.
        :returns: A single-column H2OFrame with the desired levels.
        """
        assert_is_type(arg_1, [str])
        return H2OFrame._expr(expr=ExprNode("setDomain", arg_0, False, arg_1), cache=arg_0._ex._cache)

Replace the levels of a categorical column .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_0 . get_tripIs_active_in_range ( arg_1 , arg_2 ) arg_4 = Counter ( ) for arg_5 in arg_3 . itertuples ( ) : arg_6 = arg_0 . get_trip_stop_time_data ( arg_5 . trip_I , arg_5 . day_start_ut ) for arg_7 in arg_6 . itertuples ( index = False ) : if ( arg_7 . dep_time_ut >= arg_1 ) and ( arg_7 . dep_time_ut <= arg_2 ) : arg_4 [ arg_7 . stop_I ] += 1 arg_8 = arg_0 . stops ( ) arg_9 = [ arg_4 [ stop_I ] for stop_I in arg_8 [ "stop_I" ] . values ] arg_8 . loc [ : , "count" ] = pd . Series ( arg_9 , index = arg_8 . index ) return arg_8

def Func(arg_0, arg_1, arg_2):
        """
        Get stop count data.

        Parameters
        ----------
        start_ut : int
            start time in unixtime
        end_ut : int
            end time in unixtime

        Returns
        -------
        stopData : pandas.DataFrame
            each row in the stopData dataFrame is a dictionary with the following elements
                stop_I, count, lat, lon, name
            with data types
                (int, int, float, float, str)
        """
        # TODO! this function could perhaps be made a single sql query now with the new tables?
        arg_3 = arg_0.get_tripIs_active_in_range(arg_1, arg_2)
        # stop_I -> count, lat, lon, name
        arg_4 = Counter()

        # loop over all trips:
        for arg_5 in arg_3.itertuples():
            # get stop_data and store it:
            arg_6 = arg_0.get_trip_stop_time_data(arg_5.trip_I, arg_5.day_start_ut)
            for arg_7 in arg_6.itertuples(index=False):
                if (arg_7.dep_time_ut >= arg_1) and (arg_7.dep_time_ut <= arg_2):
                    arg_4[arg_7.stop_I] += 1

        arg_8 = arg_0.stops()
        arg_9 = [arg_4[stop_I] for stop_I in arg_8["stop_I"].values]

        arg_8.loc[:, "count"] = pd.Series(arg_9, index=arg_8.index)
        return arg_8


def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . copy ( ) arg_2 . update ( arg_0 . _headers ) return arg_0 . __copy_and_set ( 'headers' , arg_2 )

def Func(arg_0, arg_1):
        '''Adds headers to the request

        Args:
            headers (dict): The headers to add the request headers

        Returns:
            The request builder instance in order to chain calls
        '''
        arg_2 = arg_1.copy()
        arg_2.update(arg_0._headers)
        return arg_0.__copy_and_set('headers', arg_2)


def Func ( arg_0 : arg_1 ) : arg_2 = list ( get_nodes_by_function ( arg_0 , COMPOSITE ) ) for arg_3 in arg_2 : for arg_4 in arg_3 . members : arg_0 . add_has_component ( arg_3 , arg_4 )

def Func(arg_0: arg_1):
    """Adds all of the members of the composite abundances to the graph."""
    arg_2 = list(get_nodes_by_function(arg_0, COMPOSITE))
    for arg_3 in arg_2:
        for arg_4 in arg_3.members:
            arg_0.add_has_component(arg_3, arg_4)

Adds all of the members of the composite abundances to the graph .


def Func ( arg_0 , arg_1 ) : arg_2 = model . Model ( arg_0 . peng , arg_0 , arg_1 ) arg_0 . modelobjcache [ arg_1 ] = arg_2 arg_0 . peng . sendEvent ( "peng3d:rsrc.model.load" , { "peng" : arg_0 . peng , "name" : arg_1 } ) return arg_2

def Func(arg_0,arg_1):
        """
        Loads the model of the given name.

        The model will also be inserted into the cache.
        """
        arg_2 = model.Model(arg_0.peng,arg_0,arg_1)
        arg_0.modelobjcache[arg_1]=arg_2
        arg_0.peng.sendEvent("peng3d:rsrc.model.load",{"peng":arg_0.peng,"name":arg_1})
        return arg_2

Loads the model of the given name . The model will also be inserted into the cache .


(tar_file_path, output_path="output.mp4", framerate=60, overwrite=False)

"""Could not call `ffmpeg` to convert your frames into a video.If you want to convert the frames manually, you can extract the.tar archive into a directory, cd to that directory, and run:ffmpeg -r 60 -i %07d.png \\\n\t -vcodec libx264 \\\n\t -preset slow \\\n\t -crf 18 \\\n\t output.mp4                """

def Func(arg_0, arg_1="output.mp4", arg_2=60, arg_3=False):
    """
    Try to convert a tar file containing a sequence of frames saved by the
    meshcat viewer into a single video file.

    This relies on having `ffmpeg` installed on your system.
    """
    arg_1 = os.path.abspath(arg_1)
    if os.path.isfile(arg_1) and not arg_3:
        raise ValueError("The output path {:s} already exists. To overwrite that file, you can pass overwrite=True to this function.".format(arg_1))
    with tempfile.TemporaryDirectory() as tmp_dir:
        with tarfile.open(arg_0) as tar:
            tar.extractall(tmp_dir)
        arg_4 = ["ffmpeg",
                "-r", str(arg_2),
                "-i", r"%07d.png",
                "-vcodec", "libx264",
                "-preset", "slow",
                "-crf", "18"]
        if arg_3:
            arg_4.append("-y")
        arg_4.append(arg_1)
        try:
            subprocess.check_call(arg_4, cwd=tmp_dir)
        except subprocess.CalledProcessError as e:
            print("""
Could not call `ffmpeg` to convert your frames into a video.
If you want to convert the frames manually, you can extract the
.tar archive into a directory, cd to that directory, and run:
ffmpeg -r 60 -i %07d.png \\\n\t -vcodec libx264 \\\n\t -preset slow \\\n\t -crf 18 \\\n\t output.mp4
                """)
            raise
    print("Saved output as {:s}".format(arg_1))
    return arg_1

Try to convert a tar file containing a sequence of frames saved by the meshcat viewer into a single video file .


def Func ( arg_0 ) : if hasattr ( arg_0 , 'shape' ) : arg_1 = arg_0 . shape else : arg_1 = arg_0 . get_data ( ) . shape return arg_1

def Func(arg_0):
    """Return the shape of img.

    Paramerers
    -----------
    img:

    Returns
    -------
    shape: tuple
    """
    if hasattr(arg_0, 'shape'):
        arg_1 = arg_0.shape
    else:
        arg_1 = arg_0.get_data().shape
    return arg_1


def Func(arg_0, arg_1=None):
        """Checkpoint the dfk incrementally to a Func file.

        When called, every task that has been completed yet not
        Funced is Funced to a file.

        Kwargs:
            - tasks (List of task ids) : List of task ids to Func. Default=None
                                         if set to None, we iterate over all tasks held by the DFK.

        .. note::
            Checkpointing only works if memoization is enabled

        Returns:
            Checkpoint dir if Funcs were written successfully.
            By default the Funcs are written to the RUNDIR of the current
            run under RUNDIR/Funcs/{tasks.pkl, dfk.pkl}
        """
        with arg_0.Func_lock:
            arg_2 = None
            if arg_1:
                arg_2 = arg_1
            else:
                arg_2 = arg_0.tasks

            arg_3 = '{0}/Func'.format(arg_0.run_dir)
            arg_4 = arg_3 + '/dfk.pkl'
            arg_5 = arg_3 + '/tasks.pkl'

            if not os.path.exists(arg_3):
                try:
                    os.makedirs(arg_3)
                except FileExistsError:
                    pass

            with open(arg_4, 'wb') as f:
                arg_6 = {'rundir': arg_0.run_dir,
                         'task_count': arg_0.task_count
                         }
                pickle.dump(arg_6, f)

            arg_7 = 0

            with open(arg_5, 'ab') as f:
                for arg_8 in arg_2:
                    if not arg_0.tasks[arg_8]['Func'] and \
                       arg_0.tasks[arg_8]['app_fu'].done() and \
                       arg_0.tasks[arg_8]['app_fu'].exception() is None:
                        arg_9 = arg_0.tasks[arg_8]['hashsum']
                        if not arg_9:
                            continue
                        arg_10 = {'hash': arg_9,
                             'exception': None,
                             'result': None}
                        try:
                            # Asking for the result will raise an exception if
                            # the app had failed. Should we even Func these?
                            # TODO : Resolve this question ?
                            arg_11 = arg_0.memoizer.hash_lookup(arg_9).result()
                        except Exception as e:
                            arg_10['exception'] = e
                        else:
                            arg_10['result'] = arg_11

                        # We are using pickle here since pickle dumps to a file in 'ab'
                        # mode behave like a incremental log.
                        pickle.dump(arg_10, f)
                        arg_7 += 1
                        arg_0.tasks[arg_8]['Func'] = True
                        logger.debug("Task {} Funced".format(arg_8))

            arg_0.Funced_tasks += arg_7

            if arg_7 == 0:
                if arg_0.Funced_tasks == 0:
                    logger.warn("No tasks Funced so far in this run. Please ensure caching is enabled")
                else:
                    logger.debug("No tasks Funced in this pass.")
            else:
                logger.info("Done Funcing {} tasks".format(arg_7))

            return arg_3

Checkpoint the dfk incrementally to a checkpoint file.

        When called, every task that has been completed yet not
        checkpointed is checkpointed to a file.

        Kwargs:
            - tasks (List of task ids) : List of task ids to checkpoint. Default=None
                                         if set to None, we iterate over all tasks held by the DFK.

        .. note::
            Checkpointing only works if memoization is enabled

        Returns:
            Checkpoint dir if checkpoints were written successfully.
            By default the checkpoints are written to the RUNDIR of the current
            run under RUNDIR/checkpoints/{tasks.pkl, dfk.pkl}

Checkpoint the dfk incrementally to a checkpoint file .


def
Func
(
arg_0
,
arg_1
)
:
arg_2
,
arg_3
=
arg_1
.
split
(
":"
,
1
)
arg_3
=
arg_3
.
replace
(
"\\n"
,
"\n"
)
.
replace
(
"\\N"
,
"\n"
)
arg_4
=
arg_2
.
lower
(
)
.
split
(
";"
)
arg_5
=
arg_4
[
0
]
arg_6
=
arg_4
[
1
:
]
if
u"."
in
arg_5
:
arg_5
=
arg_5
.
split
(
"."
,
1
)
[
1
]
arg_5
=
arg_5
.
upper
(
)
if
arg_5
in
(
u"X-DESC"
,
u"X-JABBERID"
)
:
arg_5
=
arg_5
[
2
:
]
if
not
arg_0
.
components
.
has_key
(
arg_5
)
:
return
if
arg_6
:
arg_6
=
dict
(
[
p
.
split
(
"="
,
1
)
for
p
in
arg_6
]
)
arg_7
,
arg_8
=
arg_0
.
components
[
arg_5
]
if
arg_8
in
(
"required"
,
"optional"
)
:
if
arg_0
.
content
.
has_key
(
arg_5
)
:
raise
ValueError
(
"Duplicate %s"
%
(
arg_5
,
)
)
try
:
arg_0
.
content
[
arg_5
]
=
arg_7
(
arg_5
,
arg_3
,
arg_6
)
except
Empty
:
pass
elif
arg_8
==
"multi"
:
if
not
arg_0
.
content
.
has_key
(
arg_5
)
:
arg_0
.
content
[
arg_5
]
=
[
]
try
:
arg_0
.
content
[
arg_5
]
.
append
(
arg_7
(
arg_5
,
arg_3
,
arg_6
)
)
except
Empty
:
pass
else
:
return

def Func(arg_0,arg_1):
        """Parse single RFC2425 record and update attributes of `self`.

        :Parameters:
            - `data`: the record (probably multiline)
        :Types:
            - `data`: `unicode`"""
        arg_2,arg_3=arg_1.split(":",1)
        arg_3=arg_3.replace("\\n","\n").replace("\\N","\n")
        arg_4=arg_2.lower().split(";")
        arg_5=arg_4[0]
        arg_6=arg_4[1:]
        if u"." in arg_5:
            arg_5=arg_5.split(".",1)[1]
        arg_5=arg_5.upper()
        if arg_5 in (u"X-DESC",u"X-JABBERID"):
            arg_5=arg_5[2:]
        if not arg_0.components.has_key(arg_5):
            return
        if arg_6:
            arg_6=dict([p.split("=",1) for p in arg_6])
        arg_7,arg_8=arg_0.components[arg_5]
        if arg_8 in ("required","optional"):
            if arg_0.content.has_key(arg_5):
                raise ValueError("Duplicate %s" % (arg_5,))
            try:
                arg_0.content[arg_5]=arg_7(arg_5,arg_3,arg_6)
            except Empty:
                pass
        elif arg_8=="multi":
            if not arg_0.content.has_key(arg_5):
                arg_0.content[arg_5]=[]
            try:
                arg_0.content[arg_5].append(arg_7(arg_5,arg_3,arg_6))
            except Empty:
                pass
        else:
            return

Parse single RFC2425 record and update attributes of self .


Apply cu1 from ctl to tgt with angle theta.

return self.append(Cu1Gate(theta), [ctl, tgt], [])

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

def Func(arg_0, arg_1, arg_2, arg_3):
    """Apply Func from ctl to tgt with angle theta."""
    return arg_0.append(Cu1Gate(arg_1), [arg_2, arg_3], [])

Apply cu1 from ctl to tgt with angle theta .


def Func ( arg_0 , arg_1 , arg_2 ) : if arg_1 not in arg_0 or arg_2 not in arg_0 [ arg_1 ] : arg_0 . setdefault ( arg_1 , [ ] ) . append ( arg_2 )

def Func(arg_0, arg_1, arg_2):
        """Register passed `processor` for passed `mimetype`."""
        if arg_1 not in arg_0 or arg_2 not in arg_0[arg_1]:
            arg_0.setdefault(arg_1, []).append(arg_2)

Register passed processor for passed mimetype .


def Func ( arg_0 , arg_1 ) : arg_2 = super ( PostgresDbWriter , arg_0 ) . Func ( arg_1 ) for arg_3 in arg_2 : arg_0 . execute ( arg_3 )

def Func(arg_0, arg_1):
        """Send DDL to create the specified `table` constraints

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

        Returns None
        """
        arg_2 = super(PostgresDbWriter, arg_0).Func(arg_1)
        for arg_3 in arg_2:
            arg_0.execute(arg_3)

Send DDL to create the specified table constraints


def Func(arg_0, arg_1, arg_2):
    """Export all Func from a build"""
    LOG.info("Running scout export Func")
    arg_3 = arg_0.obj['adapter']

    arg_4 = arg_3.all_Func(arg_1=arg_1)
    if arg_2:
        click.echo(dumps(arg_4))
        return

    arg_5 = ("{0}\t{1}\t{2}\t{3}\t{4}")
    click.echo("#Chromosom\tStart\tEnd\tHgnc_id\tHgnc_symbol")
    for arg_6 in arg_4:
        click.echo(arg_5.format(
            arg_6['chromosome'],
            arg_6['start'],
            arg_6['end'],
            arg_6['hgnc_id'],
            arg_6['hgnc_symbol'],
        ))


(prefix="tmp_",
                       suffix="",
                       directory=None)

def Func ( arg_0 = "tmp_" , arg_1 = "" , arg_2 = None ) : try : arg_3 , arg_4 = mkstemp ( arg_0 = arg_0 , arg_1 = arg_1 , dir = arg_2 ) os . close ( arg_3 ) except IOError , e : try : os . remove ( arg_4 ) except Exception : pass raise e return arg_4

def Func(arg_0="tmp_",
                       arg_1="",
                       arg_2=None):
    """Generate a safe and closed filepath."""
    try:
        arg_3, arg_4 = mkstemp(arg_0=arg_0,
                                    arg_1=arg_1,
                                    dir=arg_2)
        os.close(arg_3)
    except IOError, e:
        try:
            os.remove(arg_4)
        except Exception:
            pass
        raise e
    return arg_4


def Func(arg_0):
        """Displays the default pipeline inspection overview
        """

        arg_1 = True

        arg_0.screen = curses.initscr()

        arg_0.screen.keypad(True)
        arg_0.screen.nodelay(-1)
        curses.cbreak()
        curses.noecho()
        curses.start_color()

        arg_0.screen_lines = arg_0.screen.getmaxyx()[0]
        # self.screen_width = self.screen.getmaxyx()[1]

        try:
            while arg_1:

                # Provide functionality to certain keybindings
                arg_0._curses_keybindings()
                # Updates main inspector attributes
                arg_0.update_inspection()
                # Display curses interface
                arg_0.flush_overview()

                sleep(arg_0.refresh_rate)
        except FileNotFoundError:
            sys.stderr.write(colored_print(
                "ERROR: nextflow log and/or trace files are no longer "
                "reachable!", "red_bold"))
        except Exception as e:
            sys.stderr.write(str(e))
        finally:
            curses.nocbreak()
            arg_0.screen.keypad(0)
            curses.echo()
            curses.endwin()


(self, mode, currency='$', enterprise_catalog_uuid=None)

def Func(arg_0, arg_1, arg_2='$', arg_3=None):
        """
        Get course mode's SKU discounted price after applying any entitlement available for this user.

        Returns:
            str: Discounted price of the course mode.

        """
        try:
            arg_4 = arg_0.client.baskets.calculate.get(
                sku=[arg_1['sku']],
                username=arg_0.user.username,
                catalog=arg_3,
            )
        except (SlumberBaseException, ConnectionError, Timeout) as exc:
            LOGGER.exception('Failed to get price details for sku %s due to: %s', arg_1['sku'], str(exc))
            arg_4 = {}
        arg_5 = arg_4.get('total_incl_tax', arg_1['min_price'])
        if arg_5 != arg_1['min_price']:
            return format_price(arg_5, arg_2)
        return arg_1['original_price']

Get course mode s SKU discounted price after applying any entitlement available for this user .


def Func(arg_0):
        ''' Gets back all response headers. '''

        arg_1 = c_void_p()
        _WinHttpRequest._GetAllResponseHeaders(arg_0, byref(arg_1))
        arg_1 = ctypes.cast(arg_1, c_wchar_p)
        arg_2 = arg_1.value
        _SysFreeString(arg_1)
        return arg_2


def
Func
(
arg_0
)
:
if
not
isinstance
(
arg_0
,
string_type
)
:
raise
TypeError
(
"expected str or unicode, %s given"
%
type
(
arg_0
)
)
if
findall
(
r"[\x00-\x20\x7c-\xff]"
,
arg_0
)
:
raise
ValueError
(
"invalid character in sequence"
)
arg_0
=
arg_0
.
lstrip
(
'!'
)
arg_1
=
0
arg_2
=
len
(
arg_0
)
1
for
arg_3
,
arg_4
in
enumerate
(
arg_0
)
:
arg_1
+=
(
ord
(
arg_4
)
33
)
*
(
91
**
(
arg_2
arg_3
)
)
return
arg_1
if
arg_0
!=
''
else
0

def Func(arg_0):
    """
    Takes a base91 char string and returns decimal
    """

    if not isinstance(arg_0, string_type):
        raise TypeError("expected str or unicode, %s given" % type(arg_0))

    if findall(r"[\x00-\x20\x7c-\xff]", arg_0):
        raise ValueError("invalid character in sequence")

    arg_0 = arg_0.lstrip('!')
    arg_1 = 0
    arg_2 = len(arg_0) - 1
    for arg_3, arg_4 in enumerate(arg_0):
        arg_1 += (ord(arg_4) - 33) * (91 ** (arg_2 - arg_3))

    return arg_1 if arg_0 != '' else 0


def Func ( arg_0 , arg_1 ) : arg_1 . write ( Operators . ITEBV ( arg_1 . size , arg_0 . OF == False , 1 , 0 ) )

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

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


def
Func
(
arg_0
,
arg_1
,
arg_2
=
{
}
)
:
arg_3
,
arg_4
=
arg_1
try
:
arg_5
=
arg_0
.
_formatter
.
format_map
(
arg_4
,
arg_2
)
arg_6
=
arg_0
.
_formatter
.
get_unused_kwargs
(
)
arg_7
=
"{0}{1}"
.
format
(
arg_0
.
_url
,
arg_5
)
return
arg_0
.
_request
(
arg_3
,
arg_7
,
arg_6
)
except
KeyError
as
err
:
LOGGER
.
debug
(
'Endpoint {0} is missing argument {1}'
.
format
(
arg_4
,
err
)
)
raise

def Func(arg_0, arg_1, arg_2={}):
        """Format the endpoint url by data and then request the remote server.

        Args:
            command(Command): WebDriver command to be Funcd.
            data(dict): Data fulfill the uri template and json body.

        Returns:
            A dict represent the json body from server response.

        Raises:
            KeyError: Data cannot fulfill the variable which command needed.
            ConnectionError: Meet network problem (e.g. DNS failure,
                refused connection, etc).
            Timeout: A request times out.
            HTTPError: HTTP request returned an unsuccessful status code.
        """
        arg_3, arg_4 = arg_1
        try:
            arg_5 = arg_0._formatter.format_map(arg_4, arg_2)
            arg_6 = arg_0._formatter.get_unused_kwargs()
            arg_7 = "{0}{1}".format(arg_0._url, arg_5)
            return arg_0._request(arg_3, arg_7, arg_6)
        except KeyError as err:
            LOGGER.debug(
                'Endpoint {0} is missing argument {1}'.format(arg_4, err))
            raise

Format the endpoint url by data and then request the remote server.

        Args:
            command(Command): WebDriver command to be executed.
            data(dict): Data fulfill the uri template and json body.

        Returns:
            A dict represent the json body from server response.

        Raises:
            KeyError: Data cannot fulfill the variable which command needed.
            ConnectionError: Meet network problem (e.g. DNS failure,
                refused connection, etc).
            Timeout: A request times out.
            HTTPError: HTTP request returned an unsuccessful status code.

Format the endpoint url by data and then request the remote server .


def Func(arg_0=None, arg_1=False):
    """Init and configure logger."""
    Func = logging.getLogger(arg_0)

    if arg_1:
        arg_3 = '%(asctime)s [%(levelname)s] [%(name)s] %(funcName)s: %(message)s (line %(lineno)d)'
        arg_4 = 'fut.log'  # TODO: define logpath
        open(arg_4, 'w').write('')  # remove old logs
        Func.setLevel(logging.DEBUG)
        arg_5 = logging.FileHandler(arg_4)
        arg_5.setFormatter(logging.Formatter(arg_3))
    else:
        arg_5 = NullHandler()

    Func.addHandler(arg_5)

    return Func


def Func(arg_0, arg_1):
        """ Forward the close event to every tabs contained by the windows
        """
        if arg_0.tab_widget.count() == 0:
            # no tabs, just close
            arg_1.accept()
            return
        # Do Not loop on the widget count as it change while closing
        arg_2 = arg_0.window().windowTitle()
        arg_3 = QtGui.QMessageBox.Cancel
        arg_4 = QtGui.QMessageBox.Ok

        if arg_0.confirm_exit:
            if arg_0.tab_widget.count() > 1:
                arg_5 = "Close all tabs, stop all kernels, and Quit?"
            else:
                arg_5 = "Close console, stop kernel, and Quit?"
            arg_6 = "Kernels not started here (e.g. notebooks) will be left alone."
            arg_7 = QtGui.QPushButton("&Quit", arg_0)
            arg_7.setShortcut('Q')
            arg_8 = QtGui.QMessageBox(QtGui.QMessageBox.Question,
                                    arg_2, arg_5)
            arg_8.setInformativeText(arg_6)
            arg_8.addButton(arg_3)
            arg_8.addButton(arg_7, QtGui.QMessageBox.YesRole)
            arg_8.setDefaultButton(arg_7)
            arg_8.setEscapeButton(arg_3)
            arg_9 = QtGui.QPixmap(arg_0._app.icon.pixmap(QtCore.QSize(64,64)))
            arg_8.setIconPixmap(arg_9)
            arg_10 = arg_8.exec_()
        else:
            arg_10 = arg_4

        if arg_10 == arg_3:
            arg_1.ignore()
            return
        if arg_10 == arg_4:
            while arg_0.tab_widget.count() >= 1:
                # prevent further confirmations:
                arg_11 = arg_0.active_frontend
                arg_11._confirm_exit = False
                arg_0.close_tab(arg_11)
            arg_1.accept()


def Func(arg_0, arg_1):
        """
        Checks to see if the given repo has a ReadMe. MD means it has a correct
        Readme recognized by GitHub.
        """
        arg_2 = arg_1.readme()
        if arg_2 is not None:
            arg_0.total_readmes += 1
            return 'MD'
        if arg_0.search_limit >= 28:
            print 'Hit search limit. Sleeping for 60 sec.'
            time.sleep(60)
            arg_0.search_limit = 0
        arg_0.search_limit += 1
        arg_4 = arg_0.logged_in_gh.search_code('readme'
            + 'in:path repo:' + arg_1.full_name)
        try:
            for arg_5 in arg_4:
                arg_6 = arg_5.path[1:]
                if '/' not in arg_6 and 'readme' in arg_6.lower():
                    arg_0.total_readmes += 1
                    return arg_6
            return 'MISS'
        except (github3.models.GitHubError, StopIteration) as e:
            return 'MISS'

Checks to see if the given repo has a ReadMe . MD means it has a correct Readme recognized by GitHub .


(image, annos, mask=None, zoom_range=(0.8, 1.2))

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = ( 0.8 , 1.2 ) ) : arg_4 = arg_0 . shape [ 0 ] arg_5 = arg_0 . shape [ 1 ] arg_6 , arg_7 = arg_3 arg_8 = np . random . uniform ( arg_6 , arg_7 ) arg_9 = np . random . uniform ( arg_6 , arg_7 ) arg_10 = int ( arg_5 * arg_8 ) arg_11 = int ( arg_4 * arg_9 ) arg_12 = cv2 . resize ( arg_0 , ( arg_10 , arg_11 ) , interpolation = cv2 . INTER_AREA ) if arg_2 is not None : arg_2 = cv2 . resize ( arg_2 , ( arg_10 , arg_11 ) , interpolation = cv2 . INTER_AREA ) arg_13 = [ ] for arg_14 in arg_1 : arg_15 = [ ] for arg_16 in arg_14 : if arg_16 [ 0 ] < - 100 or arg_16 [ 1 ] < - 100 : arg_15 . append ( ( - 1000 , - 1000 ) ) continue arg_15 . append ( ( int ( arg_16 [ 0 ] * arg_8 + 0.5 ) , int ( arg_16 [ 1 ] * arg_9 + 0.5 ) ) ) arg_13 . append ( arg_15 ) if arg_2 is not None : return arg_12 , arg_13 , arg_2 else : return arg_12 , arg_13 , None

def Func(arg_0, arg_1, arg_2=None, arg_3=(0.8, 1.2)):
    """Randomly resize an image and corresponding keypoints.
    The height and width of image will be changed independently, so the scale will be changed.

    Parameters
    -----------
    image : 3 channel image
        The given image for augmentation.
    annos : list of list of floats
        The keypoints annotation of people.
    mask : single channel image or None
        The mask if available.
    zoom_range : tuple of two floats
        The minimum and maximum factor to zoom in or out, e.g (0.5, 1) means zoom out 1~2 times.

    Returns
    ----------
    preprocessed image, annos, mask

    """
    arg_4 = arg_0.shape[0]
    arg_5 = arg_0.shape[1]
    arg_6, arg_7 = arg_3
    arg_8 = np.random.uniform(arg_6, arg_7)
    arg_9 = np.random.uniform(arg_6, arg_7)

    arg_10 = int(arg_5 * arg_8)
    arg_11 = int(arg_4 * arg_9)

    arg_12 = cv2.resize(arg_0, (arg_10, arg_11), interpolation=cv2.INTER_AREA)
    if arg_2 is not None:
        arg_2 = cv2.resize(arg_2, (arg_10, arg_11), interpolation=cv2.INTER_AREA)
    # adjust meta data
    arg_13 = []
    for arg_14 in arg_1:  # TODO : speed up with affine transform
        arg_15 = []
        for arg_16 in arg_14:
            if arg_16[0] < -100 or arg_16[1] < -100:
                arg_15.append((-1000, -1000))
                continue
            arg_15.append((int(arg_16[0] * arg_8 + 0.5), int(arg_16[1] * arg_9 + 0.5)))
        arg_13.append(arg_15)
    if arg_2 is not None:
        return arg_12, arg_13, arg_2
    else:
        return arg_12, arg_13, None

Randomly resize an image and corresponding keypoints . The height and width of image will be changed independently so the scale will be changed .


def Func ( arg_0 ) : arg_1 = open ( os . path . expanduser ( '~/.planarradpy/log/libplanarradpy.log' ) ) arg_0 . uiLog . textEdit . setPlainText ( str ( arg_1 . read ( ) ) ) arg_0 . log_window . show ( )

def Func(arg_0):
        """
        The following opens the log file of PlanarRad.
        """
        """
        TO DO.
        """
        # webbrowser.open('https://marrabld.github.io/planarradpy/')
        arg_1 = open(os.path.expanduser('~/.planarradpy/log/libplanarradpy.log'))
        # self.uiLog.textEdit.setText(str(f.readlines()))
        arg_0.uiLog.textEdit.setPlainText(str(arg_1.read()))
        arg_0.log_window.show()

The following opens the log file of PlanarRad .


def Func ( arg_0 , arg_1 , arg_2 = True ) : try : del arg_0 . store [ arg_1 ] except Exception as error : pass if arg_2 : arg_0 . flush ( )

def Func(arg_0, arg_1, arg_2=True):
        """Retrieve value from store.

        :param key: Key

        """
        try:
            del arg_0.store[arg_1]
        except Exception as error:
            pass
        if arg_2:
            arg_0.flush()


def Func ( arg_0 ) : arg_1 = 0 for arg_2 in arg_0 : if arg_2 [ 'type' ] == ENTER : arg_1 += 1 elif arg_2 [ 'type' ] == EXIT : if arg_1 == 0 : break arg_1 -= 1 yield arg_2

def Func(arg_0):
    """selects sub-tree events"""
    arg_1 = 0
    for arg_2 in arg_0:
        if arg_2['type'] == ENTER:
            arg_1 += 1
        elif arg_2['type'] == EXIT:
            if arg_1 == 0:
                break
            arg_1 -= 1
        yield arg_2


def Func ( arg_0 , arg_1 ) : return arg_0 . time_parser . parse ( arg_0 . parse_keyword ( Keyword . WHERE , arg_1 ) )

def Func(arg_0, arg_1):
        """
        Parse the date range for the query

        E.g. WHERE time > now() - 48h AND time < now() - 24h
        would result in DateRange(datetime_start, datetime_end)
        where
        datetime_start would be parsed from now() - 48h
        and
        datetime_end would be parsed from now() - 24h

        :param tokens:
        :return:
        """
        return arg_0.time_parser.parse(arg_0.parse_keyword(Keyword.WHERE, arg_1))


def Func ( arg_0 , arg_1 ) : for arg_2 in arg_1 . _fields : setattr ( arg_1 , arg_2 , arg_0 . visit ( getattr ( arg_1 , arg_2 ) ) ) return arg_1

def Func(arg_0, arg_1):
        """Called if no explicit visitor function exists for a node."""
        for arg_2 in arg_1._fields:
            setattr(arg_1, arg_2, arg_0.visit(getattr(arg_1, arg_2)))
        return arg_1

Called if no explicit visitor function exists for a node .


(self, data: List[Iterable], labels: Iterable[list])

def Func(arg_0, arg_1: arg_2[arg_3], arg_4: arg_3[arg_5]) -> None:
        """Trains model on a single batch

        Args:
            data: a batch of word sequences
            labels: a batch of correct tag sequences
        Returns:
            the trained model
        """
        arg_6, arg_7 = arg_0._transform_batch(arg_1, arg_4)
        arg_0.model_.Func(arg_6, arg_7)


def Func(arg_0):
        ''' Method to refresh API tokens from ecobee '''
        arg_1 = 'https://api.ecobee.com/token'
        arg_2 = {'grant_type': 'refresh_token',
                  'refresh_token': arg_0.refresh_token,
                  'client_id': arg_0.api_key}
        arg_3 = requests.post(arg_1, arg_2=arg_2)
        if arg_3.status_code == requests.codes.ok:
            arg_0.access_token = arg_3.json()['access_token']
            arg_0.refresh_token = arg_3.json()['refresh_token']
            arg_0.write_tokens_to_file()
            return True
        else:
            arg_0.request_pin()


def Func(arg_0, arg_1="default", arg_2=None):
        """Redo selection, for the name."""
        logger.debug("redo")
        arg_2 = arg_2 or arg_0.executor
        assert arg_0.selection_can_redo(arg_1=arg_1)
        arg_3 = arg_0.selection_histories[arg_1]
        arg_4 = arg_0.selection_history_indices[arg_1]
        arg_5 = arg_3[arg_4 + 1]
        arg_0.selection_history_indices[arg_1] += 1
        arg_0.signal_selection_changed.emit(arg_0)
        logger.debug("redo: selection history is %r, index is %r", arg_3, arg_4)


def Func(arg_0):
        """Returns the Gerrit argument parser."""

        arg_1 = BackendCommandArgumentParser(arg_0.BACKEND.CATEGORIES,
                                              from_date=True,
                                              archive=True)

        # Gerrit options
        arg_2 = arg_1.parser.add_argument_group('Gerrit arguments')
        arg_2.add_argument('--user', dest='user',
                           help="Gerrit ssh user")
        arg_2.add_argument('--max-reviews', dest='max_reviews',
                           type=int, default=MAX_REVIEWS,
                           help="Max number of reviews per ssh query.")
        arg_2.add_argument('--blacklist-reviews', dest='blacklist_reviews',
                           nargs='*',
                           help="Wrong reviews that must not be retrieved.")
        arg_2.add_argument('--disable-host-key-check', dest='disable_host_key_check', action='store_true',
                           help="Don't check remote host identity")
        arg_2.add_argument('--ssh-port', dest='port',
                           default=PORT, type=int,
                           help="Set SSH port of the Gerrit server")

        # Required arguments
        arg_1.parser.add_argument('hostname',
                                   help="Hostname of the Gerrit server")

        return arg_1


def Func ( arg_0 ) : arg_1 = arg_0 . image_set . all ( ) arg_2 = arg_0 . update_set . values_list ( 'id' , flat = True ) arg_3 = UpdateImage . objects . filter ( update__id__in = arg_2 ) return list ( chain ( arg_1 , arg_3 ) )

def Func(arg_0):
        """
        Returns chained list of event and update images.
        """
        arg_1 = arg_0.image_set.all()
        arg_2 = arg_0.update_set.values_list('id', flat=True)
        arg_3 = UpdateImage.objects.filter(update__id__in=arg_2)

        return list(chain(arg_1, arg_3))

Returns chained list of event and update images .


return _safe_repr(o, context, maxlevels, level)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
        """Format o for a specific context, returning a string
        and flags indicating whether the representation is 'readable'
        and whether the o represents a recursive construct.
        """
        return _safe_repr(arg_1, arg_2, arg_3, arg_4)

Format o for a specific context returning a string and flags indicating whether the representation is readable and whether the o represents a recursive construct .


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
if
arg_2
==
'NHWC'
:
return
tf
.
add
(
arg_0
,
arg_1
)
elif
arg_2
==
'NCHW'
:
return
tf
.
add
(
arg_0
,
_to_channel_first_bias
(
arg_1
)
)
else
:
raise
ValueError
(
'invalid data_format: %s'
%
arg_2
)

def Func(arg_0, arg_1, arg_2):
    """Alternative implementation of tf.nn.bias_add which is compatiable with tensorRT."""
    if arg_2 == 'NHWC':
        return tf.add(arg_0, arg_1)
    elif arg_2 == 'NCHW':
        return tf.add(arg_0, _to_channel_first_bias(arg_1))
    else:
        raise ValueError('invalid data_format: %s' % arg_2)

Alternative implementation of tf . nn . bias_add which is compatiable with tensorRT .


def Func ( arg_0 , arg_1 ) : arg_2 = apps . get_model ( 'enterprise' , 'EnterpriseCustomerUser' ) try : return arg_2 . objects . get ( enterprise_customer__uuid = arg_1 , arg_0 = arg_0 ) except arg_2 . DoesNotExist : return None

def Func(arg_0, arg_1):
    """
    Return the object for EnterpriseCustomerUser.

    Arguments:
        user_id (str): user identifier
        enterprise_uuid (UUID): Universally unique identifier for the enterprise customer.

    Returns:
        (EnterpriseCustomerUser): enterprise customer user record

    """
    arg_2 = apps.get_model('enterprise', 'EnterpriseCustomerUser')  # pylint: disable=invalid-name
    try:
        return arg_2.objects.get(  # pylint: disable=no-member
            enterprise_customer__uuid=arg_1,
            arg_0=arg_0
        )
    except arg_2.DoesNotExist:
        return None

Return the object for EnterpriseCustomerUser .


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
arg_1
.
beginEditBlock
(
)
arg_1
.
insertHtml
(
arg_2
)
arg_1
.
movePosition
(
QtGui
.
QTextCursor
.
Left
,
QtGui
.
QTextCursor
.
KeepAnchor
)
if
arg_1
.
selection
(
)
.
toPlainText
(
)
==
' '
:
arg_1
.
removeSelectedText
(
)
else
:
arg_1
.
movePosition
(
QtGui
.
QTextCursor
.
Right
)
arg_1
.
insertText
(
' '
,
QtGui
.
QTextCharFormat
(
)
)
arg_1
.
endEditBlock
(
)

def Func(arg_0, arg_1, arg_2):
        """ Inserts HTML using the specified cursor in such a way that future
            formatting is unaffected.
        """
        arg_1.beginEditBlock()
        arg_1.insertHtml(arg_2)

        # After inserting HTML, the text document "remembers" it's in "html
        # mode", which means that subsequent calls adding plain text will result
        # in unwanted formatting, lost tab characters, etc. The following code
        # hacks around this behavior, which I consider to be a bug in Qt, by
        # (crudely) resetting the document's style state.
        arg_1.movePosition(QtGui.QTextCursor.Left,
                            QtGui.QTextCursor.KeepAnchor)
        if arg_1.selection().toPlainText() == ' ':
            arg_1.removeSelectedText()
        else:
            arg_1.movePosition(QtGui.QTextCursor.Right)
        arg_1.insertText(' ', QtGui.QTextCharFormat())
        arg_1.endEditBlock()

Inserts HTML using the specified cursor in such a way that future formatting is unaffected .


def Func ( arg_0 , arg_1 , arg_2 ) : if not arg_1 . startswith ( "secure." ) : arg_1 = "secure.{0}" . format ( arg_1 ) arg_0 . config . Func_value ( arg_1 , arg_2 ) arg_0 . config . write ( )

def Func(arg_0, arg_1, arg_2):
        """
        Set a decrypted value by key in a giraffez configuration file.

        :param str key: The key used to lookup the encrypted value
        :param value: Value to Func at the given key, can be any value that is
            YAML serializeable.
        """
        if not arg_1.startswith("secure."):
            arg_1 = "secure.{0}".format(arg_1)
        arg_0.config.Func_value(arg_1, arg_2)
        arg_0.config.write()

Set a decrypted value by key in a giraffez configuration file.

        :param str key: The key used to lookup the encrypted value
        :param value: Value to set at the given key, can be any value that is
            YAML serializeable.

Set a decrypted value by key in a giraffez configuration file .


def Func ( arg_0 ) : arg_1 = collections . defaultdict ( dict ) for arg_2 , arg_3 in iteritems ( arg_0 ) : arg_4 , arg_5 = arg_2 . split ( '.' , 1 ) arg_6 = arg_1 [ arg_4 ] [ arg_5 ] = { } arg_6 [ 'formats' ] = [ 'json' , 'human' ] arg_6 [ 'method' ] = 'POST' arg_6 [ 'optional' ] = { } arg_6 [ 'required' ] = { } for arg_7 , arg_8 in iteritems ( dict ( arg_3 [ 'params' ] ) ) : arg_9 = 'required' arg_10 = 'string' arg_8 = TYPE_INFO_COMMENT_RE . sub ( '' , arg_8 ) arg_11 = TYPE_INFO_SPLITTER_RE . findall ( arg_8 ) for arg_12 in arg_11 : if arg_12 in ( 'optional' , 'required' ) : arg_9 = arg_12 elif arg_12 == 'ignored' : arg_9 = 'optional' arg_10 = 'string' elif arg_12 == 'nonempty' : arg_9 = 'required' elif arg_12 == 'deprecated' : arg_9 = 'optional' else : arg_10 = arg_12 arg_6 [ arg_9 ] [ arg_7 ] = map_param_type ( arg_10 ) return dict ( arg_1 )

def Func(arg_0):
    """
    Parse the conduit.query json dict response
    This performs the logic of parsing the non-standard params dict
        and then returning a dict Resource can understand
    """
    arg_1 = collections.defaultdict(dict)

    for arg_2, arg_3 in iteritems(arg_0):
        arg_4, arg_5 = arg_2.split('.', 1)

        arg_6 = arg_1[arg_4][arg_5] = {}

        # Make default assumptions since these aren't provided by Phab
        arg_6['formats'] = ['json', 'human']
        arg_6['method'] = 'POST'

        arg_6['optional'] = {}
        arg_6['required'] = {}

        for arg_7, arg_8 in iteritems(dict(arg_3['params'])):
            # Set the defaults
            arg_9 = 'required'
            arg_10 = 'string'

            # Usually in the format: <optionality> <param_type>
            arg_8 = TYPE_INFO_COMMENT_RE.sub('', arg_8)
            arg_11 = TYPE_INFO_SPLITTER_RE.findall(arg_8)
            for arg_12 in arg_11:
                if arg_12 in ('optional', 'required'):
                    arg_9 = arg_12
                elif arg_12 == 'ignored':
                    arg_9 = 'optional'
                    arg_10 = 'string'
                elif arg_12 == 'nonempty':
                    arg_9 = 'required'
                elif arg_12 == 'deprecated':
                    arg_9 = 'optional'
                else:
                    arg_10 = arg_12

            arg_6[arg_9][arg_7] = map_param_type(arg_10)

    return dict(arg_1)

Parse the conduit . query json dict response This performs the logic of parsing the non - standard params dict and then returning a dict Resource can understand


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
get_sections
(
arg_1
)
if
not
arg_2
:
raise
ValueError
(
'No sections found in {} rcfiles.'
.
format
(
arg_1
)
)
for
arg_3
in
arg_2
:
try
:
arg_4
=
get_rcfile_variable_value
(
arg_0
,
section_name
=
arg_3
,
arg_1
=
arg_1
)
except
:
pass
else
:
return
arg_3
,
arg_4
raise
KeyError
(
'No variable {} has been found in {} '
'rcfiles.'
.
format
(
arg_0
,
arg_1
)
)

def Func(arg_0, arg_1):
    """ Return the section and the value of the variable where the first
    var_name is found in the app_name rcfiles.

    Parameters
    ----------
    var_name: str
        Name of the variable to be searched for.

    app_name: str
        Name of the application to look for its rcfiles.

    Returns
    -------
    section_name: str
        Name of the section in the rcfiles where var_name was first found.

    var_value: str
        The value of the first variable with given var_name.
    """
    arg_2 = get_sections(arg_1)

    if not arg_2:
        raise ValueError('No sections found in {} rcfiles.'.format(arg_1))

    for arg_3 in arg_2:
        try:
            arg_4 = get_rcfile_variable_value(arg_0, section_name=arg_3,
                                                  arg_1=arg_1)
        except:
            pass
        else:
            return arg_3, arg_4

    raise KeyError('No variable {} has been found in {} '
                   'rcfiles.'.format(arg_0, arg_1))

Return the section and the value of the variable where the first var_name is found in the app_name rcfiles .


return value + sep + self.get_signature(value)

def Func(arg_0, arg_1):
        """Signs the given string and also attaches a time information."""
        arg_1 = want_bytes(arg_1)
        arg_2 = base64_encode(int_to_bytes(arg_0.get_timestamp()))
        arg_3 = want_bytes(arg_0.sep)
        arg_1 = arg_1 + arg_3 + arg_2
        return arg_1 + arg_3 + arg_0.get_Funcature(arg_1)

Signs the given string and also attaches a time information .


def Func(arg_0, arg_1, arg_2):
        """
        Registers `block` to `block_type` in the registry.
        """

        arg_0._verify_block(arg_1, arg_2)
        arg_0._registry[arg_1] = arg_2

Registers block to block_type in the registry .


def Func ( arg_0 ) : if arg_0 . physical_plan : arg_1 = list ( arg_0 . physical_plan . stmgrs ) return map ( lambda s : s . host_name , arg_1 ) return [ ]

def Func(arg_0):
    """
    Get all the machines that this topology is running on.
    These are the hosts of all the stmgrs.
    """
    if arg_0.physical_plan:
      arg_1 = list(arg_0.physical_plan.stmgrs)
      return map(lambda s: s.host_name, arg_1)
    return []

Get all the machines that this topology is running on . These are the hosts of all the stmgrs .