text
stringlengths
78
104k
score
float64
0
0.18
def on_trial_result(self, trial_runner, trial, result): """Callback for early stopping. This stopping rule stops a running trial if the trial's best objective value by step `t` is strictly worse than the median of the running averages of all completed trials' objectives reported up to s...
0.001554
def bin2real(binary_string, conv, endianness="@"): """ Converts a binary string representing a number to its Fixed arithmetic representation @param binary_string: binary number in simulink representation @param conv: conv structure containing conversion specs @param endianness: optionally specify by...
0.007153
def log_message(self, format, *args): """Log an arbitrary message. This is used by all other logging functions. Override it if you have specific logging wishes. The first argument, FORMAT, is a format string for the message to be logged. If the format string contains ...
0.004087
def texture_from_image(renderer, image_name): """Create an SDL2 Texture from an image file""" soft_surface = ext.load_image(image_name) texture = SDL_CreateTextureFromSurface(renderer.renderer, soft_surface) SDL_FreeSurface(soft_surface) return texture
0.003676
def fetch(self, refspec=None, progress=None, **kwargs): """Fetch the latest changes for this remote :param refspec: A "refspec" is used by fetch and push to describe the mapping between remote ref and local ref. They are combined with a colon in the format <src>:<dst...
0.004876
def check_w_normalized(W, N_k, tolerance = 1.0e-4): """Check the weight matrix W is properly normalized. The sum over N should be 1, and the sum over k by N_k should aslo be 1 Parameters ---------- W : np.ndarray, shape=(N, K), dtype='float' The normalized weight matrix for snapshots and states...
0.005412
def update_flag_record(self, state: str, feature_key: str) -> None: """Update redis record with new state. :param state: state for feature flag. :param feature_key: key for feature flag. """ key_name = self._format_key_name() try: parsed_flag = json.loads(sel...
0.004202
def projection_pp(site, normal, dist_to_plane, reference): ''' This method finds the projection of the site onto the plane containing the slipped area, defined as the Pp(i.e. 'perpendicular projection of site location onto the fault plane' Spudich et al. (2013) - page 88) given a site. :param s...
0.000805
def euclidean3d(v1, v2): """Faster implementation of euclidean distance for the 3D case.""" if not len(v1) == 3 and len(v2) == 3: print("Vectors are not in 3D space. Returning None.") return None return np.sqrt((v1[0] - v2[0]) ** 2 + (v1[1] - v2[1]) ** 2 + (v1[2] - v2[2]) ** 2)
0.006536
def sort_by_successors(l, succsOf): """ Sorts a list, such that if l[b] in succsOf(l[a]) then a < b """ rlut = dict() nret = 0 todo = list() for i in l: rlut[i] = set() for i in l: for j in succsOf(i): rlut[j].add(i) for i in l: if len(rlut[i]) == 0: ...
0.003263
def readCol(self, col, startRow=0, endRow=-1): ''' read col ''' return self.__operation.readCol(col, startRow, endRow)
0.014706
def build_edit_form(title, id, cols, return_page): """ returns the html for a simple edit form """ txt = '<H3>' + title + '<H3>' txt += '<form action="' + return_page + '" method="POST">\n' # return_page = /agents txt += ' updating id:' + str(id) + '\n<BR>' txt += ' <input type="hidden" ...
0.008547
def set_circuit_breakers(mv_grid, mode='load', debug=False): """ Calculates the optimal position of a circuit breaker on all routes of mv_grid, adds and connects them to graph. Args ---- mv_grid: MVGridDing0 Description#TODO debug: bool, defaults to False If True, information is p...
0.0046
def cmd(self, fun, *args, **kwargs): ''' Call an execution module with the given arguments and keyword arguments .. code-block:: python caller.cmd('test.arg', 'Foo', 'Bar', baz='Baz') caller.cmd('event.send', 'myco/myevent/something', data={'foo': 'Foo'...
0.004344
def get_frames(root_path): """Get path to all the frame in view SAX and contain complete frames""" ret = [] for root, _, files in os.walk(root_path): root=root.replace('\\','/') files=[s for s in files if ".dcm" in s] if len(files) == 0 or not files[0].endswith(".dcm") or root.find("sax") ...
0.031532
def _shutdown(self): """Private method. Reset to non-piped spawn""" global sconf_global, _ac_config_hs if not self.active: raise SCons.Errors.UserError("Finish may be called only once!") if self.logstream is not None and not dryrun: self.logstream.write("\n") ...
0.006649
def get_field_descriptor(self, ref_or_index): """ Parameters ---------- ref_or_index: str or int field lowercase name, or field position Returns ------- Field descriptor (info contained in Idd) """ if isinstance(ref_or_index, int): ...
0.003906
def read_string(self, lpBaseAddress, nChars, fUnicode = False): """ Reads an ASCII or Unicode string from the address space of the process. @see: L{peek_string} @type lpBaseAddress: int @param lpBaseAddress: Memory address to begin reading. @type nChars: int ...
0.004036
def annotate_diamond(records, diamond_path): ''' Retrieve scientific names and lineages for taxon IDs in Diamond output Returns taxonomically annotated SeqRecords with modified description attributes ''' contigs_metadata = {} with open(diamond_path) as diamond_tax_fh: for line in diamond...
0.006356
def array2d(X, dtype=None, order=None, copy=False, force_all_finite=True): """Returns at least 2-d array with data from X""" X_2d = np.asarray(np.atleast_2d(X), dtype=dtype, order=order) if force_all_finite: _assert_all_finite(X_2d) if X is X_2d and copy: X_2d = _safe_copy(X_2d) retu...
0.003058
def ucast_ip_mask(ip_addr_and_mask, return_tuple=True): """ Function to check if a address is unicast and that the CIDR mask is good Args: ip_addr_and_mask: Unicast IP address and mask in the following format 192.168.1.1/24 return_tuple: Set to True it returns a IP and mask in a tuple, set t...
0.006102
def add_options(self): """ Add program options. """ super(RtorrentQueueManager, self).add_options() self.jobs = None self.httpd = None # basic options self.add_bool_option("-n", "--dry-run", help="advise jobs not to do any real work, just tell what wo...
0.009494
def chunks(dictionary, chunk_size): """ Yield successive n-sized chunks from dictionary. """ iterable = iter(dictionary) for __ in range(0, len(dictionary), chunk_size): yield {key: dictionary[key] for key in islice(iterable, chunk_size)}
0.003759
def pad(cls, data): """ Pads data to match AES block size """ if sys.version_info > (3, 0): try: data = data.encode("utf-8") except AttributeError: pass length = AES.block_size - (len(data) % AES.block_size) ...
0.005837
def region_est_hull(self, level=0.95, modelparam_slice=None): """ Estimates a credible region over models by taking the convex hull of a credible subset of particles. :param float level: The desired crediblity level (see :meth:`SMCUpdater.est_credible_region`). :para...
0.005691
def all(klass, client, **kwargs): """Returns a Cursor instance for a given resource.""" resource = klass.RESOURCE_COLLECTION request = Request(client, 'get', resource, params=kwargs) return Cursor(klass, request, init_with=[client])
0.007576
def pep517_subprocess_runner(cmd, cwd=None, extra_environ=None): # type: (List[AnyStr], Optional[AnyStr], Optional[Mapping[S, S]]) -> None """The default method of calling the wrapper subprocess.""" env = os.environ.copy() if extra_environ: env.update(extra_environ) run( cmd, ...
0.00207
def styleMapFamilyNameFallback(info): """ Fallback to *openTypeNamePreferredFamilyName* if *styleMapStyleName* or, if *styleMapStyleName* isn't defined, *openTypeNamePreferredSubfamilyName* is *regular*, *bold*, *italic* or *bold italic*, otherwise fallback to *openTypeNamePreferredFamilyName op...
0.003974
def sheetNames(book=None): """return sheet names of a book. Args: book (str, optional): If a book is given, pull names from that book. Otherwise, try the active one Returns: list of sheet names (typical case). None if book has no sheets. False if book doesn't ex...
0.004644
def support_event_list_simple(fn): """ enable __call__ to accept event_list. :param fn: :return: """ @wraps(fn) def _wrapped(self, event, *args, **kwargs): if _is_event_list(event): result = [] for e in event: ret = fn(self, e, *args, **kwargs)...
0.001294
def from_dict(name, values): ''' Convert a dictionary of configuration values into a sequence of BlockadeContainerConfig instances ''' # determine the number of instances of this container count = 1 count_value = values.get('count', 1) if isinstance(count...
0.001294
def __publish(self, port, db, queue, queue_length): """ :param port: Redis port :param db: Redis db index to report :param queue: Queue name to report :param queue_length: Queue length to report :return: """ metric_name_segaments = ['queue'] cluste...
0.003017
def create_entity(self, name, gl_structure, description=None): """ Create an entity and add it to the model. :param name: The entity name. :param gl_structure: The entity's general ledger structure. :param description: The entity description. :returns: The created entit...
0.004211
def clear(self) -> None: """ Clear all cache entries for directory and, if it is a 'pure' directory, remove the directory itself """ if self._cache_directory is not None: # Safety - if there isn't a cache directory file, this probably isn't a valid cache assert os...
0.007364
def itemlist(item, sep, suppress_trailing=True): """Create a list of items seperated by seps.""" return condense(item + ZeroOrMore(addspace(sep + item)) + Optional(sep.suppress() if suppress_trailing else sep))
0.009174
def get_job(self, cloud_service_id, job_collection_id, job_id): ''' The Get Job operation gets the details (including the current job status) of the specified job from the specified job collection. The return type is cloud_service_id: The cloud service id jo...
0.00346
def remove(self): """ Remove file from device. """ lib.gp_camera_file_delete(self._cam._cam, self.directory.path.encode(), self.name.encode(), self._cam._ctx)
0.009615
def visualize_dim_red(r, labels, filename=None, figsize=(18,10), title='', legend=True, label_map=None, label_scale=False, label_color_map=None, **scatter_options): """ Saves a scatter plot of a (2,n) matrix r, where each column is a cell. Args: r (array): (2,n) matrix labels (array): (n,) ...
0.009529
def to_dict(self): '''Save this data port connector into a dictionary.''' d = {'connectorId': self.connector_id, 'name': self.name, 'dataType': self.data_type, 'interfaceType': self.interface_type, 'dataflowType': self.data_flow_type, ...
0.00365
def quote(self, data): """Quote any parameters that contain spaces or special character. Returns: (string): String containing parameters wrapped in double quotes """ if self.lang == 'python': quote_char = "'" elif self.lang == 'java': quote_c...
0.004329
def series_table_row_offset(self, series): """ Return the number of rows preceding the data table for *series* in the Excel worksheet. """ title_and_spacer_rows = series.index * 2 data_point_rows = series.data_point_offset return title_and_spacer_rows + data_point...
0.006154
def class_dict_to_specs(mcs, class_dict): """Takes a class `__dict__` and returns `HeronComponentSpec` entries""" specs = {} for name, spec in class_dict.items(): if isinstance(spec, HeronComponentSpec): # Use the variable name as the specification name. if spec.name is None: ...
0.009901
def julian_day(year, month=1, day=1): """Given a proleptic Gregorian calendar date, return a Julian day int.""" janfeb = month < 3 return (day + 1461 * (year + 4800 - janfeb) // 4 + 367 * (month - 2 + janfeb * 12) // 12 - 3 * ((year + 4900 - janfeb) // 100) // 4 ...
0.003021
def _compute_validation_outputs(self, actions: List[List[ProductionRule]], best_final_states: Mapping[int, Sequence[GrammarBasedState]], world: List[WikiTablesWorld], example_l...
0.006812
def getFaxStatsCounters(self): """Query Asterisk Manager Interface for Fax Stats. CLI Command - fax show stats @return: Dictionary of fax stats. """ if not self.hasFax(): return None info_dict = {} cmdresp = self.executeComma...
0.015695
def init_app(self, app, **kwargs): """kwargs holds initial dynaconf configuration""" self.kwargs.update(kwargs) self.settings = self.dynaconf_instance or LazySettings(**self.kwargs) app.config = self.make_config(app) app.dynaconf = self.settings
0.007018
def add_error(self, error): """ In the case where a list/tuple is passed in this just extends the list rather than having nested lists. Otherwise, the value is appended. """ if is_non_string_iterable(error) and not isinstance(error, collections.Mapping): for ...
0.007177
def get_usedby_and_readonly(self, id): """ Gets the build plans details os teh selected plan script as per the selected attributes. Args: id: ID of the Plan Script. Returns: array of build plans """ uri = self.URI + "/" + id + "/usedby/readonly" ...
0.008427
def _current_size(self): """ Returns the current count of all documents, including the changes from the current changeMap. """ deletes, adds, _ = Watch._extract_changes(self.doc_map, self.change_map, None) return len(self.doc_map) + len(adds) - len(deletes)
0.009836
def images(self): ''' a method to list the local docker images :return: list of dictionaries with available image fields [ { 'CREATED': '7 days ago', 'TAG': 'latest', 'IMAGE ID': '2298fbaac143', 'VIRTUAL SIZE':...
0.005376
def dict_flat_generator(value, attname=None, splitter=JSPLITTER, dumps=None, prefix=None, error=ValueError, recursive=True): '''Convert a nested dictionary into a flat dictionary representation''' if not isinstance(value, dict) or not recursive: if not pre...
0.000989
def get_challenge_for_url(url): """ Gets the challenge for the cached URL. :param url: the URL the challenge is cached for. :rtype: HttpBearerChallenge """ if not url: raise ValueError('URL cannot be None') url = parse.urlparse(url) _lock.acquire() val = _cache.get(url.netloc) ...
0.002833
def run(line): """ Run a shell line: run('ls /tmp') will execv('/usr/bin/ls', ['ls', '/tmp']) """ arguments = shlex.split(line) path = lookup(arguments[0]) # Lookup the first arguments in PATH execute(path, arguments)
0.004132
def run_game_of_life(years, width, height, time_delay, silent="N"): """ run a single game of life for 'years' and log start and end living cells to aikif """ lfe = mod_grid.GameOfLife(width, height, ['.', 'x'], 1) set_random_starting_grid(lfe) lg.record_source(lfe, 'game_of_life_console.py'...
0.004255
def print_results(self): """Print results of the package command.""" # Updates if self.package_data.get('updates'): print('\n{}{}Updates:'.format(c.Style.BRIGHT, c.Fore.BLUE)) for p in self.package_data['updates']: print( '{!s:<20}{}{} ...
0.003136
def start(self): """ TODO: docstring """ logger.info("Starting interchange") # last = time.time() while True: # active_flag = False socks = dict(self.poller.poll(1)) if socks.get(self.task_incoming) == zmq.POLLIN: message = self.task_...
0.002088
def lookup_signame(num): """Find the corresponding signal name for 'num'. Return None if 'num' is invalid.""" signames = signal.__dict__ num = abs(num) for signame in list(signames.keys()): if signame.startswith('SIG') and signames[signame] == num: return signame pass ...
0.002584
async def open_websocket(url: str, headers: Optional[list] = None, subprotocols: Optional[list] = None): """ Opens a websocket. """ ws = await create_websocket( url, headers=headers, subprotocols=subprotocols) try: yield ws finall...
0.002882
def get_by(self, field, value): """ Gets all Users that match the filter. The search is case-insensitive. Args: field: Field name to filter. Accepted values: 'name', 'userName', 'role' value: Value to filter. Returns: list: A list of Users. ...
0.006964
async def get_pinstate_report(self, command): """ This method retrieves a Firmata pin_state report for a pin.. See: http://firmata.org/wiki/Protocol#Pin_State_Query :param command: {"method": "get_pin_state", "params": [PIN]} :returns: {"method": "get_pin_state_reply", "params"...
0.005848
def update_readme(self, template_readme: Template): """Generate the new README file locally.""" readme = os.path.join(self.cached_repo, "README.md") if os.path.exists(readme): os.remove(readme) links = {model_type: {} for model_type in self.models.keys()} for model_ty...
0.005502
def run(self, *args): """Autocomplete gender information.""" params = self.parser.parse_args(args) api_token = params.api_token genderize_all = params.genderize_all code = self.autogender(api_token=api_token, genderize_all=genderize_all) r...
0.006061
def process_text(self, array=True): """ Construct the text based on the entered content in the widget. """ if array: prefix = 'np.array([[' else: prefix = 'np.matrix([[' suffix = ']])' values = self._widget.text().strip() ...
0.001186
def process_phosphorylation_statements(self): """Looks for Phosphorylation events in the graph and extracts them into INDRA statements. In particular, looks for a Positive_regulation event node with a child Phosphorylation event node. If Positive_regulation has an outgoing Caus...
0.001009
def sort_timeseries(self, ascending=True): """Sorts the data points within the TimeSeries according to their occurrence inline. :param boolean ascending: Determines if the TimeSeries will be ordered ascending or descending. If this is set to descending once, the ordered parameter defined in...
0.005931
def get_log_stream(logger): """ Returns a stream to the root log file. If there is no logfile return the stderr log stream Returns: A stream to the root log file or stderr stream. """ file_stream = None log_stream = None for handler in logger.handlers: if isinstance(han...
0.001949
def purcell_bidirectional(target, r_toroid, num_points=1e2, surface_tension='pore.surface_tension', contact_angle='pore.contact_angle', throat_diameter='throat.diameter', pore_diameter='pore...
0.000367
def start(self): """Initiate the download.""" log.info("Sending tftp download request to %s" % self.host) log.info(" filename -> %s" % self.file_to_transfer) log.info(" options -> %s" % self.options) self.metrics.start_time = time.time() log.debug("Set metrics.star...
0.003241
def AddTableColumn(self, table, column): """Add column to table if it is not already there.""" if column not in self._table_columns[table]: self._table_columns[table].append(column)
0.010256
def get_windows_tz(iana_tz): """ Returns a valid windows TimeZone from a given pytz TimeZone (Iana/Olson Timezones) Note: Windows Timezones are SHIT!... no ... really THEY ARE HOLY FUCKING SHIT!. """ timezone = IANA_TO_WIN.get( iana_tz.zone if isinstance(iana_tz, tzinfo) else iana_tz) ...
0.002174
def _create_archive(self): '''This will create a tar.gz compressed archive of the scrubbed directory''' try: self.archive_path = os.path.join(self.report_dir, "%s.tar.gz" % self.session) self.logger.con_out('Creating SOSCleaner Archive - %s', self.archive_path) t = ta...
0.009426
def hpo_genes(context, hpo_term): """Export a list of genes based on hpo terms""" LOG.info("Running scout export hpo_genes") adapter = context.obj['adapter'] header = ["#Gene_id\tCount"] if not hpo_term: LOG.warning("Please use at least one hpo term") context.abort() for l...
0.004211
def validate_config(raise_=True): """ Verifies that all configuration values have a valid setting """ ELIBConfig.check() known_paths = set() duplicate_values = set() missing_values = set() for config_value in ConfigValue.config_values: if config_value.path not in known_paths: ...
0.001233
def merge_all(lst, strategy='smart', renderer='yaml', merge_lists=False): ''' .. versionadded:: 2019.2.0 Merge a list of objects into each other in order :type lst: Iterable :param lst: List of objects to be merged. :type strategy: String :param strategy: Merge strategy. See utils.dictupd...
0.001148
def get_my_learning_path_session(self, proxy): """Gets the ``OsidSession`` associated with the my learning path service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: a ``MyLearningPathSession`` :rtype: ``osid.learning.MyLearningPathSession`` :raise: `...
0.005629
def default_value(self): """ Generate a default value :return: the value """ if self.has_default: if hasattr(self.default, '__call__'): return self.default() else: return self.default else: raise Excepti...
0.005682
def write_basic_mesh(Verts, E2V=None, mesh_type='tri', pdata=None, pvdata=None, cdata=None, cvdata=None, fname='output.vtk'): """Write mesh file for basic types of elements. Parameters ---------- fname : {string} file to be written, e.g. 'mymesh.vtu' ...
0.00033
def find_tag(__matcher: str = 'v[0-9]*', *, strict: bool = True, git_dir: str = '.') -> str: """Find closest tag for a git repository. Note: This defaults to `Semantic Version`_ tag matching. Args: __matcher: Glob-style tag pattern to match strict: Allow commit-ish, if...
0.001167
def _getTarball(url, into_directory, cache_key, origin_info=None): '''unpack the specified tarball url into the specified directory''' try: access_common.unpackFromCache(cache_key, into_directory) except KeyError as e: tok = settings.getProperty('github', 'authtoken') headers = {} ...
0.015052
def parse_image_name(name): """ parse the image name into three element tuple, like below: (repository, name, version) :param name: `class`:`str`, name :return: (repository, name, version) """ name = name or "" if '/' in name: repository, other = name.split('/') els...
0.001923
def child_get_property(self, child, property_name, value=None): """child_get_property(child, property_name, value=None) :param child: a widget which is a child of `self` :type child: :obj:`Gtk.Widget` :param property_name: the name of the property to get ...
0.002947
def mail_sent_count(self, count): """ Test that `count` mails have been sent. Syntax: I have sent `count` emails Example: .. code-block:: gherkin Then I have sent 2 emails """ expected = int(count) actual = len(mail.outbox) assert expected == actual, \ "E...
0.002604
def cmd_crack_luhn(number): """Having known values for a Luhn validated number, obtain the possible unknown numbers. Numbers that use the Luhn algorithm for validation are Credit Cards, IMEI, National Provider Identifier in the United States, Canadian Social Insurance Numbers, Israel ID Numbers and Gre...
0.003766
def wait_for_ready(self, instance_id, limit=14400, delay=10, pending=False): """Determine if a Server is ready. A server is ready when no transactions are running on it. :param int instance_id: The instance ID with the pending transaction :param int limit: The maximum amount of seconds...
0.005004
async def build_payment_req(wallet_handle: int, submitter_did: str, inputs_json: str, outputs_json: str, extra: Optional[str]) -> (str, str): """ Builds Indy request for doing payment according to...
0.003648
def _run_active_state_machine(self): """Store running state machine and observe its status """ # Create new concurrency queue for root state to be able to synchronize with the execution self.__running_state_machine = self.state_machine_manager.get_active_state_machine() if not s...
0.007455
def int_to_hex(i): """Create a hex-representation of the given serial. >>> int_to_hex(12345678) 'BC:61:4E' """ s = hex(i)[2:].upper() if six.PY2 is True and isinstance(i, long): # pragma: only py2 # NOQA # Strip the "L" suffix, since hex(1L) -> 0x1L. # NOTE: Do not convert to ...
0.004843
def _validate_hue(df, hue): """ The top-level ``hue`` parameter present in most plot types accepts a variety of input types. This method condenses this variety into a single preferred format---an iterable---which is expected by all submethods working with the data downstream of it. Parameters -...
0.005076
def attach_video(self, video: String, caption: String = None, width: Integer = None, height: Integer = None, duration: Integer = None): """ Attach video :param video: :param caption: :param width: :param height: :param duration: :retu...
0.010989
def _delete(self, *args, **kwargs): """ A wrapper for deleting things :returns: The response of your delete :rtype: dict :raises: This will raise a :class:`NewRelicAPIServerException<newrelic_api.exceptions.NewRelicAPIServerException>` if there is an err...
0.004926
def drop(self): """ Drop the table and all tables that reference it, recursively. User is prompted for confirmation if config['safemode'] is set to True. """ if self.restriction: raise DataJointError('A relation with an applied restriction condition cannot be dropped....
0.00498
async def request(self, method, url, **kwargs): """Handles requests to the API""" rate_limiter = RateLimiter(max_calls=59, period=60, callback=limited) # handles ratelimits. max_calls is set to 59 because current implementation will retry in 60s after 60 calls is reached. DBL has a 1h block so o...
0.004547
def negociate_content(default='json-ld'): '''Perform a content negociation on the format given the Accept header''' mimetype = request.accept_mimetypes.best_match(ACCEPTED_MIME_TYPES.keys()) return ACCEPTED_MIME_TYPES.get(mimetype, default)
0.003968
def accept(self): """Handler for when OK is clicked.""" input_path = self.input_path.text() input_title = self.line_edit_title.text() input_source = self.line_edit_source.text() output_path = self.output_path.text() if not output_path.endswith('.tif'): # noins...
0.000634
def handle_msg(self, c, e): """Handles all messages. - If a exception is thrown, catch it and display a nice traceback instead of crashing. - Do the appropriate processing for each event type. """ try: self.handler.handle_msg(c, e) except Exception as ex: ...
0.007576
def stream_execute(self, code: str = '', *, mode: str = 'query', opts: dict = None) -> WebSocketResponse: ''' Executes a code snippet in the streaming mode. Since the returned websocket represents a run loop, there is no need to specify *run_...
0.003674
def _merge_sorted_items(self, index): """ load a partition from disk, then sort and group by key """ def load_partition(j): path = self._get_spill_dir(j) p = os.path.join(path, str(index)) with open(p, 'rb', 65536) as f: for v in self.serializer.load_s...
0.001959
def chromiumContext(self, url, extra_tid=None): ''' Return a active chromium context, useable for manual operations directly against chromium. The WebRequest user agent and other context is synchronized into the chromium instance at startup, and changes are flushed back to the webrequest instance from chro...
0.027682
def _pos(self, idx): """Convert an index into a pair (alpha, beta) that can be used to access the corresponding _lists[alpha][beta] position. Most queries require the index be built. Details of the index are described in self._build_index. Indexing requires traversing the tree ...
0.001372
def reference_to_greatcircle(reference_frame, greatcircle_frame): """Convert a reference coordinate to a great circle frame.""" # Define rotation matrices along the position angle vector, and # relative to the origin. pole = greatcircle_frame.pole.transform_to(coord.ICRS) ra0 = greatcircle_frame.ra...
0.002175