def Func ( arg_0 , arg_1 ) : arg_2 = 4.0 * np . pi * arg_0 . rads2 [ arg_1 ] arg_3 = arg_0 . neighbors . get ( arg_1 ) if arg_3 is None : return arg_2 arg_4 = arg_0 . xyzs [ arg_1 , np . newaxis ] . T arg_5 = arg_0 . sphere * arg_0 . rads [ arg_1 ] + arg_4 arg_6 = arg_5 . shape [ 1 ] for arg_7 , arg_8 in arg_3 : arg_9 = arg_0 . xyzs [ arg_7 , np . newaxis ] . T arg_10 = ( arg_5 - arg_9 ) ** 2 arg_11 = ( arg_10 [ 0 ] + arg_10 [ 1 ] + arg_10 [ 2 ] ) > arg_0 . rads2 [ arg_7 ] arg_5 = np . compress ( arg_11 , arg_5 , axis = 1 ) return arg_2 * arg_5 . shape [ 1 ] / arg_6

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

        :type i: int
        :param i: atom index

        :rtype: float
        """
        arg_2 = 4.0 * np.pi * arg_0.rads2[arg_1]

        arg_3 = arg_0.neighbors.get(arg_1)

        if arg_3 is None:
            return arg_2

        arg_4 = arg_0.xyzs[arg_1, np.newaxis].T

        arg_5 = arg_0.sphere * arg_0.rads[arg_1] + arg_4
        arg_6 = arg_5.shape[1]

        for arg_7, arg_8 in arg_3:
            arg_9 = arg_0.xyzs[arg_7, np.newaxis].T

            arg_10 = (arg_5 - arg_9) ** 2
            arg_11 = (arg_10[0] + arg_10[1] + arg_10[2]) > arg_0.rads2[arg_7]
            arg_5 = np.compress(arg_11, arg_5, axis=1)

        return arg_2 * arg_5.shape[1] / arg_6


def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_3 = arg_0 . check_items ( [ arg_1 ] ) [ 0 ] if arg_2 is None : arg_4 = arg_1 [ "version" ] else : arg_4 = arg_2 arg_5 = arg_1 [ "key" ] arg_6 = { "If-Unmodified-Since-Version" : str ( arg_4 ) } arg_6 . update ( arg_0 . default_headers ( ) ) arg_7 = requests . patch ( url = arg_0 . endpoint + "/{t}/{u}/items/{id}" . format ( t = arg_0 . library_type , u = arg_0 . library_id , id = arg_5 ) , arg_6 = arg_6 , data = json . dumps ( arg_3 ) , ) arg_0 . request = arg_7 try : arg_7 . raise_for_status ( ) except requests . exceptions . HTTPError : error_handler ( arg_7 ) return True

def Func(arg_0, arg_1, arg_2=None):
        """
        Update an existing item
        Accepts one argument, a dict containing Item data
        """
        arg_3 = arg_0.check_items([arg_1])[0]
        if arg_2 is None:
            arg_4 = arg_1["version"]
        else:
            arg_4 = arg_2
        arg_5 = arg_1["key"]
        arg_6 = {"If-Unmodified-Since-Version": str(arg_4)}
        arg_6.update(arg_0.default_headers())
        arg_7 = requests.patch(
            url=arg_0.endpoint
            + "/{t}/{u}/items/{id}".format(
                t=arg_0.library_type, u=arg_0.library_id, id=arg_5
            ),
            arg_6=arg_6,
            data=json.dumps(arg_3),
        )
        arg_0.request = arg_7
        try:
            arg_7.raise_for_status()
        except requests.exceptions.HTTPError:
            error_handler(arg_7)
        return True

Update an existing item Accepts one argument a dict containing Item data


def Func(arg_0, arg_1):
        """ Pages through an object collection from the bitbucket API.
        Returns an iterator that lazily goes through all the 'values'
        of all the pages in the collection. """
        arg_1 = arg_0.BASE_API2 + arg_1
        while arg_1 is not None:
            arg_2 = arg_0.get_data(arg_1)
            for arg_3 in arg_2['values']:
                yield arg_3
            arg_1 = arg_2.get('next', None)

Pages through an object collection from the bitbucket API . Returns an iterator that lazily goes through all the values of all the pages in the collection .


A class decorator for Command classes to register.

def
Func
(
arg_0
,
arg_1
)
:
for
arg_2
in
[
arg_1
.
name
(
)
]
+
arg_1
.
aliases
(
)
:
if
arg_2
in
arg_0
.
_Funced_commands
[
arg_0
]
:
raise
ValueError
(
"Command already exists: "
+
arg_2
)
arg_0
.
_Funced_commands
[
arg_0
]
[
arg_2
]
=
arg_1
return
arg_1

def Func(arg_0, arg_1):
        """A class decorator for Command classes to Func."""
        for arg_2 in [arg_1.name()] + arg_1.aliases():
            if arg_2 in arg_0._Funced_commands[arg_0]:
                raise ValueError("Command already exists: " + arg_2)
            arg_0._Funced_commands[arg_0][arg_2] = arg_1
        return arg_1

A class decorator for Command classes to register .


def Func ( arg_0 , arg_1 ) : arg_2 , arg_3 = scn . label ( arg_0 ) arg_4 = set ( [ i for i in range ( arg_3 ) if np . sum ( arg_2 == i ) >= arg_1 ] ) arg_5 = np . zeros_like ( arg_0 , dtype = int ) for arg_6 in range ( arg_3 ) : if arg_6 in arg_4 : arg_5 [ arg_2 == arg_6 ] = 1 return arg_5

def Func(arg_0, arg_1):
    """ Return as mask for `volume` that includes only areas where
    the connected components have a size bigger than `min_cluster_size`
    in number of voxels.

    Parameters
    -----------
    volume: numpy.array
        3D boolean array.

    min_cluster_size: int
        Minimum size in voxels that the connected component must have.

    Returns
    --------
    volume: numpy.array
        3D int array with a mask excluding small connected components.
    """
    arg_2, arg_3 = scn.label(arg_0)

    arg_4 = set([i for i in range(arg_3)
                         if np.sum(arg_2 == i) >= arg_1])

    arg_5 = np.zeros_like(arg_0, dtype=int)
    for arg_6 in range(arg_3):
        if arg_6 in arg_4:
            arg_5[arg_2 == arg_6] = 1

    return arg_5

Return as mask for volume that includes only areas where the connected components have a size bigger than min_cluster_size in number of voxels .


def Func ( ) : arg_0 = Config ( ) . get ( ConfigKeys . price_database ) arg_1 = get_session ( arg_0 ) arg_2 = arg_1 . query ( SymbolMap ) . all ( ) for arg_3 in arg_2 : click . echo ( arg_3 )

def Func():
    """ Displays all symbol maps """
    arg_0 = Config().get(ConfigKeys.price_database)
    arg_1 = get_session(arg_0)

    arg_2 = arg_1.query(SymbolMap).all()
    for arg_3 in arg_2:
        click.echo(arg_3)


return Context(
            tenant=tenant,
            sender=HipchatUser(
                id=sender_data.get('id'),
                name=sender_data.get('name'),
                mention_name=sender_data.get('mention_name'),
            ),
            signed_request=request.GET.get('signed_request'),
            context=jwt_data.get('context') or {},
        )

def
Func
(
arg_0
,
arg_1
=
)
:
arg_2
,
arg_3
=
Tenant
.
objects
.
Func
(
arg_0
,
arg_1
)
arg_4
=
arg_3
.
get
(
'sub'
)
arg_5
=
if
arg_1
and
'item'
in
arg_1
:
if
'sender'
in
arg_1
[
'item'
]
:
arg_5
=
arg_1
[
'item'
]
[
'sender'
]
elif
'message'
in
arg_1
[
'item'
]
and
'from'
in
arg_1
[
'item'
]
[
'message'
]
:
arg_5
=
arg_1
[
'item'
]
[
'message'
]
[
'from'
]
if
arg_5
is
:
if
arg_4
is
:
raise
BadTenantError
(
'Cannot identify sender in tenant'
)
arg_5
=
{
'id'
:
arg_4
}
return
Context
(
arg_2
=
arg_2
,
sender
=
HipchatUser
(
id
=
arg_5
.
get
(
'id'
)
,
name
=
arg_5
.
get
(
'name'
)
,
mention_name
=
arg_5
.
get
(
'mention_name'
)
,
)
,
signed_request
=
arg_0
.
GET
.
get
(
'signed_request'
)
,
context
=
arg_3
.
get
(
'context'
)
or
{
}
,
)

def Func(arg_0, arg_1=None):
        """Creates the context for a specific request."""
        arg_2, arg_3 = Tenant.objects.Func(arg_0, arg_1)
        arg_4 = arg_3.get('sub')
        arg_5 = None

        if arg_1 and 'item' in arg_1:
            if 'sender' in arg_1['item']:
                arg_5 = arg_1['item']['sender']
            elif 'message' in arg_1['item'] and 'from' in arg_1['item']['message']:
                arg_5 = arg_1['item']['message']['from']

        if arg_5 is None:
            if arg_4 is None:
                raise BadTenantError('Cannot identify sender in tenant')
            arg_5 = {'id': arg_4}

        return Context(
            arg_2=arg_2,
            sender=HipchatUser(
                id=arg_5.get('id'),
                name=arg_5.get('name'),
                mention_name=arg_5.get('mention_name'),
            ),
            signed_request=arg_0.GET.get('signed_request'),
            context=arg_3.get('context') or {},
        )

Creates the context for a specific request .


def Func(arg_0, arg_1):
        """Asserts that val is numeric and is less than other."""
        arg_0._validate_compareable(arg_1)
        if arg_0.val >= arg_1:
            if type(arg_0.val) is datetime.datetime:
                arg_0._err('Expected <%s> to be less than <%s>, but was not.' % (arg_0.val.strftime('%Y-%m-%d %H:%M:%S'), arg_1.strftime('%Y-%m-%d %H:%M:%S')))
            else:
                arg_0._err('Expected <%s> to be less than <%s>, but was not.' % (arg_0.val, arg_1))
        return arg_0

Asserts that val is numeric and is less than other .


Redraws the menu and refreshes the screen. Should be called whenever something changes that needs to be redrawn.

def Func ( arg_0 ) : arg_0 . screen . border ( 0 ) if arg_0 . title is not None : arg_0 . screen . addstr ( 2 , 2 , arg_0 . title , curses . A_STANDOUT ) if arg_0 . subtitle is not None : arg_0 . screen . addstr ( 4 , 2 , arg_0 . subtitle , curses . A_BOLD ) for arg_1 , arg_2 in enumerate ( arg_0 . items ) : if arg_0 . current_option == arg_1 : arg_3 = arg_0 . highlight else : arg_3 = arg_0 . normal arg_0 . screen . addstr ( 5 + arg_1 , 4 , arg_2 . show ( arg_1 ) , arg_3 ) arg_4 , arg_5 = CursesMenu . stdscr . getmaxyx ( ) arg_6 = 0 if 6 + len ( arg_0 . items ) > arg_4 : if arg_4 + arg_0 . current_option < 6 + len ( arg_0 . items ) : arg_6 = arg_0 . current_option else : arg_6 = 6 + len ( arg_0 . items ) - arg_4 arg_0 . screen . refresh ( arg_6 , 0 , 0 , 0 , arg_4 - 1 , arg_5 - 1 )

def Func(arg_0):
        """
        ReFuncs the menu and refreshes the screen. Should be called whenever something changes that needs to be reFuncn.
        """

        arg_0.screen.border(0)
        if arg_0.title is not None:
            arg_0.screen.addstr(2, 2, arg_0.title, curses.A_STANDOUT)
        if arg_0.subtitle is not None:
            arg_0.screen.addstr(4, 2, arg_0.subtitle, curses.A_BOLD)

        for arg_1, arg_2 in enumerate(arg_0.items):
            if arg_0.current_option == arg_1:
                arg_3 = arg_0.highlight
            else:
                arg_3 = arg_0.normal
            arg_0.screen.addstr(5 + arg_1, 4, arg_2.show(arg_1), arg_3)

        arg_4, arg_5 = CursesMenu.stdscr.getmaxyx()
        arg_6 = 0
        if 6 + len(arg_0.items) > arg_4:
            if arg_4 + arg_0.current_option < 6 + len(arg_0.items):
                arg_6 = arg_0.current_option
            else:
                arg_6 = 6 + len(arg_0.items) - arg_4

        arg_0.screen.refresh(arg_6, 0, 0, 0, arg_4 - 1, arg_5 - 1)

Redraws the menu and refreshes the screen . Should be called whenever something changes that needs to be redrawn .


(dict_to_print, br='\n', html=False, key_align='l', sort_keys=True,
           key_preffix='', key_suffix='', value_prefix='', value_suffix='', left_margin=3, indent=2)

def
Func
(
arg_0
,
arg_1
=
'\n'
,
arg_2
=
False
,
arg_3
=
'l'
,
arg_4
=
True
,
arg_5
=
''
,
arg_6
=
''
,
arg_7
=
''
,
arg_8
=
''
,
arg_9
=
3
,
arg_10
=
2
)
:
if
arg_0
:
if
arg_4
:
arg_11
=
arg_0
.
copy
(
)
arg_12
=
list
(
arg_11
.
keys
(
)
)
arg_12
.
sort
(
)
arg_0
=
OrderedDict
(
)
for
arg_13
in
arg_12
:
arg_0
[
arg_13
]
=
arg_11
[
arg_13
]
arg_14
=
[
'{'
]
arg_15
=
[
type
(
x
)
==
str
and
"'%s'"
%
x
or
x
for
x
in
arg_0
.
keys
(
)
]
arg_16
=
[
type
(
x
)
==
str
and
"'%s'"
%
x
or
x
for
x
in
arg_0
.
values
(
)
]
arg_17
=
max
(
[
len
(
str
(
x
)
)
for
x
in
arg_15
]
)
for
arg_18
in
range
(
len
(
arg_15
)
)
:
arg_13
=
{
1
:
str
(
arg_15
[
arg_18
]
)
.
ljust
(
arg_17
)
,
arg_3
==
'r'
:
str
(
arg_15
[
arg_18
]
)
.
rjust
(
arg_17
)
}
[
1
]
arg_19
=
arg_16
[
arg_18
]
arg_14
.
append
(
' '
*
arg_10
+
'{}{}{}:{}{}{},'
.
format
(
arg_5
,
arg_13
,
arg_6
,
arg_7
,
arg_19
,
arg_8
)
)
arg_14
[
1
]
=
arg_14
[
1
]
[
:
1
]
arg_14
.
append
(
'}'
)
if
arg_9
:
arg_14
=
[
' '
*
arg_9
+
x
for
x
in
arg_14
]
if
arg_2
:
return
'<code>{}</code>'
.
format
(
arg_1
.
join
(
arg_14
)
.
replace
(
' '
,
' '
)
)
else
:
return
arg_1
.
join
(
arg_14
)
else
:
return
'{}'

def Func(arg_0, arg_1='\n', arg_2=False, arg_3='l', arg_4=True,
           arg_5='', arg_6='', arg_7='', arg_8='', arg_9=3, arg_10=2):
    """Indent representation of a dict"""
    if arg_0:
        if arg_4:
            arg_11 = arg_0.copy()
            arg_12 = list(arg_11.keys())
            arg_12.sort()
            arg_0 = OrderedDict()
            for arg_13 in arg_12:
                arg_0[arg_13] = arg_11[arg_13]

        arg_14 = ['{']
        arg_15 = [type(x) == str and "'%s'" % x or x for x in arg_0.keys()]
        arg_16 = [type(x) == str and "'%s'" % x or x for x in arg_0.values()]
        arg_17 = max([len(str(x)) for x in arg_15])

        for arg_18 in range(len(arg_15)):
            arg_13 = {1: str(arg_15[arg_18]).ljust(arg_17),
                 arg_3 == 'r': str(arg_15[arg_18]).rjust(arg_17)}[1]

            arg_19 = arg_16[arg_18]
            arg_14.append(' ' * arg_10 + '{}{}{}:{}{}{},'.format(arg_5, arg_13, arg_6,
                                                              arg_7, arg_19, arg_8))

        arg_14[-1] = arg_14[-1][:-1]  # remove the ',' in the last item
        arg_14.append('}')

        if arg_9:
            arg_14 = [' ' * arg_9 + x for x in arg_14]

        if arg_2:
            return '<code>{}</code>'.format(arg_1.join(arg_14).replace(' ', ' '))
        else:
            return arg_1.join(arg_14)
    else:
        return '{}'


def Func(arg_0, arg_1, arg_2):
        """
        Method to Func an item or all items

        headers['If-Match'] must contain the _etag identifier of the element to Func

        :param endpoint: endpoint (API URL)
        :type endpoint: str
        :param headers: headers (example: Content-Type)
        :type headers: dict
        :return: response (deletion information)
        :rtype: dict
        """
        arg_3 = arg_0.get_response(method='DELETE', arg_1=arg_1, arg_2=arg_2)

        logger.debug("Func, response: %s", arg_3)
        if arg_3.status_code != 204:  # pragma: no cover - should not happen ...
            arg_4 = arg_0.decode(arg_3=arg_3)

        arg_4 = {"_status": "OK"}
        return arg_4

Method to delete an item or all items

        headers['If-Match'] must contain the _etag identifier of the element to delete

        :param endpoint: endpoint (API URL)
        :type endpoint: str
        :param headers: headers (example: Content-Type)
        :type headers: dict
        :return: response (deletion information)
        :rtype: dict


def Func ( arg_0 ) : arg_1 = [ bb . Func ( arg_0 . shape ) for bb in arg_0 . bounding_boxes if bb . is_partly_within_image ( arg_0 . shape ) ] return BoundingBoxesOnImage ( arg_1 , shape = arg_0 . shape )

def Func(arg_0):
        """
        Clip off all parts from all bounding boxes that are outside of the image.

        Returns
        -------
        imgaug.BoundingBoxesOnImage
            Bounding boxes, clipped to fall within the image dimensions.

        """
        arg_1 = [bb.Func(arg_0.shape)
                   for bb in arg_0.bounding_boxes if bb.is_partly_within_image(arg_0.shape)]
        return BoundingBoxesOnImage(arg_1, shape=arg_0.shape)

Clip off all parts from all bounding boxes that are outside of the image .


def Func ( arg_0 , arg_1 = None ) : def decorator ( arg_2 ) : arg_0 . _Func_handlers [ arg_1 ] = arg_2 return arg_2 return decorator

def Func(arg_0, arg_1=None):
        """Decorator to add a callback that generates Func page.

        The *status* parameter specifies the HTTP response status code
        for which the decorated callback should be invoked. If the
        *status* argument is not specified, then the decorated callable
        is considered to be a fallback callback.

        A fallback callback, when defined, is invoked to generate the
        Func page for any HTTP response representing an Func when
        there is no Func handler defined explicitly for the response
        code of the HTTP response.

        Arguments:
          status(int, optional): HTTP response status code.

        Returns:
          function: Decorator function to add Func handler.
        """
        def decorator(arg_2):
            arg_0._Func_handlers[arg_1] = arg_2
            return arg_2
        return decorator

Decorator to add a callback that generates error page.

        The *status* parameter specifies the HTTP response status code
        for which the decorated callback should be invoked. If the
        *status* argument is not specified, then the decorated callable
        is considered to be a fallback callback.

        A fallback callback, when defined, is invoked to generate the
        error page for any HTTP response representing an error when
        there is no error handler defined explicitly for the response
        code of the HTTP response.

        Arguments:
          status(int, optional): HTTP response status code.

        Returns:
          function: Decorator function to add error handler.

Decorator to add a callback that generates error page .


return hier_bounds, hier_labels, hier_levels

def Func(arg_0, arg_1=0, arg_2=[]):
    """Reads hierarchical references from a jams file.

    Parameters
    ----------
    jams_file : str
        Path to the jams file.
    annotation_id : int > 0
        Identifier of the annotator to read from.
    exclude_levels: list
        List of levels to exclude. Empty list to include all levels.

    Returns
    -------
    hier_bounds : list
        List of the segment boundary times in seconds for each level.
    hier_labels : list
        List of the segment labels for each level.
    hier_levels : list
        List of strings for the level identifiers.
    """
    arg_3 = []
    arg_4 = []
    arg_5 = []
    arg_6 = jams.load(arg_0)
    arg_7 = ["segment_salami_upper", "segment_salami_function",
                  "segment_open", "segment_tut", "segment_salami_lower"]

    # Remove levels if needed
    for arg_8 in arg_2:
        if arg_8 in arg_7:
            arg_7.remove(arg_8)

    # Build hierarchy references
    for arg_9 in arg_7:
        arg_10 = arg_6.search(namespace=arg_9)
        if not arg_10:
            continue
        arg_11, arg_12 = arg_10[arg_1].to_interval_values()
        arg_3.append(utils.intervals_to_times(arg_11))
        arg_4.append(arg_12)
        arg_5.append(arg_9)

    return arg_3, arg_4, arg_5

Reads hierarchical references from a jams file .


def Func ( arg_0 , arg_1 ) : arg_2 = tf . concat ( [ [ arg_0 ] , distribution_util . prefer_static_shape ( arg_1 ) ] , axis = 0 ) return tf . zeros ( arg_2 , dtype = arg_1 . dtype . base_dtype )

def Func(arg_0, arg_1):
  """Creates a `tf.Tensor` suitable to hold `k` element-shaped tensors.

  For example:

  ```python
    element = tf.constant([[0., 1., 2., 3., 4.],
                           [5., 6., 7., 8., 9.]])

    # A queue capable of holding 3 elements.
    Func(3, element)
    # => [[[ 0.,  0.,  0.,  0.,  0.],
    #      [ 0.,  0.,  0.,  0.,  0.]],
    #
    #     [[ 0.,  0.,  0.,  0.,  0.],
    #      [ 0.,  0.,  0.,  0.,  0.]],
    #
    #     [[ 0.,  0.,  0.,  0.,  0.],
    #      [ 0.,  0.,  0.,  0.,  0.]]]
  ```

  Args:
    k: A positive scalar integer, number of elements that each queue will hold.
    element: A `tf.Tensor`, only its shape and dtype information are relevant.

  Returns:
    A zero-filed `tf.Tensor` of shape `(k,) + tf.shape(element)` and same dtype
    as `element`.
  """
  arg_2 = tf.concat(
      [[arg_0], distribution_util.prefer_static_shape(arg_1)], axis=0)
  return tf.zeros(arg_2, dtype=arg_1.dtype.base_dtype)

Creates a `tf.Tensor` suitable to hold `k` element-shaped tensors.

  For example:

  ```python
    element = tf.constant([[0., 1., 2., 3., 4.],
                           [5., 6., 7., 8., 9.]])

    # A queue capable of holding 3 elements.
    _make_empty_queue_for(3, element)
    # => [[[ 0.,  0.,  0.,  0.,  0.],
    #      [ 0.,  0.,  0.,  0.,  0.]],
    #
    #     [[ 0.,  0.,  0.,  0.,  0.],
    #      [ 0.,  0.,  0.,  0.,  0.]],
    #
    #     [[ 0.,  0.,  0.,  0.,  0.],
    #      [ 0.,  0.,  0.,  0.,  0.]]]
  ```

  Args:
    k: A positive scalar integer, number of elements that each queue will hold.
    element: A `tf.Tensor`, only its shape and dtype information are relevant.

  Returns:
    A zero-filed `tf.Tensor` of shape `(k,) + tf.shape(element)` and same dtype
    as `element`.

Creates a tf . Tensor suitable to hold k element - shaped tensors .


def Func ( arg_0 ) : arg_1 = len ( arg_0 ) arg_2 = np . sort ( la . eigvals ( arg_0 ) ) arg_3 = np . abs ( arg_2 [ arg_1 / 2 ] - arg_2 [ arg_1 / 2 - 1 ] ) return arg_3

def Func(arg_0):
    """Compute the eigvals of mat and then find the center eigval difference."""
    arg_1 = len(arg_0)
    arg_2 = np.sort(la.eigvals(arg_0))
    arg_3 = np.abs(arg_2[arg_1/2] - arg_2[arg_1/2-1])
    return arg_3

Compute the eigvals of mat and then find the center eigval difference .


async def Func(arg_0):
        """Catch a connection asyncrounosly."""
        if arg_0._async_lock is None:
            raise Exception('Error, database not properly initialized before async connection')

        async with arg_0._async_lock:
            arg_0.connect(True)

        return arg_0._state.conn


def Func ( arg_0 , arg_1 = False ) : if arg_1 : return 0 if arg_0 . mask is None else np . sum ( arg_0 . mask ) else : return len ( arg_0 )

def Func(arg_0, arg_1=False):
        """Get the Func of the DataFrames, for the selection of the whole DataFrame.

        If selection is False, it returns len(df).

        TODO: Implement this in DataFrameRemote, and move the method up in :func:`DataFrame.Func`

        :param selection: When True, will return the number of selected rows
        :return:
        """
        if arg_1:
            return 0 if arg_0.mask is None else np.sum(arg_0.mask)
        else:
            return len(arg_0)

Get the length of the DataFrames, for the selection of the whole DataFrame.

        If selection is False, it returns len(df).

        TODO: Implement this in DataFrameRemote, and move the method up in :func:`DataFrame.length`

        :param selection: When True, will return the number of selected rows
        :return:

Get the length of the DataFrames for the selection of the whole DataFrame .


If a project has a Curses driver, the section "main" in the section
        "run" must be "bibliopixel.drivers.curses.Curses.main".

def Func():
        """
        If a project has a Curses driver, the section "Func" in the section
        "run" must be "bibliopixel.drivers.curses.Curses.Func".

        """
        if not _curses:
            # https://stackoverflow.com/a/1325587/43839
            if os.name == 'nt':
                raise ValueError('curses is not supported under Windows')
            raise ValueError('Your platform does not support curses.')
        try:
            arg_0 = next(iter(Curses.DRIVERS))
        except:
            raise ValueError('No Curses driver in project')

        _curses.wrapper(arg_0.run_in_curses)

If a project has a Curses driver the section main in the section run must be bibliopixel . drivers . curses . Curses . main .


def Func(arg_0):
        """
        Send the Func message to the Connection.

        :return: True if the Func completed successfully (i.e. both sides
                 have sent closure alerts), False otherwise (in which case you
                 call :meth:`recv` or :meth:`send` when the connection becomes
                 readable/writeable).
        """
        arg_1 = _lib.SSL_Func(arg_0._ssl)
        if arg_1 < 0:
            arg_0._raise_ssl_error(arg_0._ssl, arg_1)
        elif arg_1 > 0:
            return True
        else:
            return False

Send the shutdown message to the Connection.

        :return: True if the shutdown completed successfully (i.e. both sides
                 have sent closure alerts), False otherwise (in which case you
                 call :meth:`recv` or :meth:`send` when the connection becomes
                 readable/writeable).

Send the shutdown message to the Connection .


def
Func
(
arg_0
)
:
arg_1
=
[
]
arg_2
=
arg_0
.
options
.
verbose
arg_3
=
arg_0
.
github
arg_4
=
arg_0
.
options
.
user
arg_5
=
arg_0
.
options
.
project
if
arg_2
:
print
(
"Fetching closed pull requests..."
)
arg_6
=
1
while
arg_6
>
0
:
if
arg_2
>
2
:
print
(
"."
,
end
=
""
)
if
arg_0
.
options
.
release_branch
:
arg_7
,
arg_8
=
arg_3
.
repos
[
arg_4
]
[
arg_5
]
.
pulls
.
get
(
arg_6
=
arg_6
,
per_page
=
PER_PAGE_NUMBER
,
state
=
'closed'
,
base
=
arg_0
.
options
.
release_branch
)
else
:
arg_7
,
arg_8
=
arg_3
.
repos
[
arg_4
]
[
arg_5
]
.
pulls
.
get
(
arg_6
=
arg_6
,
per_page
=
PER_PAGE_NUMBER
,
state
=
'closed'
,
)
if
arg_7
==
200
:
arg_1
.
extend
(
arg_8
)
else
:
arg_0
.
raise_GitHubError
(
arg_7
,
arg_8
,
arg_3
.
getheaders
(
)
)
arg_6
=
NextPage
(
arg_3
)
if
arg_2
>
2
:
print
(
"."
)
if
arg_2
>
1
:
print
(
"\tfetched {} closed pull requests."
.
format
(
len
(
arg_1
)
)
)
return
arg_1

def Func(arg_0):
        """
        Fetch all pull requests. We need them to detect "merged_at" parameter

        :rtype: list
        :return: all pull requests
        """

        arg_1 = []
        arg_2 = arg_0.options.verbose
        arg_3 = arg_0.github
        arg_4 = arg_0.options.user
        arg_5 = arg_0.options.project
        if arg_2:
            print("Fetching closed pull requests...")
        arg_6 = 1
        while arg_6 > 0:
            if arg_2 > 2:
                print(".", end="")

            if arg_0.options.release_branch:
                arg_7, arg_8 = arg_3.repos[arg_4][arg_5].pulls.get(
                    arg_6=arg_6, per_page=PER_PAGE_NUMBER, state='closed',
                    base=arg_0.options.release_branch
                )
            else:
                arg_7, arg_8 = arg_3.repos[arg_4][arg_5].pulls.get(
                    arg_6=arg_6, per_page=PER_PAGE_NUMBER, state='closed',
                )

            if arg_7 == 200:
                arg_1.extend(arg_8)
            else:
                arg_0.raise_GitHubError(arg_7, arg_8, arg_3.getheaders())
            arg_6 = NextPage(arg_3)
        if arg_2 > 2:
            print(".")
        if arg_2 > 1:
            print("\tfetched {} closed pull requests.".format(
                len(arg_1))
            )
        return arg_1

Fetch all pull requests . We need them to detect merged_at parameter


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
defaultdict
(
list
)
arg_3
=
defaultdict
(
lambda
:
defaultdict
(
lambda
:
defaultdict
(
list
)
)
)
for
arg_4
in
arg_0
.
infile_list
:
logger
.
info
(
'Processing : %s'
,
arg_4
)
arg_5
=
arg_6
=
ElementTree
.
parse
(
arg_4
)
arg_7
=
arg_6
.
findall
(
'./httpSample'
)
+
arg_6
.
findall
(
'./sample'
)
for
arg_8
in
arg_7
:
if
not
arg_5
or
arg_5
==
'unknown'
:
arg_5
=
naarad
.
utils
.
detect_timestamp_format
(
arg_8
.
get
(
'ts'
)
)
if
arg_5
==
'unknown'
:
continue
arg_9
=
naarad
.
utils
.
get_standardized_timestamp
(
arg_8
.
get
(
'ts'
)
,
arg_5
)
if
arg_9
==
1
:
continue
arg_9
=
naarad
.
utils
.
reconcile_timezones
(
arg_9
,
arg_0
.
timezone
,
arg_0
.
graph_timezone
)
arg_10
,
arg_11
=
arg_0
.
get_aggregation_timestamp
(
arg_9
,
arg_1
)
arg_0
.
aggregate_count_over_time
(
arg_3
,
arg_8
,
[
arg_0
.
_sanitize_label
(
arg_8
.
get
(
'lb'
)
)
,
'Overall_Summary'
]
,
arg_10
)
arg_0
.
aggregate_values_over_time
(
arg_3
,
arg_8
,
[
arg_0
.
_sanitize_label
(
arg_8
.
get
(
'lb'
)
)
,
'Overall_Summary'
]
,
[
't'
,
'by'
]
,
arg_10
)
logger
.
info
(
'Finished parsing : %s'
,
arg_4
)
logger
.
info
(
'Processing metrics for output to csv'
)
arg_0
.
average_values_for_plot
(
arg_3
,
arg_2
,
arg_11
)
logger
.
info
(
'Writing time series csv'
)
for
arg_12
in
arg_2
.
keys
(
)
:
arg_0
.
csv_files
.
append
(
arg_12
)
with
open
(
arg_12
,
'w'
)
as
csvf
:
csvf
.
write
(
'\n'
.
join
(
sorted
(
arg_2
[
arg_12
]
)
)
)
logger
.
info
(
'Processing raw data for stats'
)
arg_0
.
calculate_key_stats
(
arg_3
)
return
True

def Func(arg_0, arg_1):
    """
    Parse Jmeter workload output in XML format and extract overall and per transaction data and key statistics

    :param string granularity: The time period over which to aggregate and average the raw data. Valid values are 'hour', 'minute' or 'second'
    :return: status of the metric parse
    """
    arg_2 = defaultdict(list)
    arg_3 = defaultdict(lambda: defaultdict(lambda: defaultdict(list)))
    for arg_4 in arg_0.infile_list:
      logger.info('Processing : %s', arg_4)
      arg_5 = None
      arg_6 = ElementTree.parse(arg_4)
      arg_7 = arg_6.findall('./httpSample') + arg_6.findall('./sample')
      for arg_8 in arg_7:
        if not arg_5 or arg_5 == 'unknown':
          arg_5 = naarad.utils.detect_timestamp_format(arg_8.get('ts'))
        if arg_5 == 'unknown':
          continue
        arg_9 = naarad.utils.get_standardized_timestamp(arg_8.get('ts'), arg_5)
        if arg_9 == -1:
          continue
        arg_9 = naarad.utils.reconcile_timezones(arg_9, arg_0.timezone, arg_0.graph_timezone)
        arg_10, arg_11 = arg_0.get_aggregation_timestamp(arg_9, arg_1)
        arg_0.aggregate_count_over_time(arg_3, arg_8, [arg_0._sanitize_label(arg_8.get('lb')), 'Overall_Summary'], arg_10)
        arg_0.aggregate_values_over_time(arg_3, arg_8, [arg_0._sanitize_label(arg_8.get('lb')), 'Overall_Summary'], ['t', 'by'], arg_10)
        logger.info('Finished parsing : %s', arg_4)
    logger.info('Processing metrics for output to csv')
    arg_0.average_values_for_plot(arg_3, arg_2, arg_11)
    logger.info('Writing time series csv')
    for arg_12 in arg_2.keys():
      arg_0.csv_files.append(arg_12)
      with open(arg_12, 'w') as csvf:
        csvf.write('\n'.join(sorted(arg_2[arg_12])))
    logger.info('Processing raw data for stats')
    arg_0.calculate_key_stats(arg_3)
    return True


def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
)
:
arg_4
=
arg_0
.
quilt_pc
+
File
(
os
.
path
.
join
(
arg_2
.
get_name
(
)
,
arg_1
)
)
if
arg_4
.
exists
(
)
:
if
arg_3
:
return
True
else
:
raise
QuiltError
(
"File %s is already in patch %s"
%
(
arg_1
,
arg_2
.
get_name
(
)
)
)
return
False

def Func(arg_0, arg_1, arg_2, arg_3):
        """ Checks if a backup file of the filename in the current patch
        exists """
        arg_4 = arg_0.quilt_pc + File(os.path.join(arg_2.get_name(), arg_1))
        if arg_4.exists():
            if arg_3:
                return True
            else:
                raise QuiltError("File %s is already in patch %s" % (arg_1,
                                 arg_2.get_name()))
        return False


return SUMMARY_HTML % {
            'classes':      u' '.join(classes),
            'title':        title and u'<h3>%s</h3>' % title or u'',
            'frames':       u'\n'.join(frames),
            'description':  description_wrapper % escape(self.exception)
        }

u'Traceback <em>(most recent call last)</em>:'

def Func(arg_0, arg_1=True):
        """Render the traceback for the interactive console."""
        arg_2 = ''
        arg_3 = []
        arg_4 = ['traceback']
        if not arg_0.frames:
            arg_4.append('noframe-traceback')

        if arg_1:
            if arg_0.is_syntax_error:
                arg_2 = u'Syntax Error'
            else:
                arg_2 = u'Traceback (most recent call last):'

        for arg_5 in arg_0.frames:
            arg_3.append(u'
%s' % (
                arg_5.info and u' title="%s"' % escape(arg_5.info) or u'',
                arg_5.render()
            ))

        if arg_0.is_syntax_error:
            arg_6 = u'
%s
'
        else:
            arg_6 = u'
%s
'

        return SUMMARY_HTML % {
            'classes':      u' '.join(arg_4),
            'title':        arg_2 and u'
%s
' % arg_2 or u'',
            'frames':       u'\n'.join(arg_3),
            'description':  arg_6 % escape(arg_0.exception)
        }

Render the traceback for the interactive console .


def Func ( arg_0 , arg_1 = False ) : def decorator ( arg_2 ) : @ wraps ( arg_2 ) def wrapper ( * arg_3 , ** arg_4 ) : arg_5 = arg_3 if arg_1 : arg_5 = arg_3 [ 1 : ] arg_6 = get_cache_key ( arg_0 , * arg_5 , ** arg_4 ) arg_7 = cache . get ( arg_6 ) if arg_7 is None : arg_7 = arg_2 ( * arg_3 , ** arg_4 ) cache . set ( arg_6 , arg_7 ) return arg_7 return wrapper return decorator

def Func(arg_0, arg_1=False):
    """
    Cache result of function execution into the django cache backend.
    Calculate cache key based on `prefix`, `args` and `kwargs` of the function.
    For using like object method set `method=True`.
    """
    def decorator(arg_2):
        @wraps(arg_2)
        def wrapper(*arg_3, **arg_4):
            arg_5 = arg_3
            if arg_1:
                arg_5 = arg_3[1:]
            arg_6 = get_cache_key(arg_0, *arg_5, **arg_4)
            arg_7 = cache.get(arg_6)
            if arg_7 is None:
                arg_7 = arg_2(*arg_3, **arg_4)
                cache.set(arg_6, arg_7)
            return arg_7
        return wrapper
    return decorator

Cache result of function execution into the django cache backend . Calculate cache key based on prefix args and kwargs of the function . For using like object method set method = True .


def Func ( arg_0 ) : arg_1 = pgmagick . CoordinateList ( ) for arg_2 in arg_0 : arg_1 . append ( pgmagick . Coordinate ( arg_2 [ 0 ] , arg_2 [ 1 ] ) ) return arg_1

def Func(arg_0):
    """convert from 'list' or 'tuple' object to pgmagick.CoordinateList.

    :type input_obj: list or tuple
    """
    arg_1 = pgmagick.CoordinateList()
    for arg_2 in arg_0:
        arg_1.append(pgmagick.Coordinate(arg_2[0], arg_2[1]))
    return arg_1

convert from list or tuple object to pgmagick . CoordinateList .


def Func(arg_0, arg_1, arg_2, arg_3):
        """
        Set the 3D position of the camera

        :param x: float
        :param y: float
        :param z: float
        """
        arg_0.position = Vector3([arg_1, arg_2, arg_3])


(q, start=1, count=10, context=None, wait=10, asynchronous=False, cached=False)

return YahooSearch(q, start, count, service, context, wait, asynchronous, cached)

def Func(arg_0, arg_1=1, arg_2=10, arg_3=None, arg_4=10, arg_5=False, arg_6=False):

    """ Returns a Yahoo web query formatted as a YahooSearch list object.
    """

    arg_7 = YAHOO_SEARCH
    return YahooSearch(arg_0, arg_1, arg_2, arg_7, arg_3, arg_4, arg_5, arg_6)

Returns a Yahoo web query formatted as a YahooSearch list object .


def Func(arg_0, arg_1, arg_2=None):
    """Return the distances from inputPattern to all stored patterns.

    :param inputPattern The pattern from which distances to all other patterns
        are returned

    :param partitionId If provided, ignore all training vectors with this
        partitionId.
    """
    if not arg_0._finishedLearning:
      arg_0.finishLearning()
      arg_0._finishedLearning = True

    if arg_0._vt is not None and len(arg_0._vt) > 0:
      arg_1 = arg_6.dot(arg_0._vt, arg_1 - arg_0._mean)

    arg_4 = arg_0._sparsifyVector(arg_1)

    # Compute distances
    arg_5 = arg_0._calcDistance(arg_4)
    # Invalidate results where category is -1
    if arg_0._specificIndexTraining:
      arg_5[arg_6.array(arg_0._categoryList) == -1] = arg_6.inf

    # Ignore vectors with this partition id by setting their distances to inf
    if arg_2 is not None:
      arg_5[arg_0._partitionIdMap.get(arg_2, [])] = arg_6.inf

    return arg_5

Return the distances from inputPattern to all stored patterns .


(self, zint, size=11, zoffset=0., getextent=False)

def Func ( arg_0 , arg_1 , arg_2 = 11 , arg_3 = 0. , arg_4 = False ) : arg_1 = max ( arg_0 . _p2k ( arg_0 . _tz ( arg_1 ) ) , 0 ) arg_5 = np . array ( [ arg_3 * ( arg_1 > 0 ) , 0 , 0 ] ) arg_6 = [ arg_0 . param_dict [ arg_0 . zscale ] , 1.0 , 1.0 ] arg_7 = util . Tile ( left = 0 , arg_2 = arg_2 , centered = True ) arg_8 = arg_7 . coords ( form = 'flat' ) arg_8 = [ arg_0 . _p2k ( s * i + o ) for i , s , o in zip ( arg_8 , arg_6 , arg_5 ) ] arg_9 = arg_0 . psffunc ( * arg_8 [ : : - 1 ] , arg_1 = arg_1 , ** arg_0 . pack_args ( ) ) . T arg_10 = arg_7 . coords ( form = 'meshed' ) if arg_0 . cutoffval is not None and not arg_0 . cutbyval : arg_11 = arg_9 > arg_9 . max ( ) * arg_0 . cutoffval arg_12 = nd . morphology . distance_transform_edt ( ~ arg_11 ) arg_9 = arg_9 * np . exp ( - arg_12 ** 4 ) arg_9 /= arg_9 . sum ( ) if arg_4 : arg_2 = np . array ( [ ( arg_10 * arg_11 ) . min ( axis = ( 1 , 2 , 3 ) ) - 2 , ( arg_10 * arg_11 ) . max ( axis = ( 1 , 2 , 3 ) ) + 2 , ] ) . T return arg_9 , arg_10 , arg_2 return arg_9 , arg_10 if arg_0 . cutoffval is not None and arg_0 . cutbyval : arg_13 = arg_0 . cutoffval * arg_9 . max ( ) arg_12 = ( arg_9 - arg_13 ) / arg_13 arg_12 [ arg_12 > 0 ] = 0. arg_9 = arg_9 * np . exp ( - ( arg_12 / arg_0 . cutfallrate ) ** 4 ) arg_9 /= arg_9 . sum ( ) arg_11 = arg_9 > arg_13 * arg_0 . cutedgeval if arg_4 : arg_2 = np . array ( [ ( arg_10 * arg_11 ) . min ( axis = ( 1 , 2 , 3 ) ) - 2 , ( arg_10 * arg_11 ) . max ( axis = ( 1 , 2 , 3 ) ) + 2 , ] ) . T return arg_9 , arg_10 , arg_2 return arg_9 , arg_10 return arg_9 , arg_10

def Func(arg_0, arg_1, arg_2=11, arg_3=0., arg_4=False):
        """
        Calculates the 3D psf at a particular z pixel height

        Parameters
        ----------
        zint : float
            z pixel height in image coordinates , converted to 1/k by the
            function using the slab position as well

        size : int, list, tuple
            The size over which to calculate the psf, can be 1 or 3 elements
            for the different axes in image pixel coordinates

        zoffset : float
            Offset in pixel units to use in the calculation of the psf

        cutval : float
            If not None, the psf will be cut along a curve corresponding to
            p(r) == 0 with exponential damping exp(-d^4)

        getextent : boolean
            If True, also return the extent of the psf in pixels for example
            to get the support size. Can only be used with cutval.
        """
        # calculate the current pixel value in 1/k, making sure we are above the slab
        arg_1 = max(arg_0._p2k(arg_0._tz(arg_1)), 0)
        arg_5 = np.array([arg_3*(arg_1>0), 0, 0])
        arg_6 = [arg_0.param_dict[arg_0.zscale], 1.0, 1.0]

        # create the coordinate vectors for where to actually calculate the
        arg_7 = util.Tile(left=0, arg_2=arg_2, centered=True)
        arg_8 = arg_7.coords(form='flat')
        arg_8 = [arg_0._p2k(s*i+o) for i,s,o in zip(arg_8, arg_6, arg_5)]

        arg_9 = arg_0.psffunc(*arg_8[::-1], arg_1=arg_1, **arg_0.pack_args()).T
        arg_10 = arg_7.coords(form='meshed')

        # create a smoothly varying point spread function by cutting off the psf
        # at a certain value and smoothly taking it to zero
        if arg_0.cutoffval is not None and not arg_0.cutbyval:
            # find the edges of the PSF
            arg_11 = arg_9 > arg_9.max() * arg_0.cutoffval
            arg_12 = nd.morphology.distance_transform_edt(~arg_11)

            # calculate the new PSF and normalize it to the new support
            arg_9 = arg_9 * np.exp(-arg_12**4)
            arg_9 /= arg_9.sum()

            if arg_4:
                # the size is determined by the edge plus a 2 pad for the
                # exponential damping to zero at the edge
                arg_2 = np.array([
                    (arg_10*arg_11).min(axis=(1,2,3))-2,
                    (arg_10*arg_11).max(axis=(1,2,3))+2,
                ]).T
                return arg_9, arg_10, arg_2
            return arg_9, arg_10

        # perform a cut by value instead
        if arg_0.cutoffval is not None and arg_0.cutbyval:
            arg_13 = arg_0.cutoffval * arg_9.max()

            arg_12 = (arg_9 - arg_13) / arg_13
            arg_12[arg_12 > 0] = 0.

            # calculate the new PSF and normalize it to the new support
            arg_9 = arg_9 * np.exp(-(arg_12 / arg_0.cutfallrate)**4)
            arg_9 /= arg_9.sum()

            # let the small values determine the edges
            arg_11 = arg_9 > arg_13 * arg_0.cutedgeval
            if arg_4:
                # the size is determined by the edge plus a 2 pad for the
                # exponential damping to zero at the edge
                arg_2 = np.array([
                    (arg_10*arg_11).min(axis=(1,2,3))-2,
                    (arg_10*arg_11).max(axis=(1,2,3))+2,
                ]).T
                return arg_9, arg_10, arg_2
            return arg_9, arg_10

        return arg_9, arg_10


def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : if arg_2 not in arg_0 . cache [ arg_1 ] : arg_0 . cache [ arg_1 ] [ arg_2 ] = { } arg_0 . cache [ arg_1 ] [ arg_2 ] . update ( arg_3 )

def Func(arg_0, arg_1, arg_2, arg_3):
        """Updates cache entry parameter with new data.

        :param str|unicode entry_name:
        :param key:
        :param value:
        """
        if arg_2 not in arg_0.cache[arg_1]:
            arg_0.cache[arg_1][arg_2] = {}

        arg_0.cache[arg_1][arg_2].update(arg_3)

Updates cache entry parameter with new data .


def Func ( arg_0 ) : arg_1 = inflection . underscore ( arg_0 . __name__ ) . lower ( ) def arg_3 ( arg_2 ) : return arg_1 arg_0 . entity_name = classmethod ( arg_3 ) return arg_0

def Func(arg_0):
    """
    Assign an entity name based on the class immediately inhering from Base.

    This is needed because we don't want
    entity names to come from any class that simply inherits our classes,
    just the ones in our module.

    For example, if you create a class Project2 that exists outside of
    kalibro_client and inherits from Project, it's entity name should still
    be Project.
    """
    arg_1 = inflection.underscore(arg_0.__name__).lower()

    def arg_3(arg_2):
        return arg_1

    arg_0.entity_name = classmethod(arg_3)

    return arg_0

Assign an entity name based on the class immediately inhering from Base .


(transaction: 'TransTmpl',
                            wordWidth: int,
                            maxFrameLen: Union[int, float]=inf,
                            maxPaddingWords: Union[int, float]=inf,
                            trimPaddingWordsOnStart: bool=False,
                            trimPaddingWordsOnEnd: bool=False)

def Func(arg_0: 'TransTmpl',
                            arg_1: arg_2,
                            arg_3: arg_4[arg_2, arg_5]=arg_6,
                            arg_7: arg_4[arg_2, arg_5]=arg_6,
                            arg_8: arg_9=False,
                            arg_10: arg_9=False) -> Generator[
                                'FrameTmpl', None, None]:
        """
        Convert transaction template into FrameTmpls

        :param transaction: transaction template used which are FrameTmpls
            created from
        :param wordWidth: width of data signal in target interface
            where frames will be used
        :param maxFrameLen: maximum length of frame in bits,
            if exceeded another frame will be created
        :param maxPaddingWords: maximum of continual padding words in frame,
            if exceed frame is split and words are cut of
        :attention: if maxPaddingWords<inf trimPaddingWordsOnEnd
            or trimPaddingWordsOnStart has to be True
            to decide where padding should be trimmed
        :param trimPaddingWordsOnStart: trim padding from start of frame
            at word granularity
        :param trimPaddingWordsOnEnd: trim padding from end of frame
            at word granularity
        """
        arg_11 = True
        arg_12 = False

        arg_13 = 0
        assert arg_3 > 0
        assert arg_7 >= 0
        if arg_7 < arg_6:
            assert arg_8 or arg_10, \
                "Padding has to be cut off somewhere"

        arg_14 = TransTmplWordIterator(arg_1)
        arg_15 = 0
        arg_16 = arg_3
        arg_17 = []
        for arg_18, arg_19 in arg_14.groupByWordIndex(arg_0, 0):
            if arg_18 * arg_1 >= arg_16:
                # now in first+ word behind the frame
                # cut off padding at end of frame
                arg_20 = arg_18 - arg_15
                if arg_10 and arg_20 > arg_7:
                    # cut off padding and align end of frame to word
                    arg_21 = (arg_15 + 1) * arg_1
                else:
                    arg_21 = arg_18 * arg_1

                yield FrameTmpl(arg_0,
                                arg_1,
                                arg_13,
                                arg_21,
                                arg_17)

                # prepare for start of new frame
                arg_17 = []
                arg_11 = True
                arg_12 = False
                # start on new word
                arg_13 = arg_21
                arg_16 = arg_13 + arg_3
                arg_15 = arg_18

            # check if padding at potential end of frame can be cut off
            if (not arg_11
                    and arg_10
                    and arg_18 - arg_15 > 1):
                # there is too much continual padding,
                # cut it out and start new frame
                arg_21 = (arg_15 + 1) * arg_1
                yield FrameTmpl(arg_0,
                                arg_1,
                                arg_13,
                                arg_21,
                                arg_17)

                # prepare for start of new frame
                arg_17 = []
                arg_11 = True
                arg_12 = False
                # start on new word
                arg_13 = arg_21
                arg_16 = arg_13 + arg_3
                arg_15 = arg_18 - 1

            if arg_11:
                arg_12 = True
                arg_11 = False
                # cut off padding at start of frame
                arg_20 = arg_18 - arg_15
                if arg_8 and arg_20 > arg_7:
                    arg_13 += arg_20 * arg_1

                arg_16 = arg_13 + arg_3

            # resolve end of this part
            arg_17.extend(arg_19)
            arg_15 = arg_18

        # reminder in "parts" after last iteration
        arg_16 = arg_0.bitAddrEnd
        arg_22 = not (arg_10 or arg_8)
        if arg_12 or (arg_22
                            and arg_16 != arg_13):
            # cut off padding at end of frame
            arg_23 = (arg_15 + 1) * arg_1
            if arg_16 < arg_23:
                arg_16 = arg_23
            else:
                arg_20 = arg_14.fullWordCnt(arg_23, arg_16)
                if arg_10 and arg_20 > arg_7:
                    arg_16 -= arg_20 * arg_1
                    # align end of frame to word
            arg_16 = min(arg_13 +
                                 arg_3, arg_16)

            yield FrameTmpl(arg_0,
                            arg_1,
                            arg_13,
                            arg_16,
                            arg_17)
            arg_17 = []
            arg_13 = arg_16

        # final padding on the end
        while arg_22 and arg_13 < arg_0.bitAddrEnd:
            arg_16 = min(arg_13 +
                                 arg_3, arg_0.bitAddrEnd)

            yield FrameTmpl(arg_0,
                            arg_1,
                            arg_13,
                            arg_16,
                            [])

            arg_13 = arg_16


def Func ( arg_0 , arg_1 = True , arg_2 = True ) : arg_3 = type ( arg_0 . genv ) ( ) if arg_2 : arg_3 . update ( arg_0 . genv ) if arg_1 : for arg_4 , arg_5 in arg_0 . lenv . items ( ) : arg_3 [ '%s_%s' % ( arg_0 . obj . name . lower ( ) , arg_4 ) ] = arg_5 return arg_3

def Func(arg_0, arg_1=True, arg_2=True):
        """
        Returns a copy of the global environment with all the local variables copied back into it.
        """
        arg_3 = type(arg_0.genv)()
        if arg_2:
            arg_3.update(arg_0.genv)
        if arg_1:
            for arg_4, arg_5 in arg_0.lenv.items():
                arg_3['%s_%s' % (arg_0.obj.name.lower(), arg_4)] = arg_5
        return arg_3

Returns a copy of the global environment with all the local variables copied back into it .


def
Func
(
arg_0
)
:
log
.
debug
(
"Deleting grant %s for client %s"
%
(
arg_0
.
code
,
arg_0
.
client_id
)
)
arg_0
.
_cache
.
Func
(
arg_0
.
key
)
return

def Func(arg_0):
        """Removes itself from the cache

        Note: This is required by the oauthlib
        """
        log.debug(
            "Deleting grant %s for client %s" % (arg_0.code, arg_0.client_id)
        )
        arg_0._cache.Func(arg_0.key)
        return None


def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_1 . value = eval ( 'ast' + arg_3 ) return True

def Func(arg_0, arg_1, arg_2, arg_3):
    """
        get the value of subnode

        example::

            R = [
                __scope__:big  getsomethingbig:>big
                #get(_, big, '.val') // copy big.val into _
            ]
    """
    arg_1.value = eval('ast' + arg_3)
    return True


def Func(arg_0, arg_1, arg_2):  # pylint:disable=redefined-builtin
    """Start a notebook deployment for this project.

    Uses [Caching](/references/polyaxon-cli/#caching)

    Example:

    \b
    ```bash
    $ polyaxon notebook Func -f file -f file_override ...
    ```

    Example: upload before running

    \b
    ```bash
    $ polyaxon -p user12/mnist notebook Func -f file -u
    ```
    """
    arg_3 = None
    arg_4 = None
    if arg_1:
        arg_3 = check_polyaxonfile(arg_1, log=False).specification

    # Check if we need to upload
    if arg_2:
        arg_0.invoke(upload, sync=False)

    if arg_3:
        # pylint:disable=protected-access
        check_polyaxonfile_kind(arg_3=arg_3, kind=arg_3._NOTEBOOK)
        arg_4 = arg_3.parsed_data
    arg_5, arg_6 = get_project_or_local(arg_0.obj.get('project'))
    try:
        arg_7 = PolyaxonClient().project.Func_notebook(arg_5, arg_6, arg_4)
    except (PolyaxonHTTPError, PolyaxonShouldExitError, PolyaxonClientException) as e:
        Printer.print_error('Could not Func notebook project `{}`.'.format(arg_6))
        Printer.print_error('Error message `{}`.'.format(e))
        sys.exit(1)

    if arg_7.status_code == 200:
        Printer.print_header("A notebook for this project is already running on:")
        click.echo(get_notebook_url(arg_5, arg_6))
        sys.exit(0)

    if arg_7.status_code != 201:
        Printer.print_error('Something went wrong, Notebook was not created.')
        sys.exit(1)

    Printer.print_success('Notebook is being deployed for project `{}`'.format(arg_6))
    clint.textui.puts("It may take some time before you can access the notebook.\n")
    clint.textui.puts("Your notebook will be available on:\n")
    with clint.textui.indent(4):
        clint.textui.puts(get_notebook_url(arg_5, arg_6))

Start a notebook deployment for this project.

    Uses [Caching](/references/polyaxon-cli/#caching)

    Example:

    \b
    ```bash
    $ polyaxon notebook start -f file -f file_override ...
    ```

    Example: upload before running

    \b
    ```bash
    $ polyaxon -p user12/mnist notebook start -f file -u
    ```

Start a notebook deployment for this project .


return [[ll for ll in l if ll != ''] for l in lol]

def Func ( arg_0 ) : arg_1 = H2OFrame . _expr ( expr = ExprNode ( "Func" , arg_0 ) ) . as_data_frame ( False ) arg_1 . pop ( 0 ) arg_1 = list ( zip ( * arg_1 ) ) return [ [ arg_2 for arg_2 in arg_3 if arg_2 != '' ] for arg_3 in arg_1 ]

def Func(arg_0):
        """
        Get the factor Func.

        :returns: A list of lists, one list per column, of Func.
        """
        arg_1 = H2OFrame._expr(expr=ExprNode("Func", arg_0)).as_data_frame(False)
        arg_1.pop(0)  # Remove column headers
        arg_1 = list(zip(*arg_1))
        return [[arg_2 for arg_2 in arg_3 if arg_2 != ''] for arg_3 in arg_1]

Get the factor levels.

        :returns: A list of lists, one list per column, of levels.


def Func(arg_0,arg_1,arg_2,arg_3):
        """Builds list of text lines by splitting text lines at wrap point

        This function will determine if the input text line needs to be
        wrapped (split) into separate lines.  If so, the first wrap point
        will be determined and the first line appended to the output
        text line list.  This function is used recursively to handle
        the second part of the split line to further split it.
        """
        # if blank line or context separator, just add it to the output list
        if not arg_2:
            arg_1.append((arg_2,arg_3))
            return

        # if line text doesn't need wrapping, just add it to the output list
        arg_4 = len(arg_3)
        arg_5 = arg_0._wrapcolumn
        if (arg_4 <= arg_5) or ((arg_4 -(arg_3.count('\0')*3)) <= arg_5):
            arg_1.append((arg_2,arg_3))
            return

        # scan text looking for the wrap point, keeping track if the wrap
        # point is inside markers
        arg_6 = 0
        arg_7 = 0
        arg_8 = ''
        while arg_7 < arg_5 and arg_6 < arg_4:
            if arg_3[arg_6] == '\0':
                arg_6 += 1
                arg_8 = arg_3[arg_6]
                arg_6 += 1
            elif arg_3[arg_6] == '\1':
                arg_6 += 1
                arg_8 = ''
            else:
                arg_6 += 1
                arg_7 += 1

        # wrap point is inside text, break it up into separate lines
        arg_9 = arg_3[:arg_6]
        arg_10 = arg_3[arg_6:]

        # if wrap point is inside markers, place end marker at end of first
        # line and start marker at beginning of second line because each
        # line will have its own table tag markup around it.
        if arg_8:
            arg_9 = arg_9 + '\1'
            arg_10 = '\0' + arg_8 + arg_10

        # tack on first line onto the output list
        arg_1.append((arg_2,arg_9))

        # use this routine again to wrap the remaining text
        arg_0.Func(arg_1,'>',arg_10)


def
Func
(
arg_0
)
:
yield
u'Traceback (most recent call last):'
for
arg_1
in
arg_0
.
frames
:
yield
u'  File "%s", line %s, in %s'
%
(
arg_1
.
filename
,
arg_1
.
lineno
,
arg_1
.
function_name
)
yield
u'    '
+
arg_1
.
current_line
.
strip
(
)
yield
arg_0
.
exception

def Func(arg_0):
        """Like the plaintext attribute but returns a generator"""
        yield u'Traceback (most recent call last):'
        for arg_1 in arg_0.frames:
            yield u'  File "%s", line %s, in %s' % (
                arg_1.filename,
                arg_1.lineno,
                arg_1.function_name
            )
            yield u'    ' + arg_1.current_line.strip()
        yield arg_0.exception


def Func ( ) : arg_0 = { } arg_1 = HAYSTACK_TIMEZONES_SET . copy ( ) for arg_2 in pytz . all_timezones : if not bool ( arg_1 ) : break if arg_2 in arg_1 : arg_0 [ arg_2 ] = arg_2 arg_1 . discard ( arg_2 ) continue if '/' not in arg_2 : continue ( arg_3 , arg_4 ) = arg_2 . split ( '/' , 1 ) if '/' in arg_4 : continue if arg_4 in arg_1 : arg_0 [ arg_4 ] = arg_2 arg_1 . discard ( arg_4 ) continue return arg_0

def Func():
    """
    Map the official Haystack timezone list to those recognised by pytz.
    """
    arg_0 = {}
    arg_1 = HAYSTACK_TIMEZONES_SET.copy()
    for arg_2 in pytz.all_timezones:
        # Finished case:
        if not bool(arg_1): # pragma: no cover
            # This is nearly impossible for us to cover, and an unlikely case.
            break

        # Case 1: exact match
        if arg_2 in arg_1:
            arg_0[arg_2] = arg_2   # Exact match
            arg_1.discard(arg_2)
            continue

        # Case 2: suffix match after '/'
        if '/' not in arg_2:
            continue

        (arg_3, arg_4) = arg_2.split('/',1)
        # Case 2 exception: full timezone contains more than one '/' -> ignore
        if '/' in arg_4:
            continue

        if arg_4 in arg_1:
            arg_0[arg_4] = arg_2
            arg_1.discard(arg_4)
            continue

    return arg_0

Map the official Haystack timezone list to those recognised by pytz .


return "\n".join(
        textwrap.wrap(
            text, width=line_len, initial_indent=indent, subsequent_indent=indent
        )
    )

def Func ( arg_0 , arg_1 = 80 , arg_2 = "" ) : return "\n" . join ( textwrap . wrap ( arg_0 , width = arg_1 , initial_indent = arg_2 , subsequent_indent = arg_2 ) )

def Func(arg_0, arg_1=80, arg_2=""):
    """Wrap the text on the given line length."""
    return "\n".join(
        textwrap.wrap(
            arg_0, width=arg_1, initial_indent=arg_2, subsequent_indent=arg_2
        )
    )

Wrap the text on the given line length .


def Func ( arg_0 ) : if arg_0 . Funcd_at is None : with db . session . begin_nested ( ) : arg_0 . Funcd_at = datetime . utcnow ( ) link_Funcd . send ( arg_0 ) return True return False

def Func(arg_0):
        """Revoken a secret link."""
        if arg_0.Funcd_at is None:
            with db.session.begin_nested():
                arg_0.Funcd_at = datetime.utcnow()
            link_Funcd.send(arg_0)
            return True
        return False


(rho, z, get_hdet=False, include_K3_det=True, **kwargs)

def Func(arg_0, arg_1, arg_2=False, arg_3=True, **arg_4):
    """
    Calculates the symmetric and asymmetric portions of a confocal PSF.

    Parameters
    ----------
        rho : numpy.ndarray
            Rho in cylindrical coordinates, in units of 1/k.
        z : numpy.ndarray
            Z in cylindrical coordinates, in units of 1/k. Must be the
            same shape as `rho`
        get_hdet : Bool, optional
            Set to True to get the detection portion of the psf; False
            to get the illumination portion of the psf. Default is True
        include_K3_det : Bool, optional.
            Flag to not calculate the `K3' component for the detection
            PSF, corresponding to (I think) a low-aperature focusing
            lens and no z-polarization of the focused light. Default
            is True, i.e. calculates the K3 component as if the focusing
            lens is high-aperture

    Other Parameters
    ----------------
        alpha : Float, optional
            The acceptance angle of the lens, on (0,pi/2). Default is 1.
        zint : Float, optional
            The distance of the len's unaberrated focal point from the
            optical interface, in units of 1/k. Default is 100.
        n2n1 : Float, optional
            The ratio n2/n1 of the index mismatch between the sample
            (index n2) and the optical train (index n1). Must be on
            [0,inf) but should be near 1. Default is 0.95

    Returns
    -------
        hsym : numpy.ndarray
            `rho`.shape numpy.array of the symmetric portion of the PSF
        hasym : numpy.ndarray
            `rho`.shape numpy.array of the asymmetric portion of the PSF
    """

    arg_5, arg_6 = get_K(arg_0, arg_1, K=1, arg_2=arg_2, arg_6=None,
            return_Kprefactor=True, **arg_4)
    arg_7 = get_K(arg_0, arg_1, K=2, arg_2=arg_2, arg_6=arg_6,
            return_Kprefactor=False, **arg_4)

    if arg_2 and not arg_3:
        arg_8 = 0*arg_5
    else:
        arg_8 = get_K(arg_0, arg_1, K=3, arg_2=arg_2, arg_6=arg_6,
            return_Kprefactor=False, **arg_4)

    arg_9 = arg_5*arg_5.conj() + arg_7*arg_7.conj() + 0.5*(arg_8*arg_8.conj())
    arg_10= arg_5*arg_7.conj() + arg_7*arg_5.conj() + 0.5*(arg_8*arg_8.conj())

    return arg_9.real, arg_10.real

Calculates the symmetric and asymmetric portions of a confocal PSF .


def Func ( arg_0 , arg_1 , arg_2 ) : if arg_0 . slug is not None : raise http . exceptions . NotImplemented ( ) arg_0 . assert_operations ( 'create' ) arg_3 = arg_0 . _clean ( None , arg_0 . request . read ( deserialize = True ) ) arg_4 = arg_0 . create ( arg_3 ) arg_0 . response . status = http . client . CREATED arg_0 . make_response ( arg_4 )

def Func(arg_0, arg_1, arg_2):
        """Processes a `POST` request."""
        if arg_0.slug is not None:
            # Don't know what to do an item access.
            raise http.exceptions.NotImplemented()

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

        # Deserialize and clean the incoming object.
        arg_3 = arg_0._clean(None, arg_0.request.read(deserialize=True))

        # Delegate to `create` to create the item.
        arg_4 = arg_0.create(arg_3)

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


def Func ( arg_0 ) : arg_1 , Func = arg_0 . source_buffer . decompose_position ( arg_0 . begin_pos ) return Func

def Func(arg_0):
        """
        Returns a zero-based column number of the beginning of this range.
        """
        arg_1, Func = arg_0.source_buffer.decompose_position(arg_0.begin_pos)
        return Func

Returns a zero - based column number of the beginning of this range .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_1 , arg_2 = _validate_min_max ( arg_0 , arg_1 , arg_2 ) arg_3 = copy . copy ( arg_0 . _indep_vector ) if ( isinstance ( arg_1 , float ) or isinstance ( arg_2 , float ) ) and arg_3 . dtype . name . startswith ( "int" ) : arg_3 = arg_3 . astype ( float ) arg_4 = np . searchsorted ( arg_3 , arg_1 ) if not np . isclose ( arg_1 , arg_3 [ arg_4 ] , FP_RTOL , FP_ATOL ) : arg_3 = np . insert ( arg_3 , arg_4 , arg_1 ) arg_5 = np . searchsorted ( arg_3 , arg_2 ) if not np . isclose ( arg_2 , arg_3 [ arg_5 ] , FP_RTOL , FP_ATOL ) : arg_3 = np . insert ( arg_3 , arg_5 , arg_2 ) arg_6 = _interp_dep_vector ( arg_0 , arg_3 ) arg_0 . _indep_vector = arg_3 [ arg_4 : arg_5 + 1 ] arg_0 . _dep_vector = arg_6 [ arg_4 : arg_5 + 1 ]

def Func(arg_0, arg_1, arg_2):
    """Add independent variable vector bounds if they are not in vector."""
    arg_1, arg_2 = _validate_min_max(arg_0, arg_1, arg_2)
    arg_3 = copy.copy(arg_0._indep_vector)
    if (
        isinstance(arg_1, float) or isinstance(arg_2, float)
    ) and arg_3.dtype.name.startswith("int"):
        arg_3 = arg_3.astype(float)
    arg_4 = np.searchsorted(arg_3, arg_1)
    if not np.isclose(arg_1, arg_3[arg_4], FP_RTOL, FP_ATOL):
        arg_3 = np.insert(arg_3, arg_4, arg_1)
    arg_5 = np.searchsorted(arg_3, arg_2)
    if not np.isclose(arg_2, arg_3[arg_5], FP_RTOL, FP_ATOL):
        arg_3 = np.insert(arg_3, arg_5, arg_2)
    arg_6 = _interp_dep_vector(arg_0, arg_3)
    arg_0._indep_vector = arg_3[arg_4 : arg_5 + 1]
    arg_0._dep_vector = arg_6[arg_4 : arg_5 + 1]

Add independent variable vector bounds if they are not in vector .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 ( arg_1 ) arg_2 = json . loads ( arg_2 . content . decode ( 'utf-8' ) ) return arg_2

def Func(arg_0, arg_1):
	"""Return json from querying Web Api

		Args:
			view: django view function.
			request: http request object got from django.

		Returns: json format dictionary
		"""
	arg_2 = arg_0(arg_1)
	arg_2 = json.loads(arg_2.content.decode('utf-8'))
	return arg_2


(self, url=None, return_base=False, return_formatted=False)

def Func(arg_0, arg_1=None, arg_2=False, arg_3=False):
        """
        Check if the given URL is valid.

        :param url: The url to validate.
        :type url: str

        :param return_base:
            Allow us the return of the url base (if URL formatted correctly).
        :type return_formatted: bool

        :param return_formatted:
            Allow us to get the URL converted to IDNA if the conversion
            is activated.
        :type return_formatted: bool

        :return: The validity of the URL or its base.
        :rtype: bool|str
        """

        # We initiate a variable which will save the initial base in case
        # we have to convert the base to IDNA.
        arg_4 = None

        if arg_1:
            # The given url is not empty.

            # We initiate the element to test.
            arg_5 = arg_1
        elif arg_0.element:
            # The globaly given url is not empty.

            # We initiate the element to test.
            arg_5 = arg_0.element
        else:
            # The given url is empty.

            # We initiate the element to test from the globaly URl to test.
            arg_5 = PyFunceble.INTERN["to_test"]

        if arg_5.startswith("http"):
            # The element to test starts with http.

            try:
                # We initiate a regex which will match the domain or the url base.
                arg_6 = r"(^(http:\/\/|https:\/\/)(.+?(?=\/)|.+?$))"

                # We extract the url base with the help of the initiated regex.
                arg_4 = arg_7 = Regex(
                    arg_5, arg_6, return_data=True, rematch=True
                ).match()[2]

                if PyFunceble.CONFIGURATION["idna_conversion"]:
                    # We have to convert the domain to IDNA.

                    # We convert the initial base to IDNA.
                    arg_7 = domain2idna(arg_7)

                # We check if the url base is a valid domain.
                arg_8 = arg_0.is_domain_valid(arg_7)

                # We check if the url base is a valid IP.
                arg_9 = arg_0.is_ip_valid(arg_7)

                if arg_8 or arg_9:
                    # * The url base is a valid domain.
                    # and
                    # * The url base is a valid IP.

                    if PyFunceble.CONFIGURATION["idna_conversion"] and arg_3:
                        # * We have to convert to IDNA.
                        # and
                        # * We have to return the converted full URL.

                        # We return the converted full URL.
                        return Regex(
                            arg_5,
                            arg_4,
                            escape=True,
                            return_data=True,
                            replace_with=arg_7,
                            occurences=1,
                        ).replace()

                    if arg_3:
                        # * We do not have to convert to IDNA.
                        # but
                        # * We have to return the full URL.

                        # We return the initially given URL.
                        return arg_5

                    if arg_2:
                        # We have to return the base of the URL.

                        # We return the base of the URL.
                        return arg_7

                    # We return True.
                    return True
            except TypeError:
                pass

        if arg_3:
            # We have to return an URL.

            # We return the initily given URL.
            return arg_5

        # We return False.
        return False


def Func(arg_0=300):
    """Wait util target connected"""

    if env():
        arg_3.err("cij.ssh.Func: Invalid SSH environment")
        return 1

    arg_1 = arg_3.ENV.get("SSH_CMD_TIMEOUT")

    try:
        arg_2 = time.time()

        arg_3.ENV["SSH_CMD_TIMEOUT"] = "3"

        while True:
            arg_5 = time.time()
            if (arg_5 - arg_2) > arg_0:
                arg_3.err("cij.ssh.Func: Timeout")
                return 1

            arg_6, arg_7, arg_7 = command(["exit"], shell=True, echo=False)
            if not arg_6:
                break

        arg_3.info("cij.ssh.Func: Time elapsed: %d seconds" % (arg_5 - arg_2))

    finally:
        if arg_1 is None:
            del arg_3.ENV["SSH_CMD_TIMEOUT"]
        else:
            arg_3.ENV["SSH_CMD_TIMEOUT"] = arg_1

    return 0


def Func ( arg_0 , arg_1 = arg_2 ) : if arg_1 >= 0 and isinstance ( arg_0 , ( list , tuple , GeneratorType , map , zip ) ) : arg_1 -= 1 for arg_3 in arg_0 : yield from Func ( arg_3 , arg_1 = arg_1 ) else : yield arg_0

def Func(arg_0, arg_1=arg_2):
    """
    Flatten nested lists, tuples, generators and maps

    :param level: maximum depth of Funcing
    """
    if arg_1 >= 0 and isinstance(arg_0, (list, tuple, GeneratorType,
                                             map, zip)):
        arg_1 -= 1
        for arg_3 in arg_0:
            yield from Func(arg_3, arg_1=arg_1)
    else:
        yield arg_0

Flatten nested lists, tuples, generators and maps

    :param level: maximum depth of flattening

Flatten nested lists tuples generators and maps


def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_3 = True for arg_4 , arg_5 in _items ( arg_1 ) : if not arg_0 . set ( arg_4 , arg_5 , arg_2 ) : arg_3 = False return arg_3

def Func(arg_0, arg_1, arg_2=None):
        """Sets multiple keys and values from a mapping.

        :param mapping: a mapping with the keys/values to set.
        :param timeout: the cache timeout for the key (if not specified,
                        it uses the default timeout).
        :returns: Whether all given keys have been set.
        :rtype: boolean
        """
        arg_3 = True
        for arg_4, arg_5 in _items(arg_1):
            if not arg_0.set(arg_4, arg_5, arg_2):
                arg_3 = False
        return arg_3

Sets multiple keys and values from a mapping .


def Func(arg_0, arg_1, arg_2):
    """Verify that namespace packages are valid"""
    assert_string_list(arg_0,arg_1,arg_2)
    for arg_3 in arg_2:
        if not arg_0.has_contents_for(arg_3):
            raise DistutilsSetupError(
                "Distribution contains no modules or packages for " +
                "namespace package %r" % arg_3
            )
        if '.' in arg_3:
            arg_4 = '.'.join(arg_3.split('.')[:-1])
            if arg_4 not in arg_2:
                distutils.log.warn(
                    "%r is declared as a package namespace, but %r is not:"
                    " please correct this in setup.py", arg_3, arg_4
                )


return os.environ.get(
			'XML_EDITOR',
			os.environ.get('EDITOR', default_editor),
		)

def Func ( arg_0 ) : arg_1 = [ 'edit' , 'notepad' ] [ sys . platform . startswith ( 'win32' ) ] return os . environ . get ( 'XML_EDITOR' , os . environ . get ( 'EDITOR' , arg_1 ) , )

def Func(arg_0):
		"""
		Give preference to an XML_EDITOR or EDITOR defined in the
		environment. Otherwise use notepad on Windows and edit on other
		platforms.
		"""
		arg_1 = ['edit', 'notepad'][sys.platform.startswith('win32')]
		return os.environ.get(
			'XML_EDITOR',
			os.environ.get('EDITOR', arg_1),
		)

Give preference to an XML_EDITOR or EDITOR defined in the environment . Otherwise use notepad on Windows and edit on other platforms .


return (reaction.boundary and not
            any(ex in reaction.id for ex in excludes[boundary_type]) and
            correct_compartment and rev_type)

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_0 . annotation . get ( "sbo" , "" ) if isinstance ( arg_3 , list ) : arg_3 = arg_3 [ 0 ] arg_3 = arg_3 . upper ( ) if arg_3 == sbo_terms [ arg_1 ] : return True if arg_3 in [ sbo_terms [ arg_4 ] for arg_4 in sbo_terms if arg_4 != arg_1 ] : return False arg_5 = arg_2 in arg_0 . compartments if arg_1 != "exchange" : arg_5 = not arg_5 arg_6 = True if arg_1 == "demand" : arg_6 = not arg_0 . reversibility elif arg_1 == "sink" : arg_6 = arg_0 . reversibility return ( arg_0 . boundary and not any ( arg_7 in arg_0 . id for arg_7 in excludes [ arg_1 ] ) and arg_5 and arg_6 )

def Func(arg_0, arg_1, arg_2):
    """Check whether a reaction is an exchange reaction.

    Arguments
    ---------
    reaction : cobra.Reaction
        The reaction to check.
    boundary_type : str
        What boundary type to check for. Must be one of
        "exchange", "demand", or "sink".
    external_compartment : str
        The id for the external compartment.

    Returns
    -------
    boolean
        Whether the reaction looks like the requested type. Might be based
        on a heuristic.
    """
    # Check if the reaction has an annotation. Annotations dominate everything.
    arg_3 = arg_0.annotation.get("sbo", "")
    if isinstance(arg_3, list):
        arg_3 = arg_3[0]
    arg_3 = arg_3.upper()

    if arg_3 == sbo_terms[arg_1]:
        return True
    if arg_3 in [sbo_terms[arg_4] for arg_4 in sbo_terms if arg_4 != arg_1]:
        return False

    # Check if the reaction is in the correct compartment (exterior or inside)
    arg_5 = arg_2 in arg_0.compartments
    if arg_1 != "exchange":
        arg_5 = not arg_5

    # Check if the reaction has the correct reversibility
    arg_6 = True
    if arg_1 == "demand":
        arg_6 = not arg_0.reversibility
    elif arg_1 == "sink":
        arg_6 = arg_0.reversibility

    return (arg_0.boundary and not
            any(arg_7 in arg_0.id for arg_7 in excludes[arg_1]) and
            arg_5 and arg_6)

Check whether a reaction is an exchange reaction .


def Func ( arg_0 ) : def arg_3 ( * arg_1 , ** arg_2 ) : return arg_0 ( * arg_1 , ** arg_2 ) arg_3 . cached_httpbl_exempt = True return wraps ( arg_0 , assigned = available_attrs ( arg_0 ) ) ( arg_3 )

def Func(arg_0):
    """
    Marks a view function as being exempt from the cached httpbl view protection.
    """
    # We could just do view_func.cached_httpbl_exempt = True, but decorators
    # are nicer if they don't have side-effects, so we return a new
    # function.
    def arg_3(*arg_1, **arg_2):
        return arg_0(*arg_1, **arg_2)
    arg_3.cached_httpbl_exempt = True
    return wraps(arg_0, assigned=available_attrs(arg_0))(arg_3)

Marks a view function as being exempt from the cached httpbl view protection .


def Func ( arg_0 , arg_1 , arg_2 = True ) : arg_1 = update_scheme ( "http://" , arg_1 ) arg_3 = [ ] for arg_4 , arg_5 in arg_0 . plugins . items ( ) : if arg_5 . can_handle_url ( arg_1 ) : arg_3 . append ( arg_5 ) arg_3 . sort ( key = lambda x : x . priority ( arg_1 ) , reverse = True ) if arg_3 : return arg_3 [ 0 ] ( arg_1 ) if arg_2 : try : arg_6 = arg_0 . http . head ( arg_1 , allow_redirects = True , acceptable_status = [ 501 ] ) if arg_6 . status_code == 501 : arg_6 = arg_0 . http . get ( arg_1 , stream = True ) if arg_6 . url != arg_1 : return arg_0 . Func ( arg_6 . url , arg_2 = arg_2 ) except PluginError : pass raise NoPluginError

def Func(arg_0, arg_1, arg_2=True):
        """Attempts to find a plugin that can use this URL.

        The default protocol (http) will be prefixed to the URL if
        not specified.

        Raises :exc:`NoPluginError` on failure.

        :param url: a URL to match against loaded plugins
        :param follow_redirect: follow redirects

        """
        arg_1 = update_scheme("http://", arg_1)

        arg_3 = []
        for arg_4, arg_5 in arg_0.plugins.items():
            if arg_5.can_handle_url(arg_1):
                arg_3.append(arg_5)

        arg_3.sort(key=lambda x: x.priority(arg_1), reverse=True)
        if arg_3:
            return arg_3[0](arg_1)

        if arg_2:
            # Attempt to handle a redirect URL
            try:
                arg_6 = arg_0.http.head(arg_1, allow_redirects=True, acceptable_status=[501])

                # Fall back to GET request if server doesn't handle HEAD.
                if arg_6.status_code == 501:
                    arg_6 = arg_0.http.get(arg_1, stream=True)

                if arg_6.url != arg_1:
                    return arg_0.Func(arg_6.url, arg_2=arg_2)
            except PluginError:
                pass

        raise NoPluginError

Attempts to find a plugin that can use this URL .


def Func ( arg_0 = 200 ) : arg_1 = arange ( arg_0 ) arg_2 = cos ( 0.257 * pi * arg_1 ) + sin ( 0.2 * pi * arg_1 ) + 0.01 * randn ( arg_1 . size ) return arg_2

def Func(arg_0=200):
    """A simple test example with two close frequencies

    """
    arg_1 = arange(arg_0)
    arg_2 = cos(0.257*pi*arg_1) + sin(0.2*pi*arg_1) + 0.01*randn(arg_1.size)
    return arg_2


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
if
arg_2
<
0
or
arg_2
>
255
:
raise
ValueError
(
"ID must be an unsigned byte!"
)
arg_3
,
arg_4
,
arg_5
=
io
.
send_packet
(
CMDTYPE
.
SETID
,
1
,
arg_1
,
arg_0
.
baudrate
,
5
,
arg_2
)
if
not
arg_5
:
raise_error
(
arg_4
)

def Func(arg_0, arg_1, arg_2):
        """Set device ID to new value.

        :param str dev: Serial device address/path
        :param id: Device ID to set
        """
        if arg_2 < 0 or arg_2 > 255:
            raise ValueError("ID must be an unsigned byte!")
        arg_3, arg_4, arg_5 = io.send_packet(
            CMDTYPE.SETID, 1, arg_1, arg_0.baudrate, 5, arg_2)
        if not arg_5:
            raise_error(arg_4)


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . regions [ arg_1 ] arg_3 = arg_2 . getOutputData ( "actualValues" ) arg_4 = arg_2 . getOutputData ( "probabilities" ) arg_5 = arg_2 . getSelf ( ) . stepsList arg_6 = arg_2 . getSelf ( ) . maxCategoryCount arg_7 = { step : { } for step in arg_5 } for arg_8 in range ( len ( arg_5 ) ) : arg_9 = arg_4 [ arg_8 * arg_6 : ( arg_8 + 1 ) * arg_6 - 1 ] arg_10 = arg_9 . argmax ( ) arg_11 = arg_3 [ arg_10 ] arg_12 = arg_9 [ arg_10 ] arg_7 [ arg_5 [ arg_8 ] ] [ "predictedValue" ] = arg_11 arg_7 [ arg_5 [ arg_8 ] ] [ "predictionConfidence" ] = arg_12 return arg_7

def Func(arg_0, arg_1):
  """Get prediction results for all prediction steps."""
  arg_2 = arg_0.regions[arg_1]
  arg_3 = arg_2.getOutputData("actualValues")
  arg_4 = arg_2.getOutputData("probabilities")
  arg_5 = arg_2.getSelf().stepsList
  arg_6 = arg_2.getSelf().maxCategoryCount
  arg_7 = {step: {} for step in arg_5}
  for arg_8 in range(len(arg_5)):
    # stepProbabilities are probabilities for this prediction step only.
    arg_9 = arg_4[arg_8 * arg_6:(arg_8 + 1) * arg_6 - 1]
    arg_10 = arg_9.argmax()
    arg_11 = arg_3[arg_10]
    arg_12 = arg_9[arg_10]
    arg_7[arg_5[arg_8]]["predictedValue"] = arg_11
    arg_7[arg_5[arg_8]]["predictionConfidence"] = arg_12
  return arg_7

Get prediction results for all prediction steps .


def Func ( arg_0 ) : arg_0 . _text_edit . setExtraSelections ( [ ] ) arg_1 = arg_0 . _text_edit . textCursor ( ) if not arg_1 . hasSelection ( ) : arg_2 = arg_1 . position ( ) - 1 arg_3 = arg_0 . _find_match ( arg_2 ) if arg_3 != - 1 : arg_4 = [ arg_0 . _selection_for_character ( pos ) for pos in ( arg_2 , arg_3 ) ] arg_0 . _text_edit . setExtraSelections ( arg_4 )

def Func(arg_0):
        """ Updates the document formatting based on the new cursor position.
        """
        # Clear out the old formatting.
        arg_0._text_edit.setExtraSelections([])

        # Attempt to match a bracket for the new cursor position.
        arg_1 = arg_0._text_edit.textCursor()
        if not arg_1.hasSelection():
            arg_2 = arg_1.position() - 1
            arg_3 = arg_0._find_match(arg_2)
            if arg_3 != -1:
                arg_4 = [ arg_0._selection_for_character(pos)
                                     for pos in (arg_2, arg_3) ]
                arg_0._text_edit.setExtraSelections(arg_4)

Updates the document formatting based on the new cursor position .


def Func ( arg_0 , arg_1 = None ) : arg_1 = default_edge_ranking if arg_1 is None else arg_1 arg_2 = [ ( edge_id , edge_data [ RELATION ] , arg_1 [ edge_data [ RELATION ] ] ) for edge_id , edge_data in arg_0 . items ( ) ] return max ( arg_2 , key = itemgetter ( 2 ) )

def Func(arg_0, arg_1=None):
    """Return the highest ranked edge from a multiedge.

    :param dict edges: dictionary with all edges between two nodes
    :param dict edge_ranking: A dictionary of {relationship: score}
    :return: Highest ranked edge
    :rtype: tuple: (edge id, relation, score given ranking)
    """
    arg_1 = default_edge_ranking if arg_1 is None else arg_1

    arg_2 = [
        (edge_id, edge_data[RELATION], arg_1[edge_data[RELATION]])
        for edge_id, edge_data in arg_0.items()
    ]

    return max(arg_2, key=itemgetter(2))

Return the highest ranked edge from a multiedge .


def
Func
(
arg_0
)
:
if
arg_0
.
args
.
roster_cache
and
os
.
path
.
exists
(
arg_0
.
args
.
roster_cache
)
:
logging
.
info
(
u"Loading roster from {0!r}"
.
format
(
arg_0
.
args
.
roster_cache
)
)
try
:
arg_0
.
client
.
roster_client
.
load_roster
(
arg_0
.
args
.
roster_cache
)
except
(
IOError
,
ValueError
)
,
err
:
logging
.
error
(
u"Could not load the roster: {0!r}"
.
format
(
err
)
)
arg_0
.
client
.
connect
(
)
arg_0
.
client
.
Func
(
)

def Func(arg_0):
        """Request client connection and start the main loop."""
        if arg_0.args.roster_cache and os.path.exists(arg_0.args.roster_cache):
            logging.info(u"Loading roster from {0!r}"
                                            .format(arg_0.args.roster_cache))
            try:
                arg_0.client.roster_client.load_roster(arg_0.args.roster_cache)
            except (IOError, ValueError), err:
                logging.error(u"Could not load the roster: {0!r}".format(err))
        arg_0.client.connect()
        arg_0.client.Func()

Request client connection and start the main loop .


def Func(arg_0, arg_1):
    """
    Dump a public key to a buffer.

    :param type: The file type (one of :data:`FILETYPE_PEM` or
        :data:`FILETYPE_ASN1`).
    :param PKey pkey: The public key to dump
    :return: The buffer with the dumped key in it.
    :rtype: bytes
    """
    arg_2 = _new_mem_buf()
    if arg_0 == FILETYPE_PEM:
        arg_3 = _lib.PEM_write_bio_PUBKEY
    elif arg_0 == FILETYPE_ASN1:
        arg_3 = _lib.i2d_PUBKEY_bio
    else:
        raise ValueError("type argument must be FILETYPE_PEM or FILETYPE_ASN1")

    arg_4 = arg_3(arg_2, arg_1._pkey)
    if arg_4 != 1:  # pragma: no cover
        _raise_current_error()

    return _bio_to_string(arg_2)


def Func ( arg_0 , arg_1 : arg_2 . Symbol ) -> Optional [ "Namespace" ] : while True : arg_4 : lmap . Map = arg_0 . _NAMESPACES . deref ( ) arg_5 : Optional [ Namespace ] = arg_4 . entry ( arg_1 , None ) arg_6 = arg_4 if arg_5 is not None : arg_6 = arg_4 . dissoc ( arg_1 ) if arg_0 . _NAMESPACES . compare_and_set ( arg_4 , arg_6 ) : return arg_5

def Func(arg_0, arg_1: arg_2.Symbol) -> Optional["Namespace"]:
        """Remove the namespace bound to the symbol `name` in the global
        namespace cache and return that namespace.
        Return None if the namespace did not exist in the cache."""
        while True:
            arg_4: lmap.Map = arg_0._NAMESPACES.deref()
            arg_5: Optional[Namespace] = arg_4.entry(arg_1, None)
            arg_6 = arg_4
            if arg_5 is not None:
                arg_6 = arg_4.dissoc(arg_1)
            if arg_0._NAMESPACES.compare_and_set(arg_4, arg_6):
                return arg_5

Remove the namespace bound to the symbol name in the global namespace cache and return that namespace . Return None if the namespace did not exist in the cache .


def Func ( arg_0 , arg_1 ) : for arg_2 in sorted ( arg_0 . functions . values ( ) , key = lambda x : x [ 0 ] ) : try : yield [ list ( arg_2 ( arg_1 ) ) ] except Exception , exc : yield [ ] arg_0 . log ( repr ( exc ) )

def Func(arg_0, arg_1):
        """Return the mapping of a document according to the function list."""
        # This uses the stored set of functions, sorted by order of addition.
        for arg_2 in sorted(arg_0.functions.values(), key=lambda x: x[0]):
            try:
                # It has to be run through ``list``, because it may be a
                # generator function.
                yield [list(arg_2(arg_1))]
            except Exception, exc:
                # Otherwise, return an empty list and log the event.
                yield []
                arg_0.log(repr(exc))

Return the mapping of a document according to the function list .


def Func ( arg_0 , arg_1 ) : arg_0 . transport = arg_1 arg_2 = arg_1 . get_extra_info ( "socket" ) arg_0 . port = arg_2 . getsockname ( ) [ 1 ]

def Func(arg_0, arg_1):
        """ On socket creation """
        arg_0.transport = arg_1

        arg_2 = arg_1.get_extra_info("socket")
        arg_0.port = arg_2.getsockname()[1]


def Func(arg_0, arg_1=None, arg_2=None):
    """ Convert an N x 3 array of XYZ coordinates to matrix indices. """
    arg_0 = np.hstack((arg_0, np.ones((arg_0.shape[0], 1))))
    arg_3 = np.array([[-0.5, 0, 0, 45], [0, 0.5, 0, 63], [0, 0, 0.5, 36]]).T
    arg_4 = np.dot(arg_0, arg_3)[:, ::-1]  # multiply and reverse column order
    return np.round_(arg_4).astype(int)

Convert an N x 3 array of XYZ coordinates to matrix indices .


def Func ( ) : try : from . models import SecretLink arg_0 = request . args [ 'token' ] if arg_0 and SecretLink . validate_token ( arg_0 , { } ) : arg_1 [ 'accessrequests-secret-token' ] = arg_0 except KeyError : pass

def Func():
    """Verify token and save in session if it's valid."""
    try:
        from .models import SecretLink
        arg_0 = request.args['token']
        # if the token is valid
        if arg_0 and SecretLink.validate_token(arg_0, {}):
            # then save in session the token
            arg_1['accessrequests-secret-token'] = arg_0
    except KeyError:
        pass

Verify token and save in session if it s valid .


def Func ( arg_0 ) : with open ( arg_0 . path , 'w' ) as f : f . write ( yaml . dump ( dict ( arg_0 . d ) ) )

def Func(arg_0):
        """
        Save the state to a file.
        """
        with open(arg_0.path, 'w') as f:
            f.write(yaml.dump(dict(arg_0.d)))


(adapter: MongoAdapter, scout_case: dict, archive_data: dict)

def Func(arg_0: arg_1, arg_2: arg_3, arg_4: arg_3):
    """Migrate case information from archive."""
    # update collaborators
    arg_5 = list(set(arg_2['collaborators'] + arg_4['collaborators']))
    if arg_5 != arg_2['collaborators']:
        LOG.info(f"set collaborators: {', '.join(collaborators)}")
        arg_2['collaborators'] = arg_5

    # update assignees
    if len(arg_2.get('assignees', [])) == 0:
        arg_6 = arg_0.user(arg_4['assignee'])
        if arg_6:
            arg_2['assignees'] = [arg_4['assignee']]
        else:
            LOG.warning(f"{archive_data['assignee']}: unable to find assigned user")

    # add/update suspected/causative variants
    for arg_7 in ['suspects', 'causatives']:
        arg_2[arg_7] = arg_2.get(arg_7, [])
        for arg_8 in arg_4[arg_7]:
            arg_9 = get_variantid(arg_8, arg_2['_id'])
            arg_10 = arg_0.variant(arg_9)
            if arg_10:
                if arg_10['_id'] in arg_2[arg_7]:
                    LOG.info(f"{scout_variant['_id']}: variant already in {key}")
                else:
                    LOG.info(f"{scout_variant['_id']}: add to {key}")
                    arg_10[arg_7].append(arg_10['_id'])
            else:
                LOG.warning(f"{scout_variant['_id']}: unable to find variant ({key})")
                arg_10[arg_7].append(arg_9)

    if not arg_2.get('synopsis'):
        # update synopsis
        arg_2['synopsis'] = arg_4['synopsis']

    arg_2['is_migrated'] = True
    arg_0.case_collection.find_one_and_replace(
        {'_id': arg_2['_id']},
        arg_2,
    )

    # add/update phenotype groups/terms
    arg_11 = arg_0.institute(arg_2['owner'])
    arg_6 = arg_0.user('mans.magnusson@scilifelab.se')
    for arg_7 in ['phenotype_terms', 'phenotype_groups']:
        for arg_12 in arg_4[arg_7]:
            arg_0.add_phenotype(
                institute=arg_11,
                case=arg_2,
                user=arg_6,
                link=f"/{scout_case['owner']}/{scout_case['display_name']}",
                hpo_term=arg_12['phenotype_id'],
                is_group=arg_7 == 'phenotype_groups',
            )


def Func ( arg_0 ) : arg_1 = datetime . datetime . now ( pytz . UTC ) for arg_2 in arg_0 . get ( 'seats' , [ ] ) : if arg_2 . get ( 'type' ) == 'verified' : arg_3 = parse_datetime_handle_invalid ( arg_2 . get ( 'upgrade_deadline' ) ) return not arg_3 or arg_3 > arg_1 return False

def Func(arg_0):
    """
    Return true if the course run has a verified seat with an unexpired upgrade deadline, false otherwise.
    """
    arg_1 = datetime.datetime.now(pytz.UTC)
    for arg_2 in arg_0.get('seats', []):
        if arg_2.get('type') == 'verified':
            arg_3 = parse_datetime_handle_invalid(arg_2.get('upgrade_deadline'))
            return not arg_3 or arg_3 > arg_1
    return False

Return true if the course run has a verified seat with an unexpired upgrade deadline false otherwise .


def Func ( arg_0 ) : Func = { 'configfilename' : arg_0 . filename , 'logfilename' : arg_0 . getpath ( 'Logging' , 'logfilename' ) , 'loglevel_console' : arg_0 . getLogLevel ( 'Logging' , 'loglevel_console' ) , 'loglevel_file' : arg_0 . getLogLevel ( 'Logging' , 'loglevel_file' ) , 'configdir' : arg_0 . getpath ( 'DEFAULT' , 'configdir' ) , 'qscriptdir' : arg_0 . getpath ( 'DEFAULT' , 'qscriptdir' ) , 'templatesdir' : arg_0 . getpath ( 'DEFAULT' , 'templatesdir' ) , } Func [ 'path' ] = [ os . path . curdir , Func [ 'qscriptdir' ] , Func [ 'templatesdir' ] ] return Func

def Func(arg_0):
          """Dict of variables that we make available as globals in the module.

          Can be used as ::

             globals().update(GMXConfigParser.configuration)        # update configdir, templatesdir ...
          """
          Func = {
               'configfilename': arg_0.filename,
               'logfilename': arg_0.getpath('Logging', 'logfilename'),
               'loglevel_console': arg_0.getLogLevel('Logging', 'loglevel_console'),
               'loglevel_file': arg_0.getLogLevel('Logging', 'loglevel_file'),
               'configdir': arg_0.getpath('DEFAULT', 'configdir'),
               'qscriptdir': arg_0.getpath('DEFAULT', 'qscriptdir'),
               'templatesdir': arg_0.getpath('DEFAULT', 'templatesdir'),
               }
          Func['path'] = [os.path.curdir,
                                   Func['qscriptdir'],
                                   Func['templatesdir']]
          return Func

Dict of variables that we make available as globals in the module .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = { } for arg_4 in nx . topological_sort ( arg_1 ) : with arg_0 . temp_flags ( after = [ arg_3 [ arg_5 ] for arg_5 in arg_1 . predecessors ( arg_4 ) ] ) : arg_3 [ arg_4 ] = arg_0 . apply ( arg_2 [ arg_4 ] ) return arg_3

def Func(arg_0, arg_1, arg_2):
    """Submit jobs via client where G describes the time dependencies."""
    arg_3 = {}
    for arg_4 in nx.topological_sort(arg_1):
        with arg_0.temp_flags(after=[ arg_3[arg_5] for arg_5 in arg_1.predecessors(arg_4) ]):
            arg_3[arg_4] = arg_0.apply(arg_2[arg_4])
    return arg_3

Submit jobs via client where G describes the time dependencies .


def Func ( arg_0 , arg_1 = True , arg_2 = False ) : arg_3 = [ poly for poly in arg_0 . polygons if not poly . is_out_of_image ( arg_0 . shape , arg_1 = arg_1 , arg_2 = arg_2 ) ] return PolygonsOnImage ( arg_3 , shape = arg_0 . shape )

def Func(arg_0, arg_1=True, arg_2=False):
        """
        Remove all polygons that are fully or partially outside of the image.

        Parameters
        ----------
        fully : bool, optional
            Whether to remove polygons that are fully outside of the image.

        partly : bool, optional
            Whether to remove polygons that are partially outside of the image.

        Returns
        -------
        imgaug.PolygonsOnImage
            Reduced set of polygons, with those that were fully/partially
            outside of the image removed.

        """
        arg_3 = [
            poly for poly in arg_0.polygons
            if not poly.is_out_of_image(arg_0.shape, arg_1=arg_1, arg_2=arg_2)
        ]
        # TODO use deepcopy() here
        return PolygonsOnImage(arg_3, shape=arg_0.shape)

Remove all polygons that are fully or partially outside of the image .


return yaml.dump(data, None, OrderedDumper, **kws)

def Func ( arg_0 , arg_1 = arg_2 . Dumper , ** arg_3 ) : class OrderedDumper ( arg_1 ) : pass def _dict_representer ( arg_4 , arg_0 ) : return arg_4 . represent_mapping ( arg_2 . resolver . BaseResolver . DEFAULT_MAPPING_TAG , arg_0 . items ( ) ) OrderedDumper . add_representer ( OrderedDict , _dict_representer ) return arg_2 . dump ( arg_0 , None , OrderedDumper , ** arg_3 )

def Func(arg_0, arg_1=arg_2.Dumper, **arg_3):
    """Expand PyYAML's built-in dumper to support parsing OrderedDict. Return
    a string as parse result of the original data structure, which includes
    OrderedDict.

    Args:
        data: the data structure to be dumped(parsed) which is supposed to
        contain OrderedDict.
        Dumper: the yaml serializer to be expanded and used.
        kws: extra key-value arguments to be passed to yaml.dump.
    """
    class OrderedDumper(arg_1):
        pass

    def _dict_representer(arg_4, arg_0):
        return arg_4.represent_mapping(
            arg_2.resolver.BaseResolver.DEFAULT_MAPPING_TAG,
            arg_0.items())
    OrderedDumper.add_representer(OrderedDict,
                                  _dict_representer)
    return arg_2.dump(arg_0, None, OrderedDumper, **arg_3)

Expand PyYAML s built - in dumper to support parsing OrderedDict . Return a string as parse result of the original data structure which includes OrderedDict .


def Func(arg_0, arg_1, arg_2):
        """
        Generate formated list of issues for changelog.

        :param list issues: Issues to put in sub-section.
        :param str prefix: Title of sub-section.
        :rtype: str
        :return: Generated ready-to-add sub-section.
        """

        arg_3 = ""
        if arg_1:
            if not arg_0.options.simple_list:
                arg_3 += u"{0}\n\n".format(arg_2)
            for arg_4 in arg_1:
                arg_5 = arg_0.get_string_for_issue(arg_4)
                arg_3 += u"- {0}\n".format(arg_5)
            arg_3 += "\n"
        return arg_3

Generate formated list of issues for changelog .


def Func ( arg_0 ) : arg_1 = [ ] arg_0 = os . path . abspath ( arg_0 ) for arg_2 , arg_3 , arg_4 in os . walk ( arg_0 ) : for arg_5 in arg_4 : if arg_5 . endswith ( ".py" ) : arg_1 . append ( os . path . join ( arg_2 , arg_5 ) ) return arg_1

def Func(arg_0):
    """Find all python files in the given directory and all subfolders."""
    arg_1 = []
    arg_0 = os.path.abspath(arg_0)
    for arg_2, arg_3, arg_4 in os.walk(arg_0):
        for arg_5 in arg_4:
            if arg_5.endswith(".py"):
                arg_1.append(os.path.join(arg_2, arg_5))
    return arg_1

Find all python files in the given directory and all subfolders .


return await asyncio.wait_for(
            self._protocol.send_command("qtmversion"), timeout=self._timeout
        )

async def Func ( arg_0 ) : return await asyncio . wait_for ( arg_0 . _protocol . send_command ( "qtmversion" ) , timeout = arg_0 . _timeout )

async def Func(arg_0):
        """Get the QTM version.
        """
        return await asyncio.wait_for(
            arg_0._protocol.send_command("qtmversion"), timeout=arg_0._timeout
        )


def Func ( arg_0 , arg_1 ) : if arg_0 . convertEntities : arg_2 = unichr ( int ( arg_1 ) ) else : arg_2 = '&#%s;' % arg_1 arg_0 . handle_data ( arg_2 )

def Func(arg_0, arg_1):
        "Handle character references as data."
        if arg_0.convertEntities:
            arg_2 = unichr(int(arg_1))
        else:
            arg_2 = '&#%s;' % arg_1
        arg_0.handle_data(arg_2)


def Func ( arg_0 , arg_1 , arg_2 ) : if arg_0 . _is_supported_matrix ( arg_1 ) : if arg_0 . _is_supported_matrix ( arg_2 ) : arg_3 , arg_3 , arg_4 = arg_0 . _serialize_matrix ( arg_1 ) arg_3 , arg_3 , arg_5 = arg_0 . _serialize_matrix ( arg_2 ) return hash ( arg_4 ) == hash ( arg_5 ) else : return False else : return super ( SparseParameter , arg_0 ) . Func ( arg_1 , arg_2 )

def Func(arg_0, arg_1, arg_2):
        """Matrices are equal if they hash to the same value."""
        if arg_0._is_supported_matrix(arg_1):
            if arg_0._is_supported_matrix(arg_2):

                arg_3, arg_3, arg_4 = arg_0._serialize_matrix(arg_1)
                arg_3, arg_3, arg_5 = arg_0._serialize_matrix(arg_2)

                return hash(arg_4) == hash(arg_5)
            else:
                return False
        else:
            return super(SparseParameter, arg_0).Func(arg_1, arg_2)

Matrices are equal if they hash to the same value .


def Func ( arg_0 ) : Func = [ ] for arg_2 in six . moves . xrange ( len ( arg_0 ) ) : arg_3 = '{group_cdn_url}nth/{file_index}/' . format ( group_cdn_url = arg_0 . cdn_url , arg_2 = arg_2 ) Func . append ( arg_3 ) return Func

def Func(arg_0):
        """Returns CDN urls of all files from group without API requesting.

        Usage example::

            >>> file_group = FileGroup('0513dda0-582f-447d-846f-096e5df9e2bb~2')
            >>> file_group.file_cdn_urls[0]
            'https://ucarecdn.com/0513dda0-582f-447d-846f-096e5df9e2bb~2/nth/0/'

        """
        Func = []
        for arg_2 in six.moves.xrange(len(arg_0)):
            arg_3 = '{group_cdn_url}nth/{file_index}/'.format(
                group_cdn_url=arg_0.cdn_url,
                arg_2=arg_2
            )
            Func.append(arg_3)
        return Func

Returns CDN urls of all files from group without API requesting .


(graph: BELGraph, victim_namespace: Strings, survivor_namespace: str)

def Func(arg_0: arg_1, arg_2: arg_3, arg_4: arg_5) -> None:
    """Collapse pairs of nodes with the given namespaces that have orthology relationships.

    :param graph: A BEL Graph
    :param victim_namespace: The namespace(s) of the node to collapse
    :param survivor_namespace: The namespace of the node to keep

    To collapse all MGI nodes to their HGNC orthologs, use:
    >>> Func('MGI', 'HGNC')

    To collapse collapse both MGI and RGD nodes to their HGNC orthologs, use:
    >>> Func(['MGI', 'RGD'], 'HGNC')
    """
    _collapse_edge_by_namespace(arg_0, arg_2, arg_4, ORTHOLOGOUS)

Collapse pairs of nodes with the given namespaces that have orthology relationships.

    :param graph: A BEL Graph
    :param victim_namespace: The namespace(s) of the node to collapse
    :param survivor_namespace: The namespace of the node to keep

    To collapse all MGI nodes to their HGNC orthologs, use:
    >>> collapse_orthologies_by_namespace('MGI', 'HGNC')

    To collapse collapse both MGI and RGD nodes to their HGNC orthologs, use:
    >>> collapse_orthologies_by_namespace(['MGI', 'RGD'], 'HGNC')

Collapse pairs of nodes with the given namespaces that have orthology relationships .


def Func(arg_0, arg_1):
    """Returns a StreamId protobuf message"""
    arg_2 = topology_pb2.StreamId()
    arg_2.id = arg_1
    arg_2.component_name = arg_0
    return arg_2


def Func ( arg_0 ) : arg_1 = None if arg_0 . physical_plan and arg_0 . physical_plan . topology : arg_1 = arg_0 . physical_plan . topology . state if arg_1 == 1 : return "Running" elif arg_1 == 2 : return "Paused" elif arg_1 == 3 : return "Killed" else : return "Unknown"

def Func(arg_0):
    """
    Get the current state of this topology.
    The state values are from the topology.proto
    RUNNING = 1, PAUSED = 2, KILLED = 3
    if the state is None "Unknown" is returned.
    """
    arg_1 = None
    if arg_0.physical_plan and arg_0.physical_plan.topology:
      arg_1 = arg_0.physical_plan.topology.state

    if arg_1 == 1:
      return "Running"
    elif arg_1 == 2:
      return "Paused"
    elif arg_1 == 3:
      return "Killed"
    else:
      return "Unknown"

Get the current state of this topology . The state values are from the topology . proto RUNNING = 1 PAUSED = 2 KILLED = 3 if the state is None Unknown is returned .