text
stringlengths
78
104k
score
float64
0
0.18
def main(): """ Example to show AIKIF logging of results. Generates a sequence of random grids and runs the Game of Life, saving results """ iterations = 9 # how many simulations to run years = 3 # how many times to run each simulation width = 22 # grid height ...
0.014144
def get_cacheable(cache_key, cache_ttl, calculate, recalculate=False): """ Gets the result of a method call, using the given key and TTL as a cache """ if not recalculate: cached = cache.get(cache_key) if cached is not None: return json.loads(cached) calculated = calcula...
0.002457
def generate_identity_binding_access_token( self, name, scope, jwt, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ Exchange a JWT signed by third party identity provider to ...
0.005701
def overlay_gateway_access_lists_ipv4_out_ipv4_acl_out_name(self, **kwargs): """Auto Generated Code """ config = ET.Element("config") overlay_gateway = ET.SubElement(config, "overlay-gateway", xmlns="urn:brocade.com:mgmt:brocade-tunnels") name_key = ET.SubElement(overlay_gateway,...
0.003963
def apply_t0(self, hits): """Apply only t0s""" if HAVE_NUMBA: apply_t0_nb( hits.time, hits.dom_id, hits.channel_id, self._lookup_tables ) else: n = len(hits) cal = np.empty(n) lookup = self._calib_by_dom_and_channel ...
0.003984
def load_mplstyle(): """Try to load conf.plot.mplstyle matplotlib style.""" plt = importlib.import_module('matplotlib.pyplot') if conf.plot.mplstyle: for style in conf.plot.mplstyle.split(): stfile = config.CONFIG_DIR / (style + '.mplstyle') if stfile.is_file(): ...
0.001645
def created(self): """Union[datetime.datetime, None]: Datetime at which the model was created (:data:`None` until set from the server). Read-only. """ value = self._proto.creation_time if value is not None and value != 0: # value will be in milliseconds. ...
0.004577
def set_collections_acl(self): """ Calculate and set ACL valid for requested collections. DENY_ALL is added to ACL to make sure no access rules are inherited. """ acl = [(Allow, 'g:admin', ALL_PERMISSIONS)] collections = self.get_collections() resources = self.ge...
0.003597
def get_lines_from_file(filename, lineno, context_lines, loader=None, module_name=None): """ Returns context_lines before and after lineno from file. Returns (pre_context_lineno, pre_context, context_line, post_context). """ source = None if loader is not None and hasattr(loader, "get_source"): ...
0.004286
def tokens(self, sentence_dom): ''' Tokenize all the words and preserve NER labels from ENAMEX tags ''' ## keep track of sentence position, which is reset for each ## sentence, and used above in _make_token self.sent_pos = 0 ## keep track of mention_id, so we...
0.006851
def _get_spec(self, spec_file): """Get json specification from package data.""" spec_file_path = os.path.join( pkg_resources. resource_filename( 'reana_commons', 'openapi_specifications'), spec_file) with open(spec_file_path) a...
0.005181
def build_tree(self, *args, **kwargs): """Dispatch a tree build call. Note that you need at least four taxa to express some evolutionary history on an unrooted tree.""" # Check length # assert len(self) > 3 # Default option # algorithm = kwargs.pop(kwargs, None) i...
0.014706
def _initURL(self, org_url, referer_url): """ sets proper URLs for AGOL """ if org_url is not None and org_url != '': if not org_url.startswith('http://') and not org_url.startswith('https://'): org_url = 'https://' + org_url self...
0.007947
def receivable_id(self, receivable_id): """ Sets the receivable_id of this AdditionalRecipientReceivableRefund. The ID of the receivable that the refund was applied to. :param receivable_id: The receivable_id of this AdditionalRecipientReceivableRefund. :type: str """ ...
0.007949
def __balance(self, account_id, **kwargs): """Call documentation: `/account/balance <https://www.wepay.com/developer/reference/account-2011-01-15#balance>`_, plus extra keyword parameters: :keyword str access_token: will be used instead of instance's ``access_token``,...
0.005252
def dump_OrderedDict(self, obj, class_name="collections.OrderedDict"): """ ``collections.OrderedDict`` dumper. """ return { "$" + class_name: [ (key, self._json_convert(value)) for key, value in iteritems(obj) ] }
0.010239
def quantile_for_single_value(self, **kwargs): """Returns quantile of each column or row. Returns: A new QueryCompiler object containing the quantile of each column or row. """ if self._is_transposed: kwargs["axis"] = kwargs.get("axis", 0) ^ 1 return ...
0.003282
def add_group_grant(self, permission, group_id): """ Convenience method that provides a quick way to add a canonical group grant to a key. This method retrieves the current ACL, creates a new grant based on the parameters passed in, adds that grant to the ACL and then PUT's the n...
0.00333
def get_expr(self, ctx): """ Returns the MUF needed to get the contents of the lvalue. Returned MUF will push the contained value onto the stack. """ varname = ctx.lookup_variable(self.varname) if varname is None: val = ctx.lookup_constant(self.varname) ...
0.001835
def send_at(self, value): """A unix timestamp specifying when your email should be delivered. :param value: A unix timestamp specifying when your email should be delivered. :type value: SendAt, int """ if isinstance(value, SendAt): if value.personaliz...
0.001978
def highlight_multi_regex(str_, pat_to_color, reflags=0): """ FIXME Use pygments instead. must be mututally exclusive """ #import colorama # from colorama import Fore, Style #color = Fore.MAGENTA # color = Fore.RED #match = re.search(pat, str_, flags=reflags) colored = str_ to_...
0.00495
def text_to_qcolor(text): """ Create a QColor from specified string Avoid warning from Qt when an invalid QColor is instantiated """ color = QColor() if not is_string(text): # testing for QString (PyQt API#1) text = str(text) if not is_text_string(text): return color if t...
0.004918
def rock(self): """Starts and does the parsing.""" if not self.argv: self.arg.view() while(self.argv): arg = self.argv.popleft() if arg == "-h" or arg == "--help": print( """Usage: td [-h (--help)] [-v (--version)] [command]...
0.000197
def _GetTfRecordEntries(self, path, max_entries, is_sequence, iterator_options): """Extracts TFRecord examples into a dictionary of feature values. Args: path: The path to the TFRecord file(s). max_entries: The maximum number of examples to load. is_sequence: True if...
0.003155
def reloader_thread(softexit=False): """If ``soft_exit`` is True, we use sys.exit(); otherwise ``os_exit`` will be used to end the process. """ while RUN_RELOADER: if code_changed(): # force reload if softexit: sys.exit(3) else: ...
0.002825
def export(self, top=True): """Exports object to its string representation. Args: top (bool): if True appends `internal_name` before values. All non list objects should be exported with value top=True, all list objects, that are embedded in as fields inlist ...
0.00224
def GetGroups(location=None,alias=None): """Return all of alias' groups in the given location. http://www.centurylinkcloud.com/api-docs/v2/#groups-get-group :param alias: short code for a particular account. If none will use account's default alias :param location: datacenter where group resides """ if a...
0.034125
def PrettyPrinter(obj): """Pretty printers for AppEngine objects.""" if ndb and isinstance(obj, ndb.Model): return six.iteritems(obj.to_dict()), 'ndb.Model(%s)' % type(obj).__name__ if messages and isinstance(obj, messages.Enum): return [('name', obj.name), ('number', obj.number)], type(obj).__name__ ...
0.01506
def get_tower_results(iterator, optimizer, dropout_rates): r''' With this preliminary step out of the way, we can for each GPU introduce a tower for which's batch we calculate and return the optimization gradients and the average loss across towers. ''' # To calculate the mean of the losses ...
0.003778
def method2jpg(output, mx, raw=False): """ Export method to a jpg file format :param output: output filename :type output: string :param mx: specify the MethodAnalysis object :type mx: :class:`MethodAnalysis` object :param raw: use directly a dot raw buffer (optional) :type raw: string ...
0.002315
def normrelpath(base, target): """ This function takes the base and target arguments as paths, and returns an equivalent relative path from base to the target, if both provided paths are absolute. """ if not all(map(isabs, [base, target])): return target return relpath(normpath(tar...
0.002857
def from_file(cls, file_path: Path, w3: Web3) -> "Package": """ Returns a ``Package`` instantiated by a manifest located at the provided Path. ``file_path`` arg must be a ``pathlib.Path`` instance. A valid ``Web3`` instance is required to instantiate a ``Package``. """ if...
0.004049
def rot_points(pnts, pb, alfa): """Rotate a list of points by an angle alfa (radians) around pivotal point pb. Intended for modifying the control points of trigonometric functions. """ points = [] # rotated points calfa = math.cos(alfa) salfa = math.sin(alfa) for p in pnts:...
0.005837
def open(self, baudrate=None, no_reader_thread=False): """ Opens the device. :param baudrate: baudrate to use :type baudrate: int :param no_reader_thread: whether or not to automatically open the reader thread. :type no_reader_thread: boo...
0.003754
def routing_area_2_json(self): """ transform ariane_clip3 routing area object to Ariane server JSON obj :return: Ariane JSON obj """ LOGGER.debug("RoutingArea.routing_area_2_json") json_obj = { 'routingAreaID': self.id, 'routingAreaName': self.name...
0.003221
def hash_data(data, hasher=NoParam, base=NoParam, types=False, hashlen=NoParam, convert=False): """ Get a unique hash depending on the state of the data. Args: data (object): Any sort of loosely organized data hasher (str or HASHER): Hash algorithm fro...
0.001339
def resetEditorValue(self, checked=False): """ Resets the editor to the default value. Also resets the children. """ # Block all signals to prevent duplicate inspector updates. # No need to restore, the editors will be deleted after the reset. for subEditor in self._subEditors: ...
0.003745
def apply(self, search, field, value): """Apply lookup expression to search query.""" # We assume that the field in question has a "raw" counterpart. return search.query('match', **{'{}.raw'.format(field): value})
0.008439
def chunk_X( self, select: Union[int, List[int], Tuple[int, ...], np.ndarray] = 1000, replace: bool = True, ): """Return a chunk of the data matrix :attr:`X` with random or specified indices. Parameters ---------- select If select is an integer, a...
0.00375
def load_py_instance(self, is_spout): """Loads user defined component (spout/bolt)""" try: if is_spout: spout_proto = self.pplan_helper.get_my_spout() py_classpath = spout_proto.comp.class_name self.logger.info("Loading Spout from: %s", py_classpath) else: bolt_proto ...
0.010917
def txn_useNonce(self, server_url, timestamp, salt): """Return whether this nonce is present, and if it is, then remove it from the set. str -> bool""" if abs(timestamp - time.time()) > nonce.SKEW: return False try: self.db_add_nonce(server_url, timestam...
0.003766
def save_issue_data_task(self, issue, task_id, namespace='open'): """Saves a issue data (tasks, etc.) to local data. Args: issue: `int`. Github issue number. task: `int`. Asana task ID. namespace: `str`. Namespace for s...
0.004983
def help_center_user_segment_delete(self, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/help_center/user_segments#delete-user-segment" api_path = "/api/v2/help_center/user_segments/{id}.json" api_path = api_path.format(id=id) return self.call(api_path, method="DELETE", **kw...
0.009231
def get_default_field_names(self, declared_fields, model_info): """ Return the default list of field names that will be used if the `Meta.fields` option is not specified. """ return ( [self.url_field_name] + list(declared_fields.keys()) + list(...
0.004866
def fork_detached_process (): """Fork this process, creating a subprocess detached from the current context. Returns a :class:`pwkit.Holder` instance with information about what happened. Its fields are: whoami A string, either "original" or "forked" depending on which process we are. pipe ...
0.007762
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'recognitions') and self.recognitions is not None: _dict['recognitions'] = [x._to_dict() for x in self.recognitions] return _dict
0.00722
def like_units(a, b): ''' like_units(a,b) yields True if a and b can be cast to each other in terms of units and False otherwise. Non-united units are considered dimensionless units. ''' a = quant(0.0, a) if is_unit(a) else a if is_quantity(a) else quant(a, units.dimensionless) b = quant(0.0, ...
0.011834
def bounding_box(self): """Bounding box (`~regions.BoundingBox`).""" xmin = self.center.x - self.radius xmax = self.center.x + self.radius ymin = self.center.y - self.radius ymax = self.center.y + self.radius return BoundingBox.from_float(xmin, xmax, ymin, ymax)
0.006431
def get_portchannel_info_by_intf_output_lacp_system_priority(self, **kwargs): """Auto Generated Code """ config = ET.Element("config") get_portchannel_info_by_intf = ET.Element("get_portchannel_info_by_intf") config = get_portchannel_info_by_intf output = ET.SubElement(ge...
0.004847
def setdict(self, D): """Set dictionary array.""" self.D = np.asarray(D, dtype=self.dtype) # Factorise dictionary for efficient solves self.lu, self.piv = sl.cho_factor(self.D, 1.0) self.lu = np.asarray(self.lu, dtype=self.dtype)
0.007407
def get_dimension_by_unit_measure_or_abbreviation(measure_or_unit_abbreviation,**kwargs): """ Return the physical dimension a given unit abbreviation of a measure, or the measure itself, refers to. The search key is the abbreviation or the full measure """ unit_abbreviation, factor = _parse...
0.013802
def is_block(bin_list): """Check if a bin list has exclusively consecutive bin ids. """ id_set = set((my_bin[1] for my_bin in bin_list)) start_id, end_id = min(id_set), max(id_set) return id_set == set(range(start_id, end_id + 1))
0.003984
def readTEXTRECORD(self, glyphBits, advanceBits, previousRecord=None, level=1): """ Read a SWFTextRecord """ if self.readUI8() == 0: return None else: self.seek(self.tell() - 1) return SWFTextRecord(self, glyphBits, advanceBits, previousRecord, level)
0.009646
def solve(self, linear_system, vector_factory=None, *args, **kwargs): '''Solve the given linear system with recycling. The provided `vector_factory` determines which vectors are used for deflation. :param linear_system: the :py:class:`~krypy.linsys.LinearSys...
0.001598
def replycomposite(self, rtypes, nodes): """ Construct a I{composite} reply. This method is called when it has been detected that the reply has multiple root nodes. @param rtypes: A list of known return I{types}. @type rtypes: [L{suds.xsd.sxbase.SchemaObject},...] @param...
0.001249
def get_storage_controller_by_name(self, name): """Returns a storage controller with the given name. in name of type str return storage_controller of type :class:`IStorageController` raises :class:`VBoxErrorObjectNotFound` A storage controller with given name doesn't exist...
0.005952
def response_cookies(self): """ This will return all cookies set :return: dict {name, value} """ try: ret = {} for cookie_base_uris in self.response.cookies._cookies.values(): for cookies in cookie_base_uris.values(): fo...
0.003082
def remove_subkey(self, subkey): """ Remove the given subkey, if existed, from this AdfKey. Parameters ---------- subkey : str or AdfKey The subkey to remove. """ if len(self.subkeys) > 0: key = subkey if isinstance(subkey, str) else subk...
0.004115
def human_to_bytes(size): ''' Given a human-readable byte string (e.g. 2G, 30M), return the number of bytes. Will return 0 if the argument has unexpected form. .. versionadded:: 2018.3.0 ''' sbytes = size[:-1] unit = size[-1] if sbytes.isdigit(): sbytes = int(sbytes) ...
0.00157
def get_threats_lists(self): """Retrieve all available threat lists""" response = self.service.threatLists().list().execute() self.set_wait_duration(response.get('minimumWaitDuration')) return response['threatLists']
0.008065
def unregister(self, fd): """ Unregister an USB-unrelated fd from poller. Convenience method. """ if fd in self.__fd_set: raise ValueError( 'This fd is a special USB event fd, it must stay registered.' ) self.__poller.unregister(fd)
0.00625
def getResponse(neighbors, weights=None): """ Calculated weighted response based on a list of nearest neighbors :param neighbors: a list of neighbors, each entry is a data instance :param weights: a numpy array of the same length as the neighbors :return: weightedAvg: weighted average response """ neighbo...
0.012739
def get_self(self): """GetSelf. Read identity of the home tenant request user. :rtype: :class:`<IdentitySelf> <azure.devops.v5_0.identity.models.IdentitySelf>` """ response = self._send(http_method='GET', location_id='4bb02b5b-c120-4be2-b68e-21f7c50a...
0.009302
def _get_rate(self, mag): """ Calculate and return the annual occurrence rate for a specific bin. :param mag: Magnitude value corresponding to the center of the bin of interest. :returns: Float number, the annual occurrence rate for the :param mag value. ...
0.002281
def start_all_linking(self, mode, group): """Put the IM into All-Linking mode. Puts the IM into All-Linking mode for 4 minutes. Parameters: mode: 0 | 1 | 3 | 255 0 - PLM is responder 1 - PLM is controller 3 - Device that initiat...
0.003846
def clear_cache_fields(self): '''Set cache fields to ``None``. Check :attr:`Field.as_cache` for information regarding fields which are considered cache.''' for field in self._meta.scalarfields: if field.as_cache: setattr(self, field.name, None)
0.006944
def speriodogram(x, NFFT=None, detrend=True, sampling=1., scale_by_freq=True, window='hamming', axis=0): """Simple periodogram, but matrices accepted. :param x: an array or matrix of data samples. :param NFFT: length of the data before FFT is computed (zero padding) :param bool detre...
0.008657
def day(self): '''set unit to day''' self.magnification = 86400 self._update(self.baseNumber, self.magnification) return self
0.012739
def get_pdb_sets(self): '''Return a record to be used for database storage. This only makes sense if self.id is set. See usage example above.''' assert(self.id != None) data = [] for pdb_set in self.pdb_sets: pdb_set_record = dict( PPComplexID = ...
0.027265
def consolidate(self, volume, source, dest, *args, **kwargs): """ Consolidate will move a volume of liquid from a list of sources to a single target location. See :any:`Transfer` for details and a full list of optional arguments. Returns ------- This instance of...
0.002066
def chat_meMessage(self, *, channel: str, text: str, **kwargs) -> SlackResponse: """Share a me message into a channel. Args: channel (str): The channel id. e.g. 'C1234567890' text (str): The message you'd like to share. e.g. 'Hello world' """ kwargs.update({"chan...
0.007335
def set(self, key, value, confidence=100): """ Defines the given value with the given confidence, unless the same value is already defined with a higher confidence level. """ if value is None: return if key in self.info: old_confidence, old_value =...
0.004425
def public_notes_500(self, key, value): """Populate the ``public_notes`` key.""" return [ { 'source': value.get('9'), 'value': public_note, } for public_note in force_list(value.get('a')) ]
0.004149
def liftover_cpra(self, chromosome, position, verbose=False): """ Given chromosome, position in 1-based co-ordinates, This will use pyliftover to liftover a CPRA, will return a (c,p) tuple or raise NonUniqueLiftover if no unique and strand maintaining liftover is possible :param ...
0.005774
def _createFromRDD(self, rdd, schema, samplingRatio): """ Create an RDD for DataFrame from an existing RDD, returns the RDD and schema. """ if schema is None or isinstance(schema, (list, tuple)): struct = self._inferSchema(rdd, samplingRatio, names=schema) convert...
0.004608
def dijkstra(G, start, weight='weight'): """ Compute shortest path length between satrt and all other reachable nodes for a weight graph. return -> ({vertex: weight form start, }, {vertex: predeseccor, }) """ if start not in G.vertices: raise GraphInsertError("Vertex %s doesn't ex...
0.000914
def API_GET(self, courseid, taskid=None): # pylint: disable=arguments-differ """ List tasks available to the connected client. Returns a dict in the form :: { "taskid1": { "name": "Name of the course", ...
0.005348
def append_formula(self, formula, no_return=True): """ This method can be used to add a given list of clauses into the solver. :param formula: a list of clauses. :param no_return: check solver's internal formula and return the result, if set to ``...
0.002092
def create_dir(directory): """Create given directory, if doesn't exist. Parameters ---------- directory : string Directory path (can be relative or absolute) Returns ------- string Absolute directory path """ if not os.access(directory, os.F_OK): os.makedirs...
0.00271
def to_gpx(self): """Converts track to a GPX format Uses GPXPY library as an intermediate format Returns: A string with the GPX/XML track """ gpx_segments = [] for segment in self.segments: gpx_points = [] for point in segment.points:...
0.003876
def lines(self): '''Display the system bonds as lines. ''' if "bonds" not in self.topology: return bond_start, bond_end = zip(*self.topology['bonds']) bond_start = np.array(bond_start) bond_end = np.array(bond_end) color_array = np.array([get_atom_c...
0.008244
def _find_class(self, class_name): "Resolve the class from the name." classes = {} classes.update(globals()) classes.update(self.INSTANCE_CLASSES) logger.debug(f'looking up class: {class_name}') cls = classes[class_name] logger.debug(f'found class: {cls}') ...
0.006042
def build_catalog(self, body): """ Create the I{catalog} of multiref nodes by id and the list of non-multiref nodes. @param body: A soap envelope body node. @type body: L{Element} """ for child in body.children: if self.soaproot(child): ...
0.004024
def hidelist(self, window_name, object_name): """ Hide combo box list / menu @param window_name: Window name to type in, either full name, LDTP's name convention, or a Unix glob. @type window_name: string @param object_name: Object name to type in, either full na...
0.006107
def switch(self): """Switch if time for eAgc has come""" t = self.system.dae.t for idx in range(0, self.n): if t >= self.tl[idx]: if self.en[idx] == 0: self.en[idx] = 1 logger.info( 'Extended ACE <{}> act...
0.005089
def evaluate(self, text): """ Given a string of `text`, compute confusion matrix for the classification task. """ cx = BinaryConfusion() for (L, P, R, gold, _) in Detector.candidates(text): guess = self.predict(L, P, R) cx.update(gold, guess) ...
0.003636
def _connect(self, context): """Initialize the database connection.""" if __debug__: log.info("Connecting " + self.engine.partition(':')[0] + " database layer.", extra=dict( uri = redact_uri(self.uri, self.protect), config = self.config, alias = self.alias, )) self.connection = context...
0.058201
def simpixel(new=0, autoraise=True): """Open an instance of simpixel in the browser""" simpixel_driver.open_browser(new=new, autoraise=autoraise)
0.012422
def get_parameter(self): """Obtain list parameter object from the current widget state. :returns: A DefaultValueParameter from the current state of widget :rtype: DefaultValueParameter """ radio_button_checked_id = self.input_button_group.checkedId() # No radio button ch...
0.002169
def resumeProducing(self): """ Starts or resumes the retrieval of messages from the server queue. This method starts receiving messages from the server, they will be passed to the consumer callback. .. note:: This is called automatically when :meth:`.consume` is called, ...
0.002671
def forms(self): """ :rtype: twilio.rest.authy.v1.form.FormList """ if self._forms is None: self._forms = FormList(self) return self._forms
0.010471
def get_all_hosted_zones(self, start_marker=None, zone_list=None): """ Returns a Python data structure with information about all Hosted Zones defined for the AWS account. :param int start_marker: start marker to pass when fetching additional results after a truncated list ...
0.002757
def _ParseTimezoneOption(self, options): """Parses the timezone options. Args: options (argparse.Namespace): command line arguments. Raises: BadConfigOption: if the options are invalid. """ time_zone_string = self.ParseStringOption(options, 'timezone') if isinstance(time_zone_strin...
0.007022
def logout(self, command='exit', note=None, echo=None, timeout=shutit_global.shutit_global_object.default_timeout, nonewline=False, loglevel=logging.DEBUG): """Logs the user out. Assumes that login has been called. If login has never been calle...
0.037418
def p_global_var(p): '''global_var : VARIABLE | DOLLAR variable | DOLLAR LBRACE expr RBRACE''' if len(p) == 2: p[0] = ast.Variable(p[1], lineno=p.lineno(1)) elif len(p) == 3: p[0] = ast.Variable(p[2], lineno=p.lineno(1)) else: p[0] = ast.Variab...
0.002874
def install_integration(self, id, **kwargs): # noqa: E501 """Installs a Wavefront integration # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.install_integrat...
0.002208
def check_data_types(self, ds): ''' Checks the data type of all netCDF variables to ensure they are valid data types under CF. CF §2.2 The netCDF data types char, byte, short, int, float or real, and double are all acceptable :param netCDF4.Dataset ds: An open netCDF da...
0.006042
def __validate_email(self, email): """Checks if a string looks like an email address""" e = re.match(self.EMAIL_ADDRESS_REGEX, email, re.UNICODE) if e: return email else: error = "Invalid email address: " + str(email) msg = self.GRIMOIRELAB_INVALID_FO...
0.005115
def read_data(self, blocksize=4096): """Generates byte strings reflecting the audio data in the file. """ frames = ctypes.c_uint(blocksize // self._client_fmt.mBytesPerFrame) buf = ctypes.create_string_buffer(blocksize) buflist = AudioBufferList() buflist.mNumberBuffers ...
0.001963
def pivot(self, attrlist): """Pivots the data using the given attributes, returning a L{PivotTable}. @param attrlist: list of attributes to be used to construct the pivot table @type attrlist: list of strings, or string of space-delimited attribute names """ if isinstance...
0.010292