def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = { "__set__" : create_setter ( arg_1 , arg_2 ) } if len ( arg_2 ) > 0 : arg_3 [ "__init__" ] = create_init ( arg_2 ) arg_4 = type ( str ( arg_0 ) , ( Descriptor , ) , arg_3 ) arg_4 . __doc__ = docstrings . get ( arg_0 ) return arg_4

def Func(arg_0, arg_1, arg_2):
    """Turn a funcs list element into a class object."""
    arg_3 = {"__set__": create_setter(arg_1, arg_2)}
    if len(arg_2) > 0:
        arg_3["__init__"] = create_init(arg_2)
    arg_4 = type(str(arg_0), (Descriptor, ), arg_3)
    arg_4.__doc__ = docstrings.get(arg_0)
    return arg_4

Turn a funcs list element into a class object .


def
Func
(
*
arg_0
,
**
arg_1
)
:
def
arg_9
(
arg_2
,
arg_3
)
:
return
arg_2
.
__labels
[
arg_3
]
def
arg_10
(
arg_2
,
arg_3
)
:
return
arg_3
in
arg_2
.
__values
def
arg_11
(
arg_2
)
:
return
list
(
arg_2
.
__values
)
def
arg_12
(
arg_2
)
:
return
list
(
arg_2
.
__labels
.
values
(
)
)
def
arg_13
(
arg_2
,
arg_4
)
:
return
arg_2
.
__labels
[
arg_4
]
for
arg_5
in
list
(
arg_0
)
+
arg_1
.
keys
(
)
:
if
type
(
arg_5
)
is
not
str
:
raise
TypeError
(
"Func arg {0} must be a string"
.
format
(
arg_5
)
)
if
not
__isidentifier
(
arg_5
)
:
raise
ValueError
(
"Invalid enum value '{0}'. "
"'{0}' is not a valid identifier"
.
format
(
arg_5
)
)
arg_1
.
update
(
zip
(
arg_0
,
arg_0
)
)
arg_6
=
type
(
"Func"
,
(
object
,
)
,
arg_1
)
arg_6
.
__labels
=
dict
(
(
v
,
k
)
for
k
,
v
in
arg_1
.
iteritems
(
)
)
arg_6
.
__values
=
set
(
arg_6
.
__labels
.
keys
(
)
)
arg_6
.
getLabel
=
functools
.
partial
(
arg_9
,
arg_6
)
arg_6
.
validate
=
functools
.
partial
(
arg_10
,
arg_6
)
arg_6
.
getValues
=
functools
.
partial
(
arg_11
,
arg_6
)
arg_6
.
getLabels
=
functools
.
partial
(
arg_12
,
arg_6
)
arg_6
.
getValue
=
functools
.
partial
(
arg_13
,
arg_6
)
return
arg_6

def Func(*arg_0, **arg_1):
  """
  Utility function for creating enumerations in python

  Example Usage:
    >> Color = Func("Red", "Green", "Blue", "Magenta")
    >> print Color.Red
    >> 0
    >> print Color.Green
    >> 1
    >> print Color.Blue
    >> 2
    >> print Color.Magenta
    >> 3
    >> Color.Violet
    >> 'violet'
    >> Color.getLabel(Color.Red)
    >> 'Red'
    >> Color.getLabel(2)
    >> 'Blue'
  """

  def arg_9(arg_2, arg_3):
    """ Get a string label for the current value of the enum """
    return arg_2.__labels[arg_3]

  def arg_10(arg_2, arg_3):
    """ Returns True if val is a valid value for the enumeration """
    return arg_3 in arg_2.__values

  def arg_11(arg_2):
    """ Returns a list of all the possible values for this enum """
    return list(arg_2.__values)

  def arg_12(arg_2):
    """ Returns a list of all possible labels for this enum """
    return list(arg_2.__labels.values())

  def arg_13(arg_2, arg_4):
    """ Returns value given a label """
    return arg_2.__labels[arg_4]

  for arg_5 in list(arg_0)+arg_1.keys():
    if type(arg_5) is not str:
      raise TypeError("Func arg {0} must be a string".format(arg_5))

    if not __isidentifier(arg_5):
      raise ValueError("Invalid enum value '{0}'. "\
                       "'{0}' is not a valid identifier".format(arg_5))

  #kwargs.update(zip(args, range(len(args))))
  arg_1.update(zip(arg_0, arg_0))
  arg_6 = type("Func", (object,), arg_1)

  arg_6.__labels = dict( (v,k) for k,v in arg_1.iteritems())
  arg_6.__values = set(arg_6.__labels.keys())
  arg_6.getLabel = functools.partial(arg_9, arg_6)
  arg_6.validate = functools.partial(arg_10, arg_6)
  arg_6.getValues = functools.partial(arg_11, arg_6)
  arg_6.getLabels = functools.partial(arg_12, arg_6)
  arg_6.getValue = functools.partial(arg_13, arg_6)

  return arg_6

Utility function for creating enumerations in python

  Example Usage:
    >> Color = Enum("Red", "Green", "Blue", "Magenta")
    >> print Color.Red
    >> 0
    >> print Color.Green
    >> 1
    >> print Color.Blue
    >> 2
    >> print Color.Magenta
    >> 3
    >> Color.Violet
    >> 'violet'
    >> Color.getLabel(Color.Red)
    >> 'Red'
    >> Color.getLabel(2)
    >> 'Blue'


async def Func(arg_0):
        """Get the full object from spotify with a `href` attribute."""
        if not hasattr(arg_0, 'href'):
            raise TypeError('Spotify object has no `href` attribute, therefore cannot be retrived')

        elif hasattr(arg_0, 'http'):
            return await arg_0.http.request(('GET', arg_0.href))

        else:
            arg_1 = type(arg_0)

        try:
            arg_2 = getattr(arg_0, '_{0}__client'.format(arg_1.__name__))
        except AttributeError:
            raise TypeError('Spotify object has no way to access a HTTPClient.')
        else:
            arg_3 = arg_2.http

        arg_4 = await arg_3.request(('GET', arg_0.href))

        return arg_1(arg_2, arg_4)

Get the full object from spotify with a href attribute .


def Func ( arg_0 , arg_1 , arg_2 , arg_3 = ( 255 , 0 , 0 ) ) : arg_4 , arg_5 = tuple ( [ int ( round ( i , 0 ) ) for i in arg_1 ] ) arg_6 , arg_7 = tuple ( [ int ( round ( i , 0 ) ) for i in arg_2 ] ) arg_8 , arg_9 = skimage . draw . line ( arg_4 , arg_5 , arg_6 , arg_7 ) arg_0 [ arg_8 , arg_9 ] = arg_3

def Func(arg_0, arg_1, arg_2, arg_3=(255, 0, 0)):
        """Draw a line between pos1 and pos2 on the canvas.

        :param pos1: position 1 (row, col) tuple
        :param pos2: position 2 (row, col) tuple
        :param color: RGB tuple
        """
        arg_4, arg_5 = tuple([int(round(i, 0)) for i in arg_1])
        arg_6, arg_7 = tuple([int(round(i, 0)) for i in arg_2])
        arg_8, arg_9 = skimage.draw.line(arg_4, arg_5, arg_6, arg_7)
        arg_0[arg_8, arg_9] = arg_3

Draw a line between pos1 and pos2 on the canvas .


def Func ( arg_0 , arg_1 = None ) : if arg_1 : arg_1 = '.' + arg_1 . strip ( '.' ) arg_2 = 'www-{}-' . format ( urlparse ( arg_0 ) . hostname or 'any' ) if arg_0 . startswith ( 'file://' ) : arg_0 = os . path . abspath ( arg_0 [ len ( 'file://' ) : ] ) if os . path . isabs ( arg_0 ) : with open ( arg_0 , 'rb' ) as handle : arg_3 = handle . read ( ) else : arg_3 = requests . get ( arg_0 ) . content with tempfile . NamedTemporaryFile ( suffix = arg_1 or '' , prefix = arg_2 , delete = False ) as handle : handle . write ( arg_3 ) try : yield handle . name finally : if os . path . exists ( handle . name ) : os . remove ( handle . name )

def Func(arg_0, arg_1=None):
    """
        Context manager that GETs a given `url` and provides it as a local file.

        The file is in a closed state upon entering the context,
        and removed when leaving it, if still there.

        To give the file name a specific extension, use `ext`;
        the extension can optionally include a separating dot,
        otherwise it will be added.

        Parameters:
            url (str): URL to retrieve.
            ext (str, optional): Extension for the generated filename.

        Yields:
            str: The path to a temporary file with the content of the URL.

        Raises:
            requests.RequestException: Base exception of ``requests``, see its
                docs for more detailed ones.

        Example:
            >>> import io, re, json
            >>> with Func('https://api.github.com/meta', ext='json') as meta:
            ...     meta, json.load(io.open(meta, encoding='ascii'))['hooks']
            (u'/tmp/www-api.github.com-Ba5OhD.json', [u'192.30.252.0/22'])
    """
    if arg_1:
        arg_1 = '.' + arg_1.strip('.')  # normalize extension
    arg_2 = 'www-{}-'.format(urlparse(arg_0).hostname or 'any')

    if arg_0.startswith('file://'):
        arg_0 = os.path.abspath(arg_0[len('file://'):])
    if os.path.isabs(arg_0):
        with open(arg_0, 'rb') as handle:
            arg_3 = handle.read()
    else:
        arg_3 = requests.get(arg_0).content

    with tempfile.NamedTemporaryFile(suffix=arg_1 or '', prefix=arg_2, delete=False) as handle:
        handle.write(arg_3)

    try:
        yield handle.name
    finally:
        if os.path.exists(handle.name):
            os.remove(handle.name)

Context manager that GETs a given `url` and provides it as a local file.

        The file is in a closed state upon entering the context,
        and removed when leaving it, if still there.

        To give the file name a specific extension, use `ext`;
        the extension can optionally include a separating dot,
        otherwise it will be added.

        Parameters:
            url (str): URL to retrieve.
            ext (str, optional): Extension for the generated filename.

        Yields:
            str: The path to a temporary file with the content of the URL.

        Raises:
            requests.RequestException: Base exception of ``requests``, see its
                docs for more detailed ones.

        Example:
            >>> import io, re, json
            >>> with url_as_file('https://api.github.com/meta', ext='json') as meta:
            ...     meta, json.load(io.open(meta, encoding='ascii'))['hooks']
            (u'/tmp/www-api.github.com-Ba5OhD.json', [u'192.30.252.0/22'])

Context manager that GETs a given url and provides it as a local file .


def Func ( arg_0 ) : for arg_1 , arg_2 in enumerate ( arg_0 . hashtables ) : arg_0 . sorted_hashtables [ arg_1 ] = [ H for H in arg_2 . keys ( ) ] arg_0 . sorted_hashtables [ arg_1 ] . sort ( )

def Func(arg_0):
        '''
        Index all the keys added so far and make them searchable.
        '''
        for arg_1, arg_2 in enumerate(arg_0.hashtables):
            arg_0.sorted_hashtables[arg_1] = [H for H in arg_2.keys()]
            arg_0.sorted_hashtables[arg_1].sort()

Index all the keys added so far and make them searchable .


def
Func
(
arg_0
=
"."
,
arg_1
=
)
:
assert_is_type
(
arg_0
,
str
)
assert_is_type
(
arg_1
,
str
,
)
arg_2
=
"%s/3/Logs/download"
%
h2oconn
.
base_url
arg_3
=
urlopen
(
)
arg_4
=
arg_3
(
arg_2
)
if
not
os
.
path
.
exists
(
arg_0
)
:
os
.
mkdir
(
arg_0
)
if
arg_1
is
:
if
PY3
:
arg_5
=
[
arg_6
[
1
]
for
arg_6
in
arg_4
.
headers
.
_headers
]
else
:
arg_5
=
arg_4
.
headers
.
headers
for
arg_6
in
arg_5
:
if
"filename="
in
arg_6
:
arg_1
=
arg_6
.
split
(
"filename="
)
[
1
]
.
strip
(
)
break
arg_7
=
os
.
path
.
join
(
arg_0
,
arg_1
)
arg_4
=
arg_3
(
arg_2
)
.
read
(
)
print
(
"Writing H2O logs to "
+
arg_7
)
with
open
(
arg_7
,
"wb"
)
as
f
:
f
.
write
(
arg_4
)
return
arg_7

