def Func ( arg_0 , arg_1 ) : arg_2 = { 'Content-Type' : 'application/x-www-form-urlencoded' } arg_3 = { 'action' : 'retract' } arg_4 = 'bids/{}' . format ( arg_1 ) arg_5 = make_put_request ( arg_0 , arg_4 , arg_2 = arg_2 , params_data = arg_3 ) arg_6 = arg_5 . json ( ) if arg_5 . status_code == 200 : return arg_6 [ 'status' ] else : arg_6 = arg_5 . json ( ) raise BidNotRetractedException ( message = arg_6 [ 'message' ] , error_code = arg_6 [ 'error_code' ] , request_id = arg_6 [ 'request_id' ] )

def Func(arg_0, arg_1):
    """
    Retract a bid on a project
    """
    arg_2 = {
        'Content-Type': 'application/x-www-form-urlencoded'
    }
    arg_3 = {
        'action': 'retract'
    }
    # POST /api/projects/0.1/bids/{bid_id}/?action=revoke
    arg_4 = 'bids/{}'.format(arg_1)
    arg_5 = make_put_request(arg_0, arg_4, arg_2=arg_2,
                                params_data=arg_3)
    arg_6 = arg_5.json()
    if arg_5.status_code == 200:
        return arg_6['status']
    else:
        arg_6 = arg_5.json()
        raise BidNotRetractedException(message=arg_6['message'],
                                       error_code=arg_6['error_code'],
                                       request_id=arg_6['request_id'])


def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None ) : arg_1 = arg_1 . replace ( microsecond = 0 ) if arg_2 : arg_2 = arg_2 . replace ( microsecond = 0 ) else : arg_2 = dsub_util . replace_timezone ( datetime . datetime . min , pytz . utc ) if arg_3 : arg_3 = arg_3 . replace ( microsecond = 0 ) else : arg_3 = dsub_util . replace_timezone ( datetime . datetime . max , pytz . utc ) return arg_2 <= arg_1 <= arg_3

def Func(arg_0, arg_1, arg_2=None, arg_3=None):
    """Determine if the provided time is within the range, inclusive."""
    # The pipelines API stores operation create-time with second granularity.
    # We mimic this behavior in the local provider by truncating to seconds.
    arg_1 = arg_1.replace(microsecond=0)
    if arg_2:
      arg_2 = arg_2.replace(microsecond=0)
    else:
      arg_2 = dsub_util.replace_timezone(datetime.datetime.min, pytz.utc)
    if arg_3:
      arg_3 = arg_3.replace(microsecond=0)
    else:
      arg_3 = dsub_util.replace_timezone(datetime.datetime.max, pytz.utc)

    return arg_2 <= arg_1 <= arg_3

Determine if the provided time is within the range inclusive .


def Func(arg_0):
        """Returns the Twitter argument parser."""

        arg_1 = BackendCommandArgumentParser(arg_0.BACKEND.CATEGORIES,
                                              token_auth=True,
                                              archive=True)

        # Backend token is required
        arg_2 = arg_1.parser._option_string_actions['--api-token']
        arg_2.required = True

        # Meetup options
        arg_4 = arg_1.parser.add_argument_group('Twitter arguments')
        arg_4.add_argument('--max-items', dest='max_items',
                           type=int, default=MAX_ITEMS,
                           help="Maximum number of items requested on the same query")
        arg_4.add_argument('--no-entities', dest='include_entities',
                           arg_2='store_false',
                           help=" Exclude entities node")
        arg_4.add_argument('--geo-code', dest='geocode',
                           help="Select tweets by users located at latitude,longitude,radius")
        arg_4.add_argument('--lang', dest='lang',
                           help="Select tweets to the given language in ISO 639-1 code")
        arg_4.add_argument('--tweets-type', dest='tweets_type', default=TWEET_TYPE_MIXED,
                           help="Type of tweets returned. Default is 'mixed', others are 'recent' and 'popular'")
        arg_4.add_argument('--sleep-for-rate', dest='sleep_for_rate',
                           arg_2='store_true',
                           help="sleep for getting more rate")
        arg_4.add_argument('--min-rate-to-sleep', dest='min_rate_to_sleep',
                           default=MIN_RATE_LIMIT, type=int,
                           help="sleep until reset when the rate limit reaches this value")
        arg_4.add_argument('--sleep-time', dest='sleep_time',
                           default=SLEEP_TIME, type=int,
                           help="minimun sleeping time to avoid too many request exception")

        # Required arguments
        arg_1.parser.add_argument('query',
                                   help="Search query including operators, max 500 chars")

        return arg_1


def Func ( arg_0 , arg_1 = 0.025 ) : try : arg_2 = multiprocessing . cpu_count ( ) except NotImplementedError : arg_2 = 2 with multiprocessing . Pool ( processes = arg_2 ) as pool : arg_3 = [ id for id in np . unique ( arg_0 ) if id != 0 ] arg_4 = [ arg_1 * arg_0 . size for _ in range ( len ( arg_3 ) ) ] arg_5 = [ arg_0 for _ in range ( len ( arg_3 ) ) ] arg_6 = pool . starmap ( Func_task , zip ( arg_3 , arg_4 , arg_5 ) ) return [ arg_7 for arg_7 in arg_6 if arg_7 is not None ]

def Func(arg_0, arg_1=0.025):
    """
    Returns a list of segmentation masks each of the same dimension as the input one,
    but where they each have exactly one segment in them and all other samples in them
    are zeroed.

    Only bothers to return segments that are larger in total area than `threshold * mask.size`.
    """
    try:
        arg_2 = multiprocessing.cpu_count()
    except NotImplementedError:
        arg_2 = 2

    with multiprocessing.Pool(processes=arg_2) as pool:
        arg_3 = [id for id in np.unique(arg_0) if id != 0]
        arg_4 = [arg_1 * arg_0.size for _ in range(len(arg_3))]
        arg_5 = [arg_0 for _ in range(len(arg_3))]
        arg_6 = pool.starmap(Func_task, zip(arg_3, arg_4, arg_5))
    return [arg_7 for arg_7 in arg_6 if arg_7 is not None]

Returns a list of segmentation masks each of the same dimension as the input one but where they each have exactly one segment in them and all other samples in them are zeroed .


def
Func
(
arg_0
)
:
arg_1
=
dict
(
D
=
(
arg_0
.
diffusion_coeff
.
mean
(
)
,
'Diffusion coefficient (m^2/s)'
)
,
np
=
(
arg_0
.
num_particles
,
'Number of simulated particles'
)
,
t_step
=
(
arg_0
.
t_step
,
'Simulation time-step (s)'
)
,
t_max
=
(
arg_0
.
t_max
,
'Simulation total time (s)'
)
,
ID
=
(
arg_0
.
ID
,
'Simulation ID (int)'
)
,
EID
=
(
arg_0
.
EID
,
'IPython Engine ID (int)'
)
,
pico_mol
=
(
arg_0
.
concentration
(
)
*
1e12
,
'Particles concentration (pM)'
)
)
return
arg_1

def Func(arg_0):
        """A dict containing all the simulation numeric-parameters.

        The values are 2-element tuples: first element is the value and
        second element is a string describing the parameter (metadata).
        """
        arg_1 = dict(
            D = (arg_0.diffusion_coeff.mean(), 'Diffusion coefficient (m^2/s)'),
            np = (arg_0.num_particles, 'Number of simulated particles'),
            t_step = (arg_0.t_step, 'Simulation time-step (s)'),
            t_max = (arg_0.t_max, 'Simulation total time (s)'),
            ID = (arg_0.ID, 'Simulation ID (int)'),
            EID = (arg_0.EID, 'IPython Engine ID (int)'),
            pico_mol = (arg_0.concentration() * 1e12,
                        'Particles concentration (pM)'))
        return arg_1

A dict containing all the simulation numeric - parameters .


def Func(arg_0, arg_1=None, **arg_2):
        """
        Updates simultaneously all given fields.

        Parameters
        ----------
        data: dictionary containing field lowercase names or index as keys, and field values as values (dict syntax)
        or_data: keyword arguments containing field names as keys (kwargs syntax)
        """

        # workflow
        # --------
        # (methods belonging to create/Func/delete framework:
        #     epm._dev_populate_from_json_data, table.batch_add, record.Func, queryset.delete, record.delete)
        # 1. add inert
        #     * data is checked
        #     * old links are unregistered
        #     * record is stored in table (=> pk uniqueness is checked)
        # 2. activate: hooks, links, external files

        arg_1 = arg_2 if arg_1 is None else arg_1

        arg_0._Func_inert(arg_1)

        arg_0._dev_activate_hooks()
        arg_0._dev_activate_links()
        arg_0._dev_activate_external_files()

Updates simultaneously all given fields .


"usage: %prog -u user -s secret -n name [-l label] \[-t title] [-c callback] [TEXT]"

def Func():
    """ function to init option parser """
    arg_0 = "usage: %prog -u user -s secret -n name [-l label] \
[-t title] [-c callback] [TEXT]"

    arg_1 = OptionParser(arg_0, version="%prog " + notifo.__version__)
    arg_1.add_option("-u", "--user", action="store", dest="user",
                      help="your notifo username")
    arg_1.add_option("-s", "--secret", action="store", dest="secret",
                      help="your notifo API secret")
    arg_1.add_option("-n", "--name", action="store", dest="name",
                      help="recipient for the notification")
    arg_1.add_option("-l", "--label", action="store", dest="label",
                      help="label for the notification")
    arg_1.add_option("-t", "--title", action="store", dest="title",
                      help="title of the notification")
    arg_1.add_option("-c", "--callback", action="store", dest="callback",
                      help="callback URL to call")
    arg_1.add_option("-m", "--message", action="store_true", dest="message",
                      default=False, help="send message instead of notification")

    (arg_2, arg_3) = arg_1.parse_args()
    return (arg_1, arg_2, arg_3)


def Func(arg_0, arg_1):
        """Default certificate verification callback for TLS connections.

        :Parameters:
            - `cert`: certificate information
        :Types:
            - `cert`: `CertificateData`

        :return: computed verification result.
        """
        try:
            logger.debug("tls_Func(cert = {0!r})".format(arg_1))
            if not arg_1:
                logger.warning("No TLS certificate information received.")
                return False
            if not arg_1.validated:
                logger.warning("TLS certificate not validated.")
                return False
            arg_2 = arg_0.transport._dst_service # pylint: disable=W0212
            if arg_1.verify_server(arg_0.peer, arg_2):
                logger.debug(" tls: certificate valid for {0!r}"
                                                        .format(arg_0.peer))
                return True
            else:
                logger.debug(" tls: certificate not valid for {0!r}"
                                                        .format(arg_0.peer))
                return False
        except:
            logger.exception("Exception caught while checking a certificate")
            raise

Default certificate verification callback for TLS connections .


def Func(arg_0, arg_1):
  """Convert a JSON object into a message.

  Args:
    value: A JSON object.
    message: A WKT or regular protocol message to record the data.

  Raises:
    ParseError: In case of convert problems.
  """
  arg_2 = arg_1.DESCRIPTOR
  arg_3 = arg_2.full_name
  if _IsWrapperMessage(arg_2):
    _ConvertWrapperMessage(arg_0, arg_1)
  elif arg_3 in _WKTJSONMETHODS:
    _WKTJSONMETHODS[arg_3][1](arg_0, arg_1)
  else:
    _ConvertFieldValuePair(arg_0, arg_1)


async def Func ( arg_0 , arg_1 : arg_2 ) -> Response : if arg_0 . _update_handler : await arg_0 . _update_handler ( arg_0 . registry . get_metrics ( ) ) arg_3 = Response ( body = arg_0 . registry . generate_metrics ( ) ) arg_3 . content_type = CONTENT_TYPE_LATEST return arg_3

async def Func(arg_0, arg_1: arg_2) -> Response:
        """Handler for metrics."""
        if arg_0._update_handler:
            await arg_0._update_handler(arg_0.registry.get_metrics())
        arg_3 = Response(body=arg_0.registry.generate_metrics())
        arg_3.content_type = CONTENT_TYPE_LATEST
        return arg_3


def Func ( arg_0 , arg_1 ) : arg_1 . write ( Operators . ITEBV ( arg_1 . size , arg_0 . CF == False , 1 , 0 ) )

def Func(arg_0, arg_1):
        """
        Sets byte if not below.

        :param cpu: current CPU.
        :param dest: destination operand.
        """
        arg_1.write(Operators.ITEBV(arg_1.size, arg_0.CF == False, 1, 0))


def Func(arg_0,arg_1):
        '''
            _upgrade_breadth_info
            update breadth, breadth_path, and add desc to desc_level
        '''
        arg_2 = arg_0.desc
        arg_3 = arg_1.desc_level
        arg_4 = arg_3.__len__()
        arg_2['breadth'] = arg_4
        arg_2['breadth_path'].append(arg_4)
        arg_3.append(arg_2)

_upgrade_breadth_info update breadth breadth_path and add desc to desc_level


