def Func ( arg_0 , arg_1 : arg_2 ) -> Iterable [ arg_2 ] : assert not arg_1 . startswith ( ":" ) if "/" in arg_1 : arg_3 , arg_4 = arg_1 . split ( "/" , maxsplit = 1 ) arg_5 = itertools . chain ( arg_0 . __Func_alias ( arg_3 , name_in_ns = arg_4 ) , arg_0 . __Func_imports_and_aliases ( arg_3 , name_in_module = arg_4 ) , ) else : arg_5 = itertools . chain ( arg_0 . __Func_alias ( arg_1 ) , arg_0 . __Func_imports_and_aliases ( arg_1 ) , arg_0 . __Func_interns ( arg_1 ) , arg_0 . __Func_refers ( arg_1 ) , ) return arg_5

def Func(arg_0, arg_1: arg_2) -> Iterable[arg_2]:
        """Return an iterable of possible completions for the given text in
        this namespace."""
        assert not arg_1.startswith(":")

        if "/" in arg_1:
            arg_3, arg_4 = arg_1.split("/", maxsplit=1)
            arg_5 = itertools.chain(
                arg_0.__Func_alias(arg_3, name_in_ns=arg_4),
                arg_0.__Func_imports_and_aliases(arg_3, name_in_module=arg_4),
            )
        else:
            arg_5 = itertools.chain(
                arg_0.__Func_alias(arg_1),
                arg_0.__Func_imports_and_aliases(arg_1),
                arg_0.__Func_interns(arg_1),
                arg_0.__Func_refers(arg_1),
            )

        return arg_5

Return an iterable of possible completions for the given text in this namespace .


def Func(arg_0):
    '''Output file validation function. Checks that file can be written, and
    has a valid file extension. Throws a warning if the path already exists,
    as it will be overwritten on build.

    Parameters
    ----------
    output_filepath : str
        The output filepath.

    Returns:
    --------
    output_filepath : str
        The output filepath.

    '''

    arg_1 = [
        bool(os.path.dirname(arg_0)) or\
            not os.access(os.getcwd(), os.W_OK),
        not os.access(os.path.dirname(arg_0), os.W_OK)]

    if all(arg_1):
        raise IOError(
            "SoX cannot write to output_filepath {}".format(arg_0)
        )

    arg_2 = file_extension(arg_0)
    if arg_2 not in VALID_FORMATS:
        logger.info("Valid formats: %s", " ".join(VALID_FORMATS))
        logger.warning(
            "This install of SoX cannot process .{} files.".format(arg_2)
        )

    if os.path.exists(arg_0):
        logger.warning(
            'output_file: %s already exists and will be overwritten on build',
            arg_0
        )

Output file validation function . Checks that file can be written and has a valid file extension . Throws a warning if the path already exists as it will be overwritten on build .


def Func ( arg_0 , arg_1 ) : arg_2 = BeautifulSoup ( arg_1 ) arg_3 = arg_2 . find ( 'div' , 'g' ) . find ( 'a' ) . get ( 'href' ) arg_4 = arg_3 . split ( '&' ) arg_5 = arg_4 [ 0 ] arg_5 = arg_5 . strip ( ) arg_5 = arg_5 . replace ( '/url?q=' , '' ) return arg_5

def Func(arg_0,arg_1):
		'''It will parse google html response
			and return the first url
		 '''
		arg_2 = BeautifulSoup(arg_1)
		arg_3=arg_2.find('div','g').find('a').get('href')
		arg_4=arg_3.split('&')
		arg_5=arg_4[0]
		arg_5=arg_5.strip()
		arg_5=arg_5.replace('/url?q=','')
		return arg_5


def Func ( arg_0 ) : arg_1 = not isinstance ( arg_0 , str ) if ( arg_1 and ( arg_0 == 0 ) ) or ( ( not arg_1 ) and ( not arg_0 . strip ( "0" ) . strip ( "." ) ) ) : return ( "0" , 0 ) arg_2 , arg_3 , arg_4 = Decimal ( str ( arg_0 ) if arg_1 else arg_0 ) . as_tuple ( ) arg_5 = ( "{sign}{itg}{frac}" . format ( arg_2 = "-" if arg_2 else "" , itg = arg_3 [ 0 ] , frac = ( ".{frac}" . format ( frac = "" . join ( [ str ( num ) for num in arg_3 [ 1 : ] ] ) ) if len ( arg_3 ) > 1 else "" ) , ) . rstrip ( "0" ) . rstrip ( "." ) ) arg_4 += len ( arg_3 ) - 1 return NumComp ( arg_5 , arg_4 )

def Func(arg_0):
    """
    Return mantissa and exponent of a number in scientific notation.

    Full precision is maintained if the number is represented as a string

    :param number: Number
    :type  number: integer, float or string

    :rtype: named tuple in which the first item is the mantissa (*string*)
            and the second item is the exponent (*integer*) of the number
            when expressed in scientific notation

    For example:

        >>> import peng
        >>> peng.Func('135.56E-8')
        NumComp(mant='1.3556', exp=-6)
        >>> peng.Func(0.0000013556)
        NumComp(mant='1.3556', exp=-6)
    """
    # pylint: disable=W0632
    arg_1 = not isinstance(arg_0, str)
    # Detect zero and return, simplifies subsequent algorithm
    if (arg_1 and (arg_0 == 0)) or (
        (not arg_1) and (not arg_0.strip("0").strip("."))
    ):
        return ("0", 0)
    # Break down number into its components, use Decimal type to
    # preserve resolution:
    # sign  : 0 -> +, 1 -> -
    # digits: tuple with digits of number
    # exp   : exponent that gives null fractional part
    arg_2, arg_3, arg_4 = Decimal(str(arg_0) if arg_1 else arg_0).as_tuple()
    arg_5 = (
        "{sign}{itg}{frac}".format(
            arg_2="-" if arg_2 else "",
            itg=arg_3[0],
            frac=(
                ".{frac}".format(frac="".join([str(num) for num in arg_3[1:]]))
                if len(arg_3) > 1
                else ""
            ),
        )
        .rstrip("0")
        .rstrip(".")
    )
    arg_4 += len(arg_3) - 1
    return NumComp(arg_5, arg_4)

Return mantissa and exponent of a number in scientific notation.

    Full precision is maintained if the number is represented as a string

    :param number: Number
    :type  number: integer, float or string

    :rtype: named tuple in which the first item is the mantissa (*string*)
            and the second item is the exponent (*integer*) of the number
            when expressed in scientific notation

    For example:

        >>> import peng
        >>> peng.to_scientific_tuple('135.56E-8')
        NumComp(mant='1.3556', exp=-6)
        >>> peng.to_scientific_tuple(0.0000013556)
        NumComp(mant='1.3556', exp=-6)

Return mantissa and exponent of a number in scientific notation .


return [
        indices[i] for i in sorted(indices, key=int)
    ]

def Func ( arg_0 : arg_1 ) -> List [ str ] : arg_2 = get_indices ( arg_0 ) return [ arg_2 [ arg_3 ] for arg_3 in sorted ( arg_2 , key = int ) ]

def Func(arg_0: arg_1) -> List[str]:
    """ Retrieve a list of characters and escape codes where each escape
        code uses only one index. The indexes will not match up with the
        indexes in the original string.
    """
    arg_2 = get_indices(arg_0)
    return [
        arg_2[arg_3] for arg_3 in sorted(arg_2, key=int)
    ]

Retrieve a list of characters and escape codes where each escape code uses only one index . The indexes will not match up with the indexes in the original string .


def Func ( arg_0 ) : arg_1 = { 'chrom' : arg_0 . chrom , 'start' : arg_0 . start , 'ref_allele' : arg_0 . ref_allele , 'alt_alleles' : arg_0 . alt_alleles , 'alleles' : [ x . Func ( ) for x in arg_0 . alleles ] } try : arg_1 [ 'info' ] = arg_0 . info except AttributeError : pass return arg_1

def Func(arg_0):
        """Dict representation of parsed VCF data"""
        arg_1 = {'chrom': arg_0.chrom,
                        'start': arg_0.start,
                        'ref_allele': arg_0.ref_allele,
                        'alt_alleles': arg_0.alt_alleles,
                        'alleles': [x.Func() for x in arg_0.alleles]}
        try:
            arg_1['info'] = arg_0.info
        except AttributeError:
            pass
        return arg_1


def Func ( arg_0 = 0.001 ) : arg_1 = ( model_params . MODEL_PARAMS [ "modelParams" ] [ "sensorParams" ] [ "encoders" ] [ "value" ] ) if arg_1 [ "type" ] == "RandomDistributedScalarEncoder" : arg_2 = abs ( _INPUT_MAX - _INPUT_MIN ) * 0.2 arg_3 = _INPUT_MIN - arg_2 arg_4 = _INPUT_MAX + arg_2 arg_5 = max ( arg_0 , ( arg_4 - arg_3 ) / arg_1 . pop ( "numBuckets" ) ) arg_1 [ "resolution" ] = arg_5

def Func(arg_0=0.001):
  """
  Given model params, figure out the correct resolution for the
  RandomDistributed encoder. Modifies params in place.
  """
  arg_1 = (
    model_params.MODEL_PARAMS["modelParams"]["sensorParams"]["encoders"]["value"]
  )

  if arg_1["type"] == "RandomDistributedScalarEncoder":
    arg_2 = abs(_INPUT_MAX - _INPUT_MIN) * 0.2
    arg_3 = _INPUT_MIN - arg_2
    arg_4 = _INPUT_MAX + arg_2
    arg_5 = max(arg_0,
                     (arg_4 - arg_3) / arg_1.pop("numBuckets")
                    )
    arg_1["resolution"] = arg_5

Given model params figure out the correct resolution for the RandomDistributed encoder . Modifies params in place .


return discovery.build('storage', 'v1', credentials=credentials)

def Func ( arg_0 ) : if arg_0 is None : arg_0 = oauth2client . client . GoogleCredentials . get_application_default ( ) return discovery . build ( 'storage' , 'v1' , arg_0 = arg_0 )

def Func(arg_0):
  """Get a storage client using the provided credentials or defaults."""
  if arg_0 is None:
    arg_0 = oauth2client.client.GoogleCredentials.get_application_default(
    )
  return discovery.build('storage', 'v1', arg_0=arg_0)

Get a storage client using the provided credentials or defaults .


def Func ( arg_0 ) : arg_1 = max ( [ len ( arg_2 ) for arg_2 in arg_0 ] ) for arg_2 in arg_0 : while len ( arg_2 ) < arg_1 : arg_2 . append ( '' ) return arg_0

def Func(arg_0):
    """
    Pad short rows to the length of the longest row to help render "jagged"
    CSV files
    """
    arg_1 = max([len(arg_2) for arg_2 in arg_0])
    for arg_2 in arg_0:
        while len(arg_2) < arg_1:
            arg_2.append('')
    return arg_0

Pad short rows to the length of the longest row to help render jagged CSV files


return Stream(self, error_callback=error_callback, live=live)

def Func ( arg_0 , arg_1 = None , arg_2 = True ) : arg_0 . join ( ) return Stream ( arg_0 , arg_1 = arg_1 , arg_2 = arg_2 )

def Func(arg_0, arg_1=None, arg_2=True):
        """ Get room stream to listen for messages.

        Kwargs:
            error_callback (func): Callback to call when an error occurred (parameters: exception)
            live (bool): If True, issue a live stream, otherwise an offline stream

        Returns:
            :class:`Stream`. Stream
        """
        arg_0.join()
        return Stream(arg_0, arg_1=arg_1, arg_2=arg_2)

Get room stream to listen for messages .


def
Func
(
arg_0
)
:
try
:
logger
.
info
(
u'Connecting %s:%d'
%
(
arg_0
.
host
,
arg_0
.
port
)
)
arg_0
.
sock
.
Func
(
(
arg_0
.
host
,
arg_0
.
port
)
)
except
socket
.
error
:
raise
ConnectionError
(
)
arg_0
.
state
=
CONNECTED

def Func(arg_0):
        """Connect to the server

        :raise ConnectionError: If socket cannot establish a Funcion

        """
        try:
            logger.info(u'Connecting %s:%d' % (arg_0.host, arg_0.port))
            arg_0.sock.Func((arg_0.host, arg_0.port))
        except socket.error:
            raise ConnectionError()
        arg_0.state = CONNECTED

Connect to the server

        :raise ConnectionError: If socket cannot establish a connection


def
Func
(
arg_0
,
arg_1
)
:
arg_0
.
log
.
debug
(
'Process %r started: %r'
,
arg_0
.
args
[
0
]
,
arg_1
)
arg_0
.
start_data
=
arg_1
arg_0
.
state
=
'running'
return
arg_1

def Func(arg_0, arg_1):
        """Call this to trigger startup actions.

        This logs the process startup and sets the state to 'running'.  It is
        a pass-through so it can be used as a callback.
        """

        arg_0.log.debug('Process %r started: %r', arg_0.args[0], arg_1)
        arg_0.start_data = arg_1
        arg_0.state = 'running'
        return arg_1