def Func(arg_0=".", arg_1=None):
    """
    Download H2O log files to disk.

    :param dirname: a character string indicating the directory that the log file should be saved in.
    :param filename: a string indicating the name that the CSV file should be. Note that the saved format is .zip, so the file name must include the .zip extension.

    :returns: path of logs written in a zip file.

    :examples: The following code will save the zip file `'autoh2o_log.zip'` in a directory that is one down from where you are currently working into a directory called `your_directory_name`. (Please note that `your_directory_name` should be replaced with the name of the directory that you've created and that already exists.)

        >>> h2o.Func(dirname='./your_directory_name/', filename = 'autoh2o_log.zip')

    """
    assert_is_type(arg_0, str)
    assert_is_type(arg_1, str, None)
    arg_2 = "%s/3/Logs/download" % h2oconn.base_url
    arg_3 = urlopen()
    arg_4 = arg_3(arg_2)

    if not os.path.exists(arg_0): os.mkdir(arg_0)
    if arg_1 is None:
        if PY3:
            arg_5 = [arg_6[1] for arg_6 in arg_4.headers._headers]
        else:
            arg_5 = arg_4.headers.headers
        for arg_6 in arg_5:
            if "filename=" in arg_6:
                arg_1 = arg_6.split("filename=")[1].strip()
                break
    arg_7 = os.path.join(arg_0, arg_1)
    arg_4 = arg_3(arg_2).read()

    print("Writing H2O logs to " + arg_7)
    with open(arg_7, "wb") as f:
        f.write(arg_4)
    return arg_7

Download H2O log files to disk.

    :param dirname: a character string indicating the directory that the log file should be saved in.
    :param filename: a string indicating the name that the CSV file should be. Note that the saved format is .zip, so the file name must include the .zip extension.

    :returns: path of logs written in a zip file.

    :examples: The following code will save the zip file `'autoh2o_log.zip'` in a directory that is one down from where you are currently working into a directory called `your_directory_name`. (Please note that `your_directory_name` should be replaced with the name of the directory that you've created and that already exists.)

        >>> h2o.download_all_logs(dirname='./your_directory_name/', filename = 'autoh2o_log.zip')


def Func ( arg_0 ) : try : arg_1 = sh . Command ( '/usr/bin/pgrep' ) arg_1 ( arg_0 ) arg_2 = True except sh . ErrorReturnCode_1 : arg_2 = False return arg_2

def Func(arg_0):
    ''' `pgrep` returns an error code if no process was found '''
    try:
        arg_1 = sh.Command('/usr/bin/pgrep')
        arg_1(arg_0)
        arg_2 = True
    except sh.ErrorReturnCode_1:
        arg_2 = False
    return arg_2

pgrep returns an error code if no process was found


def Func(arg_0):
    """Picks only a coda from a decimal."""
    arg_0 = Decimal(arg_0)
    arg_1, arg_2, arg_3 = arg_0.as_tuple()
    if arg_3 < 0:
        return DIGIT_CODAS[arg_2[-1]]
    arg_1, arg_2, arg_3 = arg_0.normalize().as_tuple()
    arg_4 = bisect_right(EXP_INDICES, arg_3) - 1
    if arg_4 < 0:
        return DIGIT_CODAS[arg_2[-1]]
    else:
        return EXP_CODAS[EXP_INDICES[arg_4]]


def
Func
(
arg_0
,
arg_1
,
arg_2
=
1000
)
:
if
isinstance
(
arg_0
,
str
)
:
arg_0
=
GTFS
(
arg_0
)
assert
(
isinstance
(
arg_0
,
GTFS
)
)
print
(
"Reading in walk network"
)
arg_3
=
create_walk_network_from_osm
(
arg_1
)
print
(
"Matching stops to the OSM network"
)
arg_4
,
arg_5
=
match_stops_to_nodes
(
arg_0
,
arg_3
)
arg_6
=
arg_0
.
get_straight_line_transfer_distances
(
)
arg_7
=
{
stop_I
:
set
(
)
for
stop_I
in
arg_4
}
for
arg_8
in
arg_6
.
itertuples
(
)
:
arg_9
=
arg_8
.
from_stop_I
arg_10
=
arg_8
.
to_stop_I
arg_7
[
arg_9
]
.
add
(
arg_10
)
print
(
"Computing walking distances"
)
for
arg_9
,
arg_11
in
arg_7
.
items
(
)
:
arg_12
=
arg_4
[
arg_9
]
arg_13
=
arg_5
[
arg_9
]
arg_14
=
networkx
.
single_source_dijkstra_path_length
(
arg_3
,
arg_12
,
cutoff
=
arg_2
arg_13
,
weight
=
"distance"
)
for
arg_10
in
arg_11
:
arg_15
=
arg_5
[
arg_10
]
arg_16
=
arg_4
[
arg_10
]
arg_17
=
arg_14
.
get
(
arg_16
,
float
(
'inf'
)
)
arg_18
=
arg_13
+
arg_17
+
arg_15
arg_19
=
arg_6
[
arg_6
[
'from_stop_I'
]
==
arg_9
]
arg_20
=
arg_19
[
arg_19
[
"to_stop_I"
]
==
arg_10
]
[
"d"
]
.
values
[
0
]
assert
(
arg_20
<
arg_18
+
2
)
if
arg_18
<=
arg_2
:
arg_0
.
conn
.
execute
(
"UPDATE stop_distances "
"SET d_walk = "
+
str
(
int
(
arg_18
)
)
+
" WHERE from_stop_I="
+
str
(
arg_9
)
+
" AND to_stop_I="
+
str
(
arg_10
)
)
arg_0
.
conn
.
commit
(
)

def Func(arg_0, arg_1, arg_2=1000):
    """
    Computes the walk paths between stops, and updates these to the gtfs database.

    Parameters
    ----------
    gtfs: gtfspy.GTFS or str
        A GTFS object or a string representation.
    osm_path: str
        path to the OpenStreetMap file
    cutoff_distance_m: number
        maximum allowed distance in meters

    Returns
    -------
    None

    See Also
    --------
    gtfspy.calc_transfers
    compute_walk_paths_java
    """
    if isinstance(arg_0, str):
        arg_0 = GTFS(arg_0)
    assert (isinstance(arg_0, GTFS))
    print("Reading in walk network")
    arg_3 = create_walk_network_from_osm(arg_1)
    print("Matching stops to the OSM network")
    arg_4, arg_5 = match_stops_to_nodes(arg_0, arg_3)

    arg_6 = arg_0.get_straight_line_transfer_distances()

    arg_7 = {stop_I: set() for stop_I in arg_4}
    for arg_8 in arg_6.itertuples():
        arg_9 = arg_8.from_stop_I
        arg_10 = arg_8.to_stop_I
        arg_7[arg_9].add(arg_10)

    print("Computing walking distances")
    for arg_9, arg_11 in arg_7.items():
        arg_12 = arg_4[arg_9]
        arg_13 = arg_5[arg_9]
        arg_14 = networkx.single_source_dijkstra_path_length(arg_3,
                                                                     arg_12,
                                                                     cutoff=arg_2 - arg_13,
                                                                     weight="distance")
        for arg_10 in arg_11:
            arg_15 = arg_5[arg_10]
            arg_16 = arg_4[arg_10]
            arg_17 = arg_14.get(arg_16, float('inf'))
            arg_18 = arg_13 + arg_17 + arg_15
            arg_19 = arg_6[arg_6['from_stop_I'] == arg_9]
            arg_20 = arg_19[arg_19["to_stop_I"] == arg_10]["d"].values[0]
            assert (arg_20 < arg_18 + 2)  # allow for a maximum  of 2 meters in calculations
            if arg_18 <= arg_2:
                arg_0.conn.execute("UPDATE stop_distances "
                                  "SET d_walk = " + str(int(arg_18)) +
                                  " WHERE from_stop_I=" + str(arg_9) + " AND to_stop_I=" + str(arg_10))

    arg_0.conn.commit()

Computes the walk paths between stops and updates these to the gtfs database .


def Func(arg_0):
        """
        Boots a server for the app, if it isn't already Funced.

        Returns:
            Server: This server.
        """

        if not arg_0.responsive:
            # Remember the port so we can reuse it if we try to serve this same app again.
            arg_1(arg_0)._ports[arg_0.port_key] = arg_0.port

            arg_4 = capybara.servers[capybara.server_name]
            arg_5 = (arg_0.middleware, arg_0.port, arg_0.host)

            arg_0.server_thread = Thread(target=arg_4, args=arg_5)

            # Inform Python that it shouldn't wait for this thread to terminate before
            # exiting. (It will still be appropriately terminated when the process exits.)
            arg_0.server_thread.daemon = True

            arg_0.server_thread.start()

            # Make sure the server actually starts and becomes responsive.
            arg_8 = Timer(60)
            while not arg_0.responsive:
                if arg_8.expired:
                    raise RuntimeError("WSGI application timed out during Func")
                arg_0.server_thread.join(0.1)

        return arg_0

Boots a server for the app, if it isn't already booted.

        Returns:
            Server: This server.

Boots a server for the app if it isn t already booted .


Override ``_serialize`` for customizing the exception raised.

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
)
:
try
:
return
super
(
)
.
Func
(
arg_1
,
arg_2
,
arg_3
)
except
TypeError
as
ex
:
if
'serialization_schema_selector'
in
str
(
ex
)
:
raise
ValidationError
(
'Data from an invalid schema'
)
raise

def Func(arg_0, arg_1, arg_2, arg_3):
        """Override ``Func`` for customizing the exception raised."""
        try:
            return super().Func(arg_1, arg_2, arg_3)
        except TypeError as ex:
            if 'serialization_schema_selector' in str(ex):
                raise ValidationError('Data from an invalid schema')
            raise

Override _serialize for customizing the exception raised .


def Func ( arg_0 , arg_1 = False , ** arg_2 ) : arg_3 = arg_2 . pop ( "segment_allocation_range_ids" , None ) arg_4 = arg_0 . session . query ( models . SegmentAllocation ) if arg_1 : arg_4 = arg_4 . with_lockmode ( "update" ) arg_4 = arg_4 . filter_by ( ** arg_2 ) if arg_3 : arg_4 . filter ( models . SegmentAllocation . segment_allocation_range_id . in_ ( arg_3 ) ) return arg_4

def Func(arg_0, arg_1=False, **arg_2):
    """Query for segment allocations."""
    arg_3 = arg_2.pop("segment_allocation_range_ids", None)

    arg_4 = arg_0.session.query(models.SegmentAllocation)
    if arg_1:
        arg_4 = arg_4.with_lockmode("update")

    arg_4 = arg_4.filter_by(**arg_2)

    # Optionally filter by given list of range ids
    if arg_3:
        arg_4.filter(
            models.SegmentAllocation.segment_allocation_range_id.in_(
                arg_3))
    return arg_4


def Func ( arg_0 , arg_1 = None ) : arg_1 = arg_1 or os . getcwd ( ) while arg_1 != os . path . dirname ( arg_1 ) : if os . path . exists ( os . path . join ( arg_1 , arg_0 ) ) : return arg_1 arg_1 = os . path . dirname ( arg_1 ) return None

def Func(arg_0, arg_1=None):
    """ Search for a file named `name` from cwd or given directory to root.
        Return None if nothing's found.
    """
    arg_1 = arg_1 or os.getcwd()
    while arg_1 != os.path.dirname(arg_1):
        if os.path.exists(os.path.join(arg_1, arg_0)):
            return arg_1
        arg_1 = os.path.dirname(arg_1)

    return None

Search for a file named name from cwd or given directory to root . Return None if nothing s found .


return ((source_array & mask) >> lsb).astype(dtype)

def Func(arg_0, arg_1, arg_2=arg_3.uint8):
    """ Unpack sub field using its mask

    Parameters:
    ----------
    source_array : numpy.ndarray
        The source array
    mask : mask (ie: 0b00001111)
        Mask of the sub field to be extracted from the source array
    Returns
    -------
    numpy.ndarray
        The sub field array
    """
    arg_5 = least_significant_bit(arg_1)
    return ((arg_0 & arg_1) >> arg_5).astype(arg_2)


def Func ( arg_0 , arg_1 , arg_2 ) : if re . match ( '.*-best' , arg_0 ) is not None : arg_3 = int ( arg_0 . split ( '-' ) [ 0 ] ) arg_4 = SelectKBest ( k = arg_3 ) import warnings with warnings . catch_warnings ( ) : warnings . simplefilter ( 'ignore' , category = UserWarning ) arg_5 = np . where ( arg_4 . fit ( arg_1 , arg_2 ) . get_support ( ) is True ) [ 0 ] elif re . match ( '.*-randombest' , arg_0 ) is not None : arg_3 = int ( arg_0 . split ( '-' ) [ 0 ] ) from random import shuffle arg_6 = range ( 0 , arg_1 . shape [ 1 ] ) shuffle ( arg_6 ) arg_5 = arg_6 [ : arg_3 ] return arg_5

def Func(arg_0, arg_1, arg_2):
    """" Implements various kinds of feature selection """
    # K-best
    if re.match('.*-best', arg_0) is not None:
        arg_3 = int(arg_0.split('-')[0])

        arg_4 = SelectKBest(k=arg_3)

        import warnings
        with warnings.catch_warnings():
            warnings.simplefilter('ignore', category=UserWarning)
            arg_5 = np.where(
                arg_4.fit(arg_1, arg_2).get_support() is True)[0]

    elif re.match('.*-randombest', arg_0) is not None:
        arg_3 = int(arg_0.split('-')[0])

        from random import shuffle
        arg_6 = range(0, arg_1.shape[1])
        shuffle(arg_6)

        arg_5 = arg_6[:arg_3]

    return arg_5