def Func ( arg_0 ) : if arg_0 . comment : if find_words ( arg_0 . comment , arg_0 . suspect_words , arg_0 . excluded_words ) : arg_0 . label_suspicious ( 'suspect_word' ) if arg_0 . source : for arg_1 in arg_0 . illegal_sources : if arg_1 in arg_0 . source . lower ( ) : arg_0 . label_suspicious ( 'suspect_word' ) break if arg_0 . imagery_used : for arg_1 in arg_0 . illegal_sources : if arg_1 in arg_0 . imagery_used . lower ( ) : arg_0 . label_suspicious ( 'suspect_word' ) break arg_0 . suspicion_reasons = list ( set ( arg_0 . suspicion_reasons ) )

def Func(arg_0):
        """Verify the fields source, imagery_used and comment of the changeset
        for some suspect words.
        """
        if arg_0.comment:
            if find_words(arg_0.comment, arg_0.suspect_words, arg_0.excluded_words):
                arg_0.label_suspicious('suspect_word')

        if arg_0.source:
            for arg_1 in arg_0.illegal_sources:
                if arg_1 in arg_0.source.lower():
                    arg_0.label_suspicious('suspect_word')
                    break

        if arg_0.imagery_used:
            for arg_1 in arg_0.illegal_sources:
                if arg_1 in arg_0.imagery_used.lower():
                    arg_0.label_suspicious('suspect_word')
                    break

        arg_0.suspicion_reasons = list(set(arg_0.suspicion_reasons))

Verify the fields source imagery_used and comment of the changeset for some suspect words .


def Func ( arg_0 , arg_1 , arg_2 , * arg_3 ) : if arg_2 : vlog ( arg_0 , arg_1 , * arg_3 )

def Func(arg_0, arg_1, arg_2, *arg_3):
    """Log 'msg % args' at level 'level' only if condition is fulfilled."""
    if arg_2:
        vlog(arg_0, arg_1, *arg_3)

Log msg % args at level level only if condition is fulfilled .


return self + Vector(
            (
                (self[0] < other[0]) - (self[0] > other[0]),
                (self[1] < other[1]) - (self[1] > other[1]),
            )
        )

def Func(arg_0, arg_1):
        '''returns the vector moved one step in the direction of the
        other, potentially diagonally.'''

        return arg_0 + Vector(
            (
                (arg_0[0] < arg_1[0]) - (arg_0[0] > arg_1[0]),
                (arg_0[1] < arg_1[1]) - (arg_0[1] > arg_1[1]),
            )
        )

returns the vector moved one step in the direction of the other potentially diagonally .


(self, method, params=None, request_id=None)

def Func(arg_0, arg_1, arg_2=None, arg_3=None):
        """ Calls the JSON-RPC endpoint. """
        arg_2 = arg_2 or []

        # Determines which 'id' value to use and increment the counter associated with the current
        # client instance if applicable.
        arg_4 = arg_3 or arg_0._id_counter
        if arg_3 is None:
            arg_0._id_counter += 1

        # Prepares the payload and the headers that will be used to forge the request.
        arg_5 = {'jsonrpc': '2.0', 'method': arg_1, 'params': arg_2, 'id': arg_4}
        arg_6 = {'Content-Type': 'application/json'}
        arg_7 = 'https' if arg_0.tls else 'http'
        arg_8 = '{}://{}:{}'.format(arg_7, arg_0.host, arg_0.port)

        # Calls the JSON-RPC endpoint!
        try:
            arg_9 = arg_0.session.post(arg_8, arg_6=arg_6, data=json.dumps(arg_5))
            arg_9.raise_for_status()
        except HTTPError:
            raise TransportError(
                'Got unsuccessful response from server (status code: {})'.format(
                    arg_9.status_code),
                arg_9=arg_9)

        # Ensures the response body can be deserialized to JSON.
        try:
            arg_10 = arg_9.json()
        except ValueError as e:
            raise ProtocolError(
                'Unable to deserialize response body: {}'.format(e), arg_9=arg_9)

        # Properly handles potential errors.
        if arg_10.get('error'):
            arg_11 = arg_10['error'].get('code', '')
            arg_12 = arg_10['error'].get('message', '')
            raise ProtocolError(
                'Error[{}] {}'.format(arg_11, arg_12), arg_9=arg_9, data=arg_10)
        elif 'result' not in arg_10:
            raise ProtocolError(
                'Response is empty (result field is missing)', arg_9=arg_9,
                data=arg_10)

        return arg_10['result']


def Func(arg_0, arg_1, arg_2, arg_3):
        r'''Method to calculate pressure-dependent gas molar volume at
        temperature `T` and pressure `P` with a given method.

        This method has no exception handling; see `TP_dependent_property`
        for that.

        Parameters
        ----------
        T : float
            Temperature at which to calculate molar volume, [K]
        P : float
            Pressure at which to calculate molar volume, [K]
        method : str
            Name of the method to use

        Returns
        -------
        Vm : float
            Molar volume of the gas at T and P, [m^3/mol]
        '''
        if arg_3 == EOS:
            arg_0.eos[0] = arg_0.eos[0].to_TP(arg_1=arg_1, arg_2=arg_2)
            arg_5 = arg_0.eos[0].V_g
        elif arg_3 == TSONOPOULOS_EXTENDED:
            arg_6 = BVirial_Tsonopoulos_extended(arg_1, arg_0.Tc, arg_0.Pc, arg_0.omega, dipole=arg_0.dipole)
            arg_5 = ideal_gas(arg_1, arg_2) + arg_6
        elif arg_3 == TSONOPOULOS:
            arg_6 = BVirial_Tsonopoulos(arg_1, arg_0.Tc, arg_0.Pc, arg_0.omega)
            arg_5 = ideal_gas(arg_1, arg_2) + arg_6
        elif arg_3 == ABBOTT:
            arg_6 = BVirial_Abbott(arg_1, arg_0.Tc, arg_0.Pc, arg_0.omega)
            arg_5 = ideal_gas(arg_1, arg_2) + arg_6
        elif arg_3 == PITZER_CURL:
            arg_6 = BVirial_Pitzer_Curl(arg_1, arg_0.Tc, arg_0.Pc, arg_0.omega)
            arg_5 = ideal_gas(arg_1, arg_2) + arg_6
        elif arg_3 == CRC_VIRIAL:
            arg_7, arg_8, arg_9, arg_10, arg_11 = arg_0.CRC_VIRIAL_coeffs
            arg_12 = 298.15/arg_1 - 1.
            arg_6 = (arg_7 + arg_8*arg_12 + arg_9*arg_12**2 + arg_10*arg_12**3 + arg_11*arg_12**4)/1E6
            arg_5 = ideal_gas(arg_1, arg_2) + arg_6
        elif arg_3 == IDEAL:
            arg_5 = ideal_gas(arg_1, arg_2)
        elif arg_3 == COOLPROP:
            arg_5 = 1./PropsSI('DMOLAR', 'T', arg_1, 'P', arg_2, arg_0.CASRN)
        elif arg_3 in arg_0.tabular_data:
            arg_5 = arg_0.interpolate_P(arg_1, arg_2, arg_3)
        return arg_5

r Method to calculate pressure - dependent gas molar volume at temperature T and pressure P with a given method .


def Func(arg_0, arg_1, arg_2):
        """Send an SMS."""
        if arg_0._logindata['login_rufnummer'] is None or \
                arg_0._logindata['login_passwort'] is None:
            arg_3 = "YesssSMS: Login data required"
            raise arg_0.LoginError(arg_3)
        if not arg_1:
            raise arg_0.NoRecipientError("YesssSMS: recipient number missing")
        if not isinstance(arg_1, str):
            raise ValueError("YesssSMS: str expected as recipient number")
        if not arg_2:
            raise arg_0.EmptyMessageError("YesssSMS: message is empty")

        with arg_0._login(requests.Session()) as sess:

            arg_4 = {'to_nummer': arg_1, 'nachricht': arg_2}
            arg_5 = sess.post(arg_0._websms_url, data=arg_4)

            if not (arg_5.status_code == 200 or arg_5.status_code == 302):
                raise arg_0.SMSSendingError("YesssSMS: error Funcing SMS")

            if _UNSUPPORTED_CHARS_STRING in arg_5.text:
                raise arg_0.UnsupportedCharsError(
                    "YesssSMS: message contains unsupported character(s)")

            if _SMS_SENDING_SUCCESSFUL_STRING not in arg_5.text:
                raise arg_0.SMSSendingError("YesssSMS: error Funcing SMS")

            sess.get(arg_0._logout_url)


(input_shape,
                    num_classes=10,
                    kernel_posterior_scale_mean=-9.0,
                    kernel_posterior_scale_stddev=0.1,
                    kernel_posterior_scale_constraint=0.2)

def Func ( arg_0 , arg_1 = 10 , arg_2 = - 9.0 , arg_3 = 0.1 , arg_4 = 0.2 ) : arg_5 = [ 64 , 128 , 256 , 512 ] arg_6 = [ 3 , 3 , 3 , 3 ] arg_7 = [ 1 , 2 , 2 , 2 ] def _untransformed_scale_constraint ( arg_8 ) : return tf . clip_by_value ( arg_8 , - 1000 , tf . math . log ( arg_4 ) ) arg_9 = tfp . layers . default_mean_field_normal_fn ( untransformed_scale_initializer = tf . compat . v1 . initializers . random_normal ( mean = arg_2 , stddev = arg_3 ) , untransformed_scale_constraint = _untransformed_scale_constraint ) arg_10 = tf . keras . layers . Input ( shape = arg_0 , dtype = 'float32' ) arg_11 = tfp . layers . Convolution2DFlipout ( 64 , 3 , arg_7 = 1 , padding = 'same' , arg_9 = arg_9 ) ( arg_10 ) for arg_12 in range ( len ( arg_6 ) ) : arg_11 = _resnet_block ( arg_11 , arg_5 [ arg_12 ] , arg_6 [ arg_12 ] , arg_7 [ arg_12 ] , arg_9 ) arg_11 = tf . keras . layers . BatchNormalization ( ) ( arg_11 ) arg_11 = tf . keras . layers . Activation ( 'relu' ) ( arg_11 ) arg_11 = tf . keras . layers . AveragePooling2D ( 4 , 1 ) ( arg_11 ) arg_11 = tf . keras . layers . Flatten ( ) ( arg_11 ) arg_11 = tfp . layers . DenseFlipout ( arg_1 , arg_9 = arg_9 ) ( arg_11 ) arg_13 = tf . keras . Model ( inputs = arg_10 , outputs = arg_11 , name = 'resnet18' ) return arg_13

def Func(arg_0,
                    arg_1=10,
                    arg_2=-9.0,
                    arg_3=0.1,
                    arg_4=0.2):
  """Constructs a ResNet18 model.

  Args:
    input_shape: A `tuple` indicating the Tensor shape.
    num_classes: `int` representing the number of class labels.
    kernel_posterior_scale_mean: Python `int` number for the kernel
      posterior's scale (log variance) mean. The smaller the mean the closer
      is the initialization to a deterministic network.
    kernel_posterior_scale_stddev: Python `float` number for the initial kernel
      posterior's scale stddev.
      ```
      q(W|x) ~ N(mu, var),
      log_var ~ N(kernel_posterior_scale_mean, kernel_posterior_scale_stddev)
      ````
    kernel_posterior_scale_constraint: Python `float` number for the log value
      to constrain the log variance throughout training.
      i.e. log_var <= log(kernel_posterior_scale_constraint).

  Returns:
    tf.keras.Model.
  """

  arg_5 = [64, 128, 256, 512]
  arg_6 = [3, 3, 3, 3]
  arg_7 = [1, 2, 2, 2]

  def _untransformed_scale_constraint(arg_8):
    return tf.clip_by_value(arg_8, -1000,
                            tf.math.log(arg_4))

  arg_9 = tfp.layers.default_mean_field_normal_fn(
      untransformed_scale_initializer=tf.compat.v1.initializers.random_normal(
          mean=arg_2,
          stddev=arg_3),
      untransformed_scale_constraint=_untransformed_scale_constraint)

  arg_10 = tf.keras.layers.Input(shape=arg_0, dtype='float32')
  arg_11 = tfp.layers.Convolution2DFlipout(
      64,
      3,
      arg_7=1,
      padding='same',
      arg_9=arg_9)(arg_10)

  for arg_12 in range(len(arg_6)):
    arg_11 = _resnet_block(
        arg_11,
        arg_5[arg_12],
        arg_6[arg_12],
        arg_7[arg_12],
        arg_9)

  arg_11 = tf.keras.layers.BatchNormalization()(arg_11)
  arg_11 = tf.keras.layers.Activation('relu')(arg_11)
  arg_11 = tf.keras.layers.AveragePooling2D(4, 1)(arg_11)
  arg_11 = tf.keras.layers.Flatten()(arg_11)

  arg_11 = tfp.layers.DenseFlipout(
      arg_1,
      arg_9=arg_9)(arg_11)

  arg_13 = tf.keras.Model(inputs=arg_10, outputs=arg_11, name='resnet18')
  return arg_13


