def Func ( arg_0 , arg_1 ) : arg_0 . arguments [ '{SCORE}' ] = arg_0 . score arg_0 . arguments [ '{VERBOSE}' ] = str ( arg_0 . verbose ) . upper ( ) arg_0 . arguments [ '{BETA}' ] = str ( arg_0 . beta ) arg_0 . arguments [ '{OPTIM}' ] = str ( arg_0 . optim ) . upper ( ) arg_0 . arguments [ '{ALPHA}' ] = str ( arg_0 . alpha ) arg_3 = arg_0 . _run_bnlearn ( arg_1 , verbose = arg_0 . verbose ) arg_4 = nx . DiGraph ( ) arg_4 . add_edges_from ( arg_3 ) return arg_4

def Func(arg_0, arg_1):
        """Run the algorithm on data.

        Args:
            data (pandas.DataFrame): DataFrame containing the data

        Returns:
            networkx.DiGraph: Solution given by the algorithm.

        """
        # Building setup w/ arguments.
        arg_0.arguments['{SCORE}'] = arg_0.score
        arg_0.arguments['{VERBOSE}'] = str(arg_0.verbose).upper()
        arg_0.arguments['{BETA}'] = str(arg_0.beta)
        arg_0.arguments['{OPTIM}'] = str(arg_0.optim).upper()
        arg_0.arguments['{ALPHA}'] = str(arg_0.alpha)

        arg_3 = arg_0._run_bnlearn(arg_1, verbose=arg_0.verbose)
        arg_4 = nx.DiGraph()
        arg_4.add_edges_from(arg_3)
        return arg_4


(
        self,
        input_uri=None,
        input_content=None,
        features=None,
        video_context=None,
        output_uri=None,
        location=None,
        retry=None,
        timeout=None,
        metadata=None,
    )

return client.annotate_video(
            input_uri=input_uri,
            input_content=input_content,
            features=features,
            video_context=video_context,
            output_uri=output_uri,
            location_id=location,
            retry=retry,
            timeout=timeout,
            metadata=metadata,
        )

def Func(
        arg_0,
        arg_1=None,
        arg_2=None,
        arg_3=None,
        arg_4=None,
        arg_5=None,
        arg_6=None,
        arg_7=None,
        arg_8=None,
        arg_9=None,
    ):
        """
        Performs video annotation.

        :param input_uri: Input video location. Currently, only Google Cloud Storage URIs are supported,
            which must be specified in the following format: ``gs://bucket-id/object-id``.
        :type input_uri: str
        :param input_content: The video data bytes.
            If unset, the input video(s) should be specified via ``input_uri``.
            If set, ``input_uri`` should be unset.
        :type input_content: bytes
        :param features: Requested video annotation features.
        :type features: list[google.cloud.videointelligence_v1.VideoIntelligenceServiceClient.enums.Feature]
        :param output_uri: Optional, location where the output (in JSON format) should be stored. Currently,
            only Google Cloud Storage URIs are supported, which must be specified in the following format:
            ``gs://bucket-id/object-id``.
        :type output_uri: str
        :param video_context: Optional, Additional video context and/or feature-specific parameters.
        :type video_context: dict or google.cloud.videointelligence_v1.types.VideoContext
        :param location: Optional, cloud region where annotation should take place. Supported cloud regions:
            us-east1, us-west1, europe-west1, asia-east1.
            If no region is specified, a region will be determined based on video file location.
        :type location: str
        :param retry: Retry object used to determine when/if to retry requests.
            If None is specified, requests will not be retried.
        :type retry: google.api_core.retry.Retry
        :param timeout: Optional, The amount of time, in seconds, to wait for the request to complete.
            Note that if retry is specified, the timeout applies to each individual attempt.
        :type timeout: float
        :param metadata: Optional, Additional metadata that is provided to the method.
        :type metadata: seq[tuple[str, str]]
        """
        arg_10 = arg_0.get_conn()
        return arg_10.Func(
            arg_1=arg_1,
            arg_2=arg_2,
            arg_3=arg_3,
            arg_4=arg_4,
            arg_5=arg_5,
            location_id=arg_6,
            arg_7=arg_7,
            arg_8=arg_8,
            arg_9=arg_9,
        )


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

def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
_context_data
(
{
'title'
:
_
(
'Memcache Slabs for %s'
)
%
arg_1
,
'cache_Func'
:
_get_cache_Func
(
arg_1
)
,
}
,
arg_0
)
return
render_to_response
(
'memcache_admin/Func.html'
,
arg_2
,
RequestContext
(
arg_0
)
)

def Func(arg_0, arg_1):
    """
    Show server Func.
    """
    arg_2 = _context_data({
        'title': _('Memcache Slabs for %s') % arg_1,
        'cache_Func': _get_cache_Func(arg_1),
    },
        arg_0)
    return render_to_response('memcache_admin/Func.html', arg_2, RequestContext(arg_0))


def Func ( arg_0 , arg_1 , arg_2 = 6 ) : arg_3 = np . arange ( - arg_2 * arg_0 , arg_2 * arg_0 + 1 ) arg_4 = np . zeros ( len ( arg_3 ) ) arg_5 = arg_1 arg_0 *= 1.0 for arg_6 in range ( len ( arg_3 ) ) : if ( 1 - 4 * ( arg_5 * arg_3 [ arg_6 ] / arg_0 ) ** 2 ) == 0 : arg_4 [ arg_6 ] = np . pi / 4 * np . sinc ( 1 / ( 2. * arg_5 ) ) else : arg_4 [ arg_6 ] = np . sinc ( arg_3 [ arg_6 ] / arg_0 ) * np . cos ( np . pi * arg_5 * arg_3 [ arg_6 ] / arg_0 ) / ( 1 - 4 * ( arg_5 * arg_3 [ arg_6 ] / arg_0 ) ** 2 ) return arg_4

def Func(arg_0,arg_1,arg_2=6):
    """
    A truncated raised cosine pulse used in digital communications.

    The pulse shaping factor :math:`0 < \\alpha < 1` is required as well as the
    truncation factor M which sets the pulse duration to be :math:`2*M*T_{symbol}`.

    Parameters
    ----------
    Ns : number of samples per symbol
    alpha : excess bandwidth factor on (0, 1), e.g., 0.35
    M : equals RC one-sided symbol truncation factor

    Returns
    -------
    b : ndarray containing the pulse shape

    See Also
    --------
    sqrt_Func

    Notes
    -----
    The pulse shape b is typically used as the FIR filter coefficients
    when forming a pulse shaped digital communications waveform.

    Examples
    --------
    Ten samples per symbol and :math:`\\alpha = 0.35`.

    >>> import matplotlib.pyplot as plt
    >>> from sk_dsp_comm.digitalcom import Func
    >>> from numpy import arange
    >>> b = Func(10,0.35)
    >>> n = arange(-10*6,10*6+1)
    >>> plt.stem(n,b)
    >>> plt.show()
    """
    # Design the filter
    arg_3 = np.arange(-arg_2*arg_0,arg_2*arg_0+1)
    arg_4 = np.zeros(len(arg_3))
    arg_5 = arg_1
    arg_0 *= 1.0
    for arg_6 in range(len(arg_3)):
        if (1 - 4*(arg_5*arg_3[arg_6]/arg_0)**2) == 0:
            arg_4[arg_6] = np.pi/4*np.sinc(1/(2.*arg_5))
        else:
            arg_4[arg_6] = np.sinc(arg_3[arg_6]/arg_0)*np.cos(np.pi*arg_5*arg_3[arg_6]/arg_0)/(1 - 4*(arg_5*arg_3[arg_6]/arg_0)**2)
    return arg_4

A truncated raised cosine pulse used in digital communications.

    The pulse shaping factor :math:`0 < \\alpha < 1` is required as well as the
    truncation factor M which sets the pulse duration to be :math:`2*M*T_{symbol}`.

    Parameters
    ----------
    Ns : number of samples per symbol
    alpha : excess bandwidth factor on (0, 1), e.g., 0.35
    M : equals RC one-sided symbol truncation factor

    Returns
    -------
    b : ndarray containing the pulse shape

    See Also
    --------
    sqrt_rc_imp

    Notes
    -----
    The pulse shape b is typically used as the FIR filter coefficients
    when forming a pulse shaped digital communications waveform.

    Examples
    --------
    Ten samples per symbol and :math:`\\alpha = 0.35`.

    >>> import matplotlib.pyplot as plt
    >>> from sk_dsp_comm.digitalcom import rc_imp
    >>> from numpy import arange
    >>> b = rc_imp(10,0.35)
    >>> n = arange(-10*6,10*6+1)
    >>> plt.stem(n,b)
    >>> plt.show()

A truncated raised cosine pulse used in digital communications .


def Func ( arg_0 ) : if arg_0 [ 0 ] in ( 'int' , 'uint' , 'bytesM' , 'function' ) : return 32 elif arg_0 [ 0 ] in ( 'tuple' ) : arg_1 = 0 for arg_2 in arg_0 [ 1 ] : arg_1 += ABI . Func ( arg_2 ) return arg_1 elif arg_0 [ 0 ] in ( 'array' ) : arg_3 = arg_0 [ 1 ] arg_1 = 32 return arg_1 elif arg_0 [ 0 ] in ( 'bytes' , 'string' ) : arg_1 = 32 return arg_1 raise ValueError

def Func(arg_0):
        """ Calculate `static` type size """
        if arg_0[0] in ('int', 'uint', 'bytesM', 'function'):
            return 32
        elif arg_0[0] in ('tuple'):
            arg_1 = 0
            for arg_2 in arg_0[1]:
                arg_1 += ABI.Func(arg_2)
            return arg_1
        elif arg_0[0] in ('array'):
            arg_3 = arg_0[1]
            arg_1 = 32  # offset link
            return arg_1
        elif arg_0[0] in ('bytes', 'string'):
            arg_1 = 32  # offset link
            return arg_1
        raise ValueError


def Func ( arg_0 = [ ] , arg_1 = 'any' , arg_2 = False ) : if not arg_0 : return None if not arg_1 : arg_1 = 'und' arg_0 = [ dict_to_Func ( arg_3 ) for arg_3 in arg_0 ] arg_3 = False if arg_2 : arg_3 = find_best_Func_for_type ( arg_0 , arg_1 , 'sortLabel' ) if not arg_3 : arg_3 = find_best_Func_for_type ( arg_0 , arg_1 , 'prefLabel' ) if not arg_3 : arg_3 = find_best_Func_for_type ( arg_0 , arg_1 , 'altLabel' ) if arg_3 : return arg_3 else : return Func ( arg_0 , 'any' , arg_2 ) if arg_1 != 'any' else None

def Func(arg_0=[], arg_1='any', arg_2=False):
    '''
    Provide a Func for a list of Funcs.

    The items in the list of Funcs are assumed to be either instances of
    :class:`Label`, or dicts with at least the key `Func` in them. These will
    be passed to the :func:`dict_to_Func` function.

    This method tries to find a Func by looking if there's
    a pref Func for the specified language. If there's no pref Func,
    it looks for an alt Func. It disregards hidden Funcs.

    While matching languages, preference will be given to exact matches. But,
    if no exact match is present, an inexact match will be attempted. This might
    be because a Func in language `nl-BE` is being requested, but only `nl` or
    even `nl-NL` is present. Similarly, when requesting `nl`, a Func with
    language `nl-NL` or even `nl-Latn-NL` will also be considered,
    providing no Func is present that has an exact match with the
    requested language.

    If language 'any' was specified, all Funcs will be considered,
    regardless of language.

    To find a Func without a specified language, pass `None` as language.

    If a language or None was specified, and no Func could be found, this
    method will automatically try to find a Func in some other language.

    Finally, if no Func could be found, None is returned.

    :param string language: The preferred language to receive the Func in. This
        should be a valid IANA language tag.
    :param boolean sortLabel: Should sortLabels be considered or not? If True,
        sortLabels will be preferred over prefLabels. Bear in mind that these
        are still language dependent. So, it's possible to have a different
        sortLabel per language.
    :rtype: A :class:`Label` or `None` if no Func could be found.
    '''
    if not arg_0:
        return None
    if not arg_1:
        arg_1 = 'und'
    arg_0 = [dict_to_Func(arg_3) for arg_3 in arg_0]
    arg_3 = False
    if arg_2:
        arg_3 = find_best_Func_for_type(arg_0, arg_1, 'sortLabel')
    if not arg_3:
        arg_3 = find_best_Func_for_type(arg_0, arg_1, 'prefLabel')
    if not arg_3:
        arg_3 = find_best_Func_for_type(arg_0, arg_1, 'altLabel')
    if arg_3:
        return arg_3
    else:
        return Func(arg_0, 'any', arg_2) if arg_1 != 'any' else None

