sequence stringlengths 557 12.7k | docstring stringlengths 4 15.2k |
|---|---|
(module
(function_definition
(function_name_patternVector) function_name_patternVector
(parameters
(identifier_self) identifier_self
(identifier_vector) identifier_vector
)parameters
(block
(if_statement
(not_operator
(attribute
(identifier_self) identif... | Replaces vector with patterns. Used for loading inputs or
targets from a file and still preserving patterns. |
(module
(function_definition
(function_name__server_property) function_name__server_property
(parameters
(identifier_self) identifier_self
(identifier_attr_name) identifier_attr_name
)parameters
(block
(expression_statement
(assignment
(identifier_server) identifier... | An attribute of the current server's description.
If the client is not connected, this will block until a connection is
established or raise ServerSelectionTimeoutError if no server is
available.
Not threadsafe if used multiple times in a single method, since
the server may cha... |
(module
(function_definition
(function_name__parse_response) function_name__parse_response
(parameters
(identifier_self) identifier_self
(identifier_respond) identifier_respond
)parameters
(block
(expression_statement
(assignment
(identifier_mobj) identifier_mobj
... | parse text of response for HTTP errors
This parses the text of the response to decide whether to
retry request or raise exception. At the moment this only
detects an exception condition.
Args:
respond (Response): requests.Response object
Returns:
bool: ... |
(module
(function_definition
(function_name_resetScale) function_name_resetScale
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(i... | Resets the scale on this image. Correctly aligns time scale, undoes manual scaling |
(module
(function_definition
(function_name_find) function_name_find
(parameters
(identifier_self) identifier_self
(identifier_start_address) identifier_start_address
(identifier_end_address) identifier_end_address
(default_parameter
(identifier_byte_depth) identifier_byte_dept... | Find gadgets. |
(module
(function_definition
(function_name__default_headers) function_name__default_headers
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_headers) identifier_headers
(dictionary
(pair
... | Set the default header for a Twilio SendGrid v3 API call |
(module
(function_definition
(function_name_ordc) function_name_ordc
(parameters
(identifier_item) identifier_item
(identifier_inset) identifier_inset
)parameters
(block
(assert_statement
(call
(identifier_isinstance) identifier_isinstance
(argument_list
... | The function returns the ordinal position of any given item in a
character set. If the item does not appear in the set, the function
returns -1.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ordc_c.html
:param item: An item to locate within a set.
:type item: str
:param inset: A set... |
(module
(function_definition
(function_name_escape_query) function_name_escape_query
(parameters
(identifier_query) identifier_query
)parameters
(block
(return_statement
(call
(attribute
(call
(attribute
(call
(a... | Escapes certain filter characters from an LDAP query. |
(module
(function_definition
(function_name__lxml_el_to_data) function_name__lxml_el_to_data
(parameters
(identifier_lxml_el) identifier_lxml_el
(identifier_ns) identifier_ns
(identifier_nsmap) identifier_nsmap
(default_parameter
(identifier_snake) identifier_snake
(Tru... | Convert an ``lxml._Element`` instance to a Python tuple. |
(module
(function_definition
(function_name_register_id) function_name_register_id
(parameters
(identifier_self) identifier_self
(identifier_id_string) identifier_id_string
)parameters
(block
(try_statement
(block
(expression_statement
(assignment
... | Register a manually assigned id as used, to avoid collisions. |
(module
(function_definition
(function_name_facts) function_name_facts
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_fact) identifier_fact
(call
(attribute
(identifier_lib... | Iterate over the asserted Facts. |
(module
(function_definition
(function_name_columns_in_filters) function_name_columns_in_filters
(parameters
(identifier_filters) identifier_filters
)parameters
(block
(if_statement
(not_operator
(identifier_filters) identifier_filters
)not_operator
(block... | Returns a list of the columns used in a set of query filters.
Parameters
----------
filters : list of str or str
List of the filters as passed passed to ``apply_filter_query``.
Returns
-------
columns : list of str
List of all the strings mentioned in the filters. |
(module
(function_definition
(function_name_yml_fnc) function_name_yml_fnc
(parameters
(identifier_fname) identifier_fname
(list_splat_pattern
(identifier_args) identifier_args
)list_splat_pattern
(dictionary_splat_pattern
(identifier_options) identifier_options
)... | An wrapper of yaml.safe_load, yaml.load, yaml.safe_dump and yaml.dump.
:param fname:
"load" or "dump", not checked but it should be OK.
see also :func:`yml_load` and :func:`yml_dump`
:param args: [stream] for load or [cnf, stream] for dump
:param options: keyword args may contain "ac_safe" ... |
(module
(function_definition
(function_name_set_attr_value) function_name_set_attr_value
(parameters
(identifier_self) identifier_self
(identifier_key) identifier_key
(identifier_attr) identifier_attr
(identifier_value) identifier_value
)parameters
(block
(expression_stat... | set the value of a given attribute for a given key |
(module
(function_definition
(function_name__) function_name__
(parameters
(identifier_obj) identifier_obj
)parameters
(block
(expression_statement
(assignment
(identifier_tz_offset) identifier_tz_offset
(call
(attribute
(identifier_obj... | ISO 8601 format. Interprets naive datetime as UTC with zulu suffix. |
(module
(function_definition
(function_name__check_panel) function_name__check_panel
(parameters
(identifier_self) identifier_self
(identifier_length) identifier_length
)parameters
(block
(expression_statement
(assignment
(identifier_n) identifier_n
(call
... | Check that given fixed panel length evenly divides index.
Parameters
----------
length : int
Fixed length with which to subdivide index |
(module
(function_definition
(function_name_run_alias) function_name_run_alias
(parameters
)parameters
(block
(expression_statement
(assignment
(identifier_mode) identifier_mode
(attribute
(call
(identifier_Path) identifier_Path
... | Quick aliases for run command. |
(module
(function_definition
(function_name_knob_subgroup) function_name_knob_subgroup
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_cutoff) identifier_cutoff
(float_7.0) float_7.0
)default_parameter
)parameters
(block
(if_statemen... | KnobGroup where all KnobsIntoHoles have max_kh_distance <= cutoff. |
(module
(function_definition
(function_name__get_factor) function_name__get_factor
(parameters
(identifier_self) identifier_self
(identifier_belief_prop) identifier_belief_prop
(identifier_evidence) identifier_evidence
)parameters
(block
(expression_statement
(assignmen... | Extracts the required factor from the junction tree.
Parameters:
----------
belief_prop: Belief Propagation
Belief Propagation which needs to be updated.
evidence: dict
a dict key, value pair as {var: state_of_var_observed} |
(module
(function_definition
(function_name_building) function_name_building
(parameters
(default_parameter
(identifier_shape) identifier_shape
(None) None
)default_parameter
(default_parameter
(identifier_gray) identifier_gray
(False) False
)default_par... | Photo of the Centre for Mathematical Sciences in Cambridge.
Returns
-------
An image with the following properties:
image type: color (or gray scales if `gray=True`)
size: [442, 331] (if not specified by `size`)
scale: [0, 1]
type: float64 |
(module
(function_definition
(function_name_cache_key) function_name_cache_key
(parameters
(identifier_self) identifier_self
(typed_parameter
(identifier_repo) identifier_repo
(type
(identifier_str) identifier_str
)type
)typed_parameter
(typed_paramete... | Returns the key used for storing results in cache. |
(module
(function_definition
(function_name_humanize_filesize) function_name_humanize_filesize
(parameters
(typed_parameter
(identifier_filesize) identifier_filesize
(type
(identifier_int) identifier_int
)type
)typed_parameter
)parameters
(type
(gene... | Return human readable pair of size and unit from the given filesize in bytes. |
(module
(function_definition
(function_name_contents_match) function_name_contents_match
(parameters
(identifier_self) identifier_self
(identifier_path) identifier_path
)parameters
(block
(expression_statement
(assignment
(identifier_checksum) identifier_checksum
... | Determines if the file content is the same.
This is determined by comparing hashsum of the file contents and
the saved hashsum. If there is no hashsum, then the content cannot
be sure to be the same so treat them as if they are not the same.
Otherwise, return True if the hashsums are th... |
(module
(function_definition
(function_name_datasets) function_name_datasets
(parameters
(identifier_self) identifier_self
(typed_default_parameter
(identifier_libref) identifier_libref
(type
(identifier_str) identifier_str
)type
(string_'') string_''
... | This method is used to query a libref. The results show information about the libref including members.
:param libref: the libref to query
:return: |
(module
(function_definition
(function_name__decode_linode_plan_label) function_name__decode_linode_plan_label
(parameters
(identifier_label) identifier_label
)parameters
(block
(expression_statement
(assignment
(identifier_sizes) identifier_sizes
(call
... | Attempts to decode a user-supplied Linode plan label
into the format in Linode API output
label
The label, or name, of the plan to decode.
Example:
`Linode 2048` will decode to `Linode 2GB` |
(module
(function_definition
(function_name_sort_dict) function_name_sort_dict
(parameters
(identifier_self) identifier_self
(identifier_data) identifier_data
(identifier_key) identifier_key
)parameters
(block
(return_statement
(conditional_expression
(call
... | Sort a list of dictionaries by dictionary key |
(module
(function_definition
(function_name_allow_exception) function_name_allow_exception
(parameters
(identifier_self) identifier_self
(identifier_exc_class) identifier_exc_class
)parameters
(block
(expression_statement
(assignment
(identifier_name) identifier_nam... | Allow raising this class of exceptions from commands.
When a command fails on the server side due to an exception, by
default it is turned into a string and raised on the client side as an
ExternalError. The original class name is sent but ignored. If you
would like to instead raise a... |
(module
(function_definition
(function_name_battlecry_requires_target) function_name_battlecry_requires_target
(parameters
(identifier_self) identifier_self
)parameters
(block
(if_statement
(boolean_operator
(attribute
(identifier_self) identifier_self
... | True if the play action of the card requires a target |
(module
(function_definition
(function_name_signed_int_to_unsigned_hex) function_name_signed_int_to_unsigned_hex
(parameters
(typed_parameter
(identifier_signed_int) identifier_signed_int
(type
(identifier_int) identifier_int
)type
)typed_parameter
)parameters... | Converts a signed int value to a 64-bit hex string.
Examples:
1662740067609015813 => '17133d482ba4f605'
-5270423489115668655 => 'b6dbb1c2b362bf51'
:param signed_int: an int to convert
:returns: unsigned hex string |
(module
(function_definition
(function_name_keys) function_name_keys
(parameters
(identifier_cls) identifier_cls
(identifier_name) identifier_name
(identifier_hash_key) identifier_hash_key
(default_parameter
(identifier_range_key) identifier_range_key
(None) None
... | Create an index that projects only key attributes |
(module
(function_definition
(function_name_get_property_dict) function_name_get_property_dict
(parameters
(identifier_entity_proto) identifier_entity_proto
)parameters
(block
(return_statement
(call
(identifier_dict) identifier_dict
(generator_expression
... | Convert datastore.Entity to a dict of property name -> datastore.Value.
Args:
entity_proto: datastore.Entity proto message.
Usage:
>>> get_property_dict(entity_proto)
{'foo': {string_value='a'}, 'bar': {integer_value=2}}
Returns:
dict of entity properties. |
(module
(function_definition
(function_name_unregister_event) function_name_unregister_event
(parameters
(identifier_self) identifier_self
(identifier_event_name) identifier_event_name
(identifier_handler) identifier_handler
)parameters
(block
(try_statement
(block
... | Unregister a callable that will be called when event is raised.
:param event_name: The name of the event (see knack.events for in-built events)
:type event_name: str
:param handler: The callback that was used to register the event
:type handler: function |
(module
(function_definition
(function_name_hashes) function_name_hashes
(parameters
(identifier_self) identifier_self
)parameters
(block
(for_statement
(identifier_url_variant) identifier_url_variant
(call
(attribute
(identifier_self) identifier_self
... | Hashes of all possible permutations of the URL in canonical form |
(module
(function_definition
(function_name_get_block_by_hash) function_name_get_block_by_hash
(parameters
(identifier_self) identifier_self
(typed_parameter
(identifier_block_hash) identifier_block_hash
(type
(identifier_Hash32) identifier_Hash32
)type
)typ... | Returns the requested block as specified by block hash. |
(module
(function_definition
(function_name_remote_file) function_name_remote_file
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_branch) identifier_branch
(string_'master') string_'master'
)default_parameter
(default_parameter
(ide... | Read the remote file on Git Server.
Args:
branch (str): Git Branch to find file.
filename (str): Name of file to retrieve relative to root of
repository.
Returns:
str: Contents of remote file.
Raises:
FileNotFoundError: Requested... |
(module
(function_definition
(function_name_get_instantiated_service) function_name_get_instantiated_service
(parameters
(identifier_self) identifier_self
(identifier_name) identifier_name
)parameters
(block
(if_statement
(comparison_operator
(identifier_name) ident... | Get instantiated service by name |
(module
(function_definition
(function_name_register_area) function_name_register_area
(parameters
(identifier_self) identifier_self
(identifier_area_code) identifier_area_code
(identifier_index) identifier_index
(identifier_userdata) identifier_userdata
)parameters
(block
... | Shares a memory area with the server. That memory block will be
visible by the clients. |
(module
(function_definition
(function_name_Search) function_name_Search
(parameters
(identifier_self) identifier_self
(identifier_text) identifier_text
(default_parameter
(identifier_wholewords) identifier_wholewords
(integer_0) integer_0
)default_parameter
(defa... | Performs full-text search on the archive.
The first parameter is the word to look for, the second
indicates if the search should be for whole words only, and
the third parameter indicates if the search should be
restricted to page titles.
This method will return a tuple, the firs... |
(module
(function_definition
(function_name_stop) function_name_stop
(parameters
(identifier_self) identifier_self
)parameters
(block
(if_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier__died) ide... | Stop the container gracefully.
First all entrypoints are asked to ``stop()``.
This ensures that no new worker threads are started.
It is the extensions' responsibility to gracefully shut down when
``stop()`` is called on them and only return when they have stopped.
After all e... |
(module
(function_definition
(function_name_add_tunnel_port) function_name_add_tunnel_port
(parameters
(identifier_self) identifier_self
(identifier_name) identifier_name
(identifier_tunnel_type) identifier_tunnel_type
(identifier_remote_ip) identifier_remote_ip
(default_paramete... | Creates a tunnel port.
:param name: Port name to be created
:param tunnel_type: Type of tunnel (gre or vxlan)
:param remote_ip: Remote IP address of tunnel
:param local_ip: Local IP address of tunnel
:param key: Key of GRE or VNI of VxLAN
:param ofport: Requested OpenFlo... |
(module
(function_definition
(function_name_disable) function_name_disable
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_retain_port) identifier_retain_port
(False) False
)default_parameter
)parameters
(block
(expression_statement
... | Teardown DHCP.
Disable DHCP for this network by updating the remote server
and then destroying any local device and namespace. |
(module
(function_definition
(function_name_getStreamNetworkAsWkt) function_name_getStreamNetworkAsWkt
(parameters
(identifier_self) identifier_self
(identifier_session) identifier_session
(default_parameter
(identifier_withNodes) identifier_withNodes
(True) True
)defau... | Retrieve the stream network geometry in Well Known Text format.
Args:
session (:mod:`sqlalchemy.orm.session.Session`): SQLAlchemy session object bound to PostGIS enabled database
withNodes (bool, optional): Include nodes. Defaults to False.
Returns:
str: Well Known ... |
(module
(function_definition
(function_name_filter_product_filename_generator) function_name_filter_product_filename_generator
(parameters
(identifier_obs_info) identifier_obs_info
(identifier_nn) identifier_nn
)parameters
(block
(expression_statement
(assignment
(i... | Generate image and sourcelist filenames for filter products
Parameters
----------
obs_info : list
list of items that will be used to generate the filenames: proposal_id,
visit_id, instrument, detector, and filter
nn : string
the single-exposure image number (NOTE: only used in
... |
(module
(function_definition
(function_name_iscsi_resource) function_name_iscsi_resource
(parameters
(identifier_self) identifier_self
)parameters
(block
(return_statement
(call
(attribute
(identifier_iscsi) identifier_iscsi
(identifier_ISCSIResour... | Property to provide reference to bios iscsi resource instance
It is calculated once when the first time it is queried. On refresh,
this property gets reset. |
(module
(function_definition
(function_name_get_logger) function_name_get_logger
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_name) identifier_name
(string_"deployment-logger") string_"deployment-logger"
)default_parameter
(default_parame... | Get a logger object that will log to stdout. |
(module
(function_definition
(function_name_ascent) function_name_ascent
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_total_ascent) identifier_total_ascent
(float_0.0) float_0.0
)assignmen... | Returns ascent of workout in meters |
(module
(function_definition
(function_name__load) function_name__load
(parameters
(identifier_self) identifier_self
)parameters
(block
(if_statement
(boolean_operator
(attribute
(identifier_self) identifier_self
(identifier_is_sw) identifier_is_sw... | Load the MODIS RSR data for the band requested |
(module
(function_definition
(function_name__create_body) function_name__create_body
(parameters
(identifier_self) identifier_self
(identifier_name) identifier_name
(default_parameter
(identifier_flavor) identifier_flavor
(None) None
)default_parameter
(default_pa... | Used to create the dict required to create a Cloud Database instance. |
(module
(function_definition
(function_name_renew_local_branch) function_name_renew_local_branch
(parameters
(identifier_branch) identifier_branch
(identifier_start_point) identifier_start_point
(default_parameter
(identifier_remote) identifier_remote
(False) False
)def... | Make a new local branch from that start_point
start_point is a git "commit-ish", e.g branch, tag, commit
If a local branch already exists it is removed
If remote is true then push the new branch to origin |
(module
(function_definition
(function_name_example_method) function_name_example_method
(parameters
(identifier_self) identifier_self
(identifier_i3s_output_list) identifier_i3s_output_list
(identifier_i3s_config) identifier_i3s_config
)parameters
(block
(expression_statement
... | This method will return an empty text message
so it will NOT be displayed on your i3bar.
If you want something displayed you should write something
in the 'full_text' key of your response.
See the i3bar protocol spec for more information:
http://i3wm.org/docs/i3bar-protocol.htm... |
(module
(function_definition
(function_name_get_structure_with_nodes) function_name_get_structure_with_nodes
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_new_s) identifier_new_s
(call
... | Get the modified structure with the voronoi nodes inserted. The
species is set as a DummySpecie X. |
(module
(function_definition
(function_name_create) function_name_create
(parameters
(identifier_self) identifier_self
(identifier_article) identifier_article
(identifier_attachment) identifier_attachment
(default_parameter
(identifier_inline) identifier_inline
(False) ... | This function creates attachment attached to article.
:param article: Numeric article id or :class:`Article` object.
:param attachment: File object or os path to file
:param inline: If true, the attached file is shown in the dedicated admin UI
for inline attachments and its url can ... |
(module
(function_definition
(function_name_get_repo_revision) function_name_get_repo_revision
(parameters
)parameters
(block
(expression_statement
(assignment
(identifier_repopath) identifier_repopath
(call
(identifier__findrepo) identifier__findrepo
... | Returns mercurial revision string somelike `hg identify` does.
Format is rev1:short-id1+;rev2:short-id2+
Returns an empty string if anything goes wrong, such as missing
.hg files or an unexpected format of internal HG files or no
mercurial repository found. |
(module
(function_definition
(function_name_singledispatch) function_name_singledispatch
(parameters
(keyword_separator
)keyword_separator
(default_parameter
(identifier_nargs) identifier_nargs
(None) None
)default_parameter
(default_parameter
(identifier_... | singledispatch decorate of both functools.singledispatch and func |
(module
(function_definition
(function_name_rmSelf) function_name_rmSelf
(parameters
(identifier_f) identifier_f
)parameters
(block
(function_definition
(function_name_new_f) function_name_new_f
(parameters
(list_splat_pattern
(identifier_args) identif... | f -> function.
Decorator, removes first argument from f parameters. |
(module
(function_definition
(function_name_parse_summary) function_name_parse_summary
(parameters
(identifier_content) identifier_content
(default_parameter
(identifier_reference_id) identifier_reference_id
(None) None
)default_parameter
)parameters
(block
(exp... | \
Extracts the summary from the `content` of the cable.
If no summary can be found, ``None`` is returned.
`content`
The content of the cable.
`reference_id`
The reference identifier of the cable. |
(module
(function_definition
(function_name_attach_framebuffer) function_name_attach_framebuffer
(parameters
(identifier_self) identifier_self
(identifier_screen_id) identifier_screen_id
(identifier_framebuffer) identifier_framebuffer
)parameters
(block
(if_statement
(n... | Sets the graphics update target for a screen.
in screen_id of type int
in framebuffer of type :class:`IFramebuffer`
return id_p of type str |
(module
(function_definition
(function_name_create_archiver) function_name_create_archiver
(parameters
(identifier_typename) identifier_typename
)parameters
(block
(expression_statement
(assignment
(identifier_archiver) identifier_archiver
(call
(att... | Returns Archivers in common configurations.
:API: public
The typename must correspond to one of the following:
'tar' Returns a tar archiver that applies no compression and emits .tar files.
'tgz' Returns a tar archiver that applies gzip compression and emits .tar.gz files.
'tbz2' Returns a tar archiver... |
(module
(function_definition
(function_name_resume_writing) function_name_resume_writing
(parameters
(identifier_self) identifier_self
)parameters
(block
(if_statement
(not_operator
(call
(attribute
(attribute
(identifier_self) id... | Transport calls when the send buffer has room. |
(module
(function_definition
(function_name_patch) function_name_patch
(parameters
(identifier_self) identifier_self
(identifier_request) identifier_request
(default_parameter
(identifier_format) identifier_format
(None) None
)default_parameter
)parameters
(bloc... | Update an existing Channel |
(module
(function_definition
(function_name_take_profit_replace) function_name_take_profit_replace
(parameters
(identifier_self) identifier_self
(identifier_accountID) identifier_accountID
(identifier_orderID) identifier_orderID
(dictionary_splat_pattern
(identifier_kwargs) ide... | Shortcut to replace a pending Take Profit Order in an Account
Args:
accountID : The ID of the Account
orderID : The ID of the Take Profit Order to replace
kwargs : The arguments to create a TakeProfitOrderRequest
Returns:
v20.response.Response containing... |
(module
(function_definition
(function_name_parse_file) function_name_parse_file
(parameters
(identifier_file) identifier_file
)parameters
(block
(expression_statement
(assignment
(identifier_lines) identifier_lines
(list
)list
)assignment
... | Take an open file containing the IANA subtag registry, and yield a
dictionary of information for each subtag it describes. |
(module
(function_definition
(function_name_lookup) function_name_lookup
(parameters
(identifier_alias) identifier_alias
)parameters
(block
(if_statement
(comparison_operator
(identifier_alias) identifier_alias
(identifier_matchers) identifier_matchers
)... | Tries to find a matcher callable associated to the given alias. If
an exact match does not exists it will try normalizing it and even
removing underscores to find one. |
(module
(function_definition
(function_name_assign_ranks_to_grid) function_name_assign_ranks_to_grid
(parameters
(identifier_grid) identifier_grid
(identifier_ranks) identifier_ranks
)parameters
(block
(expression_statement
(assignment
(identifier_assignments) ident... | Takes a 2D array of binary numbers represented as strings and a dictionary
mapping binary strings to integers representing the rank of the cluster
they belong to, and returns a grid in which each binary number has been
replaced with the rank of its cluster. |
(module
(function_definition
(function_name_reset) function_name_reset
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(attribute
(identifier_self) identifier_self
(identifier_v) identifier_v
... | Resets all state variables. |
(module
(function_definition
(function_name_init_app) function_name_init_app
(parameters
(identifier_self) identifier_self
(identifier_app) identifier_app
(default_parameter
(identifier_path) identifier_path
(string_'templates.yaml') string_'templates.yaml'
)default_par... | Initializes Ask app by setting configuration variables, loading templates, and maps Ask route to a flask view.
The Ask instance is given the following configuration variables by calling on Flask's configuration:
`ASK_APPLICATION_ID`:
Turn on application ID verification by setting this var... |
(module
(function_definition
(function_name_extended_capabilities) function_name_extended_capabilities
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_buf) identifier_buf
(call
(parenthes... | Gets the capabilities of the connected emulator as a list.
Args:
self (JLink): the ``JLink`` instance
Returns:
List of 32 integers which define the extended capabilities based on
their value and index within the list. |
(module
(function_definition
(function_name__do_lumping) function_name__do_lumping
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_right_eigenvectors) identifier_right_eigenvectors
(subscript
... | Perform PCCA+ algorithm by optimizing transformation matrix A.
Creates the following member variables:
-------
A : ndarray
The transformation matrix.
chi : ndarray
The membership matrix
microstate_mapping : ndarray
Mapping from microstates to ... |
(module
(function_definition
(function_name_as_stream) function_name_as_stream
(parameters
(identifier_self) identifier_self
)parameters
(block
(if_statement
(not_operator
(attribute
(identifier_self) identifier_self
(identifier_singular) identifie... | Convert this selector to a DataStream.
This function will only work if this is a singular selector that
matches exactly one DataStream. |
(module
(function_definition
(function_name_oracle_approximating) function_name_oracle_approximating
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_X) identifier_X
(call
(attribute
... | Calculate the Oracle Approximating Shrinkage estimate
:return: shrunk sample covariance matrix
:rtype: np.ndarray |
(module
(function_definition
(function_name_create_supercut_in_batches) function_name_create_supercut_in_batches
(parameters
(identifier_composition) identifier_composition
(identifier_outputfile) identifier_outputfile
(identifier_padding) identifier_padding
)parameters
(block
... | Create & concatenate video clips in groups of size BATCH_SIZE and output
finished video file to output directory. |
(module
(function_definition
(function_name_updated_dimensions) function_name_updated_dimensions
(parameters
(identifier_self) identifier_self
)parameters
(block
(return_statement
(list
(tuple
(string_"ntime") string_"ntime"
(attribute
... | Inform montblanc about dimension sizes |
(module
(function_definition
(function_name_string_to_response) function_name_string_to_response
(parameters
(identifier_content_type) identifier_content_type
)parameters
(block
(function_definition
(function_name_outer_wrapper) function_name_outer_wrapper
(parameters
... | Wrap a view-like function that returns a string and marshalls it into an
HttpResponse with the given Content-Type
If the view raises an HttpBadRequestException, it will be converted into
an HttpResponseBadRequest. |
(module
(function_definition
(function_name_handle_update) function_name_handle_update
(parameters
(identifier_self) identifier_self
(identifier_args) identifier_args
)parameters
(block
(expression_statement
(assignment
(identifier_component) identifier_component
... | The callback invoked by the main event loop if there's an event from this keypad. |
(module
(function_definition
(function_name_all) function_name_all
(parameters
(identifier_cls) identifier_cls
(identifier_client) identifier_client
(dictionary_splat_pattern
(identifier_kwargs) identifier_kwargs
)dictionary_splat_pattern
)parameters
(block
(expre... | fetch all option positions |
(module
(function_definition
(function_name_get_redshift) function_name_get_redshift
(parameters
(identifier_self) identifier_self
(identifier_dist) identifier_dist
)parameters
(block
(expression_statement
(assignment
(pattern_list
(identifier_dist) iden... | Returns the redshift for the given distance. |
(module
(function_definition
(function_name_phase_type) function_name_phase_type
(parameters
(identifier_self) identifier_self
(identifier_value) identifier_value
)parameters
(block
(expression_statement
(assignment
(attribute
(attribute
(i... | compresses the waveform horizontally; one of
``"normal"``, ``"resync"``, ``"resync2"`` |
(module
(function_definition
(function_name_product) function_name_product
(parameters
(identifier_target) identifier_target
(identifier_prop1) identifier_prop1
(identifier_prop2) identifier_prop2
(dictionary_splat_pattern
(identifier_kwargs) identifier_kwargs
)dictionary... | r"""
Calculates the product of multiple property values
Parameters
----------
target : OpenPNM Object
The object which this model is associated with. This controls the
length of the calculated array, and also provides access to other
necessary properties.
prop1 : string
... |
(module
(function_definition
(function_name_getPeers) function_name_getPeers
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_offset) identifier_offset
(integer_0) integer_0
)default_parameter
(default_parameter
(identifier_limit) ide... | Get the list of peers using an SQL offset and limit. Returns a list
of peer datamodel objects in a list. |
(module
(function_definition
(function_name_prepare_sort_key) function_name_prepare_sort_key
(parameters
(identifier_self) identifier_self
)parameters
(block
(if_statement
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(attribute
... | Triggered by view_function._sort_converters when our sort key should be created.
This can't be called in the constructor because Django models might not be ready yet. |
(module
(function_definition
(function_name_list_streams) function_name_list_streams
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_types) identifier_types
(list
)list
)default_parameter
(default_parameter
(identifier_inacti... | list user streams |
(module
(function_definition
(function_name__evaluate_usecols) function_name__evaluate_usecols
(parameters
(identifier_usecols) identifier_usecols
(identifier_names) identifier_names
)parameters
(block
(if_statement
(call
(identifier_callable) identifier_callable
... | Check whether or not the 'usecols' parameter
is a callable. If so, enumerates the 'names'
parameter and returns a set of indices for
each entry in 'names' that evaluates to True.
If not a callable, returns 'usecols'. |
(module
(function_definition
(function_name_to_flat) function_name_to_flat
(parameters
(identifier_coord) identifier_coord
)parameters
(block
(if_statement
(comparison_operator
(identifier_coord) identifier_coord
(None) None
)comparison_operator
... | Converts from a Minigo coordinate to a flattened coordinate. |
(module
(function_definition
(function_name_remove) function_name_remove
(parameters
(identifier_path) identifier_path
)parameters
(block
(if_statement
(not_operator
(call
(attribute
(attribute
(identifier_os) identifier_os
... | Wrapper that switches between os.remove and shutil.rmtree depending on
whether the provided path is a file or directory. |
(module
(function_definition
(function_name_as_minimized) function_name_as_minimized
(parameters
(typed_parameter
(identifier_values) identifier_values
(type
(generic_type
(identifier_List) identifier_List
(type_parameter
(type
... | Return vector values as minimized |
(module
(function_definition
(function_name_load_data) function_name_load_data
(parameters
)parameters
(block
(expression_statement
(assignment
(identifier_boston) identifier_boston
(call
(identifier_load_boston) identifier_load_boston
(argumen... | Load dataset, use boston dataset |
(module
(function_definition
(function_name__should_ignore) function_name__should_ignore
(parameters
(identifier_self) identifier_self
(identifier_path) identifier_path
)parameters
(block
(for_statement
(identifier_ignore) identifier_ignore
(attribute
(attri... | Return True iff path should be ignored. |
(module
(function_definition
(function_name_preview) function_name_preview
(parameters
(identifier_self) identifier_self
(identifier_obj) identifier_obj
(default_parameter
(identifier_request) identifier_request
(None) None
)default_parameter
)parameters
(block
... | Generate the HTML to display for the image.
:param obj: An object with a thumbnail_field defined.
:return: HTML for image display. |
(module
(function_definition
(function_name__CreateShapePointFolder) function_name__CreateShapePointFolder
(parameters
(identifier_self) identifier_self
(identifier_shapes_folder) identifier_shapes_folder
(identifier_shape) identifier_shape
)parameters
(block
(expression_statem... | Create a KML Folder containing all the shape points in a shape.
The folder contains placemarks for each shapepoint.
Args:
shapes_folder: A KML Shape Folder ElementTree.Element instance
shape: The shape to plot.
Returns:
The Folder ElementTree.Element instance or None. |
(module
(function_definition
(function_name_any_match) function_name_any_match
(parameters
(identifier_self) identifier_self
(identifier_urls) identifier_urls
)parameters
(block
(return_statement
(call
(identifier_any) identifier_any
(generator_expression
... | Check if any of the given URLs has a matching host.
:param urls: an iterable containing URLs
:returns: True if any host has a listed match
:raises InvalidURLError: if there are any invalid URLs in
the sequence |
(module
(function_definition
(function_name_QA_fetch_get_sh_margin) function_name_QA_fetch_get_sh_margin
(parameters
(identifier_date) identifier_date
)parameters
(block
(if_statement
(comparison_operator
(identifier_date) identifier_date
(identifier_trade_date_... | return shanghai margin data
Arguments:
date {str YYYY-MM-DD} -- date format
Returns:
pandas.DataFrame -- res for margin data |
(module
(function_definition
(function_name_list_resources) function_name_list_resources
(parameters
(identifier_self) identifier_self
(identifier_device_id) identifier_device_id
)parameters
(block
(expression_statement
(assignment
(identifier_api) identifier_api
... | List all resources registered to a connected device.
.. code-block:: python
>>> for r in api.list_resources(device_id):
print(r.name, r.observable, r.uri)
None,True,/3/0/1
Update,False,/5/0/3
...
:param str device_id: The ID of the d... |
(module
(function_definition
(function_name_file_handler) function_name_file_handler
(parameters
(identifier_self) identifier_self
(identifier_handler_type) identifier_handler_type
(identifier_path) identifier_path
(identifier_prefixed_path) identifier_prefixed_path
(identifier_s... | Create a dict with all kwargs of the `copy_file` or `link_file` method of the super class and add it to
the queue for later processing. |
(module
(function_definition
(function_name_login_form_factory) function_name_login_form_factory
(parameters
(identifier_Form) identifier_Form
(identifier_app) identifier_app
)parameters
(block
(class_definition
(identifier_LoginForm) identifier_LoginForm
(argument_li... | Return extended login form. |
(module
(function_definition
(function_name_purge) function_name_purge
(parameters
(identifier_self) identifier_self
)parameters
(block
(while_statement
(not_operator
(call
(attribute
(attribute
(identifier_self) identifier_self
... | Clean old transactions |
(module
(function_definition
(function_name_delete) function_name_delete
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(augmented_assignment
(attribute
(attribute
(identifier_self) identifier_self
... | Delete a multipart object. |
(module
(function_definition
(function_name_process_xml) function_name_process_xml
(parameters
(identifier_xml_str) identifier_xml_str
)parameters
(block
(try_statement
(block
(expression_statement
(assignment
(identifier_tree) identifier_tree
... | Return processor with Statements extracted from a Sparser XML.
Parameters
----------
xml_str : str
The XML string obtained by reading content with Sparser, using the
'xml' output mode.
Returns
-------
sp : SparserXMLProcessor
A SparserXMLProcessor which has extracted St... |
(module
(function_definition
(function_name_deactivate) function_name_deactivate
(parameters
(identifier_cls) identifier_cls
(typed_parameter
(identifier_access_key) identifier_access_key
(type
(identifier_str) identifier_str
)type
)typed_parameter
)para... | Deactivates this keypair.
Deactivated keypairs cannot make any API requests
unless activated again by an administrator.
You need an admin privilege for this operation. |
(module
(function_definition
(function_name_tween) function_name_tween
(parameters
(identifier_self) identifier_self
(identifier_t) identifier_t
)parameters
(block
(if_statement
(comparison_operator
(identifier_t) identifier_t
(None) None
)comparis... | t is number between 0 and 1 to indicate how far the tween has progressed |
(module
(function_definition
(function_name__get_prepped_model_field) function_name__get_prepped_model_field
(parameters
(identifier_model_obj) identifier_model_obj
(identifier_field) identifier_field
)parameters
(block
(expression_statement
(assignment
(identifier_... | Gets the value of a field of a model obj that is prepared for the db. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.