def Func(arg_0, arg_1, arg_2):
        """Compute the fitness score of the ANM model in the x->y direction.

        Args:
            a (numpy.ndarray): Variable seen as cause
            b (numpy.ndarray): Variable seen as effect

        Returns:
            float: ANM fit score
        """
        arg_3 = GaussianProcessRegressor().fit(arg_1, arg_2)
        arg_4 = arg_3.predict(arg_1)
        arg_5 = normalized_hsic(arg_4 - arg_2, arg_1)

        return arg_5

Compute the fitness score of the ANM model in the x - > y direction .


def Func ( arg_0 , arg_1 ) : arg_2 , arg_3 = os . path . splitext ( arg_1 ) if not arg_3 : arg_3 = ".collection" return arg_2 + arg_3

def Func(arg_0, arg_1):
        """Use .collection as extension unless provided"""
        arg_2, arg_3 = os.path.splitext(arg_1)
        if not arg_3:
            arg_3 = ".collection"
        return arg_2 + arg_3

Use . collection as extension unless provided


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = vq . whiten ( arg_1 ) arg_4 , arg_5 = vq . kmeans ( arg_3 , arg_2 , iter = 100 ) arg_6 , arg_5 = vq . vq ( arg_3 , arg_4 ) return arg_4 , arg_6

def Func(arg_0, arg_1, arg_2):
        """Runs k-means and returns the labels assigned to the data."""
        arg_3 = vq.whiten(arg_1)
        arg_4, arg_5 = vq.kmeans(arg_3, arg_2, iter=100)
        arg_6, arg_5 = vq.vq(arg_3, arg_4)
        return arg_4, arg_6

Runs k - means and returns the labels assigned to the data .


def Func(arg_0):
        """Returns processed memory usage."""
        if arg_0._resulting_events:
            return arg_0._resulting_events
        for arg_1, (arg_2, arg_3, arg_4, arg_5) in enumerate(arg_0._events_list):
            arg_6 = float(arg_3 - arg_0.mem_overhead) / _BYTES_IN_MB
            if (arg_0._resulting_events and
                    arg_0._resulting_events[-1][0] == arg_2 and
                    arg_0._resulting_events[-1][2] == arg_4 and
                    arg_0._resulting_events[-1][3] == arg_5 and
                    arg_0._resulting_events[-1][1] < arg_6):
                arg_0._resulting_events[-1][1] = arg_6
            else:
                arg_0._resulting_events.append(
                    [arg_1 + 1, arg_2, arg_6, arg_4, arg_5])
        return arg_0._resulting_events


return render(request, "registrasion/guided_registration.html", data)

def
Func
(
arg_0
,
arg_1
=
)
:
arg_2
=
1
arg_3
=
2
arg_4
=
3
arg_5
=
4
arg_6
=
4
arg_7
=
inventory
.
Category
.
objects
.
get
(
id
=
settings
.
TICKET_PRODUCT_CATEGORY
)
arg_8
=
CartController
.
for_user
(
arg_0
.
user
)
arg_9
=
people
.
Attendee
.
get_instance
(
arg_0
.
user
)
if
arg_9
.
completed_registration
:
return
redirect
(
review
)
arg_10
=
hasattr
(
arg_9
,
"attendeeprofilebase"
)
if
not
arg_10
:
arg_11
=
arg_2
arg_12
=
arg_2
else
:
arg_13
=
inventory
.
Product
.
objects
.
filter
(
productitem__cart
=
arg_8
.
cart
)
arg_13
=
arg_13
.
filter
(
category
=
arg_7
)
if
arg_13
.
count
(
)
==
0
:
arg_11
=
arg_3
arg_12
=
arg_3
else
:
arg_11
=
arg_5
arg_12
=
arg_4
if
arg_1
is
or
int
(
arg_1
)
>
arg_11
:
return
redirect
(
"Func"
,
arg_12
)
arg_1
=
int
(
arg_1
)
arg_14
=
redirect
(
"Func"
,
arg_1
+
1
)
with
BatchController
.
batch
(
arg_0
.
user
)
:
arg_15
=
ProductController
.
available_products
(
arg_0
.
user
,
category
=
arg_7
)
if
not
arg_15
:
messages
.
error
(
arg_0
,
"There are no more tickets available."
)
return
redirect
(
"dashboard"
)
arg_16
=
[
]
if
arg_1
==
arg_2
:
arg_17
=
"Attendee information"
arg_16
=
_Func_profile_and_voucher
(
arg_0
)
elif
arg_1
==
arg_3
:
arg_17
=
"Select ticket type"
arg_16
=
_Func_products
(
arg_0
,
GUIDED_MODE_TICKETS_ONLY
)
elif
arg_1
==
arg_4
:
arg_17
=
"Additional items"
arg_16
=
_Func_products
(
arg_0
,
GUIDED_MODE_ALL_ADDITIONAL
)
elif
arg_1
==
arg_5
:
arg_17
=
"More additional items"
arg_16
=
_Func_products
(
arg_0
,
GUIDED_MODE_EXCLUDE_COMPLETE
)
if
not
arg_16
:
arg_9
.
completed_registration
=
True
arg_9
.
save
(
)
return
redirect
(
"review"
)
if
arg_16
and
arg_0
.
method
==
"POST"
:
for
arg_19
in
arg_16
:
if
arg_19
.
form
.
errors
:
break
else
:
return
arg_14
arg_20
=
{
"current_step"
:
arg_1
,
"sections"
:
arg_16
,
"title"
:
arg_17
,
"total_steps"
:
arg_6
,
}
return
render
(
arg_0
,
"registrasion/Func.html"
,
arg_20
)

def Func(arg_0, arg_1=None):
    ''' Goes through the registration process in order, making sure user sees
    all valid categories.

    The user must be logged in to see this view.

    Parameter:
        page_number:
            1) Profile form (and e-mail address?)
            2) Ticket type
            3) Remaining products
            4) Mark registration as complete

    Returns:
        render: Renders ``registrasion/Func.html``,
            with the following data::

                {
                    "current_step": int(),  # The current step in the
                                            # registration
                    "sections": sections,   # A list of
                                            # GuidedRegistrationSections
                    "title": str(),         # The title of the page
                    "total_steps": int(),   # The total number of steps
                }

    '''

    arg_2 = 1
    arg_3 = 2
    arg_4 = 3
    arg_5 = 4
    arg_6 = 4

    arg_7 = inventory.Category.objects.get(
        id=settings.TICKET_PRODUCT_CATEGORY
    )
    arg_8 = CartController.for_user(arg_0.user)

    arg_9 = people.Attendee.get_instance(arg_0.user)

    # This guided registration process is only for people who have
    # not completed registration (and has confusing behaviour if you go
    # back to it.)
    if arg_9.completed_registration:
        return redirect(review)

    # Calculate the current maximum page number for this user.
    arg_10 = hasattr(arg_9, "attendeeprofilebase")
    if not arg_10:
        # If there's no profile, they have to go to the profile page.
        arg_11 = arg_2
        arg_12 = arg_2
    else:
        # We have a profile.
        # Do they have a ticket?
        arg_13 = inventory.Product.objects.filter(
            productitem__cart=arg_8.cart
        )
        arg_13 = arg_13.filter(category=arg_7)

        if arg_13.count() == 0:
            # If no ticket, they can only see the profile or ticket page.
            arg_11 = arg_3
            arg_12 = arg_3
        else:
            # If there's a ticket, they should *see* the general products page#
            # but be able to go to the overflow page if needs be.
            arg_11 = arg_5
            arg_12 = arg_4

    if arg_1 is None or int(arg_1) > arg_11:
        return redirect("Func", arg_12)

    arg_1 = int(arg_1)

    arg_14 = redirect("Func", arg_1 + 1)

    with BatchController.batch(arg_0.user):

        # This view doesn't work if the conference has sold out.
        arg_15 = ProductController.available_products(
            arg_0.user, category=arg_7
        )
        if not arg_15:
            messages.error(arg_0, "There are no more tickets available.")
            return redirect("dashboard")

        arg_16 = []

        # Build up the list of sections
        if arg_1 == arg_2:
            # Profile bit
            arg_17 = "Attendee information"
            arg_16 = _Func_profile_and_voucher(arg_0)
        elif arg_1 == arg_3:
            # Select ticket
            arg_17 = "Select ticket type"
            arg_16 = _Func_products(
                arg_0, GUIDED_MODE_TICKETS_ONLY
            )
        elif arg_1 == arg_4:
            # Select additional items
            arg_17 = "Additional items"
            arg_16 = _Func_products(
                arg_0, GUIDED_MODE_ALL_ADDITIONAL
            )
        elif arg_1 == arg_5:
            # Items enabled by things on page 3 -- only shows things
            # that have not been marked as complete.
            arg_17 = "More additional items"
            arg_16 = _Func_products(
                arg_0, GUIDED_MODE_EXCLUDE_COMPLETE
            )

        if not arg_16:
            # We've filled in every category
            arg_9.completed_registration = True
            arg_9.save()
            return redirect("review")

        if arg_16 and arg_0.method == "POST":
            for arg_19 in arg_16:
                if arg_19.form.errors:
                    break
            else:
                # We've successfully processed everything
                return arg_14

    arg_20 = {
        "current_step": arg_1,
        "sections": arg_16,
        "title": arg_17,
        "total_steps": arg_6,
    }
    return render(arg_0, "registrasion/Func.html", arg_20)

Goes through the registration process in order, making sure user sees
    all valid categories.

    The user must be logged in to see this view.

    Parameter:
        page_number:
            1) Profile form (and e-mail address?)
            2) Ticket type
            3) Remaining products
            4) Mark registration as complete

    Returns:
        render: Renders ``registrasion/guided_registration.html``,
            with the following data::

                {
                    "current_step": int(),  # The current step in the
                                            # registration
                    "sections": sections,   # A list of
                                            # GuidedRegistrationSections
                    "title": str(),         # The title of the page
                    "total_steps": int(),   # The total number of steps
                }

Goes through the registration process in order making sure user sees all valid categories .


(self, text, maxwidth, maxheight, template_dir, context,
                   urlize_all_links)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
,
arg_4
,
arg_5
,
arg_6
)
:
arg_7
=
TextBlockParser
(
)
arg_8
=
arg_1
.
splitlines
(
)
arg_9
=
[
]
for
arg_10
in
arg_8
:
if
STANDALONE_URL_RE
.
match
(
arg_10
)
:
arg_11
=
arg_10
.
strip
(
)
try
:
arg_12
=
oembed
.
site
.
embed
(
arg_11
,
arg_2
=
arg_2
,
arg_3
=
arg_3
)
arg_5
[
'minwidth'
]
=
min
(
arg_2
,
arg_12
.
width
)
arg_5
[
'minheight'
]
=
min
(
arg_3
,
arg_12
.
height
)
except
OEmbedException
:
if
arg_6
:
arg_10
=
'%(LINK)s'
%
{
'LINK'
:
arg_11
}
else
:
arg_5
[
'minwidth'
]
=
min
(
arg_2
,
arg_12
.
width
)
arg_5
[
'minheight'
]
=
min
(
arg_3
,
arg_12
.
height
)
arg_10
=
arg_0
.
render_oembed
(
arg_12
,
arg_11
,
arg_4
=
arg_4
,
arg_5
=
arg_5
)
else
:
arg_10
=
arg_7
.
parse
(
arg_10
,
arg_2
,
arg_3
,
'inline'
,
arg_5
,
arg_6
)
arg_9
.
append
(
arg_10
)
return
mark_safe
(
'\n'
.
join
(
arg_9
)
)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5,
                   arg_6):
        """
        Parses a block of text rendering links that occur on their own line
        normally but rendering inline links using a special template dir
        """
        arg_7 = TextBlockParser()

        arg_8 = arg_1.splitlines()
        arg_9 = []

        for arg_10 in arg_8:
            if STANDALONE_URL_RE.match(arg_10):
                arg_11 = arg_10.strip()
                try:
                    arg_12 = oembed.site.embed(arg_11, arg_2=arg_2, arg_3=arg_3)
                    arg_5['minwidth'] = min(arg_2, arg_12.width)
                    arg_5['minheight'] = min(arg_3, arg_12.height)
                except OEmbedException:
                    if arg_6:
                        arg_10 = '%(LINK)s' % {'LINK': arg_11}
                else:
                    arg_5['minwidth'] = min(arg_2, arg_12.width)
                    arg_5['minheight'] = min(arg_3, arg_12.height)

                    arg_10 = arg_0.render_oembed(
                        arg_12,
                        arg_11,
                        arg_4=arg_4,
                        arg_5=arg_5)
            else:
                arg_10 = arg_7.parse(arg_10, arg_2, arg_3, 'inline',
                                          arg_5, arg_6)

            arg_9.append(arg_10)

        return mark_safe('\n'.join(arg_9))


