code
stringlengths
75
104k
code_sememe
stringlengths
47
309k
token_type
stringlengths
215
214k
code_dependency
stringlengths
75
155k
def timeline(self, timeline="home", max_id=None, min_id=None, since_id=None, limit=None): """ Fetch statuses, most recent ones first. `timeline` can be 'home', 'local', 'public', 'tag/hashtag' or 'list/id'. See the following functions documentation for what those do. Local hashtag timeli...
def function[timeline, parameter[self, timeline, max_id, min_id, since_id, limit]]: constant[ Fetch statuses, most recent ones first. `timeline` can be 'home', 'local', 'public', 'tag/hashtag' or 'list/id'. See the following functions documentation for what those do. Local hashtag timeli...
keyword[def] identifier[timeline] ( identifier[self] , identifier[timeline] = literal[string] , identifier[max_id] = keyword[None] , identifier[min_id] = keyword[None] , identifier[since_id] = keyword[None] , identifier[limit] = keyword[None] ): literal[string] keyword[if] identifier[max_id] != ke...
def timeline(self, timeline='home', max_id=None, min_id=None, since_id=None, limit=None): """ Fetch statuses, most recent ones first. `timeline` can be 'home', 'local', 'public', 'tag/hashtag' or 'list/id'. See the following functions documentation for what those do. Local hashtag timelines ...
def clone(self, _, scene): """ Create a clone of this Frame into a new Screen. :param _: ignored. :param scene: The new Scene object to clone into. """ # Assume that the application creates a new set of Frames and so we need to match up the # data from the old ob...
def function[clone, parameter[self, _, scene]]: constant[ Create a clone of this Frame into a new Screen. :param _: ignored. :param scene: The new Scene object to clone into. ] if compare[name[self]._name is_not constant[None]] begin[:] for taget[name[eff...
keyword[def] identifier[clone] ( identifier[self] , identifier[_] , identifier[scene] ): literal[string] keyword[if] identifier[self] . identifier[_name] keyword[is] keyword[not] keyword[None] : keyword[for] identifier[effect] keyword[in] identifier[scene] . id...
def clone(self, _, scene): """ Create a clone of this Frame into a new Screen. :param _: ignored. :param scene: The new Scene object to clone into. """ # Assume that the application creates a new set of Frames and so we need to match up the # data from the old object to the ...
def _makeStoreOwnerPerson(self): """ Make a L{Person} representing the owner of the store that this L{Organizer} is installed in. @rtype: L{Person} """ if self.store is None: return None userInfo = self.store.findFirst(signup.UserInfo) name = ...
def function[_makeStoreOwnerPerson, parameter[self]]: constant[ Make a L{Person} representing the owner of the store that this L{Organizer} is installed in. @rtype: L{Person} ] if compare[name[self].store is constant[None]] begin[:] return[constant[None]] ...
keyword[def] identifier[_makeStoreOwnerPerson] ( identifier[self] ): literal[string] keyword[if] identifier[self] . identifier[store] keyword[is] keyword[None] : keyword[return] keyword[None] identifier[userInfo] = identifier[self] . identifier[store] . identifier[findFir...
def _makeStoreOwnerPerson(self): """ Make a L{Person} representing the owner of the store that this L{Organizer} is installed in. @rtype: L{Person} """ if self.store is None: return None # depends on [control=['if'], data=[]] userInfo = self.store.findFirst(signup.U...
def paste(self): """ Pastes text from the clipboard into this edit. """ html = QApplication.clipboard().text() if not self.isRichTextEditEnabled(): self.insertPlainText(projex.text.toAscii(html)) else: super(XTextEdit, self).paste()
def function[paste, parameter[self]]: constant[ Pastes text from the clipboard into this edit. ] variable[html] assign[=] call[call[name[QApplication].clipboard, parameter[]].text, parameter[]] if <ast.UnaryOp object at 0x7da18eb558a0> begin[:] call[name[self].ins...
keyword[def] identifier[paste] ( identifier[self] ): literal[string] identifier[html] = identifier[QApplication] . identifier[clipboard] (). identifier[text] () keyword[if] keyword[not] identifier[self] . identifier[isRichTextEditEnabled] (): identifier[self] . identifie...
def paste(self): """ Pastes text from the clipboard into this edit. """ html = QApplication.clipboard().text() if not self.isRichTextEditEnabled(): self.insertPlainText(projex.text.toAscii(html)) # depends on [control=['if'], data=[]] else: super(XTextEdit, self).paste()
def format(self, method, data): ''' Calls format on list or detail ''' if data is None: if method == 'GET': raise NotFound() return '' return self._meta.formatter.format(data)
def function[format, parameter[self, method, data]]: constant[ Calls format on list or detail ] if compare[name[data] is constant[None]] begin[:] if compare[name[method] equal[==] constant[GET]] begin[:] <ast.Raise object at 0x7da204621e40> return[constant[]] retu...
keyword[def] identifier[format] ( identifier[self] , identifier[method] , identifier[data] ): literal[string] keyword[if] identifier[data] keyword[is] keyword[None] : keyword[if] identifier[method] == literal[string] : keyword[raise] identifier[NotFound] () ...
def format(self, method, data): """ Calls format on list or detail """ if data is None: if method == 'GET': raise NotFound() # depends on [control=['if'], data=[]] return '' # depends on [control=['if'], data=[]] return self._meta.formatter.format(data)
def camera_event_motion_enum(self, camera_id, **kwargs): """Return motion settings matching camera_id.""" api = self._api_info['camera_event'] payload = dict({ '_sid': self._sid, 'api': api['name'], 'method': 'MotionEnum', 'version': api['version']...
def function[camera_event_motion_enum, parameter[self, camera_id]]: constant[Return motion settings matching camera_id.] variable[api] assign[=] call[name[self]._api_info][constant[camera_event]] variable[payload] assign[=] call[name[dict], parameter[dictionary[[<ast.Constant object at 0x7da20c6...
keyword[def] identifier[camera_event_motion_enum] ( identifier[self] , identifier[camera_id] ,** identifier[kwargs] ): literal[string] identifier[api] = identifier[self] . identifier[_api_info] [ literal[string] ] identifier[payload] = identifier[dict] ({ literal[string] : identif...
def camera_event_motion_enum(self, camera_id, **kwargs): """Return motion settings matching camera_id.""" api = self._api_info['camera_event'] payload = dict({'_sid': self._sid, 'api': api['name'], 'method': 'MotionEnum', 'version': api['version'], 'camId': camera_id}, **kwargs) response = self._get_jso...
def jsonschemas(self): """Load deposit JSON schemas.""" _jsonschemas = { k: v['jsonschema'] for k, v in self.app.config['DEPOSIT_RECORDS_UI_ENDPOINTS'].items() if 'jsonschema' in v } return defaultdict( lambda: self.app.config['DEPOSIT_DEFA...
def function[jsonschemas, parameter[self]]: constant[Load deposit JSON schemas.] variable[_jsonschemas] assign[=] <ast.DictComp object at 0x7da1afe6cf40> return[call[name[defaultdict], parameter[<ast.Lambda object at 0x7da1afe6e1d0>, name[_jsonschemas]]]]
keyword[def] identifier[jsonschemas] ( identifier[self] ): literal[string] identifier[_jsonschemas] ={ identifier[k] : identifier[v] [ literal[string] ] keyword[for] identifier[k] , identifier[v] keyword[in] identifier[self] . identifier[app] . identifier[config] [ literal[stri...
def jsonschemas(self): """Load deposit JSON schemas.""" _jsonschemas = {k: v['jsonschema'] for (k, v) in self.app.config['DEPOSIT_RECORDS_UI_ENDPOINTS'].items() if 'jsonschema' in v} return defaultdict(lambda : self.app.config['DEPOSIT_DEFAULT_JSONSCHEMA'], _jsonschemas)
def add_dihedrals(self, indexes, deg=False, cossin=False, periodic=True): """ Adds the list of dihedrals to the feature list Parameters ---------- indexes : np.ndarray, shape=(num_pairs, 4), dtype=int an array with quadruplets of atom indices deg : bool, opti...
def function[add_dihedrals, parameter[self, indexes, deg, cossin, periodic]]: constant[ Adds the list of dihedrals to the feature list Parameters ---------- indexes : np.ndarray, shape=(num_pairs, 4), dtype=int an array with quadruplets of atom indices deg : ...
keyword[def] identifier[add_dihedrals] ( identifier[self] , identifier[indexes] , identifier[deg] = keyword[False] , identifier[cossin] = keyword[False] , identifier[periodic] = keyword[True] ): literal[string] keyword[from] . identifier[angles] keyword[import] identifier[DihedralFeature] ...
def add_dihedrals(self, indexes, deg=False, cossin=False, periodic=True): """ Adds the list of dihedrals to the feature list Parameters ---------- indexes : np.ndarray, shape=(num_pairs, 4), dtype=int an array with quadruplets of atom indices deg : bool, optional...
def update_resources(self, cpu, gpu, **kwargs): """EXPERIMENTAL: Updates the resource requirements. Should only be called when the trial is not running. Raises: ValueError if trial status is running. """ if self.status is Trial.RUNNING: raise ValueError(...
def function[update_resources, parameter[self, cpu, gpu]]: constant[EXPERIMENTAL: Updates the resource requirements. Should only be called when the trial is not running. Raises: ValueError if trial status is running. ] if compare[name[self].status is name[Trial].RUN...
keyword[def] identifier[update_resources] ( identifier[self] , identifier[cpu] , identifier[gpu] ,** identifier[kwargs] ): literal[string] keyword[if] identifier[self] . identifier[status] keyword[is] identifier[Trial] . identifier[RUNNING] : keyword[raise] identifier[ValueError] (...
def update_resources(self, cpu, gpu, **kwargs): """EXPERIMENTAL: Updates the resource requirements. Should only be called when the trial is not running. Raises: ValueError if trial status is running. """ if self.status is Trial.RUNNING: raise ValueError('Cannot upda...
def get_all_contacts_of_client(self, client_id): """ Get all contacts of client This will iterate over all pages until it gets all elements. So if the rate limit exceeded it will throw an Exception and you will get nothing :param client_id: The id of the client :return: ...
def function[get_all_contacts_of_client, parameter[self, client_id]]: constant[ Get all contacts of client This will iterate over all pages until it gets all elements. So if the rate limit exceeded it will throw an Exception and you will get nothing :param client_id: The id of t...
keyword[def] identifier[get_all_contacts_of_client] ( identifier[self] , identifier[client_id] ): literal[string] keyword[return] identifier[self] . identifier[_iterate_through_pages] ( identifier[get_function] = identifier[self] . identifier[get_contacts_of_client_per_page] , id...
def get_all_contacts_of_client(self, client_id): """ Get all contacts of client This will iterate over all pages until it gets all elements. So if the rate limit exceeded it will throw an Exception and you will get nothing :param client_id: The id of the client :return: list...
def first(self): """Returns the first item from the query, or None if there are no results""" if self._results_cache: return self._results_cache[0] query = PaginatedResponse(func=self._func, lwrap_type=self._lwrap_type, **self._kwargs) try: return next(query) ...
def function[first, parameter[self]]: constant[Returns the first item from the query, or None if there are no results] if name[self]._results_cache begin[:] return[call[name[self]._results_cache][constant[0]]] variable[query] assign[=] call[name[PaginatedResponse], parameter[]] <ast....
keyword[def] identifier[first] ( identifier[self] ): literal[string] keyword[if] identifier[self] . identifier[_results_cache] : keyword[return] identifier[self] . identifier[_results_cache] [ literal[int] ] identifier[query] = identifier[PaginatedResponse] ( identifier[fun...
def first(self): """Returns the first item from the query, or None if there are no results""" if self._results_cache: return self._results_cache[0] # depends on [control=['if'], data=[]] query = PaginatedResponse(func=self._func, lwrap_type=self._lwrap_type, **self._kwargs) try: return ...
def com_google_fonts_check_metadata_parses(family_directory): """ Check METADATA.pb parse correctly. """ from google.protobuf import text_format from fontbakery.utils import get_FamilyProto_Message try: pb_file = os.path.join(family_directory, "METADATA.pb") get_FamilyProto_Message(pb_file) yield PA...
def function[com_google_fonts_check_metadata_parses, parameter[family_directory]]: constant[ Check METADATA.pb parse correctly. ] from relative_module[google.protobuf] import module[text_format] from relative_module[fontbakery.utils] import module[get_FamilyProto_Message] <ast.Try object at 0x7da1b1...
keyword[def] identifier[com_google_fonts_check_metadata_parses] ( identifier[family_directory] ): literal[string] keyword[from] identifier[google] . identifier[protobuf] keyword[import] identifier[text_format] keyword[from] identifier[fontbakery] . identifier[utils] keyword[import] identifier[get_Fam...
def com_google_fonts_check_metadata_parses(family_directory): """ Check METADATA.pb parse correctly. """ from google.protobuf import text_format from fontbakery.utils import get_FamilyProto_Message try: pb_file = os.path.join(family_directory, 'METADATA.pb') get_FamilyProto_Message(pb_fi...
def toFormMarkup(self, action_url, form_tag_attrs=None, submit_text="Continue"): """Generate HTML form markup that contains the values in this message, to be HTTP POSTed as x-www-form-urlencoded UTF-8. @param action_url: The URL to ...
def function[toFormMarkup, parameter[self, action_url, form_tag_attrs, submit_text]]: constant[Generate HTML form markup that contains the values in this message, to be HTTP POSTed as x-www-form-urlencoded UTF-8. @param action_url: The URL to which the form will be POSTed @type action_u...
keyword[def] identifier[toFormMarkup] ( identifier[self] , identifier[action_url] , identifier[form_tag_attrs] = keyword[None] , identifier[submit_text] = literal[string] ): literal[string] keyword[if] identifier[ElementTree] keyword[is] keyword[None] : keyword[raise] identifier...
def toFormMarkup(self, action_url, form_tag_attrs=None, submit_text='Continue'): """Generate HTML form markup that contains the values in this message, to be HTTP POSTed as x-www-form-urlencoded UTF-8. @param action_url: The URL to which the form will be POSTed @type action_url: str ...
def giving_up(self, message): """ Called when a message has been received where ``msg.attempts > max_tries`` This is useful to subclass and override to perform a task (such as writing to disk, etc.) :param message: the :class:`nsq.Message` received """ logger.warning('[...
def function[giving_up, parameter[self, message]]: constant[ Called when a message has been received where ``msg.attempts > max_tries`` This is useful to subclass and override to perform a task (such as writing to disk, etc.) :param message: the :class:`nsq.Message` received ] ...
keyword[def] identifier[giving_up] ( identifier[self] , identifier[message] ): literal[string] identifier[logger] . identifier[warning] ( literal[string] , identifier[self] . identifier[name] , identifier[message] . identifier[id] , identifier[message] . identifier[attempts] , identifier[s...
def giving_up(self, message): """ Called when a message has been received where ``msg.attempts > max_tries`` This is useful to subclass and override to perform a task (such as writing to disk, etc.) :param message: the :class:`nsq.Message` received """ logger.warning('[%s] givi...
def transform_to(ext): """ Decorator to create an output filename from an output filename with the specified extension. Changes the extension, in_file is transformed to a new type. Takes functions like this to decorate: f(in_file, out_dir=None, out_file=None) or, f(in_file=in_file, out_dir=...
def function[transform_to, parameter[ext]]: constant[ Decorator to create an output filename from an output filename with the specified extension. Changes the extension, in_file is transformed to a new type. Takes functions like this to decorate: f(in_file, out_dir=None, out_file=None) or, ...
keyword[def] identifier[transform_to] ( identifier[ext] ): literal[string] keyword[def] identifier[decor] ( identifier[f] ): @ identifier[functools] . identifier[wraps] ( identifier[f] ) keyword[def] identifier[wrapper] (* identifier[args] ,** identifier[kwargs] ): identifi...
def transform_to(ext): """ Decorator to create an output filename from an output filename with the specified extension. Changes the extension, in_file is transformed to a new type. Takes functions like this to decorate: f(in_file, out_dir=None, out_file=None) or, f(in_file=in_file, out_dir=...
def permissions(self): """Instance depends on the API version: * 2015-07-01: :class:`PermissionsOperations<azure.mgmt.authorization.v2015_07_01.operations.PermissionsOperations>` * 2018-01-01-preview: :class:`PermissionsOperations<azure.mgmt.authorization.v2018_01_01_preview.operations.Pe...
def function[permissions, parameter[self]]: constant[Instance depends on the API version: * 2015-07-01: :class:`PermissionsOperations<azure.mgmt.authorization.v2015_07_01.operations.PermissionsOperations>` * 2018-01-01-preview: :class:`PermissionsOperations<azure.mgmt.authorization.v2018_...
keyword[def] identifier[permissions] ( identifier[self] ): literal[string] identifier[api_version] = identifier[self] . identifier[_get_api_version] ( literal[string] ) keyword[if] identifier[api_version] == literal[string] : keyword[from] . identifier[v2015_07_01] . identifi...
def permissions(self): """Instance depends on the API version: * 2015-07-01: :class:`PermissionsOperations<azure.mgmt.authorization.v2015_07_01.operations.PermissionsOperations>` * 2018-01-01-preview: :class:`PermissionsOperations<azure.mgmt.authorization.v2018_01_01_preview.operations.Permis...
def connect(self, *args): """Registers new sockets and their clients and allocates uuids""" self.log("Connect ", args, lvl=verbose) try: sock = args[0] ip = args[1] if sock not in self._sockets: self.log("New client connected:", ip, lvl=debu...
def function[connect, parameter[self]]: constant[Registers new sockets and their clients and allocates uuids] call[name[self].log, parameter[constant[Connect ], name[args]]] <ast.Try object at 0x7da1b0f3bbb0>
keyword[def] identifier[connect] ( identifier[self] ,* identifier[args] ): literal[string] identifier[self] . identifier[log] ( literal[string] , identifier[args] , identifier[lvl] = identifier[verbose] ) keyword[try] : identifier[sock] = identifier[args] [ literal[int] ] ...
def connect(self, *args): """Registers new sockets and their clients and allocates uuids""" self.log('Connect ', args, lvl=verbose) try: sock = args[0] ip = args[1] if sock not in self._sockets: self.log('New client connected:', ip, lvl=debug) clientuuid = str...
def polling(self, none_stop=False, interval=0, timeout=20): """ This function creates a new Thread that calls an internal __retrieve_updates function. This allows the bot to retrieve Updates automagically and notify listeners and message handlers accordingly. Warning: Do not call this f...
def function[polling, parameter[self, none_stop, interval, timeout]]: constant[ This function creates a new Thread that calls an internal __retrieve_updates function. This allows the bot to retrieve Updates automagically and notify listeners and message handlers accordingly. Warning: Do...
keyword[def] identifier[polling] ( identifier[self] , identifier[none_stop] = keyword[False] , identifier[interval] = literal[int] , identifier[timeout] = literal[int] ): literal[string] keyword[if] identifier[self] . identifier[threaded] : identifier[self] . identifier[__threaded_pol...
def polling(self, none_stop=False, interval=0, timeout=20): """ This function creates a new Thread that calls an internal __retrieve_updates function. This allows the bot to retrieve Updates automagically and notify listeners and message handlers accordingly. Warning: Do not call this funct...
def after(self, context): "Invokes all after functions with context passed to them." self._invoke(self._after, context) run.after_each.execute(context)
def function[after, parameter[self, context]]: constant[Invokes all after functions with context passed to them.] call[name[self]._invoke, parameter[name[self]._after, name[context]]] call[name[run].after_each.execute, parameter[name[context]]]
keyword[def] identifier[after] ( identifier[self] , identifier[context] ): literal[string] identifier[self] . identifier[_invoke] ( identifier[self] . identifier[_after] , identifier[context] ) identifier[run] . identifier[after_each] . identifier[execute] ( identifier[context] )
def after(self, context): """Invokes all after functions with context passed to them.""" self._invoke(self._after, context) run.after_each.execute(context)
def _leave_event_hide(self): """ Hides the tooltip after some time has passed (assuming the cursor is not over the tooltip). """ if (not self._hide_timer.isActive() and # If Enter events always came after Leave events, we wouldn't need # this check. But on Mac...
def function[_leave_event_hide, parameter[self]]: constant[ Hides the tooltip after some time has passed (assuming the cursor is not over the tooltip). ] if <ast.BoolOp object at 0x7da2041db0d0> begin[:] call[name[self]._hide_timer.start, parameter[constant[300], name...
keyword[def] identifier[_leave_event_hide] ( identifier[self] ): literal[string] keyword[if] ( keyword[not] identifier[self] . identifier[_hide_timer] . identifier[isActive] () keyword[and] identifier[QtGui] . identifier[qApp] . identifier[topLevelAt] ( identif...
def _leave_event_hide(self): """ Hides the tooltip after some time has passed (assuming the cursor is not over the tooltip). """ if not self._hide_timer.isActive() and QtGui.qApp.topLevelAt(QtGui.QCursor.pos()) != self: # If Enter events always came after Leave events, we wouldn't ne...
def template_inheritance(obj): ''' Generator that iterates the template and its ancestors. The order is from most specialized (furthest descendant) to most general (furthest ancestor). obj can be either: 1. Mako Template object 2. Mako `self` object (available within a rendering tem...
def function[template_inheritance, parameter[obj]]: constant[ Generator that iterates the template and its ancestors. The order is from most specialized (furthest descendant) to most general (furthest ancestor). obj can be either: 1. Mako Template object 2. Mako `self` object (a...
keyword[def] identifier[template_inheritance] ( identifier[obj] ): literal[string] keyword[if] identifier[isinstance] ( identifier[obj] , identifier[MakoTemplate] ): identifier[obj] = identifier[create_mako_context] ( identifier[obj] )[ literal[string] ] keyword[elif] identifier[isinstance]...
def template_inheritance(obj): """ Generator that iterates the template and its ancestors. The order is from most specialized (furthest descendant) to most general (furthest ancestor). obj can be either: 1. Mako Template object 2. Mako `self` object (available within a rendering tem...
def from_frequencies(cls, frequencies, concat=None): """ Build Huffman code table from given symbol frequencies :param frequencies: symbol to frequency mapping :param concat: function to concatenate symbols """ concat = concat or _guess_concat(next(iter(frequencies))) ...
def function[from_frequencies, parameter[cls, frequencies, concat]]: constant[ Build Huffman code table from given symbol frequencies :param frequencies: symbol to frequency mapping :param concat: function to concatenate symbols ] variable[concat] assign[=] <ast.BoolOp ob...
keyword[def] identifier[from_frequencies] ( identifier[cls] , identifier[frequencies] , identifier[concat] = keyword[None] ): literal[string] identifier[concat] = identifier[concat] keyword[or] identifier[_guess_concat] ( identifier[next] ( identifier[iter] ( identifier[frequencies] ))) ...
def from_frequencies(cls, frequencies, concat=None): """ Build Huffman code table from given symbol frequencies :param frequencies: symbol to frequency mapping :param concat: function to concatenate symbols """ concat = concat or _guess_concat(next(iter(frequencies))) # Heap ...
def send_notification(self, method, *args): """Send a JSON-RPC notification. The notification *method* is sent with positional arguments *args*. """ message = self._version.create_request(method, args, notification=True) self.send_message(message)
def function[send_notification, parameter[self, method]]: constant[Send a JSON-RPC notification. The notification *method* is sent with positional arguments *args*. ] variable[message] assign[=] call[name[self]._version.create_request, parameter[name[method], name[args]]] call[n...
keyword[def] identifier[send_notification] ( identifier[self] , identifier[method] ,* identifier[args] ): literal[string] identifier[message] = identifier[self] . identifier[_version] . identifier[create_request] ( identifier[method] , identifier[args] , identifier[notification] = keyword[True] ) ...
def send_notification(self, method, *args): """Send a JSON-RPC notification. The notification *method* is sent with positional arguments *args*. """ message = self._version.create_request(method, args, notification=True) self.send_message(message)
def ls(path, load_path=None): # pylint: disable=C0103 ''' List the direct children of a node CLI Example: .. code-block:: bash salt '*' augeas.ls /files/etc/passwd path The path to list .. versionadded:: 2016.3.0 load_path A colon-spearated list of directories ...
def function[ls, parameter[path, load_path]]: constant[ List the direct children of a node CLI Example: .. code-block:: bash salt '*' augeas.ls /files/etc/passwd path The path to list .. versionadded:: 2016.3.0 load_path A colon-spearated list of directories...
keyword[def] identifier[ls] ( identifier[path] , identifier[load_path] = keyword[None] ): literal[string] keyword[def] identifier[_match] ( identifier[path] ): literal[string] keyword[try] : identifier[matches] = identifier[aug] . identifier[match] ( identifier[salt] . iden...
def ls(path, load_path=None): # pylint: disable=C0103 "\n List the direct children of a node\n\n CLI Example:\n\n .. code-block:: bash\n\n salt '*' augeas.ls /files/etc/passwd\n\n path\n The path to list\n\n .. versionadded:: 2016.3.0\n\n load_path\n A colon-spearated list of...
def open(self): """ Search device on USB tree and set is as escpos device """ self.device = usb.core.find(idVendor=self.idVendor, idProduct=self.idProduct) if self.device is None: raise NoDeviceError() try: if self.device.is_kernel_driver_active(self.inte...
def function[open, parameter[self]]: constant[ Search device on USB tree and set is as escpos device ] name[self].device assign[=] call[name[usb].core.find, parameter[]] if compare[name[self].device is constant[None]] begin[:] <ast.Raise object at 0x7da18dc9a290> <ast.Try object at 0...
keyword[def] identifier[open] ( identifier[self] ): literal[string] identifier[self] . identifier[device] = identifier[usb] . identifier[core] . identifier[find] ( identifier[idVendor] = identifier[self] . identifier[idVendor] , identifier[idProduct] = identifier[self] . identifier[idProduct] ) ...
def open(self): """ Search device on USB tree and set is as escpos device """ self.device = usb.core.find(idVendor=self.idVendor, idProduct=self.idProduct) if self.device is None: raise NoDeviceError() # depends on [control=['if'], data=[]] try: if self.device.is_kernel_driver_active(se...
def prepend(self, error_message): """Add an ErrorMessage to the beginning of the queue. Tracebacks are not prepended. :param error_message: An element to add to the message. :type error_message: ErrorMessage """ self.problems = error_message.problems + self.problems ...
def function[prepend, parameter[self, error_message]]: constant[Add an ErrorMessage to the beginning of the queue. Tracebacks are not prepended. :param error_message: An element to add to the message. :type error_message: ErrorMessage ] name[self].problems assign[=] bin...
keyword[def] identifier[prepend] ( identifier[self] , identifier[error_message] ): literal[string] identifier[self] . identifier[problems] = identifier[error_message] . identifier[problems] + identifier[self] . identifier[problems] identifier[self] . identifier[details] = identifier[error...
def prepend(self, error_message): """Add an ErrorMessage to the beginning of the queue. Tracebacks are not prepended. :param error_message: An element to add to the message. :type error_message: ErrorMessage """ self.problems = error_message.problems + self.problems self.de...
def mtime(self, key): """Return the last modification time for the cache record with key. May be useful for cache instances where the stored values can get 'stale', such as caching file or network resource contents.""" if key not in self.__dict: raise CacheKeyError(key) ...
def function[mtime, parameter[self, key]]: constant[Return the last modification time for the cache record with key. May be useful for cache instances where the stored values can get 'stale', such as caching file or network resource contents.] if compare[name[key] <ast.NotIn object at 0x...
keyword[def] identifier[mtime] ( identifier[self] , identifier[key] ): literal[string] keyword[if] identifier[key] keyword[not] keyword[in] identifier[self] . identifier[__dict] : keyword[raise] identifier[CacheKeyError] ( identifier[key] ) keyword[else] : id...
def mtime(self, key): """Return the last modification time for the cache record with key. May be useful for cache instances where the stored values can get 'stale', such as caching file or network resource contents.""" if key not in self.__dict: raise CacheKeyError(key) # depends on [co...
def add (self, ps): """ Creates a new property set containing the properties in this one, plus the ones of the property set passed as argument. """ assert isinstance(ps, PropertySet) if ps not in self.added_: self.added_[ps] = create(self.all_ + ps.all()) ...
def function[add, parameter[self, ps]]: constant[ Creates a new property set containing the properties in this one, plus the ones of the property set passed as argument. ] assert[call[name[isinstance], parameter[name[ps], name[PropertySet]]]] if compare[name[ps] <ast.NotIn object...
keyword[def] identifier[add] ( identifier[self] , identifier[ps] ): literal[string] keyword[assert] identifier[isinstance] ( identifier[ps] , identifier[PropertySet] ) keyword[if] identifier[ps] keyword[not] keyword[in] identifier[self] . identifier[added_] : identifier[s...
def add(self, ps): """ Creates a new property set containing the properties in this one, plus the ones of the property set passed as argument. """ assert isinstance(ps, PropertySet) if ps not in self.added_: self.added_[ps] = create(self.all_ + ps.all()) # depends on [control=['...
def paged_search_ext_s(self, base, scope, filterstr='(objectClass=*)', attrlist=None, attrsonly=0, serverctrls=None, clientctrls=None, timeout=-1, sizelimit=0): """ Behaves exactly like LDAPObject.search_ext_s() but internally uses the simple paged results control to r...
def function[paged_search_ext_s, parameter[self, base, scope, filterstr, attrlist, attrsonly, serverctrls, clientctrls, timeout, sizelimit]]: constant[ Behaves exactly like LDAPObject.search_ext_s() but internally uses the simple paged results control to retrieve search results in chunks. ...
keyword[def] identifier[paged_search_ext_s] ( identifier[self] , identifier[base] , identifier[scope] , identifier[filterstr] = literal[string] , identifier[attrlist] = keyword[None] , identifier[attrsonly] = literal[int] , identifier[serverctrls] = keyword[None] , identifier[clientctrls] = keyword[None] , identifie...
def paged_search_ext_s(self, base, scope, filterstr='(objectClass=*)', attrlist=None, attrsonly=0, serverctrls=None, clientctrls=None, timeout=-1, sizelimit=0): """ Behaves exactly like LDAPObject.search_ext_s() but internally uses the simple paged results control to retrieve search results in chunk...
def to_df(self) -> pd.DataFrame: """Convert to pandas dataframe.""" df = pd.DataFrame(index=RangeIndex(0, self.shape[0], name=None)) for key in self.keys(): value = self[key] for icolumn, column in enumerate(value.T): df['{}{}'.format(key, icolumn+1)] = co...
def function[to_df, parameter[self]]: constant[Convert to pandas dataframe.] variable[df] assign[=] call[name[pd].DataFrame, parameter[]] for taget[name[key]] in starred[call[name[self].keys, parameter[]]] begin[:] variable[value] assign[=] call[name[self]][name[key]] ...
keyword[def] identifier[to_df] ( identifier[self] )-> identifier[pd] . identifier[DataFrame] : literal[string] identifier[df] = identifier[pd] . identifier[DataFrame] ( identifier[index] = identifier[RangeIndex] ( literal[int] , identifier[self] . identifier[shape] [ literal[int] ], identifier[name...
def to_df(self) -> pd.DataFrame: """Convert to pandas dataframe.""" df = pd.DataFrame(index=RangeIndex(0, self.shape[0], name=None)) for key in self.keys(): value = self[key] for (icolumn, column) in enumerate(value.T): df['{}{}'.format(key, icolumn + 1)] = column # depends on [...
def subscribe(self, topics=(), pattern=None, listener=None): """Subscribe to a list of topics, or a topic regex pattern. Partitions will be dynamically assigned via a group coordinator. Topic subscriptions are not incremental: this list will replace the current assignment (if there is o...
def function[subscribe, parameter[self, topics, pattern, listener]]: constant[Subscribe to a list of topics, or a topic regex pattern. Partitions will be dynamically assigned via a group coordinator. Topic subscriptions are not incremental: this list will replace the current assignment ...
keyword[def] identifier[subscribe] ( identifier[self] , identifier[topics] =(), identifier[pattern] = keyword[None] , identifier[listener] = keyword[None] ): literal[string] identifier[self] . identifier[_subscription] . identifier[subscribe] ( identifier[topics] = identifier[topics] , ...
def subscribe(self, topics=(), pattern=None, listener=None): """Subscribe to a list of topics, or a topic regex pattern. Partitions will be dynamically assigned via a group coordinator. Topic subscriptions are not incremental: this list will replace the current assignment (if there is one)....
def QA_fetch_stock_terminated(collections=DATABASE.stock_terminated): '获取股票基本信息 , 已经退市的股票列表' # 🛠todo 转变成 dataframe 类型数据 return pd.DataFrame([item for item in collections.find()]).drop('_id', axis=1, inplace=False).set_index('code', drop=False)
def function[QA_fetch_stock_terminated, parameter[collections]]: constant[获取股票基本信息 , 已经退市的股票列表] return[call[call[call[name[pd].DataFrame, parameter[<ast.ListComp object at 0x7da1b1ff2110>]].drop, parameter[constant[_id]]].set_index, parameter[constant[code]]]]
keyword[def] identifier[QA_fetch_stock_terminated] ( identifier[collections] = identifier[DATABASE] . identifier[stock_terminated] ): literal[string] keyword[return] identifier[pd] . identifier[DataFrame] ([ identifier[item] keyword[for] identifier[item] keyword[in] identifier[collections] . iden...
def QA_fetch_stock_terminated(collections=DATABASE.stock_terminated): """获取股票基本信息 , 已经退市的股票列表""" # 🛠todo 转变成 dataframe 类型数据 return pd.DataFrame([item for item in collections.find()]).drop('_id', axis=1, inplace=False).set_index('code', drop=False)
def check_partition_column(partition_column, cols): """ Check partition_column existence and type Args: partition_column: partition_column name cols: dict with columns names and python types Returns: None """ for k, v in cols.items(): if k == partition_column: ...
def function[check_partition_column, parameter[partition_column, cols]]: constant[ Check partition_column existence and type Args: partition_column: partition_column name cols: dict with columns names and python types Returns: None ] for taget[tuple[[<ast.Name objec...
keyword[def] identifier[check_partition_column] ( identifier[partition_column] , identifier[cols] ): literal[string] keyword[for] identifier[k] , identifier[v] keyword[in] identifier[cols] . identifier[items] (): keyword[if] identifier[k] == identifier[partition_column] : keyword[...
def check_partition_column(partition_column, cols): """ Check partition_column existence and type Args: partition_column: partition_column name cols: dict with columns names and python types Returns: None """ for (k, v) in cols.items(): if k == partition_column: ...
def total_flux(F, A=None): r"""Compute the total flux, or turnover flux, that is produced by the flux sources and consumed by the flux sinks. Parameters ---------- F : (M, M) ndarray Matrix of flux values between pairs of states. A : array_like (optional) List of integer sta...
def function[total_flux, parameter[F, A]]: constant[Compute the total flux, or turnover flux, that is produced by the flux sources and consumed by the flux sinks. Parameters ---------- F : (M, M) ndarray Matrix of flux values between pairs of states. A : array_like (optional) ...
keyword[def] identifier[total_flux] ( identifier[F] , identifier[A] = keyword[None] ): literal[string] keyword[if] identifier[issparse] ( identifier[F] ): keyword[return] identifier[sparse] . identifier[tpt] . identifier[total_flux] ( identifier[F] , identifier[A] = identifier[A] ) keyword[...
def total_flux(F, A=None): """Compute the total flux, or turnover flux, that is produced by the flux sources and consumed by the flux sinks. Parameters ---------- F : (M, M) ndarray Matrix of flux values between pairs of states. A : array_like (optional) List of integer stat...
def exists_table_upgrades(self): """Return if the upgrades table exists Returns ------- bool True if the table exists False if the table don't exists""" query = """ SELECT EXISTS ( SELECT 1 FROM information_schema.ta...
def function[exists_table_upgrades, parameter[self]]: constant[Return if the upgrades table exists Returns ------- bool True if the table exists False if the table don't exists] variable[query] assign[=] call[constant[ SELECT EXISTS ( ...
keyword[def] identifier[exists_table_upgrades] ( identifier[self] ): literal[string] identifier[query] = literal[string] . identifier[format] ( identifier[self] . identifier[upgrades_table] [: identifier[self] . identifier[upgrades_table] . identifier[index] ( literal[string] )], identifi...
def exists_table_upgrades(self): """Return if the upgrades table exists Returns ------- bool True if the table exists False if the table don't exists""" query = "\n SELECT EXISTS (\n SELECT 1\n FROM information_schema.tables\n ...
def to_float(self): """ Converts to 32-bit data. Returns ------- :obj:`DepthImage` depth image with 32 bit float data """ return DepthImage(self.data.astype(np.float32), frame=self.frame)
def function[to_float, parameter[self]]: constant[ Converts to 32-bit data. Returns ------- :obj:`DepthImage` depth image with 32 bit float data ] return[call[name[DepthImage], parameter[call[name[self].data.astype, parameter[name[np].float32]]]]]
keyword[def] identifier[to_float] ( identifier[self] ): literal[string] keyword[return] identifier[DepthImage] ( identifier[self] . identifier[data] . identifier[astype] ( identifier[np] . identifier[float32] ), identifier[frame] = identifier[self] . identifier[frame] )
def to_float(self): """ Converts to 32-bit data. Returns ------- :obj:`DepthImage` depth image with 32 bit float data """ return DepthImage(self.data.astype(np.float32), frame=self.frame)
def make_device_class(spark_cloud, entries, timeout=30): """Returns a dynamic Device class based on what a GET device list from the Spark Cloud returns. spark_cloud parameter should be the caller instance of SparkCloud. entries parameter should be the list of fields the...
def function[make_device_class, parameter[spark_cloud, entries, timeout]]: constant[Returns a dynamic Device class based on what a GET device list from the Spark Cloud returns. spark_cloud parameter should be the caller instance of SparkCloud. entries parameter should b...
keyword[def] identifier[make_device_class] ( identifier[spark_cloud] , identifier[entries] , identifier[timeout] = literal[int] ): literal[string] identifier[attrs] = identifier[list] ( identifier[set] ( identifier[list] ( identifier[entries] )+[ literal[string] , literal...
def make_device_class(spark_cloud, entries, timeout=30): """Returns a dynamic Device class based on what a GET device list from the Spark Cloud returns. spark_cloud parameter should be the caller instance of SparkCloud. entries parameter should be the list of fields the Spa...
def has_main_target (self, name): """Tells if a main target with the specified name exists.""" assert isinstance(name, basestring) if not self.built_main_targets_: self.build_main_targets() return name in self.main_target_
def function[has_main_target, parameter[self, name]]: constant[Tells if a main target with the specified name exists.] assert[call[name[isinstance], parameter[name[name], name[basestring]]]] if <ast.UnaryOp object at 0x7da1b1f09840> begin[:] call[name[self].build_main_targets, parame...
keyword[def] identifier[has_main_target] ( identifier[self] , identifier[name] ): literal[string] keyword[assert] identifier[isinstance] ( identifier[name] , identifier[basestring] ) keyword[if] keyword[not] identifier[self] . identifier[built_main_targets_] : identifier[se...
def has_main_target(self, name): """Tells if a main target with the specified name exists.""" assert isinstance(name, basestring) if not self.built_main_targets_: self.build_main_targets() # depends on [control=['if'], data=[]] return name in self.main_target_
def remove_root_metadata(docgraph): """ removes the ``metadata`` attribute of the root node of a document graph. this is necessary for some exporters, as the attribute may contain (nested) dictionaries. """ docgraph.node[docgraph.root].pop('metadata', None) # delete metadata from the generic...
def function[remove_root_metadata, parameter[docgraph]]: constant[ removes the ``metadata`` attribute of the root node of a document graph. this is necessary for some exporters, as the attribute may contain (nested) dictionaries. ] call[call[name[docgraph].node][name[docgraph].root].pop,...
keyword[def] identifier[remove_root_metadata] ( identifier[docgraph] ): literal[string] identifier[docgraph] . identifier[node] [ identifier[docgraph] . identifier[root] ]. identifier[pop] ( literal[string] , keyword[None] ) keyword[if] literal[string] keyword[in] identifier[docgraph] . i...
def remove_root_metadata(docgraph): """ removes the ``metadata`` attribute of the root node of a document graph. this is necessary for some exporters, as the attribute may contain (nested) dictionaries. """ docgraph.node[docgraph.root].pop('metadata', None) # delete metadata from the generic...
def bot(self, id): """ Retrieve a single bot. Args: id (str): UUID or username of the bot Returns: SkypeBotUser: resulting bot user object """ json = self.skype.conn("GET", "{0}/agents".format(SkypeConnection.API_BOT), params={"agentId": id}, ...
def function[bot, parameter[self, id]]: constant[ Retrieve a single bot. Args: id (str): UUID or username of the bot Returns: SkypeBotUser: resulting bot user object ] variable[json] assign[=] call[call[call[name[self].skype.conn, parameter[const...
keyword[def] identifier[bot] ( identifier[self] , identifier[id] ): literal[string] identifier[json] = identifier[self] . identifier[skype] . identifier[conn] ( literal[string] , literal[string] . identifier[format] ( identifier[SkypeConnection] . identifier[API_BOT] ), identifier[params] ={ litera...
def bot(self, id): """ Retrieve a single bot. Args: id (str): UUID or username of the bot Returns: SkypeBotUser: resulting bot user object """ json = self.skype.conn('GET', '{0}/agents'.format(SkypeConnection.API_BOT), params={'agentId': id}, auth=SkypeC...
def Add(self, service, method, request, global_params=None): """Add a request to the batch. Args: service: A class inheriting base_api.BaseApiService. method: A string indicated desired method from the service. See the example in the class docstring. request:...
def function[Add, parameter[self, service, method, request, global_params]]: constant[Add a request to the batch. Args: service: A class inheriting base_api.BaseApiService. method: A string indicated desired method from the service. See the example in the class docstri...
keyword[def] identifier[Add] ( identifier[self] , identifier[service] , identifier[method] , identifier[request] , identifier[global_params] = keyword[None] ): literal[string] identifier[method_config] = identifier[service] . identifier[GetMethodConfig] ( identifier[method] ) iden...
def Add(self, service, method, request, global_params=None): """Add a request to the batch. Args: service: A class inheriting base_api.BaseApiService. method: A string indicated desired method from the service. See the example in the class docstring. request: An ...
def write(config): """Commits any pending modifications, ie save a configuration file if it has been marked "dirty" as a result of an normal assignment. The modifications are written to the first writable source in this config object. .. note:: This is a static metho...
def function[write, parameter[config]]: constant[Commits any pending modifications, ie save a configuration file if it has been marked "dirty" as a result of an normal assignment. The modifications are written to the first writable source in this config object. .. note:: ...
keyword[def] identifier[write] ( identifier[config] ): literal[string] identifier[root] = identifier[config] keyword[while] identifier[root] . identifier[_parent] : identifier[root] = identifier[root] . identifier[_parent] keyword[for] identifier[source] keyword...
def write(config): """Commits any pending modifications, ie save a configuration file if it has been marked "dirty" as a result of an normal assignment. The modifications are written to the first writable source in this config object. .. note:: This is a static method, i...
def add_message_event(proto_message, span, message_event_type, message_id=1): """Adds a MessageEvent to the span based off of the given protobuf message """ span.add_time_event( time_event=time_event.TimeEvent( datetime.utcnow(), message_event=time_event.MessageEvent( ...
def function[add_message_event, parameter[proto_message, span, message_event_type, message_id]]: constant[Adds a MessageEvent to the span based off of the given protobuf message ] call[name[span].add_time_event, parameter[]]
keyword[def] identifier[add_message_event] ( identifier[proto_message] , identifier[span] , identifier[message_event_type] , identifier[message_id] = literal[int] ): literal[string] identifier[span] . identifier[add_time_event] ( identifier[time_event] = identifier[time_event] . identifier[TimeEvent] ...
def add_message_event(proto_message, span, message_event_type, message_id=1): """Adds a MessageEvent to the span based off of the given protobuf message """ span.add_time_event(time_event=time_event.TimeEvent(datetime.utcnow(), message_event=time_event.MessageEvent(message_id, type=message_event_type, u...
def twice(self): """ Inspected function should be called two times Return: self """ def check(): #pylint: disable=missing-docstring return super(SinonExpectation, self).calledTwice self.valid_list.append(check) return self
def function[twice, parameter[self]]: constant[ Inspected function should be called two times Return: self ] def function[check, parameter[]]: return[call[name[super], parameter[name[SinonExpectation], name[self]]].calledTwice] call[name[self].valid_list.append, p...
keyword[def] identifier[twice] ( identifier[self] ): literal[string] keyword[def] identifier[check] (): keyword[return] identifier[super] ( identifier[SinonExpectation] , identifier[self] ). identifier[calledTwice] identifier[self] . identifier[valid_list] . identifier[appe...
def twice(self): """ Inspected function should be called two times Return: self """ def check(): #pylint: disable=missing-docstring return super(SinonExpectation, self).calledTwice self.valid_list.append(check) return self
def _symbol_extract(self, regex, plus = True, brackets=False): """Extracts a symbol or full symbol from the current line, optionally including the character under the cursor. :arg regex: the compiled regular expression to use for extraction. :arg plus: when true, the character under th...
def function[_symbol_extract, parameter[self, regex, plus, brackets]]: constant[Extracts a symbol or full symbol from the current line, optionally including the character under the cursor. :arg regex: the compiled regular expression to use for extraction. :arg plus: when true, the char...
keyword[def] identifier[_symbol_extract] ( identifier[self] , identifier[regex] , identifier[plus] = keyword[True] , identifier[brackets] = keyword[False] ): literal[string] identifier[charplus] = identifier[self] . identifier[pos] [ literal[int] ]+( literal[int] keyword[if] identifier[plus] key...
def _symbol_extract(self, regex, plus=True, brackets=False): """Extracts a symbol or full symbol from the current line, optionally including the character under the cursor. :arg regex: the compiled regular expression to use for extraction. :arg plus: when true, the character under the curs...
def get_hierarchy(ontology, ols_base=None): """Iterates over the parent-child relationships in an ontolog :param str ontology: The name of the ontology :param str ols_base: An optional, custom OLS base url :rtype: iter[tuple[str,str]] """ client = OlsClient(ols_base=ols_base) return client....
def function[get_hierarchy, parameter[ontology, ols_base]]: constant[Iterates over the parent-child relationships in an ontolog :param str ontology: The name of the ontology :param str ols_base: An optional, custom OLS base url :rtype: iter[tuple[str,str]] ] variable[client] assign[=] c...
keyword[def] identifier[get_hierarchy] ( identifier[ontology] , identifier[ols_base] = keyword[None] ): literal[string] identifier[client] = identifier[OlsClient] ( identifier[ols_base] = identifier[ols_base] ) keyword[return] identifier[client] . identifier[iter_hierarchy] ( identifier[ontology] )
def get_hierarchy(ontology, ols_base=None): """Iterates over the parent-child relationships in an ontolog :param str ontology: The name of the ontology :param str ols_base: An optional, custom OLS base url :rtype: iter[tuple[str,str]] """ client = OlsClient(ols_base=ols_base) return client....
def predict_proba(self, a, b, **kwargs): """Prediction method for pairwise causal inference using the ANM model. Args: a (numpy.ndarray): Variable 1 b (numpy.ndarray): Variable 2 Returns: float: Causation score (Value : 1 if a->b and -1 if b->a) """ ...
def function[predict_proba, parameter[self, a, b]]: constant[Prediction method for pairwise causal inference using the ANM model. Args: a (numpy.ndarray): Variable 1 b (numpy.ndarray): Variable 2 Returns: float: Causation score (Value : 1 if a->b and -1 if b...
keyword[def] identifier[predict_proba] ( identifier[self] , identifier[a] , identifier[b] ,** identifier[kwargs] ): literal[string] identifier[a] = identifier[scale] ( identifier[a] ). identifier[reshape] ((- literal[int] , literal[int] )) identifier[b] = identifier[scale] ( identifier[b] ...
def predict_proba(self, a, b, **kwargs): """Prediction method for pairwise causal inference using the ANM model. Args: a (numpy.ndarray): Variable 1 b (numpy.ndarray): Variable 2 Returns: float: Causation score (Value : 1 if a->b and -1 if b->a) """ ...
def convert(self): """ :return: Converted value. :raises typepy.TypeConversionError: If the value cannot convert. """ if self.is_type(): return self.force_convert() raise TypeConversionError( "failed to convert from {} to {}".format(t...
def function[convert, parameter[self]]: constant[ :return: Converted value. :raises typepy.TypeConversionError: If the value cannot convert. ] if call[name[self].is_type, parameter[]] begin[:] return[call[name[self].force_convert, parameter[]]] <ast.Raise ...
keyword[def] identifier[convert] ( identifier[self] ): literal[string] keyword[if] identifier[self] . identifier[is_type] (): keyword[return] identifier[self] . identifier[force_convert] () keyword[raise] identifier[TypeConversionError] ( literal[string] . identi...
def convert(self): """ :return: Converted value. :raises typepy.TypeConversionError: If the value cannot convert. """ if self.is_type(): return self.force_convert() # depends on [control=['if'], data=[]] raise TypeConversionError('failed to convert from {} to {}'...
def magic_help(keyhelp): """ returns a help message for a give magic key """ helpme = {} helpme["er_location_name"] = "Name for location or drill site" helpme["er_location_alternatives"] = "Colon-delimited list of alternative names and abbreviations" helpme["location_type"] = "Location type"...
def function[magic_help, parameter[keyhelp]]: constant[ returns a help message for a give magic key ] variable[helpme] assign[=] dictionary[[], []] call[name[helpme]][constant[er_location_name]] assign[=] constant[Name for location or drill site] call[name[helpme]][constant[er_lo...
keyword[def] identifier[magic_help] ( identifier[keyhelp] ): literal[string] identifier[helpme] ={} identifier[helpme] [ literal[string] ]= literal[string] identifier[helpme] [ literal[string] ]= literal[string] identifier[helpme] [ literal[string] ]= literal[string] identifier[helpm...
def magic_help(keyhelp): """ returns a help message for a give magic key """ helpme = {} helpme['er_location_name'] = 'Name for location or drill site' helpme['er_location_alternatives'] = 'Colon-delimited list of alternative names and abbreviations' helpme['location_type'] = 'Location type'...
def filehash(path): """Make an MD5 hash of a file, ignoring any differences in line ending characters.""" with open(path, "rU") as f: return md5(py3compat.str_to_bytes(f.read())).hexdigest()
def function[filehash, parameter[path]]: constant[Make an MD5 hash of a file, ignoring any differences in line ending characters.] with call[name[open], parameter[name[path], constant[rU]]] begin[:] return[call[call[name[md5], parameter[call[name[py3compat].str_to_bytes, parameter[call[name[...
keyword[def] identifier[filehash] ( identifier[path] ): literal[string] keyword[with] identifier[open] ( identifier[path] , literal[string] ) keyword[as] identifier[f] : keyword[return] identifier[md5] ( identifier[py3compat] . identifier[str_to_bytes] ( identifier[f] . identifier[read] ())). i...
def filehash(path): """Make an MD5 hash of a file, ignoring any differences in line ending characters.""" with open(path, 'rU') as f: return md5(py3compat.str_to_bytes(f.read())).hexdigest() # depends on [control=['with'], data=['f']]
def _get_scope_versions(self, pkg_versions): ''' Get available difference between next possible matches. :return: ''' get_in_versions = [] for p_version in pkg_versions: if fnmatch.fnmatch(p_version, self.version): get_in_versions.append(p_ver...
def function[_get_scope_versions, parameter[self, pkg_versions]]: constant[ Get available difference between next possible matches. :return: ] variable[get_in_versions] assign[=] list[[]] for taget[name[p_version]] in starred[name[pkg_versions]] begin[:] ...
keyword[def] identifier[_get_scope_versions] ( identifier[self] , identifier[pkg_versions] ): literal[string] identifier[get_in_versions] =[] keyword[for] identifier[p_version] keyword[in] identifier[pkg_versions] : keyword[if] identifier[fnmatch] . identifier[fnmatch] ( i...
def _get_scope_versions(self, pkg_versions): """ Get available difference between next possible matches. :return: """ get_in_versions = [] for p_version in pkg_versions: if fnmatch.fnmatch(p_version, self.version): get_in_versions.append(p_version) # depends on ...
def _build_parser( cls, dictionary, parser, section_name, delimiter=DEFAULT_DELIMITER, empty_sections=False, ): """ Populates a parser instance with the content of a dictionary. :param dict dictionary: The dictionary to use for populating the parser i...
def function[_build_parser, parameter[cls, dictionary, parser, section_name, delimiter, empty_sections]]: constant[ Populates a parser instance with the content of a dictionary. :param dict dictionary: The dictionary to use for populating the parser instance :param configparser.ConfigParser par...
keyword[def] identifier[_build_parser] ( identifier[cls] , identifier[dictionary] , identifier[parser] , identifier[section_name] , identifier[delimiter] = identifier[DEFAULT_DELIMITER] , identifier[empty_sections] = keyword[False] , ): literal[string] keyword[for] ( identifier[key] , identi...
def _build_parser(cls, dictionary, parser, section_name, delimiter=DEFAULT_DELIMITER, empty_sections=False): """ Populates a parser instance with the content of a dictionary. :param dict dictionary: The dictionary to use for populating the parser instance :param configparser.ConfigParser parser: Th...
def Associators(self, ObjectName, AssocClass=None, ResultClass=None, Role=None, ResultRole=None, IncludeQualifiers=None, IncludeClassOrigin=None, PropertyList=None, **extra): # pylint: disable=invalid-name, line-too-long """ Retrieve the instances associat...
def function[Associators, parameter[self, ObjectName, AssocClass, ResultClass, Role, ResultRole, IncludeQualifiers, IncludeClassOrigin, PropertyList]]: constant[ Retrieve the instances associated to a source instance, or the classes associated to a source class. This method performs the...
keyword[def] identifier[Associators] ( identifier[self] , identifier[ObjectName] , identifier[AssocClass] = keyword[None] , identifier[ResultClass] = keyword[None] , identifier[Role] = keyword[None] , identifier[ResultRole] = keyword[None] , identifier[IncludeQualifiers] = keyword[None] , identifier[IncludeClassOri...
def Associators(self, ObjectName, AssocClass=None, ResultClass=None, Role=None, ResultRole=None, IncludeQualifiers=None, IncludeClassOrigin=None, PropertyList=None, **extra): # pylint: disable=invalid-name, line-too-long '\n Retrieve the instances associated to a source instance, or the classes\n ...
def _assemble_and_send_request(self): """ Fires off the Fedex request. @warning: NEVER CALL THIS METHOD DIRECTLY. CALL send_request(), WHICH RESIDES ON FedexBaseService AND IS INHERITED. """ # We get an exception like this when specifying an IntegratorId: ...
def function[_assemble_and_send_request, parameter[self]]: constant[ Fires off the Fedex request. @warning: NEVER CALL THIS METHOD DIRECTLY. CALL send_request(), WHICH RESIDES ON FedexBaseService AND IS INHERITED. ] <ast.Delete object at 0x7da1b1110a90> ...
keyword[def] identifier[_assemble_and_send_request] ( identifier[self] ): literal[string] keyword[del] identifier[self] . identifier[ClientDetail] . identifier[IntegratorId] identifier[self] . identifier[logger] . identifier[debug] ( identifier[self] . identif...
def _assemble_and_send_request(self): """ Fires off the Fedex request. @warning: NEVER CALL THIS METHOD DIRECTLY. CALL send_request(), WHICH RESIDES ON FedexBaseService AND IS INHERITED. """ # We get an exception like this when specifying an IntegratorId: # suds...
def clean(self): """Remove all of the terms from the section, and also remove them from the document""" terms = list(self) for t in terms: self.doc.remove_term(t)
def function[clean, parameter[self]]: constant[Remove all of the terms from the section, and also remove them from the document] variable[terms] assign[=] call[name[list], parameter[name[self]]] for taget[name[t]] in starred[name[terms]] begin[:] call[name[self].doc.remove_term, ...
keyword[def] identifier[clean] ( identifier[self] ): literal[string] identifier[terms] = identifier[list] ( identifier[self] ) keyword[for] identifier[t] keyword[in] identifier[terms] : identifier[self] . identifier[doc] . identifier[remove_term] ( identifier[t] )
def clean(self): """Remove all of the terms from the section, and also remove them from the document""" terms = list(self) for t in terms: self.doc.remove_term(t) # depends on [control=['for'], data=['t']]
def make_new_subdomain_future(self, cursor, subdomain_rec): """ Recalculate the future for this subdomain from the current record until the latest known record. Returns the list of subdomain records we need to save. """ assert subdomain_rec.accepted, 'BUG: given subdomain...
def function[make_new_subdomain_future, parameter[self, cursor, subdomain_rec]]: constant[ Recalculate the future for this subdomain from the current record until the latest known record. Returns the list of subdomain records we need to save. ] assert[name[subdomain_rec].acce...
keyword[def] identifier[make_new_subdomain_future] ( identifier[self] , identifier[cursor] , identifier[subdomain_rec] ): literal[string] keyword[assert] identifier[subdomain_rec] . identifier[accepted] , literal[string] identifier[fut] = identifier[self] . identifier[subdomain...
def make_new_subdomain_future(self, cursor, subdomain_rec): """ Recalculate the future for this subdomain from the current record until the latest known record. Returns the list of subdomain records we need to save. """ assert subdomain_rec.accepted, 'BUG: given subdomain record ...
def enable_rights(self): """ Enables rights management provided by :class:`fatbotslim.handlers.RightsHandler`. """ if self.rights is None: handler_instance = RightsHandler(self) self.handlers.insert(len(self.default_handlers), handler_instance)
def function[enable_rights, parameter[self]]: constant[ Enables rights management provided by :class:`fatbotslim.handlers.RightsHandler`. ] if compare[name[self].rights is constant[None]] begin[:] variable[handler_instance] assign[=] call[name[RightsHandler], parameter[na...
keyword[def] identifier[enable_rights] ( identifier[self] ): literal[string] keyword[if] identifier[self] . identifier[rights] keyword[is] keyword[None] : identifier[handler_instance] = identifier[RightsHandler] ( identifier[self] ) identifier[self] . identifier[handler...
def enable_rights(self): """ Enables rights management provided by :class:`fatbotslim.handlers.RightsHandler`. """ if self.rights is None: handler_instance = RightsHandler(self) self.handlers.insert(len(self.default_handlers), handler_instance) # depends on [control=['if'], data...
async def forward(self, chat_id, disable_notification=None) -> Message: """ Forward this message :param chat_id: :param disable_notification: :return: """ return await self.bot.forward_message(chat_id, self.chat.id, self.message_id, disable_notification)
<ast.AsyncFunctionDef object at 0x7da1b17d7970>
keyword[async] keyword[def] identifier[forward] ( identifier[self] , identifier[chat_id] , identifier[disable_notification] = keyword[None] )-> identifier[Message] : literal[string] keyword[return] keyword[await] identifier[self] . identifier[bot] . identifier[forward_message] ( identifier[chat_...
async def forward(self, chat_id, disable_notification=None) -> Message: """ Forward this message :param chat_id: :param disable_notification: :return: """ return await self.bot.forward_message(chat_id, self.chat.id, self.message_id, disable_notification)
def fetchall(self, query, *args): """ Returns all results of the given query. :param query: The query to be executed as a `str`. :param params: A `tuple` of parameters that will be replaced for placeholders in the query. :return: A `list` of `tuple`s with ...
def function[fetchall, parameter[self, query]]: constant[ Returns all results of the given query. :param query: The query to be executed as a `str`. :param params: A `tuple` of parameters that will be replaced for placeholders in the query. :return: A `lis...
keyword[def] identifier[fetchall] ( identifier[self] , identifier[query] ,* identifier[args] ): literal[string] identifier[cursor] = identifier[self] . identifier[connection] . identifier[cursor] () keyword[try] : identifier[cursor] . identifier[execute] ( identifier[query] ,...
def fetchall(self, query, *args): """ Returns all results of the given query. :param query: The query to be executed as a `str`. :param params: A `tuple` of parameters that will be replaced for placeholders in the query. :return: A `list` of `tuple`s with each...
def logging_stream_install(loglevel): """ Install logger that will output to stderr. If this function ha already installed a handler, replace it. :param loglevel: log level for the stream """ formatter = logging.Formatter(LOGGING_FORMAT) logger = logging.getLogger() logger.removeHandler(LOG...
def function[logging_stream_install, parameter[loglevel]]: constant[ Install logger that will output to stderr. If this function ha already installed a handler, replace it. :param loglevel: log level for the stream ] variable[formatter] assign[=] call[name[logging].Formatter, parameter[name[...
keyword[def] identifier[logging_stream_install] ( identifier[loglevel] ): literal[string] identifier[formatter] = identifier[logging] . identifier[Formatter] ( identifier[LOGGING_FORMAT] ) identifier[logger] = identifier[logging] . identifier[getLogger] () identifier[logger] . identifier[removeH...
def logging_stream_install(loglevel): """ Install logger that will output to stderr. If this function ha already installed a handler, replace it. :param loglevel: log level for the stream """ formatter = logging.Formatter(LOGGING_FORMAT) logger = logging.getLogger() logger.removeHandler(LOGG...
def get_parameter(self, twig=None, **kwargs): """ get a parameter from those that are variables """ kwargs['twig'] = twig kwargs['check_default'] = False kwargs['check_visible'] = False ps = self.vars.filter(**kwargs) if len(ps)==1: return ps.g...
def function[get_parameter, parameter[self, twig]]: constant[ get a parameter from those that are variables ] call[name[kwargs]][constant[twig]] assign[=] name[twig] call[name[kwargs]][constant[check_default]] assign[=] constant[False] call[name[kwargs]][constant[check_vi...
keyword[def] identifier[get_parameter] ( identifier[self] , identifier[twig] = keyword[None] ,** identifier[kwargs] ): literal[string] identifier[kwargs] [ literal[string] ]= identifier[twig] identifier[kwargs] [ literal[string] ]= keyword[False] identifier[kwargs] [ literal[str...
def get_parameter(self, twig=None, **kwargs): """ get a parameter from those that are variables """ kwargs['twig'] = twig kwargs['check_default'] = False kwargs['check_visible'] = False ps = self.vars.filter(**kwargs) if len(ps) == 1: return ps.get(check_visible=False, ch...
def restoreXml(self, xml): """ Restores data from the xml entry. :param xml | <xml.etree.ElementTree.Element> :return <bool> | success """ if xml is None: return False # restore grouping grps = xm...
def function[restoreXml, parameter[self, xml]]: constant[ Restores data from the xml entry. :param xml | <xml.etree.ElementTree.Element> :return <bool> | success ] if compare[name[xml] is constant[None]] begin[:] return[constant[False]] ...
keyword[def] identifier[restoreXml] ( identifier[self] , identifier[xml] ): literal[string] keyword[if] identifier[xml] keyword[is] keyword[None] : keyword[return] keyword[False] identifier[grps] = identifier[xml] . identifier[get] ( literal[string] ) ...
def restoreXml(self, xml): """ Restores data from the xml entry. :param xml | <xml.etree.ElementTree.Element> :return <bool> | success """ if xml is None: return False # depends on [control=['if'], data=[]] # restore grouping grps = xml.ge...
def log_and_dispatch(self, state_change): """ Log and apply a state change. This function will first write the state change to the write-ahead-log, in case of a node crash the state change can be recovered and replayed to restore the node state. Events produced by applying stat...
def function[log_and_dispatch, parameter[self, state_change]]: constant[ Log and apply a state change. This function will first write the state change to the write-ahead-log, in case of a node crash the state change can be recovered and replayed to restore the node state. Event...
keyword[def] identifier[log_and_dispatch] ( identifier[self] , identifier[state_change] ): literal[string] keyword[with] identifier[self] . identifier[_lock] : identifier[timestamp] = identifier[datetime] . identifier[utcnow] (). identifier[isoformat] ( identifier[timespec] = literal...
def log_and_dispatch(self, state_change): """ Log and apply a state change. This function will first write the state change to the write-ahead-log, in case of a node crash the state change can be recovered and replayed to restore the node state. Events produced by applying state ch...
def list_attached_team(context, id, sort, limit, where, verbose): """list_attached_team(context, id, sort, limit. where. verbose) List teams attached to a topic. >>> dcictl topic-list-team :param string id: ID of the topic to list teams for [required] :param string sort: Field to apply sort :...
def function[list_attached_team, parameter[context, id, sort, limit, where, verbose]]: constant[list_attached_team(context, id, sort, limit. where. verbose) List teams attached to a topic. >>> dcictl topic-list-team :param string id: ID of the topic to list teams for [required] :param string ...
keyword[def] identifier[list_attached_team] ( identifier[context] , identifier[id] , identifier[sort] , identifier[limit] , identifier[where] , identifier[verbose] ): literal[string] identifier[result] = identifier[topic] . identifier[list_teams] ( identifier[context] , identifier[id] = identifier[id] , id...
def list_attached_team(context, id, sort, limit, where, verbose): """list_attached_team(context, id, sort, limit. where. verbose) List teams attached to a topic. >>> dcictl topic-list-team :param string id: ID of the topic to list teams for [required] :param string sort: Field to apply sort :...
def taxonomy_dict(self): """ :returns: a dict taxonomy string -> taxonomy index """ # .taxonomy must be set by the engine tdict = {taxo: idx for idx, taxo in enumerate(self.taxonomy)} return tdict
def function[taxonomy_dict, parameter[self]]: constant[ :returns: a dict taxonomy string -> taxonomy index ] variable[tdict] assign[=] <ast.DictComp object at 0x7da2054a5ea0> return[name[tdict]]
keyword[def] identifier[taxonomy_dict] ( identifier[self] ): literal[string] identifier[tdict] ={ identifier[taxo] : identifier[idx] keyword[for] identifier[idx] , identifier[taxo] keyword[in] identifier[enumerate] ( identifier[self] . identifier[taxonomy] )} keyword[return] ...
def taxonomy_dict(self): """ :returns: a dict taxonomy string -> taxonomy index """ # .taxonomy must be set by the engine tdict = {taxo: idx for (idx, taxo) in enumerate(self.taxonomy)} return tdict
def update_or_create_all(cls, list_of_kwargs, keys=[]): """Batch method for updating a list of instances and creating them if required Args: list_of_kwargs(list of dicts): A list of dicts where each dict denotes the keyword args that you would pass to...
def function[update_or_create_all, parameter[cls, list_of_kwargs, keys]]: constant[Batch method for updating a list of instances and creating them if required Args: list_of_kwargs(list of dicts): A list of dicts where each dict denotes the keyword args that you would...
keyword[def] identifier[update_or_create_all] ( identifier[cls] , identifier[list_of_kwargs] , identifier[keys] =[]): literal[string] identifier[objs] =[] keyword[for] identifier[kwargs] keyword[in] identifier[list_of_kwargs] : identifier[filter_kwargs] = identifier[subdict...
def update_or_create_all(cls, list_of_kwargs, keys=[]): """Batch method for updating a list of instances and creating them if required Args: list_of_kwargs(list of dicts): A list of dicts where each dict denotes the keyword args that you would pass to the...
def get_document(self, name, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None): """ Retrieves the specified document. Example: >>> import ...
def function[get_document, parameter[self, name, retry, timeout, metadata]]: constant[ Retrieves the specified document. Example: >>> import dialogflow_v2beta1 >>> >>> client = dialogflow_v2beta1.DocumentsClient() >>> >>> name = client...
keyword[def] identifier[get_document] ( identifier[self] , identifier[name] , identifier[retry] = identifier[google] . identifier[api_core] . identifier[gapic_v1] . identifier[method] . identifier[DEFAULT] , identifier[timeout] = identifier[google] . identifier[api_core] . identifier[gapic_v1] . identifier[method]...
def get_document(self, name, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None): """ Retrieves the specified document. Example: >>> import dialogflow_v2beta1 >>> >>> client = dialogflow_v2beta1.Documents...
def log_request(request: str, trim_log_values: bool = False, **kwargs: Any) -> None: """Log a request""" return log_(request, request_logger, logging.INFO, trim=trim_log_values, **kwargs)
def function[log_request, parameter[request, trim_log_values]]: constant[Log a request] return[call[name[log_], parameter[name[request], name[request_logger], name[logging].INFO]]]
keyword[def] identifier[log_request] ( identifier[request] : identifier[str] , identifier[trim_log_values] : identifier[bool] = keyword[False] ,** identifier[kwargs] : identifier[Any] )-> keyword[None] : literal[string] keyword[return] identifier[log_] ( identifier[request] , identifier[request_logger] , ...
def log_request(request: str, trim_log_values: bool=False, **kwargs: Any) -> None: """Log a request""" return log_(request, request_logger, logging.INFO, trim=trim_log_values, **kwargs)
def multivariate_neg_logposterior(self,beta): """ Returns negative log posterior, for a model with a covariance matrix Parameters ---------- beta : np.array Contains untransformed starting values for latent_variables Returns ---------- Negative log ...
def function[multivariate_neg_logposterior, parameter[self, beta]]: constant[ Returns negative log posterior, for a model with a covariance matrix Parameters ---------- beta : np.array Contains untransformed starting values for latent_variables Returns ----...
keyword[def] identifier[multivariate_neg_logposterior] ( identifier[self] , identifier[beta] ): literal[string] identifier[post] = identifier[self] . identifier[neg_loglik] ( identifier[beta] ) keyword[for] identifier[k] keyword[in] identifier[range] ( literal[int] , identifier[self] ....
def multivariate_neg_logposterior(self, beta): """ Returns negative log posterior, for a model with a covariance matrix Parameters ---------- beta : np.array Contains untransformed starting values for latent_variables Returns ---------- Negative log pos...
def _filter_subgraph(self, subgraph, predicate): """ Given a subgraph of the manifest, and a predicate, filter the subgraph using that predicate. Generates a list of nodes. """ to_return = [] for unique_id, item in subgraph.items(): if predicate(item): ...
def function[_filter_subgraph, parameter[self, subgraph, predicate]]: constant[ Given a subgraph of the manifest, and a predicate, filter the subgraph using that predicate. Generates a list of nodes. ] variable[to_return] assign[=] list[[]] for taget[tuple[[<ast.Name obje...
keyword[def] identifier[_filter_subgraph] ( identifier[self] , identifier[subgraph] , identifier[predicate] ): literal[string] identifier[to_return] =[] keyword[for] identifier[unique_id] , identifier[item] keyword[in] identifier[subgraph] . identifier[items] (): keyword[i...
def _filter_subgraph(self, subgraph, predicate): """ Given a subgraph of the manifest, and a predicate, filter the subgraph using that predicate. Generates a list of nodes. """ to_return = [] for (unique_id, item) in subgraph.items(): if predicate(item): to_return...
def segment_text(text=os.path.join(DATA_PATH, 'goodreads-omniscient-books.txt'), start=None, stop=r'^Rate\ this', ignore=r'^[\d]'): """ Split text into segments (sections, paragraphs) using regular expressions to trigger breaks.start """ start = start if hasattr(start, 'match') else re.comp...
def function[segment_text, parameter[text, start, stop, ignore]]: constant[ Split text into segments (sections, paragraphs) using regular expressions to trigger breaks.start ] variable[start] assign[=] <ast.IfExp object at 0x7da1b24ec910> variable[stop] assign[=] <ast.IfExp object at 0x7da1b...
keyword[def] identifier[segment_text] ( identifier[text] = identifier[os] . identifier[path] . identifier[join] ( identifier[DATA_PATH] , literal[string] ), identifier[start] = keyword[None] , identifier[stop] = literal[string] , identifier[ignore] = literal[string] ): literal[string] identifier[start] = ...
def segment_text(text=os.path.join(DATA_PATH, 'goodreads-omniscient-books.txt'), start=None, stop='^Rate\\ this', ignore='^[\\d]'): """ Split text into segments (sections, paragraphs) using regular expressions to trigger breaks.start """ start = start if hasattr(start, 'match') else re.compile(start) if sta...
def user_disable_throw_rest_endpoint(self, username, url='rest/scriptrunner/latest/custom/disableUser', param='userName'): """The disable method throw own rest enpoint""" url = "{}?{}={}".format(url, param, username) return self.get(path=url)
def function[user_disable_throw_rest_endpoint, parameter[self, username, url, param]]: constant[The disable method throw own rest enpoint] variable[url] assign[=] call[constant[{}?{}={}].format, parameter[name[url], name[param], name[username]]] return[call[name[self].get, parameter[]]]
keyword[def] identifier[user_disable_throw_rest_endpoint] ( identifier[self] , identifier[username] , identifier[url] = literal[string] , identifier[param] = literal[string] ): literal[string] identifier[url] = literal[string] . identifier[format] ( identifier[url] , identifier[param] , identifier...
def user_disable_throw_rest_endpoint(self, username, url='rest/scriptrunner/latest/custom/disableUser', param='userName'): """The disable method throw own rest enpoint""" url = '{}?{}={}'.format(url, param, username) return self.get(path=url)
def _patch_distribution_metadata(): """Patch write_pkg_file and read_pkg_file for higher metadata standards""" for attr in ('write_pkg_file', 'read_pkg_file', 'get_metadata_version'): new_val = getattr(setuptools.dist, attr) setattr(distutils.dist.DistributionMetadata, attr, new_val)
def function[_patch_distribution_metadata, parameter[]]: constant[Patch write_pkg_file and read_pkg_file for higher metadata standards] for taget[name[attr]] in starred[tuple[[<ast.Constant object at 0x7da1b1b10880>, <ast.Constant object at 0x7da1b1b11780>, <ast.Constant object at 0x7da1b1b10d60>]]] beg...
keyword[def] identifier[_patch_distribution_metadata] (): literal[string] keyword[for] identifier[attr] keyword[in] ( literal[string] , literal[string] , literal[string] ): identifier[new_val] = identifier[getattr] ( identifier[setuptools] . identifier[dist] , identifier[attr] ) identif...
def _patch_distribution_metadata(): """Patch write_pkg_file and read_pkg_file for higher metadata standards""" for attr in ('write_pkg_file', 'read_pkg_file', 'get_metadata_version'): new_val = getattr(setuptools.dist, attr) setattr(distutils.dist.DistributionMetadata, attr, new_val) # depends ...
def stream_index(self, bucket, index, startkey, endkey=None, return_terms=None, max_results=None, continuation=None, timeout=None): """ Streams a secondary index query. """ raise NotImplementedError
def function[stream_index, parameter[self, bucket, index, startkey, endkey, return_terms, max_results, continuation, timeout]]: constant[ Streams a secondary index query. ] <ast.Raise object at 0x7da18eb56590>
keyword[def] identifier[stream_index] ( identifier[self] , identifier[bucket] , identifier[index] , identifier[startkey] , identifier[endkey] = keyword[None] , identifier[return_terms] = keyword[None] , identifier[max_results] = keyword[None] , identifier[continuation] = keyword[None] , identifier[timeout] = keywor...
def stream_index(self, bucket, index, startkey, endkey=None, return_terms=None, max_results=None, continuation=None, timeout=None): """ Streams a secondary index query. """ raise NotImplementedError
def get(key, default=-1): """Backport support for original codes.""" if isinstance(key, int): return DI(key) if key not in DI._member_map_: extend_enum(DI, key, default) return DI[key]
def function[get, parameter[key, default]]: constant[Backport support for original codes.] if call[name[isinstance], parameter[name[key], name[int]]] begin[:] return[call[name[DI], parameter[name[key]]]] if compare[name[key] <ast.NotIn object at 0x7da2590d7190> name[DI]._member_map_] beg...
keyword[def] identifier[get] ( identifier[key] , identifier[default] =- literal[int] ): literal[string] keyword[if] identifier[isinstance] ( identifier[key] , identifier[int] ): keyword[return] identifier[DI] ( identifier[key] ) keyword[if] identifier[key] keyword[not] ke...
def get(key, default=-1): """Backport support for original codes.""" if isinstance(key, int): return DI(key) # depends on [control=['if'], data=[]] if key not in DI._member_map_: extend_enum(DI, key, default) # depends on [control=['if'], data=['key']] return DI[key]
def _format_value(self, value): """ Format a value with packagename, if not already set :param value: :return: """ if len(value) > 0: if value[0] == ".": value = self.package + value else: v_dot = value.find(".") ...
def function[_format_value, parameter[self, value]]: constant[ Format a value with packagename, if not already set :param value: :return: ] if compare[call[name[len], parameter[name[value]]] greater[>] constant[0]] begin[:] if compare[call[name[value]][co...
keyword[def] identifier[_format_value] ( identifier[self] , identifier[value] ): literal[string] keyword[if] identifier[len] ( identifier[value] )> literal[int] : keyword[if] identifier[value] [ literal[int] ]== literal[string] : identifier[value] = identifier[self] ...
def _format_value(self, value): """ Format a value with packagename, if not already set :param value: :return: """ if len(value) > 0: if value[0] == '.': value = self.package + value # depends on [control=['if'], data=[]] else: v_dot = va...
def _on_sphinx_thread_html_ready(self, html_text): """Set our sphinx documentation based on thread result""" self._sphinx_thread.wait() self.set_rich_text_html(html_text, QUrl.fromLocalFile(self.css_path))
def function[_on_sphinx_thread_html_ready, parameter[self, html_text]]: constant[Set our sphinx documentation based on thread result] call[name[self]._sphinx_thread.wait, parameter[]] call[name[self].set_rich_text_html, parameter[name[html_text], call[name[QUrl].fromLocalFile, parameter[name[sel...
keyword[def] identifier[_on_sphinx_thread_html_ready] ( identifier[self] , identifier[html_text] ): literal[string] identifier[self] . identifier[_sphinx_thread] . identifier[wait] () identifier[self] . identifier[set_rich_text_html] ( identifier[html_text] , identifier[QUrl] . identifi...
def _on_sphinx_thread_html_ready(self, html_text): """Set our sphinx documentation based on thread result""" self._sphinx_thread.wait() self.set_rich_text_html(html_text, QUrl.fromLocalFile(self.css_path))
def trending(self, rating=None, limit=DEFAULT_SEARCH_LIMIT): """ Retrieve GIFs currently trending online. The data returned mirrors that used to create The Hot 100 list of GIFs on Giphy. :param rating: limit results to those rated (y,g, pg, pg-13 or r). :type rating: string ...
def function[trending, parameter[self, rating, limit]]: constant[ Retrieve GIFs currently trending online. The data returned mirrors that used to create The Hot 100 list of GIFs on Giphy. :param rating: limit results to those rated (y,g, pg, pg-13 or r). :type rating: string ...
keyword[def] identifier[trending] ( identifier[self] , identifier[rating] = keyword[None] , identifier[limit] = identifier[DEFAULT_SEARCH_LIMIT] ): literal[string] identifier[results_yielded] = literal[int] identifier[page] , identifier[per_page] = literal[int] , literal[int] i...
def trending(self, rating=None, limit=DEFAULT_SEARCH_LIMIT): """ Retrieve GIFs currently trending online. The data returned mirrors that used to create The Hot 100 list of GIFs on Giphy. :param rating: limit results to those rated (y,g, pg, pg-13 or r). :type rating: string ...
def public(self) -> 'PrettyDir': """Returns public attributes of the inspected object.""" return PrettyDir( self.obj, [pattr for pattr in self.pattrs if not pattr.name.startswith('_')] )
def function[public, parameter[self]]: constant[Returns public attributes of the inspected object.] return[call[name[PrettyDir], parameter[name[self].obj, <ast.ListComp object at 0x7da2054a4940>]]]
keyword[def] identifier[public] ( identifier[self] )-> literal[string] : literal[string] keyword[return] identifier[PrettyDir] ( identifier[self] . identifier[obj] ,[ identifier[pattr] keyword[for] identifier[pattr] keyword[in] identifier[self] . identifier[pattrs] keyword[if] keywo...
def public(self) -> 'PrettyDir': """Returns public attributes of the inspected object.""" return PrettyDir(self.obj, [pattr for pattr in self.pattrs if not pattr.name.startswith('_')])
def nonce(): """ Returns a new nonce to be used with the Piazza API. """ nonce_part1 = _int2base(int(_time()*1000), 36) nonce_part2 = _int2base(round(_random()*1679616), 36) return "{}{}".format(nonce_part1, nonce_part2)
def function[nonce, parameter[]]: constant[ Returns a new nonce to be used with the Piazza API. ] variable[nonce_part1] assign[=] call[name[_int2base], parameter[call[name[int], parameter[binary_operation[call[name[_time], parameter[]] * constant[1000]]]], constant[36]]] variable[nonce_p...
keyword[def] identifier[nonce] (): literal[string] identifier[nonce_part1] = identifier[_int2base] ( identifier[int] ( identifier[_time] ()* literal[int] ), literal[int] ) identifier[nonce_part2] = identifier[_int2base] ( identifier[round] ( identifier[_random] ()* literal[int] ), literal[int] ) ...
def nonce(): """ Returns a new nonce to be used with the Piazza API. """ nonce_part1 = _int2base(int(_time() * 1000), 36) nonce_part2 = _int2base(round(_random() * 1679616), 36) return '{}{}'.format(nonce_part1, nonce_part2)
def _get_err(self, e, id=None, jsonrpc=DEFAULT_JSONRPC): """ Returns jsonrpc error message. """ # Do not respond to notifications when the request is valid. if not id \ and not isinstance(e, ParseError) \ and not isinstance(e, InvalidRequestError):...
def function[_get_err, parameter[self, e, id, jsonrpc]]: constant[ Returns jsonrpc error message. ] if <ast.BoolOp object at 0x7da1b0ac2f80> begin[:] return[constant[None]] variable[respond] assign[=] dictionary[[<ast.Constant object at 0x7da1b0ac21d0>], [<ast.Name object...
keyword[def] identifier[_get_err] ( identifier[self] , identifier[e] , identifier[id] = keyword[None] , identifier[jsonrpc] = identifier[DEFAULT_JSONRPC] ): literal[string] keyword[if] keyword[not] identifier[id] keyword[and] keyword[not] identifier[isinstance] ( identifier[e] , ident...
def _get_err(self, e, id=None, jsonrpc=DEFAULT_JSONRPC): """ Returns jsonrpc error message. """ # Do not respond to notifications when the request is valid. if not id and (not isinstance(e, ParseError)) and (not isinstance(e, InvalidRequestError)): return None # depends on [control=...
def open(hdfs_path, mode="r", buff_size=0, replication=0, blocksize=0, user=None, encoding=None, errors=None): """ Open a file, returning an :class:`~.file.hdfs_file` object. ``hdfs_path`` and ``user`` are passed to :func:`~path.split`, while the other args are passed to the :class:`~.file.hdf...
def function[open, parameter[hdfs_path, mode, buff_size, replication, blocksize, user, encoding, errors]]: constant[ Open a file, returning an :class:`~.file.hdfs_file` object. ``hdfs_path`` and ``user`` are passed to :func:`~path.split`, while the other args are passed to the :class:`~.file.hdfs_f...
keyword[def] identifier[open] ( identifier[hdfs_path] , identifier[mode] = literal[string] , identifier[buff_size] = literal[int] , identifier[replication] = literal[int] , identifier[blocksize] = literal[int] , identifier[user] = keyword[None] , identifier[encoding] = keyword[None] , identifier[errors] = keyword[No...
def open(hdfs_path, mode='r', buff_size=0, replication=0, blocksize=0, user=None, encoding=None, errors=None): """ Open a file, returning an :class:`~.file.hdfs_file` object. ``hdfs_path`` and ``user`` are passed to :func:`~path.split`, while the other args are passed to the :class:`~.file.hdfs_file` ...
def _do_resumable_upload(self, stream, metadata, num_retries): """Perform a resumable upload. :type stream: IO[bytes] :param stream: A bytes IO object open for reading. :type metadata: dict :param metadata: The metadata associated with the upload. :type num_retries: in...
def function[_do_resumable_upload, parameter[self, stream, metadata, num_retries]]: constant[Perform a resumable upload. :type stream: IO[bytes] :param stream: A bytes IO object open for reading. :type metadata: dict :param metadata: The metadata associated with the upload. ...
keyword[def] identifier[_do_resumable_upload] ( identifier[self] , identifier[stream] , identifier[metadata] , identifier[num_retries] ): literal[string] identifier[upload] , identifier[transport] = identifier[self] . identifier[_initiate_resumable_upload] ( identifier[stream] , identifier...
def _do_resumable_upload(self, stream, metadata, num_retries): """Perform a resumable upload. :type stream: IO[bytes] :param stream: A bytes IO object open for reading. :type metadata: dict :param metadata: The metadata associated with the upload. :type num_retries: int ...
def pop_all(self, event_name): """Return and remove all stored events of a specified name. Pops all events from their queue. May miss the latest ones. If no event is available, return immediately. Args: event_name: Name of the events to be popped. Returns: ...
def function[pop_all, parameter[self, event_name]]: constant[Return and remove all stored events of a specified name. Pops all events from their queue. May miss the latest ones. If no event is available, return immediately. Args: event_name: Name of the events to be popped....
keyword[def] identifier[pop_all] ( identifier[self] , identifier[event_name] ): literal[string] keyword[if] keyword[not] identifier[self] . identifier[started] : keyword[raise] identifier[IllegalStateError] (( literal[string] literal[string] )) identifier[resu...
def pop_all(self, event_name): """Return and remove all stored events of a specified name. Pops all events from their queue. May miss the latest ones. If no event is available, return immediately. Args: event_name: Name of the events to be popped. Returns: ...
def get_version_text(self): """Return the version information from Unix host.""" try: version_text = self.device.send('uname -sr', timeout=10) except CommandError: self.log("Non Unix jumphost type detected") return None raise ConnectionError("Non U...
def function[get_version_text, parameter[self]]: constant[Return the version information from Unix host.] <ast.Try object at 0x7da20c76d060> return[name[version_text]]
keyword[def] identifier[get_version_text] ( identifier[self] ): literal[string] keyword[try] : identifier[version_text] = identifier[self] . identifier[device] . identifier[send] ( literal[string] , identifier[timeout] = literal[int] ) keyword[except] identifier[CommandError]...
def get_version_text(self): """Return the version information from Unix host.""" try: version_text = self.device.send('uname -sr', timeout=10) # depends on [control=['try'], data=[]] except CommandError: self.log('Non Unix jumphost type detected') return None raise Connectio...
def _set_next_host_location(self, context): ''' A function which sets the next host location on the request, if applicable. :param ~azure.storage.models.RetryContext context: The retry context containing the previous host location and the request to evaluate and possi...
def function[_set_next_host_location, parameter[self, context]]: constant[ A function which sets the next host location on the request, if applicable. :param ~azure.storage.models.RetryContext context: The retry context containing the previous host location and the request ...
keyword[def] identifier[_set_next_host_location] ( identifier[self] , identifier[context] ): literal[string] keyword[if] identifier[len] ( identifier[context] . identifier[request] . identifier[host_locations] )> literal[int] : keyword[if] identifier[context] . identifier[lo...
def _set_next_host_location(self, context): """ A function which sets the next host location on the request, if applicable. :param ~azure.storage.models.RetryContext context: The retry context containing the previous host location and the request to evaluate and possibly ...
def print_debug(*args, **kwargs): """ Print if and only if the debug flag is set true in the config.yaml file. Args: args : var args of print arguments. """ if WTF_CONFIG_READER.get("debug", False) == True: print(*args, **kwargs)
def function[print_debug, parameter[]]: constant[ Print if and only if the debug flag is set true in the config.yaml file. Args: args : var args of print arguments. ] if compare[call[name[WTF_CONFIG_READER].get, parameter[constant[debug], constant[False]]] equal[==] constant[True]]...
keyword[def] identifier[print_debug] (* identifier[args] ,** identifier[kwargs] ): literal[string] keyword[if] identifier[WTF_CONFIG_READER] . identifier[get] ( literal[string] , keyword[False] )== keyword[True] : identifier[print] (* identifier[args] ,** identifier[kwargs] )
def print_debug(*args, **kwargs): """ Print if and only if the debug flag is set true in the config.yaml file. Args: args : var args of print arguments. """ if WTF_CONFIG_READER.get('debug', False) == True: print(*args, **kwargs) # depends on [control=['if'], data=[]]
def indexFromItem(self, regItem, col=0): """ Gets the index (with column=0) for the row that contains the regItem If col is negative, it is counted from the end """ if col < 0: col = len(self.attrNames) - col try: row = self.registry.items.index(regIte...
def function[indexFromItem, parameter[self, regItem, col]]: constant[ Gets the index (with column=0) for the row that contains the regItem If col is negative, it is counted from the end ] if compare[name[col] less[<] constant[0]] begin[:] variable[col] assign[=] binar...
keyword[def] identifier[indexFromItem] ( identifier[self] , identifier[regItem] , identifier[col] = literal[int] ): literal[string] keyword[if] identifier[col] < literal[int] : identifier[col] = identifier[len] ( identifier[self] . identifier[attrNames] )- identifier[col] ke...
def indexFromItem(self, regItem, col=0): """ Gets the index (with column=0) for the row that contains the regItem If col is negative, it is counted from the end """ if col < 0: col = len(self.attrNames) - col # depends on [control=['if'], data=['col']] try: row = self.re...
async def async_init(self) -> None: """Create a Tile session.""" if not self._client_established: await self.request( 'put', 'clients/{0}'.format(self.client_uuid), data={ 'app_id': DEFAULT_APP_ID, 'app_v...
<ast.AsyncFunctionDef object at 0x7da18dc04bb0>
keyword[async] keyword[def] identifier[async_init] ( identifier[self] )-> keyword[None] : literal[string] keyword[if] keyword[not] identifier[self] . identifier[_client_established] : keyword[await] identifier[self] . identifier[request] ( literal[string] , ...
async def async_init(self) -> None: """Create a Tile session.""" if not self._client_established: await self.request('put', 'clients/{0}'.format(self.client_uuid), data={'app_id': DEFAULT_APP_ID, 'app_version': DEFAULT_APP_VERSION, 'locale': self._locale}) self._client_established = True # depe...
def window_opened_by(self, trigger_func, wait=None): """ Get the window that has been opened by the passed lambda. It will wait for it to be opened (in the same way as other Capybara methods wait). It's better to use this method than ``windows[-1]`` `as order of windows isn't defined in ...
def function[window_opened_by, parameter[self, trigger_func, wait]]: constant[ Get the window that has been opened by the passed lambda. It will wait for it to be opened (in the same way as other Capybara methods wait). It's better to use this method than ``windows[-1]`` `as order of win...
keyword[def] identifier[window_opened_by] ( identifier[self] , identifier[trigger_func] , identifier[wait] = keyword[None] ): literal[string] identifier[old_handles] = identifier[set] ( identifier[self] . identifier[driver] . identifier[window_handles] ) identifier[trigger_func] () ...
def window_opened_by(self, trigger_func, wait=None): """ Get the window that has been opened by the passed lambda. It will wait for it to be opened (in the same way as other Capybara methods wait). It's better to use this method than ``windows[-1]`` `as order of windows isn't defined in some...
def add_environment_vars(config: MutableMapping[str, Any]): """Override config with environment variables Environment variables have to be prefixed with BELBIO_ which will be stripped before splitting on '__' and lower-casing the environment variable name that is left into keys for the config dicti...
def function[add_environment_vars, parameter[config]]: constant[Override config with environment variables Environment variables have to be prefixed with BELBIO_ which will be stripped before splitting on '__' and lower-casing the environment variable name that is left into keys for the config ...
keyword[def] identifier[add_environment_vars] ( identifier[config] : identifier[MutableMapping] [ identifier[str] , identifier[Any] ]): literal[string] keyword[for] identifier[e] keyword[in] identifier[os] . identifier[environ] : keyword[if] identifier[re] . identifier[match] ( lit...
def add_environment_vars(config: MutableMapping[str, Any]): """Override config with environment variables Environment variables have to be prefixed with BELBIO_ which will be stripped before splitting on '__' and lower-casing the environment variable name that is left into keys for the config dicti...
def multiloss(losses, logging_namespace="multiloss", exclude_from_weighting=[]): """ Create a loss from multiple losses my mixing them. This multi-loss implementation is inspired by the Paper "Multi-Task Learning Using Uncertainty to Weight Losses for Scene Geometry and Semantics" by Kendall, Gal and Ci...
def function[multiloss, parameter[losses, logging_namespace, exclude_from_weighting]]: constant[ Create a loss from multiple losses my mixing them. This multi-loss implementation is inspired by the Paper "Multi-Task Learning Using Uncertainty to Weight Losses for Scene Geometry and Semantics" by Ken...
keyword[def] identifier[multiloss] ( identifier[losses] , identifier[logging_namespace] = literal[string] , identifier[exclude_from_weighting] =[]): literal[string] keyword[with] identifier[tf] . identifier[variable_scope] ( identifier[logging_namespace] ): identifier[sum_loss] = literal[int] ...
def multiloss(losses, logging_namespace='multiloss', exclude_from_weighting=[]): """ Create a loss from multiple losses my mixing them. This multi-loss implementation is inspired by the Paper "Multi-Task Learning Using Uncertainty to Weight Losses for Scene Geometry and Semantics" by Kendall, Gal and Ci...
def _initialiseIteration(self): """ Starts a new iteration. """ self._searchIterator = self._search( self._request.start, self._request.end if self._request.end != 0 else None) self._currentObject = next(self._searchIterator, None) if self._current...
def function[_initialiseIteration, parameter[self]]: constant[ Starts a new iteration. ] name[self]._searchIterator assign[=] call[name[self]._search, parameter[name[self]._request.start, <ast.IfExp object at 0x7da18ede4250>]] name[self]._currentObject assign[=] call[name[next], ...
keyword[def] identifier[_initialiseIteration] ( identifier[self] ): literal[string] identifier[self] . identifier[_searchIterator] = identifier[self] . identifier[_search] ( identifier[self] . identifier[_request] . identifier[start] , identifier[self] . identifier[_request] . ide...
def _initialiseIteration(self): """ Starts a new iteration. """ self._searchIterator = self._search(self._request.start, self._request.end if self._request.end != 0 else None) self._currentObject = next(self._searchIterator, None) if self._currentObject is not None: self._nextObj...
def epcrparsethreads(self): """ Parse the ePCR results, and run BLAST on the parsed results """ from Bio import SeqIO # Create the threads for the BLAST analysis for sample in self.metadata: if sample.general.bestassemblyfile != 'NA': threads =...
def function[epcrparsethreads, parameter[self]]: constant[ Parse the ePCR results, and run BLAST on the parsed results ] from relative_module[Bio] import module[SeqIO] for taget[name[sample]] in starred[name[self].metadata] begin[:] if compare[name[sample].general.bes...
keyword[def] identifier[epcrparsethreads] ( identifier[self] ): literal[string] keyword[from] identifier[Bio] keyword[import] identifier[SeqIO] keyword[for] identifier[sample] keyword[in] identifier[self] . identifier[metadata] : keyword[if] identifier[sample]...
def epcrparsethreads(self): """ Parse the ePCR results, and run BLAST on the parsed results """ from Bio import SeqIO # Create the threads for the BLAST analysis for sample in self.metadata: if sample.general.bestassemblyfile != 'NA': threads = Thread(target=self.epcr...
def get_port_area(self, view): """Calculates the drawing area affected by the (hovered) port """ state_v = self.parent center = self.handle.pos margin = self.port_side_size / 4. if self.side in [SnappedSide.LEFT, SnappedSide.RIGHT]: height, width = self.port_s...
def function[get_port_area, parameter[self, view]]: constant[Calculates the drawing area affected by the (hovered) port ] variable[state_v] assign[=] name[self].parent variable[center] assign[=] name[self].handle.pos variable[margin] assign[=] binary_operation[name[self].port_sid...
keyword[def] identifier[get_port_area] ( identifier[self] , identifier[view] ): literal[string] identifier[state_v] = identifier[self] . identifier[parent] identifier[center] = identifier[self] . identifier[handle] . identifier[pos] identifier[margin] = identifier[self] . identi...
def get_port_area(self, view): """Calculates the drawing area affected by the (hovered) port """ state_v = self.parent center = self.handle.pos margin = self.port_side_size / 4.0 if self.side in [SnappedSide.LEFT, SnappedSide.RIGHT]: (height, width) = self.port_size # depends on [co...
def from_(self, selectable): """ Adds a table to the query. This function can only be called once and will raise an AttributeError if called a second time. :param selectable: Type: ``Table``, ``Query``, or ``str`` When a ``str`` is passed, a table with the name...
def function[from_, parameter[self, selectable]]: constant[ Adds a table to the query. This function can only be called once and will raise an AttributeError if called a second time. :param selectable: Type: ``Table``, ``Query``, or ``str`` When a ``str`` is pa...
keyword[def] identifier[from_] ( identifier[self] , identifier[selectable] ): literal[string] identifier[self] . identifier[_from] . identifier[append] ( identifier[Table] ( identifier[selectable] ) keyword[if] identifier[isinstance] ( identifier[selectable] , identifier[str] ) keyword[else] ide...
def from_(self, selectable): """ Adds a table to the query. This function can only be called once and will raise an AttributeError if called a second time. :param selectable: Type: ``Table``, ``Query``, or ``str`` When a ``str`` is passed, a table with the name mat...
def geocode(address): '''Query function to obtain a latitude and longitude from a location string such as `Houston, TX` or`Colombia`. This uses an online lookup, currently wrapping the `geopy` library, and providing an on-disk cache of queries. Parameters ---------- address : str ...
def function[geocode, parameter[address]]: constant[Query function to obtain a latitude and longitude from a location string such as `Houston, TX` or`Colombia`. This uses an online lookup, currently wrapping the `geopy` library, and providing an on-disk cache of queries. Parameters ----...
keyword[def] identifier[geocode] ( identifier[address] ): literal[string] identifier[loc_tuple] = keyword[None] keyword[try] : identifier[cache] = identifier[geopy_cache] () identifier[loc_tuple] = identifier[cache] . identifier[cached_address] ( identifier[address] ) keyword[e...
def geocode(address): """Query function to obtain a latitude and longitude from a location string such as `Houston, TX` or`Colombia`. This uses an online lookup, currently wrapping the `geopy` library, and providing an on-disk cache of queries. Parameters ---------- address : str ...
def attach_identifier_attributes(self, ast): # type: (Dict[str, Any]) -> Dict[str, Any] """ Attach 5 flags to the AST. - is dynamic: True if the identifier name can be determined by static analysis. - is member: True if the identifier is a member of a subscription/dot/slice node. - is ...
def function[attach_identifier_attributes, parameter[self, ast]]: constant[ Attach 5 flags to the AST. - is dynamic: True if the identifier name can be determined by static analysis. - is member: True if the identifier is a member of a subscription/dot/slice node. - is declaring: True i...
keyword[def] identifier[attach_identifier_attributes] ( identifier[self] , identifier[ast] ): literal[string] identifier[redir_assignment_parser] = identifier[RedirAssignmentParser] () identifier[ast_with_parsed_redir] = identifier[redir_assignment_parser] . identifier[process] ( identifie...
def attach_identifier_attributes(self, ast): # type: (Dict[str, Any]) -> Dict[str, Any] ' Attach 5 flags to the AST.\n\n - is dynamic: True if the identifier name can be determined by static analysis.\n - is member: True if the identifier is a member of a subscription/dot/slice node.\n - is de...
def from_cbn_jgif(graph_jgif_dict): """Build a BEL graph from CBN JGIF. Map the JGIF used by the Causal Biological Network Database to standard namespace and annotations, then builds a BEL graph using :func:`pybel.from_jgif`. :param dict graph_jgif_dict: The JSON object representing the graph in JGIF ...
def function[from_cbn_jgif, parameter[graph_jgif_dict]]: constant[Build a BEL graph from CBN JGIF. Map the JGIF used by the Causal Biological Network Database to standard namespace and annotations, then builds a BEL graph using :func:`pybel.from_jgif`. :param dict graph_jgif_dict: The JSON object ...
keyword[def] identifier[from_cbn_jgif] ( identifier[graph_jgif_dict] ): literal[string] identifier[graph_jgif_dict] = identifier[map_cbn] ( identifier[graph_jgif_dict] ) identifier[graph_jgif_dict] [ literal[string] ][ literal[string] ]. identifier[update] ({ identifier[METADATA_AUTHORS] : liter...
def from_cbn_jgif(graph_jgif_dict): """Build a BEL graph from CBN JGIF. Map the JGIF used by the Causal Biological Network Database to standard namespace and annotations, then builds a BEL graph using :func:`pybel.from_jgif`. :param dict graph_jgif_dict: The JSON object representing the graph in JGIF ...
def _maybe_launch_index_impl_thread(self): """Attempts to launch a thread to compute index_impl(). This may not launch a new thread if one is already running to compute index_impl(); in that case, this function is a no-op. """ # Try to acquire the lock for computing index_impl(), without blocking. ...
def function[_maybe_launch_index_impl_thread, parameter[self]]: constant[Attempts to launch a thread to compute index_impl(). This may not launch a new thread if one is already running to compute index_impl(); in that case, this function is a no-op. ] if call[name[self]._index_impl_lock.acq...
keyword[def] identifier[_maybe_launch_index_impl_thread] ( identifier[self] ): literal[string] keyword[if] identifier[self] . identifier[_index_impl_lock] . identifier[acquire] ( keyword[False] ): identifier[self] . identifier[_index_impl_thread] = identifier[threading] . identifier[Threa...
def _maybe_launch_index_impl_thread(self): """Attempts to launch a thread to compute index_impl(). This may not launch a new thread if one is already running to compute index_impl(); in that case, this function is a no-op. """ # Try to acquire the lock for computing index_impl(), without blocking. ...