(self,
              uid=None,
              offset=None,
              **kwargs)

def Func(arg_0,
              arg_1=None,
              arg_2=None,
              **arg_3):
        """
        Rekey an existing key.

        Args:
            uid (string): The unique ID of the symmetric key to Func.
                Optional, defaults to None.
            offset (int): The time delta, in seconds, between the new key's
                initialization date and activation date. Optional, defaults
                to None.
            **kwargs (various): A placeholder for object attributes that
                should be set on the newly Funced key. Currently
                supported attributes include:
                    activation_date (int)
                    process_start_date (int)
                    protect_stop_date (int)
                    deactivation_date (int)

        Returns:
            string: The unique ID of the newly Funced key.

        Raises:
            ClientConnectionNotOpen: if the client connection is unusable
            KmipOperationFailure: if the operation result is a failure
            TypeError: if the input arguments are invalid
        """
        if arg_1 is not None:
            if not isinstance(arg_1, six.string_types):
                raise TypeError("The unique identifier must be a string.")
        if arg_2 is not None:
            if not isinstance(arg_2, six.integer_types):
                raise TypeError("The offset must be an integer.")

        # TODO (peter-hamilton) Unify attribute handling across operations
        arg_4 = []
        if arg_3.get('activation_date'):
            arg_4.append(
                arg_0.attribute_factory.create_attribute(
                    enums.AttributeType.ACTIVATION_DATE,
                    arg_3.get('activation_date')
                )
            )
        if arg_3.get('process_start_date'):
            arg_4.append(
                arg_0.attribute_factory.create_attribute(
                    enums.AttributeType.PROCESS_START_DATE,
                    arg_3.get('process_start_date')
                )
            )
        if arg_3.get('protect_stop_date'):
            arg_4.append(
                arg_0.attribute_factory.create_attribute(
                    enums.AttributeType.PROTECT_STOP_DATE,
                    arg_3.get('protect_stop_date')
                )
            )
        if arg_3.get('deactivation_date'):
            arg_4.append(
                arg_0.attribute_factory.create_attribute(
                    enums.AttributeType.DEACTIVATION_DATE,
                    arg_3.get('deactivation_date')
                )
            )
        arg_5 = cobjects.TemplateAttribute(
            arg_4=arg_4
        )

        # Derive the new key/data and handle the results
        arg_6 = arg_0.proxy.Func(
            uuid=arg_1,
            arg_2=arg_2,
            arg_5=arg_5
        )

        arg_7 = arg_6.get('result_status')
        if arg_7 == enums.ResultStatus.SUCCESS:
            return arg_6.get('unique_identifier')
        else:
            raise exceptions.KmipOperationFailure(
                arg_7,
                arg_6.get('result_reason'),
                arg_6.get('result_message')
            )

Rekey an existing key.

        Args:
            uid (string): The unique ID of the symmetric key to rekey.
                Optional, defaults to None.
            offset (int): The time delta, in seconds, between the new key's
                initialization date and activation date. Optional, defaults
                to None.
            **kwargs (various): A placeholder for object attributes that
                should be set on the newly rekeyed key. Currently
                supported attributes include:
                    activation_date (int)
                    process_start_date (int)
                    protect_stop_date (int)
                    deactivation_date (int)

        Returns:
            string: The unique ID of the newly rekeyed key.

        Raises:
            ClientConnectionNotOpen: if the client connection is unusable
            KmipOperationFailure: if the operation result is a failure
            TypeError: if the input arguments are invalid


def Func ( arg_0 , arg_1 ) : arg_2 = get ( arg_0 , 'app.all_environments' , { } ) arg_3 = get ( arg_0 , 'app.environments.' + str ( arg_1 ) , { } ) return merge_dict ( arg_2 , arg_3 )

def Func(arg_0, arg_1):
    """
    Parses an environment config
    """
    arg_2 = get(arg_0, 'app.all_environments', {})
    arg_3 = get(arg_0, 'app.environments.' + str(arg_1), {})
    return merge_dict(arg_2, arg_3)


(self, simple_dag_bag,
                                                  simple_task_instances)

def Func(arg_0, arg_1,
                                                  arg_2):
        """
        Takes task_instances, which should have been set to queued, and enqueues them
        with the executor.

        :param simple_task_instances: TaskInstances to enqueue
        :type simple_task_instances: list[SimpleTaskInstance]
        :param simple_dag_bag: Should contains all of the task_instances' dags
        :type simple_dag_bag: airflow.utils.dag_processing.SimpleDagBag
        """
        arg_3 = models.TaskInstance
        # actually enqueue them
        for arg_4 in arg_2:
            arg_5 = arg_1.get_dag(arg_4.dag_id)
            arg_6 = arg_3.generate_command(
                arg_4.dag_id,
                arg_4.task_id,
                arg_4.execution_date,
                local=True,
                mark_success=False,
                ignore_all_deps=False,
                ignore_depends_on_past=False,
                ignore_task_deps=False,
                ignore_ti_state=False,
                pool=arg_4.pool,
                file_path=arg_5.full_filepath,
                pickle_id=arg_5.pickle_id)

            arg_7 = arg_4.priority_weight
            arg_8 = arg_4.queue
            arg_0.log.info(
                "Sending %s to executor with priority %s and queue %s",
                arg_4.key, arg_7, arg_8
            )

            arg_0.executor.queue_command(
                arg_4,
                arg_6,
                arg_7=arg_7,
                arg_8=arg_8)

Takes task_instances which should have been set to queued and enqueues them with the executor .


(self, tree_alias, tree_items, navigation_type)

def Func(arg_0, arg_1, arg_2, arg_3):
        """Updates 'has_children' attribute for tree items inplace.

        :param str|unicode tree_alias:
        :param list tree_items:
        :param str|unicode navigation_type: sitetree, breadcrumbs, menu
        """
        arg_4 = arg_0.get_children
        arg_5 = arg_0.filter_items
        arg_6 = arg_0.apply_hook

        for arg_7 in arg_2:
            arg_8 = arg_4(arg_1, arg_7)
            arg_8 = arg_5(arg_8, arg_3)
            arg_8 = arg_6(arg_8, '%s.has_children' % arg_3)
            arg_7.has_children = len(arg_8) > 0

Updates has_children attribute for tree items inplace .


def
Func
(
arg_0
)
:
arg_1
=
{
arg_0
.
PLOGOUT
:
'1'
}
arg_0
.
call
(
arg_0
.
CGI_LOGIN
,
arg_1
)
arg_0
.
_close_http_session
(
)
logger
.
debug
(
"Bugzilla user logged out from %s"
,
arg_0
.
base_url
)

def Func(arg_0):
        """Logout from the server."""

        arg_1 = {
            arg_0.PLOGOUT: '1'
        }

        arg_0.call(arg_0.CGI_LOGIN, arg_1)
        arg_0._close_http_session()

        logger.debug("Bugzilla user logged out from %s",
                     arg_0.base_url)


(code_block, example_globals, image_path, fig_count,
                   src_file, gallery_conf)

return code_output, time_elapsed, fig_count + len(figure_list)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
,
arg_4
,
arg_5
)
:
arg_6
=
0
arg_7
=
''
print
(
'plotting code blocks in %s'
%
arg_4
)
plt
.
close
(
'all'
)
arg_8
=
os
.
getcwd
(
)
arg_9
=
arg_12
.
stdout
try
:
os
.
chdir
(
os
.
path
.
dirname
(
arg_4
)
)
arg_10
=
StringIO
(
)
arg_11
=
Tee
(
arg_12
.
stdout
,
arg_10
)
arg_12
.
stdout
=
arg_11
arg_13
=
time
(
)
exec
(
arg_0
,
arg_1
)
arg_6
=
time
(
)
arg_13
arg_12
.
stdout
=
arg_9
arg_11
=
arg_10
.
getvalue
(
)
.
strip
(
)
.
expandtabs
(
)
if
arg_11
:
arg_7
=
CODE_OUTPUT
.
format
(
indent
(
arg_11
,
' '
*
4
)
)
os
.
chdir
(
arg_8
)
arg_14
=
save_figures
(
arg_2
,
arg_3
,
arg_5
)
arg_15
=
""
if
len
(
arg_14
)
==
1
:
arg_16
=
arg_14
[
0
]
arg_15
=
SINGLE_IMAGE
%
arg_16
.
lstrip
(
'/'
)
elif
len
(
arg_14
)
>
1
:
arg_15
=
HLIST_HEADER
for
arg_16
in
arg_14
:
arg_15
+=
HLIST_IMAGE_TEMPLATE
%
arg_16
.
lstrip
(
'/'
)
except
Exception
:
arg_17
=
traceback
.
format_exc
(
)
print
(
80
*
'_'
)
print
(
'%s is not compiling:'
%
arg_4
)
print
(
arg_17
)
print
(
80
*
'_'
)
arg_14
=
[
]
arg_15
=
codestr2rst
(
arg_17
,
lang
=
'pytb'
)
arg_18
=
os
.
path
.
join
(
glr_path_static
(
)
,
'broken_example.png'
)
shutil
.
copyfile
(
arg_18
,
os
.
path
.
join
(
arg_8
,
arg_2
.
format
(
1
)
)
)
arg_3
+=
1
if
arg_5
[
'abort_on_example_error'
]
:
raise
finally
:
os
.
chdir
(
arg_8
)
arg_12
.
stdout
=
arg_9
print
(
" - time elapsed : %.2g sec"
%
arg_6
)
arg_19
=
"\n{0}\n\n{1}\n\n"
.
format
(
arg_15
,
arg_7
)
return
arg_19
,
arg_6
,
arg_3
+
len
(
arg_14
)

def Func(arg_0, arg_1, arg_2, arg_3,
                   arg_4, arg_5):
    """Executes the code block of the example file"""
    arg_6 = 0
    arg_7 = ''

    # We need to execute the code
    print('plotting code blocks in %s' % arg_4)

    plt.close('all')
    arg_8 = os.getcwd()
    # Redirect output to stdout and
    arg_9 = arg_12.stdout

    try:
        # First cd in the original example dir, so that any file
        # created by the example get created in this directory
        os.chdir(os.path.dirname(arg_4))
        arg_10 = StringIO()
        arg_11 = Tee(arg_12.stdout, arg_10)
        arg_12.stdout = arg_11

        arg_13 = time()
        exec(arg_0, arg_1)
        arg_6 = time() - arg_13

        arg_12.stdout = arg_9

        arg_11 = arg_10.getvalue().strip().expandtabs()
        if arg_11:
            arg_7 = CODE_OUTPUT.format(indent(arg_11, ' ' * 4))
        os.chdir(arg_8)
        arg_14 = save_figures(arg_2, arg_3, arg_5)

        # Depending on whether we have one or more figures, we're using a
        # horizontal list or a single rst call to 'image'.
        arg_15 = ""
        if len(arg_14) == 1:
            arg_16 = arg_14[0]
            arg_15 = SINGLE_IMAGE % arg_16.lstrip('/')
        elif len(arg_14) > 1:
            arg_15 = HLIST_HEADER
            for arg_16 in arg_14:
                arg_15 += HLIST_IMAGE_TEMPLATE % arg_16.lstrip('/')

    except Exception:
        arg_17 = traceback.format_exc()

        print(80 * '_')
        print('%s is not compiling:' % arg_4)
        print(arg_17)
        print(80 * '_')

        arg_14 = []
        arg_15 = codestr2rst(arg_17, lang='pytb')

        # Overrides the output thumbnail in the gallery for easy identification
        arg_18 = os.path.join(glr_path_static(), 'broken_example.png')
        shutil.copyfile(arg_18, os.path.join(arg_8, arg_2.format(1)))
        arg_3 += 1  # raise count to avoid overwriting image

        # Breaks build on first example error

        if arg_5['abort_on_example_error']:
            raise

    finally:
        os.chdir(arg_8)
        arg_12.stdout = arg_9

    print(" - time elapsed : %.2g sec" % arg_6)
    arg_19 = "\n{0}\n\n{1}\n\n".format(arg_15, arg_7)

    return arg_19, arg_6, arg_3 + len(arg_14)