def Func ( arg_0 ) : arg_1 = pickle . loads ( arg_0 ) arg_2 = pickle . loads ( arg_1 [ 'seg' ] ) return AudioSegment ( arg_2 , arg_1 [ 'name' ] )

def Func(arg_0):
    """
    Attempts to Func a bytestring into an audiosegment.

    :param bstr: The bytestring serialized via an audiosegment's serialize() method.
    :returns: An AudioSegment object Funcd from `bstr`.
    """
    arg_1 = pickle.loads(arg_0)
    arg_2 = pickle.loads(arg_1['seg'])
    return AudioSegment(arg_2, arg_1['name'])

Attempts to deserialize a bytestring into an audiosegment.

    :param bstr: The bytestring serialized via an audiosegment's serialize() method.
    :returns: An AudioSegment object deserialized from `bstr`.

Attempts to deserialize a bytestring into an audiosegment .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . _get_match_relative_regex_cache ( ) for arg_3 in arg_1 : if any ( [ arg_2 . match ( arg_3 ) , arg_3 in arg_0 , arg_3 . isdigit ( ) ] ) : continue else : return False else : return True

def Func(arg_0, arg_1):
        """
        Check if tokens are valid tokens for the locale.

        :param tokens:
            a list of string or unicode tokens.
        :type tokens: list

        :return: True if tokens are valid, False otherwise.
        """
        arg_2 = arg_0._get_match_relative_regex_cache()
        for arg_3 in arg_1:
            if any([arg_2.match(arg_3),
                    arg_3 in arg_0, arg_3.isdigit()]):
                continue
            else:
                return False
        else:
            return True

Check if tokens are valid tokens for the locale .


def Func():
    """Reads the local Docker client config for the current user
    and returns all registries to which the user may be logged in.
    This is intended to be run client-side, not by the daemon."""
    arg_0 = set()
    if not os.path.exists(constants.DOCKER_CONFIG_PATH):
        return arg_0
    arg_1 = json.load(open(constants.DOCKER_CONFIG_PATH, 'r'))
    for arg_2 in arg_1.get('auths', {}).iterkeys():
        try:
            arg_3 = urlparse(arg_2)
        except Exception:
            log_to_client('Error parsing registry {} from Docker config, will skip this registry').format(arg_2)
        # This logic assumes the auth is either of the form
        # gamechanger.io (no scheme, no path after host) or
        # of the form https://index.docker.io/v1/ (scheme,
        # netloc parses correctly, additional path does not matter).
        # These are the formats I saw in my personal config file,
        # not sure what other formats it might accept.
        arg_0.add(arg_3.netloc) if arg_3.netloc else arg_0.add(arg_3.path)
    return arg_0

Reads the local Docker client config for the current user and returns all registries to which the user may be logged in . This is intended to be run client - side not by the daemon .


def Func(arg_0, arg_1, arg_2):
        '''Remove header from data'''

        arg_3 = arg_0._get_version_info(arg_2['version'])
        arg_4 = arg_3['header_size']

        if arg_2['flags']['timestamp']:
            arg_4 += arg_3['timestamp_size']

        arg_1 = arg_1[arg_4:]

        return arg_1


def Func ( arg_0 = 10 ) : arg_1 = map ( _to_lower_alpha_only , '' . join ( random . sample ( get_dictionary ( 'lorem_ipsum' ) , arg_0 ) ) ) return '' . join ( arg_1 ) [ : arg_0 ]

def Func(arg_0=10):
    """Return random Func."""
    arg_1 = map(_to_lower_alpha_only,
               ''.join(random.sample(get_dictionary('lorem_ipsum'), arg_0)))
    return ''.join(arg_1)[:arg_0]


(statemaker, feature_rad, actual_rad=None,
        im_name=None, tile=None, invert=True, desc='', use_full_path=False,
        featuring_params={}, statemaker_kwargs={}, **kwargs)

def Func(arg_0, arg_1, arg_2=None,
        arg_3=None, arg_4=None, arg_5=True, arg_6='', arg_7=False,
        arg_8={}, arg_9={}, **arg_10):
    """
    Completely optimizes a state from an image of roughly monodisperse
    particles.

    The user can interactively select the image. The state is periodically
    saved during optimization, with different filename for different stages
    of the optimization.

    Parameters
    ----------
        statemaker : Function
            A statemaker function. Given arguments `im` (a
            :class:`~peri.util.Image`), `pos` (numpy.ndarray), `rad` (ndarray),
            and any additional `statemaker_kwargs`, must return a
            :class:`~peri.states.ImageState`.  There is an example function in
            scripts/statemaker_example.py
        feature_rad : Int, odd
            The particle radius for featuring, as passed to locate_spheres.
        actual_rad : Float, optional
            The actual radius of the particles. Default is feature_rad
        im_name : string, optional
            The file name of the image to load. If not set, it is selected
            interactively through Tk.
        tile : :class:`peri.util.Tile`, optional
            The tile of the raw image to be analyzed. Default is None, the
            entire image.
        invert : Bool, optional
            Whether to invert the image for featuring, as passed to trackpy.
            Default is True.
        desc : String, optional
            A description to be inserted in saved state. The save name will
            be, e.g., '0.tif-peri-' + desc + 'initial-burn.pkl'. Default is ''
        use_full_path : Bool, optional
            Set to True to use the full path name for the image. Default
            is False.
        featuring_params : Dict, optional
            kwargs-like dict of any additional keyword arguments to pass to
            ``Func``, such as ``'use_tp'`` or ``'minmass'``.
            Default is ``{}``.
        statemaker_kwargs : Dict, optional
            kwargs-like dict of any additional keyword arguments to pass to
            the statemaker function. Default is ``{}``.

    Other Parameters
    ----------------
        max_mem : Numeric
            The maximum additional memory to use for the optimizers, as
            passed to optimize.burn. Default is 1e9.
        min_rad : Float, optional
            The minimum particle radius, as passed to addsubtract.add_subtract.
            Particles with a fitted radius smaller than this are identified
            as fake and removed. Default is 0.5 * actual_rad.
        max_rad : Float, optional
            The maximum particle radius, as passed to addsubtract.add_subtract.
            Particles with a fitted radius larger than this are identified
            as fake and removed. Default is 1.5 * actual_rad, however you
            may find better results if you make this more stringent.
        rz_order : int, optional
            If nonzero, the order of an additional augmented rscl(z)
            parameter for optimization. Default is 0; i.e. no rscl(z)
            optimization.
        zscale : Float, optional
            The zscale of the image. Default is 1.0

    Returns
    -------
        s : :class:`peri.states.ImageState`
            The optimized state.

    See Also
    --------
        feature_from_pos_rad    : Using a previous state's globals and
            user-provided positions and radii as an initial guess,
            completely optimizes a state.

        get_particle_featuring  : Using a previous state's globals and
            positions as an initial guess, completely optimizes a state.

        translate_featuring     : Use a previous state's globals and
            centroids methods for an initial particle guess, completely
            optimizes a state.

    Notes
    -----
    Proceeds by centroid-featuring the image for an initial guess of
    particle positions, then optimizing the globals + positions until
    termination as called in _optimize_from_centroid.
    The ``Other Parameters`` are passed to _optimize_from_centroid.
    """
    if arg_2 is None:
        arg_2 = arg_1

    arg_11,  arg_3 = _pick_state_im_name('', arg_3, arg_7=arg_7)
    arg_12 = util.RawImage(arg_3, arg_4=arg_4)

    arg_13 = locate_spheres(arg_12, arg_1, arg_5=arg_5, **arg_8)
    if np.size(arg_13) == 0:
        arg_14 = 'No particles found. Try using a smaller `feature_rad`.'
        raise ValueError(arg_14)

    arg_15 = np.ones(arg_13.shape[0], dtype='float') * arg_2
    arg_16 = arg_0(arg_12, arg_13, arg_15, **arg_9)
    RLOG.info('State Created.')
    if arg_6 is not None:
        states.save(arg_16, arg_6=arg_6+'initial')
    optimize_from_initial(arg_16, arg_5=arg_5, arg_6=arg_6, **arg_10)
    return arg_16

Completely optimizes a state from an image of roughly monodisperse
    particles.

    The user can interactively select the image. The state is periodically
    saved during optimization, with different filename for different stages
    of the optimization.

    Parameters
    ----------
        statemaker : Function
            A statemaker function. Given arguments `im` (a
            :class:`~peri.util.Image`), `pos` (numpy.ndarray), `rad` (ndarray),
            and any additional `statemaker_kwargs`, must return a
            :class:`~peri.states.ImageState`.  There is an example function in
            scripts/statemaker_example.py
        feature_rad : Int, odd
            The particle radius for featuring, as passed to locate_spheres.
        actual_rad : Float, optional
            The actual radius of the particles. Default is feature_rad
        im_name : string, optional
            The file name of the image to load. If not set, it is selected
            interactively through Tk.
        tile : :class:`peri.util.Tile`, optional
            The tile of the raw image to be analyzed. Default is None, the
            entire image.
        invert : Bool, optional
            Whether to invert the image for featuring, as passed to trackpy.
            Default is True.
        desc : String, optional
            A description to be inserted in saved state. The save name will
            be, e.g., '0.tif-peri-' + desc + 'initial-burn.pkl'. Default is ''
        use_full_path : Bool, optional
            Set to True to use the full path name for the image. Default
            is False.
        featuring_params : Dict, optional
            kwargs-like dict of any additional keyword arguments to pass to
            ``get_initial_featuring``, such as ``'use_tp'`` or ``'minmass'``.
            Default is ``{}``.
        statemaker_kwargs : Dict, optional
            kwargs-like dict of any additional keyword arguments to pass to
            the statemaker function. Default is ``{}``.

    Other Parameters
    ----------------
        max_mem : Numeric
            The maximum additional memory to use for the optimizers, as
            passed to optimize.burn. Default is 1e9.
        min_rad : Float, optional
            The minimum particle radius, as passed to addsubtract.add_subtract.
            Particles with a fitted radius smaller than this are identified
            as fake and removed. Default is 0.5 * actual_rad.
        max_rad : Float, optional
            The maximum particle radius, as passed to addsubtract.add_subtract.
            Particles with a fitted radius larger than this are identified
            as fake and removed. Default is 1.5 * actual_rad, however you
            may find better results if you make this more stringent.
        rz_order : int, optional
            If nonzero, the order of an additional augmented rscl(z)
            parameter for optimization. Default is 0; i.e. no rscl(z)
            optimization.
        zscale : Float, optional
            The zscale of the image. Default is 1.0

    Returns
    -------
        s : :class:`peri.states.ImageState`
            The optimized state.

    See Also
    --------
        feature_from_pos_rad    : Using a previous state's globals and
            user-provided positions and radii as an initial guess,
            completely optimizes a state.

        get_particle_featuring  : Using a previous state's globals and
            positions as an initial guess, completely optimizes a state.

        translate_featuring     : Use a previous state's globals and
            centroids methods for an initial particle guess, completely
            optimizes a state.

    Notes
    -----
    Proceeds by centroid-featuring the image for an initial guess of
    particle positions, then optimizing the globals + positions until
    termination as called in _optimize_from_centroid.
    The ``Other Parameters`` are passed to _optimize_from_centroid.

Completely optimizes a state from an image of roughly monodisperse particles .


def Func ( arg_0 , arg_1 , arg_2 = None ) : import pandas . io . sql as psql with closing ( arg_0 . get_conn ( ) ) as conn : return psql . read_sql ( arg_1 , con = conn , params = arg_2 )

def Func(arg_0, arg_1, arg_2=None):
        """
        Executes the sql and returns a pandas dataframe

        :param sql: the sql statement to be executed (str) or a list of
            sql statements to execute
        :type sql: str or list
        :param parameters: The parameters to render the SQL query with.
        :type parameters: mapping or iterable
        """
        import pandas.io.sql as psql

        with closing(arg_0.get_conn()) as conn:
            return psql.read_sql(arg_1, con=conn, params=arg_2)


return self._perform_post(self._get_image_path(),
                                  _XmlSerializer.os_image_to_xml(
                                      label, media_link, name, os),
                                  as_async=True)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
        '''
        Adds an OS image that is currently stored in a storage account in your
        subscription to the image repository.

        label:
            Specifies the friendly name of the image.
        media_link:
            Specifies the location of the blob in Windows Azure blob store
            where the media for the image is located. The blob location must
            belong to a storage account in the subscription specified by the
            <subscription-id> value in the operation call. Example:
            http://example.blob.core.windows.net/disks/mydisk.vhd
        name:
            Specifies a name for the OS image that Windows Azure uses to
            identify the image when creating one or more virtual machines.
        os:
            The operating system type of the OS image. Possible values are:
            Linux, Windows
        '''
        _validate_not_none('label', arg_1)
        _validate_not_none('media_link', arg_2)
        _validate_not_none('name', arg_3)
        _validate_not_none('os', arg_4)
        return arg_0._perform_post(arg_0._get_image_path(),
                                  _XmlSerializer.os_image_to_xml(
                                      arg_1, arg_2, arg_3, arg_4),
                                  as_async=True)

