code
stringlengths
75
104k
code_sememe
stringlengths
47
309k
token_type
stringlengths
215
214k
code_dependency
stringlengths
75
155k
def pvector_field(item_type, optional=False, initial=()): """ Create checked ``PVector`` field. :param item_type: The required type for the items in the vector. :param optional: If true, ``None`` can be used as a value for this field. :param initial: Initial value to pass to factory if no v...
def function[pvector_field, parameter[item_type, optional, initial]]: constant[ Create checked ``PVector`` field. :param item_type: The required type for the items in the vector. :param optional: If true, ``None`` can be used as a value for this field. :param initial: Initial value to p...
keyword[def] identifier[pvector_field] ( identifier[item_type] , identifier[optional] = keyword[False] , identifier[initial] =()): literal[string] keyword[return] identifier[_sequence_field] ( identifier[CheckedPVector] , identifier[item_type] , identifier[optional] , identifier[initial] )
def pvector_field(item_type, optional=False, initial=()): """ Create checked ``PVector`` field. :param item_type: The required type for the items in the vector. :param optional: If true, ``None`` can be used as a value for this field. :param initial: Initial value to pass to factory if no v...
def generate_pdf_report(self, impact_function, iface, scenario_name): """Generate and store map and impact report from impact function. Directory where the report stored is specified by user input from the dialog. This function is adapted from analysis_utilities.py :param impact_functi...
def function[generate_pdf_report, parameter[self, impact_function, iface, scenario_name]]: constant[Generate and store map and impact report from impact function. Directory where the report stored is specified by user input from the dialog. This function is adapted from analysis_utilities.py ...
keyword[def] identifier[generate_pdf_report] ( identifier[self] , identifier[impact_function] , identifier[iface] , identifier[scenario_name] ): literal[string] identifier[output_dir] = identifier[self] . identifier[output_directory] . identifier[text] () identifier[file_path] = i...
def generate_pdf_report(self, impact_function, iface, scenario_name): """Generate and store map and impact report from impact function. Directory where the report stored is specified by user input from the dialog. This function is adapted from analysis_utilities.py :param impact_function: ...
def create_from_header(cls, header, ebins=None, pixels=None): """ Creates an HPX object from a FITS header. header : The FITS header ebins : Energy bin edges [optional] """ convname = HPX.identify_HPX_convention(header) conv = HPX_FITS_CONVENTIONS[convname] if ...
def function[create_from_header, parameter[cls, header, ebins, pixels]]: constant[ Creates an HPX object from a FITS header. header : The FITS header ebins : Energy bin edges [optional] ] variable[convname] assign[=] call[name[HPX].identify_HPX_convention, parameter[name[header...
keyword[def] identifier[create_from_header] ( identifier[cls] , identifier[header] , identifier[ebins] = keyword[None] , identifier[pixels] = keyword[None] ): literal[string] identifier[convname] = identifier[HPX] . identifier[identify_HPX_convention] ( identifier[header] ) identifier[conv...
def create_from_header(cls, header, ebins=None, pixels=None): """ Creates an HPX object from a FITS header. header : The FITS header ebins : Energy bin edges [optional] """ convname = HPX.identify_HPX_convention(header) conv = HPX_FITS_CONVENTIONS[convname] if conv.convname not...
def initialize(self, action): # type: (CliContext, settings.TransferAction) -> None """Initialize context :param CliContext self: this :param settings.TransferAction action: transfer action """ self._init_config() self.general_options = settings.create_general_opt...
def function[initialize, parameter[self, action]]: constant[Initialize context :param CliContext self: this :param settings.TransferAction action: transfer action ] call[name[self]._init_config, parameter[]] name[self].general_options assign[=] call[name[settings].create_...
keyword[def] identifier[initialize] ( identifier[self] , identifier[action] ): literal[string] identifier[self] . identifier[_init_config] () identifier[self] . identifier[general_options] = identifier[settings] . identifier[create_general_options] ( identifier[self] . identifier...
def initialize(self, action): # type: (CliContext, settings.TransferAction) -> None 'Initialize context\n :param CliContext self: this\n :param settings.TransferAction action: transfer action\n ' self._init_config() self.general_options = settings.create_general_options(self.config,...
def is_unzipped_x_duplicate(self, unzipped_x): """ param: unzipped_x: configuration assumed to be unzipped """ return self.is_zipped_x_duplicate(self.space.zip_inputs(np.atleast_2d(unzipped_x)))
def function[is_unzipped_x_duplicate, parameter[self, unzipped_x]]: constant[ param: unzipped_x: configuration assumed to be unzipped ] return[call[name[self].is_zipped_x_duplicate, parameter[call[name[self].space.zip_inputs, parameter[call[name[np].atleast_2d, parameter[name[unzipped_x]]]]]...
keyword[def] identifier[is_unzipped_x_duplicate] ( identifier[self] , identifier[unzipped_x] ): literal[string] keyword[return] identifier[self] . identifier[is_zipped_x_duplicate] ( identifier[self] . identifier[space] . identifier[zip_inputs] ( identifier[np] . identifier[atleast_2d] ( identifie...
def is_unzipped_x_duplicate(self, unzipped_x): """ param: unzipped_x: configuration assumed to be unzipped """ return self.is_zipped_x_duplicate(self.space.zip_inputs(np.atleast_2d(unzipped_x)))
def category_playlists(self, category_id, limit=20, offset=0, country=None): """Get a list of Spotify playlists tagged with a particular category. Parameters ---------- category_id : str The Spotify category ID for the category. limit : Optional[int] The ...
def function[category_playlists, parameter[self, category_id, limit, offset, country]]: constant[Get a list of Spotify playlists tagged with a particular category. Parameters ---------- category_id : str The Spotify category ID for the category. limit : Optional[int]...
keyword[def] identifier[category_playlists] ( identifier[self] , identifier[category_id] , identifier[limit] = literal[int] , identifier[offset] = literal[int] , identifier[country] = keyword[None] ): literal[string] identifier[route] = identifier[Route] ( literal[string] , literal[string] , identi...
def category_playlists(self, category_id, limit=20, offset=0, country=None): """Get a list of Spotify playlists tagged with a particular category. Parameters ---------- category_id : str The Spotify category ID for the category. limit : Optional[int] The maxi...
def run_copy(self, source_project_dataset_tables, destination_project_dataset_table, write_disposition='WRITE_EMPTY', create_disposition='CREATE_IF_NEEDED', labels=None): """ Executes a BigQuery copy command to copy dat...
def function[run_copy, parameter[self, source_project_dataset_tables, destination_project_dataset_table, write_disposition, create_disposition, labels]]: constant[ Executes a BigQuery copy command to copy data from one BigQuery table to another. See here: https://cloud.google.com/bigque...
keyword[def] identifier[run_copy] ( identifier[self] , identifier[source_project_dataset_tables] , identifier[destination_project_dataset_table] , identifier[write_disposition] = literal[string] , identifier[create_disposition] = literal[string] , identifier[labels] = keyword[None] ): literal[string] ...
def run_copy(self, source_project_dataset_tables, destination_project_dataset_table, write_disposition='WRITE_EMPTY', create_disposition='CREATE_IF_NEEDED', labels=None): """ Executes a BigQuery copy command to copy data from one BigQuery table to another. See here: https://cloud.google.com...
def downgrade(directory, sql, tag, x_arg, revision): """Revert to a previous version""" _downgrade(directory, revision, sql, tag, x_arg)
def function[downgrade, parameter[directory, sql, tag, x_arg, revision]]: constant[Revert to a previous version] call[name[_downgrade], parameter[name[directory], name[revision], name[sql], name[tag], name[x_arg]]]
keyword[def] identifier[downgrade] ( identifier[directory] , identifier[sql] , identifier[tag] , identifier[x_arg] , identifier[revision] ): literal[string] identifier[_downgrade] ( identifier[directory] , identifier[revision] , identifier[sql] , identifier[tag] , identifier[x_arg] )
def downgrade(directory, sql, tag, x_arg, revision): """Revert to a previous version""" _downgrade(directory, revision, sql, tag, x_arg)
def swo_stop(self): """! @brief Stop receiving SWO data.""" try: self._link.swo_configure(False, 0) except DAPAccess.Error as exc: six.raise_from(self._convert_exception(exc), exc)
def function[swo_stop, parameter[self]]: constant[! @brief Stop receiving SWO data.] <ast.Try object at 0x7da204566890>
keyword[def] identifier[swo_stop] ( identifier[self] ): literal[string] keyword[try] : identifier[self] . identifier[_link] . identifier[swo_configure] ( keyword[False] , literal[int] ) keyword[except] identifier[DAPAccess] . identifier[Error] keyword[as] identifier[exc] : ...
def swo_stop(self): """! @brief Stop receiving SWO data.""" try: self._link.swo_configure(False, 0) # depends on [control=['try'], data=[]] except DAPAccess.Error as exc: six.raise_from(self._convert_exception(exc), exc) # depends on [control=['except'], data=['exc']]
def dump( state, host, remote_filename, database=None, # Details for speaking to PostgreSQL via `psql` CLI postgresql_user=None, postgresql_password=None, postgresql_host=None, postgresql_port=None, ): ''' Dump a PostgreSQL database into a ``.sql`` file. Requires ``mysqldump``. + databa...
def function[dump, parameter[state, host, remote_filename, database, postgresql_user, postgresql_password, postgresql_host, postgresql_port]]: constant[ Dump a PostgreSQL database into a ``.sql`` file. Requires ``mysqldump``. + database: name of the database to dump + remote_filename: name of the f...
keyword[def] identifier[dump] ( identifier[state] , identifier[host] , identifier[remote_filename] , identifier[database] = keyword[None] , identifier[postgresql_user] = keyword[None] , identifier[postgresql_password] = keyword[None] , identifier[postgresql_host] = keyword[None] , identifier[postgresql_port] = k...
def dump(state, host, remote_filename, database=None, postgresql_user=None, postgresql_password=None, postgresql_host=None, postgresql_port=None): # Details for speaking to PostgreSQL via `psql` CLI '\n Dump a PostgreSQL database into a ``.sql`` file. Requires ``mysqldump``.\n\n + database: name of the da...
def get_api_items(api_doc_fd): """ Yield information about all public API items. Parse api.rst file from the documentation, and extract all the functions, methods, classes, attributes... This should include all pandas public API. Parameters ---------- api_doc_fd : file descriptor A...
def function[get_api_items, parameter[api_doc_fd]]: constant[ Yield information about all public API items. Parse api.rst file from the documentation, and extract all the functions, methods, classes, attributes... This should include all pandas public API. Parameters ---------- api_doc...
keyword[def] identifier[get_api_items] ( identifier[api_doc_fd] ): literal[string] identifier[current_module] = literal[string] identifier[previous_line] = identifier[current_section] = identifier[current_subsection] = literal[string] identifier[position] = keyword[None] keyword[for] ide...
def get_api_items(api_doc_fd): """ Yield information about all public API items. Parse api.rst file from the documentation, and extract all the functions, methods, classes, attributes... This should include all pandas public API. Parameters ---------- api_doc_fd : file descriptor A...
def shake_shake_skip_connection(x, output_filters, stride, is_training): """Adds a residual connection to the filter x for the shake-shake model.""" curr_filters = common_layers.shape_list(x)[-1] if curr_filters == output_filters: return x stride_spec = [1, stride, stride, 1] # Skip path 1. path1 = tf.n...
def function[shake_shake_skip_connection, parameter[x, output_filters, stride, is_training]]: constant[Adds a residual connection to the filter x for the shake-shake model.] variable[curr_filters] assign[=] call[call[name[common_layers].shape_list, parameter[name[x]]]][<ast.UnaryOp object at 0x7da1b201e...
keyword[def] identifier[shake_shake_skip_connection] ( identifier[x] , identifier[output_filters] , identifier[stride] , identifier[is_training] ): literal[string] identifier[curr_filters] = identifier[common_layers] . identifier[shape_list] ( identifier[x] )[- literal[int] ] keyword[if] identifier[curr_fi...
def shake_shake_skip_connection(x, output_filters, stride, is_training): """Adds a residual connection to the filter x for the shake-shake model.""" curr_filters = common_layers.shape_list(x)[-1] if curr_filters == output_filters: return x # depends on [control=['if'], data=[]] stride_spec = [1...
def deserialize(self, jwt, key=None): """Deserialize a JWT token. NOTE: Destroys any current status and tries to import the raw token provided. :param jwt: a 'raw' JWT token. :param key: A (:class:`jwcrypto.jwk.JWK`) verification or decryption key, or a (:class:`jwcryp...
def function[deserialize, parameter[self, jwt, key]]: constant[Deserialize a JWT token. NOTE: Destroys any current status and tries to import the raw token provided. :param jwt: a 'raw' JWT token. :param key: A (:class:`jwcrypto.jwk.JWK`) verification or decryption key...
keyword[def] identifier[deserialize] ( identifier[self] , identifier[jwt] , identifier[key] = keyword[None] ): literal[string] identifier[c] = identifier[jwt] . identifier[count] ( literal[string] ) keyword[if] identifier[c] == literal[int] : identifier[self] . identifier[tok...
def deserialize(self, jwt, key=None): """Deserialize a JWT token. NOTE: Destroys any current status and tries to import the raw token provided. :param jwt: a 'raw' JWT token. :param key: A (:class:`jwcrypto.jwk.JWK`) verification or decryption key, or a (:class:`jwcrypto.j...
def V_hollow_cylinder(Di, Do, L): r'''Returns the volume of a hollow cylinder. .. math:: V = \frac{\pi D_o^2}{4}L - L\frac{\pi D_i^2}{4} Parameters ---------- Di : float Diameter of the hollow in the cylinder, [m] Do : float Diameter of the exterior of the cylinder, [m]...
def function[V_hollow_cylinder, parameter[Di, Do, L]]: constant[Returns the volume of a hollow cylinder. .. math:: V = \frac{\pi D_o^2}{4}L - L\frac{\pi D_i^2}{4} Parameters ---------- Di : float Diameter of the hollow in the cylinder, [m] Do : float Diameter of the...
keyword[def] identifier[V_hollow_cylinder] ( identifier[Di] , identifier[Do] , identifier[L] ): literal[string] identifier[V] = identifier[pi] * identifier[Do] ** literal[int] / literal[int] * identifier[L] - identifier[pi] * identifier[Di] ** literal[int] / literal[int] * identifier[L] keyword[retur...
def V_hollow_cylinder(Di, Do, L): """Returns the volume of a hollow cylinder. .. math:: V = \\frac{\\pi D_o^2}{4}L - L\\frac{\\pi D_i^2}{4} Parameters ---------- Di : float Diameter of the hollow in the cylinder, [m] Do : float Diameter of the exterior of the cylinder, ...
def set_orthogonal_selection(self, selection, value, fields=None): """Modify data via a selection for each dimension of the array. Parameters ---------- selection : tuple A selection for each dimension of the array. May be any combination of int, slice, integer a...
def function[set_orthogonal_selection, parameter[self, selection, value, fields]]: constant[Modify data via a selection for each dimension of the array. Parameters ---------- selection : tuple A selection for each dimension of the array. May be any combination of int, ...
keyword[def] identifier[set_orthogonal_selection] ( identifier[self] , identifier[selection] , identifier[value] , identifier[fields] = keyword[None] ): literal[string] keyword[if] identifier[self] . identifier[_read_only] : identifier[err_read_only] () ...
def set_orthogonal_selection(self, selection, value, fields=None): """Modify data via a selection for each dimension of the array. Parameters ---------- selection : tuple A selection for each dimension of the array. May be any combination of int, slice, integer array...
def groupby2(*args): """ Like itertools.groupby, with the following additions: - Supports multiple sequences. Instead of returning (k, g), each iteration returns (k, g0, g1, ...), with one `g` for each input sequence. The value of each `g` is either a non-empty iterator or `None`. - It treats the value `...
def function[groupby2, parameter[]]: constant[ Like itertools.groupby, with the following additions: - Supports multiple sequences. Instead of returning (k, g), each iteration returns (k, g0, g1, ...), with one `g` for each input sequence. The value of each `g` is either a non-empty iterator or `None...
keyword[def] identifier[groupby2] (* identifier[args] ): literal[string] identifier[generatorList] =[] keyword[if] identifier[len] ( identifier[args] )% literal[int] == literal[int] : keyword[raise] identifier[ValueError] ( literal[string] ) identifier[advanceList] =[] keyword[for] ident...
def groupby2(*args): """ Like itertools.groupby, with the following additions: - Supports multiple sequences. Instead of returning (k, g), each iteration returns (k, g0, g1, ...), with one `g` for each input sequence. The value of each `g` is either a non-empty iterator or `None`. - It treats the value...
def bits_clear_in_range( bits, range_start, range_end ): """ Yield start,end tuples for each span of clear bits in [range_start,range_end) """ end = range_start while 1: start = bits.next_clear( end ) if start >= range_end: break end = min( bits.next_set( start ), range_end )...
def function[bits_clear_in_range, parameter[bits, range_start, range_end]]: constant[ Yield start,end tuples for each span of clear bits in [range_start,range_end) ] variable[end] assign[=] name[range_start] while constant[1] begin[:] variable[start] assign[=] call[name[b...
keyword[def] identifier[bits_clear_in_range] ( identifier[bits] , identifier[range_start] , identifier[range_end] ): literal[string] identifier[end] = identifier[range_start] keyword[while] literal[int] : identifier[start] = identifier[bits] . identifier[next_clear] ( identifier[end] ) ...
def bits_clear_in_range(bits, range_start, range_end): """ Yield start,end tuples for each span of clear bits in [range_start,range_end) """ end = range_start while 1: start = bits.next_clear(end) if start >= range_end: break # depends on [control=['if'], data=[]] ...
def merge(self, other): ''' Returns a *copy* of this phoneme, with the features of other merged into this feature bundle. Other can be a list of phonemes, in which case the list is returned (for technical reasons). Other may also be a single feature value or a list of feature values. ''' phoneme = dee...
def function[merge, parameter[self, other]]: constant[ Returns a *copy* of this phoneme, with the features of other merged into this feature bundle. Other can be a list of phonemes, in which case the list is returned (for technical reasons). Other may also be a single feature value or a list of feature va...
keyword[def] identifier[merge] ( identifier[self] , identifier[other] ): literal[string] identifier[phoneme] = identifier[deepcopy] ( identifier[self] ) keyword[if] identifier[isinstance] ( identifier[other] , identifier[list] ) keyword[and] identifier[len] ( identifier[other] )> literal[int] ke...
def merge(self, other): """ Returns a *copy* of this phoneme, with the features of other merged into this feature bundle. Other can be a list of phonemes, in which case the list is returned (for technical reasons). Other may also be a single feature value or a list of feature values. """ phoneme = deepc...
def __should_warn_on_redef( ctx: GeneratorContext, defsym: sym.Symbol, safe_name: str, def_meta: lmap.Map ) -> bool: """Return True if the compiler should emit a warning about this name being redefined.""" no_warn_on_redef = def_meta.entry(SYM_NO_WARN_ON_REDEF_META_KEY, False) if no_warn_on_redef: ...
def function[__should_warn_on_redef, parameter[ctx, defsym, safe_name, def_meta]]: constant[Return True if the compiler should emit a warning about this name being redefined.] variable[no_warn_on_redef] assign[=] call[name[def_meta].entry, parameter[name[SYM_NO_WARN_ON_REDEF_META_KEY], constant[False]]]...
keyword[def] identifier[__should_warn_on_redef] ( identifier[ctx] : identifier[GeneratorContext] , identifier[defsym] : identifier[sym] . identifier[Symbol] , identifier[safe_name] : identifier[str] , identifier[def_meta] : identifier[lmap] . identifier[Map] )-> identifier[bool] : literal[string] identif...
def __should_warn_on_redef(ctx: GeneratorContext, defsym: sym.Symbol, safe_name: str, def_meta: lmap.Map) -> bool: """Return True if the compiler should emit a warning about this name being redefined.""" no_warn_on_redef = def_meta.entry(SYM_NO_WARN_ON_REDEF_META_KEY, False) if no_warn_on_redef: ret...
def _bottom(self): """Index of row following last row of range""" _, top, _, height = self._extents return top + height
def function[_bottom, parameter[self]]: constant[Index of row following last row of range] <ast.Tuple object at 0x7da20c6a9390> assign[=] name[self]._extents return[binary_operation[name[top] + name[height]]]
keyword[def] identifier[_bottom] ( identifier[self] ): literal[string] identifier[_] , identifier[top] , identifier[_] , identifier[height] = identifier[self] . identifier[_extents] keyword[return] identifier[top] + identifier[height]
def _bottom(self): """Index of row following last row of range""" (_, top, _, height) = self._extents return top + height
def sent_splitter_ja(text, delimiters=set(u'。.?!\n\r'), parenthesis=u'()「」『』“”'): ''' Args: text: unicode string that contains multiple Japanese sentences. delimiters: set() of sentence delimiter characters. parenthesis: to be checked its correspondence. Returns: ...
def function[sent_splitter_ja, parameter[text, delimiters, parenthesis]]: constant[ Args: text: unicode string that contains multiple Japanese sentences. delimiters: set() of sentence delimiter characters. parenthesis: to be checked its correspondence. Returns: generator that yie...
keyword[def] identifier[sent_splitter_ja] ( identifier[text] , identifier[delimiters] = identifier[set] ( literal[string] ), identifier[parenthesis] = literal[string] ): literal[string] identifier[paren_chars] = identifier[set] ( identifier[parenthesis] ) identifier[close2open] = identifier[dict] ( i...
def sent_splitter_ja(text, delimiters=set(u'。.?!\n\r'), parenthesis=u'()「」『』“”'): """ Args: text: unicode string that contains multiple Japanese sentences. delimiters: set() of sentence delimiter characters. parenthesis: to be checked its correspondence. Returns: generator that yield...
def try_number(value): """ Attempt to cast the string `value` to an int, and failing that, a float, failing that, raise a ValueError. """ for cast_function in [int, float]: try: return cast_function(value) except ValueError: pass raise ValueError("Unable...
def function[try_number, parameter[value]]: constant[ Attempt to cast the string `value` to an int, and failing that, a float, failing that, raise a ValueError. ] for taget[name[cast_function]] in starred[list[[<ast.Name object at 0x7da1b2407610>, <ast.Name object at 0x7da1b2407190>]]] begin...
keyword[def] identifier[try_number] ( identifier[value] ): literal[string] keyword[for] identifier[cast_function] keyword[in] [ identifier[int] , identifier[float] ]: keyword[try] : keyword[return] identifier[cast_function] ( identifier[value] ) keyword[except] identifie...
def try_number(value): """ Attempt to cast the string `value` to an int, and failing that, a float, failing that, raise a ValueError. """ for cast_function in [int, float]: try: return cast_function(value) # depends on [control=['try'], data=[]] except ValueError: ...
def _initial_broks(self, broker_name): """Get initial_broks from the scheduler This is used by the brokers to prepare the initial status broks This do not send broks, it only makes scheduler internal processing. Then the broker must use the *_broks* API to get all the stuff :p...
def function[_initial_broks, parameter[self, broker_name]]: constant[Get initial_broks from the scheduler This is used by the brokers to prepare the initial status broks This do not send broks, it only makes scheduler internal processing. Then the broker must use the *_broks* API to ge...
keyword[def] identifier[_initial_broks] ( identifier[self] , identifier[broker_name] ): literal[string] keyword[with] identifier[self] . identifier[app] . identifier[conf_lock] : identifier[logger] . identifier[info] ( literal[string] , identifier[broker_name] ) keyword[r...
def _initial_broks(self, broker_name): """Get initial_broks from the scheduler This is used by the brokers to prepare the initial status broks This do not send broks, it only makes scheduler internal processing. Then the broker must use the *_broks* API to get all the stuff :param...
def attach_schema(self, schem): """Add a tuple schema to this object (externally imposed)""" self.tuple_schema = schema.AndSchema.make(self.tuple_schema, schem)
def function[attach_schema, parameter[self, schem]]: constant[Add a tuple schema to this object (externally imposed)] name[self].tuple_schema assign[=] call[name[schema].AndSchema.make, parameter[name[self].tuple_schema, name[schem]]]
keyword[def] identifier[attach_schema] ( identifier[self] , identifier[schem] ): literal[string] identifier[self] . identifier[tuple_schema] = identifier[schema] . identifier[AndSchema] . identifier[make] ( identifier[self] . identifier[tuple_schema] , identifier[schem] )
def attach_schema(self, schem): """Add a tuple schema to this object (externally imposed)""" self.tuple_schema = schema.AndSchema.make(self.tuple_schema, schem)
def convert(dbus_obj): """Converts dbus_obj from dbus type to python type. :param dbus_obj: dbus object. :returns: dbus_obj in python type. """ _isinstance = partial(isinstance, dbus_obj) ConvertType = namedtuple('ConvertType', 'pytype dbustypes') pyint = ConvertType(int, (dbus.Byte, dbus....
def function[convert, parameter[dbus_obj]]: constant[Converts dbus_obj from dbus type to python type. :param dbus_obj: dbus object. :returns: dbus_obj in python type. ] variable[_isinstance] assign[=] call[name[partial], parameter[name[isinstance], name[dbus_obj]]] variable[ConvertT...
keyword[def] identifier[convert] ( identifier[dbus_obj] ): literal[string] identifier[_isinstance] = identifier[partial] ( identifier[isinstance] , identifier[dbus_obj] ) identifier[ConvertType] = identifier[namedtuple] ( literal[string] , literal[string] ) identifier[pyint] = identifier[Convert...
def convert(dbus_obj): """Converts dbus_obj from dbus type to python type. :param dbus_obj: dbus object. :returns: dbus_obj in python type. """ _isinstance = partial(isinstance, dbus_obj) ConvertType = namedtuple('ConvertType', 'pytype dbustypes') pyint = ConvertType(int, (dbus.Byte, dbus.I...
def send_direct_message(self, text, user=None, delegate=None, screen_name=None, user_id=None, params={}): """Send a direct message """ params = params.copy() if user is not None: params['user'] = user if user_id is not None: params['user_id'] = user_id ...
def function[send_direct_message, parameter[self, text, user, delegate, screen_name, user_id, params]]: constant[Send a direct message ] variable[params] assign[=] call[name[params].copy, parameter[]] if compare[name[user] is_not constant[None]] begin[:] call[name[params]...
keyword[def] identifier[send_direct_message] ( identifier[self] , identifier[text] , identifier[user] = keyword[None] , identifier[delegate] = keyword[None] , identifier[screen_name] = keyword[None] , identifier[user_id] = keyword[None] , identifier[params] ={}): literal[string] identifier[params] ...
def send_direct_message(self, text, user=None, delegate=None, screen_name=None, user_id=None, params={}): """Send a direct message """ params = params.copy() if user is not None: params['user'] = user # depends on [control=['if'], data=['user']] if user_id is not None: params['u...
def handle_tick(self): """Internal callback every time 1 second has passed.""" self.uptime += 1 for name, interval in self.ticks.items(): if interval == 0: continue self.tick_counters[name] += 1 if self.tick_counters[name] == interval: ...
def function[handle_tick, parameter[self]]: constant[Internal callback every time 1 second has passed.] <ast.AugAssign object at 0x7da20e9b2ef0> for taget[tuple[[<ast.Name object at 0x7da20e9b22f0>, <ast.Name object at 0x7da20e9b2320>]]] in starred[call[name[self].ticks.items, parameter[]]] begin[:]...
keyword[def] identifier[handle_tick] ( identifier[self] ): literal[string] identifier[self] . identifier[uptime] += literal[int] keyword[for] identifier[name] , identifier[interval] keyword[in] identifier[self] . identifier[ticks] . identifier[items] (): keyword[if] ide...
def handle_tick(self): """Internal callback every time 1 second has passed.""" self.uptime += 1 for (name, interval) in self.ticks.items(): if interval == 0: continue # depends on [control=['if'], data=[]] self.tick_counters[name] += 1 if self.tick_counters[name] == inte...
def serialize(self): """Returns serialized chunk data in dictionary.""" return { 'word': self.word, 'pos': self.pos, 'label': self.label, 'dependency': self.dependency, 'has_cjk': self.has_cjk(), }
def function[serialize, parameter[self]]: constant[Returns serialized chunk data in dictionary.] return[dictionary[[<ast.Constant object at 0x7da1b12f2230>, <ast.Constant object at 0x7da1b12f2470>, <ast.Constant object at 0x7da1b12f0ca0>, <ast.Constant object at 0x7da1b12f1330>, <ast.Constant object at 0x7d...
keyword[def] identifier[serialize] ( identifier[self] ): literal[string] keyword[return] { literal[string] : identifier[self] . identifier[word] , literal[string] : identifier[self] . identifier[pos] , literal[string] : identifier[self] . identifier[label] , literal[string] : identifier...
def serialize(self): """Returns serialized chunk data in dictionary.""" return {'word': self.word, 'pos': self.pos, 'label': self.label, 'dependency': self.dependency, 'has_cjk': self.has_cjk()}
def encrypt(self, key, iv="", cek="", **kwargs): """ Produces a JWE as defined in RFC7516 using symmetric keys :param key: Shared symmetric key :param iv: Initialization vector :param cek: Content master key :param kwargs: Extra keyword arguments, just ignore for now. ...
def function[encrypt, parameter[self, key, iv, cek]]: constant[ Produces a JWE as defined in RFC7516 using symmetric keys :param key: Shared symmetric key :param iv: Initialization vector :param cek: Content master key :param kwargs: Extra keyword arguments, just ignore ...
keyword[def] identifier[encrypt] ( identifier[self] , identifier[key] , identifier[iv] = literal[string] , identifier[cek] = literal[string] ,** identifier[kwargs] ): literal[string] identifier[_msg] = identifier[as_bytes] ( identifier[self] . identifier[msg] ) identifier[_args] = identif...
def encrypt(self, key, iv='', cek='', **kwargs): """ Produces a JWE as defined in RFC7516 using symmetric keys :param key: Shared symmetric key :param iv: Initialization vector :param cek: Content master key :param kwargs: Extra keyword arguments, just ignore for now. ...
def search(self, buf): """Search the provided buffer for matching bytes. Search the provided buffer for matching bytes. If the *match* is found, returns a :class:`SequenceMatch` object, otherwise returns ``None``. :param buf: Buffer to search for a match. :return: :class:`Seque...
def function[search, parameter[self, buf]]: constant[Search the provided buffer for matching bytes. Search the provided buffer for matching bytes. If the *match* is found, returns a :class:`SequenceMatch` object, otherwise returns ``None``. :param buf: Buffer to search for a match. ...
keyword[def] identifier[search] ( identifier[self] , identifier[buf] ): literal[string] identifier[idx] = identifier[self] . identifier[_check_type] ( identifier[buf] ). identifier[find] ( identifier[self] . identifier[_bytes] ) keyword[if] identifier[idx] < literal[int] : ke...
def search(self, buf): """Search the provided buffer for matching bytes. Search the provided buffer for matching bytes. If the *match* is found, returns a :class:`SequenceMatch` object, otherwise returns ``None``. :param buf: Buffer to search for a match. :return: :class:`SequenceM...
def rpc_get_oneline_docstring(self, filename, source, offset): """Get a oneline docstring for the symbol at the offset. """ return self._call_backend("rpc_get_oneline_docstring", None, filename, get_source(source), offset)
def function[rpc_get_oneline_docstring, parameter[self, filename, source, offset]]: constant[Get a oneline docstring for the symbol at the offset. ] return[call[name[self]._call_backend, parameter[constant[rpc_get_oneline_docstring], constant[None], name[filename], call[name[get_source], parameter[...
keyword[def] identifier[rpc_get_oneline_docstring] ( identifier[self] , identifier[filename] , identifier[source] , identifier[offset] ): literal[string] keyword[return] identifier[self] . identifier[_call_backend] ( literal[string] , keyword[None] , identifier[filename] , identifier[get_...
def rpc_get_oneline_docstring(self, filename, source, offset): """Get a oneline docstring for the symbol at the offset. """ return self._call_backend('rpc_get_oneline_docstring', None, filename, get_source(source), offset)
def query(cls, resources, time_range, query, resource_type, sampler): """Query statistics for given resources.""" if not isinstance(resources, (list, tuple)): resources = [resources] now = time.time() start_utc = datetime.utcfromtimestamp(now - time_range) end_utc = ...
def function[query, parameter[cls, resources, time_range, query, resource_type, sampler]]: constant[Query statistics for given resources.] if <ast.UnaryOp object at 0x7da207f984c0> begin[:] variable[resources] assign[=] list[[<ast.Name object at 0x7da207f9a530>]] variable[now] as...
keyword[def] identifier[query] ( identifier[cls] , identifier[resources] , identifier[time_range] , identifier[query] , identifier[resource_type] , identifier[sampler] ): literal[string] keyword[if] keyword[not] identifier[isinstance] ( identifier[resources] ,( identifier[list] , identifier[tuple...
def query(cls, resources, time_range, query, resource_type, sampler): """Query statistics for given resources.""" if not isinstance(resources, (list, tuple)): resources = [resources] # depends on [control=['if'], data=[]] now = time.time() start_utc = datetime.utcfromtimestamp(now - time_range)...
def get_keyword_hierarchy(self, pattern="*"): """Returns all keywords that match a glob-style pattern The result is a list of dictionaries, sorted by collection name. The pattern matching is insensitive to case. The function returns a list of (library_name, keyword_name, ...
def function[get_keyword_hierarchy, parameter[self, pattern]]: constant[Returns all keywords that match a glob-style pattern The result is a list of dictionaries, sorted by collection name. The pattern matching is insensitive to case. The function returns a list of (library_nam...
keyword[def] identifier[get_keyword_hierarchy] ( identifier[self] , identifier[pattern] = literal[string] ): literal[string] identifier[sql] = literal[string] identifier[cursor] = identifier[self] . identifier[_execute] ( identifier[sql] ,( identifier[self] . identifier[_glob_to_sql] ( i...
def get_keyword_hierarchy(self, pattern='*'): """Returns all keywords that match a glob-style pattern The result is a list of dictionaries, sorted by collection name. The pattern matching is insensitive to case. The function returns a list of (library_name, keyword_name, ke...
def get_cmd(self): """Returns the full command to be executed at runtime""" cmd = None if self.test_program in ('nose', 'nosetests'): cmd = "nosetests %s" % self.file_path elif self.test_program == 'django': executable = "%s/manage.py" % self.file_path ...
def function[get_cmd, parameter[self]]: constant[Returns the full command to be executed at runtime] variable[cmd] assign[=] constant[None] if compare[name[self].test_program in tuple[[<ast.Constant object at 0x7da18f723ac0>, <ast.Constant object at 0x7da18f722a40>]]] begin[:] va...
keyword[def] identifier[get_cmd] ( identifier[self] ): literal[string] identifier[cmd] = keyword[None] keyword[if] identifier[self] . identifier[test_program] keyword[in] ( literal[string] , literal[string] ): identifier[cmd] = literal[string] % identifier[self] . identifi...
def get_cmd(self): """Returns the full command to be executed at runtime""" cmd = None if self.test_program in ('nose', 'nosetests'): cmd = 'nosetests %s' % self.file_path # depends on [control=['if'], data=[]] elif self.test_program == 'django': executable = '%s/manage.py' % self.file_...
def index(self, attr): """ Indexes the :class:`.Paper`\s in this :class:`.Corpus` instance by the attribute ``attr``. New indices are added to :attr:`.indices`\. Parameters ---------- attr : str The name of a :class:`.Paper` attribute. """ ...
def function[index, parameter[self, attr]]: constant[ Indexes the :class:`.Paper`\s in this :class:`.Corpus` instance by the attribute ``attr``. New indices are added to :attr:`.indices`\. Parameters ---------- attr : str The name of a :class:`.Paper...
keyword[def] identifier[index] ( identifier[self] , identifier[attr] ): literal[string] keyword[for] identifier[i] , identifier[paper] keyword[in] identifier[self] . identifier[indexed_papers] . identifier[iteritems] (): identifier[self] . identifier[index_paper_by_attr] ( identifi...
def index(self, attr): """ Indexes the :class:`.Paper`\\s in this :class:`.Corpus` instance by the attribute ``attr``. New indices are added to :attr:`.indices`\\. Parameters ---------- attr : str The name of a :class:`.Paper` attribute. """ ...
def last(self) -> Signature: """ Retrieve the last Signature ordered by mangling descendant """ k = sorted(self._hsig.keys()) return self._hsig[k[-1]]
def function[last, parameter[self]]: constant[ Retrieve the last Signature ordered by mangling descendant ] variable[k] assign[=] call[name[sorted], parameter[call[name[self]._hsig.keys, parameter[]]]] return[call[name[self]._hsig][call[name[k]][<ast.UnaryOp object at 0x7da1b0146a70>]]]
keyword[def] identifier[last] ( identifier[self] )-> identifier[Signature] : literal[string] identifier[k] = identifier[sorted] ( identifier[self] . identifier[_hsig] . identifier[keys] ()) keyword[return] identifier[self] . identifier[_hsig] [ identifier[k] [- literal[int] ]]
def last(self) -> Signature: """ Retrieve the last Signature ordered by mangling descendant """ k = sorted(self._hsig.keys()) return self._hsig[k[-1]]
def load_itasser_folder(self, ident, itasser_folder, organize=False, outdir=None, organize_name=None, set_as_representative=False, representative_chain='X', force_rerun=False): """Load the results folder from an I-TASSER run (local, not from the website) and copy relevant files over ...
def function[load_itasser_folder, parameter[self, ident, itasser_folder, organize, outdir, organize_name, set_as_representative, representative_chain, force_rerun]]: constant[Load the results folder from an I-TASSER run (local, not from the website) and copy relevant files over to the protein structures...
keyword[def] identifier[load_itasser_folder] ( identifier[self] , identifier[ident] , identifier[itasser_folder] , identifier[organize] = keyword[False] , identifier[outdir] = keyword[None] , identifier[organize_name] = keyword[None] , identifier[set_as_representative] = keyword[False] , identifier[representative_ch...
def load_itasser_folder(self, ident, itasser_folder, organize=False, outdir=None, organize_name=None, set_as_representative=False, representative_chain='X', force_rerun=False): """Load the results folder from an I-TASSER run (local, not from the website) and copy relevant files over to the protein structure...
def update_throughput(self, read_units, write_units): """ Update the ProvisionedThroughput for the Amazon DynamoDB Table. :type read_units: int :param read_units: The new value for ReadCapacityUnits. :type write_units: int :param write_units: The new value for W...
def function[update_throughput, parameter[self, read_units, write_units]]: constant[ Update the ProvisionedThroughput for the Amazon DynamoDB Table. :type read_units: int :param read_units: The new value for ReadCapacityUnits. :type write_units: int :param write...
keyword[def] identifier[update_throughput] ( identifier[self] , identifier[read_units] , identifier[write_units] ): literal[string] identifier[self] . identifier[layer2] . identifier[update_throughput] ( identifier[self] , identifier[read_units] , identifier[write_units] )
def update_throughput(self, read_units, write_units): """ Update the ProvisionedThroughput for the Amazon DynamoDB Table. :type read_units: int :param read_units: The new value for ReadCapacityUnits. :type write_units: int :param write_units: The new value for Write...
def notify(self, num=1): """wake one or more waiting greenlets :param num: the number of waiters to wake (default 1) :type num: int :raises: `RuntimeError` if the underlying lock hasn't been :meth:`acquired <Lock.acquire>` """ if not self._is_own...
def function[notify, parameter[self, num]]: constant[wake one or more waiting greenlets :param num: the number of waiters to wake (default 1) :type num: int :raises: `RuntimeError` if the underlying lock hasn't been :meth:`acquired <Lock.acquire>` ] ...
keyword[def] identifier[notify] ( identifier[self] , identifier[num] = literal[int] ): literal[string] keyword[if] keyword[not] identifier[self] . identifier[_is_owned] (): keyword[raise] identifier[RuntimeError] ( literal[string] ) keyword[for] identifier[i] keyword[in] ...
def notify(self, num=1): """wake one or more waiting greenlets :param num: the number of waiters to wake (default 1) :type num: int :raises: `RuntimeError` if the underlying lock hasn't been :meth:`acquired <Lock.acquire>` """ if not self._is_owned(): ...
def _infer_x_for_line(y): """ Infers the x for a line if no x is provided. """ array_shape = shape(y) if len(array_shape) == 0: return [] if len(array_shape) == 1: return arange(array_shape[0]) if len(array_shape) > 1: return arange(array_shape[1])
def function[_infer_x_for_line, parameter[y]]: constant[ Infers the x for a line if no x is provided. ] variable[array_shape] assign[=] call[name[shape], parameter[name[y]]] if compare[call[name[len], parameter[name[array_shape]]] equal[==] constant[0]] begin[:] return[list[[]]] ...
keyword[def] identifier[_infer_x_for_line] ( identifier[y] ): literal[string] identifier[array_shape] = identifier[shape] ( identifier[y] ) keyword[if] identifier[len] ( identifier[array_shape] )== literal[int] : keyword[return] [] keyword[if] identifier[len] ( identifier[array_shape]...
def _infer_x_for_line(y): """ Infers the x for a line if no x is provided. """ array_shape = shape(y) if len(array_shape) == 0: return [] # depends on [control=['if'], data=[]] if len(array_shape) == 1: return arange(array_shape[0]) # depends on [control=['if'], data=[]] if...
def get_usrgos_w_parents(self, hdrgos, usrgos_all=None): """Get usrgos w/parents in hdrgos, even if usrgos did not get grouped under hdrgos.""" usrgos = set() _go2parents = self.gosubdag.rcntobj.go2parents if usrgos_all is None: usrgos_all = self.usrgos for usrgo in u...
def function[get_usrgos_w_parents, parameter[self, hdrgos, usrgos_all]]: constant[Get usrgos w/parents in hdrgos, even if usrgos did not get grouped under hdrgos.] variable[usrgos] assign[=] call[name[set], parameter[]] variable[_go2parents] assign[=] name[self].gosubdag.rcntobj.go2parents ...
keyword[def] identifier[get_usrgos_w_parents] ( identifier[self] , identifier[hdrgos] , identifier[usrgos_all] = keyword[None] ): literal[string] identifier[usrgos] = identifier[set] () identifier[_go2parents] = identifier[self] . identifier[gosubdag] . identifier[rcntobj] . identifier[go2...
def get_usrgos_w_parents(self, hdrgos, usrgos_all=None): """Get usrgos w/parents in hdrgos, even if usrgos did not get grouped under hdrgos.""" usrgos = set() _go2parents = self.gosubdag.rcntobj.go2parents if usrgos_all is None: usrgos_all = self.usrgos # depends on [control=['if'], data=['usrg...
async def _create_rev_reg(self, rr_id: str, rr_size: int = None) -> None: """ Create revocation registry and new tails file (and association to corresponding revocation registry definition via symbolic link) for input revocation registry identifier. :param rr_id: revocation regi...
<ast.AsyncFunctionDef object at 0x7da18f7239d0>
keyword[async] keyword[def] identifier[_create_rev_reg] ( identifier[self] , identifier[rr_id] : identifier[str] , identifier[rr_size] : identifier[int] = keyword[None] )-> keyword[None] : literal[string] identifier[LOGGER] . identifier[debug] ( literal[string] , identifier[rr_id] , identifier[rr...
async def _create_rev_reg(self, rr_id: str, rr_size: int=None) -> None: """ Create revocation registry and new tails file (and association to corresponding revocation registry definition via symbolic link) for input revocation registry identifier. :param rr_id: revocation registry i...
def _serialize( self, element, # type: ET.Element value, # type: Any state # type: _ProcessorState ): # type: (...) -> None """Serialize the value to the element.""" xml_value = _hooks_apply_before_serialize(self._hooks, state, value) ...
def function[_serialize, parameter[self, element, value, state]]: constant[Serialize the value to the element.] variable[xml_value] assign[=] call[name[_hooks_apply_before_serialize], parameter[name[self]._hooks, name[state], name[value]]] if compare[name[xml_value] is constant[None]] begin[:] ...
keyword[def] identifier[_serialize] ( identifier[self] , identifier[element] , identifier[value] , identifier[state] ): literal[string] identifier[xml_value] = identifier[_hooks_apply_before_serialize] ( identifier[self] . identifier[_hooks] , identifier[state] , identifier[value] ) ...
def _serialize(self, element, value, state): # type: ET.Element # type: Any # type: _ProcessorState # type: (...) -> None 'Serialize the value to the element.' xml_value = _hooks_apply_before_serialize(self._hooks, state, value) # A value is only considered missing, and hence eligible to be rep...
def _group(self, element): """Parses the XML element as a group of [unknown] number of lines.""" for v in _get_xml_version(element): if "name" in element.attrib: g = TemplateGroup(element, self.versions[v].comment) self.versions[v].entries[g.identifier] = g ...
def function[_group, parameter[self, element]]: constant[Parses the XML element as a group of [unknown] number of lines.] for taget[name[v]] in starred[call[name[_get_xml_version], parameter[name[element]]]] begin[:] if compare[constant[name] in name[element].attrib] begin[:] ...
keyword[def] identifier[_group] ( identifier[self] , identifier[element] ): literal[string] keyword[for] identifier[v] keyword[in] identifier[_get_xml_version] ( identifier[element] ): keyword[if] literal[string] keyword[in] identifier[element] . identifier[attrib] : ...
def _group(self, element): """Parses the XML element as a group of [unknown] number of lines.""" for v in _get_xml_version(element): if 'name' in element.attrib: g = TemplateGroup(element, self.versions[v].comment) self.versions[v].entries[g.identifier] = g self.versi...
def save(self, chunk_size=DEFAULT_DATA_CHUNK_SIZE, named=False): """ Get a tarball of an image. Similar to the ``docker save`` command. Args: chunk_size (int): The generator will return up to that much data per iteration, but may return less. If ``None``, data will b...
def function[save, parameter[self, chunk_size, named]]: constant[ Get a tarball of an image. Similar to the ``docker save`` command. Args: chunk_size (int): The generator will return up to that much data per iteration, but may return less. If ``None``, data will be ...
keyword[def] identifier[save] ( identifier[self] , identifier[chunk_size] = identifier[DEFAULT_DATA_CHUNK_SIZE] , identifier[named] = keyword[False] ): literal[string] identifier[img] = identifier[self] . identifier[id] keyword[if] identifier[named] : identifier[img] = ident...
def save(self, chunk_size=DEFAULT_DATA_CHUNK_SIZE, named=False): """ Get a tarball of an image. Similar to the ``docker save`` command. Args: chunk_size (int): The generator will return up to that much data per iteration, but may return less. If ``None``, data will be ...
def append_vector(self, name, vector, _left=False): """Add a data vectors column.""" if np.issubdtype(vector.dtype, np.integer): # determine the length we need largest = str(max(vector.max(), vector.min(), key=abs)) length = max(len(largest), min(7, len(name))) # how...
def function[append_vector, parameter[self, name, vector, _left]]: constant[Add a data vectors column.] if call[name[np].issubdtype, parameter[name[vector].dtype, name[np].integer]] begin[:] variable[largest] assign[=] call[name[str], parameter[call[name[max], parameter[call[name[vector]...
keyword[def] identifier[append_vector] ( identifier[self] , identifier[name] , identifier[vector] , identifier[_left] = keyword[False] ): literal[string] keyword[if] identifier[np] . identifier[issubdtype] ( identifier[vector] . identifier[dtype] , identifier[np] . identifier[integer] ): ...
def append_vector(self, name, vector, _left=False): """Add a data vectors column.""" if np.issubdtype(vector.dtype, np.integer): # determine the length we need largest = str(max(vector.max(), vector.min(), key=abs)) length = max(len(largest), min(7, len(name))) # how many spaces we need...
def run_command(cmd, debug=False): """ Execute the given command and returns None. :param cmd: A ``sh.Command`` object to execute. :param debug: An optional bool to toggle debug output. :return: ``sh`` object """ if debug: # WARN(retr0h): Uses an internal ``sh`` data structure to di...
def function[run_command, parameter[cmd, debug]]: constant[ Execute the given command and returns None. :param cmd: A ``sh.Command`` object to execute. :param debug: An optional bool to toggle debug output. :return: ``sh`` object ] if name[debug] begin[:] call[name[p...
keyword[def] identifier[run_command] ( identifier[cmd] , identifier[debug] = keyword[False] ): literal[string] keyword[if] identifier[debug] : identifier[print_environment_vars] ( identifier[cmd] . identifier[_partial_call_args] . identifier[get] ( literal[string] ,{})) identif...
def run_command(cmd, debug=False): """ Execute the given command and returns None. :param cmd: A ``sh.Command`` object to execute. :param debug: An optional bool to toggle debug output. :return: ``sh`` object """ if debug: # WARN(retr0h): Uses an internal ``sh`` data structure to di...
def drop(self, session=None): """Alias for :meth:`~pymongo.database.Database.drop_collection`. :Parameters: - `session` (optional): a :class:`~pymongo.client_session.ClientSession`. The following two calls are equivalent: >>> db.foo.drop() >>> db.drop...
def function[drop, parameter[self, session]]: constant[Alias for :meth:`~pymongo.database.Database.drop_collection`. :Parameters: - `session` (optional): a :class:`~pymongo.client_session.ClientSession`. The following two calls are equivalent: >>> db.foo.drop()...
keyword[def] identifier[drop] ( identifier[self] , identifier[session] = keyword[None] ): literal[string] identifier[dbo] = identifier[self] . identifier[__database] . identifier[client] . identifier[get_database] ( identifier[self] . identifier[__database] . identifier[name] , id...
def drop(self, session=None): """Alias for :meth:`~pymongo.database.Database.drop_collection`. :Parameters: - `session` (optional): a :class:`~pymongo.client_session.ClientSession`. The following two calls are equivalent: >>> db.foo.drop() >>> db.drop_col...
def _set_interface_refresh_reduction(self, v, load=False): """ Setter method for interface_refresh_reduction, mapped from YANG variable /mpls_config/router/mpls/mpls_cmds_holder/mpls_interface/rsvp/interface_refresh_reduction (container) If this variable is read-only (config: false) in the source YANG f...
def function[_set_interface_refresh_reduction, parameter[self, v, load]]: constant[ Setter method for interface_refresh_reduction, mapped from YANG variable /mpls_config/router/mpls/mpls_cmds_holder/mpls_interface/rsvp/interface_refresh_reduction (container) If this variable is read-only (config: false)...
keyword[def] identifier[_set_interface_refresh_reduction] ( identifier[self] , identifier[v] , identifier[load] = keyword[False] ): literal[string] keyword[if] identifier[hasattr] ( identifier[v] , literal[string] ): identifier[v] = identifier[v] . identifier[_utype] ( identifier[v] ) keyword[...
def _set_interface_refresh_reduction(self, v, load=False): """ Setter method for interface_refresh_reduction, mapped from YANG variable /mpls_config/router/mpls/mpls_cmds_holder/mpls_interface/rsvp/interface_refresh_reduction (container) If this variable is read-only (config: false) in the source YANG f...
def _lazy_load(self): """ Fetch metadata if it was overlooked during the object's creation. This can happen when you retrieve documents via search, because the JSON response does not include complete meta data for all results. """ obj = self._connection.documents...
def function[_lazy_load, parameter[self]]: constant[ Fetch metadata if it was overlooked during the object's creation. This can happen when you retrieve documents via search, because the JSON response does not include complete meta data for all results. ] variabl...
keyword[def] identifier[_lazy_load] ( identifier[self] ): literal[string] identifier[obj] = identifier[self] . identifier[_connection] . identifier[documents] . identifier[get] ( identifier[id] = identifier[self] . identifier[id] ) identifier[self] . identifier[__dict__] [ literal[string] ...
def _lazy_load(self): """ Fetch metadata if it was overlooked during the object's creation. This can happen when you retrieve documents via search, because the JSON response does not include complete meta data for all results. """ obj = self._connection.documents.get(id=...
def tag(path, name): ''' Change tag associated with directory. ''' output, err = cli_syncthing_adapter.tag(path, name) click.echo("%s" % output, err=err)
def function[tag, parameter[path, name]]: constant[ Change tag associated with directory. ] <ast.Tuple object at 0x7da1b236b040> assign[=] call[name[cli_syncthing_adapter].tag, parameter[name[path], name[name]]] call[name[click].echo, parameter[binary_operation[constant[%s] <ast.Mod object at 0x...
keyword[def] identifier[tag] ( identifier[path] , identifier[name] ): literal[string] identifier[output] , identifier[err] = identifier[cli_syncthing_adapter] . identifier[tag] ( identifier[path] , identifier[name] ) identifier[click] . identifier[echo] ( literal[string] % identifier[output] , identifier[e...
def tag(path, name): """ Change tag associated with directory. """ (output, err) = cli_syncthing_adapter.tag(path, name) click.echo('%s' % output, err=err)
def _find_template(parameters, index, required=False, notfoundmsg=None): """ Generate ``.find()`` call for HTMLElement. Args: parameters (list): List of parameters for ``.find()``. index (int): Index of the item you want to get from ``.find()`` call. required (bool, default False): ...
def function[_find_template, parameter[parameters, index, required, notfoundmsg]]: constant[ Generate ``.find()`` call for HTMLElement. Args: parameters (list): List of parameters for ``.find()``. index (int): Index of the item you want to get from ``.find()`` call. required (bo...
keyword[def] identifier[_find_template] ( identifier[parameters] , identifier[index] , identifier[required] = keyword[False] , identifier[notfoundmsg] = keyword[None] ): literal[string] identifier[output] = identifier[IND] + literal[string] % identifier[repr] ( identifier[parameters] )[ literal[int] :- lit...
def _find_template(parameters, index, required=False, notfoundmsg=None): """ Generate ``.find()`` call for HTMLElement. Args: parameters (list): List of parameters for ``.find()``. index (int): Index of the item you want to get from ``.find()`` call. required (bool, default False): ...
def search_debit(): """ Get one to ten debit(s) for a single User. --- parameters: - name: searchcd in: body description: The Debit(s) you'd like to get. required: false schema: $ref: '#/definitions/SearchCD' responses: '200': description...
def function[search_debit, parameter[]]: constant[ Get one to ten debit(s) for a single User. --- parameters: - name: searchcd in: body description: The Debit(s) you'd like to get. required: false schema: $ref: '#/definitions/SearchCD' responses: ...
keyword[def] identifier[search_debit] (): literal[string] identifier[sid] = identifier[request] . identifier[jws_payload] [ literal[string] ]. identifier[get] ( literal[string] ) identifier[address] = identifier[request] . identifier[jws_payload] [ literal[string] ]. identifier[get] ( literal[string] ...
def search_debit(): """ Get one to ten debit(s) for a single User. --- parameters: - name: searchcd in: body description: The Debit(s) you'd like to get. required: false schema: $ref: '#/definitions/SearchCD' responses: '200': description...
def manager(self, **kwargs): """Return a preference manager that can be used to retrieve preference values""" return PreferencesManager(registry=self, model=self.preference_model, **kwargs)
def function[manager, parameter[self]]: constant[Return a preference manager that can be used to retrieve preference values] return[call[name[PreferencesManager], parameter[]]]
keyword[def] identifier[manager] ( identifier[self] ,** identifier[kwargs] ): literal[string] keyword[return] identifier[PreferencesManager] ( identifier[registry] = identifier[self] , identifier[model] = identifier[self] . identifier[preference_model] ,** identifier[kwargs] )
def manager(self, **kwargs): """Return a preference manager that can be used to retrieve preference values""" return PreferencesManager(registry=self, model=self.preference_model, **kwargs)
def debugPreview(self, title="Debug"): """ Displays the region in a preview window. If the region is a Match, circles the target area. If the region is larger than half the primary screen in either dimension, scales it down to half size. """ region = self haystack = self...
def function[debugPreview, parameter[self, title]]: constant[ Displays the region in a preview window. If the region is a Match, circles the target area. If the region is larger than half the primary screen in either dimension, scales it down to half size. ] variable[region] ass...
keyword[def] identifier[debugPreview] ( identifier[self] , identifier[title] = literal[string] ): literal[string] identifier[region] = identifier[self] identifier[haystack] = identifier[self] . identifier[getBitmap] () keyword[if] identifier[isinstance] ( identifier[region] , id...
def debugPreview(self, title='Debug'): """ Displays the region in a preview window. If the region is a Match, circles the target area. If the region is larger than half the primary screen in either dimension, scales it down to half size. """ region = self haystack = self.getBitmap()...
def urlopen(self): """ Grabs readable PNG file pointer """ req = Request(str(self)) try: return urlopen(req) except HTTPError: _print('The server couldn\'t fulfill the request.') except URLError: _print('We failed to reach a ser...
def function[urlopen, parameter[self]]: constant[ Grabs readable PNG file pointer ] variable[req] assign[=] call[name[Request], parameter[call[name[str], parameter[name[self]]]]] <ast.Try object at 0x7da1b021d360>
keyword[def] identifier[urlopen] ( identifier[self] ): literal[string] identifier[req] = identifier[Request] ( identifier[str] ( identifier[self] )) keyword[try] : keyword[return] identifier[urlopen] ( identifier[req] ) keyword[except] identifier[HTTPError] : ...
def urlopen(self): """ Grabs readable PNG file pointer """ req = Request(str(self)) try: return urlopen(req) # depends on [control=['try'], data=[]] except HTTPError: _print("The server couldn't fulfill the request.") # depends on [control=['except'], data=[]] excep...
def save(self, filename=None): """Save the document to file. Arguments: * filename (str): The filename to save to. If not set (``None``, default), saves to the same file as loaded from. """ if not filename: filename = self.filename if not filename: ...
def function[save, parameter[self, filename]]: constant[Save the document to file. Arguments: * filename (str): The filename to save to. If not set (``None``, default), saves to the same file as loaded from. ] if <ast.UnaryOp object at 0x7da204344a00> begin[:] ...
keyword[def] identifier[save] ( identifier[self] , identifier[filename] = keyword[None] ): literal[string] keyword[if] keyword[not] identifier[filename] : identifier[filename] = identifier[self] . identifier[filename] keyword[if] keyword[not] identifier[filename] : ...
def save(self, filename=None): """Save the document to file. Arguments: * filename (str): The filename to save to. If not set (``None``, default), saves to the same file as loaded from. """ if not filename: filename = self.filename # depends on [control=['if'], data=[]] ...
def on_displayed(self, callback, remove=False): """(Un)Register a widget displayed callback. Parameters ---------- callback: method handler Must have a signature of:: callback(widget, **kwargs) kwargs from display are passed through without modi...
def function[on_displayed, parameter[self, callback, remove]]: constant[(Un)Register a widget displayed callback. Parameters ---------- callback: method handler Must have a signature of:: callback(widget, **kwargs) kwargs from display are passed...
keyword[def] identifier[on_displayed] ( identifier[self] , identifier[callback] , identifier[remove] = keyword[False] ): literal[string] identifier[self] . identifier[_display_callbacks] . identifier[register_callback] ( identifier[callback] , identifier[remove] = identifier[remove] )
def on_displayed(self, callback, remove=False): """(Un)Register a widget displayed callback. Parameters ---------- callback: method handler Must have a signature of:: callback(widget, **kwargs) kwargs from display are passed through without modifica...
def _convert_xml_to_retention_policy(xml, retention_policy): ''' <Enabled>true|false</Enabled> <Days>number-of-days</Days> ''' # Enabled retention_policy.enabled = _bool(xml.find('Enabled').text) # Days days_element = xml.find('Days') if days_element is not None: retention_p...
def function[_convert_xml_to_retention_policy, parameter[xml, retention_policy]]: constant[ <Enabled>true|false</Enabled> <Days>number-of-days</Days> ] name[retention_policy].enabled assign[=] call[name[_bool], parameter[call[name[xml].find, parameter[constant[Enabled]]].text]] varia...
keyword[def] identifier[_convert_xml_to_retention_policy] ( identifier[xml] , identifier[retention_policy] ): literal[string] identifier[retention_policy] . identifier[enabled] = identifier[_bool] ( identifier[xml] . identifier[find] ( literal[string] ). identifier[text] ) identifier[days_e...
def _convert_xml_to_retention_policy(xml, retention_policy): """ <Enabled>true|false</Enabled> <Days>number-of-days</Days> """ # Enabled retention_policy.enabled = _bool(xml.find('Enabled').text) # Days days_element = xml.find('Days') if days_element is not None: retention_po...
def travis_build_package(): """Assumed called on Travis, to prepare a package to be deployed This method prints on stdout for Travis. Return is obj to pass to sys.exit() directly """ travis_tag = os.environ.get("TRAVIS_TAG") if not travis_tag: print("TRAVIS_TAG environment variable is no...
def function[travis_build_package, parameter[]]: constant[Assumed called on Travis, to prepare a package to be deployed This method prints on stdout for Travis. Return is obj to pass to sys.exit() directly ] variable[travis_tag] assign[=] call[name[os].environ.get, parameter[constant[TRAVIS_...
keyword[def] identifier[travis_build_package] (): literal[string] identifier[travis_tag] = identifier[os] . identifier[environ] . identifier[get] ( literal[string] ) keyword[if] keyword[not] identifier[travis_tag] : identifier[print] ( literal[string] ) keyword[return] literal[str...
def travis_build_package(): """Assumed called on Travis, to prepare a package to be deployed This method prints on stdout for Travis. Return is obj to pass to sys.exit() directly """ travis_tag = os.environ.get('TRAVIS_TAG') if not travis_tag: print('TRAVIS_TAG environment variable is no...
async def parse(self, request): """Return a coroutine which parses data from request depends on content-type. Usage: :: def post(self, request): data = await self.parse(request) # ... """ if request.content_type in {'application/x-www-form-ur...
<ast.AsyncFunctionDef object at 0x7da2054a53c0>
keyword[async] keyword[def] identifier[parse] ( identifier[self] , identifier[request] ): literal[string] keyword[if] identifier[request] . identifier[content_type] keyword[in] { literal[string] , literal[string] }: keyword[return] keyword[await] identifier[request] . identifier[p...
async def parse(self, request): """Return a coroutine which parses data from request depends on content-type. Usage: :: def post(self, request): data = await self.parse(request) # ... """ if request.content_type in {'application/x-www-form-urlencoded...
def _contains_cftime_datetimes(array) -> bool: """Check if an array contains cftime.datetime objects """ try: from cftime import datetime as cftime_datetime except ImportError: return False else: if array.dtype == np.dtype('O') and array.size > 0: sample = array.r...
def function[_contains_cftime_datetimes, parameter[array]]: constant[Check if an array contains cftime.datetime objects ] <ast.Try object at 0x7da18ede68c0>
keyword[def] identifier[_contains_cftime_datetimes] ( identifier[array] )-> identifier[bool] : literal[string] keyword[try] : keyword[from] identifier[cftime] keyword[import] identifier[datetime] keyword[as] identifier[cftime_datetime] keyword[except] identifier[ImportError] : ...
def _contains_cftime_datetimes(array) -> bool: """Check if an array contains cftime.datetime objects """ try: from cftime import datetime as cftime_datetime # depends on [control=['try'], data=[]] except ImportError: return False # depends on [control=['except'], data=[]] else: ...
def expect_lit(char, buf, pos): """Expect a literal character at the current buffer position.""" if pos >= len(buf) or buf[pos] != char: return None, len(buf) return char, pos+1
def function[expect_lit, parameter[char, buf, pos]]: constant[Expect a literal character at the current buffer position.] if <ast.BoolOp object at 0x7da1b02e6500> begin[:] return[tuple[[<ast.Constant object at 0x7da1b0275300>, <ast.Call object at 0x7da1b0275900>]]] return[tuple[[<ast.Name ob...
keyword[def] identifier[expect_lit] ( identifier[char] , identifier[buf] , identifier[pos] ): literal[string] keyword[if] identifier[pos] >= identifier[len] ( identifier[buf] ) keyword[or] identifier[buf] [ identifier[pos] ]!= identifier[char] : keyword[return] keyword[None] , identifier[len] (...
def expect_lit(char, buf, pos): """Expect a literal character at the current buffer position.""" if pos >= len(buf) or buf[pos] != char: return (None, len(buf)) # depends on [control=['if'], data=[]] return (char, pos + 1)
def lesser(lhs, rhs): """Returns the result of element-wise **lesser than** (<) comparison operation with broadcasting. For each element in input arrays, return 1(true) if lhs elements are less than rhs, otherwise return 0(false). Equivalent to ``lhs < rhs`` and ``mx.nd.broadcast_lesser(lhs, rhs)`...
def function[lesser, parameter[lhs, rhs]]: constant[Returns the result of element-wise **lesser than** (<) comparison operation with broadcasting. For each element in input arrays, return 1(true) if lhs elements are less than rhs, otherwise return 0(false). Equivalent to ``lhs < rhs`` and ``mx...
keyword[def] identifier[lesser] ( identifier[lhs] , identifier[rhs] ): literal[string] keyword[return] identifier[_ufunc_helper] ( identifier[lhs] , identifier[rhs] , identifier[op] . identifier[broadcast_lesser] , keyword[lambda] identifier[x] , identifier[y] : literal[int] key...
def lesser(lhs, rhs): """Returns the result of element-wise **lesser than** (<) comparison operation with broadcasting. For each element in input arrays, return 1(true) if lhs elements are less than rhs, otherwise return 0(false). Equivalent to ``lhs < rhs`` and ``mx.nd.broadcast_lesser(lhs, rhs)`...
def getService(self, name, auto_execute=True): """ Returns a L{ServiceProxy} for the supplied name. Sets up an object that can have method calls made to it that build the AMF requests. @rtype: L{ServiceProxy} """ if not isinstance(name, basestring): raise Typ...
def function[getService, parameter[self, name, auto_execute]]: constant[ Returns a L{ServiceProxy} for the supplied name. Sets up an object that can have method calls made to it that build the AMF requests. @rtype: L{ServiceProxy} ] if <ast.UnaryOp object at 0x7da18f7227...
keyword[def] identifier[getService] ( identifier[self] , identifier[name] , identifier[auto_execute] = keyword[True] ): literal[string] keyword[if] keyword[not] identifier[isinstance] ( identifier[name] , identifier[basestring] ): keyword[raise] identifier[TypeError] ( literal[strin...
def getService(self, name, auto_execute=True): """ Returns a L{ServiceProxy} for the supplied name. Sets up an object that can have method calls made to it that build the AMF requests. @rtype: L{ServiceProxy} """ if not isinstance(name, basestring): raise TypeError('stri...
def get_rot(slab): """ Gets the transformation to rotate the z axis into the miller index """ new_z = get_mi_vec(slab) a, b, c = slab.lattice.matrix new_x = a / np.linalg.norm(a) new_y = np.cross(new_z, new_x) x, y, z = np.eye(3) rot_matrix = np.array([np.dot(*el) for el in ...
def function[get_rot, parameter[slab]]: constant[ Gets the transformation to rotate the z axis into the miller index ] variable[new_z] assign[=] call[name[get_mi_vec], parameter[name[slab]]] <ast.Tuple object at 0x7da204347310> assign[=] name[slab].lattice.matrix variable[new_x] ...
keyword[def] identifier[get_rot] ( identifier[slab] ): literal[string] identifier[new_z] = identifier[get_mi_vec] ( identifier[slab] ) identifier[a] , identifier[b] , identifier[c] = identifier[slab] . identifier[lattice] . identifier[matrix] identifier[new_x] = identifier[a] / identifier[np] . ...
def get_rot(slab): """ Gets the transformation to rotate the z axis into the miller index """ new_z = get_mi_vec(slab) (a, b, c) = slab.lattice.matrix new_x = a / np.linalg.norm(a) new_y = np.cross(new_z, new_x) (x, y, z) = np.eye(3) rot_matrix = np.array([np.dot(*el) for el in itert...
def get_published_events(self, process=True) -> List[Event]: """Get a list of published (pending) events. Return a list of Event objects which have been published and are therefore pending to be processed. If the process argument is set to true, any events returned from this method will...
def function[get_published_events, parameter[self, process]]: constant[Get a list of published (pending) events. Return a list of Event objects which have been published and are therefore pending to be processed. If the process argument is set to true, any events returned from this meth...
keyword[def] identifier[get_published_events] ( identifier[self] , identifier[process] = keyword[True] )-> identifier[List] [ identifier[Event] ]: literal[string] identifier[LOG] . identifier[debug] ( literal[string] , identifier[self] . identifier[_pub_key] ) keyword[if] identifier[proce...
def get_published_events(self, process=True) -> List[Event]: """Get a list of published (pending) events. Return a list of Event objects which have been published and are therefore pending to be processed. If the process argument is set to true, any events returned from this method will als...
def _imm_default_init(self, *args, **kwargs): ''' An immutable's defalt initialization function is to accept any number of dictionaries followed by any number of keyword args and to turn them all into the parameters of the immutable that is being created. ''' for (k,v) in six.iteritems({k:v for ...
def function[_imm_default_init, parameter[self]]: constant[ An immutable's defalt initialization function is to accept any number of dictionaries followed by any number of keyword args and to turn them all into the parameters of the immutable that is being created. ] for taget[tuple[[<as...
keyword[def] identifier[_imm_default_init] ( identifier[self] ,* identifier[args] ,** identifier[kwargs] ): literal[string] keyword[for] ( identifier[k] , identifier[v] ) keyword[in] identifier[six] . identifier[iteritems] ({ identifier[k] : identifier[v] keyword[for] identifier[dct] keyword[in] ( iden...
def _imm_default_init(self, *args, **kwargs): """ An immutable's defalt initialization function is to accept any number of dictionaries followed by any number of keyword args and to turn them all into the parameters of the immutable that is being created. """ for (k, v) in six.iteritems({k: v fo...
def anchored_pairs(self, anchor): """ Get distances between an anchor term and all other terms. Args: anchor (str): The anchor term. Returns: OrderedDict: The distances, in descending order. """ pairs = OrderedDict() for term in self.k...
def function[anchored_pairs, parameter[self, anchor]]: constant[ Get distances between an anchor term and all other terms. Args: anchor (str): The anchor term. Returns: OrderedDict: The distances, in descending order. ] variable[pairs] assign[=] ...
keyword[def] identifier[anchored_pairs] ( identifier[self] , identifier[anchor] ): literal[string] identifier[pairs] = identifier[OrderedDict] () keyword[for] identifier[term] keyword[in] identifier[self] . identifier[keys] : identifier[score] = identifier[self] . identi...
def anchored_pairs(self, anchor): """ Get distances between an anchor term and all other terms. Args: anchor (str): The anchor term. Returns: OrderedDict: The distances, in descending order. """ pairs = OrderedDict() for term in self.keys: sc...
def render(template, extra={}, **kwargs): """Return the template rendered using Python's str.format().""" context = hookenv.execution_environment() context.update(extra) context.update(kwargs) return template.format(**context)
def function[render, parameter[template, extra]]: constant[Return the template rendered using Python's str.format().] variable[context] assign[=] call[name[hookenv].execution_environment, parameter[]] call[name[context].update, parameter[name[extra]]] call[name[context].update, parameter...
keyword[def] identifier[render] ( identifier[template] , identifier[extra] ={},** identifier[kwargs] ): literal[string] identifier[context] = identifier[hookenv] . identifier[execution_environment] () identifier[context] . identifier[update] ( identifier[extra] ) identifier[context] . identifier[...
def render(template, extra={}, **kwargs): """Return the template rendered using Python's str.format().""" context = hookenv.execution_environment() context.update(extra) context.update(kwargs) return template.format(**context)
def which_roles_can(self, name): """Which role can SendMail? """ targetPermissionRecords = AuthPermission.objects(creator=self.client, name=name).first() return [{'role': group.role} for group in targetPermissionRecords.groups]
def function[which_roles_can, parameter[self, name]]: constant[Which role can SendMail? ] variable[targetPermissionRecords] assign[=] call[call[name[AuthPermission].objects, parameter[]].first, parameter[]] return[<ast.ListComp object at 0x7da1b0fdd6c0>]
keyword[def] identifier[which_roles_can] ( identifier[self] , identifier[name] ): literal[string] identifier[targetPermissionRecords] = identifier[AuthPermission] . identifier[objects] ( identifier[creator] = identifier[self] . identifier[client] , identifier[name] = identifier[name] ). identifier[...
def which_roles_can(self, name): """Which role can SendMail? """ targetPermissionRecords = AuthPermission.objects(creator=self.client, name=name).first() return [{'role': group.role} for group in targetPermissionRecords.groups]
def constraint_from_choices(cls, value_type: type, choices: collections.Sequence): """ Returns a constraint callable based on choices of a given type """ choices_str = ', '.join(map(str, choices)) def constraint(value): value = value_type(value) if value ...
def function[constraint_from_choices, parameter[cls, value_type, choices]]: constant[ Returns a constraint callable based on choices of a given type ] variable[choices_str] assign[=] call[constant[, ].join, parameter[call[name[map], parameter[name[str], name[choices]]]]] def func...
keyword[def] identifier[constraint_from_choices] ( identifier[cls] , identifier[value_type] : identifier[type] , identifier[choices] : identifier[collections] . identifier[Sequence] ): literal[string] identifier[choices_str] = literal[string] . identifier[join] ( identifier[map] ( identifier[str] ,...
def constraint_from_choices(cls, value_type: type, choices: collections.Sequence): """ Returns a constraint callable based on choices of a given type """ choices_str = ', '.join(map(str, choices)) def constraint(value): value = value_type(value) if value not in choices: ...
def initial_sanity_check(self): """Checks if we can create the project""" # Check for python module collision self.try_import(self.project_name) # Is the name a valid identifier? self.validate_name(self.project_name) # Make sure we don't mess with existing direc...
def function[initial_sanity_check, parameter[self]]: constant[Checks if we can create the project] call[name[self].try_import, parameter[name[self].project_name]] call[name[self].validate_name, parameter[name[self].project_name]] if call[name[os].path.exists, parameter[name[self].project...
keyword[def] identifier[initial_sanity_check] ( identifier[self] ): literal[string] identifier[self] . identifier[try_import] ( identifier[self] . identifier[project_name] ) identifier[self] . identifier[validate_name] ( identifier[self] . identifier[project_name] ...
def initial_sanity_check(self): """Checks if we can create the project""" # Check for python module collision self.try_import(self.project_name) # Is the name a valid identifier? self.validate_name(self.project_name) # Make sure we don't mess with existing directories if os.path.exists(self.project_n...
def setup_gui(self): """Setup the main layout of the widget.""" scrollarea = self.setup_scrollarea() up_btn, down_btn = self.setup_arrow_buttons() self.setFixedWidth(150) layout = QVBoxLayout(self) layout.setContentsMargins(0, 0, 0, 0) layout.setSpacing(0) ...
def function[setup_gui, parameter[self]]: constant[Setup the main layout of the widget.] variable[scrollarea] assign[=] call[name[self].setup_scrollarea, parameter[]] <ast.Tuple object at 0x7da20e9b3340> assign[=] call[name[self].setup_arrow_buttons, parameter[]] call[name[self].setFixed...
keyword[def] identifier[setup_gui] ( identifier[self] ): literal[string] identifier[scrollarea] = identifier[self] . identifier[setup_scrollarea] () identifier[up_btn] , identifier[down_btn] = identifier[self] . identifier[setup_arrow_buttons] () identifier[self] . identifier[set...
def setup_gui(self): """Setup the main layout of the widget.""" scrollarea = self.setup_scrollarea() (up_btn, down_btn) = self.setup_arrow_buttons() self.setFixedWidth(150) layout = QVBoxLayout(self) layout.setContentsMargins(0, 0, 0, 0) layout.setSpacing(0) layout.addWidget(up_btn) ...
def resize_pane(pymux, variables): """ Resize/zoom the active pane. """ try: left = int(variables['<left>'] or 0) right = int(variables['<right>'] or 0) up = int(variables['<up>'] or 0) down = int(variables['<down>'] or 0) except ValueError: raise CommandExcep...
def function[resize_pane, parameter[pymux, variables]]: constant[ Resize/zoom the active pane. ] <ast.Try object at 0x7da20c6ab970> variable[w] assign[=] call[name[pymux].arrangement.get_active_window, parameter[]] if name[w] begin[:] call[name[w].change_size_for_acti...
keyword[def] identifier[resize_pane] ( identifier[pymux] , identifier[variables] ): literal[string] keyword[try] : identifier[left] = identifier[int] ( identifier[variables] [ literal[string] ] keyword[or] literal[int] ) identifier[right] = identifier[int] ( identifier[variables] [ liter...
def resize_pane(pymux, variables): """ Resize/zoom the active pane. """ try: left = int(variables['<left>'] or 0) right = int(variables['<right>'] or 0) up = int(variables['<up>'] or 0) down = int(variables['<down>'] or 0) # depends on [control=['try'], data=[]] exce...
def _validate_entities(self, stages): """ Purpose: Validate whether the argument 'stages' is of list of Stage objects :argument: list of Stage objects """ if not stages: raise TypeError(expected_type=Stage, actual_type=type(stages)) if not isinstance(stages,...
def function[_validate_entities, parameter[self, stages]]: constant[ Purpose: Validate whether the argument 'stages' is of list of Stage objects :argument: list of Stage objects ] if <ast.UnaryOp object at 0x7da1b0fd13c0> begin[:] <ast.Raise object at 0x7da1b0fd08b0> ...
keyword[def] identifier[_validate_entities] ( identifier[self] , identifier[stages] ): literal[string] keyword[if] keyword[not] identifier[stages] : keyword[raise] identifier[TypeError] ( identifier[expected_type] = identifier[Stage] , identifier[actual_type] = identifier[type] ( id...
def _validate_entities(self, stages): """ Purpose: Validate whether the argument 'stages' is of list of Stage objects :argument: list of Stage objects """ if not stages: raise TypeError(expected_type=Stage, actual_type=type(stages)) # depends on [control=['if'], data=[]] if...
def close(self): """Close all communication process streams.""" windll.kernel32.CloseHandle(self.conout_pipe) windll.kernel32.CloseHandle(self.conin_pipe)
def function[close, parameter[self]]: constant[Close all communication process streams.] call[name[windll].kernel32.CloseHandle, parameter[name[self].conout_pipe]] call[name[windll].kernel32.CloseHandle, parameter[name[self].conin_pipe]]
keyword[def] identifier[close] ( identifier[self] ): literal[string] identifier[windll] . identifier[kernel32] . identifier[CloseHandle] ( identifier[self] . identifier[conout_pipe] ) identifier[windll] . identifier[kernel32] . identifier[CloseHandle] ( identifier[self] . identifier[conin_...
def close(self): """Close all communication process streams.""" windll.kernel32.CloseHandle(self.conout_pipe) windll.kernel32.CloseHandle(self.conin_pipe)
def pack(self, out: IO): """ Write the AttributeTable to the file-like object `out`. .. note:: Advanced usage only. You will typically never need to call this method as it will be called for you when saving a ClassFile. :param out: Any file-like object providin...
def function[pack, parameter[self, out]]: constant[ Write the AttributeTable to the file-like object `out`. .. note:: Advanced usage only. You will typically never need to call this method as it will be called for you when saving a ClassFile. :param out: Any fi...
keyword[def] identifier[pack] ( identifier[self] , identifier[out] : identifier[IO] ): literal[string] identifier[out] . identifier[write] ( identifier[pack] ( literal[string] , identifier[len] ( identifier[self] . identifier[_table] ))) keyword[for] identifier[attribute] keyword[in] id...
def pack(self, out: IO): """ Write the AttributeTable to the file-like object `out`. .. note:: Advanced usage only. You will typically never need to call this method as it will be called for you when saving a ClassFile. :param out: Any file-like object providing `w...
def colorRGB(r, g, b): """ Given the R,G,B int values for the RGB color mode in the range [0..255], return a RGB color tuple with float values in the range [0..1]. """ return (float(r / 255), float(g / 255), float(b / 255))
def function[colorRGB, parameter[r, g, b]]: constant[ Given the R,G,B int values for the RGB color mode in the range [0..255], return a RGB color tuple with float values in the range [0..1]. ] return[tuple[[<ast.Call object at 0x7da1b2381b70>, <ast.Call object at 0x7da1b2380070>, <as...
keyword[def] identifier[colorRGB] ( identifier[r] , identifier[g] , identifier[b] ): literal[string] keyword[return] ( identifier[float] ( identifier[r] / literal[int] ), identifier[float] ( identifier[g] / literal[int] ), identifier[float] ( identifier[b] / literal[int] ))
def colorRGB(r, g, b): """ Given the R,G,B int values for the RGB color mode in the range [0..255], return a RGB color tuple with float values in the range [0..1]. """ return (float(r / 255), float(g / 255), float(b / 255))
def read_struct(self, struct_class): """Parse and return a structure from the current buffer offset.""" struct = struct_class.unpack_from(bytearray_to_buff(self._data), self._offset) self.skip(struct_class.size) return struct
def function[read_struct, parameter[self, struct_class]]: constant[Parse and return a structure from the current buffer offset.] variable[struct] assign[=] call[name[struct_class].unpack_from, parameter[call[name[bytearray_to_buff], parameter[name[self]._data]], name[self]._offset]] call[name[se...
keyword[def] identifier[read_struct] ( identifier[self] , identifier[struct_class] ): literal[string] identifier[struct] = identifier[struct_class] . identifier[unpack_from] ( identifier[bytearray_to_buff] ( identifier[self] . identifier[_data] ), identifier[self] . identifier[_offset] ) i...
def read_struct(self, struct_class): """Parse and return a structure from the current buffer offset.""" struct = struct_class.unpack_from(bytearray_to_buff(self._data), self._offset) self.skip(struct_class.size) return struct
def get_full_history(self, force=None, last_update=None, flush=False): ''' Fields change depending on when you run activity_import, such as "last_updated" type fields which don't have activity being tracked, which means we'll always end up with different hash values, so we need t...
def function[get_full_history, parameter[self, force, last_update, flush]]: constant[ Fields change depending on when you run activity_import, such as "last_updated" type fields which don't have activity being tracked, which means we'll always end up with different hash values, s...
keyword[def] identifier[get_full_history] ( identifier[self] , identifier[force] = keyword[None] , identifier[last_update] = keyword[None] , identifier[flush] = keyword[False] ): literal[string] keyword[return] identifier[self] . identifier[_run_object_import] ( identifier[force] = identifier[forc...
def get_full_history(self, force=None, last_update=None, flush=False): """ Fields change depending on when you run activity_import, such as "last_updated" type fields which don't have activity being tracked, which means we'll always end up with different hash values, so we need to al...
def dump_state(self): """Dump the current state of this emulated object as a dictionary. Note that dump_state happens synchronously in the emulation thread to avoid any race conditions with accessing data members and ensure a consistent view of all state data. Returns: ...
def function[dump_state, parameter[self]]: constant[Dump the current state of this emulated object as a dictionary. Note that dump_state happens synchronously in the emulation thread to avoid any race conditions with accessing data members and ensure a consistent view of all state data....
keyword[def] identifier[dump_state] ( identifier[self] ): literal[string] keyword[def] identifier[_background_dump] (): identifier[state] = identifier[super] ( identifier[ReferenceDevice] , identifier[self] ). identifier[dump_state] () identifier[state] [ liter...
def dump_state(self): """Dump the current state of this emulated object as a dictionary. Note that dump_state happens synchronously in the emulation thread to avoid any race conditions with accessing data members and ensure a consistent view of all state data. Returns: ...
def _tracker_str(item): """Returns a string representation of the tracker object for the given item. Args: item: object to get tracker for. fqdn (str): fully-qualified domain name of the object. """ instance = tracker(item) if instance is not None: if isinstance(instance...
def function[_tracker_str, parameter[item]]: constant[Returns a string representation of the tracker object for the given item. Args: item: object to get tracker for. fqdn (str): fully-qualified domain name of the object. ] variable[instance] assign[=] call[name[tracker], pa...
keyword[def] identifier[_tracker_str] ( identifier[item] ): literal[string] identifier[instance] = identifier[tracker] ( identifier[item] ) keyword[if] identifier[instance] keyword[is] keyword[not] keyword[None] : keyword[if] identifier[isinstance] ( identifier[instance] , identifier[str...
def _tracker_str(item): """Returns a string representation of the tracker object for the given item. Args: item: object to get tracker for. fqdn (str): fully-qualified domain name of the object. """ instance = tracker(item) if instance is not None: if isinstance(instance...
def return_hdr(self): """Return the header for further use. Returns ------- subj_id : str subject identification code start_time : datetime start time of the dataset s_freq : float sampling frequency chan_name : list of str ...
def function[return_hdr, parameter[self]]: constant[Return the header for further use. Returns ------- subj_id : str subject identification code start_time : datetime start time of the dataset s_freq : float sampling frequency ...
keyword[def] identifier[return_hdr] ( identifier[self] ): literal[string] identifier[subj_id] = literal[string] identifier[hdr] = identifier[_parse_ini] ( identifier[self] . identifier[filename] ) identifier[self] . identifier[eeg_file] = identifier[self] . identifier[filename]...
def return_hdr(self): """Return the header for further use. Returns ------- subj_id : str subject identification code start_time : datetime start time of the dataset s_freq : float sampling frequency chan_name : list of str ...
def getEdges(self, fromVol): """ Return the edges available from fromVol. """ if fromVol is None: for toVol in self.paths: yield Store.Diff(self, toVol, fromVol, toVol.size) return if fromVol not in self.paths: return fromBVol = self....
def function[getEdges, parameter[self, fromVol]]: constant[ Return the edges available from fromVol. ] if compare[name[fromVol] is constant[None]] begin[:] for taget[name[toVol]] in starred[name[self].paths] begin[:] <ast.Yield object at 0x7da1b2845db0> re...
keyword[def] identifier[getEdges] ( identifier[self] , identifier[fromVol] ): literal[string] keyword[if] identifier[fromVol] keyword[is] keyword[None] : keyword[for] identifier[toVol] keyword[in] identifier[self] . identifier[paths] : keyword[yield] identifier[...
def getEdges(self, fromVol): """ Return the edges available from fromVol. """ if fromVol is None: for toVol in self.paths: yield Store.Diff(self, toVol, fromVol, toVol.size) # depends on [control=['for'], data=['toVol']] return # depends on [control=['if'], data=['fromVol']] if...
def mmGetCellTracePlot(self, cellTrace, cellCount, activityType, title="", showReset=False, resetShading=0.25): """ Returns plot of the cell activity. Note that if many timesteps of activities are input, matplotlib's image interpolation may omit activities (columns in the image)...
def function[mmGetCellTracePlot, parameter[self, cellTrace, cellCount, activityType, title, showReset, resetShading]]: constant[ Returns plot of the cell activity. Note that if many timesteps of activities are input, matplotlib's image interpolation may omit activities (columns in the image). @...
keyword[def] identifier[mmGetCellTracePlot] ( identifier[self] , identifier[cellTrace] , identifier[cellCount] , identifier[activityType] , identifier[title] = literal[string] , identifier[showReset] = keyword[False] , identifier[resetShading] = literal[int] ): literal[string] identifier[plot] = identifie...
def mmGetCellTracePlot(self, cellTrace, cellCount, activityType, title='', showReset=False, resetShading=0.25): """ Returns plot of the cell activity. Note that if many timesteps of activities are input, matplotlib's image interpolation may omit activities (columns in the image). @param cellTrace ...
def _generate_publish_headers(self): """ generate the headers for the connection to event hub service based on the provided config :return: {} headers """ headers = { 'predix-zone-id': self.eventhub_client.zone_id } token = self.eventhub_client.service...
def function[_generate_publish_headers, parameter[self]]: constant[ generate the headers for the connection to event hub service based on the provided config :return: {} headers ] variable[headers] assign[=] dictionary[[<ast.Constant object at 0x7da20e9633a0>], [<ast.Attribute ob...
keyword[def] identifier[_generate_publish_headers] ( identifier[self] ): literal[string] identifier[headers] ={ literal[string] : identifier[self] . identifier[eventhub_client] . identifier[zone_id] } identifier[token] = identifier[self] . identifier[eventhub_client] . id...
def _generate_publish_headers(self): """ generate the headers for the connection to event hub service based on the provided config :return: {} headers """ headers = {'predix-zone-id': self.eventhub_client.zone_id} token = self.eventhub_client.service._get_bearer_token() if self.c...
def _check_error(response): """Checks for JSON error messages and raises Python exception""" if 'error' in response: raise InfluxDBError(response['error']) elif 'results' in response: for statement in response['results']: if 'error' in statement: ...
def function[_check_error, parameter[response]]: constant[Checks for JSON error messages and raises Python exception] if compare[constant[error] in name[response]] begin[:] <ast.Raise object at 0x7da18bcc97b0>
keyword[def] identifier[_check_error] ( identifier[response] ): literal[string] keyword[if] literal[string] keyword[in] identifier[response] : keyword[raise] identifier[InfluxDBError] ( identifier[response] [ literal[string] ]) keyword[elif] literal[string] keyword[in] ...
def _check_error(response): """Checks for JSON error messages and raises Python exception""" if 'error' in response: raise InfluxDBError(response['error']) # depends on [control=['if'], data=['response']] elif 'results' in response: for statement in response['results']: if 'erro...
async def unplonk(self, ctx, *, member: discord.Member): """Unbans a user from using the bot. To use this command you must have the Manage Server permission or have a Bot Admin role. """ plonks = self.config.get('plonks', {}) guild_id = ctx.message.server.id db ...
<ast.AsyncFunctionDef object at 0x7da1b281a830>
keyword[async] keyword[def] identifier[unplonk] ( identifier[self] , identifier[ctx] ,*, identifier[member] : identifier[discord] . identifier[Member] ): literal[string] identifier[plonks] = identifier[self] . identifier[config] . identifier[get] ( literal[string] ,{}) identifier[guild_i...
async def unplonk(self, ctx, *, member: discord.Member): """Unbans a user from using the bot. To use this command you must have the Manage Server permission or have a Bot Admin role. """ plonks = self.config.get('plonks', {}) guild_id = ctx.message.server.id db = plonks.get(guil...
def _shape(self, df): """ Calculate table chape considering index levels. """ row, col = df.shape return row + df.columns.nlevels, col + df.index.nlevels
def function[_shape, parameter[self, df]]: constant[ Calculate table chape considering index levels. ] <ast.Tuple object at 0x7da18dc9a140> assign[=] name[df].shape return[tuple[[<ast.BinOp object at 0x7da18dc982b0>, <ast.BinOp object at 0x7da18dc99990>]]]
keyword[def] identifier[_shape] ( identifier[self] , identifier[df] ): literal[string] identifier[row] , identifier[col] = identifier[df] . identifier[shape] keyword[return] identifier[row] + identifier[df] . identifier[columns] . identifier[nlevels] , identifier[col] + identifier[df] ....
def _shape(self, df): """ Calculate table chape considering index levels. """ (row, col) = df.shape return (row + df.columns.nlevels, col + df.index.nlevels)
def get_project_by_network_id(network_id,**kwargs): """ get a project complexmodel by a network_id """ user_id = kwargs.get('user_id') projects_i = db.DBSession.query(Project).join(ProjectOwner).join(Network, Project.id==Network.project_id).filter( ...
def function[get_project_by_network_id, parameter[network_id]]: constant[ get a project complexmodel by a network_id ] variable[user_id] assign[=] call[name[kwargs].get, parameter[constant[user_id]]] variable[projects_i] assign[=] call[call[call[call[call[call[name[db].DBSession.quer...
keyword[def] identifier[get_project_by_network_id] ( identifier[network_id] ,** identifier[kwargs] ): literal[string] identifier[user_id] = identifier[kwargs] . identifier[get] ( literal[string] ) identifier[projects_i] = identifier[db] . identifier[DBSession] . identifier[query] ( identifier[Project...
def get_project_by_network_id(network_id, **kwargs): """ get a project complexmodel by a network_id """ user_id = kwargs.get('user_id') projects_i = db.DBSession.query(Project).join(ProjectOwner).join(Network, Project.id == Network.project_id).filter(Network.id == network_id, ProjectOwner.user_i...
def ruamelindex(self, strictindex): """ Get the ruamel equivalent of a strict parsed index. E.g. 0 -> 0, 1 -> 2, parsed-via-slugify -> Parsed via slugify """ return ( self.key_association.get(strictindex, strictindex) if self.is_mapping() else...
def function[ruamelindex, parameter[self, strictindex]]: constant[ Get the ruamel equivalent of a strict parsed index. E.g. 0 -> 0, 1 -> 2, parsed-via-slugify -> Parsed via slugify ] return[<ast.IfExp object at 0x7da20c6e7cd0>]
keyword[def] identifier[ruamelindex] ( identifier[self] , identifier[strictindex] ): literal[string] keyword[return] ( identifier[self] . identifier[key_association] . identifier[get] ( identifier[strictindex] , identifier[strictindex] ) keyword[if] identifier[self] . identifier[...
def ruamelindex(self, strictindex): """ Get the ruamel equivalent of a strict parsed index. E.g. 0 -> 0, 1 -> 2, parsed-via-slugify -> Parsed via slugify """ return self.key_association.get(strictindex, strictindex) if self.is_mapping() else strictindex
def main(argv): """Validate a model's performance on a set of holdout data.""" _, *validation_paths = argv if FLAGS.expand_validation_dirs: tf_records = [] with utils.logged_timer("Building lists of holdout files"): for record_dir in validation_paths: tf_records.e...
def function[main, parameter[argv]]: constant[Validate a model's performance on a set of holdout data.] <ast.Tuple object at 0x7da1b1b013c0> assign[=] name[argv] if name[FLAGS].expand_validation_dirs begin[:] variable[tf_records] assign[=] list[[]] with call[name[...
keyword[def] identifier[main] ( identifier[argv] ): literal[string] identifier[_] ,* identifier[validation_paths] = identifier[argv] keyword[if] identifier[FLAGS] . identifier[expand_validation_dirs] : identifier[tf_records] =[] keyword[with] identifier[utils] . identifier[logged_...
def main(argv): """Validate a model's performance on a set of holdout data.""" (_, *validation_paths) = argv if FLAGS.expand_validation_dirs: tf_records = [] with utils.logged_timer('Building lists of holdout files'): for record_dir in validation_paths: tf_records...
def get_network_summary_dict(graph: BELGraph) -> Mapping: """Create a summary dictionary.""" return dict( # Counters function_count=count_functions(graph), modifications_count=get_modifications_count(graph), relation_count=count_relations(graph), authors_count=count_autho...
def function[get_network_summary_dict, parameter[graph]]: constant[Create a summary dictionary.] return[call[name[dict], parameter[]]]
keyword[def] identifier[get_network_summary_dict] ( identifier[graph] : identifier[BELGraph] )-> identifier[Mapping] : literal[string] keyword[return] identifier[dict] ( identifier[function_count] = identifier[count_functions] ( identifier[graph] ), identifier[modifications_count] = identif...
def get_network_summary_dict(graph: BELGraph) -> Mapping: """Create a summary dictionary.""" # Counters # BioGrammar # Misc. # Errors # Bibliometrics return dict(function_count=count_functions(graph), modifications_count=get_modifications_count(graph), relation_count=count_relations(graph), ...
def purge(self): """ Purge the stream. This removes all data and clears the calculated intervals :return: None """ self.channel.purge_stream(self.stream_id, remove_definition=False, sandbox=None)
def function[purge, parameter[self]]: constant[ Purge the stream. This removes all data and clears the calculated intervals :return: None ] call[name[self].channel.purge_stream, parameter[name[self].stream_id]]
keyword[def] identifier[purge] ( identifier[self] ): literal[string] identifier[self] . identifier[channel] . identifier[purge_stream] ( identifier[self] . identifier[stream_id] , identifier[remove_definition] = keyword[False] , identifier[sandbox] = keyword[None] )
def purge(self): """ Purge the stream. This removes all data and clears the calculated intervals :return: None """ self.channel.purge_stream(self.stream_id, remove_definition=False, sandbox=None)
def toProtocolElement(self): """ Returns the GA4GH protocol representation of this ReadGroup. """ # TODO this is very incomplete, but we don't have the # implementation to fill out the rest of the fields currently readGroup = protocol.ReadGroup() readGroup.id = se...
def function[toProtocolElement, parameter[self]]: constant[ Returns the GA4GH protocol representation of this ReadGroup. ] variable[readGroup] assign[=] call[name[protocol].ReadGroup, parameter[]] name[readGroup].id assign[=] call[name[self].getId, parameter[]] name[readG...
keyword[def] identifier[toProtocolElement] ( identifier[self] ): literal[string] identifier[readGroup] = identifier[protocol] . identifier[ReadGroup] () identifier[readGroup] . identifier[id] = identifier[self] . identifier[getId] () identifier[readGroup] . ident...
def toProtocolElement(self): """ Returns the GA4GH protocol representation of this ReadGroup. """ # TODO this is very incomplete, but we don't have the # implementation to fill out the rest of the fields currently readGroup = protocol.ReadGroup() readGroup.id = self.getId() readG...
def analyze(data, normalize=None, reduce=None, ndims=None, align=None, internal=False): """ Wrapper function for normalize -> reduce -> align transformations. Parameters ---------- data : numpy array, pandas df, or list of arrays/dfs The data to analyze normalize : str or False or None...
def function[analyze, parameter[data, normalize, reduce, ndims, align, internal]]: constant[ Wrapper function for normalize -> reduce -> align transformations. Parameters ---------- data : numpy array, pandas df, or list of arrays/dfs The data to analyze normalize : str or False or...
keyword[def] identifier[analyze] ( identifier[data] , identifier[normalize] = keyword[None] , identifier[reduce] = keyword[None] , identifier[ndims] = keyword[None] , identifier[align] = keyword[None] , identifier[internal] = keyword[False] ): literal[string] keyword[return] identifier[aligner] ( id...
def analyze(data, normalize=None, reduce=None, ndims=None, align=None, internal=False): """ Wrapper function for normalize -> reduce -> align transformations. Parameters ---------- data : numpy array, pandas df, or list of arrays/dfs The data to analyze normalize : str or False or None...
def diff_custom_calendar_timedeltas(start, end, freq): """ Compute the difference between two pd.Timedelta taking into consideration custom frequency, which is used to deal with custom calendars, such as a trading calendar Parameters ---------- start : pd.Timestamp end : pd.Timestamp ...
def function[diff_custom_calendar_timedeltas, parameter[start, end, freq]]: constant[ Compute the difference between two pd.Timedelta taking into consideration custom frequency, which is used to deal with custom calendars, such as a trading calendar Parameters ---------- start : pd.Time...
keyword[def] identifier[diff_custom_calendar_timedeltas] ( identifier[start] , identifier[end] , identifier[freq] ): literal[string] keyword[if] keyword[not] identifier[isinstance] ( identifier[freq] ,( identifier[Day] , identifier[BusinessDay] , identifier[CustomBusinessDay] )): keyword[raise] ...
def diff_custom_calendar_timedeltas(start, end, freq): """ Compute the difference between two pd.Timedelta taking into consideration custom frequency, which is used to deal with custom calendars, such as a trading calendar Parameters ---------- start : pd.Timestamp end : pd.Timestamp ...
def to_gremlin(self): """Return a unicode object with the Gremlin representation of this expression.""" self.validate() mark_name, field_name = self.location.get_location_name() if field_name is not None: validate_safe_string(field_name) if '@' in field_name: ...
def function[to_gremlin, parameter[self]]: constant[Return a unicode object with the Gremlin representation of this expression.] call[name[self].validate, parameter[]] <ast.Tuple object at 0x7da1b17cde70> assign[=] call[name[self].location.get_location_name, parameter[]] if compare[name[...
keyword[def] identifier[to_gremlin] ( identifier[self] ): literal[string] identifier[self] . identifier[validate] () identifier[mark_name] , identifier[field_name] = identifier[self] . identifier[location] . identifier[get_location_name] () keyword[if] identifier[field_name] k...
def to_gremlin(self): """Return a unicode object with the Gremlin representation of this expression.""" self.validate() (mark_name, field_name) = self.location.get_location_name() if field_name is not None: validate_safe_string(field_name) if '@' in field_name: template = u"m...
def set_copy_mode(self, use_copy: bool): """ Set all protocols in copy mode. They will return a copy of their protocol. This is used for writable mode in CFC. :param use_copy: :return: """ for group in self.rootItem.children: for proto in group.childr...
def function[set_copy_mode, parameter[self, use_copy]]: constant[ Set all protocols in copy mode. They will return a copy of their protocol. This is used for writable mode in CFC. :param use_copy: :return: ] for taget[name[group]] in starred[name[self].rootItem.c...
keyword[def] identifier[set_copy_mode] ( identifier[self] , identifier[use_copy] : identifier[bool] ): literal[string] keyword[for] identifier[group] keyword[in] identifier[self] . identifier[rootItem] . identifier[children] : keyword[for] identifier[proto] keyword[in] identifier...
def set_copy_mode(self, use_copy: bool): """ Set all protocols in copy mode. They will return a copy of their protocol. This is used for writable mode in CFC. :param use_copy: :return: """ for group in self.rootItem.children: for proto in group.children: ...