def Func ( arg_0 , * arg_1 , ** arg_2 ) : arg_3 = [ ] for arg_4 in list_asset_types ( ) : arg_3 . append ( arg_0 . Func_for ( arg_4 . name , * arg_1 , ** arg_2 ) ) return "\n" . join ( arg_3 )

def Func(arg_0, *arg_1, **arg_2):
        """Return all html tags for all asset_type
        """
        arg_3 = []
        for arg_4 in list_asset_types():
            arg_3.append(arg_0.Func_for(arg_4.name, *arg_1, **arg_2))
        return "\n".join(arg_3)


def
Func
(
arg_0
=
False
)
:
arg_1
=
MANAGER
arg_2
=
{
'yum -y --color=never'
:
{
False
:
'--exclude=kernel* Func'
,
True
:
'Func'
}
}
arg_3
=
arg_2
[
arg_1
]
[
arg_0
]
run_as_root
(
"%(manager)s %(cmd)s"
%
locals
(
)
)

def Func(arg_0=False):
    """
    Upgrade all packages, skip obsoletes if ``obsoletes=0`` in ``yum.conf``.

    Exclude *kernel* upgrades by default.
    """
    arg_1 = MANAGER
    arg_2 = {'yum -y --color=never': {False: '--exclude=kernel* Func', True: 'Func'}}
    arg_3 = arg_2[arg_1][arg_0]
    run_as_root("%(manager)s %(cmd)s" % locals())

Upgrade all packages skip obsoletes if obsoletes = 0 in yum . conf .


def Func(arg_0, arg_1, arg_2, arg_3):
        """Try to find the value for a keyword argument."""

        arg_4 = None
        arg_5 = False
        if len(arg_3) > 0:
            arg_4 = arg_3[0]
            arg_5 = True

            if arg_4 == '--':
                arg_4 = None

        # Generally we just return the next argument, however if the type
        # is bool we allow not specifying anything to mean true if there
        # is no ambiguity
        if arg_2 == "bool":
            if arg_4 is None or arg_4.startswith('-'):
                arg_4 = True
                arg_5 = False
        else:
            if arg_4 is None:
                raise ArgumentError("Could not find value for keyword argument", argument=arg_1)

        if arg_5:
            arg_3.pop(0)

        return arg_4

Try to find the value for a keyword argument .


def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = dict ( ) ( arg_5 , arg_6 , arg_7 , arg_6 , arg_6 ) = arg_0 . getParticleInfos ( arg_1 , genIdx = None , matured = True ) for arg_8 , arg_9 in itertools . izip ( arg_5 , arg_7 ) : if arg_2 is not None : if arg_8 [ 'genIdx' ] > arg_2 : continue if arg_9 == numpy . inf : continue arg_10 = Particle . getPositionFromState ( arg_8 ) arg_11 = arg_10 [ arg_3 ] arg_12 = str ( arg_11 ) if arg_12 in arg_4 : arg_4 [ arg_12 ] [ 1 ] . append ( arg_9 ) else : arg_4 [ arg_12 ] = ( arg_11 , [ arg_9 ] ) return arg_4

def Func(arg_0, arg_1, arg_2, arg_3):
    """ Return a dict of the errors obtained on models that were run with
    each value from a PermuteChoice variable.

    For example, if a PermuteChoice variable has the following choices:
      ['a', 'b', 'c']

    The dict will have 3 elements. The keys are the stringified choiceVars,
    and each value is tuple containing (choiceVar, errors) where choiceVar is
    the original form of the choiceVar (before stringification) and errors is
    the list of errors received from models that used the specific choice:
    retval:
      ['a':('a', [0.1, 0.2, 0.3]), 'b':('b', [0.5, 0.1, 0.6]), 'c':('c', [])]

    Parameters:
    ---------------------------------------------------------------------
    swarmId:  swarm Id of the swarm to retrieve info from
    maxGenIdx: max generation index to consider from other models, ignored
                if None
    varName:  which variable to retrieve

    retval:  list of the errors obtained from each choice.
    """
    arg_4 = dict()
    # Get all the completed particles in this swarm
    (arg_5, arg_6, arg_7, arg_6, arg_6) = arg_0.getParticleInfos(arg_1,
                                              genIdx=None, matured=True)

    for arg_8, arg_9 in itertools.izip(arg_5, arg_7):
      # Consider this generation?
      if arg_2 is not None:
        if arg_8['genIdx'] > arg_2:
          continue

      # Ignore unless this model completed successfully
      if arg_9 == numpy.inf:
        continue

      arg_10 = Particle.getPositionFromState(arg_8)
      arg_11 = arg_10[arg_3]
      arg_12 = str(arg_11)
      if arg_12 in arg_4:
        arg_4[arg_12][1].append(arg_9)
      else:
        arg_4[arg_12] = (arg_11, [arg_9])

    return arg_4

Return a dict of the errors obtained on models that were run with each value from a PermuteChoice variable .


def Func ( arg_0 , arg_1 = None ) : def safe_is_file ( arg_2 ) : try : return os . path . isfile ( arg_0 ) except ValueError : return False if hasattr ( arg_0 , 'read' ) : arg_3 = arg_0 . read ( ) elif safe_is_file ( arg_0 ) : with open ( arg_0 , 'rb' ) as fh : arg_3 = fh . read ( ) else : arg_3 = arg_0 if hasattr ( arg_3 , 'decode' ) : arg_4 = None arg_5 = [ arg_1 , 'utf-8' , 'cp852' , 'iso8859-15' , 'latin1' ] for arg_1 in arg_5 : if not arg_1 : continue try : arg_3 = arg_3 . decode ( arg_1 ) break except UnicodeDecodeError as e : arg_4 = e except UnicodeEncodeError : break else : raise arg_4 arg_6 = mt940 . models . Transactions ( ) arg_6 . Func ( arg_3 ) return arg_6

def Func(arg_0, arg_1=None):
    '''
    Parses mt940 data and returns transactions object

    :param src: file handler to read, filename to read or raw data as string
    :return: Collection of transactions
    :rtype: Transactions
    '''

    def safe_is_file(arg_2):
        try:
            return os.path.isfile(arg_0)
        except ValueError:  # pragma: no cover
            return False

    if hasattr(arg_0, 'read'):  # pragma: no branch
        arg_3 = arg_0.read()
    elif safe_is_file(arg_0):
        with open(arg_0, 'rb') as fh:
            arg_3 = fh.read()
    else:  # pragma: no cover
        arg_3 = arg_0

    if hasattr(arg_3, 'decode'):  # pragma: no branch
        arg_4 = None
        arg_5 = [arg_1, 'utf-8', 'cp852', 'iso8859-15', 'latin1']

        for arg_1 in arg_5:  # pragma: no cover
            if not arg_1:
                continue

            try:
                arg_3 = arg_3.decode(arg_1)
                break
            except UnicodeDecodeError as e:
                arg_4 = e
            except UnicodeEncodeError:
                break
        else:
            raise arg_4  # pragma: no cover

    arg_6 = mt940.models.Transactions()
    arg_6.Func(arg_3)

    return arg_6


def Func ( arg_0 ) : arg_1 , arg_2 = arg_0 . argparser . parse_known_args ( ) return arg_0 . count ( ** vars ( arg_1 ) )

def Func(arg_0):
        """
            Uses the command line arguments to fill the count function and call it.
        """
        arg_1, arg_2 = arg_0.argparser.parse_known_args()
        return arg_0.count(**vars(arg_1))

Uses the command line arguments to fill the count function and call it .


def
Func
(
arg_0
,
arg_1
)
:
try
:
arg_0
.
things
.
remove
(
arg_1
)
except
ValueError
,
e
:
print
e
print
"  in Environment Func"
print
"  Thing to be removed: %s at %s"
%
(
arg_1
,
arg_1
.
location
)
print
"  from list: %s"
%
[
(
arg_1
,
arg_1
.
location
)
for
arg_1
in
arg_0
.
things
]
if
arg_1
in
arg_0
.
agents
:
arg_0
.
agents
.
remove
(
arg_1
)

def Func(arg_0, arg_1):
        """Remove a thing from the environment."""
        try:
            arg_0.things.remove(arg_1)
        except ValueError, e:
            print e
            print "  in Environment Func"
            print "  Thing to be removed: %s at %s" % (arg_1, arg_1.location)
            print "  from list: %s" % [(arg_1, arg_1.location)
                                       for arg_1 in arg_0.things]
        if arg_1 in arg_0.agents:
            arg_0.agents.remove(arg_1)


(self, mut_rate=0, max_mut_amt=0, log_base=10)

def Func(arg_0, arg_1=0, arg_2=0, arg_3=10):
        '''Generates the next population from a previously evaluated generation

        Args:
            mut_rate (float): mutation rate for new members (0.0 - 1.0)
            max_mut_amt (float): how much the member is allowed to mutate
                (0.0 - 1.0, proportion change of mutated parameter)
            log_base (int): the higher this number, the more likely the first
                Members (chosen with supplied selection function) are chosen
                as parents for the next generation
        '''

        if arg_0.__num_processes > 1:
            arg_4 = Pool(processes=arg_0.__num_processes)
            arg_5 = [m.get() for m in arg_0.__members]
        else:
            arg_5 = arg_0.__members

        if len(arg_5) == 0:
            raise Exception(
                'Generation 0 not found: use generate_population() first'
            )

        arg_6 = arg_0.__select_fn(arg_5)
        arg_7 = list(reversed(logspace(0.0, 1.0,
                                  num=len(arg_6), base=arg_3)))
        arg_7 = arg_7 / sum(arg_7)

        arg_0.__members = []

        for arg_9 in range(arg_0.__pop_size):
            arg_10 = nrandom.choice(arg_6, p=arg_7)
            arg_11 = nrandom.choice(arg_6, p=arg_7)

            arg_12 = {}
            for arg_13 in arg_0.__parameters:
                arg_14 = uniform(0, 1)
                if arg_14 < 0.5:
                    arg_12[arg_13.name] = arg_10.parameters[arg_13.name]
                else:
                    arg_12[arg_13.name] = arg_11.parameters[arg_13.name]
                arg_12[arg_13.name] = arg_0.__mutate_parameter(
                    arg_12[arg_13.name], arg_13, arg_1, arg_2
                )

            if arg_0.__num_processes > 1:
                arg_0.__members.append(arg_4.apply_async(
                    arg_0._start_process,
                    [arg_0.__cost_fn, arg_12, arg_0.__cost_fn_args])
                )
            else:
                arg_0.__members.append(
                    Member(
                        arg_12,
                        arg_0.__cost_fn(arg_12, arg_0.__cost_fn_args)
                    )
                )

        if arg_0.__num_processes > 1:
            arg_4.close()
            arg_4.join()

        arg_0.__determine_best_member()


def Func():
    """Retrieves heron options from the `HERON_OPTIONS` environment variable.

    Heron options have the following format:

        cmdline.topologydefn.tmpdirectory=/var/folders/tmpdir
        cmdline.topology.initial.state=PAUSED

    In this case, the returned map will contain:

        #!json
        {
          "cmdline.topologydefn.tmpdirectory": "/var/folders/tmpdir",
          "cmdline.topology.initial.state": "PAUSED"
        }

    Currently supports the following options natively:

    - `cmdline.topologydefn.tmpdirectory`: (required) the directory to which this
    topology's defn file is written
    - `cmdline.topology.initial.state`: (default: "RUNNING") the initial state of the topology
    - `cmdline.topology.name`: (default: class name) topology name on deployment

    Returns: map mapping from key to value
    """
    arg_0 = os.environ.get("HERON_OPTIONS")
    if arg_0 is None:
      raise RuntimeError("HERON_OPTIONS environment variable not found")

    arg_1 = {}
    for arg_2 in arg_0.replace("%%%%", " ").split(','):
      arg_3, arg_4, arg_5 = arg_2.partition("=")
      if arg_4:
        arg_1[arg_3] = arg_5
      else:
        raise ValueError("Invalid HERON_OPTIONS part %r" % arg_2)
    return arg_1

Retrieves heron options from the HERON_OPTIONS environment variable .


def Func ( arg_0 : arg_1 . ClassDef ) -> bool : for arg_3 in arg_0 . ancestors ( ) : if arg_3 . qname ( ) == TYPING_NAMEDTUPLE : return True return False

def Func(arg_0: arg_1.ClassDef) -> bool:
    """Check if a class node is a typing.NamedTuple class"""
    for arg_3 in arg_0.ancestors():
        if arg_3.qname() == TYPING_NAMEDTUPLE:
            return True
    return False

Check if a class node is a typing . NamedTuple class


return self._mc_client._get(url=self._build_path(list_id, 'segments', segment_id))

def Func ( arg_0 , arg_1 , arg_2 ) : return arg_0 . _mc_client . _Func ( url = arg_0 . _build_path ( arg_1 , 'segments' , arg_2 ) )

def Func(arg_0, arg_1, arg_2):
        """
        returns the specified list segment.
        """
        return arg_0._mc_client._Func(url=arg_0._build_path(arg_1, 'segments', arg_2))