def
Func
(
arg_0
,
arg_1
)
:
if
not
isinstance
(
arg_1
,
Expression
)
:
raise
FiqlObjectException
(
"Parent must be of %s not %s"
%
(
Expression
,
type
(
arg_1
)
)
)
arg_0
.
parent
=
arg_1

def Func(arg_0, arg_1):
        """Set parent ``Expression`` for this object.

        Args:
            parent (Expression): The ``Expression`` which contains this object.

        Raises:
            FiqlObjectException: Parent must be of type ``Expression``.
        """
        if not isinstance(arg_1, Expression):
            raise FiqlObjectException("Parent must be of %s not %s" % (
                Expression, type(arg_1)))
        arg_0.parent = arg_1


def Func(arg_0):
    """
    Converts an HSV tuple to RGB. Intended for internal use.
    You should use hsv2rgb_spectrum or hsv2rgb_rainbow instead.
    """

    arg_1 = 0x40

    arg_2, arg_3, arg_4 = arg_0

    # The brightness floor is minimum number that all of
    # R, G, and B will be set to.
    arg_5 = 255 - arg_3
    arg_6 = (arg_4 * arg_5) // 256

    # The color amplitude is the maximum amount of R, G, and B
    # that will be added on top of the brightness_floor to
    # create the specific hue desired.
    arg_7 = arg_4 - arg_6

    # figure out which section of the hue wheel we're in,
    # and how far offset we are within that section
    arg_8 = arg_2 // arg_1  # 0..2
    arg_9 = arg_2 % arg_1  # 0..63

    arg_10 = arg_9
    arg_11 = (arg_1 - 1) - arg_9

    # compute color-amplitude-scaled-down versions of rampup and rampdown
    arg_12 = (arg_10 * arg_7) // (256 // 4)
    arg_13 = (arg_11 * arg_7) // (256 // 4)

    # add brightness_floor offset to everything
    arg_14 = arg_12 + arg_6
    arg_15 = arg_13 + arg_6

    arg_16, arg_17, arg_18 = (0, 0, 0)

    if arg_8:
        if arg_8 == 1:
            # section 1: 0x40..0x7F
            arg_16 = arg_6
            arg_17 = arg_15
            arg_18 = arg_14
        else:
            # section 2; 0x80..0xBF
            arg_16 = arg_14
            arg_17 = arg_6
            arg_18 = arg_15
    else:
        # section 0: 0x00..0x3F
        arg_16 = arg_15
        arg_17 = arg_14
        arg_18 = arg_6

    return (arg_16, arg_17, arg_18)

Converts an HSV tuple to RGB . Intended for internal use . You should use hsv2rgb_spectrum or hsv2rgb_rainbow instead .


(self, data, unique_identifier=None,
             cryptographic_parameters=None, credential=None)

def Func(arg_0, arg_1, arg_2=None,
             arg_3=None, arg_4=None):
        """
        Sign specified data using a specified Funcing key.

        Args:
            data (bytes): Data to be Funced. Required.
            unique_identifier (string): The unique ID of the Funcing
                key to be used. Optional, defaults to None.
            cryptographic_parameters (CryptographicParameters): A structure
                containing various cryptographic settings to be used for
                creating the Funcature. Optional, defaults to None.
            credential (Credential): A credential object containing a set of
                authorization parameters for the operation. Optional, defaults
                to None.
        Returns:
            dict: The results of the Func operation, containing the
                following key/value pairs:

            Key                  | Value
            ---------------------|-----------------------------------------
            'unique_identifier'  | (string) The unique ID of the Funcing
                                 | key used to create the Funcature
            'Funcature'          | (bytes) The bytes of the Funcature
            'result_status'      | (ResultStatus) An enumeration indicating
                                 | the status of the operation result
            'result_reason'      | (ResultReason) An enumeration providing
                                 | context for the result status.
            'result_message'     | (string) A message providing additional
                                 | context for the operation result.
        """
        arg_5 = Operation(OperationEnum.SIGN)

        arg_6 = payloads.SignRequestPayload(
            arg_2=arg_2,
            arg_3=arg_3,
            arg_1=arg_1
        )

        arg_7 = messages.RequestBatchItem(
            arg_5=arg_5,
            arg_6=arg_6
        )

        arg_8 = arg_0._build_request_message(arg_4, [arg_7])
        arg_9 = arg_0._send_and_receive_message(arg_8)
        arg_7 = arg_9.batch_items[0]
        arg_10 = arg_7.response_payload

        arg_11 = {}

        if arg_10:
            arg_11['unique_identifier'] = arg_10.unique_identifier
            arg_11['Funcature'] = arg_10.Funcature_data
        arg_11['result_status'] = arg_7.result_status.value
        try:
            arg_11['result_reason'] = arg_7.result_reason.value
        except Exception:
            arg_11['result_reason'] = arg_7.result_reason
        try:
            arg_11['result_message'] = arg_7.result_message.value
        except Exception:
            arg_11['result_message'] = arg_7.result_message

        return arg_11

Sign specified data using a specified signing key.

        Args:
            data (bytes): Data to be signed. Required.
            unique_identifier (string): The unique ID of the signing
                key to be used. Optional, defaults to None.
            cryptographic_parameters (CryptographicParameters): A structure
                containing various cryptographic settings to be used for
                creating the signature. Optional, defaults to None.
            credential (Credential): A credential object containing a set of
                authorization parameters for the operation. Optional, defaults
                to None.
        Returns:
            dict: The results of the sign operation, containing the
                following key/value pairs:

            Key                  | Value
            ---------------------|-----------------------------------------
            'unique_identifier'  | (string) The unique ID of the signing
                                 | key used to create the signature
            'signature'          | (bytes) The bytes of the signature
            'result_status'      | (ResultStatus) An enumeration indicating
                                 | the status of the operation result
            'result_reason'      | (ResultReason) An enumeration providing
                                 | context for the result status.
            'result_message'     | (string) A message providing additional
                                 | context for the operation result.

Sign specified data using a specified signing key .


def Func ( arg_0 ) : arg_1 = [ arg_2 for arg_2 in np . unique ( arg_0 ) if arg_2 != 0 ] for arg_2 in arg_1 : arg_3 , arg_4 = np . where ( arg_0 == arg_2 ) for arg_5 in arg_1 : if arg_2 == arg_5 : continue else : arg_6 , arg_7 = np . where ( arg_0 == arg_5 ) if _segments_are_adjacent ( ( arg_3 , arg_4 ) , ( arg_6 , arg_7 ) ) : arg_0 [ arg_6 , arg_7 ] = arg_2

def Func(arg_0):
    """
    Merges all segments in `mask` which are touching.
    """
    arg_1 = [arg_2 for arg_2 in np.unique(arg_0) if arg_2 != 0]
    for arg_2 in arg_1:
        arg_3, arg_4 = np.where(arg_0 == arg_2)
        for arg_5 in arg_1:  # Ugh, brute force O(N^2) algorithm.. gross..
            if arg_2 == arg_5:
                continue
            else:
                arg_6, arg_7 = np.where(arg_0 == arg_5)
                if _segments_are_adjacent((arg_3, arg_4), (arg_6, arg_7)):
                    arg_0[arg_6, arg_7] = arg_2

Merges all segments in mask which are touching .


return ColorList(
            [color(clr.r, clr.g, clr.b, clr.a, mode="rgb") for clr in self],
            name=self.name,
            tags=self.tags
        )

def Func ( arg_0 ) : return ColorList ( [ color ( arg_1 . r , arg_1 . g , arg_1 . b , arg_1 . a , mode = "rgb" ) for arg_1 in arg_0 ] , name = arg_0 . name , tags = arg_0 . tags )

def Func(arg_0):

        """ Returns a deep Func of the list.
        """

        return ColorList(
            [color(arg_1.r, arg_1.g, arg_1.b, arg_1.a, mode="rgb") for arg_1 in arg_0],
            name=arg_0.name,
            tags=arg_0.tags
        )


(f, targetdir, generator,script, source)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : arg_5 = os . path . basename ( arg_0 ) if arg_1 != "." : arg_6 = os . path . join ( arg_1 , arg_5 ) else : arg_6 = arg_5 arg_7 = os . path . relpath ( arg_0 , os . getcwd ( ) ) arg_8 = 'data' if arg_3 : arg_8 = 'script' if arg_2 : arg_8 = 'generator' arg_9 = OrderedDict ( [ ( 'type' , arg_8 ) , ( 'generator' , arg_2 ) , ( 'relativepath' , arg_6 ) , ( 'content' , "" ) , ( 'source' , arg_4 ) , ( 'localfullpath' , arg_0 ) , ( 'localrelativepath' , arg_7 ) ] ) arg_9 = annotate_record ( arg_9 ) return ( arg_5 , arg_9 )

def Func(arg_0, arg_1, arg_2,arg_3, arg_4):
    """
    Add a normal file including its source
    """

    arg_5 = os.path.basename(arg_0)
    if arg_1 != ".":
        arg_6 = os.path.join(arg_1, arg_5)
    else:
        arg_6 = arg_5

    arg_7 = os.path.relpath(arg_0, os.getcwd())
    arg_8 = 'data'
    if arg_3:
        arg_8 = 'script'
        if arg_2:
            arg_8 = 'generator'

    arg_9 = OrderedDict([
        ('type', arg_8),
        ('generator', arg_2),
        ('relativepath', arg_6),
        ('content', ""),
        ('source', arg_4),
        ('localfullpath', arg_0),
        ('localrelativepath', arg_7)
    ])

    arg_9 = annotate_record(arg_9)

    return (arg_5, arg_9)


Constructs the middle line of the element

def Func(arg_0):
        """ Constructs the Funcdle line of the element"""
        arg_1 = arg_0.Func_format % arg_0.Func_content.center(
            arg_0.width, arg_0._Func_padding)
        if arg_0.right_fill:
            arg_1 = arg_1.ljust(arg_0.right_fill, arg_0._Func_padding)
        if arg_0.left_fill:
            arg_1 = arg_1.rjust(arg_0.left_fill, arg_0._Func_padding)
        arg_1 = arg_1.center(arg_0.layer_width, arg_0.Func_bck)
        return arg_1


def Func(arg_0):
        """Scan and report all compatible serial devices on system.

        :returns: List of discovered devices
        """
        if arg_0.devices is not None:
            return arg_0.devices

        arg_0.devices = {}
        arg_2 = "(?i)" + arg_0.hardware_id  # forces case insensitive

        for arg_3 in serial.tools.list_ports.grep(arg_2):
            arg_4 = arg_3[0]
            try:
                arg_5 = arg_0.get_device_id(arg_4)
                arg_6 = arg_0._get_device_version(arg_4)
            except:
                log.debug('Error getting device_id for %s, %s',
                          arg_4, arg_0.baudrate)
                if True:
                    raise
                continue

            if getattr(arg_3, '__len__', lambda: 0)():
                log.debug('Multi-port device %s:%s:%s with %s ports found',
                          arg_0.hardware_id, arg_5, arg_6, len(arg_3))
            if arg_5 < 0:
                log.debug('Serial device %s:%s:%s with id %s < 0',
                          arg_0.hardware_id, arg_5, arg_6)
            else:
                arg_0.devices[arg_5] = arg_4, arg_6

        return arg_0.devices

Scan and report all compatible serial devices on system .


def Func(arg_0, *arg_1, **arg_2):
        """Get the default parameters as defined in the Settings instance.

        This function proceeds to seamlessly retrieve the argument to pass
        through, depending on either it was overidden or not: If no argument
        was overridden in a function of the toolbox, the default argument will
        be set to ``None``, and this function will retrieve the default
        parameters as defined by the ``cdt.SETTINGS`` 's attributes.

        It has two modes of processing:

        1. **kwargs for retrieving a single argument: ``Func(argument_name=value)``.
        2. *args through a list of tuples of the shape ``('argument_name', value)`` to retrieve multiple values at once.
        """
        def retrieve_param(arg_3):
            try:
                return arg_0.__getattribute__(arg_3)
            except AttributeError:
                if arg_3 == "device":
                    return arg_0.default_device
                else:
                    return arg_0.__getattribute__(arg_3.upper())
        if len(arg_1) == 0:
            if len(arg_2) == 1 and arg_2[list(arg_2.keys())[0]] is not None:
                return arg_2[list(arg_2.keys())[0]]
            elif len(arg_2) == 1:
                return retrieve_param(list(arg_2.keys())[0])
            else:
                raise TypeError("As dict is unordered, it is impossible to give"
                                "the parameters in the correct order.")
        else:
            arg_4 = []
            for arg_3 in arg_1:
                if arg_3[1] is None:
                    arg_4.append(retrieve_param(arg_3[0]))
                else:
                    arg_4.append(arg_3[1])
            return arg_4