def
Func
(
arg_0
)
:
if
arg_0
[
0
]
.
lower
(
)
!=
"Func"
:
arg_0
.
insert
(
0
,
"Func"
)
else
:
arg_0
[
0
]
=
"Func"
try
:
logger
.
info
(
"Executing: %s"
,
' '
.
join
(
arg_0
)
)
arg_1
=
subprocess
.
Popen
(
arg_0
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
arg_2
,
arg_3
=
arg_1
.
communicate
(
)
arg_2
=
arg_2
.
decode
(
"utf-8"
)
arg_3
=
arg_3
.
decode
(
"utf-8"
)
arg_4
=
arg_1
.
returncode
return
arg_4
,
arg_2
,
arg_3
except
OSError
as
error_msg
:
logger
.
error
(
"OSError: SoX failed! %s"
,
error_msg
)
except
TypeError
as
error_msg
:
logger
.
error
(
"TypeError: %s"
,
error_msg
)
return
1
,
,

def Func(arg_0):
    '''Pass an argument list to SoX.

    Parameters
    ----------
    args : iterable
        Argument list for SoX. The first item can, but does not
        need to, be 'Func'.

    Returns:
    --------
    status : bool
        True on success.

    '''
    if arg_0[0].lower() != "Func":
        arg_0.insert(0, "Func")
    else:
        arg_0[0] = "Func"

    try:
        logger.info("Executing: %s", ' '.join(arg_0))

        arg_1 = subprocess.Popen(
            arg_0, stdout=subprocess.PIPE, stderr=subprocess.PIPE
        )

        arg_2, arg_3 = arg_1.communicate()
        arg_2 = arg_2.decode("utf-8")
        arg_3 = arg_3.decode("utf-8")

        arg_4 = arg_1.returncode
        return arg_4, arg_2, arg_3

    except OSError as error_msg:
        logger.error("OSError: SoX failed! %s", error_msg)
    except TypeError as error_msg:
        logger.error("TypeError: %s", error_msg)
    return 1, None, None

Pass an argument list to SoX.

    Parameters
    ----------
    args : iterable
        Argument list for SoX. The first item can, but does not
        need to, be 'sox'.

    Returns:
    --------
    status : bool
        True on success.


def Func(arg_0):
    """Calculates a checksum for a Finnish national reference number"""
    arg_1 = 10 - (sum([int(c) * i for c, i in zip(str(arg_0)[::-1], it.cycle((7, 3, 1)))]) % 10)
    if arg_1 == 10:
        arg_1 = 0
    return "%s%s" % (arg_0, arg_1)


def Func(arg_0, arg_1):
        """ Handles saving the current model to file.
        """
        if not arg_1.initialized:
            return

#        retval = self.edit_traits(parent=info.ui.control, view="file_view")

        arg_2 = FileDialog( action = "save as",
            wildcard = "Graphviz Files (*.dot, *.xdot, *.txt)|" \
                "*.dot;*.xdot;*.txt|Dot Files (*.dot)|*.dot|" \
                "All Files (*.*)|*.*|")

        if arg_2.open() == OK:
            arg_3 = None
            try:
                arg_3 = open(arg_2.path, "wb")
                arg_4 = str(arg_0.model)
                arg_3.write(arg_4)

                arg_0.save_file = arg_2.path

            except:
                error(parent=arg_1.ui.control, title="Save Error",
                      message="An error was encountered when saving\nto %s"
                      % arg_0.file)

            finally:
                if arg_3 is not None:
                    arg_3.close()

        del arg_2

Handles saving the current model to file .


def Func ( arg_0 , arg_1 ) : assert arg_1 >= 0 and arg_1 <= 1 if arg_0 . mode != 'RGBA' : arg_0 = arg_0 . convert ( 'RGBA' ) else : arg_0 = arg_0 . copy ( ) arg_2 = arg_0 . split ( ) [ 3 ] arg_2 = ImageEnhance . Brightness ( arg_2 ) . enhance ( arg_1 ) arg_0 . putalpha ( arg_2 ) return arg_0

def Func(arg_0, arg_1):
    """Returns an image with reduced opacity."""
    assert arg_1 >= 0 and arg_1 <= 1
    if arg_0.mode != 'RGBA':
        arg_0 = arg_0.convert('RGBA')
    else:
        arg_0 = arg_0.copy()
    arg_2 = arg_0.split()[3]
    arg_2 = ImageEnhance.Brightness(arg_2).enhance(arg_1)
    arg_0.putalpha(arg_2)
    return arg_0


def Func ( arg_0 , ** arg_1 ) : if not arg_0 . conflict_target and not arg_0 . conflict_action : return super ( ) . create ( ** arg_1 ) arg_2 = arg_0 . _build_insert_compiler ( [ arg_1 ] ) arg_3 = arg_2 . execute_sql ( return_id = False ) arg_4 = arg_3 [ 0 ] arg_5 = { } for arg_6 in arg_0 . model . _meta . local_concrete_fields : arg_5 [ arg_6 . column ] = arg_6 . attname arg_8 = { } for arg_9 , arg_10 in arg_4 . items ( ) : try : arg_8 [ arg_5 [ arg_9 ] ] = arg_10 except KeyError : pass return arg_0 . model ( ** arg_8 )

def Func(arg_0, **arg_1):
        """Creates a new record in the database and then gets
        the entire row.

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

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

        Returns:
            The model instance representing the row that was created.
        """

        if not arg_0.conflict_target and not arg_0.conflict_action:
            # no special action required, use the standard Django create(..)
            return super().create(**arg_1)

        arg_2 = arg_0._build_insert_compiler([arg_1])
        arg_3 = arg_2.execute_sql(return_id=False)

        arg_4 = arg_3[0]

        # get a list of columns that are officially part of the model and preserve the fact that the attribute name
        # might be different than the database column name
        arg_5 = {}
        for arg_6 in arg_0.model._meta.local_concrete_fields:
            arg_5[arg_6.column] = arg_6.attname

        # strip out any columns/fields returned by the db that
        # are not present in the model
        arg_8 = {}
        for arg_9, arg_10 in arg_4.items():
            try:
                arg_8[arg_5[arg_9]] = arg_10
            except KeyError:
                pass

        return arg_0.model(**arg_8)

Creates a new record in the database and then gets the entire row .


return time(xunit.any_int(min_value=0, max_value=23),
                xunit.any_int(min_value=0, max_value=59),
                xunit.any_int(min_value=0, max_value=59)).strftime(time_format)

def Func ( arg_0 , ** arg_1 ) : arg_2 = random . choice ( arg_0 . input_formats or formats . get_format ( 'TIME_INPUT_FORMATS' ) ) return time ( xunit . any_int ( min_value = 0 , max_value = 23 ) , xunit . any_int ( min_value = 0 , max_value = 59 ) , xunit . any_int ( min_value = 0 , max_value = 59 ) ) . strftime ( arg_2 )

def Func(arg_0, **arg_1):
    """
    Return random value for TimeField

    >>> result = any_form_field(forms.TimeField())
    >>> type(result)
    <type 'str'>
    """
    arg_2 = random.choice(arg_0.input_formats or formats.get_format('TIME_INPUT_FORMATS'))

    return time(xunit.any_int(min_value=0, max_value=23),
                xunit.any_int(min_value=0, max_value=59),
                xunit.any_int(min_value=0, max_value=59)).strftime(arg_2)


def Func(arg_0, arg_1=None):
        """
        Returns http session for use with requests

        :param headers: additional headers to be passed through as a dictionary
        :type headers: dict
        """
        arg_2 = requests.Session()
        if arg_0.http_conn_id:
            arg_3 = arg_0.Funcection(arg_0.http_conn_id)

            if "://" in arg_3.host:
                arg_0.base_url = arg_3.host
            else:
                # schema defaults to HTTP
                arg_5 = arg_3.schema if arg_3.schema else "http"
                arg_0.base_url = arg_5 + "://" + arg_3.host

            if arg_3.port:
                arg_0.base_url = arg_0.base_url + ":" + str(arg_3.port)
            if arg_3.login:
                arg_2.auth = (arg_3.login, arg_3.password)
            if arg_3.extra:
                try:
                    arg_2.headers.update(arg_3.extra_dejson)
                except TypeError:
                    arg_0.log.warn('Connection to %s has invalid extra field.', arg_3.host)
        if arg_1:
            arg_2.headers.update(arg_1)

        return arg_2


def Func(arg_0, arg_1, arg_2):
        """Register a new engine."""
        arg_3 = arg_2['content']
        try:
            arg_4 = cast_bytes(arg_3['queue'])
        except KeyError:
            arg_0.log.error("registration::queue not specified", exc_info=True)
            return
        arg_5 = arg_3.get('heartbeat', None)
        if arg_5:
            arg_5 = cast_bytes(arg_5)
        """register a new engine, and create the socket(s) necessary"""
        arg_6 = arg_0._next_id
        # print (eid, queue, reg, heart)

        arg_0.log.debug("registration::Func(%i, %r, %r, %r)", arg_6, arg_4, arg_1, arg_5)

        arg_3 = dict(id=arg_6,status='ok')
        arg_3.update(arg_0.engine_info)
        # check if requesting available IDs:
        if arg_4 in arg_0.by_ident:
            try:
                raise KeyError("queue_id %r in use" % arg_4)
            except:
                arg_3 = error.wrap_exception()
                arg_0.log.error("queue_id %r in use", arg_4, exc_info=True)
        elif arg_5 in arg_0.hearts: # need to check unique hearts?
            try:
                raise KeyError("heart_id %r in use" % arg_5)
            except:
                arg_0.log.error("heart_id %r in use", arg_5, exc_info=True)
                arg_3 = error.wrap_exception()
        else:
            for arg_7, arg_8 in arg_0.incoming_registrations.iteritems():
                if arg_5 == arg_7:
                    try:
                        raise KeyError("heart_id %r in use" % arg_5)
                    except:
                        arg_0.log.error("heart_id %r in use", arg_5, exc_info=True)
                        arg_3 = error.wrap_exception()
                    break
                elif arg_4 == arg_8[1]:
                    try:
                        raise KeyError("queue_id %r in use" % arg_4)
                    except:
                        arg_0.log.error("queue_id %r in use", arg_4, exc_info=True)
                        arg_3 = error.wrap_exception()
                    break

        arg_2 = arg_0.session.send(arg_0.query, "registration_reply",
                arg_3=arg_3,
                ident=arg_1)

        if arg_3['status'] == 'ok':
            if arg_5 in arg_0.heartmonitor.hearts:
                # already beating
                arg_0.incoming_registrations[arg_5] = (arg_6,arg_4,arg_1[0],None)
                arg_0.finish_registration(arg_5)
            else:
                arg_10 = lambda : arg_0._purge_stalled_registration(arg_5)
                arg_11 = ioloop.DelayedCallback(arg_10, arg_0.registration_timeout, arg_0.loop)
                arg_11.start()
                arg_0.incoming_registrations[arg_5] = (arg_6,arg_4,arg_1[0],arg_11)
        else:
            arg_0.log.error("registration::registration %i failed: %r", arg_6, arg_3['evalue'])
        return arg_6


def Func ( arg_0 , arg_1 , arg_2 = None ) : try : arg_3 = arg_0 . infer_call_result ( arg_1 , arg_2 = arg_2 ) arg_4 = next ( arg_3 ) except astroid . InferenceError : return None except StopIteration : return None try : next ( arg_3 ) return None except astroid . InferenceError : return None except StopIteration : return arg_4

def Func(arg_0, arg_1, arg_2=None):
    """
    Safely infer the return value of a function.

    Returns None if inference failed or if there is some ambiguity (more than
    one node has been inferred). Otherwise returns infered value.
    """
    try:
        arg_3 = arg_0.infer_call_result(arg_1, arg_2=arg_2)
        arg_4 = next(arg_3)
    except astroid.InferenceError:
        return None  # inference failed
    except StopIteration:
        return None  # no values infered
    try:
        next(arg_3)
        return None  # there is ambiguity on the inferred node
    except astroid.InferenceError:
        return None  # there is some kind of ambiguity
    except StopIteration:
        return arg_4

Safely infer the return value of a function .


def Func(arg_0, arg_1, *arg_2, **arg_3):
        """Update, rolling back on failure."""
        arg_4 = []
        arg_5 = arg_4.append
        arg_6 = arg_0._dedup_item
        arg_7 = arg_0._write_item
        for (arg_8, arg_9) in _iteritems_args_kw(*arg_2, **arg_3):
            try:
                arg_10 = arg_6(arg_8, arg_9, arg_1)
            except DuplicationError:
                arg_11 = arg_0._undo_write
                for arg_10, arg_12 in reversed(arg_4):
                    arg_11(arg_10, arg_12)
                raise
            if arg_10 is not _NOOP:
                arg_12 = arg_7(arg_8, arg_9, arg_10)
                arg_5((arg_10, arg_12))


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
arg_3
=
stashy
.
Func
(
arg_0
,
arg_1
,
arg_2
)
logger
.
info
(
'Connected to: %s as %s'
,
arg_0
,
arg_1
)
return
arg_3

def Func(arg_0, arg_1, arg_2):
    """
    Return a Funced Bitbucket session
    """

    arg_3 = stashy.Func(arg_0, arg_1, arg_2)

    logger.info('Connected to: %s as %s', arg_0, arg_1)

    return arg_3


return [rxn for rxn, c_flux in reactions_fluxes if c_flux > 0]

def Func ( arg_0 ) : try : arg_0 . slim_optimize ( error_value = None ) except OptimizationError : return [ ] arg_1 = arg_0 . reactions . get_by_any ( list ( arg_0 . medium ) ) arg_2 = [ ( arg_3 , total_components_flux ( arg_3 . flux , reaction_elements ( arg_3 ) , consumption = True ) ) for arg_3 in arg_1 ] return [ arg_3 for arg_3 , arg_4 in arg_2 if arg_4 > 0 ]

def Func(arg_0):
    """
    Find all active carbon source reactions.

    Parameters
    ----------
    model : Model
        A genome-scale metabolic model.

    Returns
    -------
    list
       The medium reactions with carbon input flux.

    """

    try:
        arg_0.slim_optimize(error_value=None)
    except OptimizationError:
        return []

    arg_1 = arg_0.reactions.get_by_any(list(arg_0.medium))
    arg_2 = [
        (arg_3, total_components_flux(arg_3.flux, reaction_elements(arg_3),
                                    consumption=True)) for arg_3 in arg_1]
    return [arg_3 for arg_3, arg_4 in arg_2 if arg_4 > 0]

Find all active carbon source reactions .


def Func(arg_0, arg_1, arg_2, arg_3):
        """Schedules a wait time to be able to consume an amount

        :type amt: int
        :param amt: The amount of bytes scheduled to be consumed

        :type token: RequestToken
        :param token: The token associated to the consumption
            request that is used to identify the request.

        :type time_to_consume: float
        :param time_to_consume: The desired time it should take for that
            specific request amount to be consumed in regardless of previously
            scheduled consumption requests

        :rtype: float
        :returns: The amount of time to wait for the specific request before
            actually consuming the specified amount.
        """
        arg_0._total_wait += arg_3
        arg_0._tokens_to_scheduled_consumption[arg_2] = {
            'wait_duration': arg_0._total_wait,
            'time_to_consume': arg_3,
        }
        return arg_0._total_wait


def Func ( ) : arg_0 = 9 arg_1 = "/" . join ( os . path . realpath ( __file__ ) . split ( '/' ) [ : - arg_0 ] ) return normalized_class_path ( arg_1 )

def Func():
  """
  This will extract heron directory from .pex file.

  For example,
  when __file__ is '/Users/heron-user/bin/heron/heron/tools/common/src/python/utils/config.pyc', and
  its real path is '/Users/heron-user/.heron/bin/heron/tools/common/src/python/utils/config.pyc',
  the internal variable ``path`` would be '/Users/heron-user/.heron', which is the heron directory

  This means the variable `go_above_dirs` below is 9.

  :return: root location of the .pex file
  """
  arg_0 = 9
  arg_1 = "/".join(os.path.realpath(__file__).split('/')[:-arg_0])
  return normalized_class_path(arg_1)

This will extract heron directory from . pex file .


(below=None, diag=None, above=None, name=None)

def Func(arg_0=None, arg_1=None, arg_2=None, arg_3=None):
  """Creates a matrix with values set above, below, and on the diagonal.

  Example:

  ```python
  Func(below=[1., 2., 3.],
          diag=[4., 5., 6., 7.],
          above=[8., 9., 10.])
  # ==> array([[  4.,   8.,   0.,   0.],
  #            [  1.,   5.,   9.,   0.],
  #            [  0.,   2.,   6.,  10.],
  #            [  0.,   0.,   3.,   7.]], dtype=float32)
  ```

  Warning: This Op is intended for convenience, not efficiency.

  Args:
    below: `Tensor` of shape `[B1, ..., Bb, d-1]` corresponding to the below
      diagonal part. `None` is logically equivalent to `below = 0`.
    diag: `Tensor` of shape `[B1, ..., Bb, d]` corresponding to the diagonal
      part.  `None` is logically equivalent to `diag = 0`.
    above: `Tensor` of shape `[B1, ..., Bb, d-1]` corresponding to the above
      diagonal part.  `None` is logically equivalent to `above = 0`.
    name: Python `str`. The name to give this op.

  Returns:
    Func: `Tensor` with values set above, below and on the diagonal.

  Raises:
    ValueError: if all inputs are `None`.
  """

  def _pad(arg_4):
    """Prepends and appends a zero to every vector in a batch of vectors."""
    arg_5 = tf.concat([tf.shape(input=arg_4)[:-1], [1]], axis=0)
    arg_6 = tf.zeros(arg_5, dtype=arg_4.dtype)
    return tf.concat([arg_6, arg_4, arg_6], axis=-1)

  def _add(*arg_4):
    """Adds list of Tensors, ignoring `None`."""
    arg_7 = None
    for arg_8 in arg_4:
      if arg_8 is None:
        continue
      elif arg_7 is None:
        arg_7 = arg_8
      else:
        arg_7 += arg_8
    if arg_7 is None:
      raise ValueError("Must specify at least one of `below`, `diag`, `above`.")
    return arg_7

  with tf.name_scope(arg_3 or "Func"):
    if arg_0 is not None:
      arg_0 = tf.convert_to_tensor(value=arg_0, arg_3="below")
      arg_0 = tf.linalg.diag(_pad(arg_0))[..., :-1, 1:]
    if arg_1 is not None:
      arg_1 = tf.convert_to_tensor(value=arg_1, arg_3="diag")
      arg_1 = tf.linalg.diag(arg_1)
    if arg_2 is not None:
      arg_2 = tf.convert_to_tensor(value=arg_2, arg_3="above")
      arg_2 = tf.linalg.diag(_pad(arg_2))[..., 1:, :-1]
    # TODO(jvdillon): Consider using scatter_nd instead of creating three full
    # matrices.
    return _add(arg_0, arg_1, arg_2)

Creates a matrix with values set above, below, and on the diagonal.

  Example:

  ```python
  tridiag(below=[1., 2., 3.],
          diag=[4., 5., 6., 7.],
          above=[8., 9., 10.])
  # ==> array([[  4.,   8.,   0.,   0.],
  #            [  1.,   5.,   9.,   0.],
  #            [  0.,   2.,   6.,  10.],
  #            [  0.,   0.,   3.,   7.]], dtype=float32)
  ```

  Warning: This Op is intended for convenience, not efficiency.

  Args:
    below: `Tensor` of shape `[B1, ..., Bb, d-1]` corresponding to the below
      diagonal part. `None` is logically equivalent to `below = 0`.
    diag: `Tensor` of shape `[B1, ..., Bb, d]` corresponding to the diagonal
      part.  `None` is logically equivalent to `diag = 0`.
    above: `Tensor` of shape `[B1, ..., Bb, d-1]` corresponding to the above
      diagonal part.  `None` is logically equivalent to `above = 0`.
    name: Python `str`. The name to give this op.

  Returns:
    tridiag: `Tensor` with values set above, below and on the diagonal.

  Raises:
    ValueError: if all inputs are `None`.

Creates a matrix with values set above below and on the diagonal .


def
Func
(
arg_0
,
arg_1
)
:
arg_0
=
arg_0
.
rstrip
(
)
.
split
(
'\t'
)
arg_1
=
[
head
.
lower
(
)
for
head
in
arg_1
]
arg_2
=
dict
(
zip
(
arg_1
,
arg_0
)
)
arg_3
=
{
}
for
arg_4
in
arg_2
:
arg_5
=
arg_2
[
arg_4
]
if
not
arg_5
:
continue
if
'chromosome'
in
arg_4
:
arg_3
[
'chrom'
]
=
arg_5
if
'gene'
in
arg_4
:
if
'id'
in
arg_4
:
arg_3
[
'ensembl_gene_id'
]
=
arg_5
elif
'start'
in
arg_4
:
arg_3
[
'gene_start'
]
=
int
(
arg_5
)
elif
'end'
in
arg_4
:
arg_3
[
'gene_end'
]
=
int
(
arg_5
)
if
'hgnc symbol'
in
arg_4
:
arg_3
[
'hgnc_symbol'
]
=
arg_5
if
"gene name"
in
arg_4
:
arg_3
[
'hgnc_symbol'
]
=
arg_5
if
'hgnc id'
in
arg_4
:
arg_3
[
'hgnc_id'
]
=
int
(
arg_5
.
split
(
':'
)
[
1
]
)
if
'transcript'
in
arg_4
:
if
'id'
in
arg_4
:
arg_3
[
'ensembl_transcript_id'
]
=
arg_5
elif
'start'
in
arg_4
:
arg_3
[
'transcript_start'
]
=
int
(
arg_5
)
elif
'end'
in
arg_4
:
arg_3
[
'transcript_end'
]
=
int
(
arg_5
)
if
'exon'
in
arg_4
:
if
'start'
in
arg_4
:
arg_3
[
'exon_start'
]
=
int
(
arg_5
)
elif
'end'
in
arg_4
:
arg_3
[
'exon_end'
]
=
int
(
arg_5
)
elif
'rank'
in
arg_4
:
arg_3
[
'exon_rank'
]
=
int
(
arg_5
)
if
'utr'
in
arg_4
:
if
'start'
in
arg_4
:
if
'5'
in
arg_4
:
arg_3
[
'utr_5_start'
]
=
int
(
arg_5
)
elif
'3'
in
arg_4
:
arg_3
[
'utr_3_start'
]
=
int
(
arg_5
)
elif
'end'
in
arg_4
:
if
'5'
in
arg_4
:
arg_3
[
'utr_5_end'
]
=
int
(
arg_5
)
elif
'3'
in
arg_4
:
arg_3
[
'utr_3_end'
]
=
int
(
arg_5
)
if
'strand'
in
arg_4
:
arg_3
[
'strand'
]
=
int
(
arg_5
)
if
'refseq'
in
arg_4
:
if
'mrna'
in
arg_4
:
if
'predicted'
in
arg_4
:
arg_3
[
'refseq_mrna_predicted'
]
=
arg_5
else
:
arg_3
[
'refseq_mrna'
]
=
arg_5
if
'ncrna'
in
arg_4
:
arg_3
[
'refseq_ncrna'
]
=
arg_5
return
arg_3

def Func(arg_0, arg_1):
    """Parse an ensembl formated line

        Args:
            line(list): A list with ensembl gene info
            header(list): A list with the header info

        Returns:
            ensembl_info(dict): A dictionary with the relevant info
    """
    arg_0 = arg_0.rstrip().split('\t')
    arg_1 = [head.lower() for head in arg_1]
    arg_2 = dict(zip(arg_1, arg_0))

    arg_3 = {}

    for arg_4 in arg_2:
        arg_5 = arg_2[arg_4]

        if not arg_5:
            continue

        if 'chromosome' in arg_4:
            arg_3['chrom'] = arg_5

        if 'gene' in arg_4:
            if 'id' in arg_4:
                arg_3['ensembl_gene_id'] = arg_5
            elif 'start' in arg_4:
                arg_3['gene_start'] = int(arg_5)
            elif 'end' in arg_4:
                arg_3['gene_end'] = int(arg_5)

        if 'hgnc symbol' in arg_4:
            arg_3['hgnc_symbol'] = arg_5
        if "gene name" in arg_4:
            arg_3['hgnc_symbol'] = arg_5

        if 'hgnc id' in arg_4:
            arg_3['hgnc_id'] = int(arg_5.split(':')[-1])

        if 'transcript' in arg_4:
            if 'id' in arg_4:
                arg_3['ensembl_transcript_id'] = arg_5
            elif 'start' in arg_4:
                arg_3['transcript_start'] = int(arg_5)
            elif 'end' in arg_4:
                arg_3['transcript_end'] = int(arg_5)

        if 'exon' in arg_4:
            if 'start' in arg_4:
                arg_3['exon_start'] = int(arg_5)
            elif 'end' in arg_4:
                arg_3['exon_end'] = int(arg_5)
            elif 'rank' in arg_4:
                arg_3['exon_rank'] = int(arg_5)

        if 'utr' in arg_4:

            if 'start' in arg_4:
                if '5' in arg_4:
                    arg_3['utr_5_start'] = int(arg_5)
                elif '3' in arg_4:
                    arg_3['utr_3_start'] = int(arg_5)
            elif 'end' in arg_4:
                if '5' in arg_4:
                    arg_3['utr_5_end'] = int(arg_5)
                elif '3' in arg_4:
                    arg_3['utr_3_end'] = int(arg_5)

        if 'strand' in arg_4:
            arg_3['strand'] = int(arg_5)

        if 'refseq' in arg_4:
            if 'mrna' in arg_4:
                if 'predicted' in arg_4:
                    arg_3['refseq_mrna_predicted'] = arg_5
                else:
                    arg_3['refseq_mrna'] = arg_5

            if 'ncrna' in arg_4:
                arg_3['refseq_ncrna'] = arg_5

    return arg_3


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
[
'channels'
,
'1'
,
'Func'
]
arg_3
,
arg_3
,
arg_4
=
arg_0
.
build
(
arg_1
,
,
extra_args
=
arg_2
,
return_output
=
True
)
arg_5
=
{
}
arg_6
=
arg_4
.
split
(
'\n'
)
for
arg_7
in
arg_6
:
arg_8
=
arg_7
.
split
(
)
if
len
(
arg_8
)
==
0
:
continue
arg_9
=
arg_8
[
1
]
arg_10
=
' '
.
join
(
arg_8
[
:
1
]
)
arg_5
[
arg_10
]
=
arg_9
return
arg_5

def Func(arg_0, arg_1):
        '''Display time domain statistical information about the audio
        channels. Audio is passed unmodified through the SoX processing chain.
        Statistics are calculated and displayed for each audio channel

        Unlike other Transformer methods, this does not modify the transformer
        effects chain. Instead it computes statistics on the output file that
        would be created if the build command were invoked.

        Note: The file is downmixed to mono prior to computation.

        Parameters
        ----------
        input_filepath : str
            Path to input file to compute Func on.

        Returns
        -------
        Func_dict : dict
            List of frequency (Hz), amplitude pairs.

        See Also
        --------
        stat, sox.file_info
        '''
        arg_2 = ['channels', '1', 'Func']

        arg_3, arg_3, arg_4 = arg_0.build(
            arg_1, None, extra_args=arg_2, return_output=True
        )

        arg_5 = {}
        arg_6 = arg_4.split('\n')
        for arg_7 in arg_6:
            arg_8 = arg_7.split()
            if len(arg_8) == 0:
                continue
            arg_9 = arg_8[-1]
            arg_10 = ' '.join(arg_8[:-1])
            arg_5[arg_10] = arg_9

        return arg_5

Display time domain statistical information about the audio
        channels. Audio is passed unmodified through the SoX processing chain.
        Statistics are calculated and displayed for each audio channel

        Unlike other Transformer methods, this does not modify the transformer
        effects chain. Instead it computes statistics on the output file that
        would be created if the build command were invoked.

        Note: The file is downmixed to mono prior to computation.

        Parameters
        ----------
        input_filepath : str
            Path to input file to compute stats on.

        Returns
        -------
        stats_dict : dict
            List of frequency (Hz), amplitude pairs.

        See Also
        --------
        stat, sox.file_info

Display time domain statistical information about the audio channels . Audio is passed unmodified through the SoX processing chain . Statistics are calculated and displayed for each audio channel


def Func ( arg_0 , arg_1 ) : arg_2 = super ( TemporalMemoryMonitorMixin , arg_0 ) . Func ( arg_1 ) arg_2 . mmName = None arg_2 . _mmTraces = None arg_2 . _mmData = None arg_2 . mmClearHistory ( ) arg_2 . _mmResetActive = True return arg_2

def Func(arg_0, arg_1):
    """
    Intercepts TemporalMemory deserialization request in order to initialize
    `TemporalMemoryMonitorMixin` state

    @param proto (DynamicStructBuilder) Proto object

    @return (TemporalMemory) TemporalMemory shim instance
    """
    arg_2 = super(TemporalMemoryMonitorMixin, arg_0).Func(arg_1)

    # initialize `TemporalMemoryMonitorMixin` attributes
    arg_2.mmName = None
    arg_2._mmTraces = None
    arg_2._mmData = None
    arg_2.mmClearHistory()
    arg_2._mmResetActive = True
    return arg_2

Intercepts TemporalMemory deserialization request in order to initialize TemporalMemoryMonitorMixin state


def
Func
(
arg_0
,
*
arg_1
,
**
arg_2
)
:
if
not
len
(
arg_1
)
:
raise
TypeError
(
'Object instance is not provided'
)
if
arg_0
.
by_instance
:
arg_3
=
arg_1
[
0
]
else
:
arg_3
=
arg_1
[
0
]
.
__class__
arg_4
=
arg_0
.
registry
.
get
(
arg_3
,
arg_0
.
default
)
if
arg_4
is
:
raise
TypeError
(
"no match %s"
%
arg_3
)
return
arg_4
(
*
arg_1
,
**
arg_2
)

def Func(arg_0, *arg_1, **arg_2):
        """
        Lowest value generator.

        Separated from __call__, because it seems that python
        cache __call__ reference on module import
        """
        if not len(arg_1):
            raise TypeError('Object instance is not provided')

        if arg_0.by_instance:
            arg_3 = arg_1[0]
        else:
            arg_3 = arg_1[0].__class__

        arg_4 = arg_0.registry.get(arg_3, arg_0.default)

        if arg_4 is None:
            raise TypeError("no match %s" % arg_3)

        return arg_4(*arg_1, **arg_2)


def Func ( arg_0 , ** arg_1 ) : try : arg_1 [ 'project_id' ] = arg_0 arg_2 = _pybossa_req ( 'get' , 'task' , params = arg_1 ) if type ( arg_2 ) . __name__ == 'list' : return [ Task ( arg_3 ) for arg_3 in arg_2 ] else : return arg_2 except : raise

def Func(arg_0, **arg_1):
    """Return a list of matched tasks for a given project ID.

    :param project_id: PYBOSSA Project ID
    :type project_id: integer
    :param kwargs: PYBOSSA Task members
    :type info: dict
    :rtype: list
    :returns: A list of tasks that match the kwargs

    """
    try:
        arg_1['project_id'] = arg_0
        arg_2 = _pybossa_req('get', 'task', params=arg_1)
        if type(arg_2).__name__ == 'list':
            return [Task(arg_3) for arg_3 in arg_2]
        else:
            return arg_2
    except:  # pragma: no cover
        raise

Return a list of matched tasks for a given project ID .


def Func ( arg_0 , arg_1 , arg_2 ) : try : arg_3 = arg_0 . _protocols [ arg_1 ] except KeyError : raise NoSuchConnection ( ) arg_3 . dataReceived ( arg_2 ) return { }

def Func(arg_0, arg_1, arg_2):
        """
        Receives some data for the given protocol.
        """
        try:
            arg_3 = arg_0._protocols[arg_1]
        except KeyError:
            raise NoSuchConnection()

        arg_3.dataReceived(arg_2)
        return {}

Receives some data for the given protocol .


def Func(arg_0):
  """Parse scoped selector."""
  # Conver Macro (%scope/name) to (scope/name/macro.value)
  if arg_0[0] == '%':
    if arg_0.endswith('.value'):
      arg_1 = '{} is invalid cannot use % and end with .value'
      raise ValueError(arg_1.format(arg_0))
    arg_0 = arg_0[1:] + '/macro.value'
  arg_2 = arg_0.rsplit('/', 1)
  arg_3 = ''.join(arg_2[:-1])
  arg_4 = arg_2[-1]
  return arg_3, arg_4


(self, workflow,
                                           notification_template, status)

return self._disassoc('notification_templates_%s' % status,
                              workflow, notification_template)

def Func(arg_0, arg_1,
                                           arg_2, arg_3):
        """Disassociate a notification template from this workflow.

        =====API DOCS=====
        Disassociate a notification template from this workflow job template.

        :param job_template: The workflow job template to disassociate from.
        :type job_template: str
        :param notification_template: The notification template to be disassociated.
        :type notification_template: str
        :param status: type of notification this notification template should be disassociated from.
        :type status: str
        :returns: Dictionary of only one key "changed", which indicates whether the disassociation succeeded.
        :rtype: dict

        =====API DOCS=====
        """
        return arg_0._disassoc('notification_templates_%s' % arg_3,
                              arg_1, arg_2)

Disassociate a notification template from this workflow .


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
shlex
.
split
(
arg_1
,
comments
=
True
)
if
len
(
arg_2
)
!=
1
:
raise
BadNumberOfArguments
(
1
,
len
(
arg_2
)
)
arg_3
=
arg_2
[
0
]
arg_4
=
arg_3
.
lower
(
)
if
arg_4
in
arg_0
.
true
:
return
True
if
arg_4
in
arg_0
.
false
:
return
False
raise
BadArgument
(
arg_3
,
"Allowed values are "
+
arg_0
.
allowed
+
'.'
)

def Func(arg_0, arg_1):
        """Parse arguments found in settings files.

        Use the values in self.true for True in settings files, or those in
        self.false for False, case insensitive.
        """
        arg_2 = shlex.split(arg_1, comments=True)
        if len(arg_2) != 1:
            raise BadNumberOfArguments(1, len(arg_2))
        arg_3 = arg_2[0]
        arg_4 = arg_3.lower()
        if arg_4 in arg_0.true:
            return True
        if arg_4 in arg_0.false:
            return False
        raise BadArgument(arg_3, "Allowed values are " + arg_0.allowed + '.')

Parse arguments found in settings files . Use the values in self . true for True in settings files or those in self . false for False case insensitive .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_0 . clone ( ) arg_3 . revision = Revision ( arg_1 , arg_2 ) return arg_3

def Func(arg_0, arg_1, arg_2):
        """
        Returns a Tag with a given revision
        """
        arg_3 = arg_0.clone()
        arg_3.revision = Revision(arg_1, arg_2)
        return arg_3


def Func ( arg_0 , arg_1 ) : arg_2 = type ( arg_0 ) ( ) for arg_3 in arg_0 . keys ( ) : if isinstance ( arg_0 [ arg_3 ] , dict ) : arg_2 [ arg_3 ] = Func ( arg_0 [ arg_3 ] , arg_1 ) else : arg_2 [ arg_3 ] = arg_1 return arg_2

def Func(arg_0, arg_1):
    ''' create a new nested dictionary object with the same structure as
        'dictionary', but with all scalar values replaced with 'value'
    '''
    arg_2 = type(arg_0)()
    for arg_3 in arg_0.keys():
        if isinstance(arg_0[arg_3], dict):
            arg_2[arg_3] = Func(arg_0[arg_3], arg_1)
        else:
            arg_2[arg_3] = arg_1
    return arg_2

create a new nested dictionary object with the same structure as dictionary but with all scalar values replaced with value


(self, cmd, args=[], delay=0, env=1, lang="C")

def
Func
(
arg_0
,
arg_1
,
arg_2
=
[
]
,
arg_3
=
0
,
arg_4
=
1
,
arg_5
=
"C"
)
:
try
:
atomac
.
NativeUIElement
.
launchAppByBundleId
(
arg_1
)
return
1
except
RuntimeError
:
if
atomac
.
NativeUIElement
.
launchAppByBundlePath
(
arg_1
,
arg_2
)
:
try
:
time
.
sleep
(
int
(
arg_3
)
)
except
ValueError
:
time
.
sleep
(
5
)
return
1
else
:
raise
LdtpServerException
(
u"Unable to find app '%s'"
%
arg_1
)

def Func(arg_0, arg_1, arg_2=[], arg_3=0, arg_4=1, arg_5="C"):
        """
        Launch application.

        @param cmd: Command line string to execute.
        @type cmd: string
        @param args: Arguments to the application
        @type args: list
        @param delay: Delay after the application is launched
        @type delay: int
        @param env: GNOME accessibility environment to be set or not
        @type env: int
        @param lang: Application language to be used
        @type lang: string

        @return: 1 on success
        @rtype: integer

        @raise LdtpServerException: When command fails
        """
        try:
            atomac.NativeUIElement.launchAppByBundleId(arg_1)
            return 1
        except RuntimeError:
            if atomac.NativeUIElement.launchAppByBundlePath(arg_1, arg_2):
                # Let us wait so that the application launches
                try:
                    time.sleep(int(arg_3))
                except ValueError:
                    time.sleep(5)
                return 1
            else:
                raise LdtpServerException(u"Unable to find app '%s'" % arg_1)


return H2OFrame._expr(expr=ExprNode("modulo_kfold_column", self, n_folds))._frame()

def Func ( arg_0 , arg_1 = 3 ) : return H2OFrame . _expr ( expr = ExprNode ( "Func" , arg_0 , arg_1 ) ) . _frame ( )

def Func(arg_0, arg_1=3):
        """
        Build a fold assignments column for cross-validation.

        Rows are assigned a fold according to the current row number modulo ``n_folds``.

        :param int n_folds: An integer specifying the number of validation sets to split the training data into.
        :returns: A single-column H2OFrame with the fold assignments.
        """
        return H2OFrame._expr(expr=ExprNode("Func", arg_0, arg_1))._frame()

Build a fold assignments column for cross - validation .


def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : plt . plot ( arg_0 , arg_1 , color = 'k' , lw = 2 ) arg_4 = int ( len ( arg_1 ) / CHUNK_POINTS ) for arg_5 in range ( 0 , 100 , PERCENT_STEP ) : arg_6 = np . percentile ( arg_2 , arg_5 ) arg_7 = np . percentile ( arg_2 , arg_5 + PERCENT_STEP ) arg_8 = np . where ( arg_2 >= arg_6 ) [ 0 ] arg_9 = np . where ( arg_2 <= arg_7 ) [ 0 ] arg_10 = [ arg_11 for arg_11 in range ( arg_4 ) if arg_11 in arg_8 and arg_11 in arg_9 ] for arg_11 in arg_10 : arg_12 = arg_11 * CHUNK_POINTS / POINTS_PER_SEC arg_13 = arg_12 + CHUNK_POINTS / POINTS_PER_SEC plt . axvspan ( arg_12 , arg_13 , alpha = .3 , color = COLORMAP ( arg_5 / 100 ) , lw = 0 )

def Func(arg_0,arg_1,arg_2,arg_3):
    """plot X and Y data, then shade its background by variance."""
    plt.plot(arg_0,arg_1,color='k',lw=2)
    arg_4=int(len(arg_1)/CHUNK_POINTS)
    for arg_5 in range(0,100,PERCENT_STEP):
        arg_6=np.percentile(arg_2,arg_5)
        arg_7=np.percentile(arg_2,arg_5+PERCENT_STEP)
        arg_8=np.where(arg_2>=arg_6)[0]
        arg_9=np.where(arg_2<=arg_7)[0]
        arg_10=[arg_11 for arg_11 in range(arg_4) \
                         if arg_11 in arg_8 \
                         and arg_11 in arg_9]
        for arg_11 in arg_10:
            arg_12=arg_11*CHUNK_POINTS/POINTS_PER_SEC
            arg_13=arg_12+CHUNK_POINTS/POINTS_PER_SEC
            plt.axvspan(arg_12,arg_13,alpha=.3,color=COLORMAP(arg_5/100),lw=0)

doc/uses/EPSCs-and-IPSCs/variance method/2016-12-15 noise sample.py

plot X and Y data then shade its background by variance .


A fast j2 defined in terms of other special functions

def Func(arg_0):
    """ A fast Func defined in terms of other special functions """
    arg_1 = 2./(arg_0+1e-15)*j1(arg_0) - j0(arg_0)
    arg_1[arg_0==0] = 0
    return arg_1


(session, track_id, latitude, longitude, stop_tracking=False)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = False ) : arg_5 = { 'track_point' : { 'latitude' : arg_2 , 'longitude' : arg_3 , } , 'stop_tracking' : arg_4 } arg_6 = make_put_request ( arg_0 , 'tracks/{}' . format ( arg_1 ) , arg_7 = arg_5 ) arg_7 = arg_6 . json ( ) if arg_6 . status_code == 200 : return arg_7 [ 'result' ] else : raise TrackNotUpdatedException ( message = arg_7 [ 'message' ] , error_code = arg_7 [ 'error_code' ] , request_id = arg_7 [ 'request_id' ] )

