code
stringlengths
75
104k
code_sememe
stringlengths
47
309k
token_type
stringlengths
215
214k
code_dependency
stringlengths
75
155k
def elements(self): """Return the identifier's elements as tuple.""" offset = self.EXTRA_DIGITS if offset: return (self._id[:offset], self.company_prefix, self._reference, self.check_digit) else: return (self.company_prefix, self._reference, se...
def function[elements, parameter[self]]: constant[Return the identifier's elements as tuple.] variable[offset] assign[=] name[self].EXTRA_DIGITS if name[offset] begin[:] return[tuple[[<ast.Subscript object at 0x7da18f810760>, <ast.Attribute object at 0x7da18f810730>, <ast.Attribute objec...
keyword[def] identifier[elements] ( identifier[self] ): literal[string] identifier[offset] = identifier[self] . identifier[EXTRA_DIGITS] keyword[if] identifier[offset] : keyword[return] ( identifier[self] . identifier[_id] [: identifier[offset] ], identifier[self] . identifi...
def elements(self): """Return the identifier's elements as tuple.""" offset = self.EXTRA_DIGITS if offset: return (self._id[:offset], self.company_prefix, self._reference, self.check_digit) # depends on [control=['if'], data=[]] else: return (self.company_prefix, self._reference, self.c...
def step1(self, pin): """First pairing step.""" context = SRPContext( 'Pair-Setup', str(pin), prime=constants.PRIME_3072, generator=constants.PRIME_3072_GEN, hash_func=hashlib.sha512) self._session = SRPClientSession( context, binascii....
def function[step1, parameter[self, pin]]: constant[First pairing step.] variable[context] assign[=] call[name[SRPContext], parameter[constant[Pair-Setup], call[name[str], parameter[name[pin]]]]] name[self]._session assign[=] call[name[SRPClientSession], parameter[name[context], call[call[name[b...
keyword[def] identifier[step1] ( identifier[self] , identifier[pin] ): literal[string] identifier[context] = identifier[SRPContext] ( literal[string] , identifier[str] ( identifier[pin] ), identifier[prime] = identifier[constants] . identifier[PRIME_3072] , identifier[gen...
def step1(self, pin): """First pairing step.""" context = SRPContext('Pair-Setup', str(pin), prime=constants.PRIME_3072, generator=constants.PRIME_3072_GEN, hash_func=hashlib.sha512) self._session = SRPClientSession(context, binascii.hexlify(self._auth_private).decode())
def add_info_to_uncommon_items(filtered_items, uncommon_items): """ Add extra info to the uncommon items. """ result = uncommon_items url_prefix = '/prestacao-contas/analisar/comprovante' for _, item in filtered_items.iterrows(): item_id = item['idPlanilhaItens'] item_name = un...
def function[add_info_to_uncommon_items, parameter[filtered_items, uncommon_items]]: constant[ Add extra info to the uncommon items. ] variable[result] assign[=] name[uncommon_items] variable[url_prefix] assign[=] constant[/prestacao-contas/analisar/comprovante] for taget[tuple[[...
keyword[def] identifier[add_info_to_uncommon_items] ( identifier[filtered_items] , identifier[uncommon_items] ): literal[string] identifier[result] = identifier[uncommon_items] identifier[url_prefix] = literal[string] keyword[for] identifier[_] , identifier[item] keyword[in] identifier[fil...
def add_info_to_uncommon_items(filtered_items, uncommon_items): """ Add extra info to the uncommon items. """ result = uncommon_items url_prefix = '/prestacao-contas/analisar/comprovante' for (_, item) in filtered_items.iterrows(): item_id = item['idPlanilhaItens'] item_name = un...
def input_validate_aead(aead, name='aead', expected_len=None, max_aead_len = pyhsm.defines.YSM_AEAD_MAX_SIZE): """ Input validation for YHSM_GeneratedAEAD or string. """ if isinstance(aead, pyhsm.aead_cmd.YHSM_GeneratedAEAD): aead = aead.data if expected_len != None: return input_validate_st...
def function[input_validate_aead, parameter[aead, name, expected_len, max_aead_len]]: constant[ Input validation for YHSM_GeneratedAEAD or string. ] if call[name[isinstance], parameter[name[aead], name[pyhsm].aead_cmd.YHSM_GeneratedAEAD]] begin[:] variable[aead] assign[=] name[aead].data...
keyword[def] identifier[input_validate_aead] ( identifier[aead] , identifier[name] = literal[string] , identifier[expected_len] = keyword[None] , identifier[max_aead_len] = identifier[pyhsm] . identifier[defines] . identifier[YSM_AEAD_MAX_SIZE] ): literal[string] keyword[if] identifier[isinstance] ( ident...
def input_validate_aead(aead, name='aead', expected_len=None, max_aead_len=pyhsm.defines.YSM_AEAD_MAX_SIZE): """ Input validation for YHSM_GeneratedAEAD or string. """ if isinstance(aead, pyhsm.aead_cmd.YHSM_GeneratedAEAD): aead = aead.data # depends on [control=['if'], data=[]] if expected_len != ...
def addNode(self, cls=None, point=None): """ Creates a new node instance in the scene. If the optional \ cls parameter is not supplied, then the default node class \ will be used when creating the node. If a point is \ supplied, then the node will be created at that position, \...
def function[addNode, parameter[self, cls, point]]: constant[ Creates a new node instance in the scene. If the optional cls parameter is not supplied, then the default node class will be used when creating the node. If a point is supplied, then the node will be created at that ...
keyword[def] identifier[addNode] ( identifier[self] , identifier[cls] = keyword[None] , identifier[point] = keyword[None] ): literal[string] keyword[if] keyword[not] identifier[cls] : identifier[cls] = identifier[self] . identifier[defaultNodeClass] () keyword[if] ...
def addNode(self, cls=None, point=None): """ Creates a new node instance in the scene. If the optional cls parameter is not supplied, then the default node class will be used when creating the node. If a point is supplied, then the node will be created at that position, oth...
def adapt_sum(line, cfg, filter_obj): """Determine best filter by sum of all row values""" lines = filter_obj.filter_all(line) res_s = [sum(it) for it in lines] r = res_s.index(min(res_s)) return lines[r]
def function[adapt_sum, parameter[line, cfg, filter_obj]]: constant[Determine best filter by sum of all row values] variable[lines] assign[=] call[name[filter_obj].filter_all, parameter[name[line]]] variable[res_s] assign[=] <ast.ListComp object at 0x7da18f58e7a0> variable[r] assign[=] c...
keyword[def] identifier[adapt_sum] ( identifier[line] , identifier[cfg] , identifier[filter_obj] ): literal[string] identifier[lines] = identifier[filter_obj] . identifier[filter_all] ( identifier[line] ) identifier[res_s] =[ identifier[sum] ( identifier[it] ) keyword[for] identifier[it] keyword[in]...
def adapt_sum(line, cfg, filter_obj): """Determine best filter by sum of all row values""" lines = filter_obj.filter_all(line) res_s = [sum(it) for it in lines] r = res_s.index(min(res_s)) return lines[r]
def CI_calc(mean, SE, CV=1.96): """ Calculate confidence interval. :param mean: mean of data :type mean : float :param SE: standard error of data :type SE : float :param CV: critical value :type CV:float :return: confidence interval as tuple """ try: CI_down = mean -...
def function[CI_calc, parameter[mean, SE, CV]]: constant[ Calculate confidence interval. :param mean: mean of data :type mean : float :param SE: standard error of data :type SE : float :param CV: critical value :type CV:float :return: confidence interval as tuple ] <ast....
keyword[def] identifier[CI_calc] ( identifier[mean] , identifier[SE] , identifier[CV] = literal[int] ): literal[string] keyword[try] : identifier[CI_down] = identifier[mean] - identifier[CV] * identifier[SE] identifier[CI_up] = identifier[mean] + identifier[CV] * identifier[SE] ...
def CI_calc(mean, SE, CV=1.96): """ Calculate confidence interval. :param mean: mean of data :type mean : float :param SE: standard error of data :type SE : float :param CV: critical value :type CV:float :return: confidence interval as tuple """ try: CI_down = mean -...
def _object_to_json_dict(obj: Any) -> Union[bool, int, float, str, Dict[str, Any]]: """Convert an object to a dictionary suitable for the JSON output. """ if isinstance(obj, Enum): # Properly serialize Enums (such as OpenSslVersionEnum) result = obj.name elif isinstance(obj, ObjectIdent...
def function[_object_to_json_dict, parameter[obj]]: constant[Convert an object to a dictionary suitable for the JSON output. ] if call[name[isinstance], parameter[name[obj], name[Enum]]] begin[:] variable[result] assign[=] name[obj].name return[name[result]]
keyword[def] identifier[_object_to_json_dict] ( identifier[obj] : identifier[Any] )-> identifier[Union] [ identifier[bool] , identifier[int] , identifier[float] , identifier[str] , identifier[Dict] [ identifier[str] , identifier[Any] ]]: literal[string] keyword[if] identifier[isinstance] ( identifier[obj]...
def _object_to_json_dict(obj: Any) -> Union[bool, int, float, str, Dict[str, Any]]: """Convert an object to a dictionary suitable for the JSON output. """ if isinstance(obj, Enum): # Properly serialize Enums (such as OpenSslVersionEnum) result = obj.name # depends on [control=['if'], data=[...
def _set_wmi_setting(wmi_class_name, setting, value, server): ''' Set the value of the setting for the provided class. ''' with salt.utils.winapi.Com(): try: connection = wmi.WMI(namespace=_WMI_NAMESPACE) wmi_class = getattr(connection, wmi_class_name) objs =...
def function[_set_wmi_setting, parameter[wmi_class_name, setting, value, server]]: constant[ Set the value of the setting for the provided class. ] with call[name[salt].utils.winapi.Com, parameter[]] begin[:] <ast.Try object at 0x7da1b26af340> <ast.Try object at 0x7da1b26afc10> ...
keyword[def] identifier[_set_wmi_setting] ( identifier[wmi_class_name] , identifier[setting] , identifier[value] , identifier[server] ): literal[string] keyword[with] identifier[salt] . identifier[utils] . identifier[winapi] . identifier[Com] (): keyword[try] : identifier[connection]...
def _set_wmi_setting(wmi_class_name, setting, value, server): """ Set the value of the setting for the provided class. """ with salt.utils.winapi.Com(): try: connection = wmi.WMI(namespace=_WMI_NAMESPACE) wmi_class = getattr(connection, wmi_class_name) objs = ...
def _runMainLoop(self, rootJob): """ Runs the main loop with the given job. :param toil.job.Job rootJob: The root job for the workflow. :rtype: Any """ logProcessContext(self.config) with RealtimeLogger(self._batchSystem, level=self.op...
def function[_runMainLoop, parameter[self, rootJob]]: constant[ Runs the main loop with the given job. :param toil.job.Job rootJob: The root job for the workflow. :rtype: Any ] call[name[logProcessContext], parameter[name[self].config]] with call[name[RealtimeLogg...
keyword[def] identifier[_runMainLoop] ( identifier[self] , identifier[rootJob] ): literal[string] identifier[logProcessContext] ( identifier[self] . identifier[config] ) keyword[with] identifier[RealtimeLogger] ( identifier[self] . identifier[_batchSystem] , identifier[level] = ...
def _runMainLoop(self, rootJob): """ Runs the main loop with the given job. :param toil.job.Job rootJob: The root job for the workflow. :rtype: Any """ logProcessContext(self.config) with RealtimeLogger(self._batchSystem, level=self.options.logLevel if self.options.realTimeLo...
def print_vcf(data): """Print vcf line following rules.""" id_name = "." qual = "." chrom = data['chrom'] pos = data['pre_pos'] nt_ref = data['nt'][1] nt_snp = data['nt'][0] flt = "PASS" info = "ID=%s" % data['mature'] frmt = "GT:NR:NS" gntp = "%s:%s:%s" % (_genotype(data), d...
def function[print_vcf, parameter[data]]: constant[Print vcf line following rules.] variable[id_name] assign[=] constant[.] variable[qual] assign[=] constant[.] variable[chrom] assign[=] call[name[data]][constant[chrom]] variable[pos] assign[=] call[name[data]][constant[pre_pos]]...
keyword[def] identifier[print_vcf] ( identifier[data] ): literal[string] identifier[id_name] = literal[string] identifier[qual] = literal[string] identifier[chrom] = identifier[data] [ literal[string] ] identifier[pos] = identifier[data] [ literal[string] ] identifier[nt_ref] = identi...
def print_vcf(data): """Print vcf line following rules.""" id_name = '.' qual = '.' chrom = data['chrom'] pos = data['pre_pos'] nt_ref = data['nt'][1] nt_snp = data['nt'][0] flt = 'PASS' info = 'ID=%s' % data['mature'] frmt = 'GT:NR:NS' gntp = '%s:%s:%s' % (_genotype(data), d...
def get_artist_hotttnesss(self, cache=True): """Get our numerical description of how hottt a song's artist currently is Args: Kwargs: cache (bool): A boolean indicating whether or not the cached value should be used (if available). Defaults to True. ...
def function[get_artist_hotttnesss, parameter[self, cache]]: constant[Get our numerical description of how hottt a song's artist currently is Args: Kwargs: cache (bool): A boolean indicating whether or not the cached value should be used (if available). Defaults to ...
keyword[def] identifier[get_artist_hotttnesss] ( identifier[self] , identifier[cache] = keyword[True] ): literal[string] keyword[if] keyword[not] ( identifier[cache] keyword[and] ( literal[string] keyword[in] identifier[self] . identifier[cache] )): identifier[response] = identifie...
def get_artist_hotttnesss(self, cache=True): """Get our numerical description of how hottt a song's artist currently is Args: Kwargs: cache (bool): A boolean indicating whether or not the cached value should be used (if available). Defaults to True. Ret...
def decode_data_items(self, concatenated_str): """Decodes a concatenated string into a list of integers and strings. Example: ``decode_data_items('abc|~B7|xyz')`` returns ``['abc', 123, 'xyz']`` """ data_items = [] str_list = concatenated_str.split(self.SEPARATOR) ...
def function[decode_data_items, parameter[self, concatenated_str]]: constant[Decodes a concatenated string into a list of integers and strings. Example: ``decode_data_items('abc|~B7|xyz')`` returns ``['abc', 123, 'xyz']`` ] variable[data_items] assign[=] list[[]] var...
keyword[def] identifier[decode_data_items] ( identifier[self] , identifier[concatenated_str] ): literal[string] identifier[data_items] =[] identifier[str_list] = identifier[concatenated_str] . identifier[split] ( identifier[self] . identifier[SEPARATOR] ) keyword[for] identifier...
def decode_data_items(self, concatenated_str): """Decodes a concatenated string into a list of integers and strings. Example: ``decode_data_items('abc|~B7|xyz')`` returns ``['abc', 123, 'xyz']`` """ data_items = [] str_list = concatenated_str.split(self.SEPARATOR) for str in...
def get_user_role_model(): """ Returns the UserRole model that is active in this project. """ app_model = getattr(settings, "ARCTIC_USER_ROLE_MODEL", "arctic.UserRole") try: return django_apps.get_model(app_model) except ValueError: raise ImproperlyConfigured( "ARCTI...
def function[get_user_role_model, parameter[]]: constant[ Returns the UserRole model that is active in this project. ] variable[app_model] assign[=] call[name[getattr], parameter[name[settings], constant[ARCTIC_USER_ROLE_MODEL], constant[arctic.UserRole]]] <ast.Try object at 0x7da1b04ecd30>
keyword[def] identifier[get_user_role_model] (): literal[string] identifier[app_model] = identifier[getattr] ( identifier[settings] , literal[string] , literal[string] ) keyword[try] : keyword[return] identifier[django_apps] . identifier[get_model] ( identifier[app_model] ) keyword[exc...
def get_user_role_model(): """ Returns the UserRole model that is active in this project. """ app_model = getattr(settings, 'ARCTIC_USER_ROLE_MODEL', 'arctic.UserRole') try: return django_apps.get_model(app_model) # depends on [control=['try'], data=[]] except ValueError: raise ...
def boxify(message, border_color=None): """Put a message inside a box. Args: message (unicode): message to decorate. border_color (unicode): name of the color to outline the box with. """ lines = message.split("\n") max_width = max(_visual_width(line) for line in lines) padding...
def function[boxify, parameter[message, border_color]]: constant[Put a message inside a box. Args: message (unicode): message to decorate. border_color (unicode): name of the color to outline the box with. ] variable[lines] assign[=] call[name[message].split, parameter[constant[...
keyword[def] identifier[boxify] ( identifier[message] , identifier[border_color] = keyword[None] ): literal[string] identifier[lines] = identifier[message] . identifier[split] ( literal[string] ) identifier[max_width] = identifier[max] ( identifier[_visual_width] ( identifier[line] ) keyword[for] ide...
def boxify(message, border_color=None): """Put a message inside a box. Args: message (unicode): message to decorate. border_color (unicode): name of the color to outline the box with. """ lines = message.split('\n') max_width = max((_visual_width(line) for line in lines)) paddin...
def _validate_jp2_colr(self, boxes): """ Validate JP2 requirements on colour specification boxes. """ lst = [box for box in boxes if box.box_id == 'jp2h'] jp2h = lst[0] for colr in [box for box in jp2h.box if box.box_id == 'colr']: if colr.approximation != 0: ...
def function[_validate_jp2_colr, parameter[self, boxes]]: constant[ Validate JP2 requirements on colour specification boxes. ] variable[lst] assign[=] <ast.ListComp object at 0x7da1b26add80> variable[jp2h] assign[=] call[name[lst]][constant[0]] for taget[name[colr]] in st...
keyword[def] identifier[_validate_jp2_colr] ( identifier[self] , identifier[boxes] ): literal[string] identifier[lst] =[ identifier[box] keyword[for] identifier[box] keyword[in] identifier[boxes] keyword[if] identifier[box] . identifier[box_id] == literal[string] ] identifier[jp2h] =...
def _validate_jp2_colr(self, boxes): """ Validate JP2 requirements on colour specification boxes. """ lst = [box for box in boxes if box.box_id == 'jp2h'] jp2h = lst[0] for colr in [box for box in jp2h.box if box.box_id == 'colr']: if colr.approximation != 0: msg = 'A...
def exists(self, storagemodel:object, modeldefinition = None) -> bool: """ delete the blob from storage """ exists = False blobservice = modeldefinition['blobservice'] container_name = modeldefinition['container'] blob_name = storagemodel.name try: blobs = s...
def function[exists, parameter[self, storagemodel, modeldefinition]]: constant[ delete the blob from storage ] variable[exists] assign[=] constant[False] variable[blobservice] assign[=] call[name[modeldefinition]][constant[blobservice]] variable[container_name] assign[=] call[name[modeld...
keyword[def] identifier[exists] ( identifier[self] , identifier[storagemodel] : identifier[object] , identifier[modeldefinition] = keyword[None] )-> identifier[bool] : literal[string] identifier[exists] = keyword[False] identifier[blobservice] = identifier[modeldefinition] [ literal[stri...
def exists(self, storagemodel: object, modeldefinition=None) -> bool: """ delete the blob from storage """ exists = False blobservice = modeldefinition['blobservice'] container_name = modeldefinition['container'] blob_name = storagemodel.name try: blobs = self.list(storagemodel, modeldef...
def get(self, name, mask=None): """ Issue a GET command Return a Deferred which fires with the size of the name being requested """ mypeer = self.transport.getQ2QPeer() tl = self.nexus.transloads[name] peerz = tl.peers if mypeer in peerz: peer...
def function[get, parameter[self, name, mask]]: constant[ Issue a GET command Return a Deferred which fires with the size of the name being requested ] variable[mypeer] assign[=] call[name[self].transport.getQ2QPeer, parameter[]] variable[tl] assign[=] call[name[self].ne...
keyword[def] identifier[get] ( identifier[self] , identifier[name] , identifier[mask] = keyword[None] ): literal[string] identifier[mypeer] = identifier[self] . identifier[transport] . identifier[getQ2QPeer] () identifier[tl] = identifier[self] . identifier[nexus] . identifier[transloads] ...
def get(self, name, mask=None): """ Issue a GET command Return a Deferred which fires with the size of the name being requested """ mypeer = self.transport.getQ2QPeer() tl = self.nexus.transloads[name] peerz = tl.peers if mypeer in peerz: peerk = peerz[mypeer] # dep...
def walk_rows(self, mapping=identity): """Iterate over rows. :return: an iterator over :class:`rows <RowsInGrid>` :param mapping: funcion to map the result, see :meth:`walk_instructions` for an example usage """ row_in_grid = self._walk.row_in_grid return map(l...
def function[walk_rows, parameter[self, mapping]]: constant[Iterate over rows. :return: an iterator over :class:`rows <RowsInGrid>` :param mapping: funcion to map the result, see :meth:`walk_instructions` for an example usage ] variable[row_in_grid] assign[=] name[self...
keyword[def] identifier[walk_rows] ( identifier[self] , identifier[mapping] = identifier[identity] ): literal[string] identifier[row_in_grid] = identifier[self] . identifier[_walk] . identifier[row_in_grid] keyword[return] identifier[map] ( keyword[lambda] identifier[row] : identifier[m...
def walk_rows(self, mapping=identity): """Iterate over rows. :return: an iterator over :class:`rows <RowsInGrid>` :param mapping: funcion to map the result, see :meth:`walk_instructions` for an example usage """ row_in_grid = self._walk.row_in_grid return map(lambda row: m...
def create_y_axis(self, name, label=None, format=None, custom_format=False): """ Create Y-axis """ axis = {} if custom_format and format: axis['tickFormat'] = format elif format: axis['tickFormat'] = "d3.format(',%s')" % format if label: ...
def function[create_y_axis, parameter[self, name, label, format, custom_format]]: constant[ Create Y-axis ] variable[axis] assign[=] dictionary[[], []] if <ast.BoolOp object at 0x7da1b03fad70> begin[:] call[name[axis]][constant[tickFormat]] assign[=] name[format] ...
keyword[def] identifier[create_y_axis] ( identifier[self] , identifier[name] , identifier[label] = keyword[None] , identifier[format] = keyword[None] , identifier[custom_format] = keyword[False] ): literal[string] identifier[axis] ={} keyword[if] identifier[custom_format] keyword[and] ...
def create_y_axis(self, name, label=None, format=None, custom_format=False): """ Create Y-axis """ axis = {} if custom_format and format: axis['tickFormat'] = format # depends on [control=['if'], data=[]] elif format: axis['tickFormat'] = "d3.format(',%s')" % format # d...
def hpai_body(self): """ Create a body with HPAI information. This is used for disconnect and connection state requests. """ body = [] # ============ IP Body ========== body.extend([self.channel]) # Communication Channel Id body.extend([0x00]) # Reserverd ...
def function[hpai_body, parameter[self]]: constant[ Create a body with HPAI information. This is used for disconnect and connection state requests. ] variable[body] assign[=] list[[]] call[name[body].extend, parameter[list[[<ast.Attribute object at 0x7da18f812e60>]]]] ca...
keyword[def] identifier[hpai_body] ( identifier[self] ): literal[string] identifier[body] =[] identifier[body] . identifier[extend] ([ identifier[self] . identifier[channel] ]) identifier[body] . identifier[extend] ([ literal[int] ]) identifier[body] . i...
def hpai_body(self): """ Create a body with HPAI information. This is used for disconnect and connection state requests. """ body = [] # ============ IP Body ========== body.extend([self.channel]) # Communication Channel Id body.extend([0]) # Reserverd # =========== Client HPA...
def stop(self): """Stop watching the socket.""" if self.closed: raise ConnectionClosed() if self.read_watcher.active: self.read_watcher.stop() if self.write_watcher.active: self.write_watcher.stop()
def function[stop, parameter[self]]: constant[Stop watching the socket.] if name[self].closed begin[:] <ast.Raise object at 0x7da207f9bdf0> if name[self].read_watcher.active begin[:] call[name[self].read_watcher.stop, parameter[]] if name[self].write_watcher.activ...
keyword[def] identifier[stop] ( identifier[self] ): literal[string] keyword[if] identifier[self] . identifier[closed] : keyword[raise] identifier[ConnectionClosed] () keyword[if] identifier[self] . identifier[read_watcher] . identifier[active] : identifier[sel...
def stop(self): """Stop watching the socket.""" if self.closed: raise ConnectionClosed() # depends on [control=['if'], data=[]] if self.read_watcher.active: self.read_watcher.stop() # depends on [control=['if'], data=[]] if self.write_watcher.active: self.write_watcher.stop() ...
def MK(T, Tc, omega): r'''Calculates enthalpy of vaporization at arbitrary temperatures using a the work of [1]_; requires a chemical's critical temperature and acentric factor. The enthalpy of vaporization is given by: .. math:: \Delta H_{vap} = \Delta H_{vap}^{(0)} + \omega \Delta H_{va...
def function[MK, parameter[T, Tc, omega]]: constant[Calculates enthalpy of vaporization at arbitrary temperatures using a the work of [1]_; requires a chemical's critical temperature and acentric factor. The enthalpy of vaporization is given by: .. math:: \Delta H_{vap} = \Delta H_{va...
keyword[def] identifier[MK] ( identifier[T] , identifier[Tc] , identifier[omega] ): literal[string] identifier[bs] =[[ literal[int] , literal[int] , literal[int] ], [ literal[int] , literal[int] ,- literal[int] ], [ literal[int] , literal[int] ,- literal[int] ], [- literal[int] ,- literal[int] ...
def MK(T, Tc, omega): """Calculates enthalpy of vaporization at arbitrary temperatures using a the work of [1]_; requires a chemical's critical temperature and acentric factor. The enthalpy of vaporization is given by: .. math:: \\Delta H_{vap} = \\Delta H_{vap}^{(0)} + \\omega \\Delta H_...
def turn_on(self, time): """(Helper) Turn on an output""" self._elk.send(cn_encode(self._index, time))
def function[turn_on, parameter[self, time]]: constant[(Helper) Turn on an output] call[name[self]._elk.send, parameter[call[name[cn_encode], parameter[name[self]._index, name[time]]]]]
keyword[def] identifier[turn_on] ( identifier[self] , identifier[time] ): literal[string] identifier[self] . identifier[_elk] . identifier[send] ( identifier[cn_encode] ( identifier[self] . identifier[_index] , identifier[time] ))
def turn_on(self, time): """(Helper) Turn on an output""" self._elk.send(cn_encode(self._index, time))
def urlopen(self, method, url, body=None, headers=None, **kwargs): """Implementation of urllib3's urlopen.""" # pylint: disable=arguments-differ # We use kwargs to collect additional args that we don't need to # introspect here. However, we do explicitly collect the two # positio...
def function[urlopen, parameter[self, method, url, body, headers]]: constant[Implementation of urllib3's urlopen.] variable[_credential_refresh_attempt] assign[=] call[name[kwargs].pop, parameter[constant[_credential_refresh_attempt], constant[0]]] if compare[name[headers] is constant[None]] beg...
keyword[def] identifier[urlopen] ( identifier[self] , identifier[method] , identifier[url] , identifier[body] = keyword[None] , identifier[headers] = keyword[None] ,** identifier[kwargs] ): literal[string] identifier[_credential_refresh_attempt...
def urlopen(self, method, url, body=None, headers=None, **kwargs): """Implementation of urllib3's urlopen.""" # pylint: disable=arguments-differ # We use kwargs to collect additional args that we don't need to # introspect here. However, we do explicitly collect the two # positional arguments. #...
async def close(self, exception: BaseException = None) -> None: """ Close this context and call any necessary resource teardown callbacks. If a teardown callback returns an awaitable, the return value is awaited on before calling any further teardown callbacks. All callbacks wi...
<ast.AsyncFunctionDef object at 0x7da1b0569b40>
keyword[async] keyword[def] identifier[close] ( identifier[self] , identifier[exception] : identifier[BaseException] = keyword[None] )-> keyword[None] : literal[string] identifier[self] . identifier[_check_closed] () identifier[self] . identifier[_closed] = keyword[True] identi...
async def close(self, exception: BaseException=None) -> None: """ Close this context and call any necessary resource teardown callbacks. If a teardown callback returns an awaitable, the return value is awaited on before calling any further teardown callbacks. All callbacks will be ...
def add_boolean_proxy_for(self, label: str, shape: Collection[int] = None) -> Vertex: """ Creates a proxy vertex for the given label and adds to the sequence item """ if shape is None: return Vertex._from_java_vertex(self.unwrap().addBooleanProxyFor(_VertexLabel(label).unwrap...
def function[add_boolean_proxy_for, parameter[self, label, shape]]: constant[ Creates a proxy vertex for the given label and adds to the sequence item ] if compare[name[shape] is constant[None]] begin[:] return[call[name[Vertex]._from_java_vertex, parameter[call[call[name[self].u...
keyword[def] identifier[add_boolean_proxy_for] ( identifier[self] , identifier[label] : identifier[str] , identifier[shape] : identifier[Collection] [ identifier[int] ]= keyword[None] )-> identifier[Vertex] : literal[string] keyword[if] identifier[shape] keyword[is] keyword[None] : ...
def add_boolean_proxy_for(self, label: str, shape: Collection[int]=None) -> Vertex: """ Creates a proxy vertex for the given label and adds to the sequence item """ if shape is None: return Vertex._from_java_vertex(self.unwrap().addBooleanProxyFor(_VertexLabel(label).unwrap())) # depend...
def fetch(self): """ Fetch a SampleInstance :returns: Fetched SampleInstance :rtype: twilio.rest.autopilot.v1.assistant.task.sample.SampleInstance """ params = values.of({}) payload = self._version.fetch( 'GET', self._uri, par...
def function[fetch, parameter[self]]: constant[ Fetch a SampleInstance :returns: Fetched SampleInstance :rtype: twilio.rest.autopilot.v1.assistant.task.sample.SampleInstance ] variable[params] assign[=] call[name[values].of, parameter[dictionary[[], []]]] variabl...
keyword[def] identifier[fetch] ( identifier[self] ): literal[string] identifier[params] = identifier[values] . identifier[of] ({}) identifier[payload] = identifier[self] . identifier[_version] . identifier[fetch] ( literal[string] , identifier[self] . identifier[_uri] , ...
def fetch(self): """ Fetch a SampleInstance :returns: Fetched SampleInstance :rtype: twilio.rest.autopilot.v1.assistant.task.sample.SampleInstance """ params = values.of({}) payload = self._version.fetch('GET', self._uri, params=params) return SampleInstance(self._versio...
def get_name_levels(node): """Return a list of ``(name, level)`` tuples for assigned names The `level` is `None` for simple assignments and is a list of numbers for tuple assignments for example in:: a, (b, c) = x The levels for for `a` is ``[0]``, for `b` is ``[1, 0]`` and for `c` is ``[1,...
def function[get_name_levels, parameter[node]]: constant[Return a list of ``(name, level)`` tuples for assigned names The `level` is `None` for simple assignments and is a list of numbers for tuple assignments for example in:: a, (b, c) = x The levels for for `a` is ``[0]``, for `b` is ``[1...
keyword[def] identifier[get_name_levels] ( identifier[node] ): literal[string] identifier[visitor] = identifier[_NodeNameCollector] () identifier[ast] . identifier[walk] ( identifier[node] , identifier[visitor] ) keyword[return] identifier[visitor] . identifier[names]
def get_name_levels(node): """Return a list of ``(name, level)`` tuples for assigned names The `level` is `None` for simple assignments and is a list of numbers for tuple assignments for example in:: a, (b, c) = x The levels for for `a` is ``[0]``, for `b` is ``[1, 0]`` and for `c` is ``[1,...
def to_json(self): """Return a JSON-serializable representation.""" return { 'network': self.network, 'state': self.state, 'nodes': self.node_indices, 'cut': self.cut, }
def function[to_json, parameter[self]]: constant[Return a JSON-serializable representation.] return[dictionary[[<ast.Constant object at 0x7da1b2344ca0>, <ast.Constant object at 0x7da1b2346fb0>, <ast.Constant object at 0x7da1b23471c0>, <ast.Constant object at 0x7da1b2344820>], [<ast.Attribute object at 0x7da...
keyword[def] identifier[to_json] ( identifier[self] ): literal[string] keyword[return] { literal[string] : identifier[self] . identifier[network] , literal[string] : identifier[self] . identifier[state] , literal[string] : identifier[self] . identifier[node_indices] , ...
def to_json(self): """Return a JSON-serializable representation.""" return {'network': self.network, 'state': self.state, 'nodes': self.node_indices, 'cut': self.cut}
def request(self, method, url, **params): """Constructs and sends a request to a remote server. It returns a :class:`.Future` which results in a :class:`.HttpResponse` object. :param method: request method for the :class:`HttpRequest`. :param url: URL for the :class:`HttpReques...
def function[request, parameter[self, method, url]]: constant[Constructs and sends a request to a remote server. It returns a :class:`.Future` which results in a :class:`.HttpResponse` object. :param method: request method for the :class:`HttpRequest`. :param url: URL for the :...
keyword[def] identifier[request] ( identifier[self] , identifier[method] , identifier[url] ,** identifier[params] ): literal[string] identifier[response] = identifier[self] . identifier[_request] ( identifier[method] , identifier[url] ,** identifier[params] ) keyword[if] keyword[not] ide...
def request(self, method, url, **params): """Constructs and sends a request to a remote server. It returns a :class:`.Future` which results in a :class:`.HttpResponse` object. :param method: request method for the :class:`HttpRequest`. :param url: URL for the :class:`HttpRequest`. ...
def subclasses(cls): """Return a set of all Ent subclasses, recursively.""" seen = set() queue = set([cls]) while queue: c = queue.pop() seen.add(c) sc = c.__subclasses__() for c in sc: if c not in seen: ...
def function[subclasses, parameter[cls]]: constant[Return a set of all Ent subclasses, recursively.] variable[seen] assign[=] call[name[set], parameter[]] variable[queue] assign[=] call[name[set], parameter[list[[<ast.Name object at 0x7da20c6c6dd0>]]]] while name[queue] begin[:] ...
keyword[def] identifier[subclasses] ( identifier[cls] ): literal[string] identifier[seen] = identifier[set] () identifier[queue] = identifier[set] ([ identifier[cls] ]) keyword[while] identifier[queue] : identifier[c] = identifier[queue] . identifier[pop] () ...
def subclasses(cls): """Return a set of all Ent subclasses, recursively.""" seen = set() queue = set([cls]) while queue: c = queue.pop() seen.add(c) sc = c.__subclasses__() for c in sc: if c not in seen: queue.add(c) # depends on [control=['if...
def add_blacklisted_filepaths(self, filepaths, remove_from_stored=True): """ Add `filepaths` to blacklisted filepaths. If `remove_from_stored` is `True`, any `filepaths` in internal state will be automatically removed. """ self.file_manager.add_blacklisted_filepaths(filep...
def function[add_blacklisted_filepaths, parameter[self, filepaths, remove_from_stored]]: constant[ Add `filepaths` to blacklisted filepaths. If `remove_from_stored` is `True`, any `filepaths` in internal state will be automatically removed. ] call[name[self].file_manager....
keyword[def] identifier[add_blacklisted_filepaths] ( identifier[self] , identifier[filepaths] , identifier[remove_from_stored] = keyword[True] ): literal[string] identifier[self] . identifier[file_manager] . identifier[add_blacklisted_filepaths] ( identifier[filepaths] , identifier[remove_...
def add_blacklisted_filepaths(self, filepaths, remove_from_stored=True): """ Add `filepaths` to blacklisted filepaths. If `remove_from_stored` is `True`, any `filepaths` in internal state will be automatically removed. """ self.file_manager.add_blacklisted_filepaths(filepaths, re...
def to_native(self, value, context=None): """ Schematics deserializer override :return: ToOne instance """ if isinstance(value, ToOne): return value value = self._cast_rid(value) return ToOne(self.rtype, self.field, rid=value)
def function[to_native, parameter[self, value, context]]: constant[ Schematics deserializer override :return: ToOne instance ] if call[name[isinstance], parameter[name[value], name[ToOne]]] begin[:] return[name[value]] variable[value] assign[=] call[name[self]._cast_rid,...
keyword[def] identifier[to_native] ( identifier[self] , identifier[value] , identifier[context] = keyword[None] ): literal[string] keyword[if] identifier[isinstance] ( identifier[value] , identifier[ToOne] ): keyword[return] identifier[value] identifier[value] = identifie...
def to_native(self, value, context=None): """ Schematics deserializer override :return: ToOne instance """ if isinstance(value, ToOne): return value # depends on [control=['if'], data=[]] value = self._cast_rid(value) return ToOne(self.rtype, self.field, rid=value)
def character(prompt=None, empty=False): """Prompt a single character. Parameters ---------- prompt : str, optional Use an alternative prompt. empty : bool, optional Allow an empty response. Returns ------- str or None A str if the user entered a single-characte...
def function[character, parameter[prompt, empty]]: constant[Prompt a single character. Parameters ---------- prompt : str, optional Use an alternative prompt. empty : bool, optional Allow an empty response. Returns ------- str or None A str if the user enter...
keyword[def] identifier[character] ( identifier[prompt] = keyword[None] , identifier[empty] = keyword[False] ): literal[string] identifier[s] = identifier[_prompt_input] ( identifier[prompt] ) keyword[if] identifier[empty] keyword[and] keyword[not] identifier[s] : keyword[return] keyword...
def character(prompt=None, empty=False): """Prompt a single character. Parameters ---------- prompt : str, optional Use an alternative prompt. empty : bool, optional Allow an empty response. Returns ------- str or None A str if the user entered a single-characte...
def write_multi(self, frames, encoded_frames=None): """Writes multiple video frames.""" if encoded_frames is None: # Infinite iterator. encoded_frames = iter(lambda: None, 1) for (frame, encoded_frame) in zip(frames, encoded_frames): self.write(frame, encoded_frame)
def function[write_multi, parameter[self, frames, encoded_frames]]: constant[Writes multiple video frames.] if compare[name[encoded_frames] is constant[None]] begin[:] variable[encoded_frames] assign[=] call[name[iter], parameter[<ast.Lambda object at 0x7da1b208b190>, constant[1]]] ...
keyword[def] identifier[write_multi] ( identifier[self] , identifier[frames] , identifier[encoded_frames] = keyword[None] ): literal[string] keyword[if] identifier[encoded_frames] keyword[is] keyword[None] : identifier[encoded_frames] = identifier[iter] ( keyword[lambda] : keyword[None] , li...
def write_multi(self, frames, encoded_frames=None): """Writes multiple video frames.""" if encoded_frames is None: # Infinite iterator. encoded_frames = iter(lambda : None, 1) # depends on [control=['if'], data=['encoded_frames']] for (frame, encoded_frame) in zip(frames, encoded_frames): ...
def chart(symbol, timeframe='1m', date=None, token='', version=''): '''Historical price/volume data, daily and intraday https://iexcloud.io/docs/api/#historical-prices Data Schedule 1d: -9:30-4pm ET Mon-Fri on regular market trading days -9:30-1pm ET on early close trading days All others: ...
def function[chart, parameter[symbol, timeframe, date, token, version]]: constant[Historical price/volume data, daily and intraday https://iexcloud.io/docs/api/#historical-prices Data Schedule 1d: -9:30-4pm ET Mon-Fri on regular market trading days -9:30-1pm ET on early close trading days ...
keyword[def] identifier[chart] ( identifier[symbol] , identifier[timeframe] = literal[string] , identifier[date] = keyword[None] , identifier[token] = literal[string] , identifier[version] = literal[string] ): literal[string] identifier[_raiseIfNotStr] ( identifier[symbol] ) keyword[if] identifier[ti...
def chart(symbol, timeframe='1m', date=None, token='', version=''): """Historical price/volume data, daily and intraday https://iexcloud.io/docs/api/#historical-prices Data Schedule 1d: -9:30-4pm ET Mon-Fri on regular market trading days -9:30-1pm ET on early close trading days All others: ...
def search(self, initial_ids, initial_cache): """Beam search for sequences with highest scores.""" state, state_shapes = self._create_initial_state(initial_ids, initial_cache) finished_state = tf.while_loop( self._continue_search, self._search_step, loop_vars=[state], shape_invariants=[stat...
def function[search, parameter[self, initial_ids, initial_cache]]: constant[Beam search for sequences with highest scores.] <ast.Tuple object at 0x7da18f811ba0> assign[=] call[name[self]._create_initial_state, parameter[name[initial_ids], name[initial_cache]]] variable[finished_state] assign[=] ...
keyword[def] identifier[search] ( identifier[self] , identifier[initial_ids] , identifier[initial_cache] ): literal[string] identifier[state] , identifier[state_shapes] = identifier[self] . identifier[_create_initial_state] ( identifier[initial_ids] , identifier[initial_cache] ) identifier[finished_s...
def search(self, initial_ids, initial_cache): """Beam search for sequences with highest scores.""" (state, state_shapes) = self._create_initial_state(initial_ids, initial_cache) finished_state = tf.while_loop(self._continue_search, self._search_step, loop_vars=[state], shape_invariants=[state_shapes], paral...
def windowed_weir_cockerham_fst(pos, g, subpops, size=None, start=None, stop=None, step=None, windows=None, fill=np.nan, max_allele=None): """Estimate average Fst in windows over a single chromosome/contig, following the method of Weir and Cockerha...
def function[windowed_weir_cockerham_fst, parameter[pos, g, subpops, size, start, stop, step, windows, fill, max_allele]]: constant[Estimate average Fst in windows over a single chromosome/contig, following the method of Weir and Cockerham (1984). Parameters ---------- pos : array_like, int, sh...
keyword[def] identifier[windowed_weir_cockerham_fst] ( identifier[pos] , identifier[g] , identifier[subpops] , identifier[size] = keyword[None] , identifier[start] = keyword[None] , identifier[stop] = keyword[None] , identifier[step] = keyword[None] , identifier[windows] = keyword[None] , identifier[fill] = identif...
def windowed_weir_cockerham_fst(pos, g, subpops, size=None, start=None, stop=None, step=None, windows=None, fill=np.nan, max_allele=None): """Estimate average Fst in windows over a single chromosome/contig, following the method of Weir and Cockerham (1984). Parameters ---------- pos : array_like, i...
def load(cls, data, promote=False): """Create a new ent from an existing value. The value must either be an instance of Ent, or must be an instance of SAFE_TYPES. If the value is a base type (bool, int, string, etc), it will just be returned. Iterable types will be loaded recursively,...
def function[load, parameter[cls, data, promote]]: constant[Create a new ent from an existing value. The value must either be an instance of Ent, or must be an instance of SAFE_TYPES. If the value is a base type (bool, int, string, etc), it will just be returned. Iterable types will b...
keyword[def] identifier[load] ( identifier[cls] , identifier[data] , identifier[promote] = keyword[False] ): literal[string] identifier[t] = identifier[type] ( identifier[data] ) keyword[if] identifier[t] == identifier[cls] : keyword[return] identifier[cls] ({ iden...
def load(cls, data, promote=False): """Create a new ent from an existing value. The value must either be an instance of Ent, or must be an instance of SAFE_TYPES. If the value is a base type (bool, int, string, etc), it will just be returned. Iterable types will be loaded recursively, tra...
def read_chunked(self, amt=None, decode_content=None): """ Similar to :meth:`HTTPResponse.read`, but with an additional parameter: ``decode_content``. :param amt: How much of the content to read. If specified, caching is skipped because it doesn't make sense to c...
def function[read_chunked, parameter[self, amt, decode_content]]: constant[ Similar to :meth:`HTTPResponse.read`, but with an additional parameter: ``decode_content``. :param amt: How much of the content to read. If specified, caching is skipped because it doesn'...
keyword[def] identifier[read_chunked] ( identifier[self] , identifier[amt] = keyword[None] , identifier[decode_content] = keyword[None] ): literal[string] identifier[self] . identifier[_init_decoder] () keyword[if] keyword[not] identifier[self] . identifier[chunked] : ...
def read_chunked(self, amt=None, decode_content=None): """ Similar to :meth:`HTTPResponse.read`, but with an additional parameter: ``decode_content``. :param amt: How much of the content to read. If specified, caching is skipped because it doesn't make sense to cache...
def community_topic_subscription_create(self, topic_id, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/help_center/subscriptions#create-topic-subscription" api_path = "/api/v2/community/topics/{topic_id}/subscriptions.json" api_path = api_path.format(topic_id=topic_id) ret...
def function[community_topic_subscription_create, parameter[self, topic_id, data]]: constant[https://developer.zendesk.com/rest_api/docs/help_center/subscriptions#create-topic-subscription] variable[api_path] assign[=] constant[/api/v2/community/topics/{topic_id}/subscriptions.json] variable[api...
keyword[def] identifier[community_topic_subscription_create] ( identifier[self] , identifier[topic_id] , identifier[data] ,** identifier[kwargs] ): literal[string] identifier[api_path] = literal[string] identifier[api_path] = identifier[api_path] . identifier[format] ( identifier[topic_id...
def community_topic_subscription_create(self, topic_id, data, **kwargs): """https://developer.zendesk.com/rest_api/docs/help_center/subscriptions#create-topic-subscription""" api_path = '/api/v2/community/topics/{topic_id}/subscriptions.json' api_path = api_path.format(topic_id=topic_id) return self.cal...
def _from_dict(cls, _dict): """Initialize a RuntimeIntent object from a json dictionary.""" args = {} xtra = _dict.copy() if 'intent' in _dict: args['intent'] = _dict.get('intent') del xtra['intent'] else: raise ValueError( 'Req...
def function[_from_dict, parameter[cls, _dict]]: constant[Initialize a RuntimeIntent object from a json dictionary.] variable[args] assign[=] dictionary[[], []] variable[xtra] assign[=] call[name[_dict].copy, parameter[]] if compare[constant[intent] in name[_dict]] begin[:] ...
keyword[def] identifier[_from_dict] ( identifier[cls] , identifier[_dict] ): literal[string] identifier[args] ={} identifier[xtra] = identifier[_dict] . identifier[copy] () keyword[if] literal[string] keyword[in] identifier[_dict] : identifier[args] [ literal[strin...
def _from_dict(cls, _dict): """Initialize a RuntimeIntent object from a json dictionary.""" args = {} xtra = _dict.copy() if 'intent' in _dict: args['intent'] = _dict.get('intent') del xtra['intent'] # depends on [control=['if'], data=['_dict']] else: raise ValueError("Requi...
def reverse(self, point, language=None, sensor=False): '''Reverse geocode a point. Pls refer to the Google Maps Web API for the details of the parameters ''' params = { 'latlng': point, 'sensor': str(sensor).lower() } if language: ...
def function[reverse, parameter[self, point, language, sensor]]: constant[Reverse geocode a point. Pls refer to the Google Maps Web API for the details of the parameters ] variable[params] assign[=] dictionary[[<ast.Constant object at 0x7da2054a6710>, <ast.Constant object at 0x7da2054a4b...
keyword[def] identifier[reverse] ( identifier[self] , identifier[point] , identifier[language] = keyword[None] , identifier[sensor] = keyword[False] ): literal[string] identifier[params] ={ literal[string] : identifier[point] , literal[string] : identifier[str] ( identifier[sensor...
def reverse(self, point, language=None, sensor=False): """Reverse geocode a point. Pls refer to the Google Maps Web API for the details of the parameters """ params = {'latlng': point, 'sensor': str(sensor).lower()} if language: params['language'] = language # depends on [control=['...
def private_config_content(self, private_config): """ Update the private config :param private_config: content of the private configuration file """ try: private_config_path = os.path.join(self.working_dir, "private-config.cfg") if private_config is Non...
def function[private_config_content, parameter[self, private_config]]: constant[ Update the private config :param private_config: content of the private configuration file ] <ast.Try object at 0x7da2044c2410>
keyword[def] identifier[private_config_content] ( identifier[self] , identifier[private_config] ): literal[string] keyword[try] : identifier[private_config_path] = identifier[os] . identifier[path] . identifier[join] ( identifier[self] . identifier[working_dir] , literal[string] ) ...
def private_config_content(self, private_config): """ Update the private config :param private_config: content of the private configuration file """ try: private_config_path = os.path.join(self.working_dir, 'private-config.cfg') if private_config is None: pri...
def ui_clear_clicked_image(self, value): """ Setter for **self.__ui_clear_clicked_image** attribute. :param value: Attribute value. :type value: unicode """ if value is not None: assert type(value) is unicode, "'{0}' attribute: '{1}' type is not 'unicode'!"....
def function[ui_clear_clicked_image, parameter[self, value]]: constant[ Setter for **self.__ui_clear_clicked_image** attribute. :param value: Attribute value. :type value: unicode ] if compare[name[value] is_not constant[None]] begin[:] assert[compare[call[name[t...
keyword[def] identifier[ui_clear_clicked_image] ( identifier[self] , identifier[value] ): literal[string] keyword[if] identifier[value] keyword[is] keyword[not] keyword[None] : keyword[assert] identifier[type] ( identifier[value] ) keyword[is] identifier[unicode] , literal[strin...
def ui_clear_clicked_image(self, value): """ Setter for **self.__ui_clear_clicked_image** attribute. :param value: Attribute value. :type value: unicode """ if value is not None: assert type(value) is unicode, "'{0}' attribute: '{1}' type is not 'unicode'!".format('ui_cl...
def visit_module(self, node): """ A interface will be called when visiting a module. @param node: The module node to check. """ recorder = PyCodeStyleWarningRecorder(node.file) self._outputMessages(recorder.warnings, node)
def function[visit_module, parameter[self, node]]: constant[ A interface will be called when visiting a module. @param node: The module node to check. ] variable[recorder] assign[=] call[name[PyCodeStyleWarningRecorder], parameter[name[node].file]] call[name[self]._outpu...
keyword[def] identifier[visit_module] ( identifier[self] , identifier[node] ): literal[string] identifier[recorder] = identifier[PyCodeStyleWarningRecorder] ( identifier[node] . identifier[file] ) identifier[self] . identifier[_outputMessages] ( identifier[recorder] . identifier[warnings] ...
def visit_module(self, node): """ A interface will be called when visiting a module. @param node: The module node to check. """ recorder = PyCodeStyleWarningRecorder(node.file) self._outputMessages(recorder.warnings, node)
def contributor_director(**kwargs): """Define the expanded qualifier name.""" if kwargs.get('qualifier') in ETD_MS_CONTRIBUTOR_EXPANSION: # Return the element object. return ETD_MSContributor( role=ETD_MS_CONTRIBUTOR_EXPANSION[kwargs.get('qualifier')], **kwargs ) ...
def function[contributor_director, parameter[]]: constant[Define the expanded qualifier name.] if compare[call[name[kwargs].get, parameter[constant[qualifier]]] in name[ETD_MS_CONTRIBUTOR_EXPANSION]] begin[:] return[call[name[ETD_MSContributor], parameter[]]]
keyword[def] identifier[contributor_director] (** identifier[kwargs] ): literal[string] keyword[if] identifier[kwargs] . identifier[get] ( literal[string] ) keyword[in] identifier[ETD_MS_CONTRIBUTOR_EXPANSION] : keyword[return] identifier[ETD_MSContributor] ( identifier[role] = id...
def contributor_director(**kwargs): """Define the expanded qualifier name.""" if kwargs.get('qualifier') in ETD_MS_CONTRIBUTOR_EXPANSION: # Return the element object. return ETD_MSContributor(role=ETD_MS_CONTRIBUTOR_EXPANSION[kwargs.get('qualifier')], **kwargs) # depends on [control=['if'], dat...
def _call(self, method, params=None, request_id=None): """ Calls the JSON-RPC endpoint. """ params = params or [] # Determines which 'id' value to use and increment the counter associated with the current # client instance if applicable. rid = request_id or self._id_counter ...
def function[_call, parameter[self, method, params, request_id]]: constant[ Calls the JSON-RPC endpoint. ] variable[params] assign[=] <ast.BoolOp object at 0x7da1b0217430> variable[rid] assign[=] <ast.BoolOp object at 0x7da1b0217a60> if compare[name[request_id] is constant[None]] begin[:...
keyword[def] identifier[_call] ( identifier[self] , identifier[method] , identifier[params] = keyword[None] , identifier[request_id] = keyword[None] ): literal[string] identifier[params] = identifier[params] keyword[or] [] identifier[rid] = identifier[request_id] keywo...
def _call(self, method, params=None, request_id=None): """ Calls the JSON-RPC endpoint. """ params = params or [] # Determines which 'id' value to use and increment the counter associated with the current # client instance if applicable. rid = request_id or self._id_counter if request_id is None...
def offset_gaussian(data): """Fit a gaussian model to `data` and return its center""" nbins = 2 * int(np.ceil(np.sqrt(data.size))) mind, maxd = data.min(), data.max() drange = (mind - (maxd - mind) / 2, maxd + (maxd - mind) / 2) histo = np.histogram(data, nbins, density=True, range=drange) dx = ...
def function[offset_gaussian, parameter[data]]: constant[Fit a gaussian model to `data` and return its center] variable[nbins] assign[=] binary_operation[constant[2] * call[name[int], parameter[call[name[np].ceil, parameter[call[name[np].sqrt, parameter[name[data].size]]]]]]] <ast.Tuple object a...
keyword[def] identifier[offset_gaussian] ( identifier[data] ): literal[string] identifier[nbins] = literal[int] * identifier[int] ( identifier[np] . identifier[ceil] ( identifier[np] . identifier[sqrt] ( identifier[data] . identifier[size] ))) identifier[mind] , identifier[maxd] = identifier[data] . i...
def offset_gaussian(data): """Fit a gaussian model to `data` and return its center""" nbins = 2 * int(np.ceil(np.sqrt(data.size))) (mind, maxd) = (data.min(), data.max()) drange = (mind - (maxd - mind) / 2, maxd + (maxd - mind) / 2) histo = np.histogram(data, nbins, density=True, range=drange) d...
def load_bulk(cls, bulk_data, parent=None, keep_ids=False): """Loads a list/dictionary structure to the tree.""" cls = get_result_class(cls) # tree, iterative preorder added = [] if parent: parent_id = parent.pk else: parent_id = None # s...
def function[load_bulk, parameter[cls, bulk_data, parent, keep_ids]]: constant[Loads a list/dictionary structure to the tree.] variable[cls] assign[=] call[name[get_result_class], parameter[name[cls]]] variable[added] assign[=] list[[]] if name[parent] begin[:] variable[p...
keyword[def] identifier[load_bulk] ( identifier[cls] , identifier[bulk_data] , identifier[parent] = keyword[None] , identifier[keep_ids] = keyword[False] ): literal[string] identifier[cls] = identifier[get_result_class] ( identifier[cls] ) identifier[added] =[] keyword[...
def load_bulk(cls, bulk_data, parent=None, keep_ids=False): """Loads a list/dictionary structure to the tree.""" cls = get_result_class(cls) # tree, iterative preorder added = [] if parent: parent_id = parent.pk # depends on [control=['if'], data=[]] else: parent_id = None #...
def zlist(columns, items, print_columns=None, text="", title="", width=DEFAULT_WIDTH, height=ZLIST_HEIGHT, timeout=None): """ Display a list of values :param columns: a list of columns name :type columns: list of strings :param items: a list of values :type items: list of st...
def function[zlist, parameter[columns, items, print_columns, text, title, width, height, timeout]]: constant[ Display a list of values :param columns: a list of columns name :type columns: list of strings :param items: a list of values :type items: list of strings :param print_columns: ...
keyword[def] identifier[zlist] ( identifier[columns] , identifier[items] , identifier[print_columns] = keyword[None] , identifier[text] = literal[string] , identifier[title] = literal[string] , identifier[width] = identifier[DEFAULT_WIDTH] , identifier[height] = identifier[ZLIST_HEIGHT] , identifier[timeout] = keyw...
def zlist(columns, items, print_columns=None, text='', title='', width=DEFAULT_WIDTH, height=ZLIST_HEIGHT, timeout=None): """ Display a list of values :param columns: a list of columns name :type columns: list of strings :param items: a list of values :type items: list of strings :param pri...
def cloneQuery(self, limit=_noItem, sort=_noItem): """ Clone the original query which this distinct query wraps, and return a new wrapper around that clone. """ newq = self.query.cloneQuery(limit=limit, sort=sort) return self.__class__(newq)
def function[cloneQuery, parameter[self, limit, sort]]: constant[ Clone the original query which this distinct query wraps, and return a new wrapper around that clone. ] variable[newq] assign[=] call[name[self].query.cloneQuery, parameter[]] return[call[name[self].__class__, ...
keyword[def] identifier[cloneQuery] ( identifier[self] , identifier[limit] = identifier[_noItem] , identifier[sort] = identifier[_noItem] ): literal[string] identifier[newq] = identifier[self] . identifier[query] . identifier[cloneQuery] ( identifier[limit] = identifier[limit] , identifier[sort] = ...
def cloneQuery(self, limit=_noItem, sort=_noItem): """ Clone the original query which this distinct query wraps, and return a new wrapper around that clone. """ newq = self.query.cloneQuery(limit=limit, sort=sort) return self.__class__(newq)
def spawn_mutect(job, tumor_bam, normal_bam, univ_options, mutect_options): """ This module will spawn a mutect job for each chromosome on the DNA bams. ARGUMENTS 1. tumor_bam: Dict of input tumor WGS/WSQ bam + bai tumor_bam |- 'tumor_fix_pg_sorted.bam': <JSid> +- 't...
def function[spawn_mutect, parameter[job, tumor_bam, normal_bam, univ_options, mutect_options]]: constant[ This module will spawn a mutect job for each chromosome on the DNA bams. ARGUMENTS 1. tumor_bam: Dict of input tumor WGS/WSQ bam + bai tumor_bam |- 'tumor_fix_pg_sorted.b...
keyword[def] identifier[spawn_mutect] ( identifier[job] , identifier[tumor_bam] , identifier[normal_bam] , identifier[univ_options] , identifier[mutect_options] ): literal[string] identifier[job] . identifier[fileStore] . identifier[logToMaster] ( literal[string] % identifier[univ_options] [ literal[string...
def spawn_mutect(job, tumor_bam, normal_bam, univ_options, mutect_options): """ This module will spawn a mutect job for each chromosome on the DNA bams. ARGUMENTS 1. tumor_bam: Dict of input tumor WGS/WSQ bam + bai tumor_bam |- 'tumor_fix_pg_sorted.bam': <JSid> +- 't...
def create_access_token_response(self, uri, http_method='GET', body=None, headers=None, credentials=None): """Create an access token response, with a new request token if valid. :param uri: The full URI of the token request. :param http_method: A valid HTTP ...
def function[create_access_token_response, parameter[self, uri, http_method, body, headers, credentials]]: constant[Create an access token response, with a new request token if valid. :param uri: The full URI of the token request. :param http_method: A valid HTTP verb, i.e. GET, POST, PUT, HEAD...
keyword[def] identifier[create_access_token_response] ( identifier[self] , identifier[uri] , identifier[http_method] = literal[string] , identifier[body] = keyword[None] , identifier[headers] = keyword[None] , identifier[credentials] = keyword[None] ): literal[string] identifier[resp_headers] ={ l...
def create_access_token_response(self, uri, http_method='GET', body=None, headers=None, credentials=None): """Create an access token response, with a new request token if valid. :param uri: The full URI of the token request. :param http_method: A valid HTTP verb, i.e. GET, POST, PUT, HEAD, etc. ...
def _get_elements(mol, label): """ The the elements of the atoms in the specified order Args: mol: The molecule. OpenBabel OBMol object. label: The atom indices. List of integers. Returns: Elements. List of integers. """ elements = [i...
def function[_get_elements, parameter[mol, label]]: constant[ The the elements of the atoms in the specified order Args: mol: The molecule. OpenBabel OBMol object. label: The atom indices. List of integers. Returns: Elements. List of integers. ...
keyword[def] identifier[_get_elements] ( identifier[mol] , identifier[label] ): literal[string] identifier[elements] =[ identifier[int] ( identifier[mol] . identifier[GetAtom] ( identifier[i] ). identifier[GetAtomicNum] ()) keyword[for] identifier[i] keyword[in] identifier[label] ] keyw...
def _get_elements(mol, label): """ The the elements of the atoms in the specified order Args: mol: The molecule. OpenBabel OBMol object. label: The atom indices. List of integers. Returns: Elements. List of integers. """ elements = [int(mol.G...
def write_manifest (self): """Write the file list in 'self.filelist' (presumably as filled in by 'add_defaults()' and 'read_template()') to the manifest file named by 'self.manifest'. """ # The manifest must be UTF-8 encodable. See #303. if sys.version_info >= (3,): ...
def function[write_manifest, parameter[self]]: constant[Write the file list in 'self.filelist' (presumably as filled in by 'add_defaults()' and 'read_template()') to the manifest file named by 'self.manifest'. ] if compare[name[sys].version_info greater_or_equal[>=] tuple[[<ast.C...
keyword[def] identifier[write_manifest] ( identifier[self] ): literal[string] keyword[if] identifier[sys] . identifier[version_info] >=( literal[int] ,): identifier[files] =[] keyword[for] identifier[file] keyword[in] identifier[self] . identifier[filelist] . ...
def write_manifest(self): """Write the file list in 'self.filelist' (presumably as filled in by 'add_defaults()' and 'read_template()') to the manifest file named by 'self.manifest'. """ # The manifest must be UTF-8 encodable. See #303. if sys.version_info >= (3,): files = []...
def zipFile(source): """Compress file under zip mode when compress failed with return source path :param source: source file path :return: zip file path """ # source = source.decode('UTF-8') target = source[0:source.rindex(".")] + '.zip' try: with zipfile.ZipFile(target, 'w')...
def function[zipFile, parameter[source]]: constant[Compress file under zip mode when compress failed with return source path :param source: source file path :return: zip file path ] variable[target] assign[=] binary_operation[call[name[source]][<ast.Slice object at 0x7da18bcc85e0>] +...
keyword[def] identifier[zipFile] ( identifier[source] ): literal[string] identifier[target] = identifier[source] [ literal[int] : identifier[source] . identifier[rindex] ( literal[string] )]+ literal[string] keyword[try] : keyword[with] identifier[zipfile] . identifier[ZipFile] ( ident...
def zipFile(source): """Compress file under zip mode when compress failed with return source path :param source: source file path :return: zip file path """ # source = source.decode('UTF-8') target = source[0:source.rindex('.')] + '.zip' try: with zipfile.ZipFile(target, 'w')...
def compare_to_rm(data): """Compare final variant calls against reference materials of known calls. """ if isinstance(data, (list, tuple)) and cwlutils.is_cwl_run(utils.to_single_data(data[0])): data = _normalize_cwl_inputs(data) toval_data = _get_validate(data) toval_data = cwlutils.unpack_...
def function[compare_to_rm, parameter[data]]: constant[Compare final variant calls against reference materials of known calls. ] if <ast.BoolOp object at 0x7da1b1986800> begin[:] variable[data] assign[=] call[name[_normalize_cwl_inputs], parameter[name[data]]] variable[toval_...
keyword[def] identifier[compare_to_rm] ( identifier[data] ): literal[string] keyword[if] identifier[isinstance] ( identifier[data] ,( identifier[list] , identifier[tuple] )) keyword[and] identifier[cwlutils] . identifier[is_cwl_run] ( identifier[utils] . identifier[to_single_data] ( identifier[data] [ li...
def compare_to_rm(data): """Compare final variant calls against reference materials of known calls. """ if isinstance(data, (list, tuple)) and cwlutils.is_cwl_run(utils.to_single_data(data[0])): data = _normalize_cwl_inputs(data) # depends on [control=['if'], data=[]] toval_data = _get_validate...
def construct(self, **bindings): """Constructs the graph and returns either a tensor or a sequence. Args: **bindings: Arguments for every deferred parameter. Returns: The value that is placed into this. """ context = _assign_values_to_unbound_vars(self._unbound_vars, bindings) conte...
def function[construct, parameter[self]]: constant[Constructs the graph and returns either a tensor or a sequence. Args: **bindings: Arguments for every deferred parameter. Returns: The value that is placed into this. ] variable[context] assign[=] call[name[_assign_values_to_unb...
keyword[def] identifier[construct] ( identifier[self] ,** identifier[bindings] ): literal[string] identifier[context] = identifier[_assign_values_to_unbound_vars] ( identifier[self] . identifier[_unbound_vars] , identifier[bindings] ) identifier[context] . identifier[update] ( identifier[self] . ident...
def construct(self, **bindings): """Constructs the graph and returns either a tensor or a sequence. Args: **bindings: Arguments for every deferred parameter. Returns: The value that is placed into this. """ context = _assign_values_to_unbound_vars(self._unbound_vars, bindings) conte...
def check(self): """ Check the stats if enabled. """ if not self.enabled(): return try: self.fetch() except (xmlrpclib.Fault, did.base.ConfigError) as error: log.error(error) self._error = True # Raise the exception if debugging...
def function[check, parameter[self]]: constant[ Check the stats if enabled. ] if <ast.UnaryOp object at 0x7da1b208b010> begin[:] return[None] <ast.Try object at 0x7da1b2088d60> if <ast.BoolOp object at 0x7da1b1e98370> begin[:] call[name[self].show, parameter[]]
keyword[def] identifier[check] ( identifier[self] ): literal[string] keyword[if] keyword[not] identifier[self] . identifier[enabled] (): keyword[return] keyword[try] : identifier[self] . identifier[fetch] () keyword[except] ( identifier[xmlrpclib] . id...
def check(self): """ Check the stats if enabled. """ if not self.enabled(): return # depends on [control=['if'], data=[]] try: self.fetch() # depends on [control=['try'], data=[]] except (xmlrpclib.Fault, did.base.ConfigError) as error: log.error(error) self._error = Tr...
def _xfer_file(self, source_file=None, source_config=None, dest_file=None, file_system=None, TransferClass=FileTransfer): """Transfer file to remote device. By default, this will use Secure Copy if self.inline_transfer is set, then will use Netmiko InlineTransfer method to tr...
def function[_xfer_file, parameter[self, source_file, source_config, dest_file, file_system, TransferClass]]: constant[Transfer file to remote device. By default, this will use Secure Copy if self.inline_transfer is set, then will use Netmiko InlineTransfer method to transfer inline using eithe...
keyword[def] identifier[_xfer_file] ( identifier[self] , identifier[source_file] = keyword[None] , identifier[source_config] = keyword[None] , identifier[dest_file] = keyword[None] , identifier[file_system] = keyword[None] , identifier[TransferClass] = identifier[FileTransfer] ): literal[string] k...
def _xfer_file(self, source_file=None, source_config=None, dest_file=None, file_system=None, TransferClass=FileTransfer): """Transfer file to remote device. By default, this will use Secure Copy if self.inline_transfer is set, then will use Netmiko InlineTransfer method to transfer inline using eit...
def _checkinput(zi, Mi, z=False, verbose=None): """ Check and convert any input scalar or array to numpy array """ # How many halo redshifts provided? zi = np.array(zi, ndmin=1, dtype=float) # How many halo masses provided? Mi = np.array(Mi, ndmin=1, dtype=float) # Check the input sizes for zi...
def function[_checkinput, parameter[zi, Mi, z, verbose]]: constant[ Check and convert any input scalar or array to numpy array ] variable[zi] assign[=] call[name[np].array, parameter[name[zi]]] variable[Mi] assign[=] call[name[np].array, parameter[name[Mi]]] if <ast.BoolOp object at 0x7d...
keyword[def] identifier[_checkinput] ( identifier[zi] , identifier[Mi] , identifier[z] = keyword[False] , identifier[verbose] = keyword[None] ): literal[string] identifier[zi] = identifier[np] . identifier[array] ( identifier[zi] , identifier[ndmin] = literal[int] , identifier[dtype] = identifier[floa...
def _checkinput(zi, Mi, z=False, verbose=None): """ Check and convert any input scalar or array to numpy array """ # How many halo redshifts provided? zi = np.array(zi, ndmin=1, dtype=float) # How many halo masses provided? Mi = np.array(Mi, ndmin=1, dtype=float) # Check the input sizes for zi a...
def delete_pre_shared_key(self, endpoint_name, **kwargs): # noqa: E501 """Remove a pre-shared key. # noqa: E501 Remove a pre-shared key. **Example usage:** ``` curl -H \"authorization: Bearer ${API_TOKEN}\" -X DELETE https://api.us-east-1.mbedcloud.com/v2/device-shared-keys/my-endpoint-0001 ``` #...
def function[delete_pre_shared_key, parameter[self, endpoint_name]]: constant[Remove a pre-shared key. # noqa: E501 Remove a pre-shared key. **Example usage:** ``` curl -H "authorization: Bearer ${API_TOKEN}" -X DELETE https://api.us-east-1.mbedcloud.com/v2/device-shared-keys/my-endpoint-0001 ``` ...
keyword[def] identifier[delete_pre_shared_key] ( identifier[self] , identifier[endpoint_name] ,** identifier[kwargs] ): literal[string] identifier[kwargs] [ literal[string] ]= keyword[True] keyword[if] identifier[kwargs] . identifier[get] ( literal[string] ): keyword[return]...
def delete_pre_shared_key(self, endpoint_name, **kwargs): # noqa: E501 'Remove a pre-shared key. # noqa: E501\n\n Remove a pre-shared key. **Example usage:** ``` curl -H "authorization: Bearer ${API_TOKEN}" -X DELETE https://api.us-east-1.mbedcloud.com/v2/device-shared-keys/my-endpoint-0001 ``` # noqa:...
def readline(self, size=-1): """ readline([size]) -> next line from the file, as a string. Retain newline. A non-negative size argument limits the maximum number of bytes to return (an incomplete line may be returned then). Return an empty string at EOF. """ if ...
def function[readline, parameter[self, size]]: constant[ readline([size]) -> next line from the file, as a string. Retain newline. A non-negative size argument limits the maximum number of bytes to return (an incomplete line may be returned then). Return an empty string at EOF....
keyword[def] identifier[readline] ( identifier[self] , identifier[size] =- literal[int] ): literal[string] keyword[if] identifier[self] . identifier[closed] : keyword[raise] identifier[ValueError] ( literal[string] ) identifier[data] = literal[string] keyword[while...
def readline(self, size=-1): """ readline([size]) -> next line from the file, as a string. Retain newline. A non-negative size argument limits the maximum number of bytes to return (an incomplete line may be returned then). Return an empty string at EOF. """ if self.clo...
def get_items_by_genus_type(self, item_genus_type): """Gets an ``ItemList`` corresponding to the given assessment item genus ``Type`` which does not include assessment items of genus types derived from the specified ``Type``. In plenary mode, the returned list contains all known assessment item...
def function[get_items_by_genus_type, parameter[self, item_genus_type]]: constant[Gets an ``ItemList`` corresponding to the given assessment item genus ``Type`` which does not include assessment items of genus types derived from the specified ``Type``. In plenary mode, the returned list contains all kn...
keyword[def] identifier[get_items_by_genus_type] ( identifier[self] , identifier[item_genus_type] ): literal[string] identifier[collection] = identifier[JSONClientValidated] ( literal[string] , identifier[collection] = literal[string] , identifier[runtim...
def get_items_by_genus_type(self, item_genus_type): """Gets an ``ItemList`` corresponding to the given assessment item genus ``Type`` which does not include assessment items of genus types derived from the specified ``Type``. In plenary mode, the returned list contains all known assessment items or...
def _removeBPoint(self, index, **kwargs): """ index will be a valid index. Subclasses may override this method. """ bPoint = self.bPoints[index] nextSegment = bPoint._nextSegment offCurves = nextSegment.offCurve if offCurves: offCurve = offCu...
def function[_removeBPoint, parameter[self, index]]: constant[ index will be a valid index. Subclasses may override this method. ] variable[bPoint] assign[=] call[name[self].bPoints][name[index]] variable[nextSegment] assign[=] name[bPoint]._nextSegment variable[...
keyword[def] identifier[_removeBPoint] ( identifier[self] , identifier[index] ,** identifier[kwargs] ): literal[string] identifier[bPoint] = identifier[self] . identifier[bPoints] [ identifier[index] ] identifier[nextSegment] = identifier[bPoint] . identifier[_nextSegment] ident...
def _removeBPoint(self, index, **kwargs): """ index will be a valid index. Subclasses may override this method. """ bPoint = self.bPoints[index] nextSegment = bPoint._nextSegment offCurves = nextSegment.offCurve if offCurves: offCurve = offCurves[0] self.remo...
def rolling_count(self, window_start, window_end): """ Count the number of non-NULL values of different subsets over this SArray. The subset that the count is executed on is defined as an inclusive range relative to the position to each value in the SArray, using `window...
def function[rolling_count, parameter[self, window_start, window_end]]: constant[ Count the number of non-NULL values of different subsets over this SArray. The subset that the count is executed on is defined as an inclusive range relative to the position to each value in the SA...
keyword[def] identifier[rolling_count] ( identifier[self] , identifier[window_start] , identifier[window_end] ): literal[string] identifier[agg_op] = literal[string] keyword[return] identifier[SArray] ( identifier[_proxy] = identifier[self] . identifier[__proxy__] . identifier[builtin_ro...
def rolling_count(self, window_start, window_end): """ Count the number of non-NULL values of different subsets over this SArray. The subset that the count is executed on is defined as an inclusive range relative to the position to each value in the SArray, using `window_sta...
def type_named(obj, name): """ Similar to the type() builtin, but looks in class bases for named instance. Parameters ---------- obj: object to look for class of name : str, name of class Returns ---------- named class, or None """ # if obj is a member of the named clas...
def function[type_named, parameter[obj, name]]: constant[ Similar to the type() builtin, but looks in class bases for named instance. Parameters ---------- obj: object to look for class of name : str, name of class Returns ---------- named class, or None ] varia...
keyword[def] identifier[type_named] ( identifier[obj] , identifier[name] ): literal[string] identifier[name] = identifier[str] ( identifier[name] ) keyword[if] identifier[obj] . identifier[__class__] . identifier[__name__] == identifier[name] : keyword[return] identifier[obj] . identif...
def type_named(obj, name): """ Similar to the type() builtin, but looks in class bases for named instance. Parameters ---------- obj: object to look for class of name : str, name of class Returns ---------- named class, or None """ # if obj is a member of the named clas...
def trace_requirements(requirements): """given an iterable of pip InstallRequirements, return the set of required packages, given their transitive requirements. """ requirements = tuple(pretty_req(r) for r in requirements) working_set = fresh_working_set() # breadth-first traversal: from co...
def function[trace_requirements, parameter[requirements]]: constant[given an iterable of pip InstallRequirements, return the set of required packages, given their transitive requirements. ] variable[requirements] assign[=] call[name[tuple], parameter[<ast.GeneratorExp object at 0x7da1b26afc10>]]...
keyword[def] identifier[trace_requirements] ( identifier[requirements] ): literal[string] identifier[requirements] = identifier[tuple] ( identifier[pretty_req] ( identifier[r] ) keyword[for] identifier[r] keyword[in] identifier[requirements] ) identifier[working_set] = identifier[fresh_working_set]...
def trace_requirements(requirements): """given an iterable of pip InstallRequirements, return the set of required packages, given their transitive requirements. """ requirements = tuple((pretty_req(r) for r in requirements)) working_set = fresh_working_set() # breadth-first traversal: from c...
def format(self, version=0x10, wipe=None): """Format a FeliCa Lite Tag for NDEF. """ return super(FelicaLite, self).format(version, wipe)
def function[format, parameter[self, version, wipe]]: constant[Format a FeliCa Lite Tag for NDEF. ] return[call[call[name[super], parameter[name[FelicaLite], name[self]]].format, parameter[name[version], name[wipe]]]]
keyword[def] identifier[format] ( identifier[self] , identifier[version] = literal[int] , identifier[wipe] = keyword[None] ): literal[string] keyword[return] identifier[super] ( identifier[FelicaLite] , identifier[self] ). identifier[format] ( identifier[version] , identifier[wipe] )
def format(self, version=16, wipe=None): """Format a FeliCa Lite Tag for NDEF. """ return super(FelicaLite, self).format(version, wipe)
def write_byte(self, byte): """Write one byte.""" self.payload[self.pos] = byte self.pos = self.pos + 1
def function[write_byte, parameter[self, byte]]: constant[Write one byte.] call[name[self].payload][name[self].pos] assign[=] name[byte] name[self].pos assign[=] binary_operation[name[self].pos + constant[1]]
keyword[def] identifier[write_byte] ( identifier[self] , identifier[byte] ): literal[string] identifier[self] . identifier[payload] [ identifier[self] . identifier[pos] ]= identifier[byte] identifier[self] . identifier[pos] = identifier[self] . identifier[pos] + literal[int]
def write_byte(self, byte): """Write one byte.""" self.payload[self.pos] = byte self.pos = self.pos + 1
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'workspaces') and self.workspaces is not None: _dict['workspaces'] = [x._to_dict() for x in self.workspaces] if hasattr(self, 'pagination') and self.pagination is not None:...
def function[_to_dict, parameter[self]]: constant[Return a json dictionary representing this model.] variable[_dict] assign[=] dictionary[[], []] if <ast.BoolOp object at 0x7da1b2347280> begin[:] call[name[_dict]][constant[workspaces]] assign[=] <ast.ListComp object at 0x7da1b234...
keyword[def] identifier[_to_dict] ( identifier[self] ): literal[string] identifier[_dict] ={} keyword[if] identifier[hasattr] ( identifier[self] , literal[string] ) keyword[and] identifier[self] . identifier[workspaces] keyword[is] keyword[not] keyword[None] : identifier[...
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'workspaces') and self.workspaces is not None: _dict['workspaces'] = [x._to_dict() for x in self.workspaces] # depends on [control=['if'], data=[]] if hasattr(self, 'pagination') and self.pag...
def fit(self, **kwargs): """ This will try to determine fit parameters using scipy.optimize.leastsq algorithm. This function relies on a previous call of set_data() and set_functions(). Notes ----- results of the fit algorithm are stored in self.results. ...
def function[fit, parameter[self]]: constant[ This will try to determine fit parameters using scipy.optimize.leastsq algorithm. This function relies on a previous call of set_data() and set_functions(). Notes ----- results of the fit algorithm are stored in self...
keyword[def] identifier[fit] ( identifier[self] ,** identifier[kwargs] ): literal[string] keyword[if] identifier[len] ( identifier[self] . identifier[_set_xdata] )== literal[int] keyword[or] identifier[len] ( identifier[self] . identifier[_set_ydata] )== literal[int] : keyword[retur...
def fit(self, **kwargs): """ This will try to determine fit parameters using scipy.optimize.leastsq algorithm. This function relies on a previous call of set_data() and set_functions(). Notes ----- results of the fit algorithm are stored in self.results. Se...
def all(cls, sort=None, limit=None): """Returns all objects of this type. Alias for where() (without filter arguments). See `where` for documentation on the `sort` and `limit` parameters. """ return cls.where(sort=sort, limit=limit)
def function[all, parameter[cls, sort, limit]]: constant[Returns all objects of this type. Alias for where() (without filter arguments). See `where` for documentation on the `sort` and `limit` parameters. ] return[call[name[cls].where, parameter[]]]
keyword[def] identifier[all] ( identifier[cls] , identifier[sort] = keyword[None] , identifier[limit] = keyword[None] ): literal[string] keyword[return] identifier[cls] . identifier[where] ( identifier[sort] = identifier[sort] , identifier[limit] = identifier[limit] )
def all(cls, sort=None, limit=None): """Returns all objects of this type. Alias for where() (without filter arguments). See `where` for documentation on the `sort` and `limit` parameters. """ return cls.where(sort=sort, limit=limit)
def separation(X,y,samples=False): """ return the sum of the between-class squared distance""" # pdb.set_trace() num_classes = len(np.unique(y)) total_dist = (X.max()-X.min())**2 if samples: # return intra-class distance for each sample separation = np.zeros(y.shape) for labe...
def function[separation, parameter[X, y, samples]]: constant[ return the sum of the between-class squared distance] variable[num_classes] assign[=] call[name[len], parameter[call[name[np].unique, parameter[name[y]]]]] variable[total_dist] assign[=] binary_operation[binary_operation[call[name[X]....
keyword[def] identifier[separation] ( identifier[X] , identifier[y] , identifier[samples] = keyword[False] ): literal[string] identifier[num_classes] = identifier[len] ( identifier[np] . identifier[unique] ( identifier[y] )) identifier[total_dist] =( identifier[X] . identifier[max] ()- identifier...
def separation(X, y, samples=False): """ return the sum of the between-class squared distance""" # pdb.set_trace() num_classes = len(np.unique(y)) total_dist = (X.max() - X.min()) ** 2 if samples: # return intra-class distance for each sample separation = np.zeros(y.shape) fo...
def processing_block_devices(self): """Get list of processing block devices.""" # Get the list and number of Tango PB devices tango_db = Database() pb_device_class = "ProcessingBlockDevice" pb_device_server_instance = "processing_block_ds/1" pb_devices = tango_db.get_devi...
def function[processing_block_devices, parameter[self]]: constant[Get list of processing block devices.] variable[tango_db] assign[=] call[name[Database], parameter[]] variable[pb_device_class] assign[=] constant[ProcessingBlockDevice] variable[pb_device_server_instance] assign[=] consta...
keyword[def] identifier[processing_block_devices] ( identifier[self] ): literal[string] identifier[tango_db] = identifier[Database] () identifier[pb_device_class] = literal[string] identifier[pb_device_server_instance] = literal[string] identifier[pb_devices] =...
def processing_block_devices(self): """Get list of processing block devices.""" # Get the list and number of Tango PB devices tango_db = Database() pb_device_class = 'ProcessingBlockDevice' pb_device_server_instance = 'processing_block_ds/1' pb_devices = tango_db.get_device_name(pb_device_server...
def __replace_within_document(self, document, occurrences, replacement_pattern): """ Replaces given pattern occurrences in given document using given settings. :param document: Document. :type document: QTextDocument :param replacement_pattern: Replacement pattern. :type...
def function[__replace_within_document, parameter[self, document, occurrences, replacement_pattern]]: constant[ Replaces given pattern occurrences in given document using given settings. :param document: Document. :type document: QTextDocument :param replacement_pattern: Replace...
keyword[def] identifier[__replace_within_document] ( identifier[self] , identifier[document] , identifier[occurrences] , identifier[replacement_pattern] ): literal[string] identifier[cursor] = identifier[QTextCursor] ( identifier[document] ) identifier[cursor] . identifier[beginEditBlock]...
def __replace_within_document(self, document, occurrences, replacement_pattern): """ Replaces given pattern occurrences in given document using given settings. :param document: Document. :type document: QTextDocument :param replacement_pattern: Replacement pattern. :type rep...
def get_path(src): # pragma: no cover """ Prompts the user to input a local path. :param src: github repository name :return: Absolute local path """ res = None while not res: if res is False: print(colored('You must provide a path to an existing directory!', 'red')) ...
def function[get_path, parameter[src]]: constant[ Prompts the user to input a local path. :param src: github repository name :return: Absolute local path ] variable[res] assign[=] constant[None] while <ast.UnaryOp object at 0x7da18f811360> begin[:] if compare[nam...
keyword[def] identifier[get_path] ( identifier[src] ): literal[string] identifier[res] = keyword[None] keyword[while] keyword[not] identifier[res] : keyword[if] identifier[res] keyword[is] keyword[False] : identifier[print] ( identifier[colored] ( literal[string] , literal[...
def get_path(src): # pragma: no cover '\n Prompts the user to input a local path.\n\n :param src: github repository name\n :return: Absolute local path\n ' res = None while not res: if res is False: print(colored('You must provide a path to an existing directory!', 'red')) ...
def copy_data_in_redis(self, redis_prefix, redis_instance): """ Copy the complete lookup data into redis. Old data will be overwritten. Args: redis_prefix (str): Prefix to distinguish the data in redis for the different looktypes redis_instance (str): an Instance of Redi...
def function[copy_data_in_redis, parameter[self, redis_prefix, redis_instance]]: constant[ Copy the complete lookup data into redis. Old data will be overwritten. Args: redis_prefix (str): Prefix to distinguish the data in redis for the different looktypes redis_instance...
keyword[def] identifier[copy_data_in_redis] ( identifier[self] , identifier[redis_prefix] , identifier[redis_instance] ): literal[string] keyword[if] identifier[redis_instance] keyword[is] keyword[not] keyword[None] : identifier[self] . identifier[_redis] = identifier[redis_instan...
def copy_data_in_redis(self, redis_prefix, redis_instance): """ Copy the complete lookup data into redis. Old data will be overwritten. Args: redis_prefix (str): Prefix to distinguish the data in redis for the different looktypes redis_instance (str): an Instance of Redis ...
def cornerpoints(results, thin=1, span=None, cmap='plasma', color=None, kde=True, nkde=1000, plot_kwargs=None, labels=None, label_kwargs=None, truths=None, truth_color='red', truth_kwargs=None, max_n_ticks=5, use_math_text=False, fig=None): """ ...
def function[cornerpoints, parameter[results, thin, span, cmap, color, kde, nkde, plot_kwargs, labels, label_kwargs, truths, truth_color, truth_kwargs, max_n_ticks, use_math_text, fig]]: constant[ Generate a (sub-)corner plot of (weighted) samples. Parameters ---------- results : :class:`~dynes...
keyword[def] identifier[cornerpoints] ( identifier[results] , identifier[thin] = literal[int] , identifier[span] = keyword[None] , identifier[cmap] = literal[string] , identifier[color] = keyword[None] , identifier[kde] = keyword[True] , identifier[nkde] = literal[int] , identifier[plot_kwargs] = keyword[None] , ide...
def cornerpoints(results, thin=1, span=None, cmap='plasma', color=None, kde=True, nkde=1000, plot_kwargs=None, labels=None, label_kwargs=None, truths=None, truth_color='red', truth_kwargs=None, max_n_ticks=5, use_math_text=False, fig=None): """ Generate a (sub-)corner plot of (weighted) samples. Parameters...
def get_longest_line_length(text): """Get the length longest line in a paragraph""" lines = text.split("\n") length = 0 for i in range(len(lines)): if len(lines[i]) > length: length = len(lines[i]) return length
def function[get_longest_line_length, parameter[text]]: constant[Get the length longest line in a paragraph] variable[lines] assign[=] call[name[text].split, parameter[constant[ ]]] variable[length] assign[=] constant[0] for taget[name[i]] in starred[call[name[range], parameter[call[name...
keyword[def] identifier[get_longest_line_length] ( identifier[text] ): literal[string] identifier[lines] = identifier[text] . identifier[split] ( literal[string] ) identifier[length] = literal[int] keyword[for] identifier[i] keyword[in] identifier[range] ( identifier[len] ( identifier[lines]...
def get_longest_line_length(text): """Get the length longest line in a paragraph""" lines = text.split('\n') length = 0 for i in range(len(lines)): if len(lines[i]) > length: length = len(lines[i]) # depends on [control=['if'], data=['length']] # depends on [control=['for'], data=[...
def set_last_hop_responded(self, last_hop): """Sets the flag if last hop responded.""" for packet in last_hop.packets: if packet.rtt: self.last_hop_responded = True break
def function[set_last_hop_responded, parameter[self, last_hop]]: constant[Sets the flag if last hop responded.] for taget[name[packet]] in starred[name[last_hop].packets] begin[:] if name[packet].rtt begin[:] name[self].last_hop_responded assign[=] constant[True] ...
keyword[def] identifier[set_last_hop_responded] ( identifier[self] , identifier[last_hop] ): literal[string] keyword[for] identifier[packet] keyword[in] identifier[last_hop] . identifier[packets] : keyword[if] identifier[packet] . identifier[rtt] : identifier[self]...
def set_last_hop_responded(self, last_hop): """Sets the flag if last hop responded.""" for packet in last_hop.packets: if packet.rtt: self.last_hop_responded = True break # depends on [control=['if'], data=[]] # depends on [control=['for'], data=['packet']]
def id_fix(value): """ fix @prefix values for ttl """ if value.startswith('KSC_M'): pass else: value = value.replace(':','_') if value.startswith('ERO') or value.startswith('OBI') or value.startswith('GO') or value.startswith('UBERON') or value.startswith('IAO'): value = ...
def function[id_fix, parameter[value]]: constant[ fix @prefix values for ttl ] if call[name[value].startswith, parameter[constant[KSC_M]]] begin[:] pass return[call[name[OntId], parameter[name[value]]].URIRef]
keyword[def] identifier[id_fix] ( identifier[value] ): literal[string] keyword[if] identifier[value] . identifier[startswith] ( literal[string] ): keyword[pass] keyword[else] : identifier[value] = identifier[value] . identifier[replace] ( literal[string] , literal[string] ) ...
def id_fix(value): """ fix @prefix values for ttl """ if value.startswith('KSC_M'): pass # depends on [control=['if'], data=[]] else: value = value.replace(':', '_') if value.startswith('ERO') or value.startswith('OBI') or value.startswith('GO') or value.startswith('UBERON') or valu...
def fetch_new_id(self, ): """Return a new id for the given reftrack to be set on the refobject The id can identify reftracks that share the same parent, type and element. :returns: A new id :rtype: int :raises: None """ parent = self.get_parent() if pare...
def function[fetch_new_id, parameter[self]]: constant[Return a new id for the given reftrack to be set on the refobject The id can identify reftracks that share the same parent, type and element. :returns: A new id :rtype: int :raises: None ] variable[parent] as...
keyword[def] identifier[fetch_new_id] ( identifier[self] ,): literal[string] identifier[parent] = identifier[self] . identifier[get_parent] () keyword[if] identifier[parent] : identifier[others] = identifier[parent] . identifier[_children] keyword[else] : ...
def fetch_new_id(self): """Return a new id for the given reftrack to be set on the refobject The id can identify reftracks that share the same parent, type and element. :returns: A new id :rtype: int :raises: None """ parent = self.get_parent() if parent: ot...
def ipv6_generate_random(total=100): """ The generator to produce random, unique IPv6 addresses that are not defined (can be looked up using ipwhois). Args: total (:obj:`int`): The total number of IPv6 addresses to generate. Yields: str: The next IPv6 address. """ count = ...
def function[ipv6_generate_random, parameter[total]]: constant[ The generator to produce random, unique IPv6 addresses that are not defined (can be looked up using ipwhois). Args: total (:obj:`int`): The total number of IPv6 addresses to generate. Yields: str: The next IPv6 add...
keyword[def] identifier[ipv6_generate_random] ( identifier[total] = literal[int] ): literal[string] identifier[count] = literal[int] identifier[yielded] = identifier[set] () keyword[while] identifier[count] < identifier[total] : identifier[address] = identifier[str] ( identifier[IPv6...
def ipv6_generate_random(total=100): """ The generator to produce random, unique IPv6 addresses that are not defined (can be looked up using ipwhois). Args: total (:obj:`int`): The total number of IPv6 addresses to generate. Yields: str: The next IPv6 address. """ count = 0...
def check_build_status(self, build_id): """Checks the status of an app-setups build. :param build_id: ID of the build to check. :returns: ``True`` if succeeded, ``False`` if pending. """ data = self.api_request('GET', '/app-setups/%s' % build_id) status = data.get('stat...
def function[check_build_status, parameter[self, build_id]]: constant[Checks the status of an app-setups build. :param build_id: ID of the build to check. :returns: ``True`` if succeeded, ``False`` if pending. ] variable[data] assign[=] call[name[self].api_request, parameter[con...
keyword[def] identifier[check_build_status] ( identifier[self] , identifier[build_id] ): literal[string] identifier[data] = identifier[self] . identifier[api_request] ( literal[string] , literal[string] % identifier[build_id] ) identifier[status] = identifier[data] . identifier[get] ( lit...
def check_build_status(self, build_id): """Checks the status of an app-setups build. :param build_id: ID of the build to check. :returns: ``True`` if succeeded, ``False`` if pending. """ data = self.api_request('GET', '/app-setups/%s' % build_id) status = data.get('status') if s...
def _win32_can_symlink(verbose=0, force=0, testing=0): """ CommandLine: python -m ubelt._win32_links _win32_can_symlink Example: >>> # xdoc: +REQUIRES(WIN32) >>> import ubelt as ub >>> _win32_can_symlink(verbose=1, force=1, testing=1) """ global __win32_can_symlink__...
def function[_win32_can_symlink, parameter[verbose, force, testing]]: constant[ CommandLine: python -m ubelt._win32_links _win32_can_symlink Example: >>> # xdoc: +REQUIRES(WIN32) >>> import ubelt as ub >>> _win32_can_symlink(verbose=1, force=1, testing=1) ] <ast....
keyword[def] identifier[_win32_can_symlink] ( identifier[verbose] = literal[int] , identifier[force] = literal[int] , identifier[testing] = literal[int] ): literal[string] keyword[global] identifier[__win32_can_symlink__] keyword[if] identifier[verbose] : identifier[print] ( literal[string...
def _win32_can_symlink(verbose=0, force=0, testing=0): """ CommandLine: python -m ubelt._win32_links _win32_can_symlink Example: >>> # xdoc: +REQUIRES(WIN32) >>> import ubelt as ub >>> _win32_can_symlink(verbose=1, force=1, testing=1) """ global __win32_can_symlink__...
def get_data_point(self, n): """ Returns the n'th data point (starting at 0) from all columns. Parameters ---------- n Index of data point to return. """ # loop over the columns and pop the data point = [] for k in self.ckeys: p...
def function[get_data_point, parameter[self, n]]: constant[ Returns the n'th data point (starting at 0) from all columns. Parameters ---------- n Index of data point to return. ] variable[point] assign[=] list[[]] for taget[name[k]] in ...
keyword[def] identifier[get_data_point] ( identifier[self] , identifier[n] ): literal[string] identifier[point] =[] keyword[for] identifier[k] keyword[in] identifier[self] . identifier[ckeys] : identifier[point] . identifier[append] ( identifier[self] [ identifier[k] ][ identif...
def get_data_point(self, n): """ Returns the n'th data point (starting at 0) from all columns. Parameters ---------- n Index of data point to return. """ # loop over the columns and pop the data point = [] for k in self.ckeys: point.app...
def add_bgedge(self, bgedge, merge=True): """ Adds supplied :class:`bg.edge.BGEdge` object to current instance of :class:`BreakpointGraph`. Proxies a call to :meth:`BreakpointGraph._BreakpointGraph__add_bgedge` method. :param bgedge: instance of :class:`bg.edge.BGEdge` infromation form which i...
def function[add_bgedge, parameter[self, bgedge, merge]]: constant[ Adds supplied :class:`bg.edge.BGEdge` object to current instance of :class:`BreakpointGraph`. Proxies a call to :meth:`BreakpointGraph._BreakpointGraph__add_bgedge` method. :param bgedge: instance of :class:`bg.edge.BGEdge` in...
keyword[def] identifier[add_bgedge] ( identifier[self] , identifier[bgedge] , identifier[merge] = keyword[True] ): literal[string] identifier[self] . identifier[__add_bgedge] ( identifier[bgedge] = identifier[bgedge] , identifier[merge] = identifier[merge] )
def add_bgedge(self, bgedge, merge=True): """ Adds supplied :class:`bg.edge.BGEdge` object to current instance of :class:`BreakpointGraph`. Proxies a call to :meth:`BreakpointGraph._BreakpointGraph__add_bgedge` method. :param bgedge: instance of :class:`bg.edge.BGEdge` infromation form which is to...
def _fix_permissions(self): """ Because docker run as root we need to fix permission and ownership to allow user to interact with it from their filesystem and do operation like file delete """ state = yield from self._get_container_state() if state == "stopped" or state ...
def function[_fix_permissions, parameter[self]]: constant[ Because docker run as root we need to fix permission and ownership to allow user to interact with it from their filesystem and do operation like file delete ] variable[state] assign[=] <ast.YieldFrom object at 0x7da20c6c7...
keyword[def] identifier[_fix_permissions] ( identifier[self] ): literal[string] identifier[state] = keyword[yield] keyword[from] identifier[self] . identifier[_get_container_state] () keyword[if] identifier[state] == literal[string] keyword[or] identifier[state] == literal[string] : ...
def _fix_permissions(self): """ Because docker run as root we need to fix permission and ownership to allow user to interact with it from their filesystem and do operation like file delete """ state = (yield from self._get_container_state()) if state == 'stopped' or state == 'exited'...
def refine_time_offset(image_list, frame_timestamps, rotation_sequence, rotation_timestamps, camera_matrix, readout_time): """Refine a time offset between camera and IMU using rolling shutter aware optimization. To refine the time offset using this function, you must meet the following constraints ...
def function[refine_time_offset, parameter[image_list, frame_timestamps, rotation_sequence, rotation_timestamps, camera_matrix, readout_time]]: constant[Refine a time offset between camera and IMU using rolling shutter aware optimization. To refine the time offset using this function, you must meet the...
keyword[def] identifier[refine_time_offset] ( identifier[image_list] , identifier[frame_timestamps] , identifier[rotation_sequence] , identifier[rotation_timestamps] , identifier[camera_matrix] , identifier[readout_time] ): literal[string] identifier[max_corners] = literal[int] identifier[qualit...
def refine_time_offset(image_list, frame_timestamps, rotation_sequence, rotation_timestamps, camera_matrix, readout_time): """Refine a time offset between camera and IMU using rolling shutter aware optimization. To refine the time offset using this function, you must meet the following constraints ...
def create(cls, infile, config=None, params=None, mask=None): """Create a new instance of GTAnalysis from an analysis output file generated with `~fermipy.GTAnalysis.write_roi`. By default the new instance will inherit the configuration of the saved analysis instance. The configuration...
def function[create, parameter[cls, infile, config, params, mask]]: constant[Create a new instance of GTAnalysis from an analysis output file generated with `~fermipy.GTAnalysis.write_roi`. By default the new instance will inherit the configuration of the saved analysis instance. The c...
keyword[def] identifier[create] ( identifier[cls] , identifier[infile] , identifier[config] = keyword[None] , identifier[params] = keyword[None] , identifier[mask] = keyword[None] ): literal[string] identifier[infile] = identifier[os] . identifier[path] . identifier[abspath] ( identifier[infile] )...
def create(cls, infile, config=None, params=None, mask=None): """Create a new instance of GTAnalysis from an analysis output file generated with `~fermipy.GTAnalysis.write_roi`. By default the new instance will inherit the configuration of the saved analysis instance. The configuration may...
def source(self, value=None): """Corresponds to IDD Field `source` Args: value (str): value for IDD Field `source` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError...
def function[source, parameter[self, value]]: constant[Corresponds to IDD Field `source` Args: value (str): value for IDD Field `source` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ...
keyword[def] identifier[source] ( identifier[self] , identifier[value] = keyword[None] ): literal[string] keyword[if] identifier[value] keyword[is] keyword[not] keyword[None] : keyword[try] : identifier[value] = identifier[str] ( identifier[value] ) ke...
def source(self, value=None): """Corresponds to IDD Field `source` Args: value (str): value for IDD Field `source` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if...
def read_py(self, fin_txt, get_goids_only, exclude_ungrouped, prt=sys.stdout): """Read GO IDs or sections data from a Python file.""" goids_fin = self._read_py(fin_txt, get_goids_only, exclude_ungrouped) sections = self._read_finish(goids_fin, prt) # Print summary of GO IDs read ...
def function[read_py, parameter[self, fin_txt, get_goids_only, exclude_ungrouped, prt]]: constant[Read GO IDs or sections data from a Python file.] variable[goids_fin] assign[=] call[name[self]._read_py, parameter[name[fin_txt], name[get_goids_only], name[exclude_ungrouped]]] variable[sections] ...
keyword[def] identifier[read_py] ( identifier[self] , identifier[fin_txt] , identifier[get_goids_only] , identifier[exclude_ungrouped] , identifier[prt] = identifier[sys] . identifier[stdout] ): literal[string] identifier[goids_fin] = identifier[self] . identifier[_read_py] ( identifier[fin_txt] , ...
def read_py(self, fin_txt, get_goids_only, exclude_ungrouped, prt=sys.stdout): """Read GO IDs or sections data from a Python file.""" goids_fin = self._read_py(fin_txt, get_goids_only, exclude_ungrouped) sections = self._read_finish(goids_fin, prt) # Print summary of GO IDs read if prt is not None: ...
def convertDate(date): """Convert DATE string into a decimal year.""" d, t = date.split('T') return decimal_date(d, timeobs=t)
def function[convertDate, parameter[date]]: constant[Convert DATE string into a decimal year.] <ast.Tuple object at 0x7da1b0e3d360> assign[=] call[name[date].split, parameter[constant[T]]] return[call[name[decimal_date], parameter[name[d]]]]
keyword[def] identifier[convertDate] ( identifier[date] ): literal[string] identifier[d] , identifier[t] = identifier[date] . identifier[split] ( literal[string] ) keyword[return] identifier[decimal_date] ( identifier[d] , identifier[timeobs] = identifier[t] )
def convertDate(date): """Convert DATE string into a decimal year.""" (d, t) = date.split('T') return decimal_date(d, timeobs=t)
def trigger_deleted(self, filepath): """Triggers deleted event if the flie doesn't exist.""" if not os.path.exists(filepath): self._trigger('deleted', filepath)
def function[trigger_deleted, parameter[self, filepath]]: constant[Triggers deleted event if the flie doesn't exist.] if <ast.UnaryOp object at 0x7da1b2852650> begin[:] call[name[self]._trigger, parameter[constant[deleted], name[filepath]]]
keyword[def] identifier[trigger_deleted] ( identifier[self] , identifier[filepath] ): literal[string] keyword[if] keyword[not] identifier[os] . identifier[path] . identifier[exists] ( identifier[filepath] ): identifier[self] . identifier[_trigger] ( literal[string] , identifier[filep...
def trigger_deleted(self, filepath): """Triggers deleted event if the flie doesn't exist.""" if not os.path.exists(filepath): self._trigger('deleted', filepath) # depends on [control=['if'], data=[]]
def kelvin_to_fahrenheit(kelvintemp): """ Converts a numeric temperature from Kelvin degrees to Fahrenheit degrees :param kelvintemp: the Kelvin temperature :type kelvintemp: int/long/float :returns: the float Fahrenheit temperature :raises: *TypeError* when bad argument types are provided ...
def function[kelvin_to_fahrenheit, parameter[kelvintemp]]: constant[ Converts a numeric temperature from Kelvin degrees to Fahrenheit degrees :param kelvintemp: the Kelvin temperature :type kelvintemp: int/long/float :returns: the float Fahrenheit temperature :raises: *TypeError* when bad ...
keyword[def] identifier[kelvin_to_fahrenheit] ( identifier[kelvintemp] ): literal[string] keyword[if] identifier[kelvintemp] < literal[int] : keyword[raise] identifier[ValueError] ( identifier[__name__] + literal[string] ) identifier[fahrenheittemp] =( identifier[kelvintemp] - identifier[KE...
def kelvin_to_fahrenheit(kelvintemp): """ Converts a numeric temperature from Kelvin degrees to Fahrenheit degrees :param kelvintemp: the Kelvin temperature :type kelvintemp: int/long/float :returns: the float Fahrenheit temperature :raises: *TypeError* when bad argument types are provided ...
def add_mpl_labels(heatmap_axes, rowlabels, collabels, params): """Add labels to Matplotlib heatmap axes, in-place.""" if params.labels: # If a label mapping is missing, use the key text as fall back rowlabels = [params.labels.get(lab, lab) for lab in rowlabels] collabels = [params.label...
def function[add_mpl_labels, parameter[heatmap_axes, rowlabels, collabels, params]]: constant[Add labels to Matplotlib heatmap axes, in-place.] if name[params].labels begin[:] variable[rowlabels] assign[=] <ast.ListComp object at 0x7da18bcc8460> variable[collabels] assign...
keyword[def] identifier[add_mpl_labels] ( identifier[heatmap_axes] , identifier[rowlabels] , identifier[collabels] , identifier[params] ): literal[string] keyword[if] identifier[params] . identifier[labels] : identifier[rowlabels] =[ identifier[params] . identifier[labels] . identifier[get] ...
def add_mpl_labels(heatmap_axes, rowlabels, collabels, params): """Add labels to Matplotlib heatmap axes, in-place.""" if params.labels: # If a label mapping is missing, use the key text as fall back rowlabels = [params.labels.get(lab, lab) for lab in rowlabels] collabels = [params.label...
def kill_processes(self): """Gets called on shutdown by the timer when too much time has gone by, calling the terminate method instead of nicely asking for the consumers to stop. """ LOGGER.critical('Max shutdown exceeded, forcibly exiting') processes = self.active_proce...
def function[kill_processes, parameter[self]]: constant[Gets called on shutdown by the timer when too much time has gone by, calling the terminate method instead of nicely asking for the consumers to stop. ] call[name[LOGGER].critical, parameter[constant[Max shutdown exceeded, f...
keyword[def] identifier[kill_processes] ( identifier[self] ): literal[string] identifier[LOGGER] . identifier[critical] ( literal[string] ) identifier[processes] = identifier[self] . identifier[active_processes] ( keyword[False] ) keyword[while] identifier[processes] : ...
def kill_processes(self): """Gets called on shutdown by the timer when too much time has gone by, calling the terminate method instead of nicely asking for the consumers to stop. """ LOGGER.critical('Max shutdown exceeded, forcibly exiting') processes = self.active_processes(False) ...