(
            cls, cfg,
            default_fg=DEFAULT_FG_16, default_bg=DEFAULT_BG_16,
            default_fg_hi=DEFAULT_FG_256, default_bg_hi=DEFAULT_BG_256,
            max_colors=2**24
    )

def Func ( arg_0 , arg_1 , arg_2 = arg_3 , arg_4 = arg_5 , arg_6 = arg_7 , arg_8 = arg_9 , arg_10 = 2 ** 24 ) : arg_11 = PaletteEntry ( mono = arg_2 , arg_13 = arg_2 , arg_17 = arg_4 , arg_12 = arg_6 , arg_16 = arg_8 ) if isinstance ( arg_1 , str ) : arg_11 . foreground_high = arg_1 if arg_11 . allowed ( arg_1 , 16 ) : arg_11 . foreground = arg_1 else : arg_14 = AttrSpec ( arg_18 = arg_1 , arg_15 = "" , colors = arg_10 ) . get_rgb_values ( ) [ 0 : 3 ] arg_11 . foreground = nearest_basic_color ( arg_14 ) elif isinstance ( arg_1 , dict ) : arg_15 = arg_1 . get ( "bg" , None ) if isinstance ( arg_15 , str ) : arg_11 . background_high = arg_15 if arg_11 . allowed ( arg_15 , 16 ) : arg_11 . background = arg_15 else : arg_14 = AttrSpec ( arg_18 = arg_15 , arg_15 = "" , colors = arg_10 ) . get_rgb_values ( ) [ 0 : 3 ] arg_11 . background = nearest_basic_color ( arg_14 ) elif isinstance ( arg_15 , dict ) : arg_11 . background_high = arg_15 . get ( "hi" , arg_8 ) if "lo" in arg_15 : if arg_11 . allowed ( arg_15 [ "lo" ] , 16 ) : arg_11 . background = arg_15 [ "lo" ] else : arg_14 = AttrSpec ( arg_18 = arg_15 [ "lo" ] , arg_15 = "" , colors = arg_10 ) . get_rgb_values ( ) [ 0 : 3 ] arg_11 . background = nearest_basic_color ( arg_14 ) arg_18 = arg_1 . get ( "fg" , arg_1 ) if isinstance ( arg_18 , str ) : arg_11 . foreground_high = arg_18 if arg_11 . allowed ( arg_18 , 16 ) : arg_11 . foreground = arg_18 else : arg_14 = AttrSpec ( arg_18 = arg_18 , arg_15 = "" , colors = arg_10 ) . get_rgb_values ( ) [ 0 : 3 ] arg_11 . foreground = nearest_basic_color ( arg_14 ) elif isinstance ( arg_18 , dict ) : arg_11 . foreground_high = arg_18 . get ( "hi" , arg_6 ) if "lo" in arg_18 : if arg_11 . allowed ( arg_18 [ "lo" ] , 16 ) : arg_11 . foreground = arg_18 [ "lo" ] else : arg_14 = AttrSpec ( arg_18 = arg_18 [ "lo" ] , arg_15 = "" , colors = arg_10 ) . get_rgb_values ( ) [ 0 : 3 ] arg_11 . foreground = nearest_basic_color ( arg_14 ) return arg_11

def Func(
            arg_0, arg_1,
            arg_2=arg_3, arg_4=arg_5,
            arg_6=arg_7, arg_8=arg_9,
            arg_10=2**24
    ):
        """
        Build a palette definition from either a simple string or a dictionary,
        filling in defaults for items not specified.

        e.g.:
            "dark green"
                dark green foreground, black background

            {lo: dark gray, hi: "#666"}
                dark gray on 16-color terminals, #666 for 256+ color

        """
        # TODO: mono

        arg_11 = PaletteEntry(mono = arg_2,
                         arg_13=arg_2,
                         arg_17=arg_4,
                         arg_12=arg_6,
                         arg_16=arg_8)

        if isinstance(arg_1, str):
            arg_11.foreground_high = arg_1
            if arg_11.allowed(arg_1, 16):
                arg_11.foreground = arg_1
            else:
                arg_14 = AttrSpec(arg_18=arg_1, arg_15="", colors=arg_10).get_rgb_values()[0:3]
                arg_11.foreground = nearest_basic_color(arg_14)

        elif isinstance(arg_1, dict):

            arg_15 = arg_1.get("bg", None)
            if isinstance(arg_15, str):
                arg_11.background_high = arg_15
                if arg_11.allowed(arg_15, 16):
                    arg_11.background = arg_15
                else:
                    arg_14 = AttrSpec(arg_18=arg_15, arg_15="", colors=arg_10).get_rgb_values()[0:3]
                    arg_11.background = nearest_basic_color(arg_14)
            elif isinstance(arg_15, dict):
                arg_11.background_high = arg_15.get("hi", arg_8)
                if "lo" in arg_15:
                    if arg_11.allowed(arg_15["lo"], 16):
                        arg_11.background = arg_15["lo"]
                    else:
                        arg_14 = AttrSpec(arg_18=arg_15["lo"], arg_15="", colors=arg_10).get_rgb_values()[0:3]
                        arg_11.background = nearest_basic_color(arg_14)

            arg_18 = arg_1.get("fg", arg_1)
            if isinstance(arg_18, str):
                arg_11.foreground_high = arg_18
                if arg_11.allowed(arg_18, 16):
                    arg_11.foreground = arg_18
                else:
                    arg_14 = AttrSpec(arg_18=arg_18, arg_15="", colors=arg_10).get_rgb_values()[0:3]
                    arg_11.foreground = nearest_basic_color(arg_14)

            elif isinstance(arg_18, dict):
                arg_11.foreground_high = arg_18.get("hi", arg_6)
                if "lo" in arg_18:
                    if arg_11.allowed(arg_18["lo"], 16):
                        arg_11.foreground = arg_18["lo"]
                    else:
                        arg_14 = AttrSpec(arg_18=arg_18["lo"], arg_15="", colors=arg_10).get_rgb_values()[0:3]
                        arg_11.foreground = nearest_basic_color(arg_14)
        return arg_11

Build a palette definition from either a simple string or a dictionary filling in defaults for items not specified .


(self, token, batchmaketaskid, jobdefinitionfilename,
                       outputfilename, errorfilename, logfilename,
                       postfilename)

def Func(arg_0, arg_1, arg_2, arg_3,
                       arg_4, arg_5, arg_6,
                       arg_7):
        """
        Add a Condor DAG job to the Condor DAG associated with this
        Batchmake task

        :param token: A valid token for the user in question.
        :type token: string
        :param batchmaketaskid: id of the Batchmake task for this DAG
        :type batchmaketaskid: int | long
        :param jobdefinitionfilename: Filename of the definition file for the
            job
        :type jobdefinitionfilename: string
        :param outputfilename: Filename of the output file for the job
        :type outputfilename: string
        :param errorfilename: Filename of the error file for the job
        :type errorfilename: string
        :param logfilename: Filename of the log file for the job
        :type logfilename: string
        :param postfilename: Filename of the post script log file for the job
        :type postfilename: string
        :return: The created Condor job DAO.
        :rtype: dict
        """
        arg_8 = dict()
        arg_8['token'] = arg_1
        arg_8['batchmaketaskid'] = arg_2
        arg_8['jobdefinitionfilename'] = arg_3
        arg_8['outputfilename'] = arg_4
        arg_8['errorfilename'] = arg_5
        arg_8['logfilename'] = arg_6
        arg_8['postfilename'] = arg_7
        arg_9 = arg_0.request('midas.batchmake.add.condor.job', arg_8)
        return arg_9


def Func ( arg_0 , arg_1 = True ) : if arg_1 : return arg_0 . _data . copy ( ) else : return arg_0 . _data

def Func(arg_0, arg_1=True):
        """Returns all handled data as a dictionary.

        :param copy:

            Whether the original dictionary or a shallow copy is returned.

        :return: Data dictionary

        """
        if arg_1:
            return arg_0._data.copy()
        else:
            return arg_0._data

Returns all handled data as a dictionary .


def Func ( arg_0 , arg_1 ) : arg_2 , arg_3 = arg_0 . format_data ( arg_1 , scale = False ) arg_0 . scaler = preprocessing . StandardScaler ( ) . fit ( arg_2 ) return arg_0 . scaler . transform ( arg_2 )

def Func(arg_0, arg_1):
        """
        Function to format data for cluster fitting.

        Parameters
        ----------
        data : dict
            A dict of data, containing all elements of
            `analytes` as items.

        Returns
        -------
        A data array for initial cluster fitting.
        """
        arg_2, arg_3 = arg_0.format_data(arg_1, scale=False)

        # define scaler
        arg_0.scaler = preprocessing.StandardScaler().fit(arg_2)

        # scale data and return
        return arg_0.scaler.transform(arg_2)

Function to format data for cluster fitting .


(self, pool, source, target, delete_source)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
,
arg_4
)
:
if
arg_2
[
1
]
==
PATH_SEP
:
if
arg_0
.
opt
.
recursive
:
arg_5
=
S3URL
(
arg_2
)
.
path
for
arg_6
in
(
arg_6
for
arg_6
in
arg_0
.
s3walk
(
arg_2
)
if
not
arg_6
[
'is_dir'
]
)
:
arg_1
.
copy
(
arg_6
[
'name'
]
,
os
.
path
.
join
(
arg_3
,
os
.
path
.
relpath
(
S3URL
(
arg_6
[
'name'
]
)
.
path
,
arg_5
)
)
,
arg_4
=
arg_4
)
else
:
message
(
'omitting directory "%s".'
%
arg_2
)
else
:
arg_1
.
copy
(
arg_2
,
arg_3
,
arg_4
=
arg_4
)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
    '''Copy a single file or a directory by adding a task into queue'''
    if arg_2[-1] == PATH_SEP:
      if arg_0.opt.recursive:
        arg_5 = S3URL(arg_2).path
        for arg_6 in (arg_6 for arg_6 in arg_0.s3walk(arg_2) if not arg_6['is_dir']):
          arg_1.copy(arg_6['name'], os.path.join(arg_3, os.path.relpath(S3URL(arg_6['name']).path, arg_5)), arg_4=arg_4)
      else:
        message('omitting directory "%s".' % arg_2)
    else:
      arg_1.copy(arg_2, arg_3, arg_4=arg_4)


def Func ( arg_0 , arg_1 = arg_2 ) : get_provider ( ) . _central_manager . stopScan ( ) arg_0 . _is_scanning = False

def Func(arg_0, arg_1=arg_2):
        """Stop scanning for BLE devices."""
        get_provider()._central_manager.stopScan()
        arg_0._is_scanning = False


def Func ( arg_0 , arg_1 = None ) : arg_2 = len ( arg_0 ) arg_3 = np . zeros ( arg_2 , dtype = complex ) for arg_4 in range ( arg_2 ) : arg_3 [ arg_4 ] = arg_0 [ arg_4 ] [ 0 ] + 1j * arg_0 [ arg_4 ] [ 1 ] if arg_1 : arg_3 = np . around ( arg_3 , arg_1 = arg_1 ) return arg_3

def Func(arg_0, arg_1=None):
    """Format statevector coming from the backend to present to the Qiskit user.

    Args:
        vec (list): a list of [re, im] complex numbers.
        decimals (int): the number of decimals in the statevector.
            If None, no rounding is done.

    Returns:
        list[complex]: a list of python complex numbers.
    """
    arg_2 = len(arg_0)
    arg_3 = np.zeros(arg_2, dtype=complex)
    for arg_4 in range(arg_2):
        arg_3[arg_4] = arg_0[arg_4][0] + 1j * arg_0[arg_4][1]
    if arg_1:
        arg_3 = np.around(arg_3, arg_1=arg_1)
    return arg_3

Format statevector coming from the backend to present to the Qiskit user .


(self, personId, emails=None, displayName=None, firstName=None,
               lastName=None, avatar=None, orgId=None, roles=None,
               licenses=None, **request_parameters)

def Func(arg_0, arg_1, arg_2=None, arg_3=None, arg_4=None,
               arg_5=None, arg_6=None, arg_7=None, arg_8=None,
               arg_9=None, **arg_10):
        """Update details for a person, by ID.

        Only an admin can Func a person's details.

        Email addresses for a person cannot be changed via the Webex Teams API.

        Include all details for the person. This action expects all user
        details to be present in the request. A common approach is to first GET
        the person's details, make changes, then PUT both the changed and
        unchanged values.

        Args:
            personId(basestring): The person ID.
            emails(`list`): Email address(es) of the person (list of strings).
            displayName(basestring): Full name of the person.
            firstName(basestring): First name of the person.
            lastName(basestring): Last name of the person.
            avatar(basestring): URL to the person's avatar in PNG format.
            orgId(basestring): ID of the organization to which this
                person belongs.
            roles(`list`): Roles of the person (list of strings containing
                the role IDs to be assigned to the person).
            licenses(`list`): Licenses allocated to the person (list of
                strings - containing the license IDs to be allocated to the
                person).
            **request_parameters: Additional request parameters (provides
                support for parameters that may be added in the future).

        Returns:
            Person: A Person object with the Funcd details.

        Raises:
            TypeError: If the parameter types are incorrect.
            ApiError: If the Webex Teams cloud returns an error.

        """
        check_type(arg_2, list)
        check_type(arg_3, basestring)
        check_type(arg_4, basestring)
        check_type(arg_5, basestring)
        check_type(arg_6, basestring)
        check_type(arg_7, basestring)
        check_type(arg_8, list)
        check_type(arg_9, list)

        arg_11 = dict_from_items_with_values(
            arg_10,
            arg_2=arg_2,
            arg_3=arg_3,
            arg_4=arg_4,
            arg_5=arg_5,
            arg_6=arg_6,
            arg_7=arg_7,
            arg_8=arg_8,
            arg_9=arg_9,
        )

        # API request
        arg_12 = arg_0._session.put(API_ENDPOINT + '/' + arg_1,
                                      json=arg_11)

        # Return a person object created from the returned JSON object
        return arg_0._object_factory(OBJECT_TYPE, arg_12)