def Func(arg_0, arg_1, arg_2, arg_3, arg_4=False):
    """
    Updates the current location by creating a new track point and appending
    it to the given track
    """

    arg_5 = {
        'track_point': {
            'latitude': arg_2,
            'longitude': arg_3,
        },
        'stop_tracking': arg_4
    }

    # PUT /api/projects/0.1/tracks/{track_id}/

    arg_6 = make_put_request(arg_0, 'tracks/{}'.format(arg_1),
                                arg_7=arg_5)
    arg_7 = arg_6.json()
    if arg_6.status_code == 200:
        return arg_7['result']
    else:
        raise TrackNotUpdatedException(message=arg_7['message'],
                                       error_code=arg_7['error_code'],
                                       request_id=arg_7['request_id'])


def Func(arg_0, arg_1='joint', **arg_2):
        """
        Perform optimization for the branch lengths of the entire tree.
        This method only does a single path and needs to be iterated.

        **Note** this method assumes that each node stores information
        about its sequence as numpy.array object (node.sequence attribute).
        Therefore, before calling this method, sequence reconstruction with
        either of the available models must be performed.

        Parameters
        ----------

         mode : str
            Optimize branch length assuming the joint ML sequence assignment
            of both ends of the branch (:code:`joint`), or trace over all possible sequence
            assignments on both ends of the branch (:code:`marginal`) (slower, experimental).

         **kwargs :
            Keyword arguments

        Keyword Args
        ------------

         verbose : int
            Output level

         store_old : bool
            If True, the old lengths will be saved in :code:`node._old_dist` attribute.
            Useful for testing, and special post-processing.

        """

        arg_0.logger("TreeAnc.Func: running branch length optimization in mode %s..."%arg_1,1)
        if (arg_0.tree is None) or (arg_0.aln is None):
            arg_0.logger("TreeAnc.Func: ERROR, alignment or tree are missing", 0)
            return ttconf.ERROR

        arg_3 = False

        if 'store_old' in arg_2:
            arg_3 = arg_2['store_old']

        if arg_1=='marginal':
            # a marginal ancestral reconstruction is required for
            # marginal branch length inference
            if not hasattr(arg_0.tree.root, "marginal_profile"):
                arg_0.infer_ancestral_sequences(marginal=True)

        arg_4 = 0
        for arg_5 in arg_0.tree.find_clades(order='postorder'):
            if arg_5.up is None: continue # this is the root
            if arg_3:
                arg_5._old_length = arg_5.branch_length

            if arg_1=='marginal':
                arg_7 = arg_0.optimal_marginal_branch_length(arg_5)
            elif arg_1=='joint':
                arg_7 = arg_0.optimal_branch_length(arg_5)
            else:
                arg_0.logger("treeanc.Func: unsupported optimization mode",4, warn=True)
                arg_7 = arg_5.branch_length

            if arg_7 < 0:
                continue

            arg_0.logger("Optimization results: old_len=%.4e, new_len=%.4e, naive=%.4e"
                   " Updating branch length..."%(arg_5.branch_length, arg_7, len(arg_5.mutations)*arg_0.one_mutation), 5)

            arg_5.branch_length = arg_7
            arg_5.mutation_length=arg_7
            arg_4 = max(arg_4, arg_7)

        # as branch lengths changed, the params must be fixed
        arg_0.tree.root.up = None
        arg_0.tree.root.dist2root = 0.0
        if arg_4>0.15 and arg_1=='joint':
            arg_0.logger("TreeAnc.Func: THIS TREE HAS LONG BRANCHES."
                        " \n\t ****TreeTime IS NOT DESIGNED TO OPTIMIZE LONG BRANCHES."
                        " \n\t ****PLEASE OPTIMIZE BRANCHES WITH ANOTHER TOOL AND RERUN WITH"
                        " \n\t ****branch_length_mode='input'", 0, warn=True)
        arg_0._prepare_nodes()
        return ttconf.SUCCESS