Adds an OS image that is currently stored in a storage account in your subscription to the image repository .


return eta_min, eta_max, minimum_log_eta, maximum_log_eta, bin_size

def Func(arg_0, arg_1, arg_2):
        """Tabulate an integral over the surface density of deflection potential of a mass profile. This is used in \
        the GeneralizedNFW profile classes to speed up the integration procedure.

        Parameters
        -----------
        grid : grids.RegularGrid
            The grid of (y,x) arc-second coordinates the potential / deflection_stacks are computed on.
        tabulate_bins : int
            The number of bins to tabulate the inner integral of this profile.
        """
        arg_3 = 1.0e-4
        arg_4 = 1.05 * np.max(arg_0.grid_to_elliptical_radii(arg_1))

        arg_5 = np.log10(arg_3)
        arg_6 = np.log10(arg_4)
        arg_7 = (arg_6 - arg_5) / (arg_2 - 1)

        return arg_3, arg_4, arg_5, arg_6, arg_7

Tabulate an integral over the surface density of deflection potential of a mass profile . This is used in \ the GeneralizedNFW profile classes to speed up the integration procedure .


Returns the intersection of this and another Envelope.

def Func ( arg_0 , arg_1 ) : arg_2 = Envelope ( tuple ( arg_0 ) ) if arg_2 . Funcs ( arg_1 ) : arg_3 = len ( arg_1 ) // 2 arg_2 . ll = map ( max , arg_2 . ll , arg_1 [ : arg_3 ] ) arg_2 . ur = map ( min , arg_2 . ur , arg_1 [ arg_3 : ] ) else : arg_2 . ll = ( 0 , 0 ) arg_2 . ur = ( 0 , 0 ) return arg_2

def Func(arg_0, arg_1):
        """Returns the Funcion of this and another Envelope."""
        arg_2 = Envelope(tuple(arg_0))
        if arg_2.Funcs(arg_1):
            arg_3 = len(arg_1) // 2
            arg_2.ll = map(max, arg_2.ll, arg_1[:arg_3])
            arg_2.ur = map(min, arg_2.ur, arg_1[arg_3:])
        else:
            arg_2.ll = (0, 0)
            arg_2.ur = (0, 0)
        return arg_2

Returns the intersection of this and another Envelope .


(self, url,
                 headers=None,
                 return_json=True,
                 start_page=None)

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = True , arg_4 = None ) : arg_5 = '%s&page=1' % ( arg_1 ) if arg_4 is not None : arg_5 = '%s&page=%s' % ( arg_1 , arg_4 ) arg_6 = [ ] while arg_5 is not None : arg_7 = arg_0 . _get ( arg_1 , arg_2 = arg_2 , arg_3 = arg_3 ) if isinstance ( arg_7 , dict ) : if 'results' in arg_7 : arg_6 = arg_6 + arg_7 [ 'results' ] arg_5 = arg_7 [ 'next' ] else : return arg_7 return arg_6

def Func(arg_0, arg_1,
                 arg_2=None,
                 arg_3=True,
                 arg_4=None):
    '''paginate_call is a wrapper for get to paginate results
    '''

    arg_5 = '%s&page=1' %(arg_1)
    if arg_4 is not None:
        arg_5 = '%s&page=%s' %(arg_1,arg_4)

    arg_6 = []
    while arg_5 is not None:
        arg_7 = arg_0._get(arg_1, arg_2=arg_2, arg_3=arg_3)
        # If we have pagination:
        if isinstance(arg_7, dict):
            if 'results' in arg_7:
                arg_6 = arg_6 + arg_7['results']
            arg_5 = arg_7['next']
        # No pagination is a list
        else:
            return arg_7
    return arg_6


(self, parent_traj_node, name, store_data, with_links, recursive,
                          max_depth, current_depth,
                          parent_hdf5_group)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5,
                          arg_6, arg_7,
                          arg_8):
        """Stores a node to hdf5 and if desired stores recursively everything below it.

        :param parent_traj_node: The parental node
        :param name: Name of node to be stored
        :param store_data: How to store data
        :param with_links: If links should be stored
        :param recursive: Whether to store recursively the subtree
        :param max_depth: Maximum recursion depth in tree
        :param current_depth: Current depth
        :param parent_hdf5_group: Parent hdf5 group

        """
        if arg_6 is None:
            arg_6 = float('inf')

        arg_9 = [(arg_1, arg_2, arg_7, arg_8)]

        while arg_9:
            arg_1, arg_2, arg_7, arg_8 = arg_9.pop()

            # Check if we create a link
            if arg_2 in arg_1._links:
                if arg_4:
                    arg_0._tree_store_link(arg_1, arg_2, arg_8)
                continue

            arg_10 = arg_1._children[arg_2]

            # If the node does not exist in the hdf5 file create it
            if not hasattr(arg_8, arg_2):
                arg_11 = True
                arg_12 = arg_0._hdf5file.create_group(where=arg_8,
                                                       arg_2=arg_2, filters=arg_0._all_get_filters())
            else:
                arg_11 = False
                arg_12 = getattr(arg_8, arg_2)

            if arg_10.v_is_leaf:
                arg_0._prm_store_parameter_or_result(arg_10, arg_3=arg_3,
                                                     _hdf5_group=arg_12,
                                                    _newly_created=arg_11)

            else:
                arg_0._grp_store_group(arg_10, arg_3=arg_3, arg_4=arg_4,
                                      arg_5=False, arg_6=arg_6,
                                      _hdf5_group=arg_12,
                                      _newly_created=arg_11)

                if arg_5 and arg_7 < arg_6:
                    for arg_13 in arg_10._children.keys():
                        arg_9.append((arg_10, arg_13, arg_7 + 1, arg_12))

Stores a node to hdf5 and if desired stores recursively everything below it .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_0 . size [ 0 ] * arg_0 . size [ 1 ] for arg_4 in range ( 10 ) : arg_5 = random . uniform ( * arg_1 ) * arg_3 arg_6 = ( math . log ( arg_2 [ 0 ] ) , math . log ( arg_2 [ 1 ] ) ) arg_7 = math . exp ( random . uniform ( * arg_6 ) ) arg_8 = int ( round ( math . sqrt ( arg_5 * arg_7 ) ) ) arg_9 = int ( round ( math . sqrt ( arg_5 / arg_7 ) ) ) if arg_8 <= arg_0 . size [ 0 ] and arg_9 <= arg_0 . size [ 1 ] : arg_10 = random . randint ( 0 , arg_0 . size [ 1 ] - arg_9 ) arg_11 = random . randint ( 0 , arg_0 . size [ 0 ] - arg_8 ) return arg_10 , arg_11 , arg_9 , arg_8 arg_12 = arg_0 . size [ 0 ] / arg_0 . size [ 1 ] if ( arg_12 < min ( arg_2 ) ) : arg_8 = arg_0 . size [ 0 ] arg_9 = arg_8 / min ( arg_2 ) elif ( arg_12 > max ( arg_2 ) ) : arg_9 = arg_0 . size [ 1 ] arg_8 = arg_9 * max ( arg_2 ) else : arg_8 = arg_0 . size [ 0 ] arg_9 = arg_0 . size [ 1 ] arg_10 = ( arg_0 . size [ 1 ] - arg_9 ) // 2 arg_11 = ( arg_0 . size [ 0 ] - arg_8 ) // 2 return arg_10 , arg_11 , arg_9 , arg_8

def Func(arg_0, arg_1, arg_2):
        """Get parameters for ``crop`` for a random sized crop.

        Args:
            img (PIL Image): Image to be cropped.
            scale (tuple): range of size of the origin size cropped
            ratio (tuple): range of aspect ratio of the origin aspect ratio cropped

        Returns:
            tuple: params (i, j, h, w) to be passed to ``crop`` for a random
                sized crop.
        """
        arg_3 = arg_0.size[0] * arg_0.size[1]

        for arg_4 in range(10):
            arg_5 = random.uniform(*arg_1) * arg_3
            arg_6 = (math.log(arg_2[0]), math.log(arg_2[1]))
            arg_7 = math.exp(random.uniform(*arg_6))

            arg_8 = int(round(math.sqrt(arg_5 * arg_7)))
            arg_9 = int(round(math.sqrt(arg_5 / arg_7)))

            if arg_8 <= arg_0.size[0] and arg_9 <= arg_0.size[1]:
                arg_10 = random.randint(0, arg_0.size[1] - arg_9)
                arg_11 = random.randint(0, arg_0.size[0] - arg_8)
                return arg_10, arg_11, arg_9, arg_8

        # Fallback to central crop
        arg_12 = arg_0.size[0] / arg_0.size[1]
        if (arg_12 < min(arg_2)):
            arg_8 = arg_0.size[0]
            arg_9 = arg_8 / min(arg_2)
        elif (arg_12 > max(arg_2)):
            arg_9 = arg_0.size[1]
            arg_8 = arg_9 * max(arg_2)
        else:  # whole image
            arg_8 = arg_0.size[0]
            arg_9 = arg_0.size[1]
        arg_10 = (arg_0.size[1] - arg_9) // 2
        arg_11 = (arg_0.size[0] - arg_8) // 2
        return arg_10, arg_11, arg_9, arg_8

Get parameters for crop for a random sized crop .


return (not (evt.ControlDown() or evt.AltDown()) and
                evt.GetKeyCode() != wx.WXK_SHIFT)

def Func ( arg_0 , arg_1 ) : return ( not ( arg_1 . ControlDown ( ) or arg_1 . AltDown ( ) ) and arg_1 . GetKeyCode ( ) != wx . WXK_SHIFT )

def Func(arg_0, arg_1):
        "Return True to allow the given key to start editing"
        ## Oops, there's a bug here, we'll have to do it ourself..
        ##return self.base_Func(evt)
        return (not (arg_1.ControlDown() or arg_1.AltDown()) and
                arg_1.GetKeyCode() != wx.WXK_SHIFT)


def Func(arg_0, arg_1):
        """
        Filter tags according since_tag option.

        :param list(dict) all_tags: All tags.
        :rtype: list(dict)
        :return: Filtered tags.
        """

        arg_2 = arg_0.detect_since_tag()
        if not arg_2 or arg_2 == REPO_CREATED_TAG_NAME:
            return copy.deepcopy(arg_1)

        arg_3 = []
        arg_4 = [arg_8["name"] for arg_8 in arg_1]
        try:
            arg_5 = arg_4.index(arg_2)
        except ValueError:
            arg_0.warn_if_tag_not_found(arg_2, "since-tag")
            return copy.deepcopy(arg_1)

        arg_6 = arg_1[arg_5]
        arg_7 = arg_0.get_time_of_tag(arg_6)
        for arg_8 in arg_1:
            arg_9 = arg_0.get_time_of_tag(arg_8)
            if arg_7 <= arg_9:
                arg_3.append(arg_8)
        return arg_3

Filter tags according since_tag option .


def Func(arg_0, arg_1, arg_2):
        """Retrieve the database id of an open clinvar submission for a user and institute,
           if none is available then create a new submission and return it

           Args:
                user_id(str): a user ID
                institute_id(str): an institute ID

           Returns:
                submission(obj) : an open clinvar submission object
        """

        LOG.info("Retrieving an open clinvar submission for user '%s' and institute %s", arg_1, arg_2)
        arg_3 = dict(arg_1=arg_1, arg_2=arg_2, status='open')
        arg_4 = arg_0.clinvar_submission_collection.find_one(arg_3)

        # If there is no open submission for this user and institute, create one
        if arg_4 is None:
            arg_5 = arg_0.create_submission(arg_1, arg_2)
            arg_4 = arg_0.clinvar_submission_collection.find_one({'_id':arg_5})

        return arg_4

Retrieve the database id of an open clinvar submission for a user and institute if none is available then create a new submission and return it


def Func ( arg_0 , arg_1 ) : arg_2 = { } for arg_3 in arg_0 . client . Func ( arg_1 ) : arg_4 = arg_3 [ 'html_url' ] try : arg_5 = arg_0 . get_repository_from_issue ( arg_3 ) except ValueError as e : log . critical ( e ) else : arg_2 [ arg_4 ] = ( arg_5 , arg_3 ) return arg_2

def Func(arg_0, arg_1):
        """ Grab all issues matching a github query """
        arg_2 = {}
        for arg_3 in arg_0.client.Func(arg_1):
            arg_4 = arg_3['html_url']
            try:
                arg_5 = arg_0.get_repository_from_issue(arg_3)
            except ValueError as e:
                log.critical(e)
            else:
                arg_2[arg_4] = (arg_5, arg_3)
        return arg_2