Provide a label for a list of labels.

    The items in the list of labels are assumed to be either instances of
    :class:`Label`, or dicts with at least the key `label` in them. These will
    be passed to the :func:`dict_to_label` function.

    This method tries to find a label by looking if there's
    a pref label for the specified language. If there's no pref label,
    it looks for an alt label. It disregards hidden labels.

    While matching languages, preference will be given to exact matches. But,
    if no exact match is present, an inexact match will be attempted. This might
    be because a label in language `nl-BE` is being requested, but only `nl` or
    even `nl-NL` is present. Similarly, when requesting `nl`, a label with
    language `nl-NL` or even `nl-Latn-NL` will also be considered,
    providing no label is present that has an exact match with the
    requested language.

    If language 'any' was specified, all labels will be considered,
    regardless of language.

    To find a label without a specified language, pass `None` as language.

    If a language or None was specified, and no label could be found, this
    method will automatically try to find a label in some other language.

    Finally, if no label could be found, None is returned.

    :param string language: The preferred language to receive the label in. This
        should be a valid IANA language tag.
    :param boolean sortLabel: Should sortLabels be considered or not? If True,
        sortLabels will be preferred over prefLabels. Bear in mind that these
        are still language dependent. So, it's possible to have a different
        sortLabel per language.
    :rtype: A :class:`Label` or `None` if no label could be found.


def Func ( arg_0 ) : for arg_1 in xrange ( arg_0 . iterations ) : arg_2 = X509 ( ) try : arg_2 . get_pubkey ( ) except Error : pass

def Func(arg_0):
        """
        Call the method repeatedly such that it will raise an exception.
        """
        for arg_1 in xrange(arg_0.iterations):
            arg_2 = X509()
            try:
                arg_2.get_pubkey()
            except Error:
                pass

Call the method repeatedly such that it will raise an exception .


def Func ( arg_0 , arg_1 ) : arg_0 . menus [ arg_1 . name ] = arg_1 arg_0 . peng . sendEvent ( "peng3d:window.menu.add" , { "peng" : arg_0 . peng , "window" : arg_0 , "menu" : arg_1 } )

def Func(arg_0,arg_1):
        """
        Adds a menu to the list of menus.
        """
        # If there is no menu selected currently, this menu will automatically be made active.
        # Add the line above to the docstring if fixed
        arg_0.menus[arg_1.name]=arg_1
        arg_0.peng.sendEvent("peng3d:window.menu.add",{"peng":arg_0.peng,"window":arg_0,"menu":arg_1})


def Func ( arg_0 , arg_1 : arg_2 , arg_3 : arg_4 = None ) : arg_5 = arg_0 . api . PLAYER + '/' + arg_1 + '/upcomingchests' return arg_0 . _get_model ( arg_5 , arg_3 = arg_3 )

def Func(arg_0, arg_1: arg_2, arg_3: arg_4=None):
        """Get information about a player's chest cycle

        Parameters
        ----------
        tag: str
            A valid tournament tag. Minimum length: 3
            Valid characters: 0289PYLQGRJCUV
        timeout: Optional[int] = None
            Custom timeout that overwrites Client.timeout
        """
        arg_5 = arg_0.api.PLAYER + '/' + arg_1 + '/upcomingchests'
        return arg_0._get_model(arg_5, arg_3=arg_3)

Get information about a player s chest cycle


def Func ( arg_0 ) : if not arg_0 . __volume_steps : arg_0 . __volume_steps = yield from arg_0 . handle_int ( arg_0 . API . get ( 'volume_steps' ) ) return arg_0 . __volume_steps

def Func(arg_0):
        """Read the maximum volume level of the device."""
        if not arg_0.__volume_steps:
            arg_0.__volume_steps = yield from arg_0.handle_int(
                arg_0.API.get('volume_steps'))

        return arg_0.__volume_steps

Read the maximum volume level of the device .


def
Func
(
arg_0
)
:
for
arg_1
in
[
'call'
,
'strform'
]
:
assert
hasattr
(
arg_0
,
arg_1
)
,
"Missing attribute <%s>"
%
arg_1
arg_0
.
num
=
arg_0
.
status
=
BackgroundJobBase
.
stat_created
arg_0
.
stat_code
=
BackgroundJobBase
.
stat_created_c
arg_0
.
finished
=
False
arg_0
.
result
=
'<BackgroundJob has not completed>'
try
:
arg_7
=
get_ipython
(
)
.
InteractiveTB
.
text
except
:
arg_7
=
AutoFormattedTB
(
mode
=
'Context'
,
color_scheme
=
'NoColor'
,
tb_offset
=
1
)
.
text
arg_0
.
_make_tb
=
lambda
:
arg_7
(
,
,
)
arg_0
.
_tb
=
threading
.
Thread
.
_Func__
(
arg_0
)

def Func(arg_0):
        """Common initialization for all BackgroundJob objects"""

        for arg_1 in ['call','strform']:
            assert hasattr(arg_0,arg_1), "Missing attribute <%s>" % arg_1

        # The num tag can be set by an external job manager
        arg_0.num = None

        arg_0.status    = BackgroundJobBase.stat_created
        arg_0.stat_code = BackgroundJobBase.stat_created_c
        arg_0.finished  = False
        arg_0.result    = '<BackgroundJob has not completed>'

        # reuse the ipython traceback handler if we can get to it, otherwise
        # make a new one
        try:
            arg_7 = get_ipython().InteractiveTB.text
        except:
            arg_7 = AutoFormattedTB(mode = 'Context',
                                      color_scheme='NoColor',
                                      tb_offset = 1).text
        # Note that the actual API for text() requires the three args to be
        # passed in, so we wrap it in a simple lambda.
        arg_0._make_tb = lambda : arg_7(None, None, None)

        # Hold a formatted traceback if one is generated.
        arg_0._tb = None

        threading.Thread._Func__(arg_0)


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
[
arg_4
for
arg_4
in
arg_1
.
childNodes
if
arg_4
.
nodeType
==
arg_4
.
ELEMENT_NODE
]
arg_3
=
random
.
choice
(
arg_2
)
if
_debug
:
sys
.
stderr
.
write
(
'%s available choices: %s\n'
%
(
len
(
arg_2
)
,
[
arg_4
.
toxml
(
)
for
arg_4
in
arg_2
]
)
)
sys
.
stderr
.
write
(
'Chosen: %s\n'
%
arg_3
.
toxml
(
)
)
return
arg_3

def Func(arg_0, arg_1):
        """choose a random child element of a node

        This is a utility method used by do_xref and do_choice.
        """
        arg_2 = [arg_4 for arg_4 in arg_1.childNodes
                   if arg_4.nodeType == arg_4.ELEMENT_NODE]
        arg_3 = random.choice(arg_2)
        if _debug:
            sys.stderr.write('%s available choices: %s\n' % \
                (len(arg_2), [arg_4.toxml() for arg_4 in arg_2]))
            sys.stderr.write('Chosen: %s\n' % arg_3.toxml())
        return arg_3

choose a random child element of a node This is a utility method used by do_xref and do_choice .


def Func ( arg_0 , arg_1 ) : arg_2 = [ "<collection>" ] for arg_3 in arg_1 : arg_4 = arg_0 ( arg_3 ) arg_2 . append ( arg_4 . convert ( ) ) arg_2 . append ( "</collection>" ) return "\n" . join ( arg_2 )

def Func(arg_0, arg_1):
        """Convert the list of bibrecs into one MARCXML.

        >>> from harvestingkit.bibrecord import BibRecordPackage
        >>> from harvestingkit.inspire_cds_package import Inspire2CDS
        >>> bibrecs = BibRecordPackage("inspire.xml")
        >>> bibrecs.parse()
        >>> xml = Inspire2CDS.Func(bibrecs.get_records())

        :param records: list of BibRecord dicts
        :type records: list

        :returns: MARCXML as string
        """
        arg_2 = ["<collection>"]
        for arg_3 in arg_1:
            arg_4 = arg_0(arg_3)
            arg_2.append(arg_4.convert())
        arg_2.append("</collection>")
        return "\n".join(arg_2)

Convert the list of bibrecs into one MARCXML.

        >>> from harvestingkit.bibrecord import BibRecordPackage
        >>> from harvestingkit.inspire_cds_package import Inspire2CDS
        >>> bibrecs = BibRecordPackage("inspire.xml")
        >>> bibrecs.parse()
        >>> xml = Inspire2CDS.convert_all(bibrecs.get_records())

        :param records: list of BibRecord dicts
        :type records: list

        :returns: MARCXML as string

Convert the list of bibrecs into one MARCXML .


return tf.linalg.LinearOperatorFullMatrix(
      fixed_entries + bottom_right_entry)

def Func ( arg_0 ) : arg_1 = tf . constant ( [ [ 1. , 1. ] , [ 0. , 0. ] ] , dtype = arg_0 . dtype ) arg_2 = tf . constant ( [ [ 0. , 0. ] , [ 0. , 1. ] ] , dtype = arg_0 . dtype ) arg_3 = ( arg_0 [ ... , tf . newaxis , tf . newaxis ] * arg_2 ) return tf . linalg . LinearOperatorFullMatrix ( arg_1 + arg_3 )

def Func(arg_0):
  """Build the transition matrix for a semi-local linear trend model."""
  # We want to write the following 2 x 2 matrix:
  #  [[1., 1., ],    # level(t+1) = level(t) + slope(t)
  #   [0., ar_coef], # slope(t+1) = ar_coef * slope(t)
  # but it's slightly tricky to properly incorporate the batch shape of
  # autoregressive_coef. E.g., if autoregressive_coef has shape [4,6], we want
  # to return shape [4, 6, 2, 2]. We do this by breaking the matrix into its
  # fixed entries, written explicitly, and then the autoregressive_coef part
  # which we add in after using a mask to broadcast to the correct matrix shape.

  arg_1 = tf.constant(
      [[1., 1.],
       [0., 0.]],
      dtype=arg_0.dtype)

  arg_2 = tf.constant([[0., 0.],
                                          [0., 1.]],
                                         dtype=arg_0.dtype)
  arg_3 = (arg_0[..., tf.newaxis, tf.newaxis] *
                        arg_2)
  return tf.linalg.LinearOperatorFullMatrix(
      arg_1 + arg_3)

Build the transition matrix for a semi - local linear trend model .


def Func ( arg_0 ) : Func = [ arg_0 . _layer_def ( style ) for style in arg_0 . styles ] return Func

def Func(arg_0):
        """ Renders the list of layers to add to the map.

            Returns:
                layers (list): list of layer entries suitable for use in mapbox-gl 'map.addLayer()' call
        """
        Func = [arg_0._layer_def(style) for style in arg_0.styles]
        return Func

Renders the list of layers to add to the map .


def Func(arg_0, arg_1):
        """
        Modify an existing message.

        http://dev.wheniwork.com/#create/update-message
        """
        arg_2 = "/2/messages/%s" % arg_1.message_id

        arg_3 = arg_0._put_resource(arg_2, arg_1.json_data())
        return arg_0.message_from_json(arg_3)


def Func(arg_0, arg_1):
        """Return a list of Data objects for given project.

        :param project: ObjectId or slug of Genesis project
        :type project: string
        :rtype: list of Data objects

        """
        arg_2 = arg_0.cache['project_objects']
        arg_3 = arg_0.cache['objects']
        arg_4 = str(arg_1)

        if not re.match('^[0-9a-fA-F]{24}$', arg_4):
            # project_id is a slug
            arg_5 = arg_0.api.case.get(url_slug=arg_4)['objects']
            if len(arg_5) != 1:
                raise ValueError(msg='Attribute project not a slug or ObjectId: {}'.format(arg_4))

            arg_4 = str(arg_5[0]['id'])

        if arg_4 not in arg_2:
            arg_2[arg_4] = []
            arg_6 = arg_0.api.data.get(case_ids__contains=arg_4)['objects']
            for arg_7 in arg_6:
                arg_8 = arg_7['id']
                if arg_8 in arg_3:
                    # Update existing object
                    arg_3[arg_8].update(arg_7)
                else:
                    # Insert new object
                    arg_3[arg_8] = GenData(arg_7, arg_0)

                arg_2[arg_4].append(arg_3[arg_8])

            # Hydrate reference fields
            for arg_7 in arg_2[arg_4]:
                while True:
                    arg_9 = {}
                    arg_10 = []
                    for arg_11, arg_12 in arg_7.annotation.items():
                        if arg_12['type'].startswith('data:'):
                            # Referenced data object found
                            # Copy annotation
                            if arg_12['value'] in arg_0.cache['objects']:
                                arg_13 = arg_0.cache['objects'][arg_12['value']].annotation
                                arg_9.update({arg_11 + '.' + arg_14: arg_15 for arg_14, arg_15 in arg_13.items()})

                            arg_10.append(arg_11)
                    if arg_9:
                        arg_7.annotation.update(arg_9)
                        for arg_11 in arg_10:
                            del arg_7.annotation[arg_11]
                    else:
                        break

        return arg_2[arg_4]