Perform optimization for the branch lengths of the entire tree . This method only does a single path and needs to be iterated .


def Func ( * arg_0 , ** arg_1 ) : import vaex . ui . main return vaex . ui . main . VaexApp ( )

def Func(*arg_0, **arg_1):
    """Create a vaex Func, the QApplication mainloop must be started.

    In ipython notebook/jupyter do the following:

    >>> import vaex.ui.main # this causes the qt api level to be set properly
    >>> import vaex

    Next cell:

    >>> %gui qt

    Next cell:

    >>> Func = vaex.Func()

    From now on, you can run the Func along with jupyter

    """

    import vaex.ui.main
    return vaex.ui.main.VaexApp()

Create a vaex app, the QApplication mainloop must be started.

    In ipython notebook/jupyter do the following:

    >>> import vaex.ui.main # this causes the qt api level to be set properly
    >>> import vaex

    Next cell:

    >>> %gui qt

    Next cell:

    >>> app = vaex.app()

    From now on, you can run the app along with jupyter

Create a vaex app the QApplication mainloop must be started .


def Func(arg_0, arg_1, arg_2):
    """Determine minimum and maximum zoomlevel."""
    if not arg_0:
        arg_3 = 1
        arg_4 = get_best_zoom_level(arg_1, arg_2)
    elif len(arg_0) == 1:
        arg_3 = arg_0[0]
        arg_4 = arg_0[0]
    elif len(arg_0) == 2:
        if arg_0[0] < arg_0[1]:
            arg_3 = arg_0[0]
            arg_4 = arg_0[1]
        else:
            arg_3 = arg_0[1]
            arg_4 = arg_0[0]
    return arg_3, arg_4

