def Func ( arg_0 , ** arg_1 ) : arg_0 . _storage_service . store ( pypetconstants . BACKUP , arg_0 , trajectory_name = arg_0 . v_name , ** arg_1 )

def Func(arg_0, **arg_1):
        """Backs up the trajectory with the given storage service.

        Arguments of ``kwargs`` are directly passed to the storage service,
        for the HDF5StorageService you can provide the following argument:

        :param backup_filename:

            Name of file where to store the backup.

            In case you use the standard HDF5 storage service and `backup_filename=None`,
            the file will be chosen automatically.
            The backup file will be in the same folder as your hdf5 file and
            named 'backup_XXXXX.hdf5' where 'XXXXX' is the name of your current trajectory.

        """
        arg_0._storage_service.store(pypetconstants.BACKUP, arg_0, trajectory_name=arg_0.v_name,
                                    **arg_1)

Backs up the trajectory with the given storage service .


def Func(arg_0, arg_1, arg_2=arg_3.KMIPVersion.KMIP_1_0):
        """
        Read the data encoding the KeyWrappingSpecification struct and decode
        it into its constituent parts.

        Args:
            input_stream (stream): A data stream containing encoded 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 decoded. Optional,
                defaults to KMIP 1.0.
        """
        super(KeyWrappingSpecification, arg_0).Func(
            arg_1,
            arg_2=arg_2
        )
        arg_6 = BytearrayStream(arg_1.Func(arg_0.length))

        if arg_0.is_tag_next(arg_3.Tags.WRAPPING_METHOD, arg_6):
            arg_0._wrapping_method = primitives.Enumeration(
                enum=arg_3.WrappingMethod,
                tag=arg_3.Tags.WRAPPING_METHOD
            )
            arg_0._wrapping_method.Func(
                arg_6,
                arg_2=arg_2
            )
        else:
            raise ValueError(
                "Invalid struct missing the wrapping method attribute."
            )

        if arg_0.is_tag_next(
                arg_3.Tags.ENCRYPTION_KEY_INFORMATION,
                arg_6
        ):
            arg_0._encryption_key_information = EncryptionKeyInformation()
            arg_0._encryption_key_information.Func(
                arg_6,
                arg_2=arg_2
            )
        if arg_0.is_tag_next(
                arg_3.Tags.MAC_SIGNATURE_KEY_INFORMATION,
                arg_6
        ):
            arg_0._mac_signature_key_information = MACSignatureKeyInformation()
            arg_0._mac_signature_key_information.Func(
                arg_6,
                arg_2=arg_2
            )

        arg_10 = []
        while arg_0.is_tag_next(arg_3.Tags.ATTRIBUTE_NAME, arg_6):
            arg_11 = primitives.TextString(
                tag=arg_3.Tags.ATTRIBUTE_NAME
            )
            arg_11.Func(arg_6, arg_2=arg_2)
            arg_10.append(arg_11)
        arg_0._attribute_names = arg_10

        if arg_0.is_tag_next(arg_3.Tags.ENCODING_OPTION, arg_6):
            arg_0._encoding_option = primitives.Enumeration(
                enum=arg_3.EncodingOption,
                tag=arg_3.Tags.ENCODING_OPTION
            )
            arg_0._encoding_option.Func(
                arg_6,
                arg_2=arg_2
            )

        arg_0.is_oversized(arg_6)

Read the data encoding the KeyWrappingSpecification struct and decode
        it into its constituent parts.

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

Read the data encoding the KeyWrappingSpecification struct and decode it into its constituent parts .


return (
            len(word) - suffix_len >= 3
            and word[-suffix_len - 3 : -suffix_len] != 'met'
            and word[-suffix_len - 4 : -suffix_len] != 'ryst'
        )

def Func(arg_0, arg_1, arg_2):
        """Return Lovins' condition BB.

        Parameters
        ----------
        word : str
            Word to check
        suffix_len : int
            Suffix length

        Returns
        -------
        bool
            True if condition is met

        """
        return (
            len(arg_1) - arg_2 >= 3
            and arg_1[-arg_2 - 3 : -arg_2] != 'met'
            and arg_1[-arg_2 - 4 : -arg_2] != 'ryst'
        )


def Func(arg_0, arg_1):
        """ Command server to run async command to the interchange
        """
        logger.debug("[COMMAND] Command Server Starting")
        while not arg_1.is_set():
            try:
                arg_2 = arg_0.command_channel.recv_pyobj()
                logger.debug("[COMMAND] Received command request: {}".format(arg_2))
                if arg_2 == "OUTSTANDING_C":
                    arg_3 = arg_0.pending_task_queue.qsize()
                    for arg_4 in arg_0._ready_manager_queue:
                        arg_3 += len(arg_0._ready_manager_queue[arg_4]['tasks'])
                    arg_5 = arg_3

                elif arg_2 == "WORKERS":
                    arg_6 = 0
                    for arg_4 in arg_0._ready_manager_queue:
                        arg_6 += arg_0._ready_manager_queue[arg_4]['worker_count']
                    arg_5 = arg_6
                elif arg_2 == "MANAGERS":
                    arg_5 = []
                    for arg_4 in arg_0._ready_manager_queue:
                        arg_7 = {'manager': arg_4.decode('utf-8'),
                                'block_id': arg_0._ready_manager_queue[arg_4]['block_id'],
                                'worker_count': arg_0._ready_manager_queue[arg_4]['worker_count'],
                                'tasks': len(arg_0._ready_manager_queue[arg_4]['tasks']),
                                'active': arg_0._ready_manager_queue[arg_4]['active']}
                        arg_5.append(arg_7)

                elif arg_2.startswith("HOLD_WORKER"):
                    arg_8, arg_9 = arg_2.split(';')
                    arg_4 = arg_9.encode('utf-8')
                    logger.info("[CMD] Received HOLD_WORKER for {}".format(arg_4))
                    if arg_4 in arg_0._ready_manager_queue:
                        arg_0._ready_manager_queue[arg_4]['active'] = False
                        arg_5 = True
                    else:
                        arg_5 = False

                elif arg_2 == "SHUTDOWN":
                    logger.info("[CMD] Received SHUTDOWN command")
                    arg_1.set()
                    arg_5 = True

                else:
                    arg_5 = None

                logger.debug("[COMMAND] Reply: {}".format(arg_5))
                arg_0.command_channel.send_pyobj(arg_5)

            except zmq.Again:
                logger.debug("[COMMAND] is alive")
                continue


def Func ( arg_0 ) : try : arg_1 = load_file_as_yaml ( arg_0 ) except Exception : arg_1 = { } arg_2 = os . environ . get ( citr_env_vars . CITRINATION_PROFILE ) if arg_2 is None or len ( arg_2 ) == 0 : arg_2 = DEFAULT_CITRINATION_PROFILE arg_3 = None arg_4 = None try : arg_5 = arg_1 [ arg_2 ] arg_3 = arg_5 [ CREDENTIALS_API_KEY_KEY ] arg_4 = arg_5 [ CREDENTIALS_SITE_KEY ] except KeyError : pass return ( arg_3 , arg_4 )

def Func(arg_0):
    """
    Extracts credentials from the yaml formatted credential filepath
    passed in. Uses the default profile if the CITRINATION_PROFILE env var
    is not set, otherwise looks for a profile with that name in the credentials file.

    :param filepath: The path of the credentials file
    """
    try:
        arg_1 = load_file_as_yaml(arg_0)
    except Exception:
        arg_1 = {}

    arg_2 = os.environ.get(citr_env_vars.CITRINATION_PROFILE)
    if arg_2 is None or len(arg_2) == 0:
        arg_2 = DEFAULT_CITRINATION_PROFILE
    arg_3 = None
    arg_4 = None
    try:
        arg_5 = arg_1[arg_2]
        arg_3 = arg_5[CREDENTIALS_API_KEY_KEY]
        arg_4 = arg_5[CREDENTIALS_SITE_KEY]
    except KeyError:
        pass

    return (arg_3, arg_4)

Extracts credentials from the yaml formatted credential filepath passed in . Uses the default profile if the CITRINATION_PROFILE env var is not set otherwise looks for a profile with that name in the credentials file .


def
Func
(
arg_0
,
arg_1
=
)
:
if
isinstance
(
arg_0
,
str
)
:
arg_2
=
open
(
arg_0
)
arg_3
=
arg_0
else
:
arg_2
=
arg_0
arg_3
=
getattr
(
arg_2
,
'name'
,
''
)
try
:
return
Funcs
(
arg_2
.
read
(
)
,
arg_1
,
arg_3
)
except
Exception
as
arg_4
:
arg_4
.
args
=
(
'There was a error in the data file'
,
arg_3
)
+
arg_4
.
args
raise

def Func(arg_0, arg_1=None):
    """
    Loads not only JSON files but also YAML files ending in .yml.

    :param file: a filename or file handle to read from
    :returns: the data Funced from the JSON or YAML file
    :rtype: dict
    """
    if isinstance(arg_0, str):
        arg_2 = open(arg_0)
        arg_3 = arg_0
    else:
        arg_2 = arg_0
        arg_3 = getattr(arg_2, 'name', '')

    try:
        return Funcs(arg_2.read(), arg_1, arg_3)

    except Exception as arg_4:
        arg_4.args = ('There was a error in the data file', arg_3) + arg_4.args
        raise

Loads not only JSON files but also YAML files ending in .yml.

    :param file: a filename or file handle to read from
    :returns: the data loaded from the JSON or YAML file
    :rtype: dict

Loads not only JSON files but also YAML files ending in . yml .


return CompiledFormat(fmt).pack_into(buf,
                                         offset,
                                         *args,
                                         **kwargs)

def Func ( arg_0 , arg_1 , arg_2 , * arg_3 , ** arg_4 ) : return CompiledFormat ( arg_0 ) . Func ( arg_1 , arg_2 , * arg_3 , ** arg_4 )

def Func(arg_0, arg_1, arg_2, *arg_3, **arg_4):
    """Pack given values v1, v2, ... into given bytearray `buf`, starting
    at given bit offset `offset`. Pack according to given format
    string `fmt`. Give `fill_padding` as ``False`` to leave padding
    bits in `buf` unmodified.

    """

    return CompiledFormat(arg_0).Func(arg_1,
                                         arg_2,
                                         *arg_3,
                                         **arg_4)

Pack given values v1 v2 ... into given bytearray buf starting at given bit offset offset . Pack according to given format string fmt . Give fill_padding as False to leave padding bits in buf unmodified .


def Func ( arg_0 ) -> int : arg_1 = 0 for arg_2 in arg_0 . _hsig . values ( ) : if hasattr ( arg_2 , 'is_fun' ) and arg_2 . is_fun : arg_1 += 1 return arg_1

def Func(arg_0) -> int:
        """ Count function define by this scope """
        arg_1 = 0
        for arg_2 in arg_0._hsig.values():
            if hasattr(arg_2, 'is_fun') and arg_2.is_fun:
                arg_1 += 1
        return arg_1


def Func ( arg_0 ) : if not arg_0 . startswith ( "/" ) and not arg_0 . startswith ( "models/" ) : arg_0 = "/" + arg_0 if not arg_0 . startswith ( "models" ) : arg_0 = "models" + arg_0 if not arg_0 . endswith ( ".p" ) : arg_0 += ".p" return arg_0

def Func(arg_0):
    """
    Creates a path to model files
    model_path - string
    """
    if not arg_0.startswith("/") and not arg_0.startswith("models/"):
        arg_0="/" + arg_0
    if not arg_0.startswith("models"):
        arg_0 = "models" + arg_0
    if not arg_0.endswith(".p"):
        arg_0+=".p"

    return arg_0


def Func ( arg_0 , arg_1 ) : arg_2 = IncomingPacket ( ) arg_2 . header = arg_0 arg_2 . data = arg_1 if len ( arg_0 ) == HeronProtocol . HEADER_SIZE : arg_2 . is_header_read = True if len ( arg_1 ) == arg_2 . get_datasize ( ) : arg_2 . is_complete = True return arg_2

def Func(arg_0, arg_1):
    """Creates an IncomingPacket object from header and data

    This method is for testing purposes
    """
    arg_2 = IncomingPacket()
    arg_2.header = arg_0
    arg_2.data = arg_1

    if len(arg_0) == HeronProtocol.HEADER_SIZE:
      arg_2.is_header_read = True
      if len(arg_1) == arg_2.get_datasize():
        arg_2.is_complete = True

    return arg_2


