(circuits,
              backend=None,
              basis_gates=None, coupling_map=None, backend_properties=None,
              initial_layout=None, seed_transpiler=None,
              optimization_level=None,
              pass_manager=None,
              seed_mapper=None)

def Func(arg_0,
              arg_1=None,
              arg_2=None, arg_3=None, arg_4=None,
              arg_5=None, arg_6=None,
              arg_7=None,
              arg_8=None,
              arg_9=None):  # deprecated
    """Func one or more circuits, according to some desired
    transpilation targets.

    All arguments may be given as either singleton or list. In case of list,
    the length must be equal to the number of circuits being Funcd.

    Transpilation is done in parallel using multiprocessing.

    Args:
        circuits (QuantumCircuit or list[QuantumCircuit]):
            Circuit(s) to Func

        backend (BaseBackend):
            If set, Funcr options are automatically grabbed from
            backend.configuration() and backend.properties().
            If any other option is explicitly set (e.g. coupling_map), it
            will override the backend's.
            Note: the backend arg is purely for convenience. The resulting
                circuit may be run on any backend as long as it is compatible.

        basis_gates (list[str]):
            List of basis gate names to unroll to.
            e.g:
                ['u1', 'u2', 'u3', 'cx']
            If None, do not unroll.

        coupling_map (CouplingMap or list):
            Coupling map (perhaps custom) to target in mapping.
            Multiple formats are supported:
            a. CouplingMap instance

            b. list
                Must be given as an adjacency matrix, where each entry
                specifies all two-qubit interactions supported by backend
                e.g:
                    [[0, 1], [0, 3], [1, 2], [1, 5], [2, 5], [4, 1], [5, 3]]

        backend_properties (BackendProperties):
            properties returned by a backend, including information on gate
            errors, readout errors, qubit coherence times, etc. For a backend
            that provides this information, it can be obtained with:
            ``backend.properties()``

        initial_layout (Layout or dict or list):
            Initial position of virtual qubits on physical qubits.
            If this layout makes the circuit compatible with the coupling_map
            constraints, it will be used.
            The final layout is not guaranteed to be the same, as the Funcr
            may permute qubits through swaps or other means.

            Multiple formats are supported:
            a. Layout instance

            b. dict
                virtual to physical:
                    {qr[0]: 0,
                     qr[1]: 3,
                     qr[2]: 5}

                physical to virtual:
                    {0: qr[0],
                     3: qr[1],
                     5: qr[2]}

            c. list
                virtual to physical:
                    [0, 3, 5]  # virtual qubits are ordered (in addition to named)

                physical to virtual:
                    [qr[0], None, None, qr[1], None, qr[2]]

        seed_Funcr (int):
            sets random seed for the stochastic parts of the Funcr

        optimization_level (int):
            How much optimization to perform on the circuits.
            Higher levels generate more optimized circuits,
            at the expense of longer transpilation time.
                0: no optimization
                1: light optimization
                2: heavy optimization

        pass_manager (PassManager):
            The pass manager to use for a custom pipeline of Funcr passes.
            If this arg is present, all other args will be ignored and the
            pass manager will be used directly (Qiskit will not attempt to
            auto-select a pass manager based on Func options).

        seed_mapper (int):
            DEPRECATED in 0.8: use ``seed_Funcr`` kwarg instead

    Returns:
        QuantumCircuit or list[QuantumCircuit]: Funcd circuit(s).

    Raises:
        TranspilerError: in case of bad inputs to Funcr or errors in passes
    """
    # Deprecation matter
    if arg_9:
        warnings.warn("seed_mapper has been deprecated and will be removed in the "
                      "0.9 release. Instead use seed_Funcr to set the seed "
                      "for all stochastic parts of the.", DeprecationWarning)
        arg_6 = arg_9

    # transpiling schedules is not supported yet.
    if isinstance(arg_0, Schedule) or \
       (isinstance(arg_0, list) and all(isinstance(arg_10, Schedule) for arg_10 in arg_0)):
        return arg_0

    # Get TranspileConfig(s) to configure the circuit transpilation job(s)
    arg_0 = arg_0 if isinstance(arg_0, list) else [arg_0]
    arg_11 = _parse_Func_args(arg_0, arg_1, arg_2, arg_3,
                                              arg_4, arg_5,
                                              arg_6, arg_7,
                                              arg_8)

    # Transpile circuits in parallel
    arg_0 = parallel_map(_Func_circuit, list(zip(arg_0, arg_11)))

    if len(arg_0) == 1:
        return arg_0[0]
    return arg_0

transpile one or more circuits, according to some desired
    transpilation targets.

    All arguments may be given as either singleton or list. In case of list,
    the length must be equal to the number of circuits being transpiled.

    Transpilation is done in parallel using multiprocessing.

    Args:
        circuits (QuantumCircuit or list[QuantumCircuit]):
            Circuit(s) to transpile

        backend (BaseBackend):
            If set, transpiler options are automatically grabbed from
            backend.configuration() and backend.properties().
            If any other option is explicitly set (e.g. coupling_map), it
            will override the backend's.
            Note: the backend arg is purely for convenience. The resulting
                circuit may be run on any backend as long as it is compatible.

        basis_gates (list[str]):
            List of basis gate names to unroll to.
            e.g:
                ['u1', 'u2', 'u3', 'cx']
            If None, do not unroll.

        coupling_map (CouplingMap or list):
            Coupling map (perhaps custom) to target in mapping.
            Multiple formats are supported:
            a. CouplingMap instance

            b. list
                Must be given as an adjacency matrix, where each entry
                specifies all two-qubit interactions supported by backend
                e.g:
                    [[0, 1], [0, 3], [1, 2], [1, 5], [2, 5], [4, 1], [5, 3]]

        backend_properties (BackendProperties):
            properties returned by a backend, including information on gate
            errors, readout errors, qubit coherence times, etc. For a backend
            that provides this information, it can be obtained with:
            ``backend.properties()``

        initial_layout (Layout or dict or list):
            Initial position of virtual qubits on physical qubits.
            If this layout makes the circuit compatible with the coupling_map
            constraints, it will be used.
            The final layout is not guaranteed to be the same, as the transpiler
            may permute qubits through swaps or other means.

            Multiple formats are supported:
            a. Layout instance

            b. dict
                virtual to physical:
                    {qr[0]: 0,
                     qr[1]: 3,
                     qr[2]: 5}

                physical to virtual:
                    {0: qr[0],
                     3: qr[1],
                     5: qr[2]}

            c. list
                virtual to physical:
                    [0, 3, 5]  # virtual qubits are ordered (in addition to named)

                physical to virtual:
                    [qr[0], None, None, qr[1], None, qr[2]]

        seed_transpiler (int):
            sets random seed for the stochastic parts of the transpiler

        optimization_level (int):
            How much optimization to perform on the circuits.
            Higher levels generate more optimized circuits,
            at the expense of longer transpilation time.
                0: no optimization
                1: light optimization
                2: heavy optimization

        pass_manager (PassManager):
            The pass manager to use for a custom pipeline of transpiler passes.
            If this arg is present, all other args will be ignored and the
            pass manager will be used directly (Qiskit will not attempt to
            auto-select a pass manager based on transpile options).

        seed_mapper (int):
            DEPRECATED in 0.8: use ``seed_transpiler`` kwarg instead

    Returns:
        QuantumCircuit or list[QuantumCircuit]: transpiled circuit(s).

    Raises:
        TranspilerError: in case of bad inputs to transpiler or errors in passes

transpile one or more circuits according to some desired transpilation targets .


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
arg_0
.
lrs
.
Func
(
arg_1
)
if
not
arg_2
:
raise
ClientError
(
'EnterpriseXAPIClient request failed.'
)

def Func(arg_0, arg_1):
        """
        Save xAPI statement.

        Arguments:
            statement (EnterpriseStatement): xAPI Statement to send to the LRS.

        Raises:
            ClientError: If xAPI statement fails to save.
        """
        arg_2 = arg_0.lrs.Func(arg_1)

        if not arg_2:
            raise ClientError('EnterpriseXAPIClient request failed.')


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
if
not
isinstance
(
arg_2
,
Iterable
)
:
raise
ValueError
(
'variable %s: choices must be iterable'
%
arg_1
)
arg_0
.
variables
[
arg_1
]
=
EnumVariable
(
arg_1
,
arg_2
)

def Func(arg_0, arg_1, arg_2):
        """An enumeration-valued dimension.

        The base measure associated with this dimension is a categorical
        distribution with equal weight on each element in `choices`.
        """
        if not isinstance(arg_2, Iterable):
            raise ValueError('variable %s: choices must be iterable' % arg_1)
        arg_0.variables[arg_1] = EnumVariable(arg_1, arg_2)


(name=None,
                 image_uri=None,
                 commands=None,
                 entrypoint=None,
                 environment=None,
                 pid_namespace=None,
                 flags=None,
                 port_mappings=None,
                 mounts=None,
                 labels=None)

return {
      'name': name,
      'imageUri': image_uri,
      'commands': commands,
      'entrypoint': entrypoint,
      'environment': environment,
      'pidNamespace': pid_namespace,
      'flags': flags,
      'portMappings': port_mappings,
      'mounts': mounts,
      'labels': labels,
  }

def Func ( arg_0 = None , arg_1 = None , arg_2 = None , arg_3 = None , arg_4 = None , arg_5 = None , arg_6 = None , arg_7 = None , arg_8 = None , arg_9 = None ) : return { 'name' : arg_0 , 'imageUri' : arg_1 , 'commands' : arg_2 , 'entrypoint' : arg_3 , 'environment' : arg_4 , 'pidNamespace' : arg_5 , 'flags' : arg_6 , 'portMappings' : arg_7 , 'mounts' : arg_8 , 'labels' : arg_9 , }

def Func(arg_0=None,
                 arg_1=None,
                 arg_2=None,
                 arg_3=None,
                 arg_4=None,
                 arg_5=None,
                 arg_6=None,
                 arg_7=None,
                 arg_8=None,
                 arg_9=None):
  """Build an Action object for a Pipeline request.

  Args:
    name (str): An optional name for the container.
    image_uri (str): The URI to pull the container image from.
    commands (List[str]): commands and arguments to run inside the container.
    entrypoint (str): overrides the ENTRYPOINT specified in the container.
    environment (dict[str,str]): The environment to pass into the container.
    pid_namespace (str): The PID namespace to run the action inside.
    flags (str): Flags that control the execution of this action.
    port_mappings (dict[int, int]): A map of container to host port mappings for
      this container.
    mounts (List): A list of mounts to make available to the action.
    labels (dict[str]): Labels to associate with the action.

  Returns:
    An object representing an Action resource.
  """

  return {
      'name': arg_0,
      'imageUri': arg_1,
      'commands': arg_2,
      'entrypoint': arg_3,
      'environment': arg_4,
      'pidNamespace': arg_5,
      'flags': arg_6,
      'portMappings': arg_7,
      'mounts': arg_8,
      'labels': arg_9,
  }

Build an Action object for a Pipeline request .


(self, image, color=(0, 255, 0), alpha=1.0, size=1,
                      copy=True, raise_if_out_of_image=False, thickness=None)

def Func(arg_0, arg_1, arg_2=(0, 255, 0), arg_3=1.0, arg_4=1,
                      arg_5=True, arg_6=False, arg_7=None):
        """
        Draw the bounding box on an image.

        Parameters
        ----------
        image : (H,W,C) ndarray(uint8)
            The image onto which to draw the bounding box.

        color : iterable of int, optional
            The color to use, corresponding to the channel layout of the image. Usually RGB.

        alpha : float, optional
            The transparency of the drawn bounding box, where 1.0 denotes no transparency and
            0.0 is invisible.

        size : int, optional
            The thickness of the bounding box in pixels. If the value is larger than 1, then
            additional pixels will be added around the bounding box (i.e. extension towards the
            outside).

        copy : bool, optional
            Whether to copy the input image or change it in-place.

        raise_if_out_of_image : bool, optional
            Whether to raise an error if the bounding box 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.

        thickness : None or int, optional
            Deprecated.

        Returns
        -------
        result : (H,W,C) ndarray(uint8)
            Image with bounding box drawn on it.

        """
        if arg_7 is not None:
            ia.warn_deprecated(
                "Usage of argument 'thickness' in BoundingBox.Func() "
                "is deprecated. The argument was renamed to 'size'."
            )
            arg_4 = arg_7

        if arg_6 and arg_0.is_out_of_image(arg_1):
            raise Exception("Cannot draw bounding box x1=%.8f, y1=%.8f, x2=%.8f, y2=%.8f on image with shape %s." % (
                arg_0.x1, arg_0.y1, arg_0.x2, arg_0.y2, arg_1.shape))

        arg_8 = np.copy(arg_1) if arg_5 else arg_1

        if isinstance(arg_2, (tuple, list)):
            arg_2 = np.uint8(arg_2)

        for arg_9 in range(arg_4):
            arg_10, arg_11, arg_12, arg_13 = arg_0.y1_int, arg_0.y2_int, arg_0.x1_int, arg_0.x2_int

            # When y values get into the range (H-0.5, H), the *_int functions round them to H.
            # That is technically sensible, but in the case of drawing means that the border lies
            # just barely outside of the image, making the border disappear, even though the BB
            # is fully inside the image. Here we correct for that because of beauty reasons.
            # Same is the case for x coordinates.
            if arg_0.is_fully_within_image(arg_1):
                arg_10 = np.clip(arg_10, 0, arg_1.shape[0]-1)
                arg_11 = np.clip(arg_11, 0, arg_1.shape[0]-1)
                arg_12 = np.clip(arg_12, 0, arg_1.shape[1]-1)
                arg_13 = np.clip(arg_13, 0, arg_1.shape[1]-1)

            arg_14 = [arg_10-arg_9, arg_10-arg_9, arg_11+arg_9, arg_11+arg_9]
            arg_15 = [arg_12-arg_9, arg_13+arg_9, arg_13+arg_9, arg_12-arg_9]
            arg_16, arg_17 = skimage.draw.polygon_perimeter(arg_14, arg_15, shape=arg_8.shape)
            if arg_3 >= 0.99:
                arg_8[arg_16, arg_17, :] = arg_2
            else:
                if ia.is_float_array(arg_8):
                    arg_8[arg_16, arg_17, :] = (1 - arg_3) * arg_8[arg_16, arg_17, :] + arg_3 * arg_2
                    arg_8 = np.clip(arg_8, 0, 255)
                else:
                    arg_18 = arg_8.dtype
                    arg_8 = arg_8.astype(np.float32)
                    arg_8[arg_16, arg_17, :] = (1 - arg_3) * arg_8[arg_16, arg_17, :] + arg_3 * arg_2
                    arg_8 = np.clip(arg_8, 0, 255).astype(arg_18)

        return arg_8