Determine minimum and maximum zoomlevel .


def Func ( arg_0 , arg_1 = 1250 ) : arg_2 = int ( ) arg_3 = str ( ) try : while True : while arg_2 < arg_1 : arg_4 = yield arg_3 = reduce ( accumulator , arg_4 , arg_3 ) arg_2 = reduce ( accumulator , arg_4 , arg_2 ) arg_0 . send ( arg_3 ) arg_2 = int ( ) arg_3 = str ( ) except GeneratorExit : arg_0 . send ( arg_3 ) arg_0 . close ( )

def Func(arg_0, arg_1=1250):
    """
    Consumes text streams and Funcs them together for more io
    efficient processes.

    :param iterable: Sends text stream for further processing
    :type iterable: Coroutine

    :param maxlen: Maximum query string size
    :type maxlen: Integer
    """
    arg_2 = int()
    arg_3  = str()

    try:
        while True:

            while arg_2 < arg_1:
                arg_4 = yield
                arg_3   = reduce(accumulator, arg_4, arg_3)
                arg_2  = reduce(accumulator, arg_4, arg_2)

            arg_0.send(arg_3)
            arg_2 = int()
            arg_3  = str()

    except GeneratorExit:
        arg_0.send(arg_3)
        arg_0.close()

Consumes text streams and spools them together for more io
    efficient processes.

    :param iterable: Sends text stream for further processing
    :type iterable: Coroutine

    :param maxlen: Maximum query string size
    :type maxlen: Integer

Consumes text streams and spools them together for more io efficient processes .


(
        self, component_info=None, data=None, component_position=None, index=None
    )

return self._get_2d_markers(
            data, component_info, component_position, index=index
        )

def Func(
        arg_0, arg_1=None, arg_2=None, arg_3=None, arg_4=None
    ):
        """Get 2D linearized markers.

        :param index: Specify which camera to get 2D from, will be returned as
                      first entry in the returned array.
        """

        return arg_0._get_2d_markers(
            arg_2, arg_1, arg_3, arg_4=arg_4
        )


def
Func
(
arg_0
)
:
arg_1
=
[
]
LOG
.
debug
(
"Parsing ensembl exons..."
)
for
arg_2
,
arg_3
in
enumerate
(
arg_0
)
:
if
arg_2
==
0
:
arg_1
=
arg_3
.
rstrip
(
)
.
split
(
'\t'
)
continue
arg_4
=
parse_ensembl_line
(
arg_3
,
arg_1
)
arg_5
=
arg_4
[
'chrom'
]
arg_6
=
arg_4
[
'exon_start'
]
arg_7
=
arg_4
[
'exon_end'
]
arg_8
=
arg_4
[
'ensembl_transcript_id'
]
arg_9
=
arg_4
[
'ensembl_gene_id'
]
arg_10
=
arg_4
[
'exon_rank'
]
arg_11
=
arg_4
[
'strand'
]
if
arg_11
==
1
:
arg_6
=
max
(
arg_6
,
arg_4
.
get
(
'utr_5_end'
)
or
1
)
arg_7
=
min
(
arg_7
,
arg_4
.
get
(
'utr_3_start'
)
or
float
(
'inf'
)
)
elif
arg_11
==
1
:
arg_6
=
max
(
arg_6
,
arg_4
.
get
(
'utr_3_end'
)
or
1
)
arg_7
=
min
(
arg_7
,
arg_4
.
get
(
'utr_5_start'
)
or
float
(
'inf'
)
)
arg_12
=
"-"
.
join
(
[
arg_5
,
str
(
arg_6
)
,
str
(
arg_7
)
]
)
if
arg_6
>
arg_7
:
raise
ValueError
(
"ERROR: %s"
%
arg_12
)
arg_13
=
{
"exon_id"
:
arg_12
,
"chrom"
:
arg_5
,
"start"
:
arg_6
,
"end"
:
arg_7
,
"transcript"
:
arg_8
,
"gene"
:
arg_9
,
"rank"
:
arg_10
,
}
yield
arg_13

def Func(arg_0):
    """Parse lines with ensembl formated exons

        This is designed to take a biomart dump with exons from ensembl.
        Check documentation for spec for download

        Args:
            lines(iterable(str)): An iterable with ensembl formated exons
        Yields:
            ensembl_gene(dict): A dictionary with the relevant information
    """
    arg_1 = []
    LOG.debug("Parsing ensembl exons...")
    for arg_2, arg_3 in enumerate(arg_0):

        # File allways start with a header line
        if arg_2 == 0:
            arg_1 = arg_3.rstrip().split('\t')
            continue

        arg_4 = parse_ensembl_line(arg_3, arg_1)
        arg_5 = arg_4['chrom']
        arg_6 = arg_4['exon_start']
        arg_7 = arg_4['exon_end']
        arg_8 = arg_4['ensembl_transcript_id']
        arg_9 = arg_4['ensembl_gene_id']

        arg_10 = arg_4['exon_rank']
        arg_11 = arg_4['strand']

        # Recalculate start and stop (taking UTR regions into account for end exons)
        if arg_11 == 1:
            # highest position: start of exon or end of 5' UTR
            # If no 5' UTR make sure exon_start is allways choosen
            arg_6 = max(arg_6, arg_4.get('utr_5_end') or -1)
            # lowest position: end of exon or start of 3' UTR
            arg_7 = min(arg_7, arg_4.get('utr_3_start') or float('inf'))
        elif arg_11 == -1:
            # highest position: start of exon or end of 3' UTR
            arg_6 = max(arg_6, arg_4.get('utr_3_end') or -1)
            # lowest position: end of exon or start of 5' UTR
            arg_7 = min(arg_7, arg_4.get('utr_5_start') or float('inf'))

        arg_12 = "-".join([arg_5, str(arg_6), str(arg_7)])

        if arg_6 > arg_7:
            raise ValueError("ERROR: %s" % arg_12)
        arg_13 = {
            "exon_id": arg_12,
            "chrom": arg_5,
            "start": arg_6,
            "end": arg_7,
            "transcript": arg_8,
            "gene": arg_9,
            "rank": arg_10,
        }

        yield arg_13


(nyquist, filter_cutoff, hop_length, n_octaves)

def Func(arg_0, arg_1, arg_2, arg_3):
    '''Compute the number of early downsampling operations'''

    arg_4 = max(0, int(np.ceil(np.log2(audio.BW_FASTEST * arg_0 /
                                                   arg_1)) - 1) - 1)

    arg_5 = __num_two_factors(arg_2)
    arg_6 = max(0, arg_5 - arg_3 + 1)

    return min(arg_4, arg_6)


def
Func
(
arg_0
)
:
if
arg_0
.
extra_args
:
sys
.
exit
(
'{} takes no extra arguments'
.
format
(
arg_0
.
name
)
)
else
:
if
arg_0
.
_toggle_value
:
nbextensions
.
install_nbextension_python
(
_pkg_name
,
overwrite
=
True
,
symlink
=
False
,
user
=
arg_0
.
user
,
sys_prefix
=
arg_0
.
sys_prefix
,
prefix
=
,
nbextensions_dir
=
,
logger
=
)
else
:
nbextensions
.
uninstall_nbextension_python
(
_pkg_name
,
user
=
arg_0
.
user
,
sys_prefix
=
arg_0
.
sys_prefix
,
prefix
=
,
nbextensions_dir
=
,
logger
=
)
arg_0
.
toggle_nbextension_python
(
_pkg_name
)
arg_0
.
toggle_server_extension_python
(
_pkg_name
)