def
Func
(
arg_0
,
arg_1
)
:
log
.
info
(
'Compile '
+
arg_1
)
arg_2
=
'node.compile("%s")'
%
arg_1
arg_3
=
arg_0
.
__exchange
(
arg_2
)
log
.
info
(
arg_3
)
return
arg_3

def Func(arg_0, arg_1):
        """Compiles a file specified by path on the device"""
        log.info('Compile '+arg_1)
        arg_2 = 'node.compile("%s")' % arg_1
        arg_3 = arg_0.__exchange(arg_2)
        log.info(arg_3)
        return arg_3


return self.make_response(obj=obj, pid=pid, record=record)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : try : arg_4 = json . loads ( request . data . decode ( 'utf-8' ) ) arg_5 = arg_4 [ 'filename' ] except KeyError : raise WrongFile ( ) arg_6 = secure_filename ( arg_5 ) if not arg_6 or arg_5 != arg_6 : raise WrongFile ( ) try : arg_7 = arg_2 . files . rename ( str ( arg_3 ) , arg_6 ) except KeyError : abort ( 404 ) arg_2 . commit ( ) db . session . commit ( ) return arg_0 . make_response ( arg_7 = arg_7 , arg_1 = arg_1 , arg_2 = arg_2 )

def Func(arg_0, arg_1, arg_2, arg_3):
        """Handle the file rename through the PUT deposit file.

        Permission required: `update_permission_factory`.

        :param pid: Pid object (from url).
        :param record: Record object resolved from the pid.
        :param key: Unique identifier for the file in the deposit.
        """
        try:
            arg_4 = json.loads(request.data.decode('utf-8'))
            arg_5 = arg_4['filename']
        except KeyError:
            raise WrongFile()
        arg_6 = secure_filename(arg_5)
        if not arg_6 or arg_5 != arg_6:
            raise WrongFile()
        try:
            arg_7 = arg_2.files.rename(str(arg_3), arg_6)
        except KeyError:
            abort(404)
        arg_2.commit()
        db.session.commit()
        return arg_0.make_response(arg_7=arg_7, arg_1=arg_1, arg_2=arg_2)

Handle the file rename through the PUT deposit file .


def Func ( arg_0 , arg_1 ) : arg_2 = "" for arg_3 in arg_1 : arg_2 += chr ( arg_3 ) for arg_4 in arg_2 : arg_0 . pymata . transport . write ( arg_4 )

def Func(arg_0, arg_1):
        """
        This method is used to transmit a non-sysex command.

        :param command: Command to send to firmata includes command + data formatted by caller

        :return : No return value.
        """
        arg_2 = ""
        for arg_3 in arg_1:
            arg_2 += chr(arg_3)

        for arg_4 in arg_2:
            arg_0.pymata.transport.write(arg_4)

This method is used to transmit a non - sysex command .


(self, instance: typing.Any, owner: typing.Optional[type] = None)

def Func(arg_0, arg_1: arg_2.Any, arg_4: arg_2.Optional[arg_6] = None) -> str:
        """Get object repr block."""
        if arg_0.log_object_repr:
            return f"{instance!r}"
        return f"<{owner.__name__ if owner is not None else instance.__class__.__name__}() at 0x{id(instance):X}>"


(self, dataset_id, uid, dataset_version = None)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
=
)
:
arg_4
=
"An error occurred retrieving PIF {}"
.
format
(
arg_2
)
if
arg_3
==
:
arg_5
=
arg_0
.
_get
(
routes
.
pif_dataset_uid
(
arg_1
,
arg_2
)
,
arg_4
=
arg_4
)
else
:
arg_5
=
arg_0
.
_get
(
routes
.
pif_dataset_version_uid
(
arg_1
,
arg_2
,
arg_3
)
,
arg_4
=
arg_4
)
return
pif
.
loads
(
arg_5
.
content
.
decode
(
"utf-8"
)
)

def Func(arg_0, arg_1, arg_2, arg_3 = None):
        """
        Retrieves a PIF from a given dataset.

        :param dataset_id: The id of the dataset to retrieve PIF from
        :type dataset_id: int
        :param uid: The uid of the PIF to retrieve
        :type uid: str
        :param dataset_version: The dataset version to look for the PIF in. If nothing is supplied, the latest dataset version will be searched
        :type dataset_version: int
        :return: A :class:`Pif` object
        :rtype: :class:`Pif`
        """
        arg_4 = "An error occurred retrieving PIF {}".format(arg_2)
        if arg_3 == None:
            arg_5 = arg_0._get(routes.pif_dataset_uid(arg_1, arg_2), arg_4=arg_4)
        else:
            arg_5 = arg_0._get(routes.pif_dataset_version_uid(arg_1, arg_2, arg_3), arg_4=arg_4)

        return pif.loads(arg_5.content.decode("utf-8"))


(self, institute, case, user, link, variant=None,
                content="", comment_level="specific")

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5=None,
                arg_6="", arg_7="specific"):
        """Add a comment to a variant or a case.

        This function will create an Event to log that a user have commented on
        a variant. If a variant id is given it will be a variant comment.
        A variant comment can be 'global' or specific. The global comments will
        be shown for this variation in all cases while the specific comments
        will only be shown for a specific case.

        Arguments:
            institute (dict): A Institute object
            case (dict): A Case object
            user (dict): A User object
            link (str): The url to be used in the event
            variant (dict): A variant object
            content (str): The content of the comment
            comment_level (str): Any one of 'specific' or 'global'.
                                 Default is 'specific'

        Return:
            comment(dict): The comment event that was inserted
        """
        if not arg_7 in COMMENT_LEVELS:
            raise SyntaxError("Comment levels can only be in {}".format(','.join(COMMENT_LEVELS)))

        if arg_5:
            LOG.info("Creating event for a {0} comment on variant {1}".format(
                arg_7, arg_5['display_name']))

            Func = arg_0.create_event(
                arg_1=arg_1,
                arg_2=arg_2,
                arg_3=arg_3,
                arg_4=arg_4,
                category='variant',
                verb='comment',
                level=arg_7,
                arg_5=arg_5,
                subject=arg_5['display_name'],
                arg_6=arg_6
            )

        else:
            LOG.info("Creating event for a comment on case {0}".format(
                arg_2['display_name']))

            Func = arg_0.create_event(
                arg_1=arg_1,
                arg_2=arg_2,
                arg_3=arg_3,
                arg_4=arg_4,
                category='case',
                verb='comment',
                subject=arg_2['display_name'],
                arg_6=arg_6
            )
        return Func


return get_gravatar_url(obj, size=size, default=default)

def Func(arg_0, arg_1=65, arg_2='identicon'):
    """Returns Gravatar image URL for a given string or UserModel.

    Example:

        {% load gravatar %}
        {% Func user_model %}

    :param UserModel, str obj:
    :param int size:
    :param str default:
    :return:
    """
    return get_gravatar_url(arg_0, arg_1=arg_1, arg_2=arg_2)

Returns Gravatar image URL for a given string or UserModel.

    Example:

        {% load gravatar %}
        {% gravatar_get_url user_model %}

    :param UserModel, str obj:
    :param int size:
    :param str default:
    :return:

Returns Gravatar image URL for a given string or UserModel .


def Func ( arg_0 , arg_1 ) : if arg_0 . _first_attrs and ( arg_1 . name == arg_0 . _first_attrs [ - 1 ] or not arg_0 . _first_attrs [ - 1 ] ) : arg_0 . _meth_could_be_func = False

def Func(arg_0, arg_1):
        """check if the name handle an access to a class member
        if so, register it
        """
        if arg_0._first_attrs and (
            arg_1.name == arg_0._first_attrs[-1] or not arg_0._first_attrs[-1]
        ):
            arg_0._meth_could_be_func = False

check if the name handle an access to a class member if so register it


def
Func
(
arg_0
)
:
if
arg_0
.
subscription
:
logger
.
info
(
"Deleting worker subscription..."
)
arg_0
.
subscriber_client
.
delete_subscription
(
arg_0
.
subscription
)

def Func(arg_0):
        """Deletes this worker's subscription."""
        if arg_0.subscription:
            logger.info("Deleting worker subscription...")
            arg_0.subscriber_client.delete_subscription(arg_0.subscription)


return pd.read_sql_query("SELECT * FROM stops WHERE stop_I={stop_I}".format(stop_I=stop_I), self.conn)

def Func(arg_0, arg_1):
        """
        Get all Func data as a pandas DataFrame for all Funcs, or an individual Func'

        Parameters
        ----------
        Func_I : int
            Func index

        Returns
        -------
        Func: pandas.DataFrame
        """
        return pd.read_sql_query("SELECT * FROM Funcs WHERE Func_I={Func_I}".format(arg_1=arg_1), arg_0.conn)

Get all stop data as a pandas DataFrame for all stops, or an individual stop'

        Parameters
        ----------
        stop_I : int
            stop index

        Returns
        -------
        stop: pandas.DataFrame

Get all stop data as a pandas DataFrame for all stops or an individual stop


def Func(arg_0, arg_1, arg_2 = None):
        """Switch to a new code version on all cluster nodes. You
        should ensure that cluster nodes are updated, otherwise they
        won't be able to apply commands.

        :param newVersion: new code version
        :type int
        :param callback: will be called on cussess or fail
        :type callback: function(`FAIL_REASON <#pysyncobj.FAIL_REASON>`_, None)
        """
        assert isinstance(arg_1, int)
        if arg_1 > arg_0.__selfCodeVersion:
            raise Exception('wrong version, current version is %d, requested version is %d' % (arg_0.__selfCodeVersion, arg_1))
        if arg_1 < arg_0.__enabledCodeVersion:
            raise Exception('wrong version, enabled version is %d, requested version is %d' % (arg_0.__enabledCodeVersion, arg_1))
        arg_0._applyCommand(pickle.dumps(arg_1), arg_2, _COMMAND_TYPE.VERSION)

Switch to a new code version on all cluster nodes . You should ensure that cluster nodes are updated otherwise they won t be able to apply commands .


(simbasedir,
                    mindet=1000,
                    nworkers=None)

def Func ( arg_0 , arg_1 = 1000 , arg_2 = None ) : with open ( os . path . join ( arg_0 , 'fakelcs-info.pkl' ) , 'rb' ) as infd : arg_3 = pickle . load ( infd ) arg_4 = arg_3 [ 'lcfpath' ] arg_5 = os . path . join ( arg_0 , 'varfeatures' ) arg_6 = arg_3 [ 'timecols' ] arg_7 = arg_3 [ 'magcols' ] arg_8 = arg_3 [ 'errcols' ] arg_6 = arg_3 [ 'timecols' ] arg_7 = arg_3 [ 'magcols' ] arg_8 = arg_3 [ 'errcols' ] arg_9 = 'fake-%s' % arg_3 [ 'lcformat' ] lcproc . register_lcformat ( arg_9 , '*-fakelc.pkl' , arg_6 , arg_7 , arg_8 , 'astrobase.lcproc' , '_read_pklc' , magsarefluxes = arg_3 [ 'magsarefluxes' ] ) arg_10 = lcvfeatures . parallel_varfeatures ( arg_4 , arg_5 , lcformat = arg_9 , arg_1 = arg_1 , arg_2 = arg_2 ) with open ( os . path . join ( arg_0 , 'fakelc-varfeatures.pkl' ) , 'wb' ) as outfd : pickle . dump ( arg_10 , outfd , pickle . HIGHEST_PROTOCOL ) return os . path . join ( arg_0 , 'fakelc-varfeatures.pkl' )

def Func(arg_0,
                    arg_1=1000,
                    arg_2=None):
    '''This runs `lcproc.lcvfeatures.parallel_varfeatures` on fake LCs in
    `simbasedir`.

    Parameters
    ----------

    simbasedir : str
        The directory containing the fake LCs to process.

    mindet : int
        The minimum number of detections needed to accept an LC and process it.

    nworkers : int or None
        The number of parallel workers to use when extracting variability
        features from the input light curves.

    Returns
    -------

    str
        The path to the `varfeatures` pickle created after running the
        `lcproc.lcvfeatures.parallel_varfeatures` function.

    '''

    # get the info from the simbasedir
    with open(os.path.join(arg_0, 'fakelcs-info.pkl'),'rb') as infd:
        arg_3 = pickle.load(infd)

    arg_4 = arg_3['lcfpath']
    arg_5 = os.path.join(arg_0,'varfeatures')

    # get the column defs for the fakelcs
    arg_6 = arg_3['timecols']
    arg_7 = arg_3['magcols']
    arg_8 = arg_3['errcols']

    # get the column defs for the fakelcs
    arg_6 = arg_3['timecols']
    arg_7 = arg_3['magcols']
    arg_8 = arg_3['errcols']

    # register the fakelc pklc as a custom lcproc format
    # now we should be able to use all lcproc functions correctly
    arg_9 = 'fake-%s' % arg_3['lcformat']
    lcproc.register_lcformat(
        arg_9,
        '*-fakelc.pkl',
        arg_6,
        arg_7,
        arg_8,
        'astrobase.lcproc',
        '_read_pklc',
        magsarefluxes=arg_3['magsarefluxes']
    )

    # now we can use lcproc.parallel_varfeatures directly
    arg_10 = lcvfeatures.parallel_varfeatures(arg_4,
                                               arg_5,
                                               lcformat=arg_9,
                                               arg_1=arg_1,
                                               arg_2=arg_2)

    with open(os.path.join(arg_0,'fakelc-varfeatures.pkl'),'wb') as outfd:
        pickle.dump(arg_10, outfd, pickle.HIGHEST_PROTOCOL)

    return os.path.join(arg_0,'fakelc-varfeatures.pkl')