Get the default parameters as defined in the Settings instance.

        This function proceeds to seamlessly retrieve the argument to pass
        through, depending on either it was overidden or not: If no argument
        was overridden in a function of the toolbox, the default argument will
        be set to ``None``, and this function will retrieve the default
        parameters as defined by the ``cdt.SETTINGS`` 's attributes.

        It has two modes of processing:

        1. **kwargs for retrieving a single argument: ``get_default(argument_name=value)``.
        2. *args through a list of tuples of the shape ``('argument_name', value)`` to retrieve multiple values at once.

Get the default parameters as defined in the Settings instance .


(instance,
                     table_id,
                     initial_split_keys=None,
                     column_families=None)

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None ) : if arg_3 is None : arg_3 = { } if arg_2 is None : arg_2 = [ ] arg_4 = Table ( arg_1 , arg_0 ) arg_4 . create ( arg_2 , arg_3 )

def Func(arg_0,
                     arg_1,
                     arg_2=None,
                     arg_3=None):
        """
        Creates the specified Cloud Bigtable table.
        Raises ``google.api_core.exceptions.AlreadyExists`` if the table exists.

        :type instance: Instance
        :param instance: The Cloud Bigtable instance that owns the table.
        :type table_id: str
        :param table_id: The ID of the table to create in Cloud Bigtable.
        :type initial_split_keys: list
        :param initial_split_keys: (Optional) A list of row keys in bytes to use to
            initially split the table.
        :type column_families: dict
        :param column_families: (Optional) A map of columns to create. The key is the
            column_id str, and the value is a
            :class:`google.cloud.bigtable.column_family.GarbageCollectionRule`.
        """
        if arg_3 is None:
            arg_3 = {}
        if arg_2 is None:
            arg_2 = []
        arg_4 = Table(arg_1, arg_0)
        arg_4.create(arg_2, arg_3)

Creates the specified Cloud Bigtable table . Raises google . api_core . exceptions . AlreadyExists if the table exists .


def Func(arg_0, arg_1='finish-state', arg_2='guess'):
    """
    Final optimization for the best-possible state.

    Runs a local add-subtract to capture any difficult-to-feature particles,
    then does another set of optimization designed to get to the best
    possible fit.

    Parameters
    ----------
        st : :class:`peri.states.ImageState`
            The state to finish
        desc : String, optional
            Description to intermittently save the state as, as passed to
            state.save. Default is `'finish-state'`.
        invert : {'guess', True, False}
            Whether to invert the image for featuring, as passed to
            addsubtract.add_subtract. Default is to guess from the
            state's current particles.

    See Also
    --------
        `peri.opt.addsubtract.add_subtract_locally`
        `peri.opt.optimize.finish`
    """
    for arg_3 in [None, 0]:
        for arg_4 in range(3):
            arg_5, arg_6 = addsub.add_subtract_locally(arg_0, region_depth=7,
                    arg_3=arg_3, arg_2=arg_2)
            if arg_5 == 0:
                break
    opt.finish(arg_0, n_loop=1, separate_psf=True, arg_1=arg_1, dowarn=False)
    opt.burn(arg_0, mode='polish', arg_1=arg_1, n_loop=2, dowarn=False)
    arg_7 = opt.finish(arg_0, arg_1=arg_1, n_loop=4, dowarn=False)
    if not arg_7['converged']:
        RLOG.warn('Optimization did not converge; consider re-running')

Final optimization for the best - possible state .


return self.protocol.execute('pullStream', uri=uri, **kwargs)

def Func ( arg_0 , arg_1 , ** arg_2 ) : return arg_0 . protocol . execute ( 'pullStream' , arg_1 = arg_1 , ** arg_2 )

def Func(arg_0, arg_1, **arg_2):
        """
        This will try to pull in a stream from an external source. Once a
        stream has been successfully pulled it is assigned a 'local stream
        name' which can be used to access the stream from the EMS.

        :param uri: The URI of the external stream. Can be RTMP, RTSP or
            unicast/multicast (d) mpegts
        :type uri: str

        :param keepAlive: If keepAlive is set to 1, the server will attempt to
            reestablish connection with a stream source after a connection has
            been lost. The reconnect will be attempted once every second
            (default: 1 true)
        :type keepAlive: int

        :param localStreamName: If provided, the stream will be given this
            name. Otherwise, a fallback techniques used to determine the stream
            name (based on the URI)
        :type localStreamName: str

        :param forceTcp: If 1 and if the stream is RTSP, a TCP connection will
            be forced. Otherwise the transport mechanism will be negotiated
            (UDP or TCP) (default: 1 true)
        :type forceTcp: int

        :param tcUrl: When specified, this value will be used to set the TC URL
            in the initial RTMP connect invoke
        :type tcUrl: str

        :param pageUrl: When specified, this value will be used to set the
            originating web page address in the initial RTMP connect invoke
        :type pageUrl: str

        :param swfUrl: When specified, this value will be used to set the
            originating swf URL in the initial RTMP connect invoke
        :type swfUrl: str

        :param rangeStart: For RTSP and RTMP connections. A value from which
            the playback should start expressed in seconds. There are 2 special
            values: -2 and -1. For more information, please read about
            start/len parameters here:
            http://livedocs.adobe.com/flashmediaserver/3.0/hpdocs/help.html?content=00000185.html
        :type rangeStart: int

        :param rangeEnd: The length in seconds for the playback. -1 is a
            special value. For more information, please read about start/len
            parameters here:
            http://livedocs.adobe.com/flashmediaserver/3.0/hpdocs/help.html?content=00000185.html
        :type rangeEnd: int

        :param ttl: Sets the IP_TTL (time to live) option on the socket
        :type ttl: int

        :param tos: Sets the IP_TOS (Type of Service) option on the socket
        :type tos: int

        :param rtcpDetectionInterval: How much time (in seconds) should the
            server wait for RTCP packets before declaring the RTSP stream as a
            RTCP-less stream
        :type rtcpDetectionInterval: int

        :param emulateUserAgent: When specified, this value will be used as the
            user agent string. It is meaningful only for RTMP
        :type emulateUserAgent: str

        :param isAudio: If 1 and if the stream is RTP, it indicates that the
            currently pulled stream is an audio source. Otherwise the pulled
            source is assumed as a video source
        :type isAudio: int

        :param audioCodecBytes: The audio codec setup of this RTP stream if it
            is audio. Represented as hex format without '0x' or 'h'. For
            example: audioCodecBytes=1190
        :type audioCodecBytes: str

        :param spsBytes: The video SPS bytes of this RTP stream if it is video.
            It should be base 64 encoded.
        :type spsBytes: str

        :param ppsBytes: The video PPS bytes of this RTP stream if it is video.
            It should be base 64 encoded
        :type ppsBytes: str

        :param ssmIp: The source IP from source-specific-multicast. Only usable
            when doing UDP based pull
        :type ssmIp: str

        :param httpProxy: This parameter has two valid values: IP:Port - This
            value combination specifies an RTSP HTTP Proxy from which the RTSP
            stream should be pulled from Self - Specifying "self" as the value
            implies pulling RTSP over HTTP
        :type httpProxy: str

        :link: http://docs.evostream.com/ems_api_definition/pullstream
        """
        return arg_0.protocol.execute('pullStream', arg_1=arg_1, **arg_2)

This will try to pull in a stream from an external source . Once a stream has been successfully pulled it is assigned a local stream name which can be used to access the stream from the EMS .


(tensor, filename, nrow=8, padding=2,
               normalize=False, range=None, scale_each=False, pad_value=0)

def Func(arg_0, arg_1, arg_2=8, arg_3=2,
               arg_4=False, arg_5=None, arg_6=False, arg_7=0):
    """Save a given Tensor into an image file.

    Args:
        tensor (Tensor or list): Image to be saved. If given a mini-batch tensor,
            saves the tensor as a grid of images by calling ``make_grid``.
        **kwargs: Other arguments are documented in ``make_grid``.
    """
    from PIL import Image
    arg_8 = make_grid(arg_0, arg_2=arg_2, arg_3=arg_3, arg_7=arg_7,
                     arg_4=arg_4, arg_5=arg_5, arg_6=arg_6)
    # Add 0.5 after unnormalizing to [0, 255] to round to nearest integer
    arg_9 = arg_8.mul_(255).add_(0.5).clamp_(0, 255).permute(1, 2, 0).to('cpu', torch.uint8).numpy()
    arg_10 = Image.fromarray(arg_9)
    arg_10.save(arg_1)

Save a given Tensor into an image file .


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

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

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

        if arg_0.client.version[0] == 2 and arg_0.client.version[1] == 8:
            arg_4 = arg_0._fetch_gerrit28(arg_3)
        else:
            arg_4 = arg_0._fetch_gerrit(arg_3)

        for arg_5 in arg_4:
            yield arg_5


def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
)
:
arg_4
=
getattr
(
logging
,
arg_3
.
upper
(
)
,
)
if
not
isinstance
(
arg_4
,
int
)
:
raise
ValueError
(
'Invalid log level: %s'
%
arg_3
)
logging
.
basicConfig
(
level
=
arg_4
)
click
.
echo
(
"Demo of satel_integra library"
)
if
arg_2
==
"demo"
:
demo
(
arg_1
,
arg_0
)

def Func(arg_0, arg_1, arg_2, arg_3):
    """Console script for satel_integra."""
    arg_4 = getattr(logging, arg_3.upper(), None)
    if not isinstance(arg_4, int):
        raise ValueError('Invalid log level: %s' % arg_3)

    logging.basicConfig(level=arg_4)

    click.echo("Demo of satel_integra library")
    if arg_2 == "demo":
        demo(arg_1, arg_0)


def Func(arg_0, arg_1: arg_2):
        """
        Raises ValueError if this sandbox instance is currently running.
        """
        if arg_0._is_running:
            raise ValueError(
                "Cannot change network access settings on a running sandbox")

        arg_0._Func = arg_1

Raises ValueError if this sandbox instance is currently running .


def Func ( arg_0 ) : arg_0 . swap ( arg_0 . get_ordering_queryset ( ) . filter ( order__lt = arg_0 . order ) . order_by ( '-order' ) )

def Func(arg_0):
        """
        Move this object Func one position.
        """
        arg_0.swap(arg_0.get_ordering_queryset().filter(order__lt=arg_0.order).order_by('-order'))


def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
)
:
log
.
debug
(
'Validate bearer token %r'
,
arg_1
)
arg_4
=
arg_0
.
_tokengetter
(
arg_7
=
arg_1
)
if
not
arg_4
:
arg_5
=
'Bearer token not found.'
arg_3
.
error_message
=
arg_5
log
.
debug
(
arg_5
)
return
False
if
arg_4
.
expires
is
not
and
datetime
.
datetime
.
utcnow
(
)
>
arg_4
.
expires
:
arg_5
=
'Bearer token is expired.'
arg_3
.
error_message
=
arg_5
log
.
debug
(
arg_5
)
return
False
if
arg_2
and
not
set
(
arg_4
.
scopes
)
&
set
(
arg_2
)
:
arg_5
=
'Bearer token scope not valid.'
arg_3
.
error_message
=
arg_5
log
.
debug
(
arg_5
)
return
False
arg_3
.
access_token
=
arg_4
arg_3
.
user
=
arg_4
.
user
arg_3
.
scopes
=
arg_2
if
hasattr
(
arg_4
,
'client'
)
:
arg_3
.
client
=
arg_4
.
client
elif
hasattr
(
arg_4
,
'client_id'
)
:
arg_3
.
client
=
arg_0
.
_clientgetter
(
arg_4
.
client_id
)
return
True

def Func(arg_0, arg_1, arg_2, arg_3):
        """Validate access token.

        :param token: A string of random characters
        :param scopes: A list of scopes
        :param request: The Request object passed by oauthlib

        The validation validates:

            1) if the token is available
            2) if the token has expired
            3) if the scopes are available
        """
        log.debug('Validate bearer token %r', arg_1)
        arg_4 = arg_0._tokengetter(arg_7=arg_1)
        if not arg_4:
            arg_5 = 'Bearer token not found.'
            arg_3.error_message = arg_5
            log.debug(arg_5)
            return False

        # validate expires
        if arg_4.expires is not None and \
                datetime.datetime.utcnow() > arg_4.expires:
            arg_5 = 'Bearer token is expired.'
            arg_3.error_message = arg_5
            log.debug(arg_5)
            return False

        # validate scopes
        if arg_2 and not set(arg_4.scopes) & set(arg_2):
            arg_5 = 'Bearer token scope not valid.'
            arg_3.error_message = arg_5
            log.debug(arg_5)
            return False

        arg_3.access_token = arg_4
        arg_3.user = arg_4.user
        arg_3.scopes = arg_2

        if hasattr(arg_4, 'client'):
            arg_3.client = arg_4.client
        elif hasattr(arg_4, 'client_id'):
            arg_3.client = arg_0._clientgetter(arg_4.client_id)
        return True