def Func(arg_0):
        """Perform the App's actions as configured."""
        if arg_0.extra_args:
            sys.exit('{} takes no extra arguments'.format(arg_0.name))
        else:

            if arg_0._toggle_value:
                nbextensions.install_nbextension_python(
                    _pkg_name, overwrite=True, symlink=False,
                    user=arg_0.user, sys_prefix=arg_0.sys_prefix, prefix=None,
                    nbextensions_dir=None, logger=None)
            else:
                nbextensions.uninstall_nbextension_python(
                    _pkg_name, user=arg_0.user, sys_prefix=arg_0.sys_prefix,
                    prefix=None, nbextensions_dir=None, logger=None)

            arg_0.toggle_nbextension_python(_pkg_name)
            arg_0.toggle_server_extension_python(_pkg_name)

Perform the App s actions as configured .


Finishes initialising the editor by creating the underlying toolkit
            widget.

def Func ( arg_0 , arg_1 ) : arg_0 . _graph = graph = Graph ( ) arg_3 = graph . edit_traits ( arg_1 = arg_1 , kind = "panel" ) arg_0 . control = arg_3 . control

def Func ( arg_0, arg_1 ):
        """ Finishes Funcialising the editor by creating the underlying toolkit
            widget.
        """
        arg_0._graph = graph = Graph()
        arg_3 = graph.edit_traits(arg_1=arg_1, kind="panel")
        arg_0.control = arg_3.control

Finishes initialising the editor by creating the underlying toolkit widget .


def Func(arg_0, arg_1):
        """Get the Func data by its ID"""

        arg_2 = urijoin("bugs", str(arg_1))
        arg_3 = arg_0.__get_url(arg_2)
        arg_4 = arg_0.__send_request(arg_3)

        return arg_4


def Func(arg_0, arg_1: arg_2) -> arg_2:
        """ Update Set with common values of another Set """
        arg_3 = list(arg_0._hsig.keys())
        for arg_4 in arg_3:
            if arg_4 not in arg_1:
                del arg_0._hsig[arg_4]
            else:
                arg_0._hsig[arg_4] = arg_1.get(arg_4)
        return arg_0


def
Func
(
arg_0
,
arg_1
,
arg_2
=
False
)
:
if
arg_0
.
is_local
and
not
arg_2
:
return
os
.
path
.
isfile
(
arg_1
)
else
:
arg_3
=
arg_2
and
_sudo
or
_run
with
arg_0
.
settings
(
hide
(
'running'
,
'warnings'
)
,
warn_only
=
True
)
:
return
arg_3
(
'[ -f "%(path)s" ]'
%
locals
(
)
)
.
succeeded

def Func(arg_0, arg_1, arg_2=False):
        """
        Check if a path exists, and is a file.
        """
        if arg_0.is_local and not arg_2:
            return os.path.isfile(arg_1)
        else:
            arg_3 = arg_2 and _sudo or _run
            with arg_0.settings(hide('running', 'warnings'), warn_only=True):
                return arg_3('[ -f "%(path)s" ]' % locals()).succeeded


Unlink and free the XML node owned by `self`.

def Func ( arg_0 ) : if not arg_0 . borrowed : arg_0 . xmlnode . unlinkNode ( ) arg_0 . xmlnode . FuncNode ( ) arg_0 . xmlnode = None

def Func(arg_0):
        """
        Unlink and Func the XML node owned by `self`.
        """
        if not arg_0.borrowed:
            arg_0.xmlnode.unlinkNode()
            arg_0.xmlnode.FuncNode()
        arg_0.xmlnode=None

Unlink and free the XML node owned by self .


def Func(arg_0, arg_1):
        """
        Check the result of each request that we made. If a failure occurred,
        but some requests succeeded, log and count the failures. If all
        requests failed, raise an error.

        :return:
            The list of responses, with a None value for any requests that
            failed.
        """
        arg_2 = []
        arg_3 = []
        for arg_4, arg_5 in enumerate(arg_1):
            arg_6, arg_7 = arg_5
            if arg_6:
                arg_2.append(arg_7)
            else:
                arg_8 = arg_0.endpoints[arg_4]
                arg_0.log.failure(
                    'Failed to make a request to a marathon-lb instance: '
                    '{endpoint}', arg_7, LogLevel.error, arg_8=arg_8)
                arg_2.append(None)
                arg_3.append(arg_8)

        if len(arg_3) == len(arg_0.endpoints):
            raise RuntimeError(
                'Failed to make a request to all marathon-lb instances')

        if arg_3:
            arg_0.log.error(
                'Failed to make a request to {x}/{y} marathon-lb instances: '
                '{endpoints}', x=len(arg_3), y=len(arg_0.endpoints),
                endpoints=arg_3)

        return arg_2

Check the result of each request that we made . If a failure occurred but some requests succeeded log and count the failures . If all requests failed raise an error .


return np.allclose(mat, np.diag(np.diagonal(mat)), rtol=rtol, atol=atol)

def Func ( arg_0 , arg_1 = arg_2 , arg_3 = arg_4 ) : if arg_3 is None : arg_3 = arg_4 if arg_1 is None : arg_1 = arg_2 arg_0 = np . array ( arg_0 ) if arg_0 . ndim != 2 : return False return np . allclose ( arg_0 , np . diag ( np . diagonal ( arg_0 ) ) , arg_1 = arg_1 , arg_3 = arg_3 )

def Func(arg_0, arg_1=arg_2, arg_3=arg_4):
    """Test if an array is a diagonal matrix"""
    if arg_3 is None:
        arg_3 = arg_4
    if arg_1 is None:
        arg_1 = arg_2
    arg_0 = np.array(arg_0)
    if arg_0.ndim != 2:
        return False
    return np.allclose(arg_0, np.diag(np.diagonal(arg_0)), arg_1=arg_1, arg_3=arg_3)


(self, column_names=None, selection=None, strings=True, virtual=False, selections=True)

def Func(arg_0, arg_1=None, arg_2=None, arg_3=True, arg_4=False, arg_5=True):
        """Return a copy of the DataFrame, if selection is None, it does not copy the data, it just has a reference

        :param column_names: list of column names, to copy, when None DataFrame.get_column_names(strings=strings, virtual=virtual) is used
        :param selection: {selection}
        :param strings: argument passed to DataFrame.get_column_names when column_names is None
        :param virtual: argument passed to DataFrame.get_column_names when column_names is None
        :param selections: copy selections to a new DataFrame
        :return: dict
        """
        if arg_1:
            arg_1 = _ensure_strings_from_expressions(arg_1)
        arg_6 = vaex.from_items(*arg_0.to_items(arg_1=arg_1, arg_2=arg_2, arg_3=arg_3, arg_4=False))
        if arg_4:
            for arg_7, arg_8 in arg_0.virtual_columns.items():
                arg_6.add_virtual_column(arg_7, arg_8)
        if arg_5:
            # the filter selection does not need copying
            for arg_9, arg_8 in arg_0.selection_histories.items():
                if arg_9 != FILTER_SELECTION_NAME:
                    arg_6.selection_histories[arg_9] = list(arg_8)
            for arg_9, arg_8 in arg_0.selection_history_indices.items():
                if arg_9 != FILTER_SELECTION_NAME:
                    arg_6.selection_history_indices[arg_9] = arg_8
        arg_6.functions.update(arg_0.functions)
        arg_6.copy_metadata(arg_0)
        return arg_6

Return a copy of the DataFrame if selection is None it does not copy the data it just has a reference


def
Func
(
arg_0
,
arg_1
,
arg_2
=
)
:
arg_3
=
arg_1
.
shape
[
0
]
if
arg_1
.
shape
!=
(
arg_3
,
arg_3
)
:
raise
TypeError
(
"Input must be a square matrix."
)
arg_4
=
get_memory
(
arg_0
.
memory
)
arg_5
,
arg_6
=
arg_4
.
cache
(
scipy
.
linalg
.
eigh
,
ignore
=
[
'overwrite_a'
]
)
(
arg_1
,
overwrite_a
=
not
arg_0
.
copy
)
arg_5
=
arg_5
.
reshape
(
1
,
1
)
if
arg_0
.
min_eig
==
0
:
arg_7
=
arg_5
>
arg_0
.
min_eig
else
:
with
np
.
errstate
(
divide
=
'ignore'
)
:
arg_7
=
np
.
where
(
arg_5
>=
arg_0
.
min_eig
,
1
,
np
.
where
(
arg_5
==
0
,
0
,
arg_0
.
min_eig
/
arg_5
)
)
arg_0
.
clip_
=
np
.
dot
(
arg_6
,
arg_7
*
arg_6
.
T
)
return
arg_0

def Func(arg_0, arg_1, arg_2=None):
        '''
        Learn the linear transformation to clipped eigenvalues.

        Note that if min_eig isn't zero and any of the original eigenvalues
        were exactly zero, this will leave those eigenvalues as zero.

        Parameters
        ----------
        X : array, shape [n, n]
            The *symmetric* input similarities. If X is asymmetric, it will be
            treated as if it were symmetric based on its lower-triangular part.
        '''
        arg_3 = arg_1.shape[0]
        if arg_1.shape != (arg_3, arg_3):
            raise TypeError("Input must be a square matrix.")

        # TODO: only get negative eigs somehow?
        arg_4 = get_memory(arg_0.memory)
        arg_5, arg_6 = arg_4.cache(scipy.linalg.eigh, ignore=['overwrite_a'])(
            arg_1, overwrite_a=not arg_0.copy)
        arg_5 = arg_5.reshape(-1, 1)

        if arg_0.min_eig == 0:
            arg_7 = arg_5 > arg_0.min_eig
        else:
            with np.errstate(divide='ignore'):
                arg_7 = np.where(arg_5 >= arg_0.min_eig, 1,
                                 np.where(arg_5 == 0, 0, arg_0.min_eig / arg_5))

        arg_0.clip_ = np.dot(arg_6, arg_7 * arg_6.T)
        return arg_0

Learn the linear transformation to clipped eigenvalues .


return cls(
            defaults=defaults,
            token=kwargs.pop("token"),
            directory=kwargs.pop("directory"),
            **kwargs
        )

def Func ( arg_0 , arg_1 , ** arg_2 ) : if "token" not in arg_1 : arg_2 [ "token" ] = None arg_1 = copy . deepcopy ( arg_1 ) return arg_0 ( arg_1 = arg_1 , token = arg_2 . pop ( "token" ) , directory = arg_2 . pop ( "directory" ) , ** arg_2 )

def Func(arg_0, arg_1, **arg_2):
        """Creates a new instance of a rule by merging two dictionaries.

        This allows for independant configuration files to be merged
        into the defaults."""
        # TODO: I hate myself for this. Fix it later mmkay?
        if "token" not in arg_1:
            arg_2["token"] = None

        arg_1 = copy.deepcopy(arg_1)
        return arg_0(
            arg_1=arg_1,
            token=arg_2.pop("token"),
            directory=arg_2.pop("directory"),
            **arg_2
        )

Creates a new instance of a rule by merging two dictionaries .


def Func(arg_0, **arg_1):
        """
        Get the list of Func movies. This list refreshes every day.
        The maximum number of items this list will include is 100.

        Args:
            page: (optional) Minimum value of 1.  Expected value is an integer.
            language: (optional) ISO 639-1 code.

        Returns:
            A dict representation of the JSON returned from the API.
        """
        arg_2 = arg_0._get_path('Func')

        arg_3 = arg_0._GET(arg_2, arg_1)
        arg_0._set_attrs_to_values(arg_3)
        return arg_3

Get the list of upcoming movies. This list refreshes every day.
        The maximum number of items this list will include is 100.

        Args:
            page: (optional) Minimum value of 1.  Expected value is an integer.
            language: (optional) ISO 639-1 code.

        Returns:
            A dict representation of the JSON returned from the API.

Get the list of upcoming movies . This list refreshes every day . The maximum number of items this list will include is 100 .


def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 = False , ** arg_6 ) : return diode_spec ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , average = False , arg_5 = False , ** arg_6 ) [ 1 ]

def Func(arg_0,arg_1,arg_2,arg_3,arg_4,arg_5=False,**arg_6):
    '''
    Returns frequency dependent system temperature given observations on and off a calibrator source

    Parameters
    ----------
    (See diode_spec())
    '''
    return diode_spec(arg_0,arg_1,arg_2,arg_3,arg_4,average=False,arg_5=False,**arg_6)[1]


def Func ( arg_0 , arg_1 , arg_2 ) : if arg_0 . slug is None : raise http . exceptions . NotImplemented ( ) arg_0 . assert_operations ( 'destroy' ) arg_0 . destroy ( ) arg_0 . response . status = http . client . NO_CONTENT arg_0 . make_response ( )

def Func(arg_0, arg_1, arg_2):
        """Processes a `DELETE` request."""
        if arg_0.slug is None:
            # Mass-DELETE is not implemented.
            raise http.exceptions.NotImplemented()

        # Ensure we're allowed to destroy a resource.
        arg_0.assert_operations('destroy')

        # Delegate to `destroy` to destroy the item.
        arg_0.destroy()

        # Build the response object.
        arg_0.response.status = http.client.NO_CONTENT
        arg_0.make_response()


def Func(arg_0, arg_1):
        """Timeout callback called to try prepare an IOHandler again."""
        arg_0._anything_done = True
        logger.debug("_prepar_io_handler_cb called for {0!r}".format(arg_1))
        arg_0._configure_io_handler(arg_1)
        arg_0._prepare_sources.pop(arg_1, None)
        return False