Update details for a person, by ID.

        Only an admin can update a person's details.

        Email addresses for a person cannot be changed via the Webex Teams API.

        Include all details for the person. This action expects all user
        details to be present in the request. A common approach is to first GET
        the person's details, make changes, then PUT both the changed and
        unchanged values.

        Args:
            personId(basestring): The person ID.
            emails(`list`): Email address(es) of the person (list of strings).
            displayName(basestring): Full name of the person.
            firstName(basestring): First name of the person.
            lastName(basestring): Last name of the person.
            avatar(basestring): URL to the person's avatar in PNG format.
            orgId(basestring): ID of the organization to which this
                person belongs.
            roles(`list`): Roles of the person (list of strings containing
                the role IDs to be assigned to the person).
            licenses(`list`): Licenses allocated to the person (list of
                strings - containing the license IDs to be allocated to the
                person).
            **request_parameters: Additional request parameters (provides
                support for parameters that may be added in the future).

        Returns:
            Person: A Person object with the updated details.

        Raises:
            TypeError: If the parameter types are incorrect.
            ApiError: If the Webex Teams cloud returns an error.


def Func(arg_0, arg_1, arg_2=None, arg_3=1):
    '''Plot an array of images.

    We assume that we are given a matrix of data whose shape is (n*n, s*s*c) --
    that is, there are n^2 images along the first axis of the array, and each
    image is c squares measuring s pixels on a side. Each row of the input will
    be plotted as a sub-region within a single image array containing an n x n
    grid of images.
    '''
    arg_4 = int(np.sqrt(len(arg_0)))
    assert arg_4 * arg_4 == len(arg_0), 'images array must contain a square number of rows!'
    arg_5 = int(np.sqrt(len(arg_0[0]) / arg_3))
    assert arg_5 * arg_5 == len(arg_0[0]) / arg_3, 'images must be square!'

    arg_6 = np.zeros(((arg_5+1) * arg_4 - 1, (arg_5+1) * arg_4 - 1, arg_3), dtype=arg_0[0].dtype)
    for arg_7, arg_8 in enumerate(arg_0):
        arg_9, arg_10 = divmod(arg_7, arg_4)
        arg_6[arg_9 * (arg_5+1):(arg_9+1) * (arg_5+1) - 1,
            arg_10 * (arg_5+1):(arg_10+1) * (arg_5+1) - 1] = arg_8.reshape((arg_5, arg_5, arg_3))

    arg_6 -= arg_6.min()
    arg_6 /= arg_6.max()

    arg_11 = plt.gcf().add_subplot(arg_1)
    arg_11.xaxis.set_visible(False)
    arg_11.yaxis.set_visible(False)
    arg_11.set_frame_on(False)
    arg_11.imshow(arg_6.squeeze(), cmap=plt.cm.gray)
    if arg_2:
        arg_11.set_title(arg_2)


def Func ( arg_0 , arg_1 : arg_2 , arg_3 : arg_2 ) -> None : arg_4 = arg_1 . lower ( ) . encode ( "latin-1" ) arg_5 = arg_3 . encode ( "latin-1" ) arg_0 . _list . Func ( ( arg_4 , arg_5 ) )

def Func(arg_0, arg_1: arg_2, arg_3: arg_2) -> None:
        """
        Append a header, preserving any duplicate entries.
        """
        arg_4 = arg_1.lower().encode("latin-1")
        arg_5 = arg_3.encode("latin-1")
        arg_0._list.Func((arg_4, arg_5))

Append a header preserving any duplicate entries .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . stream . move ( ) assert arg_2 . kind == arg_1

def Func(arg_0, arg_1):
        """Consume one token and verify it is of the expected kind."""
        arg_2 = arg_0.stream.move()
        assert arg_2.kind == arg_1

Consume one token and verify it is of the expected kind .


return {
        field_key: request.POST[field_key]
        for field_key in request.POST
        if field_key in course_discovery_filter_fields()
    }

def Func ( arg_0 ) : return { arg_1 : arg_0 . POST [ arg_1 ] for arg_1 in arg_0 . POST if arg_1 in course_discovery_filter_fields ( ) }

def Func(arg_0):
    """ Create separate dictionary of supported filter values provided """
    return {
        arg_1: arg_0.POST[arg_1]
        for arg_1 in arg_0.POST
        if arg_1 in course_discovery_filter_fields()
    }


def Func ( arg_0 , arg_1 ) : if arg_1 not in arg_0 . ack_callbacks : return None return arg_0 . ack_callbacks . pop ( arg_1 )

def Func(arg_0, arg_1):
        """Fetch the callback for a given msgid, if it exists, otherwise,
        return None"""
        if arg_1 not in arg_0.ack_callbacks:
            return None
        return arg_0.ack_callbacks.pop(arg_1)

Fetch the callback for a given msgid if it exists otherwise return None


def Func(arg_0):
    """
    Worker that run the pep8 tool on the current editor text.

    :returns a list of tuples (msg, msg_type, line_number)
    """
    import arg_6
    from pyqode.python.backend.pep8utils import CustomChecker
    arg_1 = 1
    arg_2 = arg_0['code']
    arg_3 = arg_0['path']
    arg_4 = arg_0['max_line_length']
    arg_5 = arg_0['ignore_rules']
    arg_5 += ['W291', 'W292', 'W293', 'W391']
    arg_6.MAX_LINE_LENGTH = arg_4
    # setup our custom style guide with our custom checker which returns a list
    # of strings instread of spitting the results at stdout
    arg_8 = arg_6.StyleGuide(parse_argv=False, config_file='',
                                       checker_class=CustomChecker)
    try:
        arg_9 = arg_8.input_file(arg_3, lines=arg_2.splitlines(True))
    except Exception:
        _logger().exception('Failed to run PEP8 analysis with data=%r'
                            % arg_0)
        return []
    else:
        arg_10 = []
        for arg_11, arg_12, arg_2, arg_13, arg_14 in arg_9:
            if arg_2 in arg_5:
                continue
            arg_10.append(('[PEP8] %s: %s' % (arg_2, arg_13), arg_1,
                             arg_11 - 1))
        return arg_10

Worker that run the pep8 tool on the current editor text .


def
Func
(
arg_0
)
:
arg_1
=
False
arg_2
=
arg_0
.
next
(
)
if
len
(
arg_2
)
==
0
:
return
False
try
:
arg_0
.
request
(
arg_2
)
arg_1
=
True
except
Exception
as
e
:
arg_0
.
log
.
error
(
'error Funcing: %s'
,
e
)
arg_1
=
False
if
arg_0
.
on_error
:
arg_0
.
on_error
(
e
,
arg_2
)
finally
:
for
arg_3
in
arg_2
:
arg_0
.
queue
.
task_done
(
)
return
arg_1

def Func(arg_0):
        """Upload the next batch of items, return whether successful."""
        arg_1 = False
        arg_2 = arg_0.next()
        if len(arg_2) == 0:
            return False

        try:
            arg_0.request(arg_2)
            arg_1 = True
        except Exception as e:
            arg_0.log.error('error Funcing: %s', e)
            arg_1 = False
            if arg_0.on_error:
                arg_0.on_error(e, arg_2)
        finally:
            # cleanup
            for arg_3 in arg_2:
                arg_0.queue.task_done()

            return arg_1

Upload the next batch of items return whether successful .


def Func ( arg_0 ) : arg_0 . _connected = False arg_0 . buf = b'' if arg_0 . sock is not None : arg_0 . sock . Func ( )

def Func(arg_0):
        """
        Closes the socket
        Called internally when Exceptions are raised
        """

        arg_0._connected = False
        arg_0.buf = b''

        if arg_0.sock is not None:
            arg_0.sock.Func()


return _cputimes_ntuple(user, nice, system, idle)

def Func():
    """Return system CPU times as a namedtuple."""
    arg_0, arg_1, arg_2, arg_3 = _psutil_osx.Func()
    return _cputimes_ntuple(arg_0, arg_1, arg_2, arg_3)

Return system CPU times as a namedtuple .


return b''.join([
            self.csi(capname, *args),
            value,
            self.csi('sgr0'),
        ])

def Func ( arg_0 , arg_1 , arg_2 , * arg_3 ) : if isinstance ( arg_1 , str ) : arg_1 = arg_1 . encode ( 'utf-8' ) return b'' . join ( [ arg_0 . csi ( arg_2 , * arg_3 ) , arg_1 , arg_0 . csi ( 'sgr0' ) , ] )

def Func(arg_0, arg_1, arg_2, *arg_3):
        """Return a value wrapped in the selected CSI and does a reset."""
        if isinstance(arg_1, str):
            arg_1 = arg_1.encode('utf-8')
        return b''.join([
            arg_0.csi(arg_2, *arg_3),
            arg_1,
            arg_0.csi('sgr0'),
        ])

Return a value wrapped in the selected CSI and does a reset .


def Func ( ) : arg_0 = configuration . conf . get ( 'kerberos' , 'ccache' ) with open ( arg_0 , 'rb' ) as f : return b'X-CACHECONF:' in f . read ( )

def Func():
    """Return true if the ticket cache contains "conf" information as is found
    in ticket caches of Kerberos 1.8.1 or later. This is incompatible with the
    Sun Java Krb5LoginModule in Java6, so we need to take an action to work
    around it.
    """
    arg_0 = configuration.conf.get('kerberos', 'ccache')

    with open(arg_0, 'rb') as f:
        # Note: this file is binary, so we check against a bytearray.
        return b'X-CACHECONF:' in f.read()

Return true if the ticket cache contains conf information as is found in ticket caches of Kerberos 1 . 8 . 1 or later . This is incompatible with the Sun Java Krb5LoginModule in Java6 so we need to take an action to work around it .


return match.group(2) if match else None

def Func ( arg_0 ) : arg_1 = re . search ( r"users(/ME/contacts)?/[0-9]+:([^/]+)" , arg_0 ) return arg_1 . group ( 2 ) if arg_1 else None

def Func(arg_0):
        """
        Extract the username from a contact URL.

        Matches addresses containing ``users/<user>`` or ``users/ME/contacts/<user>``.

        Args:
            url (str): Skype API URL

        Returns:
            str: extracted identifier
        """
        arg_1 = re.search(r"users(/ME/contacts)?/[0-9]+:([^/]+)", arg_0)
        return arg_1.group(2) if arg_1 else None

Extract the username from a contact URL .


def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_3 = False arg_4 = { "result" : None } if arg_2 : arg_3 = True else : def arg_2 ( arg_5 ) : arg_4 [ "result" ] = arg_5 arg_0 . _Func_with_watch ( arg_1 , arg_2 , arg_3 ) return arg_4 [ "result" ]

def Func(arg_0, arg_1, arg_2=None):
    """ get physical plan """
    arg_3 = False

    # Temp dict used to return result
    # if callback is not provided.
    arg_4 = {
        "result": None
    }
    if arg_2:
      arg_3 = True
    else:
      def arg_2(arg_5):
        """
        Custom callback to get the topologies right now.
        """
        arg_4["result"] = arg_5

    arg_0._Func_with_watch(arg_1, arg_2, arg_3)

    # The topologies are now populated with the data.
    return arg_4["result"]


(infile, outfile, subsample_ratio, test)

def Func(arg_0, arg_1, arg_2, arg_3):
    """
    Subsample OpenSWATH file to minimum for integrated scoring
    """

    if arg_1 is None:
        arg_1 = arg_0
    else:
        arg_1 = arg_1

    Func_osw(arg_0, arg_1, arg_2, arg_3)


(
        self, do_not_print=False
    )

