code
stringlengths
75
104k
code_sememe
stringlengths
47
309k
token_type
stringlengths
215
214k
code_dependency
stringlengths
75
155k
def render_path(self, template_path, *context, **kwargs): """ Render the template at the given path using the given context. Read the render() docstring for more information. """ loader = self._make_loader() template = loader.read(template_path) return self._re...
def function[render_path, parameter[self, template_path]]: constant[ Render the template at the given path using the given context. Read the render() docstring for more information. ] variable[loader] assign[=] call[name[self]._make_loader, parameter[]] variable[templat...
keyword[def] identifier[render_path] ( identifier[self] , identifier[template_path] ,* identifier[context] ,** identifier[kwargs] ): literal[string] identifier[loader] = identifier[self] . identifier[_make_loader] () identifier[template] = identifier[loader] . identifier[read] ( identifier...
def render_path(self, template_path, *context, **kwargs): """ Render the template at the given path using the given context. Read the render() docstring for more information. """ loader = self._make_loader() template = loader.read(template_path) return self._render_string(templ...
def fill(self, *args): '''Sets a fill color, applying it to new paths. :param args: color in supported format ''' if args is not None: self._canvas.fillcolor = self.color(*args) return self._canvas.fillcolor
def function[fill, parameter[self]]: constant[Sets a fill color, applying it to new paths. :param args: color in supported format ] if compare[name[args] is_not constant[None]] begin[:] name[self]._canvas.fillcolor assign[=] call[name[self].color, parameter[<ast.Starred ...
keyword[def] identifier[fill] ( identifier[self] ,* identifier[args] ): literal[string] keyword[if] identifier[args] keyword[is] keyword[not] keyword[None] : identifier[self] . identifier[_canvas] . identifier[fillcolor] = identifier[self] . identifier[color] (* identifier[args] ) ...
def fill(self, *args): """Sets a fill color, applying it to new paths. :param args: color in supported format """ if args is not None: self._canvas.fillcolor = self.color(*args) # depends on [control=['if'], data=['args']] return self._canvas.fillcolor
def parse_section_extras_require(self, section_options): """Parses `extras_require` configuration file section. :param dict section_options: """ parse_list = partial(self._parse_list, separator=';') self['extras_require'] = self._parse_section_to_dict( section_option...
def function[parse_section_extras_require, parameter[self, section_options]]: constant[Parses `extras_require` configuration file section. :param dict section_options: ] variable[parse_list] assign[=] call[name[partial], parameter[name[self]._parse_list]] call[name[self]][consta...
keyword[def] identifier[parse_section_extras_require] ( identifier[self] , identifier[section_options] ): literal[string] identifier[parse_list] = identifier[partial] ( identifier[self] . identifier[_parse_list] , identifier[separator] = literal[string] ) identifier[self] [ literal[string]...
def parse_section_extras_require(self, section_options): """Parses `extras_require` configuration file section. :param dict section_options: """ parse_list = partial(self._parse_list, separator=';') self['extras_require'] = self._parse_section_to_dict(section_options, parse_list)
def _ParseEventData(self, variable_length_section): """Parses the event data form a variable-length data section. Args: variable_length_section (job_variable_length_data_section): a Windows Scheduled Task job variable-length data section. Returns: WinJobEventData: event data of the j...
def function[_ParseEventData, parameter[self, variable_length_section]]: constant[Parses the event data form a variable-length data section. Args: variable_length_section (job_variable_length_data_section): a Windows Scheduled Task job variable-length data section. Returns: WinJo...
keyword[def] identifier[_ParseEventData] ( identifier[self] , identifier[variable_length_section] ): literal[string] identifier[event_data] = identifier[WinJobEventData] () identifier[event_data] . identifier[application] =( identifier[variable_length_section] . identifier[application_name] . ide...
def _ParseEventData(self, variable_length_section): """Parses the event data form a variable-length data section. Args: variable_length_section (job_variable_length_data_section): a Windows Scheduled Task job variable-length data section. Returns: WinJobEventData: event data of the j...
def b58encode_check(v): """Encode a string using Base58 with a 4 character checksum""" digest = sha256(sha256(v).digest()).digest() return b58encode(v + digest[:4])
def function[b58encode_check, parameter[v]]: constant[Encode a string using Base58 with a 4 character checksum] variable[digest] assign[=] call[call[name[sha256], parameter[call[call[name[sha256], parameter[name[v]]].digest, parameter[]]]].digest, parameter[]] return[call[name[b58encode], parameter[...
keyword[def] identifier[b58encode_check] ( identifier[v] ): literal[string] identifier[digest] = identifier[sha256] ( identifier[sha256] ( identifier[v] ). identifier[digest] ()). identifier[digest] () keyword[return] identifier[b58encode] ( identifier[v] + identifier[digest] [: literal[int] ])
def b58encode_check(v): """Encode a string using Base58 with a 4 character checksum""" digest = sha256(sha256(v).digest()).digest() return b58encode(v + digest[:4])
def select(self, column, agg=None, _as=None, distinct=False): """ What columnns to select in query. :column should be a column name or equation to produce column **not** aggregated :agg should be a valid aggregate method used to producte the figure :_as should be a string used to...
def function[select, parameter[self, column, agg, _as, distinct]]: constant[ What columnns to select in query. :column should be a column name or equation to produce column **not** aggregated :agg should be a valid aggregate method used to producte the figure :_as should be a str...
keyword[def] identifier[select] ( identifier[self] , identifier[column] , identifier[agg] = keyword[None] , identifier[_as] = keyword[None] , identifier[distinct] = keyword[False] ): literal[string] keyword[if] identifier[agg] keyword[and] keyword[not] identifier[_as] : keyword[rai...
def select(self, column, agg=None, _as=None, distinct=False): """ What columnns to select in query. :column should be a column name or equation to produce column **not** aggregated :agg should be a valid aggregate method used to producte the figure :_as should be a string used to rep...
def _get_block_matches(self, attributes_a, attributes_b, filter_set_a=None, filter_set_b=None, delta=(0, 0, 0), tiebreak_with_block_similarity=False): """ :param attributes_a: A dict of blocks to their attributes :param attributes_b: A dict of blocks to their att...
def function[_get_block_matches, parameter[self, attributes_a, attributes_b, filter_set_a, filter_set_b, delta, tiebreak_with_block_similarity]]: constant[ :param attributes_a: A dict of blocks to their attributes :param attributes_b: A dict of blocks to their attributes The follo...
keyword[def] identifier[_get_block_matches] ( identifier[self] , identifier[attributes_a] , identifier[attributes_b] , identifier[filter_set_a] = keyword[None] , identifier[filter_set_b] = keyword[None] , identifier[delta] =( literal[int] , literal[int] , literal[int] ), identifier[tiebreak_with_block_similarity] = ...
def _get_block_matches(self, attributes_a, attributes_b, filter_set_a=None, filter_set_b=None, delta=(0, 0, 0), tiebreak_with_block_similarity=False): """ :param attributes_a: A dict of blocks to their attributes :param attributes_b: A dict of blocks to their attributes The following ...
def _get_cygwin_path(self, windows_path): """ Convert windows path to cygpath """ conv_cmd = [os.path.join(self._cygwin_bin_location, "cygpath.exe"), "-u", windows_path] process = Popen(conv_cmd, stdout=PIPE, stderr=PIPE, shell=False) ...
def function[_get_cygwin_path, parameter[self, windows_path]]: constant[ Convert windows path to cygpath ] variable[conv_cmd] assign[=] list[[<ast.Call object at 0x7da18eb57a00>, <ast.Constant object at 0x7da18eb573d0>, <ast.Name object at 0x7da18eb54c10>]] variable[process] assi...
keyword[def] identifier[_get_cygwin_path] ( identifier[self] , identifier[windows_path] ): literal[string] identifier[conv_cmd] =[ identifier[os] . identifier[path] . identifier[join] ( identifier[self] . identifier[_cygwin_bin_location] , literal[string] ), literal[string] , identifier[wi...
def _get_cygwin_path(self, windows_path): """ Convert windows path to cygpath """ conv_cmd = [os.path.join(self._cygwin_bin_location, 'cygpath.exe'), '-u', windows_path] process = Popen(conv_cmd, stdout=PIPE, stderr=PIPE, shell=False) (out, err) = process.communicate() if err: ...
def remove_target(self, target_id): """remove a target, given the id""" updated_targets = [] for target in self.my_osid_object_form._my_map['targets']: if target['id'] != target_id: updated_targets.append(target) self.my_osid_object_form._my_map['targets'] = u...
def function[remove_target, parameter[self, target_id]]: constant[remove a target, given the id] variable[updated_targets] assign[=] list[[]] for taget[name[target]] in starred[call[name[self].my_osid_object_form._my_map][constant[targets]]] begin[:] if compare[call[name[target]]...
keyword[def] identifier[remove_target] ( identifier[self] , identifier[target_id] ): literal[string] identifier[updated_targets] =[] keyword[for] identifier[target] keyword[in] identifier[self] . identifier[my_osid_object_form] . identifier[_my_map] [ literal[string] ]: key...
def remove_target(self, target_id): """remove a target, given the id""" updated_targets = [] for target in self.my_osid_object_form._my_map['targets']: if target['id'] != target_id: updated_targets.append(target) # depends on [control=['if'], data=[]] # depends on [control=['for'], dat...
def write(self, output_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0): """ Write the data encoding the QueryResponsePayload object to a stream. Args: output_buffer (Stream): A data stream in which to encode object data, supporting a write method; usually a Bytearra...
def function[write, parameter[self, output_buffer, kmip_version]]: constant[ Write the data encoding the QueryResponsePayload object to a stream. Args: output_buffer (Stream): A data stream in which to encode object data, supporting a write method; usually a Bytearra...
keyword[def] identifier[write] ( identifier[self] , identifier[output_buffer] , identifier[kmip_version] = identifier[enums] . identifier[KMIPVersion] . identifier[KMIP_1_0] ): literal[string] identifier[local_buffer] = identifier[utils] . identifier[BytearrayStream] () keyword[if] ident...
def write(self, output_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0): """ Write the data encoding the QueryResponsePayload object to a stream. Args: output_buffer (Stream): A data stream in which to encode object data, supporting a write method; usually a BytearrayStr...
def from_array(array): """ Deserialize a new ShippingOption from a given dictionary. :return: new ShippingOption instance. :rtype: ShippingOption """ if array is None or not array: return None # end if assert_type_or_raise(array, dict, paramet...
def function[from_array, parameter[array]]: constant[ Deserialize a new ShippingOption from a given dictionary. :return: new ShippingOption instance. :rtype: ShippingOption ] if <ast.BoolOp object at 0x7da1b0430130> begin[:] return[constant[None]] call[na...
keyword[def] identifier[from_array] ( identifier[array] ): literal[string] keyword[if] identifier[array] keyword[is] keyword[None] keyword[or] keyword[not] identifier[array] : keyword[return] keyword[None] identifier[assert_type_or_raise] ( identifier[arra...
def from_array(array): """ Deserialize a new ShippingOption from a given dictionary. :return: new ShippingOption instance. :rtype: ShippingOption """ if array is None or not array: return None # depends on [control=['if'], data=[]] # end if assert_type_or_raise(...
def load_forcing_grid(path_runcontrol: str, grid: int)->pd.DataFrame: '''Load forcing data for a specific grid included in the index of `df_state_init </data-structure/supy-io.ipynb#df_state_init:-model-initial-states>`. Parameters ---------- path_runcontrol : str Path to SUEWS :ref:`RunControl...
def function[load_forcing_grid, parameter[path_runcontrol, grid]]: constant[Load forcing data for a specific grid included in the index of `df_state_init </data-structure/supy-io.ipynb#df_state_init:-model-initial-states>`. Parameters ---------- path_runcontrol : str Path to SUEWS :ref:`Run...
keyword[def] identifier[load_forcing_grid] ( identifier[path_runcontrol] : identifier[str] , identifier[grid] : identifier[int] )-> identifier[pd] . identifier[DataFrame] : literal[string] keyword[try] : identifier[path_runcontrol] = identifier[Path] ( identifier[path_runcontrol] ). identifier[ex...
def load_forcing_grid(path_runcontrol: str, grid: int) -> pd.DataFrame: """Load forcing data for a specific grid included in the index of `df_state_init </data-structure/supy-io.ipynb#df_state_init:-model-initial-states>`. Parameters ---------- path_runcontrol : str Path to SUEWS :ref:`RunContr...
def item_straat_adapter(obj, request): """ Adapter for rendering an object of :class:`crabpy.gateway.crab.Straat` to json. """ return { 'id': obj.id, 'label': obj.label, 'namen': obj.namen, 'status': { 'id': obj.status.id, 'naam': obj.status.na...
def function[item_straat_adapter, parameter[obj, request]]: constant[ Adapter for rendering an object of :class:`crabpy.gateway.crab.Straat` to json. ] return[dictionary[[<ast.Constant object at 0x7da204567e50>, <ast.Constant object at 0x7da2045647c0>, <ast.Constant object at 0x7da204567160>, <a...
keyword[def] identifier[item_straat_adapter] ( identifier[obj] , identifier[request] ): literal[string] keyword[return] { literal[string] : identifier[obj] . identifier[id] , literal[string] : identifier[obj] . identifier[label] , literal[string] : identifier[obj] . identifier[namen] , ...
def item_straat_adapter(obj, request): """ Adapter for rendering an object of :class:`crabpy.gateway.crab.Straat` to json. """ return {'id': obj.id, 'label': obj.label, 'namen': obj.namen, 'status': {'id': obj.status.id, 'naam': obj.status.naam, 'definitie': obj.status.definitie}, 'taal': {'id': obj...
def is_active(self): """The images plugin is active iff any run has at least one relevant tag.""" if self._db_connection_provider: # The plugin is active if one relevant tag can be found in the database. db = self._db_connection_provider() cursor = db.execute( ''' SELECT 1 ...
def function[is_active, parameter[self]]: constant[The images plugin is active iff any run has at least one relevant tag.] if name[self]._db_connection_provider begin[:] variable[db] assign[=] call[name[self]._db_connection_provider, parameter[]] variable[cursor] assign[=...
keyword[def] identifier[is_active] ( identifier[self] ): literal[string] keyword[if] identifier[self] . identifier[_db_connection_provider] : identifier[db] = identifier[self] . identifier[_db_connection_provider] () identifier[cursor] = identifier[db] . identifier[execute] ( lit...
def is_active(self): """The images plugin is active iff any run has at least one relevant tag.""" if self._db_connection_provider: # The plugin is active if one relevant tag can be found in the database. db = self._db_connection_provider() cursor = db.execute('\n SELECT 1\n ...
def setRulerType( self, rulerType ): """ Sets the ruler type for this ruler to the inputed type. :param rulerType | <XChartRuler.Type> """ self._rulerType = rulerType self.clear() # handle custom types if ( rulerType == XChartRule...
def function[setRulerType, parameter[self, rulerType]]: constant[ Sets the ruler type for this ruler to the inputed type. :param rulerType | <XChartRuler.Type> ] name[self]._rulerType assign[=] name[rulerType] call[name[self].clear, parameter[]] if c...
keyword[def] identifier[setRulerType] ( identifier[self] , identifier[rulerType] ): literal[string] identifier[self] . identifier[_rulerType] = identifier[rulerType] identifier[self] . identifier[clear] () keyword[if] ( identifier[rulerType] == identifier[XChartRuler...
def setRulerType(self, rulerType): """ Sets the ruler type for this ruler to the inputed type. :param rulerType | <XChartRuler.Type> """ self._rulerType = rulerType self.clear() # handle custom types if rulerType == XChartRuler.Type.Monthly: self.setNotches...
def runCPU(): """Poll CPU usage, make predictions, and plot the results. Runs forever.""" # Create the model for predicting CPU usage. model = ModelFactory.create(model_params.MODEL_PARAMS) model.enableInference({'predictedField': 'cpu'}) # The shifter will align prediction and actual values. shifter = Infe...
def function[runCPU, parameter[]]: constant[Poll CPU usage, make predictions, and plot the results. Runs forever.] variable[model] assign[=] call[name[ModelFactory].create, parameter[name[model_params].MODEL_PARAMS]] call[name[model].enableInference, parameter[dictionary[[<ast.Constant object at...
keyword[def] identifier[runCPU] (): literal[string] identifier[model] = identifier[ModelFactory] . identifier[create] ( identifier[model_params] . identifier[MODEL_PARAMS] ) identifier[model] . identifier[enableInference] ({ literal[string] : literal[string] }) identifier[shifter] = identifier[Infe...
def runCPU(): """Poll CPU usage, make predictions, and plot the results. Runs forever.""" # Create the model for predicting CPU usage. model = ModelFactory.create(model_params.MODEL_PARAMS) model.enableInference({'predictedField': 'cpu'}) # The shifter will align prediction and actual values. sh...
def show_busy(self): """Lock buttons and enable the busy cursor.""" self.progress_bar.show() self.parent.pbnNext.setEnabled(False) self.parent.pbnBack.setEnabled(False) self.parent.pbnCancel.setEnabled(False) self.parent.repaint() enable_busy_cursor() QgsA...
def function[show_busy, parameter[self]]: constant[Lock buttons and enable the busy cursor.] call[name[self].progress_bar.show, parameter[]] call[name[self].parent.pbnNext.setEnabled, parameter[constant[False]]] call[name[self].parent.pbnBack.setEnabled, parameter[constant[False]]] ...
keyword[def] identifier[show_busy] ( identifier[self] ): literal[string] identifier[self] . identifier[progress_bar] . identifier[show] () identifier[self] . identifier[parent] . identifier[pbnNext] . identifier[setEnabled] ( keyword[False] ) identifier[self] . identifier[parent] ...
def show_busy(self): """Lock buttons and enable the busy cursor.""" self.progress_bar.show() self.parent.pbnNext.setEnabled(False) self.parent.pbnBack.setEnabled(False) self.parent.pbnCancel.setEnabled(False) self.parent.repaint() enable_busy_cursor() QgsApplication.processEvents()
def _choose_what_to_display(self, force_refresh=False): """ Choose what combination to display on the bar. By default we try to display the active layout on the first run, else we display the last selected combination. """ for _ in range(len(self.available_combinations))...
def function[_choose_what_to_display, parameter[self, force_refresh]]: constant[ Choose what combination to display on the bar. By default we try to display the active layout on the first run, else we display the last selected combination. ] for taget[name[_]] in starred...
keyword[def] identifier[_choose_what_to_display] ( identifier[self] , identifier[force_refresh] = keyword[False] ): literal[string] keyword[for] identifier[_] keyword[in] identifier[range] ( identifier[len] ( identifier[self] . identifier[available_combinations] )): keyword[if] ( ...
def _choose_what_to_display(self, force_refresh=False): """ Choose what combination to display on the bar. By default we try to display the active layout on the first run, else we display the last selected combination. """ for _ in range(len(self.available_combinations)): ...
def decrement(self, delta=1): """Decrement counter value. Parameters ---------- value_change : int Amount by which to subtract from the counter """ check_call(_LIB.MXProfileAdjustCounter(self.handle, -int(delta)))
def function[decrement, parameter[self, delta]]: constant[Decrement counter value. Parameters ---------- value_change : int Amount by which to subtract from the counter ] call[name[check_call], parameter[call[name[_LIB].MXProfileAdjustCounter, parameter[name[...
keyword[def] identifier[decrement] ( identifier[self] , identifier[delta] = literal[int] ): literal[string] identifier[check_call] ( identifier[_LIB] . identifier[MXProfileAdjustCounter] ( identifier[self] . identifier[handle] ,- identifier[int] ( identifier[delta] )))
def decrement(self, delta=1): """Decrement counter value. Parameters ---------- value_change : int Amount by which to subtract from the counter """ check_call(_LIB.MXProfileAdjustCounter(self.handle, -int(delta)))
def get_block_entity_data(self, pos_or_x, y=None, z=None): """ Access block entity data. Returns: BlockEntityData subclass instance or None if no block entity data is stored for that location. """ if None not in (y, z): # x y z supplied pos_o...
def function[get_block_entity_data, parameter[self, pos_or_x, y, z]]: constant[ Access block entity data. Returns: BlockEntityData subclass instance or None if no block entity data is stored for that location. ] if compare[constant[None] <ast.NotIn object...
keyword[def] identifier[get_block_entity_data] ( identifier[self] , identifier[pos_or_x] , identifier[y] = keyword[None] , identifier[z] = keyword[None] ): literal[string] keyword[if] keyword[None] keyword[not] keyword[in] ( identifier[y] , identifier[z] ): identifier[pos_or_x] = id...
def get_block_entity_data(self, pos_or_x, y=None, z=None): """ Access block entity data. Returns: BlockEntityData subclass instance or None if no block entity data is stored for that location. """ if None not in (y, z): # x y z supplied pos_or_x = (pos_o...
def any_in_string(l, s): """ Check if any items in a list is in a string :params l: dict :params s: string :return bool: """ return any([i in l for i in l if i in s])
def function[any_in_string, parameter[l, s]]: constant[ Check if any items in a list is in a string :params l: dict :params s: string :return bool: ] return[call[name[any], parameter[<ast.ListComp object at 0x7da1b2407e50>]]]
keyword[def] identifier[any_in_string] ( identifier[l] , identifier[s] ): literal[string] keyword[return] identifier[any] ([ identifier[i] keyword[in] identifier[l] keyword[for] identifier[i] keyword[in] identifier[l] keyword[if] identifier[i] keyword[in] identifier[s] ])
def any_in_string(l, s): """ Check if any items in a list is in a string :params l: dict :params s: string :return bool: """ return any([i in l for i in l if i in s])
def top(self): """ Constructs the top line of the element""" ret = self.top_format % self.top_connect.center( self.width, self.top_pad) if self.right_fill: ret = ret.ljust(self.right_fill, self.top_pad) if self.left_fill: ret = ret.rjust(self.left_fill...
def function[top, parameter[self]]: constant[ Constructs the top line of the element] variable[ret] assign[=] binary_operation[name[self].top_format <ast.Mod object at 0x7da2590d6920> call[name[self].top_connect.center, parameter[name[self].width, name[self].top_pad]]] if name[self].right_fill b...
keyword[def] identifier[top] ( identifier[self] ): literal[string] identifier[ret] = identifier[self] . identifier[top_format] % identifier[self] . identifier[top_connect] . identifier[center] ( identifier[self] . identifier[width] , identifier[self] . identifier[top_pad] ) keywor...
def top(self): """ Constructs the top line of the element""" ret = self.top_format % self.top_connect.center(self.width, self.top_pad) if self.right_fill: ret = ret.ljust(self.right_fill, self.top_pad) # depends on [control=['if'], data=[]] if self.left_fill: ret = ret.rjust(self.left_f...
def _compute_output_layer_expected(self): """Compute output layers expected that the IF will produce. Be careful when you call this function. It's a private function, better to use the public function `output_layers_expected()`. :return: List of expected layer keys. :rtype: lis...
def function[_compute_output_layer_expected, parameter[self]]: constant[Compute output layers expected that the IF will produce. Be careful when you call this function. It's a private function, better to use the public function `output_layers_expected()`. :return: List of expected laye...
keyword[def] identifier[_compute_output_layer_expected] ( identifier[self] ): literal[string] identifier[expected] =[ identifier[layer_purpose_exposure_summary] [ literal[string] ], identifier[layer_purpose_aggregate_hazard_impacted] [ literal[string] ], identifi...
def _compute_output_layer_expected(self): """Compute output layers expected that the IF will produce. Be careful when you call this function. It's a private function, better to use the public function `output_layers_expected()`. :return: List of expected layer keys. :rtype: list ...
def _match_cubes(ccube_clean, ccube_dirty, bexpcube_clean, bexpcube_dirty, hpx_order): """ Match the HEALPIX scheme and order of all the input cubes return a dictionary of cubes with the same HEALPIX scheme and order """ if hpx_order == ccube_cl...
def function[_match_cubes, parameter[ccube_clean, ccube_dirty, bexpcube_clean, bexpcube_dirty, hpx_order]]: constant[ Match the HEALPIX scheme and order of all the input cubes return a dictionary of cubes with the same HEALPIX scheme and order ] if compare[name[hpx_order] equal[==] name...
keyword[def] identifier[_match_cubes] ( identifier[ccube_clean] , identifier[ccube_dirty] , identifier[bexpcube_clean] , identifier[bexpcube_dirty] , identifier[hpx_order] ): literal[string] keyword[if] identifier[hpx_order] == identifier[ccube_clean] . identifier[hpx] . identifier[order] : ...
def _match_cubes(ccube_clean, ccube_dirty, bexpcube_clean, bexpcube_dirty, hpx_order): """ Match the HEALPIX scheme and order of all the input cubes return a dictionary of cubes with the same HEALPIX scheme and order """ if hpx_order == ccube_clean.hpx.order: ccube_clean_at_order = ccub...
def sample_batch(self, nlive_new=500, update_interval=None, logl_bounds=None, maxiter=None, maxcall=None, save_bounds=True): """ Generate an additional series of nested samples that will be combined with the previous set of dead points. Works by hacking ...
def function[sample_batch, parameter[self, nlive_new, update_interval, logl_bounds, maxiter, maxcall, save_bounds]]: constant[ Generate an additional series of nested samples that will be combined with the previous set of dead points. Works by hacking the internal `sampler` object. ...
keyword[def] identifier[sample_batch] ( identifier[self] , identifier[nlive_new] = literal[int] , identifier[update_interval] = keyword[None] , identifier[logl_bounds] = keyword[None] , identifier[maxiter] = keyword[None] , identifier[maxcall] = keyword[None] , identifier[save_bounds] = keyword[True] ): li...
def sample_batch(self, nlive_new=500, update_interval=None, logl_bounds=None, maxiter=None, maxcall=None, save_bounds=True): """ Generate an additional series of nested samples that will be combined with the previous set of dead points. Works by hacking the internal `sampler` object. ...
def __wrap(self, func): '''This decorator overrides the default arguments of a function. For each keyword argument in the function, the decorator first checks if the argument has been overridden by the caller, and uses that value instead if so. If not, the decorator consults the Preset...
def function[__wrap, parameter[self, func]]: constant[This decorator overrides the default arguments of a function. For each keyword argument in the function, the decorator first checks if the argument has been overridden by the caller, and uses that value instead if so. If not, the de...
keyword[def] identifier[__wrap] ( identifier[self] , identifier[func] ): literal[string] keyword[def] identifier[deffunc] (* identifier[args] ,** identifier[kwargs] ): literal[string] keyword[if] identifier[hasattr] ( identifier[inspect] , literal[string] ...
def __wrap(self, func): """This decorator overrides the default arguments of a function. For each keyword argument in the function, the decorator first checks if the argument has been overridden by the caller, and uses that value instead if so. If not, the decorator consults the Preset obj...
def _parse_spectra_annotation(self, line): """Parse and store the spectral annotation details """ if re.match('^PK\$NUM_PEAK(.*)', line, re.IGNORECASE): self.start_spectra_annotation = False return saplist = line.split() sarow = ( self.curren...
def function[_parse_spectra_annotation, parameter[self, line]]: constant[Parse and store the spectral annotation details ] if call[name[re].match, parameter[constant[^PK\$NUM_PEAK(.*)], name[line], name[re].IGNORECASE]] begin[:] name[self].start_spectra_annotation assign[=] const...
keyword[def] identifier[_parse_spectra_annotation] ( identifier[self] , identifier[line] ): literal[string] keyword[if] identifier[re] . identifier[match] ( literal[string] , identifier[line] , identifier[re] . identifier[IGNORECASE] ): identifier[self] . identifier[start_spectra_anno...
def _parse_spectra_annotation(self, line): """Parse and store the spectral annotation details """ if re.match('^PK\\$NUM_PEAK(.*)', line, re.IGNORECASE): self.start_spectra_annotation = False return # depends on [control=['if'], data=[]] saplist = line.split() sarow = (self.curr...
def default_rdo_tr(mod): """ Default translation function for Fedora/RDO based systems """ pkg = mod.rsplit('-python')[0] pkg = pkg.replace('_', '-').replace('.', '-').lower() if not pkg.startswith('python-'): pkg = 'python-' + pkg py2pkg = pkg py3pkg = re.sub('python', 'python3'...
def function[default_rdo_tr, parameter[mod]]: constant[ Default translation function for Fedora/RDO based systems ] variable[pkg] assign[=] call[call[name[mod].rsplit, parameter[constant[-python]]]][constant[0]] variable[pkg] assign[=] call[call[call[name[pkg].replace, parameter[constant...
keyword[def] identifier[default_rdo_tr] ( identifier[mod] ): literal[string] identifier[pkg] = identifier[mod] . identifier[rsplit] ( literal[string] )[ literal[int] ] identifier[pkg] = identifier[pkg] . identifier[replace] ( literal[string] , literal[string] ). identifier[replace] ( literal[string] ,...
def default_rdo_tr(mod): """ Default translation function for Fedora/RDO based systems """ pkg = mod.rsplit('-python')[0] pkg = pkg.replace('_', '-').replace('.', '-').lower() if not pkg.startswith('python-'): pkg = 'python-' + pkg # depends on [control=['if'], data=[]] py2pkg = pkg...
def read_user_dict(var_name, default_value): """Prompt the user to provide a dictionary of data. :param str var_name: Variable as specified in the context :param default_value: Value that will be returned if no input is provided :return: A Python dictionary to use in the context. """ # Please s...
def function[read_user_dict, parameter[var_name, default_value]]: constant[Prompt the user to provide a dictionary of data. :param str var_name: Variable as specified in the context :param default_value: Value that will be returned if no input is provided :return: A Python dictionary to use in the ...
keyword[def] identifier[read_user_dict] ( identifier[var_name] , identifier[default_value] ): literal[string] keyword[if] keyword[not] identifier[isinstance] ( identifier[default_value] , identifier[dict] ): keyword[raise] identifier[TypeError] identifier[default_display] = literal[...
def read_user_dict(var_name, default_value): """Prompt the user to provide a dictionary of data. :param str var_name: Variable as specified in the context :param default_value: Value that will be returned if no input is provided :return: A Python dictionary to use in the context. """ # Please s...
def _parse_tree(self, node): """ Parse a <checksum> object """ if 'filename' in node.attrib: self.filename = node.attrib['filename'] if 'type' in node.attrib: self.kind = node.attrib['type'] if 'target' in node.attrib: self.target = node.attrib['target...
def function[_parse_tree, parameter[self, node]]: constant[ Parse a <checksum> object ] if compare[constant[filename] in name[node].attrib] begin[:] name[self].filename assign[=] call[name[node].attrib][constant[filename]] if compare[constant[type] in name[node].attrib] begin[:] ...
keyword[def] identifier[_parse_tree] ( identifier[self] , identifier[node] ): literal[string] keyword[if] literal[string] keyword[in] identifier[node] . identifier[attrib] : identifier[self] . identifier[filename] = identifier[node] . identifier[attrib] [ literal[string] ] ...
def _parse_tree(self, node): """ Parse a <checksum> object """ if 'filename' in node.attrib: self.filename = node.attrib['filename'] # depends on [control=['if'], data=[]] if 'type' in node.attrib: self.kind = node.attrib['type'] # depends on [control=['if'], data=[]] if 'target' in no...
def check_window(self, name="default", level=0, baseline=False): """ *** Automated Visual Testing with SeleniumBase *** The first time a test calls self.check_window() for a unique "name" parameter provided, it will set a visual baseline, meaning that it creates a folder, ...
def function[check_window, parameter[self, name, level, baseline]]: constant[ *** Automated Visual Testing with SeleniumBase *** The first time a test calls self.check_window() for a unique "name" parameter provided, it will set a visual baseline, meaning that it creates a...
keyword[def] identifier[check_window] ( identifier[self] , identifier[name] = literal[string] , identifier[level] = literal[int] , identifier[baseline] = keyword[False] ): literal[string] keyword[if] identifier[level] == literal[string] : identifier[level] = literal[int] key...
def check_window(self, name='default', level=0, baseline=False): """ *** Automated Visual Testing with SeleniumBase *** The first time a test calls self.check_window() for a unique "name" parameter provided, it will set a visual baseline, meaning that it creates a folder, save...
def set_default_tlw(self, tlw, designer, inspector): "track default top level window for toolbox menu default action" self.designer = designer self.inspector = inspector
def function[set_default_tlw, parameter[self, tlw, designer, inspector]]: constant[track default top level window for toolbox menu default action] name[self].designer assign[=] name[designer] name[self].inspector assign[=] name[inspector]
keyword[def] identifier[set_default_tlw] ( identifier[self] , identifier[tlw] , identifier[designer] , identifier[inspector] ): literal[string] identifier[self] . identifier[designer] = identifier[designer] identifier[self] . identifier[inspector] = identifier[inspector]
def set_default_tlw(self, tlw, designer, inspector): """track default top level window for toolbox menu default action""" self.designer = designer self.inspector = inspector
def fuse(args): """ %prog fuse *.bed *.anchors Fuse gene orders based on anchors file. """ from jcvi.algorithms.graph import BiGraph p = OptionParser(fuse.__doc__) opts, args = p.parse_args(args) if len(args) < 1: sys.exit(not p.print_help()) bedfiles = [x for x in args i...
def function[fuse, parameter[args]]: constant[ %prog fuse *.bed *.anchors Fuse gene orders based on anchors file. ] from relative_module[jcvi.algorithms.graph] import module[BiGraph] variable[p] assign[=] call[name[OptionParser], parameter[name[fuse].__doc__]] <ast.Tuple object ...
keyword[def] identifier[fuse] ( identifier[args] ): literal[string] keyword[from] identifier[jcvi] . identifier[algorithms] . identifier[graph] keyword[import] identifier[BiGraph] identifier[p] = identifier[OptionParser] ( identifier[fuse] . identifier[__doc__] ) identifier[opts] , identifie...
def fuse(args): """ %prog fuse *.bed *.anchors Fuse gene orders based on anchors file. """ from jcvi.algorithms.graph import BiGraph p = OptionParser(fuse.__doc__) (opts, args) = p.parse_args(args) if len(args) < 1: sys.exit(not p.print_help()) # depends on [control=['if'], dat...
def _download(self, dstFile): """ Download this resource from its URL to the given file object. :type dstFile: io.BytesIO|io.FileIO """ for attempt in retry(predicate=lambda e: isinstance(e, HTTPError) and e.code == 400): with attempt: with closing(ur...
def function[_download, parameter[self, dstFile]]: constant[ Download this resource from its URL to the given file object. :type dstFile: io.BytesIO|io.FileIO ] for taget[name[attempt]] in starred[call[name[retry], parameter[]]] begin[:] with name[attempt] begin[...
keyword[def] identifier[_download] ( identifier[self] , identifier[dstFile] ): literal[string] keyword[for] identifier[attempt] keyword[in] identifier[retry] ( identifier[predicate] = keyword[lambda] identifier[e] : identifier[isinstance] ( identifier[e] , identifier[HTTPError] ) keyword[and] ...
def _download(self, dstFile): """ Download this resource from its URL to the given file object. :type dstFile: io.BytesIO|io.FileIO """ for attempt in retry(predicate=lambda e: isinstance(e, HTTPError) and e.code == 400): with attempt: with closing(urlopen(self.url))...
def weather_at_ids(self, ids_list): """ Queries the OWM Weather API for the currently observed weathers at the specified city IDs (eg: [5128581,87182]) :param ids_list: the list of city IDs :type ids_list: list of int :returns: a list of *Observation* instances or an emp...
def function[weather_at_ids, parameter[self, ids_list]]: constant[ Queries the OWM Weather API for the currently observed weathers at the specified city IDs (eg: [5128581,87182]) :param ids_list: the list of city IDs :type ids_list: list of int :returns: a list of *Obser...
keyword[def] identifier[weather_at_ids] ( identifier[self] , identifier[ids_list] ): literal[string] keyword[assert] identifier[type] ( identifier[ids_list] ) keyword[is] identifier[list] , literal[string] keyword[for] identifier[id] keyword[in] identifier[ids_list] : ke...
def weather_at_ids(self, ids_list): """ Queries the OWM Weather API for the currently observed weathers at the specified city IDs (eg: [5128581,87182]) :param ids_list: the list of city IDs :type ids_list: list of int :returns: a list of *Observation* instances or an empty l...
def get_input_dialog(dialog): """Similar to :meth:`get_input_peer`, but for dialogs""" try: if dialog.SUBCLASS_OF_ID == 0xa21c9795: # crc32(b'InputDialogPeer') return dialog if dialog.SUBCLASS_OF_ID == 0xc91c90b6: # crc32(b'InputPeer') return types.InputDialogPeer(dialo...
def function[get_input_dialog, parameter[dialog]]: constant[Similar to :meth:`get_input_peer`, but for dialogs] <ast.Try object at 0x7da1b1f49ab0> <ast.Try object at 0x7da1b26aea10> call[name[_raise_cast_fail], parameter[name[dialog], constant[InputDialogPeer]]]
keyword[def] identifier[get_input_dialog] ( identifier[dialog] ): literal[string] keyword[try] : keyword[if] identifier[dialog] . identifier[SUBCLASS_OF_ID] == literal[int] : keyword[return] identifier[dialog] keyword[if] identifier[dialog] . identifier[SUBCLASS_OF_ID] ==...
def get_input_dialog(dialog): """Similar to :meth:`get_input_peer`, but for dialogs""" try: if dialog.SUBCLASS_OF_ID == 2719782805: # crc32(b'InputDialogPeer') return dialog # depends on [control=['if'], data=[]] if dialog.SUBCLASS_OF_ID == 3374092470: # crc32(b'InputPeer') ...
def get_usb_controller_count_by_type(self, type_p): """Returns the number of USB controllers of the given type attached to the VM. in type_p of type :class:`USBControllerType` return controllers of type int """ if not isinstance(type_p, USBControllerType): raise Ty...
def function[get_usb_controller_count_by_type, parameter[self, type_p]]: constant[Returns the number of USB controllers of the given type attached to the VM. in type_p of type :class:`USBControllerType` return controllers of type int ] if <ast.UnaryOp object at 0x7da20c7cae00>...
keyword[def] identifier[get_usb_controller_count_by_type] ( identifier[self] , identifier[type_p] ): literal[string] keyword[if] keyword[not] identifier[isinstance] ( identifier[type_p] , identifier[USBControllerType] ): keyword[raise] identifier[TypeError] ( literal[string] ) ...
def get_usb_controller_count_by_type(self, type_p): """Returns the number of USB controllers of the given type attached to the VM. in type_p of type :class:`USBControllerType` return controllers of type int """ if not isinstance(type_p, USBControllerType): raise TypeError('typ...
def ConvertMessage(self, value, message): """Convert a JSON object into a message. Args: value: A JSON object. message: A WKT or regular protocol message to record the data. Raises: ParseError: In case of convert problems. """ message_descriptor = message.DESCRIPTOR full_name...
def function[ConvertMessage, parameter[self, value, message]]: constant[Convert a JSON object into a message. Args: value: A JSON object. message: A WKT or regular protocol message to record the data. Raises: ParseError: In case of convert problems. ] variable[message_des...
keyword[def] identifier[ConvertMessage] ( identifier[self] , identifier[value] , identifier[message] ): literal[string] identifier[message_descriptor] = identifier[message] . identifier[DESCRIPTOR] identifier[full_name] = identifier[message_descriptor] . identifier[full_name] keyword[if] ident...
def ConvertMessage(self, value, message): """Convert a JSON object into a message. Args: value: A JSON object. message: A WKT or regular protocol message to record the data. Raises: ParseError: In case of convert problems. """ message_descriptor = message.DESCRIPTOR full_name...
def get_calls(self, job_name): ''' Reads file by given name and returns CallEdge array ''' config = self.file_index.get_by_name(job_name).yaml calls = self.get_calls_from_dict(config, from_name=job_name) return calls
def function[get_calls, parameter[self, job_name]]: constant[ Reads file by given name and returns CallEdge array ] variable[config] assign[=] call[name[self].file_index.get_by_name, parameter[name[job_name]]].yaml variable[calls] assign[=] call[name[self].get_calls_from_dict, pa...
keyword[def] identifier[get_calls] ( identifier[self] , identifier[job_name] ): literal[string] identifier[config] = identifier[self] . identifier[file_index] . identifier[get_by_name] ( identifier[job_name] ). identifier[yaml] identifier[calls] = identifier[self] . identifier[get_calls...
def get_calls(self, job_name): """ Reads file by given name and returns CallEdge array """ config = self.file_index.get_by_name(job_name).yaml calls = self.get_calls_from_dict(config, from_name=job_name) return calls
def thumbnail_url(source, alias): """ Return the thumbnail url for a source file using an aliased set of thumbnail options. If no matching alias is found, returns an empty string. Example usage:: <img src="{{ person.photo|thumbnail_url:'small' }}" alt=""> """ try: thumb = ...
def function[thumbnail_url, parameter[source, alias]]: constant[ Return the thumbnail url for a source file using an aliased set of thumbnail options. If no matching alias is found, returns an empty string. Example usage:: <img src="{{ person.photo|thumbnail_url:'small' }}" alt=""> ...
keyword[def] identifier[thumbnail_url] ( identifier[source] , identifier[alias] ): literal[string] keyword[try] : identifier[thumb] = identifier[get_thumbnailer] ( identifier[source] )[ identifier[alias] ] keyword[except] identifier[Exception] : keyword[return] literal[string] ...
def thumbnail_url(source, alias): """ Return the thumbnail url for a source file using an aliased set of thumbnail options. If no matching alias is found, returns an empty string. Example usage:: <img src="{{ person.photo|thumbnail_url:'small' }}" alt=""> """ try: thumb = ...
def send(self, message, params=None): """Send service method request :param message: proto message instance (use :meth:`SteamUnifiedMessages.get`) or method name (e.g. ``Player.GetGameBadgeLevels#1``) :type message: :class:`str`, proto message instance :param par...
def function[send, parameter[self, message, params]]: constant[Send service method request :param message: proto message instance (use :meth:`SteamUnifiedMessages.get`) or method name (e.g. ``Player.GetGameBadgeLevels#1``) :type message: :class:`str`, proto message insta...
keyword[def] identifier[send] ( identifier[self] , identifier[message] , identifier[params] = keyword[None] ): literal[string] keyword[if] identifier[isinstance] ( identifier[message] , identifier[str] ): identifier[message] = identifier[self] . identifier[get] ( identifier[message] )...
def send(self, message, params=None): """Send service method request :param message: proto message instance (use :meth:`SteamUnifiedMessages.get`) or method name (e.g. ``Player.GetGameBadgeLevels#1``) :type message: :class:`str`, proto message instance :param params:...
def registerDisplay(func): """ Registers a function to the display hook queue to be called on hook. Look at the sys.displayhook documentation for more information. :param func | <callable> """ setup() ref = weakref.ref(func) if ref not in _displayhooks: _displayhooks.ap...
def function[registerDisplay, parameter[func]]: constant[ Registers a function to the display hook queue to be called on hook. Look at the sys.displayhook documentation for more information. :param func | <callable> ] call[name[setup], parameter[]] variable[ref] assign[...
keyword[def] identifier[registerDisplay] ( identifier[func] ): literal[string] identifier[setup] () identifier[ref] = identifier[weakref] . identifier[ref] ( identifier[func] ) keyword[if] identifier[ref] keyword[not] keyword[in] identifier[_displayhooks] : identifier[_displayhooks] ...
def registerDisplay(func): """ Registers a function to the display hook queue to be called on hook. Look at the sys.displayhook documentation for more information. :param func | <callable> """ setup() ref = weakref.ref(func) if ref not in _displayhooks: _displayhooks.ap...
def _init_map(self): """stub""" self.my_osid_object_form._my_map['attempts'] = \ int(self._attempts_metadata['default_object_values'][0]) self.my_osid_object_form._my_map['weight'] = \ float(self._weight_metadata['default_object_values'][0]) # self.my_osid_object_...
def function[_init_map, parameter[self]]: constant[stub] call[name[self].my_osid_object_form._my_map][constant[attempts]] assign[=] call[name[int], parameter[call[call[name[self]._attempts_metadata][constant[default_object_values]]][constant[0]]]] call[name[self].my_osid_object_form._my_map][con...
keyword[def] identifier[_init_map] ( identifier[self] ): literal[string] identifier[self] . identifier[my_osid_object_form] . identifier[_my_map] [ literal[string] ]= identifier[int] ( identifier[self] . identifier[_attempts_metadata] [ literal[string] ][ literal[int] ]) identifier[self] ....
def _init_map(self): """stub""" self.my_osid_object_form._my_map['attempts'] = int(self._attempts_metadata['default_object_values'][0]) self.my_osid_object_form._my_map['weight'] = float(self._weight_metadata['default_object_values'][0]) # self.my_osid_object_form._my_map['rerandomize'] = \ # se...
def to_dict(self): "Post as a dict, for serializing" d = self.metadata.copy() d['content'] = self.content return d
def function[to_dict, parameter[self]]: constant[Post as a dict, for serializing] variable[d] assign[=] call[name[self].metadata.copy, parameter[]] call[name[d]][constant[content]] assign[=] name[self].content return[name[d]]
keyword[def] identifier[to_dict] ( identifier[self] ): literal[string] identifier[d] = identifier[self] . identifier[metadata] . identifier[copy] () identifier[d] [ literal[string] ]= identifier[self] . identifier[content] keyword[return] identifier[d]
def to_dict(self): """Post as a dict, for serializing""" d = self.metadata.copy() d['content'] = self.content return d
def get_search_url(self): """ resolve the search url no matter if local or remote. :return: url or exception """ if self.is_remote: return self.url return reverse('search_api', args=[self.slug])
def function[get_search_url, parameter[self]]: constant[ resolve the search url no matter if local or remote. :return: url or exception ] if name[self].is_remote begin[:] return[name[self].url] return[call[name[reverse], parameter[constant[search_api]]]]
keyword[def] identifier[get_search_url] ( identifier[self] ): literal[string] keyword[if] identifier[self] . identifier[is_remote] : keyword[return] identifier[self] . identifier[url] keyword[return] identifier[reverse] ( literal[string] , identifier[args] =[ identifier[...
def get_search_url(self): """ resolve the search url no matter if local or remote. :return: url or exception """ if self.is_remote: return self.url # depends on [control=['if'], data=[]] return reverse('search_api', args=[self.slug])
def _fetch_stock_data(self, stock_list): """因为 timekline 的返回没有带对应的股票代码,所以要手动带上""" res = super()._fetch_stock_data(stock_list) with_stock = [] for stock, resp in zip(stock_list, res): if resp is not None: with_stock.append((stock, resp)) return with_st...
def function[_fetch_stock_data, parameter[self, stock_list]]: constant[因为 timekline 的返回没有带对应的股票代码,所以要手动带上] variable[res] assign[=] call[call[name[super], parameter[]]._fetch_stock_data, parameter[name[stock_list]]] variable[with_stock] assign[=] list[[]] for taget[tuple[[<ast.Name object...
keyword[def] identifier[_fetch_stock_data] ( identifier[self] , identifier[stock_list] ): literal[string] identifier[res] = identifier[super] (). identifier[_fetch_stock_data] ( identifier[stock_list] ) identifier[with_stock] =[] keyword[for] identifier[stock] , identifier[resp]...
def _fetch_stock_data(self, stock_list): """因为 timekline 的返回没有带对应的股票代码,所以要手动带上""" res = super()._fetch_stock_data(stock_list) with_stock = [] for (stock, resp) in zip(stock_list, res): if resp is not None: with_stock.append((stock, resp)) # depends on [control=['if'], data=['resp']]...
def resampled( chunksize_bytes=DEFAULT_CHUNK_SIZE, resample_to=SR44100(), store_resampled=False): """ Create a basic processing pipeline that can resample all incoming audio to a normalized sampling rate for downstream processing, and store a convenient, compressed version for pl...
def function[resampled, parameter[chunksize_bytes, resample_to, store_resampled]]: constant[ Create a basic processing pipeline that can resample all incoming audio to a normalized sampling rate for downstream processing, and store a convenient, compressed version for playback :param chunksize_...
keyword[def] identifier[resampled] ( identifier[chunksize_bytes] = identifier[DEFAULT_CHUNK_SIZE] , identifier[resample_to] = identifier[SR44100] (), identifier[store_resampled] = keyword[False] ): literal[string] keyword[class] identifier[Resampled] ( identifier[BaseModel] ): identifier[meta...
def resampled(chunksize_bytes=DEFAULT_CHUNK_SIZE, resample_to=SR44100(), store_resampled=False): """ Create a basic processing pipeline that can resample all incoming audio to a normalized sampling rate for downstream processing, and store a convenient, compressed version for playback :param chunks...
def to_json(self, filename=None, encoding="utf-8", errors="strict", multiline=False, **json_kwargs): """ Transform the BoxList object into a JSON string. :param filename: If provided will save to file :param encoding: File encoding :param errors: ...
def function[to_json, parameter[self, filename, encoding, errors, multiline]]: constant[ Transform the BoxList object into a JSON string. :param filename: If provided will save to file :param encoding: File encoding :param errors: How to handle encoding errors :param mul...
keyword[def] identifier[to_json] ( identifier[self] , identifier[filename] = keyword[None] , identifier[encoding] = literal[string] , identifier[errors] = literal[string] , identifier[multiline] = keyword[False] ,** identifier[json_kwargs] ): literal[string] keyword[if] identifier[filename] key...
def to_json(self, filename=None, encoding='utf-8', errors='strict', multiline=False, **json_kwargs): """ Transform the BoxList object into a JSON string. :param filename: If provided will save to file :param encoding: File encoding :param errors: How to handle encoding errors ...
def delete_core_elements_of_models(models, raise_exceptions=True, recursive=True, destroy=True, force=False): """Deletes all respective core elements for the given models Calls the :func:`delete_core_element_of_model` for all given models. :param models: A single model or a list of models of respective co...
def function[delete_core_elements_of_models, parameter[models, raise_exceptions, recursive, destroy, force]]: constant[Deletes all respective core elements for the given models Calls the :func:`delete_core_element_of_model` for all given models. :param models: A single model or a list of models of res...
keyword[def] identifier[delete_core_elements_of_models] ( identifier[models] , identifier[raise_exceptions] = keyword[True] , identifier[recursive] = keyword[True] , identifier[destroy] = keyword[True] , identifier[force] = keyword[False] ): literal[string] keyword[if] keyword[not] identifier[hasatt...
def delete_core_elements_of_models(models, raise_exceptions=True, recursive=True, destroy=True, force=False): """Deletes all respective core elements for the given models Calls the :func:`delete_core_element_of_model` for all given models. :param models: A single model or a list of models of respective co...
def draw_scatter_plot(world, size, target): """ This function can be used on a generic canvas (either an image to save on disk or a canvas part of a GUI) """ #Find min and max values of humidity and temperature on land so we can #normalize temperature and humidity to the chart humid = numpy...
def function[draw_scatter_plot, parameter[world, size, target]]: constant[ This function can be used on a generic canvas (either an image to save on disk or a canvas part of a GUI) ] variable[humid] assign[=] call[name[numpy].ma.masked_array, parameter[call[name[world].layers][constant[humid...
keyword[def] identifier[draw_scatter_plot] ( identifier[world] , identifier[size] , identifier[target] ): literal[string] identifier[humid] = identifier[numpy] . identifier[ma] . identifier[masked_array] ( identifier[world] . identifier[layers] [ literal[string] ]. identifier[data] , identifier[...
def draw_scatter_plot(world, size, target): """ This function can be used on a generic canvas (either an image to save on disk or a canvas part of a GUI) """ #Find min and max values of humidity and temperature on land so we can #normalize temperature and humidity to the chart humid = numpy....
def get_config(k: str) -> Any: """ Returns a configuration variable's value or None if it is unset. """ # If the config has been set explicitly, use it. if k in list(CONFIG.keys()): return CONFIG[k] # If there is a specific PULUMI_CONFIG_<k> environment variable, use it. env_key = g...
def function[get_config, parameter[k]]: constant[ Returns a configuration variable's value or None if it is unset. ] if compare[name[k] in call[name[list], parameter[call[name[CONFIG].keys, parameter[]]]]] begin[:] return[call[name[CONFIG]][name[k]]] variable[env_key] assign[=] c...
keyword[def] identifier[get_config] ( identifier[k] : identifier[str] )-> identifier[Any] : literal[string] keyword[if] identifier[k] keyword[in] identifier[list] ( identifier[CONFIG] . identifier[keys] ()): keyword[return] identifier[CONFIG] [ identifier[k] ] identifier[en...
def get_config(k: str) -> Any: """ Returns a configuration variable's value or None if it is unset. """ # If the config has been set explicitly, use it. if k in list(CONFIG.keys()): return CONFIG[k] # depends on [control=['if'], data=['k']] # If there is a specific PULUMI_CONFIG_<k> env...
def shipping_query_handler(self, *custom_filters, state=None, run_task=None, **kwargs): """ Decorator for shipping query handler Example: .. code-block:: python3 @dp.shipping_query_handler(lambda shipping_query: True) async def some_shipping_query_handler(shipp...
def function[shipping_query_handler, parameter[self]]: constant[ Decorator for shipping query handler Example: .. code-block:: python3 @dp.shipping_query_handler(lambda shipping_query: True) async def some_shipping_query_handler(shipping_query: types.ShippingQu...
keyword[def] identifier[shipping_query_handler] ( identifier[self] ,* identifier[custom_filters] , identifier[state] = keyword[None] , identifier[run_task] = keyword[None] ,** identifier[kwargs] ): literal[string] keyword[def] identifier[decorator] ( identifier[callback] ): identifie...
def shipping_query_handler(self, *custom_filters, state=None, run_task=None, **kwargs): """ Decorator for shipping query handler Example: .. code-block:: python3 @dp.shipping_query_handler(lambda shipping_query: True) async def some_shipping_query_handler(shipping_...
def save(self, filename, clear_history=True, incl_uniqueid=False, compact=False): """Save the bundle to a JSON-formatted ASCII file. :parameter str filename: relative or full path to the file :parameter bool clear_history: whether to clear history log items before savin...
def function[save, parameter[self, filename, clear_history, incl_uniqueid, compact]]: constant[Save the bundle to a JSON-formatted ASCII file. :parameter str filename: relative or full path to the file :parameter bool clear_history: whether to clear history log items before saving (...
keyword[def] identifier[save] ( identifier[self] , identifier[filename] , identifier[clear_history] = keyword[True] , identifier[incl_uniqueid] = keyword[False] , identifier[compact] = keyword[False] ): literal[string] keyword[if] identifier[clear_history] : identif...
def save(self, filename, clear_history=True, incl_uniqueid=False, compact=False): """Save the bundle to a JSON-formatted ASCII file. :parameter str filename: relative or full path to the file :parameter bool clear_history: whether to clear history log items before saving (default: True)...
def time_report_item(self, label, message=None): """ This will return a dictionary for the given message based on timestamps :param label: :param message: str of the message to find the timestamp :return: dict of times """ next_ = TIMESTAMPS_ORDER[TIMESTAMP...
def function[time_report_item, parameter[self, label, message]]: constant[ This will return a dictionary for the given message based on timestamps :param label: :param message: str of the message to find the timestamp :return: dict of times ] variable[next_...
keyword[def] identifier[time_report_item] ( identifier[self] , identifier[label] , identifier[message] = keyword[None] ): literal[string] identifier[next_] = identifier[TIMESTAMPS_ORDER] [ identifier[TIMESTAMPS_ORDER] . identifier[index] ( identifier[label] )+ literal[int] ] keyword[while]...
def time_report_item(self, label, message=None): """ This will return a dictionary for the given message based on timestamps :param label: :param message: str of the message to find the timestamp :return: dict of times """ next_ = TIMESTAMPS_ORDER[TIMESTAMPS_ORDER....
def create(self, resource, keys_vals, url_prefix, auth, session, send_opts): """Create the given key-value pairs for the given resource. Will attempt to create all key-value pairs even if a failure is encountered. Args: resource (intern.resource.boss.BossResource): List keys associ...
def function[create, parameter[self, resource, keys_vals, url_prefix, auth, session, send_opts]]: constant[Create the given key-value pairs for the given resource. Will attempt to create all key-value pairs even if a failure is encountered. Args: resource (intern.resource.boss.Boss...
keyword[def] identifier[create] ( identifier[self] , identifier[resource] , identifier[keys_vals] , identifier[url_prefix] , identifier[auth] , identifier[session] , identifier[send_opts] ): literal[string] identifier[success] = keyword[True] identifier[exc] = identifier[HTTPErrorList] ( ...
def create(self, resource, keys_vals, url_prefix, auth, session, send_opts): """Create the given key-value pairs for the given resource. Will attempt to create all key-value pairs even if a failure is encountered. Args: resource (intern.resource.boss.BossResource): List keys associated...
def convert_mrf_to_syntax_mrf( mrf_lines, conversion_rules ): ''' Converts given lines from Filosoft's mrf format to syntactic analyzer's format, using the morph-category conversion rules from conversion_rules, and punctuation via method _convert_punctuation(); As a result of conversion, th...
def function[convert_mrf_to_syntax_mrf, parameter[mrf_lines, conversion_rules]]: constant[ Converts given lines from Filosoft's mrf format to syntactic analyzer's format, using the morph-category conversion rules from conversion_rules, and punctuation via method _convert_punctuation(); ...
keyword[def] identifier[convert_mrf_to_syntax_mrf] ( identifier[mrf_lines] , identifier[conversion_rules] ): literal[string] identifier[i] = literal[int] keyword[while] ( identifier[i] < identifier[len] ( identifier[mrf_lines] )): identifier[line] = identifier[mrf_lines] [ identifier[i] ] ...
def convert_mrf_to_syntax_mrf(mrf_lines, conversion_rules): """ Converts given lines from Filosoft's mrf format to syntactic analyzer's format, using the morph-category conversion rules from conversion_rules, and punctuation via method _convert_punctuation(); As a result of conversion, the ...
def _all_create_or_get_groups(self, key, start_hdf5_group=None): """Creates new or follows existing group nodes along a given colon separated `key`. :param key: Colon separated path along hdf5 file, e.g. `parameters.mobiles.cars`. :param start_hdf5_group: HDF5 group f...
def function[_all_create_or_get_groups, parameter[self, key, start_hdf5_group]]: constant[Creates new or follows existing group nodes along a given colon separated `key`. :param key: Colon separated path along hdf5 file, e.g. `parameters.mobiles.cars`. :param start_hdf5_group: ...
keyword[def] identifier[_all_create_or_get_groups] ( identifier[self] , identifier[key] , identifier[start_hdf5_group] = keyword[None] ): literal[string] keyword[if] identifier[start_hdf5_group] keyword[is] keyword[None] : identifier[newhdf5_group] = identifier[self] . identifier[_t...
def _all_create_or_get_groups(self, key, start_hdf5_group=None): """Creates new or follows existing group nodes along a given colon separated `key`. :param key: Colon separated path along hdf5 file, e.g. `parameters.mobiles.cars`. :param start_hdf5_group: HDF5 group from ...
def _make_win(n, mono=False): """ Generate a window for a given length. :param n: an integer for the length of the window. :param mono: True for a mono window, False for a stereo window. :return: an numpy array containing the window value. """ if mono: win = np.hanning(n) + 0.00001 ...
def function[_make_win, parameter[n, mono]]: constant[ Generate a window for a given length. :param n: an integer for the length of the window. :param mono: True for a mono window, False for a stereo window. :return: an numpy array containing the window value. ] if name[mono] begin[:] ...
keyword[def] identifier[_make_win] ( identifier[n] , identifier[mono] = keyword[False] ): literal[string] keyword[if] identifier[mono] : identifier[win] = identifier[np] . identifier[hanning] ( identifier[n] )+ literal[int] keyword[else] : identifier[win] = identifier[np] . identi...
def _make_win(n, mono=False): """ Generate a window for a given length. :param n: an integer for the length of the window. :param mono: True for a mono window, False for a stereo window. :return: an numpy array containing the window value. """ if mono: win = np.hanning(n) + 1e-05 # dep...
def predict(self, Xstar, n=0, noise=False, return_std=True, return_cov=False, full_output=False, return_samples=False, num_samples=1, samp_kwargs={}, return_mean_func=False, use_MCMC=False, full_MC=False, rejection_func=None, ddof=1, output_transform=None, ...
def function[predict, parameter[self, Xstar, n, noise, return_std, return_cov, full_output, return_samples, num_samples, samp_kwargs, return_mean_func, use_MCMC, full_MC, rejection_func, ddof, output_transform]]: constant[Predict the mean and covariance at the inputs `Xstar`. The order of the d...
keyword[def] identifier[predict] ( identifier[self] , identifier[Xstar] , identifier[n] = literal[int] , identifier[noise] = keyword[False] , identifier[return_std] = keyword[True] , identifier[return_cov] = keyword[False] , identifier[full_output] = keyword[False] , identifier[return_samples] = keyword[False] , ide...
def predict(self, Xstar, n=0, noise=False, return_std=True, return_cov=False, full_output=False, return_samples=False, num_samples=1, samp_kwargs={}, return_mean_func=False, use_MCMC=False, full_MC=False, rejection_func=None, ddof=1, output_transform=None, **kwargs): """Predict the mean and covariance at the inputs...
def proto_02_01_MT70(abf=exampleABF): """repeated membrane tests.""" standard_overlayWithAverage(abf) swhlab.memtest.memtest(abf) swhlab.memtest.checkSweep(abf) swhlab.plot.save(abf,tag='check',resize=False)
def function[proto_02_01_MT70, parameter[abf]]: constant[repeated membrane tests.] call[name[standard_overlayWithAverage], parameter[name[abf]]] call[name[swhlab].memtest.memtest, parameter[name[abf]]] call[name[swhlab].memtest.checkSweep, parameter[name[abf]]] call[name[swhlab]....
keyword[def] identifier[proto_02_01_MT70] ( identifier[abf] = identifier[exampleABF] ): literal[string] identifier[standard_overlayWithAverage] ( identifier[abf] ) identifier[swhlab] . identifier[memtest] . identifier[memtest] ( identifier[abf] ) identifier[swhlab] . identifier[memtest] . identif...
def proto_02_01_MT70(abf=exampleABF): """repeated membrane tests.""" standard_overlayWithAverage(abf) swhlab.memtest.memtest(abf) swhlab.memtest.checkSweep(abf) swhlab.plot.save(abf, tag='check', resize=False)
def resolve_dotted_attribute(obj, attr, allow_dotted_names=True): """resolve_dotted_attribute(a, 'b.c.d') => a.b.c.d Resolves a dotted attribute name to an object. Raises an AttributeError if any attribute in the chain starts with a '_'. If the optional allow_dotted_names argument is false, dots are ...
def function[resolve_dotted_attribute, parameter[obj, attr, allow_dotted_names]]: constant[resolve_dotted_attribute(a, 'b.c.d') => a.b.c.d Resolves a dotted attribute name to an object. Raises an AttributeError if any attribute in the chain starts with a '_'. If the optional allow_dotted_names ar...
keyword[def] identifier[resolve_dotted_attribute] ( identifier[obj] , identifier[attr] , identifier[allow_dotted_names] = keyword[True] ): literal[string] keyword[if] identifier[allow_dotted_names] : identifier[attrs] = identifier[attr] . identifier[split] ( literal[string] ) keyword[else] ...
def resolve_dotted_attribute(obj, attr, allow_dotted_names=True): """resolve_dotted_attribute(a, 'b.c.d') => a.b.c.d Resolves a dotted attribute name to an object. Raises an AttributeError if any attribute in the chain starts with a '_'. If the optional allow_dotted_names argument is false, dots are ...
def get_analog(self, component_info=None, data=None, component_position=None): """Get analog data.""" components = [] append_components = components.append for _ in range(component_info.device_count): component_position, device = QRTPacket._get_exact( RTAnalog...
def function[get_analog, parameter[self, component_info, data, component_position]]: constant[Get analog data.] variable[components] assign[=] list[[]] variable[append_components] assign[=] name[components].append for taget[name[_]] in starred[call[name[range], parameter[name[component_i...
keyword[def] identifier[get_analog] ( identifier[self] , identifier[component_info] = keyword[None] , identifier[data] = keyword[None] , identifier[component_position] = keyword[None] ): literal[string] identifier[components] =[] identifier[append_components] = identifier[components] . ide...
def get_analog(self, component_info=None, data=None, component_position=None): """Get analog data.""" components = [] append_components = components.append for _ in range(component_info.device_count): (component_position, device) = QRTPacket._get_exact(RTAnalogDevice, data, component_position) ...
def execute(self, sensor_graph, scope_stack): """Execute this statement on the sensor_graph given the current scope tree. This adds a single config variable assignment to the current sensor graph Args: sensor_graph (SensorGraph): The sensor graph that we are building or ...
def function[execute, parameter[self, sensor_graph, scope_stack]]: constant[Execute this statement on the sensor_graph given the current scope tree. This adds a single config variable assignment to the current sensor graph Args: sensor_graph (SensorGraph): The sensor graph that we ...
keyword[def] identifier[execute] ( identifier[self] , identifier[sensor_graph] , identifier[scope_stack] ): literal[string] identifier[parent] = identifier[scope_stack] [- literal[int] ] keyword[try] : identifier[slot] = identifier[parent] . identifier[resolve_identifier] ( ...
def execute(self, sensor_graph, scope_stack): """Execute this statement on the sensor_graph given the current scope tree. This adds a single config variable assignment to the current sensor graph Args: sensor_graph (SensorGraph): The sensor graph that we are building or ...
def _rebalance_partition_replicas( self, partition, max_movement_count=None, max_movement_size=None, ): """Rebalance replication groups for given partition.""" # Separate replication-groups into under and over replicated total = partition.repli...
def function[_rebalance_partition_replicas, parameter[self, partition, max_movement_count, max_movement_size]]: constant[Rebalance replication groups for given partition.] variable[total] assign[=] name[partition].replication_factor <ast.Tuple object at 0x7da1b08409a0> assign[=] call[name[separa...
keyword[def] identifier[_rebalance_partition_replicas] ( identifier[self] , identifier[partition] , identifier[max_movement_count] = keyword[None] , identifier[max_movement_size] = keyword[None] , ): literal[string] identifier[total] = identifier[partition] . identifier[replication_fac...
def _rebalance_partition_replicas(self, partition, max_movement_count=None, max_movement_size=None): """Rebalance replication groups for given partition.""" # Separate replication-groups into under and over replicated total = partition.replication_factor (over_replicated_rgs, under_replicated_rgs) = sep...
def show_tip(self, point, tip, wrapped_tiplines): """ Attempts to show the specified tip at the current cursor location. """ # Don't attempt to show it if it's already visible and the text # to be displayed is the same as the one displayed before. if self.isVisible(): ...
def function[show_tip, parameter[self, point, tip, wrapped_tiplines]]: constant[ Attempts to show the specified tip at the current cursor location. ] if call[name[self].isVisible, parameter[]] begin[:] if compare[name[self].tip equal[==] name[tip]] begin[:] return[con...
keyword[def] identifier[show_tip] ( identifier[self] , identifier[point] , identifier[tip] , identifier[wrapped_tiplines] ): literal[string] keyword[if] identifier[self] . identifier[isVisible] (): keyword[if] identifier[self] . identifier[tip] == identifier[tip] : ...
def show_tip(self, point, tip, wrapped_tiplines): """ Attempts to show the specified tip at the current cursor location. """ # Don't attempt to show it if it's already visible and the text # to be displayed is the same as the one displayed before. if self.isVisible(): if self.tip == tip:...
def _mk_index(self): """create the index for this set""" index = defaultdict(list) for line_no, line in enumerate(self._stripped_lines): if line: index[line].append(line_no) return index
def function[_mk_index, parameter[self]]: constant[create the index for this set] variable[index] assign[=] call[name[defaultdict], parameter[name[list]]] for taget[tuple[[<ast.Name object at 0x7da1b024d990>, <ast.Name object at 0x7da1b024d960>]]] in starred[call[name[enumerate], parameter[name[...
keyword[def] identifier[_mk_index] ( identifier[self] ): literal[string] identifier[index] = identifier[defaultdict] ( identifier[list] ) keyword[for] identifier[line_no] , identifier[line] keyword[in] identifier[enumerate] ( identifier[self] . identifier[_stripped_lines] ): ...
def _mk_index(self): """create the index for this set""" index = defaultdict(list) for (line_no, line) in enumerate(self._stripped_lines): if line: index[line].append(line_no) # depends on [control=['if'], data=[]] # depends on [control=['for'], data=[]] return index
def load_limits(self, config=None): """Load the stats limits (except the one in the exclude list).""" # For each plugins, call the load_limits method for p in self._plugins: self._plugins[p].load_limits(config)
def function[load_limits, parameter[self, config]]: constant[Load the stats limits (except the one in the exclude list).] for taget[name[p]] in starred[name[self]._plugins] begin[:] call[call[name[self]._plugins][name[p]].load_limits, parameter[name[config]]]
keyword[def] identifier[load_limits] ( identifier[self] , identifier[config] = keyword[None] ): literal[string] keyword[for] identifier[p] keyword[in] identifier[self] . identifier[_plugins] : identifier[self] . identifier[_plugins] [ identifier[p] ]. identifier[load_limits...
def load_limits(self, config=None): """Load the stats limits (except the one in the exclude list).""" # For each plugins, call the load_limits method for p in self._plugins: self._plugins[p].load_limits(config) # depends on [control=['for'], data=['p']]
def write(self, oprot): ''' Write this object to the given output protocol and return self. :type oprot: thryft.protocol._output_protocol._OutputProtocol :rtype: pastpy.gen.database.impl.dbf.objects_dbf_record.ObjectsDbfRecord ''' oprot.write_struct_begin('ObjectsDbfRec...
def function[write, parameter[self, oprot]]: constant[ Write this object to the given output protocol and return self. :type oprot: thryft.protocol._output_protocol._OutputProtocol :rtype: pastpy.gen.database.impl.dbf.objects_dbf_record.ObjectsDbfRecord ] call[name[oprot...
keyword[def] identifier[write] ( identifier[self] , identifier[oprot] ): literal[string] identifier[oprot] . identifier[write_struct_begin] ( literal[string] ) keyword[if] identifier[self] . identifier[accessno] keyword[is] keyword[not] keyword[None] : identifier[oprot] ...
def write(self, oprot): """ Write this object to the given output protocol and return self. :type oprot: thryft.protocol._output_protocol._OutputProtocol :rtype: pastpy.gen.database.impl.dbf.objects_dbf_record.ObjectsDbfRecord """ oprot.write_struct_begin('ObjectsDbfRecord') ...
def inspect_service(self, service, insert_defaults=None): """ Return information about a service. Args: service (str): Service name or ID. insert_defaults (boolean): If true, default values will be merged into the service inspect output. Returns:...
def function[inspect_service, parameter[self, service, insert_defaults]]: constant[ Return information about a service. Args: service (str): Service name or ID. insert_defaults (boolean): If true, default values will be merged into the service inspect out...
keyword[def] identifier[inspect_service] ( identifier[self] , identifier[service] , identifier[insert_defaults] = keyword[None] ): literal[string] identifier[url] = identifier[self] . identifier[_url] ( literal[string] , identifier[service] ) identifier[params] ={} keyword[if] id...
def inspect_service(self, service, insert_defaults=None): """ Return information about a service. Args: service (str): Service name or ID. insert_defaults (boolean): If true, default values will be merged into the service inspect output. Returns: ...
def calc_Z(A, x): """ calculate the Z matrix (flows) from A and x Parameters ---------- A : pandas.DataFrame or numpy.array Symmetric input output table (coefficients) x : pandas.DataFrame or numpy.array Industry output column vector Returns ------- pandas.DataFrame or ...
def function[calc_Z, parameter[A, x]]: constant[ calculate the Z matrix (flows) from A and x Parameters ---------- A : pandas.DataFrame or numpy.array Symmetric input output table (coefficients) x : pandas.DataFrame or numpy.array Industry output column vector Returns -...
keyword[def] identifier[calc_Z] ( identifier[A] , identifier[x] ): literal[string] keyword[if] ( identifier[type] ( identifier[x] ) keyword[is] identifier[pd] . identifier[DataFrame] ) keyword[or] ( identifier[type] ( identifier[x] ) keyword[is] identifier[pd] . identifier[Series] ): identifier[...
def calc_Z(A, x): """ calculate the Z matrix (flows) from A and x Parameters ---------- A : pandas.DataFrame or numpy.array Symmetric input output table (coefficients) x : pandas.DataFrame or numpy.array Industry output column vector Returns ------- pandas.DataFrame or ...
def update(self, friendly_name=values.unset, status=values.unset): """ Update the AccountInstance :param unicode friendly_name: FriendlyName to update :param AccountInstance.Status status: Status to update the Account with :returns: Updated AccountInstance :rtype: twili...
def function[update, parameter[self, friendly_name, status]]: constant[ Update the AccountInstance :param unicode friendly_name: FriendlyName to update :param AccountInstance.Status status: Status to update the Account with :returns: Updated AccountInstance :rtype: twil...
keyword[def] identifier[update] ( identifier[self] , identifier[friendly_name] = identifier[values] . identifier[unset] , identifier[status] = identifier[values] . identifier[unset] ): literal[string] keyword[return] identifier[self] . identifier[_proxy] . identifier[update] ( identifier[friendly_...
def update(self, friendly_name=values.unset, status=values.unset): """ Update the AccountInstance :param unicode friendly_name: FriendlyName to update :param AccountInstance.Status status: Status to update the Account with :returns: Updated AccountInstance :rtype: twilio.re...
def get_or_create_organization(self, id=None, name=None): """ Gets existing or creates new organization :rtype: Organization """ if id: return self.get_organization(id) else: assert name try: return self.get_organization...
def function[get_or_create_organization, parameter[self, id, name]]: constant[ Gets existing or creates new organization :rtype: Organization ] if name[id] begin[:] return[call[name[self].get_organization, parameter[name[id]]]]
keyword[def] identifier[get_or_create_organization] ( identifier[self] , identifier[id] = keyword[None] , identifier[name] = keyword[None] ): literal[string] keyword[if] identifier[id] : keyword[return] identifier[self] . identifier[get_organization] ( identifier[id] ) keywo...
def get_or_create_organization(self, id=None, name=None): """ Gets existing or creates new organization :rtype: Organization """ if id: return self.get_organization(id) # depends on [control=['if'], data=[]] else: assert name try: return self.get_...
def color_map_data(self, data: numpy.ndarray) -> None: """Set the data and mark the canvas item for updating. Data should be an ndarray of shape (256, 3) with type uint8 """ self.__color_map_data = data self.update()
def function[color_map_data, parameter[self, data]]: constant[Set the data and mark the canvas item for updating. Data should be an ndarray of shape (256, 3) with type uint8 ] name[self].__color_map_data assign[=] name[data] call[name[self].update, parameter[]]
keyword[def] identifier[color_map_data] ( identifier[self] , identifier[data] : identifier[numpy] . identifier[ndarray] )-> keyword[None] : literal[string] identifier[self] . identifier[__color_map_data] = identifier[data] identifier[self] . identifier[update] ()
def color_map_data(self, data: numpy.ndarray) -> None: """Set the data and mark the canvas item for updating. Data should be an ndarray of shape (256, 3) with type uint8 """ self.__color_map_data = data self.update()
def get_transcript_ids_for_ensembl_gene_ids(self, gene_ids, hgnc_symbols): """ fetch the ensembl transcript IDs for a given ensembl gene ID. Args: gene_ids: list of Ensembl gene IDs for the gene hgnc_symbols: list of possible HGNC symbols for gene """ ...
def function[get_transcript_ids_for_ensembl_gene_ids, parameter[self, gene_ids, hgnc_symbols]]: constant[ fetch the ensembl transcript IDs for a given ensembl gene ID. Args: gene_ids: list of Ensembl gene IDs for the gene hgnc_symbols: list of possible HGNC symbols for g...
keyword[def] identifier[get_transcript_ids_for_ensembl_gene_ids] ( identifier[self] , identifier[gene_ids] , identifier[hgnc_symbols] ): literal[string] identifier[chroms] ={ literal[string] , literal[string] , literal[string] , literal[string] , literal[string] , literal[string] , literal[string]...
def get_transcript_ids_for_ensembl_gene_ids(self, gene_ids, hgnc_symbols): """ fetch the ensembl transcript IDs for a given ensembl gene ID. Args: gene_ids: list of Ensembl gene IDs for the gene hgnc_symbols: list of possible HGNC symbols for gene """ chroms = {'...
def rna_transcript_expression_dict_from_args(args): """ Returns a dictionary mapping Ensembl transcript IDs to FPKM expression values or None if neither Cufflinks tracking file nor StringTie GTF file were specified. """ if args.rna_transcript_fpkm_tracking_file: return load_cufflinks_fpk...
def function[rna_transcript_expression_dict_from_args, parameter[args]]: constant[ Returns a dictionary mapping Ensembl transcript IDs to FPKM expression values or None if neither Cufflinks tracking file nor StringTie GTF file were specified. ] if name[args].rna_transcript_fpkm_tracking_...
keyword[def] identifier[rna_transcript_expression_dict_from_args] ( identifier[args] ): literal[string] keyword[if] identifier[args] . identifier[rna_transcript_fpkm_tracking_file] : keyword[return] identifier[load_cufflinks_fpkm_dict] ( identifier[args] . identifier[rna_transcript_fpkm_tracking...
def rna_transcript_expression_dict_from_args(args): """ Returns a dictionary mapping Ensembl transcript IDs to FPKM expression values or None if neither Cufflinks tracking file nor StringTie GTF file were specified. """ if args.rna_transcript_fpkm_tracking_file: return load_cufflinks_fpk...
def _wrap_value_with_context(self, value: dict or str, field_name: str, start: int=0, end: int=0) -> Extraction: """Wraps the final result""" return Extraction(value, self.name, start_token=start, end_token=end, tag=field_name)
def function[_wrap_value_with_context, parameter[self, value, field_name, start, end]]: constant[Wraps the final result] return[call[name[Extraction], parameter[name[value], name[self].name]]]
keyword[def] identifier[_wrap_value_with_context] ( identifier[self] , identifier[value] : identifier[dict] keyword[or] identifier[str] , identifier[field_name] : identifier[str] , identifier[start] : identifier[int] = literal[int] , identifier[end] : identifier[int] = literal[int] )-> identifier[Extraction] : ...
def _wrap_value_with_context(self, value: dict or str, field_name: str, start: int=0, end: int=0) -> Extraction: """Wraps the final result""" return Extraction(value, self.name, start_token=start, end_token=end, tag=field_name)
def lookup(values, name=None): """ Creates the grammar for a Lookup (L) field, accepting only values from a list. Like in the Alphanumeric field, the result will be stripped of all heading and trailing whitespaces. :param values: values allowed :param name: name for the field :return: ...
def function[lookup, parameter[values, name]]: constant[ Creates the grammar for a Lookup (L) field, accepting only values from a list. Like in the Alphanumeric field, the result will be stripped of all heading and trailing whitespaces. :param values: values allowed :param name: name f...
keyword[def] identifier[lookup] ( identifier[values] , identifier[name] = keyword[None] ): literal[string] keyword[if] identifier[name] keyword[is] keyword[None] : identifier[name] = literal[string] keyword[if] identifier[values] keyword[is] keyword[None] : keyword[raise] id...
def lookup(values, name=None): """ Creates the grammar for a Lookup (L) field, accepting only values from a list. Like in the Alphanumeric field, the result will be stripped of all heading and trailing whitespaces. :param values: values allowed :param name: name for the field :return: ...
def to_dict(self): """Returns parameters to replicate the distribution.""" result = { 'type': get_qualified_name(self), 'fitted': self.fitted, 'constant_value': self.constant_value } if not self.fitted: return result result.update...
def function[to_dict, parameter[self]]: constant[Returns parameters to replicate the distribution.] variable[result] assign[=] dictionary[[<ast.Constant object at 0x7da20c6a9a80>, <ast.Constant object at 0x7da20c6aae60>, <ast.Constant object at 0x7da20c6abca0>], [<ast.Call object at 0x7da20c6aab90>, <as...
keyword[def] identifier[to_dict] ( identifier[self] ): literal[string] identifier[result] ={ literal[string] : identifier[get_qualified_name] ( identifier[self] ), literal[string] : identifier[self] . identifier[fitted] , literal[string] : identifier[self] . identifier[co...
def to_dict(self): """Returns parameters to replicate the distribution.""" result = {'type': get_qualified_name(self), 'fitted': self.fitted, 'constant_value': self.constant_value} if not self.fitted: return result # depends on [control=['if'], data=[]] result.update(self._fit_params()) ret...
def sysinfo(self): """Return a list of (key, value) pairs showing internal information.""" import coverage as covmod import platform, re try: implementation = platform.python_implementation() except AttributeError: implementation = "unknown" inf...
def function[sysinfo, parameter[self]]: constant[Return a list of (key, value) pairs showing internal information.] import module[coverage] as alias[covmod] import module[platform], module[re] <ast.Try object at 0x7da207f98910> variable[info] assign[=] list[[<ast.Tuple object at 0x7da207f9a1...
keyword[def] identifier[sysinfo] ( identifier[self] ): literal[string] keyword[import] identifier[coverage] keyword[as] identifier[covmod] keyword[import] identifier[platform] , identifier[re] keyword[try] : identifier[implementation] = identifier[platform] . ...
def sysinfo(self): """Return a list of (key, value) pairs showing internal information.""" import coverage as covmod import platform, re try: implementation = platform.python_implementation() # depends on [control=['try'], data=[]] except AttributeError: implementation = 'unknown' ...
def is_stop_here(self, frame, event, arg): """ Does the magic to determine if we stop here and run a command processor or not. If so, return True and set self.stop_reason; if not, return False. Determining factors can be whether a breakpoint was encountered, whether we are stepp...
def function[is_stop_here, parameter[self, frame, event, arg]]: constant[ Does the magic to determine if we stop here and run a command processor or not. If so, return True and set self.stop_reason; if not, return False. Determining factors can be whether a breakpoint was encoun...
keyword[def] identifier[is_stop_here] ( identifier[self] , identifier[frame] , identifier[event] , identifier[arg] ): literal[string] identifier[lineno] = identifier[frame] . identifier[f_lineno] identifier[filename] = identifier[fr...
def is_stop_here(self, frame, event, arg): """ Does the magic to determine if we stop here and run a command processor or not. If so, return True and set self.stop_reason; if not, return False. Determining factors can be whether a breakpoint was encountered, whether we are stepping,...
def _handle_blacklisted_tag(self): """Handle the body of an HTML tag that is parser-blacklisted.""" strip = lambda text: text.rstrip().lower() while True: this, next = self._read(), self._read(1) if this is self.END: self._fail_route() elif thi...
def function[_handle_blacklisted_tag, parameter[self]]: constant[Handle the body of an HTML tag that is parser-blacklisted.] variable[strip] assign[=] <ast.Lambda object at 0x7da2047e9ba0> while constant[True] begin[:] <ast.Tuple object at 0x7da2047e9a20> assign[=] tuple[[<ast.Ca...
keyword[def] identifier[_handle_blacklisted_tag] ( identifier[self] ): literal[string] identifier[strip] = keyword[lambda] identifier[text] : identifier[text] . identifier[rstrip] (). identifier[lower] () keyword[while] keyword[True] : identifier[this] , identifier[next] = i...
def _handle_blacklisted_tag(self): """Handle the body of an HTML tag that is parser-blacklisted.""" strip = lambda text: text.rstrip().lower() while True: (this, next) = (self._read(), self._read(1)) if this is self.END: self._fail_route() # depends on [control=['if'], data=[]] ...
def collision_warning(self, item): """ Given a string, print a warning if this could collide with a Zappa core package module. Use for app functions and events. """ namespace_collisions = [ "zappa.", "wsgi.", "middleware.", "handler.", "util.", "letsencrypt....
def function[collision_warning, parameter[self, item]]: constant[ Given a string, print a warning if this could collide with a Zappa core package module. Use for app functions and events. ] variable[namespace_collisions] assign[=] list[[<ast.Constant object at 0x7da1b1fe...
keyword[def] identifier[collision_warning] ( identifier[self] , identifier[item] ): literal[string] identifier[namespace_collisions] =[ literal[string] , literal[string] , literal[string] , literal[string] , literal[string] , literal[string] , literal[string] ] keyword[f...
def collision_warning(self, item): """ Given a string, print a warning if this could collide with a Zappa core package module. Use for app functions and events. """ namespace_collisions = ['zappa.', 'wsgi.', 'middleware.', 'handler.', 'util.', 'letsencrypt.', 'cli.'] for nam...
def _all_feature_values( self, column, feature, distinct=True, contig=None, strand=None): """ Cached lookup of all values for a particular feature property from the database, caches repeated queries in memory and sto...
def function[_all_feature_values, parameter[self, column, feature, distinct, contig, strand]]: constant[ Cached lookup of all values for a particular feature property from the database, caches repeated queries in memory and stores them as a CSV. Parameters ---------- ...
keyword[def] identifier[_all_feature_values] ( identifier[self] , identifier[column] , identifier[feature] , identifier[distinct] = keyword[True] , identifier[contig] = keyword[None] , identifier[strand] = keyword[None] ): literal[string] keyword[return] identifier[self] . identifier[db] . i...
def _all_feature_values(self, column, feature, distinct=True, contig=None, strand=None): """ Cached lookup of all values for a particular feature property from the database, caches repeated queries in memory and stores them as a CSV. Parameters ---------- column : s...
def start(self): """Starts the execution of the root state. """ # load default input data for the state self._root_state.input_data = self._root_state.get_default_input_values_for_state(self._root_state) self._root_state.output_data = self._root_state.create_output_dictionary_for...
def function[start, parameter[self]]: constant[Starts the execution of the root state. ] name[self]._root_state.input_data assign[=] call[name[self]._root_state.get_default_input_values_for_state, parameter[name[self]._root_state]] name[self]._root_state.output_data assign[=] call[name[s...
keyword[def] identifier[start] ( identifier[self] ): literal[string] identifier[self] . identifier[_root_state] . identifier[input_data] = identifier[self] . identifier[_root_state] . identifier[get_default_input_values_for_state] ( identifier[self] . identifier[_root_state] ) ide...
def start(self): """Starts the execution of the root state. """ # load default input data for the state self._root_state.input_data = self._root_state.get_default_input_values_for_state(self._root_state) self._root_state.output_data = self._root_state.create_output_dictionary_for_state(self._roo...
async def stop(self): """ Stop the transport. """ if self._association_state != self.State.CLOSED: await self._abort() self.__transport._unregister_data_receiver(self) self._set_state(self.State.CLOSED)
<ast.AsyncFunctionDef object at 0x7da2054a62c0>
keyword[async] keyword[def] identifier[stop] ( identifier[self] ): literal[string] keyword[if] identifier[self] . identifier[_association_state] != identifier[self] . identifier[State] . identifier[CLOSED] : keyword[await] identifier[self] . identifier[_abort] () identifier...
async def stop(self): """ Stop the transport. """ if self._association_state != self.State.CLOSED: await self._abort() # depends on [control=['if'], data=[]] self.__transport._unregister_data_receiver(self) self._set_state(self.State.CLOSED)
def unpackcFunc(self): ''' "Unpacks" the consumption functions into their own field for easier access. After the model has been solved, the consumption functions reside in the attribute cFunc of each element of ConsumerType.solution. This method creates a (time varying) attribut...
def function[unpackcFunc, parameter[self]]: constant[ "Unpacks" the consumption functions into their own field for easier access. After the model has been solved, the consumption functions reside in the attribute cFunc of each element of ConsumerType.solution. This method create...
keyword[def] identifier[unpackcFunc] ( identifier[self] ): literal[string] identifier[self] . identifier[cFunc] =[] keyword[for] identifier[solution_t] keyword[in] identifier[self] . identifier[solution] : identifier[self] . identifier[cFunc] . identifier[append] ( identifi...
def unpackcFunc(self): """ "Unpacks" the consumption functions into their own field for easier access. After the model has been solved, the consumption functions reside in the attribute cFunc of each element of ConsumerType.solution. This method creates a (time varying) attribute cF...
def _encode_message(cls, message): """ Encode a single message. The magic number of a message is a format version number. The only supported magic number right now is zero Format ====== Message => Crc MagicByte Attributes Key Value Crc => int32 ...
def function[_encode_message, parameter[cls, message]]: constant[ Encode a single message. The magic number of a message is a format version number. The only supported magic number right now is zero Format ====== Message => Crc MagicByte Attributes Key Value ...
keyword[def] identifier[_encode_message] ( identifier[cls] , identifier[message] ): literal[string] keyword[if] identifier[message] . identifier[magic] == literal[int] : identifier[msg] = literal[string] . identifier[join] ([ identifier[struct] . identifier[pack] ( litera...
def _encode_message(cls, message): """ Encode a single message. The magic number of a message is a format version number. The only supported magic number right now is zero Format ====== Message => Crc MagicByte Attributes Key Value Crc => int32 M...
def add_section(self, section): """Add a new Section object to the config. Should be a subclass of _AbstractSection.""" if not issubclass(section.__class__, _AbstractSection): raise TypeError("argument should be a subclass of Section") self.sections[section.get_key_name()] = ...
def function[add_section, parameter[self, section]]: constant[Add a new Section object to the config. Should be a subclass of _AbstractSection.] if <ast.UnaryOp object at 0x7da1b15e6410> begin[:] <ast.Raise object at 0x7da1b15e7820> call[name[self].sections][call[name[section].ge...
keyword[def] identifier[add_section] ( identifier[self] , identifier[section] ): literal[string] keyword[if] keyword[not] identifier[issubclass] ( identifier[section] . identifier[__class__] , identifier[_AbstractSection] ): keyword[raise] identifier[TypeError] ( literal[string] ) ...
def add_section(self, section): """Add a new Section object to the config. Should be a subclass of _AbstractSection.""" if not issubclass(section.__class__, _AbstractSection): raise TypeError('argument should be a subclass of Section') # depends on [control=['if'], data=[]] self.sections[se...
def predict(self, nSteps): """ This function gives the future predictions for <nSteps> timesteps starting from the current TP state. The TP is returned to its original state at the end before returning. 1) We save the TP state. 2) Loop for nSteps a) Turn-on with lateral support from t...
def function[predict, parameter[self, nSteps]]: constant[ This function gives the future predictions for <nSteps> timesteps starting from the current TP state. The TP is returned to its original state at the end before returning. 1) We save the TP state. 2) Loop for nSteps a) Turn...
keyword[def] identifier[predict] ( identifier[self] , identifier[nSteps] ): literal[string] identifier[pristineTPDynamicState] = identifier[self] . identifier[_getTPDynamicState] () keyword[assert] ( identifier[nSteps] > literal[int] ) identifier[multiStepColumnPredictions] = identif...
def predict(self, nSteps): """ This function gives the future predictions for <nSteps> timesteps starting from the current TP state. The TP is returned to its original state at the end before returning. 1) We save the TP state. 2) Loop for nSteps a) Turn-on with lateral support from t...
def build_from_issue_comment(gh_token, body): """Create a WebhookMetadata from a comment added to an issue. """ if body["action"] in ["created", "edited"]: github_con = Github(gh_token) repo = github_con.get_repo(body['repository']['full_name']) issue = repo.get_issue(body['issue']['...
def function[build_from_issue_comment, parameter[gh_token, body]]: constant[Create a WebhookMetadata from a comment added to an issue. ] if compare[call[name[body]][constant[action]] in list[[<ast.Constant object at 0x7da1b25eac20>, <ast.Constant object at 0x7da1b25e97e0>]]] begin[:] ...
keyword[def] identifier[build_from_issue_comment] ( identifier[gh_token] , identifier[body] ): literal[string] keyword[if] identifier[body] [ literal[string] ] keyword[in] [ literal[string] , literal[string] ]: identifier[github_con] = identifier[Github] ( identifier[gh_token] ) identifi...
def build_from_issue_comment(gh_token, body): """Create a WebhookMetadata from a comment added to an issue. """ if body['action'] in ['created', 'edited']: github_con = Github(gh_token) repo = github_con.get_repo(body['repository']['full_name']) issue = repo.get_issue(body['issue']['...
def append_state(self, s, is_widened_state=False): """ Appended a new state to this VFGNode. :param s: The new state to append :param is_widened_state: Whether it is a widened state or not. """ if not is_widened_state: self.all_states.append(s) se...
def function[append_state, parameter[self, s, is_widened_state]]: constant[ Appended a new state to this VFGNode. :param s: The new state to append :param is_widened_state: Whether it is a widened state or not. ] if <ast.UnaryOp object at 0x7da20c6aa860> begin[:] ...
keyword[def] identifier[append_state] ( identifier[self] , identifier[s] , identifier[is_widened_state] = keyword[False] ): literal[string] keyword[if] keyword[not] identifier[is_widened_state] : identifier[self] . identifier[all_states] . identifier[append] ( identifier[s] ) ...
def append_state(self, s, is_widened_state=False): """ Appended a new state to this VFGNode. :param s: The new state to append :param is_widened_state: Whether it is a widened state or not. """ if not is_widened_state: self.all_states.append(s) self.state = s # d...
def append_function(self, function): """Append the function to the list of functions to be called. If the function is already a callable, use it. If it's a type str try to interpret it as [module]:?<callable>, load the module if there is one and retrieve the callable. Argument:...
def function[append_function, parameter[self, function]]: constant[Append the function to the list of functions to be called. If the function is already a callable, use it. If it's a type str try to interpret it as [module]:?<callable>, load the module if there is one and retrieve the c...
keyword[def] identifier[append_function] ( identifier[self] , identifier[function] ): literal[string] keyword[if] keyword[not] identifier[hasattr] ( identifier[function] , literal[string] ): identifier[function] = identifier[get_function] ( identifier[function] ) keyword...
def append_function(self, function): """Append the function to the list of functions to be called. If the function is already a callable, use it. If it's a type str try to interpret it as [module]:?<callable>, load the module if there is one and retrieve the callable. Argument: ...
def isiterable(obj, reject_string=True): """convenience tool to detect if something is iterable. in python3, strings count as iterables to we have the option to exclude them Parameters: ----------- obj : object to analyse reject_string : bool, whether to ignore strings Returns: -------...
def function[isiterable, parameter[obj, reject_string]]: constant[convenience tool to detect if something is iterable. in python3, strings count as iterables to we have the option to exclude them Parameters: ----------- obj : object to analyse reject_string : bool, whether to ignore strings...
keyword[def] identifier[isiterable] ( identifier[obj] , identifier[reject_string] = keyword[True] ): literal[string] identifier[iterable] = identifier[hasattr] ( identifier[obj] , literal[string] ) keyword[if] identifier[reject_string] : identifier[iterable] = identifier[iterable] keyword...
def isiterable(obj, reject_string=True): """convenience tool to detect if something is iterable. in python3, strings count as iterables to we have the option to exclude them Parameters: ----------- obj : object to analyse reject_string : bool, whether to ignore strings Returns: -------...
def show(closeToo=False): """alternative to pylab.show() that updates IPython window.""" IPython.display.display(pylab.gcf()) if closeToo: pylab.close('all')
def function[show, parameter[closeToo]]: constant[alternative to pylab.show() that updates IPython window.] call[name[IPython].display.display, parameter[call[name[pylab].gcf, parameter[]]]] if name[closeToo] begin[:] call[name[pylab].close, parameter[constant[all]]]
keyword[def] identifier[show] ( identifier[closeToo] = keyword[False] ): literal[string] identifier[IPython] . identifier[display] . identifier[display] ( identifier[pylab] . identifier[gcf] ()) keyword[if] identifier[closeToo] : identifier[pylab] . identifier[close] ( literal[string] )
def show(closeToo=False): """alternative to pylab.show() that updates IPython window.""" IPython.display.display(pylab.gcf()) if closeToo: pylab.close('all') # depends on [control=['if'], data=[]]
def frequency(self): """ How often the recurrence repeats. ("YEARLY", "MONTHLY", "WEEKLY", "DAILY") """ freqOptions = ("YEARLY", "MONTHLY", "WEEKLY", "DAILY") if self.rule._freq < len(freqOptions): return freqOptions[self.rule._freq] else: ...
def function[frequency, parameter[self]]: constant[ How often the recurrence repeats. ("YEARLY", "MONTHLY", "WEEKLY", "DAILY") ] variable[freqOptions] assign[=] tuple[[<ast.Constant object at 0x7da204621120>, <ast.Constant object at 0x7da2046223e0>, <ast.Constant object at 0x7da2...
keyword[def] identifier[frequency] ( identifier[self] ): literal[string] identifier[freqOptions] =( literal[string] , literal[string] , literal[string] , literal[string] ) keyword[if] identifier[self] . identifier[rule] . identifier[_freq] < identifier[len] ( identifier[freqOptions] ): ...
def frequency(self): """ How often the recurrence repeats. ("YEARLY", "MONTHLY", "WEEKLY", "DAILY") """ freqOptions = ('YEARLY', 'MONTHLY', 'WEEKLY', 'DAILY') if self.rule._freq < len(freqOptions): return freqOptions[self.rule._freq] # depends on [control=['if'], data=[]] ...
def stop(self, timeout=5): """Stop notifying Listeners when new :class:`~can.Message` objects arrive and call :meth:`~can.Listener.stop` on each Listener. :param float timeout: Max time in seconds to wait for receive threads to finish. Should be longer than timeout given...
def function[stop, parameter[self, timeout]]: constant[Stop notifying Listeners when new :class:`~can.Message` objects arrive and call :meth:`~can.Listener.stop` on each Listener. :param float timeout: Max time in seconds to wait for receive threads to finish. Should be ...
keyword[def] identifier[stop] ( identifier[self] , identifier[timeout] = literal[int] ): literal[string] identifier[self] . identifier[_running] = keyword[False] identifier[end_time] = identifier[time] . identifier[time] ()+ identifier[timeout] keyword[for] identifier[reader] ...
def stop(self, timeout=5): """Stop notifying Listeners when new :class:`~can.Message` objects arrive and call :meth:`~can.Listener.stop` on each Listener. :param float timeout: Max time in seconds to wait for receive threads to finish. Should be longer than timeout given at ...
def insert(self, dte, values): '''insert *values* at date *dte*.''' if len(values): dte = self.dateconvert(dte) if not self: self._date = np.array([dte]) self._data = np.array([values]) else: # search for the date ...
def function[insert, parameter[self, dte, values]]: constant[insert *values* at date *dte*.] if call[name[len], parameter[name[values]]] begin[:] variable[dte] assign[=] call[name[self].dateconvert, parameter[name[dte]]] if <ast.UnaryOp object at 0x7da1b0fbbfd0> begin[:] ...
keyword[def] identifier[insert] ( identifier[self] , identifier[dte] , identifier[values] ): literal[string] keyword[if] identifier[len] ( identifier[values] ): identifier[dte] = identifier[self] . identifier[dateconvert] ( identifier[dte] ) keyword[if] keyword[not] ide...
def insert(self, dte, values): """insert *values* at date *dte*.""" if len(values): dte = self.dateconvert(dte) if not self: self._date = np.array([dte]) self._data = np.array([values]) # depends on [control=['if'], data=[]] else: # search for the dat...
async def send(self, request: ClientRequest, **kwargs: Any) -> AsyncClientResponse: # type: ignore """Send the request using this HTTP sender. """ requests_kwargs = self._configure_send(request, **kwargs) return await super(AsyncRequestsHTTPSender, self).send(request, **requests_kwargs)
<ast.AsyncFunctionDef object at 0x7da18eb55a20>
keyword[async] keyword[def] identifier[send] ( identifier[self] , identifier[request] : identifier[ClientRequest] ,** identifier[kwargs] : identifier[Any] )-> identifier[AsyncClientResponse] : literal[string] identifier[requests_kwargs] = identifier[self] . identifier[_configure_send] ( identifier...
async def send(self, request: ClientRequest, **kwargs: Any) -> AsyncClientResponse: # type: ignore 'Send the request using this HTTP sender.\n ' requests_kwargs = self._configure_send(request, **kwargs) return await super(AsyncRequestsHTTPSender, self).send(request, **requests_kwargs)
def __read_lipd_contents(): """ Use the file metadata to read in the LiPD file contents as a dataset library :return dict: Metadata """ global files, settings _d = {} try: if len(files[".lpd"]) == 1: _d = lipd_read(files[".lpd"][0]["full_path"]) if settings["...
def function[__read_lipd_contents, parameter[]]: constant[ Use the file metadata to read in the LiPD file contents as a dataset library :return dict: Metadata ] <ast.Global object at 0x7da2044c20b0> variable[_d] assign[=] dictionary[[], []] <ast.Try object at 0x7da2044c2a70> ret...
keyword[def] identifier[__read_lipd_contents] (): literal[string] keyword[global] identifier[files] , identifier[settings] identifier[_d] ={} keyword[try] : keyword[if] identifier[len] ( identifier[files] [ literal[string] ])== literal[int] : identifier[_d] = identifier[l...
def __read_lipd_contents(): """ Use the file metadata to read in the LiPD file contents as a dataset library :return dict: Metadata """ global files, settings _d = {} try: if len(files['.lpd']) == 1: _d = lipd_read(files['.lpd'][0]['full_path']) if settings['...
def instantiate_objects(self, node): """ Recursively traverse a structure to identify dictionaries that represent objects that need to be instantiated Traverse all values of all dictionaries and all elements of all lists to identify dictionaries that contain the special "ENGINE" key whi...
def function[instantiate_objects, parameter[self, node]]: constant[ Recursively traverse a structure to identify dictionaries that represent objects that need to be instantiated Traverse all values of all dictionaries and all elements of all lists to identify dictionaries that contain the ...
keyword[def] identifier[instantiate_objects] ( identifier[self] , identifier[node] ): literal[string] identifier[result] = identifier[node] keyword[if] identifier[isinstance] ( identifier[node] , identifier[dict] ): keyword[if] literal[string] keyword[in] identifier[node]...
def instantiate_objects(self, node): """ Recursively traverse a structure to identify dictionaries that represent objects that need to be instantiated Traverse all values of all dictionaries and all elements of all lists to identify dictionaries that contain the special "ENGINE" key which i...