sequence stringlengths 557 12.7k | docstring stringlengths 4 15.2k |
|---|---|
(module
(function_definition
(function_name__write_multiplicons) function_name__write_multiplicons
(parameters
(identifier_self) identifier_self
(identifier_filename) identifier_filename
)parameters
(block
(expression_statement
(assignment
(identifier_mhead) identif... | Write multiplicons to file.
- filename, (str) location of output file |
(module
(function_definition
(function_name__parse_prefix_query) function_name__parse_prefix_query
(parameters
(identifier_self) identifier_self
(identifier_query_str) identifier_query_str
)parameters
(block
(expression_statement
(assignment
(identifier_sp) identifi... | Parse a smart search query for prefixes
This is a helper function to smart_search_prefix for easier unit
testing of the parser. |
(module
(function_definition
(function_name_get_history) function_name_get_history
(parameters
(identifier_self) identifier_self
)parameters
(block
(if_statement
(call
(identifier_hasattr) identifier_hasattr
(argument_list
(identifier_self) identifie... | Returns the history from cache or DB or a newly created one. |
(module
(function_definition
(function_name_to_representation) function_name_to_representation
(parameters
(identifier_self) identifier_self
(identifier_value) identifier_value
)parameters
(block
(expression_statement
(assignment
(identifier_value) identifier_value
... | Project outgoing native value. |
(module
(function_definition
(function_name_find_one) function_name_find_one
(parameters
(identifier_self) identifier_self
(identifier_collection) identifier_collection
(default_parameter
(identifier_selector) identifier_selector
(dictionary
)dictionary
)default... | Return one item from a collection
Arguments:
collection - collection to search
Keyword Arguments:
selector - the query (default returns first item found) |
(module
(function_definition
(function_name_get_leading_spaces) function_name_get_leading_spaces
(parameters
(identifier_data) identifier_data
)parameters
(block
(expression_statement
(assignment
(identifier_spaces) identifier_spaces
(string_'') string_''
... | Get the leading space of a string if it is not empty
:type data: str |
(module
(function_definition
(function_name_check_link_and_get_info) function_name_check_link_and_get_info
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_target_id) identifier_target_id
(integer_0xFF) integer_0xFF
)default_parameter
)paramete... | Try to get a connection with the bootloader by requesting info
5 times. This let roughly 10 seconds to boot the copter ... |
(module
(function_definition
(function_name_get_urls) function_name_get_urls
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_urls) identifier_urls
(call
(attribute
(call
... | Add ``layout_placeholder_data`` URL. |
(module
(function_definition
(function_name_check_for_invalid_columns) function_name_check_for_invalid_columns
(parameters
(typed_parameter
(identifier_problems) identifier_problems
(type
(identifier_List) identifier_List
)type
)typed_parameter
(typed_parame... | Check for invalid columns in the given GTFS DataFrame.
Parameters
----------
problems : list
A four-tuple containing
1. A problem type (string) equal to ``'error'`` or ``'warning'``;
``'error'`` means the GTFS is violated;
``'warning'`` means there is a problem but it... |
(module
(function_definition
(function_name_ssad) function_name_ssad
(parameters
(identifier_patch) identifier_patch
(identifier_cols) identifier_cols
(identifier_splits) identifier_splits
)parameters
(block
(expression_statement
(assignment
(identifier_sad_re... | Calculates an empirical intra-specific spatial abundance distribution
Parameters
----------
{0}
Returns
-------
{1} Result has one column giving the individuals of species in each
subplot.
Notes
-----
{2}
{3}
Examples
--------
{4}
>>> # Get the spatial ... |
(module
(function_definition
(function_name_handle_update) function_name_handle_update
(parameters
(identifier_self) identifier_self
(identifier_options) identifier_options
)parameters
(block
(expression_statement
(assignment
(identifier_username) identifier_usernam... | Update existing user |
(module
(function_definition
(function_name_rpc_stop) function_name_rpc_stop
(parameters
(identifier_server_state) identifier_server_state
)parameters
(block
(expression_statement
(assignment
(identifier_rpc_srv) identifier_rpc_srv
(subscript
(identi... | Stop the global RPC server thread |
(module
(function_definition
(function_name_update_nanopubstore_start_dt) function_name_update_nanopubstore_start_dt
(parameters
(typed_parameter
(identifier_url) identifier_url
(type
(identifier_str) identifier_str
)type
)typed_parameter
(typed_parameter
... | Add nanopubstore start_dt to belapi.state_mgmt collection
Args:
url: url of nanopubstore
start_dt: datetime of last query against nanopubstore for new ID's |
(module
(function_definition
(function_name_get_ordered_types) function_name_get_ordered_types
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_types) identifier_types
(call
(attribute
... | Returns the ordered list of data types
:return: list of data types |
(module
(function_definition
(function_name_create_simulated_env) function_name_create_simulated_env
(parameters
(identifier_output_dir) identifier_output_dir
(identifier_grayscale) identifier_grayscale
(identifier_resize_width_factor) identifier_resize_width_factor
(identifier_resize_... | Create SimulatedEnv with minimal subset of hparams. |
(module
(function_definition
(function_name_check_signature) function_name_check_signature
(parameters
(identifier_params) identifier_params
)parameters
(block
(if_statement
(comparison_operator
(string_'id') string_'id'
(identifier_params) identifier_params
... | Verify the signature of the parameters in an OTP v2.0 verify request.
Returns ValResultBool, Key |
(module
(function_definition
(function_name_remove_all_connections) function_name_remove_all_connections
(parameters
(identifier_provider_id) identifier_provider_id
)parameters
(block
(expression_statement
(assignment
(identifier_provider) identifier_provider
(c... | Remove all connections for the authenticated user to the
specified provider |
(module
(function_definition
(function_name_convert_general) function_name_convert_general
(parameters
(identifier_value) identifier_value
)parameters
(block
(if_statement
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier... | Take a python object and convert it to the format Imgur expects. |
(module
(function_definition
(function_name_lifetimes) function_name_lifetimes
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(identifier_r) identifier_r
)expression_statement
(return_statement
(binary_operator
(... | r""" Lifetimes of states of the hidden transition matrix
Returns
-------
l : ndarray(nstates)
state lifetimes in units of the input trajectory time step,
defined by :math:`-tau / ln | p_{ii} |, i = 1,...,nstates`, where
:math:`p_{ii}` are the diagonal entries... |
(module
(function_definition
(function_name_OnLabelSizeIntCtrl) function_name_OnLabelSizeIntCtrl
(parameters
(identifier_self) identifier_self
(identifier_event) identifier_event
)parameters
(block
(expression_statement
(assignment
(subscript
(attribute
... | Label size IntCtrl event handler |
(module
(function_definition
(function_name_set_cols_align) function_name_set_cols_align
(parameters
(identifier_self) identifier_self
(identifier_array) identifier_array
)parameters
(block
(expression_statement
(call
(attribute
(identifier_self) identif... | Set the desired columns alignment
- the elements of the array should be either "l", "c" or "r":
* "l": column flushed left
* "c": column centered
* "r": column flushed right |
(module
(function_definition
(function_name_set_permission) function_name_set_permission
(parameters
(identifier_permission) identifier_permission
(identifier_value) identifier_value
(identifier_app) identifier_app
)parameters
(block
(expression_statement
(assignment
... | Set a permission for the specified app
Value should be 'deny' or 'allow' |
(module
(function_definition
(function_name_update_redis) function_name_update_redis
(parameters
(typed_parameter
(identifier_project) identifier_project
(type
(identifier_str) identifier_str
)type
)typed_parameter
(typed_parameter
(identifier_enviro... | Update redis state for a feature flag.
:param project: LaunchDarkly project key.
:param environment: LaunchDarkly environment key.
:param feature: LaunchDarkly feature key.
:param state: State for a feature flag. |
(module
(function_definition
(function_name_wait_until_stale) function_name_wait_until_stale
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_timeout) identifier_timeout
(None) None
)default_parameter
)parameters
(block
(expression_st... | Waits for the element to go stale in the DOM
@type timeout: int
@param timeout: override for default timeout
@rtype: WebElementWrapper
@return: Self |
(module
(function_definition
(function_name__determine_leftpad) function_name__determine_leftpad
(parameters
(identifier_column) identifier_column
(identifier_point_place) identifier_point_place
)parameters
(block
(expression_statement
(assignment
(identifier_ndigit... | Find how many spaces to put before a column of numbers
so that all the decimal points line up
This function takes a column of decimal numbers, and returns a
vector containing the number of spaces to place before each number
so that (when possible) the decimal points line up.
Parameters
---... |
(module
(function_definition
(function_name_input_file) function_name_input_file
(parameters
(identifier_self) identifier_self
(identifier__container) identifier__container
)parameters
(block
(expression_statement
(assignment
(identifier_p) identifier_p
(c... | Find the input path of a uchroot container. |
(module
(function_definition
(function_name___get_smtp) function_name___get_smtp
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_use_tls) identifier_use_tls
(subscript
(attribute
... | Return the appropraite smtplib depending on wherther we're using TLS |
(module
(function_definition
(function_name_doDynamicValidation) function_name_doDynamicValidation
(parameters
(identifier_self) identifier_self
(typed_parameter
(identifier_request) identifier_request
(type
(identifier_Request) identifier_Request
)type
)typ... | State based validation |
(module
(function_definition
(function_name_parse_http_response) function_name_parse_http_response
(parameters
(typed_parameter
(identifier_http_response) identifier_http_response
(type
(identifier_HttpResponse) identifier_HttpResponse
)type
)typed_parameter
)... | Returns a Cauldron response object parsed from the serialized JSON data
specified in the http_response argument. If the response doesn't contain
valid Cauldron response data, an error Cauldron response object is
returned instead.
:param http_response:
The response object from an http request th... |
(module
(function_definition
(function_name_sg_sugar_func) function_name_sg_sugar_func
(parameters
(identifier_func) identifier_func
)parameters
(block
(expression_statement
(identifier_r) identifier_r
)expression_statement
(decorated_definition
(decorator
... | r""" Decorates a function `func` so that it can be a sugar function.
Sugar function can be used in a chainable manner.
Args:
func: function to decorate
Returns:
A sugar function. |
(module
(function_definition
(function_name_get_longest_table) function_name_get_longest_table
(parameters
(default_parameter
(identifier_url) identifier_url
(string_'https://www.openoffice.org/dev_docs/source/file_extensions.html') string_'https://www.openoffice.org/dev_docs/source/file... | Retrieve the HTML tables from a URL and return the longest DataFrame found
>>> get_longest_table('https://en.wikipedia.org/wiki/List_of_sovereign_states').columns
Index(['Common and formal names', 'Membership within the UN System[a]',
'Sovereignty dispute[b]',
'Further information on status and r... |
(module
(function_definition
(function_name_is_visa_electron) function_name_is_visa_electron
(parameters
(identifier_n) identifier_n
)parameters
(block
(expression_statement
(assignment
(pattern_list
(identifier_n) identifier_n
(identifier_length) ... | Checks if credit card number fits the visa electron format. |
(module
(function_definition
(function_name_dePeriod) function_name_dePeriod
(parameters
(identifier_arr) identifier_arr
)parameters
(block
(expression_statement
(assignment
(identifier_diff) identifier_diff
(binary_operator
(identifier_arr) identifi... | make an array of periodic angles increase linearly |
(module
(function_definition
(function_name_encode) function_name_encode
(parameters
(identifier_self) identifier_self
(identifier_inputs) identifier_inputs
(default_parameter
(identifier_states) identifier_states
(None) None
)default_parameter
(default_parameter
... | Encode the input sequence.
Parameters
----------
inputs : NDArray
states : list of NDArrays or None, default None
valid_length : NDArray or None, default None
Returns
-------
outputs : list
Outputs of the encoder. |
(module
(function_definition
(function_name_vi_return_param) function_name_vi_return_param
(parameters
(identifier_self) identifier_self
(identifier_index) identifier_index
)parameters
(block
(if_statement
(comparison_operator
(identifier_index) identifier_index
... | Wrapper function for selecting appropriate latent variable for variational inference
Parameters
----------
index : int
0 or 1 depending on which latent variable
Returns
----------
The appropriate indexed parameter |
(module
(function_definition
(function_name_setData) function_name_setData
(parameters
(identifier_self) identifier_self
(typed_parameter
(identifier_type) identifier_type
(type
(identifier_str) identifier_str
)type
)typed_parameter
(typed_parameter
... | Set data of type format.
:arg str type: Data format of the data, like 'text/plain'. |
(module
(function_definition
(function_name_finish) function_name_finish
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifie... | Creates block of content with lines
belonging to fragment. |
(module
(function_definition
(function_name__ondim) function_name__ondim
(parameters
(identifier_self) identifier_self
(identifier_dimension) identifier_dimension
(identifier_valuestring) identifier_valuestring
)parameters
(block
(try_statement
(block
(express... | Converts valuestring to int and assigns result to self.dim
If there is an error (such as an empty valuestring) or if
the value is < 1, the value 1 is assigned to self.dim
Parameters
----------
dimension: int
\tDimension that is to be updated. Must be in [1:4]
v... |
(module
(function_definition
(function_name_relative) function_name_relative
(parameters
(identifier_self) identifier_self
)parameters
(block
(if_statement
(not_operator
(call
(attribute
(identifier_self) identifier_self
(identifier... | Return a relative part of the URL.
scheme, user, password, host and port are removed. |
(module
(function_definition
(function_name_xrb_address_to_public_key) function_name_xrb_address_to_public_key
(parameters
(identifier_address) identifier_address
)parameters
(block
(expression_statement
(assignment
(identifier_address) identifier_address
(call
... | Convert an xrb address to public key in bytes
>>> xrb_address_to_public_key('xrb_1e3i81r51e3i81r51e3i81r51e3i'\
'81r51e3i81r51e3i81r51e3imxssakuq')
b'00000000000000000000000000000000'
:param address: xrb address
:type address: bytes
:return: public key in bytes
... |
(module
(function_definition
(function_name_check_espeak) function_name_check_espeak
(parameters
(identifier_cls) identifier_cls
)parameters
(block
(try_statement
(block
(import_from_statement
(dotted_name
(identifier_aeneas) identifier_aeneas
... | Check whether ``espeak`` can be called.
Return ``True`` on failure and ``False`` on success.
:rtype: bool |
(module
(function_definition
(function_name_surrounding_nodes) function_name_surrounding_nodes
(parameters
(identifier_self) identifier_self
(identifier_position) identifier_position
)parameters
(block
(expression_statement
(assignment
(pattern_list
(ide... | Returns nearest node indices and direction of opposite node.
:param position: Position inside the mesh to search nearest node for as (x,y,z)
:return: Nearest node indices and direction of opposite node. |
(module
(function_definition
(function_name_excluded_length) function_name_excluded_length
(parameters
(identifier_self) identifier_self
)parameters
(block
(return_statement
(call
(identifier_sum) identifier_sum
(argument_list
(list_comprehension
... | Surveyed length which does not count toward the included total |
(module
(function_definition
(function_name_validate) function_name_validate
(parameters
(identifier_self) identifier_self
(identifier_cmd) identifier_cmd
(default_parameter
(identifier_messages) identifier_messages
(None) None
)default_parameter
)parameters
(bl... | Returns True if the given Command is valid, False otherwise.
Validation error messages are appended to an optional messages
array. |
(module
(function_definition
(function_name_reread) function_name_reread
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(call
(attribute
(identifier_logger) identifier_logger
(identifier_debug) identifier_deb... | Read and parse credentials file.
If something goes wrong, log exception and continue. |
(module
(function_definition
(function_name__generate_feed) function_name__generate_feed
(parameters
(identifier_self) identifier_self
(identifier_feed_data) identifier_feed_data
)parameters
(block
(expression_statement
(assignment
(identifier_atom_feed) identifier_... | render feed file with data |
(module
(function_definition
(function_name_run) function_name_run
(parameters
(identifier_self) identifier_self
(identifier_gates) identifier_gates
(identifier_n_qubits) identifier_n_qubits
(list_splat_pattern
(identifier_args) identifier_args
)list_splat_pattern
(... | Run the backend. |
(module
(function_definition
(function_name_ones_comp_sum16) function_name_ones_comp_sum16
(parameters
(typed_parameter
(identifier_num1) identifier_num1
(type
(identifier_int) identifier_int
)type
)typed_parameter
(typed_parameter
(identifier_num2) ... | Calculates the 1's complement sum for 16-bit numbers.
Args:
num1: 16-bit number.
num2: 16-bit number.
Returns:
The calculated result. |
(module
(function_definition
(function_name_to_struct) function_name_to_struct
(parameters
(identifier_self) identifier_self
(identifier_value) identifier_value
)parameters
(block
(if_statement
(attribute
(identifier_self) identifier_self
(identifier_str_f... | Cast `date` object to string. |
(module
(function_definition
(function_name_disable_component) function_name_disable_component
(parameters
(identifier_self) identifier_self
(identifier_component) identifier_component
)parameters
(block
(if_statement
(not_operator
(call
(identifier_isin... | Force a component to be disabled.
:param component: can be a class or an instance. |
(module
(function_definition
(function_name__process_thread) function_name__process_thread
(parameters
(identifier_self) identifier_self
(identifier_client) identifier_client
)parameters
(block
(expression_statement
(assignment
(identifier_file_list) identifier_file... | Process a single client.
Args:
client: GRR client object to act on. |
(module
(function_definition
(function_name_AddExtraShapes) function_name_AddExtraShapes
(parameters
(identifier_extra_shapes_txt) identifier_extra_shapes_txt
(identifier_graph) identifier_graph
)parameters
(block
(expression_statement
(call
(identifier_print) ident... | Add extra shapes into our input set by parsing them out of a GTFS-formatted
shapes.txt file. Useful for manually adding lines to a shape file, since it's
a pain to edit .shp files. |
(module
(function_definition
(function_name_extract_zip) function_name_extract_zip
(parameters
(identifier_self) identifier_self
(identifier_suffix) identifier_suffix
(default_parameter
(identifier_path) identifier_path
(string_'.') string_'.'
)default_parameter
)pa... | Download and extract a zip artifact
@type suffix:
@param suffix:
@type path:
@param path: |
(module
(function_definition
(function_name_append) function_name_append
(parameters
(identifier_self) identifier_self
(identifier_row_or_table) identifier_row_or_table
)parameters
(block
(if_statement
(not_operator
(identifier_row_or_table) identifier_row_or_table
... | Append a row or all rows of a table. An appended table must have all
columns of self. |
(module
(function_definition
(function_name_capability_check) function_name_capability_check
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_optional) identifier_optional
(None) None
)default_parameter
(default_parameter
(identifier_... | Perform a server capability check. |
(module
(function_definition
(function_name_alpha) function_name_alpha
(parameters
(identifier_self) identifier_self
(identifier_theta_x) identifier_theta_x
(identifier_theta_y) identifier_theta_y
(identifier_kwargs_lens) identifier_kwargs_lens
(default_parameter
(identif... | reduced deflection angle
:param theta_x: angle in x-direction
:param theta_y: angle in y-direction
:param kwargs_lens: lens model kwargs
:return: |
(module
(function_definition
(function_name_normalize_text) function_name_normalize_text
(parameters
(identifier_self) identifier_self
(identifier_text) identifier_text
)parameters
(block
(if_statement
(not_operator
(attribute
(attribute
(i... | Normalize text, when fixed format is ON, replace the first 6 chars by a space. |
(module
(function_definition
(function_name_reverse_file) function_name_reverse_file
(parameters
(identifier_infile) identifier_infile
(identifier_outfile) identifier_outfile
)parameters
(block
(with_statement
(with_clause
(with_item
(as_pattern
... | Reverse the content of infile, write to outfile.
Both infile and outfile are filenames or filepaths. |
(module
(function_definition
(function_name_get_session) function_name_get_session
(parameters
(identifier_self) identifier_self
(identifier_account_id) identifier_account_id
)parameters
(block
(if_statement
(comparison_operator
(identifier_account_id) identifier_ac... | Get an active session in the target account. |
(module
(function_definition
(function_name_add_marker_to_qtl) function_name_add_marker_to_qtl
(parameters
(identifier_qtl) identifier_qtl
(identifier_map_list) identifier_map_list
)parameters
(block
(expression_statement
(assignment
(identifier_closest) identifier_... | Add the closest marker to the given QTL.
:arg qtl: a row of the QTL list.
:arg map_list: the genetic map containing the list of markers. |
(module
(function_definition
(function_name_readDivPressure) function_name_readDivPressure
(parameters
(identifier_fileName) identifier_fileName
)parameters
(block
(try_statement
(block
(expression_statement
(assignment
(identifier_df) identifier... | Reads in diversifying pressures from some file.
Scale diversifying pressure values so absolute value of the max value is 1,
unless all values are zero.
Args:
`fileName` (string or readable file-like object)
File holding diversifying pressure values. Can be
comma-, space-, o... |
(module
(function_definition
(function_name__mirror_groups_from_stormpath) function_name__mirror_groups_from_stormpath
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_APPLICATION) identifier_APPLICATION
... | Helper method for saving to the local db groups
that are missing but are on Stormpath |
(module
(function_definition
(function_name__load_greedy) function_name__load_greedy
(parameters
(identifier_self) identifier_self
(identifier_module_name) identifier_module_name
(identifier_dependencies) identifier_dependencies
(identifier_recursive) identifier_recursive
)paramete... | Keeps loading modules in the filepaths dictionary until all have
been loaded or the module is found. |
(module
(function_definition
(function_name__message_callback) function_name__message_callback
(parameters
(identifier_self) identifier_self
(identifier_msg) identifier_msg
)parameters
(block
(if_statement
(comparison_operator
(attribute
(identifier_msg)... | Callback function to handle incoming MIDI messages. |
(module
(function_definition
(function_name_derivatives_factory) function_name_derivatives_factory
(parameters
(identifier_cls) identifier_cls
(identifier_coef) identifier_coef
(identifier_domain) identifier_domain
(identifier_kind) identifier_kind
(dictionary_splat_pattern
... | Given some coefficients, return a the derivative of a certain kind of
orthogonal polynomial defined over a specific domain. |
(module
(function_definition
(function_name_merge_periods) function_name_merge_periods
(parameters
(identifier_data) identifier_data
)parameters
(block
(expression_statement
(assignment
(identifier_newdata) identifier_newdata
(call
(identifier_sorted... | Merge periods to have better continous periods.
Like 350-450, 400-600 => 350-600
:param data: list of periods
:type data: list
:return: better continous periods
:rtype: list |
(module
(function_definition
(function_name_create_header_from_telpars) function_name_create_header_from_telpars
(parameters
(identifier_telpars) identifier_telpars
)parameters
(block
(expression_statement
(assignment
(identifier_pars) identifier_pars
(list_comp... | Create a list of fits header items from GTC telescope pars.
The GTC telescope server gives a list of string describing
FITS header items such as RA, DEC, etc.
Arguments
---------
telpars : list
list returned by server call to getTelescopeParams |
(module
(function_definition
(function_name_get_client_calls_for_app) function_name_get_client_calls_for_app
(parameters
(identifier_source_code) identifier_source_code
)parameters
(block
(expression_statement
(assignment
(identifier_parsed) identifier_parsed
(c... | Return client calls for a chalice app.
This is similar to ``get_client_calls`` except it will
automatically traverse into chalice views with the assumption
that they will be called. |
(module
(function_definition
(function_name_mag_yaw) function_name_mag_yaw
(parameters
(identifier_RAW_IMU) identifier_RAW_IMU
(identifier_inclination) identifier_inclination
(identifier_declination) identifier_declination
)parameters
(block
(expression_statement
(assig... | estimate yaw from mag |
(module
(function_definition
(function_name_put_encryption_materials) function_name_put_encryption_materials
(parameters
(identifier_self) identifier_self
(identifier_cache_key) identifier_cache_key
(identifier_encryption_materials) identifier_encryption_materials
(identifier_plaintext... | Does not add encryption materials to the cache since there is no cache to which to add them.
:param bytes cache_key: Identifier for entries in cache
:param encryption_materials: Encryption materials to add to cache
:type encryption_materials: aws_encryption_sdk.materials_managers.EncryptionMate... |
(module
(function_definition
(function_name_find_pore_to_pore_distance) function_name_find_pore_to_pore_distance
(parameters
(identifier_network) identifier_network
(default_parameter
(identifier_pores1) identifier_pores1
(None) None
)default_parameter
(default_paramete... | r'''
Find the distance between all pores on set one to each pore in set 2
Parameters
----------
network : OpenPNM Network Object
The network object containing the pore coordinates
pores1 : array_like
The pore indices of the first set
pores2 : array_Like
The pore indice... |
(module
(function_definition
(function_name__getModelData) function_name__getModelData
(parameters
(identifier_self) identifier_self
(identifier_modelData) identifier_modelData
(default_parameter
(identifier_parentItem) identifier_parentItem
(None) None
)default_paramet... | Return the data contained in the model. |
(module
(function_definition
(function_name_association) function_name_association
(parameters
(identifier_self) identifier_self
(identifier_group_xid) identifier_group_xid
)parameters
(block
(expression_statement
(assignment
(identifier_association) identifier_asso... | Add association using xid value.
Args:
group_xid (str): The external id of the Group to associate. |
(module
(function_definition
(function_name_camel_to_snake_case) function_name_camel_to_snake_case
(parameters
(identifier_string) identifier_string
)parameters
(block
(expression_statement
(assignment
(identifier_s) identifier_s
(call
(attribute
... | Converts 'string' presented in camel case to snake case.
e.g.: CamelCase => snake_case |
(module
(function_definition
(function_name_write) function_name_write
(parameters
(identifier_filename) identifier_filename
(identifier_groupname) identifier_groupname
(identifier_items) identifier_items
(identifier_times) identifier_times
(identifier_features) identifier_featur... | Write h5features data in a HDF5 file.
This function is a wrapper to the Writer class. It has three purposes:
* Check parameters for errors (see details below),
* Create Items, Times and Features objects
* Send them to the Writer.
:param str filename: HDF5 file to be writted, potentially serving
... |
(module
(function_definition
(function_name_download_file) function_name_download_file
(parameters
(identifier_self) identifier_self
(identifier_url) identifier_url
(identifier_filename) identifier_filename
)parameters
(block
(expression_statement
(call
(attri... | Download file from url to filename. |
(module
(function_definition
(function_name_save_hdf_metadata) function_name_save_hdf_metadata
(parameters
(identifier_filename) identifier_filename
(identifier_metadata) identifier_metadata
(default_parameter
(identifier_groupname) identifier_groupname
(string_"data") string... | Save a dictionary of metadata to a group's attrs. |
(module
(function_definition
(function_name__compose) function_name__compose
(parameters
(identifier_self) identifier_self
(list_splat_pattern
(identifier_args) identifier_args
)list_splat_pattern
(dictionary_splat_pattern
(identifier_kwargs) identifier_kwargs
)di... | Compose symbol on inputs.
This call mutates the current symbol.
Parameters
----------
args:
provide positional arguments
kwargs:
provide keyword arguments
Returns
-------
the resulting symbol |
(module
(function_definition
(function_name_create) function_name_create
(parameters
(list_splat_pattern
(identifier_context) identifier_context
)list_splat_pattern
(dictionary_splat_pattern
(identifier_kwargs) identifier_kwargs
)dictionary_splat_pattern
)parameters... | Build a ContextStack instance from a sequence of context-like items.
This factory-style method is more general than the ContextStack class's
constructor in that, unlike the constructor, the argument list
can itself contain ContextStack instances.
Here is an example illustrating various... |
(module
(function_definition
(function_name_ids_sharing_same_pgn) function_name_ids_sharing_same_pgn
(parameters
(identifier_id_x) identifier_id_x
(identifier_pgn_x) identifier_pgn_x
(identifier_id_y) identifier_id_y
(identifier_pgn_y) identifier_pgn_y
)parameters
(block
... | Yield arbitration ids which has the same pgn. |
(module
(function_definition
(function_name_get_connection) function_name_get_connection
(parameters
(identifier_db_type) identifier_db_type
(identifier_db_pth) identifier_db_pth
(default_parameter
(identifier_user) identifier_user
(None) None
)default_parameter
(... | Get a connection to a SQL database. Can be used for SQLite, MySQL or Django MySQL database
Example:
>>> from msp2db.db import get_connection
>>> conn = get_connection('sqlite', 'library.db')
If using "mysql" mysql.connector needs to be installed.
If using "django_mysql" Django needs to be... |
(module
(function_definition
(function_name_create_argparser) function_name_create_argparser
(parameters
(identifier_self) identifier_self
)parameters
(block
(if_statement
(attribute
(identifier_self) identifier_self
(identifier_desc) identifier_desc
)at... | Factory for arg parser. Can be overridden as long as it returns
an ArgParser compatible instance. |
(module
(function_definition
(function_name_shellinput) function_name_shellinput
(parameters
(default_parameter
(identifier_initialtext) identifier_initialtext
(string_'>> ') string_'>> '
)default_parameter
(default_parameter
(identifier_splitpart) identifier_splitpar... | Give the user a shell-like interface to enter commands which
are returned as a multi-part list containing the command
and each of the arguments.
:type initialtext: string
:param initialtext: Set the text to be displayed as the prompt.
:type splitpart: string
:param splitpart: The character to ... |
(module
(function_definition
(function_name_parse_value_instancewithpath) function_name_parse_value_instancewithpath
(parameters
(identifier_self) identifier_self
(identifier_tup_tree) identifier_tup_tree
)parameters
(block
(expression_statement
(call
(attribute
... | The VALUE.INSTANCEWITHPATH is used to define a value that comprises
a single CIMInstance with additional information that defines the
absolute path to that object.
::
<!ELEMENT VALUE.INSTANCEWITHPATH (INSTANCEPATH, INSTANCE)> |
(module
(function_definition
(function_name_currency_to_protocol) function_name_currency_to_protocol
(parameters
(identifier_amount) identifier_amount
)parameters
(block
(if_statement
(comparison_operator
(call
(identifier_type) identifier_type
(ar... | Convert a string of 'currency units' to 'protocol units'. For instance
converts 19.1 bitcoin to 1910000000 satoshis.
Input is a float, output is an integer that is 1e8 times larger.
It is hard to do this conversion because multiplying
floats causes rounding nubers which will mess up the transactions c... |
(module
(function_definition
(function_name_ensure_float) function_name_ensure_float
(parameters
(identifier_arr) identifier_arr
)parameters
(block
(if_statement
(call
(identifier_issubclass) identifier_issubclass
(argument_list
(attribute
... | Ensure that an array object has a float dtype if possible.
Parameters
----------
arr : array-like
The array whose data type we want to enforce as float.
Returns
-------
float_arr : The original array cast to the float dtype if
possible. Otherwise, the original array is ... |
(module
(function_definition
(function_name_listSites) function_name_listSites
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_block_name) identifier_block_name
(string_"") string_""
)default_parameter
(default_parameter
(identifier_... | Returns sites. |
(module
(function_definition
(function_name_put_log_events) function_name_put_log_events
(parameters
(identifier_awsclient) identifier_awsclient
(identifier_log_group_name) identifier_log_group_name
(identifier_log_stream_name) identifier_log_stream_name
(identifier_log_events) identif... | Put log events for the specified log group and stream.
:param log_group_name: log group name
:param log_stream_name: log stream name
:param log_events: [{'timestamp': 123, 'message': 'string'}, ...]
:param sequence_token: the sequence token
:return: next_token |
(module
(function_definition
(function_name_process_batches) function_name_process_batches
(parameters
(identifier_self) identifier_self
)parameters
(block
(for_statement
(pattern_list
(identifier_key) identifier_key
(identifier_batch) identifier_batch
)... | Iterate through all batches, call process_batch on them, and ack.
Separated out for the rare instances when we want to subclass
BatchingBolt and customize what mechanism causes batches to be
processed. |
(module
(function_definition
(function_name_get_label_names) function_name_get_label_names
(parameters
(identifier_ctx) identifier_ctx
)parameters
(block
(expression_statement
(assignment
(identifier_labels) identifier_labels
(list_comprehension
(ide... | Get labels defined in an ANTLR context for a parser rule |
(module
(function_definition
(function_name_StaticAdd) function_name_StaticAdd
(parameters
(identifier_cls) identifier_cls
(identifier_queue_urn) identifier_queue_urn
(identifier_rdf_value) identifier_rdf_value
(default_parameter
(identifier_mutation_pool) identifier_mutation_p... | Adds an rdf value the queue.
Adds an rdf value to a queue. Does not require that the queue be locked, or
even open. NOTE: The caller is responsible for ensuring that the queue
exists and is of the correct type.
Args:
queue_urn: The urn of the queue to add to.
rdf_value: The rdf value to a... |
(module
(function_definition
(function_name_ApprovalUrnBuilder) function_name_ApprovalUrnBuilder
(parameters
(identifier_subject) identifier_subject
(identifier_user) identifier_user
(identifier_approval_id) identifier_approval_id
)parameters
(block
(return_statement
(c... | Encode an approval URN. |
(module
(function_definition
(function_name_exist) function_name_exist
(parameters
(identifier_self) identifier_self
(identifier_key) identifier_key
(default_parameter
(identifier_param) identifier_param
(None) None
)default_parameter
)parameters
(block
(e... | see if specific identity exists |
(module
(function_definition
(function_name_get) function_name_get
(parameters
(identifier_self) identifier_self
(identifier_sid) identifier_sid
)parameters
(block
(return_statement
(call
(identifier_QueueContext) identifier_QueueContext
(argument_list
... | Constructs a QueueContext
:param sid: The unique string that identifies this resource
:returns: twilio.rest.api.v2010.account.queue.QueueContext
:rtype: twilio.rest.api.v2010.account.queue.QueueContext |
(module
(function_definition
(function_name_createPenWidthCti) function_name_createPenWidthCti
(parameters
(identifier_nodeName) identifier_nodeName
(default_parameter
(identifier_defaultData) identifier_defaultData
(float_1.0) float_1.0
)default_parameter
(default_para... | Creates a FloatCti with defaults for configuring a QPen width.
If specialValueZero is set, this string will be displayed when 0.0 is selected.
If specialValueZero is None, the minValue will be 0.1 |
(module
(function_definition
(function_name_make_relative) function_name_make_relative
(parameters
(identifier_base) identifier_base
(identifier_obj) identifier_obj
)parameters
(block
(expression_statement
(assignment
(identifier_uri) identifier_uri
(call
... | Relativize the location URI of a File or Directory object. |
(module
(function_definition
(function_name_prune_feed_map) function_name_prune_feed_map
(parameters
(identifier_meta_graph) identifier_meta_graph
(identifier_feed_map) identifier_feed_map
)parameters
(block
(expression_statement
(assignment
(identifier_node_names) ... | Function to prune the feedmap of nodes which no longer exist. |
(module
(function_definition
(function_name_open_xmldoc) function_name_open_xmldoc
(parameters
(identifier_fobj) identifier_fobj
(dictionary_splat_pattern
(identifier_kwargs) identifier_kwargs
)dictionary_splat_pattern
)parameters
(block
(import_from_statement
(... | Try and open an existing LIGO_LW-format file, or create a new Document
Parameters
----------
fobj : `str`, `file`
file path or open file object to read
**kwargs
other keyword arguments to pass to
:func:`~ligo.lw.utils.load_filename`, or
:func:`~ligo.lw.utils.load_fileob... |
(module
(function_definition
(function_name_set_interface) function_name_set_interface
(parameters
(identifier_interface) identifier_interface
(default_parameter
(identifier_name) identifier_name
(string_'') string_''
)default_parameter
)parameters
(block
(globa... | don't want to bother with a dsn? Use this method to make an interface available |
(module
(function_definition
(function_name_use_mutation) function_name_use_mutation
(parameters
(identifier_module_path) identifier_module_path
(identifier_operator) identifier_operator
(identifier_occurrence) identifier_occurrence
)parameters
(block
(expression_statement
... | A context manager that applies a mutation for the duration of a with-block.
This applies a mutation to a file on disk, and after the with-block it put the unmutated code
back in place.
Args:
module_path: The path to the module to mutate.
operator: The `Operator` instance to use.
oc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.