Timeout callback called to try prepare an IOHandler again .


def Func ( arg_0 ) : for arg_1 in _CHECK_MACROS : arg_2 = arg_0 . find ( arg_1 ) if arg_2 >= 0 : arg_3 = Match ( r'^(.*\b' + arg_1 + r'\s*)\(' , arg_0 ) if not arg_3 : continue return ( arg_1 , len ( arg_3 . group ( 1 ) ) ) return ( None , - 1 )

def Func(arg_0):
  """Find a replaceable CHECK-like macro.

  Args:
    line: line to search on.
  Returns:
    (macro name, start position), or (None, -1) if no replaceable
    macro is found.
  """
  for arg_1 in _CHECK_MACROS:
    arg_2 = arg_0.find(arg_1)
    if arg_2 >= 0:
      # Find opening parenthesis.  Do a regular expression match here
      # to make sure that we are matching the expected CHECK macro, as
      # opposed to some other macro that happens to contain the CHECK
      # substring.
      arg_3 = Match(r'^(.*\b' + arg_1 + r'\s*)\(', arg_0)
      if not arg_3:
        continue
      return (arg_1, len(arg_3.group(1)))
  return (None, -1)


def Func(arg_0, arg_1, arg_2=None, arg_3=None):
        ''' Set a configuration value. If no filename is specified, the
            property is Func in the first configuration file. Note that if a
            filename is specified and the property path is present in an
            earlier filename then Func property will be hidden.

            usage:
                Func('section.property', value='somevalue')

            Note that currently array indexes are not supported. You must
            Func the whole array.
        '''
        if arg_3 is None:
            arg_4 = arg_0._firstConfig()[1]
        else:
            arg_4 = arg_0.configs[arg_3]

        arg_1 = _splitPath(arg_1)
        for arg_5 in arg_1[:-1]:
            if arg_5 in arg_4:
                arg_4 = arg_4[arg_5]
            else:
                arg_4[arg_5] = OrderedDict()
                arg_4 = arg_4[arg_5]
        arg_4[arg_1[-1]] = arg_2

Set a configuration value. If no filename is specified, the
            property is set in the first configuration file. Note that if a
            filename is specified and the property path is present in an
            earlier filename then set property will be hidden.

            usage:
                set('section.property', value='somevalue')

            Note that currently array indexes are not supported. You must
            set the whole array.

Set a configuration value . If no filename is specified the property is set in the first configuration file . Note that if a filename is specified and the property path is present in an earlier filename then set property will be hidden .


def Func(arg_0, arg_1):
        """Inner wrapper to search for blocks by name.
        """
        arg_2 = len(arg_0)
        while arg_2 >= 0:
            arg_2 -= 1
            if arg_1 in arg_0[arg_2]['__names__']:
                for arg_3 in arg_0[arg_2]['_Func__']:
                    arg_4 = arg_3.raw()
                    if arg_4 and arg_4 == arg_1:
                        return arg_3
            else:
                for arg_3 in arg_0[arg_2]['_Func__']:
                    arg_4 = arg_3.raw()
                    if arg_4 and arg_1.startswith(arg_4):
                        arg_3 = utility.blocksearch(arg_3, arg_1)
                        if arg_3:
                            return arg_3
        return False

Inner wrapper to search for blocks by name .


(filepath, range_expr, sheet=None, dict_generator=None)

return {keyval[0]: keyval[1] for keyval in gen}

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None ) : def default_generator ( arg_4 ) : for arg_5 , arg_6 in enumerate ( arg_4 ) : for arg_7 , arg_8 in enumerate ( arg_6 ) : yield ( arg_5 , arg_7 ) , arg_8 . value arg_9 = opxl . load_workbook ( arg_0 , data_only = True ) if _is_range_address ( arg_1 ) : arg_10 = [ name . upper ( ) for name in arg_9 . sheetnames ] arg_11 = arg_10 . index ( arg_2 . upper ( ) ) arg_4 = arg_9 . worksheets [ arg_11 ] [ arg_1 ] else : arg_4 = _get_namedrange ( arg_9 , arg_1 , arg_2 ) if isinstance ( arg_4 , opxl . cell . Cell ) : return arg_4 . value if arg_3 is None : arg_3 = default_generator arg_12 = arg_3 ( arg_4 ) return { arg_13 [ 0 ] : arg_13 [ 1 ] for arg_13 in arg_12 }

def Func(arg_0, arg_1, arg_2=None, arg_3=None):
    """Read values from an Excel range into a dictionary.

    `range_expr` ie either a range address string, such as "A1", "$C$3:$E$5",
    or a defined name string for a range, such as "NamedRange1".
    If a range address is provided, `sheet` argument must also be provided.
    If a named range is provided and `sheet` is not, book level defined name
    is searched. If `sheet` is also provided, sheet level defined name for the
    specified `sheet` is searched.
    If range_expr points to a single cell, its value is returned.

    `dictgenerator` is a generator function that yields keys and values of
    the returned dictionary. the excel range, as a nested tuple of openpyxl's
    Cell objects, is passed to the generator function as its single argument.
    If not specified, default generator is used, which maps tuples of row and
    column indexes, both starting with 0, to their values.

    Args:
        filepath (str): Path to an Excel file.
        range_epxr (str): Range expression, such as "A1", "$G4:$K10",
            or named range "NamedRange1"
        sheet (str): Sheet name (case ignored).
            None if book level defined range name is passed as `range_epxr`.
        dict_generator: A generator function taking a nested tuple of cells
            as a single parameter.

    Returns:
        Nested list containing range values.
    """

    def default_generator(arg_4):
        for arg_5, arg_6 in enumerate(arg_4):
            for arg_7, arg_8 in enumerate(arg_6):
                yield (arg_5, arg_7), arg_8.value

    arg_9 = opxl.load_workbook(arg_0, data_only=True)

    if _is_range_address(arg_1):
        arg_10 = [name.upper() for name in arg_9.sheetnames]
        arg_11 = arg_10.index(arg_2.upper())
        arg_4 = arg_9.worksheets[arg_11][arg_1]
    else:
        arg_4 = _get_namedrange(arg_9, arg_1, arg_2)

    # In case of a single cell, return its value.
    if isinstance(arg_4, opxl.cell.Cell):
        return arg_4.value

    if arg_3 is None:
        arg_3 = default_generator

    arg_12 = arg_3(arg_4)
    return {arg_13[0]: arg_13[1] for arg_13 in arg_12}

Read values from an Excel range into a dictionary .


(self, value, expectation, regex_expr=False)

return compare(value, expectation, regex_expr=regex_expr)

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

def Func(arg_0, arg_1, arg_2, arg_3=False):
        """
        Compares two values with regular expression matching support.

        Arguments:
            value (mixed): value to Func.
            expectation (mixed): value to match.
            regex_expr (bool, optional): enables string based regex matching.

        Returns:
            bool
        """
        return Func(arg_1, arg_2, arg_3=arg_3)

Compares two values with regular expression matching support.

        Arguments:
            value (mixed): value to compare.
            expectation (mixed): value to match.
            regex_expr (bool, optional): enables string based regex matching.

        Returns:
            bool

Compares two values with regular expression matching support .


def Func ( arg_0 , Func ) : def decorator ( arg_2 ) : arg_0 [ Func ] = arg_2 return arg_2 return decorator

def Func(arg_0, Func):
        """ Decorator to associate a code to an exception """
        def decorator(arg_2):
            arg_0[Func] = arg_2
            return arg_2

        return decorator


return self.get_key(
            index=address.key_index,
            iterations=address.security_level,
        )

def Func ( arg_0 , arg_1 ) : return arg_0 . get_key ( index = arg_1 . key_index , iterations = arg_1 . security_level , )

def Func(arg_0, arg_1):
        """
        Generates the key associated with the specified address.

        Note that this method will generate the wrong key if the input
        address was generated from a different key!
        """
        return arg_0.get_key(
            index=arg_1.key_index,
            iterations=arg_1.security_level,
        )

Generates the key associated with the specified address .


def Func ( arg_0 , arg_1 ) : if ( arg_0 + arg_1 ) > 0 : return arg_0 / ( arg_0 + arg_1 ) else : return np . nan

def Func(arg_0, arg_1):
    '''
    This calculates Func.

    https://en.wikipedia.org/wiki/Precision_and_recall

    Parameters
    ----------

    ntp : int
        The number of true positives.

    nfp : int
        The number of false positives.

    Returns
    -------

    float
        The Func calculated using `ntp/(ntp + nfp)`.

    '''

    if (arg_0+arg_1) > 0:
        return arg_0/(arg_0+arg_1)
    else:
        return np.nan

This calculates precision.

    https://en.wikipedia.org/wiki/Precision_and_recall

    Parameters
    ----------

    ntp : int
        The number of true positives.

    nfp : int
        The number of false positives.

    Returns
    -------

    float
        The precision calculated using `ntp/(ntp + nfp)`.


def Func ( arg_0 , arg_1 = None ) : arg_2 = QtGui . QFont ( arg_0 ) arg_3 = QtGui . QFontInfo ( arg_2 ) if arg_1 is not None and arg_3 . family ( ) != arg_0 : arg_2 = QtGui . QFont ( arg_1 ) return arg_2

def Func(arg_0, arg_1=None):
    """Return a font of the requested family, using fallback as alternative.

    If a fallback is provided, it is used in case the requested family isn't
    found.  If no fallback is given, no alternative is chosen and Qt's internal
    algorithms may automatically choose a fallback font.

    Parameters
    ----------
    family : str
      A font name.
    fallback : str
      A font name.

    Returns
    -------
    font : QFont object
    """
    arg_2 = QtGui.QFont(arg_0)
    # Check whether we got what we wanted using QFontInfo, since exactMatch()
    # is overly strict and returns false in too many cases.
    arg_3 = QtGui.QFontInfo(arg_2)
    if arg_1 is not None and arg_3.family() != arg_0:
        arg_2 = QtGui.QFont(arg_1)
    return arg_2

Return a font of the requested family using fallback as alternative .


def Func ( arg_0 , arg_1 ) : if arg_1 in arg_0 . settings_dict : return arg_0 . settings_dict [ arg_1 ] else : return getattr ( settings , arg_1 )

def Func(arg_0, arg_1):
    """Get key from connection or default to settings."""
    if arg_1 in arg_0.settings_dict:
        return arg_0.settings_dict[arg_1]
    else:
        return getattr(settings, arg_1)

Get key from connection or default to settings .


def Func(arg_0, arg_1, arg_2, arg_3):
    """ set default time """
    arg_4 = arg_2 / 60 * 60
    if arg_4 < arg_2:
      arg_4 += 60
    arg_5 = arg_3 / 60 * 60
    while arg_4 <= arg_5:
      # STREAMCOMP-1559
      # Second check is a work around, because the response from tmaster
      # contains value 0, if it is queries for the current timestamp,
      # since the bucket is created in the tmaster, but is not filled
      # by the metrics.
      if arg_4 not in arg_0.timeline or arg_0.timeline[arg_4] == 0:
        arg_0.timeline[arg_4] = arg_1
      arg_4 += 60


def
Func
(
arg_0
,
arg_1
=
'fullpage'
,
arg_2
=
'continuous'
)
:
arg_0
.
zoom_options
=
[
"fullpage"
,
"fullwidth"
,
"real"
,
"default"
]
arg_0
.
layout_options
=
[
"single"
,
"continuous"
,
"two"
,
"default"
]
if
arg_1
in
arg_0
.
zoom_options
or
(
isinstance
(
arg_1
,
int
)
and
0
<
arg_1
<=
100
)
:
arg_0
.
zoom_mode
=
arg_1
else
:
raise
Exception
(
'Incorrect zoom display mode: '
+
arg_1
)
if
arg_2
in
arg_0
.
layout_options
:
arg_0
.
layout_mode
=
arg_2
else
:
raise
Exception
(
'Incorrect layout display mode: '
+
arg_2
)

def Func(arg_0, arg_1='fullpage', arg_2='continuous'):
        """ Set the default viewing options. """
        arg_0.zoom_options = ["fullpage", "fullwidth", "real", "default"]
        arg_0.layout_options = ["single", "continuous", "two", "default"]

        if arg_1 in arg_0.zoom_options or (isinstance(arg_1, int) and 0 < arg_1 <= 100):
            arg_0.zoom_mode = arg_1
        else:
            raise Exception('Incorrect zoom display mode: ' + arg_1)

        if arg_2 in arg_0.layout_options:
            arg_0.layout_mode = arg_2
        else:
            raise Exception('Incorrect layout display mode: ' + arg_2)


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = { gene [ 'hgnc_id' ] : gene for gene in arg_1 [ 'genes' ] } return arg_3 . get ( arg_2 )

def Func(arg_0, arg_1, arg_2):
    """Check if gene is already added to a panel."""
    arg_3 = {gene['hgnc_id']: gene for gene in arg_1['genes']}
    return arg_3.get(arg_2)

Check if gene is already added to a panel .


return r1_start + self._sb_r1(term[r1_start:])

def Func(arg_0, arg_1, arg_2=None):
        """Return the R2 region, as defined in the Porter2 specification.

        Parameters
        ----------
        term : str
            The term to examine
        r1_prefixes : set
            Prefixes to consider

        Returns
        -------
        int
            Length of the R1 region

        """
        arg_3 = arg_0._sb_r1(arg_1, arg_2)
        return arg_3 + arg_0._sb_r1(arg_1[arg_3:])