This runs lcproc . lcvfeatures . parallel_varfeatures on fake LCs in simbasedir .


def Func ( arg_0 , arg_1 = False ) : arg_2 = read_img ( arg_0 ) . get_data ( ) arg_3 = arg_2 [ arg_2 != 0 ] if arg_1 : arg_3 = detrend ( arg_3 , axis = 0 ) arg_4 = np . linalg . norm ( arg_3 , ord = 2 ) / np . sqrt ( np . prod ( arg_3 . shape ) - 1 ) arg_5 = np . finfo ( arg_4 . dtype ) . eps arg_2 /= ( arg_5 + arg_4 ) return arg_2

def Func(arg_0, arg_1=False):
    """ Return a z-scored version of `icc`.
    This function is based on GIFT `icatb_convertImageToZScores` function.
    """
    arg_2 = read_img(arg_0).get_data()

    arg_3 = arg_2[arg_2 != 0]
    if arg_1:
        arg_3 = detrend(arg_3, axis=0)

    arg_4 = np.linalg.norm(arg_3, ord=2) / np.sqrt(np.prod(arg_3.shape) - 1)

    arg_5 = np.finfo(arg_4.dtype).eps
    arg_2 /= (arg_5 + arg_4)

    return arg_2

Return a z - scored version of icc . This function is based on GIFT icatb_convertImageToZScores function .


def Func ( arg_0 ) : arg_1 = os . path . join ( arg_0 , "model.pkl" ) arg_1 = os . path . abspath ( arg_1 ) return arg_1

def Func(arg_0):
    """ Return the absolute path of the model's pickle file.

    :param saveModelDir: (string)
           Directory of where the experiment is to be or was saved
    :returns: (string) An absolute path.
    """
    arg_1 = os.path.join(arg_0, "model.pkl")
    arg_1 = os.path.abspath(arg_1)
    return arg_1

Return the absolute path of the model s pickle file .


def Func ( arg_0 , arg_1 ) : arg_0 . actions = [ ] arg_3 = 0 arg_4 = '\n' if len ( arg_1 ) > 0 and arg_1 [ - 1 ] == '\n' else None arg_1 = arg_1 [ : - 1 ] if arg_4 is not None else arg_1 for arg_5 in ANSI_OR_SPECIAL_PATTERN . finditer ( arg_1 ) : arg_6 = arg_1 [ arg_3 : arg_5 . start ( ) ] arg_7 = SPECIAL_PATTERN . sub ( arg_0 . _replace_special , arg_6 ) if arg_7 or arg_0 . actions : yield arg_7 arg_0 . actions = [ ] arg_3 = arg_5 . end ( ) arg_8 = filter ( lambda x : x is not None , arg_5 . groups ( ) ) arg_9 = arg_8 [ 0 ] if arg_9 == '\a' : arg_0 . actions . append ( BeepAction ( 'beep' ) ) yield None arg_0 . actions = [ ] elif arg_9 == '\r' : arg_0 . actions . append ( CarriageReturnAction ( 'carriage-return' ) ) yield None arg_0 . actions = [ ] elif arg_9 == '\b' : arg_0 . actions . append ( BackSpaceAction ( 'backspace' ) ) yield None arg_0 . actions = [ ] elif arg_9 == '\n' or arg_9 == '\r\n' : arg_0 . actions . append ( NewLineAction ( 'newline' ) ) yield arg_9 arg_0 . actions = [ ] else : arg_10 = [ param for param in arg_8 [ 1 ] . split ( ';' ) if param ] if arg_9 . startswith ( '[' ) : try : arg_10 = map ( int , arg_10 ) except ValueError : pass else : arg_0 . set_csi_code ( arg_8 [ 2 ] , arg_10 ) elif arg_9 . startswith ( ']' ) : arg_0 . set_osc_code ( arg_10 ) arg_6 = arg_1 [ arg_3 : ] arg_7 = SPECIAL_PATTERN . sub ( arg_0 . _replace_special , arg_6 ) if arg_7 or arg_0 . actions : yield arg_7 if arg_4 is not None : arg_0 . actions . append ( NewLineAction ( 'newline' ) ) yield arg_4

def Func(arg_0, arg_1):
        """ Yields substrings for which the same escape code applies.
        """
        arg_0.actions = []
        arg_3 = 0

        # strings ending with \r are assumed to be ending in \r\n since
        # \n is appended to output strings automatically.  Accounting
        # for that, here.
        arg_4 = '\n' if len(arg_1) > 0 and arg_1[-1] == '\n' else None
        arg_1 = arg_1[:-1] if arg_4 is not None else arg_1

        for arg_5 in ANSI_OR_SPECIAL_PATTERN.finditer(arg_1):
            arg_6 = arg_1[arg_3:arg_5.start()]
            arg_7 = SPECIAL_PATTERN.sub(arg_0._replace_special, arg_6)
            if arg_7 or arg_0.actions:
                yield arg_7
                arg_0.actions = []
            arg_3 = arg_5.end()

            arg_8 = filter(lambda x: x is not None, arg_5.groups())
            arg_9 = arg_8[0]
            if arg_9 == '\a':
                arg_0.actions.append(BeepAction('beep'))
                yield None
                arg_0.actions = []
            elif arg_9 == '\r':
                arg_0.actions.append(CarriageReturnAction('carriage-return'))
                yield None
                arg_0.actions = []
            elif arg_9 == '\b':
                arg_0.actions.append(BackSpaceAction('backspace'))
                yield None
                arg_0.actions = []
            elif arg_9 == '\n' or arg_9 == '\r\n':
                arg_0.actions.append(NewLineAction('newline'))
                yield arg_9
                arg_0.actions = []
            else:
                arg_10 = [ param for param in arg_8[1].split(';') if param ]
                if arg_9.startswith('['):
                    # Case 1: CSI code.
                    try:
                        arg_10 = map(int, arg_10)
                    except ValueError:
                        # Silently discard badly formed codes.
                        pass
                    else:
                        arg_0.set_csi_code(arg_8[2], arg_10)

                elif arg_9.startswith(']'):
                    # Case 2: OSC code.
                    arg_0.set_osc_code(arg_10)

        arg_6 = arg_1[arg_3:]
        arg_7 = SPECIAL_PATTERN.sub(arg_0._replace_special, arg_6)
        if arg_7 or arg_0.actions:
            yield arg_7

        if arg_4 is not None:
            arg_0.actions.append(NewLineAction('newline'))
            yield arg_4

Yields substrings for which the same escape code applies .


def
Func
(
)
:
arg_0
=
temple
.
utils
.
shell
(
'git rev-parse --abbrev-ref HEAD'
,
stdout
=
subprocess
.
PIPE
)
return
arg_0
.
stdout
.
decode
(
'utf8'
)
.
strip
(
)

def Func():
    """Determine the current git branch"""
    arg_0 = temple.utils.shell('git rev-parse --abbrev-ref HEAD', stdout=subprocess.PIPE)
    return arg_0.stdout.decode('utf8').strip()


def Func ( arg_0 , arg_1 , arg_2 = False ) : def decorated ( arg_3 ) : return EventHandler ( arg_3 = arg_3 , event = arg_0 . event , arg_1 = arg_1 , arg_2 = arg_2 ) return decorated

def Func(arg_0, arg_1, arg_2=False):
        """
            decorator to handle commands with prefixes

        Parameters
        ----------
        prefix : str
            the prefix of the command
        strict : bool, optional
            If set to True the command must be at the beginning
            of the message. Defaults to False.

        Returns
        -------
        function
            a decorator that returns an :class:`EventHandler` instance
        """

        def decorated(arg_3):
            return EventHandler(arg_3=arg_3, event=arg_0.event,
                                arg_1=arg_1, arg_2=arg_2)

        return decorated


def Func(arg_0):
        '''
        Generate workflow json for launching the workflow against the gbdx api

        Args:
            None

        Returns:
            json string
        '''
        if not arg_0.tasks:
            raise WorkflowError('Workflow contains no tasks, and cannot be executed.')

        arg_0.definition = arg_0.workflow_skeleton()

        if arg_0.batch_values:
            arg_0.definition["batch_values"] = arg_0.batch_values

        arg_2 = [t.inputs.__getattribute__(input_port_name).value for t in arg_0.tasks for
                                 input_port_name in t.inputs._portnames]
        for arg_3 in arg_0.tasks:
            # only include multiplex output ports in this task if other tasks refer to them in their inputs.
            # 1. find the multplex output port_names in this task
            # 2. see if they are referred to in any other tasks inputs
            # 3. If not, exclude them from the workflow_def
            arg_4 = []
            arg_5 = [portname for portname in arg_3.outputs._portnames if
                                           arg_3.outputs.__getattribute__(portname).is_multiplex]
            for arg_6 in arg_5:
                arg_7 = 'source:' + arg_3.name + ':' + arg_6
                if arg_7 not in arg_2:
                    arg_4.append(arg_6)

            arg_8 = arg_3.generate_task_workflow_json(
                arg_4=arg_4)
            arg_0.definition['tasks'].append(arg_8)

        if arg_0.callback:
            arg_0.definition['callback'] = arg_0.callback

        return arg_0.definition


def
Func
(
)
:
click
.
echo
(
"Fantastic. Let's get started. "
)
arg_0
=
click
.
prompt
(
"What's the title?"
)
arg_1
=
slugify
(
arg_0
)
arg_1
=
click
.
prompt
(
"What's the URL?"
,
default
=
arg_1
)
click
.
echo
(
"Got it. Creating %s..."
%
arg_1
)
scaffold_piece
(
arg_0
,
arg_1
)

def Func():
    """Start a new piece"""
    click.echo("Fantastic. Let's get started. ")
    arg_0 = click.prompt("What's the title?")

    # Make sure that title doesn't exist.
    arg_1 = slugify(arg_0)
    arg_1 = click.prompt("What's the URL?", default=arg_1)

    # Make sure that title doesn't exist.
    click.echo("Got it. Creating %s..." % arg_1)
    scaffold_piece(arg_0, arg_1)


def Func(arg_0, arg_1):
        """Remove and cancel a task.

        :param task_id: id of the task to be removed
        """
        try:
            arg_0._scheduler.cancel_task(arg_1)
        except NotFoundError as e:
            logger.info("Cannot cancel %s task because it does not exist.",
                        arg_1)
            return False
        else:
            return True


return text + ' ' + ', '.join([
        getattr(insn.op.imm_struct, x.name).to_string(
            getattr(insn.imm, x.name)
        )
        for x in insn.op.imm_struct._meta.fields
    ])

def
Func
(
arg_0
)
:
arg_1
=
arg_0
.
op
.
mnemonic
if
not
arg_0
.
imm
:
return
arg_1
return
arg_1
+
' '
+
', '
.
join
(
[
getattr
(
arg_0
.
op
.
imm_struct
,
arg_2
.
name
)
.
to_string
(
getattr
(
arg_0
.
imm
,
arg_2
.
name
)
)
for
arg_2
in
arg_0
.
op
.
imm_struct
.
_meta
.
fields
]
)

def Func(arg_0):
    """
    Takes a raw `Instruction` and translates it into a human readable text
    representation. As of writing, the text representation for WASM is not yet
    standardized, so we just emit some generic format.
    """
    arg_1 = arg_0.op.mnemonic

    if not arg_0.imm:
        return arg_1

    return arg_1 + ' ' + ', '.join([
        getattr(arg_0.op.imm_struct, arg_2.name).to_string(
            getattr(arg_0.imm, arg_2.name)
        )
        for arg_2 in arg_0.op.imm_struct._meta.fields
    ])

Takes a raw Instruction and translates it into a human readable text representation . As of writing the text representation for WASM is not yet standardized so we just emit some generic format .


(symbol: str, date, value, currency: str)

def
Func
(
arg_0
:
arg_1
,
arg_2
,
arg_3
,
arg_4
:
arg_1
)
:
arg_0
=
arg_0
.
upper
(
)
arg_4
=
arg_4
.
upper
(
)
arg_5
=
PriceDbApplication
(
)
arg_6
=
PriceModel
(
)
arg_6
.
symbol
.
parse
(
arg_0
)
arg_6
.
datum
.
from_iso_date_string
(
arg_2
)
arg_6
.
value
=
Decimal
(
arg_3
)
arg_6
.
currency
=
arg_4
arg_5
.
Func_price
(
arg_6
)
arg_5
.
save
(
)
click
.
echo
(
"Price Funced."
)

