sequence stringlengths 557 12.7k | docstring stringlengths 4 15.2k |
|---|---|
(module
(function_definition
(function_name_is_dental) function_name_is_dental
(parameters
(identifier_c) identifier_c
(identifier_lang) identifier_lang
)parameters
(block
(expression_statement
(assignment
(identifier_o) identifier_o
(call
(ide... | Is the character a dental |
(module
(function_definition
(function_name__read_hypocentre_from_ndk_string) function_name__read_hypocentre_from_ndk_string
(parameters
(identifier_self) identifier_self
(identifier_linestring) identifier_linestring
)parameters
(block
(expression_statement
(assignment
... | Reads the hypocentre data from the ndk string to return an
instance of the GCMTHypocentre class |
(module
(function_definition
(function_name_removeContainer) function_name_removeContainer
(parameters
(identifier_tag) identifier_tag
)parameters
(block
(expression_statement
(assignment
(identifier_container) identifier_container
(call
(identifier_... | Check if a container with a given tag exists. Kill it if it exists.
No extra side effects. Handles and reraises TypeError, and
APIError exceptions. |
(module
(function_definition
(function_name_check_convert_string) function_name_check_convert_string
(parameters
(identifier_obj) identifier_obj
(default_parameter
(identifier_name) identifier_name
(None) None
)default_parameter
(default_parameter
(identifier_no... | Ensures the provided object can be interpreted as a unicode string, optionally with
additional restrictions imposed. By default this means a non-zero length string
which does not begin or end in whitespace. |
(module
(function_definition
(function_name_get_seconds_description) function_name_get_seconds_description
(parameters
(identifier_self) identifier_self
)parameters
(block
(return_statement
(call
(attribute
(identifier_self) identifier_self
(identi... | Generates a description for only the SECONDS portion of the expression
Returns:
The SECONDS description |
(module
(function_definition
(function_name__ensure_append) function_name__ensure_append
(parameters
(identifier_self) identifier_self
(identifier_new_items) identifier_new_items
(identifier_append_to) identifier_append_to
(default_parameter
(identifier_index) identifier_index
... | Ensure an item is appended to a list or create a new empty list
:param new_items: the item(s) to append
:type new_items: list(obj)
:param append_to: the list on which to append the items
:type append_to: list()
:param index: index of the list on which to append the items
... |
(module
(function_definition
(function_name_available_providers) function_name_available_providers
(parameters
(identifier_request) identifier_request
)parameters
(block
(expression_statement
(string_"Adds the list of enabled providers to the context.") string_"Adds the list of ena... | Adds the list of enabled providers to the context. |
(module
(function_definition
(function_name_find_users_by_email_starting_with) function_name_find_users_by_email_starting_with
(parameters
(default_parameter
(identifier_email_prefix) identifier_email_prefix
(None) None
)default_parameter
(default_parameter
(identifie... | Returns a command that retrieves users by its email_prefix, ordered by email.
It returns a max number of users defined by page_size arg. Next result can be retrieved using cursor, in
a next call. It is provided in cursor attribute from command. |
(module
(function_definition
(function_name_query_by_post) function_name_query_by_post
(parameters
(identifier_postid) identifier_postid
)parameters
(block
(return_statement
(call
(attribute
(call
(attribute
(call
... | Query records by post. |
(module
(function_definition
(function_name_insert) function_name_insert
(parameters
(identifier_self) identifier_self
(identifier_index) identifier_index
(list_splat_pattern
(identifier_grids) identifier_grids
)list_splat_pattern
)parameters
(block
(expression_st... | Return a copy with ``grids`` inserted before ``index``.
The given grids are inserted (as a block) into ``self``, yielding
a new grid whose number of dimensions is the sum of the numbers of
dimensions of all involved grids.
Note that no changes are made in-place.
Parameters
... |
(module
(function_definition
(function_name_create_at_path) function_name_create_at_path
(parameters
(identifier_self) identifier_self
(identifier_asset_content) identifier_asset_content
(identifier_url_path) identifier_url_path
(default_parameter
(identifier_tags) identifier_t... | Create asset at a specific URL path on the server |
(module
(function_definition
(function_name_is_notifying) function_name_is_notifying
(parameters
(identifier_cls) identifier_cls
(identifier_user_or_email) identifier_user_or_email
(identifier_instance) identifier_instance
)parameters
(block
(return_statement
(call
... | Check if the watch created by notify exists. |
(module
(function_definition
(function_name_frame_to_seconds) function_name_frame_to_seconds
(parameters
(identifier_self) identifier_self
(identifier_frame_index) identifier_frame_index
(identifier_sr) identifier_sr
)parameters
(block
(expression_statement
(assignment
... | Return a tuple containing the start and end of the frame in seconds. |
(module
(function_definition
(function_name___pop_top_frame) function_name___pop_top_frame
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_popped) identifier_popped
(call
(attribute
... | Pops the top frame off the frame stack. |
(module
(function_definition
(function_name_merge_conf) function_name_merge_conf
(parameters
(identifier_to_hash) identifier_to_hash
(identifier_other_hash) identifier_other_hash
(default_parameter
(identifier_path) identifier_path
(list
)list
)default_parameter... | merges other_hash into to_hash |
(module
(function_definition
(function_name_fetch_tweets) function_name_fetch_tweets
(parameters
(identifier_account_file) identifier_account_file
(identifier_outfile) identifier_outfile
(identifier_limit) identifier_limit
)parameters
(block
(expression_statement
(call
... | Fetch up to limit tweets for each account in account_file and write to
outfile. |
(module
(function_definition
(function_name_max) function_name_max
(parameters
(identifier_self) identifier_self
)parameters
(block
(return_statement
(conditional_expression
(call
(identifier_int) identifier_int
(argument_list
(attrib... | Returns the maximum value of the domain.
:rtype: `float` or `np.inf` |
(module
(function_definition
(function_name_validate) function_name_validate
(parameters
(identifier_self) identifier_self
)parameters
(block
(if_statement
(attribute
(identifier_self) identifier_self
(identifier_required_languages) identifier_required_languages... | Perform options validation. |
(module
(function_definition
(function_name_iter_items) function_name_iter_items
(parameters
(identifier_cls) identifier_cls
(identifier_repo) identifier_repo
(identifier_rev) identifier_rev
(default_parameter
(identifier_paths) identifier_paths
(string_'') string_''
... | Find all commits matching the given criteria.
:param repo: is the Repo
:param rev: revision specifier, see git-rev-parse for viable options
:param paths:
is an optional path or list of paths, if set only Commits that include the path
or paths will be considered
:... |
(module
(function_definition
(function_name_count_series) function_name_count_series
(parameters
(identifier_y_true) identifier_y_true
(identifier_y_score) identifier_y_score
(default_parameter
(identifier_countna) identifier_countna
(False) False
)default_parameter
... | Returns series whose i-th entry is the number of examples in the top i |
(module
(function_definition
(function_name_insert) function_name_insert
(parameters
(identifier_self) identifier_self
(identifier_table_name) identifier_table_name
(identifier_record) identifier_record
(default_parameter
(identifier_attr_names) identifier_attr_names
(N... | Send an INSERT query to the database.
:param str table_name: Table name of executing the query.
:param record: Record to be inserted.
:type record: |dict|/|namedtuple|/|list|/|tuple|
:raises IOError: |raises_write_permission|
:raises simplesqlite.NullDatabaseConnectionError:
... |
(module
(function_definition
(function_name_intervals_to_durations) function_name_intervals_to_durations
(parameters
(identifier_intervals) identifier_intervals
)parameters
(block
(expression_statement
(call
(identifier_validate_intervals) identifier_validate_intervals
... | Converts an array of n intervals to their n durations.
Parameters
----------
intervals : np.ndarray, shape=(n, 2)
An array of time intervals, as returned by
:func:`mir_eval.io.load_intervals()`.
The ``i`` th interval spans time ``intervals[i, 0]`` to
``intervals[i, 1]``.
... |
(module
(function_definition
(function_name_light) function_name_light
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_sun) identifier_sun
(call
(attribute
(attribute
... | Returns if object is augmenting or diminishing its
light. |
(module
(function_definition
(function_name_run_parallel) function_name_run_parallel
(parameters
(identifier_self) identifier_self
(identifier_para_func) identifier_para_func
)parameters
(block
(if_statement
(attribute
(identifier_self) identifier_self
(id... | Run parallel calulation
This will run the parallel calculation on self.num_processors.
Args:
para_func (obj): Function object to be used in parallel.
Returns:
(dict): Dictionary with parallel results. |
(module
(function_definition
(function_name_get_hosts) function_name_get_hosts
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_group) identifier_group
(None) None
)default_parameter
)parameters
(block
(expression_statement
(a... | Get the hosts |
(module
(function_definition
(function_name_split_ref_from_uri) function_name_split_ref_from_uri
(parameters
(identifier_uri) identifier_uri
)parameters
(block
(if_statement
(not_operator
(call
(identifier_isinstance) identifier_isinstance
(argumen... | Given a path or URI, check for a ref and split it from the path if it is present,
returning a tuple of the original input and the ref or None.
:param AnyStr uri: The path or URI to split
:returns: A 2-tuple of the path or URI and the ref
:rtype: Tuple[AnyStr, Optional[AnyStr]] |
(module
(function_definition
(function_name_zrem) function_name_zrem
(parameters
(identifier_self) identifier_self
(identifier_key) identifier_key
(list_splat_pattern
(identifier_members) identifier_members
)list_splat_pattern
)parameters
(block
(return_statement
... | Removes the specified members from the sorted set stored at key.
Non existing members are ignored.
An error is returned when key exists and does not hold a sorted set.
.. note::
**Time complexity**: ``O(M*log(N))`` with ``N`` being the number of
elements in the sorted s... |
(module
(function_definition
(function_name_on_epoch_end) function_name_on_epoch_end
(parameters
(identifier_self) identifier_self
(identifier_epoch) identifier_epoch
(identifier_smooth_loss) identifier_smooth_loss
(identifier_last_metrics) identifier_last_metrics
(dictionary_spl... | Logs training loss, validation loss and custom metrics & log prediction samples & save model |
(module
(function_definition
(function_name__write_info) function_name__write_info
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_write) identifi... | Write API Info file |
(module
(function_definition
(function_name_load_calibration_template) function_name_load_calibration_template
(parameters
(identifier_self) identifier_self
(identifier_template) identifier_template
)parameters
(block
(expression_statement
(call
(attribute
... | Reloads calibration settings from saved template doc
:param template: Values for calibration stimuli (see calibration_template function)
:type template: dict |
(module
(function_definition
(function_name___check_focus) function_name___check_focus
(parameters
(identifier_self) identifier_self
(identifier_event) identifier_event
)parameters
(block
(expression_statement
(assignment
(identifier_changed) identifier_changed
... | Checks if the focus has changed |
(module
(function_definition
(function_name__calc_resp) function_name__calc_resp
(parameters
(identifier_password_hash) identifier_password_hash
(identifier_server_challenge) identifier_server_challenge
)parameters
(block
(expression_statement
(augmented_assignment
... | Generate the LM response given a 16-byte password hash and the
challenge from the CHALLENGE_MESSAGE
:param password_hash: A 16-byte password hash
:param server_challenge: A random 8-byte response generated by the
server in the CHALLENGE_MESSAGE
:return res: A 24-byte buffer ... |
(module
(function_definition
(function_name_image) function_name_image
(parameters
(identifier_self) identifier_self
(identifier_raw_url) identifier_raw_url
(default_parameter
(identifier_title) identifier_title
(string_'') string_''
)default_parameter
(default_pa... | Filters the ``src`` attribute of an image.
Note that filtering the source URL of an ``<img>`` tag is only a very
basic protection, and it's mostly useless in modern browsers (they block
JavaScript in there by default). An example of attack that filtering
does not thwart is phishing base... |
(module
(function_definition
(function_name_line_nbr_from_position) function_name_line_nbr_from_position
(parameters
(identifier_self) identifier_self
(identifier_y_pos) identifier_y_pos
)parameters
(block
(expression_statement
(assignment
(identifier_editor) identi... | Returns the line number from the y_pos.
:param y_pos: Y pos in the editor
:return: Line number (0 based), -1 if out of range |
(module
(function_definition
(function_name_ext_pillar) function_name_ext_pillar
(parameters
(identifier_minion_id) identifier_minion_id
(identifier_pillar) identifier_pillar
(list_splat_pattern
(identifier_args) identifier_args
)list_splat_pattern
(dictionary_splat_patte... | Execute queries against POSTGRES, merge and return as a dict |
(module
(function_definition
(function_name_get_wrapped_instance) function_name_get_wrapped_instance
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_instance) identifier_instance
(None) None
)default_parameter
)parameters
(block
(if_... | Returns a wrapped model instance. |
(module
(function_definition
(function_name_unload) function_name_unload
(parameters
(identifier_self) identifier_self
)parameters
(block
(assert_statement
(comparison_operator
(call
(attribute
(identifier_self) identifier_self
(ide... | If the reference is loaded, unload it.
.. Note:: Do not confuse this with a delete. This means, that the reference stays in the
scene, but no data is read from the reference.
This will call :meth:`RefobjInterface.unload` and set the status to :data:`Reftrack.UNLOADED`.
It wil... |
(module
(function_definition
(function_name_read_with_columns) function_name_read_with_columns
(parameters
(identifier_func) identifier_func
)parameters
(block
(function_definition
(function_name_wrapper) function_name_wrapper
(parameters
(list_splat_pattern
... | Decorate a Table read method to use the ``columns`` keyword |
(module
(function_definition
(function_name__build_params) function_name__build_params
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_d) identifier_d
(call
(identifier_OrderedDict) ident... | Have no idea why wrong params order can't get data.
So, use `OrderedDict` here. |
(module
(function_definition
(function_name__mark_candidate_indexes) function_name__mark_candidate_indexes
(parameters
(identifier_lines) identifier_lines
(identifier_candidate) identifier_candidate
)parameters
(block
(expression_statement
(assignment
(identifier_ma... | Mark candidate indexes with markers
Markers:
* c - line that could be a signature line
* l - long line
* d - line that starts with dashes but has other chars as well
>>> _mark_candidate_lines(['Some text', '', '-', 'Bob'], [0, 2, 3])
'cdc' |
(module
(function_definition
(function_name_get_desktop_size) function_name_get_desktop_size
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier__ptr) identifier__ptr
(call
(attribute
... | Get the size of the desktop display |
(module
(function_definition
(function_name_Henry_H_at_T) function_name_Henry_H_at_T
(parameters
(identifier_T) identifier_T
(identifier_H) identifier_H
(identifier_Tderiv) identifier_Tderiv
(default_parameter
(identifier_T0) identifier_T0
(None) None
)default_par... | Evaluate Henry's constant H at temperature T
Parameters
----------
T: float
Temperature (with units), assumed to be in Kelvin if ``units == None``
H: float
Henry's constant
Tderiv: float (optional)
dln(H)/d(1/T), assumed to be in Kelvin if ``units == None``.
T0: float
... |
(module
(function_definition
(function_name_alphafilter) function_name_alphafilter
(parameters
(identifier_request) identifier_request
(identifier_queryset) identifier_queryset
(identifier_template) identifier_template
)parameters
(block
(expression_statement
(assignmen... | Render the template with the filtered queryset |
(module
(function_definition
(function_name__resolve_time) function_name__resolve_time
(parameters
(identifier_value) identifier_value
)parameters
(block
(if_statement
(boolean_operator
(comparison_operator
(identifier_value) identifier_value
(None... | Resolve the time in seconds of a configuration value. |
(module
(function_definition
(function_name_list_keys) function_name_list_keys
(parameters
(typed_parameter
(identifier_request) identifier_request
(type
(attribute
(identifier_web) identifier_web
(identifier_Request) identifier_Request
)attrib... | List the key files installed in the system.
This responds with a list of the same objects as key:
```
GET /wifi/keys -> 200 OK
{ keys: [
{
uri: '/wifi/keys/some-hex-digest',
id: 'some-hex-digest',
name: 'keyfile.pem'
},
...
]
}
``... |
(module
(function_definition
(function_name_save_file) function_name_save_file
(parameters
(identifier_filename) identifier_filename
(identifier_data) identifier_data
(default_parameter
(identifier_mk_parents) identifier_mk_parents
(True) True
)default_parameter
)pa... | Save file to disk.
Paramaters
----------
filename : pathlib.Path
Path to the file.
data : str
File contents.
mk_parents : bool, optional
If to create parent directories. |
(module
(function_definition
(function_name_gen_send_stdout_url) function_name_gen_send_stdout_url
(parameters
(identifier_ip) identifier_ip
(identifier_port) identifier_port
)parameters
(block
(return_statement
(call
(attribute
(string_'{0}:{1}{2}{3}/{4... | Generate send stdout url |
(module
(function_definition
(function_name_get_objective_banks_by_activity) function_name_get_objective_banks_by_activity
(parameters
(identifier_self) identifier_self
(identifier_activity_id) identifier_activity_id
)parameters
(block
(expression_statement
(assignment
... | Gets the list of ``ObjectiveBanks`` mapped to a ``Activity``.
arg: activity_id (osid.id.Id): ``Id`` of a ``Activity``
return: (osid.learning.ObjectiveBankList) - list of objective
bank ``Ids``
raise: NotFound - ``activity_id`` is not found
raise: NullArgument - ``ac... |
(module
(function_definition
(function_name_et) function_name_et
(parameters
(identifier_name) identifier_name
(identifier_parallel) identifier_parallel
(identifier_inputs) identifier_inputs
(identifier_outputs) identifier_outputs
(identifier_expression) identifier_expression
... | Represent an ExpressionTool that reorders inputs using javascript. |
(module
(function_definition
(function_name_get_as_datadict) function_name_get_as_datadict
(parameters
(identifier_self) identifier_self
)parameters
(block
(return_statement
(call
(identifier_dict) identifier_dict
(argument_list
(keyword_argument
... | Get information about this object as a dictionary. Used by WebSocket interface to pass some
relevant information to client applications. |
(module
(function_definition
(function_name_update_with) function_name_update_with
(parameters
(identifier_self) identifier_self
(identifier_update_fn) identifier_update_fn
(list_splat_pattern
(identifier_maps) identifier_maps
)list_splat_pattern
)parameters
(block
... | Return a new PMap with the items in Mappings maps inserted. If the same key is present in multiple
maps the values will be merged using merge_fn going from left to right.
>>> from operator import add
>>> m1 = m(a=1, b=2)
>>> m1.update_with(add, m(a=2))
pmap({'a': 3, 'b': 2})
... |
(module
(function_definition
(function_name__attend_process) function_name__attend_process
(parameters
(identifier_self) identifier_self
(identifier_proc) identifier_proc
(identifier_sleeptime) identifier_sleeptime
)parameters
(block
(try_statement
(block
(exp... | Waits on a process for a given time to see if it finishes, returns True
if it's still running after the given time or False as soon as it
returns.
:param psutil.Popen proc: Process object opened by psutil.Popen()
:param float sleeptime: Time to wait
:return bool: True if proces... |
(module
(function_definition
(function_name_run_exitfuncs) function_name_run_exitfuncs
(parameters
)parameters
(block
(expression_statement
(assignment
(identifier_exc_info) identifier_exc_info
(None) None
)assignment
)expression_statement
(for_sta... | Function that behaves exactly like Python's atexit, but runs atexit functions
in the order in which they were registered, not reversed. |
(module
(function_definition
(function_name_configurationChangeAcknowledge) function_name_configurationChangeAcknowledge
(parameters
)parameters
(block
(expression_statement
(assignment
(identifier_a) identifier_a
(call
(identifier_TpPd) identifier_TpPd
... | CONFIGURATION CHANGE ACKNOWLEDGE Section 9.1.12c |
(module
(function_definition
(function_name_create_dir) function_name_create_dir
(parameters
(identifier_path) identifier_path
)parameters
(block
(try_statement
(block
(expression_statement
(call
(attribute
(identifier_os) identif... | Create directory specified by `path` if it doesn't already exist.
Parameters
----------
path : str
path to directory
Returns
-------
bool
True if `path` exists |
(module
(function_definition
(function_name_text_should_be_visible) function_name_text_should_be_visible
(parameters
(identifier_self) identifier_self
(identifier_text) identifier_text
(default_parameter
(identifier_exact_match) identifier_exact_match
(False) False
)def... | Verifies that element identified with text is visible.
New in AppiumLibrary 1.4.5 |
(module
(function_definition
(function_name_download_file) function_name_download_file
(parameters
(identifier_self) identifier_self
(identifier_remote_filename) identifier_remote_filename
(default_parameter
(identifier_local_filename) identifier_local_filename
(None) None
... | Download file from github.
Args:
remote_filename (str): The name of the file as defined in git repository.
local_filename (str, optional): Defaults to None. The name of the file as it should be
be written to local filesystem. |
(module
(function_definition
(function_name_register_blueprint) function_name_register_blueprint
(parameters
(identifier_self) identifier_self
(identifier_blueprint) identifier_blueprint
)parameters
(block
(if_statement
(comparison_operator
(identifier_blueprint) id... | Register given blueprint on curren app.
This method is provided for using inside plugin's module-level
:func:`register_plugin` functions.
:param blueprint: blueprint object with plugin endpoints
:type blueprint: flask.Blueprint |
(module
(function_definition
(function_name_run_interactive_command) function_name_run_interactive_command
(parameters
(identifier_command) identifier_command
(default_parameter
(identifier_env) identifier_env
(None) None
)default_parameter
(dictionary_splat_pattern
... | Runs a command interactively, reusing the current stdin, stdout and stderr
Args:
command(list of str): args of the command to execute, including the
command itself as command[0] as `['ls', '-l']`
env(dict of str:str): If set, will use the given dict as env for the
subprocess... |
(module
(function_definition
(function_name_confirm) function_name_confirm
(parameters
(identifier_prompt) identifier_prompt
(default_parameter
(identifier_default) identifier_default
(None) None
)default_parameter
(default_parameter
(identifier_show_default) id... | Prompts for confirmation from the user. |
(module
(function_definition
(function_name_process_cbn_jgif_file) function_name_process_cbn_jgif_file
(parameters
(identifier_file_name) identifier_file_name
)parameters
(block
(with_statement
(with_clause
(with_item
(as_pattern
(call
... | Return a PybelProcessor by processing a CBN JGIF JSON file.
Parameters
----------
file_name : str
The path to a CBN JGIF JSON file.
Returns
-------
bp : PybelProcessor
A PybelProcessor object which contains INDRA Statements in
bp.statements. |
(module
(function_definition
(function_name_domain_create) function_name_domain_create
(parameters
(identifier_self) identifier_self
(identifier_domain) identifier_domain
(default_parameter
(identifier_master) identifier_master
(True) True
)default_parameter
(dict... | Registers a new Domain on the acting user's account. Make sure to point
your registrar to Linode's nameservers so that Linode's DNS manager will
correctly serve your domain.
:param domain: The domain to register to Linode's DNS manager.
:type domain: str
:param master: Whether ... |
(module
(function_definition
(function_name_get_description) function_name_get_description
(parameters
(identifier_self) identifier_self
)parameters
(block
(return_statement
(call
(identifier_DisplayText) identifier_DisplayText
(argument_list
(keywor... | Creates a description |
(module
(function_definition
(function_name__tscube_app) function_name__tscube_app
(parameters
(identifier_self) identifier_self
(identifier_xmlfile) identifier_xmlfile
)parameters
(block
(expression_statement
(assignment
(identifier_xmlfile) identifier_xmlfile
... | Run gttscube as an application. |
(module
(function_definition
(function_name_query) function_name_query
(parameters
(identifier_self) identifier_self
(identifier_domain) identifier_domain
)parameters
(block
(expression_statement
(assignment
(identifier_result) identifier_result
(dictionar... | The actual query happens here. Time from queries is replaced with isoformat.
:param domain: The domain which should gets queried.
:type domain: str
:returns: List of dicts containing the search results.
:rtype: [list, dict] |
(module
(function_definition
(function_name_process_frames_face) function_name_process_frames_face
(parameters
(identifier_self) identifier_self
(identifier_frames) identifier_frames
)parameters
(block
(expression_statement
(assignment
(identifier_detector) identifi... | Preprocess from frames using face detector |
(module
(function_definition
(function_name_request_single) function_name_request_single
(parameters
(identifier_self) identifier_self
(identifier_name) identifier_name
(default_parameter
(identifier_content) identifier_content
(dictionary
)dictionary
)default_p... | Simple wrapper arround request to extract a single response
:returns: the first tag in the response body |
(module
(function_definition
(function_name_users) function_name_users
(parameters
(identifier_self) identifier_self
(identifier_query) identifier_query
(default_parameter
(identifier_page) identifier_page
(integer_1) integer_1
)default_parameter
(default_paramete... | Get a single page of user results for a query.
:param query [string]: Search terms.
:param page [integer]: Page number to retrieve. (Optional; default: 1)
:param per_page [integer]: Number of items per page. (Optional; default: 10)
:return: [dict]: {u'total': 0, u'total_pages': 0, u'res... |
(module
(function_definition
(function_name_reverse_func) function_name_reverse_func
(parameters
(identifier_apps) identifier_apps
(identifier_schema_editor) identifier_schema_editor
)parameters
(block
(expression_statement
(call
(identifier_print) identifier_print
... | manage migrate backup_app 0003_auto_20160127_2002 |
(module
(function_definition
(function_name_fetch_points_of_sales) function_name_fetch_points_of_sales
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_ticket) identifier_ticket
(None) None
)default_parameter
)parameters
(block
(expre... | Fetch all point of sales objects.
Fetch all point of sales from the WS and store (or update) them
locally.
Returns a list of tuples with the format (pos, created,). |
(module
(function_definition
(function_name__go_install) function_name__go_install
(parameters
(identifier_self) identifier_self
(identifier_target) identifier_target
(identifier_gopath) identifier_gopath
(identifier_build_flags) identifier_build_flags
)parameters
(block
... | Create and execute a `go install` command. |
(module
(function_definition
(function_name__array_type_std_res) function_name__array_type_std_res
(parameters
(identifier_self) identifier_self
(identifier_counts) identifier_counts
(identifier_total) identifier_total
(identifier_colsum) identifier_colsum
(identifier_rowsum) ide... | Return ndarray containing standard residuals for array values.
The shape of the return value is the same as that of *counts*.
Array variables require special processing because of the
underlying math. Essentially, it boils down to the fact that the
variable dimensions are mutually indep... |
(module
(function_definition
(function_name_connect) function_name_connect
(parameters
(identifier_self) identifier_self
(identifier_format) identifier_format
(list_splat_pattern
(identifier_args) identifier_args
)list_splat_pattern
)parameters
(block
(return_stat... | Connect a socket to a formatted endpoint
Returns 0 if OK, -1 if the endpoint was invalid. |
(module
(function_definition
(function_name_hex_to_hsv) function_name_hex_to_hsv
(parameters
(identifier_color) identifier_color
)parameters
(block
(expression_statement
(assignment
(identifier_color) identifier_color
(call
(identifier_normalize) ide... | Converts from hex to hsv
Parameters:
-----------
color : string
Color representation on color
Example:
hex_to_hsv('#ff9933') |
(module
(function_definition
(function_name_serialize) function_name_serialize
(parameters
(identifier_self) identifier_self
(identifier_buf) identifier_buf
(identifier_offset) identifier_offset
)parameters
(block
(expression_statement
(assignment
(identifier_... | Outputs the expression of the wire protocol of the flow match into
the buf.
Returns the output length. |
(module
(function_definition
(function_name_read_excitation_energies) function_name_read_excitation_energies
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_transitions) identifier_transitions
(call
... | Read a excitation energies after a TD-DFT calculation.
Returns:
A list: A list of tuple for each transition such as
[(energie (eV), lambda (nm), oscillatory strength), ... ] |
(module
(function_definition
(function_name_format_datetime) function_name_format_datetime
(parameters
(typed_parameter
(identifier_d) identifier_d
(type
(identifier_PotentialDatetimeType) identifier_PotentialDatetimeType
)type
)typed_parameter
(typed_parame... | Format a datetime with a ``strftime`` format specification string, or
return ``default`` if the input is ``None``. |
(module
(function_definition
(function_name__setup_transport) function_name__setup_transport
(parameters
(identifier_self) identifier_self
)parameters
(block
(if_statement
(identifier_HAVE_PY26_SSL) identifier_HAVE_PY26_SSL
(block
(if_statement
(call
... | Wrap the socket in an SSL object, either the
new Python 2.6 version, or the older Python 2.5 and
lower version. |
(module
(function_definition
(function_name_new) function_name_new
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_filename) identifier_filename
(None) None
)default_parameter
)parameters
(block
(expression_statement
(assignm... | start a session an independent process |
(module
(function_definition
(function_name_read_lease) function_name_read_lease
(parameters
(identifier_self) identifier_self
(identifier_lease_id) identifier_lease_id
)parameters
(block
(expression_statement
(assignment
(identifier_params) identifier_params
... | Retrieve lease metadata.
Supported methods:
PUT: /sys/leases/lookup. Produces: 200 application/json
:param lease_id: the ID of the lease to lookup.
:type lease_id: str | unicode
:return: Parsed JSON response from the leases PUT request
:rtype: dict. |
(module
(function_definition
(function_name_maybeparens) function_name_maybeparens
(parameters
(identifier_lparen) identifier_lparen
(identifier_item) identifier_item
(identifier_rparen) identifier_rparen
)parameters
(block
(return_statement
(binary_operator
(... | Wrap an item in optional parentheses, only applying them if necessary. |
(module
(function_definition
(function_name_get_search_fields) function_name_get_search_fields
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_search_fields) identifier_search_fields
(call
... | Returns the search field names mapped to weights as a dict.
Used in ``get_queryset`` below to tell ``SearchableQuerySet``
which search fields to use. Also used by ``DisplayableAdmin``
to populate Django admin's ``search_fields`` attribute.
Search fields can be populated via
``Se... |
(module
(function_definition
(function_name_extract_new) function_name_extract_new
(parameters
(identifier_cls) identifier_cls
)parameters
(type
(identifier_DevicesTypeUnbound) identifier_DevicesTypeUnbound
)type
(block
(expression_statement
(assignment
(ide... | Gather all "new" |Node| or |Element| objects.
See the main documentation on module |devicetools| for further
information. |
(module
(function_definition
(function_name_reset_component) function_name_reset_component
(parameters
(identifier_self) identifier_self
(identifier_component) identifier_component
)parameters
(block
(if_statement
(comparison_operator
(call
(identifier_i... | Unset component in this URI
:param component: component name (or component type) to reset
:return: None |
(module
(function_definition
(function_name_add_histogram_summary) function_name_add_histogram_summary
(parameters
(identifier_self) identifier_self
(identifier_x) identifier_x
(default_parameter
(identifier_tag) identifier_tag
(None) None
)default_parameter
)parame... | Add a summary operation to visualize the histogram of x's values. |
(module
(function_definition
(function_name_set_baselines) function_name_set_baselines
(parameters
(identifier_self) identifier_self
)parameters
(block
(if_statement
(attribute
(attribute
(identifier_self) identifier_self
(identifier_style) identif... | Modify coords to shift tree position for x,y baseline arguments. This
is useful for arrangeing trees onto a Canvas with other plots, but
still sharing a common cartesian axes coordinates. |
(module
(function_definition
(function_name_deliver_tx) function_name_deliver_tx
(parameters
(identifier_self) identifier_self
(identifier_raw_transaction) identifier_raw_transaction
)parameters
(block
(expression_statement
(call
(attribute
(identifier_s... | Validate the transaction before mutating the state.
Args:
raw_tx: a raw string (in bytes) transaction. |
(module
(function_definition
(function_name_solve_assignement) function_name_solve_assignement
(parameters
(identifier_self) identifier_self
(identifier_costs) identifier_costs
)parameters
(block
(if_statement
(boolean_operator
(comparison_operator
(iden... | Solves assignment problem using Hungarian implementation by Brian M. Clapper.
@param costs: square cost matrix
@return: assignment function
@rtype: int->int |
(module
(function_definition
(function_name_is_docker_reachable) function_name_is_docker_reachable
(parameters
(identifier_self) identifier_self
)parameters
(block
(try_statement
(block
(expression_statement
(call
(attribute
(attr... | Checks if Docker daemon is running. This is required for us to invoke the function locally
Returns
-------
bool
True, if Docker is available, False otherwise |
(module
(function_definition
(function_name_is_sock_ok) function_name_is_sock_ok
(parameters
(identifier_self) identifier_self
(identifier_timeout_select) identifier_timeout_select
)parameters
(block
(expression_statement
(call
(attribute
(attribute
... | check if socket is OK |
(module
(function_definition
(function_name_set_meta) function_name_set_meta
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_meta) identifier_meta
(None) None
)default_parameter
(dictionary_splat_pattern
(identifier_kwargs) identifie... | Assign values to self.meta.
Meta is not returned |
(module
(function_definition
(function_name_calcRandW) function_name_calcRandW
(parameters
(identifier_self) identifier_self
(identifier_aLvlNow) identifier_aLvlNow
(identifier_pLvlNow) identifier_pLvlNow
)parameters
(block
(expression_statement
(assignment
(i... | Calculates the interest factor and wage rate this period using each agent's
capital stock to get the aggregate capital ratio.
Parameters
----------
aLvlNow : [np.array]
Agents' current end-of-period assets. Elements of the list correspond
to types in the economy... |
(module
(function_definition
(function_name__cleanup) function_name__cleanup
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(attribute
(identifier_self) identifier_self
(identifier_device) identif... | Frees lots of non-textual information, such as the fonts
and images and the objects that were needed to parse the
PDF. |
(module
(function_definition
(function_name__is_national_number_suffix_of_other) function_name__is_national_number_suffix_of_other
(parameters
(identifier_numobj1) identifier_numobj1
(identifier_numobj2) identifier_numobj2
)parameters
(block
(expression_statement
(assignment
... | Returns true when one national number is the suffix of the other or both
are the same. |
(module
(function_definition
(function_name_write) function_name_write
(parameters
(identifier_text) identifier_text
(identifier_path) identifier_path
)parameters
(block
(with_statement
(with_clause
(with_item
(as_pattern
(call
... | Writer text to file with utf-8 encoding.
Usage::
>>> from angora.dataIO import textfile
or
>>> from angora.dataIO import *
>>> textfile.write("hello world!", "test.txt") |
(module
(function_definition
(function_name_insertFromMimeData) function_name_insertFromMimeData
(parameters
(identifier_self) identifier_self
(identifier_data) identifier_data
)parameters
(block
(expression_statement
(assignment
(identifier_undoObj) identifier_undo... | Paste the MIME data at the current cursor position.
This method also adds another undo-object to the undo-stack. |
(module
(function_definition
(function_name_get_model_class) function_name_get_model_class
(parameters
(identifier_self) identifier_self
)parameters
(block
(try_statement
(block
(expression_statement
(assignment
(identifier_c) identifier_c
... | Returns model class |
(module
(function_definition
(function_name_from_json_file) function_name_from_json_file
(parameters
(identifier_cls) identifier_cls
(identifier_path) identifier_path
)parameters
(block
(with_statement
(with_clause
(with_item
(as_pattern
(c... | Return a template from a json allocated in a path.
:param path: string
:return: ServiceAgreementTemplate |
(module
(function_definition
(function_name_pad) function_name_pad
(parameters
(identifier_self) identifier_self
(identifier_pad_width) identifier_pad_width
(dictionary_splat_pattern
(identifier_kwargs) identifier_kwargs
)dictionary_splat_pattern
)parameters
(block
... | Pad this series to a new size
Parameters
----------
pad_width : `int`, pair of `ints`
number of samples by which to pad each end of the array.
Single int to pad both ends by the same amount, or
(before, after) `tuple` to give uneven padding
**kwargs
... |
(module
(function_definition
(function_name_handle_pagination) function_name_handle_pagination
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_page_num) identifier_page_num
(None) None
)default_parameter
(default_parameter
(identifie... | Handle retrieving and processing the next page of results. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.