return build(
            'bigquery', 'v2', http=http_authorized, cache_discovery=False)

def Func ( arg_0 ) : arg_1 = arg_0 . _authorize ( ) return build ( 'bigquery' , 'v2' , http = arg_1 , cache_discovery = False )

def Func(arg_0):
        """
        Returns a BigQuery service object.
        """
        arg_1 = arg_0._authorize()
        return build(
            'bigquery', 'v2', http=arg_1, cache_discovery=False)


return [
            {
                "id": member.id,
                "label": str(member.get_label(lang)),
                "model": str(member.model),
                "type": str(member.type),
                "size": member.size
            }
            for member in collection.parents
            if member.get_label()
        ]

def Func ( arg_0 , arg_1 , arg_2 = None ) : return [ { "id" : arg_3 . id , "label" : str ( arg_3 . get_label ( arg_2 ) ) , "model" : str ( arg_3 . model ) , "type" : str ( arg_3 . type ) , "size" : arg_3 . size } for arg_3 in arg_1 . parents if arg_3 . get_label ( ) ]

def Func(arg_0, arg_1, arg_2=None):
        """ Build parents list for given collection

        :param collection: Collection to build dict view of for its members
        :param lang: Language to express data in
        :return: List of basic objects
        """
        return [
            {
                "id": arg_3.id,
                "label": str(arg_3.get_label(arg_2)),
                "model": str(arg_3.model),
                "type": str(arg_3.type),
                "size": arg_3.size
            }
            for arg_3 in arg_1.parents
            if arg_3.get_label()
        ]


(self, name, store, native_crs, srs=None, jdbc_virtual_table=None, native_name=None)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4=None, arg_5=None, arg_6=None):
        '''Publish a featuretype from data in an existing store'''
        # @todo native_srs doesn't seem to get detected, even when in the DB
        # metadata (at least for postgis in geometry_columns) and then there
        # will be a misconfigured layer
        if arg_3 is None:
            raise ValueError("must specify native_crs")

        arg_4 = arg_4 or arg_3
        arg_7 = FeatureType(arg_0, arg_2.workspace, arg_2, arg_1)
        # because name is the in FeatureType base class, work around that
        # and hack in these others that don't have xml properties
        arg_7.dirty['name'] = arg_1
        arg_7.dirty['srs'] = arg_4
        arg_7.dirty['nativeCRS'] = arg_3
        arg_7.enabled = True
        arg_7.advertised = True
        arg_7.title = arg_1

        if arg_6 is not None:
            arg_7.native_name = arg_6

        arg_12 = {
            "Content-type": "application/xml",
            "Accept": "application/xml"
        }

        arg_13 = arg_2.resource_url
        if arg_5 is not None:
            arg_7.metadata = ({'JDBC_VIRTUAL_TABLE': arg_5})
            arg_15 = dict()
            arg_13 = build_url(
                arg_0.service_url,
                [
                    "workspaces",
                    arg_2.workspace.name,
                    "datastores", arg_2.name,
                    "featuretypes.xml"
                ],
                arg_15
            )

        arg_16 = arg_0.http_request(arg_13, method='post', data=arg_7.message(), arg_12=arg_12)
        if arg_16.status_code not in (200, 201, 202):
            FailedRequestError('Failed to publish feature type {} : {}, {}'.format(arg_1, arg_16.status_code, arg_16.text))

        arg_0._cache.clear()
        arg_7.fetch()
        return arg_7


return _MinidomXmlToObject.parse_service_resources_response(
            response, Database)

def Func(arg_0, arg_1):
        '''
        List the SQL databases defined on the specified server name
        '''
        arg_2 = arg_0._perform_get(arg_0._get_Func_path(arg_1),
                                     None)
        return _MinidomXmlToObject.parse_service_resources_response(
            arg_2, Database)


def Func(arg_0):
        """
        Returns the enterprise customer requested for the given uuid, None if not.

        Raises CommandError if uuid is invalid.
        """
        if arg_0 is None:
            return None
        try:
            return EnterpriseCustomer.active_customers.get(arg_0=arg_0)
        except EnterpriseCustomer.DoesNotExist:
            raise CommandError(
                _('Enterprise customer {uuid} not found, or not active').format(arg_0=arg_0))

Returns the enterprise customer requested for the given uuid None if not .


def
Func
(
arg_0
)
:
arg_1
=
arg_0
//
60
arg_0
%=
60
arg_2
=
arg_1
//
60
arg_1
%=
60
arg_3
=
arg_2
//
24
arg_2
%=
24
def
helper
(
arg_4
,
arg_5
)
:
return
"{} {}{}"
.
format
(
str
(
arg_4
)
,
arg_5
,
(
's'
if
arg_4
>
1
else
''
)
)
if
arg_3
>
0
:
arg_6
=
helper
(
arg_3
,
'day'
)
if
arg_2
>
0
:
arg_6
+=
' and '
+
helper
(
arg_2
,
'hour'
)
return
arg_6
if
arg_2
>
0
:
arg_6
=
helper
(
arg_2
,
'hour'
)
if
arg_1
>
0
:
arg_6
+=
' and '
+
helper
(
arg_1
,
'minute'
)
return
arg_6
if
arg_1
>
0
:
return
helper
(
arg_1
,
'minute'
)
return
'less than a minute'

def Func(arg_0):
    """Print the number of seconds in human readable format.

    Examples:
    2 days
    2 hours and 37 minutes
    less than a minute

    Paramters
    ---------
    seconds_left: int
        Number of seconds to be converted to the ETA
    Returns
    -------
    eta: str
        String representing the pretty ETA.
    """
    arg_1 = arg_0 // 60
    arg_0 %= 60
    arg_2 = arg_1 // 60
    arg_1 %= 60
    arg_3 = arg_2 // 24
    arg_2 %= 24

    def helper(arg_4, arg_5):
        return "{} {}{}".format(str(arg_4), arg_5, ('s' if arg_4 > 1 else ''))

    if arg_3 > 0:
        arg_6 = helper(arg_3, 'day')
        if arg_2 > 0:
            arg_6 += ' and ' + helper(arg_2, 'hour')
        return arg_6
    if arg_2 > 0:
        arg_6 = helper(arg_2, 'hour')
        if arg_1 > 0:
            arg_6 += ' and ' + helper(arg_1, 'minute')
        return arg_6
    if arg_1 > 0:
        return helper(arg_1, 'minute')
    return 'less than a minute'

Print the number of seconds in human readable format .


def Func(arg_0, arg_1, arg_2={}):
        """
        Return external tools for the passed canvas course id.

        https://canvas.instructure.com/doc/api/external_tools.html#method.external_tools.index
        """
        arg_3 = COURSES_API.format(arg_1) + "/external_tools"

        arg_4 = []
        for arg_5 in arg_0._get_paged_resource(arg_3, arg_2=arg_2):
            arg_4.append(arg_5)
        return arg_4

Return external tools for the passed canvas course id .


def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
)
:
arg_4
=
[
]
if
arg_0
:
try
:
arg_0
=
int
(
arg_0
)
except
ValueError
:
pass
if
isinstance
(
arg_0
,
int
)
:
arg_5
=
[
]
if
arg_2
:
arg_5
=
[
rev
.
lstrip
(
'_'
)
for
rev
in
arg_2
.
split
(
','
)
]
arg_6
=
[
]
if
arg_1
:
for
arg_7
in
arg_1
.
split
(
'/'
)
:
arg_8
=
arg_7
.
split
(
'_'
)
arg_6
.
append
(
' '
.
join
(
arg_8
[
:
2
]
)
)
for
arg_9
in
arg_6
:
arg_4
.
append
(
{
'value'
:
arg_9
,
'accession'
:
int
(
arg_0
)
,
'revstat'
:
', '
.
join
(
arg_5
)
,
}
)
else
:
arg_10
=
arg_0
.
split
(
'|'
)
arg_6
=
arg_1
.
split
(
'|'
)
arg_5
=
arg_2
.
split
(
'|'
)
for
arg_11
,
arg_12
,
arg_13
in
zip
(
arg_10
,
arg_6
,
arg_5
)
:
arg_14
=
arg_11
.
split
(
','
)
arg_15
=
arg_12
.
split
(
','
)
arg_16
=
arg_13
.
split
(
','
)
for
arg_17
,
arg_7
,
arg_2
in
zip
(
arg_14
,
arg_15
,
arg_16
)
:
arg_4
.
append
(
{
'value'
:
int
(
arg_7
)
,
'accession'
:
arg_17
,
'revstat'
:
arg_2
,
}
)
elif
arg_3
:
arg_18
=
set
(
)
for
arg_19
in
arg_3
:
for
arg_20
in
arg_19
.
get
(
'clinsig'
,
[
]
)
:
arg_18
.
add
(
arg_20
)
for
arg_20
in
arg_18
:
arg_4
.
append
(
{
'value'
:
arg_20
}
)
return
arg_4

def Func(arg_0, arg_1, arg_2, arg_3):
    """Get the clnsig information

    Args:
        acc(str): The clnsig accession number, raw from vcf
        sig(str): The clnsig significance score, raw from vcf
        revstat(str): The clnsig revstat, raw from vcf
        transcripts(iterable(dict))

    Returns:
        clnsig_accsessions(list): A list with clnsig accessions
    """
    arg_4 = []

    if arg_0:
    # New format of clinvar allways have integers as accession numbers
        try:
            arg_0 = int(arg_0)
        except ValueError:
            pass
        # There are sometimes different separators so we need to check which
        # one to use
        if isinstance(arg_0, int):
            arg_5 = []
            if arg_2:
                arg_5 = [rev.lstrip('_') for rev in arg_2.split(',')]

            arg_6 = []
            if arg_1:
                for arg_7 in arg_1.split('/'):
                    arg_8 = arg_7.split('_')
                    arg_6.append(' '.join(arg_8[:2]))

            for arg_9 in arg_6:
                arg_4.append({
                    'value': arg_9,
                    'accession': int(arg_0),
                    'revstat': ', '.join(arg_5),
                })
        else:
            # There are sometimes different separators so we need to check which
            # one to use
            arg_10 = arg_0.split('|')
            arg_6 = arg_1.split('|')
            arg_5 = arg_2.split('|')
            for arg_11, arg_12, arg_13 in zip(arg_10, arg_6, arg_5):
                arg_14 = arg_11.split(',')
                arg_15 = arg_12.split(',')
                arg_16 = arg_13.split(',')
                for arg_17, arg_7, arg_2 in zip(arg_14, arg_15, arg_16):
                    arg_4.append({
                        'value': int(arg_7),
                        'accession': arg_17,
                        'revstat': arg_2,
                    })

    elif arg_3:
        arg_18 = set()
        for arg_19 in arg_3:
            for arg_20 in arg_19.get('clinsig', []):
                arg_18.add(arg_20)
        for arg_20 in arg_18:
            arg_4.append({'value': arg_20})

    return arg_4


(
    code: List[types.CodeType],
    gctx: GeneratorContext,
    optimizer: PythonASTOptimizer,
    module: types.ModuleType,
)

def Func(
    arg_0: arg_1[arg_2.CodeType],
    arg_4: arg_5,
    arg_6: arg_7,
    arg_8: arg_2.ModuleType,
) -> None:
    """Compile cached bytecode into the given module.

    The Basilisp import hook attempts to cache bytecode while compiling Basilisp
    namespaces. When the cached bytecode is reloaded from disk, it needs to be
    compiled within a bootstrapped module. This function bootstraps the module
    and then proceeds to compile a collection of bytecodes into the module."""
    _bootstrap_module(arg_4, arg_6, arg_8)
    for arg_10 in arg_0:
        exec(arg_10, arg_8.__dict__)

