text
stringlengths
78
104k
score
float64
0
0.18
def histogram(n_traces=1,n=500,dispersion=2,mode=None): """ Returns a DataFrame with the required format for a histogram plot Parameters: ----------- n_traces : int Number of traces n : int Number of points for each trace mode : string Format for each item 'abc' for alphabet columns 'stoc...
0.055046
def save_metadata(self, data_dir, feature_name=None): """See base class for details.""" # Save names if defined if self._str2int is not None: names_filepath = _get_names_filepath(data_dir, feature_name) _write_names_to_file(names_filepath, self.names)
0.010909
def at(self, instant): """Iterates (in chronological order) over all events that are occuring during `instant`. Args: instant (Arrow object) """ for event in self: if event.begin <= instant <= event.end: yield event
0.010381
def sanitize_capabilities(caps): """ Sanitize the capabilities we pass to Selenic so that they can be consumed by Browserstack. :param caps: The capabilities passed to Selenic. This dictionary is modified. :returns: The sanitized capabilities. """ platform = caps["platform"] upper...
0.001005
def log_connection_info(self): """ Overridden to customize the start-up message printed to the terminal """ _ctrl_c_lines = [ 'NOTE: Ctrl-C does not work to exit from the command line.', 'To exit, just close the window, type "exit" or "quit" at the ' '...
0.003963
def read(self): """Loads all lines in memory""" lines = self.readlines() if self.metadata and 'encoding' in self.metadata: encoding = self.metadata['encoding'] else: encoding = 'utf-8' if sys.version < '3': return "\n".join( unicode(line, 'utf-...
0.012097
def apply_replacements(cfile, replacements): """Applies custom replacements. mapping(dict), where each dict contains: 'match' - filename match pattern to check against, the filename replacement is applied. 'replacement' - string used to replace the matched part of the filename ...
0.000647
def _parse_message(self, data): """ Parse the message from the device. :param data: message data :type data: string :raises: :py:class:`~alarmdecoder.util.InvalidMessageError` """ match = self._regex.match(str(data)) if match is None: raise ...
0.002862
def cot(x, context=None): """ Return the cotangent of ``x``. """ return _apply_function_in_current_context( BigFloat, mpfr.mpfr_cot, (BigFloat._implicit_convert(x),), context, )
0.004348
def to(self, new_unit): """ Conversion to a new_unit. Args: new_unit: New unit type. Returns: A ArrayWithFloatWithUnit object in the new units. Example usage: >>> e = EnergyArray([1, 1.1], "Ha") >>> e.to("eV") arr...
0.003824
def extract_numeric_values_from_string(str_contains_values): # type: (AnyStr) -> Optional[List[Union[int, float]]] """ Find numeric values from string, e.g., 1, .7, 1.2, 4e2, 3e-3, -9, etc. Reference: `how-to-extract-a-floating-number-from-a-string-in-python`_ Examples:...
0.003891
def new_pattern(self, id_, name, rows=None): """Create a new knitting pattern. If rows is :obj:`None` it is replaced with the :meth:`new_row_collection`. """ if rows is None: rows = self.new_row_collection() return self._spec.new_pattern(id_, name, rows, self...
0.006231
def _pso(self, n_particles, n_iterations, optimizer): """ :param n_particles: number of PSO particles :param n_iterations: number of PSO iterations :param optimizer: instance of SinglePlaneOptimizer or MultiPlaneOptimizer :return: optimized kwargs_lens """ pso =...
0.008982
def _fullqualname_builtin_py2(obj): """Fully qualified name for 'builtin_function_or_method' objects in Python 2. """ if obj.__self__ is None: # built-in functions module = obj.__module__ qualname = obj.__name__ else: # built-in methods if inspect.isclass(obj...
0.001859
def QA_SU_save_stock_info_tushare(client=DATABASE): ''' 获取 股票的 基本信息,包含股票的如下信息 code,代码 name,名称 industry,所属行业 area,地区 pe,市盈率 outstanding,流通股本(亿) totals,总股本(亿) totalAssets,总资产(万) liquidAssets,流动资产 fixedAssets,固定资产 reserved...
0.000972
def verify_pubkey_sig(self, message, sig): ''' Wraps the verify_signature method so we have additional checks. :rtype: bool :return: Success or failure of public key verification ''' if self.opts['master_sign_key_name']: path = os.path.join(self.opts[...
0.001262
def as_ordered_dict(self, preference_orders: List[List[str]] = None) -> OrderedDict: """ Returns Ordered Dict of Params from list of partial order preferences. Parameters ---------- preference_orders: List[List[str]], optional ``preference_orders`` is list of partial...
0.006436
def _set_mac_move(self, v, load=False): """ Setter method for mac_move, mapped from YANG variable /mac_address_table/mac_move (container) If this variable is read-only (config: false) in the source YANG file, then _set_mac_move is considered as a private method. Backends looking to populate this var...
0.005666
def _conv(self,v): """Convert Python values to MySQL values""" if isinstance(v,str): return '"%s"' %v.replace("'","''") elif isinstance(v,datetime.datetime): if v.tzinfo is not None: raise ValueError,\ "datetime instances with tz...
0.029654
def get_arcpy(): ''' Allows arcpy to imported on 'unmanaged' python installations (i.e. python installations arcgis is not aware of). Gets the location of arcpy and related libs and adds it to sys.path ''' install_dir = locate_arcgis() arcpy = path.join(install_dir, "arcpy") # Check we have the arcp...
0.022951
def get_transform_fxn(data_beads, mef_values, mef_channels, clustering_fxn=clustering_gmm, clustering_params={}, clustering_channels=None, statistic_fxn=FlowCal.stats.median, ...
0.000493
def getColorMapAsContinuousSLD(self, nodata=-9999): """ Return the mapped color ramp as a :rtype: str """ colorMap = ET.Element('ColorMap', type='interval') # Add a line for the no-data values (nv) ET.SubElement(colorMap, 'ColorMapEntry', color='#000000', quantit...
0.003484
def list_(formatter, value, name, option, format): """Repeats the items of an array. Spec: `{:[l[ist]:]item|spacer[|final_spacer[|two_spacer]]}` Example:: >>> fruits = [u'apple', u'banana', u'coconut'] >>> smart.format(u'{fruits:list:{}|, |, and | and }', fruits=fruits) u'apple, bana...
0.000612
def IsActiveOn(self, date, date_object=None): """Test if this service period is active on a date. Args: date: a string of form "YYYYMMDD" date_object: a date object representing the same date as date. This parameter is optional, and present only for performance ...
0.006494
def namespace(self, prefix=None): """ Get this schema element's target namespace. In case of reference elements, the target namespace is defined by the referenced and not the referencing element node. @param prefix: The default prefix. @type prefix: str @return:...
0.003663
def separate_directions(di_block): """ Separates set of directions into two modes based on principal direction Parameters _______________ di_block : block of nested dec,inc pairs Return mode_1_block,mode_2_block : two lists of nested dec,inc pairs """ ppars = doprinc(di_block) ...
0.001208
def roundness(self, value): """ Set the roundness of the vowel. :param str value: the value to be set """ if (value is not None) and (not value in DG_V_ROUNDNESS): raise ValueError("Unrecognized value for roundness: '%s'" % value) self.__roundness = value
0.009494
def get_app_names(self): """ Return application names. Return the list of application names that are available in the database. Returns: set of str. """ app_names = set() for name in self.apps: app_names.add(name) return ...
0.006079
def max_cycles(self, num): """ Truncates all contained Palette objects to a maximum number of samples and returns a new Options object containing the truncated or resampled Palettes. """ kwargs = {kw: (arg[num] if isinstance(arg, Palette) else arg) for k...
0.005051
def connect_node(node, node_shp, mv_grid, target_obj, proj, graph, conn_dist_ring_mod, debug): """ Connects `node` to `target_obj`. Args ---- node: LVLoadAreaCentreDing0, i.e. Origin node - Ding0 graph object (e.g. LVLoadAreaCentreDing0) node_shp: :shapely:`Shapely Point object<points>` ...
0.004922
def topoff_user(cls, user, amount): """ Ensure user has a minimum number of invites. """ stat, _ = cls.objects.get_or_create(user=user) remaining = stat.invites_remaining() if remaining != -1 and remaining < amount: stat.invites_allocated += (amount - remainin...
0.00578
def visit_tryexcept(self, node): """check for empty except""" self._check_try_except_raise(node) exceptions_classes = [] nb_handlers = len(node.handlers) for index, handler in enumerate(node.handlers): if handler.type is None: if not _is_raising(handle...
0.001368
def check_author(author, **kwargs): """Check the presence of the author in the AUTHORS/THANKS files. Rules: - the author full name and email must appear in AUTHORS file :param authors: name of AUTHORS files :type authors: `list` :param path: path to the repository home :type path: str ...
0.000755
def zstack_array(self, s=0, c=0, t=0): """Return zstack as a :class:`numpy.ndarray`. :param s: series :param c: channel :param t: timepoint :returns: zstack as a :class:`numpy.ndarray` """ return np.dstack([x.image for x in self.zstack_proxy_iterator(s=s,...
0.012048
def cost(self, logits, target): """Returns cost. Args: logits: model output. target: target. Returns: Cross-entropy loss for a sequence of logits. The loss will be averaged across time steps if time_average_cost was enabled at construction time. """ logits = tf.reshape(logi...
0.003407
def _FormatSocketExToken(self, token_data): """Formats an extended socket token as a dictionary of values. Args: token_data (bsm_token_data_socket_ex): AUT_SOCKET_EX token data. Returns: dict[str, str]: token values. """ if token_data.socket_domain == 10: local_ip_address = self....
0.005875
def san_managers(self): """ Gets the SanManagers API client. Returns: SanManagers: """ if not self.__san_managers: self.__san_managers = SanManagers(self.__connection) return self.__san_managers
0.007491
def set_security_zones_activation(self, internal=True, external=True): """ this function will set the alarm system to armed or disable it Args: internal(bool): activates/deactivates the internal zone external(bool): activates/deactivates the external zone ...
0.012557
def get_addr_spec(value): """ addr-spec = local-part "@" domain """ addr_spec = AddrSpec() token, value = get_local_part(value) addr_spec.append(token) if not value or value[0] != '@': addr_spec.defects.append(errors.InvalidHeaderDefect( "add-spec local part with no domain")...
0.001953
def border_pixels( self, grad_sigma=0.5, grad_lower_thresh=0.1, grad_upper_thresh=1.0): """ Returns the pixels on the boundary between all segments, excluding the zero segment. Parameters ---------- grad_sigma : float s...
0.003489
def smoothing_window(data, window=[1, 1, 1]): """ This is a smoothing functionality so we can fix misclassifications. It will run a sliding window of form [border, smoothing, border] on the signal and if the border elements are the same it will change the smooth elements to match the border...
0.006107
def read_profile_from_environment_variables(): """ Read profiles from env :return: """ role_arn = os.environ.get('AWS_ROLE_ARN', None) external_id = os.environ.get('AWS_EXTERNAL_ID', None) return role_arn, external_id
0.004065
def fence_status_send(self, breach_status, breach_count, breach_type, breach_time, force_mavlink1=False): ''' Status of geo-fencing. Sent in extended status stream when fencing enabled breach_status : 0 if currently inside fence, 1 if outside ...
0.010336
def _align(self, axes, key_shape=None): """ Align local bolt array so that axes for iteration are in the keys. This operation is applied before most functional operators. It ensures that the specified axes are valid, and might transpose/reshape the underlying array so that the f...
0.004386
def transformer_moe_layer_v1( inputs, output_dim, hparams, train, variable_dtype, layout=None, mesh_shape=None, nonpadding=None): """Local mixture of experts that works well on TPU. Adapted from the paper https://arxiv.org/abs/1701.06538 Note: until the algorithm and inferface solidify, we pass in a hyp...
0.005745
def get_object_or_None(klass, *args, **kwargs): """ Uses get() to return an object or None if the object does not exist. klass may be a Model, Manager, or QuerySet object. All other passed arguments and keyword arguments are used in the get() query. Note: Like with get(), a MultipleObjectsReturned...
0.003766
def equal_to_be(self, be_record): # type: (PathTableRecord) -> bool ''' A method to compare a little-endian path table record to its big-endian counterpart. This is used to ensure that the ISO is sane. Parameters: be_record - The big-endian object to compare with the l...
0.005808
def lines_matching(self, *regexes): """Find the lines matching one of a list of regexes. Returns a set of line numbers, the lines that contain a match for one of the regexes in `regexes`. The entire line needn't match, just a part of it. """ regex_c = re.compile(join_r...
0.004008
def show_grid_from_file(self, fname): """ reads a saved grid file and paints it on the canvas """ with open(fname, "r") as f: for y, row in enumerate(f): for x, val in enumerate(row): self.draw_cell(y, x, val)
0.00692
def lambda_tuple_converter(func): """ Converts a Python 2 function as lambda (x,y): x + y In the Python 3 format: lambda x,y : x + y """ if func is not None and func.__code__.co_argcount == 1: return lambda *args: func(args[0] if len(args) == 1 else args) else: return...
0.003077
def delete_files_and_sync_sources(self, owner, id, name, **kwargs): """ Delete files Delete one or more files from a dataset by their name, including files added via URL. **Batching** Note that the `name` parameter can be include multiple times in the query string, once for each file that ...
0.004298
def electric_field_amplitude_top(P, a, Omega=1e6, units="ad-hoc"): """Return the amplitude of the electric field for a top hat beam. This is the amplitude of a laser beam of power P (in Watts) and a top-hat\ intensity distribution of radius a (in meters). The value of E0 is given in\ rescaled units acco...
0.005789
def frame_info(self): """Return a string identifying the current frame.""" if not self._logger.isEnabledFor(logging.DEBUG): return '' f = sys._getframe(3) fname = os.path.split(f.f_code.co_filename)[1] return '{}:{}'.format(fname, f.f_lineno)
0.006803
def generate_big_urls_glove(bigurls=None): """ Generate a dictionary of URLs for various combinations of GloVe training set sizes and dimensionality """ bigurls = bigurls or {} for num_dim in (50, 100, 200, 300): # not all of these dimensionality, and training set size combinations were trained by S...
0.005022
def collect(self): """ Collect memory stats """ if ((os.access(self.PROC, os.R_OK) and self.config.get('force_psutil') != 'True')): file = open(self.PROC) data = file.read() file.close() memory_total = None memory_...
0.000486
def defaulted_config(modules, params=None, yaml=None, filename=None, config=None, validate=True): """Context manager version of :func:`set_default_config()`. Use this with a Python 'with' statement, like >>> config_yaml = ''' ... toplevel: ... param: value ... ''' >>...
0.000779
def get_task_indicator(self, task_level=None): """ Args: task_level (int or None): task depth level to get the indicator for, if None, will use the current tasks depth Returns: str: char to prepend to the task logs to indicate it's level """ ...
0.004329
def exists(provider, config_location=DEFAULT_CONFIG_DIR): """Check whether provider info is already stored """ config_dir = os.path.join(config_location, NOIPY_CONFIG) auth_file = os.path.join(config_dir, provider) return os.path.exists(auth_file)
0.003788
def copy(self, new_grab=None): """ Clone the Response object. """ obj = self.__class__() obj.process_grab(new_grab if new_grab else self.grab) copy_keys = ('status', 'code', 'head', 'body', 'total_time', 'connect_time', 'name_lookup_time', ...
0.003231
def _GetPlistRootKey(self, file_entry): """Retrieves the root key of a plist file. Args: file_entry (dfvfs.FileEntry): file entry of the plist. Returns: dict[str, object]: plist root key. Raises: errors.PreProcessFail: if the preprocessing fails. """ file_object = file_entry...
0.00823
def make_movie(phenotypes, **kwargs): """ Makes an animation overlaying colored circles representing phenotypes over an imshow() plot indicating the resources present in each cell. By default, color is determined using the palettes in the EnvironmentFile object passed as the first parameter. The eas...
0.000452
def create_project(name, include_examples=True): ''' creates the initial project skeleton and files :param name: the project name :return: ''' # from the start directory, create a project directory with the project name path = "{}/{}".format(os.getcwd(), name) ...
0.002431
def or_(cls, *queries): """ 根据传入的 Query 对象,构造一个新的 OR 查询。 :param queries: 需要构造的子查询列表 :rtype: Query """ if len(queries) < 2: raise ValueError('or_ need two queries at least') if not all(x._query_class._class_name == queries[0]._query_class._class_name f...
0.005769
def operation_recorder(self): """ :class:`BaseOperationRecorder`: **Deprecated:** The operation recorder that was last added to the connection, or `None` if the connection does not currently have any recorders. *New in pywbem 0.9 as experimental. Deprecated since pywbem 0.12.* ...
0.001382
def bschoi(value, ndim, array, order): """ Do a binary search for a given value within an integer array, accompanied by an order vector. Return the index of the matching array entry, or -1 if the key value is not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bschoi_c.html :pa...
0.001229
def user_agent(): """ Return a string representing the user agent. """ data = { "installer": {"name": "pip", "version": pipenv.patched.notpip.__version__}, "python": platform.python_version(), "implementation": { "name": platform.python_implementation(), }, ...
0.000837
def check_output_data_type(self): """Check the output data types of the state Checks all output data ports if the handed data is not of the specified type and generate an error logger message with details of the found type conflict. """ for data_port in self.output_data_ports.va...
0.010173
def check_status(self, ignore=(), status=None): """ Checks status of each collection and shard to make sure that: a) Cluster state is active b) Number of docs matches across replicas for a given shard. Returns a dict of results for custom alerting. """ self.SH...
0.004071
def oauth_logout_handler(sender_app, user=None): """Remove all access tokens from session on logout.""" oauth = current_app.extensions['oauthlib.client'] for remote in oauth.remote_apps.values(): token_delete(remote) db.session.commit()
0.003846
def setname(self, dim_name): """Set the dimension name. Args:: dim_name dimension name; setting 2 dimensions to the same name make the dimensions "shared"; in order to be shared, the dimesions must be deined similarly. Returns:: ...
0.003663
def peer_store_and_set(relation_id=None, peer_relation_name='cluster', peer_store_fatal=False, relation_settings=None, delimiter='_', **kwargs): """Store passed-in arguments both in argument relation and in peer storage. It functions like doing relation_set() and p...
0.00071
def collection_names(self, include_system_collections=True): """Get a list of all the collection names in this database. :Parameters: - `include_system_collections` (optional): if ``False`` list will not include system collections (e.g ``system.indexes``) """ with ...
0.001619
def add_attachment(self, attachment): """Adds an attachment to the SlackMessage payload This public method adds a slack message to the attachment list. :param attachment: SlackAttachment object :return: None """ log = logging.getLogger(self.cls_logger + '.add_at...
0.003175
def trunk_vectors(nrn, neurite_type=NeuriteType.all): '''Calculates the vectors between all the trunks of the neuron and the soma center. ''' neurite_filter = is_type(neurite_type) nrns = neuron_population(nrn) return np.array([morphmath.vector(s.root_node.points[0], n.soma.center) ...
0.002463
def _init_map(self): """stub""" super(EdXDragAndDropQuestionFormRecord, self)._init_map() QuestionTextFormRecord._init_map(self) QuestionFilesFormRecord._init_map(self) self.my_osid_object_form._my_map['text']['text'] = ''
0.007634
def view_input(window): """Window. """ store = window.store def change_label(sender): """event func""" store.label.value = sender.value window += Input( label='Introducir: ', cursor=red('_'), left_l='< ', right_l=' >', on_enter=change_label,...
0.002433
def keys(self): "Returns a list of ConfigMap keys." return (list(self._pb.IntMap.keys()) + list(self._pb.StringMap.keys()) + list(self._pb.FloatMap.keys()) + list(self._pb.BoolMap.keys()))
0.013636
def batch_normalization(inp, axes=[1], decay_rate=0.9, eps=1e-5, batch_stat=True, output_stat=False, fix_parameters=False, param_init=None): """ Batch normalization layer. .. math:: \\begin{array}{lcl} \\mu &=& \\frac{1}{M} \\sum x_i\\\\ ...
0.002925
def filter_bboxes_by_visibility(original_shape, bboxes, transformed_shape, transformed_bboxes, threshold=0., min_area=0.): """Filter bounding boxes and return only those boxes whose visibility after transformation is above the threshold and minimal area of bounding box in pixels ...
0.004147
def task_done(self) -> None: """Indicate that a formerly enqueued task is complete. Used by queue consumers. For each `.get` used to fetch a task, a subsequent call to `.task_done` tells the queue that the processing on the task is complete. If a `.join` is blocking, it resumes...
0.002813
def nullable(self, ctype: ContentType) -> bool: """Override the superclass method.""" return (not self.check_when() or self.pattern.nullable(ctype))
0.012195
def release(self, connection: Connection): '''Put a connection back in the pool. Coroutine. ''' assert not self._closed key = connection.key host_pool = self._host_pools[key] _logger.debug('Check in %s', key) yield from host_pool.release(connection) ...
0.004902
def _stage(self, accepted, count=0): """This is a repeated state in the state removal algorithm""" new5 = self._combine_rest_push() new1 = self._combine_push_pop() new2 = self._combine_push_rest() new3 = self._combine_pop_rest() new4 = self._combine_rest_rest() ne...
0.00135
def help(cls, task=None): """Describe available tasks or one specific task""" if task is None: usage_list = [] for task in iter(cls._tasks): task_func = getattr(cls, task) usage_string = " %s %s" % (cls._prog, task_func.usage) desc...
0.003623
def mark_job_as_canceling(self, job_id): """ Mark the job as requested for canceling. Does not actually try to cancel a running job. :param job_id: the job to be marked as canceling. :return: the job object """ job, _ = self._update_job_state(job_id, State.CANCELING) ...
0.008929
def _merge_all_bridged_contigs(self, nucmer_hits, ref_contigs, qry_contigs, log_fh=None, log_outprefix=None): '''Input is dict of nucmer_hits. Makes any possible contig merges. Returns True iff any merges were made''' writing_log_file = None not in [log_fh, log_outprefix] if len(nucm...
0.005495
def reset_index(self): """ Resets the index of the Series to simple integer list and the index name to 'index'. :return: nothing """ self.index = list(range(self.__len__())) self.index_name = 'index'
0.012097
def Nu_vertical_plate_Churchill(Pr, Gr): r'''Calculates Nusselt number for natural convection around a vertical plate according to the Churchill-Chu [1]_ correlation, also presented in [2]_. Plate must be isothermal; an alternate expression exists for constant heat flux. .. math:: Nu_{L}=\l...
0.001188
def output(self): """ Returns the next available output token. :return: the next token, None if none available :rtype: Token """ if self._iterator is not None: try: inst = self._iterator.next() result = Token(inst) ...
0.003992
def specifiedColumns(self): """ Returns the list of columns that are specified based on the column view for this widget. :return [<orb.Column>, ..] """ columns = [] table = self.tableType() tree = self.treePopupWidget() schem...
0.007371
def path(self, which=None): """Extend ``nailgun.entity_mixins.Entity.path``. The format of the returned path depends on the value of ``which``: smart_class_parameters /api/environments/:environment_id/smart_class_parameters Otherwise, call ``super``. """ if...
0.003676
def getWorkingSeatedZeroPoseToRawTrackingPose(self): """Returns the preferred seated position from the working copy.""" fn = self.function_table.getWorkingSeatedZeroPoseToRawTrackingPose pmatSeatedZeroPoseToRawTrackingPose = HmdMatrix34_t() result = fn(byref(pmatSeatedZeroPoseToRawTrack...
0.005155
def snmp_server_group_read(self, **kwargs): """Auto Generated Code """ config = ET.Element("config") snmp_server = ET.SubElement(config, "snmp-server", xmlns="urn:brocade.com:mgmt:brocade-snmp") group = ET.SubElement(snmp_server, "group") group_name_key = ET.SubElement(gr...
0.004323
def _copy_chunk(src, dst, length): "Copy length bytes from file src to file dst." BUFSIZE = 128 * 1024 while length > 0: l = min(BUFSIZE, length) buf = src.read(l) assert len(buf) == l dst.write(buf) length -= l
0.007605
def validate_instance(instance, options=None): """Perform STIX JSON Schema validation against STIX input. Find the correct schema by looking at the 'type' property of the `instance` JSON object. Args: instance: A Python dictionary representing a STIX object with a 'type' property. ...
0.001925
def _str2datetime(self, datetimestr): """Parse datetime from string. If no template matches this string, raise Error. Please go https://github.com/MacHu-GWU/rolex-project/issues submit your datetime string. I 'll update templates asap. This method is faster than :meth:`dateutil....
0.002825
def get_relationships_for_source(self, source_id): """Gets a ``RelationshipList`` corresponding to the given peer ``Id``. arg: source_id (osid.id.Id): a peer ``Id`` return: (osid.relationship.RelationshipList) - the relationships raise: NullArgument - ``source_id`` is ``null`` ...
0.00266
def validate_ip(self): """ Check ip if that is needed. Raise web.HTTPUnauthorized for not allowed hosts. """ if self.request.app.get('_check_ip', False): ip_address, accept = self.check_ip() if not accept: raise web.HTTPUnauthorized()
0.009804
def update(self): "Updates cartesian coordinates for drawing tree graph" # get new shape and clear for attrs self.edges = np.zeros((self.ttree.nnodes - 1, 2), dtype=int) self.verts = np.zeros((self.ttree.nnodes, 2), dtype=float) self.lines = [] self.coords =...
0.004724
def infer(self, data, initial_proposal=None, full_output=False,**kwargs): """ Infer the model parameters, given the data. auto_convergence=True, walkers=100, burn=2000, sample=2000, minimum_sample=2000, convergence_check_frequency=1000, a=2.0, threads=1, """ # ...
0.004369