def
Func
(
arg_0
,
arg_1
=
False
)
:
if
(
not
PyFunceble
.
CONFIGURATION
[
"Func_printed"
]
or
arg_0
.
template
==
"Percentage"
or
arg_1
)
:
if
(
arg_0
.
template
.
lower
(
)
in
PyFunceble
.
STATUS
[
"list"
]
[
"generic"
]
or
arg_0
.
template
==
"Generic_File"
)
:
arg_2
=
arg_0
.
Funcs
[
"Generic"
]
if
(
arg_0
.
template
.
lower
(
)
in
PyFunceble
.
STATUS
[
"list"
]
[
"generic"
]
and
PyFunceble
.
HTTP_CODE
[
"active"
]
)
:
arg_2
=
Dict
(
arg_2
)
.
remove_key
(
"Analyze Date"
)
elif
arg_0
.
template
.
lower
(
)
in
PyFunceble
.
STATUS
[
"list"
]
[
"up"
]
:
arg_2
=
arg_0
.
Funcs
[
PyFunceble
.
STATUS
[
"official"
]
[
"up"
]
]
elif
arg_0
.
template
.
lower
(
)
in
PyFunceble
.
STATUS
[
"list"
]
[
"valid"
]
:
arg_2
=
arg_0
.
Funcs
[
PyFunceble
.
STATUS
[
"official"
]
[
"valid"
]
]
elif
arg_0
.
template
.
lower
(
)
in
PyFunceble
.
STATUS
[
"list"
]
[
"down"
]
:
arg_2
=
arg_0
.
Funcs
[
PyFunceble
.
STATUS
[
"official"
]
[
"down"
]
]
elif
arg_0
.
template
.
lower
(
)
in
PyFunceble
.
STATUS
[
"list"
]
[
"invalid"
]
:
arg_2
=
arg_0
.
Funcs
[
PyFunceble
.
STATUS
[
"official"
]
[
"invalid"
]
]
elif
(
arg_0
.
template
==
"Less"
or
arg_0
.
template
==
"Percentage"
or
arg_0
.
template
==
"HTTP"
)
:
arg_2
=
arg_0
.
Funcs
[
arg_0
.
template
]
if
arg_0
.
template
==
"Less"
and
not
PyFunceble
.
HTTP_CODE
[
"active"
]
:
arg_2
[
"Source"
]
=
10
if
not
PyFunceble
.
HTTP_CODE
[
"active"
]
:
arg_2
=
Dict
(
arg_2
)
.
remove_key
(
"HTTP Code"
)
arg_0
.
currently_used_Func
=
arg_2
if
not
arg_1
:
arg_0
.
_before_Func
(
)
for
arg_4
in
arg_0
.
_Func_constructor
(
arg_2
)
:
if
not
arg_0
.
only_on_file
:
print
(
arg_4
)
if
not
PyFunceble
.
CONFIGURATION
[
"no_files"
]
and
arg_0
.
output
:
File
(
arg_0
.
output
)
.
write
(
arg_4
+
"\n"
)

def Func(
        arg_0, arg_1=False
    ):  # pragma: no cover pylint: disable=too-many-branches
        """
        Management and creation of templates of Func.
        Please consider as "Func" the title of each columns.

        :param do_not_print:
            Tell us if we have to print the Func or not.
        :type do_not_print: bool
        """

        if (
            not PyFunceble.CONFIGURATION["Func_printed"]
            or arg_0.template == "Percentage"
            or arg_1
        ):
            # * The Func has not been already printed.
            # or
            # * The template is the `Percentage template`.
            # or
            # * We are authorized to print something.

            if (
                arg_0.template.lower() in PyFunceble.STATUS["list"]["generic"]
                or arg_0.template == "Generic_File"
            ):
                # * The template is into the list of generic status.
                # or
                # * The template is equal to `Generic_File`.

                # The data to print is the Generic Func.
                arg_2 = arg_0.Funcs["Generic"]

                if (
                    arg_0.template.lower() in PyFunceble.STATUS["list"]["generic"]
                    and PyFunceble.HTTP_CODE["active"]
                ):
                    # * The template is in the list of generic status.
                    # and
                    # * the http status code extraction is activated.

                    # We remove the Analyze Date colomn from the data to print.
                    arg_2 = Dict(arg_2).remove_key("Analyze Date")
            elif arg_0.template.lower() in PyFunceble.STATUS["list"]["up"]:
                # The template is in the list of up status.

                # We informations to print is the up Func.
                arg_2 = arg_0.Funcs[PyFunceble.STATUS["official"]["up"]]
            elif arg_0.template.lower() in PyFunceble.STATUS["list"]["valid"]:
                # The template is in the list of valid status.

                # We informations to print is the valid Func.
                arg_2 = arg_0.Funcs[PyFunceble.STATUS["official"]["valid"]]
            elif arg_0.template.lower() in PyFunceble.STATUS["list"]["down"]:
                # The template is in the list of down status.

                # We informations to print is the down Func.
                arg_2 = arg_0.Funcs[PyFunceble.STATUS["official"]["down"]]
            elif arg_0.template.lower() in PyFunceble.STATUS["list"]["invalid"]:
                # The template is in the list of invalid status.

                # We informations to print is the invalid Func.
                arg_2 = arg_0.Funcs[PyFunceble.STATUS["official"]["invalid"]]
            elif (
                arg_0.template == "Less"
                or arg_0.template == "Percentage"
                or arg_0.template == "HTTP"
            ):  # pylint: disable=line-too-long
                # * The template is equal to `Less`.
                # or
                # * The template is equal to `Percentage`.
                # or
                # * The template is equal to `HTTP`.

                # We get the Func with the help of the template name.
                arg_2 = arg_0.Funcs[arg_0.template]

                if arg_0.template == "Less" and not PyFunceble.HTTP_CODE["active"]:
                    # * The template is equal to `Less`.
                    # and
                    # * The http status code extraction is deactivated.

                    # We append the source index to the Func.
                    arg_2["Source"] = 10

            if not PyFunceble.HTTP_CODE["active"]:
                # * The http status code extraction is deactivated.

                # We remove the HTTP Code index from the data to print.
                arg_2 = Dict(arg_2).remove_key("HTTP Code")

            # We update the currently used Func.
            arg_0.currently_used_Func = arg_2

            if not arg_1:
                # We are not authorized to print anything.

                # We generate the before Func.
                arg_0._before_Func()

                for arg_4 in arg_0._Func_constructor(arg_2):
                    # We loop through the formatted template.

                    if not arg_0.only_on_file:
                        # We do not have to print only on file.

                        # We print on screen the formatted Func template.
                        print(arg_4)

                    if not PyFunceble.CONFIGURATION["no_files"] and arg_0.output:
                        # An output destination is given.

                        # We write the file with the formatted Func template.
                        File(arg_0.output).write(arg_4 + "\n")

Management and creation of templates of header.
        Please consider as "header" the title of each columns.

        :param do_not_print:
            Tell us if we have to print the header or not.
        :type do_not_print: bool

Management and creation of templates of header . Please consider as header the title of each columns .


def Func ( arg_0 , arg_1 ) : if not arg_0 . _campfire . get_user ( ) . admin : return False arg_2 = arg_0 . _connection . put ( "room/%s" % arg_0 . id , { "room" : { "name" : arg_1 } } ) if arg_2 [ "success" ] : arg_0 . _load ( ) return arg_2 [ "success" ]

def Func(arg_0, arg_1):
        """ Set the room name.

        Args:
            name (str): Name

        Returns:
            bool. Success
        """
        if not arg_0._campfire.get_user().admin:
            return False

        arg_2 = arg_0._connection.put("room/%s" % arg_0.id, {"room": {"name": arg_1}})
        if arg_2["success"]:
            arg_0._load()
        return arg_2["success"]


def Func(arg_0):
        """Read the value of this descriptor."""
        pass
        # Kick off a query to read the value of the descriptor, then wait
        # for the result to return asyncronously.
        arg_0._value_read.clear()
        arg_0._device._peripheral.readValueForDescriptor(arg_0._descriptor)
        if not arg_0._value_read.wait(timeout_sec):
            raise RuntimeError('Exceeded timeout waiting to read characteristic value!')
        return arg_0._value


return _MinidomXmlToObject.convert_response_to_feeds(
            response,
            partial(
                _MinidomXmlToObject.convert_xml_to_azure_object,
                azure_type=TopicDescription
            )
        )

def Func(arg_0, arg_1):
        '''
        Retrieves the topics in the service namespace.

        name:
            Name of the service bus namespace.
        '''
        arg_2 = arg_0._perform_get(
            arg_0._get_Func_path(arg_1),
            None)

        return _MinidomXmlToObject.convert_response_to_feeds(
            arg_2,
            partial(
                _MinidomXmlToObject.convert_xml_to_azure_object,
                azure_type=TopicDescription
            )
        )

Retrieves the topics in the service namespace .


def
Func
(
arg_0
,
arg_1
,
arg_2
=
)
:
arg_3
=
arg_1
.
shape
[
0
]
if
arg_1
.
shape
!=
(
arg_3
,
arg_3
)
:
raise
TypeError
(
"Input must be a square matrix."
)
arg_0
.
train_
=
arg_1
arg_5
=
get_memory
(
arg_0
.
memory
)
arg_6
,
=
arg_5
.
cache
(
scipy
.
linalg
.
eigvalsh
)
(
arg_1
,
eigvals
=
(
0
,
0
)
)
arg_0
.
shift_
=
max
(
arg_0
.
min_eig
arg_6
,
0
)
return
arg_0

def Func(arg_0, arg_1, arg_2=None):
        '''
        Learn the transformation to shifted eigenvalues. Only depends
        on the input dimension.

        Parameters
        ----------
        X : array, shape [n, n]
            The *symmetric* input similarities.
        '''
        arg_3 = arg_1.shape[0]
        if arg_1.shape != (arg_3, arg_3):
            raise TypeError("Input must be a square matrix.")

        arg_0.train_ = arg_1

        arg_5 = get_memory(arg_0.memory)
        arg_6, = arg_5.cache(scipy.linalg.eigvalsh)(arg_1, eigvals=(0, 0))
        arg_0.shift_ = max(arg_0.min_eig - arg_6, 0)

        return arg_0

Learn the transformation to shifted eigenvalues . Only depends on the input dimension .


def
Func
(
arg_0
,
arg_1
=
False
)
:
arg_2
=
config
.
load
(
)
arg_3
=
'md'
if
arg_1
else
'html'
arg_4
=
arg_2
.
rootjoin
(
"build/project.{}"
.
format
(
arg_3
)
)
notify
.
banner
(
"Creating {} file for Jenkins..."
.
format
(
arg_4
)
)
arg_5
=
arg_2
.
project
.
long_Func
arg_5
=
arg_5
.
replace
(
'\n\n'
,
'
\n
'
)
arg_5
=
re
.
sub
(
r'(\W)``([^`]+)``(\W)'
,
r'\1<tt>\2</tt>\3'
,
arg_5
)
arg_6
=
DESCRIPTION_TEMPLATES
[
arg_3
]
.
format
(
keywords
=
', '
.
join
(
arg_2
.
project
.
keywords
)
,
classifiers
=
'\n'
.
join
(
arg_2
.
project
.
classifiers
)
,
classifiers_indented
=
'    '
+
'\n    '
.
join
(
arg_2
.
project
.
classifiers
)
,
packages
=
', '
.
join
(
arg_2
.
project
.
packages
)
,
long_Func_html
=
'
{}
'
.
format
(
arg_5
)
,
**
arg_2
)
with
io
.
open
(
arg_4
,
'w'
,
encoding
=
'utf-8'
)
as
handle
:
handle
.
write
(
arg_6
)