Return a list of Data objects for given project .


def Func ( arg_0 , arg_1 ) : arg_0 . ts = datetime . utcnow ( ) . replace ( microsecond = 0 ) . isoformat ( ) . replace ( ':' , '-' )

def Func(arg_0, arg_1):
        """
        Callback function when spider is open.
        """
        # Store timestamp to replace {time} in S3PIPELINE_URL
        arg_0.ts = datetime.utcnow().replace(microsecond=0).isoformat().replace(':', '-')


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
if
not
arg_1
:
return
,
"empty string isn't a filename"
if
arg_1
.
startswith
(
'<'
)
:
return
,
"not a real filename"
arg_0
.
_check_for_packages
(
)
arg_3
=
arg_2
.
f_globals
.
get
(
'__file__'
)
if
arg_3
:
arg_1
=
arg_0
.
_source_for_file
(
arg_3
)
if
arg_1
.
endswith
(
"$py.class"
)
:
arg_1
=
arg_1
[
:
9
]
+
".py"
arg_4
=
arg_0
.
file_locator
.
canonical_filename
(
arg_1
)
if
arg_0
.
source_match
:
if
not
arg_0
.
source_match
.
match
(
arg_4
)
:
return
,
"falls outside the --source trees"
elif
arg_0
.
include_match
:
if
not
arg_0
.
include_match
.
match
(
arg_4
)
:
return
,
"falls outside the --include trees"
else
:
if
arg_0
.
pylib_match
and
arg_0
.
pylib_match
.
match
(
arg_4
)
:
return
,
"is in the stdlib"
if
arg_0
.
cover_match
and
arg_0
.
cover_match
.
match
(
arg_4
)
:
return
,
"is part of coverage.py"
if
arg_0
.
omit_match
and
arg_0
.
omit_match
.
match
(
arg_4
)
:
return
,
"is inside an --omit pattern"
return
arg_4
,
"because we love you"

def Func(arg_0, arg_1, arg_2):
        """Decide whether to trace execution in `filename`, with a reason.

        This function is called from the trace function.  As each new file name
        is encountered, this function determines whether it is traced or not.

        Returns a pair of values:  the first indicates whether the file should
        be traced: it's a canonicalized filename if it should be traced, None
        if it should not.  The second value is a string, the resason for the
        decision.

        """
        if not arg_1:
            # Empty string is pretty useless
            return None, "empty string isn't a filename"

        if arg_1.startswith('<'):
            # Lots of non-file execution is represented with artificial
            # filenames like "<string>", "<doctest readme.txt[0]>", or
            # "<exec_function>".  Don't ever trace these executions, since we
            # can't do anything with the data later anyway.
            return None, "not a real filename"

        arg_0._check_for_packages()

        # Compiled Python files have two filenames: frame.f_code.co_filename is
        # the filename at the time the .pyc was compiled.  The second name is
        # __file__, which is where the .pyc was actually loaded from.  Since
        # .pyc files can be moved after compilation (for example, by being
        # installed), we look for __file__ in the frame and prefer it to the
        # co_filename value.
        arg_3 = arg_2.f_globals.get('__file__')
        if arg_3:
            arg_1 = arg_0._source_for_file(arg_3)

        # Jython reports the .class file to the tracer, use the source file.
        if arg_1.endswith("$py.class"):
            arg_1 = arg_1[:-9] + ".py"

        arg_4 = arg_0.file_locator.canonical_filename(arg_1)

        # If the user specified source or include, then that's authoritative
        # about the outer bound of what to measure and we don't have to apply
        # any canned exclusions. If they didn't, then we have to exclude the
        # stdlib and coverage.py directories.
        if arg_0.source_match:
            if not arg_0.source_match.match(arg_4):
                return None, "falls outside the --source trees"
        elif arg_0.include_match:
            if not arg_0.include_match.match(arg_4):
                return None, "falls outside the --include trees"
        else:
            # If we aren't supposed to trace installed code, then check if this
            # is near the Python standard library and skip it if so.
            if arg_0.pylib_match and arg_0.pylib_match.match(arg_4):
                return None, "is in the stdlib"

            # We exclude the coverage code itself, since a little of it will be
            # measured otherwise.
            if arg_0.cover_match and arg_0.cover_match.match(arg_4):
                return None, "is part of coverage.py"

        # Check the file against the omit pattern.
        if arg_0.omit_match and arg_0.omit_match.match(arg_4):
            return None, "is inside an --omit pattern"

        return arg_4, "because we love you"

Decide whether to trace execution in filename with a reason .


def Func ( arg_0 , ** arg_1 ) : arg_2 = arg_0 . _get_path ( 'Func' ) arg_1 . update ( { 'session_id' : arg_0 . session_id } ) arg_3 = { 'name' : arg_1 . pop ( 'name' , None ) , 'description' : arg_1 . pop ( 'description' , None ) , } if 'language' in arg_1 : arg_3 [ 'language' ] = arg_1 [ 'language' ] arg_4 = arg_0 . _POST ( arg_2 , arg_1 , arg_3 ) arg_0 . _set_attrs_to_values ( arg_4 ) return arg_4

def Func(arg_0, **arg_1):
        """
        Create a new list.

        A valid session id is required.

        Args:
            name: Name of the list.
            description: Description of the list.
            language: (optional) ISO 639-1 code.

        Returns:
            A dict respresentation of the JSON returned from the API.
        """
        arg_2 = arg_0._get_path('Func')
        arg_1.update({'session_id': arg_0.session_id})

        arg_3 = {
            'name': arg_1.pop('name', None),
            'description': arg_1.pop('description', None),
        }
        if 'language' in arg_1:
            arg_3['language'] = arg_1['language']

        arg_4 = arg_0._POST(arg_2, arg_1, arg_3)
        arg_0._set_attrs_to_values(arg_4)
        return arg_4


return [
            [words for sents in doc for words in sents] for doc in self.corpus
        ]

def Func ( arg_0 ) : return [ [ arg_2 for arg_1 in arg_3 for arg_2 in arg_1 ] for arg_3 in arg_0 . corpus ]

def Func(arg_0):
        r"""Return the docs in the corpus, with sentences flattened.

        Each list within the corpus represents all the words of that document.
        Thus the sentence level of lists has been flattened.

        Returns
        -------
        [[str]]
            The docs in the corpus as a list of list of strs

        Example
        -------
        >>> tqbf = 'The quick brown fox jumped over the lazy dog.\n'
        >>> tqbf += 'And then it slept.\n And the dog ran off.'
        >>> corp = Corpus(tqbf)
        >>> corp.Func()
        [['The', 'quick', 'brown', 'fox', 'jumped', 'over', 'the', 'lazy',
        'dog.', 'And', 'then', 'it', 'slept.', 'And', 'the', 'dog', 'ran',
        'off.']]
        >>> len(corp.Func())
        1

        """
        return [
            [arg_2 for arg_1 in arg_3 for arg_2 in arg_1] for arg_3 in arg_0.corpus
        ]

