code
stringlengths
75
104k
code_sememe
stringlengths
47
309k
token_type
stringlengths
215
214k
code_dependency
stringlengths
75
155k
def get_corporations(self, roles=["dst"]): """ Args: roles (list, optional): Specify which types of corporations you need. Set to ``["any"]`` for any role, ``["dst"]`` for distributors, etc.. Note: See http://www.loc.gov/marc/relators/...
def function[get_corporations, parameter[self, roles]]: constant[ Args: roles (list, optional): Specify which types of corporations you need. Set to ``["any"]`` for any role, ``["dst"]`` for distributors, etc.. Note: See http://www.loc...
keyword[def] identifier[get_corporations] ( identifier[self] , identifier[roles] =[ literal[string] ]): literal[string] identifier[corporations] = identifier[self] . identifier[_parse_corporations] ( literal[string] , literal[string] , identifier[roles] ) identifier[corporations] += identi...
def get_corporations(self, roles=['dst']): """ Args: roles (list, optional): Specify which types of corporations you need. Set to ``["any"]`` for any role, ``["dst"]`` for distributors, etc.. Note: See http://www.loc.gov/marc/relators/rela...
def field2write_only(self, field, **kwargs): """Return the dictionary of OpenAPI field attributes for a load_only field. :param Field field: A marshmallow field. :rtype: dict """ attributes = {} if field.load_only and self.openapi_version.major >= 3: attribut...
def function[field2write_only, parameter[self, field]]: constant[Return the dictionary of OpenAPI field attributes for a load_only field. :param Field field: A marshmallow field. :rtype: dict ] variable[attributes] assign[=] dictionary[[], []] if <ast.BoolOp object at 0x...
keyword[def] identifier[field2write_only] ( identifier[self] , identifier[field] ,** identifier[kwargs] ): literal[string] identifier[attributes] ={} keyword[if] identifier[field] . identifier[load_only] keyword[and] identifier[self] . identifier[openapi_version] . identifier[major] >= ...
def field2write_only(self, field, **kwargs): """Return the dictionary of OpenAPI field attributes for a load_only field. :param Field field: A marshmallow field. :rtype: dict """ attributes = {} if field.load_only and self.openapi_version.major >= 3: attributes['writeOnly'] ...
def check_all_types(src_dict, sinks, sourceField): # type: (Dict[Text, Any], List[Dict[Text, Any]], Text) -> Dict[Text, List[SrcSink]] # sourceField is either "soure" or "outputSource" """Given a list of sinks, check if their types match with the types of their sources. """ validation = {"warning":...
def function[check_all_types, parameter[src_dict, sinks, sourceField]]: constant[Given a list of sinks, check if their types match with the types of their sources. ] variable[validation] assign[=] dictionary[[<ast.Constant object at 0x7da18f810d60>, <ast.Constant object at 0x7da18f8113c0>], [<ast.Li...
keyword[def] identifier[check_all_types] ( identifier[src_dict] , identifier[sinks] , identifier[sourceField] ): literal[string] identifier[validation] ={ literal[string] :[], literal[string] :[]} keyword[for] identifier[sink] keyword[in] identifier[sinks] : keyword[if] identifier[sour...
def check_all_types(src_dict, sinks, sourceField): # type: (Dict[Text, Any], List[Dict[Text, Any]], Text) -> Dict[Text, List[SrcSink]] # sourceField is either "soure" or "outputSource" 'Given a list of sinks, check if their types match with the types of their sources.\n ' validation = {'warning': [],...
def visit_table(self, layout): """display a table as text""" table_content = self.get_table_content(layout) # get columns width cols_width = [0] * len(table_content[0]) for row in table_content: for index, col in enumerate(row): cols_width[index] = max...
def function[visit_table, parameter[self, layout]]: constant[display a table as text] variable[table_content] assign[=] call[name[self].get_table_content, parameter[name[layout]]] variable[cols_width] assign[=] binary_operation[list[[<ast.Constant object at 0x7da1b024c700>]] * call[name[len], pa...
keyword[def] identifier[visit_table] ( identifier[self] , identifier[layout] ): literal[string] identifier[table_content] = identifier[self] . identifier[get_table_content] ( identifier[layout] ) identifier[cols_width] =[ literal[int] ]* identifier[len] ( identifier[table_content]...
def visit_table(self, layout): """display a table as text""" table_content = self.get_table_content(layout) # get columns width cols_width = [0] * len(table_content[0]) for row in table_content: for (index, col) in enumerate(row): cols_width[index] = max(cols_width[index], len(co...
def _array_newton(func, x0, fprime, args, tol, maxiter, fprime2, converged=False): """ A vectorized version of Newton, Halley, and secant methods for arrays. Do not use this method directly. This method is called from :func:`newton` when ``np.isscalar(x0)`` is true. For docstring, see ...
def function[_array_newton, parameter[func, x0, fprime, args, tol, maxiter, fprime2, converged]]: constant[ A vectorized version of Newton, Halley, and secant methods for arrays. Do not use this method directly. This method is called from :func:`newton` when ``np.isscalar(x0)`` is true. For docstrin...
keyword[def] identifier[_array_newton] ( identifier[func] , identifier[x0] , identifier[fprime] , identifier[args] , identifier[tol] , identifier[maxiter] , identifier[fprime2] , identifier[converged] = keyword[False] ): literal[string] keyword[try] : identifier[p] = identifier[np] . identifier[a...
def _array_newton(func, x0, fprime, args, tol, maxiter, fprime2, converged=False): """ A vectorized version of Newton, Halley, and secant methods for arrays. Do not use this method directly. This method is called from :func:`newton` when ``np.isscalar(x0)`` is true. For docstring, see :func:`newton`. ...
def _parse_supybot_msg(self, line): """Parse message section""" patterns = [(self.SUPYBOT_COMMENT_REGEX, self.TCOMMENT), (self.SUPYBOT_COMMENT_ACTION_REGEX, self.TCOMMENT), (self.SUPYBOT_SERVER_REGEX, self.TSERVER), (self.SUPYBOT_BOT_REGEX, se...
def function[_parse_supybot_msg, parameter[self, line]]: constant[Parse message section] variable[patterns] assign[=] list[[<ast.Tuple object at 0x7da1b0381180>, <ast.Tuple object at 0x7da1b03827d0>, <ast.Tuple object at 0x7da1b0380850>, <ast.Tuple object at 0x7da1b0316350>]] for taget[name[p]] ...
keyword[def] identifier[_parse_supybot_msg] ( identifier[self] , identifier[line] ): literal[string] identifier[patterns] =[( identifier[self] . identifier[SUPYBOT_COMMENT_REGEX] , identifier[self] . identifier[TCOMMENT] ), ( identifier[self] . identifier[SUPYBOT_COMMENT_ACTION_REGEX] , id...
def _parse_supybot_msg(self, line): """Parse message section""" patterns = [(self.SUPYBOT_COMMENT_REGEX, self.TCOMMENT), (self.SUPYBOT_COMMENT_ACTION_REGEX, self.TCOMMENT), (self.SUPYBOT_SERVER_REGEX, self.TSERVER), (self.SUPYBOT_BOT_REGEX, self.TCOMMENT)] for p in patterns: m = p[0].match(line) ...
def utf8(value): """Converts a string argument to a byte string. If the argument is already a byte string or None, it is returned unchanged. Otherwise it must be a unicode string and is encoded as utf8. """ if isinstance(value, _UTF8_TYPES): return value if not isinstance(value, unicode...
def function[utf8, parameter[value]]: constant[Converts a string argument to a byte string. If the argument is already a byte string or None, it is returned unchanged. Otherwise it must be a unicode string and is encoded as utf8. ] if call[name[isinstance], parameter[name[value], name[_UTF8...
keyword[def] identifier[utf8] ( identifier[value] ): literal[string] keyword[if] identifier[isinstance] ( identifier[value] , identifier[_UTF8_TYPES] ): keyword[return] identifier[value] keyword[if] keyword[not] identifier[isinstance] ( identifier[value] , identifier[unicode_type] ): ...
def utf8(value): """Converts a string argument to a byte string. If the argument is already a byte string or None, it is returned unchanged. Otherwise it must be a unicode string and is encoded as utf8. """ if isinstance(value, _UTF8_TYPES): return value # depends on [control=['if'], data=...
def add(self, alias: str, config: dict) -> None: """ Add a cache to the current config. If the key already exists, it will overwrite it:: >>> caches.add('default', { 'cache': "aiocache.SimpleMemoryCache", 'serializer': { ...
def function[add, parameter[self, alias, config]]: constant[ Add a cache to the current config. If the key already exists, it will overwrite it:: >>> caches.add('default', { 'cache': "aiocache.SimpleMemoryCache", 'serializer': { ...
keyword[def] identifier[add] ( identifier[self] , identifier[alias] : identifier[str] , identifier[config] : identifier[dict] )-> keyword[None] : literal[string] identifier[self] . identifier[_config] [ identifier[alias] ]= identifier[config]
def add(self, alias: str, config: dict) -> None: """ Add a cache to the current config. If the key already exists, it will overwrite it:: >>> caches.add('default', { 'cache': "aiocache.SimpleMemoryCache", 'serializer': { 'c...
def serialize_database(metamodel): ''' Serialize all instances, class definitions, association definitions, and unique identifiers in a *metamodel*. ''' schema = serialize_schema(metamodel) instances = serialize_instances(metamodel) identifiers = serialize_unique_identifiers(metamodel) ...
def function[serialize_database, parameter[metamodel]]: constant[ Serialize all instances, class definitions, association definitions, and unique identifiers in a *metamodel*. ] variable[schema] assign[=] call[name[serialize_schema], parameter[name[metamodel]]] variable[instances] a...
keyword[def] identifier[serialize_database] ( identifier[metamodel] ): literal[string] identifier[schema] = identifier[serialize_schema] ( identifier[metamodel] ) identifier[instances] = identifier[serialize_instances] ( identifier[metamodel] ) identifier[identifiers] = identifier[serialize_uniqu...
def serialize_database(metamodel): """ Serialize all instances, class definitions, association definitions, and unique identifiers in a *metamodel*. """ schema = serialize_schema(metamodel) instances = serialize_instances(metamodel) identifiers = serialize_unique_identifiers(metamodel) ...
def networkproperties(self): """Print out some properties of the network defined by the |Node| and |Element| objects currently handled by the |HydPy| object.""" print('Number of nodes: %d' % len(self.nodes)) print('Number of elements: %d' % len(self.elements)) print('Number of en...
def function[networkproperties, parameter[self]]: constant[Print out some properties of the network defined by the |Node| and |Element| objects currently handled by the |HydPy| object.] call[name[print], parameter[binary_operation[constant[Number of nodes: %d] <ast.Mod object at 0x7da2590d6920> ...
keyword[def] identifier[networkproperties] ( identifier[self] ): literal[string] identifier[print] ( literal[string] % identifier[len] ( identifier[self] . identifier[nodes] )) identifier[print] ( literal[string] % identifier[len] ( identifier[self] . identifier[elements] )) ident...
def networkproperties(self): """Print out some properties of the network defined by the |Node| and |Element| objects currently handled by the |HydPy| object.""" print('Number of nodes: %d' % len(self.nodes)) print('Number of elements: %d' % len(self.elements)) print('Number of end nodes: %d' % l...
def _attachToObject(self, anchorObj, relationName) : "Attaches the rabalist to a raba object. Only attached rabalists can be saved" if self.anchorObj == None : self.relationName = relationName self.anchorObj = anchorObj self._setNamespaceConAndConf(anchorObj._rabaClass._raba_namespace) self.tableName =...
def function[_attachToObject, parameter[self, anchorObj, relationName]]: constant[Attaches the rabalist to a raba object. Only attached rabalists can be saved] if compare[name[self].anchorObj equal[==] constant[None]] begin[:] name[self].relationName assign[=] name[relationName] ...
keyword[def] identifier[_attachToObject] ( identifier[self] , identifier[anchorObj] , identifier[relationName] ): literal[string] keyword[if] identifier[self] . identifier[anchorObj] == keyword[None] : identifier[self] . identifier[relationName] = identifier[relationName] identifier[self] . identifie...
def _attachToObject(self, anchorObj, relationName): """Attaches the rabalist to a raba object. Only attached rabalists can be saved""" if self.anchorObj == None: self.relationName = relationName self.anchorObj = anchorObj self._setNamespaceConAndConf(anchorObj._rabaClass._raba_namespace...
def send_template_email(recipients, title_template, body_template, context, language): """Sends e-mail using templating system""" send_emails = getattr(settings, 'SEND_PLANS_EMAILS', True) if not send_emails: return site_name = getattr(settings, 'SITE_NAME', 'Please define settings.SITE_NAME')...
def function[send_template_email, parameter[recipients, title_template, body_template, context, language]]: constant[Sends e-mail using templating system] variable[send_emails] assign[=] call[name[getattr], parameter[name[settings], constant[SEND_PLANS_EMAILS], constant[True]]] if <ast.UnaryOp o...
keyword[def] identifier[send_template_email] ( identifier[recipients] , identifier[title_template] , identifier[body_template] , identifier[context] , identifier[language] ): literal[string] identifier[send_emails] = identifier[getattr] ( identifier[settings] , literal[string] , keyword[True] ) keywo...
def send_template_email(recipients, title_template, body_template, context, language): """Sends e-mail using templating system""" send_emails = getattr(settings, 'SEND_PLANS_EMAILS', True) if not send_emails: return # depends on [control=['if'], data=[]] site_name = getattr(settings, 'SITE_NAME...
def from_molecule(cls, molecule, labels=None): """Initialize a similarity descriptor Arguments: molecule -- a Molecules object labels -- a list with integer labels used to identify atoms of the same type. When not given, the atom numbers from ...
def function[from_molecule, parameter[cls, molecule, labels]]: constant[Initialize a similarity descriptor Arguments: molecule -- a Molecules object labels -- a list with integer labels used to identify atoms of the same type. When not given, th...
keyword[def] identifier[from_molecule] ( identifier[cls] , identifier[molecule] , identifier[labels] = keyword[None] ): literal[string] keyword[if] identifier[labels] keyword[is] keyword[None] : identifier[labels] = identifier[molecule] . identifier[numbers] keyword[return...
def from_molecule(cls, molecule, labels=None): """Initialize a similarity descriptor Arguments: molecule -- a Molecules object labels -- a list with integer labels used to identify atoms of the same type. When not given, the atom numbers from ...
def _merge_values(self): """ Simply merge the older into the new one. """ to_remove = [] self.new_config = Dict( Dict(self.upstream_config).merge(PyFunceble.CONFIGURATION) ).remove_key(to_remove)
def function[_merge_values, parameter[self]]: constant[ Simply merge the older into the new one. ] variable[to_remove] assign[=] list[[]] name[self].new_config assign[=] call[call[name[Dict], parameter[call[call[name[Dict], parameter[name[self].upstream_config]].merge, parameter[...
keyword[def] identifier[_merge_values] ( identifier[self] ): literal[string] identifier[to_remove] =[] identifier[self] . identifier[new_config] = identifier[Dict] ( identifier[Dict] ( identifier[self] . identifier[upstream_config] ). identifier[merge] ( identifier[PyFunceble] ....
def _merge_values(self): """ Simply merge the older into the new one. """ to_remove = [] self.new_config = Dict(Dict(self.upstream_config).merge(PyFunceble.CONFIGURATION)).remove_key(to_remove)
def all(self): """Get all ObjectRocket instances the current client has access to. :returns: A list of :py:class:`bases.BaseInstance` instances. :rtype: list """ response = requests.get(self._url, **self._default_request_kwargs) data = self._get_response_data(response) ...
def function[all, parameter[self]]: constant[Get all ObjectRocket instances the current client has access to. :returns: A list of :py:class:`bases.BaseInstance` instances. :rtype: list ] variable[response] assign[=] call[name[requests].get, parameter[name[self]._url]] va...
keyword[def] identifier[all] ( identifier[self] ): literal[string] identifier[response] = identifier[requests] . identifier[get] ( identifier[self] . identifier[_url] ,** identifier[self] . identifier[_default_request_kwargs] ) identifier[data] = identifier[self] . identifier[_get_response...
def all(self): """Get all ObjectRocket instances the current client has access to. :returns: A list of :py:class:`bases.BaseInstance` instances. :rtype: list """ response = requests.get(self._url, **self._default_request_kwargs) data = self._get_response_data(response) return se...
def get_ascii(self, show_internal=True, compact=False, attributes=None): """ Returns a string containing an ascii drawing of the tree. Parameters: ----------- show_internal: include internal edge names. compact: use exactly one line per ...
def function[get_ascii, parameter[self, show_internal, compact, attributes]]: constant[ Returns a string containing an ascii drawing of the tree. Parameters: ----------- show_internal: include internal edge names. compact: use exactly on...
keyword[def] identifier[get_ascii] ( identifier[self] , identifier[show_internal] = keyword[True] , identifier[compact] = keyword[False] , identifier[attributes] = keyword[None] ): literal[string] ( identifier[lines] , identifier[mid] )= identifier[self] . identifier[_asciiArt] ( identifier[show_int...
def get_ascii(self, show_internal=True, compact=False, attributes=None): """ Returns a string containing an ascii drawing of the tree. Parameters: ----------- show_internal: include internal edge names. compact: use exactly one line per tip....
def get_subscription(self, subscription_id, query_flags=None): """GetSubscription. [Preview API] Get a notification subscription by its ID. :param str subscription_id: :param str query_flags: :rtype: :class:`<NotificationSubscription> <azure.devops.v5_0.notification.models.Notifi...
def function[get_subscription, parameter[self, subscription_id, query_flags]]: constant[GetSubscription. [Preview API] Get a notification subscription by its ID. :param str subscription_id: :param str query_flags: :rtype: :class:`<NotificationSubscription> <azure.devops.v5_0.noti...
keyword[def] identifier[get_subscription] ( identifier[self] , identifier[subscription_id] , identifier[query_flags] = keyword[None] ): literal[string] identifier[route_values] ={} keyword[if] identifier[subscription_id] keyword[is] keyword[not] keyword[None] : identifier[...
def get_subscription(self, subscription_id, query_flags=None): """GetSubscription. [Preview API] Get a notification subscription by its ID. :param str subscription_id: :param str query_flags: :rtype: :class:`<NotificationSubscription> <azure.devops.v5_0.notification.models.Notificati...
def connect(self, params): """Connect to the specified AP.""" self._logger.info("iface '%s' connects to AP: '%s'", self.name(), params.ssid) self._wifi_ctrl.connect(self._raw_obj, params)
def function[connect, parameter[self, params]]: constant[Connect to the specified AP.] call[name[self]._logger.info, parameter[constant[iface '%s' connects to AP: '%s'], call[name[self].name, parameter[]], name[params].ssid]] call[name[self]._wifi_ctrl.connect, parameter[name[self]._raw_obj, nam...
keyword[def] identifier[connect] ( identifier[self] , identifier[params] ): literal[string] identifier[self] . identifier[_logger] . identifier[info] ( literal[string] , identifier[self] . identifier[name] (), identifier[params] . identifier[ssid] ) identifier[self] . identifier...
def connect(self, params): """Connect to the specified AP.""" self._logger.info("iface '%s' connects to AP: '%s'", self.name(), params.ssid) self._wifi_ctrl.connect(self._raw_obj, params)
def get_client_ip(environ): # type: (Dict[str, str]) -> Optional[Any] """ Infer the user IP address from various headers. This cannot be used in security sensitive situations since the value may be forged from a client, but it's good enough for the event payload. """ try: return envi...
def function[get_client_ip, parameter[environ]]: constant[ Infer the user IP address from various headers. This cannot be used in security sensitive situations since the value may be forged from a client, but it's good enough for the event payload. ] <ast.Try object at 0x7da1b18aec20> <a...
keyword[def] identifier[get_client_ip] ( identifier[environ] ): literal[string] keyword[try] : keyword[return] identifier[environ] [ literal[string] ]. identifier[split] ( literal[string] )[ literal[int] ]. identifier[strip] () keyword[except] ( identifier[KeyError] , identifier[IndexError]...
def get_client_ip(environ): # type: (Dict[str, str]) -> Optional[Any] "\n Infer the user IP address from various headers. This cannot be used in\n security sensitive situations since the value may be forged from a client,\n but it's good enough for the event payload.\n " try: return envi...
def sync_connect(self): """Close the Mill connection.""" loop = asyncio.get_event_loop() task = loop.create_task(self.connect()) loop.run_until_complete(task)
def function[sync_connect, parameter[self]]: constant[Close the Mill connection.] variable[loop] assign[=] call[name[asyncio].get_event_loop, parameter[]] variable[task] assign[=] call[name[loop].create_task, parameter[call[name[self].connect, parameter[]]]] call[name[loop].run_until_com...
keyword[def] identifier[sync_connect] ( identifier[self] ): literal[string] identifier[loop] = identifier[asyncio] . identifier[get_event_loop] () identifier[task] = identifier[loop] . identifier[create_task] ( identifier[self] . identifier[connect] ()) identifier[loop] . identifi...
def sync_connect(self): """Close the Mill connection.""" loop = asyncio.get_event_loop() task = loop.create_task(self.connect()) loop.run_until_complete(task)
def setSystemVariable(self, remote, name, value): """Set a system variable on CCU / Homegear""" if self._server is not None: return self._server.setSystemVariable(remote, name, value)
def function[setSystemVariable, parameter[self, remote, name, value]]: constant[Set a system variable on CCU / Homegear] if compare[name[self]._server is_not constant[None]] begin[:] return[call[name[self]._server.setSystemVariable, parameter[name[remote], name[name], name[value]]]]
keyword[def] identifier[setSystemVariable] ( identifier[self] , identifier[remote] , identifier[name] , identifier[value] ): literal[string] keyword[if] identifier[self] . identifier[_server] keyword[is] keyword[not] keyword[None] : keyword[return] identifier[self] . identifier[_s...
def setSystemVariable(self, remote, name, value): """Set a system variable on CCU / Homegear""" if self._server is not None: return self._server.setSystemVariable(remote, name, value) # depends on [control=['if'], data=[]]
def write_resource_list( self, paths=None, outfile=None, links=None, dump=None): """Write a Resource List or a Resource Dump for files on local disk. Set of resources included is based on paths setting or else the mappings. Optionally links can be added. Output will be to stdout unl...
def function[write_resource_list, parameter[self, paths, outfile, links, dump]]: constant[Write a Resource List or a Resource Dump for files on local disk. Set of resources included is based on paths setting or else the mappings. Optionally links can be added. Output will be to stdout unless ou...
keyword[def] identifier[write_resource_list] ( identifier[self] , identifier[paths] = keyword[None] , identifier[outfile] = keyword[None] , identifier[links] = keyword[None] , identifier[dump] = keyword[None] ): literal[string] identifier[rl] = identifier[self] . identifier[build_resource_list] ( ...
def write_resource_list(self, paths=None, outfile=None, links=None, dump=None): """Write a Resource List or a Resource Dump for files on local disk. Set of resources included is based on paths setting or else the mappings. Optionally links can be added. Output will be to stdout unless outfile ...
def _unicode(self): '''This returns a printable representation of the screen as a unicode string (which, under Python 3.x, is the same as 'str'). The end of each screen line is terminated by a newline.''' return u'\n'.join ([ u''.join(c) for c in self.w ])
def function[_unicode, parameter[self]]: constant[This returns a printable representation of the screen as a unicode string (which, under Python 3.x, is the same as 'str'). The end of each screen line is terminated by a newline.] return[call[constant[ ].join, parameter[<ast.ListComp object a...
keyword[def] identifier[_unicode] ( identifier[self] ): literal[string] keyword[return] literal[string] . identifier[join] ([ literal[string] . identifier[join] ( identifier[c] ) keyword[for] identifier[c] keyword[in] identifier[self] . identifier[w] ])
def _unicode(self): """This returns a printable representation of the screen as a unicode string (which, under Python 3.x, is the same as 'str'). The end of each screen line is terminated by a newline.""" return u'\n'.join([u''.join(c) for c in self.w])
def _maybe_clear_confirmation_futures(self): """Invoked when the message has finished processing, ensuring there are no confirmation futures pending. """ for name in self._connections.keys(): self._connections[name].clear_confirmation_futures()
def function[_maybe_clear_confirmation_futures, parameter[self]]: constant[Invoked when the message has finished processing, ensuring there are no confirmation futures pending. ] for taget[name[name]] in starred[call[name[self]._connections.keys, parameter[]]] begin[:] c...
keyword[def] identifier[_maybe_clear_confirmation_futures] ( identifier[self] ): literal[string] keyword[for] identifier[name] keyword[in] identifier[self] . identifier[_connections] . identifier[keys] (): identifier[self] . identifier[_connections] [ identifier[name] ]. identifier[...
def _maybe_clear_confirmation_futures(self): """Invoked when the message has finished processing, ensuring there are no confirmation futures pending. """ for name in self._connections.keys(): self._connections[name].clear_confirmation_futures() # depends on [control=['for'], data=['nam...
def updateObj(self, event): """Put this object in the search box""" name = self.objList.get("active") self.SearchVar.set(name) self.object_info.set(str(self.kbos.get(name, ''))) return
def function[updateObj, parameter[self, event]]: constant[Put this object in the search box] variable[name] assign[=] call[name[self].objList.get, parameter[constant[active]]] call[name[self].SearchVar.set, parameter[name[name]]] call[name[self].object_info.set, parameter[call[name[str],...
keyword[def] identifier[updateObj] ( identifier[self] , identifier[event] ): literal[string] identifier[name] = identifier[self] . identifier[objList] . identifier[get] ( literal[string] ) identifier[self] . identifier[SearchVar] . identifier[set] ( identifier[name] ) identifier[...
def updateObj(self, event): """Put this object in the search box""" name = self.objList.get('active') self.SearchVar.set(name) self.object_info.set(str(self.kbos.get(name, ''))) return
def compact(db_spec, poll_interval=0): """ Compact a CouchDB database with optional synchronicity. The ``compact`` function will compact a CouchDB database stored on an running CouchDB server. By default, this process occurs *asynchronously*, meaning that the compaction will occur in the b...
def function[compact, parameter[db_spec, poll_interval]]: constant[ Compact a CouchDB database with optional synchronicity. The ``compact`` function will compact a CouchDB database stored on an running CouchDB server. By default, this process occurs *asynchronously*, meaning that the compac...
keyword[def] identifier[compact] ( identifier[db_spec] , identifier[poll_interval] = literal[int] ): literal[string] identifier[server] = identifier[get_server_from_specifier] ( identifier[db_spec] ) identifier[db] = identifier[get_db_from_specifier] ( identifier[db_spec] ) identifier[logg...
def compact(db_spec, poll_interval=0): """ Compact a CouchDB database with optional synchronicity. The ``compact`` function will compact a CouchDB database stored on an running CouchDB server. By default, this process occurs *asynchronously*, meaning that the compaction will occur in the backgr...
def autoscale_subplots(subplots=None, axis='both'): """ Sets the x and y axis limits for each subplot to match the x and y axis limits of the most extreme data points encountered. The limits are set to the same values for all subplots. Parameters ----------- subplots : ndarray or list of m...
def function[autoscale_subplots, parameter[subplots, axis]]: constant[ Sets the x and y axis limits for each subplot to match the x and y axis limits of the most extreme data points encountered. The limits are set to the same values for all subplots. Parameters ----------- subplots : n...
keyword[def] identifier[autoscale_subplots] ( identifier[subplots] = keyword[None] , identifier[axis] = literal[string] ): literal[string] identifier[axis_options] =( literal[string] , literal[string] , literal[string] , literal[string] , literal[string] , literal[string] , literal[string] ) keyword[i...
def autoscale_subplots(subplots=None, axis='both'): """ Sets the x and y axis limits for each subplot to match the x and y axis limits of the most extreme data points encountered. The limits are set to the same values for all subplots. Parameters ----------- subplots : ndarray or list of m...
def _function(self): """ This is the actual function that will be executed. It uses only information that is provided in the settings property will be overwritten in the __init__ """ plant = self.instruments['plant']['instance'] controler = self.instruments['controler']['...
def function[_function, parameter[self]]: constant[ This is the actual function that will be executed. It uses only information that is provided in the settings property will be overwritten in the __init__ ] variable[plant] assign[=] call[call[name[self].instruments][constant[pla...
keyword[def] identifier[_function] ( identifier[self] ): literal[string] identifier[plant] = identifier[self] . identifier[instruments] [ literal[string] ][ literal[string] ] identifier[controler] = identifier[self] . identifier[instruments] [ literal[string] ][ literal[string] ] ...
def _function(self): """ This is the actual function that will be executed. It uses only information that is provided in the settings property will be overwritten in the __init__ """ plant = self.instruments['plant']['instance'] controler = self.instruments['controler']['instance'] ...
def simxGetObjectSelection(clientID, operationMode): ''' Please have a look at the function description/documentation in the V-REP user manual ''' objectCount = ct.c_int() objectHandles = ct.POINTER(ct.c_int)() ret = c_GetObjectSelection(clientID, ct.byref(objectHandles), ct.byref(objectCount)...
def function[simxGetObjectSelection, parameter[clientID, operationMode]]: constant[ Please have a look at the function description/documentation in the V-REP user manual ] variable[objectCount] assign[=] call[name[ct].c_int, parameter[]] variable[objectHandles] assign[=] call[call[name[c...
keyword[def] identifier[simxGetObjectSelection] ( identifier[clientID] , identifier[operationMode] ): literal[string] identifier[objectCount] = identifier[ct] . identifier[c_int] () identifier[objectHandles] = identifier[ct] . identifier[POINTER] ( identifier[ct] . identifier[c_int] )() identifie...
def simxGetObjectSelection(clientID, operationMode): """ Please have a look at the function description/documentation in the V-REP user manual """ objectCount = ct.c_int() objectHandles = ct.POINTER(ct.c_int)() ret = c_GetObjectSelection(clientID, ct.byref(objectHandles), ct.byref(objectCount), ...
def file_upload(object_id, input_params={}, always_retry=True, **kwargs): """ Invokes the /file-xxxx/upload API method. For more info, see: https://wiki.dnanexus.com/API-Specification-v1.0.0/Files#API-method%3A-%2Ffile-xxxx%2Fupload """ return DXHTTPRequest('/%s/upload' % object_id, input_params, a...
def function[file_upload, parameter[object_id, input_params, always_retry]]: constant[ Invokes the /file-xxxx/upload API method. For more info, see: https://wiki.dnanexus.com/API-Specification-v1.0.0/Files#API-method%3A-%2Ffile-xxxx%2Fupload ] return[call[name[DXHTTPRequest], parameter[binary_o...
keyword[def] identifier[file_upload] ( identifier[object_id] , identifier[input_params] ={}, identifier[always_retry] = keyword[True] ,** identifier[kwargs] ): literal[string] keyword[return] identifier[DXHTTPRequest] ( literal[string] % identifier[object_id] , identifier[input_params] , identifier[always...
def file_upload(object_id, input_params={}, always_retry=True, **kwargs): """ Invokes the /file-xxxx/upload API method. For more info, see: https://wiki.dnanexus.com/API-Specification-v1.0.0/Files#API-method%3A-%2Ffile-xxxx%2Fupload """ return DXHTTPRequest('/%s/upload' % object_id, input_params, a...
def pivot(self, speed, durationS=-1.0): """ pivot() controls the pivot speed of the RedBot. The values of the pivot function inputs range from -255:255, with -255 indicating a full speed counter-clockwise rotation. 255 indicates a full speed clockwise rotation """ ...
def function[pivot, parameter[self, speed, durationS]]: constant[ pivot() controls the pivot speed of the RedBot. The values of the pivot function inputs range from -255:255, with -255 indicating a full speed counter-clockwise rotation. 255 indicates a full speed clockwise ro...
keyword[def] identifier[pivot] ( identifier[self] , identifier[speed] , identifier[durationS] =- literal[int] ): literal[string] keyword[if] identifier[speed] < literal[int] : identifier[self] . identifier[left_fwd] ( identifier[min] ( identifier[abs] ( identifier[speed] ), literal[in...
def pivot(self, speed, durationS=-1.0): """ pivot() controls the pivot speed of the RedBot. The values of the pivot function inputs range from -255:255, with -255 indicating a full speed counter-clockwise rotation. 255 indicates a full speed clockwise rotation """ if ...
def pycomplex(v_str): """Convert string repr of Fortran complex to Python complex.""" assert isinstance(v_str, str) if v_str[0] == '(' and v_str[-1] == ')' and len(v_str.split(',')) == 2: v_re, v_im = v_str[1:-1].split(',', 1) # NOTE: Failed float(str) will raise ValueError return ...
def function[pycomplex, parameter[v_str]]: constant[Convert string repr of Fortran complex to Python complex.] assert[call[name[isinstance], parameter[name[v_str], name[str]]]] if <ast.BoolOp object at 0x7da1b039a440> begin[:] <ast.Tuple object at 0x7da1b0399cc0> assign[=] call[call[...
keyword[def] identifier[pycomplex] ( identifier[v_str] ): literal[string] keyword[assert] identifier[isinstance] ( identifier[v_str] , identifier[str] ) keyword[if] identifier[v_str] [ literal[int] ]== literal[string] keyword[and] identifier[v_str] [- literal[int] ]== literal[string] keyword[and...
def pycomplex(v_str): """Convert string repr of Fortran complex to Python complex.""" assert isinstance(v_str, str) if v_str[0] == '(' and v_str[-1] == ')' and (len(v_str.split(',')) == 2): (v_re, v_im) = v_str[1:-1].split(',', 1) # NOTE: Failed float(str) will raise ValueError retur...
def tostring(self, root=None, doctype=None, pretty_print=True): """return the content of the XML document as a unicode string""" if root is None: root = self.root return etree.tounicode( root, doctype=doctype or self.info.doctype, pretty_print=pretty_print )
def function[tostring, parameter[self, root, doctype, pretty_print]]: constant[return the content of the XML document as a unicode string] if compare[name[root] is constant[None]] begin[:] variable[root] assign[=] name[self].root return[call[name[etree].tounicode, parameter[name[root...
keyword[def] identifier[tostring] ( identifier[self] , identifier[root] = keyword[None] , identifier[doctype] = keyword[None] , identifier[pretty_print] = keyword[True] ): literal[string] keyword[if] identifier[root] keyword[is] keyword[None] : identifier[root] = identifier[self]...
def tostring(self, root=None, doctype=None, pretty_print=True): """return the content of the XML document as a unicode string""" if root is None: root = self.root # depends on [control=['if'], data=['root']] return etree.tounicode(root, doctype=doctype or self.info.doctype, pretty_print=pretty_prin...
def get_template_names(self): """Switch the templates for Ajax requests.""" request = self.request key = 'querystring_key' querystring_key = request.GET.get(key, request.POST.get(key, PAGE_LABEL)) if request.is_ajax() and querystring_key == self.key: retur...
def function[get_template_names, parameter[self]]: constant[Switch the templates for Ajax requests.] variable[request] assign[=] name[self].request variable[key] assign[=] constant[querystring_key] variable[querystring_key] assign[=] call[name[request].GET.get, parameter[name[key], call[...
keyword[def] identifier[get_template_names] ( identifier[self] ): literal[string] identifier[request] = identifier[self] . identifier[request] identifier[key] = literal[string] identifier[querystring_key] = identifier[request] . identifier[GET] . identifier[get] ( identifier[key...
def get_template_names(self): """Switch the templates for Ajax requests.""" request = self.request key = 'querystring_key' querystring_key = request.GET.get(key, request.POST.get(key, PAGE_LABEL)) if request.is_ajax() and querystring_key == self.key: return [self.page_template or self.get_pa...
def mad(arr): """ Median Absolute Deviation: a "Robust" version of standard deviation. Indices variabililty of the sample. https://en.wikipedia.org/wiki/Median_absolute_deviation """ arr = np.ma.array(arr).compressed() # should be faster to not use masked arrays. med = np.median(arr) ...
def function[mad, parameter[arr]]: constant[ Median Absolute Deviation: a "Robust" version of standard deviation. Indices variabililty of the sample. https://en.wikipedia.org/wiki/Median_absolute_deviation ] variable[arr] assign[=] call[call[name[np].ma.array, parameter[name[arr]]]....
keyword[def] identifier[mad] ( identifier[arr] ): literal[string] identifier[arr] = identifier[np] . identifier[ma] . identifier[array] ( identifier[arr] ). identifier[compressed] () identifier[med] = identifier[np] . identifier[median] ( identifier[arr] ) keyword[return] identifier[np] . identi...
def mad(arr): """ Median Absolute Deviation: a "Robust" version of standard deviation. Indices variabililty of the sample. https://en.wikipedia.org/wiki/Median_absolute_deviation """ arr = np.ma.array(arr).compressed() # should be faster to not use masked arrays. med = np.median(arr) ...
def delete_service_certificate(kwargs=None, conn=None, call=None): ''' .. versionadded:: 2015.8.0 Delete a specific certificate associated with the service CLI Examples: .. code-block:: bash salt-cloud -f delete_service_certificate my-azure name=my_service_certificate \\ thum...
def function[delete_service_certificate, parameter[kwargs, conn, call]]: constant[ .. versionadded:: 2015.8.0 Delete a specific certificate associated with the service CLI Examples: .. code-block:: bash salt-cloud -f delete_service_certificate my-azure name=my_service_certificate \ ...
keyword[def] identifier[delete_service_certificate] ( identifier[kwargs] = keyword[None] , identifier[conn] = keyword[None] , identifier[call] = keyword[None] ): literal[string] keyword[if] identifier[call] != literal[string] : keyword[raise] identifier[SaltCloudSystemExit] ( literal[st...
def delete_service_certificate(kwargs=None, conn=None, call=None): """ .. versionadded:: 2015.8.0 Delete a specific certificate associated with the service CLI Examples: .. code-block:: bash salt-cloud -f delete_service_certificate my-azure name=my_service_certificate \\ thum...
def preprocess(self, image): """ Provides a preprocessing facility (which may be overridden) whereby the supplied image is rotated according to the device's rotate capability. If this method is overridden, it is important to call the ``super`` method. :param image: An image to p...
def function[preprocess, parameter[self, image]]: constant[ Provides a preprocessing facility (which may be overridden) whereby the supplied image is rotated according to the device's rotate capability. If this method is overridden, it is important to call the ``super`` method. ...
keyword[def] identifier[preprocess] ( identifier[self] , identifier[image] ): literal[string] keyword[if] identifier[self] . identifier[rotate] == literal[int] : keyword[return] identifier[image] identifier[angle] = identifier[self] . identifier[rotate] *- literal[int] ...
def preprocess(self, image): """ Provides a preprocessing facility (which may be overridden) whereby the supplied image is rotated according to the device's rotate capability. If this method is overridden, it is important to call the ``super`` method. :param image: An image to pre-p...
def _has_changed(self, initial, data): """Need to be reimplemented to be correct.""" if data == initial: return False return bool(initial) != bool(data)
def function[_has_changed, parameter[self, initial, data]]: constant[Need to be reimplemented to be correct.] if compare[name[data] equal[==] name[initial]] begin[:] return[constant[False]] return[compare[call[name[bool], parameter[name[initial]]] not_equal[!=] call[name[bool], parameter[nam...
keyword[def] identifier[_has_changed] ( identifier[self] , identifier[initial] , identifier[data] ): literal[string] keyword[if] identifier[data] == identifier[initial] : keyword[return] keyword[False] keyword[return] identifier[bool] ( identifier[initial] )!= identifier[b...
def _has_changed(self, initial, data): """Need to be reimplemented to be correct.""" if data == initial: return False # depends on [control=['if'], data=[]] return bool(initial) != bool(data)
def update_count(self): """ updates likes and dislikes count """ node_rating_count = self.node.rating_count node_rating_count.likes = self.node.vote_set.filter(vote=1).count() node_rating_count.dislikes = self.node.vote_set.filter(vote=-1).count() node_rating_count.save()
def function[update_count, parameter[self]]: constant[ updates likes and dislikes count ] variable[node_rating_count] assign[=] name[self].node.rating_count name[node_rating_count].likes assign[=] call[call[name[self].node.vote_set.filter, parameter[]].count, parameter[]] name[node_ratin...
keyword[def] identifier[update_count] ( identifier[self] ): literal[string] identifier[node_rating_count] = identifier[self] . identifier[node] . identifier[rating_count] identifier[node_rating_count] . identifier[likes] = identifier[self] . identifier[node] . identifier[vote_set] . ident...
def update_count(self): """ updates likes and dislikes count """ node_rating_count = self.node.rating_count node_rating_count.likes = self.node.vote_set.filter(vote=1).count() node_rating_count.dislikes = self.node.vote_set.filter(vote=-1).count() node_rating_count.save()
def degree_elevation(degree, ctrlpts, **kwargs): """ Computes the control points of the rational/non-rational spline after degree elevation. Implementation of Eq. 5.36 of The NURBS Book by Piegl & Tiller, 2nd Edition, p.205 Keyword Arguments: * ``num``: number of degree elevations Please note...
def function[degree_elevation, parameter[degree, ctrlpts]]: constant[ Computes the control points of the rational/non-rational spline after degree elevation. Implementation of Eq. 5.36 of The NURBS Book by Piegl & Tiller, 2nd Edition, p.205 Keyword Arguments: * ``num``: number of degree elevat...
keyword[def] identifier[degree_elevation] ( identifier[degree] , identifier[ctrlpts] ,** identifier[kwargs] ): literal[string] identifier[num] = identifier[kwargs] . identifier[get] ( literal[string] , literal[int] ) identifier[check_op] = identifier[kwargs] . identifier[get] ( literal[string] , ...
def degree_elevation(degree, ctrlpts, **kwargs): """ Computes the control points of the rational/non-rational spline after degree elevation. Implementation of Eq. 5.36 of The NURBS Book by Piegl & Tiller, 2nd Edition, p.205 Keyword Arguments: * ``num``: number of degree elevations Please note...
def stop(self): """ :: POST /:login/machines/:id?action=stop Initiate shutdown of the remote machine. """ action = {'action': 'stop'} j, r = self.datacenter.request('POST', self.path, params=action) r.raise_for_status()
def function[stop, parameter[self]]: constant[ :: POST /:login/machines/:id?action=stop Initiate shutdown of the remote machine. ] variable[action] assign[=] dictionary[[<ast.Constant object at 0x7da204961e70>], [<ast.Constant object at 0x7da20496103...
keyword[def] identifier[stop] ( identifier[self] ): literal[string] identifier[action] ={ literal[string] : literal[string] } identifier[j] , identifier[r] = identifier[self] . identifier[datacenter] . identifier[request] ( literal[string] , identifier[self] . identifier[path] , identifier...
def stop(self): """ :: POST /:login/machines/:id?action=stop Initiate shutdown of the remote machine. """ action = {'action': 'stop'} (j, r) = self.datacenter.request('POST', self.path, params=action) r.raise_for_status()
def ensure_lockfile(keep_outdated=False, pypi_mirror=None): """Ensures that the lockfile is up-to-date.""" if not keep_outdated: keep_outdated = project.settings.get("keep_outdated") # Write out the lockfile if it doesn't exist, but not if the Pipfile is being ignored if project.lockfile_exists:...
def function[ensure_lockfile, parameter[keep_outdated, pypi_mirror]]: constant[Ensures that the lockfile is up-to-date.] if <ast.UnaryOp object at 0x7da1b204a440> begin[:] variable[keep_outdated] assign[=] call[name[project].settings.get, parameter[constant[keep_outdated]]] if na...
keyword[def] identifier[ensure_lockfile] ( identifier[keep_outdated] = keyword[False] , identifier[pypi_mirror] = keyword[None] ): literal[string] keyword[if] keyword[not] identifier[keep_outdated] : identifier[keep_outdated] = identifier[project] . identifier[settings] . identifier[get] ( liter...
def ensure_lockfile(keep_outdated=False, pypi_mirror=None): """Ensures that the lockfile is up-to-date.""" if not keep_outdated: keep_outdated = project.settings.get('keep_outdated') # depends on [control=['if'], data=[]] # Write out the lockfile if it doesn't exist, but not if the Pipfile is being...
def dial(self, session_id, token, sip_uri, options=[]): """ Use this method to connect a SIP platform to an OpenTok session. The audio from the end of the SIP call is added to the OpenTok session as an audio-only stream. The OpenTok Media Router mixes audio from other streams in the sess...
def function[dial, parameter[self, session_id, token, sip_uri, options]]: constant[ Use this method to connect a SIP platform to an OpenTok session. The audio from the end of the SIP call is added to the OpenTok session as an audio-only stream. The OpenTok Media Router mixes audio from o...
keyword[def] identifier[dial] ( identifier[self] , identifier[session_id] , identifier[token] , identifier[sip_uri] , identifier[options] =[]): literal[string] identifier[payload] ={ literal[string] : identifier[session_id] , literal[string] : identifier[token] , literal[...
def dial(self, session_id, token, sip_uri, options=[]): """ Use this method to connect a SIP platform to an OpenTok session. The audio from the end of the SIP call is added to the OpenTok session as an audio-only stream. The OpenTok Media Router mixes audio from other streams in the session ...
def zoom(self, factor, order=1, verbose=True): """Zoom the data array using spline interpolation of the requested order. The number of points along each axis is increased by factor. See `scipy ndimage`__ for more info. __ http://docs.scipy.org/doc/scipy/reference/ g...
def function[zoom, parameter[self, factor, order, verbose]]: constant[Zoom the data array using spline interpolation of the requested order. The number of points along each axis is increased by factor. See `scipy ndimage`__ for more info. __ http://docs.scipy.org/doc/scipy/reference/ ...
keyword[def] identifier[zoom] ( identifier[self] , identifier[factor] , identifier[order] = literal[int] , identifier[verbose] = keyword[True] ): literal[string] keyword[raise] identifier[NotImplementedError] keyword[import] identifier[scipy] . identifier[ndimage] ke...
def zoom(self, factor, order=1, verbose=True): """Zoom the data array using spline interpolation of the requested order. The number of points along each axis is increased by factor. See `scipy ndimage`__ for more info. __ http://docs.scipy.org/doc/scipy/reference/ gener...
def router_fabric_virtual_gateway_address_family_ipv4_accept_unicast_arp_request(self, **kwargs): """Auto Generated Code """ config = ET.Element("config") router = ET.SubElement(config, "router", xmlns="urn:brocade.com:mgmt:brocade-common-def") fabric_virtual_gateway = ET.SubElem...
def function[router_fabric_virtual_gateway_address_family_ipv4_accept_unicast_arp_request, parameter[self]]: constant[Auto Generated Code ] variable[config] assign[=] call[name[ET].Element, parameter[constant[config]]] variable[router] assign[=] call[name[ET].SubElement, parameter[name[c...
keyword[def] identifier[router_fabric_virtual_gateway_address_family_ipv4_accept_unicast_arp_request] ( identifier[self] ,** identifier[kwargs] ): literal[string] identifier[config] = identifier[ET] . identifier[Element] ( literal[string] ) identifier[router] = identifier[ET] . identifier[...
def router_fabric_virtual_gateway_address_family_ipv4_accept_unicast_arp_request(self, **kwargs): """Auto Generated Code """ config = ET.Element('config') router = ET.SubElement(config, 'router', xmlns='urn:brocade.com:mgmt:brocade-common-def') fabric_virtual_gateway = ET.SubElement(router, 'fab...
def _get_result_paths(self,data): """ Define the output filepaths """ output_dir = self.Parameters['--out-dir'].Value result = {} result['json'] = ResultPath(Path=join(output_dir, splitext(split(self._input_filename)[-1])[0] + \ ...
def function[_get_result_paths, parameter[self, data]]: constant[ Define the output filepaths ] variable[output_dir] assign[=] call[name[self].Parameters][constant[--out-dir]].Value variable[result] assign[=] dictionary[[], []] call[name[result]][constant[json]] assign[=] call[name[Resul...
keyword[def] identifier[_get_result_paths] ( identifier[self] , identifier[data] ): literal[string] identifier[output_dir] = identifier[self] . identifier[Parameters] [ literal[string] ]. identifier[Value] identifier[result] ={} identifier[result] [ literal[string] ]= identifier[...
def _get_result_paths(self, data): """ Define the output filepaths """ output_dir = self.Parameters['--out-dir'].Value result = {} result['json'] = ResultPath(Path=join(output_dir, splitext(split(self._input_filename)[-1])[0] + '.jplace')) return result
def create_report(self): """Generate json dumped report for coveralls api.""" data = self.create_data() try: json_string = json.dumps(data) except UnicodeDecodeError as e: log.error('ERROR: While preparing JSON:', exc_info=e) self.debug_bad_encoding(da...
def function[create_report, parameter[self]]: constant[Generate json dumped report for coveralls api.] variable[data] assign[=] call[name[self].create_data, parameter[]] <ast.Try object at 0x7da2047eba30> variable[log_string] assign[=] call[name[re].sub, parameter[constant["repo_token": "(.+...
keyword[def] identifier[create_report] ( identifier[self] ): literal[string] identifier[data] = identifier[self] . identifier[create_data] () keyword[try] : identifier[json_string] = identifier[json] . identifier[dumps] ( identifier[data] ) keyword[except] identifier...
def create_report(self): """Generate json dumped report for coveralls api.""" data = self.create_data() try: json_string = json.dumps(data) # depends on [control=['try'], data=[]] except UnicodeDecodeError as e: log.error('ERROR: While preparing JSON:', exc_info=e) self.debug_ba...
def toDict(self): """To Dict Returns the Parent as a dictionary in the same format as is used in constructing it Returns: dict """ # Get the parents dict as the starting point of our return dRet = super(Parent,self).toDict() # Go through each field and add it to the return for k,v in iteritems(...
def function[toDict, parameter[self]]: constant[To Dict Returns the Parent as a dictionary in the same format as is used in constructing it Returns: dict ] variable[dRet] assign[=] call[call[name[super], parameter[name[Parent], name[self]]].toDict, parameter[]] for taget[tuple[[<ast...
keyword[def] identifier[toDict] ( identifier[self] ): literal[string] identifier[dRet] = identifier[super] ( identifier[Parent] , identifier[self] ). identifier[toDict] () keyword[for] identifier[k] , identifier[v] keyword[in] identifier[iteritems] ( identifier[self] . identifier[_nodes] ): i...
def toDict(self): """To Dict Returns the Parent as a dictionary in the same format as is used in constructing it Returns: dict """ # Get the parents dict as the starting point of our return dRet = super(Parent, self).toDict() # Go through each field and add it to the return for (k, v) in iter...
def lookup_image(wildcard): """Returns unique ec2.Image whose name matches wildcard lookup_ami('pytorch*').name => ami-29fa https://boto3.readthedocs.io/en/latest/reference/services/ec2.html#image Assert fails if multiple images match or no images match. """ ec2 = get_ec2_resource() filter_ = {'Name'...
def function[lookup_image, parameter[wildcard]]: constant[Returns unique ec2.Image whose name matches wildcard lookup_ami('pytorch*').name => ami-29fa https://boto3.readthedocs.io/en/latest/reference/services/ec2.html#image Assert fails if multiple images match or no images match. ] variable...
keyword[def] identifier[lookup_image] ( identifier[wildcard] ): literal[string] identifier[ec2] = identifier[get_ec2_resource] () identifier[filter_] ={ literal[string] : literal[string] , literal[string] :[ identifier[wildcard] ]} identifier[images] = identifier[list] ( identifier[ec2] . identifier[im...
def lookup_image(wildcard): """Returns unique ec2.Image whose name matches wildcard lookup_ami('pytorch*').name => ami-29fa https://boto3.readthedocs.io/en/latest/reference/services/ec2.html#image Assert fails if multiple images match or no images match. """ ec2 = get_ec2_resource() filter_ = {'...
def truncate(self, s): """ Truncate the delorian object to the nearest s (second, minute, hour, day, month, year) This is a destructive method, modifies the internal datetime object associated with the Delorean object. .. testsetup:: from datetime import da...
def function[truncate, parameter[self, s]]: constant[ Truncate the delorian object to the nearest s (second, minute, hour, day, month, year) This is a destructive method, modifies the internal datetime object associated with the Delorean object. .. testsetup:: ...
keyword[def] identifier[truncate] ( identifier[self] , identifier[s] ): literal[string] keyword[if] identifier[s] == literal[string] : identifier[self] . identifier[_dt] = identifier[self] . identifier[_dt] . identifier[replace] ( identifier[microsecond] = literal[int] ) keyw...
def truncate(self, s): """ Truncate the delorian object to the nearest s (second, minute, hour, day, month, year) This is a destructive method, modifies the internal datetime object associated with the Delorean object. .. testsetup:: from datetime import dateti...
def connect(self, addr): """ Call the :meth:`connect` method of the underlying socket and set up SSL on the socket, using the :class:`Context` object supplied to this :class:`Connection` object at creation. :param addr: A remote address :return: What the socket's connect...
def function[connect, parameter[self, addr]]: constant[ Call the :meth:`connect` method of the underlying socket and set up SSL on the socket, using the :class:`Context` object supplied to this :class:`Connection` object at creation. :param addr: A remote address :return...
keyword[def] identifier[connect] ( identifier[self] , identifier[addr] ): literal[string] identifier[_lib] . identifier[SSL_set_connect_state] ( identifier[self] . identifier[_ssl] ) keyword[return] identifier[self] . identifier[_socket] . identifier[connect] ( identifier[addr] )
def connect(self, addr): """ Call the :meth:`connect` method of the underlying socket and set up SSL on the socket, using the :class:`Context` object supplied to this :class:`Connection` object at creation. :param addr: A remote address :return: What the socket's connect met...
def cli(env, prop): """Find details about this machine.""" try: if prop == 'network': env.fout(get_network()) return meta_prop = META_MAPPING.get(prop) or prop env.fout(SoftLayer.MetadataManager().get(meta_prop)) except SoftLayer.TransportError: rais...
def function[cli, parameter[env, prop]]: constant[Find details about this machine.] <ast.Try object at 0x7da204564430>
keyword[def] identifier[cli] ( identifier[env] , identifier[prop] ): literal[string] keyword[try] : keyword[if] identifier[prop] == literal[string] : identifier[env] . identifier[fout] ( identifier[get_network] ()) keyword[return] identifier[meta_prop] = iden...
def cli(env, prop): """Find details about this machine.""" try: if prop == 'network': env.fout(get_network()) return # depends on [control=['if'], data=[]] meta_prop = META_MAPPING.get(prop) or prop env.fout(SoftLayer.MetadataManager().get(meta_prop)) # depends ...
def sum_transactions(transactions): """ Sums transactions into a total of remaining vacation days. """ workdays_per_year = 250 previous_date = None rate = 0 day_sum = 0 for transaction in transactions: date, action, value = _parse_transaction_entry(transaction) if previous_date i...
def function[sum_transactions, parameter[transactions]]: constant[ Sums transactions into a total of remaining vacation days. ] variable[workdays_per_year] assign[=] constant[250] variable[previous_date] assign[=] constant[None] variable[rate] assign[=] constant[0] variable[day_s...
keyword[def] identifier[sum_transactions] ( identifier[transactions] ): literal[string] identifier[workdays_per_year] = literal[int] identifier[previous_date] = keyword[None] identifier[rate] = literal[int] identifier[day_sum] = literal[int] keyword[for] identifier[transaction] ke...
def sum_transactions(transactions): """ Sums transactions into a total of remaining vacation days. """ workdays_per_year = 250 previous_date = None rate = 0 day_sum = 0 for transaction in transactions: (date, action, value) = _parse_transaction_entry(transaction) if previous_date...
def initFormatA(self): """ Initialize A read :class:`~ekmmeters.SerialBlock`.""" self.m_blk_a["reserved_1"] = [1, FieldType.Hex, ScaleType.No, "", 0, False, False] self.m_blk_a[Field.Model] = [2, FieldType.Hex, ScaleType.No, "", 0, False, True] self.m_blk_a[Field.Firmware] = [1, FieldTyp...
def function[initFormatA, parameter[self]]: constant[ Initialize A read :class:`~ekmmeters.SerialBlock`.] call[name[self].m_blk_a][constant[reserved_1]] assign[=] list[[<ast.Constant object at 0x7da1b26ad120>, <ast.Attribute object at 0x7da1b26ade10>, <ast.Attribute object at 0x7da1b26ae500>, <ast.Const...
keyword[def] identifier[initFormatA] ( identifier[self] ): literal[string] identifier[self] . identifier[m_blk_a] [ literal[string] ]=[ literal[int] , identifier[FieldType] . identifier[Hex] , identifier[ScaleType] . identifier[No] , literal[string] , literal[int] , keyword[False] , keyword[False] ...
def initFormatA(self): """ Initialize A read :class:`~ekmmeters.SerialBlock`.""" self.m_blk_a['reserved_1'] = [1, FieldType.Hex, ScaleType.No, '', 0, False, False] self.m_blk_a[Field.Model] = [2, FieldType.Hex, ScaleType.No, '', 0, False, True] self.m_blk_a[Field.Firmware] = [1, FieldType.Hex, ScaleType...
def iter_thickness(self, depth_total): """Iterate over the varied thicknesses. The layering is generated using a non-homogenous Poisson process. The following routine is used to generate the layering. The rate function, :math:`\lambda(t)`, is integrated from 0 to t to generate c...
def function[iter_thickness, parameter[self, depth_total]]: constant[Iterate over the varied thicknesses. The layering is generated using a non-homogenous Poisson process. The following routine is used to generate the layering. The rate function, :math:`\lambda(t)`, is integrated from 0...
keyword[def] identifier[iter_thickness] ( identifier[self] , identifier[depth_total] ): literal[string] identifier[total] = literal[int] identifier[depth_prev] = literal[int] keyword[while] identifier[depth_prev] < identifier[depth_total] : identifier[tot...
def iter_thickness(self, depth_total): """Iterate over the varied thicknesses. The layering is generated using a non-homogenous Poisson process. The following routine is used to generate the layering. The rate function, :math:`\\lambda(t)`, is integrated from 0 to t to generate cumu...
def format_from_extension(fname): """ Tries to infer a protocol from the file extension.""" _base, ext = os.path.splitext(fname) if not ext: return None try: format = known_extensions[ext.replace('.', '')] except KeyError: format = None return format
def function[format_from_extension, parameter[fname]]: constant[ Tries to infer a protocol from the file extension.] <ast.Tuple object at 0x7da18bcc9b10> assign[=] call[name[os].path.splitext, parameter[name[fname]]] if <ast.UnaryOp object at 0x7da18bcc84c0> begin[:] return[constant[None...
keyword[def] identifier[format_from_extension] ( identifier[fname] ): literal[string] identifier[_base] , identifier[ext] = identifier[os] . identifier[path] . identifier[splitext] ( identifier[fname] ) keyword[if] keyword[not] identifier[ext] : keyword[return] keyword[None] keyword[...
def format_from_extension(fname): """ Tries to infer a protocol from the file extension.""" (_base, ext) = os.path.splitext(fname) if not ext: return None # depends on [control=['if'], data=[]] try: format = known_extensions[ext.replace('.', '')] # depends on [control=['try'], data=[]]...
def is_earlier_than( nameop1, block_id, vtxindex ): """ Does nameop1 come before bock_id and vtxindex? """ return nameop1['block_number'] < block_id or (nameop1['block_number'] == block_id and nameop1['vtxindex'] < vtxindex)
def function[is_earlier_than, parameter[nameop1, block_id, vtxindex]]: constant[ Does nameop1 come before bock_id and vtxindex? ] return[<ast.BoolOp object at 0x7da1b16aa0e0>]
keyword[def] identifier[is_earlier_than] ( identifier[nameop1] , identifier[block_id] , identifier[vtxindex] ): literal[string] keyword[return] identifier[nameop1] [ literal[string] ]< identifier[block_id] keyword[or] ( identifier[nameop1] [ literal[string] ]== identifier[block_id] keyword[and] identif...
def is_earlier_than(nameop1, block_id, vtxindex): """ Does nameop1 come before bock_id and vtxindex? """ return nameop1['block_number'] < block_id or (nameop1['block_number'] == block_id and nameop1['vtxindex'] < vtxindex)
def index(self, row, column, parent=QModelIndex()): """Return the index of the item in the model specified by the given row, column, and parent index. """ if parent is not None and not parent.isValid(): parentItem = self.rootItem else: parentItem = self.it...
def function[index, parameter[self, row, column, parent]]: constant[Return the index of the item in the model specified by the given row, column, and parent index. ] if <ast.BoolOp object at 0x7da2041d9630> begin[:] variable[parentItem] assign[=] name[self].rootItem ...
keyword[def] identifier[index] ( identifier[self] , identifier[row] , identifier[column] , identifier[parent] = identifier[QModelIndex] ()): literal[string] keyword[if] identifier[parent] keyword[is] keyword[not] keyword[None] keyword[and] keyword[not] identifier[parent] . identifier[isValid...
def index(self, row, column, parent=QModelIndex()): """Return the index of the item in the model specified by the given row, column, and parent index. """ if parent is not None and (not parent.isValid()): parentItem = self.rootItem # depends on [control=['if'], data=[]] else: ...
def close(self): """ Call this method to force print the last progress bar update based on the latest n value """ if self.leave: if self.last_print_n < self.n: cur_t = time.time() self.sp.print_status(format_meter(self.n, self.total, cur_t-self...
def function[close, parameter[self]]: constant[ Call this method to force print the last progress bar update based on the latest n value ] if name[self].leave begin[:] if compare[name[self].last_print_n less[<] name[self].n] begin[:] variable[cur_t...
keyword[def] identifier[close] ( identifier[self] ): literal[string] keyword[if] identifier[self] . identifier[leave] : keyword[if] identifier[self] . identifier[last_print_n] < identifier[self] . identifier[n] : identifier[cur_t] = identifier[time] . identifier[time...
def close(self): """ Call this method to force print the last progress bar update based on the latest n value """ if self.leave: if self.last_print_n < self.n: cur_t = time.time() self.sp.print_status(format_meter(self.n, self.total, cur_t - self.start_t, self.nco...
def filter(self, f): """ Return a new DStream containing only the elements that satisfy predicate. """ def func(iterator): return filter(f, iterator) return self.mapPartitions(func, True)
def function[filter, parameter[self, f]]: constant[ Return a new DStream containing only the elements that satisfy predicate. ] def function[func, parameter[iterator]]: return[call[name[filter], parameter[name[f], name[iterator]]]] return[call[name[self].mapPartitions, parame...
keyword[def] identifier[filter] ( identifier[self] , identifier[f] ): literal[string] keyword[def] identifier[func] ( identifier[iterator] ): keyword[return] identifier[filter] ( identifier[f] , identifier[iterator] ) keyword[return] identifier[self] . identifier[mapPartiti...
def filter(self, f): """ Return a new DStream containing only the elements that satisfy predicate. """ def func(iterator): return filter(f, iterator) return self.mapPartitions(func, True)
def list_dfu_devices(*args, **kwargs): """Prints a lits of devices detected in DFU mode.""" devices = get_dfu_devices(*args, **kwargs) if not devices: print("No DFU capable devices found") return for device in devices: print("Bus {} Device {:03d}: ID {:04x}:{:04x}" ...
def function[list_dfu_devices, parameter[]]: constant[Prints a lits of devices detected in DFU mode.] variable[devices] assign[=] call[name[get_dfu_devices], parameter[<ast.Starred object at 0x7da20c7cbd90>]] if <ast.UnaryOp object at 0x7da20c7c85b0> begin[:] call[name[print], pa...
keyword[def] identifier[list_dfu_devices] (* identifier[args] ,** identifier[kwargs] ): literal[string] identifier[devices] = identifier[get_dfu_devices] (* identifier[args] ,** identifier[kwargs] ) keyword[if] keyword[not] identifier[devices] : identifier[print] ( literal[string] ) ...
def list_dfu_devices(*args, **kwargs): """Prints a lits of devices detected in DFU mode.""" devices = get_dfu_devices(*args, **kwargs) if not devices: print('No DFU capable devices found') return # depends on [control=['if'], data=[]] for device in devices: print('Bus {} Device ...
def get_context(self, value): """Ensure `image_rendition` is added to the global context.""" context = super(RenditionAwareStructBlock, self).get_context(value) context['image_rendition'] = self.rendition.\ image_rendition or 'original' return context
def function[get_context, parameter[self, value]]: constant[Ensure `image_rendition` is added to the global context.] variable[context] assign[=] call[call[name[super], parameter[name[RenditionAwareStructBlock], name[self]]].get_context, parameter[name[value]]] call[name[context]][constant[image...
keyword[def] identifier[get_context] ( identifier[self] , identifier[value] ): literal[string] identifier[context] = identifier[super] ( identifier[RenditionAwareStructBlock] , identifier[self] ). identifier[get_context] ( identifier[value] ) identifier[context] [ literal[string] ]= identi...
def get_context(self, value): """Ensure `image_rendition` is added to the global context.""" context = super(RenditionAwareStructBlock, self).get_context(value) context['image_rendition'] = self.rendition.image_rendition or 'original' return context
def xmlobject_to_dict(instance, fields=None, exclude=None, prefix=''): """ Generate a dictionary based on the data in an XmlObject instance to pass as a Form's ``initial`` keyword argument. :param instance: instance of :class:`~eulxml.xmlmap.XmlObject` :param fields: optional list of fields - if sp...
def function[xmlobject_to_dict, parameter[instance, fields, exclude, prefix]]: constant[ Generate a dictionary based on the data in an XmlObject instance to pass as a Form's ``initial`` keyword argument. :param instance: instance of :class:`~eulxml.xmlmap.XmlObject` :param fields: optional list...
keyword[def] identifier[xmlobject_to_dict] ( identifier[instance] , identifier[fields] = keyword[None] , identifier[exclude] = keyword[None] , identifier[prefix] = literal[string] ): literal[string] identifier[data] ={} keyword[if] identifier[prefix] : identifier[prefix] = literal[strin...
def xmlobject_to_dict(instance, fields=None, exclude=None, prefix=''): """ Generate a dictionary based on the data in an XmlObject instance to pass as a Form's ``initial`` keyword argument. :param instance: instance of :class:`~eulxml.xmlmap.XmlObject` :param fields: optional list of fields - if sp...
def calc_stats_iterator(motifs, fg_file, bg_file, genome=None, stats=None, ncpus=None): """Calculate motif enrichment metrics. Parameters ---------- motifs : str, list or Motif instance A file with motifs in pwm format, a list of Motif instances or a single Motif instance. fg_file...
def function[calc_stats_iterator, parameter[motifs, fg_file, bg_file, genome, stats, ncpus]]: constant[Calculate motif enrichment metrics. Parameters ---------- motifs : str, list or Motif instance A file with motifs in pwm format, a list of Motif instances or a single Motif instan...
keyword[def] identifier[calc_stats_iterator] ( identifier[motifs] , identifier[fg_file] , identifier[bg_file] , identifier[genome] = keyword[None] , identifier[stats] = keyword[None] , identifier[ncpus] = keyword[None] ): literal[string] keyword[if] keyword[not] identifier[stats] : identifier[st...
def calc_stats_iterator(motifs, fg_file, bg_file, genome=None, stats=None, ncpus=None): """Calculate motif enrichment metrics. Parameters ---------- motifs : str, list or Motif instance A file with motifs in pwm format, a list of Motif instances or a single Motif instance. fg_file...
def datasets(self): """ Return all datasets :return: """ return self.session.query(Dataset).filter(Dataset.vid != ROOT_CONFIG_NAME_V).all()
def function[datasets, parameter[self]]: constant[ Return all datasets :return: ] return[call[call[call[name[self].session.query, parameter[name[Dataset]]].filter, parameter[compare[name[Dataset].vid not_equal[!=] name[ROOT_CONFIG_NAME_V]]]].all, parameter[]]]
keyword[def] identifier[datasets] ( identifier[self] ): literal[string] keyword[return] identifier[self] . identifier[session] . identifier[query] ( identifier[Dataset] ). identifier[filter] ( identifier[Dataset] . identifier[vid] != identifier[ROOT_CONFIG_NAME_V] ). identifier[all] ()
def datasets(self): """ Return all datasets :return: """ return self.session.query(Dataset).filter(Dataset.vid != ROOT_CONFIG_NAME_V).all()
def antenna_pattern(self, right_ascension, declination, polarization, t_gps): """Return the detector response. Parameters ---------- right_ascension: float or numpy.ndarray The right ascension of the source declination: float or numpy.ndarray The declinat...
def function[antenna_pattern, parameter[self, right_ascension, declination, polarization, t_gps]]: constant[Return the detector response. Parameters ---------- right_ascension: float or numpy.ndarray The right ascension of the source declination: float or numpy.ndarr...
keyword[def] identifier[antenna_pattern] ( identifier[self] , identifier[right_ascension] , identifier[declination] , identifier[polarization] , identifier[t_gps] ): literal[string] identifier[gha] = identifier[self] . identifier[gmst_estimate] ( identifier[t_gps] )- identifier[right_ascension] ...
def antenna_pattern(self, right_ascension, declination, polarization, t_gps): """Return the detector response. Parameters ---------- right_ascension: float or numpy.ndarray The right ascension of the source declination: float or numpy.ndarray The declination ...
def query_tensor_store(self, watch_key, time_indices=None, slicing=None, mapping=None): """Query tensor store for a given debugged tensor value. Args: watch_key: The watch key of the debugged tensor being ...
def function[query_tensor_store, parameter[self, watch_key, time_indices, slicing, mapping]]: constant[Query tensor store for a given debugged tensor value. Args: watch_key: The watch key of the debugged tensor being sought. Format: <node_name>:<output_slot>:<debug_op> E.g., Dense_1/M...
keyword[def] identifier[query_tensor_store] ( identifier[self] , identifier[watch_key] , identifier[time_indices] = keyword[None] , identifier[slicing] = keyword[None] , identifier[mapping] = keyword[None] ): literal[string] keyword[return] identifier[self] . identifier[_tensor_store] . identifier[que...
def query_tensor_store(self, watch_key, time_indices=None, slicing=None, mapping=None): """Query tensor store for a given debugged tensor value. Args: watch_key: The watch key of the debugged tensor being sought. Format: <node_name>:<output_slot>:<debug_op> E.g., Dense_1/MatMul:0:DebugIde...
def settings_dir(self): """ Directory that contains the the settings for the project """ path = os.path.join(self.dir, '.dsb') utils.create_dir(path) return os.path.realpath(path)
def function[settings_dir, parameter[self]]: constant[ Directory that contains the the settings for the project ] variable[path] assign[=] call[name[os].path.join, parameter[name[self].dir, constant[.dsb]]] call[name[utils].create_dir, parameter[name[path]]] return[call[name[...
keyword[def] identifier[settings_dir] ( identifier[self] ): literal[string] identifier[path] = identifier[os] . identifier[path] . identifier[join] ( identifier[self] . identifier[dir] , literal[string] ) identifier[utils] . identifier[create_dir] ( identifier[path] ) keyword[retu...
def settings_dir(self): """ Directory that contains the the settings for the project """ path = os.path.join(self.dir, '.dsb') utils.create_dir(path) return os.path.realpath(path)
def Page_setAdBlockingEnabled(self, enabled): """ Function path: Page.setAdBlockingEnabled Domain: Page Method name: setAdBlockingEnabled WARNING: This function is marked 'Experimental'! Parameters: Required arguments: 'enabled' (type: boolean) -> Whether to block ads. No return value....
def function[Page_setAdBlockingEnabled, parameter[self, enabled]]: constant[ Function path: Page.setAdBlockingEnabled Domain: Page Method name: setAdBlockingEnabled WARNING: This function is marked 'Experimental'! Parameters: Required arguments: 'enabled' (type: boolean) -> Whether ...
keyword[def] identifier[Page_setAdBlockingEnabled] ( identifier[self] , identifier[enabled] ): literal[string] keyword[assert] identifier[isinstance] ( identifier[enabled] ,( identifier[bool] ,) ), literal[string] % identifier[type] ( identifier[enabled] ) identifier[subdom_funcs] = identifier[self] ....
def Page_setAdBlockingEnabled(self, enabled): """ Function path: Page.setAdBlockingEnabled Domain: Page Method name: setAdBlockingEnabled WARNING: This function is marked 'Experimental'! Parameters: Required arguments: 'enabled' (type: boolean) -> Whether to block ads. No return valu...
def values(self, *args: str, **kwargs: str) -> "ValuesQuery": """ Make QuerySet return dicts instead of objects. """ fields_for_select = {} # type: Dict[str, str] for field in args: if field in fields_for_select: raise FieldError("Duplicate key {}".fo...
def function[values, parameter[self]]: constant[ Make QuerySet return dicts instead of objects. ] variable[fields_for_select] assign[=] dictionary[[], []] for taget[name[field]] in starred[name[args]] begin[:] if compare[name[field] in name[fields_for_select]] beg...
keyword[def] identifier[values] ( identifier[self] ,* identifier[args] : identifier[str] ,** identifier[kwargs] : identifier[str] )-> literal[string] : literal[string] identifier[fields_for_select] ={} keyword[for] identifier[field] keyword[in] identifier[args] : keyword[if...
def values(self, *args: str, **kwargs: str) -> 'ValuesQuery': """ Make QuerySet return dicts instead of objects. """ fields_for_select = {} # type: Dict[str, str] for field in args: if field in fields_for_select: raise FieldError('Duplicate key {}'.format(field)) # depe...
def median_hilow(series, confidence_interval=0.95): """ Median and a selected pair of outer quantiles having equal tail areas """ tail = (1 - confidence_interval) / 2 return pd.DataFrame({'y': [np.median(series)], 'ymin': np.percentile(series, 100 * tail), ...
def function[median_hilow, parameter[series, confidence_interval]]: constant[ Median and a selected pair of outer quantiles having equal tail areas ] variable[tail] assign[=] binary_operation[binary_operation[constant[1] - name[confidence_interval]] / constant[2]] return[call[name[pd].DataFr...
keyword[def] identifier[median_hilow] ( identifier[series] , identifier[confidence_interval] = literal[int] ): literal[string] identifier[tail] =( literal[int] - identifier[confidence_interval] )/ literal[int] keyword[return] identifier[pd] . identifier[DataFrame] ({ literal[string] :[ identifier[np...
def median_hilow(series, confidence_interval=0.95): """ Median and a selected pair of outer quantiles having equal tail areas """ tail = (1 - confidence_interval) / 2 return pd.DataFrame({'y': [np.median(series)], 'ymin': np.percentile(series, 100 * tail), 'ymax': np.percentile(series, 100 * (1 - ta...
def blog_following(self, blogname, **kwargs): """ Gets the publicly exposed list of blogs that a blog follows :param blogname: the name of the blog you want to get information on. eg: codingjester.tumblr.com :param limit: an int, the number of blogs you want re...
def function[blog_following, parameter[self, blogname]]: constant[ Gets the publicly exposed list of blogs that a blog follows :param blogname: the name of the blog you want to get information on. eg: codingjester.tumblr.com :param limit: an int, the number of ...
keyword[def] identifier[blog_following] ( identifier[self] , identifier[blogname] ,** identifier[kwargs] ): literal[string] identifier[url] = literal[string] . identifier[format] ( identifier[blogname] ) keyword[return] identifier[self] . identifier[send_api_request] ( literal[string] , i...
def blog_following(self, blogname, **kwargs): """ Gets the publicly exposed list of blogs that a blog follows :param blogname: the name of the blog you want to get information on. eg: codingjester.tumblr.com :param limit: an int, the number of blogs you want return...
def _png(code, version, file, scale=1, module_color=(0, 0, 0, 255), background=(255, 255, 255, 255), quiet_zone=4, debug=False): """See: pyqrcode.QRCode.png() This function was abstracted away from QRCode to allow for the output of QR codes during the build process, i.e. for debugging. It works ...
def function[_png, parameter[code, version, file, scale, module_color, background, quiet_zone, debug]]: constant[See: pyqrcode.QRCode.png() This function was abstracted away from QRCode to allow for the output of QR codes during the build process, i.e. for debugging. It works just the same except y...
keyword[def] identifier[_png] ( identifier[code] , identifier[version] , identifier[file] , identifier[scale] = literal[int] , identifier[module_color] =( literal[int] , literal[int] , literal[int] , literal[int] ), identifier[background] =( literal[int] , literal[int] , literal[int] , literal[int] ), identifier[qui...
def _png(code, version, file, scale=1, module_color=(0, 0, 0, 255), background=(255, 255, 255, 255), quiet_zone=4, debug=False): """See: pyqrcode.QRCode.png() This function was abstracted away from QRCode to allow for the output of QR codes during the build process, i.e. for debugging. It works just th...
def _cast_boolean(self, value): """ Helper to convert config values to boolean as ConfigParser do. """ if value.lower() not in self._BOOLEANS: raise ValueError('Not a boolean: %s' % value) return self._BOOLEANS[value.lower()]
def function[_cast_boolean, parameter[self, value]]: constant[ Helper to convert config values to boolean as ConfigParser do. ] if compare[call[name[value].lower, parameter[]] <ast.NotIn object at 0x7da2590d7190> name[self]._BOOLEANS] begin[:] <ast.Raise object at 0x7da20c7ca230>...
keyword[def] identifier[_cast_boolean] ( identifier[self] , identifier[value] ): literal[string] keyword[if] identifier[value] . identifier[lower] () keyword[not] keyword[in] identifier[self] . identifier[_BOOLEANS] : keyword[raise] identifier[ValueError] ( literal[string] % identi...
def _cast_boolean(self, value): """ Helper to convert config values to boolean as ConfigParser do. """ if value.lower() not in self._BOOLEANS: raise ValueError('Not a boolean: %s' % value) # depends on [control=['if'], data=[]] return self._BOOLEANS[value.lower()]
def WMITimeStrToRDFDatetime(self, timestr): """Return RDFDatetime from string like 20140825162259.000000-420. Args: timestr: WMI time string Returns: rdfvalue.RDFDatetime We have some timezone manipulation work to do here because the UTC offset is in minutes rather than +-HHMM """...
def function[WMITimeStrToRDFDatetime, parameter[self, timestr]]: constant[Return RDFDatetime from string like 20140825162259.000000-420. Args: timestr: WMI time string Returns: rdfvalue.RDFDatetime We have some timezone manipulation work to do here because the UTC offset is in min...
keyword[def] identifier[WMITimeStrToRDFDatetime] ( identifier[self] , identifier[timestr] ): literal[string] identifier[offset_minutes] = identifier[timestr] [ literal[int] :] identifier[year] = identifier[timestr] [: literal[int] ] identifier[month] = identifier[timestr] [ literal[int]...
def WMITimeStrToRDFDatetime(self, timestr): """Return RDFDatetime from string like 20140825162259.000000-420. Args: timestr: WMI time string Returns: rdfvalue.RDFDatetime We have some timezone manipulation work to do here because the UTC offset is in minutes rather than +-HHMM """...
def _preprocess_inputs(x, weights): """ Coerce inputs into compatible format """ if weights is None: w_arr = np.ones(len(x)) else: w_arr = np.array(weights) x_arr = np.array(x) if x_arr.ndim == 2: if w_arr.ndim == 1: w_arr = w_arr[:, np.newaxis] return...
def function[_preprocess_inputs, parameter[x, weights]]: constant[ Coerce inputs into compatible format ] if compare[name[weights] is constant[None]] begin[:] variable[w_arr] assign[=] call[name[np].ones, parameter[call[name[len], parameter[name[x]]]]] variable[x_arr] ass...
keyword[def] identifier[_preprocess_inputs] ( identifier[x] , identifier[weights] ): literal[string] keyword[if] identifier[weights] keyword[is] keyword[None] : identifier[w_arr] = identifier[np] . identifier[ones] ( identifier[len] ( identifier[x] )) keyword[else] : identifier[w_...
def _preprocess_inputs(x, weights): """ Coerce inputs into compatible format """ if weights is None: w_arr = np.ones(len(x)) # depends on [control=['if'], data=[]] else: w_arr = np.array(weights) x_arr = np.array(x) if x_arr.ndim == 2: if w_arr.ndim == 1: ...
def taint_with(arg, taint, value_bits=256, index_bits=256): """ Helper to taint a value. :param arg: a value or Expression :param taint: a regular expression matching a taint value (eg. 'IMPORTANT.*'). If None, this function checks for any taint value. """ from ..core.smtlib import BitVecConstan...
def function[taint_with, parameter[arg, taint, value_bits, index_bits]]: constant[ Helper to taint a value. :param arg: a value or Expression :param taint: a regular expression matching a taint value (eg. 'IMPORTANT.*'). If None, this function checks for any taint value. ] from relative_modu...
keyword[def] identifier[taint_with] ( identifier[arg] , identifier[taint] , identifier[value_bits] = literal[int] , identifier[index_bits] = literal[int] ): literal[string] keyword[from] .. identifier[core] . identifier[smtlib] keyword[import] identifier[BitVecConstant] identifier[tainted_fset] = ...
def taint_with(arg, taint, value_bits=256, index_bits=256): """ Helper to taint a value. :param arg: a value or Expression :param taint: a regular expression matching a taint value (eg. 'IMPORTANT.*'). If None, this function checks for any taint value. """ from ..core.smtlib import BitVecConstan...
def connection_from_promised_list(data_promise, args=None, **kwargs): ''' A version of `connectionFromArray` that takes a promised array, and returns a promised connection. ''' return data_promise.then(lambda data: connection_from_list(data, args, **kwargs))
def function[connection_from_promised_list, parameter[data_promise, args]]: constant[ A version of `connectionFromArray` that takes a promised array, and returns a promised connection. ] return[call[name[data_promise].then, parameter[<ast.Lambda object at 0x7da20c9929b0>]]]
keyword[def] identifier[connection_from_promised_list] ( identifier[data_promise] , identifier[args] = keyword[None] ,** identifier[kwargs] ): literal[string] keyword[return] identifier[data_promise] . identifier[then] ( keyword[lambda] identifier[data] : identifier[connection_from_list] ( identifier[dat...
def connection_from_promised_list(data_promise, args=None, **kwargs): """ A version of `connectionFromArray` that takes a promised array, and returns a promised connection. """ return data_promise.then(lambda data: connection_from_list(data, args, **kwargs))
def prepare_video_params(self, title=None, tags='Others', description='', copyright_type='original', public_type='all', category=None, watch_password=None, latitude=None, longitude=None, shoot_time=None )...
def function[prepare_video_params, parameter[self, title, tags, description, copyright_type, public_type, category, watch_password, latitude, longitude, shoot_time]]: constant[ util method for create video params to upload. Only need to provide a minimum of two essential parameters: title and t...
keyword[def] identifier[prepare_video_params] ( identifier[self] , identifier[title] = keyword[None] , identifier[tags] = literal[string] , identifier[description] = literal[string] , identifier[copyright_type] = literal[string] , identifier[public_type] = literal[string] , identifier[category] = keyword[None] , id...
def prepare_video_params(self, title=None, tags='Others', description='', copyright_type='original', public_type='all', category=None, watch_password=None, latitude=None, longitude=None, shoot_time=None): """ util method for create video params to upload. Only need to provide a minimum of two essential par...
def acceptText(self): """ Emits the editing finished signals for this widget. """ if not self.signalsBlocked(): self.textEntered.emit(self.toPlainText()) self.htmlEntered.emit(self.toHtml()) self.returnPressed.emit()
def function[acceptText, parameter[self]]: constant[ Emits the editing finished signals for this widget. ] if <ast.UnaryOp object at 0x7da204347070> begin[:] call[name[self].textEntered.emit, parameter[call[name[self].toPlainText, parameter[]]]] call[name[...
keyword[def] identifier[acceptText] ( identifier[self] ): literal[string] keyword[if] keyword[not] identifier[self] . identifier[signalsBlocked] (): identifier[self] . identifier[textEntered] . identifier[emit] ( identifier[self] . identifier[toPlainText] ()) identif...
def acceptText(self): """ Emits the editing finished signals for this widget. """ if not self.signalsBlocked(): self.textEntered.emit(self.toPlainText()) self.htmlEntered.emit(self.toHtml()) self.returnPressed.emit() # depends on [control=['if'], data=[]]
def _get_user_dn(self, user_lookup_attribute_value): """ Searches for a user and retrieves his distinguished name. :param user_lookup_attribute_value: The value for the LDAP_GROUPS_USER_LOOKUP_ATTRIBUTE :type user_lookup_attribute_value: str :raises: **AccountDoesNotExist** if th...
def function[_get_user_dn, parameter[self, user_lookup_attribute_value]]: constant[ Searches for a user and retrieves his distinguished name. :param user_lookup_attribute_value: The value for the LDAP_GROUPS_USER_LOOKUP_ATTRIBUTE :type user_lookup_attribute_value: str :raises: **Accoun...
keyword[def] identifier[_get_user_dn] ( identifier[self] , identifier[user_lookup_attribute_value] ): literal[string] identifier[self] . identifier[ldap_connection] . identifier[search] ( identifier[search_base] = identifier[self] . identifier[USER_SEARCH] [ literal[string] ], identifie...
def _get_user_dn(self, user_lookup_attribute_value): """ Searches for a user and retrieves his distinguished name. :param user_lookup_attribute_value: The value for the LDAP_GROUPS_USER_LOOKUP_ATTRIBUTE :type user_lookup_attribute_value: str :raises: **AccountDoesNotExist** if the account ...
def meshQuality(actor, measure=6): """ Calculate functions of quality of the elements of a triangular mesh. See class `vtkMeshQuality <https://vtk.org/doc/nightly/html/classvtkMeshQuality.html>`_ for explaination. :param int measure: type of estimator - EDGE_RATIO, 0 - ASPECT_RATIO...
def function[meshQuality, parameter[actor, measure]]: constant[ Calculate functions of quality of the elements of a triangular mesh. See class `vtkMeshQuality <https://vtk.org/doc/nightly/html/classvtkMeshQuality.html>`_ for explaination. :param int measure: type of estimator - EDGE_RA...
keyword[def] identifier[meshQuality] ( identifier[actor] , identifier[measure] = literal[int] ): literal[string] identifier[mesh] = identifier[actor] . identifier[GetMapper] (). identifier[GetInput] () identifier[qf] = identifier[vtk] . identifier[vtkMeshQuality] () identifier[qf] . identifier[...
def meshQuality(actor, measure=6): """ Calculate functions of quality of the elements of a triangular mesh. See class `vtkMeshQuality <https://vtk.org/doc/nightly/html/classvtkMeshQuality.html>`_ for explaination. :param int measure: type of estimator - EDGE_RATIO, 0 - ASPECT_RATIO...
def get(self, keyword): """Return the element of the list after the given keyword. Parameters ---------- keyword : str The keyword parameter to find in the list. Putting a colon before the keyword is optional, if no colon is given, it is added automat...
def function[get, parameter[self, keyword]]: constant[Return the element of the list after the given keyword. Parameters ---------- keyword : str The keyword parameter to find in the list. Putting a colon before the keyword is optional, if no colon is ...
keyword[def] identifier[get] ( identifier[self] , identifier[keyword] ): literal[string] keyword[if] keyword[not] identifier[keyword] . identifier[startswith] ( literal[string] ): identifier[keyword] = literal[string] + identifier[keyword] keyword[for] identifier[i] , iden...
def get(self, keyword): """Return the element of the list after the given keyword. Parameters ---------- keyword : str The keyword parameter to find in the list. Putting a colon before the keyword is optional, if no colon is given, it is added automatical...
def get_indent(self, string): """ Look through the string and count the spaces """ indent_amt = 0 if string[0] == '\t': return '\t' for char in string: if char == ' ': indent_amt += 1 else: return ' ' * ...
def function[get_indent, parameter[self, string]]: constant[ Look through the string and count the spaces ] variable[indent_amt] assign[=] constant[0] if compare[call[name[string]][constant[0]] equal[==] constant[ ]] begin[:] return[constant[ ]] for taget[name[cha...
keyword[def] identifier[get_indent] ( identifier[self] , identifier[string] ): literal[string] identifier[indent_amt] = literal[int] keyword[if] identifier[string] [ literal[int] ]== literal[string] : keyword[return] literal[string] keyword[for] identifier[char]...
def get_indent(self, string): """ Look through the string and count the spaces """ indent_amt = 0 if string[0] == '\t': return '\t' # depends on [control=['if'], data=[]] for char in string: if char == ' ': indent_amt += 1 # depends on [control=['if'], data=...
def _get_key_id_from_key(self, key): """ _get_key_id_from_key returns the key id from a key, if found. otherwise it just returns the key to be used as the key id. Keyword arguments: key -- The key to derive the ID from. If curly braces are found in the key, then t...
def function[_get_key_id_from_key, parameter[self, key]]: constant[ _get_key_id_from_key returns the key id from a key, if found. otherwise it just returns the key to be used as the key id. Keyword arguments: key -- The key to derive the ID from. If curly braces are found in the...
keyword[def] identifier[_get_key_id_from_key] ( identifier[self] , identifier[key] ): literal[string] identifier[key_id] = identifier[key] identifier[regex] = literal[string] . identifier[format] ( identifier[self] . identifier[_hash_start] , identifier[self] . identifier[_hash_stop] , ...
def _get_key_id_from_key(self, key): """ _get_key_id_from_key returns the key id from a key, if found. otherwise it just returns the key to be used as the key id. Keyword arguments: key -- The key to derive the ID from. If curly braces are found in the key, then the c...
def QA_fetch_user(user_cookie, db=DATABASE): """ get the user Arguments: user_cookie : str the unique cookie_id for a user Keyword Arguments: db: database for query Returns: list --- [ACCOUNT] """ collection = DATABASE.account return [res for res in collection...
def function[QA_fetch_user, parameter[user_cookie, db]]: constant[ get the user Arguments: user_cookie : str the unique cookie_id for a user Keyword Arguments: db: database for query Returns: list --- [ACCOUNT] ] variable[collection] assign[=] name[DATABASE...
keyword[def] identifier[QA_fetch_user] ( identifier[user_cookie] , identifier[db] = identifier[DATABASE] ): literal[string] identifier[collection] = identifier[DATABASE] . identifier[account] keyword[return] [ identifier[res] keyword[for] identifier[res] keyword[in] identifier[collection] . iden...
def QA_fetch_user(user_cookie, db=DATABASE): """ get the user Arguments: user_cookie : str the unique cookie_id for a user Keyword Arguments: db: database for query Returns: list --- [ACCOUNT] """ collection = DATABASE.account return [res for res in collection....
def to_meta_df(trained_regressor, target_gene_name): """ :param trained_regressor: the trained model from which to extract the meta information. :param target_gene_name: the name of the target gene. :return: a Pandas DataFrame containing side information about the regression. """ ...
def function[to_meta_df, parameter[trained_regressor, target_gene_name]]: constant[ :param trained_regressor: the trained model from which to extract the meta information. :param target_gene_name: the name of the target gene. :return: a Pandas DataFrame containing side information about the regressi...
keyword[def] identifier[to_meta_df] ( identifier[trained_regressor] , identifier[target_gene_name] ): literal[string] identifier[n_estimators] = identifier[len] ( identifier[trained_regressor] . identifier[estimators_] ) keyword[return] identifier[pd] . identifier[DataFrame] ({ literal[string] :[ i...
def to_meta_df(trained_regressor, target_gene_name): """ :param trained_regressor: the trained model from which to extract the meta information. :param target_gene_name: the name of the target gene. :return: a Pandas DataFrame containing side information about the regression. """ n_estimators = ...
def get_oldest_commit(self): ''' Get oldest commit involving this file :returns: Oldest commit ''' return self.git.get_commits(self.content.source_path, self.follow)[-1]
def function[get_oldest_commit, parameter[self]]: constant[ Get oldest commit involving this file :returns: Oldest commit ] return[call[call[name[self].git.get_commits, parameter[name[self].content.source_path, name[self].follow]]][<ast.UnaryOp object at 0x7da1b1d88760>]]
keyword[def] identifier[get_oldest_commit] ( identifier[self] ): literal[string] keyword[return] identifier[self] . identifier[git] . identifier[get_commits] ( identifier[self] . identifier[content] . identifier[source_path] , identifier[self] . identifier[follow] )[- literal[int] ]
def get_oldest_commit(self): """ Get oldest commit involving this file :returns: Oldest commit """ return self.git.get_commits(self.content.source_path, self.follow)[-1]
def to_header(self, span_context): """Convert a SpanContext object to header string. :type span_context: :class:`~opencensus.trace.span_context.SpanContext` :param span_context: SpanContext object. :rtype: str :returns: A trace context header string in google cloud ...
def function[to_header, parameter[self, span_context]]: constant[Convert a SpanContext object to header string. :type span_context: :class:`~opencensus.trace.span_context.SpanContext` :param span_context: SpanContext object. :rtype: str :returns: A trace context hea...
keyword[def] identifier[to_header] ( identifier[self] , identifier[span_context] ): literal[string] identifier[trace_id] = identifier[span_context] . identifier[trace_id] identifier[span_id] = identifier[span_context] . identifier[span_id] identifier[trace_options] = identifier[...
def to_header(self, span_context): """Convert a SpanContext object to header string. :type span_context: :class:`~opencensus.trace.span_context.SpanContext` :param span_context: SpanContext object. :rtype: str :returns: A trace context header string in google cloud form...
def camera_info(self, camera_ids, **kwargs): """Return a list of cameras matching camera_ids.""" api = self._api_info['camera'] payload = dict({ '_sid': self._sid, 'api': api['name'], 'method': 'GetInfo', 'version': api['version'], 'cam...
def function[camera_info, parameter[self, camera_ids]]: constant[Return a list of cameras matching camera_ids.] variable[api] assign[=] call[name[self]._api_info][constant[camera]] variable[payload] assign[=] call[name[dict], parameter[dictionary[[<ast.Constant object at 0x7da1b0328250>, <ast.Co...
keyword[def] identifier[camera_info] ( identifier[self] , identifier[camera_ids] ,** identifier[kwargs] ): literal[string] identifier[api] = identifier[self] . identifier[_api_info] [ literal[string] ] identifier[payload] = identifier[dict] ({ literal[string] : identifier[self] . ...
def camera_info(self, camera_ids, **kwargs): """Return a list of cameras matching camera_ids.""" api = self._api_info['camera'] payload = dict({'_sid': self._sid, 'api': api['name'], 'method': 'GetInfo', 'version': api['version'], 'cameraIds': ', '.join((str(id) for id in camera_ids))}, **kwargs) respon...
def namespace(sharing=None, owner=None, app=None, **kwargs): """This function constructs a Splunk namespace. Every Splunk resource belongs to a namespace. The namespace is specified by the pair of values ``owner`` and ``app`` and is governed by a ``sharing`` mode. The possible values for ``sharing`` ar...
def function[namespace, parameter[sharing, owner, app]]: constant[This function constructs a Splunk namespace. Every Splunk resource belongs to a namespace. The namespace is specified by the pair of values ``owner`` and ``app`` and is governed by a ``sharing`` mode. The possible values for ``sharin...
keyword[def] identifier[namespace] ( identifier[sharing] = keyword[None] , identifier[owner] = keyword[None] , identifier[app] = keyword[None] ,** identifier[kwargs] ): literal[string] keyword[if] identifier[sharing] keyword[in] [ literal[string] ]: keyword[return] identifier[record] ({ literal...
def namespace(sharing=None, owner=None, app=None, **kwargs): """This function constructs a Splunk namespace. Every Splunk resource belongs to a namespace. The namespace is specified by the pair of values ``owner`` and ``app`` and is governed by a ``sharing`` mode. The possible values for ``sharing`` ar...
def get_scorer(scoring, compute=True): """Get a scorer from string Parameters ---------- scoring : str | callable scoring method as string. If callable it is returned as is. Returns ------- scorer : callable The scorer. """ # This is the same as sklearns, only we us...
def function[get_scorer, parameter[scoring, compute]]: constant[Get a scorer from string Parameters ---------- scoring : str | callable scoring method as string. If callable it is returned as is. Returns ------- scorer : callable The scorer. ] if call[name[i...
keyword[def] identifier[get_scorer] ( identifier[scoring] , identifier[compute] = keyword[True] ): literal[string] keyword[if] identifier[isinstance] ( identifier[scoring] , identifier[six] . identifier[string_types] ): keyword[try] : identifier[scorer] , identifier[kwargs]...
def get_scorer(scoring, compute=True): """Get a scorer from string Parameters ---------- scoring : str | callable scoring method as string. If callable it is returned as is. Returns ------- scorer : callable The scorer. """ # This is the same as sklearns, only we us...
def perform_exe_expansion(self): """ This function will look through the executables section of the ConfigParser object and replace any values using macros with full paths. For any values that look like ${which:lalapps_tmpltbank} will be replaced with the equivalent of...
def function[perform_exe_expansion, parameter[self]]: constant[ This function will look through the executables section of the ConfigParser object and replace any values using macros with full paths. For any values that look like ${which:lalapps_tmpltbank} will be repl...
keyword[def] identifier[perform_exe_expansion] ( identifier[self] ): literal[string] keyword[if] identifier[self] . identifier[has_section] ( literal[string] ): keyword[for] identifier[option] , identifier[value] keyword[in] identifier[self] . identifier[items] ( literal[s...
def perform_exe_expansion(self): """ This function will look through the executables section of the ConfigParser object and replace any values using macros with full paths. For any values that look like ${which:lalapps_tmpltbank} will be replaced with the equivalent of whi...
def parse(filename, encoding=None): """ !DEMO! Simple file parsing generator Args: filename: absolute or relative path to file on disk encoding: encoding string that is passed to open function """ with open(filename, encoding=encoding) as source: for line in source: ...
def function[parse, parameter[filename, encoding]]: constant[ !DEMO! Simple file parsing generator Args: filename: absolute or relative path to file on disk encoding: encoding string that is passed to open function ] with call[name[open], parameter[name[filename]]] begin...
keyword[def] identifier[parse] ( identifier[filename] , identifier[encoding] = keyword[None] ): literal[string] keyword[with] identifier[open] ( identifier[filename] , identifier[encoding] = identifier[encoding] ) keyword[as] identifier[source] : keyword[for] identifier[line] keyword[in] ide...
def parse(filename, encoding=None): """ !DEMO! Simple file parsing generator Args: filename: absolute or relative path to file on disk encoding: encoding string that is passed to open function """ with open(filename, encoding=encoding) as source: for line in source: ...
def create_existing_folder(help_string=NO_HELP, default=NO_DEFAULT, suffixes=None): # type: (str, Union[str, NO_DEFAULT_TYPE], Union[List[str], None]) -> str """ Create a new folder parameter :param help_string: :param default: :param suffixes: :return: ""...
def function[create_existing_folder, parameter[help_string, default, suffixes]]: constant[ Create a new folder parameter :param help_string: :param default: :param suffixes: :return: ] return[call[name[ParamFilename], parameter[]]]
keyword[def] identifier[create_existing_folder] ( identifier[help_string] = identifier[NO_HELP] , identifier[default] = identifier[NO_DEFAULT] , identifier[suffixes] = keyword[None] ): literal[string] keyword[return] identifier[ParamFilename] ( identifier[help_string] = identifi...
def create_existing_folder(help_string=NO_HELP, default=NO_DEFAULT, suffixes=None): # type: (str, Union[str, NO_DEFAULT_TYPE], Union[List[str], None]) -> str '\n Create a new folder parameter\n :param help_string:\n :param default:\n :param suffixes:\n :return:\n ' ...
def object_ref(self): """Return the reference of the changed object.""" return ImmutableDict(type=self.type, category_id=self.category_id, event_id=self.event_id, session_id=self.session_id, contrib_id=self.contrib_id, subcontrib_id=self.subcontrib_id)
def function[object_ref, parameter[self]]: constant[Return the reference of the changed object.] return[call[name[ImmutableDict], parameter[]]]
keyword[def] identifier[object_ref] ( identifier[self] ): literal[string] keyword[return] identifier[ImmutableDict] ( identifier[type] = identifier[self] . identifier[type] , identifier[category_id] = identifier[self] . identifier[category_id] , identifier[event_id] = identifier[self] . identifier...
def object_ref(self): """Return the reference of the changed object.""" return ImmutableDict(type=self.type, category_id=self.category_id, event_id=self.event_id, session_id=self.session_id, contrib_id=self.contrib_id, subcontrib_id=self.subcontrib_id)
def set_name(client, name, path, force): """Sets the <name> for remote <path>.""" from renku.models.refs import LinkReference LinkReference.create(client=client, name=_ref(name), force=force).set_reference(path)
def function[set_name, parameter[client, name, path, force]]: constant[Sets the <name> for remote <path>.] from relative_module[renku.models.refs] import module[LinkReference] call[call[name[LinkReference].create, parameter[]].set_reference, parameter[name[path]]]
keyword[def] identifier[set_name] ( identifier[client] , identifier[name] , identifier[path] , identifier[force] ): literal[string] keyword[from] identifier[renku] . identifier[models] . identifier[refs] keyword[import] identifier[LinkReference] identifier[LinkReference] . identifier[create] ( ide...
def set_name(client, name, path, force): """Sets the <name> for remote <path>.""" from renku.models.refs import LinkReference LinkReference.create(client=client, name=_ref(name), force=force).set_reference(path)
def grant_user_access(self, user, db_names, strict=True): """ Gives access to the databases listed in `db_names` to the user. """ return self._user_manager.grant_user_access(user, db_names, strict=strict)
def function[grant_user_access, parameter[self, user, db_names, strict]]: constant[ Gives access to the databases listed in `db_names` to the user. ] return[call[name[self]._user_manager.grant_user_access, parameter[name[user], name[db_names]]]]
keyword[def] identifier[grant_user_access] ( identifier[self] , identifier[user] , identifier[db_names] , identifier[strict] = keyword[True] ): literal[string] keyword[return] identifier[self] . identifier[_user_manager] . identifier[grant_user_access] ( identifier[user] , identifier[db_names] , ...
def grant_user_access(self, user, db_names, strict=True): """ Gives access to the databases listed in `db_names` to the user. """ return self._user_manager.grant_user_access(user, db_names, strict=strict)
def ion_equals(a, b, timestamps_instants_only=False): """Tests two objects for equivalence under the Ion data model. There are three important cases: * When neither operand specifies its `ion_type` or `annotations`, this method will only return True when the values of both operands are equiva...
def function[ion_equals, parameter[a, b, timestamps_instants_only]]: constant[Tests two objects for equivalence under the Ion data model. There are three important cases: * When neither operand specifies its `ion_type` or `annotations`, this method will only return True when the values of...
keyword[def] identifier[ion_equals] ( identifier[a] , identifier[b] , identifier[timestamps_instants_only] = keyword[False] ): literal[string] keyword[if] identifier[timestamps_instants_only] : keyword[return] identifier[_ion_equals_timestamps_instants] ( identifier[a] , identifier[b] ) key...
def ion_equals(a, b, timestamps_instants_only=False): """Tests two objects for equivalence under the Ion data model. There are three important cases: * When neither operand specifies its `ion_type` or `annotations`, this method will only return True when the values of both operands are equiva...
def ulocalized_time(time, long_format=None, time_only=None, context=None, request=None): """ This function gets ans string as time or a DateTime objects and returns a string with the time formatted :param time: The time to process :type time: str/DateTime :param long_format:...
def function[ulocalized_time, parameter[time, long_format, time_only, context, request]]: constant[ This function gets ans string as time or a DateTime objects and returns a string with the time formatted :param time: The time to process :type time: str/DateTime :param long_format: If True...
keyword[def] identifier[ulocalized_time] ( identifier[time] , identifier[long_format] = keyword[None] , identifier[time_only] = keyword[None] , identifier[context] = keyword[None] , identifier[request] = keyword[None] ): literal[string] identifier[time] = identifier[get_date] ( identifier[contex...
def ulocalized_time(time, long_format=None, time_only=None, context=None, request=None): """ This function gets ans string as time or a DateTime objects and returns a string with the time formatted :param time: The time to process :type time: str/DateTime :param long_format: If True, return ti...