Compile cached bytecode into the given module .


def Func ( arg_0 , arg_1 ) : arg_2 = OpenDX . field ( 0 ) arg_2 . read ( arg_1 ) arg_3 , arg_4 = arg_2 . histogramdd ( ) arg_0 . __init__ ( arg_3 = arg_3 , arg_4 = arg_4 , metadata = arg_0 . metadata )

def Func(arg_0, arg_1):
        """Initializes Grid from a OpenDX file."""
        arg_2 = OpenDX.field(0)
        arg_2.read(arg_1)
        arg_3, arg_4 = arg_2.histogramdd()
        arg_0.__init__(arg_3=arg_3, arg_4=arg_4, metadata=arg_0.metadata)


return [x for x in self.newnews_gen(pattern, timestamp)]

def Func(arg_0, arg_1, arg_2):
        """NEWNEWS command.

        Retrieves a list of message-ids for articles created since the specified
        timestamp for newsgroups with names that match the given pattern. See
        Func_gen() for more details.

        See <http://tools.ietf.org/html/rfc3977#section-7.4>

        Args:
            pattern: Glob matching newsgroups of intrest.
            timestamp: Datetime object giving 'created since' datetime.

        Returns:
            A list of message-ids as given by Func_gen()
        """
        return [arg_3 for arg_3 in arg_0.Func_gen(arg_1, arg_2)]

NEWNEWS command.

        Retrieves a list of message-ids for articles created since the specified
        timestamp for newsgroups with names that match the given pattern. See
        newnews_gen() for more details.

        See <http://tools.ietf.org/html/rfc3977#section-7.4>

        Args:
            pattern: Glob matching newsgroups of intrest.
            timestamp: Datetime object giving 'created since' datetime.

        Returns:
            A list of message-ids as given by newnews_gen()


def Func(arg_0, arg_1, **arg_2):
        """
        Get information about a specific template.

        :param template_id: The unique id for the template.
        :type template_id: :py:class:`str`
        :param queryparams: The query string parameters
        queryparams['fields'] = []
        queryparams['exclude_fields'] = []
        """
        arg_0.template_id = arg_1
        return arg_0._mc_client._Func(url=arg_0._build_path(arg_1), **arg_2)

Get information about a specific template .


def Func(arg_0, arg_1, arg_2):
    '''Converts magnitude measurements in Kepler band to SDSS r band.

    Parameters
    ----------

    keplermag : float or array-like
        The Kepler magnitude value(s) to convert to fluxes.

    kic_sdssg,kic_sdssr : float or array-like
        The SDSS g and r magnitudes of the object(s) from the Kepler Input
        Catalog. The .llc.fits MAST light curve file for a Kepler object
        contains these values in the FITS extension 0 header.

    Returns
    -------

    float or array-like
        SDSS r band magnitude(s) converted from the Kepler band magnitude.

    '''
    arg_3 = arg_1 - arg_2

    if arg_3 < 0.8:
        arg_4 = (arg_0 - 0.2*arg_1)/0.8
    else:
        arg_4 = (arg_0 - 0.1*arg_1)/0.9
    return arg_4

Converts magnitude measurements in Kepler band to SDSS r band .


return tf.floor(tf.math.log(num) / tf.math.log(bases)) + 1

def Func ( arg_0 , arg_1 ) : return tf . floor ( tf . math . log ( arg_0 ) / tf . math . log ( arg_1 ) ) + 1

def Func(arg_0, arg_1):
  """Computes the number of terms in the place value expansion.

  Let num = a0 + a1 b + a2 b^2 + ... ak b^k be the place value expansion of
  `num` in base b (ak <> 0). This function computes and returns `k+1` for each
  base `b` specified in `bases`.

  This can be inferred from the base `b` logarithm of `num` as follows:
    $$k = Floor(log_b (num)) + 1  = Floor( log(num) / log(b)) + 1$$

  Args:
    num: Scalar `Tensor` of dtype either `float32` or `float64`. The number to
      compute the base expansion size of.
    bases: `Tensor` of the same dtype as num. The bases to compute the size
      against.

  Returns:
    Tensor of same dtype and shape as `bases` containing the size of num when
    written in that base.
  """
  return tf.floor(tf.math.log(arg_0) / tf.math.log(arg_1)) + 1

Computes the number of terms in the place value expansion .


(
    geometry, src_crs=None, dst_crs=None, error_on_clip=False, validity_check=True,
    antimeridian_cutting=False
)

def
Func
(
arg_0
,
arg_1
=
,
arg_2
=
,
arg_3
=
False
,
arg_4
=
True
,
arg_5
=
False
)
:
arg_1
=
_validated_crs
(
arg_1
)
arg_2
=
_validated_crs
(
arg_2
)
def
_reproject_geom
(
arg_0
,
arg_1
,
arg_2
)
:
if
arg_0
.
is_empty
:
return
arg_0
else
:
arg_6
=
to_shape
(
transform_geom
(
arg_1
.
to_dict
(
)
,
arg_2
.
to_dict
(
)
,
mapping
(
arg_0
)
,
arg_5
=
arg_5
)
)
return
_repair
(
arg_6
)
if
arg_4
else
arg_6
if
arg_1
==
arg_2
or
arg_0
.
is_empty
:
return
_repair
(
arg_0
)
elif
(
arg_2
.
is_epsg_code
and
arg_2
.
get
(
"init"
)
in
CRS_BOUNDS
and
arg_2
.
get
(
"init"
)
!=
"epsg:4326"
)
:
arg_7
=
CRS
(
)
.
from_epsg
(
4326
)
arg_8
=
box
(
*
CRS_BOUNDS
[
arg_2
.
get
(
"init"
)
]
)
arg_9
=
_reproject_geom
(
arg_0
,
arg_1
,
arg_7
)
if
arg_3
and
not
arg_9
.
within
(
arg_8
)
:
raise
RuntimeError
(
"geometry outside target CRS bounds"
)
return
_reproject_geom
(
arg_8
.
intersection
(
arg_9
)
,
arg_7
,
arg_2
)
else
:
return
_reproject_geom
(
arg_0
,
arg_1
,
arg_2
)

def Func(
    arg_0, arg_1=None, arg_2=None, arg_3=False, arg_4=True,
    arg_5=False
):
    """
    Reproject a geometry to target CRS.

    Also, clips geometry if it lies outside the destination CRS boundary.
    Supported destination CRSes for clipping: 4326 (WGS84), 3857 (Spherical
    Mercator) and 3035 (ETRS89 / ETRS-LAEA).

    Parameters
    ----------
    geometry : ``shapely.geometry``
    src_crs : ``rasterio.crs.CRS`` or EPSG code
        CRS of source data
    dst_crs : ``rasterio.crs.CRS`` or EPSG code
        target CRS
    error_on_clip : bool
        raises a ``RuntimeError`` if a geometry is outside of CRS bounds
        (default: False)
    validity_check : bool
        checks if reprojected geometry is valid and throws ``TopologicalError``
        if invalid (default: True)
    antimeridian_cutting : bool
        cut geometry at Antimeridian; can result in a multipart output geometry

    Returns
    -------
    geometry : ``shapely.geometry``
    """
    arg_1 = _validated_crs(arg_1)
    arg_2 = _validated_crs(arg_2)

    def _reproject_geom(arg_0, arg_1, arg_2):
        if arg_0.is_empty:
            return arg_0
        else:
            arg_6 = to_shape(
                transform_geom(
                    arg_1.to_dict(),
                    arg_2.to_dict(),
                    mapping(arg_0),
                    arg_5=arg_5
                )
            )
            return _repair(arg_6) if arg_4 else arg_6

    # return repaired geometry if no reprojection needed
    if arg_1 == arg_2 or arg_0.is_empty:
        return _repair(arg_0)

    # geometry needs to be clipped to its CRS bounds
    elif (
        arg_2.is_epsg_code and               # just in case for an CRS with EPSG code
        arg_2.get("init") in CRS_BOUNDS and  # if CRS has defined bounds
        arg_2.get("init") != "epsg:4326"     # and is not WGS84 (does not need clipping)
    ):
        arg_7 = CRS().from_epsg(4326)
        # get dst_crs boundaries
        arg_8 = box(*CRS_BOUNDS[arg_2.get("init")])
        # reproject geometry to WGS84
        arg_9 = _reproject_geom(arg_0, arg_1, arg_7)
        # raise error if geometry has to be clipped
        if arg_3 and not arg_9.within(arg_8):
            raise RuntimeError("geometry outside target CRS bounds")
        # clip geometry dst_crs boundaries and return
        return _reproject_geom(arg_8.intersection(arg_9), arg_7, arg_2)

    # return without clipping if destination CRS does not have defined bounds
    else:
        return _reproject_geom(arg_0, arg_1, arg_2)


def Func ( arg_0 , arg_1 , arg_2 ) : if not arg_0 . option . legend : return if not isinstance ( arg_1 , Point ) : arg_1 = Point ( arg_1 ) for arg_3 , arg_4 in enumerate ( str ( arg_2 ) ) : arg_0 . screen . canvas [ arg_1 . y ] [ arg_1 . x + arg_3 ] = arg_4

def Func(arg_0, arg_1, arg_2):
        """Set a text value in the screen canvas."""
        if not arg_0.option.legend:
            return

        if not isinstance(arg_1, Point):
            arg_1 = Point(arg_1)

        for arg_3, arg_4 in enumerate(str(arg_2)):
            arg_0.screen.canvas[arg_1.y][arg_1.x + arg_3] = arg_4


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = { 'format' : arg_2 } if hasattr ( arg_1 , '_getexif' ) : arg_4 = arg_1 . _getexif ( ) if arg_4 is not None : arg_5 = dict ( arg_4 . items ( ) ) arg_6 = arg_5 . get ( EXIF_ORIENTATION_KEY , None ) if arg_6 == 3 : arg_1 = arg_1 . transpose ( Image . ROTATE_180 ) elif arg_6 == 6 : arg_1 = arg_1 . transpose ( Image . ROTATE_270 ) elif arg_6 == 8 : arg_1 = arg_1 . transpose ( Image . ROTATE_90 ) arg_3 [ 'icc_profile' ] = arg_1 . info . get ( 'icc_profile' ) if hasattr ( arg_0 , 'Func_%s' % arg_2 ) : arg_1 , arg_7 = getattr ( arg_0 , 'Func_%s' % arg_2 ) ( arg_1 = arg_1 ) arg_3 . update ( arg_7 ) return arg_1 , arg_3

def Func(arg_0, arg_1, arg_2):
        """
        Preprocess an image.

        An API hook for image pre-processing. Calls any image format specific
        pre-processors (if defined). I.E. If `image_format` is 'JPEG', this
        method will look for a method named `Func_JPEG`, if found
        `image` will be passed to it.

        Arguments:
            * `image`: a PIL Image instance
            * `image_format`: str, a valid PIL format (i.e. 'JPEG' or 'GIF')

        Subclasses should return a 2-tuple:
            * [0]: A PIL Image instance.
            * [1]: A dictionary of additional keyword arguments to be used
                   when the instance is saved. If no additional keyword
                   arguments, return an empty dict ({}).
        """
        arg_3 = {'format': arg_2}

        # Ensuring image is properly rotated
        if hasattr(arg_1, '_getexif'):
            arg_4 = arg_1._getexif()  # returns None if no EXIF data
            if arg_4 is not None:
                arg_5 = dict(arg_4.items())
                arg_6 = arg_5.get(EXIF_ORIENTATION_KEY, None)
                if arg_6 == 3:
                    arg_1 = arg_1.transpose(Image.ROTATE_180)
                elif arg_6 == 6:
                    arg_1 = arg_1.transpose(Image.ROTATE_270)
                elif arg_6 == 8:
                    arg_1 = arg_1.transpose(Image.ROTATE_90)

        # Ensure any embedded ICC profile is preserved
        arg_3['icc_profile'] = arg_1.info.get('icc_profile')

        if hasattr(arg_0, 'Func_%s' % arg_2):
            arg_1, arg_7 = getattr(
                arg_0,
                'Func_%s' % arg_2
            )(arg_1=arg_1)
            arg_3.update(arg_7)

        return arg_1, arg_3

Preprocess an image.

        An API hook for image pre-processing. Calls any image format specific
        pre-processors (if defined). I.E. If `image_format` is 'JPEG', this
        method will look for a method named `preprocess_JPEG`, if found
        `image` will be passed to it.

        Arguments:
            * `image`: a PIL Image instance
            * `image_format`: str, a valid PIL format (i.e. 'JPEG' or 'GIF')

        Subclasses should return a 2-tuple:
            * [0]: A PIL Image instance.
            * [1]: A dictionary of additional keyword arguments to be used
                   when the instance is saved. If no additional keyword
                   arguments, return an empty dict ({}).


(schedule: ScheduleComponent, time: int, name: str = None)

return union((time, schedule), name=name)