r"""Return the docs in the corpus, with sentences flattened.

        Each list within the corpus represents all the words of that document.
        Thus the sentence level of lists has been flattened.

        Returns
        -------
        [[str]]
            The docs in the corpus as a list of list of strs

        Example
        -------
        >>> tqbf = 'The quick brown fox jumped over the lazy dog.\n'
        >>> tqbf += 'And then it slept.\n And the dog ran off.'
        >>> corp = Corpus(tqbf)
        >>> corp.docs_of_words()
        [['The', 'quick', 'brown', 'fox', 'jumped', 'over', 'the', 'lazy',
        'dog.', 'And', 'then', 'it', 'slept.', 'And', 'the', 'dog', 'ran',
        'off.']]
        >>> len(corp.docs_of_words())
        1

r Return the docs in the corpus with sentences flattened .


def
Func
(
arg_0
,
arg_1
=
False
,
arg_2
=
1
)
:
if
hasattr
(
arg_0
[
0
]
,
'get_value'
)
:
arg_0
=
[
w
.
get_value
(
)
for
w
in
arg_0
]
arg_3
=
min
(
len
(
arg_0
)
,
9
)
arg_4
=
np
.
eye
(
arg_0
[
0
]
.
shape
[
0
]
)
for
arg_5
,
arg_6
in
enumerate
(
arg_0
[
:
1
]
)
:
arg_4
=
np
.
dot
(
arg_6
.
T
,
arg_4
)
plot_images
(
arg_4
,
100
+
10
*
arg_3
+
arg_5
+
1
,
arg_2
=
arg_2
,
title
=
'Layer {}'
.
format
(
arg_5
+
1
)
)
arg_6
=
arg_0
[
1
]
arg_7
=
arg_6
.
shape
[
1
]
/
arg_2
if
int
(
np
.
sqrt
(
arg_7
)
)
**
2
!=
arg_7
:
return
if
arg_1
:
arg_4
=
np
.
dot
(
arg_6
.
T
,
arg_4
)
plot_images
(
arg_4
,
100
+
10
*
arg_3
+
arg_3
,
arg_2
=
arg_2
,
title
=
'Layer {}'
.
format
(
arg_3
)
)
else
:
plot_images
(
arg_6
,
100
+
10
*
arg_3
+
arg_3
,
arg_2
=
arg_2
,
title
=
'Decoding weights'
)

def Func(arg_0, arg_1=False, arg_2=1):
    '''Create a plot of weights, visualized as "bottom-level" pixel arrays.'''
    if hasattr(arg_0[0], 'get_value'):
        arg_0 = [w.get_value() for w in arg_0]
    arg_3 = min(len(arg_0), 9)
    arg_4 = np.eye(arg_0[0].shape[0])
    for arg_5, arg_6 in enumerate(arg_0[:-1]):
        arg_4 = np.dot(arg_6.T, arg_4)
        plot_images(arg_4,
                    100 + 10 * arg_3 + arg_5 + 1,
                    arg_2=arg_2,
                    title='Layer {}'.format(arg_5+1))
    arg_6 = arg_0[-1]
    arg_7 = arg_6.shape[1] / arg_2
    if int(np.sqrt(arg_7)) ** 2 != arg_7:
        return
    if arg_1:
        arg_4 = np.dot(arg_6.T, arg_4)
        plot_images(arg_4,
                    100 + 10 * arg_3 + arg_3,
                    arg_2=arg_2,
                    title='Layer {}'.format(arg_3))
    else:
        plot_images(arg_6,
                    100 + 10 * arg_3 + arg_3,
                    arg_2=arg_2,
                    title='Decoding weights')

Create a plot of weights visualized as bottom - level pixel arrays .


def Func ( arg_0 ) : arg_1 = { } arg_2 = [ field for field in arg_0 if field [ 'custom' ] is True ] for arg_3 in arg_2 : arg_1 [ arg_3 [ 'id' ] ] = arg_3 return arg_1

def Func(arg_0):
    """Filter custom fields from a given set of fields.

    :param fields: set of fields

    :returns: an object with the filtered custom fields
    """

    arg_1 = {}

    arg_2 = [field for field in arg_0 if field['custom'] is True]

    for arg_3 in arg_2:
        arg_1[arg_3['id']] = arg_3

    return arg_1

Filter custom fields from a given set of fields .


def
Func
(
arg_0
)
:
for
arg_1
in
xrange
(
arg_0
.
iterations
*
10
)
:
load_privatekey
(
FILETYPE_PEM
,
arg_0
.
ENCRYPTED_PEM
,
lambda
*
args
:
"hello, secret"
)

def Func(arg_0):
        """
        Call the function with an encrypted PEM and a passphrase callback.
        """
        for arg_1 in xrange(arg_0.iterations * 10):
            load_privatekey(
                FILETYPE_PEM, arg_0.ENCRYPTED_PEM, lambda *args: "hello, secret")

Call the function with an encrypted PEM and a passphrase callback .


return mapping_util.sparse_to_unmasked_sparse_from_mask_and_pixel_centres(
            total_sparse_pixels=self.total_sparse_pixels, mask=self.regular_grid.mask,
            unmasked_sparse_grid_pixel_centres=self.unmasked_sparse_grid_pixel_centres).astype('int')

def Func ( arg_0 ) : return mapping_util . Func_from_mask_and_pixel_centres ( total_sparse_pixels = arg_0 . total_sparse_pixels , mask = arg_0 . regular_grid . mask , unmasked_sparse_grid_pixel_centres = arg_0 . unmasked_sparse_grid_pixel_centres ) . astype ( 'int' )

def Func(arg_0):
        """The 1D index mappings between the masked sparse-grid and unmasked sparse grid."""
        return mapping_util.Func_from_mask_and_pixel_centres(
            total_sparse_pixels=arg_0.total_sparse_pixels, mask=arg_0.regular_grid.mask,
            unmasked_sparse_grid_pixel_centres=arg_0.unmasked_sparse_grid_pixel_centres).astype('int')

The 1D index mappings between the masked sparse - grid and unmasked sparse grid .


def Func ( arg_0 ) : for arg_1 in arg_0 . _entity . ports : arg_1 . connectInternSig ( ) for arg_2 in chain ( arg_0 . _interfaces , arg_0 . _private_interfaces ) : arg_2 . _clean ( )

def Func(arg_0):
        """Disconnect internal signals so unit can be reused by parent unit"""
        for arg_1 in arg_0._entity.ports:
            arg_1.connectInternSig()
        for arg_2 in chain(arg_0._interfaces, arg_0._private_interfaces):
            arg_2._clean()


return self.spec_class(self.spec, self.get_task_spec_name(),
                               lane=self.get_lane(),
                               description=self.node.get('name', None))

def Func ( arg_0 ) : return arg_0 . spec_class ( arg_0 . spec , arg_0 . get_task_spec_name ( ) , lane = arg_0 . get_lane ( ) , description = arg_0 . node . get ( 'name' , None ) )

def Func(arg_0):
        """
        Create an instance of the task appropriately. A subclass can override
        this method to get extra information from the node.
        """
        return arg_0.spec_class(arg_0.spec, arg_0.get_task_spec_name(),
                               lane=arg_0.get_lane(),
                               description=arg_0.node.get('name', None))

Create an instance of the task appropriately . A subclass can override this method to get extra information from the node .


def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
)
:
arg_4
=
arg_0
.
_getPid
(
)
if
arg_2
==
(
0
,
0
)
:
arg_5
=
AppKit
.
NSEvent
.
mouseLocation
(
)
arg_2
=
(
arg_5
.
x
,
Quartz
.
CGDisplayPixelsHigh
(
0
)
arg_5
.
y
)
arg_4
=
arg_0
.
_getPid
(
)
arg_6
=
Quartz
.
CGEventCreateMouseEvent
(
,
Quartz
.
kCGEventLeftMouseDown
,
arg_2
,
Quartz
.
kCGMouseButtonLeft
)
Quartz
.
CGEventPost
(
Quartz
.
CoreGraphics
.
kCGHIDEventTap
,
arg_6
)
time
.
sleep
(
5
)
arg_3
=
round
(
1
/
float
(
arg_3
)
,
2
)
arg_7
=
arg_1
[
0
]
arg_2
[
0
]
arg_8
=
arg_1
[
1
]
arg_2
[
1
]
if
arg_8
==
0
:
raise
ValueError
(
'Not support horizontal moving'
)
else
:
arg_9
=
abs
(
arg_8
/
arg_7
)
if
arg_7
!=
0
:
for
arg_10
in
range
(
int
(
abs
(
arg_7
)
)
)
:
if
arg_7
>
0
and
arg_8
>
0
:
arg_11
=
(
arg_2
[
0
]
+
arg_10
,
arg_2
[
1
]
+
arg_10
*
arg_9
)
elif
arg_7
>
0
and
arg_8
<
0
:
arg_11
=
(
arg_2
[
0
]
+
arg_10
,
arg_2
[
1
]
arg_10
*
arg_9
)
elif
arg_7
<
0
and
arg_8
<
0
:
arg_11
=
(
arg_2
[
0
]
arg_10
,
arg_2
[
1
]
arg_10
*
arg_9
)
elif
arg_7
<
0
and
arg_8
>
0
:
arg_11
=
(
arg_2
[
0
]
arg_10
,
arg_2
[
1
]
+
arg_10
*
arg_9
)
arg_12
=
Quartz
.
CGEventCreateMouseEvent
(
,
Quartz
.
kCGEventLeftMouseDragged
,
arg_11
,
Quartz
.
kCGMouseButtonLeft
)
Quartz
.
CGEventPost
(
Quartz
.
CoreGraphics
.
kCGHIDEventTap
,
arg_12
)
time
.
sleep
(
arg_3
)
else
:
raise
ValueError
(
'Not support vertical moving'
)
arg_13
=
Quartz
.
CGEventCreateMouseEvent
(
,
Quartz
.
kCGEventLeftMouseUp
,
arg_1
,
Quartz
.
kCGMouseButtonLeft
)
time
.
sleep
(
5
)
Quartz
.
CGEventPost
(
Quartz
.
CoreGraphics
.
kCGHIDEventTap
,
arg_13
)

def Func(arg_0, arg_1, arg_2, arg_3):
        """Private method to handle generic mouse left button dragging and
        dropping.

        Parameters: stopCoord(x,y) drop point
        Optional: strCoord (x, y) drag point, default (0,0) get current
                  mouse position
                  speed (int) 1 to unlimit, simulate mouse moving
                  action from some special requirement
        Returns: None
        """
        # To direct output to the correct application need the PSN:
        arg_4 = arg_0._getPid()
        # Get current position as start point if strCoord not given
        if arg_2 == (0, 0):
            arg_5 = AppKit.NSEvent.mouseLocation()
            arg_2 = (arg_5.x, Quartz.CGDisplayPixelsHigh(0) - arg_5.y)

        # To direct output to the correct application need the PSN:
        arg_4 = arg_0._getPid()

        # Press left button down
        arg_6 = Quartz.CGEventCreateMouseEvent(
            None,
            Quartz.kCGEventLeftMouseDown,
            arg_2,
            Quartz.kCGMouseButtonLeft
        )
        # Queue the events
        Quartz.CGEventPost(Quartz.CoreGraphics.kCGHIDEventTap, arg_6)
        # Wait for reponse of system, a fuzzy icon appears
        time.sleep(5)
        # Simulate mouse moving speed, k is slope
        arg_3 = round(1 / float(arg_3), 2)
        arg_7 = arg_1[0] - arg_2[0]
        arg_8 = arg_1[1] - arg_2[1]
        if arg_8 == 0:
            raise ValueError('Not support horizontal moving')
        else:
            arg_9 = abs(arg_8 / arg_7)

        if arg_7 != 0:
            for arg_10 in range(int(abs(arg_7))):
                if arg_7 > 0 and arg_8 > 0:
                    arg_11 = (arg_2[0] + arg_10, arg_2[1] + arg_10 * arg_9)
                elif arg_7 > 0 and arg_8 < 0:
                    arg_11 = (arg_2[0] + arg_10, arg_2[1] - arg_10 * arg_9)
                elif arg_7 < 0 and arg_8 < 0:
                    arg_11 = (arg_2[0] - arg_10, arg_2[1] - arg_10 * arg_9)
                elif arg_7 < 0 and arg_8 > 0:
                    arg_11 = (arg_2[0] - arg_10, arg_2[1] + arg_10 * arg_9)
                # Drag with left button
                arg_12 = Quartz.CGEventCreateMouseEvent(
                    None,
                    Quartz.kCGEventLeftMouseDragged,
                    arg_11,
                    Quartz.kCGMouseButtonLeft
                )
                Quartz.CGEventPost(Quartz.CoreGraphics.kCGHIDEventTap,
                                   arg_12)
                # Wait for reponse of system
                time.sleep(arg_3)
        else:
            raise ValueError('Not support vertical moving')
        arg_13 = Quartz.CGEventCreateMouseEvent(
            None,
            Quartz.kCGEventLeftMouseUp,
            arg_1,
            Quartz.kCGMouseButtonLeft
        )
        # Wait for reponse of system, a plus icon appears
        time.sleep(5)
        # Up left button up
        Quartz.CGEventPost(Quartz.CoreGraphics.kCGHIDEventTap, arg_13)

Private method to handle generic mouse left button dragging and dropping .


def Func ( Func ) : none ( ) arg_1 . api_key_prefix [ "Authorization" ] = "api-key" arg_1 . api_key [ "Authorization" ] = "key=" + b64encode ( Func . encode ( ) ) . decode ( )

def Func(Func):
    """Authenticate via an api key."""
    none()
    arg_1.api_key_prefix["Authorization"] = "api-key"
    arg_1.api_key["Authorization"] = "key=" + b64encode(Func.encode()).decode()


def Func ( arg_0 ) : if hasattr ( arg_0 , 'fobj' ) and arg_0 . fobj is not None : arg_0 . fobj . close ( ) if hasattr ( arg_0 . src , "read" ) : arg_0 . fobj = arg_0 . src else : arg_0 . fobj = open ( arg_0 . fname )

def Func(arg_0):
        """Load file object."""
        # read data and parse into blocks
        if hasattr(arg_0, 'fobj') and arg_0.fobj is not None:
           arg_0.fobj.close()
        if hasattr(arg_0.src, "read"):
             # It seems to be a file or a file-like object
            arg_0.fobj = arg_0.src
        else:
             # Assume it's a string or something that can be converted to one
            arg_0.fobj = open(arg_0.fname)


def Func(arg_0, arg_1=None, arg_2=None):
        """ Creates and returns a representation of the graph using the
            Graphviz layout program given by 'prog', according to the given
            format.

            Writes the graph to a temporary dot file and processes it with
            the program given by 'prog' (which defaults to 'dot'), reading
            the output and returning it as a string if the operation is
            successful. On failure None is returned.
        """
        arg_1 = arg_0.program if arg_1 is None else arg_1
        arg_2 = arg_0.format if arg_2 is None else arg_2

        # Make a temporary file ...
        arg_3, arg_4 = tempfile.mkstemp()
        os.close( arg_3 )
        # ... and save the graph to it.
        arg_5 = file( arg_4, "w+b" )
        arg_0.save_dot( arg_5 )
        arg_5.close()

        # Get the temporary file directory name.
        arg_6 = os.path.dirname( arg_4 )

        # TODO: Shape image files (See PyDot). Important.

        # Process the file using the layout program, specifying the format.
        arg_7 = subprocess.Popen(
            ( arg_0.programs[ arg_1 ], '-T'+arg_2, arg_4 ),
            cwd=arg_6,
            arg_8=subprocess.PIPE, arg_9=subprocess.PIPE)

        arg_8 = arg_7.stderr
        arg_9 = arg_7.stdout

        # Make sense of the standard output form the process.
        arg_10 = list()
        while True:
            arg_11 = arg_9.read()
            if not arg_11:
                break
            arg_10.append(arg_11)
        arg_9.close()

        if arg_10:
            arg_10 = ''.join(arg_10)

        # Similarly so for any standard error.
        if not arg_8.closed:
            arg_12 = list()
            while True:
                arg_11 = arg_8.read()
                if not arg_11:
                    break
                arg_12.append(arg_11)
            arg_8.close()

            if arg_12:
                arg_12 = ''.join(arg_12)

        #pid, status = os.waitpid(p.pid, 0)
        arg_13 = arg_7.wait()

        if arg_13 != 0 :
            logger.error("Program terminated with status: %d. stderr " \
                "follows: %s" % ( arg_13, arg_12 ) )
        elif arg_12:
            logger.error( "%s", arg_12 )

        # TODO: Remove shape image files from the temporary directory.

        # Remove the temporary file.
        os.unlink(arg_4)

        return arg_10

Creates and returns a representation of the graph using the Graphviz layout program given by prog according to the given format .


return trolly.organisation.Organisation(
            trello_client=self,
            organisation_id=organisation_json['id'],
            name=organisation_json['name'],
            data=organisation_json,
        )

def Func ( arg_0 , arg_1 ) : return trolly . organisation . Organisation ( trello_client = arg_0 , organisation_id = arg_1 [ 'id' ] , name = arg_1 [ 'name' ] , data = arg_1 , )

def Func(arg_0, arg_1):
        '''
        Create an Organisation object from a JSON object

        Returns:
            Organisation: The organisation from the given `organisation_json`.
        '''
        return trolly.organisation.Organisation(
            trello_client=arg_0,
            organisation_id=arg_1['id'],
            name=arg_1['name'],
            data=arg_1,
        )


(path_or_file, validate=True, strict=True, fmt='auto')

def Func ( arg_0 , arg_1 = True , arg_2 = True , arg_3 = 'auto' ) : with _open ( arg_0 , mode = 'r' , arg_3 = arg_3 ) as fdesc : arg_4 = JAMS ( ** json . Func ( fdesc ) ) if arg_1 : arg_4 . validate ( arg_2 = arg_2 ) return arg_4

def Func(arg_0, arg_1=True, arg_2=True, arg_3='auto'):
    r"""Load a JAMS Annotation from a file.

    Parameters
    ----------
    path_or_file : str or file-like
        Path to the JAMS file to Func
        OR
        An open file handle to Func from.

    validate : bool
        Attempt to validate the JAMS object

    strict : bool
        if `validate == True`, enforce strict schema validation

    fmt : str ['auto', 'jams', 'jamz']
        The encoding format of the input

        If `auto`, encoding is inferred from the file name.

        If the input is an open file handle, `jams` encoding
        is used.

    Returns
    -------
    jam : JAMS
        The Funced JAMS object

    Raises
    ------
    SchemaError
        if `validate == True`, `strict==True`, and validation fails

    See also
    --------
    JAMS.validate
    JAMS.save

    Examples
    --------
    >>> # Load a jams object from a file name
    >>> J = jams.Func('data.jams')
    >>> # Or from an open file descriptor
    >>> with open('data.jams', 'r') as fdesc:
    ...     J = jams.Func(fdesc)
    >>> # Non-strict validation
    >>> J = jams.Func('data.jams', strict=False)
    >>> # No validation at all
    >>> J = jams.Func('data.jams', validate=False)
    """

    with _open(arg_0, mode='r', arg_3=arg_3) as fdesc:
        arg_4 = JAMS(**json.Func(fdesc))

    if arg_1:
        arg_4.validate(arg_2=arg_2)

    return arg_4

r"""Load a JAMS Annotation from a file.

    Parameters
    ----------
    path_or_file : str or file-like
        Path to the JAMS file to load
        OR
        An open file handle to load from.

    validate : bool
        Attempt to validate the JAMS object

    strict : bool
        if `validate == True`, enforce strict schema validation

    fmt : str ['auto', 'jams', 'jamz']
        The encoding format of the input

        If `auto`, encoding is inferred from the file name.

        If the input is an open file handle, `jams` encoding
        is used.

    Returns
    -------
    jam : JAMS
        The loaded JAMS object

    Raises
    ------
    SchemaError
        if `validate == True`, `strict==True`, and validation fails

    See also
    --------
    JAMS.validate
    JAMS.save

    Examples
    --------
    >>> # Load a jams object from a file name
    >>> J = jams.load('data.jams')
    >>> # Or from an open file descriptor
    >>> with open('data.jams', 'r') as fdesc:
    ...     J = jams.load(fdesc)
    >>> # Non-strict validation
    >>> J = jams.load('data.jams', strict=False)
    >>> # No validation at all
    >>> J = jams.load('data.jams', validate=False)