def Func(arg_0, arg_1=False):
    """Dump project metadata for Jenkins Description Setter Plugin."""
    arg_2 = config.load()
    arg_3 = 'md' if arg_1 else 'html'
    arg_4 = arg_2.rootjoin("build/project.{}".format(arg_3))
    notify.banner("Creating {} file for Jenkins...".format(arg_4))

    arg_5 = arg_2.project.long_Func
    arg_5 = arg_5.replace('\n\n', '
\n
')
    arg_5 = re.sub(r'(\W)``([^`]+)``(\W)', r'\1<tt>\2</tt>\3', arg_5)

    arg_6 = DESCRIPTION_TEMPLATES[arg_3].format(
        keywords=', '.join(arg_2.project.keywords),
        classifiers='\n'.join(arg_2.project.classifiers),
        classifiers_indented='    ' + '\n    '.join(arg_2.project.classifiers),
        packages=', '.join(arg_2.project.packages),
        long_Func_html='
{}
'.format(arg_5),
        ##data='\n'.join(["%s=%r" % i for i in cfg.project.iteritems()]),
        **arg_2)
    with io.open(arg_4, 'w', encoding='utf-8') as handle:
        handle.write(arg_6)

Dump project metadata for Jenkins Description Setter Plugin .


def Func ( arg_0 ) : arg_1 = False arg_2 = '' arg_3 = arg_0 if arg_0 . startswith ( '~' ) : arg_1 = True arg_4 = len ( arg_0 ) - 1 arg_3 = os . path . expanduser ( arg_0 ) if arg_4 : arg_2 = arg_3 [ : - arg_4 ] else : arg_2 = arg_3 return arg_3 , arg_1 , arg_2

def Func(arg_0):
    """Expand '~'-style usernames in strings.

    This is similar to :func:`os.path.expanduser`, but it computes and returns
    extra information that will be useful if the input was being used in
    computing completions, and you wish to return the completions with the
    original '~' instead of its expanded value.

    Parameters
    ----------
    path : str
      String to be expanded.  If no ~ is present, the output is the same as the
      input.

    Returns
    -------
    newpath : str
      Result of ~ expansion in the input path.
    tilde_expand : bool
      Whether any expansion was performed or not.
    tilde_val : str
      The value that ~ was replaced with.
    """
    # Default values
    arg_1 = False
    arg_2 = ''
    arg_3 = arg_0

    if arg_0.startswith('~'):
        arg_1 = True
        arg_4 = len(arg_0)-1
        arg_3 = os.path.expanduser(arg_0)
        if arg_4:
            arg_2 = arg_3[:-arg_4]
        else:
            arg_2 = arg_3

    return arg_3, arg_1, arg_2


def Func ( arg_0 , arg_1 = [ ] ) : arg_1 = set ( arg_1 ) for arg_2 in arg_0 . list_devices ( ) : if not arg_2 . is_connected : continue arg_3 = set ( map ( lambda x : x . uuid , arg_2 . list_services ( ) ) ) if arg_3 >= arg_1 : arg_2 . disconnect ( )

def Func(arg_0, arg_1=[]):
        """Disconnect any connected devices that have the specified list of
        service UUIDs.  The default is an empty list which means all devices
        are disconnected.
        """
        arg_1 = set(arg_1)
        for arg_2 in arg_0.list_devices():
            # Skip devices that aren't connected.
            if not arg_2.is_connected:
                continue
            arg_3 = set(map(lambda x: x.uuid, arg_2.list_services()))
            if arg_3 >= arg_1:
                # Found a device that has at least the requested services, now
                # disconnect from it.
                arg_2.disconnect()

Disconnect any connected devices that have the specified list of service UUIDs . The default is an empty list which means all devices are disconnected .


def Func ( arg_0 , arg_1 , arg_2 = True ) : arg_3 = { } arg_4 = reduce ( lambda x , y : x + y , split ( '\(.+\)' , arg_1 ) ) if arg_2 : arg_5 = split ( '\W+' , arg_4 ) [ 3 : ] else : arg_5 = split ( '\W+' , arg_4 ) [ 2 : ] arg_3 = dict ( zip ( arg_5 [ 0 : : 2 ] , arg_5 [ 1 : : 2 ] ) ) return arg_3

def Func(arg_0, arg_1, arg_2=True):
        """Return a dict of components in the line.

        key: device name (ex: 'sdc1')
        value: device role number
        """
        arg_3 = {}

        # Ignore (F) (see test 08)
        arg_4 = reduce(lambda x, y: x + y, split('\(.+\)', arg_1))
        if arg_2:
            arg_5 = split('\W+', arg_4)[3:]
        else:
            arg_5 = split('\W+', arg_4)[2:]
        arg_3 = dict(zip(arg_5[0::2], arg_5[1::2]))

        return arg_3

Return a dict of components in the line .


return self.convolve_jit(image_array, self.image_frame_indexes, self.image_frame_psfs, self.image_frame_lengths,
                                 blurring_array, self.blurring_frame_indexes, self.blurring_frame_psfs,
                                 self.blurring_frame_lengths)

def Func(arg_0, arg_1, arg_2):
        """For a given 1D regular array and blurring array, convolve the two using this convolver.

        Parameters
        -----------
        image_array : ndarray
            1D array of the regular values which are to be blurred with the convolver's PSF.
        blurring_array : ndarray
            1D array of the blurring regular values which blur into the regular-array after PSF convolution.
        """
        return arg_0.convolve_jit(arg_1, arg_0.image_frame_indexes, arg_0.image_frame_psfs, arg_0.image_frame_lengths,
                                 arg_2, arg_0.blurring_frame_indexes, arg_0.blurring_frame_psfs,
                                 arg_0.blurring_frame_lengths)

For a given 1D regular array and blurring array convolve the two using this convolver .


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

def Func ( arg_0 , arg_1 = None ) : arg_2 = _to_string_sequence ( arg_0 ) . lstrip ( '' if arg_1 is None else arg_1 ) if arg_1 != '' else arg_0 return column . ColumnStringArrow ( arg_2 . bytes , arg_2 . indices , arg_2 . length , arg_2 . offset , string_sequence = arg_2 )

def Func(arg_0, arg_1=None):
    """Remove leading characters from a string sample.

    :param str to_strip: The string to be removed
    :returns: an expression containing the modified string column.

    Example:

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

    >>> df.text.str.lstrip(to_strip='very ')
    Expression = Func(text, to_strip='very ')
    Length: 5 dtype: str (expression)
    ---------------------------------
    0  Something
    1     pretty
    2  is coming
    3        our
    4       way.
    """
    # in c++ we give empty string the same meaning as None
    arg_2 = _to_string_sequence(arg_0).lstrip('' if arg_1 is None else arg_1) if arg_1 != '' else arg_0
    return column.ColumnStringArrow(arg_2.bytes, arg_2.indices, arg_2.length, arg_2.offset, string_sequence=arg_2)

Remove leading characters from a string sample.

    :param str to_strip: The string to be removed
    :returns: an expression containing the modified string column.

    Example:

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

    >>> df.text.str.lstrip(to_strip='very ')
    Expression = str_lstrip(text, to_strip='very ')
    Length: 5 dtype: str (expression)
    ---------------------------------
    0  Something
    1     pretty
    2  is coming
    3        our
    4       way.

Remove leading characters from a string sample .


def
Func
(
arg_0
)
:
arg_1
=
arg_0
.
output_shape
if
arg_1
is
:
raise
util
.
ConfigurationError
(
'undefined output size for layer "{}"'
.
format
(
arg_0
.
name
)
)
return
arg_1
[
1
]

def Func(arg_0):
        '''Number of "neurons" in this layer's default output.'''
        arg_1 = arg_0.output_shape
        if arg_1 is None:
            raise util.ConfigurationError(
                'undefined output size for layer "{}"'.format(arg_0.name))
        return arg_1[-1]

Number of neurons in this layer s default output .


def
Func
(
arg_0
,
arg_1
)
:
LOG
.
info
(
"Func %s for tenant %s"
%
(
arg_1
,
arg_0
.
tenant_id
)
)
with
arg_0
.
session
.
begin
(
)
:
arg_2
=
db_api
.
network_find
(
arg_0
=
arg_0
,
limit
=
,
sorts
=
[
'id'
]
,
marker
=
,
page_reverse
=
False
,
arg_1
=
arg_1
,
scope
=
db_api
.
ONE
)
if
not
arg_2
:
raise
n_exc
.
NetworkNotFound
(
net_id
=
arg_1
)
if
not
arg_0
.
is_admin
:
if
STRATEGY
.
is_provider_network
(
arg_2
.
id
)
:
raise
n_exc
.
NotAuthorized
(
net_id
=
arg_1
)
if
arg_2
.
ports
:
raise
n_exc
.
NetworkInUse
(
net_id
=
arg_1
)
arg_3
=
registry
.
DRIVER_REGISTRY
.
get_driver
(
arg_2
[
"network_plugin"
]
)
arg_3
.
Func
(
arg_0
,
arg_1
)
for
arg_4
in
arg_2
[
"subnets"
]
:
subnets
.
_delete_subnet
(
arg_0
,
arg_4
)
db_api
.
network_delete
(
arg_0
,
arg_2
)

def Func(arg_0, arg_1):
    """Delete a network.

    : param context: neutron api request context
    : param id: UUID representing the network to delete.
    """
    LOG.info("Func %s for tenant %s" % (arg_1, arg_0.tenant_id))
    with arg_0.session.begin():
        arg_2 = db_api.network_find(arg_0=arg_0, limit=None, sorts=['id'],
                                  marker=None, page_reverse=False, arg_1=arg_1,
                                  scope=db_api.ONE)
        if not arg_2:
            raise n_exc.NetworkNotFound(net_id=arg_1)
        if not arg_0.is_admin:
            if STRATEGY.is_provider_network(arg_2.id):
                raise n_exc.NotAuthorized(net_id=arg_1)
        if arg_2.ports:
            raise n_exc.NetworkInUse(net_id=arg_1)
        arg_3 = registry.DRIVER_REGISTRY.get_driver(arg_2["network_plugin"])
        arg_3.Func(arg_0, arg_1)
        for arg_4 in arg_2["subnets"]:
            subnets._delete_subnet(arg_0, arg_4)
        db_api.network_delete(arg_0, arg_2)


def
Func
(
arg_0
,
arg_1
)
:
arg_0
.
log
.
info
(
"Executing: %s"
,
arg_1
)
arg_2
=
Func
(
arg_1
,
shell
=
True
,
poll_period
=
0.1
,
catch_out
=
arg_0
.
catch_out
)
[
0
]
if
arg_2
:
raise
RuntimeError
(
"Subprocess returned %s"
%
arg_2
)
return
arg_2

def Func(arg_0, arg_1):
        """
        Execute and check exit code
        """
        arg_0.log.info("Executing: %s", arg_1)
        arg_2 = Func(
            arg_1, shell=True, poll_period=0.1, catch_out=arg_0.catch_out)[0]
        if arg_2:
            raise RuntimeError("Subprocess returned %s" % arg_2)
        return arg_2


def Func(arg_0):
        """Map byte offsets to line numbers in `code`.

        Uses co_lnotab described in Python/compile.c to map byte offsets to
        line numbers.  Produces a sequence: (b0, l0), (b1, l1), ...

        Only byte offsets that correspond to line numbers are included in the
        results.

        """
        # Adapted from dis.py in the standard library.
        arg_1 = bytes_to_ints(arg_0.code.co_lnotab[0::2])
        arg_2 = bytes_to_ints(arg_0.code.co_lnotab[1::2])

        arg_3 = None
        arg_4 = arg_0.code.co_firstlineno
        arg_5 = 0
        for arg_6, arg_7 in zip(arg_1, arg_2):
            if arg_6:
                if arg_4 != arg_3:
                    yield (arg_5, arg_4)
                    arg_3 = arg_4
                arg_5 += arg_6
            arg_4 += arg_7
        if arg_4 != arg_3:
            yield (arg_5, arg_4)

Map byte offsets to line numbers in code .


def Func ( arg_0 : arg_1 , arg_2 : arg_1 ) -> Control : return Control . CreateControlFromElement ( _AutomationClient . instance ( ) . IUIAutomation . ElementFromHandle ( WindowFromPoint ( arg_0 , arg_2 ) ) )

def Func(arg_0: arg_1, arg_2: arg_1) -> Control:
    """
    Get a native handle from point x,y and call IUIAutomation.ElementFromHandle.
    Return `Control` subclass.
    """
    return Control.CreateControlFromElement(_AutomationClient.instance().IUIAutomation.ElementFromHandle(WindowFromPoint(arg_0, arg_2)))

Get a native handle from point x y and call IUIAutomation . ElementFromHandle . Return Control subclass .


(characters, actions, directions, channels=3,
                           length=8, shuffle=False, fake_data=False)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = 3 , arg_4 = 8 , arg_5 = False , arg_6 = False ) : if arg_6 : arg_7 = tf . random . normal ( [ HEIGHT , WIDTH , CHANNELS ] ) else : arg_8 = download_sprites ( ) arg_9 = [ action . name for action in arg_1 ] arg_10 = [ ( action . start_row , action . frames ) for action in arg_1 ] arg_11 = [ direction . row_offset for direction in arg_2 ] arg_12 = tf . data . Dataset . from_tensor_slices ( arg_0 ) arg_13 = tf . data . Dataset . from_tensor_slices ( arg_9 ) . repeat ( ) arg_14 = tf . data . Dataset . from_tensor_slices ( arg_10 ) . repeat ( ) arg_15 = tf . data . Dataset . from_tensor_slices ( arg_11 ) . repeat ( ) if arg_5 : arg_12 = arg_12 . shuffle ( len ( arg_0 ) ) arg_16 = tf . data . Dataset . zip ( ( arg_12 , arg_13 , arg_14 , arg_15 ) ) arg_17 = tf . contrib . lookup . index_table_from_tensor ( sorted ( SKIN_COLORS ) ) arg_18 = tf . contrib . lookup . index_table_from_tensor ( sorted ( HAIRSTYLES ) ) arg_19 = tf . contrib . lookup . index_table_from_tensor ( sorted ( TOPS ) ) arg_20 = tf . contrib . lookup . index_table_from_tensor ( sorted ( PANTS ) ) arg_21 = tf . contrib . lookup . index_table_from_tensor ( sorted ( arg_9 ) ) def process_example ( arg_22 , arg_23 , arg_24 , arg_25 ) : arg_26 = arg_22 [ 0 ] arg_27 = arg_22 [ 1 ] arg_28 = arg_22 [ 2 ] arg_29 = arg_22 [ 3 ] if arg_6 : arg_30 = arg_7 else : arg_31 = read_image ( arg_8 + os . sep + arg_26 ) arg_32 = read_image ( arg_8 + os . sep + arg_27 ) arg_33 = read_image ( arg_8 + os . sep + arg_28 ) arg_34 = read_image ( arg_8 + os . sep + arg_29 ) arg_30 = create_character ( arg_31 , arg_32 , arg_33 , arg_34 ) if arg_5 : arg_35 = create_random_seq ( arg_30 , arg_24 , arg_25 , arg_4 ) else : arg_35 = create_seq ( arg_30 , arg_24 , arg_25 , arg_4 ) arg_35 = arg_35 [ ... , : arg_3 ] arg_36 = arg_17 . lookup ( arg_26 ) arg_37 = arg_18 . lookup ( arg_27 ) arg_38 = arg_19 . lookup ( arg_28 ) arg_39 = arg_20 . lookup ( arg_29 ) arg_40 = arg_21 . lookup ( arg_23 ) return ( arg_35 , arg_36 , arg_37 , arg_38 , arg_39 , arg_40 , arg_26 , arg_27 , arg_28 , arg_29 , arg_23 ) arg_16 = arg_16 . map ( process_example ) return arg_16