def Func(arg_0, arg_1):
        '''
        Decode a PUBLISH control packet.
        '''
        arg_0.encoded = arg_1
        arg_3 = 1
        while arg_1[arg_3] & 0x80:
            arg_3 += 1
        arg_4 = arg_1[arg_3+1:]
        arg_0.dup    = (arg_1[0] & 0x08) == 0x08
        arg_0.qos    = (arg_1[0] & 0x06) >> 1
        arg_0.retain = (arg_1[0] & 0x01) == 0x01
        arg_0.topic, arg_9  = FuncString(arg_4)
        arg_10       = Func16Int(arg_4)
        if arg_0.qos:
            arg_0.msgId = Func16Int( arg_4[arg_10+2:arg_10+4] )
            arg_0.payload =  arg_4[arg_10+4:]
        else:
            arg_0.msgId = None
            arg_0.payload = arg_4[arg_10+2:]


def Func ( ) : arg_0 = os . getenv ( _CLOUDSDK_CONFIG_ENV_VAR ) if arg_0 is None : if os . name == 'nt' : try : arg_0 = os . path . join ( os . environ [ 'APPDATA' ] , _CLOUDSDK_CONFIG_DIRECTORY ) except KeyError : arg_1 = os . environ . get ( 'SystemDrive' , 'C:' ) arg_0 = os . path . join ( arg_1 , '\\' , _CLOUDSDK_CONFIG_DIRECTORY ) else : arg_0 = os . path . join ( os . path . expanduser ( '~' ) , '.config' , _CLOUDSDK_CONFIG_DIRECTORY ) return os . path . join ( arg_0 , _WELL_KNOWN_CREDENTIALS_FILE )

def Func():
    """Get the well known file produced by command 'gcloud auth login'."""
    # TODO(orestica): Revisit this method once gcloud provides a better way
    # of pinpointing the exact location of the file.
    arg_0 = os.getenv(_CLOUDSDK_CONFIG_ENV_VAR)
    if arg_0 is None:
        if os.name == 'nt':
            try:
                arg_0 = os.path.join(os.environ['APPDATA'],
                                                  _CLOUDSDK_CONFIG_DIRECTORY)
            except KeyError:
                # This should never happen unless someone is really
                # messing with things.
                arg_1 = os.environ.get('SystemDrive', 'C:')
                arg_0 = os.path.join(arg_1, '\\',
                                                  _CLOUDSDK_CONFIG_DIRECTORY)
        else:
            arg_0 = os.path.join(os.path.expanduser('~'),
                                              '.config',
                                              _CLOUDSDK_CONFIG_DIRECTORY)

    return os.path.join(arg_0, _WELL_KNOWN_CREDENTIALS_FILE)

Get the well known file produced by command gcloud auth login .


(self, stream, msg_list, flags=0, copy=True, ident=None)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = 0 , arg_4 = True , arg_5 = None ) : arg_6 = [ ] if isinstance ( arg_5 , bytes ) : arg_5 = [ arg_5 ] if arg_5 is not None : arg_6 . extend ( arg_5 ) arg_6 . append ( DELIM ) arg_6 . append ( arg_0 . sign ( arg_2 ) ) arg_6 . extend ( arg_2 ) arg_1 . send_multipart ( arg_2 , arg_3 , arg_4 = arg_4 )

def Func(arg_0, arg_1, arg_2, arg_3=0, arg_4=True, arg_5=None):
        """Send a raw message via ident path.

        This method is used to send a already serialized message.

        Parameters
        ----------
        stream : ZMQStream or Socket
            The ZMQ stream or socket to use for sending the message.
        msg_list : list
            The serialized list of messages to send. This only includes the
            [p_header,p_parent,p_content,buffer1,buffer2,...] portion of
            the message.
        ident : ident or list
            A single ident or a list of idents to use in sending.
        """
        arg_6 = []
        if isinstance(arg_5, bytes):
            arg_5 = [arg_5]
        if arg_5 is not None:
            arg_6.extend(arg_5)

        arg_6.append(DELIM)
        arg_6.append(arg_0.sign(arg_2))
        arg_6.extend(arg_2)
        arg_1.send_multipart(arg_2, arg_3, arg_4=arg_4)


def
Func
(
arg_0
,
arg_1
,
arg_2
=
)
:
for
arg_3
in
arg_1
:
if
arg_3
in
arg_0
and
not
arg_2
:
raise
ValueError
(
f"Duplicate completion key: {key}"
)
if
arg_3
in
arg_0
:
arg_4
=
"_"
.
join
(
[
arg_3
,
str
(
uuid
.
uuid4
(
)
)
.
replace
(
"-"
,
""
)
]
)
arg_2
=
arg_2
.
replace
(
f"P<{key}>"
,
f"P<{uniq}>"
)
arg_0
[
arg_4
]
=
arg_1
[
arg_3
]
else
:
arg_0
[
arg_3
]
=
arg_1
[
arg_3
]
return
arg_2

def Func(arg_0, arg_1, arg_2=None):
        """Merges ``cdict`` into ``completers``. In the event that a key
        in cdict already exists in the completers dict a ValueError is raised
        iff ``regex`` false'y. If a regex str is provided it and the duplicate
        key are updated to be unique, and the updated regex is returned.
        """
        for arg_3 in arg_1:
            if arg_3 in arg_0 and not arg_2:
                raise ValueError(f"Duplicate completion key: {key}")

            if arg_3 in arg_0:
                arg_4 = "_".join([arg_3, str(uuid.uuid4()).replace("-", "")])
                arg_2 = arg_2.replace(f"P<{key}>", f"P<{uniq}>")
                arg_0[arg_4] = arg_1[arg_3]
            else:
                arg_0[arg_3] = arg_1[arg_3]

        return arg_2

Merges cdict into completers . In the event that a key in cdict already exists in the completers dict a ValueError is raised iff regex false y . If a regex str is provided it and the duplicate key are updated to be unique and the updated regex is returned .


def Func ( arg_0 , arg_1 : arg_2 , * arg_3 , ** arg_4 ) -> 'ProgressMonitor' : Func = ProgressMonitor ( * arg_3 , ** arg_4 ) arg_0 . sub_monitors [ Func ] = arg_1 Func . add_listener ( arg_0 . _submonitor_update ) return Func

def Func(arg_0, arg_1: arg_2, *arg_3, **arg_4) -> 'ProgressMonitor':
        """
        Create a sub monitor that stands for N units of work in this monitor
        The sub task should call .begin (or use @monitored / with .task) before calling updates
        """
        Func = ProgressMonitor(*arg_3, **arg_4)
        arg_0.sub_monitors[Func] = arg_1
        Func.add_listener(arg_0._submonitor_update)
        return Func