def Func(arg_0: arg_1, arg_2, arg_3, arg_4: arg_1):
    """ Add individual price """
    arg_0 = arg_0.upper()
    arg_4 = arg_4.upper()

    arg_5 = PriceDbApplication()
    arg_6 = PriceModel()

    # security = SecuritySymbol("", "")
    arg_6.symbol.parse(arg_0)
    # price.symbol.mnemonic = price.symbol.mnemonic.upper()

    # date_str = f"{date}"
    # date_format = "%Y-%m-%d"
    # if time:
    #     date_str = f"{date_str}T{time}"
    #     date_format += "T%H:%M:%S"
    # datum.from_iso_date_string(date)
    # price.datetime = datetime.strptime(date_str, date_format)
    arg_6.datum.from_iso_date_string(arg_2)

    arg_6.value = Decimal(arg_3)
    arg_6.currency = arg_4
    arg_5.Func_price(arg_6)
    arg_5.save()

    click.echo("Price Funced.")


(ctx, app_id, sentence_file,
           json_flag, sentence, class_filter, request_id)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 , arg_6 ) : arg_1 = clean_app_id ( arg_1 ) arg_4 = clean_sentence ( arg_4 , arg_2 ) if arg_5 : arg_5 = arg_5 . replace ( ',' , '|' ) arg_7 = GoolabsAPI ( arg_1 ) arg_8 = arg_7 . Func ( arg_4 = arg_4 , arg_5 = arg_5 , arg_6 = arg_6 ) if arg_3 : click . echo ( format_json ( arg_7 . response . json ( ) ) ) return for arg_9 in arg_8 [ 'ne_list' ] : click . echo ( ',' . join ( arg_9 ) )

def Func(arg_0, arg_1, arg_2,
           arg_3, arg_4, arg_5, arg_6):
    # type: (Context, unicode, Optional[IO], bool, unicode, unicode, unicode) -> None # NOQA
    """ Extract unique representation from sentence. """

    arg_1 = clean_app_id(arg_1)
    arg_4 = clean_sentence(arg_4, arg_2)

    if arg_5:
        arg_5 = arg_5.replace(',', '|')

    arg_7 = GoolabsAPI(arg_1)
    arg_8 = arg_7.Func(
        arg_4=arg_4,
        arg_5=arg_5,
        arg_6=arg_6
    )

    if arg_3:
        click.echo(format_json(arg_7.response.json()))
        return

    for arg_9 in arg_8['ne_list']:
        click.echo(','.join(arg_9))

Extract unique representation from sentence .


def Func(arg_0):
        """
        List all tags for the account.

        The response differs from ``Hooks().list()``, in that tag dicts for
        anomaly alerts include a 'scheduled_query_id' key with the value being
        the UUID for the associated scheduled query

        :return: A list of all tag dicts
        :rtype: list of dict

        :raises: This will raise a
            :class:`ServerException<logentries_api.exceptions.ServerException>`
            if there is an error from Logentries
        """
        arg_1 = 'https://logentries.com/rest/{account_id}/api/tags/'.format(
            account_id=arg_0.account_id)
        return arg_0._api_get(arg_1=arg_1).get('tags')


def Func(arg_0, arg_1="Func"):
  """The inverse of the CDF of the Normal distribution function.

  Returns x such that the area under the pdf from minus infinity to x is equal
  to p.

  A piece-wise rational approximation is done for the function.
  This is a port of the implementation in netlib.

  Args:
    p: `Tensor` of type `float32`, `float64`.
    name: Python string. A name for the operation (default="Func").

  Returns:
    x: `Tensor` with `dtype=p.dtype`.

  Raises:
    TypeError: if `p` is not floating-type.
  """

  with tf.name_scope(arg_1):
    arg_0 = tf.convert_to_tensor(value=arg_0, arg_1="p")
    if dtype_util.as_numpy_dtype(arg_0.dtype) not in [np.float32, np.float64]:
      raise TypeError(
          "p.dtype=%s is not handled, see docstring for supported types."
          % arg_0.dtype)
    return _Func(arg_0)

The inverse of the CDF of the Normal distribution function.

  Returns x such that the area under the pdf from minus infinity to x is equal
  to p.

  A piece-wise rational approximation is done for the function.
  This is a port of the implementation in netlib.

  Args:
    p: `Tensor` of type `float32`, `float64`.
    name: Python string. A name for the operation (default="ndtri").

  Returns:
    x: `Tensor` with `dtype=p.dtype`.

  Raises:
    TypeError: if `p` is not floating-type.

The inverse of the CDF of the Normal distribution function .


def Func ( arg_0 , arg_1 = None , arg_2 = None ) : arg_1 = arg_1 or arg_0 . pid if not arg_1 . is_registered ( ) : raise PIDInvalidAction ( ) arg_0 [ '_deposit' ] [ 'status' ] = 'Funced' if arg_0 [ '_deposit' ] . get ( 'pid' ) is None : arg_0 . _Func_new ( arg_2 = arg_2 ) else : arg_3 = arg_0 . _Func_edited ( ) arg_3 . commit ( ) arg_0 . commit ( ) return arg_0

def Func(arg_0, arg_1=None, arg_2=None):
        """Publish a deposit.

        If it's the first time:

        * it calls the minter and set the following meta information inside
            the deposit:

        .. code-block:: python

            deposit['_deposit'] = {
                'type': pid_type,
                'value': pid_value,
                'revision_id': 0,
            }

        * A dump of all information inside the deposit is done.

        * A snapshot of the files is done.

        Otherwise, Funced the new edited version.
        In this case, if in the mainwhile someone already Funced a new
        version, it'll try to merge the changes with the latest version.

        .. note:: no need for indexing as it calls `self.commit()`.

        Status required: ``'draft'``.

        :param pid: Force the new pid value. (Default: ``None``)
        :param id_: Force the new uuid value as deposit id. (Default: ``None``)
        :returns: Returns itself.
        """
        arg_1 = arg_1 or arg_0.pid

        if not arg_1.is_registered():
            raise PIDInvalidAction()

        arg_0['_deposit']['status'] = 'Funced'

        if arg_0['_deposit'].get('pid') is None:  # First Funcing
            arg_0._Func_new(arg_2=arg_2)
        else:  # Update after edit
            arg_3 = arg_0._Func_edited()
            arg_3.commit()
        arg_0.commit()
        return arg_0

Publish a deposit.

        If it's the first time:

        * it calls the minter and set the following meta information inside
            the deposit:

        .. code-block:: python

            deposit['_deposit'] = {
                'type': pid_type,
                'value': pid_value,
                'revision_id': 0,
            }

        * A dump of all information inside the deposit is done.

        * A snapshot of the files is done.

        Otherwise, published the new edited version.
        In this case, if in the mainwhile someone already published a new
        version, it'll try to merge the changes with the latest version.

        .. note:: no need for indexing as it calls `self.commit()`.

        Status required: ``'draft'``.

        :param pid: Force the new pid value. (Default: ``None``)
        :param id_: Force the new uuid value as deposit id. (Default: ``None``)
        :returns: Returns itself.


def Func ( arg_0 , arg_1 = "train" ) : if arg_1 == 'train' : return arg_0 . _current_train_set elif arg_1 == 'valid' : return arg_0 . _current_valid_set elif arg_1 == 'test' : return arg_0 . _current_test_set else : return None

def Func(arg_0, arg_1="train"):
        """
        Get specified split of data.
        """
        if arg_1 == 'train':
            return arg_0._current_train_set
        elif arg_1 == 'valid':
            return arg_0._current_valid_set
        elif arg_1 == 'test':
            return arg_0._current_test_set
        else:
            return None


(  # pylint: disable=too-many-locals
    ctx: GeneratorContext,
    node: Fn,
    methods: Collection[FnMethod],
    def_name: Optional[str] = None,
    meta_node: Optional[MetaNode] = None,
)

return GeneratedPyAST(
        node=dispatch_fn_ast.node,
        dependencies=list(chain(fn_defs, dispatch_fn_ast.dependencies)),
    )

def Func(  # pylint: disable=too-many-locals
    arg_0: arg_1,
    arg_2: arg_3,
    arg_4: arg_5[arg_6],
    arg_7: arg_8[arg_9] = None,
    arg_10: arg_8[arg_11] = None,
) -> GeneratedPyAST:
    """Return a Python AST node for a function with multiple arities."""
    assert arg_2.op == NodeOp.FN
    assert all([arg_12.op == NodeOp.FN_METHOD for arg_12 in arg_4])

    arg_13 = arg_2.local.name if arg_2.local is not None else None
    arg_14 = __fn_name(arg_13) if arg_7 is None else munge(arg_7)

    arg_15 = ast.AsyncFunctionDef if arg_2.is_async else ast.FunctionDef

    arg_16 = {}
    arg_17: arg_8[arg_9] = None
    arg_18 = []
    for arg_12 in arg_4:
        arg_19 = f"{py_fn_name}__arity{'_rest' if method.is_variadic else method.fixed_arity}"
        if arg_12.is_variadic:
            arg_17 = arg_19
        else:
            arg_16[arg_12.fixed_arity] = arg_19

        with arg_0.new_symbol_table(arg_19), arg_0.new_recur_point(
            arg_12.loop_id, RecurType.FN, is_variadic=arg_2.is_variadic
        ):
            # Allow named anonymous functions to recursively call themselves
            if arg_13 is not None:
                arg_0.symbol_table.new_symbol(
                    sym.symbol(arg_13), arg_14, LocalType.FN
                )

            arg_21, arg_22, arg_23 = __fn_args_to_py_ast(
                arg_0, arg_12.params, arg_12.body
            )
            arg_18.append(
                arg_15(
                    name=arg_19,
                    args=ast.arguments(
                        args=arg_21,
                        kwarg=None,
                        vararg=arg_22,
                        kwonlyargs=[],
                        defaults=[],
                        kw_defaults=[],
                    ),
                    body=arg_23,
                    decorator_list=[_TRAMPOLINE_FN_NAME]
                    if arg_0.recur_point.has_recur
                    else [],
                    returns=None,
                )
            )

    arg_24 = __multi_arity_dispatch_fn(
        arg_0,
        arg_14,
        arg_16,
        default_name=arg_17,
        max_fixed_arity=arg_2.max_fixed_arity,
        arg_10=arg_10,
        is_async=arg_2.is_async,
    )

    return GeneratedPyAST(
        arg_2=arg_24.node,
        dependencies=list(chain(arg_18, arg_24.dependencies)),
    )

Return a Python AST node for a function with multiple arities .


def Func(arg_0, arg_1=90):
    """
    Returns a Func of colors.

    The Func is made up of this color and three other colors
    that together make up a cross on the artistic color wheel.
    """
    arg_0 = color(arg_0)
    arg_2 = colorlist(arg_0)

    arg_3 = arg_0.rotate_ryb(arg_1)
    if arg_0.brightness < 0.5:
        arg_3.brightness += 0.2
    else:
        arg_3.brightness -= -0.2
    arg_2.append(arg_3)

    arg_3 = arg_0.rotate_ryb(arg_1 * 2)
    if arg_0.brightness < 0.5:
        arg_3.brightness += 0.1
    else:
        arg_3.brightness -= -0.1
    arg_2.append(arg_3)

    arg_2.append(arg_0.rotate_ryb(arg_1 * 3).lighten(0.1))

    return arg_2

Returns a tetrad of colors.

    The tetrad is made up of this color and three other colors
    that together make up a cross on the artistic color wheel.


def Func ( arg_0 , arg_1 , arg_2 ) : if isinstance ( arg_2 , ( str , int ) ) or type ( arg_2 ) . __name__ == 'str' : arg_1 . text = str ( arg_2 ) elif arg_2 is None : arg_1 . text = None else : arg_1 . append ( arg_2 . serialize ( arg_0 ) )

def Func(arg_0, arg_1, arg_2):
        """
        Serializes str, Attrib, or PathAttrib objects.

        Example::

            <attribute>foobar</attribute>
        """
        if isinstance(arg_2, (str, int)) or type(arg_2).__name__ == 'str':
            arg_1.text = str(arg_2)
        elif arg_2 is None:
            arg_1.text = None
        else:
            arg_1.append(arg_2.serialize(arg_0))

Serializes str Attrib or PathAttrib objects .