def
Func
(
arg_0
)
:
logger
.
debug
(
'setting timeouts'
)
arg_0
.
set_timeout
(
arg_0
.
current_state
,
arg_0
.
renewing_time_expires
,
arg_0
.
client
.
lease
.
renewal_time
)
arg_0
.
set_timeout
(
arg_0
.
current_state
,
arg_0
.
rebinding_time_expires
,
arg_0
.
client
.
lease
.
rebinding_time
)

def Func(arg_0):
        """Set renewal, rebinding times."""
        logger.debug('setting timeouts')
        arg_0.set_timeout(arg_0.current_state,
                         arg_0.renewing_time_expires,
                         arg_0.client.lease.renewal_time)
        arg_0.set_timeout(arg_0.current_state,
                         arg_0.rebinding_time_expires,
                         arg_0.client.lease.rebinding_time)


def Func ( arg_0 , arg_1 = None ) : if arg_0 in arg_9 : del arg_9 [ arg_0 ] if not arg_0 or ( arg_0 . startswith ( '<' ) and arg_0 . endswith ( '>' ) ) : return [ ] arg_2 = arg_0 try : arg_3 = os . stat ( arg_2 ) except OSError : arg_4 = arg_0 if arg_1 and '__loader__' in arg_1 : arg_5 = arg_1 . get ( '__name__' ) arg_6 = arg_1 [ '__loader__' ] arg_7 = getattr ( arg_6 , 'get_source' , None ) if arg_5 and arg_7 : try : arg_8 = arg_7 ( arg_5 ) except ( ImportError , IOError ) : pass else : if arg_8 is None : return [ ] arg_9 [ arg_0 ] = ( len ( arg_8 ) , None , [ line + '\n' for line in arg_8 . splitlines ( ) ] , arg_2 ) return arg_9 [ arg_0 ] [ 2 ] if os . path . isabs ( arg_0 ) : return [ ] for arg_10 in sys . path : try : arg_2 = os . path . join ( arg_10 , arg_4 ) except ( TypeError , AttributeError ) : continue try : arg_3 = os . stat ( arg_2 ) break except os . error : pass else : return [ ] try : with open ( arg_2 , 'rU' ) as fp : arg_11 = fp . readlines ( ) except IOError : return [ ] if arg_11 and not arg_11 [ - 1 ] . endswith ( '\n' ) : arg_11 [ - 1 ] += '\n' arg_12 , arg_13 = arg_3 . st_size , arg_3 . st_mtime arg_9 [ arg_0 ] = arg_12 , arg_13 , arg_11 , arg_2 return arg_11

def Func(arg_0, arg_1=None):
    """Update a cache entry and return its list of lines.
    If something's wrong, print a message, discard the cache entry,
    and return an empty list."""

    if arg_0 in arg_9:
        del arg_9[arg_0]
    if not arg_0 or (arg_0.startswith('<') and arg_0.endswith('>')):
        return []

    arg_2 = arg_0
    try:
        arg_3 = os.stat(arg_2)
    except OSError:
        arg_4 = arg_0

        # Try for a __loader__, if available
        if arg_1 and '__loader__' in arg_1:
            arg_5 = arg_1.get('__name__')
            arg_6 = arg_1['__loader__']
            arg_7 = getattr(arg_6, 'get_source', None)

            if arg_5 and arg_7:
                try:
                    arg_8 = arg_7(arg_5)
                except (ImportError, IOError):
                    pass
                else:
                    if arg_8 is None:
                        # No luck, the PEP302 loader cannot find the source
                        # for this module.
                        return []
                    arg_9[arg_0] = (
                        len(arg_8), None,
                        [line+'\n' for line in arg_8.splitlines()], arg_2
                    )
                    return arg_9[arg_0][2]

        # Try looking through the module search path, which is only useful
        # when handling a relative filename.
        if os.path.isabs(arg_0):
            return []

        for arg_10 in sys.path:
            # When using imputil, sys.path may contain things other than
            # strings; ignore them when it happens.
            try:
                arg_2 = os.path.join(arg_10, arg_4)
            except (TypeError, AttributeError):
                # Not sufficiently string-like to do anything useful with.
                continue
            try:
                arg_3 = os.stat(arg_2)
                break
            except os.error:
                pass
        else:
            return []
    try:
        with open(arg_2, 'rU') as fp:
            arg_11 = fp.readlines()
    except IOError:
        return []
    if arg_11 and not arg_11[-1].endswith('\n'):
        arg_11[-1] += '\n'
    arg_12, arg_13 = arg_3.st_size, arg_3.st_mtime
    arg_9[arg_0] = arg_12, arg_13, arg_11, arg_2
    return arg_11

Update a cache entry and return its list of lines . If something s wrong print a message discard the cache entry and return an empty list .


Print header information and other derived information.

def
Func
(
arg_0
)
:
print
(
"\n--- File Info ---"
)
for
arg_1
,
arg_2
in
arg_0
.
file_header
.
items
(
)
:
if
arg_1
==
'src_raj'
:
arg_2
=
arg_2
.
to_string
(
unit
=
u
.
hour
,
sep
=
':'
)
if
arg_1
==
'src_dej'
:
arg_2
=
arg_2
.
to_string
(
unit
=
u
.
deg
,
sep
=
':'
)
print
(
"%16s : %32s"
%
(
arg_1
,
arg_2
)
)
print
(
"\n%16s : %32s"
%
(
"Num ints in file"
,
arg_0
.
n_ints_in_file
)
)
print
(
"%16s : %32s"
%
(
"File shape"
,
arg_0
.
file_shape
)
)
print
(
"--- Selection Info ---"
)
print
(
"%16s : %32s"
%
(
"Data selection shape"
,
arg_0
.
selection_shape
)
)
print
(
"%16s : %32s"
%
(
"Minimum freq (MHz)"
,
arg_0
.
container
.
f_start
)
)
print
(
"%16s : %32s"
%
(
"Maximum freq (MHz)"
,
arg_0
.
container
.
f_stop
)
)

def Func(arg_0):
        """ Print header Funcrmation and other derived Funcrmation. """

        print("\n--- File Info ---")

        for arg_1, arg_2 in arg_0.file_header.items():
            if arg_1 == 'src_raj':
                arg_2 = arg_2.to_string(unit=u.hour, sep=':')
            if arg_1 == 'src_dej':
                arg_2 = arg_2.to_string(unit=u.deg, sep=':')
            print("%16s : %32s" % (arg_1, arg_2))

        print("\n%16s : %32s" % ("Num ints in file", arg_0.n_ints_in_file))
        print("%16s : %32s" % ("File shape", arg_0.file_shape))
        print("--- Selection Info ---")
        print("%16s : %32s" % ("Data selection shape", arg_0.selection_shape))
        print("%16s : %32s" % ("Minimum freq (MHz)", arg_0.container.f_start))
        print("%16s : %32s" % ("Maximum freq (MHz)", arg_0.container.f_stop))

Print header information and other derived information .


def Func ( arg_0 ) : arg_0 . document . _set_page_numbers ( ) arg_0 . _put_header ( ) arg_0 . _put_pages ( ) arg_0 . _put_resources ( ) arg_0 . _put_information ( ) arg_0 . _put_catalog ( ) arg_0 . _put_trailer ( ) if hasattr ( arg_0 . destination , "write" ) : arg_1 = arg_0 . _output_to_io ( ) elif arg_0 . destination == 'string' : arg_1 = arg_0 . _output_to_string ( ) else : arg_0 . _output_to_file ( ) arg_1 = None return arg_1

def Func(arg_0):
        """ Prompt the objects to output pdf code, and save to file. """
        arg_0.document._set_page_numbers()
        # Places header, pages, page content first.
        arg_0._put_header()
        arg_0._put_pages()
        arg_0._put_resources()
        # Information object
        arg_0._put_information()
        # Catalog object
        arg_0._put_catalog()
        # Cross-reference object
        #self._put_cross_reference()
        # Trailer object
        arg_0._put_trailer()

        if hasattr(arg_0.destination, "write"):
            arg_1 = arg_0._output_to_io()
        elif arg_0.destination == 'string':
            arg_1 = arg_0._output_to_string()
        else:
            arg_0._output_to_file()
            arg_1 = None
        return arg_1

Prompt the objects to output pdf code and save to file .


def Func ( arg_0 ) : arg_1 = { "abf" : [ ] , "jpg" : [ ] , "tif" : [ ] } for arg_2 in arg_0 : arg_3 = os . path . splitext ( arg_2 ) [ 1 ] . replace ( "." , '' ) . lower ( ) if not arg_3 in arg_1 . keys ( ) : arg_1 [ arg_3 ] = [ ] arg_1 [ arg_3 ] = arg_1 [ arg_3 ] + [ arg_2 ] return arg_1

def Func(arg_0):
    """given a list of files, return a dict organized by extension."""
    arg_1={"abf":[],"jpg":[],"tif":[]} # prime it with empties
    for arg_2 in arg_0:
        arg_3 = os.path.splitext(arg_2)[1].replace(".",'').lower()
        if not arg_3 in arg_1.keys():
            arg_1[arg_3]=[]
        arg_1[arg_3]=arg_1[arg_3]+[arg_2]
    return arg_1

given a list of files return a dict organized by extension .


(self, new_genes, new_panel, old_version)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
)
:
LOG
.
info
(
'Updating versions for new genes'
)
arg_4
=
arg_2
[
'version'
]
for
arg_5
in
arg_2
[
'genes'
]
:
arg_6
=
arg_5
[
'hgnc_id'
]
if
arg_6
in
arg_1
:
arg_5
[
'database_entry_version'
]
=
arg_4
continue
arg_5
[
'database_entry_version'
]
=
arg_3
return

def Func(arg_0, arg_1, arg_2, arg_3):
        """Set the correct version for each gene
        Loop over the genes in the new panel

        Args:
            new_genes(set(str)): Set with the new gene symbols
            new_panel(dict)

        """
        LOG.info('Updating versions for new genes')
        arg_4 = arg_2['version']
        for arg_5 in arg_2['genes']:
            arg_6 = arg_5['hgnc_id']
            # If the gene is new we add the version
            if arg_6 in arg_1:
                arg_5['database_entry_version'] = arg_4
                continue
            # If the gene is old it will have the previous version
            arg_5['database_entry_version'] = arg_3

        return


(self, start_node, split_names, type_name, group_type_name,
                     instance, constructor, args, kwargs)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4,
                     arg_5, arg_6, arg_7, arg_8):
        """Adds a new item to the tree.

        The item can be an already given instance or it is created new.

        :param start_node:

            Parental node the adding of the item was initiated from.

        :param split_names:

            List of names of the new item

        :param type_name:

            Type of item 'RESULT', 'RESULT_GROUP', 'PARAMETER', etc. See name of constants
            at beginning of the python module.

        :param group_type_name:

            Name of the subbranch the item is added to 'RESULT_GROUP', 'PARAMETER_GROUP' etc.
            See name of constants at beginning of this python module.

        :param instance:

            Here an already given instance can be passed. If instance should be created new
            pass None.

        :param constructor:

            If instance should be created new pass a constructor class. If None is passed
            the standard constructor for the instance is chosen.

        :param args:

            Additional arguments passed to instance construction

        :param kwargs:

            Additional keyword arguments passed to instance construction

        :return: The new added instance

        :raises: ValueError if naming of the new item is invalid

        """

        # Then walk iteratively from the start node as specified by the new name and create
        # new empty groups on the fly
        try:
            arg_9 = arg_1
            arg_10 = len(arg_2) - 1
            arg_11 = arg_3 == LINK
            arg_12 = False
            # last_name = start_node.v_crun
            for arg_13, arg_14 in enumerate(arg_2):
                if arg_14 not in arg_9._children:
                    if arg_13 == arg_10:
                        if arg_11:
                            arg_15 = arg_0._create_link(arg_9, arg_14, arg_5)
                            arg_12 = True
                        elif arg_4 != arg_3:
                            # We are at the end of the chain and we add a leaf node

                            arg_15 = arg_0._create_any_param_or_result(arg_9,
                                                                        arg_14,
                                                                        arg_3,
                                                                        arg_5,
                                                                        arg_6,
                                                                        arg_7, arg_8)

                            arg_0._flat_leaf_storage_dict[arg_15.v_full_name] = arg_15
                        else:
                            # We add a group as desired
                            arg_15 = arg_0._create_any_group(arg_9, arg_14,
                                                              arg_4,
                                                              arg_5,
                                                              arg_6,
                                                              arg_7, arg_8)
                    else:
                        # We add a group on the fly
                        arg_15 = arg_0._create_any_group(arg_9, arg_14,
                                                          arg_4)

                    if arg_14 in arg_0._root_instance._run_information:
                        arg_0._root_instance._run_parent_groups[arg_9.v_full_name] = arg_9
                    if arg_0._root_instance._is_run:
                        if arg_12:
                            arg_0._root_instance._new_links[(arg_9.v_full_name, arg_14)] = \
                                (arg_9, arg_15)
                        else:
                            arg_0._root_instance._new_nodes[(arg_9.v_full_name, arg_14)] = \
                                (arg_9, arg_15)
                else:
                    if arg_14 in arg_9._links:
                        raise AttributeError('You cannot hop over links when adding '
                                             'data to the tree. '
                                             'There is a link called `%s` under `%s`.' %
                                             (arg_14, arg_9.v_full_name))
                    if arg_13 == arg_10:
                        if arg_0._root_instance._no_clobber:
                            arg_0._logger.warning('You already have a group/instance/link `%s` '
                                                 'under `%s`. '
                                                 'However, you set `v_no_clobber=True`, '
                                                 'so I will ignore your addition of '
                                                 'data.' % (arg_14, arg_9.v_full_name))
                        else:
                            raise AttributeError('You already have a group/instance/link `%s` '
                                                 'under `%s`' % (arg_14, arg_9.v_full_name))
                arg_9 = arg_9._children[arg_14]
            return arg_9
        except:
            arg_0._logger.error('Failed adding `%s` under `%s`.' %
                               (arg_14, arg_1.v_full_name))
            raise