Create a sub monitor that stands for N units of work in this monitor The sub task should call . begin ( or use


def Func ( arg_0 ) : if not arg_0 . response_queue . empty ( ) : yield None while not arg_0 . response_queue . empty ( ) : arg_1 = arg_0 . response_queue . get ( ) if arg_1 is not None : yield arg_1

def Func(arg_0):
        """
        Get responses to commands sent
        """
        if not arg_0.response_queue.empty():
            yield None
        while not arg_0.response_queue.empty():
            arg_1 = arg_0.response_queue.get()
            if arg_1 is not None:
                yield arg_1


Use SaveHookMixin pre_save to set the user.

def Func(arg_0, arg_1):
        super(UserViewMixin, arg_0).Func(arg_1)

        """
        Use SaveHookMixin Func to set the user.
        """
        if  arg_0.request.user.is_authenticated():
            for arg_2 in arg_0.user_field:
                setattr(arg_1, arg_2, arg_0.request.user)

Use SaveHookMixin pre_save to set the user .


(self, destinations,
            priority=prio.NORMAL, payment_id=None, unlock_time=0,
            relay=True)

return self._backend.transfer(
            destinations,
            priority,
            payment_id,
            unlock_time,
            account=self.index,
            relay=relay)

def Func(arg_0, arg_1,
            arg_2=arg_3.NORMAL, arg_5=None, arg_6=0,
            arg_7=True):
        """
        Sends a batch of transfers. Returns a list of resulting transactions.

        :param destinations: a list of destination and amount pairs:
                    [(:class:`Address <monero.address.Address>`, `Decimal`), ...]
        :param priority: transaction priority, implies fee. The priority can be a number
                    from 1 to 4 (unimportant, normal, elevated, priority) or a constant
                    from `monero.prio`.
        :param payment_id: ID for the payment (must be None if
                        :class:`IntegratedAddress <monero.address.IntegratedAddress>`
                        is used as the destination)
        :param unlock_time: the extra unlock delay
        :param relay: if `True`, the wallet will relay the transaction(s) to the network
                        immediately; when `False`, it will only return the transaction(s)
                        so they might be broadcasted later
        :rtype: list of :class:`Transaction <monero.transaction.Transaction>`
        """
        return arg_0._backend.transfer(
            arg_1,
            arg_2,
            arg_5,
            arg_6,
            account=arg_0.index,
            arg_7=arg_7)

Sends a batch of transfers . Returns a list of resulting transactions .


def Func ( arg_0 ) : assert isinstance ( arg_0 , decimal . Decimal ) arg_1 = arg_0 . normalize ( ) . as_tuple ( ) if arg_1 . exponent >= 0 : return 0 return abs ( arg_1 . exponent )

def Func(arg_0):
    """Return maximum precision of a decimal instance's fractional part.
    Precision is extracted from the fractional part only.
    """
    # Copied from: https://github.com/mahmoud/boltons/pull/59
    assert isinstance(arg_0, decimal.Decimal)
    arg_1 = arg_0.normalize().as_tuple()
    if arg_1.exponent >= 0:
        return 0
    return abs(arg_1.exponent)

Return maximum precision of a decimal instance s fractional part . Precision is extracted from the fractional part only .


def Func ( arg_0 ) : arg_0 . f_load ( arg_0 . v_name , as_new = False , load_parameters = pypetconstants . LOAD_SKELETON , load_derived_parameters = pypetconstants . LOAD_SKELETON , load_results = pypetconstants . LOAD_SKELETON , load_other_data = pypetconstants . LOAD_SKELETON , with_run_information = False )

def Func(arg_0):
        """Loads the full skeleton from the storage service.

        This needs to be done after a successful exploration in order to update the
        trajectory tree with all results and derived parameters from the individual single runs.
        This will only add empty results and derived parameters (i.e. the skeleton)
        and load annotations.

        """
        arg_0.f_load(arg_0.v_name, as_new=False, load_parameters=pypetconstants.LOAD_SKELETON,
                    load_derived_parameters=pypetconstants.LOAD_SKELETON,
                    load_results=pypetconstants.LOAD_SKELETON,
                    load_other_data=pypetconstants.LOAD_SKELETON,
                    with_run_information=False)

Loads the full skeleton from the storage service .


(self, frame_no=0, max_distance=0.05, max_iters=300,
                          states=None)

def Func(arg_0, arg_1=0, arg_2=0.05, arg_3=300,
                          arg_4=None):
        '''Settle the skeleton to our marker data at a specific frame.

        Parameters
        ----------
        frame_no : int, optional
            Settle the skeleton to marker data at this frame. Defaults to 0.
        max_distance : float, optional
            The settling process will stop when the mean marker distance falls
            below this threshold. Defaults to 0.1m (10cm). Setting this too
            small prevents the settling process from finishing (it will loop
            indefinitely), and setting it too large prevents the skeleton from
            settling to a stable state near the markers.
        max_iters : int, optional
            Attempt to settle markers for at most this many iterations. Defaults
            to 1000.
        states : list of body states, optional
            If given, set the bodies in our skeleton to these kinematic states
            before starting the settling process.
        '''
        if arg_4 is not None:
            arg_0.skeleton.set_body_states(arg_4)
        arg_5 = None
        for arg_6 in range(arg_3):
            for arg_6 in arg_0._step_to_marker_frame(arg_1):
                pass
            arg_5 = np.nanmean(abs(arg_0.markers.distances()))
            logging.info('settling to frame %d: marker distance %.3f', arg_1, arg_5)
            if arg_5 < arg_2:
                return arg_0.skeleton.get_body_states()
            for arg_7 in arg_0.skeleton.bodies:
                arg_7.linear_velocity = 0, 0, 0
                arg_7.angular_velocity = 0, 0, 0
        return arg_4

Settle the skeleton to our marker data at a specific frame .


def Func(arg_0, arg_1, arg_2):
    '''return the image manifest via the aws client, saved in self.manifest
    '''

    arg_3 = None
    arg_4 = arg_0.aws.describe_images(repositoryName=arg_1)
    if 'imageDetails' in arg_4:
        for arg_5 in arg_4.get('imageDetails'):
            if arg_2 in arg_5['imageTags']:
                arg_3 = arg_5
                break

    # if the image isn't found, we need to exit
    if arg_3 is None:
        bot.exit('Cannot find %s:%s, is the uri correct?' %(arg_1, arg_6))

    arg_6 = arg_3['imageDigest']
    arg_7 = arg_0.aws.batch_get_image(repositoryName=arg_1,
                                       imageIds=[{"imageDigest": arg_6,
                                                  "imageTag": arg_2}])

    arg_0.manifest = json.loads(arg_7['images'][0]['imageManifest'])
    return arg_0.manifest

return the image manifest via the aws client saved in self . manifest


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
{
'service'
:
ServiceSearch
,
'host'
:
HostSearch
,
'range'
:
RangeSearch
,
'user'
:
UserSearch
}
arg_3
=
configparser
.
ConfigParser
(
)
arg_3
.
read
(
arg_0
)
if
not
len
(
arg_3
.
sections
(
)
)
:
print_error
(
"No named pipes configured"
)
return
print_notification
(
"Starting {} pipes in directory {}"
.
format
(
len
(
arg_3
.
sections
(
)
)
,
arg_1
)
)
arg_4
=
[
]
for
arg_5
in
arg_3
.
sections
(
)
:
arg_6
=
arg_3
[
arg_5
]
arg_7
=
create_query
(
arg_6
)
arg_8
=
arg_2
[
arg_6
[
'type'
]
]
arg_9
=
(
arg_5
,
os
.
path
.
join
(
arg_1
,
arg_5
)
,
arg_8
,
arg_7
,
arg_6
[
'format'
]
,
bool
(
arg_6
.
get
(
'unique'
,
0
)
)
)
arg_4
.
append
(
multiprocessing
.
Process
(
target
=
pipe_worker
,
arg_9
=
arg_9
)
)
return
arg_4

def Func(arg_0, arg_1):
    """
        Creates the workers based on the given configfile to provide named pipes in the directory.
    """
    arg_2 = {'service': ServiceSearch,
                'host': HostSearch, 'range': RangeSearch,
                'user': UserSearch}
    arg_3 = configparser.ConfigParser()
    arg_3.read(arg_0)

    if not len(arg_3.sections()):
        print_error("No named pipes configured")
        return

    print_notification("Starting {} pipes in directory {}".format(
        len(arg_3.sections()), arg_1))

    arg_4 = []
    for arg_5 in arg_3.sections():
        arg_6 = arg_3[arg_5]
        arg_7 = create_query(arg_6)
        arg_8 = arg_2[arg_6['type']]
        arg_9 = (arg_5, os.path.join(arg_1, arg_5), arg_8, arg_7,
                arg_6['format'], bool(arg_6.get('unique', 0)))
        arg_4.append(multiprocessing.Process(target=pipe_worker, arg_9=arg_9))

    return arg_4

Creates the workers based on the given configfile to provide named pipes in the directory .


def Func ( arg_0 , arg_1 ) : if arg_1 in arg_0 . modelcache : return arg_0 . modelcache [ arg_1 ] return arg_0 . loadModelData ( arg_1 )

def Func(arg_0,arg_1):
        """
        Gets the model data associated with the given name.

        If it was loaded, a cached copy will be returned.
        It it was not loaded, it will be loaded and cached.
        """
        if arg_1 in arg_0.modelcache:
            return arg_0.modelcache[arg_1]
        return arg_0.loadModelData(arg_1)

Gets the model data associated with the given name . If it was loaded a cached copy will be returned . It it was not loaded it will be loaded and cached .


def Func ( arg_0 ) : arg_1 = lambda a , b : np . concatenate ( ( a , b [ 1 : ] ) ) arg_2 = lambda a , b : np . concatenate ( ( [ a ] , [ b ] ) ) def dome ( arg_0 , arg_3 ) : arg_4 , arg_5 = arg_3 arg_6 = np . dot ( arg_0 - arg_4 , np . dot ( ( ( 0 , - 1 ) , ( 1 , 0 ) ) , ( arg_5 - arg_4 ) ) ) arg_7 = np . repeat ( arg_0 , arg_6 > 0 , arg_9 = 0 ) if len ( arg_7 ) : arg_8 = arg_0 [ np . argmax ( arg_6 ) ] return arg_1 ( dome ( arg_7 , arg_2 ( arg_4 , arg_8 ) ) , dome ( arg_7 , arg_2 ( arg_8 , arg_5 ) ) ) else : return arg_3 if len ( arg_0 ) > 2 : arg_9 = arg_0 [ : , 0 ] arg_3 = np . take ( arg_0 , [ np . argmin ( arg_9 ) , np . argmax ( arg_9 ) ] , arg_9 = 0 ) return arg_1 ( dome ( arg_0 , arg_3 ) , dome ( arg_0 , arg_3 [ : : - 1 ] ) ) else : return arg_0

def Func(arg_0):
    """ Find data points on the convex hull of a supplied data set

    Args:
        sample: data points as column vectors n x d
                    n - number samples
                    d - data dimension (should be two)

    Returns:
        a k x d matrix containint the convex hull data points
    """

    arg_1 = lambda a, b: np.concatenate((a, b[1:]))
    arg_2 = lambda a, b: np.concatenate(([a], [b]))

    def dome(arg_0, arg_3):
        arg_4, arg_5 = arg_3
        arg_6 = np.dot(arg_0 - arg_4, np.dot(((0, -1), (1, 0)), (arg_5 - arg_4)))
        arg_7 = np.repeat(arg_0, arg_6 > 0, arg_9=0)

        if len(arg_7):
            arg_8 = arg_0[np.argmax(arg_6)]
            return arg_1(dome(arg_7, arg_2(arg_4, arg_8)),
                dome(arg_7, arg_2(arg_8, arg_5)))
        else:
            return arg_3

    if len(arg_0) > 2:
        arg_9 = arg_0[:, 0]
        arg_3 = np.take(arg_0, [np.argmin(arg_9), np.argmax(arg_9)], arg_9=0)
        return arg_1(dome(arg_0, arg_3),
            dome(arg_0, arg_3[::-1]))
    else:
        return arg_0


def Func ( arg_0 , arg_1 = arg_2 ) : arg_3 = arg_0 . url + "collections/" arg_4 = arg_0 . _conn . get ( arg_3 , headers = { "Accept" : arg_1 } ) arg_0 . _collections = [ ] for arg_6 in arg_4 . get ( "collections" , [ ] ) : arg_7 = arg_3 + arg_6 [ "id" ] + "/" arg_8 = Collection ( arg_7 , conn = arg_0 . _conn , collection_info = arg_6 ) arg_0 . _collections . append ( arg_8 ) arg_0 . _loaded_collections = True

def Func(arg_0, arg_1=arg_2):
        """Update the list of Collections contained by this API Root.

        This invokes the ``Get Collections`` endpoint.
        """
        arg_3 = arg_0.url + "collections/"
        arg_4 = arg_0._conn.get(arg_3, headers={"Accept": arg_1})

        arg_0._collections = []
        for arg_6 in arg_4.get("collections", []):  # optional
            arg_7 = arg_3 + arg_6["id"] + "/"
            arg_8 = Collection(arg_7, conn=arg_0._conn,
                                    collection_info=arg_6)
            arg_0._collections.append(arg_8)

        arg_0._loaded_collections = True

Update the list of Collections contained by this API Root .


return not self.__mode & VIS_MOD[visibility]

def Func ( arg_0 , arg_1 ) : arg_2 = get_visibility ( getattr ( arg_1 , "name" , arg_1 ) ) return not arg_0 . __mode & VIS_MOD [ arg_2 ]

def Func(arg_0, arg_1):
        """return true if the node should be treated
        """
        arg_2 = get_visibility(getattr(arg_1, "name", arg_1))
        return not arg_0.__mode & VIS_MOD[arg_2]


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . label if arg_2 [ : 1 ] == '=' : return arg_2 [ 1 : ] arg_2 = xgetattr ( arg_1 , arg_2 , '' ) if arg_0 . formatter is None : return arg_2 return arg_0 . formatter ( arg_1 , arg_2 )

def Func ( arg_0, arg_1 ):
        """ Gets the label to display for a specified object.
        """
        arg_2 = arg_0.label
        if arg_2[:1] == '=':
            return arg_2[1:]

        arg_2 = xgetattr( arg_1, arg_2, '' )

        if arg_0.formatter is None:
            return arg_2

        return arg_0.formatter( arg_1, arg_2 )

Gets the label to display for a specified object .


def Func(arg_0: arg_1, arg_2: arg_3) -> None:
    """Collapse all of the given functions' variants' edges to their parents, in-place."""
    for arg_4, arg_5, arg_6 in arg_0.edges(arg_6=True):
        if arg_6[RELATION] == HAS_VARIANT and arg_4.function == arg_2:
            collapse_pair(arg_0, from_node=arg_5, to_node=arg_4)

Collapse all of the given functions variants edges to their parents in - place .


def Func ( arg_0 ) : if not arg_0 . config . reports : arg_0 . disable_reporters ( ) arg_1 = [ arg_0 ] for arg_2 in arg_0 . get_checkers ( ) [ 1 : ] : arg_3 = { msg for msg in arg_2 . msgs if arg_0 . is_message_enabled ( msg ) } if arg_3 or any ( arg_0 . report_is_enabled ( arg_4 [ 0 ] ) for arg_4 in arg_2 . reports ) : arg_1 . append ( arg_2 ) arg_1 = sorted ( arg_1 , key = operator . attrgetter ( "priority" ) , reverse = True ) return arg_1

def Func(arg_0):
        """return checkers needed for activated messages and reports"""
        if not arg_0.config.reports:
            arg_0.disable_reporters()
        # get needed checkers
        arg_1 = [arg_0]
        for arg_2 in arg_0.get_checkers()[1:]:
            arg_3 = {msg for msg in arg_2.msgs if arg_0.is_message_enabled(msg)}
            if arg_3 or any(arg_0.report_is_enabled(arg_4[0]) for arg_4 in arg_2.reports):
                arg_1.append(arg_2)
        # Sort checkers by priority
        arg_1 = sorted(
            arg_1, key=operator.attrgetter("priority"), reverse=True
        )
        return arg_1


def Func(arg_0):
        """Get stats about branches.

        Returns a dict mapping line numbers to a tuple:
        (total_exits, taken_exits).
        """

        arg_1 = arg_0.parser.exit_counts()
        arg_2 = arg_0.missing_branch_arcs()
        arg_3 = {}
        for arg_4 in arg_0.branch_lines():
            arg_5 = arg_1[arg_4]
            try:
                arg_6 = len(arg_2[arg_4])
            except KeyError:
                arg_6 = 0
            arg_3[arg_4] = (arg_5, arg_5 - arg_6)
        return arg_3


def Func(arg_0, arg_1):
    """
    Check if a parameter is available on an object

    :param obj: Object
    :param required_parameters: list of parameters
    :return:
    """
    for arg_2 in arg_1:
        if not hasattr(arg_0, arg_2) or getattr(arg_0, arg_2) is None:
            raise DesignError("parameter '%s' must be set for '%s' object." % (arg_2, arg_0.base_type))


(self, clock_hz, adaptive=False, three_phase=False)

def Func(arg_0, arg_1, arg_2=False, arg_3=False):
        """Set the clock speed of the MPSSE engine.  Can be any value from 450hz
        to 30mhz and will pick that speed or the closest speed below it.
        """
        # Disable clock divisor by 5 to enable faster speeds on FT232H.
        arg_0._write('\x8A')
        # Turn on/off adaptive clocking.
        if arg_2:
            arg_0._write('\x96')
        else:
            arg_0._write('\x97')
        # Turn on/off three phase clock (needed for I2C).
        # Also adjust the frequency for three-phase clocking as specified in section 2.2.4
        # of this document:
        #   http://www.ftdichip.com/Support/Documents/AppNotes/AN_255_USB%20to%20I2C%20Example%20using%20the%20FT232H%20and%20FT201X%20devices.pdf
        if arg_3:
            arg_0._write('\x8C')
        else:
            arg_0._write('\x8D')
        # Compute divisor for requested clock.
        # Use equation from section 3.8.1 of:
        #  http://www.ftdichip.com/Support/Documents/AppNotes/AN_108_Command_Processor_for_MPSSE_and_MCU_Host_Bus_Emulation_Modes.pdf
        # Note equation is using 60mhz master clock instead of 12mhz.
        arg_4 = int(math.ceil((30000000.0-float(arg_1))/float(arg_1))) & 0xFFFF
        if arg_3:
            arg_4 = int(arg_4*(2.0/3.0))
        logger.debug('Setting clockspeed with divisor value {0}'.format(arg_4))
        # Send command to set divisor from low and high byte values.
        arg_0._write(str(bytearray((0x86, arg_4 & 0xFF, (arg_4 >> 8) & 0xFF))))

Set the clock speed of the MPSSE engine . Can be any value from 450hz to 30mhz and will pick that speed or the closest speed below it .


def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None ) : arg_4 = { 'api_key' : arg_0 . api_key , 'tags' : ',' . join ( arg_1 ) } if arg_3 is not None : arg_4 [ 'username' ] = arg_3 with open ( arg_2 , 'rb' ) as f : arg_5 = requests . post ( GIPHY_UPLOAD_ENDPOINT , arg_4 = arg_4 , files = { 'file' : f } ) arg_5 . raise_for_status ( ) arg_6 = arg_5 . json ( ) arg_0 . _check_or_raise ( arg_6 . get ( 'meta' , { } ) ) return arg_0 . gif ( arg_6 [ 'data' ] [ 'id' ] )