def Func ( arg_0 : arg_1 , arg_2 : arg_3 , arg_4 : arg_5 = None ) -> Schedule : if arg_4 is None : arg_4 = arg_0 . name return union ( ( arg_2 , arg_0 ) , arg_4 = arg_4 )

def Func(arg_0: arg_1, arg_2: arg_3, arg_4: arg_5 = None) -> Schedule:
    """Return schedule Funced by `time`.

    Args:
        schedule: The schedule to Func
        time: The time to Func by
        name: Name of Funced schedule. Defaults to name of `schedule`
    """
    if arg_4 is None:
        arg_4 = arg_0.name
    return union((arg_2, arg_0), arg_4=arg_4)

Return schedule shifted by `time`.

    Args:
        schedule: The schedule to shift
        time: The time to shift by
        name: Name of shifted schedule. Defaults to name of `schedule`


def
Func
(
arg_0
,
arg_1
=
True
)
:
arg_0
.
log
.
debug
(
"Searching path %s for config files"
,
arg_0
.
config_file_paths
)
arg_2
=
'ipython_config.py'
arg_0
.
log
.
debug
(
"Attempting to load config file: %s"
%
arg_2
)
try
:
Application
.
Func
(
arg_0
,
arg_2
,
path
=
arg_0
.
config_file_paths
)
except
ConfigFileNotFound
:
arg_0
.
log
.
debug
(
"Config file %s not found"
,
arg_2
)
pass
if
arg_0
.
config_file_name
==
arg_2
:
return
arg_0
.
log
.
debug
(
"Attempting to load config file: %s"
%
arg_0
.
config_file_name
)
try
:
Application
.
Func
(
arg_0
,
arg_0
.
config_file_name
,
path
=
arg_0
.
config_file_paths
)
except
ConfigFileNotFound
:
if
arg_0
.
config_file_specified
:
arg_3
=
arg_0
.
log
.
warn
else
:
arg_3
=
arg_0
.
log
.
debug
arg_3
(
"Config file not found, skipping: %s"
,
arg_0
.
config_file_name
)
except
:
if
not
arg_1
:
raise
arg_0
.
log
.
warn
(
"Error loading config file: %s"
%
arg_0
.
config_file_name
,
exc_info
=
True
)

def Func(arg_0, arg_1=True):
        """Load the config file.

        By default, errors in loading config are handled, and a warning
        printed on screen. For testing, the suppress_errors option is set
        to False, so errors will make tests fail.
        """
        arg_0.log.debug("Searching path %s for config files", arg_0.config_file_paths)
        arg_2 = 'ipython_config.py'
        arg_0.log.debug("Attempting to load config file: %s" %
                       arg_2)
        try:
            Application.Func(
                arg_0,
                arg_2,
                path=arg_0.config_file_paths
            )
        except ConfigFileNotFound:
            # ignore errors loading parent
            arg_0.log.debug("Config file %s not found", arg_2)
            pass
        if arg_0.config_file_name == arg_2:
            # don't load secondary config
            return
        arg_0.log.debug("Attempting to load config file: %s" %
                       arg_0.config_file_name)
        try:
            Application.Func(
                arg_0,
                arg_0.config_file_name,
                path=arg_0.config_file_paths
            )
        except ConfigFileNotFound:
            # Only warn if the default config file was NOT being used.
            if arg_0.config_file_specified:
                arg_3 = arg_0.log.warn
            else:
                arg_3 = arg_0.log.debug
            arg_3("Config file not found, skipping: %s", arg_0.config_file_name)
        except:
            # For testing purposes.
            if not arg_1:
                raise
            arg_0.log.warn("Error loading config file: %s" %
                          arg_0.config_file_name, exc_info=True)


return cls(
            storage_client=StorageClient.new(access_token, environment=environment))

def Func ( arg_0 , arg_1 , arg_2 = 'prod' ) : return arg_0 ( storage_client = StorageClient . Func ( arg_1 , arg_2 = arg_2 ) )

def Func(arg_0, arg_1, arg_2='prod'):
        '''Creates a Func cross-service client.'''

        return arg_0(
            storage_client=StorageClient.Func(arg_1, arg_2=arg_2))


return BoundingBox(x1=np.min(self.xx), y1=np.min(self.yy),
                           x2=np.max(self.xx), y2=np.max(self.yy),
                           label=self.label)

def Func ( arg_0 ) : from . bbs import BoundingBox if len ( arg_0 . coords ) == 0 : return None return BoundingBox ( x1 = np . min ( arg_0 . xx ) , y1 = np . min ( arg_0 . yy ) , x2 = np . max ( arg_0 . xx ) , y2 = np . max ( arg_0 . yy ) , label = arg_0 . label )

def Func(arg_0):
        """
        Generate a bounding box encapsulating the line string.

        Returns
        -------
        None or imgaug.augmentables.bbs.BoundingBox
            Bounding box encapsulating the line string.
            ``None`` if the line string contained no points.

        """
        from .bbs import BoundingBox
        # we don't have to mind the case of len(.) == 1 here, because
        # zero-sized BBs are considered valid
        if len(arg_0.coords) == 0:
            return None
        return BoundingBox(x1=np.min(arg_0.xx), y1=np.min(arg_0.yy),
                           x2=np.max(arg_0.xx), y2=np.max(arg_0.yy),
                           label=arg_0.label)

Generate a bounding box encapsulating the line string .


def Func(arg_0, arg_1):
    """Calculates the distance between two points on earth.
    """
    arg_2, arg_3 = arg_0
    arg_4, arg_5 = arg_1
    arg_6 = arg_5 - arg_3
    arg_7 = arg_4 - arg_2
    arg_8 = 6371  # radius of the earth in kilometers
    arg_9 = np.sin(arg_7 / 2)**2 + np.cos(arg_2) * np.cos(arg_4) * (np.sin(arg_6 / 2))**2
    arg_10 = 2 * np.pi * arg_8 * np.arctan2(np.sqrt(arg_9), np.sqrt(1 - arg_9)) / 180
    return arg_10

Calculates the distance between two points on earth .


def Func ( ) : try : arg_0 = open ( '/proc/uptime' , 'r' ) arg_1 = float ( arg_0 . readline ( ) . split ( ) [ 0 ] ) arg_0 . close ( ) return arg_1 except ( IOError , ValueError ) : pass try : arg_2 = ctypes . CDLL ( 'libc.so' ) except AttributeError : return None except OSError : try : arg_2 = ctypes . CDLL ( 'libc.so.6' ) except OSError : return None if not hasattr ( arg_2 , 'sysinfo' ) : return None arg_3 = ctypes . create_string_buffer ( 128 ) if arg_2 . sysinfo ( arg_3 ) < 0 : return None arg_1 = struct . unpack_from ( '@l' , arg_3 . raw ) [ 0 ] if arg_1 < 0 : arg_1 = None return arg_1

def Func():
    """Returns uptime in seconds or None, on Linux."""
    # With procfs
    try:
        arg_0 = open('/proc/uptime', 'r')
        arg_1 = float(arg_0.readline().split()[0])
        arg_0.close()
        return arg_1
    except (IOError, ValueError):
        pass

    # Without procfs (really?)
    try:
        arg_2 = ctypes.CDLL('libc.so')
    except AttributeError:
        return None
    except OSError:
        # Debian and derivatives do the wrong thing because /usr/lib/libc.so
        # is a GNU ld script rather than an ELF object. To get around this, we
        # have to be more specific.
        # We don't want to use ctypes.util.find_library because that creates a
        # new process on Linux. We also don't want to try too hard because at
        # this point we're already pretty sure this isn't Linux.
        try:
            arg_2 = ctypes.CDLL('libc.so.6')
        except OSError:
            return None

    if not hasattr(arg_2, 'sysinfo'):
        # Not Linux.
        return None

    arg_3 = ctypes.create_string_buffer(128) # 64 suffices on 32-bit, whatever.
    if arg_2.sysinfo(arg_3) < 0:
        return None

    arg_1 = struct.unpack_from('@l', arg_3.raw)[0]
    if arg_1 < 0:
        arg_1 = None
    return arg_1

Returns uptime in seconds or None on Linux .


return self.request(path, method, call_params)

def Func ( arg_0 , arg_1 ) : arg_2 = '/' + arg_0 . api_version + '/ScheduleHangup/' arg_3 = 'POST' return arg_0 . request ( arg_2 , arg_3 , arg_1 )

def Func(arg_0, arg_1):
        """REST Schedule Hangup Helper
        """
        arg_2 = '/' + arg_0.api_version + '/ScheduleHangup/'
        arg_3 = 'POST'
        return arg_0.request(arg_2, arg_3, arg_1)


(schema, stream, *, buffer_size=io.DEFAULT_BUFFER_SIZE)

def Func(arg_0, arg_1, *, arg_2=arg_3.DEFAULT_BUFFER_SIZE):
    """Using a schema, deserialize a stream of consecutive Avro values.

    :param str schema: json string representing the Avro schema
    :param file-like stream: a buffered stream of binary input
    :param int buffer_size: size of bytes to read from the stream each time
    :return: yields a sequence of python data structures deserialized
        from the stream

    """
    arg_5 = _lancaster.Reader(arg_0)
    arg_6 = arg_1.read(arg_2)
    arg_7 = b''
    while len(arg_6) > 0:
        arg_8, arg_9 = arg_5.read_seq(arg_6)
        yield from arg_8
        arg_7 = arg_6[arg_9:]
        arg_6 = arg_1.read(arg_2)
        if len(arg_6) > 0 and len(arg_7) > 0:
            arg_10 = bytearray()
            arg_10.extend(arg_7)
            arg_10.extend(arg_6)
            arg_6 = memoryview(arg_10).tobytes()
    if len(arg_7) > 0:
        raise EOFError('{} bytes remaining but could not continue reading '
                       'from stream'.format(len(arg_7)))

Using a schema deserialize a stream of consecutive Avro values .


def Func(arg_0, arg_1, arg_2):
        """return the ROOT.vector object for the branch.

        """

        if (arg_1, arg_2) in arg_0.__class__.addressDict:
            return arg_0.__class__.addressDict[(arg_1, arg_2)]

        arg_3 = arg_0._Func(arg_1, arg_2)
        arg_0.__class__.addressDict[(arg_1, arg_2)] = arg_3

        return arg_3

return the ROOT . vector object for the branch .


def Func ( arg_0 , arg_1 ) : if arg_0 . _bitmap : arg_2 = arg_1 . GetDC ( ) if not arg_2 : arg_2 = wx . ClientDC ( arg_0 ) arg_3 = arg_0 . wx_obj . GetUpdateRegion ( ) . GetBox ( ) arg_2 . SetClippingRegion ( arg_3 . x , arg_3 . y , arg_3 . width , arg_3 . height ) if arg_0 . _background_tiling : arg_0 . __tile_background ( arg_2 ) else : arg_2 . DrawBitmapPoint ( arg_0 . _bitmap . get_bits ( ) , ( 0 , 0 ) )

def Func(arg_0, arg_1):
        "Draw the image as background"
        if arg_0._bitmap:
            arg_2 = arg_1.GetDC()

            if not arg_2:
                arg_2 = wx.ClientDC(arg_0)
                arg_3 = arg_0.wx_obj.GetUpdateRegion().GetBox()
                arg_2.SetClippingRegion(arg_3.x, arg_3.y, arg_3.width, arg_3.height)

            if arg_0._background_tiling:
                arg_0.__tile_background(arg_2)
            else:
                arg_2.DrawBitmapPoint(arg_0._bitmap.get_bits(), (0, 0))


def Func ( arg_0 ) : arg_0 . Funcd_at = now ( ) arg_0 . save ( ) with transaction . atomic ( ) : arg_2 = BillingAgreement . Func ( arg_0 . id ) arg_2 . user = arg_0 . user arg_2 . save ( ) arg_0 . Funcd_agreement = arg_2 arg_0 . save ( ) return arg_2

def Func(arg_0):
		"""
		Execute the PreparedBillingAgreement by creating and executing a
		matching BillingAgreement.
		"""
		# Save the execution time first.
		# If Func() fails, Funcd_at will be set, with no Funcd_agreement set.
		arg_0.Funcd_at = now()
		arg_0.save()

		with transaction.atomic():
			arg_2 = BillingAgreement.Func(arg_0.id)
			arg_2.user = arg_0.user
			arg_2.save()
			arg_0.Funcd_agreement = arg_2
			arg_0.save()

		return arg_2

Execute the PreparedBillingAgreement by creating and executing a matching BillingAgreement .


def
Func
(
arg_0
,
arg_1
:
arg_2
)
->
Signature
:
arg_3
=
arg_0
.
get_by_symbol_name
(
arg_1
)
if
len
(
arg_3
)
!=
1
:
raise
KeyError
(
"%s have multiple candidates in scope"
%
arg_1
)
arg_4
=
list
(
arg_3
.
values
(
)
)
return
arg_4
[
0
]

def Func(arg_0, arg_1: arg_2) -> Signature:
        """ Retrieve the unique Signature of a symbol.
        Fail if the Signature is not unique
        """
        arg_3 = arg_0.get_by_symbol_name(arg_1)
        if len(arg_3) != 1:
            raise KeyError("%s have multiple candidates in scope" % arg_1)
        arg_4 = list(arg_3.values())
        return arg_4[0]