def Func(arg_0, arg_1, arg_2, arg_3=3,
                           arg_4=8, arg_5=False, arg_6=False):
  """Creates a tf.data pipeline for the sprites dataset.

  Args:
    characters: A list of (skin, hair, top, pants) tuples containing
      relative paths to the sprite png image for each attribute.
    actions: A list of Actions.
    directions: A list of Directions.
    channels: Number of image channels to yield.
    length: Desired length of the sequences.
    shuffle: Whether or not to shuffle the characters and sequences
      start frame.
    fake_data: Boolean for whether or not to yield synthetic data.

  Returns:
    A tf.data.Dataset yielding (seq, skin label index, hair label index,
    top label index, pants label index, action label index, skin label
    name, hair label_name, top label name, pants label name, action
    label name) tuples.
  """
  if arg_6:
    arg_7 = tf.random.normal([HEIGHT, WIDTH, CHANNELS])
  else:
    arg_8 = download_sprites()

  arg_9 = [action.name for action in arg_1]
  arg_10 = [(action.start_row, action.frames) for action in arg_1]

  arg_11 = [direction.row_offset for direction in arg_2]

  arg_12 = tf.data.Dataset.from_tensor_slices(arg_0)
  arg_13 = tf.data.Dataset.from_tensor_slices(arg_9).repeat()
  arg_14 = tf.data.Dataset.from_tensor_slices(arg_10).repeat()
  arg_15 = tf.data.Dataset.from_tensor_slices(arg_11).repeat()

  if arg_5:
    arg_12 = arg_12.shuffle(len(arg_0))

  arg_16 = tf.data.Dataset.zip((arg_12, arg_13, arg_14, arg_15))

  arg_17 = tf.contrib.lookup.index_table_from_tensor(sorted(SKIN_COLORS))
  arg_18 = tf.contrib.lookup.index_table_from_tensor(sorted(HAIRSTYLES))
  arg_19 = tf.contrib.lookup.index_table_from_tensor(sorted(TOPS))
  arg_20 = tf.contrib.lookup.index_table_from_tensor(sorted(PANTS))
  arg_21 = tf.contrib.lookup.index_table_from_tensor(sorted(arg_9))

  def process_example(arg_22, arg_23, arg_24, arg_25):
    """Processes a dataset row."""
    arg_26 = arg_22[0]
    arg_27 = arg_22[1]
    arg_28 = arg_22[2]
    arg_29 = arg_22[3]

    if arg_6:
      arg_30 = arg_7
    else:
      arg_31 = read_image(arg_8 + os.sep + arg_26)
      arg_32 = read_image(arg_8 + os.sep + arg_27)
      arg_33 = read_image(arg_8 + os.sep + arg_28)
      arg_34 = read_image(arg_8 + os.sep + arg_29)
      arg_30 = create_character(arg_31, arg_32, arg_33, arg_34)

    if arg_5:
      arg_35 = create_random_seq(arg_30, arg_24, arg_25, arg_4)
    else:
      arg_35 = create_seq(arg_30, arg_24, arg_25, arg_4)
    arg_35 = arg_35[..., :arg_3]  # limit output channels

    arg_36 = arg_17.lookup(arg_26)
    arg_37 = arg_18.lookup(arg_27)
    arg_38 = arg_19.lookup(arg_28)
    arg_39 = arg_20.lookup(arg_29)
    arg_40 = arg_21.lookup(arg_23)

    return (arg_35, arg_36, arg_37, arg_38, arg_39, arg_40,
            arg_26, arg_27, arg_28, arg_29, arg_23)

  arg_16 = arg_16.map(process_example)
  return arg_16

Creates a tf . data pipeline for the sprites dataset .


return noise_map + sum(scaled_noise_maps)

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = list ( map ( lambda hyper_galaxy , contribution_map : hyper_galaxy . hyper_noise_from_contributions ( arg_2 = arg_2 , contributions = contribution_map ) , arg_1 , arg_0 ) ) return arg_2 + sum ( arg_3 )

def Func(arg_0, arg_1, arg_2):
    """For a contribution map and noise-map, use the model hyper galaxies to compute a scaled noise-map.

    Parameters
    -----------
    contribution_maps : ndarray
        The image's list of 1D masked contribution maps (e.g. one for each hyper galaxy)
    hyper_galaxies : [galaxy.Galaxy]
        The hyper galaxies which represent the model components used to scale the noise_map, which correspond to
        individual galaxies in the image.
    noise_map : ccd.NoiseMap or ndarray
        An array describing the RMS standard deviation error in each pixel, preferably in units of electrons per
        second.
    """
    arg_3 = list(map(lambda hyper_galaxy, contribution_map:
                                 hyper_galaxy.hyper_noise_from_contributions(arg_2=arg_2,
                                                                             contributions=contribution_map),
                                 arg_1, arg_0))
    return arg_2 + sum(arg_3)

For a contribution map and noise - map use the model hyper galaxies to compute a scaled noise - map .


def
Func
(
arg_0
,
arg_1
=
True
)
:
if
arg_1
:
arg_0
=
'ERROR: {0}. Exit...'
.
format
(
arg_0
.
rstrip
(
'.'
)
)
arg_2
=
(
_color_wrap
(
colorama
.
Fore
.
RED
)
if
colorama
else
lambda
arg_0
:
arg_0
)
return
print
(
arg_2
(
arg_0
)
,
file
=
sys
.
stderr
)

def Func(arg_0, arg_1=True):
    """Print error message to stderr, using ANSI-colors.

    :param message: Message to print
    :param wrap:
        Wrap message into ``ERROR: <message>. Exit...`` template. By default:
        True
    """
    if arg_1:
        arg_0 = 'ERROR: {0}. Exit...'.format(arg_0.rstrip('.'))

    arg_2 = (_color_wrap(colorama.Fore.RED)
                 if colorama
                 else lambda arg_0: arg_0)
    return print(arg_2(arg_0), file=sys.stderr)

Print error message to stderr using ANSI - colors .


def Func ( arg_0 , arg_1 , arg_2 = 'open' ) : if isinstance ( arg_1 , int ) : arg_3 = arg_7 ( arg_1 ) elif isinstance ( arg_1 , basestring ) : arg_3 = arg_1 else : arg_3 = arg_1 . number arg_4 = arg_0 . _issue_data_key ( arg_2 ) arg_5 = arg_0 . data . get ( arg_4 , { } ) arg_6 = arg_5 . get ( arg_7 ( arg_3 ) , { } ) arg_5 [ arg_7 ( arg_3 ) ] = arg_6 return arg_6

def Func(arg_0, arg_1, arg_2='open'):
        """Returns issue data from local data.

        Args:
            issue:
                `int`. Github issue number.
            namespace:
                `str`. Namespace for storing this issue.
        """

        if isinstance(arg_1, int):
            arg_3 = arg_7(arg_1)
        elif isinstance(arg_1, basestring):
            arg_3 = arg_1
        else:
            arg_3 = arg_1.number

        arg_4 = arg_0._issue_data_key(arg_2)
        arg_5 = arg_0.data.get(arg_4,
            {})

        arg_6 = arg_5.get(arg_7(arg_3), {})
        arg_5[arg_7(arg_3)] = arg_6
        return arg_6


def Func ( arg_0 , arg_1 ) : arg_2 = signal . lFunc ( arg_0 . b , [ 1 ] , arg_1 ) return arg_2

def Func(arg_0,arg_1):
        """
        Filter the signal
        """
        arg_2 = signal.lFunc(arg_0.b,[1],arg_1)
        return arg_2


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = DataViewBuilder ( ) arg_3 . dataset_ids ( arg_2 ) for arg_4 , ( arg_5 , arg_6 ) in enumerate ( arg_1 [ 'descriptors' ] . items ( ) ) : try : arg_7 = arg_0 . __snake_case ( arg_6 [ 0 ] ) print ( json . dumps ( arg_7 ) ) arg_7 [ 'descriptor_key' ] = arg_5 arg_3 . add_raw_descriptor ( arg_7 ) except IndexError : pass for arg_4 , ( arg_5 , arg_6 ) in enumerate ( arg_1 [ 'types' ] . items ( ) ) : arg_3 . set_role ( arg_5 , arg_6 . lower ( ) ) return arg_3 . build ( )

def Func(arg_0, arg_1, arg_2):
        """
        Utility function to turn the result object from the configuration builder endpoint into something that
        can be used directly as a configuration.

        :param result_blob: Nested dicts representing the possible descriptors
        :param dataset_ids: Array of dataset identifiers to make search template from
        :return: An object suitable to be used as a parameter to data view create
        """

        arg_3 = DataViewBuilder()
        arg_3.dataset_ids(arg_2)
        for arg_4, (arg_5, arg_6) in enumerate(arg_1['descriptors'].items()):
            try:
                arg_7 = arg_0.__snake_case(arg_6[0])
                print(json.dumps(arg_7))
                arg_7['descriptor_key'] = arg_5
                arg_3.add_raw_descriptor(arg_7)
            except IndexError:
                pass

        for arg_4, (arg_5, arg_6) in enumerate(arg_1['types'].items()):
            arg_3.set_role(arg_5, arg_6.lower())

        return arg_3.build()

Utility function to turn the result object from the configuration builder endpoint into something that can be used directly as a configuration .


def Func ( arg_0 ) : def wrapper ( * arg_1 , ** arg_2 ) : arg_3 = cProfile . Profile ( ) arg_3 . enable ( ) arg_4 = arg_0 ( * arg_1 , ** arg_2 ) arg_3 . disable ( ) arg_5 = pstats . Stats ( arg_3 ) arg_5 . sort_stats ( 'tot' ) . print_stats ( 20 ) return arg_4 return wrapper

def Func(arg_0):
    '''
    Decorator that prints running time information at each call of the function
    '''
    def wrapper(*arg_1,**arg_2):
        arg_3=cProfile.Profile()
        arg_3.enable()
        arg_4 = arg_0(*arg_1,**arg_2)
        arg_3.disable()
        arg_5 = pstats.Stats(arg_3)
        arg_5.sort_stats('tot').print_stats(20)
        return arg_4
    return wrapper


(self, name, check_regex, find_first=False)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
=
False
)
:
arg_4
=
[
]
for
arg_5
in
arg_0
.
mail
.
walk
(
)
:
arg_6
=
MailPart
(
arg_5
)
if
arg_6
.
is_attachment
(
)
:
arg_7
=
arg_6
.
has_matching_name
(
arg_1
)
if
arg_2
else
arg_6
.
has_equal_name
(
arg_1
)
if
arg_7
:
arg_8
,
arg_9
=
arg_6
.
get_file
(
)
arg_0
.
log
.
info
(
'Found attachment: {}'
.
format
(
arg_8
)
)
arg_4
.
append
(
(
arg_8
,
arg_9
)
)
if
arg_3
:
break
return
arg_4

def Func(arg_0, arg_1, arg_2, arg_3=False):
        """
        Gets all attachments by name for the mail.

        :param name: The name of the attachment to look for.
        :type name: str
        :param check_regex: Checks the name for a regular expression.
        :type check_regex: bool
        :param find_first: If set to True it will only find the first match and then quit.
        :type find_first: bool
        :returns: a list of tuples each containing name and payload
                  where the attachments name matches the given name.
        :rtype: list of tuple
        """
        arg_4 = []

        for arg_5 in arg_0.mail.walk():
            arg_6 = MailPart(arg_5)
            if arg_6.is_attachment():
                arg_7 = arg_6.has_matching_name(arg_1) if arg_2 \
                    else arg_6.has_equal_name(arg_1)
                if arg_7:
                    arg_8, arg_9 = arg_6.get_file()
                    arg_0.log.info('Found attachment: {}'.format(arg_8))
                    arg_4.append((arg_8, arg_9))
                    if arg_3:
                        break

        return arg_4

Gets all attachments by name for the mail .


(self, bands, download_dir=None, metadata=False)

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = False ) : super ( AWSDownloader , arg_0 ) . validate_bands ( arg_1 ) if arg_2 is None : arg_2 = DOWNLOAD_DIR arg_4 = check_create_folder ( join ( arg_2 , arg_0 . sceneInfo . name ) ) arg_5 = [ ] for arg_6 in arg_1 : if arg_6 == 'BQA' : arg_7 = '%s_%s.%s' % ( arg_0 . sceneInfo . name , arg_6 , arg_0 . __remote_file_ext ) else : arg_7 = '%s_B%s.%s' % ( arg_0 . sceneInfo . name , arg_6 , arg_0 . __remote_file_ext ) arg_8 = join ( arg_0 . base_url , arg_7 ) arg_5 . append ( arg_0 . fetch ( arg_8 , arg_4 , arg_7 ) ) if arg_3 : arg_7 = '%s_MTL.txt' % ( arg_0 . sceneInfo . name ) arg_9 = join ( arg_0 . base_url , arg_7 ) arg_0 . fetch ( arg_9 , arg_4 , arg_7 ) return arg_5

