text
stringlengths
78
104k
score
float64
0
0.18
def service_create(image=str, name=str, command=str, hostname=str, replicas=int, target_port=int, published_port=int): ''' Create Docker Swarm Service Create image The docker image ...
0.002688
def merge_dicts(dicts): """ Merge dicts in reverse to preference the order of the original list. e.g., merge_dicts([a, b]) will preference the keys in 'a' over those in 'b'. """ merged = {} for d in reversed(dicts): merged.update(d) return merged
0.009554
def plot_roc_curve(y_true, y_probas, title='ROC Curves', curves=('micro', 'macro', 'each_class'), ax=None, figsize=None, cmap='nipy_spectral', title_fontsize="large", text_fontsize="medium"): """Generates the ROC curves from labels and predicted scores/probab...
0.000369
def get(self, network_id, *args, **kwargs): """ Get a network by its ID. Args: network_id (str): The ID of the network. verbose (bool): Retrieve the service details across the cluster in swarm mode. scope (str): Filter the network by scope (``...
0.002587
def masked_array(self, geometry=None): """Returns a MaskedArray using nodata values. Keyword args: geometry -- any geometry, envelope, or coordinate extent tuple """ if geometry is None: return self._masked_array() geom = transform(geometry, self.sref) ...
0.002732
def to_json(self, X, y): ''' Reads dataset to csv. :param X: dataset as list of dict. :param y: labels. ''' with gzip.open('%s.gz' % self.path, 'wt') if self.gz else open( self.path, 'w') as file: json.dump(list(zip(y, X)), file)
0.006536
def class_name(self, cls, parts=0, aliases=None): # type: (Any, int, Optional[Dict[unicode, unicode]]) -> unicode """Given a class object, return a fully-qualified name. This works for things I've tested in matplotlib so far, but may not be completely general. """ module...
0.003911
def new_text_block(self, **kwargs): """Create a new text block.""" proto = {'content': '', 'type': self.markdown} proto.update(**kwargs) return proto
0.01105
def add(self, key, value, lang=None): """ Add a triple to the graph related to this node :param key: Predicate of the triple :param value: Object of the triple :param lang: Language of the triple if applicable """ if not isinstance(value, Literal) and lang is not None: ...
0.002981
def all(self, page=1, per_page=10): """ Get a single page from the list of all collections. :param page [integer]: Page number to retrieve. (Optional; default: 1) :param per_page [integer]: Number of items per page. (Optional; default: 10) :return: [Array]: A single page of the ...
0.006135
def decode_complex_ops(encoded_querystring, operators=None, negation=True): """ Returns a list of (querystring, negate, op) tuples that represent complex operations. This function will raise a `ValidationError`s if: - the individual querystrings are not wrapped in parentheses - the set operators do ...
0.001481
def get_utc_sun_time_full(self): """Return a list of Jewish times for the given location.""" # sunset and rise time sunrise, sunset = self._get_utc_sun_time_deg(90.833) # shaa zmanit by gara, 1/12 of light time sun_hour = (sunset - sunrise) // 12 midday = (sunset + sunri...
0.001421
def get_fragment(self, **kwargs): """ Return a complete fragment. :param gp: :return: """ gen, namespaces, plan = self.get_fragment_generator(**kwargs) graph = ConjunctiveGraph() [graph.bind(prefix, u) for (prefix, u) in namespaces] [graph.add((s, ...
0.005362
def configure( cls, impl: "Union[None, str, Type[Configurable]]", **kwargs: Any ) -> None: """Configures the `AsyncHTTPClient` subclass to use. ``AsyncHTTPClient()`` actually creates an instance of a subclass. This method may be called with either a class object or the fully...
0.002947
def formatter(self, api_client, data, newval): """Parse additional url fields and map them to inputs Attempt to create a dictionary with keys being user input, and response being the returned URL """ if newval is None: return None user_param = data['_paramAd...
0.00365
def parse(station: str, txt: str) -> (MetarData, Units): # type: ignore """ Returns MetarData and Units dataclasses with parsed data and their associated units """ core.valid_station(station) return parse_na(txt) if core.uses_na_format(station[:2]) else parse_in(txt)
0.006944
def _buffer_incomplete_responses(raw_output, buf): """It is possible for some of gdb's output to be read before it completely finished its response. In that case, a partial mi response was read, which cannot be parsed into structured data. We want to ALWAYS parse complete mi records. To do this, we store a ...
0.005084
def get_project_children(self, project_id, name_contains, exclude_response_fields=None): """ Send GET to /projects/{project_id}/children filtering by a name. :param project_id: str uuid of the project :param name_contains: str name to filter folders by (if not None this method works recu...
0.009983
def generate(self): """Returns (ts, rvs), where ts is a list of arrays of observation times (one array for each observatory), and rvs is a corresponding list of total radial velocity measurements.""" ts=self.generate_tobs() noise=self.generate_noise(ts) rvs=[] ...
0.017857
def extendChainsInSentence( self, sentence, foundChains ): ''' Rakendab meetodit self.extendChainsInClause() antud lause igal osalausel. ''' # 1) Preprocessing clauses = getClausesByClauseIDs( sentence ) # 2) Extend verb chains in each clause allDetectedVerbChains...
0.014925
def fromPy(cls, val, typeObj, vldMask=None): """ :param val: python string or None :param typeObj: instance of String HdlType :param vldMask: if is None validity is resolved from val if is 0 value is invalidated if is 1 value has to be valid """ as...
0.003221
def parse_parts(self, file, boundary, content_length): """Generate ``('file', (name, val))`` and ``('form', (name, val))`` parts. """ in_memory = 0 for ellt, ell in self.parse_lines(file, boundary, content_length): if ellt == _begin_file: headers, nam...
0.001106
def _expectation(p, linear_mean, none, kern, feat, nghp=None): """ Compute the expectation: expectation[n] = <m(x_n)^T K_{x_n, Z}>_p(x_n) - m(x_i) = A x_i + b :: Linear mean function - K_{.,.} :: Kernel function :return: NxQxM """ with params_as_tensors_for(linear_mea...
0.002681
def process(self, context, data): """ Will modify the context.target_backend attribute based on the requester identifier. :param context: request context :param data: the internal request """ context.target_backend = self.requester_mapping[data.requester] return s...
0.008596
def set_atom(self, block, block_items, existing_col, min_itemsize, nan_rep, info, encoding=None, errors='strict'): """ create and setup my atom from the block b """ self.values = list(block_items) # short-cut certain block types if block.is_categorical: ret...
0.001575
def role_create(auth=None, **kwargs): ''' Create a role CLI Example: .. code-block:: bash salt '*' keystoneng.role_create name=role1 salt '*' keystoneng.role_create name=role1 domain_id=b62e76fbeeff4e8fb77073f591cf211e ''' cloud = get_operator_cloud(auth) kwargs = _clean_k...
0.005128
def get(self, key, default=None): """Get value with optional default.""" try: key = self.get_key(key) except KeyError: return default return super(DatasetDict, self).get(key, default)
0.008368
def click(self, x, y): ''' same as adb -s ${SERIALNO} shell input tap x y FIXME(ssx): not tested on horizontal screen ''' self.shell('input', 'tap', str(x), str(y))
0.009804
def _spelling_pipeline(self, sources, options, personal_dict): """Check spelling pipeline.""" for source in self._pipeline_step(sources, options, personal_dict): # Don't waste time on empty strings if source._has_error(): yield Results([], source.context, source....
0.003697
def _get_deleted_at_column(self, builder): """ Get the "deleted at" column for the builder. :param builder: The query builder :type builder: orator.orm.builder.Builder :rtype: str """ if len(builder.get_query().joins) > 0: return builder.get_model()....
0.004651
def read(self, request, pk=None): """ Mark the message as read (i.e. delete from inbox) """ from .settings import stored_messages_settings backend = stored_messages_settings.STORAGE_BACKEND() try: backend.inbox_delete(request.user, pk) except MessageD...
0.004415
def _load_credentials_file(credentials_file): """Load credentials from the given file handle. The file is expected to be in this format: { "file_version": 2, "credentials": { "key": "base64 encoded json representation of credentials." } } ...
0.001373
def isdisjoint(self, other): r"""Return True if the set has no elements in common with other. Sets are disjoint iff their intersection is the empty set. >>> ms = Multiset('aab') >>> ms.isdisjoint('bc') False >>> ms.isdisjoint(Multiset('ccd')) True Args:...
0.004975
def _log_multivariate_normal_density_spherical(X, means, covars): """Compute Gaussian log-density at X for a spherical model.""" cv = covars.copy() if covars.ndim == 1: cv = cv[:, np.newaxis] if cv.shape[1] == 1: cv = np.tile(cv, (1, X.shape[-1])) return _log_multivariate_normal_dens...
0.002924
def _get_paged_resource(self, url, params=None, data_key=None): """ Canvas GET method. Return representation of the requested paged resource, either the requested page, or chase pagination links to coalesce resources. """ if not params: params = {} se...
0.003058
def tabfile2list(fname): "tabfile2list" #dat = mylib1.readfileasmac(fname) #data = string.strip(dat) data = mylib1.readfileasmac(fname) #data = data[:-2]#remove the last return alist = data.split('\r')#since I read it as a mac file blist = alist[1].split('\t') clist = [] for num in ...
0.016129
def name(self): """ Returns the connected user's full name or string representation if the full name method is unavailable (e.g. on a custom user class). """ if hasattr(self.user, "get_full_name"): return self.user.get_full_name() return "{0}".format(self.user...
0.006231
def search(self, query, _or=False, ignores=[]): """Search word from FM-index Params: <str> | <Sequential> query <bool> _or <list <str> > ignores Return: <list>SEARCH_RESULT(<int> document_id, <list <int> > counts ...
0.001431
def relative(dataset, ori=0, column=1, fail_silently=True): """ Convert dataset to relative value from the value of :attr:`ori` Parameters ---------- dataset : list of numpy array list A list of numpy array list ori : integer or numpy array, optional A relative original data ind...
0.002145
def submit(self, stanza): """Adds keys to the current configuration stanza as a dictionary of key-value pairs. :param stanza: A dictionary of key-value pairs for the stanza. :type stanza: ``dict`` :return: The :class:`Stanza` object. """ body = _encode(**stanza) ...
0.005168
def load_labeled_intervals(filename, delimiter=r'\s+'): r"""Import labeled intervals from an annotation file. The file should consist of three columns: Two consisting of numeric values corresponding to start and end time of each interval and a third corresponding to the label of each interval. This is...
0.001538
def set_complete_message(self, message): """Set a complete message.""" @self.connect def on_complete(**kwargs): _default_on_complete(message, **kwargs)
0.010638
def save(self, *args, **kwargs): """ Create formatted version of body text. """ self.body_formatted = sanetize_text(self.body) super(Contact, self).save()
0.010309
def key_required(group=None, perm=None, keytype=None): """ Decorator for key authentication """ def decorator(f): def wrapper(request, *args, **kwargs): try: validate_key( request, group, perm, keytype ) return f(request, *args, **kwargs) e...
0.015209
def play_mode(self, playmode): """Set the speaker's mode.""" playmode = playmode.upper() if playmode not in PLAY_MODES.keys(): raise KeyError("'%s' is not a valid play mode" % playmode) self.avTransport.SetPlayMode([ ('InstanceID', 0), ('NewPlayMode',...
0.005865
def simulate_list(nwords=16, nrec=10, ncats=4): """A function to simulate a list""" # load wordpool wp = pd.read_csv('data/cut_wordpool.csv') # get one list wp = wp[wp['GROUP']==np.random.choice(list(range(16)), 1)[0]].sample(16) wp['COLOR'] = [[int(np.random.rand() * 255) for i in range(3)] ...
0.00885
def _get(self, numberOfBits: int, doCollect: bool): """ :param numberOfBits: number of bits to get from actual possition :param doCollect: if False output is not collected just iterator moves in structure """ if not isinstance(numberOfBits, int): numberOfB...
0.000896
def payload(self): """ Picks out the payload from the different parts of the signed/encrypted JSON Web Token. If the content type is said to be 'jwt' deserialize the payload into a Python object otherwise return as-is. :return: The payload """ _msg = as_unicode(s...
0.003263
def csv_to_numpy(string_like, dtype=None): # type: (str) -> np.array """Convert a CSV object to a numpy array. Args: string_like (str): CSV string. dtype (dtype, optional): Data type of the resulting array. If None, the dtypes will be determined by the ...
0.006192
def _ReadFixedSizeDataTypeDefinition( self, definitions_registry, definition_values, data_type_definition_class, definition_name, supported_attributes, default_size=definitions.SIZE_NATIVE, default_units='bytes', is_member=False, supported_size_values=None): """Reads a fixed-size data type d...
0.005053
def class_for_type(self, object_type): """ Given an object_type return the class associated with it. """ if object_type not in self.class_mapping: raise ZenpyException("Unknown object_type: " + str(object_type)) else: return self.class_mapping[object_type]
0.006579
def generate_shard_args(outfiles, num_examples): """Generate start and end indices per outfile.""" num_shards = len(outfiles) num_examples_per_shard = num_examples // num_shards start_idxs = [i * num_examples_per_shard for i in range(num_shards)] end_idxs = list(start_idxs) end_idxs.pop(0) end_idxs.append...
0.023747
def colormagdiagram_cplist(cplist, outpkl, color_mag1=['gaiamag','sdssg'], color_mag2=['kmag','kmag'], yaxis_mag=['gaia_absmag','rpmj']): '''This makes color-mag diagrams for all checkplot pickles in the prov...
0.004236
def prj_view_user(self, *args, **kwargs): """View the, in the user table view selected, user. :returns: None :rtype: None :raises: None """ if not self.cur_prj: return i = self.prj_user_tablev.currentIndex() item = i.internalPointer() ...
0.004988
def interpolate(values, value_times, sampling_rate=1000): """ 3rd order spline interpolation. Parameters ---------- values : dataframe Values. value_times : list Time indices of values. sampling_rate : int Sampling rate (samples/second). Returns ---------- ...
0.002855
def cli(env, limit, closed=False, get_all=False): """Invoices and all that mess""" manager = AccountManager(env.client) invoices = manager.get_invoices(limit, closed, get_all) table = formatting.Table([ "Id", "Created", "Type", "Status", "Starting Balance", "Ending Balance", "Invoice Amount", ...
0.002014
def delete_service(self, service: str): """Removes/stops a docker service. Only the manager nodes can delete a service Args: service (string): Service name or ID """ # Raise an exception if we are not a manager if not self._manager: raise Runtime...
0.00409
async def enter_captcha(self, url: str, sid: str) -> str: """ Override this method for processing captcha. :param url: link to captcha image :param sid: captcha id. I do not know why pass here but may be useful :return captcha value """ raise VkCaptchaNeeded(url,...
0.006154
def iter_paragraph(filename, filetype): """ A helper function to iterate through the diff types of Wikipedia data inputs. :param arguments: The docopt arguments :type arguments: dict :return: A generator yielding a pargraph of text for each iteration. """ assert filetype in ['jsonzip', 'json...
0.002613
def parse_file_provider(uri): """Find the file provider for a URI.""" providers = {'gs': job_model.P_GCS, 'file': job_model.P_LOCAL} # URI scheme detector uses a range up to 30 since none of the IANA # registered schemes are longer than this. provider_found = re.match(r'^([A-Za-z][A-Za-z0-9+.-]{0,29...
0.010526
def get_body(self, msg): """ Extracts and returns the decoded body from an EmailMessage object""" body = "" charset = "" if msg.is_multipart(): for part in msg.walk(): ctype = part.get_content_type() cdispo = str(part.get('Content-Disposition...
0.004796
def unique_email_validator(form, field): """ Username must be unique. This validator may NOT be customized.""" user_manager = current_app.user_manager if not user_manager.email_is_available(field.data): raise ValidationError(_('This Email is already in use. Please try another one.'))
0.009836
def search_list(kb, from_=None, match_type=None, page=None, per_page=None, unique=False): """Search "mapping from" for knowledge.""" # init page = page or 1 per_page = per_page or 10 if kb.kbtype == models.KnwKB.KNWKB_TYPES['written_as']: # get th...
0.003257
def play(self, tone): """ Play the given *tone*. This can either be an instance of :class:`~gpiozero.tones.Tone` or can be anything that could be used to construct an instance of :class:`~gpiozero.tones.Tone`. For example:: >>> from gpiozero import TonalBuzzer ...
0.001864
def get_placeholder_image(width, height, name=None, fg_color=get_color('black'), bg_color=get_color('grey'), text=None, font=u'Verdana.ttf', fontsize=42, encoding=u'unic', mode='RGBA', fmt=u'PNG'): """Little spin-off from https://github.com/Visgean/python-placeholder that not saves an image and ...
0.005063
def _get_fout_go(self): """Get the name of an output file based on the top GO term.""" assert self.goids, "NO VALID GO IDs WERE PROVIDED AS STARTING POINTS FOR HIERARCHY REPORT" base = next(iter(self.goids)).replace(':', '') upstr = '_up' if 'up' in self.kws else '' return "hier_...
0.007979
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'status') and self.status is not None: _dict['status'] = self.status if hasattr(self, 'message') and self.message is not None: _dict['message'] = self.message ...
0.0059
def _deleteRangeFromKNN(self, start=0, end=None): """ Removes any stored records within the range from start to end. Noninclusive of end. parameters ------------ start - integer representing the ROWID of the start of the deletion range, end - integer representing the ROWID of the end of the...
0.00222
def create_argument_parser(): """Creates the argument parser for haas. """ parser = argparse.ArgumentParser(prog='haas') parser.add_argument('--version', action='version', version='%(prog)s {0}'.format(haas.__version__)) verbosity = parser.add_mutually_exclusive_group() ...
0.000576
def _update_docinfo(self): """Update the PDF's DocumentInfo dictionary to match XMP metadata The standard mapping is described here: https://www.pdfa.org/pdfa-metadata-xmp-rdf-dublin-core/ """ self._pdf.docinfo # Touch object to ensure it exists for uri, element, do...
0.001971
def verify(self, data, signature): """ Verify signed data using the Montgomery public key stored by this XEdDSA instance. :param data: A bytes-like object containing the data that was signed. :param signature: A bytes-like object encoding the signature with length SIGNATURE_...
0.005061
def get_from_area(self, lat_min, lon_min, lat_max, lon_max, picture_size=None, set_=None, map_filter=None): """ Get all available photos for a specific bounding box :param lat_min: Minimum latitude of the bounding box :type lat_min: float :param lon_min: ...
0.004215
def enable(self): """ Enable antivirus on the engine """ self.update(antivirus_enabled=True, virus_mirror='update.nai.com/Products/CommonUpdater' if \ not self.get('virus_mirror') else self.virus_mirror, antivirus_update_tim...
0.014085
def get(self): """Returns the spanning-tree configuration as a dict object The dictionary object represents the entire spanning-tree configuration derived from the nodes running config. This includes both globally configuration attributes as well as interfaces and instances. S...
0.002148
def node_applications(self, state=None, user=None): """ With the Applications API, you can obtain a collection of resources, each of which represents an application. :param str state: application state :param str user: user name :returns: API response object with JSON da...
0.002155
def _user_input() -> str: """ A helper function which waits for user multi-line input. :return: A string input by user, separated by ``'\\n'``. """ lines = [] try: while True: line = input() if line != '': lines.append(line) else: ...
0.002427
def managed_context_entry(process_name, classname, token, time_qualifier, trigger_frequency='every 60', state_machine_name=STATE_MACHINE_DISCRETE, is_on=True, ...
0.002616
def add_to_role(server_context, role, user_id=None, email=None, container_path=None): """ Add user/group to security role :param server_context: A LabKey server context. See utils.create_server_context. :param role: (from get_roles) to add user to :param user_id: to add permissions role to (must sup...
0.008559
def plotstuff(self, T=[0, 1000]): """ Create a scatter plot of the contents of the database, with entries on the interval T. Parameters ---------- T : list Time interval. Returns ------- None ...
0.007042
def _build_list_items(self, matches): """Returns the HTML list items for the next matches that have a larger (or equal) header compared to the first header's level. This method mutatively removes elements from the front of matches as it processes each element. This method assumes matche...
0.005128
def add_entry(self, timestamp, data): """Adds a new data entry to the TimeSeries. :param timestamp: Time stamp of the data. This has either to be a float representing the UNIX epochs or a string containing a timestamp in the given format. :param list data: A list c...
0.006289
def mean_interval(self, name, alpha=_alpha, **kwargs): """ Interval assuming gaussian posterior. """ data = self.get(name,**kwargs) #return ugali.utils.stats.mean_interval(data,alpha) return mean_interval(data,alpha)
0.018939
def follow_info(self, index=None, params=None): """ `<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html>`_ :arg index: A comma-separated list of index patterns; use `_all` to perform the operation on all indices """ return self....
0.004717
def match_time(self, value): '''Search for time information in the string''' m = self.REGEX_TIME.search(value) time = datetime.datetime.utcnow().time() if m: time = datetime.time(int(m.group(1)), int(m.group(2))) value = self.REGEX_TIME.sub('', value) return (time, value)
0.009868
def _J(self, theta): """ Implements the order dependent family of functions defined in equations 4 to 7 in the reference paper. """ if self.order == 0: return np.pi - theta elif self.order == 1: return tf.sin(theta) + (np.pi - theta) * tf.cos(theta...
0.004193
def get_redacted_args(entrypoint, *args, **kwargs): """ Utility function for use with entrypoints that are marked with ``sensitive_arguments`` -- e.g. :class:`nameko.rpc.Rpc` and :class:`nameko.events.EventHandler`. :Parameters: entrypoint : :class:`~nameko.extensions.Entrypoint` Th...
0.00029
def expand_time(str_time, default_unit='s', multiplier=1): """ helper for above functions """ parser = re.compile(r'(\d+)([a-zA-Z]*)') parts = parser.findall(str_time) result = 0.0 for value, unit in parts: value = int(value) unit = unit.lower() if unit == '': ...
0.000991
def saveSV(self, fname, comments=None, metadata=None, printmetadict=None, dialect = None, delimiter=None, doublequote=True, lineterminator='\n', escapechar = None, quoting=csv.QUOTE_MINIMAL, quotechar='"', skipinitialspace=False, ...
0.029573
def check_args(func): """A decorator that performs type checking using type hints at runtime:: @check_args def fun(a: int): print(f'fun is being called with parameter {a}') # this will raise a TypeError describing the issue without the function being called ...
0.002621
def _transform_abstract(plpy, module_ident): """Transform abstract, bi-directionally. Transforms an abstract using one of content columns ('abstract' or 'html') to determine which direction the transform will go (cnxml->html or html->cnxml). A transform is done on either one of them to make the...
0.000618
async def process(client: Client, transaction_signed_raw: str) -> ClientResponse: """ POST a transaction raw document :param client: Client to connect to the api :param transaction_signed_raw: Transaction signed raw document :return: """ return await client.post(MODULE + '/process', {'trans...
0.007958
def convert_unicode_field(string): """ Convert a Unicode field into the corresponding list of Unicode strings. The (input) Unicode field is a Unicode string containing one or more Unicode codepoints (``xxxx`` or ``U+xxxx`` or ``xxxx_yyyy``), separated by a space. :param str string: the (input)...
0.004594
def get_contact_notes( self, obj_id, search='', start=0, limit=0, order_by='', order_by_dir='ASC' ): """ Get a list of a contact's notes :param obj_id: int Contact ID :param search: str :param start: int :param ...
0.003497
def before_loop(self, coro): """A function that also acts as a decorator to register a coroutine to be called before the loop starts running. This is useful if you want to wait for some bot state before the loop starts, such as :meth:`discord.Client.wait_until_ready`. Parameters...
0.007813
def _finalize_response(self, response): """ Convert the ``Response`` object into django's ``HttpResponse`` :return: django's ``HttpResponse`` """ res = HttpResponse(content=response.content, content_type=self._get_content_type()) # status_code is set ...
0.004963
def distance_home(GPS_RAW): '''distance from first fix point''' global first_fix if (hasattr(GPS_RAW, 'fix_type') and GPS_RAW.fix_type < 2) or \ (hasattr(GPS_RAW, 'Status') and GPS_RAW.Status < 2): return 0 if first_fix == None: first_fix = GPS_RAW return 0 return...
0.011331
def LR_collection(hyper_lr, args): """This custom function implements a proprietary IntegralDefense Live Response collection package. 'None' will be immediately returned if you do no have this package. The location of the package is assumed to be defined by a 'lr_path' variable in the configuration file. ...
0.005144
def inceptionv4(pretrained=True): r"""InceptionV4 model architecture from the `"Inception-v4, Inception-ResNet..." <https://arxiv.org/abs/1602.07261>`_ paper. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet """ model = InceptionV4() if pretrained: model...
0.005038
def action_object(self, obj, **kwargs): """ Stream of most recent actions where obj is the action_object. Keyword arguments will be passed to Action.objects.filter """ check(obj) return obj.action_object_actions.public(**kwargs)
0.007246
def list_global_ips(self, version=None, identifier=None, **kwargs): """Returns a list of all global IP address records on the account. :param int version: Only returns IPs of this version (4 or 6) :param string identifier: If specified, the list will only contain the ...
0.001938