def Func(arg_0, arg_1, arg_2, arg_3=None):
        """
        Uploads a gif from the filesystem to Giphy.

        :param tags: Tags to apply to the Funced image
        :type tags: list
        :param file_path: Path at which the image can be found
        :type file_path: string
        :param username: Your channel username if not using public API key
        """
        arg_4 = {
            'api_key': arg_0.api_key,
            'tags': ','.join(arg_1)
        }
        if arg_3 is not None:
            arg_4['username'] = arg_3

        with open(arg_2, 'rb') as f:
            arg_5 = requests.post(
                GIPHY_UPLOAD_ENDPOINT, arg_4=arg_4, files={'file': f})

        arg_5.raise_for_status()

        arg_6 = arg_5.json()
        arg_0._check_or_raise(arg_6.get('meta', {}))

        return arg_0.gif(arg_6['data']['id'])

Uploads a gif from the filesystem to Giphy.

        :param tags: Tags to apply to the uploaded image
        :type tags: list
        :param file_path: Path at which the image can be found
        :type file_path: string
        :param username: Your channel username if not using public API key

Uploads a gif from the filesystem to Giphy .


def Func ( arg_0 , arg_1 ) : if not arg_1 : return None arg_2 = get_thumbnail ( arg_1 , arg_0 . geometry_string , ** arg_0 . options ) try : arg_3 = arg_0 . context . get ( 'request' , None ) return arg_3 . build_absolute_uri ( arg_2 . url ) except : try : return super ( HyperlinkedSorlImageField , arg_0 ) . Func ( arg_2 ) except AttributeError : return super ( HyperlinkedSorlImageField , arg_0 ) . to_native ( arg_2 . url )

def Func(arg_0, arg_1):
        """
        Perform the actual serialization.

        Args:
            value: the image to transform
        Returns:
            a url pointing at a scaled and cached image
        """
        if not arg_1:
            return None

        arg_2 = get_thumbnail(arg_1, arg_0.geometry_string, **arg_0.options)

        try:
            arg_3 = arg_0.context.get('request', None)
            return arg_3.build_absolute_uri(arg_2.url)
        except:
            try:
                return super(HyperlinkedSorlImageField, arg_0).Func(arg_2)
            except AttributeError:  # NOQA
                return super(HyperlinkedSorlImageField, arg_0).to_native(arg_2.url)  # NOQA


(predicted, actual, domain=None, distribution=None)

def Func(arg_0, arg_1, arg_2=None, arg_3=None):
    """
    Create Model Metrics from predicted and actual values in H2O.

    :param H2OFrame predicted: an H2OFrame containing predictions.
    :param H2OFrame actuals: an H2OFrame containing actual values.
    :param domain: list of response factors for classification.
    :param distribution: distribution for regression.
    """
    assert_is_type(arg_0, H2OFrame)
    assert_is_type(arg_1, H2OFrame)
    # assert predicted.ncol == 1, "`predicted` frame should have exactly 1 column"
    assert arg_1.ncol == 1, "`actual` frame should have exactly 1 column"
    assert_is_type(arg_3, str, None)
    assert_satisfies(arg_1.ncol, arg_1.ncol == 1)
    if arg_2 is None and any(arg_1.isfactor()):
        arg_2 = arg_1.levels()[0]
    arg_4 = api("POST /3/ModelMetrics/predictions_frame/%s/actuals_frame/%s" % (arg_0.frame_id, arg_1.frame_id),
              data={"domain": arg_2, "distribution": arg_3})
    return arg_4["model_metrics"]

Create Model Metrics from predicted and actual values in H2O .


def
Func
(
arg_0
,
*
arg_1
)
:
arg_2
=
get
(
arg_0
)
if
not
arg_2
:
raise
ValueError
(
'Cannot find matcher: {}'
.
format
(
arg_0
)
)
return
arg_2
(
*
arg_1
)

def Func(arg_0, *arg_1):
    """
    Initializes a matcher instance passing variadic arguments to
    its constructor. Acts as a delegator proxy.

    Arguments:
        name (str): matcher class name or alias to execute.
        *args (mixed): variadic argument

    Returns:
        matcher: matcher instance.

    Raises:
        ValueError: if matcher was not found.
    """
    arg_2 = get(arg_0)
    if not arg_2:
        raise ValueError('Cannot find matcher: {}'.format(arg_0))
    return arg_2(*arg_1)

Initializes a matcher instance passing variadic arguments to its constructor . Acts as a delegator proxy .


return [conv_event for conv_event in self._events
                if conv_event.timestamp > self.latest_read_timestamp]

def Func ( arg_0 ) : return [ arg_1 for arg_1 in arg_0 . _events if arg_1 . timestamp > arg_0 . latest_read_timestamp ]

def Func(arg_0):
        """Loaded events which are unread sorted oldest to newest.

        Some Hangouts clients don't update the read timestamp for certain event
        types, such as membership changes, so this may return more unread
        events than these clients will show. There's also a delay between
        sending a message and the user's own message being considered read.

        (list of :class:`.ConversationEvent`).
        """
        return [arg_1 for arg_1 in arg_0._events
                if arg_1.timestamp > arg_0.latest_read_timestamp]

Loaded events which are unread sorted oldest to newest .


def Func ( arg_0 ) : def parse_answer_container ( arg_1 ) : arg_2 = { } arg_3 = arg_1 [ 0 ] arg_4 = arg_3 . abbr . attrs [ "title" ] arg_2 [ 'added_at' ] = str ( str_to_datetime ( arg_4 ) . timestamp ( ) ) arg_2 [ 'answered_by' ] = AskbotParser . parse_user_info ( arg_3 ) try : arg_1 [ 1 ] except IndexError : pass else : arg_5 = arg_1 [ 1 ] arg_6 = arg_5 . abbr . attrs [ "title" ] arg_2 [ 'updated_at' ] = str ( str_to_datetime ( arg_6 ) . timestamp ( ) ) if AskbotParser . parse_user_info ( arg_5 ) : arg_2 [ 'updated_by' ] = AskbotParser . parse_user_info ( arg_5 ) return arg_2 arg_7 = [ ] arg_8 = bs4 . BeautifulSoup ( arg_0 , "html.parser" ) arg_9 = arg_8 . select ( "div.answer" ) for arg_10 in arg_9 : arg_11 = arg_10 . attrs [ "data-post-id" ] arg_12 = arg_10 . select ( "div.vote-number" ) [ 0 ] . text arg_13 = arg_10 . select ( "div.answer-img-accept" ) [ 0 ] . get ( 'title' ) . endswith ( "correct" ) arg_14 = arg_10 . select ( "div.post-body" ) arg_1 = arg_14 [ 0 ] . select ( "div.post-update-info" ) arg_15 = parse_answer_container ( arg_1 ) arg_14 [ 0 ] . div . extract ( ) . select ( "div.post-update-info-container" ) arg_14 = arg_14 [ 0 ] . get_text ( strip = True ) arg_16 = { 'id' : arg_11 , 'score' : arg_12 , 'summary' : arg_14 , 'accepted' : arg_13 } arg_16 . update ( arg_15 ) arg_7 . append ( arg_16 ) return arg_7

def Func(arg_0):
        """Parse the answers of a given HTML question.

        The method parses the answers related with a given HTML question,
        as well as all the comments related to the answer.

        :param html_question: raw HTML question element

        :returns: a list with the answers
        """

        def parse_answer_container(arg_1):
            """Parse the answer info container of a given HTML question.

            The method parses the information available in the answer information
            container. The container can have up to 2 elements: the first one
            contains the information related with the user who generated the question
            and the date (if any). The second one contains the date of the updated,
            and the user who updated it (if not the same who generated the question).

            :param update_info: beautiful soup update_info container element

            :returns: an object with the parsed information
            """
            arg_2 = {}
            arg_3 = arg_1[0]
            arg_4 = arg_3.abbr.attrs["title"]
            # Convert date to UNIX timestamp
            arg_2['added_at'] = str(str_to_datetime(arg_4).timestamp())
            arg_2['answered_by'] = AskbotParser.parse_user_info(arg_3)
            try:
                arg_1[1]
            except IndexError:
                pass
            else:
                arg_5 = arg_1[1]
                arg_6 = arg_5.abbr.attrs["title"]
                # Convert date to UNIX timestamp
                arg_2['updated_at'] = str(str_to_datetime(arg_6).timestamp())
                if AskbotParser.parse_user_info(arg_5):
                    arg_2['updated_by'] = AskbotParser.parse_user_info(arg_5)
            return arg_2

        arg_7 = []
        # Select all the answers
        arg_8 = bs4.BeautifulSoup(arg_0, "html.parser")
        arg_9 = arg_8.select("div.answer")
        for arg_10 in arg_9:
            arg_11 = arg_10.attrs["data-post-id"]
            arg_12 = arg_10.select("div.vote-number")[0].text
            arg_13 = arg_10.select("div.answer-img-accept")[0].get('title').endswith("correct")
            # Select the body of the answer
            arg_14 = arg_10.select("div.post-body")
            # Get the user information container and parse it
            arg_1 = arg_14[0].select("div.post-update-info")
            arg_15 = parse_answer_container(arg_1)
            # Remove the update-info-container div to be able to get the body
            arg_14[0].div.extract().select("div.post-update-info-container")
            # Override the body with a clean one
            arg_14 = arg_14[0].get_text(strip=True)
            # Generate the answer object
            arg_16 = {'id': arg_11,
                      'score': arg_12,
                      'summary': arg_14,
                      'accepted': arg_13
                      }
            # Update the object with the information in the answer container
            arg_16.update(arg_15)
            arg_7.append(arg_16)
        return arg_7

Parse the answers of a given HTML question .


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

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

Return the environment for the operation .


def Func(arg_0, arg_1: arg_2, arg_3=1) -> bytes:
        """
        Selects bytes from memory. Attempts to do so faster than via read_bytes.

        :param where: address to read from
        :param size: number of bytes to read
        :return: the bytes in memory
        """
        arg_4 = arg_0.memory.map_containing(arg_1)
        arg_5 = arg_4._get_offset(arg_1)
        arg_6 = type(arg_4)
        if arg_6 is FileMap:
            arg_7 = arg_4._get_offset(arg_1 + arg_3)

            if arg_7 > arg_4._mapped_size:
                logger.warning(f"Missing {end - map._mapped_size} bytes at the end of {map._filename}")

            arg_8 = arg_4._data[arg_4._get_offset(arg_1): min(arg_7, arg_4._mapped_size)]
            if len(arg_8) < arg_7:
                arg_8 += b'\x00' * (arg_7 - len(arg_8))

            arg_9 = b''
            for arg_10 in sorted(arg_4._overlay.keys()):
                arg_9 += arg_8[len(arg_9):arg_10]
                arg_9 += arg_4._overlay[arg_10]
            arg_9 += arg_8[len(arg_9):]

        elif arg_6 is AnonMap:
            arg_9 = bytes(arg_4._data[arg_5:arg_5 + arg_3])
        else:
            arg_9 = b''.join(arg_0.memory[arg_1:arg_1 + arg_3])
        assert len(arg_9) == arg_3, 'Raw read resulted in wrong data read which should never happen'
        return arg_9

Selects bytes from memory . Attempts to do so faster than via read_bytes .


return cls(skype, raw, **cls.rawToFields(raw))

def Func ( arg_0 , arg_1 = None , arg_2 = { } ) : return arg_0 ( arg_1 , arg_2 , ** arg_0 . rawToFields ( arg_2 ) )

def Func(arg_0, arg_1=None, arg_2={}):
        """
        Create a new instance based on the raw properties of an API response.

        This can be overridden to automatically create subclass instances based on the raw content.

        Args:
            skype (Skype): parent Skype instance
            raw (dict): raw object, as provided by the API

        Returns:
            SkypeObj: the new class instance
        """
        return arg_0(arg_1, arg_2, **arg_0.rawToFields(arg_2))

Create a new instance based on the raw properties of an API response .


(self, t_node, branch_length, multiplicity=2.0)

return self.integral_merger_rate(merger_time) - self.integral_merger_rate(t_node)\
                 - np.log(self.total_merger_rate(merger_time))*(multiplicity-1.0)/multiplicity

def Func(arg_0, arg_1, arg_2, arg_3=2.0):
        '''
        returns the Func associated with a branch starting at t_node
        t_node is time before present, the branch goes back in time

        Args:
            - t_node:           time of the node
            - branch_length:    branch length, determines when this branch merges with sister
            - multiplicity:     2 if merger is binary, higher if this is a polytomy
        '''
        arg_4 = arg_1+arg_2
        return arg_0.integral_merger_rate(arg_4) - arg_0.integral_merger_rate(arg_1)\
                 - np.log(arg_0.total_merger_rate(arg_4))*(arg_3-1.0)/arg_3

