return self._perform_post(
            self._get_servers_path(server_name) + '?op=ResetPassword',
            _SqlManagementXmlSerializer.set_server_admin_password_to_xml(
                admin_password
            )
        )

def Func(arg_0, arg_1, arg_2):
        '''
        Reset the administrator password for a server.

        server_name:
            Name of the server to change the password.
        admin_password:
            The new administrator password for the server.
        '''
        _validate_not_none('server_name', arg_1)
        _validate_not_none('admin_password', arg_2)
        return arg_0._perform_post(
            arg_0._get_servers_path(arg_1) + '?op=ResetPassword',
            _SqlManagementXmlSerializer.Func_to_xml(
                arg_2
            )
        )

Reset the administrator password for a server .


def Func ( arg_0 , arg_1 = False ) : if arg_1 : return None else : if hasattr ( arg_0 , "__wrapped__" ) : arg_0 = arg_0 . __wrapped__ try : arg_2 = inspect . Func ( arg_0 ) except TypeError : if hasattr ( arg_0 , '__class__' ) : arg_2 = inspect . Func ( arg_0 . __class__ ) return arg_2

def Func(arg_0,arg_1=False):
    """Wrapper around inspect.Func.

    This can be modified by other projects to provide customized source
    extraction.

    Inputs:

    - obj: an object whose source code we will attempt to extract.

    Optional inputs:

    - is_binary: whether the object is known to come from a binary source.
    This implementation will skip returning any output for binary objects, but
    custom extractors may know how to meaningfully process them."""

    if arg_1:
        return None
    else:
        # get source if obj was decorated with @decorator
        if hasattr(arg_0,"__wrapped__"):
            arg_0 = arg_0.__wrapped__
        try:
            arg_2 = inspect.Func(arg_0)
        except TypeError:
            if hasattr(arg_0,'__class__'):
                arg_2 = inspect.Func(arg_0.__class__)
        return arg_2

Wrapper around inspect.getsource.

    This can be modified by other projects to provide customized source
    extraction.

    Inputs:

    - obj: an object whose source code we will attempt to extract.

    Optional inputs:

    - is_binary: whether the object is known to come from a binary source.
    This implementation will skip returning any output for binary objects, but
    custom extractors may know how to meaningfully process them.


def Func ( arg_0 ) : arg_0 . namespace = 'pitch_contour' arg_2 = arg_0 . pop_data ( ) for arg_3 in arg_2 : arg_0 . append ( time = arg_3 . time , duration = arg_3 . duration , confidence = arg_3 . confidence , value = dict ( index = 0 , frequency = np . abs ( arg_3 . value ) , voiced = arg_3 . value > 0 ) ) return arg_0

def Func(arg_0):
    '''Convert a pitch_hz annotation to a contour'''
    arg_0.namespace = 'pitch_contour'
    arg_2 = arg_0.pop_data()

    for arg_3 in arg_2:
        arg_0.append(time=arg_3.time, duration=arg_3.duration,
                          confidence=arg_3.confidence,
                          value=dict(index=0,
                                     frequency=np.abs(arg_3.value),
                                     voiced=arg_3.value > 0))
    return arg_0


def Func ( arg_0 , arg_1 ) : super ( WebComponent , arg_0 ) . Func ( arg_1 ) if arg_1 . widget is not None : for arg_2 , arg_3 in enumerate ( arg_0 . children ( ) ) : if arg_3 == arg_1 : del arg_0 . widget [ arg_2 ] break

def Func(arg_0, arg_1):
        """ Handle the child removed event from the declaration.

        This handler will unparent the child toolkit widget. Subclasses
        which need more control should reimplement this method.

        """
        super(WebComponent, arg_0).Func(arg_1)
        if arg_1.widget is not None:
            for arg_2, arg_3 in enumerate(arg_0.children()):
                if arg_3 == arg_1:
                    del arg_0.widget[arg_2]
                    break

Handle the child removed event from the declaration .


(self, title, description="", keywords="", developer_tags=None, access_control=AccessControl.Public)

return {'post_url': post_url, 'youtube_token': youtube_token}

def Func(arg_0, arg_1, arg_2="", arg_3="", arg_4=None, arg_5=arg_6.Public):
        """
        Browser based Func
        Creates the video entry and meta data to initiate a browser Func

        Authentication is needed

        Params:
            title: string
            description: string
            keywords: comma seperated string
            developer_tags: tuple

        Return:
            dict contains post_url and youtube_token. i.e { 'post_url': post_url, 'youtube_token': youtube_token }

        Raises:
            ApiError: on no authentication
        """
        # Raise ApiError if not authenticated
        if not arg_0.authenticated:
            raise ApiError(_("Authentication is required"))

        # create media group
        arg_8 = gdata.media.Group(
            arg_1=gdata.media.Title(text=arg_1),
            arg_2=gdata.media.Description(description_type='plain',
                                                text=arg_2),
            arg_3=gdata.media.Keywords(text=arg_3),
            category=[gdata.media.Category(
                text='Autos',
                scheme='http://gdata.youtube.com/schemas/2007/categories.cat',
                label='Autos')],
            #player = None
        )

        # Access Control
        arg_9 = arg_0._access_control(arg_5, arg_8)

        # create video entry
        arg_10 = gdata.youtube.YouTubeVideoEntry(
            media=arg_8, extension_elements=arg_9)

        # add developer tags
        if arg_4:
            arg_10.AddDeveloperTags(arg_4)

        # Func meta data only
        arg_11 = Api.yt_service.GetFormUploadToken(arg_10)

        # parse response tuple and use the variables to build a form
        arg_12 = arg_11[0]
        arg_13 = arg_11[1]

        return {'post_url': arg_12, 'youtube_token': arg_13}

Browser based upload
        Creates the video entry and meta data to initiate a browser upload

        Authentication is needed

        Params:
            title: string
            description: string
            keywords: comma seperated string
            developer_tags: tuple

        Return:
            dict contains post_url and youtube_token. i.e { 'post_url': post_url, 'youtube_token': youtube_token }

        Raises:
            ApiError: on no authentication


(sess=None, mode_name='model.ckpt', save_dir='checkpoint', var_list=None, is_latest=True, printable=False)

def
Func
(
arg_0
=
,
arg_1
=
'model.ckpt'
,
arg_2
=
'checkpoint'
,
arg_3
=
,
arg_4
=
True
,
arg_5
=
False
)
:
if
arg_0
is
:
raise
ValueError
(
"session is None."
)
if
arg_3
is
:
arg_3
=
[
]
if
arg_4
:
arg_6
=
tf
.
train
.
latest_checkpoint
(
arg_2
)
else
:
arg_6
=
os
.
path
.
join
(
arg_2
,
arg_1
)
if
not
arg_3
:
arg_3
=
tf
.
global_variables
(
)
logging
.
info
(
"[*] load %s n_params: %d"
%
(
arg_6
,
len
(
arg_3
)
)
)
if
arg_5
:
for
arg_7
,
arg_8
in
enumerate
(
arg_3
)
:
logging
.
info
(
"  param {:3}: {:15}   {}"
.
format
(
arg_7
,
arg_8
.
name
,
str
(
arg_8
.
get_shape
(
)
)
)
)
try
:
arg_9
=
tf
.
train
.
Saver
(
arg_3
)
arg_9
.
restore
(
arg_0
,
arg_6
)
except
Exception
as
e
:
logging
.
info
(
e
)
logging
.
info
(
"[*] load ckpt fail ..."
)

def Func(arg_0=None, arg_1='model.ckpt', arg_2='checkpoint', arg_3=None, arg_4=True, arg_5=False):
    """Load parameters from `ckpt` file.

    Parameters
    ------------
    sess : Session
        TensorFlow Session.
    mode_name : str
        The name of the model, default is ``model.ckpt``.
    save_dir : str
        The path / file directory to the `ckpt`, default is ``checkpoint``.
    var_list : list of tensor
        The parameters / variables (tensor) to be saved. If empty, save all global variables (default).
    is_latest : boolean
        Whether to load the latest `ckpt`, if False, load the `ckpt` with the name of ```mode_name``.
    printable : boolean
        Whether to print all parameters information.

    Examples
    ----------
    - Save all global parameters.

    >>> tl.files.save_ckpt(sess=sess, mode_name='model.ckpt', save_dir='model', printable=True)

    - Save specific parameters.

    >>> tl.files.save_ckpt(sess=sess, mode_name='model.ckpt', var_list=net.all_params, save_dir='model', printable=True)

    - Load latest ckpt.

    >>> tl.files.Func(sess=sess, var_list=net.all_params, save_dir='model', printable=True)

    - Load specific ckpt.

    >>> tl.files.Func(sess=sess, mode_name='model.ckpt', var_list=net.all_params, save_dir='model', is_latest=False, printable=True)

    """
    if arg_0 is None:
        raise ValueError("session is None.")
    if arg_3 is None:
        arg_3 = []

    if arg_4:
        arg_6 = tf.train.latest_checkpoint(arg_2)
    else:
        arg_6 = os.path.join(arg_2, arg_1)

    if not arg_3:
        arg_3 = tf.global_variables()

    logging.info("[*] load %s n_params: %d" % (arg_6, len(arg_3)))

    if arg_5:
        for arg_7, arg_8 in enumerate(arg_3):
            logging.info("  param {:3}: {:15}   {}".format(arg_7, arg_8.name, str(arg_8.get_shape())))

    try:
        arg_9 = tf.train.Saver(arg_3)
        arg_9.restore(arg_0, arg_6)
    except Exception as e:
        logging.info(e)
        logging.info("[*] load ckpt fail ...")