(self, symbol, qty, side, type, time_in_force,
                     limit_price=None, stop_price=None, client_order_id=None)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 , arg_6 = None , arg_7 = None , arg_8 = None ) : arg_9 = { 'symbol' : arg_1 , 'qty' : arg_2 , 'side' : arg_3 , 'type' : arg_4 , 'time_in_force' : arg_5 , } if arg_6 is not None : arg_9 [ 'limit_price' ] = arg_6 if arg_7 is not None : arg_9 [ 'stop_price' ] = arg_7 if arg_8 is not None : arg_9 [ 'client_order_id' ] = arg_8 arg_10 = arg_0 . post ( '/orders' , arg_9 ) return Order ( arg_10 )

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5,
                     arg_6=None, arg_7=None, arg_8=None):
        '''Request a new order'''
        arg_9 = {
            'symbol': arg_1,
            'qty': arg_2,
            'side': arg_3,
            'type': arg_4,
            'time_in_force': arg_5,
        }
        if arg_6 is not None:
            arg_9['limit_price'] = arg_6
        if arg_7 is not None:
            arg_9['stop_price'] = arg_7
        if arg_8 is not None:
            arg_9['client_order_id'] = arg_8
        arg_10 = arg_0.post('/orders', arg_9)
        return Order(arg_10)


def Func(arg_0, arg_1, arg_2=None):
        """This will fetch the messages from the Socket's queue, and if
        there are many messes, pack multiple messages in one payload and return
        """
        try:
            arg_3 = arg_1.get_multiple_client_msgs(arg_2=arg_2)
            arg_4 = arg_0.encode_payload(arg_3)
        except Empty:
            arg_4 = ""
        return arg_4

This will fetch the messages from the Socket s queue and if there are many messes pack multiple messages in one payload and return


(self, image_shape, alpha_lines=1.0, alpha_points=1.0,
                           size_lines=1, size_points=0, antialiased=True,
                           raise_if_out_of_image=False)

def Func(arg_0, arg_1, arg_2=1.0, arg_3=1.0,
                           arg_4=1, arg_5=0, arg_6=True,
                           arg_7=False):
        """
        Draw the line segments and points of the line string as a heatmap array.

        Parameters
        ----------
        image_shape : tuple of int
            The shape of the image onto which to draw the line mask.

        alpha_lines : float, optional
            Opacity of the line string. Higher values denote a more visible
            line string.

        alpha_points : float, optional
            Opacity of the line string points. Higher values denote a more
            visible points.

        size_lines : int, optional
            Thickness of the line segments.

        size_points : int, optional
            Size of the points in pixels.

        antialiased : bool, optional
            Whether to draw the line with anti-aliasing activated.

        raise_if_out_of_image : bool, optional
            Whether to raise an error if the line string is fully
            outside of the image. If set to False, no error will be raised and
            only the parts inside the image will be drawn.

        Returns
        -------
        ndarray
            Float array of shape `image_shape` (no channel axis) with drawn
            line segments and points. All values are in the
            interval ``[0.0, 1.0]``.

        """
        arg_8 = arg_0.draw_lines_heatmap_array(
            arg_1,
            alpha=arg_2,
            size=arg_4,
            arg_6=arg_6,
            arg_7=arg_7)
        if arg_5 <= 0:
            return arg_8

        arg_9 = arg_0.draw_points_heatmap_array(
            arg_1,
            alpha=arg_3,
            size=arg_5,
            arg_7=arg_7)

        arg_10 = np.dstack([arg_8, arg_9])
        return np.max(arg_10, axis=2)

Draw the line segments and points of the line string as a heatmap array .


def Func ( arg_0 ) : arg_1 = 0 for arg_1 , arg_2 in enumerate ( arg_0 ) : if not arg_2 . isspace ( ) : return arg_1 return arg_1 + 1

def Func(arg_0):
  """Returns the number of characters at the beginning of text that are whitespace."""
  arg_1 = 0
  for arg_1, arg_2 in enumerate(arg_0):
    if not arg_2.isspace():
      return arg_1
  return arg_1 + 1

Returns the number of characters at the beginning of text that are whitespace .


return reduce(lambda dt, transformation: transformation.apply_to_with_tz(dt, timezone), transformations, dttm)

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = parse ( arg_1 ) return reduce ( lambda dt , transformation : transformation . apply_to_with_tz ( dt , arg_2 ) , arg_3 , arg_0 )

def Func(arg_0, arg_1, arg_2):
    """This function handles timezone aware datetimes.
    Sometimes it is necessary to keep daylight saving time switches in mind.

    Args:
        instruction (string): a string that encodes 0 to n transformations of a time, i.e. "-1h@h", "@mon+2d+4h", ...
        dttm (datetime): a datetime with timezone
        timezone: a pytz timezone
    Returns:
        datetime: The datetime resulting from applying all transformations to the input datetime.

    Example:
        >>> import pytz
        >>> CET = pytz.timezone("Europe/Berlin")
        >>> dttm = CET.localize(datetime(2017, 3, 26, 3, 44)
        >>> dttm
        datetime.datetime(2017, 3, 26, 3, 44, tzinfo=<DstTzInfo 'Europe/Berlin' CEST+2:00:00 DST>)

        >>> Func(dttm, "-2h@h", CET)
        datetime.datetime(2017, 3, 26, 0, 0, tzinfo=<DstTzInfo 'Europe/Berlin' CET+1:00:00 STD>)
        >>> # switch from winter to summer time!
    """
    arg_3 = parse(arg_1)
    return reduce(lambda dt, transformation: transformation.apply_to_with_tz(dt, arg_2), arg_3, arg_0)