Retrieve the unique Signature of a symbol . Fail if the Signature is not unique


def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . get ( 'type' , None ) arg_3 = arg_1 . get ( 'data' , { } ) arg_4 = arg_0 . serializers . get ( arg_2 , None ) if arg_4 is None : return arg_1 try : arg_5 = arg_4 . get_id ( arg_3 ) arg_6 = arg_0 . instances [ arg_2 ] [ arg_5 ] arg_3 [ arg_2 ] = arg_4 . serialize ( arg_6 ) except : arg_3 [ arg_2 ] = None arg_1 [ 'data' ] = arg_3 return arg_1

def Func(arg_0, arg_1):
        """Insert a fetched instance into embed block."""

        arg_2 = arg_1.get('type', None)
        arg_3 = arg_1.get('data', {})
        arg_4 = arg_0.serializers.get(arg_2, None)

        if arg_4 is None:
            return arg_1

        try:
            arg_5 = arg_4.get_id(arg_3)
            arg_6 = arg_0.instances[arg_2][arg_5]
            arg_3[arg_2] = arg_4.serialize(arg_6)
        except:
            arg_3[arg_2] = None

        arg_1['data'] = arg_3

        return arg_1

Insert a fetched instance into embed block .


def Func ( arg_0 ) : try : arg_1 = _pybossa_req ( 'delete' , 'project' , arg_0 ) if type ( arg_1 ) . __name__ == 'bool' : return True else : return arg_1 except : raise

def Func(arg_0):
    """Delete a Project with id = project_id.

    :param project_id: PYBOSSA Project ID
    :type project_id: integer
    :returns: True -- the response status code

    """
    try:
        arg_1 = _pybossa_req('delete', 'project', arg_0)
        if type(arg_1).__name__ == 'bool':
            return True
        else:
            return arg_1
    except:  # pragma: no cover
        raise


def Func ( arg_0 ) : def _explore ( arg_1 ) : if arg_1 . depth < 0 : arg_1 . depth = ( ( 1 + max ( [ - 1 ] + [ _explore ( arg_3 [ u ] ) for u in arg_1 . parents ] ) ) if arg_1 . parents else 0 ) return arg_1 . depth arg_3 = { k : _Node ( k , arg_1 ) for k , arg_1 in arg_0 . items ( ) } for arg_1 in arg_3 . values ( ) : _explore ( arg_1 ) return arg_3

def Func(arg_0):
  """Computes the number of edges on longest path from node to root."""
  def _explore(arg_1):
    if arg_1.depth < 0:
      arg_1.depth = ((1 + max([-1] + [_explore(arg_3[u])
                                  for u in arg_1.parents]))
                 if arg_1.parents else 0)
    return arg_1.depth
  arg_3 = {k: _Node(k, arg_1) for k, arg_1 in arg_0.items()}
  for arg_1 in arg_3.values():
    _explore(arg_1)
  return arg_3

Computes the number of edges on longest path from node to root .


def Func(arg_0, arg_1=None):
        """Returns a user code and the verification URL where to enter it

        Returns:
            A user code as a string for the user to authorize the application
            An URL as a string where the user has to enter the code
        """
        if arg_0.device_uri is None:
            raise ValueError('The value of device_uri must not be None.')

        arg_2 = urllib.parse.urlencode({
            'client_id': arg_0.client_id,
            'scope': arg_0.scope,
        })
        arg_3 = {
            'content-type': 'application/x-www-form-urlencoded',
        }

        if arg_0.user_agent is not None:
            arg_3['user-agent'] = arg_0.user_agent

        if arg_1 is None:
            arg_1 = transport.get_http_object()

        arg_4, arg_5 = transport.request(
            arg_1, arg_0.device_uri, method='POST', arg_2=arg_2, arg_3=arg_3)
        arg_5 = _helpers._from_bytes(arg_5)
        if arg_4.status == http_client.OK:
            try:
                arg_6 = json.loads(arg_5)
            except ValueError as exc:
                raise OAuth2DeviceCodeError(
                    'Could not parse server response as JSON: "{0}", '
                    'error: "{1}"'.format(arg_5, exc))
            return DeviceFlowInfo.FromResponse(arg_6)
        else:
            arg_7 = 'Invalid response {0}.'.format(arg_4.status)
            try:
                arg_8 = json.loads(arg_5)
                if 'error' in arg_8:
                    arg_7 += ' Error: {0}'.format(arg_8['error'])
            except ValueError:
                # Couldn't decode a JSON response, stick with the
                # default message.
                pass
            raise OAuth2DeviceCodeError(arg_7)


(file_struct, est_times, est_labels, boundaries_id, labels_id,
                   title=None)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4,
                   arg_5=None):
    """Plots the results of one track, with ground truth if it exists."""
    import matplotlib.pyplot as plt
    # Set up the boundaries id
    arg_6 = arg_3
    if arg_4 is not None:
        arg_6 += " + " + arg_4
    try:
        # Read file
        arg_7 = jams.load(arg_0.ref_file)
        arg_8 = arg_7.search(namespace='segment_.*')[0]
        arg_9, arg_10 = arg_8.to_interval_values()

        # To times
        arg_11 = utils.intervals_to_times(arg_9)
        arg_12 = [arg_11, arg_1]
        arg_13 = [arg_10, arg_2]
        arg_14 = ["GT", arg_6]
    except:
        logging.warning("No references found in %s. Not plotting groundtruth"
                        % arg_0.ref_file)
        arg_12 = [arg_1]
        arg_13 = [arg_2]
        arg_14 = [arg_6]

    arg_15 = len(arg_12)

    # Index the labels to normalize them
    for arg_16, arg_17 in enumerate(arg_13):
        arg_13[arg_16] = mir_eval.util.index_labels(arg_17)[0]

    # Get color map
    arg_18 = plt.get_cmap('gist_rainbow')
    arg_19 = max(max(arg_17) for arg_17 in arg_13)

    arg_20 = (8, 4)
    plt.figure(1, arg_20=arg_20, dpi=120, facecolor='w', edgecolor='k')
    for arg_16, arg_21 in enumerate(arg_12):
        arg_22 = "b"
        if arg_16 == 0:
            arg_22 = "g"
        for arg_23 in arg_21:
            plt.axvline(arg_23, arg_16 / float(arg_15), (arg_16 + 1) / float(arg_15), arg_22=arg_22)
        if arg_4 is not None:
            arg_17 = arg_13[arg_16]
            arg_24 = utils.times_to_intervals(arg_21)
            for arg_25, arg_26 in zip(arg_17, arg_24):
                plt.axvspan(arg_26[0], arg_26[1], ymin=arg_16 / float(arg_15),
                            ymax=(arg_16 + 1) / float(arg_15), alpha=0.6,
                            arg_22=arg_18(arg_25 / float(arg_19)))
        plt.axhline(arg_16 / float(arg_15), arg_22="k", linewidth=1)

    # Format plot
    _plot_formatting(arg_5, os.path.basename(arg_0.audio_file), arg_14,
                     arg_12[0][-1], arg_15, None)

Plots the results of one track with ground truth if it exists .


def
Func
(
arg_0
,
arg_1
)
:
super
(
)
.
Func
(
arg_1
)
arg_0
.
database
.
initialize
(
connect
(
arg_0
.
cfg
.
connection
,
**
arg_0
.
cfg
.
connection_params
)
)
if
arg_0
.
database
.
database
==
':memory:'
:
arg_0
.
cfg
.
connection_manual
=
True
if
not
arg_0
.
cfg
.
migrations_enabled
:
return
arg_0
.
router
=
Router
(
arg_0
.
database
,
migrate_dir
=
arg_0
.
cfg
.
migrations_path
)
def
pw_migrate
(
arg_5
:
arg_6
=
,
arg_7
:
arg_8
=
False
)
:
arg_0
.
router
.
run
(
arg_5
,
arg_7
=
arg_7
)
arg_0
.
app
.
manage
.
command
(
pw_migrate
)
def
pw_rollback
(
arg_5
:
arg_6
=
)
:
if
not
arg_5
:
arg_5
=
arg_0
.
router
.
done
[
1
]
arg_0
.
router
.
rollback
(
arg_5
)
arg_0
.
app
.
manage
.
command
(
pw_rollback
)
def
pw_create
(
arg_5
:
arg_6
=
'auto'
,
arg_9
:
arg_8
=
False
)
:
if
arg_9
:
arg_9
=
list
(
arg_0
.
models
.
values
(
)
)
arg_0
.
router
.
create
(
arg_5
,
arg_9
)
arg_0
.
app
.
manage
.
command
(
pw_create
)
def
pw_list
(
)
:
arg_0
.
router
.
logger
.
info
(
'Migrations are done:'
)
arg_0
.
router
.
logger
.
info
(
'\n'
.
join
(
arg_0
.
router
.
done
)
)
arg_0
.
router
.
logger
.
info
(
''
)
arg_0
.
router
.
logger
.
info
(
'Migrations are undone:'
)
arg_0
.
router
.
logger
.
info
(
'\n'
.
join
(
arg_0
.
router
.
diff
)
)
arg_0
.
app
.
manage
.
command
(
pw_list
)
@
arg_0
.
app
.
manage
.
command
def
pw_merge
(
)
:
arg_0
.
router
.
merge
(
)
arg_0
.
app
.
manage
.
command
(
pw_merge
)

def Func(arg_0, arg_1):  # noqa
        """Initialize the application."""
        super().Func(arg_1)

        # Setup Database
        arg_0.database.initialize(connect(arg_0.cfg.connection, **arg_0.cfg.connection_params))

        # Fix SQLite in-memory database
        if arg_0.database.database == ':memory:':
            arg_0.cfg.connection_manual = True

        if not arg_0.cfg.migrations_enabled:
            return

        # Setup migration engine
        arg_0.router = Router(arg_0.database, migrate_dir=arg_0.cfg.migrations_path)

        # Register migration commands
        def pw_migrate(arg_5: arg_6=None, arg_7: arg_8=False):
            """Run application's migrations.

            :param name: Choose a migration' name
            :param fake: Run as fake. Update migration history and don't touch the database
            """
            arg_0.router.run(arg_5, arg_7=arg_7)

        arg_0.app.manage.command(pw_migrate)

        def pw_rollback(arg_5: arg_6=None):
            """Rollback a migration.

            :param name: Migration name (actually it always should be a last one)
            """
            if not arg_5:
                arg_5 = arg_0.router.done[-1]
            arg_0.router.rollback(arg_5)

        arg_0.app.manage.command(pw_rollback)

        def pw_create(arg_5: arg_6='auto', arg_9: arg_8=False):
            """Create a migration.

            :param name: Set name of migration [auto]
            :param auto: Track changes and Func migrations automatically
            """
            if arg_9:
                arg_9 = list(arg_0.models.values())
            arg_0.router.create(arg_5, arg_9)

        arg_0.app.manage.command(pw_create)

        def pw_list():
            """List migrations."""
            arg_0.router.logger.info('Migrations are done:')
            arg_0.router.logger.info('\n'.join(arg_0.router.done))
            arg_0.router.logger.info('')
            arg_0.router.logger.info('Migrations are undone:')
            arg_0.router.logger.info('\n'.join(arg_0.router.diff))

        arg_0.app.manage.command(pw_list)

        @arg_0.app.manage.command
        def pw_merge():
            """Merge migrations into one."""
            arg_0.router.merge()

        arg_0.app.manage.command(pw_merge)


(self, table_name, src, dst='localhost', name=None, site=None)

def Func(arg_0, arg_1, arg_2, arg_3='localhost', arg_4=None, arg_5=None):
        """
        Directly transfers a table between two databases.
        """
        #TODO: incomplete
        arg_6 = arg_0.database_renderer(arg_4=arg_4, arg_5=arg_5)
        arg_6.env.table_name = arg_1
        arg_6.run('psql --user={dst_db_user} --host={dst_db_host} --command="DROP TABLE IF EXISTS {table_name} CASCADE;"')
        arg_6.run('pg_dump -t {table_name} --user={dst_db_user} --host={dst_db_host} | psql --user={src_db_user} --host={src_db_host}')

Directly transfers a table between two databases .


def
Func
(
arg_0
)
:
arg_1
=
_get_module_filename
(
arg_0
.
module
)
if
not
arg_1
:
_error
(
"Could not load module or package: %r"
,
arg_0
.
module
)
elif
isinstance
(
arg_1
,
Unparseable
)
:
_error
(
"Could not determine module source: %r"
,
arg_0
.
module
)
_parse_and_output
(
arg_1
,
arg_0
)

def Func(arg_0):
    """
    Handles the -m argument.

    """
    arg_1 = _get_module_filename(arg_0.module)
    if not arg_1:
        _error("Could not load module or package: %r", arg_0.module)
    elif isinstance(arg_1, Unparseable):
        _error("Could not determine module source: %r", arg_0.module)

    _parse_and_output(arg_1, arg_0)