def Func(arg_0, arg_1, arg_2=None, arg_3=False):
        """Download each specified band and metadata."""
        super(AWSDownloader, arg_0).validate_bands(arg_1)
        if arg_2 is None:
            arg_2 = DOWNLOAD_DIR

        arg_4 = check_create_folder(join(arg_2, arg_0.sceneInfo.name))
        arg_5 = []

        for arg_6 in arg_1:
            if arg_6 == 'BQA':
                arg_7 = '%s_%s.%s' % (arg_0.sceneInfo.name, arg_6, arg_0.__remote_file_ext)
            else:
                arg_7 = '%s_B%s.%s' % (arg_0.sceneInfo.name, arg_6, arg_0.__remote_file_ext)

            arg_8 = join(arg_0.base_url, arg_7)
            arg_5.append(arg_0.fetch(arg_8, arg_4, arg_7))

        if arg_3:
            arg_7 = '%s_MTL.txt' % (arg_0.sceneInfo.name)
            arg_9 = join(arg_0.base_url, arg_7)
            arg_0.fetch(arg_9, arg_4, arg_7)
        return arg_5

Download each specified band and metadata .


def Func(arg_0, arg_1: arg_2, arg_3: arg_2) -> None:
        """Update self._type_to_spans according to the removed span.

        Warning: If an operation involves both Func and
        _insert_update, you might wanna consider doing the
        _insert_update before the Func as this function
        can cause data loss in self._type_to_spans.
        """
        # Note: The following algorithm won't work correctly if spans
        # are not sorted.
        # Note: No span should be removed from _type_to_spans.
        for arg_4 in arg_0._type_to_spans.values():
            arg_5 = len(arg_4) - 1
            while arg_5 >= 0:
                arg_6, arg_7 = arg_9 = arg_4[arg_5]
                if arg_3 <= arg_6:
                    # rmstart <= rmstop <= s <= e
                    arg_8 = arg_3 - arg_1
                    arg_9[:] = arg_6 - arg_8, arg_7 - arg_8
                    arg_5 -= 1
                    continue
                break
            else:
                continue
            while True:
                if arg_1 <= arg_6:
                    if arg_3 < arg_7:
                        # rmstart < s <= rmstop < e
                        arg_9[:] = arg_1, arg_7 + arg_1 - arg_3
                        arg_5 -= 1
                        if arg_5 < 0:
                            break
                        arg_6, arg_7 = arg_9 = arg_4[arg_5]
                        continue
                    # rmstart <= s <= e < rmstop
                    arg_4.pop(arg_5)[:] = -1, -1
                    arg_5 -= 1
                    if arg_5 < 0:
                        break
                    arg_6, arg_7 = arg_9 = arg_4[arg_5]
                    continue
                break
            while arg_5 >= 0:
                if arg_7 <= arg_1:
                    # s <= e <= rmstart <= rmstop
                    arg_5 -= 1
                    if arg_5 < 0:
                        break
                    arg_6, arg_7 = arg_9 = arg_4[arg_5]
                    continue
                # s <= rmstart <= rmstop <= e
                arg_9[1] -= arg_3 - arg_1
                arg_5 -= 1
                if arg_5 < 0:
                    break
                arg_6, arg_7 = arg_9 = arg_4[arg_5]
                continue

Update self._type_to_spans according to the removed span.

        Warning: If an operation involves both _shrink_update and
        _insert_update, you might wanna consider doing the
        _insert_update before the _shrink_update as this function
        can cause data loss in self._type_to_spans.

Update self . _type_to_spans according to the removed span .


def Func(arg_0):
        """Check whether the archive is valid or not.

        This method will check if tables were created and if they
        contain valid data.
        """
        arg_1 = arg_0._count_table_rows(arg_0.ARCHIVE_TABLE)
        arg_2 = arg_0._count_table_rows(arg_0.METADATA_TABLE)

        if arg_2 > 1:
            arg_3 = "archive %s metadata corrupted; multiple metadata entries" % (arg_0.archive_path)
            raise ArchiveError(cause=arg_3)
        if arg_2 == 0 and arg_1 > 0:
            arg_3 = "archive %s metadata is empty but %s entries were achived" % (arg_0.archive_path)
            raise ArchiveError(cause=arg_3)

        logger.debug("Integrity of archive %s OK; entries: %s rows, metadata: %s rows",
                     arg_0.archive_path, arg_1, arg_2)

Check whether the archive is valid or not .


return request.user.is_authenticated and request.user.is_active and request.user.is_superuser

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

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


return [
            (tag.name, "selected taggit-tag" if tag.name in tags else "taggit-tag")
            for tag in self.model.objects.all()
        ]

def
Func
(
arg_0
,
arg_1
)
:
return
[
(
arg_2
.
name
,
"selected taggit-tag"
if
arg_2
.
name
in
arg_1
else
"taggit-tag"
)
for
arg_2
in
arg_0
.
model
.
objects
.
all
(
)
]

def Func(arg_0, arg_1):
        """
        Generates a list of tags identifying those previously selected.

        Returns a list of tuples of the form (<tag name>, <CSS class name>).

        Uses the string names rather than the tags themselves in order to work
        with tag lists built from forms not fully submitted.
        """
        return [
            (arg_2.name, "selected taggit-tag" if arg_2.name in arg_1 else "taggit-tag")
            for arg_2 in arg_0.model.objects.all()
        ]

Generates a list of tags identifying those previously selected .


def Func(arg_0, arg_1, arg_2=None):
        """Process ``make_ndx`` command and  return name and temp index file."""

        arg_0._command_counter += 1
        if arg_2 is None:
            arg_2 = "CMD{0:03d}".format(arg_0._command_counter)

        # Need to build it with two make_ndx calls because I cannot reliably
        # name the new group without knowing its number.
        try:
            arg_3, arg_4 = tempfile.mkstemp(suffix='.ndx', prefix='tmp_'+arg_2+'__')
            arg_5 = [arg_1, '', 'q']   # empty command '' necessary to get list
            # This sometimes fails with 'OSError: Broken Pipe' --- hard to debug
            arg_6,arg_7,arg_8 = arg_0.make_ndx(o=arg_4, input=arg_5)
            arg_0.check_output(arg_7, "No atoms found for selection {command!r}.".format(**vars()), arg_8=arg_8)
            # For debugging, look at out and err or set stdout=True, stderr=True
            # TODO: check '  0 r_300_&_ALA_&_O     :     1 atoms' has at least 1 atom
            ##print "DEBUG: Func()"
            ##print out
            arg_9 = parse_ndxlist(arg_7)
            arg_10 = arg_9[-1]
            # reduce and name this group
            arg_3, arg_11 = tempfile.mkstemp(suffix='.ndx', prefix=arg_2+'__')
            arg_12 = ["keep {0:d}".format(arg_10['nr']),
                        "name 0 {0!s}".format(arg_2), 'q']
            arg_6,arg_7,arg_8 = arg_0.make_ndx(n=arg_4, o=arg_11, input=arg_12)
        finally:
            utilities.unlink_gmx(arg_4)

        return arg_2, arg_11

Process make_ndx command and return name and temp index file .


def Func ( arg_0 : arg_1 . Map , arg_3 : arg_4 ) -> arg_1 . Map : return arg_0 . dissoc ( arg_3 )

def Func(arg_0: arg_1.Map, arg_3: arg_4) -> arg_1.Map:
        """Swap the methods atom to remove method with key."""
        return arg_0.dissoc(arg_3)

Swap the methods atom to remove method with key .


(store, institute_id, case_name, variant_id, submission_id)

return dict(
        today = str(date.today()),
        institute=institute_obj,
        case=case_obj,
        variant=variant_obj,
        pinned_vars=pinned,
        clinvars = clinvar_submission_objs
    )

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : arg_5 , arg_6 = institute_and_case ( arg_0 , arg_1 , arg_2 ) arg_7 = [ arg_0 . variant ( arg_3 ) or arg_3 for arg_3 in arg_6 . get ( 'suspects' , [ ] ) ] arg_8 = arg_0 . variant ( arg_3 ) arg_9 = arg_0 . clinvars ( arg_4 = arg_4 ) return dict ( today = str ( date . today ( ) ) , institute = arg_5 , case = arg_6 , variant = arg_8 , pinned_vars = arg_7 , clinvars = arg_9 )

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
    """Collects all variants from the clinvar submission collection with a specific submission_id

        Args:
            store(scout.adapter.MongoAdapter)
            institute_id(str): Institute ID
            case_name(str): case ID
            variant_id(str): variant._id
            submission_id(str): clinvar submission id, i.e. SUB76578

        Returns:
            A dictionary with all the data to display the clinvar_update.html template page
    """

    arg_5, arg_6 = institute_and_case(arg_0, arg_1, arg_2)
    arg_7 = [arg_0.variant(arg_3) or arg_3 for arg_3 in
                  arg_6.get('suspects', [])]
    arg_8 = arg_0.variant(arg_3)
    arg_9 = arg_0.clinvars(arg_4=arg_4)
    return dict(
        today = str(date.today()),
        institute=arg_5,
        case=arg_6,
        variant=arg_8,
        pinned_vars=arg_7,
        clinvars = arg_9
    )


def Func(arg_0):
    """Scan for available templates in effect_templates"""
    arg_1 = list_templates()

    if arg_0 not in arg_1:
        raise ArgumentTypeError("Effect template '{}' does not exist.\n Available templates: {} ".format(
            arg_0, ", ".join(arg_1)))

    return arg_0


return Endpoint(
            service_name=thrift_endpoint.service_name,
            ipv4=ipv4,
            ipv6=ipv6,
            port=port,
        )

def Func ( arg_0 , arg_1 ) : arg_2 = None arg_3 = None arg_4 = struct . unpack ( 'H' , struct . pack ( 'h' , arg_1 . port ) ) [ 0 ] if arg_1 . ipv4 != 0 : arg_2 = socket . inet_ntop ( socket . AF_INET , struct . pack ( '!i' , arg_1 . ipv4 ) , ) if arg_1 . ipv6 : arg_3 = socket . inet_ntop ( socket . AF_INET6 , arg_1 . ipv6 ) return Endpoint ( service_name = arg_1 . service_name , arg_2 = arg_2 , arg_3 = arg_3 , arg_4 = arg_4 , )

def Func(arg_0, arg_1):
        """Accepts a thrift decoded endpoint and converts it to an Endpoint.

        :param thrift_endpoint: thrift encoded endpoint
        :type thrift_endpoint: thrift endpoint
        :returns: decoded endpoint
        :rtype: Encoding
        """
        arg_2 = None
        arg_3 = None
        arg_4 = struct.unpack('H', struct.pack('h', arg_1.port))[0]

        if arg_1.ipv4 != 0:
            arg_2 = socket.inet_ntop(
                socket.AF_INET,
                struct.pack('!i', arg_1.ipv4),
            )

        if arg_1.ipv6:
            arg_3 = socket.inet_ntop(socket.AF_INET6, arg_1.ipv6)

        return Endpoint(
            service_name=arg_1.service_name,
            arg_2=arg_2,
            arg_3=arg_3,
            arg_4=arg_4,
        )

Accepts a thrift decoded endpoint and converts it to an Endpoint .


def Func(arg_0, arg_1=None):
        '''
        Update this board's information. Returns a new board.
        '''
        arg_2 = arg_0.fetch_json(
            uri_path=arg_0.base_uri,
            http_method='PUT',
            arg_1=arg_1 or {}
        )

        return arg_0.create_board(arg_2)

Update this board s information . Returns a new board .


def Func(arg_0, arg_1=0):
        """get info about a session

        Parameters
        ----------

        session : int
            Session number to retrieve. The current session is 0, and negative
            numbers count back from current session, so -1 is previous session.

        Returns
        -------

        (session_id [int], start [datetime], end [datetime], num_cmds [int],
        remark [unicode])

        Sessions that are running or did not exit cleanly will have `end=None`
        and `num_cmds=None`.

        """

        if arg_1 <= 0:
            arg_1 += arg_0.session_number

        arg_2 = "SELECT * from sessions where session == ?"
        return arg_0.db.execute(arg_2, (arg_1,)).fetchone()


(self, hour=None, minute=None, second=None, microsecond=None,
                tzinfo=True)

return time.__new__(type(self),
                            hour, minute, second, microsecond, tzinfo)

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = None , arg_4 = None , arg_5 = True ) : if arg_1 is None : arg_1 = arg_0 . hour if arg_2 is None : arg_2 = arg_0 . minute if arg_3 is None : arg_3 = arg_0 . second if arg_4 is None : arg_4 = arg_0 . microsecond if arg_5 is True : arg_5 = arg_0 . tzinfo return time . __new__ ( type ( arg_0 ) , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 )