def Func(arg_0=0.1, arg_1=False):
    """Return a float representing the current system-wide CPU
    utilization as a percentage.

    When interval is > 0.0 compares system CPU times elapsed before
    and after the interval (blocking).

    When interval is 0.0 or None compares system CPU times elapsed
    since last call or module import, returning immediately.
    In this case is recommended for accuracy that this function be
    called with at least 0.1 seconds between calls.

    When percpu is True returns a list of floats representing the
    utilization as a percentage for each CPU.
    First element of the list refers to first CPU, second element
    to second CPU and so on.
    The order of the list is consistent across calls.
    """
    global arg_12
    global arg_15
    arg_2 = arg_0 is not None and arg_0 > 0.0

    def calculate(arg_3, arg_4):
        arg_5 = sum(arg_3)
        arg_6 = arg_5 - arg_3.idle

        arg_7 = sum(arg_4)
        arg_8 = arg_7 - arg_4.idle

        # this usually indicates a float precision issue
        if arg_8 <= arg_6:
            return 0.0

        arg_9 = arg_8 - arg_6
        arg_10 = arg_7 - arg_5
        arg_11 = (arg_9 / arg_10) * 100
        return round(arg_11, 1)

    # system-wide usage
    if not arg_1:
        if arg_2:
            arg_3 = cpu_times()
            time.sleep(arg_0)
        else:
            arg_3 = arg_12
        arg_12 = cpu_times()
        return calculate(arg_3, arg_12)
    # per-cpu usage
    else:
        arg_13 = []
        if arg_2:
            arg_14 = cpu_times(arg_1=True)
            time.sleep(arg_0)
        else:
            arg_14 = arg_15
        arg_15 = cpu_times(arg_1=True)
        for arg_3, arg_4 in zip(arg_14, arg_15):
            arg_13.append(calculate(arg_3, arg_4))
        return arg_13

Return a float representing the current system - wide CPU utilization as a percentage .


def
Func
(
arg_0
=
3
)
:
if
env
(
)
:
cij
.
err
(
"cij.nvme.exists: Invalid NVMe ENV."
)
return
1
arg_1
=
cij
.
env_to_dict
(
PREFIX
,
EXPORTED
+
REQUIRED
)
arg_2
=
[
"nvme"
,
"format"
,
arg_1
[
"DEV_PATH"
]
,
"-l"
,
str
(
arg_0
)
]
arg_3
,
arg_4
,
arg_4
=
cij
.
ssh
.
command
(
arg_2
,
shell
=
True
)
return
arg_3

def Func(arg_0=3):
    """Do format for NVMe device"""

    if env():
        cij.err("cij.nvme.exists: Invalid NVMe ENV.")
        return 1

    arg_1 = cij.env_to_dict(PREFIX, EXPORTED + REQUIRED)

    arg_2 = ["nvme", "format", arg_1["DEV_PATH"], "-l", str(arg_0)]
    arg_3, arg_4, arg_4 = cij.ssh.command(arg_2, shell=True)

    return arg_3


return self._call_post_with_user_override(user_id, url, payload)

def Func(arg_0, arg_1, arg_2):
        """
        Send a completion status payload to the SuccessFactors OCN Completion Status endpoint

        Args:
            user_id (str): The sap user id that the completion status is being sent for.
            payload (str): JSON encoded object (serialized from SapSuccessFactorsLearnerDataTransmissionAudit)
                containing completion status fields per SuccessFactors documentation.

        Returns:
            The body of the response from SAP SuccessFactors, if successful
        Raises:
            HTTPError: if we received a failure response code from SAP SuccessFactors
        """
        arg_3 = arg_0.enterprise_configuration.sapsf_base_url + arg_0.global_sap_config.completion_status_api_path
        return arg_0._call_post_with_user_override(arg_1, arg_3, arg_2)


def Func ( arg_0 , * arg_1 ) : arg_2 = urijoin ( arg_0 . RBUG , arg_1 [ 0 ] , arg_0 . RHISTORY ) arg_3 = { arg_0 . PIDS : arg_1 } arg_4 = arg_0 . call ( arg_2 , arg_3 ) return arg_4

def Func(arg_0, *arg_1):
        """Get the Func of the given bugs.

        :param bug_ids: list of bug identifiers
        """
        arg_2 = urijoin(arg_0.RBUG, arg_1[0], arg_0.RHISTORY)

        arg_3 = {
            arg_0.PIDS: arg_1
        }

        arg_4 = arg_0.call(arg_2, arg_3)

        return arg_4

Get the history of the given bugs.

        :param bug_ids: list of bug identifiers


def
Func
(
arg_0
,
arg_1
)
:
try
:
arg_0
[
'data'
]
=
arg_1
.
get_data
(
)
arg_0
[
'affine'
]
=
arg_1
.
get_affine
(
)
if
hasattr
(
arg_0
,
'get_extra'
)
:
arg_0
[
'extra'
]
=
arg_1
.
get_extra
(
)
arg_2
=
arg_1
.
get_header
(
)
for
arg_3
in
list
(
arg_2
.
keys
(
)
)
:
arg_0
[
'data'
]
.
attrs
[
arg_3
]
=
arg_2
[
arg_3
]
except
ValueError
as
ve
:
raise
Exception
(
'Error creating group '
+
arg_0
.
name
)
from
ve

def Func(arg_0, arg_1):
    """Saves a Nifti1Image into an HDF5 group.

    Parameters
    ----------
    h5group: h5py Group
        Output HDF5 file path

    spatial_img: nibabel SpatialImage
        Image to be saved

    h5path: str
        HDF5 group path where the image data will be saved.
        Datasets will be created inside the given group path:
        'data', 'extra', 'affine', the header information will
        be set as attributes of the 'data' dataset.

    """
    try:
        arg_0['data']   = arg_1.get_data()
        arg_0['affine'] = arg_1.get_affine()

        if hasattr(arg_0, 'get_extra'):
            arg_0['extra'] = arg_1.get_extra()

        arg_2 = arg_1.get_header()
        for arg_3 in list(arg_2.keys()):
            arg_0['data'].attrs[arg_3] = arg_2[arg_3]

    except ValueError as ve:
        raise Exception('Error creating group ' + arg_0.name) from ve

Saves a Nifti1Image into an HDF5 group .


def Func(arg_0, arg_1):
        """Checks if data values are  valid.

        Checks if the data values are supported by the parameter and if the values are of the same
        type as the default value.

        """
        arg_2 = []

        for arg_3 in arg_1:

            if not arg_0.f_supports(arg_3):
                raise TypeError('%s is of not supported type %s.' % (repr(arg_3), str(type(arg_3))))

            if not arg_0._values_of_same_type(arg_3, arg_0._default):
                raise TypeError(
                    'Data of `%s` is not of the same type as the original entry value, '
                    'new type is %s vs old type %s.' %
                    (arg_0.v_full_name, str(type(arg_3)), str(type(arg_0._default))))

            arg_2.append(arg_3)

        if len(arg_2) == 0:
            raise ValueError('Cannot explore an empty list!')

        return arg_2


def Func ( arg_0 ) : arg_1 = { } arg_2 = [ ] for arg_3 in arg_0 : arg_4 = read_hatpi_textlc ( arg_3 ) for arg_5 in arg_4 [ 'columns' ] : if arg_5 . startswith ( 'itf' ) : arg_1 [ arg_5 ] = arg_4 arg_6 = arg_4 [ 'frk' ] . tolist ( ) arg_2 . extend ( arg_6 ) arg_2 = sorted ( list ( set ( arg_2 ) ) )

def Func(arg_0):
    '''This merges all TFA text LCs with separate apertures for a single object.

    The framekey column will be used as the join column across all light curves
    in lclist. Missing values will be filled in with nans. This function assumes
    all light curves are in the format specified in COLDEFS above and readable
    by read_hatpi_textlc above (i.e. have a single column for TFA mags for a
    specific aperture at the end).

    '''

    arg_1 = {}
    arg_2 = []

    for arg_3 in arg_0:

        arg_4 = read_hatpi_textlc(arg_3)

        # figure what aperture this is and put it into the lcdict. if two LCs
        # with the same aperture (i.e. TF1 and TF1) are provided, the later one
        # in the lclist will overwrite the previous one,
        for arg_5 in arg_4['columns']:
            if arg_5.startswith('itf'):
                arg_1[arg_5] = arg_4
        arg_6 = arg_4['frk'].tolist()
        arg_2.extend(arg_6)

    # uniqify the framekeys
    arg_2 = sorted(list(set(arg_2)))

This merges all TFA text LCs with separate apertures for a single object .


def Func ( arg_0 ) : arg_1 = False for arg_2 , arg_3 in iteritems ( Func_map ) : if isinstance ( arg_2 , string_types ) : arg_1 = True break elif istype ( arg_0 , arg_2 ) : return arg_3 ( arg_0 ) if arg_1 : _import_mapping ( Func_map , _original_Func_map ) return Func ( arg_0 ) return arg_0

def Func(arg_0):
    """Prepare an object for pickling."""
    arg_1 = False

    for arg_2, arg_3 in iteritems(Func_map):
        if isinstance(arg_2, string_types):
            arg_1 = True
            break
        elif istype(arg_0, arg_2):
            return arg_3(arg_0)

    if arg_1:
        # perform Func_map imports, then try again
        # this will usually only happen once
        _import_mapping(Func_map, _original_Func_map)
        return Func(arg_0)

    return arg_0


def Func(arg_0, arg_1, arg_2, arg_3=False):
    """
    Convert RGB to ANSI 16 color
    """
    arg_4 = round(arg_2 / 255.0) << 2
    arg_5 = round(arg_1 / 255.0) << 1
    arg_6 = round(arg_0 / 255.0)
    arg_7 = (90 if arg_3 else 30) + (arg_4 | arg_5 | arg_6)

    return arg_7


def Func(arg_0, **arg_1):
        """Creates a new instance of a rule in relation to the config file.

        This updates the dictionary of the class with the added details, which
        allows for flexibility in the configuation file.

        Only called when parsing the default configuation file.
        """
        arg_2 = arg_0()

        for arg_3, arg_4 in arg_1.iteritems():
            arg_2.__dict__[arg_3] = arg_4
        return arg_2

Creates a new instance of a rule in relation to the config file .