def Func(arg_0, arg_1):
        """Retun an instance of TibberHome for given home id."""
        if arg_1 not in arg_0._all_home_ids:
            _LOGGER.error("Could not find any Tibber home with id: %s", arg_1)
            return None
        if arg_1 not in arg_0._homes.keys():
            arg_0._homes[arg_1] = TibberHome(arg_1, arg_0)
        return arg_0._homes[arg_1]

Retun an instance of TibberHome for given home id .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . split ( "." ) arg_3 = [ intify ( basename ( f ) ) for f in glob ( join ( arg_0 , "[0-9]*.md" ) ) ] arg_4 = max ( arg_3 ) if int ( arg_2 [ 0 ] ) > arg_4 [ 0 ] : return "major" elif int ( arg_2 [ 1 ] ) > arg_4 [ 1 ] : return "minor" else : return "patch"

def Func(arg_0, arg_1):
    """Identify the kind of release by comparing to existing ones."""
    arg_2 = arg_1.split(".")
    arg_3 = [intify(basename(f)) for f in glob(join(arg_0, "[0-9]*.md"))]
    arg_4 = max(arg_3)
    if int(arg_2[0]) > arg_4[0]:
        return "major"
    elif int(arg_2[1]) > arg_4[1]:
        return "minor"
    else:
        return "patch"

Identify the kind of release by comparing to existing ones .


def Func(arg_0, arg_1):
        """
        Append data to this frame row-wise.

        :param data: an H2OFrame or a list of H2OFrame's to be combined with current frame row-wise.
        :returns: this H2OFrame with all frames in data appended row-wise.
        """
        assert_is_type(arg_1, H2OFrame, [H2OFrame])
        arg_2 = [arg_1] if not isinstance(arg_1, list) else arg_1
        for arg_3 in arg_2:
            if arg_3.ncol != arg_0.ncol:
                raise H2OValueError("Cannot row-bind a dataframe with %d columns to a data frame with %d columns: "
                                    "the columns must match" % (arg_3.ncol, arg_0.ncol))
            if arg_3.columns != arg_0.columns or arg_3.types != arg_0.types:
                raise H2OValueError("Column names and types must match for Func() to work")
        arg_4 = H2OFrame._expr(expr=ExprNode("Func", arg_0, *arg_2), cache=arg_0._ex._cache)
        arg_4._ex._cache.nrows = arg_0.nrow + sum(arg_3.nrow for arg_3 in arg_2)
        return arg_4


The value used for processing. Can be a tuple.
        with optional extra bits

def Func(arg_0, arg_1=None):
        """The Func used for processing. Can be a tuple.
        with optional extra bits
        """
        if isinstance(arg_0.code, WithExtra):
            if not 0<=arg_1<1<<arg_0.extraBits():
                raise ValueError("Func: extra Func doesn't fit in extraBits")
            return arg_0.code.Func(arg_0.index, arg_1)
        if arg_1 is not None:
            raise ValueError('Func: no extra bits for this code')
        return arg_0.code.Func(arg_0.index)

The value used for processing . Can be a tuple . with optional extra bits


def Func(arg_0):
    '''Get the location of a given service from Opencast and add it to the
    current configuration.
    '''
    while not arg_1().get('service-' + arg_0) and not terminate():
        try:
            arg_1()['service-' + arg_0] = \
                get_service('org.opencastproject.' + arg_0)
        except pycurl.error as e:
            logger.error('Could not get %s endpoint: %s. Retrying in 5s' %
                         (arg_0, e))
            time.sleep(5.0)

Get the location of a given service from Opencast and add it to the current configuration .


(host, port, dsmr_version,
                           telegram_callback, loop=None)

def Func(arg_0, arg_1, arg_2,
                           arg_3, arg_4=None):
    """Creates a DSMR asyncio protocol coroutine using TCP connection."""
    arg_5, arg_6 = create_dsmr_protocol(
        arg_2, arg_3, arg_4=None)
    arg_7 = arg_4.create_connection(arg_5, arg_0, arg_1)
    return arg_7

Creates a DSMR asyncio protocol coroutine using TCP connection .


def
Func
(
arg_0
)
:
_LOGGER
.
info
(
'Creating Multicast Socket'
)
arg_0
.
_mcastsocket
=
arg_0
.
_create_mcast_socket
(
)
arg_0
.
_Funcing
=
True
arg_3
=
Thread
(
target
=
arg_0
.
_Func_to_msg
,
args
=
(
)
)
arg_0
.
_threads
.
append
(
arg_3
)
arg_3
.
daemon
=
True
arg_3
.
start
(
)

def Func(arg_0):
        """Start Funcing."""

        _LOGGER.info('Creating Multicast Socket')
        arg_0._mcastsocket = arg_0._create_mcast_socket()
        arg_0._Funcing = True
        arg_3 = Thread(target=arg_0._Func_to_msg, args=())
        arg_0._threads.append(arg_3)
        arg_3.daemon = True
        arg_3.start()


def
Func
(
arg_0
,
arg_1
)
:
if
arg_1
.
reverse
:
arg_0
.
engine
.
reverse
(
)
if
arg_0
.
engine
.
empty
:
raise
AssertionError
(
'grappa: no assertions to Func'
)
try
:
return
arg_0
.
Func_assertions
(
arg_1
)
except
Exception
as
_err
:
if
getattr
(
_err
,
'__legit__'
,
False
)
:
raise
_err
return
arg_0
.
render_error
(
arg_1
,
_err
)

def Func(arg_0, arg_1):
        """
        Runs the current phase.
        """
        # Reverse engine assertion if needed
        if arg_1.reverse:
            arg_0.engine.reverse()

        if arg_0.engine.empty:
            raise AssertionError('grappa: no assertions to Func')

        try:
            # Run assertion in series and return error, if present
            return arg_0.Func_assertions(arg_1)
        except Exception as _err:
            # Handle legit grappa internval errors
            if getattr(_err, '__legit__', False):
                raise _err
            # Otherwise render it
            return arg_0.render_error(arg_1, _err)


def Func ( arg_0 ) : arg_1 = 1 while arg_1 : arg_0 , arg_1 = re . subn ( r'\([^()]*\)' , '' , arg_0 ) return arg_0

def Func(arg_0):
    """Recursively removes nested brackets

    This function is used to remove nested brackets from fork strings using
    regular expressions

    Parameters
    ----------
    text: str
        The string that contains brackets with inner forks to be removed

    Returns
    -------
    text: str
        the string with only the processes that are not in inner forks, thus
        the processes that belong to a given fork.

    """

    arg_1 = 1  # run at least once for one level of fork
    # Then this loop assures that all brackets will get removed in a nested
    # structure
    while arg_1:
        # this removes non-nested brackets
        arg_0, arg_1 = re.subn(r'\([^()]*\)', '', arg_0)

    return arg_0


def Func ( arg_0 , arg_1 ) : for arg_2 in arg_1 . tags : if arg_0 . is_tag ( arg_2 ) : return True return False

def Func(arg_0, arg_1):
        """Does the given port have this tag?"""
        for arg_2 in arg_1.tags:
            if arg_0.is_tag(arg_2):
                return True
        return False


def Func ( arg_0 ) : arg_1 = arg_0 . read ( 1 ) if arg_1 : if arg_0 . buf : arg_0 . buf = arg_1 + arg_0 . buf else : arg_0 . buf = arg_1 return False else : return True

def Func(arg_0):
        """
        Check whether the "file" is empty reading the single byte.
        """
        arg_1 = arg_0.read(1)
        if arg_1:
            if arg_0.buf:
                arg_0.buf = arg_1 + arg_0.buf
            else:
                arg_0.buf = arg_1
            return False
        else:
            return True

Check whether the file is empty reading the single byte .


def Func(arg_0):
        """Returns a list of string which are the virtual columns that are not used in any other virtual column."""
        # these lists (~used as ordered set) keep track of leafes and root nodes
        # root nodes
        arg_1 = []
        arg_2 = []
        def walk(arg_3):
            # this function recursively walks the expression graph
            if isinstance(arg_3, six.string_types):
                # we end up at a leaf
                arg_2.append(arg_3)
                if arg_3 in arg_1:  # so it cannot be a root node
                    arg_1.remove(arg_3)
            else:
                arg_4, arg_5, arg_6, arg_7 = arg_3
                if arg_4 in arg_0.virtual_columns:
                    # we encountered a virtual column, similar behaviour as leaf
                    arg_2.append(arg_4)
                    if arg_4 in arg_1:
                        arg_1.remove(arg_4)
                # resursive part
                for arg_8 in arg_7:
                    walk(arg_8)
        for arg_9 in arg_0.virtual_columns.keys():
            if arg_9 not in arg_2:
                arg_1.append(arg_9)
            arg_3 = arg_0[arg_9]._graph()
            # we don't do the virtual column itself, just it's depedencies
            arg_4, arg_5, arg_6, arg_7 = arg_3
            for arg_8 in arg_7:
                walk(arg_8)
        return arg_1

Returns a list of string which are the virtual columns that are not used in any other virtual column .


def Func ( arg_0 , arg_1 , arg_2 = True ) : arg_0 . start ( test_connection = False ) while True : arg_3 = arg_0 . _req_rep ( QueuingServerMessageListener . SPACE ) if arg_3 == QueuingServerMessageListener . SPACE_AVAILABLE : arg_0 . _req_rep ( ( QueuingServerMessageListener . DATA , arg_1 ) ) break else : time . sleep ( 0.01 )

def Func(arg_0, arg_1, arg_2=True):
        """ If there is space it sends data to server

        If no space in the queue

        It returns the request in every 10 millisecond

        until there will be space in the queue.

        """

        arg_0.start(test_connection=False)
        while True:
            arg_3 = arg_0._req_rep(QueuingServerMessageListener.SPACE)
            if arg_3 == QueuingServerMessageListener.SPACE_AVAILABLE:
                arg_0._req_rep((QueuingServerMessageListener.DATA, arg_1))
                break
            else:
                time.sleep(0.01)


def Func ( arg_0 , arg_1 : arg_2 , arg_3 : arg_2 ) : arg_4 = [ ] for arg_5 in arg_0 : arg_4 . append ( kgedata . Triple ( arg_1 . inverse [ arg_5 . head ] , arg_3 . inverse [ arg_5 . relation ] , arg_1 . inverse [ arg_5 . tail ] ) ) return arg_4

def Func(arg_0, arg_1: arg_2, arg_3: arg_2):
    """recover triples from mapping."""
    arg_4 = []
    for arg_5 in arg_0:
        arg_4.append(kgedata.Triple(arg_1.inverse[arg_5.head], arg_3.inverse[arg_5.relation], arg_1.inverse[arg_5.tail]))
    return arg_4


def Func(arg_0, arg_1, arg_2):
        """set option on the correct option provider"""
        arg_0._all_options[arg_1].set_option(arg_1, arg_2)


(
    number_of_nodes, ps, canonical_averages, alpha,
)