def Func(arg_0, arg_1=None, arg_2=None, arg_3=None, arg_4=None,
                arg_5=True):
        """Return a new time with new values for the specified fields."""
        if arg_1 is None:
            arg_1 = arg_0.hour
        if arg_2 is None:
            arg_2 = arg_0.minute
        if arg_3 is None:
            arg_3 = arg_0.second
        if arg_4 is None:
            arg_4 = arg_0.microsecond
        if arg_5 is True:
            arg_5 = arg_0.tzinfo
        return time.__new__(type(arg_0),
                            arg_1, arg_2, arg_3, arg_4, arg_5)

Return a new time with new values for the specified fields .


(self, chunk, serialize=False, format=None)

def Func(arg_0, arg_1, arg_2=False, arg_3=None):
        """Writes the given chunk to the output buffer.

        @param[in] chunk
            Either a byte array, a unicode string, or a generator. If `chunk`
            is a generator then calling `self.Func(<generator>)` is
            equivalent to:

            @code
                for x in <generator>:
                    self.Func(x)
                    self.flush()
            @endcode

        @param[in] serialize
            True to serialize the lines in a determined serializer.

        @param[in] format
            A specific format to serialize in; if provided, no detection is
            done. If not provided, the accept header (as well as the URL
            extension) is looked at to determine an appropriate serializer.
        """

        # Ensure we're not closed.
        arg_0.require_not_closed()

        if arg_1 is None:
            # There is nothing here.
            return

        if arg_2 or arg_3 is not None:
            # Forward to the serializer to serialize the chunk
            # before it gets written to the response.
            arg_0.serialize(arg_1, arg_3=arg_3)
            return  # `serialize` invokes Func(...)

        if type(arg_1) is six.binary_type:
            # Update the stream length.
            arg_0._length += len(arg_1)

            # If passed a byte string, we hope the user encoded it properly.
            arg_0._stream.Func(arg_1)

        elif isinstance(arg_1, six.string_types):
            arg_4 = arg_0.encoding
            if arg_4 is not None:
                # If passed a string, we can encode it for the user.
                arg_1 = arg_1.encode(arg_4)

            else:
                # Bail; we don't have an encoding.
                raise exceptions.InvalidOperation(
                    'Attempting to Func textual data without an encoding.')

            # Update the stream length.
            arg_0._length += len(arg_1)

            # Write the encoded data into the byte stream.
            arg_0._stream.Func(arg_1)

        elif isinstance(arg_1, collections.Iterable):
            # If passed some kind of iterator, attempt to recurse into
            # oblivion.
            for arg_5 in arg_1:
                arg_0.Func(arg_5)

        else:
            # Bail; we have no idea what to do with this.
            raise exceptions.InvalidOperation(
                'Attempting to Func something not recognized.')

Writes the given chunk to the output buffer.

        @param[in] chunk
            Either a byte array, a unicode string, or a generator. If `chunk`
            is a generator then calling `self.write(<generator>)` is
            equivalent to:

            @code
                for x in <generator>:
                    self.write(x)
                    self.flush()
            @endcode

        @param[in] serialize
            True to serialize the lines in a determined serializer.

        @param[in] format
            A specific format to serialize in; if provided, no detection is
            done. If not provided, the accept header (as well as the URL
            extension) is looked at to determine an appropriate serializer.

Writes the given chunk to the output buffer .


(*args, typename=None, python_path=None, datatype=None, **kwds)

return datatype(*args, **fields.component(kwds, field_types))

def Func ( * arg_0 , arg_1 = None , arg_2 = None , arg_3 = None , ** arg_4 ) : arg_3 = arg_3 or import_symbol ( arg_1 , arg_2 ) arg_5 = getattr ( arg_3 , 'FIELD_TYPES' , fields . FIELD_TYPES ) return arg_3 ( * arg_0 , ** fields . component ( arg_4 , arg_5 ) )

def Func(*arg_0, arg_1=None, arg_2=None, arg_3=None, **arg_4):
    """Make an object from a symbol."""
    arg_3 = arg_3 or import_symbol(arg_1, arg_2)
    arg_5 = getattr(arg_3, 'FIELD_TYPES', fields.FIELD_TYPES)
    return arg_3(*arg_0, **fields.component(arg_4, arg_5))


"""\      {mkdir_cmd}      {copy_logs_cmd}    """

def Func(arg_0, arg_1, arg_2):
    """Returns a command to delocalize logs.

    Args:
      logging_path: location of log files.
      user_project: name of the project to be billed for the request.

    Returns:
      eg. 'gs://bucket/path/myfile' or 'gs://bucket/script-foobar-12'
    """

    # Get the logging prefix (everything up to ".log")
    arg_3 = os.path.splitext(arg_1.uri)[0]

    # Set the provider-specific mkdir and file copy commands
    if arg_1.file_provider == job_model.P_LOCAL:
      arg_4 = 'mkdir -p "%s"\n' % os.path.dirname(arg_3)
      arg_5 = 'cp'
    elif arg_1.file_provider == job_model.P_GCS:
      arg_4 = ''
      if arg_2:
        arg_5 = 'gsutil -u {} -mq cp'.format(arg_2)
      else:
        arg_5 = 'gsutil -mq cp'
    else:
      assert False

    # Construct the copy command
    arg_6 = textwrap.dedent("""\
      local cp_cmd="{cp_cmd}"
      local prefix="{prefix}"
    """).format(
        arg_5=arg_5, prefix=arg_3)

    # Build up the command
    arg_7 = textwrap.dedent("""\
      {mkdir_cmd}
      {copy_logs_cmd}
    """).format(
        arg_4=arg_4, arg_6=arg_6)

    return arg_7


def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_0 . shell . reset ( False ) arg_4 = arg_0 . session . send ( arg_1 , 'clear_reply' , ident = arg_2 , arg_3 = arg_3 , content = dict ( status = 'ok' ) )

def Func(arg_0, arg_1, arg_2, arg_3):
        """Clear our namespace."""
        arg_0.shell.reset(False)
        arg_4 = arg_0.session.send(arg_1, 'clear_reply', ident=arg_2, arg_3=arg_3,
                content = dict(status='ok'))


def Func(arg_0):
        """Validate an initial statevector"""
        # If initial statevector isn't set we don't need to validate
        if arg_0._initial_statevector is None:
            return
        # Check statevector is correct length for number of qubits
        arg_1 = len(arg_0._initial_statevector)
        arg_2 = 2 ** arg_0._number_of_qubits
        if arg_1 != arg_2:
            raise BasicAerError('initial statevector is incorrect length: ' +
                                '{} != {}'.format(arg_1, arg_2))


def
Func
(
arg_0
)
:
assert
arg_0
.
pending
,
"Connection is not pending."
arg_0
.
server_protocol
=
arg_0
.
server
.
server_factory
.
buildProtocol
(
)
arg_0
.
_accept_d
.
callback
(
FakeServerProtocolWrapper
(
arg_0
,
arg_0
.
server_protocol
)
)
return
arg_0
.
await_connected
(
)

def Func(arg_0):
        """
        Accept a pending connection.
        """
        assert arg_0.pending, "Connection is not pending."
        arg_0.server_protocol = arg_0.server.server_factory.buildProtocol(None)
        arg_0._accept_d.callback(
            FakeServerProtocolWrapper(arg_0, arg_0.server_protocol))
        return arg_0.await_connected()


def
Func
(
arg_0
,
arg_1
=
False
,
arg_2
=
False
)
:
arg_3
=
len
(
[
conv_event
for
conv_event
in
arg_0
.
unread_events
if
isinstance
(
conv_event
,
hangups
.
ChatMessageEvent
)
and
not
arg_0
.
get_user
(
conv_event
.
user_id
)
.
is_self
]
)
if
arg_2
and
arg_3
>
0
:
arg_4
=
' ({})'
.
format
(
arg_3
)
else
:
arg_4
=
''
if
arg_0
.
name
is
not
:
return
arg_0
.
name
+
arg_4
else
:
arg_5
=
sorted
(
(
user
for
user
in
arg_0
.
users
if
not
user
.
is_self
)
,
key
=
lambda
user
:
user
.
id_
)
arg_6
=
[
user
.
first_name
for
user
in
arg_5
]
if
not
arg_5
:
return
"Empty Conversation"
+
arg_4
if
len
(
arg_5
)
==
1
:
return
arg_5
[
0
]
.
full_name
+
arg_4
elif
arg_1
and
len
(
arg_5
)
>
2
:
return
(
', '
.
join
(
arg_6
[
:
2
]
+
[
'+{}'
.
format
(
len
(
arg_6
)
2
)
]
)
+
arg_4
)
else
:
return
', '
.
join
(
arg_6
)
+
arg_4

def Func(arg_0, arg_1=False, arg_2=False):
    """Return a readable name for a conversation.

    If the conversation has a custom name, use the custom name. Otherwise, for
    one-to-one conversations, the name is the full name of the other user. For
    group conversations, the name is a comma-separated list of first names. If
    the group conversation is empty, the name is "Empty Conversation".

    If truncate is true, only show up to two names in a group conversation.

    If show_unread is True, if there are unread chat messages, show the number
    of unread chat messages in parentheses after the conversation name.
    """
    arg_3 = len([conv_event for conv_event in arg_0.unread_events if
                      isinstance(conv_event, hangups.ChatMessageEvent) and
                      not arg_0.get_user(conv_event.user_id).is_self])
    if arg_2 and arg_3 > 0:
        arg_4 = ' ({})'.format(arg_3)
    else:
        arg_4 = ''
    if arg_0.name is not None:
        return arg_0.name + arg_4
    else:
        arg_5 = sorted(
            (user for user in arg_0.users if not user.is_self),
            key=lambda user: user.id_
        )
        arg_6 = [user.first_name for user in arg_5]
        if not arg_5:
            return "Empty Conversation" + arg_4
        if len(arg_5) == 1:
            return arg_5[0].full_name + arg_4
        elif arg_1 and len(arg_5) > 2:
            return (', '.join(arg_6[:2] + ['+{}'.format(len(arg_6) - 2)]) +
                    arg_4)
        else:
            return ', '.join(arg_6) + arg_4

Return a readable name for a conversation .


def Func ( arg_0 , arg_1 , arg_2 = None ) : if arg_2 : arg_0 . pplan_watchers [ arg_1 ] . append ( arg_2 ) else : arg_3 = arg_0 . Func_path ( arg_1 ) with open ( arg_3 ) as f : arg_4 = f . read ( ) arg_5 = PhysicalPlan ( ) arg_5 . ParseFromString ( arg_4 ) return arg_5

def Func(arg_0, arg_1, arg_2=None):
    """
    Get physical plan of a topology
    """
    if arg_2:
      arg_0.pplan_watchers[arg_1].append(arg_2)
    else:
      arg_3 = arg_0.Func_path(arg_1)
      with open(arg_3) as f:
        arg_4 = f.read()
        arg_5 = PhysicalPlan()
        arg_5.ParseFromString(arg_4)
        return arg_5


(self, variant_obj, user_obj, institute_obj, case_obj, link, criteria)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6):
        """Submit an evaluation to the database

        Get all the relevant information, build a evaluation_obj

        Args:
            variant_obj(dict)
            user_obj(dict)
            institute_obj(dict)
            case_obj(dict)
            link(str): variant url
            criteria(list(dict)):

                [
            {
            'term': str,
            'comment': str,
            'links': list(str)
            },
            .
            .
        ]
        """
        arg_7 = arg_1['_id']
        arg_8 = arg_1['variant_id']
        arg_9 = arg_2['_id']
        arg_10 = arg_2.get('name', arg_2['_id'])
        arg_11 = arg_3['_id']
        arg_12 = arg_4['_id']

        arg_13 = [evluation_info['term'] for evluation_info in arg_6]

        arg_14 = get_acmg(arg_13)

        arg_15 = build_evaluation(
            arg_7=arg_7,
            arg_8=arg_8,
            arg_9=arg_9,
            arg_10=arg_10,
            arg_11=arg_11,
            arg_12=arg_12,
            arg_14=arg_14,
            arg_6=arg_6
        )

        arg_0._load_evaluation(arg_15)

        # Update the acmg classification for the variant:
        arg_0.update_acmg(arg_3, arg_4, arg_2, arg_5, arg_1, arg_14)
        return arg_14