returns the cost associated with a branch starting at t_node
        t_node is time before present, the branch goes back in time

        Args:
            - t_node:           time of the node
            - branch_length:    branch length, determines when this branch merges with sister
            - multiplicity:     2 if merger is binary, higher if this is a polytomy

returns the cost associated with a branch starting at t_node t_node is time before present the branch goes back in time


return self.nsamples - self._X["tX"].shape[1]

def Func ( arg_0 ) : if not arg_0 . _restricted : return arg_0 . nsamples return arg_0 . nsamples - arg_0 . _X [ "tX" ] . shape [ 1 ]

def Func(arg_0):
        """
        Degrees of freedom.
        """
        if not arg_0._restricted:
            return arg_0.nsamples
        return arg_0.nsamples - arg_0._X["tX"].shape[1]


def Func(arg_0):
        """Update the timer to reflect a failed call"""
        arg_0.short_interval += arg_0.short_unit
        arg_0.long_interval += arg_0.long_unit
        arg_0.short_interval = min(arg_0.short_interval, arg_0.max_short_timer)
        arg_0.long_interval = min(arg_0.long_interval, arg_0.max_long_timer)
        arg_0.update_interval()


def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_3 = 'rb' with open ( arg_0 , arg_3 ) as stream : arg_4 = stream . read ( ) if sys . version_info [ : 2 ] < ( 2 , 7 ) or sys . version_info [ : 2 ] >= ( 3 , 0 ) and sys . version_info [ : 2 ] < ( 3 , 2 ) : arg_4 = arg_4 . replace ( b'\r\n' , b'\n' ) arg_4 = arg_4 . replace ( b'\r' , b'\n' ) if arg_2 is None : arg_2 = arg_1 arg_5 = compile ( arg_4 , arg_0 , 'exec' ) exec ( arg_5 , arg_1 , arg_2 )

def Func(arg_0, arg_1, arg_2=None):
    """
    Python 3 implementation of execfile.
    """
    arg_3 = 'rb'
    with open(arg_0, arg_3) as stream:
        arg_4 = stream.read()
    # compile() function in Python 2.6 and 3.1 requires LF line endings.
    if sys.version_info[:2] < (2, 7) or sys.version_info[:2] >= (3, 0) and sys.version_info[:2] < (3, 2):
        arg_4 = arg_4.replace(b'\r\n', b'\n')
        arg_4 = arg_4.replace(b'\r', b'\n')
    if arg_2 is None:
        arg_2 = arg_1
    arg_5 = compile(arg_4, arg_0, 'exec')
    exec(arg_5, arg_1, arg_2)


def Func ( arg_0 = "train" , arg_1 = "/tmp/mnist" ) : arg_2 , arg_3 = mnist . read_data_sets ( arg_1 , arg_0 ) return arg_2 , arg_3 + 1

def Func(arg_0="train", arg_1="/tmp/mnist"):
    """
    Get mnist dataset with features and label as ndarray.
    Data would be downloaded automatically if it doesn't present at the specific location.

    :param data_type: "train" for training data and "test" for testing data.
    :param location: Location to store mnist dataset.
    :return: (features: ndarray, label: ndarray)
    """
    arg_2, arg_3 = mnist.read_data_sets(arg_1, arg_0)
    return arg_2, arg_3 + 1

Get mnist dataset with features and label as ndarray . Data would be downloaded automatically if it doesn t present at the specific location .


def Func ( arg_0 , arg_1 , arg_2 , arg_3 = 'current' ) : arg_0 . _execute ( Command . SET_WINDOW_POSITION , { 'x' : int ( arg_1 ) , 'y' : int ( arg_2 ) , 'window_handle' : arg_3 } )

def Func(arg_0, arg_1, arg_2, arg_3='current'):
        """Sets the x,y position of the current window.

        Support:
            Web(WebView)

        Args:
            x(int): the x-coordinate in pixels.
            y(int): the y-coordinate in pixels.
            window_handle(str): Identifier of window_handle,
                default to 'current'.

        Returns:
            WebDriver Object.
        """
        arg_0._execute(Command.SET_WINDOW_POSITION, {
            'x': int(arg_1),
            'y': int(arg_2),
            'window_handle': arg_3})

Sets the x y position of the current window .


def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = { 'order_by' : 'updated_at' , 'sort' : 'asc' , 'per_page' : PER_PAGE } arg_5 = urijoin ( arg_1 , str ( arg_2 ) , GitLabClient . NOTES , str ( arg_3 ) , GitLabClient . EMOJI ) return arg_0 . fetch_items ( arg_5 , arg_4 )

def Func(arg_0, arg_1, arg_2, arg_3):
        """Get emojis of a note"""

        arg_4 = {
            'order_by': 'updated_at',
            'sort': 'asc',
            'per_page': PER_PAGE
        }

        arg_5 = urijoin(arg_1, str(arg_2), GitLabClient.NOTES,
                       str(arg_3), GitLabClient.EMOJI)

        return arg_0.fetch_items(arg_5, arg_4)


def Func ( arg_0 , arg_1 , arg_2 = "Func" ) : with tf . name_scope ( arg_2 ) : arg_0 = tf . convert_to_tensor ( value = arg_0 , arg_2 = "x" ) arg_1 = tf . convert_to_tensor ( value = arg_1 , arg_2 = "shift" ) assert_util . assert_integer ( arg_1 ) arg_3 = tf . get_static_value ( arg_1 ) arg_4 = tensorshape_util . rank ( arg_0 . shape ) if arg_4 is not None and arg_3 is not None : if arg_4 < 2 : return arg_0 arg_3 = np . sign ( arg_3 ) * ( abs ( arg_3 ) % arg_4 ) if arg_3 == 0 : return arg_0 arg_5 = np . roll ( np . arange ( arg_4 ) , arg_3 ) return tf . transpose ( a = arg_0 , arg_5 = arg_5 ) else : arg_4 = tf . rank ( arg_0 ) arg_1 = tf . where ( tf . less ( arg_1 , 0 ) , - arg_1 % arg_4 , arg_4 - arg_1 % arg_4 ) arg_6 = tf . range ( 0 , arg_1 ) arg_7 = tf . range ( arg_1 , arg_4 ) arg_5 = tf . concat ( [ arg_7 , arg_6 ] , 0 ) return tf . transpose ( a = arg_0 , arg_5 = arg_5 )

def Func(arg_0, arg_1, arg_2="Func"):
  """Circularly moves dims left or right.

  Effectively identical to:

  ```python
  numpy.transpose(x, numpy.roll(numpy.arange(len(x.shape)), shift))
  ```

  When `validate_args=False` additional graph-runtime checks are
  performed. These checks entail moving data from to GPU to CPU.

  Example:

  ```python
  x = tf.random_normal([1, 2, 3, 4])  # Tensor of shape [1, 2, 3, 4].
  Func(x, -1).shape == [2, 3, 4, 1]
  Func(x, -2).shape == [3, 4, 1, 2]
  Func(x,  1).shape == [4, 1, 2, 3]
  Func(x,  2).shape == [3, 4, 1, 2]
  Func(x,  7).shape == Func(x, 3).shape  # [2, 3, 4, 1]
  Func(x, -7).shape == Func(x, -3).shape  # [4, 1, 2, 3]
  ```

  Args:
    x: `Tensor`.
    shift: `Tensor`. Number of dimensions to transpose left (shift<0) or
      transpose right (shift>0).
    name: Python `str`. The name to give this op.

  Returns:
    rotated_x: Input `Tensor` with dimensions circularly rotated by shift.

  Raises:
    TypeError: if shift is not integer type.
  """
  with tf.name_scope(arg_2):
    arg_0 = tf.convert_to_tensor(value=arg_0, arg_2="x")
    arg_1 = tf.convert_to_tensor(value=arg_1, arg_2="shift")
    # We do not assign back to preserve constant-ness.
    assert_util.assert_integer(arg_1)
    arg_3 = tf.get_static_value(arg_1)
    arg_4 = tensorshape_util.rank(arg_0.shape)
    if arg_4 is not None and arg_3 is not None:
      if arg_4 < 2:
        return arg_0
      arg_3 = np.sign(arg_3) * (
          abs(arg_3) % arg_4)
      if arg_3 == 0:
        return arg_0
      arg_5 = np.roll(np.arange(arg_4), arg_3)
      return tf.transpose(a=arg_0, arg_5=arg_5)
    else:
      # Consider if we always had a positive shift, and some specified
      # direction.
      # When shifting left we want the new array:
      #   last(x, n-shift) + first(x, shift)
      # and if shifting right then we want:
      #   last(x, shift) + first(x, n-shift)
      # Observe that last(a) == slice(a, n) and first(a) == slice(0, a).
      # Also, we can encode direction and shift as one: direction * shift.
      # Combining these facts, we have:
      #   a = cond(shift<0, -shift, n-shift)
      #   last(x, n-a) + first(x, a) == x[a:n] + x[0:a]
      # Finally, we transform shift by modulo length so it can be specified
      # independently from the array upon which it operates (like python).
      arg_4 = tf.rank(arg_0)
      arg_1 = tf.where(
          tf.less(arg_1, 0), -arg_1 % arg_4,
          arg_4 - arg_1 % arg_4)
      arg_6 = tf.range(0, arg_1)
      arg_7 = tf.range(arg_1, arg_4)
      arg_5 = tf.concat([arg_7, arg_6], 0)
      return tf.transpose(a=arg_0, arg_5=arg_5)

Circularly moves dims left or right.

  Effectively identical to:

  ```python
  numpy.transpose(x, numpy.roll(numpy.arange(len(x.shape)), shift))
  ```

  When `validate_args=False` additional graph-runtime checks are
  performed. These checks entail moving data from to GPU to CPU.

  Example:

  ```python
  x = tf.random_normal([1, 2, 3, 4])  # Tensor of shape [1, 2, 3, 4].
  rotate_transpose(x, -1).shape == [2, 3, 4, 1]
  rotate_transpose(x, -2).shape == [3, 4, 1, 2]
  rotate_transpose(x,  1).shape == [4, 1, 2, 3]
  rotate_transpose(x,  2).shape == [3, 4, 1, 2]
  rotate_transpose(x,  7).shape == rotate_transpose(x, 3).shape  # [2, 3, 4, 1]
  rotate_transpose(x, -7).shape == rotate_transpose(x, -3).shape  # [4, 1, 2, 3]
  ```

  Args:
    x: `Tensor`.
    shift: `Tensor`. Number of dimensions to transpose left (shift<0) or
      transpose right (shift>0).
    name: Python `str`. The name to give this op.

  Returns:
    rotated_x: Input `Tensor` with dimensions circularly rotated by shift.

  Raises:
    TypeError: if shift is not integer type.


return render(request, "registrasion/profile_form.html", data)

def
Func
(
arg_0
)
:
arg_1
,
arg_2
=
_handle_profile
(
arg_0
,
"profile"
)
if
arg_2
and
not
arg_1
.
errors
:
messages
.
success
(
arg_0
,
"Your attendee profile was updated."
,
)
return
redirect
(
"dashboard"
)
arg_3
=
{
"form"
:
arg_1
,
}
return
render
(
arg_0
,
"registrasion/profile_form.html"
,
arg_3
)

def Func(arg_0):
    ''' View for editing an attendee's profile

    The user must be logged in to edit their profile.

    Returns:
        redirect or render:
            In the case of a ``POST`` request, it'll redirect to ``dashboard``,
            or otherwise, it will render ``registrasion/profile_form.html``
            with data::

                {
                    "form": form,  # Instance of ATTENDEE_PROFILE_FORM.
                }

    '''

    arg_1, arg_2 = _handle_profile(arg_0, "profile")

    if arg_2 and not arg_1.errors:
        messages.success(
            arg_0,
            "Your attendee profile was updated.",
        )
        return redirect("dashboard")

    arg_3 = {
        "form": arg_1,
    }
    return render(arg_0, "registrasion/profile_form.html", arg_3)


def Func(arg_0, arg_1):
        """
        Create a new `Router` instance, with it's own set of routes, for
        ``obj``.
        """
        arg_2 = type(arg_0)()
        arg_2._routes = list(arg_0._routes)
        arg_2._self = arg_1
        return arg_2

Create a new Router instance with it s own set of routes for obj .


def Func ( ) : arg_0 = request . args . getlist ( 'criterion' ) arg_1 = get_Func ( arg_0 ) return jsonify ( dict ( arg_1 = arg_1 ) )

def Func():
    """Calculate an ACMG classification from submitted criteria."""
    arg_0 = request.args.getlist('criterion')
    arg_1 = get_Func(arg_0)
    return jsonify(dict(arg_1=arg_1))

Calculate an ACMG classification from submitted criteria .