def Func(arg_0):
        """
        Creates the tf.train.Scaffold object and assigns it to self.scaffold.
        Other fields of the Scaffold are generated automatically.
        """
        if arg_0.execution_type == "single":
            arg_1 = arg_0.get_variables(include_submodules=True, include_nontrainable=True)
            # global_variables += [self.global_episode, self.global_timestep]
            arg_2 = tf.variables_initializer(var_list=arg_1)
            if arg_0.summarizer_init_op is not None:
                arg_2 = tf.group(arg_2, arg_0.summarizer_init_op)
            if arg_0.graph_summary is None:
                arg_3 = tf.report_uninitialized_variables(var_list=arg_1)
                arg_4 = None
                arg_5 = None
            else:
                arg_3 = None
                arg_4 = tf.report_uninitialized_variables(var_list=arg_1)
                arg_5 = arg_0.graph_summary

        else:
            # Global and local variable initializers.
            arg_1 = arg_0.global_model.get_variables(include_submodules=True, include_nontrainable=True)
            # global_variables += [self.global_episode, self.global_timestep]
            arg_6 = arg_0.get_variables(include_submodules=True, include_nontrainable=True)
            arg_2 = tf.variables_initializer(var_list=arg_1)
            if arg_0.summarizer_init_op is not None:
                arg_2 = tf.group(arg_2, arg_0.summarizer_init_op)
            arg_3 = tf.report_uninitialized_variables(var_list=(arg_1 + arg_6))
            arg_4 = tf.report_uninitialized_variables(var_list=arg_1)
            if arg_0.graph_summary is None:
                arg_5 = tf.group(
                    tf.variables_initializer(var_list=arg_6),
                    # Synchronize values of trainable variables.
                    *(tf.assign(ref=local_var, value=global_var) for local_var, global_var in zip(
                        arg_0.get_variables(include_submodules=True),
                        arg_0.global_model.get_variables(include_submodules=True)
                    ))
                )
            else:
                arg_5 = tf.group(
                    tf.variables_initializer(var_list=arg_6),
                    arg_0.graph_summary,
                    # Synchronize values of trainable variables.
                    *(tf.assign(ref=local_var, value=global_var) for local_var, global_var in zip(
                        arg_0.get_variables(include_submodules=True),
                        arg_0.global_model.get_variables(include_submodules=True)
                    ))
                )

        def init_fn(arg_7, arg_8):
            if arg_0.saver_spec is not None and arg_0.saver_spec.get('load', True):
                arg_9 = arg_0.saver_spec['directory']
                arg_10 = arg_0.saver_spec.get('file')
                if arg_10 is None:
                    arg_10 = tf.train.latest_checkpoint(
                        checkpoint_dir=arg_9,
                        latest_filename=None  # Corresponds to argument of saver.save() in Model.save().
                    )
                elif not os.path.isfile(arg_10):
                    arg_10 = os.path.join(arg_9, arg_10)
                if arg_10 is not None:
                    try:
                        arg_7.saver.restore(sess=arg_8, save_path=arg_10)
                        arg_8.run(fetches=arg_0.list_buffer_index_reset_op)
                    except tf.errors.NotFoundError:
                        raise TensorForceError("Error: Existing checkpoint could not be loaded! Set \"load\" to false in saver_spec.")

        # TensorFlow scaffold object
        # TODO explain what it does.
        arg_0.scaffold = tf.train.Scaffold(
            arg_2=arg_2,
            init_feed_dict=None,
            init_fn=init_fn,
            arg_3=arg_3,
            arg_4=arg_4,
            arg_5=arg_5,
            summary_op=None,
            saver=arg_0.saver,
            copy_from_scaffold=None
        )

Creates the tf . train . Scaffold object and assigns it to self . scaffold . Other fields of the Scaffold are generated automatically .


return expanduser('~/.config/%s/%s' % (self.group_name, self.app_name))

def
Func
(
arg_0
)
:
arg_1
=
getenv
(
'XDG_CONFIG_HOME'
,
''
)
if
arg_1
:
arg_0
.
_log
.
debug
(
'XDG_CONFIG_HOME is set to %r'
,
arg_1
)
return
expanduser
(
join
(
arg_1
,
arg_0
.
group_name
,
arg_0
.
app_name
)
)
return
expanduser
(
'~/.config/%s/%s'
%
(
arg_0
.
group_name
,
arg_0
.
app_name
)
)

def Func(arg_0):
        # type: () -> str
        """
        Returns the value specified in the XDG_CONFIG_HOME environment variable
        or the appropriate default.
        """
        arg_1 = getenv('XDG_CONFIG_HOME', '')
        if arg_1:
            arg_0._log.debug('XDG_CONFIG_HOME is set to %r', arg_1)
            return expanduser(join(arg_1, arg_0.group_name, arg_0.app_name))
        return expanduser('~/.config/%s/%s' % (arg_0.group_name, arg_0.app_name))

Returns the value specified in the XDG_CONFIG_HOME environment variable or the appropriate default .


(returns, positions, transactions,
                              ax=None, **kwargs)

def Func(arg_0, arg_1, arg_2,
                              arg_3=None, **arg_4):
    """
    Plots curve relating per-dollar slippage to average annual returns.

    Parameters
    ----------
    returns : pd.Series
        Timeseries of portfolio returns to be adjusted for various
        degrees of slippage.
    positions : pd.DataFrame
        Daily net position values.
         - See full explanation in tears.create_full_tear_sheet.
    transactions : pd.DataFrame
        Prices and amounts of executed trades. One row per trade.
         - See full explanation in tears.create_full_tear_sheet.
    ax : matplotlib.Axes, optional
        Axes upon which to plot.
    **kwargs, optional
        Passed to seaborn plotting function.

    Returns
    -------
    ax : matplotlib.Axes
        The axes that were plotted on.
    """

    if arg_3 is None:
        arg_3 = plt.gca()

    arg_5 = pd.Series()
    for arg_6 in range(1, 100):
        arg_7 = txn.adjust_returns_for_slippage(arg_0, arg_1,
                                                      arg_2, arg_6)
        arg_8 = ep.annual_return(arg_7)
        arg_5.loc[arg_6] = arg_8

    arg_5.plot(alpha=1.0, lw=2, arg_3=arg_3)

    arg_3.set_title('Average annual returns given additional per-dollar slippage')
    arg_3.set_xticks(np.arange(0, 100, 10))
    arg_3.set_ylabel('Average annual return')
    arg_3.set_xlabel('Per-dollar slippage (bps)')

    return arg_3

Plots curve relating per - dollar slippage to average annual returns .


def Func ( arg_0 , arg_1 ) : global g_git_hash_branch global arg_6 if g_git_hash_branch in arg_0 : [ arg_2 , arg_3 , arg_4 ] = arg_0 . partition ( g_git_hash_branch ) arg_5 = arg_4 . strip ( ) . split ( ) if len ( arg_5 ) > 1 : arg_6 [ "4.git_hash" ] = arg_5 [ 0 ] arg_6 [ "5.git_branch" ] = arg_5 [ 1 ] arg_1 . remove ( Func ) return True

def Func(arg_0,arg_1):
    """
    Find the git hash and branch info that  a Jenkins job was taken from.  It will save this
    information in g_failed_test_info_dict.  In addition, it will delete this particular
    function handle off the temp_func_list as we do not need to perform this action again.

    Parameters
    ----------

    each_line :  str
        contains a line read in from jenkins console
    temp_func_list :  list of Python function handles
        contains a list of functions that we want to invoke to extract information from
        the Jenkins console text.

    :return: bool to determine if text mining should continue on the jenkins console text
    """
    global g_git_hash_branch
    global arg_6

    if g_git_hash_branch in arg_0:
        [arg_2,arg_3,arg_4] = arg_0.partition(g_git_hash_branch)
        arg_5 = arg_4.strip().split()

        if len(arg_5) > 1:
            arg_6["4.git_hash"] = arg_5[0]
            arg_6["5.git_branch"] = arg_5[1]

        arg_1.remove(Func)

    return True

Find the git hash and branch info that a Jenkins job was taken from . It will save this information in g_failed_test_info_dict . In addition it will delete this particular function handle off the temp_func_list as we do not need to perform this action again .


return getattr(current_item, attr_name, '')

def Func(arg_0, arg_1, arg_2, arg_3):
        """Returns an arbitrary attribute of a sitetree item resolved as current for current page.

        :param str|unicode attr_name:
        :param str|unicode tree_alias:
        :param Context context:
        :rtype: str|unicode
        """
        arg_2, arg_4 = arg_0.init_tree(arg_2, arg_3)
        arg_5 = arg_0.get_tree_current_item(arg_2)

        if arg_5 is None:
            if settings.DEBUG and RAISE_ITEMS_ERRORS_ON_DEBUG:
                raise SiteTreeError(
                    'Unable to resolve current sitetree item to get a `%s` for current page. Check whether '
                    'there is an appropriate sitetree item defined for current URL.' % arg_1)

            return ''

        return getattr(arg_5, arg_1, '')

Returns an arbitrary attribute of a sitetree item resolved as current for current page .


def Func(arg_0, arg_1, arg_2):
    """ Main executor of the fastq template.

    Parameters
    ----------
    fastq_pair : list
        Two element list containing the paired FastQ files.
    adapter_file : str
        Path to adapters file.
    cpus : int or str
        Number of cpu's that will be by FastQC.

    """

    logger.info("Starting fastqc")

    # If an adapter file was provided, convert it to FastQC format
    if os.path.exists(arg_1):
        logger.info("Adapters file provided: {}".format(arg_1))
        arg_3 = convert_adatpers(arg_1)
    else:
        logger.info("Adapters file '{}' not provided or does not "
                    "exist".format(arg_1))
        arg_3 = None

    # Setting command line for FastQC
    arg_4 = [
        "fastqc",
        "--extract",
        "--nogroup",
        "--format",
        "fastq",
        "--threads",
        str(arg_2)
    ]

    # Add adapters file to command line, if it exists
    if arg_3:
        arg_4 += ["--adapters", "{}".format(arg_3)]

    # Add FastQ files at the end of command line
    arg_4 += arg_0

    logger.debug("Running fastqc subprocess with command: {}".format(arg_4))

    arg_5 = subprocess.Popen(arg_4, arg_6=PIPE, arg_7=PIPE, shell=False)
    arg_6, arg_7 = arg_5.communicate()

    # Attempt to decode STDERR output from bytes. If unsuccessful, coerce to
    # string
    try:
        arg_7 = arg_7.decode("utf8")
    except (UnicodeDecodeError, AttributeError):
        arg_7 = str(arg_7)

    logger.info("Finished fastqc subprocess with STDOUT:\\n"
                "======================================\\n{}".format(arg_6))
    logger.info("Fished fastqc subprocesswith STDERR:\\n"
                "======================================\\n{}".format(arg_7))
    logger.info("Finished fastqc with return code: {}".format(
        arg_5.returncode))

    logger.info("Checking if FastQC output was correctly generated")
    # Check if the FastQC output was correctly generated.
    with open(".status", "w") as status_fh:
        for arg_8 in arg_0:
            arg_9 = join(arg_8.rsplit(".", 2)[0] + "_fastqc",
                         "fastqc_data.txt")
            logger.debug("Checking path: {}".format(arg_9))
            # If the FastQC output does not exist, pass the STDERR to
            # the output status channel and exit
            if not exists(arg_9):
                logger.warning("Path does not exist: {}".format(arg_9))
                status_fh.write("fail")
                return

            logger.debug("Found path: {}".format(arg_9))

        # If the output directories exist, write 'pass' to the output status
        # channel
            status_fh.write("pass")

    logger.info("Retrieving relevant FastQC output files")

    # Both FastQC have been correctly executed. Get the relevant FastQC
    # output files for the output channel
    for arg_10, arg_8 in enumerate(arg_0):
        # Get results for each pair
        arg_11 = arg_8.rsplit(".", 2)[0] + "_fastqc"

        arg_12 = join(arg_11, "summary.txt")
        logger.debug("Retrieving summary file: {}".format(arg_12))
        arg_13 = join(arg_11, "fastqc_data.txt")
        logger.debug("Retrieving data file: {}".format(arg_13))

        # Rename output files to a file name that is easier to handle in the
        # output channel
        os.rename(arg_13, "pair_{}_data".format(arg_10 + 1))
        os.rename(arg_12, "pair_{}_summary".format(arg_10 + 1))


def
Func
(
arg_0
,
arg_1
)
:
arg_0
.
log
.
info
(
'Sleeping in %s'
,
arg_1
)
arg_0
.
_bot
.
dispatcher
.
ignore
(
arg_1
)
arg_0
.
send_message
(
arg_1
,
'Good night'
)

def Func(arg_0, arg_1):
        """Causes the bot to ignore all messages from the channel.

        Usage:
        !Func [channel name] - ignore the specified channel (or current if none specified)
        """
        arg_0.log.info('Sleeping in %s', arg_1)
        arg_0._bot.dispatcher.ignore(arg_1)
        arg_0.send_message(arg_1, 'Good night')

Causes the bot to ignore all messages from the channel.

        Usage:
        !sleep [channel name] - ignore the specified channel (or current if none specified)

Causes the bot to ignore all messages from the channel .


def Func ( arg_0 , arg_1 ) : if arg_1 in arg_0 . strs : yield arg_0 . strs [ arg_1 ] for arg_2 , arg_3 in arg_0 . regexs . items ( ) : if re . match ( arg_2 , arg_1 ) : yield arg_3 else : pass

