sequence stringlengths 557 12.7k | docstring stringlengths 4 15.2k |
|---|---|
(module
(function_definition
(function_name_get_hops) function_name_get_hops
(parameters
(identifier_self) identifier_self
(identifier_start) identifier_start
(default_parameter
(identifier_end) identifier_end
(None) None
)default_parameter
(default_parameter
... | Computes the hop distance to all nodes centered around a specified node.
First order neighbours are at hop 1, their neigbours are at hop 2 etc.
Uses :py:meth:`forw_bfs` or :py:meth:`back_bfs` depending on the value of the forward
parameter. If the distance between all neighbouring nodes is 1 t... |
(module
(function_definition
(function_name__include_exclude) function_name__include_exclude
(parameters
(identifier_file_path) identifier_file_path
(default_parameter
(identifier_include) identifier_include
(None) None
)default_parameter
(default_parameter
(ide... | Check if file matches one of include filters and not in exclude filter.
:param file_path: Path to the file.
:param include: Tuple containing patterns to which include from result.
:param exclude: Tuple containing patterns to which exclude from result. |
(module
(function_definition
(function_name_newCDataBlock) function_name_newCDataBlock
(parameters
(identifier_self) identifier_self
(identifier_content) identifier_content
(identifier_len) identifier_len
)parameters
(block
(expression_statement
(assignment
(i... | Creation of a new node containing a CDATA block. |
(module
(function_definition
(function_name_base62_encode) function_name_base62_encode
(parameters
(identifier_cls) identifier_cls
(identifier_num) identifier_num
)parameters
(block
(expression_statement
(assignment
(identifier_alphabet) identifier_alphabet
... | Encode a number in Base X.
`num`: The number to encode
`alphabet`: The alphabet to use for encoding
Stolen from: http://stackoverflow.com/a/1119769/1144479 |
(module
(function_definition
(function_name_image_id_from_k8s) function_name_image_id_from_k8s
(parameters
)parameters
(block
(expression_statement
(assignment
(identifier_token_path) identifier_token_path
(string_"/var/run/secrets/kubernetes.io/serviceaccount/token")... | Pings the k8s metadata service for the image id |
(module
(function_definition
(function_name_nocomment) function_name_nocomment
(parameters
(identifier_astr) identifier_astr
(default_parameter
(identifier_com) identifier_com
(string_'!') string_'!'
)default_parameter
)parameters
(block
(expression_statement
... | just like the comment in python.
removes any text after the phrase 'com' |
(module
(function_definition
(function_name_resize_bytes) function_name_resize_bytes
(parameters
(identifier_fobj) identifier_fobj
(identifier_old_size) identifier_old_size
(identifier_new_size) identifier_new_size
(identifier_offset) identifier_offset
)parameters
(block
... | Resize an area in a file adding and deleting at the end of it.
Does nothing if no resizing is needed.
Args:
fobj (fileobj)
old_size (int): The area starting at offset
new_size (int): The new size of the area
offset (int): The start of the area
Raises:
IOError |
(module
(function_definition
(function_name_upload) function_name_upload
(parameters
(identifier_self) identifier_self
(identifier_response) identifier_response
(identifier_file) identifier_file
)parameters
(block
(expression_statement
(assignment
(identifier_... | Upload the file.
:param response: The response from the upload request.
:type response: dict
:param file: A file handler pointing to the file to upload.
:returns: True if the file uploaded successfully, False otherwise, \
and the JSON response from the API.
:rtype: t... |
(module
(function_definition
(function_name_sub) function_name_sub
(parameters
(identifier_self) identifier_self
(identifier_key) identifier_key
)parameters
(block
(expression_statement
(assignment
(identifier_subv) identifier_subv
(call
(ident... | Returns new Vyper instance representing a sub tree of this instance. |
(module
(function_definition
(function_name__read_opt_lio) function_name__read_opt_lio
(parameters
(identifier_self) identifier_self
(identifier_code) identifier_code
(keyword_separator
)keyword_separator
(identifier_desc) identifier_desc
)parameters
(block
(express... | Read HOPOPT Line-Identification option.
Structure of HOPOPT Line-Identification option [RFC 6788]:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-... |
(module
(function_definition
(function_name_without_edge) function_name_without_edge
(parameters
(identifier_self) identifier_self
(typed_parameter
(identifier_edge) identifier_edge
(type
(identifier_Edge) identifier_Edge
)type
)typed_parameter
)paramete... | Returns a copy of this bipartite graph with the given edge removed. |
(module
(function_definition
(function_name_setValues) function_name_setValues
(parameters
(identifier_self) identifier_self
(identifier_rows) identifier_rows
(list_splat_pattern
(identifier_values) identifier_values
)list_splat_pattern
)parameters
(block
(express... | Set our column value for given list of rows to `value`. |
(module
(function_definition
(function_name_lookup_prefix) function_name_lookup_prefix
(parameters
(identifier_self) identifier_self
(identifier_prefix) identifier_prefix
(default_parameter
(identifier_timestamp) identifier_timestamp
(identifier_timestamp_now) identifier_time... | Returns lookup data of a Prefix
Args:
prefix (string): Prefix of a Amateur Radio callsign
timestamp (datetime, optional): datetime in UTC (tzinfo=pytz.UTC)
Returns:
dict: Dictionary containing the country specific data of the Prefix
Raises:
KeyE... |
(module
(function_definition
(function_name_query_target) function_name_query_target
(parameters
(identifier_target_chembl_id) identifier_target_chembl_id
)parameters
(block
(expression_statement
(assignment
(identifier_query_dict) identifier_query_dict
(diction... | Query ChEMBL API target by id
Parameters
----------
target_chembl_id : str
Returns
-------
target : dict
dict parsed from json that is unique for the target |
(module
(function_definition
(function_name_sadd) function_name_sadd
(parameters
(identifier_self) identifier_self
(identifier_key) identifier_key
(list_splat_pattern
(identifier_values) identifier_values
)list_splat_pattern
)parameters
(block
(if_statement
... | Emulate sadd. |
(module
(function_definition
(function_name_visualize_model) function_name_visualize_model
(parameters
(identifier_X) identifier_X
(identifier_y) identifier_y
(identifier_estimator) identifier_estimator
(identifier_path) identifier_path
(dictionary_splat_pattern
(identifi... | Test various estimators. |
(module
(function_definition
(function_name_add) function_name_add
(parameters
(identifier_self) identifier_self
(identifier_data_source) identifier_data_source
(identifier_module) identifier_module
(default_parameter
(identifier_package) identifier_package
(None) None
... | Add data_source to model. Tries to import module, then looks for data
source class definition.
:param data_source: Name of data source to add.
:type data_source: str
:param module: Module in which data source resides. Can be absolute or
relative. See :func:`importlib.import_... |
(module
(function_definition
(function_name_validate_signature) function_name_validate_signature
(parameters
(identifier_self) identifier_self
(identifier_filename) identifier_filename
)parameters
(block
(if_statement
(not_operator
(identifier_GPG_PRESENT) identifie... | Returns True if a valid signature is present for filename |
(module
(function_definition
(function_name_get_parent_path) function_name_get_parent_path
(parameters
(default_parameter
(identifier_index) identifier_index
(integer_2) integer_2
)default_parameter
)parameters
(block
(try_statement
(block
(expressio... | Get the caller's parent path to sys.path
If the caller is a CLI through stdin, the parent of the current working
directory is used |
(module
(function_definition
(function_name__assertIndex) function_name__assertIndex
(parameters
(identifier_self) identifier_self
(identifier_index) identifier_index
)parameters
(block
(if_statement
(comparison_operator
(call
(identifier_type) identifie... | Raise TypeError or IndexError if index is not an integer or out of
range for the number of elements in this array, respectively. |
(module
(function_definition
(function_name_get_pattern_additional_cycles) function_name_get_pattern_additional_cycles
(parameters
(identifier_self) identifier_self
(identifier_patternnumber) identifier_patternnumber
)parameters
(block
(expression_statement
(call
(i... | Get the number of additional cycles for a given pattern.
Args:
patternnumber (integer): 0-7
Returns:
The number of additional cycles (int). |
(module
(function_definition
(function_name_cardinal) function_name_cardinal
(parameters
(identifier_self) identifier_self
(identifier_to) identifier_to
)parameters
(block
(return_statement
(call
(identifier_sum) identifier_sum
(generator_expression
... | Return the number of dependencies of this module to the given node.
Args:
to (Package/Module): the target node.
Returns:
int: number of dependencies. |
(module
(function_definition
(function_name__restore_group) function_name__restore_group
(parameters
(identifier_self) identifier_self
(identifier_group_id) identifier_group_id
)parameters
(block
(expression_statement
(assignment
(identifier_meta) identifier_meta
... | Get group metadata for a group by id. |
(module
(function_definition
(function_name_get_all_hosted_routers) function_name_get_all_hosted_routers
(parameters
(identifier_self) identifier_self
(identifier_context) identifier_context
)parameters
(block
(expression_statement
(assignment
(identifier_cctxt) ide... | Make a remote process call to retrieve the sync data for
routers that have been scheduled to a hosting device.
:param context: session context |
(module
(function_definition
(function_name__db) function_name__db
(parameters
(identifier_self) identifier_self
)parameters
(block
(if_statement
(boolean_operator
(not_operator
(call
(identifier_hasattr) identifier_hasattr
(argumen... | Database client for accessing storage.
:returns: :class:`livebridge.storages.base.BaseStorage` |
(module
(function_definition
(function_name__check_available) function_name__check_available
(parameters
(identifier_name) identifier_name
)parameters
(block
(expression_statement
(assignment
(identifier__status) identifier__status
(call
(identifier_... | Returns boolean telling whether or not the named service is available |
(module
(function_definition
(function_name_get_help_text) function_name_get_help_text
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_txt) identifier_txt
(call
(identifier_str) identifie... | Returns the help output in plain text format. |
(module
(function_definition
(function_name_MetatagDistinctValuesGet) function_name_MetatagDistinctValuesGet
(parameters
(identifier_self) identifier_self
(identifier_metatag_name) identifier_metatag_name
(default_parameter
(identifier_namespace) identifier_namespace
(None) N... | Find the distinct value of a metatag name in a certain namespace
@param metatag_name (string) - Name of the metatag for which to find the distinct values
@param namespace (stirng) - Namespace in which to find the distinct values
@return (bool) - Boolean... |
(module
(function_definition
(function_name_check_platforms) function_name_check_platforms
(parameters
(identifier_platforms) identifier_platforms
)parameters
(block
(if_statement
(comparison_operator
(call
(identifier_len) identifier_len
(argument... | Checks if the platforms have a valid platform code |
(module
(function_definition
(function_name_encipher) function_name_encipher
(parameters
(identifier_self) identifier_self
(identifier_string) identifier_string
)parameters
(block
(expression_statement
(assignment
(identifier_string) identifier_string
(cal... | Encipher string using Autokey cipher according to initialised key. Punctuation and whitespace
are removed from the input.
Example::
ciphertext = Autokey('HELLO').encipher(plaintext)
:param string: The string to encipher.
:returns: The enciphered string. |
(module
(function_definition
(function_name_get_requested_quarter_data) function_name_get_requested_quarter_data
(parameters
(identifier_self) identifier_self
(identifier_zero_qtr_data) identifier_zero_qtr_data
(identifier_zeroth_quarter_idx) identifier_zeroth_quarter_idx
(identifier_s... | Selects the requested data for each date.
Parameters
----------
zero_qtr_data : pd.DataFrame
The 'time zero' data for each calendar date per sid.
zeroth_quarter_idx : pd.Index
An index of calendar dates, sid, and normalized quarters, for only
the rows... |
(module
(function_definition
(function_name_parse_startup_message) function_name_parse_startup_message
(parameters
(identifier_self) identifier_self
)parameters
(block
(return_statement
(call
(identifier_parse_map) identifier_parse_map
(argument_list
... | results in an OmapiStartupMessage
>>> d = b"\\0\\0\\0\\x64\\0\\0\\0\\x18"
>>> next(InBuffer(d).parse_startup_message()).validate() |
(module
(function_definition
(function_name_cal_frame_according_boundaries) function_name_cal_frame_according_boundaries
(parameters
(identifier_left) identifier_left
(identifier_right) identifier_right
(identifier_top) identifier_top
(identifier_bottom) identifier_bottom
(identi... | Generate margin and relative position and size handed boundary parameter and parent size |
(module
(function_definition
(function_name_create_permissions_from_tuples) function_name_create_permissions_from_tuples
(parameters
(identifier_model) identifier_model
(identifier_codename_tpls) identifier_codename_tpls
)parameters
(block
(if_statement
(identifier_codename_t... | Creates custom permissions on model "model". |
(module
(function_definition
(function_name_apply_command) function_name_apply_command
(parameters
(identifier_self) identifier_self
(identifier_cmd) identifier_cmd
)parameters
(block
(if_statement
(identifier_cmd) identifier_cmd
(block
(if_statement
... | applies a command
This calls the pre and post hooks attached to the command,
as well as :meth:`cmd.apply`.
:param cmd: an applicable command
:type cmd: :class:`~alot.commands.Command` |
(module
(function_definition
(function_name_add_record) function_name_add_record
(parameters
(identifier_post_id) identifier_post_id
(identifier_catalog_id) identifier_catalog_id
(default_parameter
(identifier_order) identifier_order
(integer_0) integer_0
)default_param... | Create the record of post 2 tag, and update the count in g_tag. |
(module
(function_definition
(function_name_register_piece) function_name_register_piece
(parameters
(identifier_self) identifier_self
(identifier_from_address) identifier_from_address
(identifier_to_address) identifier_to_address
(identifier_hash) identifier_hash
(identifier_pas... | Register a piece
Args:
from_address (Tuple[str]): Federation address. All register transactions
originate from the the Federation wallet
to_address (str): Address registering the edition
hash (Tuple[str]): Hash of the piece. (file_hash, file_hash_metadata)
... |
(module
(function_definition
(function_name_debug) function_name_debug
(parameters
(list_splat_pattern
(identifier_args) identifier_args
)list_splat_pattern
)parameters
(block
(for_statement
(identifier_i) identifier_i
(identifier_args) identifier_args
... | Send debug messages to the Maltego console. |
(module
(function_definition
(function_name_amount) function_name_amount
(parameters
(identifier_self) identifier_self
(identifier_amount) identifier_amount
)parameters
(block
(if_statement
(comparison_operator
(identifier_amount) identifier_amount
(None) ... | Sets the amount of this Money.
The amount of money, in the smallest denomination of the currency indicated by `currency`. For example, when `currency` is `USD`, `amount` is in cents.
:param amount: The amount of this Money.
:type: int |
(module
(function_definition
(function_name_item_options) function_name_item_options
(parameters
(identifier_self) identifier_self
(dictionary_splat_pattern
(identifier_kwargs) identifier_kwargs
)dictionary_splat_pattern
)parameters
(block
(expression_statement
... | Handle collection OPTIONS request.
Singular route requests are handled a bit differently because
singular views may handle POST requests despite being registered
as item routes. |
(module
(function_definition
(function_name_prepare) function_name_prepare
(parameters
(identifier_cls) identifier_cls
)parameters
(block
(if_statement
(call
(attribute
(identifier_cls) identifier_cls
(identifier__ask_openapi) identifier__ask_opena... | Prepare NApp to be uploaded by creating openAPI skeleton. |
(module
(function_definition
(function_name_get_diff_endpoints_from_commit_range) function_name_get_diff_endpoints_from_commit_range
(parameters
(identifier_repo) identifier_repo
(identifier_commit_range) identifier_commit_range
)parameters
(block
(if_statement
(not_operator
... | Get endpoints of a diff given a commit range
The resulting endpoints can be diffed directly::
a, b = get_diff_endpoints_from_commit_range(repo, commit_range)
a.diff(b)
For details on specifying git diffs, see ``git diff --help``.
For details on specifying revisions, see ``git help revisio... |
(module
(function_definition
(function_name_authenticate) function_name_authenticate
(parameters
(identifier_self) identifier_self
(identifier_user) identifier_user
(identifier_password) identifier_password
)parameters
(block
(assert_statement
(comparison_operator
... | Authenticate user. |
(module
(function_definition
(function_name_add_arguments) function_name_add_arguments
(parameters
(identifier_self) identifier_self
(identifier_parser) identifier_parser
)parameters
(block
(expression_statement
(assignment
(identifier_subparsers) identifier_subpars... | Entry point for subclassed commands to add custom arguments. |
(module
(function_definition
(function_name_toggle_concatenate) function_name_toggle_concatenate
(parameters
(identifier_self) identifier_self
)parameters
(block
(if_statement
(not_operator
(parenthesized_expression
(boolean_operator
(call
... | Enable and disable concatenation options. |
(module
(function_definition
(function_name_convert_machine_list_time_val) function_name_convert_machine_list_time_val
(parameters
(typed_parameter
(identifier_text) identifier_text
(type
(identifier_str) identifier_str
)type
)typed_parameter
)parameters
(... | Convert RFC 3659 time-val to datetime objects. |
(module
(function_definition
(function_name__zoom_rows) function_name__zoom_rows
(parameters
(identifier_self) identifier_self
(identifier_zoom) identifier_zoom
)parameters
(block
(expression_statement
(call
(attribute
(attribute
(identifie... | Zooms grid rows |
(module
(function_definition
(function_name_bulk_copy) function_name_bulk_copy
(parameters
(identifier_self) identifier_self
(identifier_ids) identifier_ids
)parameters
(block
(expression_statement
(assignment
(identifier_schema) identifier_schema
(call
... | Bulk copy a set of devices.
:param ids: Int list of device IDs.
:return: :class:`devices.Device <devices.Device>` list |
(module
(function_definition
(function_name_configure) function_name_configure
(parameters
(identifier_self) identifier_self
(identifier_options) identifier_options
(identifier_conf) identifier_conf
)parameters
(block
(expression_statement
(assignment
(attribu... | Configure plugin. Plugin is enabled by default. |
(module
(function_definition
(function_name__make) function_name__make
(parameters
(identifier_c) identifier_c
)parameters
(block
(expression_statement
(assignment
(identifier_ann) identifier_ann
(call
(identifier_defaultdict) identifier_defaultdict
... | create html from template, adding figure,
annotation and sequences counts |
(module
(function_definition
(function_name_get_objects) function_name_get_objects
(parameters
(identifier_self) identifier_self
)parameters
(block
(return_statement
(call
(attribute
(attribute
(attribute
(attribute
... | Returns the list of objects passed as this parameter |
(module
(function_definition
(function_name_edit) function_name_edit
(parameters
(identifier_filename) identifier_filename
(identifier_identifier) identifier_identifier
(identifier_data) identifier_data
)parameters
(block
(with_statement
(with_clause
(with_ite... | Update an entry in a BibTeX file.
:param filename: The name of the BibTeX file to edit.
:param identifier: The id of the entry to update, in the BibTeX file.
:param data: A dict associating fields and updated values. Fields present \
in the BibTeX file but not in this dict will be kept as is. |
(module
(function_definition
(function_name_pretty_print) function_name_pretty_print
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_indent) identifier_indent
(integer_0) integer_0
)default_parameter
)parameters
(block
(expression_st... | Print the document without tags using indentation |
(module
(function_definition
(function_name_basic_auth) function_name_basic_auth
(parameters
(identifier_self) identifier_self
(identifier_username) identifier_username
(identifier_password) identifier_password
)parameters
(block
(if_statement
(not_operator
(p... | Set the Basic Auth credentials on this Session.
:param str username: Your GitHub username
:param str password: Your GitHub password |
(module
(function_definition
(function_name_searchEnterpriseGroups) function_name_searchEnterpriseGroups
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_searchFilter) identifier_searchFilter
(string_"") string_""
)default_parameter
(default_... | This operation searches groups in the configured enterprise group
store. You can narrow down the search using the search filter
parameter.
Parameters:
searchFilter - text value to narrow the search down
maxCount - maximum number of records to return |
(module
(function_definition
(function_name_validation_statuses) function_name_validation_statuses
(parameters
(identifier_self) identifier_self
(identifier_area_uuid) identifier_area_uuid
)parameters
(block
(expression_statement
(assignment
(identifier_path) identi... | Get count of validation statuses for all files in upload_area
:param str area_uuid: A RFC4122-compliant ID for the upload area
:return: a dict with key for each state and value being the count of files in that state
:rtype: dict
:raises UploadApiException: if information could not be ob... |
(module
(function_definition
(function_name_get_callproc_signature) function_name_get_callproc_signature
(parameters
(identifier_self) identifier_self
(identifier_name) identifier_name
(identifier_param_types) identifier_param_types
)parameters
(block
(if_statement
(cal... | Returns a procedure's signature from the name and list of types.
:name: the name of the procedure
:params: can be either strings, or 2-tuples. 2-tuples must be of the form (name, db_type).
:return: the procedure's signature |
(module
(function_definition
(function_name_diff) function_name_diff
(parameters
(identifier_x) identifier_x
(default_parameter
(identifier_lag) identifier_lag
(integer_1) integer_1
)default_parameter
(default_parameter
(identifier_differences) identifier_differ... | Difference an array.
A python implementation of the R ``diff`` function [1]. This computes lag
differences from an array given a ``lag`` and ``differencing`` term.
If ``x`` is a vector of length :math:`n`, ``lag=1`` and ``differences=1``,
then the computed result is equal to the successive differences... |
(module
(function_definition
(function_name_parse_macro_params) function_name_parse_macro_params
(parameters
(identifier_token) identifier_token
)parameters
(block
(try_statement
(block
(expression_statement
(assignment
(identifier_bits) identifi... | Common parsing logic for both use_macro and macro_block |
(module
(function_definition
(function_name_get_local_user) function_name_get_local_user
(parameters
)parameters
(block
(import_statement
(dotted_name
(identifier_getpass) identifier_getpass
)dotted_name
)import_statement
(expression_statement
(assig... | Return the local executing username, or ``None`` if one can't be found.
.. versionadded:: 2.0 |
(module
(function_definition
(function_name_visit_ImportFrom) function_name_visit_ImportFrom
(parameters
(identifier_self) identifier_self
(identifier_node) identifier_node
)parameters
(block
(if_statement
(attribute
(identifier_node) identifier_node
(iden... | Check validity of imported functions.
Check:
- no level specific value are provided.
- a module is provided
- module/submodule exists in MODULES
- imported function exists in the given module/submodule |
(module
(function_definition
(function_name__gen_keys_from_multicol_key) function_name__gen_keys_from_multicol_key
(parameters
(identifier_key_multicol) identifier_key_multicol
(identifier_n_keys) identifier_n_keys
)parameters
(block
(expression_statement
(assignment
... | Generates single-column keys from multicolumn key. |
(module
(function_definition
(function_name__set_categories) function_name__set_categories
(parameters
(identifier_self) identifier_self
(identifier_categories) identifier_categories
(default_parameter
(identifier_fastpath) identifier_fastpath
(False) False
)default_par... | Sets new categories inplace
Parameters
----------
fastpath : bool, default False
Don't perform validation of the categories for uniqueness or nulls
Examples
--------
>>> c = pd.Categorical(['a', 'b'])
>>> c
[a, b]
Categories (2, object... |
(module
(function_definition
(function_name_current_time) function_name_current_time
(parameters
(identifier_self) identifier_self
)parameters
(type
(identifier_datetime) identifier_datetime
)type
(block
(expression_statement
(assignment
(identifier__date) i... | Extract current time. |
(module
(function_definition
(function_name_pdf_doc_info) function_name_pdf_doc_info
(parameters
(identifier_instance) identifier_instance
)parameters
(block
(for_statement
(pattern_list
(identifier_key) identifier_key
(identifier_obj) identifier_obj
)pa... | Ensure the keys of the 'document_info_dict' property of the pdf-ext
extension of file objects are only valid PDF Document Information
Dictionary Keys. |
(module
(function_definition
(function_name_update_source) function_name_update_source
(parameters
(identifier_self) identifier_self
(dictionary_splat_pattern
(identifier_kwargs) identifier_kwargs
)dictionary_splat_pattern
)parameters
(block
(expression_statement
... | Set BGP update source property for a neighbor.
This method currently only supports loopback interfaces.
Args:
vrf (str): The VRF for this BGP process.
rbridge_id (str): The rbridge ID of the device on which BGP will be
configured in a VCS fabric.
nei... |
(module
(function_definition
(function_name_set_wsgi_params) function_name_set_wsgi_params
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_module) identifier_module
(None) None
)default_parameter
(default_parameter
(identifier_callab... | Set wsgi related parameters.
:param str|unicode module:
* load .wsgi file as the Python application
* load a WSGI module as the application.
.. note:: The module (sans ``.py``) must be importable, ie. be in ``PYTHONPATH``.
Examples:
* mypackage.... |
(module
(function_definition
(function_name__exec_cleanup) function_name__exec_cleanup
(parameters
(identifier_self) identifier_self
(identifier_cursor) identifier_cursor
(identifier_fd) identifier_fd
)parameters
(block
(expression_statement
(call
(attribute
... | Close the cursor, remove any references to the fd in internal state
and remove the fd from the ioloop.
:param psycopg2.extensions.cursor cursor: The cursor to close
:param int fd: The connection file descriptor |
(module
(function_definition
(function_name__on_connect) function_name__on_connect
(parameters
(identifier_self) identifier_self
(identifier_sequence) identifier_sequence
(identifier_topic) identifier_topic
(identifier_message) identifier_message
)parameters
(block
(try_s... | Process a request to connect to an IOTile device
A connection message triggers an attempt to connect to a device,
any error checking is done by the DeviceManager that is actually
managing the devices.
A disconnection message is checked to make sure its key matches
what we excep... |
(module
(function_definition
(function_name_create_build_configuration_set_raw) function_name_create_build_configuration_set_raw
(parameters
(dictionary_splat_pattern
(identifier_kwargs) identifier_kwargs
)dictionary_splat_pattern
)parameters
(block
(expression_statement
... | Create a new BuildConfigurationSet. |
(module
(function_definition
(function_name__extract_methods) function_name__extract_methods
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_service) identifier_service
(attribute
(identi... | Obtains the methods used in the service. |
(module
(function_definition
(function_name_send) function_name_send
(parameters
(identifier_self) identifier_self
(identifier_text) identifier_text
(default_parameter
(identifier_thread_ts) identifier_thread_ts
(None) None
)default_parameter
)parameters
(block
... | Send a reply using RTM API
(This function doesn't supports formatted message
when using a bot integration) |
(module
(function_definition
(function_name_valid_header_waiting) function_name_valid_header_waiting
(parameters
(identifier_self) identifier_self
)parameters
(block
(if_statement
(comparison_operator
(call
(identifier_len) identifier_len
(argument... | Check if a valid header is waiting in buffer |
(module
(function_definition
(function_name_transaction) function_name_transaction
(parameters
(identifier_self) identifier_self
(identifier_compare) identifier_compare
(default_parameter
(identifier_success) identifier_success
(None) None
)default_parameter
(defa... | Perform a transaction.
Example usage:
.. code-block:: python
etcd.transaction(
compare=[
etcd.transactions.value('/doot/testing') == 'doot',
etcd.transactions.version('/doot/testing') > 0,
],
success=[... |
(module
(function_definition
(function_name_go_offline) function_name_go_offline
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_comment) identifier_comment
(None) None
)default_parameter
)parameters
(block
(expression_statement
... | Executes a Go-Offline operation on the specified node
:param str comment: optional comment to audit
:raises NodeCommandFailed: offline not available
:return: None |
(module
(function_definition
(function_name__parse) function_name__parse
(parameters
(identifier_reactor) identifier_reactor
(identifier_directory) identifier_directory
(identifier_pemdir) identifier_pemdir
(list_splat_pattern
(identifier_args) identifier_args
)list_splat... | Parse a txacme endpoint description.
:param reactor: The Twisted reactor.
:param directory: ``twisted.python.url.URL`` for the ACME directory to use
for issuing certs.
:param str pemdir: The path to the certificate directory to use. |
(module
(function_definition
(function_name_send_post) function_name_send_post
(parameters
(identifier_config) identifier_config
(identifier_urlpath) identifier_urlpath
(identifier_post_data) identifier_post_data
)parameters
(block
(expression_statement
(assignment
... | Send POST data to an OpenSubmit server url path,
according to the configuration. |
(module
(function_definition
(function_name_insort_event_right) function_name_insort_event_right
(parameters
(identifier_self) identifier_self
(identifier_event) identifier_event
(default_parameter
(identifier_lo) identifier_lo
(integer_0) integer_0
)default_parameter
... | Insert event in queue, and keep it sorted assuming queue is sorted.
If event is already in queue, insert it to the right of the rightmost
event (to keep FIFO order).
Optional args lo (default 0) and hi (default len(a)) bound the
slice of a to be searched.
Args:
event: a (time in sec since u... |
(module
(function_definition
(function_name_fullqualname_py2) function_name_fullqualname_py2
(parameters
(identifier_obj) identifier_obj
)parameters
(block
(if_statement
(comparison_operator
(attribute
(call
(identifier_type) identifier_type
... | Fully qualified name for objects in Python 2. |
(module
(function_definition
(function_name_run) function_name_run
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_model) identifier_model
(call
(identifier_Model) identifier_Model
... | Parse the script file.
:rtype: :py:class:`~turberfield.dialogue.model.Model` |
(module
(function_definition
(function_name_int) function_name_int
(parameters
(identifier_self) identifier_self
(list_splat_pattern
(identifier_args) identifier_args
)list_splat_pattern
)parameters
(block
(return_statement
(call
(attribute
... | Returns a random int between -sys.maxint and sys.maxint
INT
%{INT} -> '1245123'
%{INT:10} -> '10000000'
%{INT:10,20} -> '19' |
(module
(function_definition
(function_name__check_subnet) function_name__check_subnet
(parameters
(identifier_self) identifier_self
(identifier_name) identifier_name
)parameters
(block
(expression_statement
(assignment
(identifier_subnets) identifier_subnets
... | Checks if the subnet exists.
:param str name: name of the subnet
:return: str - subnet id of the subnet
:raises: `SubnetError` if group does not exist |
(module
(function_definition
(function_name_get_and_subtract) function_name_get_and_subtract
(parameters
(identifier_self) identifier_self
(identifier_delta) identifier_delta
)parameters
(block
(return_statement
(call
(attribute
(identifier_self) identif... | Subtracts the given value from the current value and returns the previous value.
:raises NoDataMemberInClusterError: if the cluster does not contain any data members.
:raises UnsupportedOperationError: if the cluster version is less than 3.10.
:raises ConsistencyLostError: if the session guaran... |
(module
(function_definition
(function_name_prepare_content_length) function_name_prepare_content_length
(parameters
(identifier_self) identifier_self
(identifier_body) identifier_body
)parameters
(block
(if_statement
(comparison_operator
(identifier_body) identifie... | Prepare Content-Length header based on request method and body |
(module
(function_definition
(function_name__calculate_new_overlap) function_name__calculate_new_overlap
(parameters
(identifier_stride) identifier_stride
(identifier_traj_len) identifier_traj_len
(identifier_skip) identifier_skip
)parameters
(block
(expression_statement
... | Given two trajectories T_1 and T_2, this function calculates for the first trajectory an overlap, i.e.,
a skip parameter for T_2 such that the trajectory fragments T_1 and T_2 appear as one under the given stride.
Idea for deriving the formula: It is
K = ((traj_len - skip - 1) // stride + 1) =... |
(module
(function_definition
(function_name__get_elevation) function_name__get_elevation
(parameters
(identifier_self) identifier_self
(identifier_location) identifier_location
)parameters
(block
(expression_statement
(assignment
(identifier_url) identifier_url
... | Query the elevation information with the latitude and longitude of
the specified `location`. |
(module
(function_definition
(function_name_readerForFd) function_name_readerForFd
(parameters
(identifier_fd) identifier_fd
(identifier_URL) identifier_URL
(identifier_encoding) identifier_encoding
(identifier_options) identifier_options
)parameters
(block
(expression_st... | Create an xmltextReader for an XML from a file descriptor.
The parsing flags @options are a combination of
xmlParserOption. NOTE that the file descriptor will not be
closed when the reader is closed or reset. |
(module
(function_definition
(function_name_parse_pagination) function_name_parse_pagination
(parameters
(identifier_headers) identifier_headers
)parameters
(block
(expression_statement
(assignment
(identifier_links) identifier_links
(dictionary_comprehension
... | Parses headers to create a pagination objects
:param headers: HTTP Headers
:type headers: dict
:return: Navigation object for pagination
:rtype: _Navigation |
(module
(function_definition
(function_name_collect_consequences) function_name_collect_consequences
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_consequences) identifier_consequences
(set
... | Recursively collect a set of _ReferenceKeys that would
consequentially get dropped if this were dropped via
"drop ... cascade".
:return Set[_ReferenceKey]: All the relations that would be dropped |
(module
(function_definition
(function_name__cmd_down) function_name__cmd_down
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_revision) identifier_revision
(call
(attribute
... | Downgrade to a revision |
(module
(function_definition
(function_name_instant_articles) function_name_instant_articles
(parameters
(identifier_self) identifier_self
(dictionary_splat_pattern
(identifier_kwargs) identifier_kwargs
)dictionary_splat_pattern
)parameters
(block
(expression_statement
... | QuerySet including all published content approved for instant articles.
Instant articles are configured via FeatureType. FeatureType.instant_article = True. |
(module
(function_definition
(function_name_parse_substring) function_name_parse_substring
(parameters
(identifier_allele) identifier_allele
(identifier_pred) identifier_pred
(default_parameter
(identifier_max_len) identifier_max_len
(None) None
)default_parameter
)... | Extract substring of letters for which predicate is True |
(module
(function_definition
(function_name_set_cache_expiry) function_name_set_cache_expiry
(parameters
(identifier_response) identifier_response
)parameters
(block
(if_statement
(boolean_operator
(comparison_operator
(attribute
(attribute
... | Set the cache control headers |
(module
(function_definition
(function_name_contains_any) function_name_contains_any
(parameters
(identifier_self) identifier_self
(identifier_other) identifier_other
)parameters
(block
(return_statement
(boolean_operator
(comparison_operator
(attribute
... | Check if any flags are set.
(OsuMod.Hidden | OsuMod.HardRock) in flags # Check if either hidden or hardrock are enabled.
OsuMod.keyMod in flags # Check if any keymod is enabled. |
(module
(function_definition
(function_name_md5_for_file) function_name_md5_for_file
(parameters
(identifier_f) identifier_f
(default_parameter
(identifier_block_size) identifier_block_size
(binary_operator
(integer_2) integer_2
(integer_20) integer_20
)... | Generate an MD5 has for a possibly large file by breaking it into
chunks. |
(module
(function_definition
(function_name_runExperiment) function_name_runExperiment
(parameters
(identifier_self) identifier_self
(identifier_e) identifier_e
)parameters
(block
(expression_statement
(assignment
(identifier_space) identifier_space
(call
... | Run the experiment across the parameter space in parallel using
all the engines in the cluster. This method returns immediately.
The experiments are run asynchronously, with the points in the parameter
space being explored randomly so that intermediate retrievals of results
are more rep... |
(module
(function_definition
(function_name_get_project_build) function_name_get_project_build
(parameters
(identifier_account_project) identifier_account_project
)parameters
(block
(expression_statement
(assignment
(identifier_url) identifier_url
(call
... | Get the details of the latest Appveyor build. |
(module
(function_definition
(function_name_do_local) function_name_do_local
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_host) identifier_host
(string_"localhost") string_"localhost"
)default_parameter
(default_parameter
(identif... | Connect to a local DynamoDB instance. Use 'local off' to disable.
> local
> local host=localhost port=8001
> local off |
(module
(function_definition
(function_name_from_vhost) function_name_from_vhost
(parameters
(identifier_cls) identifier_cls
(identifier_vhost) identifier_vhost
)parameters
(block
(expression_statement
(assignment
(identifier_result) identifier_result
(cal... | Retrieve paas instance id associated to a vhost. |
(module
(function_definition
(function_name__get_all_timers) function_name__get_all_timers
(parameters
(identifier_self) identifier_self
(identifier_dataframe) identifier_dataframe
)parameters
(block
(expression_statement
(assignment
(identifier_s) identifier_s
... | Get all timers and set them in the _timers_values property
:param pandas.DataFrame dataframe: the main dataframe with row results |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.