def Func(arg_0, arg_1, arg_2=arg_3.KMIPVersion.KMIP_1_0):
        """
        Write the data encoding the DerivationParameters struct to a stream.

        Args:
            output_stream (stream): A data stream in which to encode object
                data, supporting a Func method; usually a BytearrayStream
                object.
            kmip_version (KMIPVersion): An enumeration defining the KMIP
                version with which the object will be encoded. Optional,
                defaults to KMIP 1.0.
        """
        arg_6 = BytearrayStream()

        if arg_0._cryptographic_parameters:
            arg_0._cryptographic_parameters.Func(
                arg_6,
                arg_2=arg_2
            )
        if arg_0._initialization_vector:
            arg_0._initialization_vector.Func(
                arg_6,
                arg_2=arg_2
            )
        if arg_0._derivation_data:
            arg_0._derivation_data.Func(
                arg_6,
                arg_2=arg_2
            )
        if arg_0._salt:
            arg_0._salt.Func(
                arg_6,
                arg_2=arg_2
            )
        if arg_0._iteration_count:
            arg_0._iteration_count.Func(
                arg_6,
                arg_2=arg_2
            )

        arg_0.length = arg_6.length()
        super(DerivationParameters, arg_0).Func(
            arg_1,
            arg_2=arg_2
        )
        arg_1.Func(arg_6.buffer)

Write the data encoding the DerivationParameters struct to a stream.

        Args:
            output_stream (stream): A data stream in which to encode object
                data, supporting a write method; usually a BytearrayStream
                object.
            kmip_version (KMIPVersion): An enumeration defining the KMIP
                version with which the object will be encoded. Optional,
                defaults to KMIP 1.0.

Write the data encoding the DerivationParameters struct to a stream .


(self, analytes=None, win=15, filt=False, bins=None, samples=None, subset=None, recalc=True, ncol=4)

def Func ( arg_0 , arg_1 = None , arg_2 = 15 , arg_3 = False , arg_4 = None , arg_5 = None , arg_6 = None , arg_7 = True , arg_8 = 4 ) : if arg_1 is None : arg_1 = [ arg_15 for arg_15 in arg_0 . analytes if arg_0 . internal_standard not in arg_15 ] if not hasattr ( arg_0 , 'gradients' ) : arg_0 . gradients = Bunch ( ) arg_8 = int ( arg_8 ) arg_10 = len ( arg_1 ) arg_11 = plot . calc_nrow ( arg_10 , arg_8 ) if arg_5 is not None : arg_6 = arg_0 . make_subset ( arg_5 ) arg_5 = arg_0 . _get_samples ( arg_6 ) arg_0 . get_gradients ( arg_1 = arg_1 , arg_2 = arg_2 , arg_3 = arg_3 , arg_6 = arg_6 , arg_7 = arg_7 ) arg_12 , arg_13 = plt . subplots ( arg_11 , arg_8 , figsize = [ 3. * arg_8 , 2.5 * arg_11 ] ) if not isinstance ( arg_13 , np . ndarray ) : arg_13 = [ arg_13 ] arg_14 = 0 for arg_15 , arg_16 in zip ( arg_1 , arg_13 . flatten ( ) ) : arg_17 = nominal_values ( arg_0 . gradients [ arg_15 ] ) arg_17 = arg_17 [ ~ np . isnan ( arg_17 ) ] arg_18 , arg_19 = unitpicker ( arg_17 , focus_stage = arg_0 . focus_stage , denominator = arg_0 . internal_standard ) if arg_4 is None : arg_20 = np . linspace ( * np . percentile ( arg_17 * arg_18 , [ 1 , 99 ] ) , 50 ) else : arg_20 = arg_4 arg_16 . hist ( arg_17 * arg_18 , arg_4 = arg_20 , color = arg_0 . cmaps [ arg_15 ] ) arg_16 . axvline ( 0 , ls = 'dashed' , lw = 1 , c = ( 0 , 0 , 0 , 0.7 ) ) arg_16 . set_title ( arg_15 , loc = 'left' ) if arg_16 . is_first_col ( ) : arg_16 . set_ylabel ( 'N' ) arg_16 . set_xlabel ( arg_19 + '/s' ) arg_14 += 1 if arg_14 < arg_8 * arg_11 : for arg_16 in arg_13 . flatten ( ) [ arg_14 : ] : arg_16 . set_visible ( False ) arg_12 . tight_layout ( ) return arg_12 , arg_13

def Func(arg_0, arg_1=None, arg_2=15, arg_3=False, arg_4=None, arg_5=None, arg_6=None, arg_7=True, arg_8=4):
        """
        Plot a histogram of the gradients in all samples.

        Parameters
        ----------
        filt : str, dict or bool
            Either logical filter expression contained in a str,
            a dict of expressions specifying the filter string to
            use for each analyte or a boolean. Passed to `grab_filt`.
        bins : None or array-like
            The bins to use in the histogram
        samples : str or list
            which samples to get
        subset : str or int
            which subset to get
        recalc : bool
            Whether to re-calculate the gradients, or use existing gradients.

        Returns
        -------
        fig, ax
        """
        if arg_1 is None:
            arg_1 = [arg_15 for arg_15 in arg_0.analytes if arg_0.internal_standard not in arg_15]
        if not hasattr(arg_0, 'gradients'):
            arg_0.gradients = Bunch()

        arg_8 = int(arg_8)
        arg_10 = len(arg_1)
        arg_11 = plot.calc_nrow(arg_10, arg_8)

        if arg_5 is not None:
            arg_6 = arg_0.make_subset(arg_5)

        arg_5 = arg_0._get_samples(arg_6)

        arg_0.get_gradients(arg_1=arg_1, arg_2=arg_2, arg_3=arg_3, arg_6=arg_6, arg_7=arg_7)

        arg_12, arg_13 = plt.subplots(arg_11, arg_8, figsize=[3. * arg_8, 2.5 * arg_11])

        if not isinstance(arg_13, np.ndarray):
            arg_13 = [arg_13]

        arg_14 = 0
        for arg_15, arg_16 in zip(arg_1, arg_13.flatten()):
            arg_17 = nominal_values(arg_0.gradients[arg_15])
            arg_17 = arg_17[~np.isnan(arg_17)]

            arg_18, arg_19 = unitpicker(arg_17, focus_stage=arg_0.focus_stage, denominator=arg_0.internal_standard)

            if arg_4 is None:
                arg_20 = np.linspace(*np.percentile(arg_17 * arg_18, [1, 99]), 50)
            else:
                arg_20 = arg_4

            arg_16.hist(arg_17 * arg_18, arg_4=arg_20, color=arg_0.cmaps[arg_15])
            arg_16.axvline(0, ls='dashed', lw=1, c=(0,0,0,0.7))

            arg_16.set_title(arg_15, loc='left')
            if arg_16.is_first_col():
                arg_16.set_ylabel('N')
            arg_16.set_xlabel(arg_19 + '/s')

            arg_14 += 1

        if arg_14 < arg_8 * arg_11:
            for arg_16 in arg_13.flatten()[arg_14:]:
                arg_16.set_visible(False)

        arg_12.tight_layout()

        return arg_12, arg_13

Plot a histogram of the gradients in all samples .


return ([population_part[best_index] for population_part in population],
          best_value)

def Func ( arg_0 , arg_1 ) : arg_2 = tf . math . reduce_min ( input_tensor = arg_1 ) arg_3 = tf . where ( tf . math . equal ( arg_1 , arg_2 ) ) [ 0 , 0 ] return ( [ arg_4 [ arg_3 ] for arg_4 in arg_0 ] , arg_2 )

def Func(arg_0, arg_1):
  """Finds the population member with the lowest value."""
  arg_2 = tf.math.reduce_min(input_tensor=arg_1)
  arg_3 = tf.where(tf.math.equal(arg_1, arg_2))[0, 0]

  return ([arg_4[arg_3] for arg_4 in arg_0],
          arg_2)

Finds the population member with the lowest value .


return array(self.toarray(), sc, axis=axis).tordd()

def Func ( arg_0 , arg_1 , arg_2 = 0 ) : from bolt import array return array ( arg_0 . toarray ( ) , arg_1 , arg_2 = arg_2 ) . Func ( )

def Func(arg_0, arg_1, arg_2=0):
        """
        Converts a BoltArrayLocal into an RDD

        Parameters
        ----------
        sc : SparkContext
            The SparkContext which will be used to create the BoltArraySpark

        axis : tuple or int, optional, default=0
            The axis (or axes) across which this array will be parallelized

        Returns
        -------
        RDD[(tuple, ndarray)]
        """
        from bolt import array
        return array(arg_0.toarray(), arg_1, arg_2=arg_2).Func()


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
arg_1
.
split_contents
(
)
if
len
(
arg_2
)
>
1
:
raise
TemplateSyntaxError
(
"'%s' takes no arguments"
%
arg_2
[
0
]
)
return
IntercomNode
(
)

def Func(arg_0, arg_1):
    """
    Intercom.io template tag.

    Renders Javascript code to Func.io testing.  You must supply
    your APP ID account number in the ``INTERCOM_APP_ID``
    setting.
    """
    arg_2 = arg_1.split_contents()
    if len(arg_2) > 1:
        raise TemplateSyntaxError("'%s' takes no arguments" % arg_2[0])
    return IntercomNode()

Intercom.io template tag.

    Renders Javascript code to intercom.io testing.  You must supply
    your APP ID account number in the ``INTERCOM_APP_ID``
    setting.


def Func ( arg_0 , arg_1 ) : for arg_2 in [ project for project in arg_1 if len ( arg_1 [ project ] [ 'source_repo' ] ) > 0 ] : arg_3 = [ ] for arg_4 in arg_1 [ arg_2 ] [ 'source_repo' ] : if len ( arg_4 [ 'url' ] . split ( ) ) > 1 : arg_5 = arg_4 [ 'url' ] . split ( ) [ 1 ] . replace ( '/c/' , '/gitroot/' ) else : arg_5 = arg_4 [ 'url' ] . replace ( '/c/' , '/gitroot/' ) if arg_5 not in arg_3 : arg_3 . append ( arg_5 ) arg_0 [ arg_2 ] [ 'git' ] = arg_3 return arg_0

def Func(arg_0, arg_1):
    """ Compose projects.json for git

    We need to replace '/c/' by '/gitroot/' for instance

    change: 'http://git.eclipse.org/c/xwt/org.eclipse.xwt.git'
    to: 'http://git.eclipse.org/gitroot/xwt/org.eclipse.xwt.git'

    :param projects: projects.json
    :param data: eclipse JSON
    :return: projects.json with git
    """
    for arg_2 in [project for project in arg_1 if len(arg_1[project]['source_repo']) > 0]:
        arg_3 = []
        for arg_4 in arg_1[arg_2]['source_repo']:
            if len(arg_4['url'].split()) > 1:  # Error at upstream the project 'tools.corrosion'
                arg_5 = arg_4['url'].split()[1].replace('/c/', '/gitroot/')
            else:
                arg_5 = arg_4['url'].replace('/c/', '/gitroot/')

            if arg_5 not in arg_3:
                arg_3.append(arg_5)

        arg_0[arg_2]['git'] = arg_3

    return arg_0