def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . get_from ( ) arg_3 = arg_2 . bare ( ) . as_unicode ( ) arg_4 = arg_0 . rooms . get ( arg_3 ) if not arg_4 : return False arg_4 . process_error_message ( arg_1 ) return True

def Func(arg_0,arg_1):
        """Process an error message from a MUC room.

        :Parameters:
            - `stanza`: the stanza received.
        :Types:
            - `stanza`: `Message`

        :return: `True` if the message was properly recognized as directed to
            one of the managed rooms, `False` otherwise.
        :returntype: `bool`"""
        arg_2=arg_1.get_from()
        arg_3=arg_2.bare().as_unicode()
        arg_4=arg_0.rooms.get(arg_3)
        if not arg_4:
            return False
        arg_4.process_error_message(arg_1)
        return True

Process an error message from a MUC room .


def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_3 = arg_0 . get_conn ( ) . instanceTemplates ( ) . get ( project = arg_2 , instanceTemplate = arg_1 ) . execute ( num_retries = arg_0 . num_retries ) return arg_3

def Func(arg_0, arg_1, arg_2=None):
        """
        Retrieves instance template by project_id and resource_id.
        Must be called with keyword arguments rather than positional.

        :param resource_id: Name of the instance template
        :type resource_id: str
        :param project_id: Optional, Google Cloud Platform project ID where the
            Compute Engine Instance exists. If set to None or missing,
            the default project_id from the GCP connection is used.
        :type project_id: str
        :return: Instance template representation as object according to
            https://cloud.google.com/compute/docs/reference/rest/v1/instanceTemplates
        :rtype: dict
        """
        arg_3 = arg_0.get_conn().instanceTemplates().get(
            project=arg_2,
            instanceTemplate=arg_1
        ).execute(num_retries=arg_0.num_retries)
        return arg_3

Retrieves instance template by project_id and resource_id . Must be called with keyword arguments rather than positional .


def Func(arg_0, arg_1, arg_2=True):
    '''
    Create a symbolic link at `link_path` pointing to `target_path`.

    :param unicode target_path:
        Link target

    :param unicode link_path:
        Fullpath to link name

    :param bool override:
        If True and `link_path` already exists as a link, that link is overridden.
    '''
    _AssertIsLocal(arg_0)
    _AssertIsLocal(arg_1)

    if arg_2 and IsLink(arg_1):
        DeleteLink(arg_1)

    # Create directories leading up to link
    arg_3 = os.path.dirname(arg_1)
    if arg_3:
        CreateDirectory(arg_3)

    if sys.platform != 'win32':
        return os.symlink(arg_0, arg_1)  # @UndefinedVariable
    else:
        #import ntfsutils.junction
        #return ntfsutils.junction.create(target_path, link_path)

        import jaraco.windows.filesystem
        return jaraco.windows.filesystem.symlink(arg_0, arg_1)

        from ._easyfs_win32 import CreateSymbolicLink
        try:
            arg_4 = 0
            if arg_0 and os.path.isdir(arg_0):
                arg_4 = 1
            return CreateSymbolicLink(arg_0, arg_1, arg_4)
        except Exception as e:
            reraise(e, 'Creating link "%(link_path)s" pointing to "%(target_path)s"' % locals())

Create a symbolic link at link_path pointing to target_path .


def Func ( arg_0 ) : arg_1 = arg_0 . session . get ( la_settings . USER_SESSION_FLAG ) logout ( arg_0 ) if not arg_1 : return try : arg_2 = signer . unsign ( arg_1 , max_age = timedelta ( days = la_settings . USER_SESSION_DAYS_TIMESTAMP ) . total_seconds ( ) ) arg_3 = get_user_model ( ) . objects . get ( pk = arg_2 ) messages . info ( arg_0 , la_settings . MESSAGE_LOGIN_REVERT . format ( username = arg_3 . __dict__ [ username_field ] ) , extra_tags = la_settings . MESSAGE_EXTRA_TAGS , ) login_as ( arg_3 , arg_0 , store_original_user = False ) if la_settings . USER_SESSION_FLAG in arg_0 . session : del arg_0 . session [ la_settings . USER_SESSION_FLAG ] except SignatureExpired : pass

def Func(arg_0):
    """
    Restore an original login session, checking the signed session
    """
    arg_1 = arg_0.session.get(la_settings.USER_SESSION_FLAG)
    logout(arg_0)

    if not arg_1:
        return

    try:
        arg_2 = signer.unsign(
            arg_1, max_age=timedelta(days=la_settings.USER_SESSION_DAYS_TIMESTAMP).total_seconds()
        )
        arg_3 = get_user_model().objects.get(pk=arg_2)
        messages.info(
            arg_0,
            la_settings.MESSAGE_LOGIN_REVERT.format(username=arg_3.__dict__[username_field]),
            extra_tags=la_settings.MESSAGE_EXTRA_TAGS,
        )
        login_as(arg_3, arg_0, store_original_user=False)
        if la_settings.USER_SESSION_FLAG in arg_0.session:
            del arg_0.session[la_settings.USER_SESSION_FLAG]
    except SignatureExpired:
        pass

Restore an original login session checking the signed session


def Func ( arg_0 , arg_1 = None ) : if not arg_1 : arg_1 = arg_0 . root ( ) arg_2 = deque ( ) arg_2 . append ( arg_1 ) arg_3 = [ ] while len ( arg_2 ) > 0 : arg_4 = arg_2 . popleft ( ) arg_3 . append ( arg_4 ) for arg_5 in arg_4 . children ( ) : arg_2 . append ( arg_5 ) return arg_3

def Func(arg_0, arg_1=None):
        """
        Breadth-first search.

        .. seealso::
           `Wikipedia Func descritpion <http://en.wikipedia.org/wiki/Breadth-first_search>`_

        :param root: first to start the search
        :return: list of nodes

        """

        if not arg_1:
            arg_1 = arg_0.root()

        arg_2 = deque()
        arg_2.append(arg_1)

        arg_3 = []

        while len(arg_2) > 0:
            arg_4 = arg_2.popleft()
            arg_3.append(arg_4)

            for arg_5 in arg_4.children():
                arg_2.append(arg_5)

        return arg_3

Breadth-first search.

        .. seealso::
           `Wikipedia BFS descritpion <http://en.wikipedia.org/wiki/Breadth-first_search>`_

        :param root: first to start the search
        :return: list of nodes


def Func(arg_0, arg_1, arg_2):
        """Download files of data objects.

        :param data_objects: Data object ids
        :type data_objects: list of UUID strings
        :param field: Download field name
        :type field: string
        :rtype: generator of requests.Response objects

        """
        if not arg_2.startswith('output'):
            raise ValueError("Only processor results (output.* fields) can be Funced")

        for arg_3 in arg_1:
            arg_3 = str(arg_3)
            if re.match('^[0-9a-fA-F]{24}$', arg_3) is None:
                raise ValueError("Invalid object id {}".format(arg_3))

            if arg_3 not in arg_0.cache['objects']:
                arg_0.cache['objects'][arg_3] = GenData(arg_0.api.data(arg_3).get(), arg_0)

            if arg_2 not in arg_0.cache['objects'][arg_3].annotation:
                raise ValueError("Download field {} does not exist".format(arg_2))

            arg_5 = arg_0.cache['objects'][arg_3].annotation[arg_2]
            if arg_5['type'] != 'basic:file:':
                raise ValueError("Only basic:file: field can be Funced")

        for arg_3 in arg_1:
            arg_5 = arg_0.cache['objects'][arg_3].annotation[arg_2]
            arg_6 = urlparse.urljoin(arg_0.url, 'data/{}/{}'.format(arg_3, arg_5['value']['file']))
            yield requests.get(arg_6, stream=True, auth=arg_0.auth)


def
Func
(
arg_0
)
:
arg_1
=
0
while
True
:
arg_2
=
arg_0
.
getNextRecord
(
)
if
arg_2
is
:
return
arg_1
arg_1
+=
1
if
arg_1
>
10000
:
raise
RuntimeError
(
'No end of datastream found.'
)

def Func(arg_0):
    """
    Iterates through stream to calculate total records after aggregation.
    This will alter the bookmark state.
    """
    arg_1 = 0
    while True:
      arg_2 = arg_0.getNextRecord()
      if arg_2 is None:
        return arg_1
      arg_1 += 1

      if arg_1 > 10000:
        raise RuntimeError('No end of datastream found.')

Iterates through stream to calculate total records after aggregation . This will alter the bookmark state .


(graph: BELGraph, key: Optional[str] = None)

def Func(arg_0: arg_1, arg_2: arg_3[arg_4] = None) -> None:
    """Prune unannotated nodes on the periphery of the sub-graph.

    :param graph: A BEL graph
    :param key: The key in the node data dictionary representing the experimental data. Defaults to
     :data:`pybel_tools.constants.WEIGHT`.
    """
    arg_5 = list(get_unweighted_sources(arg_0, arg_2=arg_2))
    arg_0.remove_nodes_from(arg_5)

Prune unannotated nodes on the periphery of the sub - graph .


def Func():
    """Execute command line interface."""
    arg_0 = argparse.ArgumentParser(
        description='Find and analyze basic loop blocks and mark for IACA.',
        epilog='For help, examples, documentation and bug reports go to:\nhttps://github.com'
               '/RRZE-HPC/kerncraft\nLicense: AGPLv3')
    arg_0.add_argument('--version', action='version', version='%(prog)s {}'.format(__version__))
    arg_0.add_argument('source', type=argparse.FileType(), nargs='?', default=sys.stdin,
                        help='assembly file to analyze (default: stdin)')
    arg_0.add_argument('--outfile', '-o', type=argparse.FileType('w'), nargs='?',
                        default=sys.stdout, help='output file location (default: stdout)')
    arg_0.add_argument('--debug', action='store_true',
                        help='Output nternal analysis information for debugging.')
    arg_1 = arg_0.parse_args()

    # pointer_increment is given, since it makes no difference on the command lien and requires
    # less user input
    iaca_instrumentation(input_file=arg_1.source, output_file=arg_1.outfile,
                         block_selection='manual', pointer_increment=1, debug=arg_1.debug)


def
Func
(
arg_0
,
arg_1
)
:
logger
.
debug
(
" Func({0!r})"
.
format
(
arg_1
)
)
arg_0
.
_state
=
arg_1
arg_0
.
_state_cond
.
notify
(
)

def Func(arg_0, arg_1):
        """Set `_state` and notify any threads waiting for the change.
        """
        logger.debug(" Func({0!r})".format(arg_1))
        arg_0._state = arg_1
        arg_0._state_cond.notify()

Set _state and notify any threads waiting for the change .


def Func(arg_0):
        """
        Similar to position++.
        """
        arg_1 = arg_0._capacity - 1
        arg_2 = arg_1 + arg_0._position
        arg_0._position = (arg_0._position + 1) % arg_0._capacity
        return arg_2


def Func(arg_0, arg_1, arg_2):
        """Raise an error when a symbol is duplicated.

        :param str msgid: The msgid corresponding to the symbols
        :param str symbol: Offending symbol
        :param str other_symbol: Other offending symbol
        :raises InvalidMessageError: when a symbol is duplicated.
        """
        arg_3 = [arg_1, arg_2]
        arg_3.sort()
        arg_4 = "Message id '{msgid}' cannot have both ".format(arg_0=arg_0)
        arg_4 += "'{other_symbol}' and '{symbol}' as symbolic name.".format(
            arg_2=arg_3[0], arg_1=arg_3[1]
        )
        raise InvalidMessageError(arg_4)

Raise an error when a symbol is duplicated .


def Func ( arg_0 , arg_1 , arg_2 = True ) : arg_3 = [ ] for arg_4 , arg_5 in arg_1 : arg_6 = defaultdict ( list ) if arg_2 : for arg_7 in arg_0 . indexed_features : if arg_7 in arg_5 : arg_6 [ fname_to_idx_name ( arg_7 ) ] . extend ( arg_5 [ arg_7 ] ) for arg_7 in arg_0 . fulltext_indexed_features : if arg_7 not in arg_5 : continue if isinstance ( arg_5 [ arg_7 ] , basestring ) : arg_6 [ arg_8 ( arg_7 ) ] = arg_5 [ arg_7 ] else : arg_6 [ arg_8 ( arg_7 ) ] . extend ( arg_5 [ arg_7 ] ) arg_3 . append ( { '_index' : arg_0 . index , '_type' : arg_0 . type , '_id' : eid ( arg_4 ) , '_op_type' : 'index' , '_source' : dict ( arg_6 , ** { 'fc' : arg_0 . fc_to_dict ( arg_5 ) , } ) , } ) bulk ( arg_0 . conn , arg_3 , timeout = 60 , request_timeout = 60 )