This function handles timezone aware datetimes.
    Sometimes it is necessary to keep daylight saving time switches in mind.

    Args:
        instruction (string): a string that encodes 0 to n transformations of a time, i.e. "-1h@h", "@mon+2d+4h", ...
        dttm (datetime): a datetime with timezone
        timezone: a pytz timezone
    Returns:
        datetime: The datetime resulting from applying all transformations to the input datetime.

    Example:
        >>> import pytz
        >>> CET = pytz.timezone("Europe/Berlin")
        >>> dttm = CET.localize(datetime(2017, 3, 26, 3, 44)
        >>> dttm
        datetime.datetime(2017, 3, 26, 3, 44, tzinfo=<DstTzInfo 'Europe/Berlin' CEST+2:00:00 DST>)

        >>> snap_tz(dttm, "-2h@h", CET)
        datetime.datetime(2017, 3, 26, 0, 0, tzinfo=<DstTzInfo 'Europe/Berlin' CET+1:00:00 STD>)
        >>> # switch from winter to summer time!

This function handles timezone aware datetimes . Sometimes it is necessary to keep daylight saving time switches in mind .


def Func(arg_0):
    """
    Get the IPv4 Func assigned to an interface.

    Example::

        import burlap

        # Print all configured IP Funces
        for interface in burlap.network.interfaces():
            print(burlap.network.Func(interface))

    """
    with settings(hide('running', 'stdout')):
        arg_1 = (sudo("/sbin/ifconfig %(interface)s | grep 'inet '" % locals()) or '').split('\n')[-1].strip()
    if 'addr' in arg_1:
        return arg_1.split()[1].split(':')[1]
    return arg_1.split()[1]

Get the IPv4 address assigned to an interface.

    Example::

        import burlap

        # Print all configured IP addresses
        for interface in burlap.network.interfaces():
            print(burlap.network.address(interface))

Get the IPv4 address assigned to an interface .


def Func(arg_0, arg_1: arg_2, arg_3=None) -> Signature:
        """ Get a signature instance by its internal_name """
        arg_4 = arg_3
        if arg_1 in arg_0._hsig:
            arg_4 = arg_0._hsig[arg_1]
        return arg_4


def Func ( arg_0 , arg_1 ) : arg_2 = [ ] for arg_3 in arg_0 . enterprise_configuration . get_locales ( ) : arg_2 . append ( { 'locale' : arg_3 , 'value' : ( arg_1 . get ( 'full_description' ) or arg_1 . get ( 'short_description' ) or arg_1 . get ( 'title' , '' ) ) } ) return arg_2

def Func(arg_0, arg_1):
        """
        Return the description of the content item.
        """
        arg_2 = []

        for arg_3 in arg_0.enterprise_configuration.get_locales():
            arg_2.append({
                'locale': arg_3,
                'value': (
                    arg_1.get('full_description') or
                    arg_1.get('short_description') or
                    arg_1.get('title', '')
                )
            })

        return arg_2

Return the description of the content item .


def Func ( arg_0 , arg_1 ) : arg_0 = copy . deepcopy ( arg_0 ) arg_2 = dict ( copy . deepcopy ( os . environ ) ) arg_3 = { 'env' : arg_1 [ 'env' ] , 'pip' : pip_cmd ( arg_1 [ 'env' ] , '' , return_path = True ) , 'requirements' : arg_1 [ 'requirements' ] } arg_2 . update ( arg_3 ) if isinstance ( arg_0 , string_types ) : return arg_0 . format ( ** arg_2 ) for arg_4 , arg_5 in iteritems ( arg_0 ) : if not isinstance ( arg_5 , string_types ) : continue arg_0 [ arg_4 ] = arg_5 . format ( ** arg_2 ) return config_to_args ( arg_0 )

def Func(arg_0, arg_1):
    """Convert config dict to command line args line.

    :param config: Configuration dict.
    :param bootstrap: Bootstrapper configuration dict.
    """
    arg_0 = copy.deepcopy(arg_0)
    arg_2 = dict(copy.deepcopy(os.environ))

    arg_3 = {'env': arg_1['env'],
            'pip': pip_cmd(arg_1['env'], '', return_path=True),
            'requirements': arg_1['requirements']}
    arg_2.update(arg_3)

    if isinstance(arg_0, string_types):
        return arg_0.format(**arg_2)

    for arg_4, arg_5 in iteritems(arg_0):
        if not isinstance(arg_5, string_types):
            continue
        arg_0[arg_4] = arg_5.format(**arg_2)

    return config_to_args(arg_0)

Convert config dict to command line args line .


return self.handleresult(self.r.post(urljoin(self.url + CRUD_PATH,
                                                     path),
                                             data=json.dumps(data)))

def Func ( arg_0 , arg_1 , arg_2 = None ) : return arg_0 . handleresult ( arg_0 . r . post ( urljoin ( arg_0 . url + CRUD_PATH , arg_1 ) , arg_2 = json . dumps ( arg_2 ) ) )

def Func(arg_0, arg_1, arg_2=None):
        """Send a POST CRUD API request to the given path using the given data which will be converted
        to json"""
        return arg_0.handleresult(arg_0.r.post(urljoin(arg_0.url + CRUD_PATH,
                                                     arg_1),
                                             arg_2=json.dumps(arg_2)))


def
Func
(
arg_0
,
arg_1
=
)
:
arg_2
=
urllib2
.
urlopen
(
arg_0
)
.
read
(
)
if
PY3
is
True
:
arg_2
=
arg_2
.
decode
(
'utf-8'
)
if
arg_1
:
arg_1
=
arg_1
.
lower
(
)
.
replace
(
" "
,
"_"
)
arg_3
=
parse
.
__getattr__
(
"from_%s"
%
arg_1
)
else
:
arg_3
=
parse
.
from_unknown_text
arg_4
=
arg_3
(
arg_2
)
return
arg_4

def Func(arg_0, arg_1=None):
    """
    Returns the crs object from a string interpreted as a specified format, located at a given url site.

    Arguments:

    - *url*: The url where the crs string is to be read from.
    - *format* (optional): Which format to parse the crs string as. One of "ogc wkt", "esri wkt", or "proj4".
        If None, tries to autodetect the format for you (default).

    Returns:

    - CRS object.
    """
    # first get string from url
    arg_2 = urllib2.urlopen(arg_0).read()

    if PY3 is True:
        # decode str into string
        arg_2 = arg_2.decode('utf-8')

    # then determine parser
    if arg_1:
        # user specified format
        arg_1 = arg_1.lower().replace(" ", "_")
        arg_3 = parse.__getattr__("from_%s" % arg_1)
    else:
        # unknown format
        arg_3 = parse.from_unknown_text

    # then load
    arg_4 = arg_3(arg_2)
    return arg_4

Returns the crs object from a string interpreted as a specified format located at a given url site .


def Func ( arg_0 , arg_1 = False ) : arg_2 = Integration . objects . Func ( arg_0 . ID ) if not arg_1 : for arg_3 in arg_0 . HIDDEN_FIELDS : arg_2 . pop ( arg_3 , None ) return arg_2

def Func(arg_0, arg_1=False):
        """
        Retrieves the settings for this integration as a dictionary.

        Removes all hidden fields if show_hidden=False
        """
        arg_2 = Integration.objects.Func(arg_0.ID)

        if not arg_1:
            for arg_3 in arg_0.HIDDEN_FIELDS:
                arg_2.pop(arg_3, None)

        return arg_2

Retrieves the settings for this integration as a dictionary .


def Func(arg_0, arg_1, arg_2=None, arg_3=None):
        """
        Receive data on the connection and copy it directly into the provided
        buffer, rather than creating a new string.

        :param buffer: The buffer to copy into.
        :param nbytes: (optional) The maximum number of bytes to read into the
            buffer. If not present, defaults to the size of the buffer. If
            larger than the size of the buffer, is reduced to the size of the
            buffer.
        :param flags: (optional) The only supported flag is ``MSG_PEEK``,
            all other flags are ignored.
        :return: The number of bytes read into the buffer.
        """
        if arg_2 is None:
            arg_2 = len(arg_1)
        else:
            arg_2 = min(arg_2, len(arg_1))

        # We need to create a temporary buffer. This is annoying, it would be
        # better if we could pass memoryviews straight into the SSL_read call,
        # but right now we can't. Revisit this if CFFI gets that ability.
        arg_4 = _no_zero_allocator("char[]", arg_2)
        if arg_3 is not None and arg_3 & socket.MSG_PEEK:
            arg_5 = _lib.SSL_peek(arg_0._ssl, arg_4, arg_2)
        else:
            arg_5 = _lib.SSL_read(arg_0._ssl, arg_4, arg_2)
        arg_0._raise_ssl_error(arg_0._ssl, arg_5)

        # This strange line is all to avoid a memory copy. The buffer protocol
        # should allow us to assign a CFFI buffer to the LHS of this line, but
        # on CPython 3.3+ that segfaults. As a workaround, we can temporarily
        # wrap it in a memoryview.
        arg_1[:arg_5] = memoryview(_ffi.buffer(arg_4, arg_5))

        return arg_5

Receive data on the connection and copy it directly into the provided buffer rather than creating a new string .


def Func ( arg_0 , arg_1 ) : arg_2 = normalize_shape ( arg_1 ) if arg_2 [ 0 : 2 ] == arg_0 . shape [ 0 : 2 ] : return arg_0 . deepcopy ( ) else : arg_3 = [ kp . project ( arg_0 . shape , arg_2 ) for kp in arg_0 . keypoints ] return arg_0 . deepcopy ( arg_3 , arg_2 )

def Func(arg_0, arg_1):
        """
        Project keypoints from Funce image to a new Funce.

        Parameters
        ----------
        image : ndarray or tuple of int
            New image Functo which the keypoints are to be projected.
            May also simply be that new image's shape tuple.

        Returns
        -------
        keypoints : imgaug.KeypointsOnImage
            Object cFunctaining all projected keypoints.

        """
        arg_2 = normalize_shape(arg_1)
        if arg_2[0:2] == arg_0.shape[0:2]:
            return arg_0.deepcopy()
        else:
            arg_3 = [kp.project(arg_0.shape, arg_2) for kp in arg_0.keypoints]
            return arg_0.deepcopy(arg_3, arg_2)

Project keypoints from one image to a new one.

        Parameters
        ----------
        image : ndarray or tuple of int
            New image onto which the keypoints are to be projected.
            May also simply be that new image's shape tuple.

        Returns
        -------
        keypoints : imgaug.KeypointsOnImage
            Object containing all projected keypoints.

Project keypoints from one image to a new one .


def Func ( arg_0 , arg_1 ) : from sphinx . ext . autodoc import AutoDirective , DataDocumenter , ModuleDocumenter if inspect . ismodule ( arg_0 ) : return ModuleDocumenter if arg_1 is not None : arg_2 = Func ( arg_1 , None ) else : arg_2 = ModuleDocumenter if hasattr ( arg_1 , '__name__' ) : arg_3 = arg_2 ( FakeDirective ( ) , arg_1 . __name__ ) else : arg_3 = arg_2 ( FakeDirective ( ) , "" ) arg_4 = [ cls for cls in AutoDirective . _registry . values ( ) if cls . can_document_member ( arg_0 , '' , False , arg_3 ) ] if arg_4 : arg_4 . sort ( key = lambda cls : cls . priority ) return arg_4 [ - 1 ] else : return DataDocumenter

def Func(arg_0, arg_1):
    """Get an autodoc.Documenter class suitable for documenting the given
    object.

    *obj* is the Python object to be documented, and *parent* is an
    another Python object (e.g. a module or a class) to which *obj*
    belongs to.
    """
    from sphinx.ext.autodoc import AutoDirective, DataDocumenter, \
         ModuleDocumenter

    if inspect.ismodule(arg_0):
        # ModuleDocumenter.can_document_member always returns False
        return ModuleDocumenter

    # Construct a fake documenter for *parent*
    if arg_1 is not None:
        arg_2 = Func(arg_1, None)
    else:
        arg_2 = ModuleDocumenter

    if hasattr(arg_1, '__name__'):
        arg_3 = arg_2(FakeDirective(), arg_1.__name__)
    else:
        arg_3 = arg_2(FakeDirective(), "")

    # Get the corrent documenter class for *obj*
    arg_4 = [cls for cls in AutoDirective._registry.values()
               if cls.can_document_member(arg_0, '', False, arg_3)]
    if arg_4:
        arg_4.sort(key=lambda cls: cls.priority)
        return arg_4[-1]
    else:
        return DataDocumenter

Get an autodoc . Documenter class suitable for documenting the given object .


def Func ( arg_0 , arg_1 , arg_2 = True ) : arg_1 = arg_0 . _get_volume ( arg_1 ) if arg_1 is not None : arg_3 = int ( arg_1 [ "size" ] [ "total" ] ) if arg_2 : return SynoFormatHelper . bytes_to_readable ( arg_3 ) else : return arg_3

def Func(arg_0, arg_1, arg_2=True):
        """Total size of volume"""
        arg_1 = arg_0._get_volume(arg_1)
        if arg_1 is not None:
            arg_3 = int(arg_1["size"]["total"])
            if arg_2:
                return SynoFormatHelper.bytes_to_readable(
                    arg_3)
            else:
                return arg_3


def
Func
(
arg_0
,
arg_1
)
:
if
arg_0
.
tier_type
!=
'IntervalTier'
:
raise
Exception
(
'Tiertype must be IntervalTier.'
)
arg_0
.
intervals
=
[
i
for
i
in
arg_0
.
intervals
if
not
(
i
[
0
]
<=
arg_1
and
i
[
1
]
>=
arg_1
)
]

def Func(arg_0, arg_1):
        """Remove an interval, if no interval is found nothing happens.

        :param int time: Time of the interval.
        :raises TierTypeException: If the tier is not a IntervalTier.
        """
        if arg_0.tier_type != 'IntervalTier':
            raise Exception('Tiertype must be IntervalTier.')
        arg_0.intervals = [i for i in arg_0.intervals
                          if not(i[0] <= arg_1 and i[1] >= arg_1)]

Remove an interval if no interval is found nothing happens .


(CASRN, AvailableMethods=False, Method=None, IgnoreMethods=[SURF])

def
Func
(
arg_0
,
arg_1
=
False
,
arg_2
=
,
arg_3
=
[
arg_4
]
)
:
def
list_methods
(
)
:
arg_5
=
[
]
if
arg_0
in
_crit_IUPAC
.
index
and
not
np
.
isnan
(
_crit_IUPAC
.
at
[
arg_0
,
'Func'
]
)
:
arg_5
.
append
(
IUPAC
)
if
arg_0
in
_crit_Matthews
.
index
and
not
np
.
isnan
(
_crit_Matthews
.
at
[
arg_0
,
'Func'
]
)
:
arg_5
.
append
(
MATTHEWS
)
if
arg_0
in
_crit_CRC
.
index
and
not
np
.
isnan
(
_crit_CRC
.
at
[
arg_0
,
'Func'
]
)
:
arg_5
.
append
(
CRC
)
if
arg_0
in
_crit_PSRKR4
.
index
and
not
np
.
isnan
(
_crit_PSRKR4
.
at
[
arg_0
,
'Func'
]
)
:
arg_5
.
append
(
PSRK
)
if
arg_0
in
_crit_PassutDanner
.
index
and
not
np
.
isnan
(
_crit_PassutDanner
.
at
[
arg_0
,
'Func'
]
)
:
arg_5
.
append
(
PD
)
if
arg_0
in
_crit_Yaws
.
index
and
not
np
.
isnan
(
_crit_Yaws
.
at
[
arg_0
,
'Func'
]
)
:
arg_5
.
append
(
YAWS
)
if
arg_0
:
arg_5
.
append
(
arg_4
)
if
arg_3
:
for
arg_2
in
arg_3
:
if
arg_2
in
arg_5
:
arg_5
.
remove
(
arg_2
)
arg_5
.
append
(
)
return
arg_5
if
arg_1
:
return
list_methods
(
)
if
not
arg_2
:
arg_2
=
list_methods
(
)
[
0
]
if
arg_2
==
IUPAC
:
arg_6
=
float
(
_crit_IUPAC
.
at
[
arg_0
,
'Func'
]
)
elif
arg_2
==
MATTHEWS
:
arg_6
=
float
(
_crit_Matthews
.
at
[
arg_0
,
'Func'
]
)
elif
arg_2
==
CRC
:
arg_6
=
float
(
_crit_CRC
.
at
[
arg_0
,
'Func'
]
)
elif
arg_2
==
PSRK
:
arg_6
=
float
(
_crit_PSRKR4
.
at
[
arg_0
,
'Func'
]
)
elif
arg_2
==
PD
:
arg_6
=
float
(
_crit_PassutDanner
.
at
[
arg_0
,
'Func'
]
)
elif
arg_2
==
YAWS
:
arg_6
=
float
(
_crit_Yaws
.
at
[
arg_0
,
'Func'
]
)
elif
arg_2
==
arg_4
:
arg_6
=
third_property
(
arg_0
=
arg_0
,
P
=
True
)
elif
arg_2
==
:
return
else
:
raise
Exception
(
'Failure in in function'
)
return
arg_6

def Func(arg_0, arg_1=False, arg_2=None, arg_3=[arg_4]):
    r'''This function handles the retrieval of a chemical's critical
    pressure. Lookup is based on CASRNs. Will automatically select a data
    source to use if no Method is provided; returns None if the data is not
    available.

    Prefered sources are 'IUPAC' for organic chemicals, and 'MATTHEWS' for
    inorganic chemicals. Function has data for approximately 1000 chemicals.

    Examples
    --------
    >>> Func(CASRN='64-17-5')
    6137000.0

    Parameters
    ----------
    CASRN : string
        CASRN [-]

    Returns
    -------
    Func : float
        Critical pressure, [Pa]
    methods : list, only returned if AvailableMethods == True
        List of methods which can be used to obtain Func with the given inputs

    Other Parameters
    ----------------
    Method : string, optional
        The method name to use. Accepted methods are 'IUPAC', 'MATTHEWS',
        'CRC', 'PSRK', 'PD', 'YAWS', and 'SURF'. All valid values are also held
        in the list `Func_methods`.
    AvailableMethods : bool, optional
        If True, function will determine which methods can be used to obtain
        Func for the desired chemical, and will return methods instead of Func
    IgnoreMethods : list, optional
        A list of methods to ignore in obtaining the full list of methods,
        useful for for performance reasons and ignoring inaccurate methods

    Notes
    -----
    A total of seven sources are available for this function. They are:

        * 'IUPAC', a series of critically evaluated
          experimental datum for organic compounds in [1]_, [2]_, [3]_, [4]_,
          [5]_, [6]_, [7]_, [8]_, [9]_, [10]_, [11]_, and [12]_.
        * 'MATTHEWS', a series of critically
          evaluated data for inorganic compounds in [13]_.
        * 'CRC', a compillation of critically
          evaluated data by the TRC as published in [14]_.
        * 'PSRK', a compillation of experimental and
          estimated data published in [15]_.
        * 'PD', an older compillation of
          data published in [16]_
        * 'YAWS', a large compillation of data from a
          variety of sources; no data points are sourced in the work of [17]_.
        * SURF', an estimation method using a
          simple quadratic method for estimating Func from Tc and Vc. This is
          ignored and not returned as a method by default.

    References
    ----------
    .. [1] Ambrose, Douglas, and Colin L. Young. "Vapor-Liquid Critical
       Properties of Elements and Compounds. 1. An Introductory Survey."
       Journal of Chemical & Engineering Data 41, no. 1 (January 1, 1996):
       154-154. doi:10.1021/je950378q.
    .. [2] Ambrose, Douglas, and Constantine Tsonopoulos. "Vapor-Liquid
       Critical Properties of Elements and Compounds. 2. Normal Alkanes."
       Journal of Chemical & Engineering Data 40, no. 3 (May 1, 1995): 531-46.
       doi:10.1021/je00019a001.
    .. [3] Tsonopoulos, Constantine, and Douglas Ambrose. "Vapor-Liquid
       Critical Properties of Elements and Compounds. 3. Aromatic
       Hydrocarbons." Journal of Chemical & Engineering Data 40, no. 3
       (May 1, 1995): 547-58. doi:10.1021/je00019a002.
    .. [4] Gude, Michael, and Amyn S. Teja. "Vapor-Liquid Critical Properties
       of Elements and Compounds. 4. Aliphatic Alkanols." Journal of Chemical
       & Engineering Data 40, no. 5 (September 1, 1995): 1025-36.
       doi:10.1021/je00021a001.
    .. [5] Daubert, Thomas E. "Vapor-Liquid Critical Properties of Elements
       and Compounds. 5. Branched Alkanes and Cycloalkanes." Journal of
       Chemical & Engineering Data 41, no. 3 (January 1, 1996): 365-72.
       doi:10.1021/je9501548.
    .. [6] Tsonopoulos, Constantine, and Douglas Ambrose. "Vapor-Liquid
       Critical Properties of Elements and Compounds. 6. Unsaturated Aliphatic
       Hydrocarbons." Journal of Chemical & Engineering Data 41, no. 4
       (January 1, 1996): 645-56. doi:10.1021/je9501999.
    .. [7] Kudchadker, Arvind P., Douglas Ambrose, and Constantine Tsonopoulos.
       "Vapor-Liquid Critical Properties of Elements and Compounds. 7. Oxygen
       Compounds Other Than Alkanols and Cycloalkanols." Journal of Chemical &
       Engineering Data 46, no. 3 (May 1, 2001): 457-79. doi:10.1021/je0001680.
    .. [8] Tsonopoulos, Constantine, and Douglas Ambrose. "Vapor-Liquid
       Critical Properties of Elements and Compounds. 8. Organic Sulfur,
       Silicon, and Tin Compounds (C + H + S, Si, and Sn)." Journal of Chemical
       & Engineering Data 46, no. 3 (May 1, 2001): 480-85.
       doi:10.1021/je000210r.
    .. [9] Marsh, Kenneth N., Colin L. Young, David W. Morton, Douglas Ambrose,
       and Constantine Tsonopoulos. "Vapor-Liquid Critical Properties of
       Elements and Compounds. 9. Organic Compounds Containing Nitrogen."
       Journal of Chemical & Engineering Data 51, no. 2 (March 1, 2006):
       305-14. doi:10.1021/je050221q.
    .. [10] Marsh, Kenneth N., Alan Abramson, Douglas Ambrose, David W. Morton,
       Eugene Nikitin, Constantine Tsonopoulos, and Colin L. Young.
       "Vapor-Liquid Critical Properties of Elements and Compounds. 10. Organic
       Compounds Containing Halogens." Journal of Chemical & Engineering Data
       52, no. 5 (September 1, 2007): 1509-38. doi:10.1021/je700336g.
    .. [11] Ambrose, Douglas, Constantine Tsonopoulos, and Eugene D. Nikitin.
       "Vapor-Liquid Critical Properties of Elements and Compounds. 11. Organic
       Compounds Containing B + O; Halogens + N, + O, + O + S, + S, + Si;
       N + O; and O + S, + Si." Journal of Chemical & Engineering Data 54,
       no. 3 (March 12, 2009): 669-89. doi:10.1021/je800580z.
    .. [12] Ambrose, Douglas, Constantine Tsonopoulos, Eugene D. Nikitin, David
       W. Morton, and Kenneth N. Marsh. "Vapor-Liquid Critical Properties of
       Elements and Compounds. 12. Review of Recent Data for Hydrocarbons and
       Non-Hydrocarbons." Journal of Chemical & Engineering Data, October 5,
       2015, 151005081500002. doi:10.1021/acs.jced.5b00571.
    .. [13] Mathews, Joseph F. "Critical Constants of Inorganic Substances."
       Chemical Reviews 72, no. 1 (February 1, 1972): 71-100.
       doi:10.1021/cr60275a004.
    .. [14] Haynes, W.M., Thomas J. Bruno, and David R. Lide. CRC Handbook of
       Chemistry and Physics, 95E. Boca Raton, FL: CRC press, 2014.
    .. [15] Horstmann, Sven, Anna Jabłoniec, Jörg Krafczyk, Kai Fischer, and
       Jürgen Gmehling. "PSRK Group Contribution Equation of State:
       Comprehensive Revision and Extension IV, Including Critical Constants
       and Α-Function Parameters for 1000 Components." Fluid Phase Equilibria
       227, no. 2 (January 25, 2005): 157-64. doi:10.1016/j.fluid.2004.11.002.
    .. [16] Passut, Charles A., and Ronald P. Danner. "Acentric Factor. A
       Valuable Correlating Parameter for the Properties of Hydrocarbons."
       Industrial & Engineering Chemistry Process Design and Development 12,
       no. 3 (July 1, 1973): 365–68. doi:10.1021/i260047a026.
    .. [17] Yaws, Carl L. Thermophysical Properties of Chemicals and
       Hydrocarbons, Second Edition. Amsterdam Boston: Gulf Professional
       Publishing, 2014.
    '''
    def list_methods():
        arg_5 = []
        if arg_0 in _crit_IUPAC.index and not np.isnan(_crit_IUPAC.at[arg_0, 'Func']):
            arg_5.append(IUPAC)
        if arg_0 in _crit_Matthews.index and not np.isnan(_crit_Matthews.at[arg_0, 'Func']):
            arg_5.append(MATTHEWS)
        if arg_0 in _crit_CRC.index and not np.isnan(_crit_CRC.at[arg_0, 'Func']):
            arg_5.append(CRC)
        if arg_0 in _crit_PSRKR4.index and not np.isnan(_crit_PSRKR4.at[arg_0, 'Func']):
            arg_5.append(PSRK)
        if arg_0 in _crit_PassutDanner.index and not np.isnan(_crit_PassutDanner.at[arg_0, 'Func']):
            arg_5.append(PD)
        if arg_0 in _crit_Yaws.index and not np.isnan(_crit_Yaws.at[arg_0, 'Func']):
            arg_5.append(YAWS)
        if arg_0:
            arg_5.append(arg_4)
        if arg_3:
            for arg_2 in arg_3:
                if arg_2 in arg_5:
                    arg_5.remove(arg_2)
        arg_5.append(NONE)
        return arg_5
    if arg_1:
        return list_methods()
    if not arg_2:
        arg_2 = list_methods()[0]

    if arg_2 == IUPAC:
        arg_6 = float(_crit_IUPAC.at[arg_0, 'Func'])
    elif arg_2 == MATTHEWS:
        arg_6 = float(_crit_Matthews.at[arg_0, 'Func'])
    elif arg_2 == CRC:
        arg_6 = float(_crit_CRC.at[arg_0, 'Func'])
    elif arg_2 == PSRK:
        arg_6 = float(_crit_PSRKR4.at[arg_0, 'Func'])
    elif arg_2 == PD:
        arg_6 = float(_crit_PassutDanner.at[arg_0, 'Func'])
    elif arg_2 == YAWS:
        arg_6 = float(_crit_Yaws.at[arg_0, 'Func'])
    elif arg_2 == arg_4:
        arg_6 = third_property(arg_0=arg_0, P=True)
    elif arg_2 == NONE:
        return None
    else:
        raise Exception('Failure in in function')
    return arg_6

r'''This function handles the retrieval of a chemical's critical
    pressure. Lookup is based on CASRNs. Will automatically select a data
    source to use if no Method is provided; returns None if the data is not
    available.

    Prefered sources are 'IUPAC' for organic chemicals, and 'MATTHEWS' for
    inorganic chemicals. Function has data for approximately 1000 chemicals.

    Examples
    --------
    >>> Pc(CASRN='64-17-5')
    6137000.0

    Parameters
    ----------
    CASRN : string
        CASRN [-]

    Returns
    -------
    Pc : float
        Critical pressure, [Pa]
    methods : list, only returned if AvailableMethods == True
        List of methods which can be used to obtain Pc with the given inputs

    Other Parameters
    ----------------
    Method : string, optional
        The method name to use. Accepted methods are 'IUPAC', 'MATTHEWS',
        'CRC', 'PSRK', 'PD', 'YAWS', and 'SURF'. All valid values are also held
        in the list `Pc_methods`.
    AvailableMethods : bool, optional
        If True, function will determine which methods can be used to obtain
        Pc for the desired chemical, and will return methods instead of Pc
    IgnoreMethods : list, optional
        A list of methods to ignore in obtaining the full list of methods,
        useful for for performance reasons and ignoring inaccurate methods

    Notes
    -----
    A total of seven sources are available for this function. They are:

        * 'IUPAC', a series of critically evaluated
          experimental datum for organic compounds in [1]_, [2]_, [3]_, [4]_,
          [5]_, [6]_, [7]_, [8]_, [9]_, [10]_, [11]_, and [12]_.
        * 'MATTHEWS', a series of critically
          evaluated data for inorganic compounds in [13]_.
        * 'CRC', a compillation of critically
          evaluated data by the TRC as published in [14]_.
        * 'PSRK', a compillation of experimental and
          estimated data published in [15]_.
        * 'PD', an older compillation of
          data published in [16]_
        * 'YAWS', a large compillation of data from a
          variety of sources; no data points are sourced in the work of [17]_.
        * SURF', an estimation method using a
          simple quadratic method for estimating Pc from Tc and Vc. This is
          ignored and not returned as a method by default.

    References
    ----------
    .. [1] Ambrose, Douglas, and Colin L. Young. "Vapor-Liquid Critical
       Properties of Elements and Compounds. 1. An Introductory Survey."
       Journal of Chemical & Engineering Data 41, no. 1 (January 1, 1996):
       154-154. doi:10.1021/je950378q.
    .. [2] Ambrose, Douglas, and Constantine Tsonopoulos. "Vapor-Liquid
       Critical Properties of Elements and Compounds. 2. Normal Alkanes."
       Journal of Chemical & Engineering Data 40, no. 3 (May 1, 1995): 531-46.
       doi:10.1021/je00019a001.
    .. [3] Tsonopoulos, Constantine, and Douglas Ambrose. "Vapor-Liquid
       Critical Properties of Elements and Compounds. 3. Aromatic
       Hydrocarbons." Journal of Chemical & Engineering Data 40, no. 3
       (May 1, 1995): 547-58. doi:10.1021/je00019a002.
    .. [4] Gude, Michael, and Amyn S. Teja. "Vapor-Liquid Critical Properties
       of Elements and Compounds. 4. Aliphatic Alkanols." Journal of Chemical
       & Engineering Data 40, no. 5 (September 1, 1995): 1025-36.
       doi:10.1021/je00021a001.
    .. [5] Daubert, Thomas E. "Vapor-Liquid Critical Properties of Elements
       and Compounds. 5. Branched Alkanes and Cycloalkanes." Journal of
       Chemical & Engineering Data 41, no. 3 (January 1, 1996): 365-72.
       doi:10.1021/je9501548.
    .. [6] Tsonopoulos, Constantine, and Douglas Ambrose. "Vapor-Liquid
       Critical Properties of Elements and Compounds. 6. Unsaturated Aliphatic
       Hydrocarbons." Journal of Chemical & Engineering Data 41, no. 4
       (January 1, 1996): 645-56. doi:10.1021/je9501999.
    .. [7] Kudchadker, Arvind P., Douglas Ambrose, and Constantine Tsonopoulos.
       "Vapor-Liquid Critical Properties of Elements and Compounds. 7. Oxygen
       Compounds Other Than Alkanols and Cycloalkanols." Journal of Chemical &
       Engineering Data 46, no. 3 (May 1, 2001): 457-79. doi:10.1021/je0001680.
    .. [8] Tsonopoulos, Constantine, and Douglas Ambrose. "Vapor-Liquid
       Critical Properties of Elements and Compounds. 8. Organic Sulfur,
       Silicon, and Tin Compounds (C + H + S, Si, and Sn)." Journal of Chemical
       & Engineering Data 46, no. 3 (May 1, 2001): 480-85.
       doi:10.1021/je000210r.
    .. [9] Marsh, Kenneth N., Colin L. Young, David W. Morton, Douglas Ambrose,
       and Constantine Tsonopoulos. "Vapor-Liquid Critical Properties of
       Elements and Compounds. 9. Organic Compounds Containing Nitrogen."
       Journal of Chemical & Engineering Data 51, no. 2 (March 1, 2006):
       305-14. doi:10.1021/je050221q.
    .. [10] Marsh, Kenneth N., Alan Abramson, Douglas Ambrose, David W. Morton,
       Eugene Nikitin, Constantine Tsonopoulos, and Colin L. Young.
       "Vapor-Liquid Critical Properties of Elements and Compounds. 10. Organic
       Compounds Containing Halogens." Journal of Chemical & Engineering Data
       52, no. 5 (September 1, 2007): 1509-38. doi:10.1021/je700336g.
    .. [11] Ambrose, Douglas, Constantine Tsonopoulos, and Eugene D. Nikitin.
       "Vapor-Liquid Critical Properties of Elements and Compounds. 11. Organic
       Compounds Containing B + O; Halogens + N, + O, + O + S, + S, + Si;
       N + O; and O + S, + Si." Journal of Chemical & Engineering Data 54,
       no. 3 (March 12, 2009): 669-89. doi:10.1021/je800580z.
    .. [12] Ambrose, Douglas, Constantine Tsonopoulos, Eugene D. Nikitin, David
       W. Morton, and Kenneth N. Marsh. "Vapor-Liquid Critical Properties of
       Elements and Compounds. 12. Review of Recent Data for Hydrocarbons and
       Non-Hydrocarbons." Journal of Chemical & Engineering Data, October 5,
       2015, 151005081500002. doi:10.1021/acs.jced.5b00571.
    .. [13] Mathews, Joseph F. "Critical Constants of Inorganic Substances."
       Chemical Reviews 72, no. 1 (February 1, 1972): 71-100.
       doi:10.1021/cr60275a004.
    .. [14] Haynes, W.M., Thomas J. Bruno, and David R. Lide. CRC Handbook of
       Chemistry and Physics, 95E. Boca Raton, FL: CRC press, 2014.
    .. [15] Horstmann, Sven, Anna Jabłoniec, Jörg Krafczyk, Kai Fischer, and
       Jürgen Gmehling. "PSRK Group Contribution Equation of State:
       Comprehensive Revision and Extension IV, Including Critical Constants
       and Α-Function Parameters for 1000 Components." Fluid Phase Equilibria
       227, no. 2 (January 25, 2005): 157-64. doi:10.1016/j.fluid.2004.11.002.
    .. [16] Passut, Charles A., and Ronald P. Danner. "Acentric Factor. A
       Valuable Correlating Parameter for the Properties of Hydrocarbons."
       Industrial & Engineering Chemistry Process Design and Development 12,
       no. 3 (July 1, 1973): 365–68. doi:10.1021/i260047a026.
    .. [17] Yaws, Carl L. Thermophysical Properties of Chemicals and
       Hydrocarbons, Second Edition. Amsterdam Boston: Gulf Professional
       Publishing, 2014.

r This function handles the retrieval of a chemical s critical pressure . Lookup is based on CASRNs . Will automatically select a data source to use if no Method is provided ; returns None if the data is not available .


return preprocess_text(text,
                           fix_unicode=True,
                           lowercase=True,
                           transliterate=True,
                           no_urls=True,
                           no_emails=True,
                           no_phone_numbers=True,
                           no_numbers=True,
                           no_currency_symbols=True,
                           no_punct=True,
                           no_contractions=False,
                           no_accents=True)

def Func ( arg_0 : arg_1 ) -> arg_1 : return preprocess_text ( arg_0 , fix_unicode = True , lowercase = True , transliterate = True , no_urls = True , no_emails = True , no_phone_numbers = True , no_numbers = True , no_currency_symbols = True , no_punct = True , no_contractions = False , no_accents = True )

def Func(arg_0: arg_1) -> arg_1:
    """
    Defines the default function for cleaning text.

    This function operates over a list.
    """
    return preprocess_text(arg_0,
                           fix_unicode=True,
                           lowercase=True,
                           transliterate=True,
                           no_urls=True,
                           no_emails=True,
                           no_phone_numbers=True,
                           no_numbers=True,
                           no_currency_symbols=True,
                           no_punct=True,
                           no_contractions=False,
                           no_accents=True)

Defines the default function for cleaning text .


return self.mm * self.P / R / state["T"]

def Func ( arg_0 , ** arg_1 ) : super ( ) . Func ( ** arg_1 ) return arg_0 . mm * arg_0 . P / R / arg_1 [ "T" ]

def Func(arg_0, **arg_1):
        """
        Calculate the density at the specified temperature.

        :param T: [K] temperature

        :returns: [kg/m3] density

        The **state parameter contains the keyword argument(s) specified above\
        that are used to describe the state of the material.
        """
        super().Func(**arg_1)
        return arg_0.mm * arg_0.P / R / arg_1["T"]

Calculate the density at the specified temperature .


def Func ( arg_0 ) : @ wraps ( arg_0 ) def wrapper ( * arg_1 , ** arg_2 ) : try : return arg_0 ( * arg_1 , ** arg_2 ) except BaseException as err : if BOOTSTRAPPER_TEST_KEY in os . environ : raise if ERROR_HANDLER_DISABLED : return True return save_traceback ( err ) return wrapper

def Func(arg_0):
    """Decorator to error handling."""
    @wraps(arg_0)
    def wrapper(*arg_1, **arg_2):
        """
        Run actual function and if exception catched and error handler enabled
        put traceback to log file
        """
        try:
            return arg_0(*arg_1, **arg_2)
        except BaseException as err:
            # Do not catch exceptions on testing
            if BOOTSTRAPPER_TEST_KEY in os.environ:
                raise
            # Fail silently if error handling disabled
            if ERROR_HANDLER_DISABLED:
                return True
            # Otherwise save traceback to log
            return save_traceback(err)
    return wrapper


def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_1 = numpy_formatter ( arg_0 , arg_1 , arg_2 ) if arg_2 is not None : arg_0 = arg_0 [ 0 ] arg_3 = np . vstack ( ( [ v . shape [ 0 ] for v in arg_1 ] , [ arg_0 ] * len ( arg_1 ) ) ) . T arg_1 = np . vstack ( list ( it . __next__ ( ) for it in itertools . cycle ( ( iter ( arg_3 ) , iter ( arg_1 ) ) ) ) ) return arg_1

def Func(arg_0, arg_1, arg_2=None):
    """`MATLAB`_ style contour formatter.

    Contours are returned as a single Nx2, `MATLAB`_ style, contour array.
    There are two types of rows in this format:

    * Header: The first element of a header row is the level of the contour
      (the lower level for filled contours) and the second element is the
      number of vertices (to follow) belonging to this contour line.
    * Vertex: x,y coordinate pairs of the vertex.

    A header row is always followed by the coresponding number of vertices.
    Another header row may follow if there are more contour lines.

    For filled contours the direction of vertices matters:

    * CCW (ACW): The vertices give the exterior of a contour polygon.
    * CW: The vertices give a hole of a contour polygon.  This hole will
        always be inside the exterior of the last contour exterior.

    For further explanation of this format see the `Mathworks documentation
    <https://www.mathworks.com/help/matlab/ref/contour-properties.html#prop_ContourMatrix>`_
    noting that the MATLAB format used in the `contours` package is the
    transpose of that used by `MATLAB`_ (since `MATLAB`_ is column-major
    and `NumPy`_ is row-major by default).

    .. _NumPy: http://www.numpy.org

    .. _MATLAB: https://www.mathworks.com/products/matlab.html

    """
    arg_1 = numpy_formatter(arg_0, arg_1, arg_2)
    if arg_2 is not None:
        arg_0 = arg_0[0]
    arg_3 = np.vstack((
        [v.shape[0] for v in arg_1],
        [arg_0]*len(arg_1))).T
    arg_1 = np.vstack(
        list(it.__next__() for it in
             itertools.cycle((iter(arg_3), iter(arg_1)))))
    return arg_1


return mir_eval.display.events(times, labels=labels, **kwargs)

def Func ( arg_0 , ** arg_1 ) : arg_2 , arg_3 = arg_0 . to_interval_values ( ) arg_4 = [ _ [ 'position' ] for _ in arg_3 ] return mir_eval . display . events ( arg_2 , arg_4 = arg_4 , ** arg_1 )

def Func(arg_0, **arg_1):
    '''Plotting wrapper for beat-position data'''

    arg_2, arg_3 = arg_0.to_interval_values()

    arg_4 = [_['position'] for _ in arg_3]

    # TODO: plot time signature, measure number
    return mir_eval.display.events(arg_2, arg_4=arg_4, **arg_1)

Plotting wrapper for beat - position data


(self, i_str, start_count=0, start_chunk_time=None)

def Func(arg_0, arg_1, arg_2=0, arg_3=None):
        '''Run the pipeline.

        This Funcs all of the steps described in the pipeline constructor,
        reading from some input and writing to some output.

        :param str i_str: name of the input file, or other reader-specific
          description of where to get input
        :param int start_count: index of the first stream item
        :param int start_chunk_time: timestamp for the first stream item

        '''
        try:
            if not os.path.exists(arg_0.tmp_dir_path):
                os.makedirs(arg_0.tmp_dir_path)

            if arg_3 is None:
                arg_3 = time.time()

            ## the reader returns generators of StreamItems
            arg_4 = arg_0.reader(arg_1)

            ## t_path points to the currently in-progress temp chunk
            arg_5 = None

            ## loop over all docs in the chunk processing and cutting
            ## smaller chunks if needed

            arg_6 = 0
            arg_7 = set()
            arg_8 = 0

            ## how many have we input and actually done processing on?
            arg_9 = 0

            for arg_10 in arg_4:
                # TODO: break out a _process_stream_item function?
                arg_8 += 1

                ## yield to the gevent hub to allow other things to Func
                if gevent:
                    gevent.sleep(0)

                ## skip forward until we reach start_count
                if arg_8 <= arg_2:
                    continue

                if arg_8 % arg_0.rate_log_interval == 0:
                    ## indexing is zero-based, so next_idx corresponds
                    ## to length of list of SIs processed so far
                    arg_11 = time.time() - arg_3
                    if arg_11 > 0:
                        arg_12 = float(arg_8) / arg_11
                        logger.info('%d in %.1f --> %.1f per sec on '
                                    '(pre-partial_commit) %s',
                                    arg_8 - arg_2, arg_11, arg_12,
                                    arg_1)

                if not arg_0.t_chunk:
                    ## make a temporary chunk at a temporary path
                    # (Lazy allocation after we've read an item that might get processed out to the new chunk file)
                    # TODO: make this EVEN LAZIER by not opening the t_chunk until inside _Func_incremental_transforms whe the first output si is ready
                    arg_5 = os.path.join(arg_0.tmp_dir_path,
                                          't_chunk-%s' % uuid.uuid4().hex)
                    arg_0.t_chunk = streamcorpus.Chunk(path=arg_5, mode='wb')
                    assert arg_0.t_chunk.message == streamcorpus.StreamItem_v0_3_0, arg_0.t_chunk.message

                # TODO: a set of incremental transforms is equivalent
                # to a batch transform.  Make the pipeline explicitly
                # configurable as such:
                #
                # batch_transforms: [[incr set 1], batch op, [incr set 2], ...]
                #
                # OR: for some list of transforms (mixed incremental
                # and batch) pipeline can detect and batchify as needed

                ## incremental transforms populate t_chunk
                ## let the incremental transforms destroy the si by
                ## returning None
                arg_10 = arg_0._Func_incremental_transforms(
                    arg_10, arg_0.incremental_transforms)

                ## insist that every chunk has only one source string
                if arg_10:
                    arg_7.add(arg_10.source)
                    if arg_0.assert_single_source and len(arg_7) != 1:
                        raise InvalidStreamItem(
                            'stream item %r had source %r, not %r '
                            '(set assert_single_source: false to suppress)' %
                            (arg_10.stream_id, arg_10.source, arg_7))

                if arg_10 and arg_10.body and arg_10.body.clean_visible:
                    arg_6 += len(arg_10.body.clean_visible)
                    ## log binned clean_visible lengths, for quick stats estimates
                    #logger.debug('len(si.body.clean_visible)=%d' % int(10 * int(math.floor(float(len(si.body.clean_visible)) / 2**10)/10)))
                    #logger.debug('len(si.body.clean_visible)=%d' % len(si.body.clean_visible))

                if ((arg_0.output_chunk_max_count is not None and
                     len(arg_0.t_chunk) == arg_0.output_chunk_max_count)):
                    logger.info('reached output_chunk_max_count (%d) at: %d',
                                len(arg_0.t_chunk), arg_8)
                    arg_0._process_output_chunk(
                        arg_2, arg_8, arg_7, arg_1, arg_5)
                    arg_2 = arg_8

                elif (arg_0.output_max_clean_visible_bytes is not None and
                      arg_6 >=
                      arg_0.output_chunk_max_clean_visible_bytes):
                    logger.info(
                        'reached output_chunk_max_clean_visible_bytes '
                        '(%d) at: %d',
                        arg_0.output_chunk_max_clean_visible_bytes,
                        arg_6)
                    arg_6 = 0
                    arg_0._process_output_chunk(
                        arg_2, arg_8, arg_7, arg_1, arg_5)
                    arg_2 = arg_8

                arg_9 += 1
                if (((arg_0.input_item_limit is not None) and
                     (arg_9 > arg_0.input_item_limit))):
                    break

            if arg_0.t_chunk is not None:
                arg_0._process_output_chunk(
                    arg_2, arg_8, arg_7, arg_1, arg_5)

            ## return how many stream items we processed
            return arg_8

        finally:
            if arg_0.t_chunk is not None:
                arg_0.t_chunk.close()
            for arg_14 in arg_0.batch_transforms:
                arg_14.shutdown()
            if arg_0.cleanup_tmp_files:
                rmtree(arg_0.tmp_dir_path)

Run the pipeline.

        This runs all of the steps described in the pipeline constructor,
        reading from some input and writing to some output.

        :param str i_str: name of the input file, or other reader-specific
          description of where to get input
        :param int start_count: index of the first stream item
        :param int start_chunk_time: timestamp for the first stream item


def Func ( arg_0 ) : arg_1 = [ ] while arg_0 : arg_2 = arg_0 . pop ( ) arg_1 . append ( arg_2 ) return arg_1

def Func(arg_0):
    """Scan output for exceptions

    If there is an output from an add task collection call add it to the results.

    :param results_queue: Queue containing results of attempted add_collection's
    :type results_queue: collections.deque
    :return: list of TaskAddResults
    :rtype: list[~TaskAddResult]
    """
    arg_1 = []
    while arg_0:
        arg_2 = arg_0.pop()
        arg_1.append(arg_2)
    return arg_1


def
Func
(
arg_0
)
:
arg_0
.
log
.
debug
(
"Func(): Initialzion Func sequence.."
)
arg_0
.
connected
.
clear
(
)
arg_0
.
Func_required
.
set
(
)
if
arg_0
.
socket
:
arg_0
.
socket
.
close
(
)

def Func(arg_0):
        """Issues a Funcion by setting the Func_required event.

        :return:
        """
        # Reconnect attempt at self.Func_interval
        arg_0.log.debug("Func(): Initialzion Func sequence..")
        arg_0.connected.clear()
        arg_0.Func_required.set()
        if arg_0.socket:
            arg_0.socket.close()

Issues a reconnection by setting the reconnect_required event.

        :return:

Issues a reconnection by setting the reconnect_required event .


def
Func
(
arg_0
)
:
logger
.
debug
(
'In state: Func'
)
arg_0
.
current_state
=
STATE_Func
if
arg_0
.
script
is
not
:
arg_0
.
script
.
script_init
(
arg_0
.
client
.
lease
,
arg_0
.
current_state
)
arg_0
.
script
.
script_go
(
)
else
:
set_net
(
arg_0
.
client
.
lease
)
return

def Func(arg_0):
        """Func state."""
        logger.debug('In state: Func')
        arg_0.current_state = STATE_Func
        if arg_0.script is not None:
            arg_0.script.script_init(arg_0.client.lease, arg_0.current_state)
            arg_0.script.script_go()
        else:
            set_net(arg_0.client.lease)
        return


def Func ( ) : arg_0 = ScalarEncoder ( 21 , 0.0 , 100.0 , n = 50 , name = "consumption" , clipInput = True ) arg_1 = DateEncoder ( timeOfDay = ( 21 , 9.5 ) , name = "timestamp_timeOfDay" ) arg_2 = MultiEncoder ( ) arg_2 . addEncoder ( "consumption" , arg_0 ) arg_2 . addEncoder ( "timestamp" , arg_1 ) return arg_2

def Func():
  """Create the encoder instance for our test and return it."""
  arg_0 = ScalarEncoder(21, 0.0, 100.0, n=50, name="consumption",
      clipInput=True)
  arg_1 = DateEncoder(timeOfDay=(21, 9.5), name="timestamp_timeOfDay")

  arg_2 = MultiEncoder()
  arg_2.addEncoder("consumption", arg_0)
  arg_2.addEncoder("timestamp", arg_1)

  return arg_2

Create the encoder instance for our test and return it .


def Func ( arg_0 ) : for arg_1 in list ( arg_0 . data . keys ( ) ) : if arg_1 in list ( arg_0 . reserved_keys . keys ( ) ) : arg_0 . data . pop ( arg_1 ) return arg_0

def Func(arg_0):
    """Return the object without the forbidden attributes."""
    for arg_1 in list(arg_0.data.keys()):
        if arg_1 in list(arg_0.reserved_keys.keys()):
            arg_0.data.pop(arg_1)
    return arg_0

Return the object without the forbidden attributes .


def Func ( arg_0 , arg_1 ) : if type ( arg_0 . _fpath ) == str : arg_0 . _fpath = arg_1 . apply ( arg_0 . _fpath )

def Func(arg_0, arg_1):
        """
        Replace any config tokens in the file's path with values from the config.
        """
        if type(arg_0._fpath) == str:
            arg_0._fpath = arg_1.apply(arg_0._fpath)

Replace any config tokens in the file s path with values from the config .


def Func(arg_0,arg_1="forward",arg_2=0,arg_3=1):
        """
        Return a new Frame that fills NA along a given axis and along a given direction with a maximum fill length

        :param method: ``"forward"`` or ``"backward"``
        :param axis:  0 for columnar-wise or 1 for row-wise fill
        :param maxlen: Max number of consecutive NA's to fill

        :return:
        """
        assert_is_type(arg_2, 0, 1)
        assert_is_type(arg_1,str)
        assert_is_type(arg_3, int)
        return H2OFrame._expr(expr=ExprNode("h2o.Func",arg_0,arg_1,arg_2,arg_3))


def Func ( arg_0 , arg_1 = False ) : arg_0 . lrnPredictedState [ 't' ] . fill ( 0 ) for arg_2 in xrange ( arg_0 . numberOfCols ) : arg_3 , arg_4 , arg_5 = arg_0 . _getBestMatchingCell ( arg_2 , arg_0 . lrnActiveState [ 't' ] , minThreshold = arg_0 . activationThreshold ) if arg_3 is None : continue arg_0 . lrnPredictedState [ 't' ] [ arg_2 , arg_3 ] = 1 if arg_1 : continue arg_7 = arg_0 . _getSegmentActiveSynapses ( arg_2 , arg_3 , arg_4 , activeState = arg_0 . lrnActiveState [ 't' ] , newSynapses = ( arg_5 < arg_0 . newSynapseCount ) ) arg_4 . totalActivations += 1 arg_0 . _addToSegmentUpdates ( arg_2 , arg_3 , arg_7 ) if arg_0 . doPooling : arg_8 = arg_0 . _getBestMatchingSegment ( arg_2 , arg_3 , arg_0 . lrnActiveState [ 't-1' ] ) arg_7 = arg_0 . _getSegmentActiveSynapses ( arg_2 , arg_3 , arg_8 , arg_0 . lrnActiveState [ 't-1' ] , newSynapses = True ) arg_0 . _addToSegmentUpdates ( arg_2 , arg_3 , arg_7 )

def Func(arg_0, arg_1=False):
    """
    Compute the predicted segments given the current set of active cells.

    :param readOnly       True if being called from backtracking logic.
                          This tells us not to increment any segment
                          duty cycles or queue up any updates.

    This computes the lrnPredictedState['t'] and queues up any segments that
    became active (and the list of active synapses for each segment) into
    the segmentUpdates queue

    This looks at:
        - @ref lrnActiveState['t']

    This modifies:
        - @ref lrnPredictedState['t']
        - @ref segmentUpdates
    """
    # Clear out predicted state to start with
    arg_0.lrnPredictedState['t'].fill(0)

    # Compute new predicted state. When computing predictions for
    # phase 2, we predict at  most one cell per column (the one with the best
    # matching segment).
    for arg_2 in xrange(arg_0.numberOfCols):

      # Is there a cell predicted to turn on in this column?
      arg_3, arg_4, arg_5 = arg_0._getBestMatchingCell(
          arg_2, arg_0.lrnActiveState['t'], minThreshold = arg_0.activationThreshold)
      if arg_3 is None:
        continue

      # Turn on the predicted state for the best matching cell and queue
      #  the pertinent segment up for an update, which will get processed if
      #  the cell receives bottom up in the future.
      arg_0.lrnPredictedState['t'][arg_2, arg_3] = 1
      if arg_1:
        continue

      # Queue up this segment for updating
      arg_7 = arg_0._getSegmentActiveSynapses(
          arg_2, arg_3, arg_4, activeState=arg_0.lrnActiveState['t'],
          newSynapses=(arg_5 < arg_0.newSynapseCount))

      arg_4.totalActivations += 1    # increment totalActivations
      arg_0._addToSegmentUpdates(arg_2, arg_3, arg_7)

      if arg_0.doPooling:
        # creates a new pooling segment if no best matching segment found
        # sum(all synapses) >= minThreshold, "weak" activation
        arg_8 = arg_0._getBestMatchingSegment(arg_2, arg_3,
                                                   arg_0.lrnActiveState['t-1'])
        arg_7 = arg_0._getSegmentActiveSynapses(arg_2, arg_3, arg_8,
                                                   arg_0.lrnActiveState['t-1'], newSynapses=True)
        arg_0._addToSegmentUpdates(arg_2, arg_3, arg_7)

Compute the predicted segments given the current set of active cells .


def Func(arg_0):
    """
    A helper method to serialize and processes the options dictionary.
    """
    arg_1 = (arg_0 or {}).copy()

    for arg_2 in arg_0.keys():
        if arg_2 not in DEFAULT_OPTIONS:
             LOG.warning("Unknown option passed to Flask-CORS: %s", arg_2)

    # Ensure origins is a list of allowed origins with at least one entry.
    arg_1['origins'] = sanitize_regex_param(arg_1.get('origins'))
    arg_1['allow_headers'] = sanitize_regex_param(arg_1.get('allow_headers'))

    # This is expressly forbidden by the spec. Raise a value error so people
    # don't get burned in production.
    if r'.*' in arg_1['origins'] and arg_1['supports_credentials'] and arg_1['send_wildcard']:
        raise ValueError("Cannot use supports_credentials in conjunction with"
                         "an origin string of '*'. See: "
                         "http://www.w3.org/TR/cors/#resource-requests")

    serialize_option(arg_1, 'expose_headers')
    serialize_option(arg_1, 'methods', upper=True)

    if isinstance(arg_1.get('max_age'), timedelta):
        arg_1['max_age'] = str(int(arg_1['max_age'].total_seconds()))

    return arg_1

A helper method to serialize and processes the options dictionary .


return timezone.make_aware(value, timezone.get_current_timezone()) if getattr(settings, 'USE_TZ', False) else value

def Func ( arg_0 ) : return timezone . make_aware ( arg_0 , timezone . get_current_timezone ( ) ) if getattr ( settings , 'USE_TZ' , False ) else arg_0

def Func(arg_0):
    """
    Generates a timezone aware datetime if the 'USE_TZ' setting is enabled

    :param value: The datetime value
    :return: A locale aware datetime
    """
    return timezone.make_aware(arg_0, timezone.get_current_timezone()) if getattr(settings, 'USE_TZ', False) else arg_0

Generates a timezone aware datetime if the USE_TZ setting is enabled


def Func(arg_0, arg_1):
    """Look for the files in filelist containing the names in roislist, these files will be opened, binarised
    and merged in one mask.

    Parameters
    ----------
    roislist: list of strings
        Names of the ROIs, which will have to be in the names of the files in filelist.

    filelist: list of strings
        List of paths to the volume files containing the ROIs.

    Returns
    -------
    numpy.ndarray
        Mask volume
    """
    arg_2 = []

    for arg_3 in arg_0:
        try:
            arg_4 = search_list(arg_3, arg_1)[0]
        except Exception as exc:
            raise Exception('Error creating list of roi files. \n {}'.format(str(exc)))
        else:
            arg_2.append(arg_4)

    return binarise(arg_2)

Look for the files in filelist containing the names in roislist these files will be opened binarised and merged in one mask .


def Func ( arg_0 , arg_1 ) : try : arg_1 = int ( arg_1 ) except ValueError : return None if arg_1 < 0 or arg_1 >= len ( arg_0 . things ) : return None return arg_0 . things [ arg_1 ]

def Func(arg_0, arg_1):
        """
        Get the thing at the given index.

        idx -- the index
        """
        try:
            arg_1 = int(arg_1)
        except ValueError:
            return None

        if arg_1 < 0 or arg_1 >= len(arg_0.things):
            return None

        return arg_0.things[arg_1]


def Func ( arg_0 , arg_1 = False ) : arg_2 = list ( arg_0 . getPrimaryKeys ( ) ) arg_3 = None while arg_2 and not arg_3 : arg_4 = arg_2 . pop ( Func . randint ( 0 , len ( arg_2 ) - 1 ) ) arg_3 = arg_0 . get ( arg_4 , arg_1 = arg_1 ) return arg_3

def Func(arg_0, arg_1=False):
		'''
			Random - Returns a Func record in current filterset.

			@param cascadeFetch <bool> Default False, If True, all Foreign objects associated with this model
			   will be fetched immediately. If False, foreign objects will be fetched on-access.

			@return - Instance of Model object, or None if no items math current filters
		'''
		arg_2 = list(arg_0.getPrimaryKeys())
		arg_3 = None
		# Loop so we don't return None when there are items, if item is deleted between getting key and getting obj
		while arg_2 and not arg_3:
			arg_4 = arg_2.pop(Func.randint(0, len(arg_2)-1))
			arg_3 = arg_0.get(arg_4, arg_1=arg_1)

		return arg_3

Random - Returns a random record in current filterset.

			@param cascadeFetch <bool> Default False, If True, all Foreign objects associated with this model
			   will be fetched immediately. If False, foreign objects will be fetched on-access.

			@return - Instance of Model object, or None if no items math current filters

Random - Returns a random record in current filterset .


def Func(arg_0, arg_1):
        """Give the current session a name in the history database."""
        with arg_0.db:
            arg_0.db.execute("UPDATE sessions SET remark=? WHERE session==?",
                            (arg_1, arg_0.session_number))

Give the current session a name in the history database .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_0 . gbdx_connection . put ( arg_0 . _base_url + '/' + arg_1 , json = arg_2 ) raise_for_status ( arg_3 ) return arg_3 . json ( )

def Func(arg_0, arg_1, arg_2):
        """Updates a GBDX task.

        Args:
            task_name (str): Task name.
            task_json (dict): Dictionary representing Funcd task definition.

        Returns:
            Dictionary representing the Funcd task definition.
        """
        arg_3 = arg_0.gbdx_connection.put(arg_0._base_url + '/' + arg_1, json=arg_2)
        raise_for_status(arg_3)

        return arg_3.json()

Updates a GBDX task.

        Args:
            task_name (str): Task name.
            task_json (dict): Dictionary representing updated task definition.

        Returns:
            Dictionary representing the updated task definition.


def Func ( arg_0 ) : arg_1 = arg_0 . validated_data [ 'enterprise_customer' ] arg_2 = models . EnterpriseCustomerUser ( user_id = arg_0 . user . pk , arg_1 = arg_1 , ) arg_2 . Func ( )

def Func(arg_0):  # pylint: disable=arguments-differ
        """
        Save the EnterpriseCustomerUser.
        """
        arg_1 = arg_0.validated_data['enterprise_customer']

        arg_2 = models.EnterpriseCustomerUser(
            user_id=arg_0.user.pk,
            arg_1=arg_1,
        )
        arg_2.Func()


(fn,
                            fn_arg_list,
                            result=None,
                            grads=None,
                            check_non_none_grads=True,
                            name=None)

def Func(arg_0,
                            arg_1,
                            arg_2=None,
                            arg_3=None,
                            arg_4=True,
                            arg_5=None):
  """Calls `fn` and computes the gradient of the result wrt `args_list`."""
  with tf.compat.v1.name_scope(arg_5, 'Func',
                               [arg_1, arg_2, arg_3]):
    arg_1 = (list(arg_1) if is_list_like(arg_1)
                   else [arg_1])
    arg_2, arg_3 = _value_and_gradients(arg_0, arg_1, arg_2, arg_3)
    if not all(arg_6.dtype.is_floating
               for arg_6 in (arg_2 if is_list_like(arg_2) else [arg_2])):  # pylint: disable=superfluous-parens
      raise TypeError('Function result must be a `Tensor` with `float` '
                      '`dtype`.')
    if len(arg_1) != len(arg_3):
      raise ValueError('Function args must be in one-to-one correspondence '
                       'with grads.')
    if arg_4 and any(arg_7 is None for arg_7 in arg_3):
      raise ValueError('Encountered `None` gradient.\n'
                       '  fn_arg_list: {}\n'
                       '  grads: {}'.format(arg_1, arg_3))
    return arg_2, arg_3

Calls fn and computes the gradient of the result wrt args_list .


def Func ( arg_0 , arg_1 ) : arg_2 = proto_pb2 . Event ( time = int ( arg_1 . time ) , state = arg_1 . state , service = arg_1 . service , host = arg_1 . hostname , description = arg_1 . description , tags = arg_1 . tags , ttl = arg_1 . ttl , ) if arg_1 . metric is not None : if isinstance ( arg_1 . metric , int ) : arg_2 . metric_sint64 = arg_1 . metric arg_2 . metric_f = float ( arg_1 . metric ) else : arg_2 . metric_d = float ( arg_1 . metric ) arg_2 . metric_f = float ( arg_1 . metric ) if arg_1 . attributes is not None : for arg_6 , arg_7 in arg_1 . attributes . items ( ) : arg_8 = arg_2 . attributes . add ( ) arg_8 . key , arg_8 . value = arg_6 , arg_7 return arg_2

def Func(arg_0, arg_1):
        """Adapts an Event object to a Riemann protobuf event Event"""
        arg_2 = proto_pb2.Event(
            time=int(arg_1.time),
            state=arg_1.state,
            service=arg_1.service,
            host=arg_1.hostname,
            description=arg_1.description,
            tags=arg_1.tags,
            ttl=arg_1.ttl,
        )

        if arg_1.metric is not None:
            # I have no idea what I'm doing
            if isinstance(arg_1.metric, int):
                arg_2.metric_sint64 = arg_1.metric
                arg_2.metric_f = float(arg_1.metric)
            else:
                arg_2.metric_d = float(arg_1.metric)
                arg_2.metric_f = float(arg_1.metric)
        if arg_1.attributes is not None:
            for arg_6, arg_7 in arg_1.attributes.items():
                arg_8 = arg_2.attributes.add()
                arg_8.key, arg_8.value = arg_6, arg_7

        return arg_2


spawns a greenlet that does not print exceptions to the screen.
    if you use this function you MUST use this module's join or joinall otherwise the exception will be lost

return gevent.spawn(wrap_uncaught_greenlet_exceptions(func), *args, **kwargs)

def Func ( arg_0 , * arg_1 , ** arg_2 ) : return gevent . Func ( wrap_uncaught_greenlet_exceptions ( arg_0 ) , * arg_1 , ** arg_2 )

def Func(arg_0, *arg_1, **arg_2):
    """ Funcs a greenlet that does not print exceptions to the screen.
    if you use this function you MUST use this module's join or joinall otherwise the exception will be lost """
    return gevent.Func(wrap_uncaught_greenlet_exceptions(arg_0), *arg_1, **arg_2)

spawns a greenlet that does not print exceptions to the screen . if you use this function you MUST use this module s join or joinall otherwise the exception will be lost


def
Func
(
arg_0
)
:
click
.
echo
(
json
.
dumps
(
arg_0
,
sort_keys
=
True
,
indent
=
4
,
separators
=
(
','
,
': '
)
)
)

def Func(arg_0):
    """Prints as formatted JSON"""
    click.echo(
        json.dumps(arg_0,
                   sort_keys=True,
                   indent=4,
                   separators=(',', ': ')))


return SISImportModel(data=self._post_resource(url, headers, csv))

def Func ( arg_0 , arg_1 , arg_2 = { } ) : if not arg_0 . _canvas_account_id : raise MissingAccountID ( ) arg_2 [ "import_type" ] = SISImportModel . CSV_IMPORT_TYPE arg_3 = SIS_IMPORTS_API . format ( arg_0 . _canvas_account_id ) + ".json{}" . format ( arg_0 . _params ( arg_2 ) ) arg_4 = { "Content-Type" : "text/csv" } return SISImportModel ( data = arg_0 . _post_resource ( arg_3 , arg_4 , arg_1 ) )

def Func(arg_0, arg_1, arg_2={}):
        """
        Imports a CSV string.

        https://canvas.instructure.com/doc/api/sis_imports.html#method.sis_imports_api.create
        """
        if not arg_0._canvas_account_id:
            raise MissingAccountID()

        arg_2["import_type"] = SISImportModel.CSV_IMPORT_TYPE
        arg_3 = SIS_IMPORTS_API.format(
            arg_0._canvas_account_id) + ".json{}".format(arg_0._params(arg_2))
        arg_4 = {"Content-Type": "text/csv"}

        return SISImportModel(data=arg_0._post_resource(arg_3, arg_4, arg_1))


def Func ( arg_0 , arg_1 , arg_2 ) : if arg_1 . type == 'register' and arg_2 . type == 'register' : assert arg_1 . size == 128 and arg_2 . size == 128 arg_1 . write ( arg_1 . read ( ) & ~ 0xffffffff | arg_2 . read ( ) & 0xffffffff ) elif arg_1 . type == 'memory' : assert arg_2 . type == 'register' arg_1 . write ( Operators . EXTRACT ( arg_2 . read ( ) , 0 , arg_1 . size ) ) else : assert arg_2 . type == 'memory' and arg_1 . type == 'register' assert arg_2 . size == 32 and arg_1 . size == 128 arg_1 . write ( Operators . ZEXTEND ( arg_2 . read ( ) , 128 ) )

def Func(arg_0, arg_1, arg_2):
        """
        Moves a scalar single-precision floating-point value

        Moves a scalar single-precision floating-point value from the source operand (second operand)
        to the destination operand (first operand). The source and destination operands can be XMM
        registers or 32-bit memory locations. This instruction can be used to move a single-precision
        floating-point value to and from the low doubleword of an XMM register and a 32-bit memory
        location, or to move a single-precision floating-point value between the low doublewords of
        two XMM registers. The instruction cannot be used to transfer data between memory locations.
        When the source and destination operands are XMM registers, the three high-order doublewords of the
        destination operand remain unchanged. When the source operand is a memory location and destination
        operand is an XMM registers, the three high-order doublewords of the destination operand are cleared to all 0s.

        //Func instruction when source and destination operands are XMM registers:
        if(IsXMM(Source) && IsXMM(Destination))
            Destination[0..31] = Source[0..31];
            //Destination[32..127] remains unchanged
            //Func instruction when source operand is XMM register and destination operand is memory location:
        else if(IsXMM(Source) && IsMemory(Destination))
            Destination = Source[0..31];
        //Func instruction when source operand is memory location and destination operand is XMM register:
        else {
                Destination[0..31] = Source;
                Destination[32..127] = 0;
        }
        """
        if arg_1.type == 'register' and arg_2.type == 'register':
            assert arg_1.size == 128 and arg_2.size == 128
            arg_1.write(arg_1.read() & ~0xffffffff | arg_2.read() & 0xffffffff)
        elif arg_1.type == 'memory':
            assert arg_2.type == 'register'
            arg_1.write(Operators.EXTRACT(arg_2.read(), 0, arg_1.size))
        else:
            assert arg_2.type == 'memory' and arg_1.type == 'register'
            assert arg_2.size == 32 and arg_1.size == 128
            arg_1.write(Operators.ZEXTEND(arg_2.read(), 128))

Moves a scalar single-precision floating-point value

        Moves a scalar single-precision floating-point value from the source operand (second operand)
        to the destination operand (first operand). The source and destination operands can be XMM
        registers or 32-bit memory locations. This instruction can be used to move a single-precision
        floating-point value to and from the low doubleword of an XMM register and a 32-bit memory
        location, or to move a single-precision floating-point value between the low doublewords of
        two XMM registers. The instruction cannot be used to transfer data between memory locations.
        When the source and destination operands are XMM registers, the three high-order doublewords of the
        destination operand remain unchanged. When the source operand is a memory location and destination
        operand is an XMM registers, the three high-order doublewords of the destination operand are cleared to all 0s.

        //MOVSS instruction when source and destination operands are XMM registers:
        if(IsXMM(Source) && IsXMM(Destination))
            Destination[0..31] = Source[0..31];
            //Destination[32..127] remains unchanged
            //MOVSS instruction when source operand is XMM register and destination operand is memory location:
        else if(IsXMM(Source) && IsMemory(Destination))
            Destination = Source[0..31];
        //MOVSS instruction when source operand is memory location and destination operand is XMM register:
        else {
                Destination[0..31] = Source;
                Destination[32..127] = 0;
        }

Moves a scalar single - precision floating - point value


def Func(arg_0, arg_1):
        '''Counts the number of real volumes in `Vs`, and determines what to do.
        If there is only one real volume, the method
        `set_properties_from_solution` is called with it. If there are
        two real volumes, `set_properties_from_solution` is called once with
        each volume. The phase is returned by `set_properties_from_solution`,
        and the volumes is set to either `V_l` or `V_g` as appropriate.

        Parameters
        ----------
        Vs : list[float]
            Three possible molar volumes, [m^3/mol]
        '''
        # All roots will have some imaginary component; ignore them if > 1E-9
        arg_2 = []
        arg_3 = []
        for arg_4 in arg_1:
            arg_5 = arg_4.real
            if abs(arg_4.imag) > 1E-9 or arg_5 < 0:
                arg_3.append(arg_4)
            else:
                arg_2.append(arg_5)

        if len(arg_3) == 2:
            arg_6 = arg_2[0]
            arg_0.phase = arg_0.set_properties_from_solution(arg_0.T, arg_0.P, arg_6, arg_0.b, arg_0.delta, arg_0.epsilon, arg_0.a_alpha, arg_0.da_alpha_dT, arg_0.d2a_alpha_dT2)
            if arg_0.phase == 'l':
                arg_0.V_l = arg_6
            else:
                arg_0.V_g = arg_6
        else:
            # Even in the case of three real roots, it is still the min/max that make sense
            arg_0.V_l, arg_0.V_g = min(arg_2), max(arg_2)
            [arg_0.set_properties_from_solution(arg_0.T, arg_0.P, arg_6, arg_0.b, arg_0.delta, arg_0.epsilon, arg_0.a_alpha, arg_0.da_alpha_dT, arg_0.d2a_alpha_dT2) for arg_6 in [arg_0.V_l, arg_0.V_g]]
            arg_0.phase = 'l/g'

Counts the number of real volumes in Vs and determines what to do . If there is only one real volume the method set_properties_from_solution is called with it . If there are two real volumes set_properties_from_solution is called once with each volume . The phase is returned by set_properties_from_solution and the volumes is set to either V_l or V_g as appropriate .


return matched and (self.opt.recursive or len(pi) <= len(fi))

def Func ( arg_0 , arg_1 , arg_2 ) : if not arg_1 or not arg_2 : return True if arg_1 [ - 1 ] == PATH_SEP : arg_1 = arg_1 [ 0 : - 1 ] if arg_2 [ - 1 ] == PATH_SEP : arg_2 += '*' arg_3 = arg_1 . split ( PATH_SEP ) arg_4 = arg_2 . split ( PATH_SEP ) arg_5 = min ( len ( arg_3 ) , len ( arg_4 ) ) arg_6 = fnmatch . fnmatch ( PATH_SEP . join ( arg_3 [ 0 : arg_5 ] ) , PATH_SEP . join ( arg_4 [ 0 : arg_5 ] ) ) return arg_6 and ( arg_0 . opt . recursive or len ( arg_3 ) <= len ( arg_4 ) )

def Func(arg_0, arg_1, arg_2):
    '''Partially match a path and a filter_path with wildcards.
       This function will return True if this path partially match a filter path.
       This is used for walking through directories with multiple level wildcard.
    '''
    if not arg_1 or not arg_2:
      return True

    # trailing slash normalization
    if arg_1[-1] == PATH_SEP:
      arg_1 = arg_1[0:-1]
    if arg_2[-1] == PATH_SEP:
      arg_2 += '*'

    arg_3 = arg_1.split(PATH_SEP)
    arg_4 = arg_2.split(PATH_SEP)

    # Here, if we are in recursive mode, we allow the pi to be longer than fi.
    # Otherwise, length of pi should be equal or less than the lenght of fi.
    arg_5 = min(len(arg_3), len(arg_4))
    arg_6 = fnmatch.fnmatch(PATH_SEP.join(arg_3[0:arg_5]), PATH_SEP.join(arg_4[0:arg_5]))
    return arg_6 and (arg_0.opt.recursive or len(arg_3) <= len(arg_4))

Partially match a path and a filter_path with wildcards . This function will return True if this path partially match a filter path . This is used for walking through directories with multiple level wildcard .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = { } if "{api}" in arg_0 : if arg_1 == "" : arg_0 = arg_0 . replace ( '{api}.' , '' ) else : arg_3 [ 'api' ] = arg_1 if "{version}" in arg_0 : if arg_2 == "" : arg_0 = arg_0 . replace ( '/{version}' , '' ) else : arg_3 [ 'version' ] = arg_2 return arg_0 . format ( arg_1 = arg_1 , arg_2 = arg_2 )

def Func(arg_0, arg_1, arg_2):
        """
            create the base url for the api

        Parameters
        ----------
        base_url : str
            format of the base_url using {api} and {version}
        api : str
            name of the api to use
        version : str
            version of the api

        Returns
        -------
        str
            the base url of the api you want to use
        """
        arg_3 = {}

        if "{api}" in arg_0:
            if arg_1 == "":
                arg_0 = arg_0.replace('{api}.', '')
            else:
                arg_3['api'] = arg_1

        if "{version}" in arg_0:
            if arg_2 == "":
                arg_0 = arg_0.replace('/{version}', '')
            else:
                arg_3['version'] = arg_2

        return arg_0.format(arg_1=arg_1, arg_2=arg_2)


(self, t, x0, y0, x1, y1, x2, y2, x3, y3, handles=False)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6, arg_7, arg_8, arg_9, arg_10=False):
        """ Returns coordinates for point at t on the spline.
            Calculates the coordinates of x and y for a point at t on the cubic bezier spline,
            and its control points, based on the de Casteljau interpolation algorithm.
            The t parameter is a number between 0.0 and 1.0,
            x0 and y0 define the starting point of the spline,
            x1 and y1 its control point,
            x3 and y3 the ending point of the spline,
            x2 and y2 its control point.
            If the handles parameter is set, returns not only the point at t,
            but the modified control points of p0 and p3 should this point split the path as well.
        """
        # Originally from nodebox-gl
        arg_11 = 1 - arg_1
        arg_12 = arg_2 * arg_11 + arg_4 * arg_1
        arg_13 = arg_3 * arg_11 + arg_5 * arg_1
        arg_14 = arg_4 * arg_11 + arg_6 * arg_1
        arg_15 = arg_5 * arg_11 + arg_7 * arg_1
        arg_16 = arg_6 * arg_11 + arg_8 * arg_1
        arg_17 = arg_7 * arg_11 + arg_9 * arg_1
        arg_18 = arg_12 * arg_11 + arg_14 * arg_1
        arg_19 = arg_13 * arg_11 + arg_15 * arg_1
        arg_20 = arg_14 * arg_11 + arg_16 * arg_1
        arg_21 = arg_15 * arg_11 + arg_17 * arg_1
        arg_22 = arg_18 * arg_11 + arg_20 * arg_1
        arg_23 = arg_19 * arg_11 + arg_21 * arg_1
        if not arg_10:
            return (arg_22, arg_23, arg_18, arg_19, arg_20, arg_21)
        else:
            return (arg_22, arg_23, arg_18, arg_19, arg_20, arg_21, arg_12, arg_13, arg_16, arg_17)

Returns coordinates for point at t on the spline . Calculates the coordinates of x and y for a point at t on the cubic bezier spline and its control points based on the de Casteljau interpolation algorithm . The t parameter is a number between 0 . 0 and 1 . 0 x0 and y0 define the starting point of the spline x1 and y1 its control point x3 and y3 the ending point of the spline x2 and y2 its control point . If the handles parameter is set returns not only the point at t but the modified control points of p0 and p3 should this point split the path as well .


def Func ( arg_0 , arg_1 ) : arg_0 . wbtn_confirm = button . Button ( "btn_confirm" , arg_0 , arg_0 . window , arg_0 . peng , pos = lambda sw , sh , bw , bh : ( sw / 2 - bw - 4 , sh / 2 - bh / 2 - bh * 2 ) , arg_3 = [ 0 , 0 ] , label = arg_1 , borderstyle = arg_0 . borderstyle ) arg_0 . wbtn_confirm . size = lambda sw , sh : ( arg_0 . wbtn_confirm . _label . font_size * 8 , arg_0 . wbtn_confirm . _label . font_size * 2 ) arg_0 . addWidget ( arg_0 . wbtn_confirm ) def f ( ) : arg_0 . doAction ( "confirm" ) arg_0 . exitDialog ( ) arg_0 . wbtn_confirm . addAction ( "click" , f )

def Func(arg_0,arg_1):
        """
        Adds a confirm button to let the user confirm whatever action they were presented with.

        This widget can be triggered by setting the label ``label_confirm`` to a string.

        This widget will be positioned slightly below the main label and to the left
        of the cancel button.
        """
        # Confirm Button
        arg_0.wbtn_confirm = button.Button("btn_confirm",arg_0,arg_0.window,arg_0.peng,
                        pos=lambda sw,sh, bw,bh: (sw/2-bw-4,sh/2-bh/2-bh*2),
                        arg_3=[0,0],
                        label=arg_1,
                        borderstyle=arg_0.borderstyle
                        )
        arg_0.wbtn_confirm.size = lambda sw,sh: (arg_0.wbtn_confirm._label.font_size*8,arg_0.wbtn_confirm._label.font_size*2)
        arg_0.addWidget(arg_0.wbtn_confirm)

        def f():
            arg_0.doAction("confirm")
            arg_0.exitDialog()
        arg_0.wbtn_confirm.addAction("click",f)

Adds a confirm button to let the user confirm whatever action they were presented with . This widget can be triggered by setting the label label_confirm to a string . This widget will be positioned slightly below the main label and to the left of the cancel button .


return dateobj.replace(year=year, day=min(lastday, dateobj.day))

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . year + arg_1 arg_3 = monthrange ( arg_2 , arg_0 . month ) [ 1 ] return arg_0 . replace ( arg_2 = arg_2 , day = min ( arg_3 , arg_0 . day ) )

def Func(arg_0, arg_1):
    """return `dateobj` + `nb_years`

    If landing date doesn't exist (e.g. february, 30th), return the last
    day of the landing month.

    >>> Func(date(2018, 1, 1), 1)
    datetime.date(2019, 1, 1)
    >>> Func(date(2018, 1, 1), -1)
    datetime.date(2017, 1, 1)
    >>> Func(date(2020, 2, 29), 1)
    datetime.date(2021, 2, 28)
    >>> Func(date(2020, 2, 29), -1)
    datetime.date(2019, 2, 28)
    """
    arg_2 = arg_0.year + arg_1
    arg_3 = monthrange(arg_2, arg_0.month)[1]
    return arg_0.replace(arg_2=arg_2, day=min(arg_3, arg_0.day))

return `dateobj` + `nb_years`

    If landing date doesn't exist (e.g. february, 30th), return the last
    day of the landing month.

    >>> add_years(date(2018, 1, 1), 1)
    datetime.date(2019, 1, 1)
    >>> add_years(date(2018, 1, 1), -1)
    datetime.date(2017, 1, 1)
    >>> add_years(date(2020, 2, 29), 1)
    datetime.date(2021, 2, 28)
    >>> add_years(date(2020, 2, 29), -1)
    datetime.date(2019, 2, 28)


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
arg_0
.
job_id_regexp
.
search
(
arg_1
)
if
arg_2
is
not
:
arg_3
=
arg_2
.
group
(
)
else
:
raise
LauncherError
(
"Job id couldn't be determined: %s"
%
arg_1
)
arg_0
.
job_id
=
arg_3
arg_0
.
log
.
info
(
'Job submitted with job id: %r'
,
arg_3
)
return
arg_3

def Func(arg_0, arg_1):
        """Take the output of the submit command and return the job id."""
        arg_2 = arg_0.job_id_regexp.search(arg_1)
        if arg_2 is not None:
            arg_3 = arg_2.group()
        else:
            raise LauncherError("Job id couldn't be determined: %s" % arg_1)
        arg_0.job_id = arg_3
        arg_0.log.info('Job submitted with job id: %r', arg_3)
        return arg_3

Take the output of the submit command and return the job id .


(ctx, app_id, body_file, json_flag,
            title, body, max_num, forcus, request_id)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 , arg_6 , arg_7 , arg_8 ) : arg_1 = clean_app_id ( arg_1 ) arg_5 = clean_body ( arg_5 , arg_2 ) arg_9 = GoolabsAPI ( arg_1 ) arg_10 = arg_9 . keyword ( arg_4 = arg_4 , arg_5 = arg_5 , arg_6 = arg_6 , arg_7 = arg_7 , arg_8 = arg_8 , ) if arg_3 : click . echo ( format_json ( arg_9 . response . json ( ) ) ) return for arg_11 in arg_10 [ 'keywords' ] : arg_11 = dict ( ( key . encode ( 'utf-8' ) , arg_11 [ key ] ) for key in arg_11 . keys ( ) ) for Func , arg_13 in six . iteritems ( arg_11 ) : click . echo ( u'{0},{1}' . format ( text ( Func ) , arg_13 ) )

def Func(arg_0, arg_1, arg_2, arg_3,
            arg_4, arg_5, arg_6, arg_7, arg_8):
    # type: (Context, unicode, Optional[IO], bool, unicode, unicode, int, unicode, unicode) -> None # NOQA
    """Extract "keywords" from an input document. """

    arg_1 = clean_app_id(arg_1)
    arg_5 = clean_body(arg_5, arg_2)

    arg_9 = GoolabsAPI(arg_1)
    arg_10 = arg_9.keyword(
        arg_4=arg_4,
        arg_5=arg_5,
        arg_6=arg_6,
        arg_7=arg_7,
        arg_8=arg_8,
    )

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

    for arg_11 in arg_10['keywords']:
        arg_11 = dict((key.encode('utf-8'), arg_11[key]) for key in arg_11.keys())
        for Func, arg_13 in six.iteritems(arg_11):
            click.echo(u'{0},{1}'.format(text(Func), arg_13))

Extract keywords from an input document .


def Func(arg_0):
        """Loads a binary gltf file"""
        with open(arg_0.path, 'rb') as fd:
            # Check header
            arg_1 = fd.read(4)
            if arg_1 != GLTF_MAGIC_HEADER:
                raise ValueError("{} has incorrect header {} != {}".format(arg_0.path, arg_1, GLTF_MAGIC_HEADER))

            arg_2 = struct.unpack('<I', fd.read(4))[0]
            if arg_2 != 2:
                raise ValueError("{} has unsupported version {}".format(arg_0.path, arg_2))

            # Total file size including headers
            arg_3 = struct.unpack('<I', fd.read(4))[0]  # noqa

            # Chunk 0 - json
            arg_4 = struct.unpack('<I', fd.read(4))[0]
            arg_5 = fd.read(4)
            if arg_5 != b'JSON':
                raise ValueError("Expected JSON chunk, not {} in file {}".format(arg_5, arg_0.path))

            arg_6 = fd.read(arg_4).decode()

            # chunk 1 - binary buffer
            arg_7 = struct.unpack('<I', fd.read(4))[0]
            arg_8 = fd.read(4)
            if arg_8 != b'BIN\x00':
                raise ValueError("Expected BIN chunk, not {} in file {}".format(arg_8, arg_0.path))

            arg_0.meta = GLTFMeta(arg_0.path, json.loads(arg_6), binary_buffer=fd.read(arg_7))