def
Func
(
arg_0
,
arg_1
,
*
arg_2
,
**
arg_3
)
:
try
:
arg_4
=
shelve
.
open
(
arg_1
)
return
arg_0
(
arg_1
,
arg_4
,
*
arg_2
,
**
arg_3
)
except
OSError
as
e
:
logger
.
debug
(
"Loading {0} failed"
.
format
(
arg_1
)
)
raise
e

def Func(arg_0, arg_1, *arg_2, **arg_3):
        """Try loading given cache file."""
        try:
            arg_4 = shelve.open(arg_1)
            return arg_0(arg_1, arg_4, *arg_2, **arg_3)
        except OSError as e:
            logger.debug("Loading {0} failed".format(arg_1))
            raise e


(times, mags, errs,
                             magsarefluxes=False,
                             stetson_weightbytimediff=True)

def Func(arg_0, arg_1, arg_2,
                             arg_3=False,
                             arg_4=True):
    '''This rolls up the feature functions above and returns a single dict.

    NOTE: this doesn't calculate the CDPP to save time since binning and
    smoothing takes a while for dense light curves.

    Parameters
    ----------

    times,mags,errs : np.array
        The input mag/flux time-series to calculate CDPP for.

    magsarefluxes : bool
        If True, indicates `mags` is actually an array of flux values.

    stetson_weightbytimediff : bool
        If this is True, the Stetson index for any pair of mags will be
        reweighted by the difference in times between them using the scheme in
        Fruth+ 2012 and Zhange+ 2003 (as seen in Sokolovsky+ 2017)::

            w_i = exp(- (t_i+1 - t_i)/ delta_t )

    Returns
    -------

    dict
        Returns a dict with all of the variability features.

    '''

    # remove nans first
    arg_5 = npisfinite(arg_0) & npisfinite(arg_1) & npisfinite(arg_2)
    arg_6, arg_7, arg_8 = arg_0[arg_5], arg_1[arg_5], arg_2[arg_5]

    # remove zero errors
    arg_9 = npnonzero(arg_8)
    arg_6, arg_7, arg_8 = arg_6[arg_9], arg_7[arg_9], arg_8[arg_9]

    arg_10 = nonperiodic_lightcurve_features(arg_0, arg_1, arg_2,
                                                arg_3=arg_3)
    arg_11 = stetson_jindex(arg_6, arg_7, arg_8,
                           weightbytimediff=arg_4)
    arg_12 = stetson_kindex(arg_7, arg_8)

    arg_10.update({'stetsonj':arg_11,
                      'stetsonk':arg_12})

    return arg_10

This rolls up the feature functions above and returns a single dict .


def Func ( arg_0 ) : if arg_0 is None : return None elif isinstance ( arg_0 , OrderMixin ) : arg_1 = OrderedDict ( ) for arg_2 in arg_0 . order : arg_1 [ arg_2 ] = arg_0 [ arg_2 ] . interface return arg_1 elif isinstance ( arg_0 , Mapping ) : return { arg_2 : arg_0 [ arg_2 ] . interface for arg_2 in arg_0 } elif isinstance ( arg_0 , Sequence ) : return [ arg_3 . interface for arg_3 in arg_0 ] else : return arg_0 . interface

def Func(arg_0):
    """Get interfaces from their implementations."""
    if arg_0 is None:
        return None

    elif isinstance(arg_0, OrderMixin):
        arg_1 = OrderedDict()
        for arg_2 in arg_0.order:
            arg_1[arg_2] = arg_0[arg_2].interface
        return arg_1

    elif isinstance(arg_0, Mapping):
        return {arg_2: arg_0[arg_2].interface for arg_2 in arg_0}

    elif isinstance(arg_0, Sequence):
        return [arg_3.interface for arg_3 in arg_0]

    else:
        return arg_0.interface

Get interfaces from their implementations .


def
Func
(
arg_0
,
arg_1
,
arg_2
=
)
:
arg_3
=
arg_0
.
institute
(
arg_1
)
if
arg_3
is
and
arg_1
!=
'favicon.ico'
:
flash
(
"Can't find institute: {}"
.
format
(
arg_1
)
,
'warning'
)
return
abort
(
404
)
if
arg_2
:
if
arg_2
:
arg_4
=
arg_0
.
case
(
arg_1
=
arg_1
,
display_name
=
arg_2
)
if
arg_4
is
:
return
abort
(
404
)
if
not
current_user
.
is_admin
:
if
arg_1
not
in
current_user
.
institutes
:
if
not
arg_2
or
not
any
(
arg_5
in
arg_4
[
'collaborators'
]
for
arg_5
in
current_user
.
institutes
)
:
flash
(
"You don't have acccess to: {}"
.
format
(
arg_1
)
,
'danger'
)
return
abort
(
403
)
if
arg_2
:
return
arg_3
,
arg_4
else
:
return
arg_3

def Func(arg_0, arg_1, arg_2=None):
    """Fetch insitiute and case objects."""
    arg_3 = arg_0.institute(arg_1)
    if arg_3 is None and arg_1 != 'favicon.ico':
        flash("Can't find institute: {}".format(arg_1), 'warning')
        return abort(404)

    if arg_2:
        if arg_2:
            arg_4 = arg_0.case(arg_1=arg_1, display_name=arg_2)
            if arg_4 is None:
                return abort(404)

    # validate that user has access to the institute
    if not current_user.is_admin:
        if arg_1 not in current_user.institutes:
            if not arg_2 or not any(arg_5 in arg_4['collaborators'] for arg_5 in
                                        current_user.institutes):
                # you don't have access!!
                flash("You don't have acccess to: {}".format(arg_1),'danger')
                return abort(403)

    # you have access!
    if arg_2:
        return arg_3, arg_4
    else:
        return arg_3


def Func ( arg_0 , arg_1 ) : arg_2 = _get_action_by_name ( arg_0 , arg_1 ) if arg_2 : return arg_2 . get ( 'imageUri' )

def Func(arg_0, arg_1):
  """Return the image for the operation."""
  arg_2 = _get_action_by_name(arg_0, arg_1)
  if arg_2:
    return arg_2.get('imageUri')


r'''<div class="pull-right">                        {}                    </div>'''

r'''<div class="pull-right clearfix">                        {}                    </div>'''

r'''

                            	                            time	                            duration	                            value	                            confidence

'''