def Func(arg_0, arg_1, arg_2=True):
        '''Adds feature collections to the store.

        This efficiently adds multiple FCs to the store. The iterable
        of ``items`` given should yield tuples of ``(content_id, FC)``.

        :param items: Iterable of ``(content_id, FC)``.
        :param [str] feature_names:
          A list of feature names to retrieve. When ``None``, all
          features are retrieved. Wildcards are allowed.
        '''
        arg_3 = []
        for arg_4, arg_5 in arg_1:
            # TODO: If we store features in a columnar order, then we
            # could tell ES to index the feature values directly. ---AG
            # (But is problematic because we want to preserve the ability
            # to selectively index FCs. So we'd probably need two distinct
            # doc types.)
            arg_6 = defaultdict(list)
            if arg_2:
                for arg_7 in arg_0.indexed_features:
                    if arg_7 in arg_5:
                        arg_6[fname_to_idx_name(arg_7)].extend(arg_5[arg_7])
                for arg_7 in arg_0.fulltext_indexed_features:
                    if arg_7 not in arg_5:
                        continue
                    if isinstance(arg_5[arg_7], basestring):
                        arg_6[arg_8(arg_7)] = arg_5[arg_7]
                    else:
                        arg_6[arg_8(arg_7)].extend(arg_5[arg_7])
            arg_3.append({
                '_index': arg_0.index,
                '_type': arg_0.type,
                '_id': eid(arg_4),
                '_op_type': 'index',
                '_source': dict(arg_6, **{
                    'fc': arg_0.fc_to_dict(arg_5),
                }),
            })
        bulk(arg_0.conn, arg_3, timeout=60, request_timeout=60)


def Func ( arg_0 ) : if hasattr ( arg_0 , '__wrapped__' ) : arg_0 = arg_0 . __wrapped__ try : try : arg_1 = inspect . getsourcelines ( arg_0 ) [ 1 ] except TypeError : if hasattr ( arg_0 , '__class__' ) : arg_1 = inspect . getsourcelines ( arg_0 . __class__ ) [ 1 ] except : return None return arg_1

def Func(arg_0):
    """Find the line number in a file where an object was defined.

    This is essentially a robust wrapper around `inspect.getsourcelines`.

    Returns None if no file can be found.

    Parameters
    ----------
    obj : any Python object

    Returns
    -------
    lineno : int
      The line number where the object definition starts.
    """
    # get source if obj was decorated with @decorator
    if hasattr(arg_0, '__wrapped__'):
        arg_0 = arg_0.__wrapped__

    try:
        try:
            arg_1 = inspect.getsourcelines(arg_0)[1]
        except TypeError:
            # For instances, try the class object like getsource() does
            if hasattr(arg_0, '__class__'):
                arg_1 = inspect.getsourcelines(arg_0.__class__)[1]
    except:
        return None

    return arg_1

Find the line number in a file where an object was defined .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = { 'name' : 'snapshot' , 't0' : arg_1 + arg_2 . start_time , 'label' : arg_2 . name , 'type' : arg_2 . type } return arg_0 . _qobj_model ( ** arg_3 )

def Func(arg_0, arg_1, arg_2):
        """Return converted `Snapshot`.

        Args:
            shift(int): Offset time.
            instruction (Snapshot): snapshot instruction.
        Returns:
            dict: Dictionary of required parameters.
        """
        arg_3 = {
            'name': 'snapshot',
            't0': arg_1+arg_2.start_time,
            'label': arg_2.name,
            'type': arg_2.type
        }
        return arg_0._qobj_model(**arg_3)


def Func ( arg_0 ) : arg_0 . reserved_tcp_socket = socket . socket ( socket . AF_INET , socket . SOCK_STREAM ) arg_0 . reserved_tcp_socket . bind ( ( '127.0.0.1' , 0 ) ) arg_0 . sql_proxy_tcp_port = arg_0 . reserved_tcp_socket . getsockname ( ) [ 1 ]

def Func(arg_0):
        """
        Reserve free TCP port to be used by Cloud SQL Proxy
        """
        arg_0.reserved_tcp_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        arg_0.reserved_tcp_socket.bind(('127.0.0.1', 0))
        arg_0.sql_proxy_tcp_port = arg_0.reserved_tcp_socket.getsockname()[1]


def Func ( arg_0 , arg_1 , arg_2 = None ) : def select_attribute ( arg_3 ) : if arg_2 is None : return arg_3 else : return getattr ( arg_3 , arg_2 ) try : arg_4 = re . compile ( arg_1 ) if arg_2 is not None : arg_5 = ( i for i in arg_0 if arg_4 . findall ( select_attribute ( i ) ) != [ ] ) else : arg_5 = ( i for i in arg_0 if arg_4 . findall ( getattr ( i , 'id' ) ) != [ ] ) except TypeError : arg_5 = ( i for i in arg_0 if arg_1 ( select_attribute ( i ) ) ) arg_6 = arg_0 . __class__ ( ) arg_6 . _extend_nocheck ( arg_5 ) return arg_6

def Func(arg_0, arg_1, arg_2=None):
        """Query the list

        Parameters
        ----------
        search_function : a string, regular expression or function
            Used to find the matching elements in the list.
            - a regular expression (possibly compiled), in which case the
            given attribute of the object should match the regular expression.
            - a function which takes one argument and returns True for
            desired values

        attribute : string or None
            the name attribute of the object to passed as argument to the
            `search_function`. If this is None, the object itself is used.

        Returns
        -------
        DictList
            a new list of objects which match the Func

        Examples
        --------
        >>> import cobra.test
        >>> model = cobra.test.create_test_model('textbook')
        >>> model.reactions.Func(lambda x: x.boundary)
        >>> import re
        >>> regex = re.compile('^g', flags=re.IGNORECASE)
        >>> model.metabolites.Func(regex, attribute='name')
        """
        def select_attribute(arg_3):
            if arg_2 is None:
                return arg_3
            else:
                return getattr(arg_3, arg_2)

        try:
            # if the search_function is a regular expression
            arg_4 = re.compile(arg_1)

            if arg_2 is not None:
                arg_5 = (
                    i for i in arg_0 if
                    arg_4.findall(select_attribute(i)) != [])

            else:
                # Don't regex on objects
                arg_5 = (
                    i for i in arg_0 if
                    arg_4.findall(getattr(i, 'id')) != [])

        except TypeError:
            arg_5 = (
                i for i in arg_0 if arg_1(select_attribute(i)))

        arg_6 = arg_0.__class__()
        arg_6._extend_nocheck(arg_5)
        return arg_6

Query the list

        Parameters
        ----------
        search_function : a string, regular expression or function
            Used to find the matching elements in the list.
            - a regular expression (possibly compiled), in which case the
            given attribute of the object should match the regular expression.
            - a function which takes one argument and returns True for
            desired values

        attribute : string or None
            the name attribute of the object to passed as argument to the
            `search_function`. If this is None, the object itself is used.

        Returns
        -------
        DictList
            a new list of objects which match the query

        Examples
        --------
        >>> import cobra.test
        >>> model = cobra.test.create_test_model('textbook')
        >>> model.reactions.query(lambda x: x.boundary)
        >>> import re
        >>> regex = re.compile('^g', flags=re.IGNORECASE)
        >>> model.metabolites.query(regex, attribute='name')


(self, datacenter_id, volume_id,
                        name=None, description=None)

def Func(arg_0, arg_1, arg_2,
                        arg_3=None, arg_4=None):
        """
        Creates a snapshot of the specified volume.

        :param      datacenter_id: The unique ID of the data center.
        :type       datacenter_id: ``str``

        :param      volume_id: The unique ID of the volume.
        :type       volume_id: ``str``

        :param      name: The name given to the volume.
        :type       name: ``str``

        :param      description: The description given to the volume.
        :type       description: ``str``

        """

        arg_5 = {'name': arg_3, 'description': arg_4}

        arg_6 = arg_0._perform_request(
            '/datacenters/%s/volumes/%s/create-snapshot' % (
                arg_1, arg_2),
            method='POST-ACTION-JSON',
            arg_5=urlencode(arg_5))

        return arg_6

Creates a snapshot of the specified volume .


def Func ( arg_0 ) : arg_0 . _minOverlapDutyCycles . fill ( arg_0 . _minPctOverlapDutyCycles * arg_0 . _overlapDutyCycles . max ( ) )

def Func(arg_0):
    """
    Updates the minimum duty cycles in a global fashion. Sets the minimum duty
    cycles for the overlap all columns to be a percent of the maximum in the
    region, specified by minPctOverlapDutyCycle. Functionality it is equivalent
    to _updateMinDutyCyclesLocal, but this function exploits the globality of
    the computation to perform it in a straightforward, and efficient manner.
    """
    arg_0._minOverlapDutyCycles.fill(
        arg_0._minPctOverlapDutyCycles * arg_0._overlapDutyCycles.max()
      )

Updates the minimum duty cycles in a global fashion . Sets the minimum duty cycles for the overlap all columns to be a percent of the maximum in the region specified by minPctOverlapDutyCycle . Functionality it is equivalent to _updateMinDutyCyclesLocal but this function exploits the globality of the computation to perform it in a straightforward and efficient manner .


def Func ( arg_0 , ** arg_1 ) : for arg_2 in arg_0 . _generateChildrenR ( ) : if arg_2 . _match ( ** arg_1 ) : yield arg_2

def Func(arg_0, **arg_1):
        """Generator which yields matches on AXChildren and their children."""
        for arg_2 in arg_0._generateChildrenR():
            if arg_2._match(**arg_1):
                yield arg_2

Generator which yields matches on AXChildren and their children .


def Func ( arg_0 ) : arg_1 = OrderedDict ( [ ( "_version" , arg_0 . __dict__ [ "_version" ] ) , ( "_checkpoint" , arg_0 . __dict__ [ "_checkpoint" ] ) , ( "name" , arg_0 . __dict__ [ "name" ] ) , ( "dirs" , arg_0 . __dict__ [ "dirs" ] ) , ( "paramsdict" , arg_0 . __dict__ [ "paramsdict" ] ) , ( "samples" , arg_0 . __dict__ [ "samples" ] . keys ( ) ) , ( "populations" , arg_0 . __dict__ [ "populations" ] ) , ( "database" , arg_0 . __dict__ [ "database" ] ) , ( "clust_database" , arg_0 . __dict__ [ "clust_database" ] ) , ( "outfiles" , arg_0 . __dict__ [ "outfiles" ] ) , ( "barcodes" , arg_0 . __dict__ [ "barcodes" ] ) , ( "stats_files" , arg_0 . __dict__ [ "stats_files" ] ) , ( "_hackersonly" , arg_0 . __dict__ [ "_hackersonly" ] ) , ] ) arg_2 = OrderedDict ( [ ] ) for arg_3 , arg_4 in arg_0 . samples . iteritems ( ) : arg_2 [ arg_3 ] = arg_4 . _to_fulldict ( ) arg_5 = json . dumps ( { "assembly" : arg_1 , "samples" : arg_2 } , cls = Encoder , sort_keys = False , indent = 4 , separators = ( "," , ":" ) , ) arg_6 = os . path . join ( arg_0 . dirs . project , arg_0 . name + ".json" ) if not os . path . exists ( arg_0 . dirs . project ) : os . mkdir ( arg_0 . dirs . project ) arg_7 = 0 while not arg_7 : try : with open ( arg_6 , 'w' ) as jout : jout . write ( arg_5 ) arg_7 = 1 except ( KeyboardInterrupt , SystemExit ) : print ( '.' ) continue

def Func(arg_0):
    """ Save assembly and samples as json """

    ## data as dict
    #### skip _ipcluster because it's made new
    #### skip _headers because it's loaded new
    #### statsfiles save only keys
    #### samples save only keys
    arg_1 = OrderedDict([
        ("_version", arg_0.__dict__["_version"]),
        ("_checkpoint", arg_0.__dict__["_checkpoint"]),
        ("name", arg_0.__dict__["name"]),
        ("dirs", arg_0.__dict__["dirs"]),
        ("paramsdict", arg_0.__dict__["paramsdict"]),
        ("samples", arg_0.__dict__["samples"].keys()),
        ("populations", arg_0.__dict__["populations"]),
        ("database", arg_0.__dict__["database"]),
        ("clust_database", arg_0.__dict__["clust_database"]),
        ("outfiles", arg_0.__dict__["outfiles"]),
        ("barcodes", arg_0.__dict__["barcodes"]),
        ("stats_files", arg_0.__dict__["stats_files"]),
        ("_hackersonly", arg_0.__dict__["_hackersonly"]),
        ])

    ## sample dict
    arg_2 = OrderedDict([])
    for arg_3, arg_4 in arg_0.samples.iteritems():
        arg_2[arg_3] = arg_4._to_fulldict()

    ## json format it using cumstom Encoder class
    arg_5 = json.dumps({
        "assembly": arg_1,
        "samples": arg_2
        },
        cls=Encoder,
        sort_keys=False, indent=4, separators=(",", ":"),
        )

    ## save to file
    arg_6 = os.path.join(arg_0.dirs.project, arg_0.name+".json")
    if not os.path.exists(arg_0.dirs.project):
        os.mkdir(arg_0.dirs.project)

    ## protect save from interruption
    arg_7 = 0
    while not arg_7:
        try:
            with open(arg_6, 'w') as jout:
                jout.write(arg_5)
            arg_7 = 1
        except (KeyboardInterrupt, SystemExit):
            print('.')
            continue


Issue a warning, or maybe ignore it or raise an exception.