def Func(arg_0, arg_1, arg_2):
        """Reads a non-nested PyTables table column by column and created a new ObjectTable for
        the loaded data.

        :param table_or_group:

            PyTables table to read from or a group containing subtables.

        :param full_name:

            Full name of the parameter or result whose data is to be loaded

        :return:

            Data to be loaded

        """
        try:
            arg_3 = None

            if arg_0._all_get_from_attrs(arg_1, HDF5StorageService.SPLIT_TABLE):
                arg_4 = arg_1._v_name

                arg_5 = arg_4 + '__' + HDF5StorageService.STORAGE_TYPE

                arg_6 = arg_1._v_children[arg_5]
                arg_7 = {}

                for arg_8 in arg_6:
                    arg_9 = arg_8['field_name'].decode('utf-8')
                    arg_7[arg_9] = arg_8['data_type'].decode('utf-8')

                for arg_10 in arg_1:
                    arg_11 = arg_10._v_name

                    if arg_11 == arg_5:
                        continue

                    for arg_12 in arg_10.colnames:
                        # Read Data column by column
                        arg_13 = arg_10.col(arg_12)
                        arg_14 = list(arg_13)

                        arg_15 = HDF5StorageService.FORMATTED_COLUMN_PREFIX % arg_12
                        for arg_16, arg_17 in enumerate(arg_14):
                            # Recall original type of data
                            arg_17, arg_18 = arg_0._all_recall_native_type(arg_17,
                                                                              PTItemMock(
                                                                                arg_7),
                                                                              arg_15)
                            if arg_18:
                                arg_14[arg_16] = arg_17
                            else:
                                break

                        # Construct or insert into an ObjectTable
                        if arg_3 is None:
                            arg_3 = ObjectTable(arg_17={arg_12: arg_14})
                        else:
                            arg_3[arg_12] = arg_14

            else:
                for arg_12 in arg_1.colnames:
                    # Read Data column by column
                    arg_13 = arg_1.col(arg_12)
                    arg_14 = list(arg_13)

                    arg_15 = HDF5StorageService.FORMATTED_COLUMN_PREFIX % arg_12
                    for arg_16, arg_17 in enumerate(arg_14):
                        # Recall original type of data
                        arg_17, arg_18 = arg_0._all_recall_native_type(arg_17, arg_1,
                                                                          arg_15)
                        if arg_18:
                            arg_14[arg_16] = arg_17
                        else:
                            break

                    # Construct or insert into an ObjectTable
                    if arg_3 is None:
                        arg_3 = ObjectTable(arg_17={arg_12: arg_14})
                    else:
                        arg_3[arg_12] = arg_14

            return arg_3
        except:
            arg_0._logger.error(
                'Failed loading `%s` of `%s`.' % (arg_1._v_name, arg_2))
            raise

Reads a non - nested PyTables table column by column and created a new ObjectTable for the loaded data .


(self, source, name, filename, defer_init=False)

return generate(source, self, name, filename, defer_init=defer_init)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4=False):
        """Internal hook that can be overridden to hook a different generate
        method in.

        .. versionadded:: 2.5
        """
        return generate(arg_1, arg_0, arg_2, arg_3, arg_4=arg_4)

Internal hook that can be overridden to hook a different generate method in .


def Func ( arg_0 , arg_1 = None ) : if arg_1 is None : arg_1 = 10 else : arg_1 = arg_1 . read ( ) arg_0 . AH = Operators . UDIV ( arg_0 . AL , arg_1 ) arg_0 . AL = Operators . UREM ( arg_0 . AL , arg_1 ) arg_0 . _calculate_logic_flags ( 8 , arg_0 . AL )

def Func(arg_0, arg_1=None):
        """
        ASCII adjust AX after multiply.

        Adjusts the result of the multiplication of two unpacked BCD values
        to create a pair of unpacked (base 10) BCD values. The AX register is
        the implied source and destination operand for this instruction. The Func
        instruction is only useful when it follows a MUL instruction that multiplies
        (binary multiplication) two unpacked BCD values and stores a word result
        in the AX register. The Func instruction then adjusts the contents of the
        AX register to contain the correct 2-digit unpacked (base 10) BCD result.

        The SF, ZF, and PF flags are set according to the resulting binary value in the AL register.

        This instruction executes as described in compatibility mode and legacy mode.
        It is not valid in 64-bit mode.::

                tempAL  =  AL;
                AH  =  tempAL / 10;
                AL  =  tempAL MOD 10;

        :param cpu: current CPU.
        """
        if arg_1 is None:
            arg_1 = 10
        else:
            arg_1 = arg_1.read()

        arg_0.AH = Operators.UDIV(arg_0.AL, arg_1)
        arg_0.AL = Operators.UREM(arg_0.AL, arg_1)

        # Defined flags: ...sz.p.
        arg_0._calculate_logic_flags(8, arg_0.AL)

ASCII adjust AX after multiply.

        Adjusts the result of the multiplication of two unpacked BCD values
        to create a pair of unpacked (base 10) BCD values. The AX register is
        the implied source and destination operand for this instruction. The AAM
        instruction is only useful when it follows a MUL instruction that multiplies
        (binary multiplication) two unpacked BCD values and stores a word result
        in the AX register. The AAM instruction then adjusts the contents of the
        AX register to contain the correct 2-digit unpacked (base 10) BCD result.

        The SF, ZF, and PF flags are set according to the resulting binary value in the AL register.

        This instruction executes as described in compatibility mode and legacy mode.
        It is not valid in 64-bit mode.::

                tempAL  =  AL;
                AH  =  tempAL / 10;
                AL  =  tempAL MOD 10;

        :param cpu: current CPU.


(flow_or_path, quantize=False, concat_axis=0, *args, **kwargs)

def Func(arg_0, arg_1=False, arg_2=0, *arg_3, **arg_4):
    """Read an optical flow map.

    Args:
        flow_or_path (ndarray or str): A flow map or filepath.
        quantize (bool): whether to read quantized pair, if set to True,
            remaining args will be passed to :func:`dequantize_flow`.
        concat_axis (int): The axis that dx and dy are concatenated,
            can be either 0 or 1. Ignored if quantize is False.

    Returns:
        ndarray: Optical flow represented as a (h, w, 2) numpy array
    """
    if isinstance(arg_0, np.ndarray):
        if (arg_0.ndim != 3) or (arg_0.shape[-1] != 2):
            raise ValueError('Invalid flow with shape {}'.format(
                arg_0.shape))
        return arg_0
    elif not is_str(arg_0):
        raise TypeError(
            '"flow_or_path" must be a filename or numpy array, not {}'.format(
                type(arg_0)))

    if not arg_1:
        with open(arg_0, 'rb') as f:
            try:
                arg_5 = f.read(4).decode('utf-8')
            except Exception:
                raise IOError('Invalid flow file: {}'.format(arg_0))
            else:
                if arg_5 != 'PIEH':
                    raise IOError(
                        'Invalid flow file: {}, header does not contain PIEH'.
                        format(arg_0))

            arg_6 = np.fromfile(f, np.int32, 1).squeeze()
            arg_7 = np.fromfile(f, np.int32, 1).squeeze()
            arg_8 = np.fromfile(f, np.float32, arg_6 * arg_7 * 2).reshape((arg_7, arg_6, 2))
    else:
        assert arg_2 in [0, 1]
        arg_9 = imread(arg_0, flag='unchanged')
        if arg_9.ndim != 2:
            raise IOError(
                '{} is not a valid quantized flow file, its dimension is {}.'.
                format(arg_0, arg_9.ndim))
        assert arg_9.shape[arg_2] % 2 == 0
        arg_10, arg_11 = np.split(arg_9, 2, axis=arg_2)
        arg_8 = dequantize_flow(arg_10, arg_11, *arg_3, **arg_4)

    return arg_8.astype(np.float32)


def Func ( arg_0 , arg_1 , arg_2 = False ) : if arg_2 : import_record . s ( arg_0 , arg_1 = arg_1 ) . apply ( throw = True ) elif current_migrator . records_post_task : chain ( import_record . s ( arg_0 , arg_1 = arg_1 ) , current_migrator . records_post_task . s ( ) ) ( ) else : import_record . delay ( arg_0 , arg_1 = arg_1 )

def Func(arg_0, arg_1, arg_2=False):
    """Load a single record into the database.

    :param record_dump: Record dump.
    :type record_dump: dict
    :param source_type: 'json' or 'marcxml'
    :param eager: If ``True`` execute the task synchronously.
    """
    if arg_2:
        import_record.s(arg_0, arg_1=arg_1).apply(throw=True)
    elif current_migrator.records_post_task:
        chain(
            import_record.s(arg_0, arg_1=arg_1),
            current_migrator.records_post_task.s()
        )()
    else:
        import_record.delay(arg_0, arg_1=arg_1)

Load a single record into the database .


return [newer_tag_link, newer_tag_name, newer_tag_time]

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . get_time_of_tag ( arg_1 ) if arg_1 else datetime . datetime . now ( ) if arg_1 [ "name" ] == arg_0 . options . unreleased_label and arg_0 . options . future_release : arg_3 = arg_0 . options . future_release arg_4 = arg_0 . options . future_release elif arg_1 [ "name" ] is not arg_0 . options . unreleased_label : arg_3 = arg_1 [ "name" ] arg_4 = arg_3 else : arg_3 = arg_0 . options . unreleased_label arg_4 = "HEAD" return [ arg_4 , arg_3 , arg_2 ]

def Func(arg_0, arg_1):
        """
        Detect link, name and time for specified tag.

        :param dict tag: Tag data.
        :rtype: str, str, datetime
        :return: Link, name and time of the tag.
        """

        # if tag is nil - set current time
        arg_2 = arg_0.get_time_of_tag(arg_1) if arg_1 \
            else datetime.datetime.now()

        # if it's future release tag - set this value
        if arg_1["name"] == arg_0.options.unreleased_label \
            and arg_0.options.future_release:
            arg_3 = arg_0.options.future_release
            arg_4 = arg_0.options.future_release
        elif arg_1["name"] is not arg_0.options.unreleased_label :
            # put unreleased label if there is no name for the tag
            arg_3 = arg_1["name"]
            arg_4 = arg_3
        else:
            arg_3 = arg_0.options.unreleased_label
            arg_4 = "HEAD"
        return [arg_4, arg_3, arg_2]

Detect link name and time for specified tag .


def Func ( arg_0 ) : if not arg_0 . meta : return arg_0 elif arg_0 . stacked : return Features ( arg_0 . stacked_features , arg_0 . n_pts , copy = False ) else : return Features ( arg_0 . features , copy = False )

def Func(arg_0):
        "Make a Features object with no metadata; points to the same features."
        if not arg_0.meta:
            return arg_0
        elif arg_0.stacked:
            return Features(arg_0.stacked_features, arg_0.n_pts, copy=False)
        else:
            return Features(arg_0.features, copy=False)

Make a Features object with no metadata ; points to the same features .


def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = [ ] try : for arg_5 in range ( arg_2 , len ( arg_1 ) ) : arg_6 = _setup_index ( arg_5 ) try : arg_4 . append ( arg_1 [ arg_6 ] ) except IndexError : arg_4 . append ( arg_0 . invalid_pos ) finally : arg_4 . append ( arg_0 . separator ) arg_4 . append ( arg_1 [ - 1 ] ) except IndexError : pass try : int ( arg_0 . positions [ arg_3 + 1 ] ) arg_4 . append ( arg_0 . separator ) except ( ValueError , IndexError ) : pass return arg_4

def Func(arg_0, arg_1, arg_2, arg_3):
        """Performs cut for range from start position to end

        Arguments:
            line -              input to cut
            start -             start of range
            current_position -  current position in main cut function
        """
        arg_4 = []
        try:
            for arg_5 in range(arg_2, len(arg_1)):
                arg_6 = _setup_index(arg_5)
                try:
                    arg_4.append(arg_1[arg_6])
                except IndexError:
                    arg_4.append(arg_0.invalid_pos)
                finally:
                    arg_4.append(arg_0.separator)
            arg_4.append(arg_1[-1])
        except IndexError:
            pass

        try:
            int(arg_0.positions[arg_3+1])
            arg_4.append(arg_0.separator)
        except (ValueError, IndexError):
            pass

        return arg_4


async def Func(arg_0):
        """Open a long-polling request and receive arrays.

        This method uses keep-alive to make re-opening the request faster, but
        the remote server will set the "Connection: close" header once an hour.

        Raises hangups.NetworkError or ChannelSessionError.
        """
        arg_1 = {
            'VER': 8,  # channel protocol version
            'gsessionid': arg_0._gsessionid_param,
            'RID': 'rpc',  # request identifier
            't': 1,  # trial
            'SID': arg_0._sid_param,  # session ID
            'CI': 0,  # 0 if streaming/chunked requests should be used
            'ctype': 'hangouts',  # client type
            'TYPE': 'xmlhttp',  # type of request
        }
        logger.info('Opening new long-polling request')
        try:
            async with arg_0._session.fetch_raw('GET', CHANNEL_URL,
                                               arg_1=arg_1) as res:

                if res.status != 200:
                    if res.status == 400 and res.reason == 'Unknown SID':
                        raise ChannelSessionError('SID became invalid')
                    raise exceptions.NetworkError(
                        'Request return unexpected status: {}: {}'.format(
                            res.status, res.reason))

                while True:
                    async with async_timeout.timeout(PUSH_TIMEOUT):
                        arg_2 = await res.content.read(MAX_READ_BYTES)
                    if not arg_2:
                        break

                    await arg_0._on_push_data(arg_2)

        except asyncio.TimeoutError:
            raise exceptions.NetworkError('Request timed out')
        except aiohttp.ServerDisconnectedError as err:
            raise exceptions.NetworkError(
                'Server disconnected error: %s' % err)
        except aiohttp.ClientPayloadError:
            raise ChannelSessionError('SID is about to expire')
        except aiohttp.ClientError as err:
            raise exceptions.NetworkError('Request connection error: %s' % err)

Open a long - polling request and receive arrays .