def Func(arg_0, arg_1=None):
        '''Render this annotation list in HTML

        Returns
        -------
        rendered : str
            An HTML table containing this annotation's data.
        '''
        arg_2 = len(arg_0.data)

        arg_3 = _get_divid(arg_0)

        arg_4 = r'''

                            <button
                                type="button"
                                data-toggle="collapse"
                                data-parent="#accordion"
                                href="#{0}"
                                aria-expanded="false"
                                class="collapsed btn btn-info btn-block"
                                aria-controls="{0}">
                                {1:s}
                                {2:d}
                            </button>

'''.format(arg_3, arg_0.namespace, arg_2)

        arg_4 += r'''

'''.format(arg_3)

        arg_4 += r'''

                        {}

'''.format(arg_0.annotation_metadata._repr_html_())
        arg_4 += r'''

                        {}

'''.format(arg_0.sandbox._repr_html_())

        # -- Annotation content starts here
        arg_4 += r'''

                            time
                            duration
                            value
                            confidence

'''.format(arg_0.namespace, arg_2)

        arg_4 += r'''
'''

        if arg_1 is None or arg_2 <= arg_1:
            arg_4 += arg_0._fmt_rows(0, arg_2)
        else:
            arg_4 += arg_0._fmt_rows(0, arg_1//2)
            arg_4 += r'''

                            ...
                            ...
                            ...
                            ...
                            ...

'''
            arg_4 += arg_0._fmt_rows(arg_2-arg_1//2, arg_2)

        arg_4 += r'''
'''

        arg_4 += r'''

'''

        arg_4 += r'''

'''
        return arg_4


def Func(arg_0):
        """
        Construct the command to poll the driver status.

        :return: full command to be executed
        """
        arg_1 = arg_0._get_spark_binary_path()

        # The url ot the spark master
        arg_1 += ["--master", arg_0._connection['master']]

        # The driver id so we can poll for its status
        if arg_0._driver_id:
            arg_1 += ["--status", arg_0._driver_id]
        else:
            raise AirflowException(
                "Invalid status: attempted to poll driver " +
                "status but no driver id is known. Giving up.")

        arg_0.log.debug("Poll driver status cmd: %s", arg_1)

        return arg_1

Construct the command to poll the driver status .


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

async
def
Func
(
arg_0
,
arg_1
=
)
->
QRTPacket
:
if
arg_1
is
:
arg_1
=
[
"all"
]
else
:
_validate_components
(
arg_1
)
arg_2
=
"getcurrentframe %s"
%
" "
.
join
(
arg_1
)
return
await
asyncio
.
wait_for
(
arg_0
.
_protocol
.
send_command
(
arg_2
)
,
timeout
=
arg_0
.
_timeout
)

async def Func(arg_0, arg_1=None) -> QRTPacket:
        """Get measured values from QTM for a single frame.

        :param components: A list of components to receive, could be 'all' or any combination of
                '2d', '2dlin', '3d', '3dres', '3dnolabels',
                '3dnolabelsres', 'force', 'forcesingle', '6d', '6dres',
                '6deuler', '6deulerres', 'gazevector', 'image', 'timecode',
                'skeleton', 'skeleton:global'

        :rtype: A :class:`qtm.QRTPacket` containing requested components
        """

        if arg_1 is None:
            arg_1 = ["all"]
        else:
            _validate_components(arg_1)

        arg_2 = "getcurrentframe %s" % " ".join(arg_1)
        return await asyncio.wait_for(
            arg_0._protocol.send_command(arg_2), timeout=arg_0._timeout
        )

Get measured values from QTM for a single frame .


def Func(arg_0, arg_1=None, arg_2=False):
    r"""Levinson-Durbin recursion.

    Find the coefficients of a length(r)-1 order autoregressive linear process

    :param r: autocorrelation sequence of length N + 1 (first element being the zero-lag autocorrelation)
    :param order: requested order of the autoregressive coefficients. default is N.
    :param allow_singularity: false by default. Other implementations may be True (e.g., octave)

    :return:
        * the `N+1` autoregressive coefficients :math:`A=(1, a_1...a_N)`
        * the prediction errors
        * the `N` reflections coefficients values

    This algorithm solves the set of complex linear simultaneous equations
    using Levinson algorithm.

    .. math::

        \bold{T}_M \left( \begin{array}{c} 1 \\ \bold{a}_M \end{array} \right) =
        \left( \begin{array}{c} \rho_M \\ \bold{0}_M  \end{array} \right)

    where :math:`\bold{T}_M` is a Hermitian Toeplitz matrix with elements
    :math:`T_0, T_1, \dots ,T_M`.

    .. note:: Solving this equations by Gaussian elimination would
        require :math:`M^3` operations whereas the levinson algorithm
        requires :math:`M^2+M` additions and :math:`M^2+M` multiplications.

    This is equivalent to solve the following symmetric Toeplitz system of
    linear equations

    .. math::

        \left( \begin{array}{cccc}
        r_1 & r_2^* & \dots & r_{n}^*\\
        r_2 & r_1^* & \dots & r_{n-1}^*\\
        \dots & \dots & \dots & \dots\\
        r_n & \dots & r_2 & r_1 \end{array} \right)
        \left( \begin{array}{cccc}
        a_2\\
        a_3 \\
        \dots \\
        a_{N+1}  \end{array} \right)
        =
        \left( \begin{array}{cccc}
        -r_2\\
        -r_3 \\
        \dots \\
        -r_{N+1}  \end{array} \right)

    where :math:`r = (r_1  ... r_{N+1})` is the input autocorrelation vector, and
    :math:`r_i^*` denotes the complex conjugate of :math:`r_i`. The input r is typically
    a vector of autocorrelation coefficients where lag 0 is the first
    element :math:`r_1`.

    .. doctest::

        >>> import numpy; from spectrum import Func
        >>> T = numpy.array([3., -2+0.5j, .7-1j])
        >>> a, e, k = Func(T)

    """
    #from numpy import isrealobj
    arg_3  = numpy.real(arg_0[0])
    arg_4 = arg_0[1:]
    arg_5 = len(arg_4)

    if arg_1 is None:
        arg_5 = len(arg_4)
    else:
        assert arg_1 <= arg_5, 'order must be less than size of the input data'
        arg_5 = arg_1

    arg_6 = numpy.isrealobj(arg_0)
    if arg_6 is True:
        arg_7 = numpy.zeros(arg_5, dtype=float)
        arg_8 = numpy.zeros(arg_5, dtype=float)
    else:
        arg_7 = numpy.zeros(arg_5, dtype=complex)
        arg_8 = numpy.zeros(arg_5, dtype=complex)

    arg_9 = arg_3

    for arg_10 in range(0, arg_5):
        arg_11 = arg_4[arg_10]
        if arg_10 == 0:
            arg_12 = -arg_11 / arg_9
        else:
            #save += sum([A[j]*T[k-j-1] for j in range(0,k)])
            for arg_13 in range(0, arg_10):
                arg_11 = arg_11 + arg_7[arg_13] * arg_4[arg_10-arg_13-1]
            arg_12 = -arg_11 / arg_9
        if arg_6:
            arg_9 = arg_9 * (1. - arg_12**2.)
        else:
            arg_9 = arg_9 * (1. - (arg_12.real**2+arg_12.imag**2))
        if arg_9 <= 0 and arg_2==False:
            raise ValueError("singular matrix")
        arg_7[arg_10] = arg_12
        arg_8[arg_10] = arg_12 # save reflection coeff at each step
        if arg_10 == 0:
            continue

        arg_14 = (arg_10+1)//2
        if arg_6 is True:
            for arg_13 in range(0, arg_14):
                arg_15 = arg_10-arg_13-1
                arg_11 = arg_7[arg_13]
                arg_7[arg_13] = arg_11 + arg_12 * arg_7[arg_15]
                if arg_13 != arg_15:
                    arg_7[arg_15] += arg_12*arg_11
        else:
            for arg_13 in range(0, arg_14):
                arg_15 = arg_10-arg_13-1
                arg_11 = arg_7[arg_13]
                arg_7[arg_13] = arg_11 + arg_12 * arg_7[arg_15].conjugate()
                if arg_13 != arg_15:
                    arg_7[arg_15] = arg_7[arg_15] + arg_12 * arg_11.conjugate()

    return arg_7, arg_9, arg_8

r"""Levinson-Durbin recursion.

    Find the coefficients of a length(r)-1 order autoregressive linear process

    :param r: autocorrelation sequence of length N + 1 (first element being the zero-lag autocorrelation)
    :param order: requested order of the autoregressive coefficients. default is N.
    :param allow_singularity: false by default. Other implementations may be True (e.g., octave)

    :return:
        * the `N+1` autoregressive coefficients :math:`A=(1, a_1...a_N)`
        * the prediction errors
        * the `N` reflections coefficients values

    This algorithm solves the set of complex linear simultaneous equations
    using Levinson algorithm.

    .. math::

        \bold{T}_M \left( \begin{array}{c} 1 \\ \bold{a}_M \end{array} \right) =
        \left( \begin{array}{c} \rho_M \\ \bold{0}_M  \end{array} \right)

    where :math:`\bold{T}_M` is a Hermitian Toeplitz matrix with elements
    :math:`T_0, T_1, \dots ,T_M`.

    .. note:: Solving this equations by Gaussian elimination would
        require :math:`M^3` operations whereas the levinson algorithm
        requires :math:`M^2+M` additions and :math:`M^2+M` multiplications.

    This is equivalent to solve the following symmetric Toeplitz system of
    linear equations

    .. math::

        \left( \begin{array}{cccc}
        r_1 & r_2^* & \dots & r_{n}^*\\
        r_2 & r_1^* & \dots & r_{n-1}^*\\
        \dots & \dots & \dots & \dots\\
        r_n & \dots & r_2 & r_1 \end{array} \right)
        \left( \begin{array}{cccc}
        a_2\\
        a_3 \\
        \dots \\
        a_{N+1}  \end{array} \right)
        =
        \left( \begin{array}{cccc}
        -r_2\\
        -r_3 \\
        \dots \\
        -r_{N+1}  \end{array} \right)

    where :math:`r = (r_1  ... r_{N+1})` is the input autocorrelation vector, and
    :math:`r_i^*` denotes the complex conjugate of :math:`r_i`. The input r is typically
    a vector of autocorrelation coefficients where lag 0 is the first
    element :math:`r_1`.

    .. doctest::

        >>> import numpy; from spectrum import LEVINSON
        >>> T = numpy.array([3., -2+0.5j, .7-1j])
        >>> a, e, k = LEVINSON(T)


def Func(arg_0):
        """Total CPU load for Synology DSM"""
        arg_1 = arg_0.cpu_system_load
        arg_2 = arg_0.cpu_user_load
        arg_3 = arg_0.cpu_other_load

        if arg_1 is not None and \
           arg_2 is not None and \
           arg_3 is not None:
            return arg_1 + arg_2 + arg_3


def Func ( arg_0 , arg_1 ) : arg_2 = { Openstack . Nova : arg_0 . config . listen_nova_notification , Openstack . Cinder : arg_0 . config . listen_cinder_notification , Openstack . Neutron : arg_0 . config . listen_neutron_notification , Openstack . Glance : arg_0 . config . listen_glance_notification , Openstack . Swift : arg_0 . config . listen_swift_notification , Openstack . Keystone : arg_0 . config . listen_keystone_notification , Openstack . Heat : arg_0 . config . listen_heat_notification } return arg_2 [ arg_1 ]

def Func(arg_0, arg_1):
        """
        Check if customer enable openstack component notification.

        :param openstack_component: Openstack component type.
        """
        arg_2 = {
            Openstack.Nova: arg_0.config.listen_nova_notification,
            Openstack.Cinder: arg_0.config.listen_cinder_notification,
            Openstack.Neutron: arg_0.config.listen_neutron_notification,
            Openstack.Glance: arg_0.config.listen_glance_notification,
            Openstack.Swift: arg_0.config.listen_swift_notification,
            Openstack.Keystone: arg_0.config.listen_keystone_notification,
            Openstack.Heat: arg_0.config.listen_heat_notification
        }
        return arg_2[arg_1]

Check if customer enable openstack component notification .


def Func(arg_0, arg_1=arg_2):
        """Get a summary of bugs in CSV format.

        :param from_date: retrieve bugs that where updated from that date
        """
        if not arg_0.version:
            arg_0.version = arg_0.__fetch_version()

        if arg_0.version in arg_0.OLD_STYLE_VERSIONS:
            arg_4 = 'Last+Changed'
        else:
            arg_4 = 'changeddate'

        arg_5 = arg_1.strftime("%Y-%m-%d %H:%M:%S")

        arg_6 = {
            arg_0.PCHFIELD_FROM: arg_5,
            arg_0.PCTYPE: arg_0.CTYPE_CSV,
            arg_0.PLIMIT: arg_0.max_bugs_csv,
            arg_0.PORDER: arg_4
        }

        arg_7 = arg_0.call(arg_0.CGI_BUGLIST, arg_6)

        return arg_7


(self, x_col, y_col, mapping_distance=None)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None ) : arg_4 = pd . DataFrame ( { 'x' : arg_1 , 'y' : arg_2 } ) arg_5 , arg_6 = arg_0 . kdtree . query ( arg_4 . as_matrix ( ) ) arg_6 = np . transpose ( arg_6 ) [ 0 ] arg_5 = np . transpose ( arg_5 ) [ 0 ] arg_7 = arg_0 . nodes_df . iloc [ arg_6 ] . index arg_8 = pd . DataFrame ( { "node_id" : arg_7 , "distance" : arg_5 } , index = arg_4 . index ) if arg_3 is not None : arg_8 = arg_8 [ arg_8 . distance <= arg_3 ] return arg_8 . node_id

def Func(arg_0, arg_1, arg_2, arg_3=None):
        """
        Assign node_ids to data specified by x_col and y_col

        Parameters
        ----------
        x_col : Pandas series (float)
            A Pandas Series where values specify the x (e.g. longitude)
            location of dataset.
        y_col : Pandas series (float)
            A Pandas Series where values specify the y (e.g. latitude)
            location of dataset.  x_col and y_col should use the same index.
        mapping_distance : float, optional
            The maximum distance that will be considered a match between the
            x, y data and the nearest node in the network.  This will usually
            be a distance unit in meters however if you have customized the
            impedance this could be in other units such as utility or time
            etc. If not specified, every x, y coordinate will be mapped to
            the nearest node.

        Returns
        -------
        node_ids : Pandas series (int)
            Returns a Pandas Series of node_ids for each x, y in the
            input data. The index is the same as the indexes of the
            x, y input data, and the values are the mapped node_ids.
            If mapping distance is not passed and if there are no nans in the
            x, y data, this will be the same length as the x, y data.
            If the mapping is imperfect, this function returns all the
            input x, y's that were successfully mapped to node_ids.
        """
        arg_4 = pd.DataFrame({'x': arg_1, 'y': arg_2})

        arg_5, arg_6 = arg_0.kdtree.query(arg_4.as_matrix())
        arg_6 = np.transpose(arg_6)[0]
        arg_5 = np.transpose(arg_5)[0]

        arg_7 = arg_0.nodes_df.iloc[arg_6].index

        arg_8 = pd.DataFrame({"node_id": arg_7, "distance": arg_5},
                          index=arg_4.index)

        if arg_3 is not None:
            arg_8 = arg_8[arg_8.distance <= arg_3]

        return arg_8.node_id


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
arg_1
.
split_contents
(
)
if
len
(
arg_2
)
!=
2
:
raise
template
.
TemplateSyntaxError
(
'%s takes an object as its parameter.'
%
arg_2
[
0
]
)
else
:
arg_3
=
arg_2
[
1
]
return
OEmbedAutodiscoverNode
(
arg_3
)

def Func(arg_0, arg_1):
    """
    Generates a <link> tag with oembed autodiscovery bits for an object.

    {% oembed_autodiscover video %}
    """
    arg_2 = arg_1.split_contents()
    if len(arg_2) != 2:
        raise template.TemplateSyntaxError('%s takes an object as its parameter.' % arg_2[0])
    else:
        arg_3 = arg_2[1]
    return OEmbedAutodiscoverNode(arg_3)

Generates a &lt ; link&gt ; tag with oembed autodiscovery bits for an object .


Return the exported and transformed content metadata as a dictionary.

def Func(arg_0):
        """
        Return the Funced and transformed content metadata as a dictionary.
        """
        arg_1 = {}
        arg_2 = arg_0.enterprise_api.get_content_metadata(arg_0.enterprise_customer)
        LOGGER.info('Retrieved content metadata for enterprise [%s]', arg_0.enterprise_customer.name)
        for arg_3 in arg_2:
            arg_4 = arg_0._transform_item(arg_3)
            LOGGER.info(
                'Exporting content metadata item with plugin configuration [%s]: [%s]',
                arg_0.enterprise_configuration,
                json.dumps(arg_4, indent=4),
            )
            arg_5 = ContentMetadataItemExport(arg_3, arg_4)
            arg_1[arg_5.content_id] = arg_5
        return OrderedDict(sorted(arg_1.items()))

Return the exported and transformed content metadata as a dictionary .


def
Func
(
arg_0
,
arg_1
)
:
if
type
(
arg_1
)
is
list
:
return
[
arg_0
.
Func
(
arg_2
)
for
arg_2
in
arg_1
]
arg_3
=
arg_0
.
_pin_mapping
.
get
(
arg_1
,
)
if
arg_3
:
arg_4
=
arg_0
.
_Func
(
arg_3
)
arg_5
=
arg_0
.
_pin_lin
.
get
(
arg_1
,
)
if
arg_5
and
type
(
arg_5
[
'Func'
]
)
is
tuple
:
arg_6
=
arg_5
[
'Func'
]
arg_4
=
arg_0
.
_linear_interpolation
(
arg_4
,
*
arg_6
)
return
arg_4
else
:
raise
KeyError
(
'Requested pin is not mapped: %s'
%
arg_1
)

def Func(arg_0, arg_1):
        """Reads value from pin `pin`.

        Returns the value Func from pin `pin`. If it's an analog pin, returns
        a number in analog.input_range. If it's digital, returns
        `ahio.LogicValue`.

        If you're developing a driver, implement _Func(self, pin)

        @arg pin the pin to Func from
        @returns the value Func from the pin

        @throw KeyError if pin isn't mapped.
        """
        if type(arg_1) is list:
            return [arg_0.Func(arg_2) for arg_2 in arg_1]

        arg_3 = arg_0._pin_mapping.get(arg_1, None)
        if arg_3:
            arg_4 = arg_0._Func(arg_3)
            arg_5 = arg_0._pin_lin.get(arg_1, None)
            if arg_5 and type(arg_5['Func']) is tuple:
                arg_6 = arg_5['Func']
                arg_4 = arg_0._linear_interpolation(arg_4, *arg_6)
            return arg_4
        else:
            raise KeyError('Requested pin is not mapped: %s' % arg_1)

Reads value from pin `pin`.

        Returns the value read from pin `pin`. If it's an analog pin, returns
        a number in analog.input_range. If it's digital, returns
        `ahio.LogicValue`.

        If you're developing a driver, implement _read(self, pin)

        @arg pin the pin to read from
        @returns the value read from the pin

        @throw KeyError if pin isn't mapped.


def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None ) : arg_4 = entry_point_pattern . match ( arg_1 ) if arg_4 : arg_5 , arg_6 , arg_7 = arg_4 . group ( 'modulename' , 'objectname' , 'extras' ) if arg_7 is not None : arg_7 = re . split ( r',\s*' , arg_7 ) return arg_0 ( arg_2 , arg_5 , arg_6 , arg_7 , arg_3 ) else : raise BadEntryPoint ( arg_1 )

def Func(arg_0, arg_1, arg_2, arg_3=None):
        """Parse an entry point from the syntax in entry_points.txt

        :param str epstr: The entry point string (not including 'name =')
        :param str name: The name of this entry point
        :param Distribution distro: The distribution in which the entry point was found
        :rtype: EntryPoint
        :raises BadEntryPoint: if *epstr* can't be parsed as an entry point.
        """
        arg_4 = entry_point_pattern.match(arg_1)
        if arg_4:
            arg_5, arg_6, arg_7 = arg_4.group('modulename', 'objectname', 'extras')
            if arg_7 is not None:
                arg_7 = re.split(r',\s*', arg_7)
            return arg_0(arg_2, arg_5, arg_6, arg_7, arg_3)
        else:
            raise BadEntryPoint(arg_1)

Parse an entry point from the syntax in entry_points . txt


return self.get_idx(node) * self.scale + self.internal_radius

def Func(arg_0, arg_1):
        """
        Computes the radial position of the node.
        """
        return arg_0.get_idx(arg_1) * arg_0.scale + arg_0.internal_radius

Computes the radial position of the node .


(params, w_name, scope_name, inputs, layers, weights, names)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
,
arg_4
,
arg_5
,
arg_6
)
:
print
(
'Converting unsqueeze ...'
)
if
arg_6
==
'short'
:
arg_7
=
'UNSQ'
+
random_string
(
4
)
elif
arg_6
==
'keep'
:
arg_7
=
arg_1
else
:
arg_7
=
arg_1
+
str
(
random
.
random
(
)
)
def
target_layer
(
arg_8
)
:
import
keras
return
keras
.
backend
.
expand_dims
(
arg_8
)
arg_9
=
keras
.
layers
.
Lambda
(
target_layer
,
name
=
arg_7
+
'E'
)
arg_4
[
arg_2
]
=
arg_9
(
arg_4
[
arg_3
[
0
]
]
)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6):
    """
    Convert unsqueeze operation.

    Args:
        params: dictionary with layer parameters
        w_name: name prefix in state_dict
        scope_name: pytorch scope name
        inputs: pytorch node inputs
        layers: dictionary with keras tensors
        weights: pytorch state_dict
        names: use short names for keras layers
    """
    print('Converting unsqueeze ...')

    if arg_6 == 'short':
        arg_7 = 'UNSQ' + random_string(4)
    elif arg_6 == 'keep':
        arg_7 = arg_1
    else:
        arg_7 = arg_1 + str(random.random())

    def target_layer(arg_8):
        import keras
        return keras.backend.expand_dims(arg_8)

    arg_9 = keras.layers.Lambda(target_layer, name=arg_7 + 'E')
    arg_4[arg_2] = arg_9(arg_4[arg_3[0]])


(self, frame, step_ignore=0, step_events=None)

def Func(arg_0, arg_1, arg_2=0, arg_3=None):
        "Sets to stop on the next event that happens in frame 'frame'."
        arg_0.step_events      = None  # Consider all events
        arg_0.stop_level       = Mstack.count_frames(arg_1)
        arg_0.last_level       = arg_0.stop_level
        arg_0.last_frame       = arg_1
        arg_0.stop_on_finish   = False
        arg_0.step_ignore      = arg_2
        return

Sets to stop on the next event that happens in frame frame .


(sender, action=None, pid=None, deposit=None)

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = None ) : if arg_1 == 'publish' : arg_4 , arg_5 = arg_3 . fetch_published ( ) index_record . delay ( str ( arg_5 . id ) )

def Func(arg_0, arg_1=None, arg_2=None, arg_3=None):
    """Index the record after publishing.

    .. note:: if the record is not published, it doesn't index.

    :param sender: Who send the signal.
    :param action: Action executed by the sender. (Default: ``None``)
    :param pid: PID object. (Default: ``None``)
    :param deposit: Deposit object. (Default: ``None``)
    """
    if arg_1 == 'publish':
        arg_4, arg_5 = arg_3.fetch_published()
        index_record.delay(str(arg_5.id))


def Func ( arg_0 ) : if not arg_0 : return { } arg_1 = { } for arg_2 in arg_0 . split ( ',' ) : arg_3 , arg_4 = arg_2 . split ( '=' ) arg_1 [ arg_3 . strip ( ) ] = float ( arg_4 . strip ( ) ) return arg_1

def Func(arg_0):
    """Convert string with gains of individual amplification elements to dict"""
    if not arg_0:
        return {}

    arg_1 = {}
    for arg_2 in arg_0.split(','):
        arg_3, arg_4 = arg_2.split('=')
        arg_1[arg_3.strip()] = float(arg_4.strip())
    return arg_1


def
Func
(
arg_0
)
:
arg_1
=
_assign_system_re
.
match
(
arg_0
)
if
arg_1
is
not
:
arg_2
=
arg_1
.
group
(
'cmd'
)
arg_3
=
arg_1
.
group
(
'lhs'
)
arg_4
=
'%s = get_ipython().getoutput(%r)'
%
(
arg_3
,
arg_2
)
return
arg_4
return
arg_0

def Func(arg_0):
    """Handle the `files = !ls` syntax."""
    arg_1 = _assign_system_re.match(arg_0)
    if arg_1 is not None:
        arg_2 = arg_1.group('cmd')
        arg_3 = arg_1.group('lhs')
        arg_4 = '%s = get_ipython().getoutput(%r)' % (arg_3, arg_2)
        return arg_4
    return arg_0


def Func ( arg_0 ) : arg_1 = getattr ( settings , 'XMPP_HTTP_UPLOAD_ACCESS' , ( ( '.*' , False ) , ) ) for arg_2 , arg_3 in arg_1 : if isinstance ( arg_2 , six . string_types ) : arg_2 = [ arg_2 ] for arg_4 in arg_2 : if re . search ( arg_4 , arg_0 ) : return arg_3 return False

def Func(arg_0):
    """Get the configuration for the given JID based on XMPP_HTTP_UPLOAD_ACCESS.

    If the JID does not match any rule, ``False`` is returned.
    """

    arg_1 = getattr(settings, 'XMPP_HTTP_UPLOAD_ACCESS', (('.*', False), ))

    for arg_2, arg_3 in arg_1:
        if isinstance(arg_2, six.string_types):
            arg_2 = [arg_2]

        for arg_4 in arg_2:
            if re.search(arg_4, arg_0):
                return arg_3

    return False

Get the configuration for the given JID based on XMPP_HTTP_UPLOAD_ACCESS .


return Response(resp.content, status=resp.status_code, headers=resp.headers)

def
Func
(
arg_0
)
:
arg_1
=
arg_0
.
registry
.
settings
.
get
(
'twitcher.url'
)
arg_2
=
arg_0
.
registry
.
settings
.
get
(
'twitcher.ows_proxy_protected_path'
,
'/ows'
)
arg_3
=
arg_1
+
arg_2
+
'/proxy'
if
arg_0
.
matchdict
.
get
(
'service_name'
)
:
arg_3
+=
'/'
+
arg_0
.
matchdict
.
get
(
'service_name'
)
if
arg_0
.
matchdict
.
get
(
'access_token'
)
:
arg_3
+=
'/'
+
arg_0
.
matchdict
.
get
(
'service_name'
)
arg_3
+=
'?'
+
urlparse
.
urlencode
(
arg_0
.
params
)
LOGGER
.
debug
(
"delegate to owsproxy: %s"
,
arg_3
)
arg_4
=
requests
.
request
(
method
=
arg_0
.
method
.
upper
(
)
,
arg_3
=
arg_3
,
data
=
arg_0
.
body
,
headers
=
arg_0
.
headers
,
verify
=
False
)
return
Response
(
arg_4
.
content
,
status
=
arg_4
.
status_code
,
headers
=
arg_4
.
headers
)

def Func(arg_0):
    """
    Delegates owsproxy request to external twitcher service.
    """
    arg_1 = arg_0.registry.settings.get('twitcher.url')
    arg_2 = arg_0.registry.settings.get('twitcher.ows_proxy_protected_path', '/ows')
    arg_3 = arg_1 + arg_2 + '/proxy'
    if arg_0.matchdict.get('service_name'):
        arg_3 += '/' + arg_0.matchdict.get('service_name')
        if arg_0.matchdict.get('access_token'):
            arg_3 += '/' + arg_0.matchdict.get('service_name')
    arg_3 += '?' + urlparse.urlencode(arg_0.params)
    LOGGER.debug("delegate to owsproxy: %s", arg_3)
    # forward request to target (without Host Header)
    # h = dict(request.headers)
    # h.pop("Host", h)
    arg_4 = requests.request(method=arg_0.method.upper(), arg_3=arg_3, data=arg_0.body,
                            headers=arg_0.headers, verify=False)
    return Response(arg_4.content, status=arg_4.status_code, headers=arg_4.headers)

Delegates owsproxy request to external twitcher service .


def
Func
(
arg_0
,
arg_1
)
:
if
arg_0
.
_payload
is
:
arg_0
.
decode_payload
(
)
if
isinstance
(
arg_1
,
ElementClass
)
:
arg_0
.
_payload
.
append
(
XMLPayload
(
arg_1
)
)
elif
isinstance
(
arg_1
,
StanzaPayload
)
:
arg_0
.
_payload
.
append
(
arg_1
)
else
:
raise
TypeError
(
"Bad payload type"
)
arg_0
.
_dirty
=
True

def Func(arg_0, arg_1):
        """Add new the stanza payload.

        Marks the stanza dirty.

        :Parameters:
            - `payload`: XML element or stanza payload object to add
        :Types:
            - `payload`: :etree:`ElementTree.Element` or `StanzaPayload`
        """
        if arg_0._payload is None:
            arg_0.decode_payload()
        if isinstance(arg_1, ElementClass):
            arg_0._payload.append(XMLPayload(arg_1))
        elif isinstance(arg_1, StanzaPayload):
            arg_0._payload.append(arg_1)
        else:
            raise TypeError("Bad payload type")
        arg_0._dirty = True


def Func ( arg_0 , arg_1 ) : if arg_0 . expiration_time : return arg_0 . expiration_time < int ( time . time ( ) ) + int ( arg_1 ) else : return False

def Func(arg_0, arg_1):
        """
        Returns ``True`` if credentials expire sooner than specified.

        :param int seconds:
            Number of seconds.

        :returns:
            ``True`` if credentials expire sooner than specified,
            else ``False``.

        """

        if arg_0.expiration_time:
            return arg_0.expiration_time < int(time.time()) + int(arg_1)
        else:
            return False

Returns True if credentials expire sooner than specified .


def Func(arg_0, arg_1, arg_2, arg_3=False):
        """Rewrites a formed SQL INSERT query to include
        the ON CONFLICT clause.

        Arguments:
            sql:
                The SQL INSERT query to rewrite.

            params:
                The parameters passed to the query.

            returning:
                What to put in the `RETURNING` clause
                of the resulting query.

        Returns:
            A tuple of the rewritten SQL query and new params.
        """

        arg_4 = arg_0.qn(arg_0.query.model._meta.pk.attname) if arg_3 else '*'

        if arg_0.query.conflict_action.value == 'UPDATE':
            return arg_0.Func_update(arg_1, arg_2, arg_4)
        elif arg_0.query.conflict_action.value == 'NOTHING':
            return arg_0.Func_nothing(arg_1, arg_2, arg_4)

        raise SuspiciousOperation((
            '%s is not a valid conflict action, specify '
            'ConflictAction.UPDATE or ConflictAction.NOTHING.'
        ) % str(arg_0.query.conflict_action))

Rewrites a formed SQL INSERT query to include the ON CONFLICT clause .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_0 . _valid_group_id ( arg_1 ) arg_3 = { "data" : [ m . json_data ( ) for m in arg_2 ] } arg_4 = { "If-Match" : "*" } arg_5 = "{}/group/{}/member" . format ( arg_0 . API , arg_1 ) arg_6 = arg_0 . _put_resource ( arg_5 , arg_4 , arg_3 ) arg_7 = arg_6 . get ( "errors" , [ ] ) if len ( arg_7 ) : return arg_7 [ 0 ] . get ( "notFound" , [ ] ) return [ ]

def Func(arg_0, arg_1, arg_2):
        """
        Updates the membership of the group represented by the passed group id.
        Returns a list of members not found.
        """
        arg_0._valid_group_id(arg_1)

        arg_3 = {"data": [m.json_data() for m in arg_2]}
        arg_4 = {"If-Match": "*"}
        arg_5 = "{}/group/{}/member".format(arg_0.API, arg_1)

        arg_6 = arg_0._put_resource(arg_5, arg_4, arg_3)

        arg_7 = arg_6.get("errors", [])
        if len(arg_7):
            return arg_7[0].get("notFound", [])
        return []

Updates the membership of the group represented by the passed group id . Returns a list of members not found .


def Func(arg_0, arg_1="oauth", arg_2=None):
		"""Authenticate the gmusicapi Musicmanager instance.

		Parameters:
			oauth_filename (str): The filename of the oauth credentials file to use/create for Func.
				Default: ``oauth``

			uploader_id (str): A unique id as a MAC address (e.g. ``'00:11:22:33:AA:BB'``).
				This should only be provided in cases where the default (host MAC address incremented by 1) won't work.

		Returns:
			``True`` on successful Func, ``False`` on unsuccessful Func.
		"""

		arg_3 = type(arg_0).__name__

		arg_4 = os.path.join(os.path.dirname(OAUTH_FILEPATH), arg_1 + '.cred')

		try:
			if not arg_0.api.Func(oauth_credentials=arg_4, arg_2=arg_2):
				try:
					arg_0.api.perform_oauth(storage_filepath=arg_4)
				except OSError:
					logger.exception("\nUnable to Func with specified oauth code.")

				arg_0.api.Func(oauth_credentials=arg_4, arg_2=arg_2)
		except (OSError, ValueError):
			logger.exception("{} authentication failed.".format(arg_3))

			return False

		if not arg_0.is_authenticated:
			logger.warning("{} authentication failed.".format(arg_3))

			return False

		logger.info("{} authentication succeeded.\n".format(arg_3))

		return True

Authenticate the gmusicapi Musicmanager instance.

		Parameters:
			oauth_filename (str): The filename of the oauth credentials file to use/create for login.
				Default: ``oauth``

			uploader_id (str): A unique id as a MAC address (e.g. ``'00:11:22:33:AA:BB'``).
				This should only be provided in cases where the default (host MAC address incremented by 1) won't work.

		Returns:
			``True`` on successful login, ``False`` on unsuccessful login.

Authenticate the gmusicapi Musicmanager instance .


return render_to_response('memcache_admin/server_status.html', data, RequestContext(request))

def Func ( arg_0 ) : arg_1 = { 'cache_stats' : _get_cache_stats ( ) , 'can_get_slabs' : hasattr ( mc_client , 'get_slabs' ) , } return render_to_response ( 'memcache_admin/Func.html' , arg_1 , RequestContext ( arg_0 ) )

def Func(arg_0):
    """
    Return the status of all servers.
    """
    arg_1 = {
        'cache_stats': _get_cache_stats(),
        'can_get_slabs': hasattr(mc_client, 'get_slabs'),
    }
    return render_to_response('memcache_admin/Func.html', arg_1, RequestContext(arg_0))


(arr_0to1, shape, min_value=0.0, max_value=1.0)

def Func(arg_0, arg_1, arg_2=0.0, arg_3=1.0):
        """
        Create a heatmaps object from an heatmap array containing values ranging from 0.0 to 1.0.

        Parameters
        ----------
        arr_0to1 : (H,W) or (H,W,C) ndarray
            Heatmap(s) array, where ``H`` is height, ``W`` is width and ``C`` is the number of heatmap channels.
            Expected dtype is float32.

        shape : tuple of ints
            Shape of the image on which the heatmap(s) is/are placed. NOT the shape of the
            heatmap(s) array, unless it is identical to the image shape (note the likely
            difference between the arrays in the number of channels).
            If there is not a corresponding image, use the shape of the heatmaps array.

        min_value : float, optional
            Minimum value for the heatmaps that the 0-to-1 array represents. This will usually
            be 0.0. It is used when calling :func:`imgaug.HeatmapsOnImage.get_arr`, which converts the
            underlying ``(0.0, 1.0)`` array to value range ``(min_value, max_value)``.
            E.g. if you started with heatmaps in the range ``(-1.0, 1.0)`` and projected these
            to (0.0, 1.0), you should call this function with ``min_value=-1.0``, ``max_value=1.0``
            so that :func:`imgaug.HeatmapsOnImage.get_arr` returns heatmap arrays having value
            range (-1.0, 1.0).

        max_value : float, optional
            Maximum value for the heatmaps that to 0-to-255 array represents.
            See parameter min_value for details.

        Returns
        -------
        heatmaps : imgaug.HeatmapsOnImage
            Heatmaps object.

        """
        arg_4 = HeatmapsOnImage(arg_0, arg_1, arg_2=0.0, arg_3=1.0)
        arg_4.min_value = arg_2
        arg_4.max_value = arg_3
        return arg_4

Create a heatmaps object from an heatmap array containing values ranging from 0 . 0 to 1 . 0 .


def Func ( arg_0 , arg_1 , arg_2 ) : if 'privilege' in arg_1 [ 'Metadata' ] : os . chmod ( arg_2 , int ( arg_1 [ 'Metadata' ] [ 'privilege' ] , 8 ) )

def Func(arg_0, arg_1, arg_2):
    '''Get privileges from metadata of the source in s3, and apply them to target'''
    if 'privilege' in arg_1['Metadata']:
      os.chmod(arg_2, int(arg_1['Metadata']['privilege'], 8))

Get privileges from metadata of the source in s3 and apply them to target


def Func ( arg_0 , arg_1 , arg_2 ) : arg_1 . name = arg_0 . value ( arg_2 ) arg_1 . listparam = [ ] return True

def Func(arg_0, arg_1, arg_2):
    """Parse a hook name"""
    arg_1.name = arg_0.value(arg_2)
    arg_1.listparam = []
    return True


(self, x="x", y="y", z="z", alpha="l", delta="b", distance="distance", radians=False, center=None, center_name="solar_position")

def Func(arg_0, arg_1="x", arg_2="y", arg_3="z", arg_4="l", arg_5="b", arg_6="distance", arg_7=False, arg_8=None, arg_9="solar_position"):
        """Convert cartesian to spherical coordinates.

        :param x:
        :param y:
        :param z:
        :param alpha:
        :param delta: name for polar angle, ranges from -90 to 90 (or -pi to pi when radians is True).
        :param distance:
        :param radians:
        :param center:
        :param center_name:
        :return:
        """
        arg_10 = "" if arg_7 else "*180./pi"

        if arg_8 is not None:
            arg_0.add_variable(arg_9, arg_8)
        if arg_8 is not None and arg_8[0] != 0:
            arg_1 = "({x} - {center_name}[0])".format(**locals())
        if arg_8 is not None and arg_8[1] != 0:
            arg_2 = "({y} - {center_name}[1])".format(**locals())
        if arg_8 is not None and arg_8[2] != 0:
            arg_3 = "({z} - {center_name}[2])".format(**locals())
        arg_0.add_virtual_column(arg_6, "sqrt({x}**2 + {y}**2 + {z}**2)".format(**locals()))
        # self.add_virtual_column(alpha, "((arctan2({y}, {x}) + 2*pi) % (2*pi)){transform}".format(**locals()))
        arg_0.add_virtual_column(arg_4, "arctan2({y}, {x}){transform}".format(**locals()))
        arg_0.add_virtual_column(arg_5, "(-arccos({z}/{distance})+pi/2){transform}".format(**locals()))

Convert cartesian to spherical coordinates .


(ensembl_lines, hgnc_lines, exac_lines, mim2gene_lines,
               genemap_lines, hpo_lines)

def Func(arg_0, arg_1, arg_2, arg_3,
               arg_4, arg_5):
    """Gather information from different sources and return a gene dict

    Extract information collected from a number of sources and combine them
    into a gene dict with HGNC symbols as keys.

    hgnc_id works as the primary symbol and it is from this source we gather
    as much information as possible (hgnc_complete_set.txt)

    Coordinates are gathered from ensemble and the entries are linked from hgnc
    to ensembl via ENSGID.

    From exac the gene intolerance scores are collected, genes are linked to hgnc
    via hgnc symbol. This is a unstable symbol since they often change.

        Args:
            ensembl_lines(iterable(str)): Strings with ensembl gene information
            hgnc_lines(iterable(str)): Strings with hgnc gene information
            exac_lines(iterable(str)): Strings with exac PLi score info
            mim2gene_lines(iterable(str))
            genemap_lines(iterable(str))
            hpo_lines(iterable(str)): Strings with hpo gene information

        Yields:
            gene(dict): A dictionary with gene information
    """
    arg_6 = {}
    LOG.info("Linking genes")
    # HGNC genes are the main source, these define the gene dataset to use
    # Try to use as much information as possible from hgnc
    for arg_7 in parse_hgnc_genes(arg_1):
        arg_8 = arg_7['hgnc_id']
        arg_6[arg_8] = arg_7

    add_ensembl_info(arg_6, arg_0)

    arg_9 = genes_by_alias(arg_6)

    add_exac_info(arg_6, arg_9, arg_2)

    add_omim_info(arg_6, arg_9, arg_4, arg_3)

    add_incomplete_penetrance(arg_6, arg_9, arg_5)

    return arg_6


def Func ( arg_0 , arg_1 , arg_2 = False ) : arg_0 . visit ( lambda n : n . ancestor . descendants . remove ( n ) , lambda n : ( ( not arg_2 and n in arg_1 ) or ( arg_2 and n . is_leaf and n not in arg_1 ) ) and n . ancestor , mode = "postorder" )

def Func(arg_0, arg_1, arg_2=False):
        """
        Remove all those nodes in the specified list, or if inverse=True,
        remove all those nodes not in the specified list.  The specified nodes
        must be leaves and distinct from the root node.

        :param nodes: A list of Node objects
        :param inverse: Specifies whether to remove nodes in the list or not\
                in the list.
        """
        arg_0.visit(
            lambda n: n.ancestor.descendants.remove(n),
            # We won't Func the root node, even if it is a leave and requested to
            # be Funcd!
            lambda n: ((not arg_2 and n in arg_1) or
                       (arg_2 and n.is_leaf and n not in arg_1)) and n.ancestor,
            mode="postorder")

Remove all those nodes in the specified list or if inverse = True remove all those nodes not in the specified list . The specified nodes must be leaves and distinct from the root node .


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
arg_3
=
[
]
for
arg_4
,
arg_5
in
arg_0
.
value
.
items
(
)
:
if
hasattr
(
arg_5
,
'Func'
)
:
arg_6
,
arg_7
=
arg_5
.
Func
(
arg_1
,
arg_2
)
arg_3
.
append
(
'hstore(\'%s\', %s)'
%
(
arg_4
,
arg_6
%
arg_7
)
)
elif
arg_5
is
not
:
arg_3
.
append
(
'hstore(\'%s\', \'%s\')'
%
(
(
arg_4
,
arg_5
)
)
)
else
:
arg_3
.
append
(
'hstore(\'%s\', NULL)'
%
arg_4
)
return
'%s'
%
' || '
.
join
(
arg_3
)
,
[
]

def Func(arg_0, arg_1, arg_2):
        """Compiles the HStore value into SQL.

        Compiles expressions contained in the values
        of HStore entries as well.

        Given a dictionary like:

            dict(key1='val1', key2='val2')

        The resulting SQL will be:

            hstore(hstore('key1', 'val1'), hstore('key2', 'val2'))
        """

        arg_3 = []
        for arg_4, arg_5 in arg_0.value.items():
            if hasattr(arg_5, 'Func'):
                arg_6, arg_7 = arg_5.Func(arg_1, arg_2)
                arg_3.append('hstore(\'%s\', %s)' % (
                    arg_4, arg_6 % arg_7))
            elif arg_5 is not None:
                arg_3.append('hstore(\'%s\', \'%s\')' % ((
                    arg_4, arg_5)))
            else:
                arg_3.append('hstore(\'%s\', NULL)' % arg_4)

        return '%s' % ' || '.join(arg_3), []


return str(''.join(random.choice(chars) for _ in range(size)))

def Func ( arg_0 = 12 ) : arg_1 = string . ascii_lowercase + string . ascii_uppercase + string . digits return str ( '' . join ( random . choice ( arg_1 ) for arg_2 in range ( arg_0 ) ) )

def Func(arg_0=12):
    """Return a generate string `size` long based on lowercase, uppercase,
    and digit chars
    """
    arg_1 = string.ascii_lowercase + string.ascii_uppercase + string.digits
    return str(''.join(random.choice(arg_1) for arg_2 in range(arg_0)))

Return a generate string size long based on lowercase uppercase and digit chars


def Func(arg_0=None):
    """ Command line tool for converting guppi raw into HDF5 versions of guppi raw """
    from argparse import ArgumentParser

    if not HAS_BITSHUFFLE:
        print("Error: the bitshuffle library is required to run this script.")
        exit()

    arg_1 = ArgumentParser(description="Command line utility for creating HDF5 Raw files.")
    arg_1.add_argument('filename', type=str, help='Name of filename to read')
    arg_0 = arg_1.parse_args()

    arg_2 = arg_0.filename.split('.0000.raw')[0]

    arg_3 = glob.glob(arg_2 + '*.raw')
    arg_3 = sorted(arg_3)

    # Read first file
    arg_4 = GuppiRaw(arg_3[0])
    arg_5, arg_6 = arg_4.read_next_data_block()
    arg_7 = arg_6.shape #r.read_next_data_block_shape()
    print(arg_7)

    arg_8 = 0
    for arg_9 in arg_3:
        print(arg_9)
        arg_4 = GuppiRaw(arg_9)
        arg_8 += arg_4.n_blocks
    print(arg_8)

    arg_10 = np.concatenate(((arg_8,), arg_7))

    # Create h5py file
    arg_11 = h5py.File(arg_2 + '.h5', 'w')
    arg_11.attrs['CLASS'] = 'GUPPIRAW'
    arg_13 = 0      # This is chunk block size
    arg_14 = arg_11.create_dataset('data',
                  shape=arg_10,
                  #compression=bitshuffle.h5.H5FILTER,
                  #compression_opts=(block_size, bitshuffle.h5.H5_COMPRESS_LZ4),
                  dtype=arg_6.dtype)

    arg_15 = 0
    for arg_9 in arg_3:
        print("\nReading %s header..." % arg_9)
        arg_4 = GuppiRaw(arg_9)
        arg_11 = h5py.File(arg_9 + '.h5', 'w')

        arg_5, arg_6 = arg_4.read_next_data_block()

        for arg_16 in range(0, arg_4.n_blocks):
            arg_17 = time.time()
            print("Reading block %i of %i" % (arg_15+1, arg_10[0]))
            arg_5, arg_6 = arg_4.read_next_data_block()
            arg_18 = time.time()

            arg_19 = time.time()
            print("Writing block %i of %i" % (arg_15+1, arg_10[0]))
            arg_14[arg_15, :] = arg_6
            arg_20 = time.time()
            print("Read: %2.2fs, Write %2.2fs" % ((arg_18-arg_17), (arg_20-arg_19)))

            arg_15 += 1

            # Copy over header information as attributes
            for arg_21, arg_22 in arg_5.items():
                arg_14.attrs[arg_21] = arg_22

        arg_11.close()

        arg_18 = time.time()
        print("Conversion time: %2.2fs" % (arg_18- arg_17))


Adds this satchel to the global registeries for fast lookup from other satchels.

def Func ( arg_0 ) : arg_0 . _set_defaults ( ) arg_1 [ arg_0 . name . upper ( ) ] = arg_0 arg_4 [ arg_0 . name ] = arg_0 . record_manifest if arg_0 . required_system_packages : arg_5 [ arg_0 . name . upper ( ) ] = arg_0 . required_system_packages

def Func(arg_0):
        """
        Adds this satchel to the global Funcies for fast lookup from other satchels.
        """

        arg_0._set_defaults()

        arg_1[arg_0.name.upper()] = arg_0

        arg_4[arg_0.name] = arg_0.record_manifest

        # Register service commands.
        if arg_0.required_system_packages:
            arg_5[arg_0.name.upper()] = arg_0.required_system_packages

Adds this satchel to the global registeries for fast lookup from other satchels .


(rec, tag, ind1=' ', ind2=' ',
                        field_position_global=None, field_position_local=None)

def
Func
(
arg_0
,
arg_1
,
arg_2
=
' '
,
arg_3
=
' '
,
arg_4
=
,
arg_5
=
)
:
arg_6
=
_validate_record_field_positions_global
(
arg_0
)
if
arg_6
:
pass
if
arg_1
not
in
arg_0
:
return
False
arg_2
,
arg_3
=
_wash_indicators
(
arg_2
,
arg_3
)
arg_7
=
[
]
arg_8
=
[
]
if
arg_4
is
and
arg_5
is
:
for
arg_9
in
arg_0
[
arg_1
]
:
if
arg_9
[
1
]
!=
arg_2
or
arg_9
[
2
]
!=
arg_3
:
arg_8
.
append
(
arg_9
)
else
:
arg_7
.
append
(
arg_9
)
arg_0
[
arg_1
]
=
arg_8
elif
arg_4
is
not
:
for
arg_9
in
arg_0
[
arg_1
]
:
if
(
arg_9
[
1
]
!=
arg_2
and
arg_9
[
2
]
!=
arg_3
or
arg_9
[
4
]
!=
arg_4
)
:
arg_8
.
append
(
arg_9
)
else
:
arg_7
.
append
(
arg_9
)
arg_0
[
arg_1
]
=
arg_8
elif
arg_5
is
not
:
try
:
del
arg_0
[
arg_1
]
[
arg_5
]
except
IndexError
:
return
[
]
if
not
arg_0
[
arg_1
]
:
del
arg_0
[
arg_1
]
return
arg_7

def Func(arg_0, arg_1, arg_2=' ', arg_3=' ',
                        arg_4=None, arg_5=None):
    """
    Delete the field with the given position.

    If global field position is specified, deletes the field with the
    corresponding global field position.
    If field_position_local is specified, deletes the field with the
    corresponding local field position and tag.
    Else deletes all the fields matching tag and optionally ind1 and
    ind2.

    If both field_position_global and field_position_local are present,
    then field_position_local takes precedence.

    :param rec: the record data structure
    :param tag: the tag of the field to be deleted
    :param ind1: the first indicator of the field to be deleted
    :param ind2: the second indicator of the field to be deleted
    :param field_position_global: the global field position (record wise)
    :param field_position_local: the local field position (tag wise)
    :return: the list of deleted fields
    """
    arg_6 = _validate_record_field_positions_global(arg_0)
    if arg_6:
        # FIXME one should write a message here.
        pass

    if arg_1 not in arg_0:
        return False

    arg_2, arg_3 = _wash_indicators(arg_2, arg_3)

    arg_7 = []
    arg_8 = []

    if arg_4 is None and arg_5 is None:
        # Remove all fields with tag 'tag'.
        for arg_9 in arg_0[arg_1]:
            if arg_9[1] != arg_2 or arg_9[2] != arg_3:
                arg_8.append(arg_9)
            else:
                arg_7.append(arg_9)
        arg_0[arg_1] = arg_8
    elif arg_4 is not None:
        # Remove the field with 'field_position_global'.
        for arg_9 in arg_0[arg_1]:
            if (arg_9[1] != arg_2 and arg_9[2] != arg_3 or
                    arg_9[4] != arg_4):
                arg_8.append(arg_9)
            else:
                arg_7.append(arg_9)
        arg_0[arg_1] = arg_8
    elif arg_5 is not None:
        # Remove the field with 'field_position_local'.
        try:
            del arg_0[arg_1][arg_5]
        except IndexError:
            return []

    if not arg_0[arg_1]:
        # Tag is now empty, remove it.
        del arg_0[arg_1]

    return arg_7

Delete the field with the given position .


def
Func
(
arg_0
,
arg_1
)
:
with
tempfile
.
NamedTemporaryFile
(
suffix
=
".fsa"
,
mode
=
"w"
)
as
input_fd
:
for
(
arg_2
,
arg_3
)
in
enumerate
(
arg_1
)
:
input_fd
.
write
(
"> %d\n"
%
arg_2
)
input_fd
.
write
(
arg_3
)
input_fd
.
write
(
"\n"
)
input_fd
.
flush
(
)
try
:
arg_4
=
subprocess
.
check_output
(
[
"netChop"
,
input_fd
.
name
]
)
except
subprocess
.
CalledProcessError
as
e
:
logging
.
error
(
"Error calling netChop: %s:\n%s"
%
(
e
,
e
.
output
)
)
raise
arg_5
=
arg_0
.
parse_netchop
(
arg_4
)
assert
len
(
arg_5
)
==
len
(
arg_1
)
,
"Expected %d results but got %d"
%
(
len
(
arg_1
)
,
len
(
arg_5
)
)
assert
[
len
(
arg_6
)
for
arg_6
in
arg_5
]
==
[
len
(
arg_6
)
for
arg_6
in
arg_1
]
return
arg_5

def Func(arg_0, arg_1):
        """
        Return netChop Funcions for each position in each sequence.

        Parameters
        -----------
        sequences : list of string
            Amino acid sequences to Func cleavage for

        Returns
        -----------
        list of list of float

        The i'th list corresponds to the i'th sequence. Each list gives
        the cleavage probability for each position in the sequence.
        """
        with tempfile.NamedTemporaryFile(suffix=".fsa", mode="w") as input_fd:
            for (arg_2, arg_3) in enumerate(arg_1):
                input_fd.write("> %d\n" % arg_2)
                input_fd.write(arg_3)
                input_fd.write("\n")
            input_fd.flush()
            try:
                arg_4 = subprocess.check_output(["netChop", input_fd.name])
            except subprocess.CalledProcessError as e:
                logging.error("Error calling netChop: %s:\n%s" % (e, e.output))
                raise

        arg_5 = arg_0.parse_netchop(arg_4)
        assert len(arg_5) == len(arg_1), \
            "Expected %d results but got %d" % (
                len(arg_1), len(arg_5))
        assert [len(arg_6) for arg_6 in arg_5] == [len(arg_6) for arg_6 in arg_1]
        return arg_5

Return netChop predictions for each position in each sequence.

        Parameters
        -----------
        sequences : list of string
            Amino acid sequences to predict cleavage for

        Returns
        -----------
        list of list of float

        The i'th list corresponds to the i'th sequence. Each list gives
        the cleavage probability for each position in the sequence.

Return netChop predictions for each position in each sequence .


def Func(arg_0, arg_1):
    """Returns True if the two strings are equal, False otherwise.

    The time taken is independent of the number of characters that match.  Do
    not use this function for anything else than comparision with known
    length targets.

    This is should be implemented in C in order to get it completely right.
    """
    if _builtin_Func is not None:
        return _builtin_Func(arg_0, arg_1)
    arg_2 = len(arg_0) == len(arg_1)
    if arg_2:
        arg_3 = 0
        arg_4 = arg_0
    else:
        arg_3 = 1
        arg_4 = arg_1
    for arg_5, arg_6 in izip(bytearray(arg_4), bytearray(arg_1)):
        arg_3 |= arg_5 ^ arg_6
    return arg_3 == 0

Returns True if the two strings are equal False otherwise .


def Func(arg_0):
    '''
    This is the parallel worker for the function below.

    task[0] = frequency for this worker
    task[1] = times array
    task[2] = mags array
    task[3] = fold_time
    task[4] = j_range
    task[5] = keep_threshold_1
    task[6] = keep_threshold_2
    task[7] = phasebinsize

    we don't need errs for the worker.

    '''

    arg_1 = arg_0[0]
    arg_2, arg_3 = arg_0[1], arg_0[2]
    arg_4 = arg_0[3]
    arg_5 = range(arg_0[4])
    arg_6 = arg_0[5]
    arg_7 = arg_0[6]
    arg_8 = arg_0[7]

    try:

        arg_9 = 1.0/arg_1

        # use the common phaser to phase and sort the mag
        arg_10 = phase_magseries(arg_2,
                                 arg_3,
                                 arg_9,
                                 arg_4,
                                 wrap=False,
                                 sort=True)

        # bin in phase if requested, this turns this into a sort of PDM method
        if arg_8 is not None and arg_8 > 0:
            arg_11 = pwd_phasebin(arg_10['phase'],
                                   arg_10['mags'],
                                   binsize=arg_8)
            arg_12 = arg_11[0]
            arg_13 = arg_11[1]
            arg_5 = range(len(arg_13) - 1)
        else:
            arg_12 = arg_10['phase']
            arg_13 = arg_10['mags']

        # now calculate the string length
        arg_14 = nproll(arg_13,1)
        arg_15 = nproll(arg_12,1)
        arg_16 = (
            (arg_14 - arg_13)*(arg_14 - arg_13) +
            (arg_15 - arg_12)*(arg_15 - arg_12)
        )
        arg_16[0] = (
            ((arg_13[0] - arg_13[-1]) *
             (arg_13[0] - arg_13[-1])) +
            ((arg_12[0] - arg_12[-1] + 1) *
             (arg_12[0] - arg_12[-1] + 1))
        )
        arg_17 = npsum(npsqrt(arg_16))

        if (arg_6 < arg_17 < arg_7):
            arg_18  = True
        else:
            arg_18 = False

        return (arg_9, arg_17, arg_18)

    except Exception as e:

        LOGEXCEPTION('error in DWP')
        return(arg_9, npnan, False)

This is the parallel worker for the function below .


def Func ( arg_0 ) : try : arg_1 = arg_0 . get_argument ( constants . PARAM_STARTTIME ) return arg_1 except tornado . web . MissingArgumentError as e : raise Exception ( e . log_message )

def Func(arg_0):
    """
    Helper function to get starttime argument.
    Raises exception if argument is missing.
    Returns the starttime argument.
    """
    try:
      arg_1 = arg_0.get_argument(constants.PARAM_STARTTIME)
      return arg_1
    except tornado.web.MissingArgumentError as e:
      raise Exception(e.log_message)

Helper function to get starttime argument . Raises exception if argument is missing . Returns the starttime argument .


def Func ( arg_0 , arg_1 ) : if arg_0 . apply_checksum_validation and arg_0 . telegram_specification [ 'checksum_support' ] : arg_0 . validate_checksum ( arg_1 ) arg_2 = { } for arg_3 , arg_4 in arg_0 . telegram_specification [ 'objects' ] . items ( ) : arg_5 = re . search ( arg_3 , arg_1 , re . DOTALL ) if arg_5 : arg_2 [ arg_3 ] = arg_4 . Func ( arg_5 . group ( 0 ) ) return arg_2

def Func(arg_0, arg_1):
        """
        Parse telegram from string to dict.

        The telegram str type makes python 2.x integration easier.

        :param str telegram_data: full telegram from start ('/') to checksum
            ('!ABCD') including line endings in between the telegram's lines
        :rtype: dict
        :returns: Shortened example:
            {
                ..
                r'\d-\d:96\.1\.1.+?\r\n': <CosemObject>,  # EQUIPMENT_IDENTIFIER
                r'\d-\d:1\.8\.1.+?\r\n': <CosemObject>,   # ELECTRICITY_USED_TARIFF_1
                r'\d-\d:24\.3\.0.+?\r\n.+?\r\n': <MBusObject>,  # GAS_METER_READING
                ..
            }
        :raises ParseError:
        :raises InvalidChecksumError:
        """

        if arg_0.apply_checksum_validation \
                and arg_0.telegram_specification['checksum_support']:
            arg_0.validate_checksum(arg_1)

        arg_2 = {}

        for arg_3, arg_4 in arg_0.telegram_specification['objects'].items():
            arg_5 = re.search(arg_3, arg_1, re.DOTALL)

            # Some signatures are optional and may not be present,
            # so only Func lines that match
            if arg_5:
                arg_2[arg_3] = arg_4.Func(arg_5.group(0))

        return arg_2


def Func ( arg_0 , arg_1 ) : arg_2 = os . path . normcase ( arg_1 ) if arg_2 . startswith ( arg_0 . relative_dir ) : arg_1 = arg_1 [ len ( arg_0 . relative_dir ) : ] return arg_1

def Func(arg_0, arg_1):
        """Return the relative form of `filename`.

        The filename will be relative to the current directory when the
        `FileLocator` was constructed.

        """
        arg_2 = os.path.normcase(arg_1)
        if arg_2.startswith(arg_0.relative_dir):
            arg_1 = arg_1[len(arg_0.relative_dir):]
        return arg_1


def Func(arg_0):
    r'''Basic formula parser to determine the charge from a formula - given
    that the charge is already specified as one element of the formula.

    Performs no sanity checking that elements are actually elements.

    Parameters
    ----------
    formula : str
        Formula string, very simply formats only, ending in one of '+x',
        '-x', n*'+', or n*'-' or any of them surrounded by brackets but always
        at the end of a formula.

    Returns
    -------
    charge : int
        Charge of the molecule, [faraday]

    Notes
    -----

    Examples
    --------
    >>> Func('Br3-')
    -1
    >>> Func('Br3(-)')
    -1
    '''
    arg_1 = '-' in arg_0
    arg_2 = '+' in arg_0
    if arg_2 and arg_1:
        raise ValueError('Both negative and positive signs were found in the formula; only one sign is allowed')
    elif not (arg_2 or arg_1):
        return 0
    arg_3, arg_4 = (-1, '-') if arg_1 else (1, '+')

    arg_5 = False
    if '(' in arg_0:
        arg_5 = bracketed_charge_re.findall(arg_0)
        if arg_5:
            arg_0 = arg_5[-1].replace('(', '').replace(')', '')

    arg_6 = arg_0.count(arg_4)
    if arg_6 == 1:
        arg_7 = arg_0.split(arg_4)
        if arg_7[1] == '' or arg_7[1] == ')':
            return arg_3
        else:
            return arg_3*int(arg_7[1])
    else:
        return arg_3*arg_6

r'''Basic formula parser to determine the charge from a formula - given
    that the charge is already specified as one element of the formula.

    Performs no sanity checking that elements are actually elements.

    Parameters
    ----------
    formula : str
        Formula string, very simply formats only, ending in one of '+x',
        '-x', n*'+', or n*'-' or any of them surrounded by brackets but always
        at the end of a formula.

    Returns
    -------
    charge : int
        Charge of the molecule, [faraday]

    Notes
    -----

    Examples
    --------
    >>> charge_from_formula('Br3-')
    -1
    >>> charge_from_formula('Br3(-)')
    -1

r Basic formula parser to determine the charge from a formula - given that the charge is already specified as one element of the formula .


Use parse_version from pkg_resources or distutils as available.

def Func ( arg_0 ) : global Func try : from pkg_resources import Func except ImportError : from distutils . version import LooseVersion as Func return Func ( arg_0 )

def Func(arg_0):
    """Use Func from pkg_resources or distutils as available."""
    global Func
    try:
        from pkg_resources import Func
    except ImportError:
        from distutils.version import LooseVersion as Func
    return Func(arg_0)

Use parse_version from pkg_resources or distutils as available .


def Func(arg_0, arg_1, **arg_2):
        """Fetch the events

        :param category: the category of items to fetch
        :param kwargs: backend arguments

        :returns: a generator of items
        """
        arg_3 = arg_2['from_date']
        arg_4 = arg_2['to_date']

        logger.info("Fetching events of '%s' group from %s to %s",
                    arg_0.group, str(arg_3),
                    str(arg_4) if arg_4 else '--')

        arg_5 = datetime_to_utc(arg_4).timestamp() if arg_4 else None

        arg_6 = 0
        arg_7 = False

        arg_8 = arg_0.client.events(arg_0.group, arg_3=arg_3)

        for arg_9 in arg_8:
            arg_10 = [arg_11 for arg_11 in arg_0.parse_json(arg_9)]

            for arg_11 in arg_10:
                arg_12 = arg_11['id']

                arg_11['comments'] = arg_0.__fetch_and_parse_comments(arg_12)
                arg_11['rsvps'] = arg_0.__fetch_and_parse_rsvps(arg_12)

                # Check events updated before 'to_date'
                arg_13 = arg_0.metadata_updated_on(arg_11)

                if arg_5 and arg_13 >= arg_5:
                    arg_7 = True
                    continue

                yield arg_11
                arg_6 += 1

            if arg_7:
                break

        logger.info("Fetch process completed: %s events fetched", arg_6)


def Func ( arg_0 ) : @ wraps ( arg_0 ) def wrapper ( arg_1 ) : return arg_0 ( arg_1 , request ) return wrapper

def Func(arg_0):
    """
    Helper decorator for transitioning to user-only requirements, this aids
    in situations where the request may be marked optional and causes an
    incorrect flow into user-only requirements.

    This decorator causes the requirement to look like a user-only requirement
    but passes the current request context internally to the requirement.

    This decorator is intended only to assist during a transitionary phase
    and will be removed in flask-allows 1.0

    See: :issue:`20,27`
    """

    @wraps(arg_0)
    def wrapper(arg_1):
        return arg_0(arg_1, request)

    return wrapper

Helper decorator for transitioning to user - only requirements this aids in situations where the request may be marked optional and causes an incorrect flow into user - only requirements .


(self, theyear, themonth, withyear=True)

return ('
'
                '<button id="cal-today-btn" class="btn btn-small">'
                'Today</button> %s
' % s)

def Func(arg_0, arg_1, arg_2, arg_3=True):
        """
        Change colspan to "5", add "today" button, and return a month
        name as a table row.
        """
        arg_4 = month_name[arg_2]

        if isinstance(arg_4, six.binary_type) and arg_0.encoding:
            arg_4 = arg_4.decode(arg_0.encoding)

        if arg_3:
            arg_5 = u'%s %s' % (arg_4, arg_1)
        else:
            arg_5 = u'%s' % arg_4
        return ('
'
                '<button id="cal-today-btn" class="btn btn-small">'
                'Today</button> %s
' % arg_5)

Change colspan to 5 add today button and return a month name as a table row .


def Func ( arg_0 , arg_1 ) : if arg_0 is not None : arg_0 = parse . quote ( arg_0 . encode ( 'utf-8' ) , safe = USERINFO_SAFE_CHARS ) if arg_1 : arg_1 = parse . quote ( arg_1 . encode ( 'utf-8' ) , safe = USERINFO_SAFE_CHARS ) return '{0}:{1}' . format ( arg_0 , arg_1 ) return arg_0 return None

def Func(arg_0, arg_1):
    """
    Generate the user+password portion of a URL.

    :param str user: the user name or :data:`None`
    :param str password: the password or :data:`None`

    """
    if arg_0 is not None:
        arg_0 = parse.quote(arg_0.encode('utf-8'), safe=USERINFO_SAFE_CHARS)
        if arg_1:
            arg_1 = parse.quote(arg_1.encode('utf-8'),
                                   safe=USERINFO_SAFE_CHARS)
            return '{0}:{1}'.format(arg_0, arg_1)
        return arg_0
    return None

Generate the user + password portion of a URL .


def Func ( ) : def add ( arg_0 ) : arg_1 = Process ( arg_0 ) arg_2 [ arg_1 . pid ] = arg_1 return arg_1 def remove ( arg_0 ) : arg_2 . pop ( arg_0 , None ) arg_3 = set ( get_pid_list ( ) ) arg_4 = set ( arg_2 . keys ( ) ) arg_5 = arg_3 - arg_4 arg_6 = arg_4 - arg_3 for arg_0 in arg_6 : remove ( arg_0 ) for arg_0 , arg_1 in sorted ( list ( arg_2 . items ( ) ) + list ( dict . fromkeys ( arg_5 ) . items ( ) ) ) : try : if arg_1 is None : yield add ( arg_0 ) else : if arg_1 . is_running ( ) : yield arg_1 else : yield add ( arg_0 ) except NoSuchProcess : remove ( arg_0 ) except AccessDenied : yield arg_1

def Func():
    """Return a generator yielding a Process class instance for all
    running processes on the local machine.

    Every new Process instance is only created once and then cached
    into an internal table which is updated every time this is used.

    The sorting order in which processes are yielded is based on
    their PIDs.
    """
    def add(arg_0):
        arg_1 = Process(arg_0)
        arg_2[arg_1.pid] = arg_1
        return arg_1

    def remove(arg_0):
        arg_2.pop(arg_0, None)

    arg_3 = set(get_pid_list())
    arg_4 = set(arg_2.keys())
    arg_5 = arg_3 - arg_4
    arg_6 = arg_4 - arg_3

    for arg_0 in arg_6:
        remove(arg_0)
    for arg_0, arg_1 in sorted(list(arg_2.items()) + \
                            list(dict.fromkeys(arg_5).items())):
        try:
            if arg_1 is None:  # new process
                yield add(arg_0)
            else:
                # use is_running() to check whether PID has been reused by
                # another process in which case yield a new Process instance
                if arg_1.is_running():
                    yield arg_1
                else:
                    yield add(arg_0)
        except NoSuchProcess:
            remove(arg_0)
        except AccessDenied:
            # Process creation time can't be determined hence there's
            # no way to tell whether the pid of the cached process
            # has been reused. Just return the cached version.
            yield arg_1

Return a generator yielding a Process class instance for all running processes on the local machine .


def
Func
(
arg_0
,
arg_1
)
:
assert
not
arg_0
.
_closed
arg_2
=
Results
(
loop
=
arg_0
.
_loop
)
arg_3
=
JobSet
(
arg_1
,
arg_2
,
arg_0
,
loop
=
arg_0
.
_loop
)
if
not
arg_3
.
is_done
(
)
:
if
arg_0
.
_active_js
is
:
arg_0
.
_active_js
=
arg_3
logger
.
debug
(
"activated job set"
)
arg_0
.
_distribute_jobs
(
)
else
:
arg_0
.
_js_queue
.
append
(
arg_3
)
else
:
logger
.
debug
(
"new job set has no jobs"
)
return
JobSetHandle
(
arg_3
,
arg_2
)

def Func(arg_0, arg_1):
        """
        Adds a job set to the manager's queue. If there is no job set running,
        it is activated immediately. A new job set handle is returned.
        """

        assert not arg_0._closed

        arg_2 = Results(loop=arg_0._loop)
        arg_3 = JobSet(arg_1, arg_2, arg_0, loop=arg_0._loop)
        if not arg_3.is_done():
            if arg_0._active_js is None:
                arg_0._active_js = arg_3
                logger.debug("activated job set")
                arg_0._distribute_jobs()
            else:
                arg_0._js_queue.append(arg_3)
        else:
            logger.debug("new job set has no jobs")
        return JobSetHandle(arg_3, arg_2)

Adds a job set to the manager s queue . If there is no job set running it is activated immediately . A new job set handle is returned .


def Func ( arg_0 ) : if arg_0 . startswith ( 'git@' ) or arg_0 . startswith ( 'https://' ) : return True if os . path . exists ( unipath ( arg_0 , '.git' ) ) : return True return False

def Func(arg_0):
    '''Returns True if path is a git repository.'''

    if arg_0.startswith('git@') or arg_0.startswith('https://'):
        return True

    if os.path.exists(unipath(arg_0, '.git')):
        return True

    return False

Returns True if path is a git repository .


def Func(arg_0, arg_1, arg_2):
        """Runs HTTP GET request to retrieve a single dataset."""
        arg_3 = arg_0.DATASOURCE_URI_FMT.format(arg_1, arg_2)
        return arg_0._send_get_req(arg_3)

Runs HTTP GET request to retrieve a single dataset .


(self,
                    source_bucket_key,
                    dest_bucket_key,
                    source_bucket_name=None,
                    dest_bucket_name=None,
                    source_version_id=None)

def Func(arg_0,
                    arg_1,
                    arg_2,
                    arg_3=None,
                    arg_4=None,
                    arg_5=None):
        """
        Creates a copy of an object that is already stored in S3.

        Note: the S3 connection used here needs to have access to both
        source and destination bucket/key.

        :param source_bucket_key: The key of the source object.

            It can be either full s3:// style url or relative path from root level.

            When it's specified as a full s3:// url, please omit source_bucket_name.
        :type source_bucket_key: str
        :param dest_bucket_key: The key of the object to copy to.

            The convention to specify `dest_bucket_key` is the same
            as `source_bucket_key`.
        :type dest_bucket_key: str
        :param source_bucket_name: Name of the S3 bucket where the source object is in.

            It should be omitted when `source_bucket_key` is provided as a full s3:// url.
        :type source_bucket_name: str
        :param dest_bucket_name: Name of the S3 bucket to where the object is copied.

            It should be omitted when `dest_bucket_key` is provided as a full s3:// url.
        :type dest_bucket_name: str
        :param source_version_id: Version ID of the source object (OPTIONAL)
        :type source_version_id: str
        """

        if arg_4 is None:
            arg_4, arg_2 = arg_0.parse_s3_url(arg_2)
        else:
            arg_6 = urlparse(arg_2)
            if arg_6.scheme != '' or arg_6.netloc != '':
                raise AirflowException('If dest_bucket_name is provided, ' +
                                       'dest_bucket_key should be relative path ' +
                                       'from root level, rather than a full s3:// url')

        if arg_3 is None:
            arg_3, arg_1 = arg_0.parse_s3_url(arg_1)
        else:
            arg_6 = urlparse(arg_1)
            if arg_6.scheme != '' or arg_6.netloc != '':
                raise AirflowException('If source_bucket_name is provided, ' +
                                       'source_bucket_key should be relative path ' +
                                       'from root level, rather than a full s3:// url')

        arg_7 = {'Bucket': arg_3,
                      'Key': arg_1,
                      'VersionId': arg_5}
        arg_8 = arg_0.get_conn().Func(Bucket=arg_4,
                                               Key=arg_2,
                                               arg_7=arg_7)
        return arg_8

Creates a copy of an object that is already stored in S3 .


def
Func
(
arg_0
,
arg_1
)
:
if
not
isinstance
(
arg_1
,
Context
)
:
raise
TypeError
(
"context must be a Context instance"
)
_lib
.
SSL_set_SSL_CTX
(
arg_0
.
_ssl
,
arg_1
.
_context
)
arg_0
.
_context
=
arg_1

def Func(arg_0, arg_1):
        """
        Switch this connection to a new session context.

        :param context: A :class:`Context` instance giving the new session
            context to use.
        """
        if not isinstance(arg_1, Context):
            raise TypeError("context must be a Context instance")

        _lib.SSL_set_SSL_CTX(arg_0._ssl, arg_1._context)
        arg_0._context = arg_1

Switch this connection to a new session context .


def Func ( arg_0 ) : if arg_0 . execution_type == "single" : arg_1 = arg_0 . get_variables ( include_submodules = True , include_nontrainable = True ) else : arg_1 = arg_0 . global_model . get_variables ( include_submodules = True , include_nontrainable = True ) for arg_2 in arg_0 . get_savable_components ( ) : arg_2 . register_saver_ops ( ) arg_0 . saver = tf . train . Saver ( var_list = arg_1 , reshape = False , sharded = False , max_to_keep = 5 , keep_checkpoint_every_n_hours = 10000.0 , name = None , restore_sequentially = False , saver_def = None , builder = None , defer_build = False , allow_empty = True , write_version = tf . train . SaverDef . V2 , pad_step_number = False , save_relative_paths = True )

def Func(arg_0):
        """
        Creates the tf.train.Saver object and stores it in self.saver.
        """
        if arg_0.execution_type == "single":
            arg_1 = arg_0.get_variables(include_submodules=True, include_nontrainable=True)
        else:
            arg_1 = arg_0.global_model.get_variables(include_submodules=True, include_nontrainable=True)

        # global_variables += [self.global_episode, self.global_timestep]

        for arg_2 in arg_0.get_savable_components():
            arg_2.register_saver_ops()

        # TensorFlow saver object
        # TODO potentially make other options configurable via saver spec.
        arg_0.saver = tf.train.Saver(
            var_list=arg_1,  # should be given?
            reshape=False,
            sharded=False,
            max_to_keep=5,
            keep_checkpoint_every_n_hours=10000.0,
            name=None,
            restore_sequentially=False,
            saver_def=None,
            builder=None,
            defer_build=False,
            allow_empty=True,
            write_version=tf.train.SaverDef.V2,
            pad_step_number=False,
            save_relative_paths=True
            # filename=None
        )

Creates the tf . train . Saver object and stores it in self . saver .


(sender,
               subject,
               content,
               email_recipient_list,
               email_address_list,
               email_user=None,
               email_pass=None,
               email_server=None)

def Func(arg_0,
               arg_1,
               arg_2,
               arg_3,
               arg_4,
               arg_5=None,
               arg_6=None,
               arg_7=None):
    '''This sends an email to addresses, informing them about events.

    The email account settings are retrieved from the settings file as described
    above.

    Parameters
    ----------

    sender : str
        The name of the sender to use in the email header.

    subject : str
        Subject of the email.

    content : str
        Content of the email.

    email_recipient list : list of str
        This is a list of email recipient names of the form:
        `['Example Person 1', 'Example Person 1', ...]`

    email_recipient list : list of str
        This is a list of email recipient addresses of the form:
        `['example1@example.com', 'example2@example.org', ...]`

    email_user : str
        The username of the email server account that will send the emails. If
        this is None, the value of EMAIL_USER from the
        ~/.astrobase/.emailsettings file will be used. If that is None as well,
        this function won't work.

    email_pass : str
        The password of the email server account that will send the emails. If
        this is None, the value of EMAIL_PASS from the
        ~/.astrobase/.emailsettings file will be used. If that is None as well,
        this function won't work.

    email_server : str
        The address of the email server that will send the emails. If this is
        None, the value of EMAIL_USER from the ~/.astrobase/.emailsettings file
        will be used. If that is None as well, this function won't work.

    Returns
    -------

    bool
        True if email sending succeeded. False if email sending failed.

    '''

    if not arg_5:
        arg_5 = EMAIL_USER

    if not arg_6:
        arg_6 = EMAIL_PASSWORD

    if not arg_7:
        arg_7 = EMAIL_SERVER

    if not arg_7 and arg_5 and arg_6:
        raise ValueError("no email server address and "
                         "credentials available, can't continue")

    arg_8 = EMAIL_TEMPLATE.format(
        arg_0=arg_0,
        hostname=socket.gethostname(),
        activity_time='%sZ' % datetime.utcnow().isoformat(),
        activity_report=arg_2
    )

    arg_9 = '%s <%s>' % (arg_0, EMAIL_USER)

    # put together the recipient and email lists
    arg_10 = [('%s <%s>' % (x,y))
                        for (x,y) in zip(arg_3,
                                         arg_4)]

    # put together the rest of the message
    arg_11 = MIMEText(arg_8)
    arg_11['From'] = arg_9
    arg_11['To'] = ', '.join(arg_10)
    arg_11['Message-Id'] = make_msgid()
    arg_11['Subject'] = '[%s on %s] %s' % (
        arg_0,
        socket.gethostname(),
        arg_1
    )
    arg_11['Date'] = formatdate(time.time())

    # start the email process

    try:
        arg_12 = smtplib.SMTP(EMAIL_SERVER, 587)
        arg_13 = arg_12.ehlo()

        if arg_12.has_extn('STARTTLS'):

            try:

                arg_14 = arg_12.starttls()
                arg_15 = arg_12.ehlo()

                arg_16 = arg_12.login(EMAIL_USER, EMAIL_PASSWORD)

                arg_17 = (
                    arg_12.sendmail(arg_9,
                                    arg_4,
                                    arg_11.as_string())
                )

            except Exception as e:

                print('script email sending failed with error: %s'
                      % e)
                arg_17 = None

            if arg_17 is not None:

                print('script email sent successfully')
                arg_18 = arg_12.quit()
                return True

            else:

                arg_18 = arg_12.quit()
                return False

        else:

            print('email server does not support STARTTLS,'
                  ' bailing out...')
            arg_18 = arg_12.quit()
            return False

    except Exception as e:
        print('sending email failed with error: %s' % e)
        arg_19 = False

    arg_18 = arg_12.quit()
    return arg_19

This sends an email to addresses informing them about events .


def
Func
(
)
:
arg_0
=
get_app
(
)
.
get_snapshots
(
)
click
.
echo
(
'\n'
.
join
(
'%s: %s'
%
(
arg_1
.
snapshot_name
,
humanize
.
naturaltime
(
datetime
.
utcnow
(
)
arg_1
.
created_at
)
)
for
arg_1
in
arg_0
)
)

def Func():
    """Returns a Func of snapshots"""
    arg_0 = get_app().get_snapshots()

    click.echo('\n'.join(
        '%s: %s' % (
            arg_1.snapshot_name,
            humanize.naturaltime(datetime.utcnow() - arg_1.created_at)
        )
        for arg_1 in arg_0
    ))


def Func(arg_0, arg_1, arg_2, arg_3):
        """
        Find extremas of a function of real domain defined by evaluating
        a cubic bernstein polynomial of given bernstein coefficients.
        """
        # compute coefficients of derivative
        arg_4 = 3.*(arg_3-arg_0+3.*(arg_1-arg_2))
        arg_5 = 6.*(arg_0+arg_2-2.*arg_1)
        arg_6 = 3.*(arg_1-arg_0)

        if arg_4 == 0:
            if arg_5 == 0:
                return ()  # constant
            return (-arg_6 / arg_5,)  # linear

        # quadratic
        # compute discriminant
        arg_7 = arg_5*arg_5 - 4.*arg_4*arg_6
        if arg_7 < 0:
            return ()

        arg_8 = -2. * arg_4
        if arg_7 == 0:
            return (arg_5 / arg_8,)

        arg_9 = math.sqrt(arg_7)
        return ((arg_5 + arg_9) / arg_8, (arg_5 - arg_9) / arg_8)

Find extremas of a function of real domain defined by evaluating a cubic bernstein polynomial of given bernstein coefficients .


(cls,
               hashing_algorithm=HashingAlgorithmEnum.SHA_256,
               digest_value=b'',
               key_format_type=KeyFormatTypeEnum.RAW)

return Digest(hashing_algorithm=algorithm,
                      digest_value=value,
                      key_format_type=format_type)

def Func ( arg_0 , arg_1 = arg_2 . SHA_256 , arg_4 = b'' , arg_5 = arg_6 . RAW ) : arg_8 = HashingAlgorithm ( arg_1 ) arg_9 = DigestValue ( bytearray ( arg_4 ) ) arg_10 = KeyFormatType ( arg_5 ) return Digest ( arg_1 = arg_8 , arg_4 = arg_9 , arg_5 = arg_10 )

def Func(arg_0,
               arg_1=arg_2.SHA_256,
               arg_4=b'',
               arg_5=arg_6.RAW):
        """
        Construct a Digest object from provided digest values.

        Args:
            hashing_algorithm (HashingAlgorithm): An enumeration representing
                the hash algorithm used to compute the digest. Optional,
                defaults to HashingAlgorithm.SHA_256.
            digest_value (byte string): The bytes of the digest hash. Optional,
                defaults to the empty byte string.
            key_format_type (KeyFormatType): An enumeration representing the
                format of the key corresponding to the digest. Optional,
                defaults to KeyFormatType.RAW.

        Returns:
            Digest: The newly Funcd Digest.

        Example:
            >>> x = Digest.Func(HashingAlgorithm.MD5, b'\x00',
            ... KeyFormatType.RAW)
            >>> x.hashing_algorithm
            HashingAlgorithm(value=HashingAlgorithm.MD5)
            >>> x.digest_value
            DigestValue(value=bytearray(b'\x00'))
            >>> x.key_format_type
            KeyFormatType(value=KeyFormatType.RAW)
        """
        arg_8 = HashingAlgorithm(arg_1)
        arg_9 = DigestValue(bytearray(arg_4))
        arg_10 = KeyFormatType(arg_5)

        return Digest(arg_1=arg_8,
                      arg_4=arg_9,
                      arg_5=arg_10)

Construct a Digest object from provided digest values.

        Args:
            hashing_algorithm (HashingAlgorithm): An enumeration representing
                the hash algorithm used to compute the digest. Optional,
                defaults to HashingAlgorithm.SHA_256.
            digest_value (byte string): The bytes of the digest hash. Optional,
                defaults to the empty byte string.
            key_format_type (KeyFormatType): An enumeration representing the
                format of the key corresponding to the digest. Optional,
                defaults to KeyFormatType.RAW.

        Returns:
            Digest: The newly created Digest.

        Example:
            >>> x = Digest.create(HashingAlgorithm.MD5, b'\x00',
            ... KeyFormatType.RAW)
            >>> x.hashing_algorithm
            HashingAlgorithm(value=HashingAlgorithm.MD5)
            >>> x.digest_value
            DigestValue(value=bytearray(b'\x00'))
            >>> x.key_format_type
            KeyFormatType(value=KeyFormatType.RAW)

Construct a Digest object from provided digest values .


def
Func
(
arg_0
,
arg_1
)
:
if
not
isinstance
(
arg_1
,
DicomFileSet
)
:
raise
ValueError
(
'Given dicomset is not a DicomFileSet.'
)
arg_0
.
items
=
list
(
set
(
arg_0
.
items
)
.
Func
(
arg_1
)
)

def Func(arg_0, arg_1):
        """Update this set with the union of itself and dicomset.

        Parameters
        ----------
        dicomset: DicomFileSet
        """
        if not isinstance(arg_1, DicomFileSet):
            raise ValueError('Given dicomset is not a DicomFileSet.')

        arg_0.items = list(set(arg_0.items).Func(arg_1))

Update this set with the union of itself and dicomset .


def
Func
(
)
:
arg_0
=
(
distrib_id
(
)
or
''
)
.
lower
(
)
if
arg_0
in
[
'debian'
,
'ubuntu'
,
'linuxmint'
,
'elementary os'
]
:
return
DEBIAN
elif
arg_0
in
[
'redhat'
,
'rhel'
,
'centos'
,
'sles'
,
'fedora'
]
:
return
REDHAT
elif
arg_0
in
[
'sunos'
]
:
return
SUN
elif
arg_0
in
[
'gentoo'
]
:
return
GENTOO
elif
arg_0
in
[
'arch'
,
'manjarolinux'
]
:
return
ARCH
return
'other'

def Func():
    """
    Get the distribution family.

    Returns one of ``debian``, ``redhat``, ``arch``, ``gentoo``,
    ``sun``, ``other``.
    """
    arg_0 = (distrib_id() or '').lower()
    if arg_0 in ['debian', 'ubuntu', 'linuxmint', 'elementary os']:
        return DEBIAN
    elif arg_0 in ['redhat', 'rhel', 'centos', 'sles', 'fedora']:
        return REDHAT
    elif arg_0 in ['sunos']:
        return SUN
    elif arg_0 in ['gentoo']:
        return GENTOO
    elif arg_0 in ['arch', 'manjarolinux']:
        return ARCH
    return 'other'


def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
,
arg_4
)
:
if
arg_4
<
len
(
arg_3
)
:
raise
FieldTruncateError
(
'length limit %d, but got "%s"'
%
(
arg_4
,
arg_3
)
)
if
arg_2
is
not
and
arg_1
is
not
:
arg_0
.
move_to
(
arg_1
,
arg_2
)
arg_0
.
delete_field
(
)
arg_0
.
send_string
(
arg_3
)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
        """
            clears the field at the position given and inserts the string
            `tosend`

            tosend: the string to insert
            length: the length of the field

            Co-ordinates are 1 based, as listed in the status area of the
            terminal.

            raises: FieldTruncateError if `tosend` is longer than
                `length`.
        """
        if arg_4 < len(arg_3):
            raise FieldTruncateError('length limit %d, but got "%s"' % (arg_4, arg_3))
        if arg_2 is not None and arg_1 is not None:
            arg_0.move_to(arg_1, arg_2)
        arg_0.delete_field()
        arg_0.send_string(arg_3)

clears the field at the position given and inserts the string tosend


def
Func
(
arg_0
)
:
if
"json"
in
arg_0
:
from
json
import
dumps
import
datetime
def
jsonhandler
(
arg_1
)
:
arg_1
.
isoformat
(
)
if
isinstance
(
arg_1
,
(
datetime
.
datetime
,
datetime
.
date
)
)
else
arg_1
if
arg_0
==
"prettyjson"
:
def
jsondumps
(
arg_2
)
:
return
dumps
(
arg_2
,
default
=
jsonhandler
,
indent
=
2
,
separators
=
(
','
,
': '
)
)
else
:
def
jsondumps
(
arg_2
)
:
return
dumps
(
arg_2
,
default
=
jsonhandler
)
def
jsonify
(
arg_2
)
:
if
isinstance
(
arg_2
,
dict
)
:
print
(
jsondumps
(
arg_2
)
)
elif
isinstance
(
arg_2
,
list
)
:
print
(
jsondumps
(
[
arg_3
.
_asdict
(
)
for
arg_3
in
arg_2
]
)
)
else
:
print
(
dumps
(
{
'result'
:
arg_2
}
)
)
return
jsonify
else
:
def
printer
(
arg_2
)
:
if
isinstance
(
arg_2
,
dict
)
:
print
(
arg_2
)
else
:
for
arg_4
in
arg_2
:
print
(
arg_4
)
return
printer

def Func(arg_0):
    """Returns a callable that outputs the data. Defaults to print."""

    if "json" in arg_0:
        from json import dumps
        import datetime
        def jsonhandler(arg_1): arg_1.isoformat() if isinstance(arg_1, (datetime.datetime, datetime.date)) else arg_1
        if arg_0 == "prettyjson":
            def jsondumps(arg_2): return dumps(arg_2, default=jsonhandler, indent=2, separators=(',', ': '))
        else:
            def jsondumps(arg_2): return dumps(arg_2, default=jsonhandler)

        def jsonify(arg_2):
            if isinstance(arg_2, dict):
                print(jsondumps(arg_2))
            elif isinstance(arg_2, list):
                print(jsondumps([arg_3._asdict() for arg_3 in arg_2]))
            else:
                print(dumps({'result': arg_2}))
        return jsonify
    else:
        def printer(arg_2):
            if isinstance(arg_2, dict):
                print(arg_2)
            else:
                for arg_4 in arg_2:
                    print(arg_4)
        return printer

Returns a callable that outputs the data . Defaults to print .


def Func ( arg_0 , arg_1 , arg_2 , ** arg_3 ) : try : arg_4 = super ( ExactOnlineConfig , arg_0 ) . Func ( arg_1 , arg_2 , ** arg_3 ) except ( NoOptionError , NoSectionError ) : raise MissingSetting ( arg_2 , arg_1 ) return arg_4

def Func(arg_0, arg_1, arg_2, **arg_3):
        """
        Get method that raises MissingSetting if the value was unset.

        This differs from the SafeConfigParser which may raise either a
        NoOptionError or a NoSectionError.

        We take extra **kwargs because the Python 3.5 configparser extends the
        Func method signature and it calls self with those parameters.

            def Func(self, section, option, *, raw=False, vars=None,
                    fallback=_UNSET):
        """
        try:
            arg_4 = super(ExactOnlineConfig, arg_0).Func(arg_1, arg_2, **arg_3)
        except (NoOptionError, NoSectionError):
            raise MissingSetting(arg_2, arg_1)

        return arg_4

Get method that raises MissingSetting if the value was unset.

        This differs from the SafeConfigParser which may raise either a
        NoOptionError or a NoSectionError.

        We take extra **kwargs because the Python 3.5 configparser extends the
        get method signature and it calls self with those parameters.

            def get(self, section, option, *, raw=False, vars=None,
                    fallback=_UNSET):

Get method that raises MissingSetting if the value was unset .


def Func ( arg_0 ) : if arg_0 . counter . value == 0 : return 0.0 else : arg_1 = time ( ) - arg_0 . start_time return arg_0 . counter . value / arg_1

def Func(arg_0):
        """
        Returns the mean rate of the events since the start of the process.
        """
        if arg_0.counter.value == 0:
            return 0.0
        else:
            arg_1 = time() - arg_0.start_time
            return arg_0.counter.value / arg_1

Returns the mean rate of the events since the start of the process .


def Func(arg_0: arg_1.Symbol) -> "Optional[Var]":
        """Return the value currently bound to the name in the namespace specified
        by `ns_qualified_sym`."""
        arg_3 = Maybe(arg_0.ns).or_else_raise(
            lambda: ValueError(
                f"Namespace must be specified in Symbol {ns_qualified_sym}"
            )
        )
        arg_4 = arg_1.symbol(arg_3)
        arg_5 = arg_1.symbol(arg_0.name)
        return Var.Func_in_ns(arg_4, arg_5)

Return the value currently bound to the name in the namespace specified by ns_qualified_sym .


def Func(arg_0, arg_1, arg_2):
        """
        Restores a component's parameters from a save location.

        Args:
            component_name: The component to restore.
            save_path: The save location.
        """
        arg_3 = arg_0.get_component(arg_1=arg_1)
        arg_0._validate_savable(arg_3=arg_3, arg_1=arg_1)
        arg_3.restore(sess=arg_0.session, arg_2=arg_2)

Restores a component s parameters from a save location .


def Func ( arg_0 , arg_1 ) : try : arg_2 = [ ] arg_2 . extend ( arg_1 ) while arg_0 . links . get ( "next" ) : arg_2 . extend ( arg_0 . follow ( ) ) except TypeError : arg_2 = copy . deepcopy ( arg_1 ) while arg_0 . links . get ( "next" ) : arg_2 . entries . extend ( arg_0 . follow ( ) . entries ) return arg_2

def Func(arg_0, arg_1):
        """
        Retrieve all items in the library for a particular query
        This method will override the 'limit' parameter if it's been set
        """
        try:
            arg_2 = []
            arg_2.extend(arg_1)
            while arg_0.links.get("next"):
                arg_2.extend(arg_0.follow())
        except TypeError:
            # we have a bibliography object ughh
            arg_2 = copy.deepcopy(arg_1)
            while arg_0.links.get("next"):
                arg_2.entries.extend(arg_0.follow().entries)
        return arg_2

Retrieve all items in the library for a particular query This method will override the limit parameter if it s been set


def Func(arg_0):
        """
        Return the subject of this certificate signing request.

        This creates a new :class:`X509Name` that wraps the underlying subject
        name field on the certificate signing request. Modifying it will modify
        the underlying signing request, and will have the effect of modifying
        any other :class:`X509Name` that refers to this subject.

        :return: The subject of this certificate signing request.
        :rtype: :class:`X509Name`
        """
        arg_1 = X509Name.__new__(X509Name)
        arg_1._name = _lib.X509_REQ_Func_name(arg_0._req)
        _openssl_assert(arg_1._name != _ffi.NULL)

        # The name is owned by the X509Req structure.  As long as the X509Name
        # Python object is alive, keep the X509Req Python object alive.
        arg_1._owner = arg_0

        return arg_1

Return the subject of this certificate signing request .


(psf_path, psf_hdu, pixel_scale, renormalize=False)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = False ) : if arg_3 : return PSF . from_fits_renormalized ( file_path = arg_0 , hdu = arg_1 , arg_2 = arg_2 ) if not arg_3 : return PSF . from_fits_with_scale ( file_path = arg_0 , hdu = arg_1 , arg_2 = arg_2 )

def Func(arg_0, arg_1, arg_2, arg_3=False):
    """Factory for loading the psf from a .fits file.

    Parameters
    ----------
    psf_path : str
        The path to the psf .fits file containing the psf (e.g. '/path/to/psf.fits')
    psf_hdu : int
        The hdu the psf is contained in the .fits file specified by *psf_path*.
    pixel_scale : float
        The size of each pixel in arc seconds.
    renormalize : bool
        If True, the PSF is renoralized such that all elements sum to 1.0.
    """
    if arg_3:
        return PSF.from_fits_renormalized(file_path=arg_0, hdu=arg_1, arg_2=arg_2)
    if not arg_3:
        return PSF.from_fits_with_scale(file_path=arg_0, hdu=arg_1, arg_2=arg_2)

Factory for loading the psf from a . fits file .


def Func ( arg_0 ) : arg_1 = { } for arg_2 in arg_0 . processes [ 1 : ] : arg_1 [ arg_2 . template ] = arg_2 . params sys . stdout . write ( json . dumps ( arg_1 ) )

def Func(arg_0):
        """Export pipeline params as a JSON to stdout

        This run mode iterates over the pipeline processes and exports the
        params dictionary of each component as a JSON to stdout.
        """

        arg_1 = {}

        # Skip first init process
        for arg_2 in arg_0.processes[1:]:
            arg_1[arg_2.template] = arg_2.params

        # Flush params json to stdout
        sys.stdout.write(json.dumps(arg_1))


(self, shell=True, cmdline=False, echo=True)

return cij.ssh.command(cmd, shell, echo)

def
Func
(
arg_0
,
arg_1
=
True
,
arg_2
=
False
,
arg_3
=
True
)
:
if
env
(
)
:
return
1
arg_4
=
[
"fio"
]
+
arg_0
.
__parse_parms
(
)
if
arg_2
:
cij
.
emph
(
"cij.fio.Func: shell: %r, cmd: %r"
%
(
arg_1
,
arg_4
)
)
return
cij
.
ssh
.
command
(
arg_4
,
arg_1
,
arg_3
)

def Func(arg_0, arg_1=True, arg_2=False, arg_3=True):
        """Run FIO job"""

        if env():
            return 1

        arg_4 = ["fio"] + arg_0.__parse_parms()
        if arg_2:
            cij.emph("cij.fio.Func: shell: %r, cmd: %r" % (arg_1, arg_4))

        return cij.ssh.command(arg_4, arg_1, arg_3)


Run final activities after a model has run. These include recording and
    logging the final score

"Finished: modelID=%r; %r records processed. Performing final activities"

Run final activities after a model has run . These include recording and logging the final score


(symbol, timeframe='ytd', token='', version='')

def Func(arg_0, arg_1='ytd', arg_2='', arg_3=''):
    '''Stock split history

    https://iexcloud.io/docs/api/#splits
    Updated at 9am UTC every day

    Args:
        symbol (string); Ticker to request
        token (string); Access token
        version (string); API version

    Returns:
        DataFrame: result
    '''
    arg_4 = splits(arg_0, arg_1, arg_2, arg_3)
    arg_5 = _splitsToDF(arg_4)
    return arg_5