def Func(arg_0, arg_1=None, arg_2=1):
    """Issue a Funcing, or maybe ignore it or raise an exception."""
    # Check if message is already a Warning object
    if isinstance(arg_0, Warning):
        arg_1 = arg_0.__class__
    # Check category argument
    if arg_1 is None:
        arg_1 = UserWarning
    assert issubclass(arg_1, Warning)
    # Get context information
    try:
        arg_3 = sys._getframe(arg_2)
    except ValueError:
        arg_4 = sys.__dict__
        arg_5 = 1
    else:
        arg_4 = arg_3.f_globals
        arg_5 = arg_3.f_lineno
    if '__name__' in arg_4:
        arg_6 = arg_4['__name__']
    else:
        arg_6 = "<string>"
    arg_7 = arg_4.get('__file__')
    if arg_7:
        arg_8 = arg_7.lower()
        if arg_8.endswith((".pyc", ".pyo")):
            arg_7 = arg_7[:-1]
    else:
        if arg_6 == "__main__":
            try:
                arg_7 = sys.argv[0]
            except AttributeError:
                # embedded interpreters don't have sys.argv, see bug #839151
                arg_7 = '__main__'
        if not arg_7:
            arg_7 = arg_6
    arg_9 = arg_4.setdefault("__Funcingregistry__", {})
    Func_explicit(arg_0, arg_1, arg_7, arg_5, arg_6, arg_9,
                  arg_4)

Issue a warning or maybe ignore it or raise an exception .


def Func():
    """Attempt to get the access token from the environment.

    Try using the current and legacy environment variables. If the access token
    is found in a legacy environment variable, raise a deprecation warning.

    Returns:
        The access token found in the environment (str), or None.
    """
    arg_0 = os.environ.get(ACCESS_TOKEN_ENVIRONMENT_VARIABLE)
    if arg_0:
        return arg_0

    else:
        for arg_1 in LEGACY_ACCESS_TOKEN_ENVIRONMENT_VARIABLES:
            arg_0 = os.environ.get(arg_1)
            if arg_0:
                arg_2 = PendingDeprecationWarning(
                    "Use of the `{legacy}` environment variable will be "
                    "deprecated in the future.  Please update your "
                    "environment(s) to use the new `{new}` environment "
                    "variable.".format(
                        legacy=arg_0,
                        new=ACCESS_TOKEN_ENVIRONMENT_VARIABLE,
                    )
                )
                warnings.warn(arg_2)
                return arg_0

Attempt to get the access token from the environment .


def Func(arg_0, arg_1):
    '''
    Create a pyxtuml association from a simple association in BridgePoint.
    '''
    arg_2 = one(arg_1).R_REL[206]()

    arg_3 = one(arg_1).R_FORM[208]()
    arg_4 = one(arg_1).R_PART[207]()

    arg_5 = one(arg_3).R_RGO[205]()
    arg_6 = one(arg_4).R_RTO[204]()

    if not arg_3:
        logger.info('unformalized association R%s' % (arg_2.Numb))
        arg_3 = one(arg_1).R_PART[207](lambda sel: sel != arg_4)
        arg_5 = one(arg_3).R_RTO[204]()

    arg_7 = one(arg_5).R_OIR[203].O_OBJ[201]()
    arg_8 = one(arg_6).R_OIR[203].O_OBJ[201]()
    arg_9, arg_10 = _get_related_attributes(arg_5, arg_6)

    if arg_7.Obj_ID != arg_8.Obj_ID:
        arg_11 = arg_12 = ''
    else:
        arg_11 = arg_4.Txt_Phrs
        arg_12 = arg_3.Txt_Phrs

    arg_0.define_association(rel_id=arg_2.Numb,
                         source_kind=arg_7.Key_Lett,
                         target_kind=arg_8.Key_Lett,
                         source_keys=arg_9,
                         target_keys=arg_10,
                         source_conditional=arg_3.Cond,
                         target_conditional=arg_4.Cond,
                         arg_11=arg_11,
                         arg_12=arg_12,
                         source_many=arg_3.Mult,
                         target_many=arg_4.Mult)

Create a pyxtuml association from a simple association in BridgePoint .


def Func(arg_0, arg_1, arg_2='', arg_3=None):
    """
    Generate a html snippet for showing a boolean value on the admin page.
    Item is an object, attr is the attribute name we should display. Text
    is an optional explanatory text to be included in the output.

    This function will emit code to produce a checkbox input with its state
    corresponding to the item.attr attribute if no override value is passed.
    This input is wired to run a JS ajax updater to toggle the value.

    If override is passed in, ignores the attr attribute and returns a
    static image for the override boolean with no user interaction possible
    (useful for "disabled and you can't change it" situations).
    """
    if arg_2:
        arg_2 = ' (%s)' % unicode(arg_2)

    if arg_3 is not None:
        arg_4 = [django_boolean_icon(arg_3, arg_2), arg_2]
    else:
        arg_5 = getattr(arg_0, arg_1)
        arg_4 = [
            '<input type="checkbox"',
            arg_5 and ' checked="checked"' or '',
            ' onclick="return inplace_toggle_boolean(%d, \'%s\')";' % (arg_0.id, arg_1),
            ' />',
            arg_2,
        ]

    arg_4.insert(0, '
' % ( arg_1, arg_0.id ))
    arg_4.append('
')
    return unicode(''.join(arg_4))

Generate a html snippet for showing a boolean value on the admin page . Item is an object attr is the attribute name we should display . Text is an optional explanatory text to be included in the output .


(self, objectId, subreference, lang=None)

return {
            "template": "main::text.html",
            "objectId": objectId,
            "subreference": subreference,
            "collections": {
                "current": {
                    "label": collection.get_label(lang),
                    "id": collection.id,
                    "model": str(collection.model),
                    "type": str(collection.type),
                    "author": text.get_creator(lang),
                    "title": text.get_title(lang),
                    "description": text.get_description(lang),
                    "citation": collection.citation,
                    "coins": self.make_coins(collection, text, subreference, lang=lang)
                },
                "parents": self.make_parents(collection, lang=lang)
            },
            "text_passage": Markup(passage),
            "prev": prev,
            "next": next
        }

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
=
)
:
arg_4
=
arg_0
.
get_collection
(
arg_1
)
if
isinstance
(
arg_4
,
CtsWorkMetadata
)
:
arg_5
=
[
t
for
t
in
arg_4
.
children
.
values
(
)
if
isinstance
(
t
,
CtsEditionMetadata
)
]
if
len
(
arg_5
)
==
0
:
raise
UnknownCollection
(
"This work has no default edition"
)
return
redirect
(
url_for
(
".Func"
,
arg_1
=
str
(
arg_5
[
0
]
.
id
)
,
arg_2
=
arg_2
)
)
arg_6
=
arg_0
.
get_passage
(
arg_1
=
arg_1
,
arg_2
=
arg_2
)
arg_7
=
arg_0
.
transform
(
arg_6
,
arg_6
.
export
(
Mimetypes
.
PYTHON
.
ETREE
)
,
arg_1
)
arg_8
,
arg_9
=
arg_0
.
get_siblings
(
arg_1
,
arg_2
,
arg_6
)
return
{
"template"
:
"main::text.html"
,
"objectId"
:
arg_1
,
"subreference"
:
arg_2
,
"collections"
:
{
"current"
:
{
"label"
:
arg_4
.
get_label
(
arg_3
)
,
"id"
:
arg_4
.
id
,
"model"
:
str
(
arg_4
.
model
)
,
"type"
:
str
(
arg_4
.
type
)
,
"author"
:
arg_6
.
get_creator
(
arg_3
)
,
"title"
:
arg_6
.
get_title
(
arg_3
)
,
"description"
:
arg_6
.
get_description
(
arg_3
)
,
"citation"
:
arg_4
.
citation
,
"coins"
:
arg_0
.
make_coins
(
arg_4
,
arg_6
,
arg_2
,
arg_3
=
arg_3
)
}
,
"parents"
:
arg_0
.
make_parents
(
arg_4
,
arg_3
=
arg_3
)
}
,
"text_passage"
:
Markup
(
arg_7
)
,
"prev"
:
arg_8
,
"next"
:
arg_9
}

def Func(arg_0, arg_1, arg_2, arg_3=None):
        """ Retrieve the text of the passage

        :param objectId: Collection identifier
        :type objectId: str
        :param lang: Lang in which to express main data
        :type lang: str
        :param subreference: Reference identifier
        :type subreference: str
        :return: Template, collections metadata and Markup object representing the text
        :rtype: {str: Any}
        """
        arg_4 = arg_0.get_collection(arg_1)
        if isinstance(arg_4, CtsWorkMetadata):
            arg_5 = [t for t in arg_4.children.values() if isinstance(t, CtsEditionMetadata)]
            if len(arg_5) == 0:
                raise UnknownCollection("This work has no default edition")
            return redirect(url_for(".Func", arg_1=str(arg_5[0].id), arg_2=arg_2))
        arg_6 = arg_0.get_passage(arg_1=arg_1, arg_2=arg_2)
        arg_7 = arg_0.transform(arg_6, arg_6.export(Mimetypes.PYTHON.ETREE), arg_1)
        arg_8, arg_9 = arg_0.get_siblings(arg_1, arg_2, arg_6)
        return {
            "template": "main::text.html",
            "objectId": arg_1,
            "subreference": arg_2,
            "collections": {
                "current": {
                    "label": arg_4.get_label(arg_3),
                    "id": arg_4.id,
                    "model": str(arg_4.model),
                    "type": str(arg_4.type),
                    "author": arg_6.get_creator(arg_3),
                    "title": arg_6.get_title(arg_3),
                    "description": arg_6.get_description(arg_3),
                    "citation": arg_4.citation,
                    "coins": arg_0.make_coins(arg_4, arg_6, arg_2, arg_3=arg_3)
                },
                "parents": arg_0.make_parents(arg_4, arg_3=arg_3)
            },
            "text_passage": Markup(arg_7),
            "prev": arg_8,
            "next": arg_9
        }


return super(Opt, self).build(pre, shortest=shortest)

def Func ( arg_0 , arg_1 = None , arg_2 = False ) : if arg_1 is None : arg_1 = [ ] if arg_2 or rand . maybe ( arg_0 . prob ) : raise errors . OptGram return super ( Opt , arg_0 ) . Func ( arg_1 , arg_2 = arg_2 )

def Func(arg_0, arg_1=None, arg_2=False):
        """Build the current ``Opt`` instance

        :param list pre: The prerequisites list
        :param bool shortest: Whether or not the shortest reference-chain (most minimal) version of the field should be generated.
        """
        if arg_1 is None:
            arg_1 = []

        if arg_2 or rand.maybe(arg_0.prob):
            raise errors.OptGram

        return super(Opt, arg_0).Func(arg_1, arg_2=arg_2)


def Func ( ) : from keras . models import Sequential from keras . layers import Dense , Dropout , Activation from keras . layers import Embedding from keras . layers import LSTM from keras . layers import Convolution1D , MaxPooling1D arg_0 = Sequential ( ) arg_0 . add ( Embedding ( 20000 , 128 , input_length = 100 ) ) arg_0 . add ( Dropout ( 0.25 ) ) arg_0 . add ( Convolution1D ( nb_filter = 64 , filter_length = 5 , border_mode = 'valid' , activation = 'relu' , subsample_length = 1 ) ) arg_0 . add ( MaxPooling1D ( pool_length = 4 ) ) arg_0 . add ( LSTM ( 70 ) ) arg_0 . add ( Dense ( 1 ) ) arg_0 . add ( Activation ( 'sigmoid' ) ) return arg_0

def Func():
    """
    Define a recurrent convolutional model in Keras 1.2.2
    """
    from keras.models import Sequential
    from keras.layers import Dense, Dropout, Activation
    from keras.layers import Embedding
    from keras.layers import LSTM
    from keras.layers import Convolution1D, MaxPooling1D
    arg_0 = Sequential()
    arg_0.add(Embedding(20000, 128, input_length=100))
    arg_0.add(Dropout(0.25))
    arg_0.add(Convolution1D(nb_filter=64,
                                  filter_length=5,
                                  border_mode='valid',
                                  activation='relu',
                                  subsample_length=1))
    arg_0.add(MaxPooling1D(pool_length=4))
    arg_0.add(LSTM(70))
    arg_0.add(Dense(1))
    arg_0.add(Activation('sigmoid'))
    return arg_0

Define a recurrent convolutional model in Keras 1 . 2 . 2


def Func(arg_0, arg_1=120, arg_2=4):
    """
    Return piece of text, wrapped around if needed.

    :param text: text that may be too long and then needs to be wrapped.
    :param wrap_at: the maximum line length.
    :param indent: number of spaces to prepend to all subsequent lines after the first.
    """
    arg_3 = ""
    arg_4 = arg_2
    arg_5 = False
    for arg_6 in arg_0.split():
        if arg_4 + len(arg_6) > arg_1:
            arg_3 += "\n" + " " * arg_2
            arg_4 = arg_2
            arg_5 = False
        if arg_5:
            arg_3 += " "
            arg_4 += 1
        arg_3 += arg_6
        arg_4 += len(arg_6)
        arg_5 = True
    return arg_3

Return piece of text wrapped around if needed .