def Func(arg_0, arg_1):
        """ Get a seq of Commandchain objects that match key """
        if arg_1 in arg_0.strs:
            yield arg_0.strs[arg_1]

        for arg_2, arg_3 in arg_0.regexs.items():
            if re.match(arg_2, arg_1):
                yield arg_3
            else:
                #print "nomatch",key  # dbg
                pass


def Func():
    """Determine the default cache location

    This returns the ``PYTHON_EGG_CACHE`` environment variable, if set.
    Otherwise, on Windows, it returns a "Python-Eggs" subdirectory of the
    "Application Data" directory.  On all other systems, it's "~/.python-eggs".
    """
    try:
        return os.environ['PYTHON_EGG_CACHE']
    except KeyError:
        pass

    if os.name!='nt':
        return os.path.expanduser('~/.python-eggs')

    # XXX this may be locale-specific!
    arg_0 = 'Application Data'
    arg_1 = [
        # best option, should be locale-safe
        (('APPDATA',), None),
        (('USERPROFILE',), arg_0),
        (('HOMEDRIVE','HOMEPATH'), arg_0),
        (('HOMEPATH',), arg_0),
        (('HOME',), None),
        # 95/98/ME
        (('WINDIR',), arg_0),
    ]

    for arg_2, arg_3 in arg_1:
        dirname = ''
        for key in arg_2:
            if key in os.environ:
                dirname = os.path.join(dirname, os.environ[key])
            else:
                break
        else:
            if arg_3:
                dirname = os.path.join(dirname, arg_3)
            return os.path.join(dirname, 'Python-Eggs')
    else:
        raise RuntimeError(
            "Please set the PYTHON_EGG_CACHE enviroment variable"
        )


def Func():
  """Check if the java home set"""
  # check if environ variable is set
  if "JAVA_HOME" not in os.environ:
    Log.error("JAVA_HOME not set")
    return False

  # check if the value set is correct
  arg_0 = get_java_path()
  if os.path.isfile(arg_0) and os.access(arg_0, os.X_OK):
    return True

  Log.error("JAVA_HOME/bin/java either does not exist or not an executable")
  return False


(self, path="", get_genmodel_jar=False, genmodel_name="")

return h2o.download_pojo(self.leader, path, get_jar=get_genmodel_jar, jar_name=genmodel_name)

def Func ( arg_0 , arg_1 = "" , arg_2 = False , arg_3 = "" ) : return h2o . Func ( arg_0 . leader , arg_1 , get_jar = arg_2 , jar_name = arg_3 )

def Func(arg_0, arg_1="", arg_2=False, arg_3=""):
        """
        Download the POJO for the leader model in AutoML to the directory specified by path.

        If path is an empty string, then dump the output to screen.

        :param path:  An absolute path to the directory where POJO should be saved.
        :param get_genmodel_jar: if True, then also download h2o-genmodel.jar and store it in folder ``path``.
        :param genmodel_name Custom name of genmodel jar
        :returns: name of the POJO file written.
        """

        return h2o.Func(arg_0.leader, arg_1, get_jar=arg_2, jar_name=arg_3)

Download the POJO for the leader model in AutoML to the directory specified by path .


def Func(arg_0):
    """Select a PassManager and run a single circuit through it.

    Args:
        circuit_config_tuple (tuple):
            circuit (QuantumCircuit): circuit to transpile
            transpile_config (TranspileConfig): configuration dictating how to transpile

    Returns:
        QuantumCircuit: transpiled circuit
    """
    arg_1, arg_2 = arg_0

    # if the pass manager is not already selected, choose an appropriate one.
    if arg_2.pass_manager:
        arg_3 = arg_2.pass_manager

    elif arg_2.coupling_map:
        arg_3 = default_pass_manager(arg_2.basis_gates,
                                            arg_2.coupling_map,
                                            arg_2.initial_layout,
                                            arg_2.seed_transpiler)
    else:
        arg_3 = default_pass_manager_simulator(arg_2.basis_gates)

    return arg_3.run(arg_1)

Select a PassManager and run a single circuit through it .


(self, dither=False, guard=False, multithread=False,
                    replay_gain=False, verbosity=2)

def Func(arg_0, arg_1=False, arg_2=False, arg_3=False,
                    arg_4=False, arg_5=2):
        '''Sets SoX's global arguments.
        Overwrites any previously set global arguments.
        If this function is not explicity called, globals are set to this
        function's defaults.

        Parameters
        ----------
        dither : bool, default=False
            If True, dithering is applied for low files with low bit rates.
        guard : bool, default=False
            If True, invokes the gain effect to guard against clipping.
        multithread : bool, default=False
            If True, each channel is processed in parallel.
        replay_gain : bool, default=False
            If True, applies replay-gain adjustment to input-files.
        verbosity : int, default=2
            SoX's verbosity level. One of:
                * 0 : No messages are shown at all
                * 1 : Only error messages are shown. These are generated if SoX
                    cannot complete the requested commands.
                * 2 : Warning messages are also shown. These are generated if
                    SoX can complete the requested commands, but not exactly
                    according to the requested command parameters, or if
                    clipping occurs.
                * 3 : Descriptions of SoX’s processing phases are also shown.
                    Useful for seeing exactly how SoX is processing your audio.
                * 4, >4 : Messages to help with debugging SoX are also shown.

        '''
        if not isinstance(arg_1, bool):
            raise ValueError('dither must be a boolean.')

        if not isinstance(arg_2, bool):
            raise ValueError('guard must be a boolean.')

        if not isinstance(arg_3, bool):
            raise ValueError('multithread must be a boolean.')

        if not isinstance(arg_4, bool):
            raise ValueError('replay_gain must be a boolean.')

        if arg_5 not in VERBOSITY_VALS:
            raise ValueError(
                'Invalid value for VERBOSITY. Must be one {}'.format(
                    VERBOSITY_VALS)
            )

        arg_6 = []

        if not arg_1:
            arg_6.append('-D')

        if arg_2:
            arg_6.append('-G')

        if arg_3:
            arg_6.append('--multi-threaded')

        if arg_4:
            arg_6.append('--replay-gain')
            arg_6.append('track')

        arg_6.append('-V{}'.format(arg_5))

        arg_0.globals = arg_6
        return arg_0

Sets SoX s global arguments . Overwrites any previously set global arguments . If this function is not explicity called globals are set to this function s defaults .


return self._return_item_dictionary(self._config, fast_access, copy)

def Func ( arg_0 , arg_1 = False , arg_2 = True ) : return arg_0 . _return_item_dictionary ( arg_0 . _config , arg_1 , arg_2 )

def Func(arg_0, arg_1=False, arg_2=True):
        """Returns a dictionary containing the full config names as keys and the config parameters
        or the config parameter data items as values.

        :param fast_access:

            Determines whether the parameter objects or their values are returned
            in the dictionary.

        :param copy:

            Whether the original dictionary or a shallow copy is returned.
            If you want the real dictionary please do not modify it at all!
            Not Copying and fast access do not work at the same time! Raises ValueError
            if fast access is true and copy false.

        :return: Dictionary containing the config data

        :raises: ValueError

        """
        return arg_0._return_item_dictionary(arg_0._config, arg_1, arg_2)

Returns a dictionary containing the full config names as keys and the config parameters or the config parameter data items as values .


def Func ( arg_0 , arg_1 = None , arg_2 = [ ] ) : if arg_1 is not None and arg_1 in arg_0 . logList : if len ( arg_2 ) == 0 or arg_2 == "All" : del arg_0 . logList [ arg_1 ] else : for arg_3 in arg_2 : if arg_3 in arg_0 . logList [ arg_1 ] : arg_0 . logList [ arg_1 ] . remove ( arg_3 ) arg_0 . changeLogType ( )

def Func(arg_0, arg_1=None, arg_2=[]):
        '''Remove unwanted logbooks from list.'''
        if arg_1 is not None and arg_1 in arg_0.logList:
            if len(arg_2) == 0 or arg_2 == "All":
                del arg_0.logList[arg_1]
            else:
                for arg_3 in arg_2:
                    if arg_3 in arg_0.logList[arg_1]:
                        arg_0.logList[arg_1].remove(arg_3)

            arg_0.changeLogType()


return cli_config.get('servicefabric', name, fallback)

def Func ( arg_0 , arg_1 = None ) : arg_2 = CLIConfig ( SF_CLI_CONFIG_DIR , SF_CLI_ENV_VAR_PREFIX ) return arg_2 . get ( 'servicefabric' , arg_0 , arg_1 )

def Func(arg_0, arg_1=None):
    """Gets a config by name.

    In the case where the config name is not found, will use fallback value."""

    arg_2 = CLIConfig(SF_CLI_CONFIG_DIR, SF_CLI_ENV_VAR_PREFIX)

    return arg_2.get('servicefabric', arg_0, arg_1)


return long_exposures, short_exposures, gross_exposures, net_exposures

def Func ( arg_0 , arg_1 ) : arg_2 = [ ] arg_3 = [ ] arg_4 = [ ] arg_5 = [ ] arg_6 = arg_0 . drop ( 'cash' , axis = 'columns' ) arg_7 = arg_6 . abs ( ) . sum ( axis = 'columns' ) arg_8 = arg_6 [ arg_6 > 0 ] . sum ( axis = 'columns' ) arg_9 = arg_6 [ arg_6 < 0 ] . abs ( ) . sum ( axis = 'columns' ) for arg_10 , arg_11 in CAP_BUCKETS . items ( ) : arg_12 = arg_6 [ ( arg_1 >= arg_11 [ 0 ] ) & ( arg_1 <= arg_11 [ 1 ] ) ] arg_13 = arg_12 . abs ( ) . sum ( axis = 'columns' ) . divide ( arg_7 ) arg_14 = arg_12 [ arg_12 > 0 ] . sum ( axis = 'columns' ) . divide ( arg_8 ) arg_15 = arg_12 [ arg_12 < 0 ] . sum ( axis = 'columns' ) . divide ( arg_9 ) arg_16 = arg_14 . subtract ( arg_15 ) arg_4 . append ( arg_13 ) arg_2 . append ( arg_14 ) arg_3 . append ( arg_15 ) arg_5 . append ( arg_16 ) return arg_2 , arg_3 , arg_4 , arg_5

def Func(arg_0, arg_1):
    """
    Returns arrays of long, short and gross market cap exposures of an
    algorithm's positions

    Parameters
    ----------
    positions : pd.DataFrame
        Daily equity positions of algorithm, in dollars.
        - See full explanation in compute_style_factor_exposures.

    caps : pd.DataFrame
        Daily Morningstar sector code per asset
        - See full explanation in create_risk_tear_sheet
    """

    arg_2 = []
    arg_3 = []
    arg_4 = []
    arg_5 = []

    arg_6 = arg_0.drop('cash', axis='columns')
    arg_7 = arg_6.abs().sum(axis='columns')
    arg_8 = arg_6[arg_6 > 0] \
        .sum(axis='columns')
    arg_9 = arg_6[arg_6 < 0] \
        .abs().sum(axis='columns')

    for arg_10, arg_11 in CAP_BUCKETS.items():
        arg_12 = arg_6[(arg_1 >= arg_11[0]) &
                                      (arg_1 <= arg_11[1])]

        arg_13 = arg_12.abs().sum(axis='columns') \
            .divide(arg_7)
        arg_14 = arg_12[arg_12 > 0] \
            .sum(axis='columns').divide(arg_8)
        arg_15 = arg_12[arg_12 < 0] \
            .sum(axis='columns').divide(arg_9)
        arg_16 = arg_14.subtract(arg_15)

        arg_4.append(arg_13)
        arg_2.append(arg_14)
        arg_3.append(arg_15)
        arg_5.append(arg_16)

    return arg_2, arg_3, arg_4, arg_5

Returns arrays of long short and gross market cap exposures of an algorithm s positions


def Func ( arg_0 , arg_1 , arg_2 = 2 ** 20 ) : arg_3 = hashlib . md5 ( ) with open ( arg_1 , 'rb' ) as f : while True : arg_4 = f . read ( arg_2 ) if not arg_4 : break arg_3 . update ( arg_4 ) return arg_3 . hexdigest ( )

def Func(arg_0, arg_1, arg_2=2**20):
    '''Calculate MD5 hash code for a local file'''
    arg_3 = hashlib.md5()
    with open(arg_1, 'rb') as f:
      while True:
        arg_4 = f.read(arg_2)
        if not arg_4:
          break
        arg_3.update(arg_4)
    return arg_3.hexdigest()


def Func():
    r"""Return True if at least one GPU is available"""
    global arg_4
    if arg_4 is None:
        arg_0 = tf.ConfigProto()
        arg_0.gpu_options.allow_growth = True
        try:
            with tf.Session(config=arg_0):
                arg_3 = device_lib.list_local_devices()
                arg_4 = any(device.device_type == 'GPU' for device in arg_3)
        except AttributeError as e:
            log.warning(f'Got an AttributeError `{e}`, assuming documentation building')
            arg_4 = False
    return arg_4