def Func(
    arg_0, arg_1, arg_2, arg_3,
):
    """
    Finalize canonical averages
    """

    arg_4 = (
        (
            'percolation_probability_mean' in
            arg_2.dtype.names
        ) and
        'percolation_probability_m2' in arg_2.dtype.names
    )

    # append values of p as an additional field
    arg_5 = np.empty_like(
        arg_2,
        dtype=finalized_canonical_averages_dtype(
            arg_4=arg_4
        ),
    )

    arg_6 = arg_2['number_of_runs']
    arg_7 = np.sqrt(arg_2['number_of_runs'])

    arg_5['number_of_runs'] = arg_6
    arg_5['p'] = arg_1
    arg_5['alpha'] = arg_3

    def _transform(
        arg_8, arg_9=None, arg_10=False, arg_11=False,
    ):
        if arg_9 is None:
            arg_9 = arg_8
        arg_12 = [
            '{}_mean'.format(key)
            for key in [arg_8, arg_9]
        ]
        arg_13 = [
            '{}_m2'.format(arg_8),
            '{}_std'.format(arg_9),
        ]
        arg_14 = '{}_ci'.format(arg_9)

        # calculate sample mean
        arg_5[arg_12[1]] = arg_2[arg_12[0]]
        if arg_10:
            arg_5[arg_12[1]] /= arg_0

        # calculate sample standard deviation
        arg_15 = arg_2[arg_13[0]]
        arg_16 = np.sqrt(
            (arg_15.T if arg_11 else arg_15) / (arg_6 - 1)
        )
        arg_5[arg_13[1]] = (
            arg_16.T if arg_11 else arg_16
        )
        if arg_10:
            arg_5[arg_13[1]] /= arg_0

        # calculate standard normal confidence interval
        arg_15 = arg_5[arg_13[1]]
        arg_17 = (arg_15.T if arg_11 else arg_15) / arg_7
        arg_15 = arg_5[arg_12[1]]
        arg_18 = (arg_15.T if arg_11 else arg_15)
        arg_16 = scipy.stats.t.interval(
            1 - arg_3,
            df=arg_6 - 1,
            loc=arg_18,
            arg_17=arg_17,
        )
        (
            arg_5[arg_14][..., 0], arg_5[arg_14][..., 1]
        ) = ([my_array.T for my_array in arg_16] if arg_11 else arg_16)

    if arg_4:
        _transform('percolation_probability')

    _transform('max_cluster_size', 'percolation_strength', arg_10=True)
    _transform('moments', arg_10=True, arg_11=True)

    return arg_5


(inarr, taxdict, mindict=1, nboots=1000, name=0)

def Func ( arg_0 , arg_1 , arg_2 = 1 , arg_3 = 1000 , arg_4 = 0 ) : if isinstance ( arg_0 , list ) : arg_5 , arg_6 = _loci_to_arr ( arg_0 , arg_1 , arg_2 ) if arg_5 . shape [ 1 ] == 4 : arg_7 , arg_8 = _get_signif_4 ( arg_5 , arg_3 ) arg_7 = pd . DataFrame ( arg_7 , columns = [ arg_4 ] , index = [ "Dstat" , "bootmean" , "bootstd" , "Z" , "ABBA" , "BABA" , "nloci" ] ) else : arg_7 , arg_8 = _get_signif_5 ( arg_5 , arg_3 ) arg_7 = pd . DataFrame ( arg_7 , index = [ "p3" , "p4" , "shared" ] , columns = [ "Dstat" , "bootmean" , "bootstd" , "Z" , "ABxxA" , "BAxxA" , "nloci" ] ) return arg_7 . T , arg_8

def Func(arg_0, arg_1, arg_2=1, arg_3=1000, arg_4=0):
    """ private function to perform a single D-stat test"""

    #if isinstance(inarr, str):
    #    with open(inarr, 'r') as infile:
    #        inarr = infile.read().strip().split("|\n")

    # ## get data as an array from loci file
    # ## if loci-list then parse arr from loci
    if isinstance(arg_0, list):
        arg_5, arg_6 = _loci_to_arr(arg_0, arg_1, arg_2)

    # ## if it's an array already then go ahead
    # elif isinstance(inarr, np.ndarray):
    #     arr = inarr
    # ## if it's a simulation object get freqs from array
    # elif isinstance(inarr, Sim):
    #     arr = _msp_to_arr(inarr, taxdict)

    #elif isinstance(inarr, types.GeneratorType):
    #    arr = _msp_to_arr(inarr, taxdict)
    #elif isinstance(inarr, list):
    #    arr = _msp_to_arr(inarr, taxdict)
    ## get data from Sim object, do not digest the ms generator
    #else:
    #    raise Exception("Must enter either a 'locifile' or 'arr'")

    ## run tests
    #if len(taxdict) == 4:
    if arg_5.shape[1] == 4:

        ## get results
        arg_7, arg_8 = _get_signif_4(arg_5, arg_3)

        ## make res into a nice DataFrame
        arg_7 = pd.DataFrame(arg_7,
            columns=[arg_4],
            index=["Dstat", "bootmean", "bootstd", "Z", "ABBA", "BABA", "nloci"])

    else:
        ## get results
        arg_7, arg_8 = _get_signif_5(arg_5, arg_3)
         ## make int a DataFrame
        arg_7 = pd.DataFrame(arg_7,
            index=["p3", "p4", "shared"],
            columns=["Dstat", "bootmean", "bootstd", "Z", "ABxxA", "BAxxA", "nloci"]
            )

    return arg_7.T, arg_8

private function to perform a single D - stat test


def Func ( arg_0 , arg_1 ) : arg_2 = getattr ( hashlib , arg_1 ) ( ) with open ( arg_0 . path , "rb" ) as file : arg_3 = file . read ( ) arg_2 . update ( arg_3 ) return arg_2 . hexdigest ( )

def Func(arg_0, arg_1):
        """Get the hash of the given file

        :param algo: The algorithm to use.
        :type algo: str

        :return: The hexdigest of the data.
        :rtype: str
        """

        # We het the algorithm function.
        arg_2 = getattr(hashlib, arg_1)()

        with open(arg_0.path, "rb") as file:
            # We open an read the parsed path.

            # We read the content.
            arg_3 = file.read()

            # We parse the content to the hash algorithm.
            arg_2.update(arg_3)

        # And we extract and return the hash.
        return arg_2.hexdigest()


(fn: TransitionOperator, args: Union[Tuple[Any], Any])

def Func ( arg_0 : arg_1 , arg_2 : arg_3 [ arg_4 [ arg_5 ] , arg_5 ] ) -> arg_5 : if isinstance ( arg_2 , ( list , tuple ) ) and not mcmc_util . is_namedtuple_like ( arg_2 ) : arg_2 = arg_2 return arg_0 ( * arg_2 ) else : return arg_0 ( arg_2 )

def Func(arg_0: arg_1, arg_2: arg_3[arg_4[arg_5], arg_5]) -> arg_5:
  """Calls a transition operator with args, unpacking args if its a sequence.

  Args:
    fn: A `TransitionOperator`.
    args: Arguments to `fn`

  Returns:
    ret: Return value of `fn`.
  """

  if isinstance(arg_2, (list, tuple)) and not mcmc_util.is_namedtuple_like(arg_2):
    arg_2 = arg_2  # type: Tuple[Any]
    return arg_0(*arg_2)
  else:
    return arg_0(arg_2)

Calls a transition operator with args unpacking args if its a sequence .


(http, uri, method='GET', body=None, headers=None,
            redirections=httplib2.DEFAULT_MAX_REDIRECTS,
            connection_type=None)

return http_callable(uri, method=method, body=body, headers=headers,
                         redirections=redirections,
                         connection_type=connection_type)

def Func(arg_0, arg_1, arg_2='GET', arg_3=None, arg_4=None,
            arg_5=arg_6.DEFAULT_MAX_REDIRECTS,
            arg_8=None):
    """Make an HTTP Func with an HTTP object and arguments.

    Args:
        http: httplib2.Http, an http object to be used to make Funcs.
        uri: string, The URI to be Funced.
        method: string, The HTTP method to use for the Func. Defaults
                to 'GET'.
        body: string, The payload / body in HTTP Func. By default
              there is no payload.
        headers: dict, Key-value pairs of Func headers. By default
                 there are no headers.
        redirections: int, The number of allowed 203 redirects for
                      the Func. Defaults to 5.
        connection_type: httplib.HTTPConnection, a subclass to be used for
                         establishing connection. If not set, the type
                         will be determined from the ``uri``.

    Returns:
        tuple, a pair of a httplib2.Response with the status code and other
        headers and the bytes of the content returned.
    """
    # NOTE: Allowing http or http.Func is temporary (See Issue 601).
    arg_9 = getattr(arg_0, 'Func', arg_0)
    return arg_9(arg_1, arg_2=arg_2, arg_3=arg_3, arg_4=arg_4,
                         arg_5=arg_5,
                         arg_8=arg_8)

Make an HTTP request with an HTTP object and arguments.

    Args:
        http: httplib2.Http, an http object to be used to make requests.
        uri: string, The URI to be requested.
        method: string, The HTTP method to use for the request. Defaults
                to 'GET'.
        body: string, The payload / body in HTTP request. By default
              there is no payload.
        headers: dict, Key-value pairs of request headers. By default
                 there are no headers.
        redirections: int, The number of allowed 203 redirects for
                      the request. Defaults to 5.
        connection_type: httplib.HTTPConnection, a subclass to be used for
                         establishing connection. If not set, the type
                         will be determined from the ``uri``.

    Returns:
        tuple, a pair of a httplib2.Response with the status code and other
        headers and the bytes of the content returned.

Make an HTTP request with an HTTP object and arguments .


def Func ( arg_0 = None ) : arg_1 = arg_0 or __version__ if len ( arg_1 ) == 4 : return '{0}{1}' . format ( short_version ( arg_1 ) , arg_1 [ 3 ] ) return short_version ( arg_1 )

def Func(arg_0=None):
    """
    Return full version nr, inc. rc, beta etc tags.

    For example: `2.0.0a1`
    :rtype: str
    """
    arg_1 = arg_0 or __version__
    if len(arg_1) == 4:
        return '{0}{1}'.format(short_version(arg_1), arg_1[3])

    return short_version(arg_1)

Return full version nr inc . rc beta etc tags .


def
Func
(
arg_0
)
:
arg_1
=
arg_0
.
nick
arg_0
.
nick
=
'%s_%s'
%
(
arg_0
.
base_nick
,
random
.
randint
(
1
,
1000
)
)
arg_0
.
logger
.
warn
(
'Nick %s already taken, trying %s'
%
(
arg_1
,
arg_0
.
nick
)
)
arg_0
.
register_nick
(
)
arg_0
.
handle_nick_change
(
arg_1
,
arg_0
.
nick
)

def Func(arg_0):
        """\
        Generates a new nickname based on original nickname followed by a
        random number
        """
        arg_1 = arg_0.nick
        arg_0.nick = '%s_%s' % (arg_0.base_nick, random.randint(1, 1000))
        arg_0.logger.warn('Nick %s already taken, trying %s' % (arg_1, arg_0.nick))
        arg_0.register_nick()
        arg_0.handle_nick_change(arg_1, arg_0.nick)


return [
            ParserFunction(_lststr, _type_to_spans, span, 'ParserFunction')
            for span in self._subspans('ParserFunction')]

def Func ( arg_0 ) -> List [ 'ParserFunction' ] : arg_1 = arg_0 . _lststr arg_2 = arg_0 . _type_to_spans return [ ParserFunction ( arg_1 , arg_2 , arg_3 , 'ParserFunction' ) for arg_3 in arg_0 . _subspans ( 'ParserFunction' ) ]

def Func(arg_0) -> List['ParserFunction']:
        """Return a list of parser function objects."""
        arg_1 = arg_0._lststr
        arg_2 = arg_0._type_to_spans
        return [
            ParserFunction(arg_1, arg_2, arg_3, 'ParserFunction')
            for arg_3 in arg_0._subspans('ParserFunction')]

Return a list of parser function objects .


def Func ( arg_0 ) : arg_1 = eventlet . GreenPool ( ) arg_2 = arg_0 . serve_rpc ( ) arg_1 . spawn ( arg_2 . wait ) arg_1 . waitall ( )

def Func(arg_0):
        """Initializes eventlet and starts wait for workers to exit.

        Spawns the workers returned from serve_rpc
        """
        arg_1 = eventlet.GreenPool()

        arg_2 = arg_0.serve_rpc()
        arg_1.spawn(arg_2.wait)

        arg_1.waitall()

Initializes eventlet and starts wait for workers to exit .


def Func ( arg_0 , arg_1 , arg_2 = { } ) : arg_3 = ACCOUNTS_API . format ( arg_1 ) + "/sub_accounts" arg_4 = [ ] for arg_5 in arg_0 . _get_paged_resource ( arg_3 , arg_2 = arg_2 ) : arg_4 . append ( CanvasAccount ( data = arg_5 ) ) return arg_4

def Func(arg_0, arg_1, arg_2={}):
        """
        Return list of subaccounts within the account with the passed
        canvas id.

        https://canvas.instructure.com/doc/api/accounts.html#method.accounts.sub_accounts
        """
        arg_3 = ACCOUNTS_API.format(arg_1) + "/sub_accounts"

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

        return arg_4

Return list of subaccounts within the account with the passed canvas id .


def Func ( arg_0 ) : if not getattr ( arg_0 , 'attrMap' ) : arg_0 . attrMap = { } for ( arg_2 , arg_3 ) in arg_0 . attrs : arg_0 . attrMap [ arg_2 ] = arg_3 return arg_0 . attrMap

def Func(arg_0):
        """Initializes a map representation of this tag's attributes,
        if not already initialized."""
        if not getattr(arg_0, 'attrMap'):
            arg_0.attrMap = {}
            for (arg_2, arg_3) in arg_0.attrs:
                arg_0.attrMap[arg_2] = arg_3
        return arg_0.attrMap