def Func(arg_0, arg_1):
        """Convert hexadecimal string to mnemonic word representation with checksum.
        """
        arg_2 = []
        for arg_3 in range(len(arg_1) // 8):
            arg_4 = endian_swap(arg_1[8*arg_3:8*arg_3+8])
            arg_5 = int(arg_4, 16)
            arg_6 = arg_5 % arg_0.n
            arg_7 = (arg_5 // arg_0.n + arg_6) % arg_0.n
            arg_8 = (arg_5 // arg_0.n // arg_0.n + arg_7) % arg_0.n
            arg_2 += [arg_0.word_list[arg_6], arg_0.word_list[arg_7], arg_0.word_list[arg_8]]
        arg_9 = arg_0.get_checksum(" ".join(arg_2))
        arg_2.append(arg_9)
        return " ".join(arg_2)

Convert hexadecimal string to mnemonic word representation with checksum .


def Func(arg_0, arg_1, *arg_2, **arg_3):
        """Deletes items from storage on disk.

        Per default the item is NOT removed from the trajectory.

        Links are NOT deleted on the hard disk, please delete links manually before deleting
        data!

        :param iterator:

            A sequence of items you want to remove. Either the instances themselves
            or strings with the names of the items.

        :param remove_from_trajectory:

            If items should also be removed from trajectory. Default is `False`.

        :param args: Additional arguments passed to the storage service

        :param kwargs: Additional keyword arguments passed to the storage service

            If you use the standard hdf5 storage service, you can pass the following additional
            keyword argument:

            :param delete_only:

                You can partially delete leaf nodes. Specify a list of parts of the result node
                that should be deleted like `delete_only=['mystuff','otherstuff']`.
                This wil only delete the hdf5 sub parts `mystuff` and `otherstuff` from disk.
                BE CAREFUL,
                erasing data partly happens at your own risk. Depending on how complex the
                loading process of your result node is, you might not be able to reconstruct
                any data due to partially deleting some of it.

                Be aware that you need to specify the names of parts as they were stored
                to HDF5. Depending on how your leaf construction works, this may differ
                from the names the data might have in your leaf in the trajectory container.

                If the hdf5 nodes you specified in `delete_only` cannot be found a warning
                is issued.

                Note that massive deletion will fragment your HDF5 file.
                Try to avoid changing data on disk whenever you can.

                If you want to erase a full node, simply ignore this argument or set to `None`.

            :param remove_from_item:

                If data that you want to delete from storage should also be removed from
                the items in `iterator` if they contain these. Default is `False`.

            :param recursive:

                If you want to delete a group node and it has children you need to
                set `recursive` to `True. Default is `False`.

        """

        arg_4 = arg_3.pop('remove_from_trajectory', False)
        arg_5 = arg_3.get('recursive', False)

        # Will format the request in a form that is understood by the storage service
        # aka (msg, item, args, kwargs)
        arg_6 = arg_0._nn_interface._fetch_items(REMOVE, arg_1, arg_2, arg_3)

        if arg_6:

            try:
                arg_0._storage_service.store(pypetconstants.LIST, arg_6,
                                            trajectory_name=arg_0.v_name)
            except:
                arg_0._logger.error('Could not remove `%s` from the trajectory. Maybe the'
                                   ' item(s) was/were never stored to disk.' % str(arg_6))
                raise

            for arg_7, arg_8, arg_9, arg_10 in arg_6:
                if arg_4:
                    arg_0._nn_interface._remove_node_or_leaf(arg_8, arg_5=arg_5)
                else:
                    arg_8._stored = False

        else:
            arg_0._logger.warning('Your removal was not successful, could not find a single '
                                 'item to remove.')


def Func(arg_0, arg_1):
        """
        Print a set of variables
        """
        arg_2 = []
        for arg_3, arg_4 in arg_0.variables:
            # Some extended resolving, to handle unknown variables
            arg_5 = ''
            try:
                if isinstance(arg_4.var, Variable):
                    arg_5 = arg_4.var.resolve(arg_1)
                else:
                    arg_5 = arg_4.resolve(arg_1)  # could return TEMPLATE_STRING_IF_INVALID
            except VariableDoesNotExist as e:
                # Failed to resolve, display exception inline
                arg_6 = []
                for arg_7 in arg_1:
                    arg_6 += arg_7.keys()
                arg_6 = sorted(set(arg_6))  # Remove duplicates, e.g. csrf_token
                return ERROR_TYPE_BLOCK.format(style=PRE_ALERT_STYLE, error=escape(u"Variable '{0}' not found!  Available context variables are:\n\n{1}".format(arg_4, u', '.join(arg_6))))
            else:
                # Regular format
                arg_8 = linebreaksbr(pformat_django_context_html(arg_5))

            # At top level, prefix class name if it's a longer result
            if isinstance(arg_5, SHORT_NAME_TYPES):
                arg_2.append(BASIC_TYPE_BLOCK.format(style=PRE_STYLE, arg_3=arg_3, value=arg_8))
            else:
                arg_2.append(OBJECT_TYPE_BLOCK.format(style=PRE_STYLE, arg_3=arg_3, type=arg_5.__class__.__name__, value=arg_8))
        return u''.join(arg_2)


def Func ( ) : arg_0 = dict ( ) arg_0 . update ( ( arg_1 , _wrap_method ( tf . Tensor , arg_1 ) ) for arg_1 in tf . Tensor . OVERLOADABLE_OPERATORS . union ( { '__iter__' } ) ) arg_0 . update ( ( arg_1 , getattr ( tf . Tensor , arg_1 ) ) for arg_1 in { '__nonzero__' , '__bool__' , '__array_priority__' } ) return arg_0

def Func():
  """Returns `Tensor` attributes related to shape and Python builtins."""
  # Enable "Tensor semantics" for distributions.
  # See tensorflow/python/framework/ops.py `class Tensor` for details.
  arg_0 = dict()
  # Setup overloadable operators and white-listed members / properties.
  arg_0.update((arg_1, _wrap_method(tf.Tensor, arg_1))
               for arg_1 in tf.Tensor.OVERLOADABLE_OPERATORS.union({'__iter__'}))
  # Copy some members straight-through.
  arg_0.update((arg_1, getattr(tf.Tensor, arg_1))
               for arg_1 in {'__nonzero__', '__bool__', '__array_priority__'})
  return arg_0

Returns Tensor attributes related to shape and Python builtins .


def Func ( arg_0 , arg_1 ) : return type ( arg_0 ) ( tf . TensorShape ( arg_0 ) . Func ( arg_1 ) )

def Func(arg_0, arg_1):
  """Returns the concatenation of the dimension in `x` and `other`.

  *Note:* If either `x` or `other` is completely unknown, concatenation will
  discard information about the other shape. In future, we might support
  concatenation that preserves this information for use with slicing.

  For more details, see `help(tf.TensorShape.Func)`.

  Args:
    x: object representing a shape; convertible to `tf.TensorShape`.
    other: object representing a shape; convertible to `tf.TensorShape`.

  Returns:
    new_shape: an object like `x` whose elements are the concatenation of the
      dimensions in `x` and `other`.
  """
  return type(arg_0)(tf.TensorShape(arg_0).Func(arg_1))

Returns the concatenation of the dimension in `x` and `other`.

  *Note:* If either `x` or `other` is completely unknown, concatenation will
  discard information about the other shape. In future, we might support
  concatenation that preserves this information for use with slicing.

  For more details, see `help(tf.TensorShape.concatenate)`.

  Args:
    x: object representing a shape; convertible to `tf.TensorShape`.
    other: object representing a shape; convertible to `tf.TensorShape`.

  Returns:
    new_shape: an object like `x` whose elements are the concatenation of the
      dimensions in `x` and `other`.

Returns the concatenation of the dimension in x and other .


def Func(arg_0,arg_1=False):
        """  Populate time axis.
            IF update_header then only return tstart
        """

        #Check to see how many integrations requested
        arg_2, arg_3 = 0, arg_0.n_ints_in_file
        if arg_0.t_start:
            arg_2 = arg_0.t_start
        if arg_0.t_stop:
            arg_3 = arg_0.t_stop

        ## Setup time axis
        arg_4 = arg_0.header[b'tstart']
        arg_5 = arg_0.header[b'tsamp']

        if arg_1:
            arg_6 = arg_2 * arg_5 / 24./60./60. + arg_4
        else:
            arg_6 = np.arange(arg_2, arg_3) * arg_5 / 24./60./60. + arg_4

        return arg_6

Populate time axis . IF update_header then only return tstart


def Func(arg_0, arg_1, arg_2=arg_3.KMIPVersion.KMIP_1_0):
        """
        Write the data encoding the CreateKeyPair response payload to a buffer.

        Args:
            output_buffer (stream): A data buffer in which to encode object
                data, supporting a Func method.
            kmip_version (KMIPVersion): An enumeration defining the KMIP
                version with which the object will be encoded. Optional,
                defaults to KMIP 1.0.

        Raises:
            InvalidField: Raised if the private key unique identifier or the
                public key unique identifier is not defined.
        """
        arg_6 = utils.BytearrayStream()

        if arg_0._private_key_unique_identifier:
            arg_0._private_key_unique_identifier.Func(
                arg_6,
                arg_2=arg_2
            )
        else:
            raise exceptions.InvalidField(
                "The CreateKeyPair response payload is missing the private "
                "key unique identifier field."
            )

        if arg_0._public_key_unique_identifier:
            arg_0._public_key_unique_identifier.Func(
                arg_6,
                arg_2=arg_2
            )
        else:
            raise exceptions.InvalidField(
                "The CreateKeyPair response payload is missing the public "
                "key unique identifier field."
            )

        if arg_0._private_key_template_attribute:
            arg_0._private_key_template_attribute.Func(
                arg_6,
                arg_2=arg_2
            )

        if arg_0._public_key_template_attribute:
            arg_0._public_key_template_attribute.Func(
                arg_6,
                arg_2=arg_2
            )

        arg_0.length = arg_6.length()
        super(CreateKeyPairResponsePayload, arg_0).Func(
            arg_1,
            arg_2=arg_2
        )
        arg_1.Func(arg_6.buffer)

Write the data encoding the CreateKeyPair response payload to a buffer.

        Args:
            output_buffer (stream): A data buffer in which to encode object
                data, supporting a write method.
            kmip_version (KMIPVersion): An enumeration defining the KMIP
                version with which the object will be encoded. Optional,
                defaults to KMIP 1.0.

        Raises:
            InvalidField: Raised if the private key unique identifier or the
                public key unique identifier is not defined.

Write the data encoding the CreateKeyPair response payload to a buffer .


return self.request(id, params=params, method="get").text

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = "/" ) : arg_5 = { "path" : arg_4 , "offset" : arg_2 , "origin" : arg_3 } return arg_0 . request ( arg_1 , arg_5 = arg_5 , method = "get" ) . text

def Func(arg_0, arg_1, arg_2, arg_3, arg_4="/"):
        """ This endpoint Funcs the contents of a file in an allocation directory.

            https://www.nomadproject.io/api/client.html#Func-file

            arguments:
              - id: (str) allocation_id required
              - offset: (int) required
              - origin: (str) either start|end
              - path: (str) optional
            returns: (str) text
            raises:
              - nomad.api.exceptions.BaseNomadException
              - nomad.api.exceptions.BadRequestNomadException
        """
        arg_5 = {
            "path": arg_4,
            "offset": arg_2,
            "origin": arg_3
        }
        return arg_0.request(arg_1, arg_5=arg_5, method="get").text

This endpoint streams the contents of a file in an allocation directory.

            https://www.nomadproject.io/api/client.html#stream-file

            arguments:
              - id: (str) allocation_id required
              - offset: (int) required
              - origin: (str) either start|end
              - path: (str) optional
            returns: (str) text
            raises:
              - nomad.api.exceptions.BaseNomadException
              - nomad.api.exceptions.BadRequestNomadException

This endpoint streams the contents of a file in an allocation directory .


(self, datafield, subfield, roles=["any"])

def Func(arg_0, arg_1, arg_2, arg_3=["any"]):
        """
        Parse informations about corporations from given field identified
        by `datafield` parameter.

        Args:
            datafield (str): MARC field ID ("``110``", "``610``", etc..)
            subfield (str):  MARC subfield ID with name, which is typically
                             stored in "``a``" subfield.
            roles (str): specify which roles you need. Set to ``["any"]`` for
                         any role, ``["dst"]`` for distributors, etc.. For
                         details, see
                         http://www.loc.gov/marc/relators/relaterm.html

        Returns:
            list: :class:`Corporation` objects.
        """
        if len(arg_1) != 3:
            raise ValueError(
                "datafield parameter have to be exactly 3 chars long!"
            )
        if len(arg_2) != 1:
            raise ValueError(
                "Bad subfield specification - subield have to be 3 chars long!"
            )
        arg_4 = []
        for arg_5 in arg_0.get_subfields(arg_1, arg_2):
            arg_6 = arg_5.other_subfields

            # check if corporation have at least one of the roles specified in
            # 'roles' parameter of function
            if "4" in arg_6 and arg_3 != ["any"]:
                arg_7 = arg_6["4"]  # list of role parameters

                arg_8 = any(map(lambda role: role in arg_3, arg_7))

                # skip non-relevant corporations
                if not arg_8:
                    continue

            arg_9 = ""
            arg_10 = ""
            arg_11 = ""

            arg_9 = arg_5

            if "c" in arg_6:
                arg_10 = ",".join(arg_6["c"])
            if "d" in arg_6:
                arg_11 = ",".join(arg_6["d"])

            arg_4.append(Corporation(arg_9, arg_10, arg_11))

        return arg_4

Parse informations about corporations from given field identified by datafield parameter .


def Func ( arg_0 ) : for arg_1 in [ p [ 0 ] for p in inspect . getmembers ( arg_0 . __class__ ) if isinstance ( p [ 1 ] , property ) ] : arg_0 . _results_fields [ arg_1 ] = getattr ( arg_0 , arg_1 , None )

def Func(arg_0):
        """
        Called during post processing of result
        Any properties defined in your subclass will get exposed as members of the result json from the search
        """
        for arg_1 in [p[0] for p in inspect.getmembers(arg_0.__class__) if isinstance(p[1], property)]:
            arg_0._results_fields[arg_1] = getattr(arg_0, arg_1, None)


def Func ( arg_0 ) : if arg_0 . dcmf1 is None or arg_0 . dcmf2 is None : return np . inf for arg_1 in arg_0 . field_weights : if ( str ( getattr ( arg_0 . dcmf1 , arg_1 , '' ) ) != str ( getattr ( arg_0 . dcmf2 , arg_1 , '' ) ) ) : return False return True

def Func(arg_0):
        """Check the field values in self.dcmf1 and self.dcmf2 and returns True
        if all the field values are the same, False otherwise.

        Returns
        -------
        bool
        """
        if arg_0.dcmf1 is None or arg_0.dcmf2 is None:
            return np.inf

        for arg_1 in arg_0.field_weights:
            if (str(getattr(arg_0.dcmf1, arg_1, ''))
                    != str(getattr(arg_0.dcmf2, arg_1, ''))):
                return False

        return True

Check the field values in self . dcmf1 and self . dcmf2 and returns True if all the field values are the same False otherwise .