r Return True if at least one GPU is available


def Func ( arg_0 ) : if type ( arg_0 ) is dict : return [ arg_0 ] if "numpy" in str ( type ( arg_0 ) ) : return arg_0 arg_1 = [ ] for arg_2 in arg_0 : if type ( arg_2 ) == dict : arg_1 . append ( arg_2 ) elif type ( arg_2 ) == list : for arg_3 in arg_2 : arg_1 . append ( arg_3 ) return arg_1

def Func(arg_0):
    """Given a list of list of dicts, return just the dicts."""
    if type(arg_0) is dict:
        return [arg_0]
    if "numpy" in str(type(arg_0)):
        return arg_0
    arg_1=[]
    for arg_2 in arg_0:
        if type(arg_2)==dict:
            arg_1.append(arg_2)
        elif type(arg_2)==list:
            for arg_3 in arg_2:
                arg_1.append(arg_3)
    return arg_1

Given a list of list of dicts return just the dicts .


def Func(arg_0):
        """
        Creates base directories for app, virtualenv, and nginx

        """
        arg_0.log.debug('Checking directories')
        if not os.path.exists(arg_0._ve_dir):
            os.makedirs(arg_0._ve_dir)
        if not os.path.exists(arg_0._app_dir):
            os.makedirs(arg_0._app_dir)
        if not os.path.exists(arg_0._conf_dir):
            os.makedirs(arg_0._conf_dir)
        if not os.path.exists(arg_0._var_dir):
            os.makedirs(arg_0._var_dir)
        if not os.path.exists(arg_0._log_dir):
            os.makedirs(arg_0._log_dir)
        if not os.path.exists(arg_0._script_dir):
            os.makedirs(arg_0._script_dir)

        # copy uswgi_params for nginx
        arg_1 = '/etc/nginx/uwsgi_params'
        if os.path.exists(arg_1):
            shutil.copy(arg_1, arg_0._conf_dir)
        else:
            logging.warning('Unable to find Nginx uwsgi_params.  You must manually copy this to {0}.'.format(arg_0._conf_dir))

        # copy mime.types for nginx
        arg_2 = '/etc/nginx/mime.types'
        if os.path.exists(arg_2):
            shutil.copy(arg_2, arg_0._conf_dir)
            arg_0._include_mimetypes = True
        else:
            logging.warn('Unable to find mime.types for Nginx.  You must manually copy this to {0}.'.format(arg_0._conf_dir))

Creates base directories for app virtualenv and nginx


return (
            analysis.filename,
            sorted(analysis.statements),
            sorted(analysis.excluded),
            sorted(analysis.missing),
            analysis.missing_formatted(),
            )

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . _analyze ( arg_1 ) return ( arg_2 . filename , sorted ( arg_2 . statements ) , sorted ( arg_2 . excluded ) , sorted ( arg_2 . missing ) , arg_2 . missing_formatted ( ) , )

def Func(arg_0, arg_1):
        """Analyze a module.

        `morf` is a module or a filename.  It will be analyzed to determine
        its coverage statistics.  The return value is a 5-tuple:

        * The filename for the module.
        * A list of line numbers of executable statements.
        * A list of line numbers of excluded statements.
        * A list of line numbers of statements not run (missing from
          execution).
        * A readable formatted string of the missing line numbers.

        The analysis uses the source file itself and the current measured
        coverage data.

        """
        arg_2 = arg_0._analyze(arg_1)
        return (
            arg_2.filename,
            sorted(arg_2.statements),
            sorted(arg_2.excluded),
            sorted(arg_2.missing),
            arg_2.missing_formatted(),
            )


def Func ( arg_0 , arg_1 , arg_2 ) : if '\n' in arg_2 : return arg_1 . represent_scalar ( 'tag:yaml.org,2002:str' , arg_2 , style = '|' ) else : return arg_1 . represent_scalar ( 'tag:yaml.org,2002:str' , arg_2 )

def Func(arg_0, arg_1, arg_2):
    """Presenter to force yaml.dump to use multi-line string style."""
    if '\n' in arg_2:
      return arg_1.represent_scalar('tag:yaml.org,2002:str', arg_2, style='|')
    else:
      return arg_1.represent_scalar('tag:yaml.org,2002:str', arg_2)

Presenter to force yaml . dump to use multi - line string style .


def Func(arg_0, arg_1):
        '''Parses mt940 data, expects a string with data

        Args:
            data (str): The MT940 data

        Returns: :py:class:`list` of :py:class:`Transaction`
        '''
        # Remove extraneous whitespace and such
        arg_1 = '\n'.join(arg_0.strip(arg_1.split('\n')))

        # The pattern is a bit annoying to match by regex, even with a greedy
        # match it's difficult to get both the beginning and the end so we're
        # working around it in a safer way to get everything.
        arg_2 = re.compile(
            r'^:\n?(?P<full_tag>(?P<tag>[0-9]{2}|NS)(?P<sub_tag>[A-Z])?):',
            re.MULTILINE)
        arg_3 = list(arg_2.finditer(arg_1))

        # identify valid matches
        arg_4 = list(arg_0.sanatize_tag_id_matches(arg_3))

        for arg_5, arg_6 in enumerate(arg_4):
            arg_7 = arg_0.normalize_tag_id(arg_6.group('tag'))

            # get tag instance corresponding to tag id
            arg_8 = arg_0.tags.get(arg_6.group('full_tag')) \
                or arg_0.tags[arg_7]

            # Nice trick to get all the text that is part of this tag, python
            # regex matches have a `end()` and `start()` to indicate the start
            # and end index of the match.

            if arg_4[arg_5 + 1:]:
                arg_9 = \
                    arg_1[arg_6.end():arg_4[arg_5 + 1].start()].strip()
            else:
                arg_9 = arg_1[arg_6.end():].strip()

            arg_10 = arg_8.Func(arg_0, arg_9)

            # Preprocess data before creating the object

            for arg_11 in arg_0.processors.get('pre_%s' % arg_8.slug, []):
                arg_10 = arg_11(arg_0, arg_8, arg_10)

            arg_12 = arg_8(arg_0, arg_10)

            # Postprocess the object

            for arg_11 in arg_0.processors.get('post_%s' % arg_8.slug, []):
                arg_12 = arg_11(arg_0, arg_8, arg_10, arg_12)

            # Creating a new transaction for :20: and :61: tags allows the
            # tags from :20: to :61: to be captured as part of the transaction.

            if isinstance(arg_8, mt940.tags.Statement):
                # Transactions only get a Transaction Reference Code ID from a
                # :61: tag which is why a new transaction is created if the
                # 'id' has a value.

                if not arg_0.transactions:
                    arg_13 = Transaction(arg_0)
                    arg_0.transactions.append(arg_13)

                if arg_13.data.get('id'):
                    arg_13 = Transaction(arg_0, arg_12)
                    arg_0.transactions.append(arg_13)
                else:
                    arg_13.data.update(arg_12)
            elif issubclass(arg_8.scope, Transaction) and arg_0.transactions:
                # Combine multiple results together as one string, Rabobank has
                # multiple :86: tags for a single transaction

                for arg_14, arg_15 in _compat.iteritems(arg_12):
                    if arg_14 in arg_13.data and hasattr(arg_15, 'strip'):
                        arg_13.data[arg_14] += '\n%s' % arg_15.strip()
                    else:
                        arg_13.data[arg_14] = arg_15

            elif issubclass(arg_8.scope, Transactions):  # pragma: no branch
                arg_0.data.update(arg_12)

        return arg_0.transactions

Parses mt940 data expects a string with data


def Func(arg_0, **arg_1):
        """
        Get the list of Movie genres.

        Args:
            language: (optional) ISO 639-1 code.

        Returns:
            A dict respresentation of the JSON returned from the API.
        """
        arg_2 = arg_0._get_path('Func')

        arg_3 = arg_0._GET(arg_2, arg_1)
        arg_0._set_attrs_to_values(arg_3)
        return arg_3


def Func ( arg_0 , arg_1 = None ) : for arg_2 , arg_3 , arg_4 in arg_0 . _multi_graph . Func ( arg_1 , data = True ) : yield arg_2 , arg_3 , arg_4

def Func(arg_0, arg_1=None):
        """Iterator for node values.

        Yield:
            node: the node.
        """
        for arg_2, arg_3, arg_4 in arg_0._multi_graph.Func(arg_1, data=True):
            yield arg_2, arg_3, arg_4


(page_num, current_app, url_view_name, url_extra_args, url_extra_kwargs, url_param_name, url_get_params, url_anchor)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 , arg_6 , arg_7 ) : if arg_2 is not None : arg_4 [ arg_5 ] = arg_0 try : arg_8 = reverse ( arg_2 , args = arg_3 , kwargs = arg_4 , arg_1 = arg_1 ) except NoReverseMatch as e : if settings . SETTINGS_MODULE : if django . VERSION < ( 1 , 9 , 0 ) : arg_9 = '.' else : arg_9 = ':' arg_10 = settings . SETTINGS_MODULE . split ( '.' ) [ 0 ] try : arg_8 = reverse ( arg_10 + arg_9 + arg_2 , args = arg_3 , kwargs = arg_4 , arg_1 = arg_1 ) except NoReverseMatch : raise e else : raise e else : arg_8 = '' arg_6 = arg_6 or QueryDict ( arg_8 ) arg_6 = arg_6 . copy ( ) arg_6 [ arg_5 ] = str ( arg_0 ) if len ( arg_6 ) > 0 : if not isinstance ( arg_6 , QueryDict ) : arg_11 = QueryDict ( mutable = True ) arg_11 . update ( arg_6 ) arg_6 = arg_11 arg_8 += '?' + arg_6 . urlencode ( ) if ( arg_7 is not None ) : arg_8 += '#' + arg_7 return arg_8

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6, arg_7):
    """
    Helper function to return a valid URL string given the template tag parameters
    """
    if arg_2 is not None:
        # Add page param to the kwargs list. Overrides any previously set parameter of the same name.
        arg_4[arg_5] = arg_0

        try:
            arg_8 = reverse(arg_2, args=arg_3, kwargs=arg_4, arg_1=arg_1)
        except NoReverseMatch as e:  # Attempt to load view from application root, allowing the use of non-namespaced view names if your view is defined in the root application
            if settings.SETTINGS_MODULE:

                if django.VERSION < (1, 9, 0):
                    arg_9  = '.'
                else:
                    arg_9  = ':' # Namespace separator changed to colon after 1.8

                arg_10 = settings.SETTINGS_MODULE.split('.')[0]
                try:
                    arg_8 = reverse(arg_10 + arg_9 + arg_2, args=arg_3, kwargs=arg_4, arg_1=arg_1)
                except NoReverseMatch:
                    raise e # Raise the original exception so the error message doesn't confusingly include something the Developer didn't add to the view name themselves
            else:
                raise e # We can't determine the project name so just re-throw the exception

    else:
        arg_8 = ''
        arg_6 = arg_6 or QueryDict(arg_8)
        arg_6 = arg_6.copy()
        arg_6[arg_5] = str(arg_0)

    if len(arg_6) > 0:
        if not isinstance(arg_6, QueryDict):
            arg_11 = QueryDict(mutable=True)
            arg_11.update(arg_6)
            arg_6 = arg_11
        arg_8 += '?' + arg_6.urlencode()

    if (arg_7 is not None):
        arg_8 += '#' + arg_7

    return arg_8


def
Func
(
arg_0
,
arg_1
=
False
)
:
for
arg_2
in
arg_0
:
if
not
os
.
path
.
exists
(
arg_2
)
:
bail
(
'folder does not exist: '
+
arg_2
)
_Func_safe
(
arg_0
,
PROJ_ARCHIVE
,
arg_1
=
arg_1
)

def Func(arg_0, arg_1=False):
    "Move an active project to the Func."
    # error handling on Func_dir already done in main()

    for arg_2 in arg_0:
        if not os.path.exists(arg_2):
            bail('folder does not exist: ' + arg_2)

    _Func_safe(arg_0, PROJ_ARCHIVE, arg_1=arg_1)


def Func(arg_0, arg_1):
        """Reads the file from Github

        :param uri: URI of the Github raw File

        :returns: UTF-8 text with the content
        """
        logger.debug("Reading %s" % (arg_1))

        arg_0.__check_looks_like_uri(arg_1)

        try:
            arg_2 = urllib.request.Request(arg_1)
            arg_2.add_header('Authorization', 'token %s' % arg_0.token)
            arg_3 = urllib.request.urlopen(arg_2)
        except urllib.error.HTTPError as err:
            if err.code == 404:
                raise GithubFileNotFound('File %s is not available. Check the URL to ensure it really exists' % arg_1)
            else:
                raise

        return arg_3.read().decode("utf-8")