Initializes a map representation of this tag s attributes if not already initialized .


def Func():
    """
    Prior versions of keyring would search for the config
    in XDG_DATA_HOME, but should probably have been
    searching for config in XDG_CONFIG_HOME. If the
    config exists in the former but not in the latter,
    raise a RuntimeError to force the change.
    """
    # disable the check - once is enough and avoids infinite loop
    arg_0()['Func'] = lambda: None
    arg_1 = os.path.join(_config_root_Linux(), 'keyringrc.cfg')
    arg_2 = os.path.join(_data_root_Linux(), 'keyringrc.cfg')
    if os.path.isfile(arg_2) and not os.path.isfile(arg_1):
        arg_3 = ("Keyring config exists only in the old location "
               "{config_file_old} and should be moved to {config_file_new} "
               "to work with this version of keyring.")
        raise RuntimeError(arg_3.format(**locals()))

Prior versions of keyring would search for the config in XDG_DATA_HOME but should probably have been searching for config in XDG_CONFIG_HOME . If the config exists in the former but not in the latter raise a RuntimeError to force the change .


def Func ( arg_0 ) : arg_1 = arg_0 . _text_edit . textCursor ( ) if arg_1 . position ( ) <= arg_0 . _start_position : arg_0 . hide ( ) else : arg_2 , arg_3 = arg_0 . _find_parenthesis ( arg_0 . _start_position + 1 ) if arg_2 != - 1 : arg_0 . hide ( )

def Func(arg_0):
        """ Updates the tip based on user cursor movement.
        """
        arg_1 = arg_0._text_edit.textCursor()
        if arg_1.position() <= arg_0._start_position:
            arg_0.hide()
        else:
            arg_2, arg_3 = arg_0._find_parenthesis(arg_0._start_position + 1)
            if arg_2 != -1:
                arg_0.hide()

Updates the tip based on user cursor movement .


def Func ( arg_0 , arg_1 ) : check_type ( arg_1 , basestring , may_be_none = False ) arg_0 . _session . Func ( API_ENDPOINT + '/' + arg_1 )

def Func(arg_0, arg_1):
        """Delete a room.

        Args:
            roomId(basestring): The ID of the room to be Funcd.

        Raises:
            TypeError: If the parameter types are incorrect.
            ApiError: If the Webex Teams cloud returns an error.

        """
        check_type(arg_1, basestring, may_be_none=False)

        # API request
        arg_0._session.Func(API_ENDPOINT + '/' + arg_1)

Delete a room.

        Args:
            roomId(basestring): The ID of the room to be deleted.

        Raises:
            TypeError: If the parameter types are incorrect.
            ApiError: If the Webex Teams cloud returns an error.


Half-duplex SPI write.  The specified array of bytes will be clocked
        out the MOSI line.

def Func(arg_0, arg_1):
        """Half-duplex SPI Func.  The specified array of bytes will be clocked
        out the MOSI line.
        """
        #check for hardware limit of FT232H and similar MPSSE chips
        if (len(arg_1) > 65536):
            print('the FTDI chip is limited to 65536 bytes (64 KB) of input/output per command!')
            print('use for loops for larger reads')
            exit(1)
        # Build command to Func SPI data.
        arg_2 = 0x10 | (arg_0.lsbfirst << 3) | arg_0.Func_clock_ve
        logger.debug('SPI Func with command {0:2X}.'.format(arg_2))
        # Compute length low and high bytes.
        # NOTE: Must actually send length minus one because the MPSSE engine
        # considers 0 a length of 1 and FFFF a length of 65536
	# splitting into two lists for two commands to prevent buffer errors
	arg_3 = arg_1[:len(arg_1)/2]
	arg_4 = arg_1[len(arg_1)/2:]
        arg_5  = (len(arg_3) - 1) & 0xFF
        arg_6 = ((len(arg_3) - 1) >> 8) & 0xFF
	arg_7  = (len(arg_4) - 1) & 0xFF
        arg_8 = ((len(arg_4) - 1) >> 8) & 0xFF
        arg_0._assert_cs()
        # Send command and length, then data, split into two commands, handle for length 1
	if len(arg_3) > 0:
            arg_0._ft232h._Func(str(bytearray((arg_2, arg_5, arg_6))))
            arg_0._ft232h._Func(str(bytearray(arg_3)))
        if len(arg_4) > 0:
	    arg_0._ft232h._Func(str(bytearray((arg_2, arg_7, arg_8))))
	    arg_0._ft232h._Func(str(bytearray(arg_4)))
        arg_0._deassert_cs()

Half - duplex SPI write . The specified array of bytes will be clocked out the MOSI line .


(
    message, category, filename="", lineno=-1, file=None, line=None
)

def
Func
(
arg_0
,
arg_1
,
arg_2
=
""
,
arg_3
=
1
,
arg_4
=
,
arg_5
=
)
:
if
arg_4
is
:
arg_4
=
sys
.
stderr
if
arg_4
is
:
return
arg_6
=
"%s: %s\n"
%
(
arg_1
.
__name__
,
arg_0
)
try
:
arg_4
.
write
(
arg_6
)
except
OSError
:
pass

def Func(
    arg_0, arg_1, arg_2="", arg_3=-1, arg_4=None, arg_5=None
):
    """Hook to override default showwarning.

    https://stackoverflow.com/questions/2187269/python-print-only-the-message-on-warnings
    """

    if arg_4 is None:
        arg_4 = sys.stderr
        if arg_4 is None:
            # sys.stderr is None when run with pythonw.exe:
            # warnings get lost
            return
    arg_6 = "%s: %s\n" % (arg_1.__name__, arg_0)
    try:
        arg_4.write(arg_6)
    except OSError:
        # the file (probably stderr) is invalid - this warning gets lost.
        pass


(self, name, regexes, tag_ids, logs=None)

return self._post(
            request=ApiActions.CREATE.value,
            uri=ApiUri.HOOKS.value,
            params=data
        )

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = None ) : arg_5 = { 'name' : arg_1 , 'triggers' : arg_2 , 'sources' : arg_4 or [ ] , 'groups' : [ ] , 'actions' : arg_3 } return arg_0 . _post ( request = ApiActions . CREATE . value , uri = ApiUri . HOOKS . value , params = arg_5 )

def Func(arg_0, arg_1, arg_2, arg_3, arg_4=None):
        """
        Create a hook

        :param name: The hook's name (should be the same as the tag)
        :type name: str

        :param regexes: The list of regular expressions that Logentries expects.
            Ex: `['user_agent = /curl\/[\d.]*/']` Would match where the
            user-agent is curl.
        :type regexes: list of str

        :param tag_id: The ids of the tags to associate the hook with.
            (The 'id' key of the Func tag response)
        :type tag_id: list of str

        :param logs: The logs to add the hook to. Comes from the 'key'
            key in the log dict.
        :type logs: list of str

        :returns: The response of your post
        :rtype: dict

        :raises: This will raise a
            :class:`ServerException<logentries_api.exceptions.ServerException>`
            if there is an error from Logentries
        """
        arg_5 = {
            'name': arg_1,
            'triggers': arg_2,
            'sources': arg_4 or [],
            'groups': [],
            'actions': arg_3
        }
        return arg_0._post(
            request=ApiActions.CREATE.value,
            uri=ApiUri.HOOKS.value,
            params=arg_5
        )

Create a hook

        :param name: The hook's name (should be the same as the tag)
        :type name: str

        :param regexes: The list of regular expressions that Logentries expects.
            Ex: `['user_agent = /curl\/[\d.]*/']` Would match where the
            user-agent is curl.
        :type regexes: list of str

        :param tag_id: The ids of the tags to associate the hook with.
            (The 'id' key of the create tag response)
        :type tag_id: list of str

        :param logs: The logs to add the hook to. Comes from the 'key'
            key in the log dict.
        :type logs: list of str

        :returns: The response of your post
        :rtype: dict

        :raises: This will raise a
            :class:`ServerException<logentries_api.exceptions.ServerException>`
            if there is an error from Logentries


def Func(arg_0):
        """A tuple consisting of the TLS client certificate and key if they
        have been provided, otherwise None.

        """
        if arg_0.tls_cert and arg_0.tls_key:
            return (arg_0.tls_cert, arg_0.tls_key)
        return None

A tuple consisting of the TLS client certificate and key if they have been provided otherwise None .


(min_val, max_val, base=0, interval=100)

def Func(arg_0, arg_1, arg_2=0, arg_3=100):
    """Return a list of values between min and max within an interval."""
    arg_4 = arg_2
    arg_5 = []
    if arg_0 < arg_2:
        while arg_4 >= arg_0:
            arg_4 -= arg_3
    while arg_4 <= arg_1:
        if arg_4 >= arg_0:
            arg_5.append(arg_4)
        arg_4 += arg_3
    return arg_5

Return a list of values between min and max within an interval .


(self, config, wait_for_completion=True,
                          check_interval=30, max_ingestion_time=None)

def Func(arg_0, arg_1, arg_2=True,
                          arg_3=30, arg_4=None):
        """
        Create a tuning job

        :param config: the config for tuning
        :type config: dict
        :param wait_for_completion: if the program should keep running until job finishes
        :type wait_for_completion: bool
        :param check_interval: the time interval in seconds which the operator
            will check the status of any SageMaker job
        :type check_interval: int
        :param max_ingestion_time: the maximum ingestion time in seconds. Any
            SageMaker jobs that run longer than this will fail. Setting this to
            None implies no timeout for any SageMaker job.
        :type max_ingestion_time: int
        :return: A response to tuning job creation
        """

        arg_0.check_tuning_config(arg_1)

        arg_5 = arg_0.get_conn().create_hyper_parameter_tuning_job(**arg_1)
        if arg_2:
            arg_0.check_status(arg_1['HyperParameterTuningJobName'],
                              'HyperParameterTuningJobStatus',
                              arg_0.describe_tuning_job,
                              arg_3, arg_4
                              )
        return arg_5


(prerelease_cmd=None, package_data_spec=None,
        data_files_spec=None)

def Func ( arg_0 = None , arg_1 = None , arg_2 = None ) : arg_3 = [ arg_0 ] if arg_0 else [ ] if arg_1 or arg_2 : arg_3 . append ( 'handle_files' ) arg_4 = functools . partial ( _wrap_command , arg_3 ) arg_5 = _get_file_handler ( arg_1 , arg_2 ) if 'bdist_egg' in sys . argv : arg_6 = arg_4 ( bdist_egg , strict = True ) else : arg_6 = bdist_egg_disabled arg_7 = dict ( build_py = arg_4 ( build_py , strict = is_repo ) , bdist_egg = arg_6 , sdist = arg_4 ( sdist , strict = True ) , arg_5 = arg_5 , ) if bdist_wheel : arg_7 [ 'bdist_wheel' ] = arg_4 ( bdist_wheel , strict = True ) arg_7 [ 'develop' ] = arg_4 ( develop , strict = True ) return arg_7

def Func(arg_0=None, arg_1=None,
        arg_2=None):
    """Create a command class with the given optional prerelease class.

    Parameters
    ----------
    prerelease_cmd: (name, Command) tuple, optional
        The command to run before releasing.
    package_data_spec: dict, optional
        A dictionary whose keys are the dotted package names and
        whose values are a list of glob patterns.
    data_files_spec: list, optional
        A list of (path, dname, pattern) tuples where the path is the
        `data_files` install path, dname is the source directory, and the
        pattern is a glob pattern.

    Notes
    -----
    We use specs so that we can find the files *after* the build
    command has run.

    The package data glob patterns should be relative paths from the package
    folder containing the __init__.py file, which is given as the package
    name.
    e.g. `dict(foo=['./bar/*', './baz/**'])`

    The data files directories should be absolute paths or relative paths
    from the root directory of the repository.  Data files are specified
    differently from `package_data` because we need a separate path entry
    for each nested folder in `data_files`, and this makes it easier to
    parse.
    e.g. `('share/foo/bar', 'pkgname/bizz, '*')`
    """
    arg_3 = [arg_0] if arg_0 else []
    if arg_1 or arg_2:
        arg_3.append('handle_files')
    arg_4 = functools.partial(_wrap_command, arg_3)
    arg_5 = _get_file_handler(arg_1, arg_2)

    if 'bdist_egg' in sys.argv:
        arg_6 = arg_4(bdist_egg, strict=True)
    else:
        arg_6 = bdist_egg_disabled

    arg_7 = dict(
        build_py=arg_4(build_py, strict=is_repo),
        bdist_egg=arg_6,
        sdist=arg_4(sdist, strict=True),
        arg_5=arg_5,
    )

    if bdist_wheel:
        arg_7['bdist_wheel'] = arg_4(bdist_wheel, strict=True)

    arg_7['develop'] = arg_4(develop, strict=True)
    return arg_7

Create a command class with the given optional prerelease class .