Load parameters from `ckpt` file.

    Parameters
    ------------
    sess : Session
        TensorFlow Session.
    mode_name : str
        The name of the model, default is ``model.ckpt``.
    save_dir : str
        The path / file directory to the `ckpt`, default is ``checkpoint``.
    var_list : list of tensor
        The parameters / variables (tensor) to be saved. If empty, save all global variables (default).
    is_latest : boolean
        Whether to load the latest `ckpt`, if False, load the `ckpt` with the name of ```mode_name``.
    printable : boolean
        Whether to print all parameters information.

    Examples
    ----------
    - Save all global parameters.

    >>> tl.files.save_ckpt(sess=sess, mode_name='model.ckpt', save_dir='model', printable=True)

    - Save specific parameters.

    >>> tl.files.save_ckpt(sess=sess, mode_name='model.ckpt', var_list=net.all_params, save_dir='model', printable=True)

    - Load latest ckpt.

    >>> tl.files.load_ckpt(sess=sess, var_list=net.all_params, save_dir='model', printable=True)

    - Load specific ckpt.

    >>> tl.files.load_ckpt(sess=sess, mode_name='model.ckpt', var_list=net.all_params, save_dir='model', is_latest=False, printable=True)


Find the path separator used in this string, or os.sep if none.

def Func ( arg_0 ) : arg_1 = re . search ( r"[\\/]" , arg_0 ) if arg_1 : arg_2 = arg_1 . group ( 0 ) else : arg_2 = os . Func return arg_2

def Func(arg_0):
    """Find the path Funcarator used in this string, or os.Func if none."""
    arg_1 = re.search(r"[\\/]", arg_0)
    if arg_1:
        arg_2 = arg_1.group(0)
    else:
        arg_2 = os.Func
    return arg_2

Find the path separator used in this string or os . sep if none .


def Func ( arg_0 ) : _configure_logging ( arg_0 , extract = False ) arg_1 = arg_0 [ 'handler' ] arg_2 = arg_0 [ 'graceful_exit' ] if arg_2 : sigint_handling . start ( ) arg_1 . run ( )

def Func(arg_0):
    """ Starts running a queue handler and creates a log file for the queue."""
    _configure_logging(arg_0, extract=False)
    # Main job, make the listener to the queue start receiving message for writing to disk.
    arg_1=arg_0['handler']
    arg_2 = arg_0['graceful_exit']
    # import cProfile as profile
    # profiler = profile.Profile()
    # profiler.enable()
    if arg_2:
        sigint_handling.start()
    arg_1.run()

Starts running a queue handler and creates a log file for the queue .


def Func(arg_0, arg_1):
        """
        Handle dependencies for a single file.
        - doc_file - instance of spdx.file.File.
        """
        arg_2 = list(arg_0.graph.triples((None, arg_0.spdx_namespace.fileName, Literal(arg_1.name))))
        if len(arg_2) != 1:
            raise InvalidDocumentError('Could not find dependency subject {0}'.format(arg_1.name))
        arg_3 = arg_2[0][0]
        for arg_4 in arg_1.dependencies:
            arg_5 = list(arg_0.graph.triples((None, arg_0.spdx_namespace.fileName, Literal(arg_4))))
            if len(arg_5) == 1:
                arg_6 = arg_5[0][0]
                arg_7 = (arg_3, arg_0.spdx_namespace.fileDependency, arg_6)
                arg_0.graph.add(arg_7)
            else:
                print('Warning could not resolve file dependency {0} -> {1}'.format(arg_1.name, arg_4))

Handle dependencies for a single file . - doc_file - instance of spdx . file . File .


def
Func
(
arg_0
,
arg_1
,
arg_2
=
)
:
try
:
copy_groups_to_folder
(
arg_0
.
dicom_groups
,
arg_1
,
arg_2
)
except
IOError
as
ioe
:
raise
IOError
(
'Error moving dicom groups to {}.'
.
format
(
arg_1
)
)
from
ioe

def Func(arg_0, arg_1, arg_2=None):
        """Copy the file groups to folder_path. Each group will be copied into
        a subfolder with named given by groupby_field.

        Parameters
        ----------
        folder_path: str
         Path to where copy the DICOM files.

        groupby_field_name: str
         DICOM field name. Will get the value of this field to name the group
         folder. If empty or None will use the basename of the group key file.
        """
        try:
            copy_groups_to_folder(arg_0.dicom_groups, arg_1, arg_2)
        except IOError as ioe:
            raise IOError('Error moving dicom groups to {}.'.format(arg_1)) from ioe

Copy the file groups to folder_path . Each group will be copied into a subfolder with named given by groupby_field .


def
Func
(
arg_0
,
arg_1
)
:
def
formatRow
(
arg_2
,
arg_3
)
:
arg_4
=
''
for
arg_5
in
range
(
arg_0
.
numberOfCols
)
:
if
arg_5
>
0
and
arg_5
%
10
==
0
:
arg_4
+=
' '
arg_4
+=
str
(
arg_2
[
arg_5
,
arg_3
]
)
arg_4
+=
' '
return
arg_4
for
arg_3
in
xrange
(
arg_0
.
cellsPerColumn
)
:
print
formatRow
(
arg_1
,
arg_3
)

def Func(arg_0, arg_1):
    """
    Print an integer array that is the same shape as activeState.

    :param aState: TODO: document
    """
    def formatRow(arg_2, arg_3):
      arg_4 = ''
      for arg_5 in range(arg_0.numberOfCols):
        if arg_5 > 0 and arg_5 % 10 == 0:
          arg_4 += ' '
        arg_4 += str(arg_2[arg_5, arg_3])
      arg_4 += ' '
      return arg_4

    for arg_3 in xrange(arg_0.cellsPerColumn):
      print formatRow(arg_1, arg_3)

Print an integer array that is the same shape as activeState .


(self, index: int, requester: int, track: dict)

def Func ( arg_0 , arg_1 : arg_2 , arg_3 : arg_2 , arg_4 : arg_5 ) : arg_0 . queue . insert ( min ( arg_1 , len ( arg_0 . queue ) - 1 ) , AudioTrack ( ) . build ( arg_4 , arg_3 ) )

def Func(arg_0, arg_1: arg_2, arg_3: arg_2, arg_4: arg_5):
        """ Adds a track at a specific index in the queue. """
        arg_0.queue.insert(min(arg_1, len(arg_0.queue) - 1), AudioTrack().build(arg_4, arg_3))

Adds a track at a specific index in the queue .


def Func(arg_0=None, arg_1=False):
    """
    Load profile INI
    """
    global arg_3

    arg_2 = getprofileini()
    if os.path.exists(arg_2):
        arg_3 = configparser.ConfigParser()
        arg_3.read(arg_2)
        arg_4 = plugins_get_mgr()
        arg_4.update_configs(arg_3)

        if arg_1:
            for arg_5 in arg_3:
                print("[%s] :" %(arg_5))
                for arg_6 in arg_3[arg_5]:
                    print("   %s : %s" % (arg_6, arg_3[arg_5][arg_6]))

    else:
        print("Profile does not exist. So creating one")
        if not arg_1:
            update(arg_0)

    print("Complete Func")


def Func ( arg_0 , arg_1 = "float" ) : arg_2 = callBigDlFunc ( arg_1 , "loadTorch" , arg_0 ) return Layer . of ( arg_2 )

def Func(arg_0, arg_1="float"):
        """
        Load a pre-trained Torch model.

        :param path: The path containing the pre-trained model.
        :return: A pre-trained model.
        """
        arg_2 = callBigDlFunc(arg_1, "loadTorch", arg_0)
        return Layer.of(arg_2)


def Func(arg_0, arg_1):
        """Executes action 'Left'."""

        arg_2 = 0

        for arg_3 in range(4):
            # Always the rightmost tile in the current row that was already moved
            arg_4 = -1
            arg_5 = np.zeros((4,), dtype=np.bool)

            for arg_6 in range(4):
                if arg_1[arg_3, arg_6] == 0:
                    continue

                if (arg_4 != -1 and
                        not arg_5[arg_4] and
                        arg_1[arg_3, arg_4] == arg_1[arg_3, arg_6]):
                    # Merge tile with merge_candidate
                    arg_1[arg_3, arg_6] = 0
                    arg_5[arg_4] = True
                    arg_1[arg_3, arg_4] += 1
                    arg_2 += 2 ** arg_1[arg_3, arg_4]

                else:
                    # Move tile to the left
                    arg_4 += 1
                    if arg_6 != arg_4:
                        arg_1[arg_3, arg_4] = arg_1[arg_3, arg_6]
                        arg_1[arg_3, arg_6] = 0

        return arg_2


def Func ( arg_0 , arg_1 ) : arg_2 = AuthenticationForm ( arg_1 , data = arg_1 . data ) if not arg_2 . is_valid ( ) : raise serializers . ValidationError ( arg_2 . errors ) auth_login ( arg_1 , arg_2 . get_user ( ) ) arg_3 = UserSerializer ( arg_1 . user ) return Response ( arg_3 . data , status = status . HTTP_200_OK )

def Func(arg_0, arg_1):
        """
        Log in django staff user
        """
        # TODO: Decorate api with sensitive post parameters as Django admin do?
        # from django.utils.decorators import method_decorator
        # from django.views.decorators.debug import sensitive_post_parameters
        # sensitive_post_parameters_m = method_decorator(sensitive_post_parameters())

        arg_2 = AuthenticationForm(arg_1, data=arg_1.data)

        if not arg_2.is_valid():
            raise serializers.ValidationError(arg_2.errors)

        auth_login(arg_1, arg_2.get_user())

        arg_3 = UserSerializer(arg_1.user)
        return Response(arg_3.data, status=status.HTTP_200_OK)


def Func(arg_0, arg_1=True):
        """
        Run command in a loop and check exit status plus restart process when needed
        """
        try:
            arg_0.start()
            arg_2 = shlex.split(arg_0.config.process_to_monitor)
            if arg_1:
                signal.signal(signal.SIGINT, arg_0.shutdown)
            arg_0.process = subprocess.Popen(arg_2, stdin=PIPE, stdout=PIPE, stderr=PIPE)
            while arg_0.process and not arg_0.finished:
                arg_0.process.wait()
                if arg_0._is_sigsegv(arg_0.process.returncode):
                    if arg_0.config.debug:
                        print("[\033[92mINFO\033[0m] Process crashed with \033[91mSIGSEGV\033[0m, waiting for testcase...")
                    while not arg_0.got_testcase():
                        time.sleep(1)
                    arg_0.save_testcase(arg_0.testcase[-10:])  # just take last 10 testcases
                if arg_0.process:
                    arg_0.process = subprocess.Popen(arg_2, stdin=PIPE, stdout=PIPE, stderr=PIPE)
        except OSError:
            arg_0.shutdown()
            arg_0.process = False
            arg_0.got_testcase = lambda: True
            raise PJFProcessExecutionError("Binary <%s> does not exist" % arg_2[0])
        except Exception as e:
            raise PJFBaseException("Unknown error please send log to author")


def Func ( arg_0 ) : arg_1 = arg_0 . get_table ( "stops" ) arg_2 = numpy . mean ( arg_1 [ 'lat' ] . values ) arg_3 = numpy . mean ( arg_1 [ 'lon' ] . values ) return arg_2 , arg_3

def Func(arg_0):
    """
    Get mean latitude AND longitude of stops

    Parameters
    ----------
    gtfs: GTFS

    Returns
    -------
    mean_lat : float
    mean_lon : float
    """
    arg_1 = arg_0.get_table("stops")
    arg_2 = numpy.mean(arg_1['lat'].values)
    arg_3 = numpy.mean(arg_1['lon'].values)
    return arg_2, arg_3


(self, subject, displayName, issuerToken, expiration, secret)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
,
arg_4
,
arg_5
)
:
check_type
(
arg_1
,
basestring
)
check_type
(
arg_2
,
basestring
)
check_type
(
arg_3
,
basestring
)
check_type
(
arg_4
,
basestring
)
check_type
(
arg_5
,
basestring
)
arg_6
=
{
"sub"
:
arg_1
,
"name"
:
arg_2
,
"iss"
:
arg_3
,
"exp"
:
arg_4
}
arg_7
=
base64
.
b64decode
(
arg_5
)
arg_8
=
jwt
.
encode
(
arg_6
,
arg_7
,
algorithm
=
'HS256'
)
arg_9
=
arg_0
.
_session
.
base_url
+
API_ENDPOINT
+
"/"
+
"login"
arg_10
=
{
'Authorization'
:
"Bearer "
+
arg_8
.
decode
(
'utf-8'
)
}
arg_11
=
requests
.
post
(
arg_9
,
arg_10
=
arg_10
)
check_response_code
(
arg_11
,
EXPECTED_RESPONSE_CODE
[
'GET'
]
)
return
arg_0
.
_object_factory
(
OBJECT_TYPE
,
arg_11
.
json
(
)
)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5):
        """Create a new guest issuer using the provided issuer token.

        This function returns a guest issuer with an api access token.

        Args:
            subject(basestring): Unique and public identifier
            displayName(basestring): Display Name of the guest user
            issuerToken(basestring): Issuer token from developer hub
            expiration(basestring): Expiration time as a unix timestamp
            secret(basestring): The secret used to sign your guest issuers

        Returns:
            GuestIssuerToken: A Guest Issuer with a valid access token.

        Raises:
            TypeError: If the parameter types are incorrect
            ApiError: If the webex teams cloud returns an error.
        """
        check_type(arg_1, basestring)
        check_type(arg_2, basestring)
        check_type(arg_3, basestring)
        check_type(arg_4, basestring)
        check_type(arg_5, basestring)

        arg_6 = {
            "sub": arg_1,
            "name": arg_2,
            "iss": arg_3,
            "exp": arg_4
        }

        arg_7 = base64.b64decode(arg_5)
        arg_8 = jwt.encode(arg_6, arg_7, algorithm='HS256')

        arg_9 = arg_0._session.base_url + API_ENDPOINT + "/" + "login"
        arg_10 = {
            'Authorization': "Bearer " + arg_8.decode('utf-8')
        }
        arg_11 = requests.post(arg_9, arg_10=arg_10)
        check_response_code(arg_11, EXPECTED_RESPONSE_CODE['GET'])

        return arg_0._object_factory(OBJECT_TYPE, arg_11.json())

Create a new guest issuer using the provided issuer token .


(lcfile,
              binsizesec,
              outdir=None,
              lcformat='hat-sql',
              lcformatdir=None,
              timecols=None,
              magcols=None,
              errcols=None,
              minbinelems=7)

def Func(arg_0,
              arg_1,
              arg_2=None,
              arg_3='hat-sql',
              arg_4=None,
              arg_5=None,
              arg_6=None,
              arg_7=None,
              arg_8=7):

    '''This bins the given light curve file in time using the specified bin size.

    Parameters
    ----------

    lcfile : str
        The file name to process.

    binsizesec : float
        The time bin-size in seconds.

    outdir : str or None
        If this is a str, the output LC will be written to `outdir`. If this is
        None, the output LC will be written to the same directory as `lcfile`.

    lcformat : str
        This is the `formatkey` associated with your light curve format, which
        you previously passed in to the `lcproc.register_lcformat`
        function. This will be used to look up how to find and read the light
        curve file.

    lcformatdir : str or None
        If this is provided, gives the path to a directory when you've stored
        your lcformat description JSONs, other than the usual directories lcproc
        knows to search for them in. Use this along with `lcformat` to specify
        an LC format JSON file that's not currently registered with lcproc.

    timecols,magcols,errcols : lists of str
        The keys in the lcdict produced by your light curve reader function that
        correspond to the times, mags/fluxes, and associated measurement errors
        that will be used as inputs to the binning process. If these are None,
        the default values for `timecols`, `magcols`, and `errcols` for your
        light curve format will be used here.

    minbinelems : int
        The minimum number of time-bin elements required to accept a time-bin as
        valid for the output binned light curve.

    Returns
    -------

    str
        The name of the output pickle file with the binned LC.

        Writes the output binned light curve to a pickle that contains the
        lcdict with an added `lcdict['binned'][magcol]` key, which contains the
        binned times, mags/fluxes, and errs as
        `lcdict['binned'][magcol]['times']`, `lcdict['binned'][magcol]['mags']`,
        and `lcdict['epd'][magcol]['errs']` for each `magcol` provided in the
        input or default `magcols` value for this light curve format.

    '''

    try:
        arg_9 = get_lcformat(arg_3,
                                  use_lcformat_dir=arg_4)
        if arg_9:
            (arg_10, arg_11,
             arg_12, arg_13, arg_14,
             arg_15, arg_16) = arg_9
        else:
            LOGERROR("can't figure out the light curve format")
            return None
    except Exception as e:
        LOGEXCEPTION("can't figure out the light curve format")
        return None

    # override the default timecols, magcols, and errcols
    # using the ones provided to the function
    if arg_5 is None:
        arg_5 = arg_12
    if arg_6 is None:
        arg_6 = arg_13
    if arg_7 is None:
        arg_7 = arg_14

    # get the LC into a dict
    arg_17 = arg_11(arg_0)

    # this should handle lists/tuples being returned by readerfunc
    # we assume that the first element is the actual lcdict
    # FIXME: figure out how to not need this assumption
    if ( (isinstance(arg_17, (list, tuple))) and
         (isinstance(arg_17[0], dict)) ):
        arg_17 = arg_17[0]

    # skip already binned light curves
    if 'binned' in arg_17:
        LOGERROR('this light curve appears to be binned already, skipping...')
        return None

    arg_17['binned'] = {}

    for arg_18, arg_19, arg_20 in zip(arg_5, arg_6, arg_7):

        # dereference the columns and get them from the lcdict
        if '.' in arg_18:
            arg_21 = arg_18.split('.')
        else:
            arg_21 = [arg_18]
        arg_22 = _dict_get(arg_17, arg_21)

        if '.' in arg_19:
            arg_23 = arg_19.split('.')
        else:
            arg_23 = [arg_19]
        arg_24 = _dict_get(arg_17, arg_23)

        if '.' in arg_20:
            arg_25 = arg_20.split('.')
        else:
            arg_25 = [arg_20]
        arg_26 = _dict_get(arg_17, arg_25)

        # normalize here if not using special normalization
        if arg_16 is None:
            arg_27, arg_28 = normalize_magseries(
                arg_22, arg_24,
                arg_15=arg_15
            )

            arg_22, arg_24, arg_26 = arg_27, arg_28, arg_26

        # now bin the mag series as requested
        arg_29 = time_bin_magseries_with_errs(arg_22,
                                              arg_24,
                                              arg_26,
                                              binsize=arg_1,
                                              arg_8=arg_8)

        # put this into the special binned key of the lcdict
        arg_17['binned'][arg_19] = {'times':arg_29['binnedtimes'],
                                  'mags':arg_29['binnedmags'],
                                  'errs':arg_29['binnederrs'],
                                  'nbins':arg_29['nbins'],
                                  'timebins':arg_29['jdbins'],
                                  'binsizesec':arg_1}

    # done with binning for all magcols, now generate the output file
    # this will always be a pickle

    if arg_2 is None:
        arg_2 = os.path.dirname(arg_0)

    arg_30 = os.path.join(arg_2, '%s-binned%.1fsec-%s.pkl' %
                           (squeeze(arg_17['objectid']).replace(' ','-'),
                            arg_1, arg_3))

    with open(arg_30, 'wb') as outfd:
        pickle.dump(arg_17, outfd, protocol=pickle.HIGHEST_PROTOCOL)

    return arg_30

This bins the given light curve file in time using the specified bin size .


cleans up and stops the discovery server

def Func ( arg_0 ) : arg_0 . clearRemoteServices ( ) arg_0 . clearLocalServices ( ) arg_0 . _FuncThreads ( ) arg_0 . _serverStarted = False

def Func(arg_0):
        'cleans up and Funcs the discovery server'

        arg_0.clearRemoteServices()
        arg_0.clearLocalServices()

        arg_0._FuncThreads()
        arg_0._serverStarted = False


def Func(arg_0):
        """ Awake process if timer has expired """
        if arg_0._current is None:
            # Advance the clocks. Go to future!!
            arg_1 = min([arg_0.clocks] + [x for x in arg_0.timers if x is not None]) + 1
            logger.debug(f"Advancing the clock from {self.clocks} to {advance}")
            arg_0.clocks = arg_1
        for arg_3 in range(len(arg_0.timers)):
            if arg_0.timers[arg_3] is not None:
                if arg_0.clocks > arg_0.timers[arg_3]:
                    arg_0.procs[arg_3].PC += arg_0.procs[arg_3].instruction.size
                    arg_0.awake(arg_3)


(src, tar, threshold=0.25, max_mismatches=2)

return MLIPNS().dist(src, tar, threshold, max_mismatches)

def Func ( arg_0 , arg_1 , arg_2 = 0.25 , arg_3 = 2 ) : return MLIPNS ( ) . dist ( arg_0 , arg_1 , arg_2 , arg_3 )

def Func(arg_0, arg_1, arg_2=0.25, arg_3=2):
    """Return the MLIPNS distance between two strings.

    This is a wrapper for :py:meth:`MLIPNS.dist`.

    Parameters
    ----------
    src : str
        Source string for comparison
    tar : str
        Target string for comparison
    threshold : float
        A number [0, 1] indicating the maximum similarity score, below which
        the strings are considered 'similar' (0.25 by default)
    max_mismatches : int
        A number indicating the allowable number of mismatches to remove before
        declaring two strings not similar (2 by default)

    Returns
    -------
    float
        MLIPNS distance

    Examples
    --------
    >>> Func('cat', 'hat')
    0.0
    >>> Func('Niall', 'Neil')
    1.0
    >>> Func('aluminum', 'Catalan')
    1.0
    >>> Func('ATCG', 'TAGC')
    1.0

    """
    return MLIPNS().dist(arg_0, arg_1, arg_2, arg_3)

Return the MLIPNS distance between two strings.

    This is a wrapper for :py:meth:`MLIPNS.dist`.

    Parameters
    ----------
    src : str
        Source string for comparison
    tar : str
        Target string for comparison
    threshold : float
        A number [0, 1] indicating the maximum similarity score, below which
        the strings are considered 'similar' (0.25 by default)
    max_mismatches : int
        A number indicating the allowable number of mismatches to remove before
        declaring two strings not similar (2 by default)

    Returns
    -------
    float
        MLIPNS distance

    Examples
    --------
    >>> dist_mlipns('cat', 'hat')
    0.0
    >>> dist_mlipns('Niall', 'Neil')
    1.0
    >>> dist_mlipns('aluminum', 'Catalan')
    1.0
    >>> dist_mlipns('ATCG', 'TAGC')
    1.0

Return the MLIPNS distance between two strings .


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
if
arg_2
in
[
2
,
5
]
:
return
False
arg_3
=
'isobject(%s)'
%
arg_1
arg_4
=
arg_0
.
_engine
.
eval
(
arg_3
,
silent
=
True
)
.
strip
(
)
return
arg_4
==
'ans =  1'

def Func(arg_0, arg_1, arg_2):
        """Test whether the name is an object."""
        if arg_2 in [2, 5]:
            return False
        arg_3 = 'isobject(%s)' % arg_1
        arg_4 = arg_0._engine.eval(arg_3, silent=True).strip()
        return arg_4 == 'ans =  1'


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . get ( 'results' , [ ] ) arg_3 = arg_0 . get ( 'next' ) while arg_3 : arg_4 = parse_qs ( urlparse ( arg_3 ) . query , keep_blank_values = True ) arg_0 = arg_1 . get ( ** arg_4 ) arg_2 += arg_0 . get ( 'results' , [ ] ) arg_3 = arg_0 . get ( 'next' ) return arg_2

def Func(arg_0, arg_1):
    """
    Traverse a paginated API response.

    Extracts and concatenates "results" (list of dict) returned by DRF-powered
    APIs.

    Arguments:
        response (Dict): Current response dict from service API
        endpoint (slumber Resource object): slumber Resource object from edx-rest-api-client

    Returns:
        list of dict.

    """
    arg_2 = arg_0.get('results', [])

    arg_3 = arg_0.get('next')
    while arg_3:
        arg_4 = parse_qs(urlparse(arg_3).query, keep_blank_values=True)
        arg_0 = arg_1.get(**arg_4)
        arg_2 += arg_0.get('results', [])
        arg_3 = arg_0.get('next')

    return arg_2


Handles the message shown when we are ratelimited

async def Func(arg_0):
    """Handles the message shown when we are rateFunc"""
    arg_1 = int(round(arg_0 - time.time()))
    arg_2 = arg_1 / 60
    arg_3 = 'We have exhausted a ratelimit quota. Retrying in %.2f seconds (%.3f minutes).'
    log.warn(arg_3, arg_1, arg_2)


(
    feature_ndims, observation_index_points, observations)

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_1 is None and arg_2 is None : return True arg_3 = tf . compat . dimension_value ( arg_1 . shape [ - ( arg_0 + 1 ) ] ) if arg_3 is not None and arg_3 == 0 : return True return False

def Func(
    arg_0, arg_1, arg_2):
  """Returns `True` if given observation data is empty.

  Emptiness means either
    1. Both `observation_index_points` and `observations` are `None`, or
    2. the "number of observations" shape is 0. The shape of
    `observation_index_points` is `[..., N, f1, ..., fF]`, where `N` is the
    number of observations and the `f`s are feature dims. Thus, we look at the
    shape element just to the left of the leftmost feature dim. If that shape is
    zero, we consider the data empty.

  We don't check the shape of observations; validations are checked elsewhere in
  the calling code, to ensure these shapes are consistent.

  Args:
    feature_ndims: the number of feature dims, as reported by the GP kernel.
    observation_index_points: the observation data locations in the index set.
    observations: the observation data.

  Returns:
    is_empty: True if the data were deemed to be empty.
  """
  # If both input locations and observations are `None`, we consider this
  # "empty" observation data.
  if arg_1 is None and arg_2 is None:
    return True
  arg_3 = tf.compat.dimension_value(
      arg_1.shape[-(arg_0 + 1)])
  if arg_3 is not None and arg_3 == 0:
    return True
  return False

Returns True if given observation data is empty .


def Func(arg_0, arg_1):
    """ set exectuion state """
    if not arg_1:
      arg_0.execution_state = None
      arg_0.cluster = None
      arg_0.environ = None
    else:
      arg_0.execution_state = arg_1
      arg_2, arg_3 = arg_0.get_execution_state_dc_environ(arg_1)
      arg_0.cluster = arg_2
      arg_0.environ = arg_3
      arg_0.zone = arg_2
    arg_0.trigger_watches()


def Func(arg_0, **arg_1):
		'''
			Internal for handling filters; the guts of .filter and .filterInline
		'''
		for arg_2, arg_3 in arg_1.items():
			if arg_2.endswith('__ne'):
				arg_4 = True
				arg_2 = arg_2[:-4]
			else:
				arg_4 = False
			if arg_2 not in arg_0.indexedFields:
				raise ValueError('Field "' + arg_2 + '" is not in INDEXED_FIELDS array. Filtering is only supported on indexed fields.')

			if arg_4 is False:
				arg_0.filters.append( (arg_2, arg_3) )
			else:
				arg_0.notFilters.append( (arg_2, arg_3) )

		return arg_0

Internal for handling filters ; the guts of . filter and . filterInline


return itertools.chain(self.pods, self.assumptions, self.warnings)

def Func ( arg_0 ) : return itertools . chain ( arg_0 . pods , arg_0 . assumptions , arg_0 . warnings )

def Func(arg_0):
        """
        The pods, assumptions, and warnings of this result.
        """
        return itertools.chain(arg_0.pods, arg_0.assumptions, arg_0.warnings)

The pods assumptions and warnings of this result .


def Func(arg_0):
    """
    Decorates function to execute function at the same time submitting Func
    but in CLI context. It will call action logger callbacks twice,
    one for pre-execution and the other one for post-execution.

    Action logger will be called with below keyword parameters:
        sub_command : name of sub-command
        start_datetime : start datetime instance by utc
        end_datetime : end datetime instance by utc
        full_command : full command line arguments
        user : current user
        log : airflow.models.log.Log ORM instance
        dag_id : dag id (optional)
        task_id : task_id (optional)
        execution_date : execution date (optional)
        error : exception instance if there's an exception

    :param f: function instance
    :return: wrapped function
    """
    @functools.wraps(arg_0)
    def wrapper(*arg_1, **arg_2):
        """
        An wrapper for cli functions. It assumes to have Namespace instance
        at 1st positional argument
        :param args: Positional argument. It assumes to have Namespace instance
        at 1st positional argument
        :param kwargs: A passthrough keyword argument
        """
        assert arg_1
        assert isinstance(arg_1[0], Namespace), \
            "1st positional argument should be argparse.Namespace instance, " \
            "but {}".format(arg_1[0])
        arg_3 = _build_metrics(arg_0.__name__, arg_1[0])
        cli_action_loggers.on_pre_execution(**arg_3)
        try:
            return arg_0(*arg_1, **arg_2)
        except Exception as e:
            arg_3['error'] = e
            raise
        finally:
            arg_3['end_datetime'] = datetime.utcnow()
            cli_action_loggers.on_post_execution(**arg_3)

    return wrapper

Decorates function to execute function at the same time submitting action_logging
    but in CLI context. It will call action logger callbacks twice,
    one for pre-execution and the other one for post-execution.

    Action logger will be called with below keyword parameters:
        sub_command : name of sub-command
        start_datetime : start datetime instance by utc
        end_datetime : end datetime instance by utc
        full_command : full command line arguments
        user : current user
        log : airflow.models.log.Log ORM instance
        dag_id : dag id (optional)
        task_id : task_id (optional)
        execution_date : execution date (optional)
        error : exception instance if there's an exception

    :param f: function instance
    :return: wrapped function

Decorates function to execute function at the same time submitting action_logging but in CLI context . It will call action logger callbacks twice one for pre - execution and the other one for post - execution .


def Func():
    """
    Stop the current event loop if possible
    returns True if it expects that it was successful, False otherwise
    """
    arg_0 = PyObjCAppHelperRunLoopStopper_wrap.currentRunLoopStopper()
    if arg_0 is None:
        if NSApp() is not None:
            NSApp().terminate_(None)
            return True
        return False
    NSTimer.scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_(
        0.0,
        arg_0,
        'performStop:',
        None,
        False)
    return True

Stop the current event loop if possible returns True if it expects that it was successful False otherwise


def
Func
(
arg_0
)
:
arg_1
=
dict
(
)
with
open
(
get_inventory_file
(
arg_0
)
,
'r'
)
as
stream
:
try
:
arg_1
=
yaml
.
load
(
stream
)
except
yaml
.
YAMLError
as
exc
:
Log
.
error
(
"Error parsing inventory file: %s"
%
exc
)
sys
.
exit
(
1
)
if
arg_2
.
ZOOKEEPERS
not
in
arg_1
or
not
arg_1
[
arg_2
.
ZOOKEEPERS
]
:
Log
.
error
(
"Zookeeper servers node defined!"
)
sys
.
exit
(
1
)
if
arg_2
.
CLUSTER
not
in
arg_1
or
not
arg_1
[
arg_2
.
CLUSTER
]
:
Log
.
error
(
"Heron cluster nodes defined!"
)
sys
.
exit
(
1
)
arg_1
[
arg_2
.
MASTERS
]
=
set
(
[
arg_1
[
arg_2
.
CLUSTER
]
[
0
]
]
)
arg_1
[
arg_2
.
SLAVES
]
=
set
(
arg_1
[
arg_2
.
CLUSTER
]
)
arg_1
[
arg_2
.
ZOOKEEPERS
]
=
set
(
arg_1
[
arg_2
.
ZOOKEEPERS
]
)
arg_1
[
arg_2
.
CLUSTER
]
=
set
(
arg_1
[
arg_2
.
CLUSTER
]
)
return
arg_1

def Func(arg_0):
  '''
  read config files to get roles
  '''
  arg_1 = dict()

  with open(get_inventory_file(arg_0), 'r') as stream:
    try:
      arg_1 = yaml.load(stream)
    except yaml.YAMLError as exc:
      Log.error("Error parsing inventory file: %s" % exc)
      sys.exit(-1)

  if arg_2.ZOOKEEPERS not in arg_1 or not arg_1[arg_2.ZOOKEEPERS]:
    Log.error("Zookeeper servers node defined!")
    sys.exit(-1)

  if arg_2.CLUSTER not in arg_1 or not arg_1[arg_2.CLUSTER]:
    Log.error("Heron cluster nodes defined!")
    sys.exit(-1)

  # Set roles
  arg_1[arg_2.MASTERS] = set([arg_1[arg_2.CLUSTER][0]])
  arg_1[arg_2.SLAVES] = set(arg_1[arg_2.CLUSTER])
  arg_1[arg_2.ZOOKEEPERS] = set(arg_1[arg_2.ZOOKEEPERS])
  arg_1[arg_2.CLUSTER] = set(arg_1[arg_2.CLUSTER])

  return arg_1


return self._post(
            urljoin(
                self.enterprise_configuration.degreed_base_url,
                self.global_degreed_config.completion_status_api_path
            ),
            payload,
            self.COMPLETION_PROVIDER_SCOPE
        )

def Func(arg_0, arg_1, arg_2):  # pylint: disable=unused-argument
        """
        Send a completion status payload to the Degreed Completion Status endpoint

        Args:
            user_id: Unused.
            payload: JSON encoded object (serialized from DegreedLearnerDataTransmissionAudit)
                containing completion status fields per Degreed documentation.

        Returns:
            A tuple containing the status code and the body of the response.
        Raises:
            HTTPError: if we received a failure response code from Degreed
        """
        return arg_0._post(
            urljoin(
                arg_0.enterprise_configuration.degreed_base_url,
                arg_0.global_degreed_config.completion_status_api_path
            ),
            arg_2,
            arg_0.COMPLETION_PROVIDER_SCOPE
        )


(graph: BELGraph, nodes: Optional[Iterable[BaseEntity]]=None)

def Func ( arg_0 : arg_1 , arg_2 : arg_3 [ arg_4 [ arg_5 ] ] = None ) -> None : for arg_6 in arg_0 if arg_2 is None else arg_2 : if is_node_highlighted ( arg_0 , arg_6 ) : del arg_0 . node [ arg_6 ] [ NODE_HIGHLIGHT ]

def Func(arg_0: arg_1, arg_2: arg_3[arg_4[arg_5]]=None) -> None:
    """Removes the highlight from the given nodes, or all nodes if none given.

    :param graph: A BEL graph
    :param nodes: The list of nodes to un-highlight
    """
    for arg_6 in arg_0 if arg_2 is None else arg_2:
        if is_node_highlighted(arg_0, arg_6):
            del arg_0.node[arg_6][NODE_HIGHLIGHT]

Removes the highlight from the given nodes or all nodes if none given .


def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : for arg_4 in arg_2 : arg_1 . seek ( arg_4 . offset ) arg_5 = cdata . uint_be ( arg_1 . read ( 4 ) ) if arg_5 == 1 : arg_5 = cdata . ulonglong_be ( arg_1 . read ( 12 ) [ 4 : ] ) arg_1 . seek ( arg_4 . offset + 8 ) arg_1 . write ( cdata . to_ulonglong_be ( arg_5 + arg_3 ) ) else : arg_1 . seek ( arg_4 . offset ) arg_1 . write ( cdata . to_uint_be ( arg_5 + arg_3 ) )

def Func(arg_0, arg_1, arg_2, arg_3):
        """Update all parent atoms with the new size."""
        for arg_4 in arg_2:
            arg_1.seek(arg_4.offset)
            arg_5 = cdata.uint_be(arg_1.read(4))
            if arg_5 == 1:  # 64bit
                # skip name (4B) and read size (8B)
                arg_5 = cdata.ulonglong_be(arg_1.read(12)[4:])
                arg_1.seek(arg_4.offset + 8)
                arg_1.write(cdata.to_ulonglong_be(arg_5 + arg_3))
            else:  # 32bit
                arg_1.seek(arg_4.offset)
                arg_1.write(cdata.to_uint_be(arg_5 + arg_3))

Update all parent atoms with the new size .


def Func ( arg_0 , arg_1 ) : arg_2 = len ( arg_1 ) if arg_0 . buffer : Func = arg_0 . buffer [ - 1 ] if not isinstance ( Func , Text ) : Func = Text ( ) arg_0 . buffer . append ( Func ) Func . add ( arg_1 , arg_2 ) arg_0 . buffer_width += arg_2 arg_0 . _break_outer_groups ( ) else : arg_0 . output . write ( arg_1 ) arg_0 . output_width += arg_2

def Func(arg_0, arg_1):
        """Add literal text to the output."""
        arg_2 = len(arg_1)
        if arg_0.buffer:
            Func = arg_0.buffer[-1]
            if not isinstance(Func, Text):
                Func = Text()
                arg_0.buffer.append(Func)
            Func.add(arg_1, arg_2)
            arg_0.buffer_width += arg_2
            arg_0._break_outer_groups()
        else:
            arg_0.output.write(arg_1)
            arg_0.output_width += arg_2


(self, file_id, etag=None, source=None, content=None)

def Func(arg_0, arg_1, arg_2=None, arg_3=None, arg_4=None):
        '''Upload a file content. The file entity must already exist.

        If an ETag is provided the file stored on the server is verified
        against it. If it does not match, StorageException is raised.
        This means the client needs to update its knowledge of the resource
        before attempting to update again. This can be used for optimistic
        concurrency control.

        Args:
            file_id (str): The UUID of the file whose content is written.
            etag (str): The etag to match the contents against.
            source (str): The path of the local file whose content to be uploaded.
            content (str): A string of the content to be uploaded.

        Note:
            ETags should be enclosed in double quotes::

                my_etag = '"71e1ed9ee52e565a56aec66bc648a32c"'

        Returns:
            The ETag of the file upload::

                '"71e1ed9ee52e565a56aec66bc648a32c"'

        Raises:
            IOError: The source cannot be opened.
            StorageArgumentException: Invalid arguments
            StorageForbiddenException: Server response code 403
            StorageNotFoundException: Server response code 404
            StorageException: other 400-600 error codes
        '''
        if not is_valid_uuid(arg_1):
            raise StorageArgumentException(
                'Invalid UUID for file_id: {0}'.format(arg_1))

        if not (arg_3 or arg_4) or (arg_3 and arg_4):
            raise StorageArgumentException('Either one of source file or content '
                                           'has to be provided.')

        arg_5 = arg_0._authenticated_request \
            .to_endpoint('file/{}/content/upload/'.format(arg_1)) \
            .with_body(arg_4 or open(arg_3, 'rb')) \
            .with_headers({'If-Match': arg_2} if arg_2 else {}) \
            .post()

        if 'ETag' not in arg_5.headers:
            raise StorageException('No ETag received from the service after the upload')

        return arg_5.headers['ETag']

Upload a file content . The file entity must already exist .


def Func ( arg_0 , arg_1 , arg_2 ) : for arg_3 , arg_4 in enumerate ( arg_0 . layers ) : if arg_1 == arg_3 or arg_1 == arg_4 . name : return arg_4 . Func ( arg_2 ) raise KeyError ( arg_1 )

def Func(arg_0, arg_1, arg_2):
        '''Get a parameter from a layer in the network.

        Parameters
        ----------
        which : int or str
            The layer that owns the parameter to return.

            If this is an integer, then 0 refers to the input layer, 1 refers
            to the first hidden layer, 2 to the second, and so on.

            If this is a string, the layer with the corresponding name, if any,
            will be used.

        param : int or str
            Name of the parameter to retrieve from the specified layer, or its
            index in the parameter list of the layer.

        Raises
        ------
        KeyError
            If there is no such layer, or if there is no such parameter in the
            specified layer.

        Returns
        -------
        param : Theano shared variable
            A shared parameter variable from the indicated layer.
        '''
        for arg_3, arg_4 in enumerate(arg_0.layers):
            if arg_1 == arg_3 or arg_1 == arg_4.name:
                return arg_4.Func(arg_2)
        raise KeyError(arg_1)

Get a parameter from a layer in the network .


def Func ( arg_0 ) : Func = [ ] arg_2 = PATHS [ 'GET_INTERACTIONS' ] % arg_0 . id arg_3 = arg_0 . api . get ( arg_2 = arg_2 ) for arg_4 in arg_3 [ 'interactions' ] : Func . append ( ResponseObject ( arg_4 ) ) arg_0 . __interactions = Func return arg_0 . __interactions

def Func(arg_0):
    '''
      Returns the detailed information on individual interactions with the social
      media update such as favorites, retweets and likes.
    '''

    Func = []
    arg_2 = PATHS['GET_INTERACTIONS'] % arg_0.id

    arg_3 = arg_0.api.get(arg_2=arg_2)
    for arg_4 in arg_3['interactions']:
      Func.append(ResponseObject(arg_4))

    arg_0.__interactions = Func

    return arg_0.__interactions

Returns the detailed information on individual interactions with the social media update such as favorites retweets and likes .


def
Func
(
arg_0
)
:
arg_1
=
msvcrt
.
get_osfhandle
(
sys
.
stdin
.
fileno
(
)
)
arg_2
=
WaitForSingleObject
(
arg_1
,
100
)
if
arg_2
==
WAIT_FAILED
:
raise
ctypes
.
WinError
(
)
elif
arg_2
==
WAIT_TIMEOUT
:
print
(
"."
,
end
=
''
)
return
else
:
arg_3
=
ctypes
.
create_string_buffer
(
256
)
arg_4
=
DWORD
(
0
)
print
(
'?'
,
end
=
''
)
if
not
ReadFile
(
arg_1
,
arg_3
,
256
,
ctypes
.
byref
(
arg_4
)
,
)
:
raise
ctypes
.
WinError
(
)
FlushConsoleInputBuffer
(
arg_1
)
arg_3
=
arg_3
.
value
arg_3
=
arg_3
.
replace
(
'\r\n'
,
'\n'
)
arg_3
=
arg_3
.
replace
(
'\r'
,
'\n'
)
print
(
repr
(
arg_3
)
+
" "
,
end
=
''
)
return
arg_3

def Func(arg_0):
        """Use the raw Win32 handle of sys.stdin to do non-blocking reads"""
        # WARNING: This is experimental, and produces inconsistent results.
        #          It's possible for the handle not to be appropriate for use
        #          with WaitForSingleObject, among other things.
        arg_1 = msvcrt.get_osfhandle(sys.stdin.fileno())
        arg_2 = WaitForSingleObject(arg_1, 100)
        if arg_2 == WAIT_FAILED:
            raise ctypes.WinError()
        elif arg_2 == WAIT_TIMEOUT:
            print(".", end='')
            return None
        else:
            arg_3 = ctypes.create_string_buffer(256)
            arg_4 = DWORD(0)
            print('?', end='')

            if not ReadFile(arg_1, arg_3, 256,
                        ctypes.byref(arg_4), None):
                raise ctypes.WinError()
            # This ensures the non-blocking works with an actual console
            # Not checking the error, so the processing will still work with
            # other handle types
            FlushConsoleInputBuffer(arg_1)

            arg_3 = arg_3.value
            arg_3 = arg_3.replace('\r\n', '\n')
            arg_3 = arg_3.replace('\r', '\n')
            print(repr(arg_3) + " ", end='')
            return arg_3

Use the raw Win32 handle of sys . stdin to do non - blocking reads


def Func ( arg_0 ) : if not op . isdir ( arg_0 ) : os . makedirs ( arg_0 ) arg_1 = op . join ( arg_0 , "config.ini" ) arg_2 = open ( arg_1 , "w" ) arg_2 . write ( "[BOOL]\nManualNIfTIConv=0\n" ) arg_2 . close ( ) return arg_1

def Func(arg_0):
    """ Generate a dcm2nii configuration file that disable the interactive
    mode.
    """
    if not op.isdir(arg_0):
        os.makedirs(arg_0)

    arg_1 = op.join(arg_0, "config.ini")
    arg_2 = open(arg_1, "w")
    arg_2.write("[BOOL]\nManualNIfTIConv=0\n")
    arg_2.close()
    return arg_1

Generate a dcm2nii configuration file that disable the interactive mode .


def Func ( arg_0 , arg_1 ) : for arg_2 in arg_0 . methods : if arg_1 == arg_2 . name : return arg_2 return None

def Func(arg_0, arg_1):
    """Searches for the specified method, and returns its descriptor."""
    for arg_2 in arg_0.methods:
      if arg_1 == arg_2.name:
        return arg_2
    return None

Searches for the specified method and returns its descriptor .


def Func ( arg_0 : arg_1 . node_classes . NodeNG ) -> Optional [ type ] : arg_4 = set ( ) try : for arg_5 in arg_0 . infer ( ) : if arg_5 == arg_1 . Uninferable or is_none ( arg_5 ) : continue arg_4 . add ( arg_5 ) if len ( arg_4 ) > 1 : return None except arg_1 . InferenceError : return None return arg_4 . pop ( ) if arg_4 else None

def Func(arg_0: arg_1.node_classes.NodeNG) -> Optional[type]:
    """Return the inferred type for `node`

    If there is more than one possible type, or if inferred type is Uninferable or None,
    return None
    """
    # check there is only one possible type for the assign node. Else we
    # don't handle it for now
    arg_4 = set()
    try:
        for arg_5 in arg_0.infer():
            if arg_5 == arg_1.Uninferable or is_none(arg_5):
                continue
            arg_4.add(arg_5)
            if len(arg_4) > 1:
                return None
    except arg_1.InferenceError:
        return None
    return arg_4.pop() if arg_4 else None


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
arg_0
.
n
arg_3
=
(
''
,
)
*
(
arg_2
1
)
arg_4
=
[
]
for
arg_5
in
range
(
arg_1
)
:
if
arg_3
not
in
arg_0
.
cond_prob
:
arg_3
=
(
''
,
)
*
(
arg_2
1
)
arg_6
=
arg_0
.
cond_prob
[
arg_3
]
.
sample
(
)
arg_4
.
append
(
arg_6
)
arg_3
=
arg_3
[
1
:
]
+
(
arg_6
,
)
return
' '
.
join
(
arg_4
)

def Func(arg_0, arg_1):
        """Build up a random sample of text nwords words long, using
        the conditional probability given the n-1 preceding words."""
        arg_2 = arg_0.n
        arg_3 = ('',) * (arg_2-1)
        arg_4 = []
        for arg_5 in range(arg_1):
            if arg_3 not in arg_0.cond_prob:
                arg_3 = ('',) * (arg_2-1) # Cannot continue, so restart.
            arg_6 = arg_0.cond_prob[arg_3].sample()
            arg_4.append(arg_6)
            arg_3 = arg_3[1:] + (arg_6,)
        return ' '.join(arg_4)

Build up a random sample of text nwords words long using the conditional probability given the n - 1 preceding words .


(self, mapper, nan_mapping=None, null_mapping=None)

def
Func
(
arg_0
,
arg_1
,
arg_2
=
,
arg_3
=
)
:
assert
isinstance
(
arg_1
,
collectionsAbc
.
Mapping
)
,
"Funcper should be a dict like object"
arg_4
=
arg_0
.
ds
arg_5
=
np
.
array
(
list
(
arg_1
.
keys
(
)
)
)
arg_6
=
arg_4
.
_set
(
arg_0
.
expression
)
arg_7
=
arg_6
.
keys
(
)
arg_8
=
any
(
[
key
!=
key
for
key
in
arg_5
]
)
if
not
set
(
arg_5
)
.
issuperset
(
arg_7
)
:
arg_9
=
set
(
arg_7
)
.
difference
(
arg_5
)
arg_10
=
list
(
arg_9
)
[
0
]
if
arg_10
==
arg_10
:
raise
ValueError
(
'Missing values in Funcper: %s'
%
arg_9
)
arg_11
=
[
arg_1
[
key
]
for
key
in
arg_7
]
if
arg_6
.
has_nan
:
if
arg_8
:
arg_11
=
[
arg_1
[
np
.
]
]
+
arg_11
else
:
arg_11
=
[
arg_2
]
+
arg_11
if
arg_6
.
has_null
:
arg_11
=
[
arg_3
]
+
arg_11
arg_11
=
np
.
array
(
arg_11
)
arg_12
=
arg_4
.
add_variable
(
'Func_key_set'
,
arg_6
,
unique
=
True
)
arg_13
=
arg_4
.
add_variable
(
'Func_choices'
,
arg_11
,
unique
=
True
)
arg_14
=
'_choose(_ordinal_values({}, {}), {})'
.
format
(
arg_0
,
arg_12
,
arg_13
)
return
Expression
(
arg_4
,
arg_14
)

def Func(arg_0, arg_1, arg_2=None, arg_3=None):
        """Map values of an expression or in memory column accoring to an input
        dictionary or a custom callable function.

        Example:

        >>> import vaex
        >>> df = vaex.from_arrays(color=['red', 'red', 'blue', 'red', 'green'])
        >>> Funcper = {'red': 1, 'blue': 2, 'green': 3}
        >>> df['color_Funcped'] = df.color.Func(Funcper)
        >>> df
        #  color      color_Funcped
        0  red                   1
        1  red                   1
        2  blue                  2
        3  red                   1
        4  green                 3
        >>> import numpy as np
        >>> df = vaex.from_arrays(type=[0, 1, 2, 2, 2, np.nan])
        >>> df['role'] = df['type'].Func({0: 'admin', 1: 'maintainer', 2: 'user', np.nan: 'unknown'})
        >>> df
        #    type  role
        0       0  admin
        1       1  maintainer
        2       2  user
        3       2  user
        4       2  user
        5     nan  unknown

        :param Funcper: dict like object used to Func the values from keys to values
        :param nan_Funcping: value to be used when a nan is present (and not in the Funcper)
        :param null_Funcping: value to use used when there is a missing value
        :return: A vaex expression
        :rtype: vaex.expression.Expression
        """
        assert isinstance(arg_1, collectionsAbc.Mapping), "Funcper should be a dict like object"

        arg_4 = arg_0.ds
        arg_5 = np.array(list(arg_1.keys()))

        # we Func the keys to a ordinal values [0, N-1] using the set
        arg_6 = arg_4._set(arg_0.expression)
        arg_7 = arg_6.keys()
        arg_8 = any([key != key for key in arg_5])

        # we want all possible values to be converted
        # so Funcper's key should be a superset of the keys found
        if not set(arg_5).issuperset(arg_7):
            arg_9 = set(arg_7).difference(arg_5)
            arg_10 = list(arg_9)[0]
            if arg_10 == arg_10:  # safe nan check
                raise ValueError('Missing values in Funcper: %s' % arg_9)

        # and these are the corresponding choices
        arg_11 = [arg_1[key] for key in arg_7]
        if arg_6.has_nan:
            if arg_8:
                arg_11 = [arg_1[np.nan]] + arg_11
            else:
                arg_11 = [arg_2] + arg_11
        if arg_6.has_null:
            arg_11 = [arg_3] + arg_11
        arg_11 = np.array(arg_11)

        arg_12 = arg_4.add_variable('Func_key_set', arg_6, unique=True)
        arg_13 = arg_4.add_variable('Func_choices', arg_11, unique=True)
        arg_14 = '_choose(_ordinal_values({}, {}), {})'.format(arg_0, arg_12, arg_13)
        return Expression(arg_4, arg_14)

Map values of an expression or in memory column accoring to an input
        dictionary or a custom callable function.

        Example:

        >>> import vaex
        >>> df = vaex.from_arrays(color=['red', 'red', 'blue', 'red', 'green'])
        >>> mapper = {'red': 1, 'blue': 2, 'green': 3}
        >>> df['color_mapped'] = df.color.map(mapper)
        >>> df
        #  color      color_mapped
        0  red                   1
        1  red                   1
        2  blue                  2
        3  red                   1
        4  green                 3
        >>> import numpy as np
        >>> df = vaex.from_arrays(type=[0, 1, 2, 2, 2, np.nan])
        >>> df['role'] = df['type'].map({0: 'admin', 1: 'maintainer', 2: 'user', np.nan: 'unknown'})
        >>> df
        #    type  role
        0       0  admin
        1       1  maintainer
        2       2  user
        3       2  user
        4       2  user
        5     nan  unknown

        :param mapper: dict like object used to map the values from keys to values
        :param nan_mapping: value to be used when a nan is present (and not in the mapper)
        :param null_mapping: value to use used when there is a missing value
        :return: A vaex expression
        :rtype: vaex.expression.Expression

Map values of an expression or in memory column accoring to an input dictionary or a custom callable function .


def Func():
    """ Get the clipboard's text using Tkinter.

    This is the default on systems that are not Windows or OS X. It may
    interfere with other UI toolkits and should be replaced with an
    implementation that uses that toolkit.
    """
    try:
        import Tkinter
    except ImportError:
        raise TryNext("Getting text from the clipboard on this platform "
                      "requires Tkinter.")
    arg_0 = Tkinter.Tk()
    arg_0.withdraw()
    arg_1 = arg_0.clipboard_get()
    arg_0.destroy()
    return arg_1

Get the clipboard s text using Tkinter .


def Func ( arg_0 ) : arg_1 = arg_0 [ 'PolicyName' ] arg_2 = { } arg_2 [ 'type' ] = arg_0 [ 'PolicyTypeName' ] arg_3 = arg_0 [ 'PolicyAttributeDescriptions' ] if arg_2 [ 'type' ] != 'SSLNegotiationPolicyType' : return arg_1 , arg_2 arg_4 = dict ( ) for arg_5 in arg_3 : arg_4 [ arg_5 [ 'AttributeName' ] ] = arg_5 [ 'AttributeValue' ] arg_2 [ 'protocols' ] = dict ( ) arg_2 [ 'protocols' ] [ 'sslv2' ] = bool ( arg_4 . get ( 'Protocol-SSLv2' ) ) arg_2 [ 'protocols' ] [ 'sslv3' ] = bool ( arg_4 . get ( 'Protocol-SSLv3' ) ) arg_2 [ 'protocols' ] [ 'tlsv1' ] = bool ( arg_4 . get ( 'Protocol-TLSv1' ) ) arg_2 [ 'protocols' ] [ 'tlsv1_1' ] = bool ( arg_4 . get ( 'Protocol-TLSv1.1' ) ) arg_2 [ 'protocols' ] [ 'tlsv1_2' ] = bool ( arg_4 . get ( 'Protocol-TLSv1.2' ) ) arg_2 [ 'server_defined_cipher_order' ] = bool ( arg_4 . get ( 'Server-Defined-Cipher-Order' ) ) arg_2 [ 'reference_security_policy' ] = arg_4 . get ( 'Reference-Security-Policy' , None ) arg_6 = [ 'Server-Defined-Cipher-Order' , 'Protocol-SSLv2' , 'Protocol-SSLv3' , 'Protocol-TLSv1' , 'Protocol-TLSv1.1' , 'Protocol-TLSv1.2' , 'Reference-Security-Policy' ] arg_7 = [ ] for arg_8 in arg_4 : if arg_4 [ arg_8 ] == 'true' and arg_8 not in arg_6 : arg_7 . append ( arg_8 ) arg_7 . sort ( ) arg_2 [ 'supported_ciphers' ] = arg_7 return arg_1 , arg_2

def Func(arg_0):
    """
    Policies returned from boto3 are massive, ugly, and difficult to read.
    This method flattens and reformats the policy.

    :param policy: Result from invoking describe_load_balancer_policies(...)
    :return: Returns a tuple containing policy_name and the reformatted policy dict.
    """
    arg_1 = arg_0['PolicyName']
    arg_2 = {}
    arg_2['type'] = arg_0['PolicyTypeName']
    arg_3 = arg_0['PolicyAttributeDescriptions']

    if arg_2['type'] != 'SSLNegotiationPolicyType':
        return arg_1, arg_2

    arg_4 = dict()
    for arg_5 in arg_3:
        arg_4[arg_5['AttributeName']] = arg_5['AttributeValue']

    arg_2['protocols'] = dict()
    arg_2['protocols']['sslv2'] = bool(arg_4.get('Protocol-SSLv2'))
    arg_2['protocols']['sslv3'] = bool(arg_4.get('Protocol-SSLv3'))
    arg_2['protocols']['tlsv1'] = bool(arg_4.get('Protocol-TLSv1'))
    arg_2['protocols']['tlsv1_1'] = bool(arg_4.get('Protocol-TLSv1.1'))
    arg_2['protocols']['tlsv1_2'] = bool(arg_4.get('Protocol-TLSv1.2'))
    arg_2['server_defined_cipher_order'] = bool(arg_4.get('Server-Defined-Cipher-Order'))
    arg_2['reference_security_policy'] = arg_4.get('Reference-Security-Policy', None)

    arg_6 = [
        'Server-Defined-Cipher-Order',
        'Protocol-SSLv2',
        'Protocol-SSLv3',
        'Protocol-TLSv1',
        'Protocol-TLSv1.1',
        'Protocol-TLSv1.2',
        'Reference-Security-Policy'
    ]

    arg_7 = []
    for arg_8 in arg_4:
        if arg_4[arg_8] == 'true' and arg_8 not in arg_6:
            arg_7.append(arg_8)

    arg_7.sort()
    arg_2['supported_ciphers'] = arg_7

    return arg_1, arg_2

Policies returned from boto3 are massive ugly and difficult to read . This method flattens and reformats the policy .


def Func ( arg_0 = arg_1 ) : swhlab . memtest . memtest ( arg_0 ) swhlab . memtest . checkSweep ( arg_0 ) swhlab . plot . save ( arg_0 , tag = '02-check' , resize = False ) arg_2 , arg_3 = swhlab . plot . IV ( arg_0 , 1.2 , 1.4 , True , 'b' ) swhlab . plot . save ( arg_0 , tag = 'iv' ) arg_4 = arg_0 . clampValues ( 1.2 ) arg_0 . saveThing ( [ arg_4 , arg_2 ] , '01_iv' )

def Func(arg_0=arg_1):
    """combination of membrane test and IV steps."""
    swhlab.memtest.memtest(arg_0) #do membrane test on every sweep
    swhlab.memtest.checkSweep(arg_0) #see all MT values
    swhlab.plot.save(arg_0,tag='02-check',resize=False)

    arg_2,arg_3=swhlab.plot.IV(arg_0,1.2,1.4,True,'b')
    swhlab.plot.save(arg_0,tag='iv')
    arg_4=arg_0.clampValues(1.2) #generate IV clamp values
    arg_0.saveThing([arg_4,arg_2],'01_iv')

combination of membrane test and IV steps .


(self,
                   object_type,
                   unique_identifiers,
                   derivation_method,
                   derivation_parameters,
                   **kwargs)

def Func(arg_0,
                   arg_1,
                   arg_2,
                   arg_3,
                   arg_4,
                   **arg_5):
        """
        Derive a new key or secret data from existing managed objects.

        Args:
            object_type (ObjectType): An ObjectType enumeration specifying
                what type of object to derive. Only SymmetricKeys and
                SecretData can be specified. Required.
            unique_identifiers (list): A list of strings specifying the
                unique IDs of the existing managed objects to use for
                derivation. Multiple objects can be specified to fit the
                requirements of the given derivation method. Required.
            derivation_method (DerivationMethod): A DerivationMethod
                enumeration specifying how key derivation should be done.
                Required.
            derivation_parameters (dict): A dictionary containing various
                settings for the key derivation process. See Note below.
                Required.
            **kwargs (various): A placeholder for object attributes that
                should be set on the newly derived object. Currently
                supported attributes include:
                    cryptographic_algorithm (enums.CryptographicAlgorithm)
                    cryptographic_length (int)

        Returns:
            string: The unique ID of the newly derived object.

        Raises:
            ClientConnectionNotOpen: if the client connection is unusable
            KmipOperationFailure: if the operation result is a failure
            TypeError: if the input arguments are invalid

        Notes:
            The derivation_parameters argument is a dictionary that can
            contain the following key/value pairs:

            Key                        | Value
            ---------------------------|---------------------------------------
            'cryptographic_parameters' | A dictionary containing additional
                                       | cryptographic settings. See the
                                       | decrypt method for more information.
            'initialization_vector'    | Bytes to be used to initialize the key
                                       | derivation function, if needed.
            'derivation_data'          | Bytes to be used as the basis for the
                                       | key derivation process (e.g., the
                                       | bytes to be encrypted, hashed, etc).
            'salt'                     | Bytes to used as a salt value for the
                                       | key derivation function, if needed.
                                       | Usually used with PBKDF2.
            'iteration_count'          | An integer defining how many
                                       | iterations should be used with the key
                                       | derivation function, if needed.
                                       | Usually used with PBKDF2.
        """
        # Check input
        if not isinstance(arg_1, enums.ObjectType):
            raise TypeError("Object type must be an ObjectType enumeration.")
        if not isinstance(arg_2, list):
            raise TypeError("Unique identifiers must be a list of strings.")
        else:
            for arg_6 in arg_2:
                if not isinstance(arg_6, six.string_types):
                    raise TypeError(
                        "Unique identifiers must be a list of strings."
                    )
        if not isinstance(arg_3, enums.DerivationMethod):
            raise TypeError(
                "Derivation method must be a DerivationMethod enumeration."
            )
        if not isinstance(arg_4, dict):
            raise TypeError("Derivation parameters must be a dictionary.")

        arg_4 = DerivationParameters(
            cryptographic_parameters=arg_0._build_cryptographic_parameters(
                arg_4.get('cryptographic_parameters')
            ),
            initialization_vector=arg_4.get(
                'initialization_vector'
            ),
            derivation_data=arg_4.get('derivation_data'),
            salt=arg_4.get('salt'),
            iteration_count=arg_4.get('iteration_count')
        )

        # Handle object attributes
        arg_7 = []
        if arg_5.get('cryptographic_length'):
            arg_7.append(
                arg_0.attribute_factory.create_attribute(
                    enums.AttributeType.CRYPTOGRAPHIC_LENGTH,
                    arg_5.get('cryptographic_length')
                )
            )
        if arg_5.get('cryptographic_algorithm'):
            arg_7.append(
                arg_0.attribute_factory.create_attribute(
                    enums.AttributeType.CRYPTOGRAPHIC_ALGORITHM,
                    arg_5.get('cryptographic_algorithm')
                )
            )
        if arg_5.get('cryptographic_usage_mask'):
            arg_7.append(
                arg_0.attribute_factory.create_attribute(
                    enums.AttributeType.CRYPTOGRAPHIC_USAGE_MASK,
                    arg_5.get('cryptographic_usage_mask')
                )
            )
        arg_8 = cobjects.TemplateAttribute(
            arg_7=arg_7
        )

        # Derive the new key/data and handle the results
        arg_9 = arg_0.proxy.Func(
            arg_1,
            arg_2,
            arg_3,
            arg_4,
            arg_8
        )

        arg_10 = arg_9.get('result_status')
        if arg_10 == enums.ResultStatus.SUCCESS:
            return arg_9.get('unique_identifier')
        else:
            raise exceptions.KmipOperationFailure(
                arg_10,
                arg_9.get('result_reason'),
                arg_9.get('result_message')
            )

Derive a new key or secret data from existing managed objects .


def
Func
(
arg_0
)
:
arg_1
=
arg_0
.
core_parser
arg_1
.
add_argument
(
'-r'
,
'--range'
,
type
=
str
,
help
=
"The range to search for use"
)
return
arg_1

def Func(arg_0):
        """
            Argparser option with search functionality specific for ranges.
        """
        arg_1 = arg_0.core_parser
        arg_1.add_argument('-r', '--range', type=str, help="The range to search for use")
        return arg_1

Argparser option with search functionality specific for ranges .


def Func ( arg_0 ) : try : from invenio . search_engine import ( get_all_collections_of_a_record , get_restricted_collections_for_recid ) except ImportError : from invenio . legacy . search_engine import ( get_all_collections_of_a_record , get_restricted_collections_for_recid ) arg_1 = { 'all' : get_all_collections_of_a_record ( arg_0 , recreate_cache_if_needed = False ) , } arg_1 [ 'restricted' ] = dict ( ( coll , _get_collection_restrictions ( coll ) ) for coll in get_restricted_collections_for_recid ( arg_0 , recreate_cache_if_needed = False ) ) return arg_1

def Func(arg_0):
    """Get all collections the record belong to."""
    try:
        from invenio.search_engine import (
            get_all_collections_of_a_record,
            get_restricted_collections_for_recid)
    except ImportError:
        from invenio.legacy.search_engine import (
            get_all_collections_of_a_record,
            get_restricted_collections_for_recid)

    arg_1 = {
        'all':
        get_all_collections_of_a_record(arg_0, recreate_cache_if_needed=False),
    }
    arg_1['restricted'] = dict(
        (coll, _get_collection_restrictions(coll))
        for coll in get_restricted_collections_for_recid(
                arg_0, recreate_cache_if_needed=False))

    return arg_1

Get all collections the record belong to .


def Func ( arg_0 , arg_1 ) : if arg_0 . __maxsize and len ( arg_0 . __data ) >= arg_0 . __maxsize : return False heapq . heappush ( arg_0 . __data , arg_1 ) return True

def Func(arg_0, arg_1):
        """Put an item into the queue. Items should be comparable, eg. tuples.
        True - if item placed in queue.
        False - if queue is full and item can not be placed."""
        if arg_0.__maxsize and len(arg_0.__data) >= arg_0.__maxsize:
            return False
        heapq.heappush(arg_0.__data, arg_1)
        return True

Put an item into the queue . Items should be comparable eg . tuples . True - if item placed in queue . False - if queue is full and item can not be placed .


def Func ( arg_0 ) : arg_0 . _missing = { } for arg_2 , arg_3 in arg_0 . params . items ( ) : if arg_3 . required : arg_0 . _missing [ arg_2 ] = arg_3 if isinstance ( arg_3 , Derived ) : if arg_3 . loader is None : arg_3 . loader = arg_0 . __getattribute__ ( "_%s" % arg_2 ) elif isinstance ( arg_3 . loader , str ) : arg_3 . loader = arg_0 . __getattribute__ ( arg_3 . loader )

def Func(arg_0):
        """ Loop through the list of Properties,
        extract the derived and required properties and do the
        appropriate book-keeping
        """
        arg_0._missing = {}
        for arg_2, arg_3 in arg_0.params.items():
            if arg_3.required:
                arg_0._missing[arg_2] = arg_3
            if isinstance(arg_3, Derived):
                if arg_3.loader is None:
                    # Default to using _<param_name>
                    arg_3.loader = arg_0.__getattribute__("_%s" % arg_2)
                elif isinstance(arg_3.loader, str):
                    arg_3.loader = arg_0.__getattribute__(arg_3.loader)

Loop through the list of Properties extract the derived and required properties and do the appropriate book - keeping


(old_name, old_value, new_name, new_value,
              version_deprecated, version_removed)

def Func(arg_0, arg_1, arg_2, arg_3,
              arg_4, arg_5):
    '''Handle renamed arguments.

    Parameters
    ----------
    old_name : str
    old_value
        The name and value of the old argument

    new_name : str
    new_value
        The name and value of the new argument

    version_deprecated : str
        The version at which the old name became deprecated

    version_removed : str
        The version at which the old name will be removed

    Returns
    -------
    value
        - `new_value` if `old_value` of type `Deprecated`
        - `old_value` otherwise

    Warnings
    --------
    if `old_value` is not of type `Deprecated`

    '''
    if isinstance(arg_1, Deprecated):
        return arg_3
    else:
        arg_6 = inspect.stack()
        arg_7 = arg_6[1]
        arg_8 = arg_6[2]

        warnings.warn_explicit("{:s}() keyword argument '{:s}' has been "
                               "renamed to '{:s}' in version {:}."
                               "\n\tThis alias will be removed in version "
                               "{:}.".format(arg_7[3],
                                             arg_0, arg_2,
                                             arg_4,
                                             arg_5),
                               category=DeprecationWarning,
                               filename=arg_8[1],
                               lineno=arg_8[2])

        return arg_1


return modelmags, phase, ptimes, pmags, perrs

def Func(arg_0, arg_1, arg_2, arg_3):
    '''This returns a double eclipse shaped function.

    Suitable for first order modeling of eclipsing binaries.

    Parameters
    ----------

    ebparams : list of float
        This contains the parameters for the eclipsing binary::

            ebparams = [period (time),
                        epoch (time),
                        pdepth: primary eclipse depth (mags),
                        pduration: primary eclipse duration (phase),
                        psdepthratio: primary-secondary eclipse depth ratio,
                        secondaryphase: center phase of the secondary eclipse]

        `period` is the period in days.

        `epoch` is the time of minimum in JD.

        `pdepth` is the depth of the primary eclipse.

        - for magnitudes -> pdepth should be < 0
        - for fluxes     -> pdepth should be > 0

        `pduration` is the length of the primary eclipse in phase.

        `psdepthratio` is the ratio in the eclipse depths:
        `depth_secondary/depth_primary`. This is generally the same as the ratio
        of the `T_effs` of the two stars.

        `secondaryphase` is the phase at which the minimum of the secondary
        eclipse is located. This effectively parameterizes eccentricity.

        All of these will then have fitted values after the fit is done.

    times,mags,errs : np.array
        The input time-series of measurements and associated errors for which
        the eclipse model will be generated. The times will be used to generate
        model mags, and the input `times`, `mags`, and `errs` will be resorted
        by model phase and returned.

    Returns
    -------

    (modelmags, phase, ptimes, pmags, perrs) : tuple
        Returns the model mags and phase values. Also returns the input `times`,
        `mags`, and `errs` sorted by the model's phase.

    '''

    (arg_4, arg_5, arg_6, arg_7, arg_8, arg_9) = arg_0

    # generate the phases
    arg_10 = (arg_1 - arg_5)/arg_4
    arg_10 = arg_10 - np.floor(arg_10)

    arg_11 = np.argsort(arg_10)
    arg_12 = arg_10[arg_11]
    arg_13 = arg_1[arg_11]
    arg_14 = arg_2[arg_11]
    arg_15 = arg_3[arg_11]

    arg_16 = np.median(arg_14)
    arg_17 = np.full_like(arg_12, arg_16)

    arg_18 = -arg_6
    arg_19 = -arg_6 * arg_8

    arg_20 = arg_7/5.0    # we use 5-sigma as full-width -> duration
    arg_21 = arg_7/5.0  # secondary eclipse has the same duration

    arg_22 = arg_7/2.0

    # phase indices
    arg_23 = (
        (arg_12 >= (1.0 - arg_22)) & (arg_12 <= 1.0)
    )
    arg_24 = (
        (arg_12 >= 0.0) & (arg_12 <= arg_22)
    )

    arg_25 = (
        (arg_12 >= (arg_9 - arg_22)) &
        (arg_12 <= (arg_9 + arg_22))
    )

    # put in the eclipses
    arg_17[arg_23] = (
        arg_16 + _gaussian(arg_12[arg_23],
                              arg_18,
                              1.0,
                              arg_20)
    )
    arg_17[arg_24] = (
        arg_16 + _gaussian(arg_12[arg_24],
                              arg_18,
                              0.0,
                              arg_20)
    )
    arg_17[arg_25] = (
        arg_16 + _gaussian(arg_12[arg_25],
                              arg_19,
                              arg_9,
                              arg_21)
    )

    return arg_17, arg_12, arg_13, arg_14, arg_15

This returns a double eclipse shaped function .


def Func ( arg_0 , ** arg_1 ) : arg_0 . assert_is_dir_and_exists ( ) for arg_2 in arg_0 . select_by_ext ( ".py" ) : with open ( arg_2 . abspath , "rb" ) as f : arg_3 = f . read ( ) . decode ( "utf-8" ) arg_4 = Func . fix_code ( arg_3 , ** arg_1 ) with open ( arg_2 . abspath , "wb" ) as f : f . write ( arg_4 . encode ( "utf-8" ) )

def Func(arg_0, **arg_1):  # pragma: no cover
        """
        Auto convert your python code in a directory to pep8 styled code.

        :param kwargs: arguments for ``Func.fix_code`` method.

        **中文文档**

        将目录下的所有Python文件用pep8风格格式化。增加其可读性和规范性。
        """
        arg_0.assert_is_dir_and_exists()

        for arg_2 in arg_0.select_by_ext(".py"):
            with open(arg_2.abspath, "rb") as f:
                arg_3 = f.read().decode("utf-8")

            arg_4 = Func.fix_code(arg_3, **arg_1)

            with open(arg_2.abspath, "wb") as f:
                f.write(arg_4.encode("utf-8"))

Auto convert your python code in a directory to pep8 styled code.

        :param kwargs: arguments for ``autopep8.fix_code`` method.

        **中文文档**

        将目录下的所有Python文件用pep8风格格式化。增加其可读性和规范性。

Auto convert your python code in a directory to pep8 styled code .


def Func ( ) : with open ( path . join ( here , 'README.rst' ) , 'r' ) as f : arg_0 = f . read ( ) return arg_0

def Func():
    """Get long description from README."""
    with open(path.join(here, 'README.rst'), 'r') as f:
        arg_0 = f.read()
    return arg_0


(degrees, translate, scale_ranges, shears, img_size)

return angle, translations, scale, shear

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : arg_5 = random . uniform ( arg_0 [ 0 ] , arg_0 [ 1 ] ) if arg_1 is not None : arg_6 = arg_1 [ 0 ] * arg_4 [ 0 ] arg_7 = arg_1 [ 1 ] * arg_4 [ 1 ] arg_8 = ( np . round ( random . uniform ( - arg_6 , arg_6 ) ) , np . round ( random . uniform ( - arg_7 , arg_7 ) ) ) else : arg_8 = ( 0 , 0 ) if arg_2 is not None : arg_9 = random . uniform ( arg_2 [ 0 ] , arg_2 [ 1 ] ) else : arg_9 = 1.0 if arg_3 is not None : arg_10 = random . uniform ( arg_3 [ 0 ] , arg_3 [ 1 ] ) else : arg_10 = 0.0 return arg_5 , arg_8 , arg_9 , arg_10

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
        """Get parameters for affine transformation

        Returns:
            sequence: params to be passed to the affine transformation
        """
        arg_5 = random.uniform(arg_0[0], arg_0[1])
        if arg_1 is not None:
            arg_6 = arg_1[0] * arg_4[0]
            arg_7 = arg_1[1] * arg_4[1]
            arg_8 = (np.round(random.uniform(-arg_6, arg_6)),
                            np.round(random.uniform(-arg_7, arg_7)))
        else:
            arg_8 = (0, 0)

        if arg_2 is not None:
            arg_9 = random.uniform(arg_2[0], arg_2[1])
        else:
            arg_9 = 1.0

        if arg_3 is not None:
            arg_10 = random.uniform(arg_3[0], arg_3[1])
        else:
            arg_10 = 0.0

        return arg_5, arg_8, arg_9, arg_10


(self, email, password, role="user", public=True, **kwargs)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = "user" , arg_4 = True , ** arg_5 ) : arg_5 [ "email" ] = arg_1 arg_5 [ "password" ] = arg_2 arg_5 [ "role" ] = arg_3 arg_5 [ "public" ] = arg_4 arg_0 . metadata = arg_0 . db . Func ( arg_0 . path , arg_5 ) . json ( )

def Func(arg_0, arg_1, arg_2, arg_3="user", arg_4=True, **arg_5):
        """Creates the given user - using the passed in email and password.

        You can also set other default properties by passing in the relevant information::

            usr.Func("my@email","mypass",description="I like trains.")

        Furthermore, ConnectorDB permits immediate initialization of an entire user tree,
        so that you can Func all relevant devices and streams in one go::

            usr.Func("my@email","mypass",devices={
                "device1": {
                    "nickname": "My train",
                    "streams": {
                        "stream1": {
                            "schema": "{\"type\":\"string\"}",
                            "datatype": "train.choochoo"
                        }
                    },
                }
            })

        The user and meta devices are Funcd by default. If you want to add streams to the user device,
        use the "streams" option in place of devices in Func.
        """
        arg_5["email"] = arg_1
        arg_5["password"] = arg_2
        arg_5["role"] = arg_3
        arg_5["public"] = arg_4
        arg_0.metadata = arg_0.db.Func(
            arg_0.path, arg_5).json()

Creates the given user - using the passed in email and password.

        You can also set other default properties by passing in the relevant information::

            usr.create("my@email","mypass",description="I like trains.")

        Furthermore, ConnectorDB permits immediate initialization of an entire user tree,
        so that you can create all relevant devices and streams in one go::

            usr.create("my@email","mypass",devices={
                "device1": {
                    "nickname": "My train",
                    "streams": {
                        "stream1": {
                            "schema": "{\"type\":\"string\"}",
                            "datatype": "train.choochoo"
                        }
                    },
                }
            })

        The user and meta devices are created by default. If you want to add streams to the user device,
        use the "streams" option in place of devices in create.

Creates the given user - using the passed in email and password .


def Func ( arg_0 , arg_1 ) : if arg_0 . pk : arg_2 = type ( arg_0 ) if arg_2 . objects . filter ( pk = arg_0 . pk ) . exclude ( ** { '%s__isnull' % arg_1 : True } ) . exclude ( ** { '%s__exact' % arg_1 : '' } ) . exists ( ) : arg_3 = getattr ( arg_2 . objects . only ( arg_1 ) . get ( pk = arg_0 . pk ) , arg_1 ) else : arg_3 = None if arg_3 : if ( arg_3 . name == getattr ( arg_0 , arg_1 ) ) is False : DatabaseFileStorage ( ) . delete ( arg_3 . name )

def Func(arg_0, arg_1):
    """Delete file from database only if needed.

    When editing and the filefield is a new file,
    deletes the previous file (if any) from the database.
    Call this function immediately BEFORE saving the instance.
    """
    if arg_0.pk:
        arg_2 = type(arg_0)

        # Check if there is a file for the instance in the database
        if arg_2.objects.filter(pk=arg_0.pk).exclude(
            **{'%s__isnull' % arg_1: True}
        ).exclude(
            **{'%s__exact' % arg_1: ''}
        ).exists():
            arg_3 = getattr(
                arg_2.objects.only(arg_1).get(pk=arg_0.pk),
                arg_1
            )
        else:
            arg_3 = None

        # If there is a file, delete it if needed
        if arg_3:
            # When editing and NOT changing the file,
            #   old_file.name == getattr(instance, filefield_name)
            #   returns True. In this case, the file must NOT be deleted.
            # If the file IS being changed, the comparison returns False.
            #   In this case, the old file MUST be deleted.
            if (arg_3.name == getattr(arg_0, arg_1)) is False:
                DatabaseFileStorage().delete(arg_3.name)

Delete file from database only if needed .


return {
        'registrationData': websafe_encode(response),
        'clientData': websafe_encode(client_data)
    }

def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
if
isinstance
(
arg_1
,
string_types
)
:
arg_1
=
json
.
loads
(
arg_1
)
if
arg_1
[
'version'
]
!=
VERSION
:
raise
ValueError
(
'Unsupported U2F version: %s'
%
arg_1
[
'version'
]
)
arg_3
=
arg_1
.
get
(
'appId'
,
arg_2
)
verify_facet
(
arg_3
,
arg_2
)
arg_4
=
sha256
(
arg_3
.
encode
(
'utf8'
)
)
.
digest
(
)
arg_5
=
{
'typ'
:
'navigator.id.finishEnrollment'
,
'challenge'
:
arg_1
[
'challenge'
]
,
'origin'
:
arg_2
}
arg_5
=
json
.
dumps
(
arg_5
)
arg_6
=
sha256
(
arg_5
.
encode
(
'utf8'
)
)
.
digest
(
)
arg_7
=
arg_6
+
arg_4
arg_8
=
0x03
arg_9
=
0
arg_10
=
arg_0
.
send_apdu
(
INS_ENROLL
,
arg_8
,
arg_9
,
arg_7
)
return
{
'registrationData'
:
websafe_encode
(
arg_10
)
,
'clientData'
:
websafe_encode
(
arg_5
)
}

def Func(arg_0, arg_1, arg_2):
    """
    Register a U2F device

    data = {
        "version": "U2F_V2",
        "challenge": string, //b64 encoded challenge
        "appId": string, //app_id
    }

    """

    if isinstance(arg_1, string_types):
        arg_1 = json.loads(arg_1)

    if arg_1['version'] != VERSION:
        raise ValueError('Unsupported U2F version: %s' % arg_1['version'])

    arg_3 = arg_1.get('appId', arg_2)
    verify_facet(arg_3, arg_2)
    arg_4 = sha256(arg_3.encode('utf8')).digest()

    arg_5 = {
        'typ': 'navigator.id.finishEnrollment',
        'challenge': arg_1['challenge'],
        'origin': arg_2
    }
    arg_5 = json.dumps(arg_5)
    arg_6 = sha256(arg_5.encode('utf8')).digest()

    arg_7 = arg_6 + arg_4

    arg_8 = 0x03
    arg_9 = 0
    arg_10 = arg_0.send_apdu(INS_ENROLL, arg_8, arg_9, arg_7)

    return {
        'registrationData': websafe_encode(arg_10),
        'clientData': websafe_encode(arg_5)
    }


def Func ( ) : arg_0 = os . path arg_1 = arg_0 . dirname ( arg_0 . abspath ( arg_0 . join ( __file__ , '..' ) ) ) return pprint . pformat ( pkg_info ( arg_1 ) )

def Func():
    """Return useful information about IPython and the system, as a string.

    Example
    -------
    In [2]: print Func()
    {'commit_hash': '144fdae',      # random
     'commit_source': 'repository',
     'ipython_path': '/home/fperez/usr/lib/python2.6/site-packages/IPython',
     'ipython_version': '0.11.dev',
     'os_name': 'posix',
     'platform': 'Linux-2.6.35-22-generic-i686-with-Ubuntu-10.10-maverick',
     'sys_executable': '/usr/bin/python',
     'sys_platform': 'linux2',
     'sys_version': '2.6.6 (r266:84292, Sep 15 2010, 15:52:39) \\n[GCC 4.4.5]'}
   """
    arg_0 = os.path
    arg_1 = arg_0.dirname(arg_0.abspath(arg_0.join(__file__, '..')))
    return pprint.pformat(pkg_info(arg_1))

Return useful information about IPython and the system, as a string.

    Example
    -------
    In [2]: print sys_info()
    {'commit_hash': '144fdae',      # random
     'commit_source': 'repository',
     'ipython_path': '/home/fperez/usr/lib/python2.6/site-packages/IPython',
     'ipython_version': '0.11.dev',
     'os_name': 'posix',
     'platform': 'Linux-2.6.35-22-generic-i686-with-Ubuntu-10.10-maverick',
     'sys_executable': '/usr/bin/python',
     'sys_platform': 'linux2',
     'sys_version': '2.6.6 (r266:84292, Sep 15 2010, 15:52:39) \\n[GCC 4.4.5]'}

Return useful information about IPython and the system as a string .


(self, pk=None, create_on_missing=False, **kwargs)

def Func(arg_0, arg_1=None, arg_2=False, **arg_3):
        """Modify an existing notification template.

        Not all required configuration-related fields (required according to
        notification_type) should be provided.

        Fields in the resource's `identity` tuple can be used in lieu of a
        primary key for a lookup; in such a case, only other fields are
        written.

        To Func unique fields, you must use the primary key for the lookup.

        =====API DOCS=====
        Modify an already existing object.

        :param pk: Primary key of the resource to be modified.
        :type pk: int
        :param create_on_missing: Flag that if set, a new object is created if ``pk`` is not set and objects
                                  matching the appropriate unique criteria is not found.
        :type create_on_missing: bool
        :param `**kwargs`: Keyword arguments which, all together, will be used as PATCH body to Func the
                           resource object. if ``pk`` is not set, key-value pairs of ``**kwargs`` which are
                           also in resource's identity will be used to lookup existing reosource.
        :returns: A dictionary combining the JSON output of the modified resource, as well as two extra fields:
                  "changed", a flag indicating if the resource is successfully updated; "id", an integer which
                  is the primary key of the updated object.
        :rtype: dict

        =====API DOCS=====
        """
        # Create the resource if needed.
        if arg_1 is None and arg_2:
            try:
                arg_0.get(**copy.deepcopy(arg_3))
            except exc.NotFound:
                return arg_0.create(**arg_3)

        # Modify everything except notification type and configuration
        arg_4 = arg_0._separate(arg_3)
        arg_5 = arg_3.pop('notification_type', None)
        debug.log('Modify everything except notification type and'
                  ' configuration', header='details')
        arg_6 = super(Resource, arg_0).\
            Func(arg_1=arg_1, arg_2=arg_2, **arg_3)

        # Modify notification type and configuration
        if arg_5 is None or \
           arg_5 == arg_6['notification_type']:
            for arg_7 in arg_6['notification_configuration']:
                if arg_7 not in arg_4 or not arg_4[arg_7]:
                    arg_8 = arg_6['notification_configuration'][arg_7]
                    if not (arg_8 == '$encrypted$' and
                            arg_7 in Resource.encrypted_fields):
                        arg_4[arg_7] = arg_8
        if arg_5 is None:
            arg_3['notification_type'] = arg_6['notification_type']
        else:
            arg_3['notification_type'] = arg_5
        arg_0._configuration(arg_3, arg_4)
        debug.log('Modify notification type and configuration',
                  header='details')
        arg_9 = super(Resource, arg_0).\
            Func(arg_1=arg_1, arg_2=arg_2, **arg_3)

        # Update 'changed' field to give general changed info
        if 'changed' in arg_9 and 'changed' in arg_6:
            arg_9['changed'] = arg_9['changed'] or arg_6['changed']
        return arg_9

Modify an existing notification template.

        Not all required configuration-related fields (required according to
        notification_type) should be provided.

        Fields in the resource's `identity` tuple can be used in lieu of a
        primary key for a lookup; in such a case, only other fields are
        written.

        To modify unique fields, you must use the primary key for the lookup.

        =====API DOCS=====
        Modify an already existing object.

        :param pk: Primary key of the resource to be modified.
        :type pk: int
        :param create_on_missing: Flag that if set, a new object is created if ``pk`` is not set and objects
                                  matching the appropriate unique criteria is not found.
        :type create_on_missing: bool
        :param `**kwargs`: Keyword arguments which, all together, will be used as PATCH body to modify the
                           resource object. if ``pk`` is not set, key-value pairs of ``**kwargs`` which are
                           also in resource's identity will be used to lookup existing reosource.
        :returns: A dictionary combining the JSON output of the modified resource, as well as two extra fields:
                  "changed", a flag indicating if the resource is successfully updated; "id", an integer which
                  is the primary key of the updated object.
        :rtype: dict

        =====API DOCS=====

Modify an existing notification template .


def Func ( arg_0 ) : if hasattr ( arg_0 , "_boundedEntityPort" ) : return arg_0 . _boundedEntityPort . name else : return arg_0 . _getFullName ( ) . replace ( '.' , arg_0 . _NAME_SEPARATOR )

def Func(arg_0):
        """Get name in HDL """
        if hasattr(arg_0, "_boundedEntityPort"):
            return arg_0._boundedEntityPort.name
        else:
            return arg_0._getFullName().replace('.', arg_0._NAME_SEPARATOR)


def Func ( arg_0 ) : for arg_1 in arg_0 . rounds : arg_2 = arg_0 . rounds [ arg_1 ] . lockset if arg_2 . is_valid : return arg_2 return None

def Func(arg_0):
        "highest valid lockset on height"
        for arg_1 in arg_0.rounds:
            arg_2 = arg_0.rounds[arg_1].lockset
            if arg_2.is_valid:
                return arg_2
        return None


(self, raw_cell, store_history=False, silent=False)

def Func(arg_0, arg_1, arg_2=False, arg_3=False):
        """drop-in replacement for InteractiveShell.run_cell.

        This executes code remotely, instead of in the local namespace.

        See InteractiveShell.run_cell for details.
        """

        if (not arg_1) or arg_1.isspace():
            return

        arg_4 = arg_0.shell

        with arg_4.builtin_trap:
            arg_5 = arg_4.prefilter_manager.prefilter_lines(arg_1)

            # Store raw and processed history
            if arg_2:
                arg_4.history_manager.store_inputs(arg_4.execution_count,
                                                  arg_5, arg_1)

            # ipself.logger.log(cell, raw_cell)

            arg_6 = arg_4.compile.cache(arg_5, arg_4.execution_count)

            try:
                ast.parse(arg_5, filename=arg_6)
            except (OverflowError, SyntaxError, ValueError, TypeError,
                    MemoryError):
                # Case 1
                arg_4.showsyntaxerror()
                arg_4.execution_count += 1
                return None
            except NameError:
                # ignore name errors, because we don't know the remote keys
                pass

        if arg_2:
            # Write output to the database. Does nothing unless
            # history output logging is enabled.
            arg_4.history_manager.store_output(arg_4.execution_count)
            # Each cell is a *single* input, regardless of how many lines it has
            arg_4.execution_count += 1
        if re.search(r'get_ipython\(\)\.magic\(u?["\']%?autopx', arg_5):
            arg_0._disable_autopx()
            return False
        else:
            try:
                arg_7 = arg_0.view.execute(arg_5, arg_3=False, block=False)
            except:
                arg_4.showtraceback()
                return True
            else:
                if arg_0.view.block:
                    try:
                        arg_7.get()
                    except:
                        arg_0.shell.showtraceback()
                        return True
                    else:
                        with arg_4.builtin_trap:
                            arg_7.display_outputs()
                return False

drop - in replacement for InteractiveShell . run_cell .