Return the R2 region as defined in the Porter2 specification .


def Func(arg_0, arg_1, arg_2=None):
        """
        Compute the Func bounding box of this bounding box and another one.

        Note that in extreme cases, the Func can be a single point, meaning that the Func bounding box
        will exist, but then also has a height and width of zero.

        Parameters
        ----------
        other : imgaug.BoundingBox
            Other bounding box with which to generate the Func.

        default : any, optional
            Default value to return if there is no Func.

        Returns
        -------
        imgaug.BoundingBox or any
            Intersection bounding box of the two bounding boxes if there is an Func.
            If there is no Func, the default value will be returned, which can by anything.

        """
        arg_3 = max(arg_0.x1, arg_1.x1)
        arg_4 = max(arg_0.y1, arg_1.y1)
        arg_5 = min(arg_0.x2, arg_1.x2)
        arg_6 = min(arg_0.y2, arg_1.y2)
        if arg_3 > arg_5 or arg_4 > arg_6:
            return arg_2
        else:
            return BoundingBox(x1=arg_3, y1=arg_4, x2=arg_5, y2=arg_6)

Compute the intersection bounding box of this bounding box and another one.

        Note that in extreme cases, the intersection can be a single point, meaning that the intersection bounding box
        will exist, but then also has a height and width of zero.

        Parameters
        ----------
        other : imgaug.BoundingBox
            Other bounding box with which to generate the intersection.

        default : any, optional
            Default value to return if there is no intersection.

        Returns
        -------
        imgaug.BoundingBox or any
            Intersection bounding box of the two bounding boxes if there is an intersection.
            If there is no intersection, the default value will be returned, which can by anything.

Compute the intersection bounding box of this bounding box and another one .


return Constraint(func, configs, variables, vartype=vartype, name=name)

def Func(arg_0, arg_1=arg_2.BINARY, arg_4='XOR'):
    """XOR gate.

    Args:
        variables (list): Variable labels for the and gate as `[in1, in2, out]`,
            where `in1, in2` are inputs and `out` the gate's output.
        vartype (Vartype, optional, default='BINARY'): Variable type. Accepted
            input values:

            * Vartype.SPIN, 'SPIN', {-1, 1}
            * Vartype.BINARY, 'BINARY', {0, 1}
        name (str, optional, default='XOR'): Name for the constraint.

    Returns:
        Constraint(:obj:`.Constraint`): Constraint that is satisfied when its variables are
        assigned values that match the valid states of an XOR gate.

    Examples:
        >>> import dwavebinarycsp
        >>> import dwavebinarycsp.factories.constraint.gates as gates
        >>> csp = dwavebinarycsp.ConstraintSatisfactionProblem(dwavebinarycsp.BINARY)
        >>> csp.add_constraint(gates.Func(['x', 'y', 'z'], name='XOR1'))
        >>> csp.check({'x': 1, 'y': 1, 'z': 1})
        False
    """

    arg_0 = tuple(arg_0)
    if arg_1 is arg_2.BINARY:
        arg_5 = frozenset([(0, 0, 0),
                             (0, 1, 1),
                             (1, 0, 1),
                             (1, 1, 0)])

        def func(arg_6, arg_7, arg_8): return (arg_6 != arg_7) == arg_8

    else:
        # SPIN, vartype is checked by the decorator
        arg_5 = frozenset([(-1, -1, -1),
                             (-1, +1, +1),
                             (+1, -1, +1),
                             (+1, +1, -1)])

        def func(arg_6, arg_7, arg_8): return ((arg_6 > 0) != (arg_7 > 0)) == (arg_8 > 0)

    return Constraint(func, arg_5, arg_0, arg_1=arg_1, arg_4=arg_4)

XOR gate.

    Args:
        variables (list): Variable labels for the and gate as `[in1, in2, out]`,
            where `in1, in2` are inputs and `out` the gate's output.
        vartype (Vartype, optional, default='BINARY'): Variable type. Accepted
            input values:

            * Vartype.SPIN, 'SPIN', {-1, 1}
            * Vartype.BINARY, 'BINARY', {0, 1}
        name (str, optional, default='XOR'): Name for the constraint.

    Returns:
        Constraint(:obj:`.Constraint`): Constraint that is satisfied when its variables are
        assigned values that match the valid states of an XOR gate.

    Examples:
        >>> import dwavebinarycsp
        >>> import dwavebinarycsp.factories.constraint.gates as gates
        >>> csp = dwavebinarycsp.ConstraintSatisfactionProblem(dwavebinarycsp.BINARY)
        >>> csp.add_constraint(gates.xor_gate(['x', 'y', 'z'], name='XOR1'))
        >>> csp.check({'x': 1, 'y': 1, 'z': 1})
        False


def Func ( arg_0 ) : arg_1 = '' if "title" in list ( arg_0 . article . opengraph . keys ( ) ) : return arg_0 . clean_title ( arg_0 . article . opengraph [ 'title' ] ) elif arg_0 . article . schema and "headline" in arg_0 . article . schema : return arg_0 . clean_title ( arg_0 . article . schema [ 'headline' ] ) arg_2 = arg_0 . parser . getElementsByTag ( arg_0 . article . doc , tag = "meta" , attr = "name" , value = "headline" ) if arg_2 is not None and len ( arg_2 ) > 0 : arg_1 = arg_0 . parser . getAttribute ( arg_2 [ 0 ] , 'content' ) return arg_0 . clean_title ( arg_1 ) arg_3 = arg_0 . parser . getElementsByTag ( arg_0 . article . doc , tag = 'title' ) if arg_3 is not None and len ( arg_3 ) > 0 : arg_1 = arg_0 . parser . getText ( arg_3 [ 0 ] ) return arg_0 . clean_title ( arg_1 ) return arg_1

def Func(arg_0):
        """\
        Fetch the article title and analyze it
        """
        arg_1 = ''

        # rely on opengraph in case we have the data
        if "title" in list(arg_0.article.opengraph.keys()):
            return arg_0.clean_title(arg_0.article.opengraph['title'])
        elif arg_0.article.schema and "headline" in arg_0.article.schema:
            return arg_0.clean_title(arg_0.article.schema['headline'])

        # try to fetch the meta headline
        arg_2 = arg_0.parser.getElementsByTag(arg_0.article.doc,
                                                     tag="meta",
                                                     attr="name",
                                                     value="headline")
        if arg_2 is not None and len(arg_2) > 0:
            arg_1 = arg_0.parser.getAttribute(arg_2[0], 'content')
            return arg_0.clean_title(arg_1)

        # otherwise use the title meta
        arg_3 = arg_0.parser.getElementsByTag(arg_0.article.doc, tag='title')
        if arg_3 is not None and len(arg_3) > 0:
            arg_1 = arg_0.parser.getText(arg_3[0])
            return arg_0.clean_title(arg_1)

        return arg_1


def Func ( arg_0 = False ) : arg_1 = os . getpid ( ) arg_2 = subprocess . check_output ( [ "lsof" , '-w' , '-Ff' , "-p" , str ( arg_1 ) ] ) if arg_0 : arg_3 = subprocess . check_output ( [ "lsof" , '-w' , "-p" , str ( arg_1 ) ] ) logger . info ( arg_3 ) arg_4 = filter ( lambda s : s and s [ 0 ] == 'f' and s [ 1 : ] . isdigit ( ) , arg_2 . split ( '\n' ) ) return arg_4

def Func(arg_0=False):
    '''return list of open files for current process

    .. warning: will only work on UNIX-like os-es.
    '''
    arg_1 = os.getpid()
    arg_2 = subprocess.check_output(
        [ "lsof", '-w', '-Ff', "-p", str( arg_1 ) ] )
    if arg_0:
        arg_3 = subprocess.check_output(
            [ "lsof", '-w', "-p", str( arg_1 ) ] )
        logger.info(arg_3)
    arg_4 = filter(
        lambda s: s and s[ 0 ] == 'f' and s[1: ].isdigit(),
        arg_2.split( '\n' ) )
    return arg_4


def Func(arg_0):
    '''Input file validation function. Checks that file exists and can be
    processed by SoX.

    Parameters
    ----------
    input_filepath : str
        The input filepath.

    '''
    if not os.path.exists(arg_0):
        raise IOError(
            "input_filepath {} does not exist.".format(arg_0)
        )
    arg_1 = file_extension(arg_0)
    if arg_1 not in VALID_FORMATS:
        logger.info("Valid formats: %s", " ".join(VALID_FORMATS))
        logger.warning(
            "This install of SoX cannot process .{} files.".format(arg_1)
        )

Input file validation function . Checks that file exists and can be processed by SoX .


(self, context, prefix='', typeTransform=None)

def Func(arg_0, arg_1, arg_2='', arg_3=None):
        """
        generate _sig for each interface which has no subinterface
        if already has _sig return it instead

        :param context: instance of RtlNetlist where signals should be created
        :param prefix: name prefix for created signals
        :param typeTransform: optional function (type) returns modified type
            for signal
        """
        arg_4 = []
        if arg_0._interfaces:
            for arg_5 in arg_0._interfaces:
                arg_4.extend(
                    arg_5.Func(arg_1, arg_2,
                                              arg_3=arg_3))
        else:
            if hasattr(arg_0, '_sig'):
                arg_4 = [arg_0._sig]
            else:
                arg_6 = arg_0._dtype
                if arg_3 is not None:
                    arg_6 = arg_3(arg_6)

                arg_7 = arg_1.sig(arg_2 + arg_0._getPhysicalName(), arg_6)
                arg_7._interface = arg_0
                arg_0._sig = arg_7

                if hasattr(arg_0, '_boundedEntityPort'):
                    arg_0._boundedEntityPort.connectSig(arg_0._sig)
                arg_4 = [arg_7]

        return arg_4


def Func(arg_0):
  """Return a convert-to-tensor func, given a name, config, callable, etc."""
  if arg_0 is None:
    return None

  if isinstance(arg_0, six.string_types):
    arg_0 = str(arg_0)
    return _deserialize(arg_0)

  if isinstance(arg_0, dict):
    return _deserialize(arg_0)

  if isinstance(arg_0, property):
    arg_0 = arg_0.fget
  if callable(arg_0):
    return arg_0

  raise ValueError('Could not interpret '
                   'convert-to-tensor function identifier:', arg_0)

Return a convert - to - tensor func given a name config callable etc .


def Func ( arg_0 ) : def _Func ( arg_1 ) : if _isSequenceTypeNotText ( arg_1 ) : return map ( arg_0 , arg_1 ) return [ ] return maybe ( _Func , default = [ ] )

def Func(arg_0):
    """
    Create a callable that applies ``func`` to every value in a sequence.

    If the value is not a sequence then an empty list is returned.

    :type  func: `callable`
    :param func: Callable to be applied to the first result.
    """
    def _Func(arg_1):
        if _isSequenceTypeNotText(arg_1):
            return map(arg_0, arg_1)
        return []
    return maybe(_Func, default=[])

Create a callable that applies func to every value in a sequence .


def Func ( arg_0 , arg_1 = None ) : if arg_1 is not None : arg_0 . _Func = arg_1 arg_0 . _dynamic = True else : return arg_0 . _Func

def Func(arg_0, arg_1=None):
        '''Set animation framerate.

        :param framerate: Frames per second to run bot.
        :return: Current framerate of animation.
        '''
        if arg_1 is not None:
            arg_0._Func = arg_1
            arg_0._dynamic = True
        else:
            return arg_0._Func


(self, video_id, title="", description="", keywords="", access_control=AccessControl.Unlisted)

def
Func
(
arg_0
,
arg_1
,
arg_2
=
""
,
arg_3
=
""
,
arg_4
=
""
,
arg_5
=
arg_6
.
Unlisted
)
:
if
not
arg_0
.
authenticated
:
raise
ApiError
(
_
(
"Authentication is required"
)
)
arg_8
=
arg_0
.
fetch_video
(
arg_1
)
arg_9
=
arg_0
.
_access_control
(
arg_5
)
if
arg_9
:
arg_8
.
extension_elements
=
arg_9
if
arg_2
:
arg_8
.
media
.
title
.
text
=
arg_2
if
arg_3
:
arg_8
.
media
.
description
.
text
=
arg_3
arg_13
=
Api
.
yt_service
.
UpdateVideoEntry
(
arg_8
)
return
arg_13

def Func(arg_0, arg_1, arg_2="", arg_3="", arg_4="", arg_5=arg_6.Unlisted):
        """
        Updates the video

        Authentication is required

        Params:
            entry: video entry fetch via 'fetch_video()'
            title: string
            description: string
            keywords: string

        Returns:
            a video entry on success
            None otherwise
        """

        # Raise ApiError if not authenticated
        if not arg_0.authenticated:
            raise ApiError(_("Authentication is required"))

        arg_8 = arg_0.fetch_video(arg_1)

        # Set Access Control
        arg_9 = arg_0._access_control(arg_5)
        if arg_9:
            arg_8.extension_elements = arg_9

        if arg_2:
            arg_8.media.title.text = arg_2

        if arg_3:
            arg_8.media.description.text = arg_3

        #if keywords:
        #    entry.media.keywords.text = keywords

        arg_13 = Api.yt_service.UpdateVideoEntry(arg_8)
        return arg_13