sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name__worker) function_name__worker (parameters (typed_parameter (identifier_reader) identifier_reader (type (identifier_DatasetReader) identifier_DatasetReader )type )typed_parameter (typed_parameter (identifier_input_queue) identifier_input_queue (type (identifier_Queue) identifier_Queue )type )typed_parameter (typed_parameter (identifier_output_queue) identifier_output_queue (type (identifier_Queue) identifier_Queue )type )typed_parameter (typed_parameter (identifier_index) identifier_index (type (identifier_int) identifier_int )type )typed_parameter )parameters (type (None) None )type (block (while_statement (True) True (block (expression_statement (assignment (identifier_file_path) identifier_file_path (call (attribute (identifier_input_queue) identifier_input_queue (identifier_get) identifier_get )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_file_path) identifier_file_path (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_output_queue) identifier_output_queue (identifier_put) identifier_put )attribute (argument_list (identifier_index) identifier_index )argument_list )call )expression_statement (break_statement )break_statement )block )if_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (string_f"reading instances from {file_path}") string_f"reading instances from {file_path}" )argument_list )call )expression_statement (for_statement (identifier_instance) identifier_instance (call (attribute (identifier_reader) identifier_reader (identifier_read) identifier_read )attribute (argument_list (identifier_file_path) identifier_file_path )argument_list )call (block (expression_statement (call (attribute (identifier_output_queue) identifier_output_queue (identifier_put) identifier_put )attribute (argument_list (identifier_instance) identifier_instance )argument_list )call )expression_statement )block )for_statement )block )while_statement )block )function_definition )module
A worker that pulls filenames off the input queue, uses the dataset reader to read them, and places the generated instances on the output queue. When there are no filenames left on the input queue, it puts its ``index`` on the output queue and doesn't do anything else.
(module (function_definition (function_name_listFieldsFromWorkitem) function_name_listFieldsFromWorkitem (parameters (identifier_self) identifier_self (identifier_copied_from) identifier_copied_from (default_parameter (identifier_keep) identifier_keep (False) False )default_parameter )parameters (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_templater) identifier_templater )attribute (identifier_listFieldsFromWorkitem) identifier_listFieldsFromWorkitem )attribute (argument_list (identifier_copied_from) identifier_copied_from (keyword_argument (identifier_keep) identifier_keep (identifier_keep) identifier_keep )keyword_argument )argument_list )call )return_statement )block )function_definition )module
List all the attributes to be rendered directly from some to-be-copied workitems More details, please refer to :class:`rtcclient.template.Templater.listFieldsFromWorkitem`
(module (function_definition (function_name_remove) function_name_remove (parameters (identifier_self) identifier_self (identifier_pointer) identifier_pointer )parameters (block (expression_statement (assignment (identifier_doc) identifier_doc (call (identifier_deepcopy) identifier_deepcopy (argument_list (attribute (identifier_self) identifier_self (identifier_document) identifier_document )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_parent) identifier_parent (identifier_obj) identifier_obj )pattern_list (expression_list (None) None (identifier_doc) identifier_doc )expression_list )assignment )expression_statement (try_statement (block (for_statement (identifier_token) identifier_token (call (identifier_Pointer) identifier_Pointer (argument_list (identifier_pointer) identifier_pointer )argument_list )call (block (expression_statement (assignment (pattern_list (identifier_parent) identifier_parent (identifier_obj) identifier_obj )pattern_list (expression_list (identifier_obj) identifier_obj (call (attribute (identifier_token) identifier_token (identifier_extract) identifier_extract )attribute (argument_list (identifier_obj) identifier_obj (keyword_argument (identifier_bypass_ref) identifier_bypass_ref (True) True )keyword_argument )argument_list )call )expression_list )assignment )expression_statement )block )for_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_parent) identifier_parent (identifier_Mapping) identifier_Mapping )argument_list )call (block (delete_statement (subscript (identifier_parent) identifier_parent (identifier_token) identifier_token )subscript )delete_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_parent) identifier_parent (identifier_MutableSequence) identifier_MutableSequence )argument_list )call (block (expression_statement (call (attribute (identifier_parent) identifier_parent (identifier_pop) identifier_pop )attribute (argument_list (call (identifier_int) identifier_int (argument_list (identifier_token) identifier_token )argument_list )call )argument_list )call )expression_statement )block )if_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_error) identifier_error )as_pattern_target )as_pattern (block (raise_statement (call (identifier_Error) identifier_Error (argument_list (list_splat (attribute (identifier_error) identifier_error (identifier_args) identifier_args )attribute )list_splat )argument_list )call )raise_statement )block )except_clause )try_statement (return_statement (call (identifier_Target) identifier_Target (argument_list (identifier_doc) identifier_doc )argument_list )call )return_statement )block )function_definition )module
Remove element from sequence, member from mapping. :param pointer: the path to search in :return: resolved document :rtype: Target
(module (function_definition (function_name_shell_join) function_name_shell_join (parameters (identifier_delim) identifier_delim (identifier_it) identifier_it )parameters (block (expression_statement (string_'Joins an iterable of ShellQuoted with a delimiter between each two') string_'Joins an iterable of ShellQuoted with a delimiter between each two' )expression_statement (return_statement (call (identifier_ShellQuoted) identifier_ShellQuoted (argument_list (call (attribute (identifier_delim) identifier_delim (identifier_join) identifier_join )attribute (generator_expression (call (identifier_raw_shell) identifier_raw_shell (argument_list (identifier_s) identifier_s )argument_list )call (for_in_clause (identifier_s) identifier_s (identifier_it) identifier_it )for_in_clause )generator_expression )call )argument_list )call )return_statement )block )function_definition )module
Joins an iterable of ShellQuoted with a delimiter between each two
(module (function_definition (function_name_import_module) function_name_import_module (parameters (identifier_self) identifier_self (identifier_modules) identifier_modules (default_parameter (identifier_shared) identifier_shared (False) False )default_parameter (default_parameter (identifier_into_spooler) identifier_into_spooler (False) False )default_parameter )parameters (block (if_statement (call (identifier_all) identifier_all (argument_list (tuple (identifier_shared) identifier_shared (identifier_into_spooler) identifier_into_spooler )tuple )argument_list )call (block (raise_statement (call (identifier_ConfigurationError) identifier_ConfigurationError (argument_list (string_'Unable to set both `shared` and `into_spooler` flags') string_'Unable to set both `shared` and `into_spooler` flags' )argument_list )call )raise_statement )block )if_statement (if_statement (identifier_into_spooler) identifier_into_spooler (block (expression_statement (assignment (identifier_command) identifier_command (string_'spooler-python-import') string_'spooler-python-import' )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_command) identifier_command (conditional_expression (string_'shared-python-import') string_'shared-python-import' (identifier_shared) identifier_shared (string_'python-import') string_'python-import' )conditional_expression )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__set) identifier__set )attribute (argument_list (identifier_command) identifier_command (identifier_modules) identifier_modules (keyword_argument (identifier_multi) identifier_multi (True) True )keyword_argument )argument_list )call )expression_statement (return_statement (attribute (identifier_self) identifier_self (identifier__section) identifier__section )attribute )return_statement )block )function_definition )module
Imports a python module. :param list|str|unicode modules: :param bool shared: Import a python module in all of the processes. This is done after fork but before request processing. :param bool into_spooler: Import a python module in the spooler. http://uwsgi-docs.readthedocs.io/en/latest/Spooler.html
(module (function_definition (function_name_validateDatetime) function_name_validateDatetime (parameters (identifier_value) identifier_value (default_parameter (identifier_blank) identifier_blank (False) False )default_parameter (default_parameter (identifier_strip) identifier_strip (None) None )default_parameter (default_parameter (identifier_allowlistRegexes) identifier_allowlistRegexes (None) None )default_parameter (default_parameter (identifier_blocklistRegexes) identifier_blocklistRegexes (None) None )default_parameter (default_parameter (identifier_formats) identifier_formats (tuple (string_'%Y/%m/%d %H:%M:%S') string_'%Y/%m/%d %H:%M:%S' (string_'%y/%m/%d %H:%M:%S') string_'%y/%m/%d %H:%M:%S' (string_'%m/%d/%Y %H:%M:%S') string_'%m/%d/%Y %H:%M:%S' (string_'%m/%d/%y %H:%M:%S') string_'%m/%d/%y %H:%M:%S' (string_'%x %H:%M:%S') string_'%x %H:%M:%S' (string_'%Y/%m/%d %H:%M') string_'%Y/%m/%d %H:%M' (string_'%y/%m/%d %H:%M') string_'%y/%m/%d %H:%M' (string_'%m/%d/%Y %H:%M') string_'%m/%d/%Y %H:%M' (string_'%m/%d/%y %H:%M') string_'%m/%d/%y %H:%M' (string_'%x %H:%M') string_'%x %H:%M' (string_'%Y/%m/%d %H:%M:%S') string_'%Y/%m/%d %H:%M:%S' (string_'%y/%m/%d %H:%M:%S') string_'%y/%m/%d %H:%M:%S' (string_'%m/%d/%Y %H:%M:%S') string_'%m/%d/%Y %H:%M:%S' (string_'%m/%d/%y %H:%M:%S') string_'%m/%d/%y %H:%M:%S' (string_'%x %H:%M:%S') string_'%x %H:%M:%S' )tuple )default_parameter (default_parameter (identifier_excMsg) identifier_excMsg (None) None )default_parameter )parameters (block (try_statement (block (return_statement (call (identifier__validateToDateTimeFormat) identifier__validateToDateTimeFormat (argument_list (identifier_value) identifier_value (identifier_formats) identifier_formats (keyword_argument (identifier_blank) identifier_blank (identifier_blank) identifier_blank )keyword_argument (keyword_argument (identifier_strip) identifier_strip (identifier_strip) identifier_strip )keyword_argument (keyword_argument (identifier_allowlistRegexes) identifier_allowlistRegexes (identifier_allowlistRegexes) identifier_allowlistRegexes )keyword_argument (keyword_argument (identifier_blocklistRegexes) identifier_blocklistRegexes (identifier_blocklistRegexes) identifier_blocklistRegexes )keyword_argument )argument_list )call )return_statement )block (except_clause (identifier_ValidationException) identifier_ValidationException (block (expression_statement (call (identifier__raiseValidationException) identifier__raiseValidationException (argument_list (binary_operator (call (identifier__) identifier__ (argument_list (string_'%r is not a valid date and time.') string_'%r is not a valid date and time.' )argument_list )call (parenthesized_expression (call (identifier__errstr) identifier__errstr (argument_list (identifier_value) identifier_value )argument_list )call )parenthesized_expression )binary_operator (identifier_excMsg) identifier_excMsg )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )module
Raises ValidationException if value is not a datetime formatted in one of the formats formats. Returns a datetime.datetime object of value. * value (str): The value being validated as a datetime. * blank (bool): If True, a blank string will be accepted. Defaults to False. * strip (bool, str, None): If None, whitespace is stripped from value. If a str, the characters in it are stripped from value. If False, nothing is stripped. * allowlistRegexes (Sequence, None): A sequence of regex str that will explicitly pass validation, even if they aren't numbers. * blocklistRegexes (Sequence, None): A sequence of regex str or (regex_str, response_str) tuples that, if matched, will explicitly fail validation. * formats: A tuple of strings that can be passed to time.strftime, dictating the possible formats for a valid datetime. * excMsg (str): A custom message to use in the raised ValidationException. >>> import pysimplevalidate as pysv >>> pysv.validateDatetime('2018/10/31 12:00:01') datetime.datetime(2018, 10, 31, 12, 0, 1) >>> pysv.validateDatetime('10/31/2018 12:00:01') datetime.datetime(2018, 10, 31, 12, 0, 1) >>> pysv.validateDatetime('10/31/2018') Traceback (most recent call last): ... pysimplevalidate.ValidationException: '10/31/2018' is not a valid date and time.
(module (function_definition (function_name__query) function_name__query (parameters (identifier_self) identifier_self (identifier_host_object) identifier_host_object (default_parameter (identifier_classification) identifier_classification (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_template) identifier_template (string_'http://verify.hosts-file.net/?v={}&s={}') string_'http://verify.hosts-file.net/?v={}&s={}' )assignment )expression_statement (expression_statement (assignment (identifier_url) identifier_url (call (attribute (identifier_template) identifier_template (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_app_id) identifier_app_id )attribute (call (attribute (identifier_host_object) identifier_host_object (identifier_to_unicode) identifier_to_unicode )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_url) identifier_url (conditional_expression (binary_operator (identifier_url) identifier_url (string_'&class=true') string_'&class=true' )binary_operator (identifier_classification) identifier_classification (identifier_url) identifier_url )conditional_expression )assignment )expression_statement (return_statement (attribute (call (identifier_get) identifier_get (argument_list (identifier_url) identifier_url )argument_list )call (identifier_text) identifier_text )attribute )return_statement )block )function_definition )module
Query the client for data of given host. :param host_object: an object representing a host value :param classification: if True: hpHosts is queried also for classification for given host, if listed :returns: content of response to GET request to hpHosts for data on the given host
(module (function_definition (function_name_download_handler) function_name_download_handler (parameters (identifier_feed) identifier_feed (identifier_placeholders) identifier_placeholders )parameters (block (import_statement (dotted_name (identifier_shlex) identifier_shlex )dotted_name )import_statement (expression_statement (assignment (identifier_value) identifier_value (call (attribute (identifier_feed) identifier_feed (identifier_retrieve_config) identifier_retrieve_config )attribute (argument_list (string_'downloadhandler') string_'downloadhandler' (string_'greg') string_'greg' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_value) identifier_value (string_'greg') string_'greg' )comparison_operator (block (while_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (attribute (identifier_placeholders) identifier_placeholders (identifier_fullpath) identifier_fullpath )attribute )argument_list )call (block (expression_statement (assignment (attribute (identifier_placeholders) identifier_placeholders (identifier_fullpath) identifier_fullpath )attribute (binary_operator (attribute (identifier_placeholders) identifier_placeholders (identifier_fullpath) identifier_fullpath )attribute (string_'_') string_'_' )binary_operator )assignment )expression_statement (expression_statement (assignment (attribute (identifier_placeholders) identifier_placeholders (identifier_filename) identifier_filename )attribute (binary_operator (attribute (identifier_placeholders) identifier_placeholders (identifier_filename) identifier_filename )attribute (string_'_') string_'_' )binary_operator )assignment )expression_statement )block )while_statement (expression_statement (call (identifier_urlretrieve) identifier_urlretrieve (argument_list (attribute (identifier_placeholders) identifier_placeholders (identifier_link) identifier_link )attribute (attribute (identifier_placeholders) identifier_placeholders (identifier_fullpath) identifier_fullpath )attribute )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_value_list) identifier_value_list (call (attribute (identifier_shlex) identifier_shlex (identifier_split) identifier_split )attribute (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_instruction_list) identifier_instruction_list (list_comprehension (call (identifier_substitute_placeholders) identifier_substitute_placeholders (argument_list (identifier_part) identifier_part (identifier_placeholders) identifier_placeholders )argument_list )call (for_in_clause (identifier_part) identifier_part (identifier_value_list) identifier_value_list )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_returncode) identifier_returncode (call (attribute (identifier_subprocess) identifier_subprocess (identifier_call) identifier_call )attribute (argument_list (identifier_instruction_list) identifier_instruction_list )argument_list )call )assignment )expression_statement (if_statement (identifier_returncode) identifier_returncode (block (raise_statement (identifier_URLError) identifier_URLError )raise_statement )block )if_statement )block )else_clause )if_statement )block )function_definition )module
Parse and execute the download handler
(module (function_definition (function_name__table_relabel) function_name__table_relabel (parameters (identifier_table) identifier_table (identifier_substitutions) identifier_substitutions (default_parameter (identifier_replacements) identifier_replacements (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_replacements) identifier_replacements (None) None )comparison_operator (block (raise_statement (identifier_NotImplementedError) identifier_NotImplementedError )raise_statement )block )if_statement (expression_statement (assignment (identifier_observed) identifier_observed (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_exprs) identifier_exprs (list )list )assignment )expression_statement (for_statement (identifier_c) identifier_c (attribute (identifier_table) identifier_table (identifier_columns) identifier_columns )attribute (block (expression_statement (assignment (identifier_expr) identifier_expr (subscript (identifier_table) identifier_table (identifier_c) identifier_c )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_c) identifier_c (identifier_substitutions) identifier_substitutions )comparison_operator (block (expression_statement (assignment (identifier_expr) identifier_expr (call (attribute (identifier_expr) identifier_expr (identifier_name) identifier_name )attribute (argument_list (subscript (identifier_substitutions) identifier_substitutions (identifier_c) identifier_c )subscript )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_observed) identifier_observed (identifier_add) identifier_add )attribute (argument_list (identifier_c) identifier_c )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_exprs) identifier_exprs (identifier_append) identifier_append )attribute (argument_list (identifier_expr) identifier_expr )argument_list )call )expression_statement )block )for_statement (for_statement (identifier_c) identifier_c (identifier_substitutions) identifier_substitutions (block (if_statement (comparison_operator (identifier_c) identifier_c (identifier_observed) identifier_observed )comparison_operator (block (raise_statement (call (identifier_KeyError) identifier_KeyError (argument_list (call (attribute (string_'{0!r} is not an existing column') string_'{0!r} is not an existing column' (identifier_format) identifier_format )attribute (argument_list (identifier_c) identifier_c )argument_list )call )argument_list )call )raise_statement )block )if_statement )block )for_statement (return_statement (call (attribute (identifier_table) identifier_table (identifier_projection) identifier_projection )attribute (argument_list (identifier_exprs) identifier_exprs )argument_list )call )return_statement )block )function_definition )module
Change table column names, otherwise leaving table unaltered Parameters ---------- substitutions Returns ------- relabeled : TableExpr
(module (function_definition (function_name__bake_script) function_name__bake_script (parameters (identifier_script) identifier_script )parameters (block (if_statement (comparison_operator (string_"src") string_"src" (attribute (identifier_script) identifier_script (identifier_attrs) identifier_attrs )attribute )comparison_operator (block (if_statement (call (attribute (identifier_re) identifier_re (identifier_match) identifier_match )attribute (argument_list (string_"https?://") string_"https?://" (subscript (identifier_script) identifier_script (string_"src") string_"src" )subscript )argument_list )call (block (expression_statement (assignment (identifier_script_data) identifier_script_data (call (attribute (call (identifier__load_url) identifier__load_url (argument_list (subscript (identifier_script) identifier_script (string_"src") string_"src" )subscript )argument_list )call (identifier_read) identifier_read )attribute (argument_list )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_script_data) identifier_script_data (call (attribute (call (identifier__load_file) identifier__load_file (argument_list (subscript (identifier_script) identifier_script (string_"src") string_"src" )subscript )argument_list )call (identifier_read) identifier_read )attribute (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_script) identifier_script (identifier_clear) identifier_clear )attribute (argument_list )argument_list )call )expression_statement (if_statement (identifier_USING_PYTHON2) identifier_USING_PYTHON2 (block (expression_statement (assignment (attribute (identifier_script) identifier_script (identifier_string) identifier_string )attribute (binary_operator (binary_operator (string_"\n") string_"\n" (identifier_script_data) identifier_script_data )binary_operator (string_"\n") string_"\n" )binary_operator )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (attribute (identifier_script) identifier_script (identifier_string) identifier_string )attribute (binary_operator (binary_operator (string_"\n") string_"\n" (call (identifier_str) identifier_str (argument_list (identifier_script_data) identifier_script_data )argument_list )call )binary_operator (string_"\n") string_"\n" )binary_operator )assignment )expression_statement )block )else_clause )if_statement (delete_statement (subscript (identifier_script) identifier_script (string_"src") string_"src" )subscript )delete_statement (delete_statement (subscript (identifier_script) identifier_script (string_"type") string_"type" )subscript )delete_statement )block )if_statement )block )function_definition )module
Takes a script element and bakes it in only if it contains a remote resource
(module (function_definition (function_name_plot_sample) function_name_plot_sample (parameters (identifier_self) identifier_self (default_parameter (identifier_nsims) identifier_nsims (integer_10) integer_10 )default_parameter (default_parameter (identifier_plot_data) identifier_plot_data (True) True )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (comparison_operator (attribute (attribute (identifier_self) identifier_self (identifier_latent_variables) identifier_latent_variables )attribute (identifier_estimation_method) identifier_estimation_method )attribute (list (string_'BBVI') string_'BBVI' (string_'M-H') string_'M-H' )list )comparison_operator (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (string_"No latent variables estimated!") string_"No latent variables estimated!" )argument_list )call )raise_statement )block (else_clause (block (import_statement (aliased_import (dotted_name (identifier_matplotlib) identifier_matplotlib (identifier_pyplot) identifier_pyplot )dotted_name (identifier_plt) identifier_plt )aliased_import )import_statement (import_statement (aliased_import (dotted_name (identifier_seaborn) identifier_seaborn )dotted_name (identifier_sns) identifier_sns )aliased_import )import_statement (expression_statement (assignment (identifier_figsize) identifier_figsize (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'figsize') string_'figsize' (tuple (integer_10) integer_10 (integer_7) integer_7 )tuple )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_plt) identifier_plt (identifier_figure) identifier_figure )attribute (argument_list (keyword_argument (identifier_figsize) identifier_figsize (identifier_figsize) identifier_figsize )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_date_index) identifier_date_index (subscript (attribute (identifier_self) identifier_self (identifier_index) identifier_index )attribute (slice (call (identifier_max) identifier_max (argument_list (attribute (identifier_self) identifier_self (identifier_ar) identifier_ar )attribute (attribute (identifier_self) identifier_self (identifier_sc) identifier_sc )attribute )argument_list )call (colon) colon (attribute (identifier_self) identifier_self (identifier_data_length) identifier_data_length )attribute )slice )subscript )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_mu) identifier_mu (identifier_Y) identifier_Y (identifier_scores) identifier_scores )pattern_list (call (attribute (identifier_self) identifier_self (identifier__model) identifier__model )attribute (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_latent_variables) identifier_latent_variables )attribute (identifier_get_z_values) identifier_get_z_values )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_draws) identifier_draws (attribute (call (attribute (identifier_self) identifier_self (identifier_sample) identifier_sample )attribute (argument_list (identifier_nsims) identifier_nsims )argument_list )call (identifier_T) identifier_T )attribute )assignment )expression_statement (expression_statement (call (attribute (identifier_plt) identifier_plt (identifier_plot) identifier_plot )attribute (argument_list (identifier_date_index) identifier_date_index (identifier_draws) identifier_draws (keyword_argument (identifier_label) identifier_label (string_'Posterior Draws') string_'Posterior Draws' )keyword_argument (keyword_argument (identifier_alpha) identifier_alpha (float_1.0) float_1.0 )keyword_argument )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_plot_data) identifier_plot_data (True) True )comparison_operator (block (expression_statement (call (attribute (identifier_plt) identifier_plt (identifier_plot) identifier_plot )attribute (argument_list (identifier_date_index) identifier_date_index (identifier_Y) identifier_Y (keyword_argument (identifier_label) identifier_label (string_'Data') string_'Data' )keyword_argument (keyword_argument (identifier_c) identifier_c (string_'black') string_'black' )keyword_argument (keyword_argument (identifier_alpha) identifier_alpha (float_0.5) float_0.5 )keyword_argument (keyword_argument (identifier_linestyle) identifier_linestyle (string_'') string_'' )keyword_argument (keyword_argument (identifier_marker) identifier_marker (string_'s') string_'s' )keyword_argument )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_plt) identifier_plt (identifier_title) identifier_title )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_data_name) identifier_data_name )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_plt) identifier_plt (identifier_show) identifier_show )attribute (argument_list )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Plots draws from the posterior predictive density against the data Parameters ---------- nsims : int (default : 1000) How many draws from the posterior predictive distribution plot_data boolean Whether to plot the data or not
(module (function_definition (function_name_setWorkerInfo) function_name_setWorkerInfo (parameters (identifier_self) identifier_self (identifier_hostname) identifier_hostname (identifier_workerAmount) identifier_workerAmount (identifier_origin) identifier_origin )parameters (block (expression_statement (call (attribute (attribute (identifier_scoop) identifier_scoop (identifier_logger) identifier_logger )attribute (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_'Initialising {0}{1} worker {2} [{3}].') string_'Initialising {0}{1} worker {2} [{3}].' (identifier_format) identifier_format )attribute (argument_list (conditional_expression (string_"local") string_"local" (comparison_operator (identifier_hostname) identifier_hostname (attribute (identifier_utils) identifier_utils (identifier_localHostnames) identifier_localHostnames )attribute )comparison_operator (string_"remote") string_"remote" )conditional_expression (conditional_expression (string_" origin") string_" origin" (identifier_origin) identifier_origin (string_"") string_"" )conditional_expression (attribute (identifier_self) identifier_self (identifier_workersLeft) identifier_workersLeft )attribute (identifier_hostname) identifier_hostname )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (pattern_list (identifier_add_args) identifier_add_args (identifier_add_kwargs) identifier_add_kwargs )pattern_list (call (attribute (identifier_self) identifier_self (identifier__setWorker_args) identifier__setWorker_args )attribute (argument_list (identifier_origin) identifier_origin )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_workers) identifier_workers )attribute (unary_operator (integer_1) integer_1 )unary_operator )subscript (identifier_setWorker) identifier_setWorker )attribute (argument_list (list_splat (identifier_add_args) identifier_add_args )list_splat (dictionary_splat (identifier_add_kwargs) identifier_add_kwargs )dictionary_splat )argument_list )call )expression_statement (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_workers) identifier_workers )attribute (unary_operator (integer_1) integer_1 )unary_operator )subscript (identifier_setWorkerAmount) identifier_setWorkerAmount )attribute (argument_list (identifier_workerAmount) identifier_workerAmount )argument_list )call )expression_statement )block )function_definition )module
Sets the worker information for the current host.
(module (function_definition (function_name_delete) function_name_delete (parameters (identifier_self) identifier_self (identifier_ip_dest) identifier_ip_dest (identifier_next_hop) identifier_next_hop (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (call (attribute (identifier_kwargs) identifier_kwargs (identifier_update) identifier_update )attribute (argument_list (dictionary (pair (string_'delete') string_'delete' (True) True )pair )dictionary )argument_list )call )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__set_route) identifier__set_route )attribute (argument_list (identifier_ip_dest) identifier_ip_dest (identifier_next_hop) identifier_next_hop (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Delete a static route Args: ip_dest (string): The ip address of the destination in the form of A.B.C.D/E next_hop (string): The next hop interface or ip address **kwargs['next_hop_ip'] (string): The next hop address on destination interface **kwargs['distance'] (string): Administrative distance for this route **kwargs['tag'] (string): Route tag **kwargs['route_name'] (string): Route name Returns: True if the operation succeeds, otherwise False.
(module (function_definition (function_name_purge) function_name_purge (parameters (identifier_self) identifier_self )parameters (block (function_definition (function_name_partial_file) function_name_partial_file (parameters (identifier_item) identifier_item )parameters (block (expression_statement (string_"Filter out partial files") string_"Filter out partial files" )expression_statement (return_statement (comparison_operator (attribute (identifier_item) identifier_item (identifier_completed_chunks) identifier_completed_chunks )attribute (attribute (identifier_item) identifier_item (identifier_size_chunks) identifier_size_chunks )attribute )comparison_operator )return_statement )block )function_definition (expression_statement (call (attribute (identifier_self) identifier_self (identifier_cull) identifier_cull )attribute (argument_list (keyword_argument (identifier_file_filter) identifier_file_filter (identifier_partial_file) identifier_partial_file )keyword_argument (keyword_argument (identifier_attrs) identifier_attrs (list (string_"get_completed_chunks") string_"get_completed_chunks" (string_"get_size_chunks") string_"get_size_chunks" )list )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Delete PARTIAL data files and remove torrent from client.
(module (function_definition (function_name_get_sort_field) function_name_get_sort_field (parameters (identifier_request) identifier_request )parameters (block (expression_statement (assignment (identifier_sort_direction) identifier_sort_direction (call (attribute (attribute (identifier_request) identifier_request (identifier_GET) identifier_GET )attribute (identifier_get) identifier_get )attribute (argument_list (string_"dir") string_"dir" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_field_name) identifier_field_name (conditional_expression (parenthesized_expression (boolean_operator (call (attribute (attribute (identifier_request) identifier_request (identifier_GET) identifier_GET )attribute (identifier_get) identifier_get )attribute (argument_list (string_"sort") string_"sort" )argument_list )call (string_"") string_"" )boolean_operator )parenthesized_expression (identifier_sort_direction) identifier_sort_direction (string_"") string_"" )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_sort_sign) identifier_sort_sign (conditional_expression (string_"-") string_"-" (comparison_operator (identifier_sort_direction) identifier_sort_direction (string_"desc") string_"desc" )comparison_operator (string_"") string_"" )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_result_field) identifier_result_field (call (attribute (string_"{sign}{field}") string_"{sign}{field}" (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_sign) identifier_sign (identifier_sort_sign) identifier_sort_sign )keyword_argument (keyword_argument (identifier_field) identifier_field (identifier_field_name) identifier_field_name )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_result_field) identifier_result_field )return_statement )block )function_definition )module
Retrieve field used for sorting a queryset :param request: HTTP request :return: the sorted field name, prefixed with "-" if ordering is descending
(module (function_definition (function_name_ReplaceStopTimeObject) function_name_ReplaceStopTimeObject (parameters (identifier_self) identifier_self (identifier_stoptime) identifier_stoptime (default_parameter (identifier_schedule) identifier_schedule (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_schedule) identifier_schedule (None) None )comparison_operator (block (expression_statement (assignment (identifier_schedule) identifier_schedule (attribute (identifier_self) identifier_self (identifier__schedule) identifier__schedule )attribute )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_new_secs) identifier_new_secs (call (attribute (identifier_stoptime) identifier_stoptime (identifier_GetTimeSecs) identifier_GetTimeSecs )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cursor) identifier_cursor (call (attribute (attribute (identifier_schedule) identifier_schedule (identifier__connection) identifier__connection )attribute (identifier_cursor) identifier_cursor )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_cursor) identifier_cursor (identifier_execute) identifier_execute )attribute (argument_list (concatenated_string (string_"DELETE FROM stop_times WHERE trip_id=? and ") string_"DELETE FROM stop_times WHERE trip_id=? and " (string_"stop_sequence=? and stop_id=?") string_"stop_sequence=? and stop_id=?" )concatenated_string (tuple (attribute (identifier_self) identifier_self (identifier_trip_id) identifier_trip_id )attribute (attribute (identifier_stoptime) identifier_stoptime (identifier_stop_sequence) identifier_stop_sequence )attribute (attribute (identifier_stoptime) identifier_stoptime (identifier_stop_id) identifier_stop_id )attribute )tuple )argument_list )call )expression_statement (if_statement (comparison_operator (attribute (identifier_cursor) identifier_cursor (identifier_rowcount) identifier_rowcount )attribute (integer_0) integer_0 )comparison_operator (block (raise_statement (call (attribute (identifier_problems_module) identifier_problems_module (identifier_Error) identifier_Error )attribute (argument_list (string_'Attempted replacement of StopTime object which does not exist') string_'Attempted replacement of StopTime object which does not exist' )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__AddStopTimeObjectUnordered) identifier__AddStopTimeObjectUnordered )attribute (argument_list (identifier_stoptime) identifier_stoptime (identifier_schedule) identifier_schedule )argument_list )call )expression_statement )block )function_definition )module
Replace a StopTime object from this trip with the given one. Keys the StopTime object to be replaced by trip_id, stop_sequence and stop_id as 'stoptime', with the object 'stoptime'.
(module (function_definition (function_name__close_stdio) function_name__close_stdio (parameters )parameters (block (for_statement (identifier_fd) identifier_fd (tuple (attribute (identifier_sys) identifier_sys (identifier_stdin) identifier_stdin )attribute (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute )tuple (block (expression_statement (assignment (identifier_file_no) identifier_file_no (call (attribute (identifier_fd) identifier_fd (identifier_fileno) identifier_fileno )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_fd) identifier_fd (identifier_flush) identifier_flush )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_fd) identifier_fd (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_close) identifier_close )attribute (argument_list (identifier_file_no) identifier_file_no )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Close stdio streams to avoid output in the tty that launched pantsd.
(module (function_definition (function_name_update_notifications) function_name_update_notifications (parameters (identifier_self) identifier_self (typed_default_parameter (identifier_on_match_open) identifier_on_match_open (type (identifier_bool) identifier_bool )type (None) None )typed_default_parameter (typed_default_parameter (identifier_on_tournament_end) identifier_on_tournament_end (type (identifier_bool) identifier_bool )type (None) None )typed_default_parameter )parameters (block (expression_statement (assignment (identifier_params) identifier_params (dictionary )dictionary )assignment )expression_statement (if_statement (comparison_operator (identifier_on_match_open) identifier_on_match_open (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_params) identifier_params (string_'notify_users_when_matches_open') string_'notify_users_when_matches_open' )subscript (identifier_on_match_open) identifier_on_match_open )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_on_tournament_end) identifier_on_tournament_end (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_params) identifier_params (string_'notify_users_when_the_tournament_ends') string_'notify_users_when_the_tournament_ends' )subscript (identifier_on_tournament_end) identifier_on_tournament_end )assignment )expression_statement )block )if_statement (expression_statement (call (identifier_assert_or_raise) identifier_assert_or_raise (argument_list (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_params) identifier_params )argument_list )call (integer_0) integer_0 )comparison_operator (identifier_ValueError) identifier_ValueError (string_'At least one of the notifications must be given') string_'At least one of the notifications must be given' )argument_list )call )expression_statement (expression_statement (await (call (attribute (identifier_self) identifier_self (identifier_update) identifier_update )attribute (argument_list (dictionary_splat (identifier_params) identifier_params )dictionary_splat )argument_list )call )await )expression_statement )block )function_definition )module
update participants notifications for this tournament |methcoro| Args: on_match_open: Email registered Challonge participants when matches open up for them on_tournament_end: Email registered Challonge participants the results when this tournament ends Raises: APIException
(module (function_definition (function_name__drop_membership_multicast_socket) function_name__drop_membership_multicast_socket (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__multicast_socket) identifier__multicast_socket )attribute (identifier_setsockopt) identifier_setsockopt )attribute (argument_list (attribute (identifier_socket) identifier_socket (identifier_IPPROTO_IP) identifier_IPPROTO_IP )attribute (attribute (identifier_socket) identifier_socket (identifier_IP_DROP_MEMBERSHIP) identifier_IP_DROP_MEMBERSHIP )attribute (attribute (identifier_self) identifier_self (identifier__membership_request) identifier__membership_request )attribute )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__membership_request) identifier__membership_request )attribute (None) None )assignment )expression_statement )block )function_definition )module
Drop membership to multicast :rtype: None
(module (function_definition (function_name_write_template_file) function_name_write_template_file (parameters (identifier_source) identifier_source (identifier_target) identifier_target (identifier_content) identifier_content )parameters (block (expression_statement (call (identifier_print) identifier_print (argument_list (identifier_target) identifier_target )argument_list )call )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (identifier_format_template_file) identifier_format_template_file (argument_list (identifier_source) identifier_source (identifier_content) identifier_content )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_target) identifier_target (string_'w') string_'w' )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (for_statement (identifier_line) identifier_line (identifier_data) identifier_data (block (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_line) identifier_line )argument_list )call (identifier_str) identifier_str )comparison_operator (block (expression_statement (assignment (identifier_line) identifier_line (call (attribute (identifier_line) identifier_line (identifier_encode) identifier_encode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_f) identifier_f (identifier_write) identifier_write )attribute (argument_list (identifier_line) identifier_line )argument_list )call )expression_statement )block )for_statement )block )with_statement )block )function_definition )module
Write a new file from a given pystache template file and content
(module (function_definition (function_name_generate_enum) function_name_generate_enum (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_enum) identifier_enum (subscript (attribute (identifier_self) identifier_self (identifier__definition) identifier__definition )attribute (string_'enum') string_'enum' )subscript )assignment )expression_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_enum) identifier_enum (tuple (identifier_list) identifier_list (identifier_tuple) identifier_tuple )tuple )argument_list )call )not_operator (block (raise_statement (call (identifier_JsonSchemaDefinitionException) identifier_JsonSchemaDefinitionException (argument_list (string_'enum must be an array') string_'enum must be an array' )argument_list )call )raise_statement )block )if_statement (with_statement (with_clause (with_item (call (attribute (identifier_self) identifier_self (identifier_l) identifier_l )attribute (argument_list (string_'if {variable} not in {enum}:') string_'if {variable} not in {enum}:' )argument_list )call )with_item )with_clause (block (expression_statement (assignment (identifier_enum) identifier_enum (call (attribute (call (identifier_str) identifier_str (argument_list (identifier_enum) identifier_enum )argument_list )call (identifier_replace) identifier_replace )attribute (argument_list (string_'"') string_'"' (string_'\\"') string_'\\"' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_l) identifier_l )attribute (argument_list (string_'raise JsonSchemaException("{name} must be one of {}")') string_'raise JsonSchemaException("{name} must be one of {}")' (identifier_enum) identifier_enum )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Means that only value specified in the enum is valid. .. code-block:: python { 'enum': ['a', 'b'], }
(module (function_definition (function_name_put) function_name_put (parameters (identifier_self) identifier_self (identifier_path) identifier_path (identifier_data) identifier_data )parameters (block (assert_statement (comparison_operator (identifier_path) identifier_path (None) None )comparison_operator )assert_statement (assert_statement (boolean_operator (comparison_operator (identifier_data) identifier_data (None) None )comparison_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_data) identifier_data (identifier_dict) identifier_dict )argument_list )call )boolean_operator )assert_statement (if_statement (comparison_operator (identifier_data) identifier_data (None) None )comparison_operator (block (expression_statement (assignment (identifier_data) identifier_data (dictionary )dictionary )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (attribute (identifier_self) identifier_self (identifier_conn) identifier_conn )attribute (identifier_request_encode_body) identifier_request_encode_body )attribute (argument_list (string_'PUT') string_'PUT' (identifier_path) identifier_path (identifier_data) identifier_data (call (attribute (identifier_self) identifier_self (identifier__get_headers) identifier__get_headers )attribute (argument_list )argument_list )call (False) False )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__last_status) identifier__last_status )attribute (assignment (identifier_response_status) identifier_response_status (attribute (identifier_response) identifier_response (identifier_status) identifier_status )attribute )assignment )assignment )expression_statement (expression_statement (assignment (identifier_response_content) identifier_response_content (call (attribute (attribute (identifier_response) identifier_response (identifier_data) identifier_data )attribute (identifier_decode) identifier_decode )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (call (identifier_Result) identifier_Result (argument_list (keyword_argument (identifier_status) identifier_status (identifier_response_status) identifier_response_status )keyword_argument (keyword_argument (identifier_json) identifier_json (identifier_response_content) identifier_response_content )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Executes a PUT. 'path' may not be None. Should include the full path to the resoure. 'data' may be None or a dictionary. Returns a named tuple that includes: status: the HTTP status code json: the returned JSON-HAL If the key was not set, throws an APIConfigurationException.
(module (function_definition (function_name_get_secret) function_name_get_secret (parameters (identifier_self) identifier_self (identifier_handle) identifier_handle (identifier_contributor) identifier_contributor )parameters (block (expression_statement (assignment (identifier_queryset) identifier_queryset (call (attribute (identifier_self) identifier_self (identifier_all) identifier_all )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_contributor) identifier_contributor (None) None )comparison_operator (block (expression_statement (assignment (identifier_queryset) identifier_queryset (call (attribute (identifier_queryset) identifier_queryset (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_contributor) identifier_contributor (identifier_contributor) identifier_contributor )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_secret) identifier_secret (call (attribute (identifier_queryset) identifier_queryset (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier_handle) identifier_handle (identifier_handle) identifier_handle )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (attribute (identifier_secret) identifier_secret (identifier_value) identifier_value )attribute )return_statement )block )function_definition )module
Retrieve an existing secret's value. :param handle: Secret handle :param contributor: User instance to perform contributor validation, which means that only secrets for the given contributor will be looked up.
(module (function_definition (function_name_list_default_storage_policy_of_datastore) function_name_list_default_storage_policy_of_datastore (parameters (identifier_datastore) identifier_datastore (default_parameter (identifier_service_instance) identifier_service_instance (None) None )default_parameter )parameters (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_trace) identifier_trace )attribute (argument_list (string_'Listing the default storage policy of datastore \'%s\'') string_'Listing the default storage policy of datastore \'%s\'' (identifier_datastore) identifier_datastore )argument_list )call )expression_statement (expression_statement (assignment (identifier_target_ref) identifier_target_ref (call (identifier__get_proxy_target) identifier__get_proxy_target (argument_list (identifier_service_instance) identifier_service_instance )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ds_refs) identifier_ds_refs (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_vmware) identifier_vmware )attribute (identifier_get_datastores) identifier_get_datastores )attribute (argument_list (identifier_service_instance) identifier_service_instance (identifier_target_ref) identifier_target_ref (keyword_argument (identifier_datastore_names) identifier_datastore_names (list (identifier_datastore) identifier_datastore )list )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_ds_refs) identifier_ds_refs )not_operator (block (raise_statement (call (identifier_VMwareObjectRetrievalError) identifier_VMwareObjectRetrievalError (argument_list (call (attribute (concatenated_string (string_'Datastore \'{0}\' was not ') string_'Datastore \'{0}\' was not ' (string_'found') string_'found' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_datastore) identifier_datastore )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_profile_manager) identifier_profile_manager (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_pbm) identifier_pbm )attribute (identifier_get_profile_manager) identifier_get_profile_manager )attribute (argument_list (identifier_service_instance) identifier_service_instance )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_policy) identifier_policy (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_pbm) identifier_pbm )attribute (identifier_get_default_storage_policy_of_datastore) identifier_get_default_storage_policy_of_datastore )attribute (argument_list (identifier_profile_manager) identifier_profile_manager (subscript (identifier_ds_refs) identifier_ds_refs (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (return_statement (call (identifier__get_policy_dict) identifier__get_policy_dict (argument_list (identifier_policy) identifier_policy )argument_list )call )return_statement )block )function_definition )module
Returns a list of datastores assign the the storage policies. datastore Name of the datastore to assign. The datastore needs to be visible to the VMware entity the proxy points to. service_instance Service instance (vim.ServiceInstance) of the vCenter. Default is None. .. code-block:: bash salt '*' vsphere.list_default_storage_policy_of_datastore datastore=ds1
(module (function_definition (function_name_eum_snippet) function_name_eum_snippet (parameters (default_parameter (identifier_trace_id) identifier_trace_id (None) None )default_parameter (default_parameter (identifier_eum_api_key) identifier_eum_api_key (None) None )default_parameter (default_parameter (identifier_meta) identifier_meta (dictionary )dictionary )default_parameter )parameters (block (try_statement (block (expression_statement (assignment (identifier_eum_file) identifier_eum_file (call (identifier_open) identifier_open (argument_list (binary_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (identifier___file__) identifier___file__ )argument_list )call (string_'/eum.js') string_'/eum.js' )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_eum_src) identifier_eum_src (call (identifier_Template) identifier_Template (argument_list (call (attribute (identifier_eum_file) identifier_eum_file (identifier_read) identifier_read )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ids) identifier_ids (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (subscript (identifier_ids) identifier_ids (string_'meta_kvs') string_'meta_kvs' )subscript (string_'') string_'' )assignment )expression_statement (expression_statement (assignment (identifier_parent_span) identifier_parent_span (attribute (identifier_tracer) identifier_tracer (identifier_active_span) identifier_active_span )attribute )assignment )expression_statement (if_statement (boolean_operator (identifier_trace_id) identifier_trace_id (identifier_parent_span) identifier_parent_span )boolean_operator (block (expression_statement (assignment (subscript (identifier_ids) identifier_ids (string_'trace_id') string_'trace_id' )subscript (boolean_operator (identifier_trace_id) identifier_trace_id (attribute (identifier_parent_span) identifier_parent_span (identifier_trace_id) identifier_trace_id )attribute )boolean_operator )assignment )expression_statement )block (else_clause (block (return_statement (string_'') string_'' )return_statement )block )else_clause )if_statement (if_statement (identifier_eum_api_key) identifier_eum_api_key (block (expression_statement (assignment (subscript (identifier_ids) identifier_ids (string_'eum_api_key') string_'eum_api_key' )subscript (identifier_eum_api_key) identifier_eum_api_key )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_ids) identifier_ids (string_'eum_api_key') string_'eum_api_key' )subscript (identifier_global_eum_api_key) identifier_global_eum_api_key )assignment )expression_statement )block )else_clause )if_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (identifier_meta) identifier_meta (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (augmented_assignment (subscript (identifier_ids) identifier_ids (string_'meta_kvs') string_'meta_kvs' )subscript (parenthesized_expression (binary_operator (string_"'ineum('meta', '%s', '%s');'") string_"'ineum('meta', '%s', '%s');'" (tuple (identifier_key) identifier_key (identifier_value) identifier_value )tuple )binary_operator )parenthesized_expression )augmented_assignment )expression_statement )block )for_statement (return_statement (call (attribute (identifier_eum_src) identifier_eum_src (identifier_substitute) identifier_substitute )attribute (argument_list (identifier_ids) identifier_ids )argument_list )call )return_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (identifier_e) identifier_e )argument_list )call )expression_statement (return_statement (string_'') string_'' )return_statement )block )except_clause )try_statement )block )function_definition )module
Return an EUM snippet for use in views, templates and layouts that reports client side metrics to Instana that will automagically be linked to the current trace. @param trace_id [optional] the trace ID to insert into the EUM string @param eum_api_key [optional] the EUM API key from your Instana dashboard @param meta [optional] optional additional KVs you want reported with the EUM metrics @return string
(module (function_definition (function_name_show) function_name_show (parameters (identifier_self) identifier_self )parameters (block (if_statement (boolean_operator (not_operator (attribute (identifier_self) identifier_self (identifier__error) identifier__error )attribute )not_operator (not_operator (attribute (identifier_self) identifier_self (identifier_stats) identifier_stats )attribute )not_operator )boolean_operator (block (return_statement )return_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_header) identifier_header )attribute (argument_list )argument_list )call )expression_statement (for_statement (identifier_stat) identifier_stat (attribute (identifier_self) identifier_self (identifier_stats) identifier_stats )attribute (block (expression_statement (call (attribute (identifier_utils) identifier_utils (identifier_item) identifier_item )attribute (argument_list (identifier_stat) identifier_stat (keyword_argument (identifier_level) identifier_level (integer_1) integer_1 )keyword_argument (keyword_argument (identifier_options) identifier_options (attribute (identifier_self) identifier_self (identifier_options) identifier_options )attribute )keyword_argument )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Display indented statistics.
(module (function_definition (function_name_dbr) function_name_dbr (parameters (identifier_self) identifier_self (default_parameter (identifier_value) identifier_value (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_value) identifier_value (None) None )comparison_operator (block (try_statement (block (expression_statement (assignment (identifier_value) identifier_value (call (identifier_float) identifier_float (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (concatenated_string (string_'value {} need to be of type float ') string_'value {} need to be of type float ' (string_'for field `dbr`') string_'for field `dbr`' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_value) identifier_value )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__dbr) identifier__dbr )attribute (identifier_value) identifier_value )assignment )expression_statement )block )function_definition )module
Corresponds to IDD Field `dbr` Daily temperature range for hottest month. [defined as mean of the difference between daily maximum and daily minimum dry-bulb temperatures for hottest month] Args: value (float): value for IDD Field `dbr` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
(module (function_definition (function_name_get_cookie_header) function_name_get_cookie_header (parameters (identifier_queue_item) identifier_queue_item )parameters (block (expression_statement (assignment (identifier_header) identifier_header (list )list )assignment )expression_statement (expression_statement (assignment (identifier_path) identifier_path (call (attribute (identifier_URLHelper) identifier_URLHelper (identifier_get_path) identifier_get_path )attribute (argument_list (attribute (attribute (identifier_queue_item) identifier_queue_item (identifier_request) identifier_request )attribute (identifier_url) identifier_url )attribute )argument_list )call )assignment )expression_statement (for_statement (identifier_cookie) identifier_cookie (attribute (attribute (identifier_queue_item) identifier_queue_item (identifier_request) identifier_request )attribute (identifier_cookies) identifier_cookies )attribute (block (expression_statement (assignment (identifier_root_path) identifier_root_path (boolean_operator (comparison_operator (attribute (identifier_cookie) identifier_cookie (identifier_path) identifier_path )attribute (string_"") string_"" )comparison_operator (comparison_operator (attribute (identifier_cookie) identifier_cookie (identifier_path) identifier_path )attribute (string_"/") string_"/" )comparison_operator )boolean_operator )assignment )expression_statement (if_statement (boolean_operator (call (attribute (identifier_path) identifier_path (identifier_startswith) identifier_startswith )attribute (argument_list (attribute (identifier_cookie) identifier_cookie (identifier_path) identifier_path )attribute )argument_list )call (identifier_root_path) identifier_root_path )boolean_operator (block (expression_statement (call (attribute (identifier_header) identifier_header (identifier_append) identifier_append )attribute (argument_list (binary_operator (binary_operator (attribute (identifier_cookie) identifier_cookie (identifier_name) identifier_name )attribute (string_"=") string_"=" )binary_operator (attribute (identifier_cookie) identifier_cookie (identifier_value) identifier_value )attribute )binary_operator )argument_list )call )expression_statement )block )if_statement )block )for_statement (return_statement (call (attribute (string_"&") string_"&" (identifier_join) identifier_join )attribute (argument_list (identifier_header) identifier_header )argument_list )call )return_statement )block )function_definition )module
Convert a requests cookie jar to a HTTP request cookie header value. Args: queue_item (:class:`nyawc.QueueItem`): The parent queue item of the new request. Returns: str: The HTTP cookie header value.
(module (function_definition (function_name_get_participants_for_gradebook) function_name_get_participants_for_gradebook (parameters (identifier_gradebook_id) identifier_gradebook_id (default_parameter (identifier_person) identifier_person (None) None )default_parameter )parameters (block (if_statement (not_operator (call (identifier_valid_gradebook_id) identifier_valid_gradebook_id (argument_list (identifier_gradebook_id) identifier_gradebook_id )argument_list )call )not_operator (block (raise_statement (call (identifier_InvalidGradebookID) identifier_InvalidGradebookID (argument_list (identifier_gradebook_id) identifier_gradebook_id )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_url) identifier_url (call (attribute (string_"/rest/gradebook/v1/book/{}/participants") string_"/rest/gradebook/v1/book/{}/participants" (identifier_format) identifier_format )attribute (argument_list (identifier_gradebook_id) identifier_gradebook_id )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_headers) identifier_headers (dictionary )dictionary )assignment )expression_statement (if_statement (comparison_operator (identifier_person) identifier_person (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_headers) identifier_headers (string_"X-UW-Act-as") string_"X-UW-Act-as" )subscript (attribute (identifier_person) identifier_person (identifier_uwnetid) identifier_uwnetid )attribute )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_data) identifier_data (call (identifier_get_resource) identifier_get_resource (argument_list (identifier_url) identifier_url (identifier_headers) identifier_headers )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_participants) identifier_participants (list )list )assignment )expression_statement (for_statement (identifier_pt) identifier_pt (subscript (identifier_data) identifier_data (string_"participants") string_"participants" )subscript (block (expression_statement (call (attribute (identifier_participants) identifier_participants (identifier_append) identifier_append )attribute (argument_list (call (identifier__participant_from_json) identifier__participant_from_json (argument_list (identifier_pt) identifier_pt )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_participants) identifier_participants )return_statement )block )function_definition )module
Returns a list of gradebook participants for the passed gradebook_id and person.
(module (function_definition (function_name_print_runs) function_name_print_runs (parameters (identifier_query) identifier_query )parameters (block (if_statement (comparison_operator (identifier_query) identifier_query (None) None )comparison_operator (block (return_statement )return_statement )block )if_statement (for_statement (identifier_tup) identifier_tup (identifier_query) identifier_query (block (expression_statement (call (identifier_print) identifier_print (argument_list (parenthesized_expression (call (attribute (string_"{0} @ {1} - {2} id: {3} group: {4}") string_"{0} @ {1} - {2} id: {3} group: {4}" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_tup) identifier_tup (identifier_end) identifier_end )attribute (attribute (identifier_tup) identifier_tup (identifier_experiment_name) identifier_experiment_name )attribute (attribute (identifier_tup) identifier_tup (identifier_project_name) identifier_project_name )attribute (attribute (identifier_tup) identifier_tup (identifier_experiment_group) identifier_experiment_group )attribute (attribute (identifier_tup) identifier_tup (identifier_run_group) identifier_run_group )attribute )argument_list )call )parenthesized_expression )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Print all rows in this result query.
(module (function_definition (function_name_cancel) function_name_cancel (parameters (identifier_self) identifier_self (default_parameter (identifier_consumer_tag) identifier_consumer_tag (string_'') string_'' )default_parameter )parameters (block (if_statement (not_operator (call (attribute (identifier_compatibility) identifier_compatibility (identifier_is_string) identifier_is_string )attribute (argument_list (identifier_consumer_tag) identifier_consumer_tag )argument_list )call )not_operator (block (raise_statement (call (identifier_AMQPInvalidArgument) identifier_AMQPInvalidArgument (argument_list (string_'consumer_tag should be a string') string_'consumer_tag should be a string' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_cancel_frame) identifier_cancel_frame (call (attribute (attribute (identifier_specification) identifier_specification (identifier_Basic) identifier_Basic )attribute (identifier_Cancel) identifier_Cancel )attribute (argument_list (keyword_argument (identifier_consumer_tag) identifier_consumer_tag (identifier_consumer_tag) identifier_consumer_tag )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (attribute (attribute (identifier_self) identifier_self (identifier__channel) identifier__channel )attribute (identifier_rpc_request) identifier_rpc_request )attribute (argument_list (identifier_cancel_frame) identifier_cancel_frame )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__channel) identifier__channel )attribute (identifier_remove_consumer_tag) identifier_remove_consumer_tag )attribute (argument_list (identifier_consumer_tag) identifier_consumer_tag )argument_list )call )expression_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Cancel a queue consumer. :param str consumer_tag: Consumer tag :raises AMQPInvalidArgument: Invalid Parameters :raises AMQPChannelError: Raises if the channel encountered an error. :raises AMQPConnectionError: Raises if the connection encountered an error. :rtype: dict
(module (function_definition (function_name_conflict) function_name_conflict (parameters (identifier_request) identifier_request (default_parameter (identifier_target) identifier_target (None) None )default_parameter (default_parameter (identifier_template_name) identifier_template_name (string_'409.html') string_'409.html' )default_parameter )parameters (block (try_statement (block (expression_statement (assignment (identifier_template) identifier_template (call (attribute (identifier_loader) identifier_loader (identifier_get_template) identifier_get_template )attribute (argument_list (identifier_template_name) identifier_template_name )argument_list )call )assignment )expression_statement )block (except_clause (identifier_TemplateDoesNotExist) identifier_TemplateDoesNotExist (block (expression_statement (assignment (identifier_template) identifier_template (call (identifier_Template) identifier_Template (argument_list (concatenated_string (string_'<h1>Conflict</h1>') string_'<h1>Conflict</h1>' (string_'<p>The request was unsuccessful due to a conflict. ') string_'<p>The request was unsuccessful due to a conflict. ' (string_'The object changed during the transaction.</p>') string_'The object changed during the transaction.</p>' )concatenated_string )argument_list )call )assignment )expression_statement )block )except_clause )try_statement (try_statement (block (expression_statement (assignment (identifier_saved) identifier_saved (call (attribute (attribute (attribute (identifier_target) identifier_target (identifier___class__) identifier___class__ )attribute (identifier__default_manager) identifier__default_manager )attribute (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier_pk) identifier_pk (attribute (identifier_target) identifier_target (identifier_pk) identifier_pk )attribute )keyword_argument )argument_list )call )assignment )expression_statement )block (except_clause (attribute (attribute (identifier_target) identifier_target (identifier___class__) identifier___class__ )attribute (identifier_DoesNotExist) identifier_DoesNotExist )attribute (block (expression_statement (assignment (identifier_saved) identifier_saved (None) None )assignment )expression_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_ctx) identifier_ctx (dictionary (pair (string_'target') string_'target' (identifier_target) identifier_target )pair (pair (string_'saved') string_'saved' (identifier_saved) identifier_saved )pair (pair (string_'request_path') string_'request_path' (attribute (identifier_request) identifier_request (identifier_path) identifier_path )attribute )pair )dictionary )assignment )expression_statement (return_statement (call (identifier_ConflictResponse) identifier_ConflictResponse (argument_list (call (attribute (identifier_template) identifier_template (identifier_render) identifier_render )attribute (argument_list (identifier_ctx) identifier_ctx )argument_list )call )argument_list )call )return_statement )block )function_definition )module
409 error handler. :param request: Request :param template_name: `409.html` :param target: The model to save
(module (function_definition (function_name_save) function_name_save (parameters (identifier_self) identifier_self (default_parameter (identifier_force_insert) identifier_force_insert (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_delayed) identifier_delayed (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_field) identifier_field (identifier_value) identifier_value )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_model_field) identifier_model_field (call (identifier_getattr) identifier_getattr (argument_list (call (identifier_type) identifier_type (argument_list (attribute (identifier_self) identifier_self (identifier_instance) identifier_instance )attribute )argument_list )call (identifier_field) identifier_field (None) None )argument_list )call )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_model_field) identifier_model_field (identifier_ManyToManyField) identifier_ManyToManyField )argument_list )call (block (if_statement (comparison_operator (identifier_value) identifier_value (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_delayed) identifier_delayed (identifier_field) identifier_field )subscript (identifier_value) identifier_value )assignment )expression_statement )block )if_statement (continue_statement )continue_statement )block )if_statement (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (attribute (identifier_self) identifier_self (identifier_instance) identifier_instance )attribute (identifier_field) identifier_field (identifier_value) identifier_value )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier_rv) identifier_rv (call (attribute (attribute (identifier_self) identifier_self (identifier_instance) identifier_instance )attribute (identifier_save) identifier_save )attribute (argument_list (keyword_argument (identifier_force_insert) identifier_force_insert (identifier_force_insert) identifier_force_insert )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_field) identifier_field (identifier_value) identifier_value )pattern_list (call (attribute (identifier_delayed) identifier_delayed (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (attribute (identifier_self) identifier_self (identifier_instance) identifier_instance )attribute (identifier_field) identifier_field (identifier_value) identifier_value )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_rv) identifier_rv )return_statement )block )function_definition )module
Save the model and any related many-to-many fields. :param force_insert: Should the save force an insert? :return: Number of rows impacted, or False.
(module (function_definition (function_name_get_plist_data_from_string) function_name_get_plist_data_from_string (parameters (identifier_data) identifier_data )parameters (block (if_statement (identifier_has_biplist) identifier_has_biplist (block (return_statement (call (attribute (identifier_biplist) identifier_biplist (identifier_readPlistFromString) identifier_readPlistFromString )attribute (argument_list (identifier_data) identifier_data )argument_list )call )return_statement )block )if_statement (try_statement (block (return_statement (call (attribute (identifier_plistlib) identifier_plistlib (identifier_readPlistFromString) identifier_readPlistFromString )attribute (argument_list (identifier_data) identifier_data )argument_list )call )return_statement )block (except_clause (identifier_Exception) identifier_Exception (block (return_statement (dictionary )dictionary )return_statement )block )except_clause )try_statement )block )function_definition )module
Parse plist data for a string. Tries biplist, falling back to plistlib.
(module (function_definition (function_name_update_email_template) function_name_update_email_template (parameters (identifier_self) identifier_self (identifier_template_id) identifier_template_id (identifier_template_dict) identifier_template_dict )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__create_put_request) identifier__create_put_request )attribute (argument_list (keyword_argument (identifier_resource) identifier_resource (identifier_EMAIL_TEMPLATES) identifier_EMAIL_TEMPLATES )keyword_argument (keyword_argument (identifier_billomat_id) identifier_billomat_id (identifier_template_id) identifier_template_id )keyword_argument (keyword_argument (identifier_send_data) identifier_send_data (identifier_template_dict) identifier_template_dict )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Updates a emailtemplate :param template_id: the template id :param template_dict: dict :return: dict
(module (function_definition (function_name_python_version) function_name_python_version (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_v) identifier_v (call (attribute (identifier_self) identifier_self (identifier_get) identifier_get )attribute (argument_list (string_'python-version') string_'python-version' (string_'') string_'' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_v) identifier_v (string_'') string_'' )comparison_operator (block (expression_statement (assignment (identifier_v) identifier_v (call (attribute (string_"{}.{}") string_"{}.{}" (identifier_format) identifier_format )attribute (argument_list (attribute (attribute (identifier_sys) identifier_sys (identifier_version_info) identifier_version_info )attribute (identifier_major) identifier_major )attribute (attribute (attribute (identifier_sys) identifier_sys (identifier_version_info) identifier_version_info )attribute (identifier_minor) identifier_minor )attribute )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_v) identifier_v )return_statement )block )function_definition )module
Get the configured Python version. If this is not set in the config, then it defaults to the version of the current runtime. Returns: A string of the form "MAJOR.MINOR", e.g. "3.6".
(module (function_definition (function_name_available) function_name_available (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_disco_info) identifier_disco_info (yield (call (attribute (attribute (identifier_self) identifier_self (identifier__disco_client) identifier__disco_client )attribute (identifier_query_info) identifier_query_info )attribute (argument_list (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_local_jid) identifier_local_jid )attribute (identifier_bare) identifier_bare )attribute (argument_list )argument_list )call )argument_list )call )yield )assignment )expression_statement (for_statement (identifier_item) identifier_item (call (attribute (attribute (identifier_disco_info) identifier_disco_info (identifier_identities) identifier_identities )attribute (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_attrs) identifier_attrs (dictionary (pair (string_"category") string_"category" (string_"pubsub") string_"pubsub" )pair )dictionary )keyword_argument )argument_list )call (block (if_statement (comparison_operator (attribute (identifier_item) identifier_item (identifier_type_) identifier_type_ )attribute (string_"pep") string_"pep" )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement )block )for_statement (return_statement (False) False )return_statement )block )function_definition )module
Check whether we have a PEP identity associated with our account.
(module (function_definition (function_name__get_covered_keys_and_masks) function_name__get_covered_keys_and_masks (parameters (identifier_merge) identifier_merge (identifier_aliases) identifier_aliases )parameters (block (for_statement (identifier_entry) identifier_entry (subscript (attribute (identifier_merge) identifier_merge (identifier_routing_table) identifier_routing_table )attribute (slice (attribute (identifier_merge) identifier_merge (identifier_insertion_index) identifier_insertion_index )attribute (colon) colon )slice )subscript (block (expression_statement (assignment (identifier_key_mask) identifier_key_mask (tuple (attribute (identifier_entry) identifier_entry (identifier_key) identifier_key )attribute (attribute (identifier_entry) identifier_entry (identifier_mask) identifier_mask )attribute )tuple )assignment )expression_statement (expression_statement (assignment (identifier_keys_masks) identifier_keys_masks (call (attribute (identifier_aliases) identifier_aliases (identifier_get) identifier_get )attribute (argument_list (identifier_key_mask) identifier_key_mask (list (identifier_key_mask) identifier_key_mask )list )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_mask) identifier_mask )pattern_list (identifier_keys_masks) identifier_keys_masks (block (if_statement (call (identifier_intersect) identifier_intersect (argument_list (attribute (identifier_merge) identifier_merge (identifier_key) identifier_key )attribute (attribute (identifier_merge) identifier_merge (identifier_mask) identifier_mask )attribute (identifier_key) identifier_key (identifier_mask) identifier_mask )argument_list )call (block (expression_statement (yield (expression_list (identifier_key) identifier_key (identifier_mask) identifier_mask )expression_list )yield )expression_statement )block )if_statement )block )for_statement )block )for_statement )block )function_definition )module
Get keys and masks which would be covered by the entry resulting from the merge. Parameters ---------- aliases : {(key, mask): {(key, mask), ...}, ...} Map of key-mask pairs to the sets of key-mask pairs that they actually represent. Yields ------ (key, mask) Pairs of keys and masks which would be covered if the given `merge` were to be applied to the routing table.
(module (function_definition (function_name_options) function_name_options (parameters (identifier_self) identifier_self (identifier_request) identifier_request (identifier_map) identifier_map (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_options) identifier_options (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_method) identifier_method (identifier_function) identifier_function )pattern_list (call (attribute (identifier_map) identifier_map (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (subscript (identifier_options) identifier_options (identifier_method) identifier_method )subscript (attribute (identifier_function) identifier_function (identifier___doc__) identifier___doc__ )attribute )assignment )expression_statement )block )for_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__render) identifier__render )attribute (argument_list (keyword_argument (identifier_request) identifier_request (identifier_request) identifier_request )keyword_argument (keyword_argument (identifier_template) identifier_template (string_'options') string_'options' )keyword_argument (keyword_argument (identifier_context) identifier_context (dictionary (pair (string_'options') string_'options' (identifier_options) identifier_options )pair )dictionary )keyword_argument (keyword_argument (identifier_status) identifier_status (integer_200) integer_200 )keyword_argument (keyword_argument (identifier_headers) identifier_headers (dictionary (pair (string_'Allow') string_'Allow' (call (attribute (string_', ') string_', ' (identifier_join) identifier_join )attribute (argument_list (call (attribute (identifier_options) identifier_options (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )pair )dictionary )keyword_argument )argument_list )call )return_statement )block )function_definition )module
List communication options.
(module (function_definition (function_name_reg) function_name_reg (parameters (identifier_name) identifier_name )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (dictionary (pair (string_'name') string_'name' (identifier_name) identifier_name )pair (pair (string_'changes') string_'changes' (dictionary )dictionary )pair (pair (string_'comment') string_'comment' (string_'') string_'' )pair (pair (string_'result') string_'result' (True) True )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_now) identifier_now (call (attribute (identifier_time) identifier_time (identifier_time) identifier_time )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_'status') string_'status' (identifier___reg__) identifier___reg__ )comparison_operator (block (expression_statement (assignment (subscript (identifier___reg__) identifier___reg__ (string_'status') string_'status' )subscript (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (subscript (subscript (identifier___reg__) identifier___reg__ (string_'status') string_'status' )subscript (string_'val') string_'val' )subscript (dictionary )dictionary )assignment )expression_statement )block )if_statement (for_statement (identifier_event) identifier_event (identifier___events__) identifier___events__ (block (if_statement (call (attribute (identifier_fnmatch) identifier_fnmatch (identifier_fnmatch) identifier_fnmatch )attribute (argument_list (subscript (identifier_event) identifier_event (string_'tag') string_'tag' )subscript (string_'salt/beacon/*/status/*') string_'salt/beacon/*/status/*' )argument_list )call (block (expression_statement (assignment (identifier_idata) identifier_idata (dictionary (pair (string_'recv_time') string_'recv_time' (identifier_now) identifier_now )pair )dictionary )assignment )expression_statement (for_statement (identifier_key) identifier_key (subscript (subscript (identifier_event) identifier_event (string_'data') string_'data' )subscript (string_'data') string_'data' )subscript (block (if_statement (comparison_operator (identifier_key) identifier_key (tuple (string_'id') string_'id' (string_'recv_time') string_'recv_time' )tuple )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (subscript (identifier_idata) identifier_idata (identifier_key) identifier_key )subscript (subscript (subscript (subscript (identifier_event) identifier_event (string_'data') string_'data' )subscript (string_'data') string_'data' )subscript (identifier_key) identifier_key )subscript )assignment )expression_statement )block )for_statement (expression_statement (assignment (subscript (subscript (subscript (identifier___reg__) identifier___reg__ (string_'status') string_'status' )subscript (string_'val') string_'val' )subscript (subscript (subscript (identifier_event) identifier_event (string_'data') string_'data' )subscript (string_'id') string_'id' )subscript )subscript (identifier_idata) identifier_idata )assignment )expression_statement (expression_statement (assignment (subscript (subscript (identifier_ret) identifier_ret (string_'changes') string_'changes' )subscript (subscript (subscript (identifier_event) identifier_event (string_'data') string_'data' )subscript (string_'id') string_'id' )subscript )subscript (True) True )assignment )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Activate this register to turn on a minion status tracking register, this register keeps the current status beacon data and the time that each beacon was last checked in.
(module (function_definition (function_name_filter_significance) function_name_filter_significance (parameters (identifier_diff) identifier_diff (identifier_significance) identifier_significance )parameters (block (expression_statement (assignment (identifier_changed) identifier_changed (subscript (identifier_diff) identifier_diff (string_'changed') string_'changed' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_reduced) identifier_reduced (list_comprehension (dictionary (pair (string_'key') string_'key' (subscript (identifier_delta) identifier_delta (string_'key') string_'key' )subscript )pair (pair (string_'fields') string_'fields' (dictionary_comprehension (pair (identifier_k) identifier_k (identifier_v) identifier_v )pair (for_in_clause (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (subscript (identifier_delta) identifier_delta (string_'fields') string_'fields' )subscript (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause (if_clause (call (identifier__is_significant) identifier__is_significant (argument_list (identifier_v) identifier_v (identifier_significance) identifier_significance )argument_list )call )if_clause )dictionary_comprehension )pair )dictionary (for_in_clause (identifier_delta) identifier_delta (identifier_changed) identifier_changed )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_filtered) identifier_filtered (list_comprehension (identifier_delta) identifier_delta (for_in_clause (identifier_delta) identifier_delta (identifier_reduced) identifier_reduced )for_in_clause (if_clause (subscript (identifier_delta) identifier_delta (string_'fields') string_'fields' )subscript )if_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_diff) identifier_diff (call (attribute (identifier_diff) identifier_diff (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_diff) identifier_diff (string_'changed') string_'changed' )subscript (identifier_filtered) identifier_filtered )assignment )expression_statement (return_statement (identifier_diff) identifier_diff )return_statement )block )function_definition )module
Prune any changes in the patch which are due to numeric changes less than this level of significance.
(module (function_definition (function_name_annotation_spec_set_path) function_name_annotation_spec_set_path (parameters (identifier_cls) identifier_cls (identifier_project) identifier_project (identifier_annotation_spec_set) identifier_annotation_spec_set )parameters (block (return_statement (call (attribute (attribute (attribute (identifier_google) identifier_google (identifier_api_core) identifier_api_core )attribute (identifier_path_template) identifier_path_template )attribute (identifier_expand) identifier_expand )attribute (argument_list (string_"projects/{project}/annotationSpecSets/{annotation_spec_set}") string_"projects/{project}/annotationSpecSets/{annotation_spec_set}" (keyword_argument (identifier_project) identifier_project (identifier_project) identifier_project )keyword_argument (keyword_argument (identifier_annotation_spec_set) identifier_annotation_spec_set (identifier_annotation_spec_set) identifier_annotation_spec_set )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return a fully-qualified annotation_spec_set string.
(module (function_definition (function_name__slice) function_name__slice (parameters (identifier_index) identifier_index (identifier_n_samples) identifier_n_samples (default_parameter (identifier_margin) identifier_margin (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_margin) identifier_margin (None) None )comparison_operator (block (expression_statement (assignment (identifier_margin) identifier_margin (tuple (integer_0) integer_0 (integer_0) integer_0 )tuple )assignment )expression_statement )block )if_statement (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_n_samples) identifier_n_samples (tuple (identifier_tuple) identifier_tuple (identifier_list) identifier_list )tuple )argument_list )call )assert_statement (assert_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_n_samples) identifier_n_samples )argument_list )call (integer_2) integer_2 )comparison_operator )assert_statement (expression_statement (assignment (pattern_list (identifier_before) identifier_before (identifier_after) identifier_after )pattern_list (identifier_n_samples) identifier_n_samples )assignment )expression_statement (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_margin) identifier_margin (tuple (identifier_tuple) identifier_tuple (identifier_list) identifier_list )tuple )argument_list )call )assert_statement (assert_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_margin) identifier_margin )argument_list )call (integer_2) integer_2 )comparison_operator )assert_statement (expression_statement (assignment (pattern_list (identifier_margin_before) identifier_margin_before (identifier_margin_after) identifier_margin_after )pattern_list (identifier_margin) identifier_margin )assignment )expression_statement (expression_statement (augmented_assignment (identifier_before) identifier_before (identifier_margin_before) identifier_margin_before )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_after) identifier_after (identifier_margin_after) identifier_margin_after )augmented_assignment )expression_statement (expression_statement (assignment (identifier_index) identifier_index (call (identifier_int) identifier_int (argument_list (identifier_index) identifier_index )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_before) identifier_before (call (identifier_int) identifier_int (argument_list (identifier_before) identifier_before )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_after) identifier_after (call (identifier_int) identifier_int (argument_list (identifier_after) identifier_after )argument_list )call )assignment )expression_statement (return_statement (call (identifier_slice) identifier_slice (argument_list (call (identifier_max) identifier_max (argument_list (integer_0) integer_0 (binary_operator (identifier_index) identifier_index (identifier_before) identifier_before )binary_operator )argument_list )call (binary_operator (identifier_index) identifier_index (identifier_after) identifier_after )binary_operator (None) None )argument_list )call )return_statement )block )function_definition )module
Return a waveform slice.
(module (function_definition (function_name_product) function_name_product (parameters (identifier_pc) identifier_pc (identifier_service) identifier_service (identifier_attrib) identifier_attrib (identifier_sku) identifier_sku )parameters (block (expression_statement (assignment (attribute (identifier_pc) identifier_pc (identifier_service) identifier_service )attribute (call (attribute (identifier_service) identifier_service (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_pc) identifier_pc (identifier_sku) identifier_sku )attribute (identifier_sku) identifier_sku )assignment )expression_statement (expression_statement (call (attribute (identifier_pc) identifier_pc (identifier_add_attributes) identifier_add_attributes )attribute (argument_list (keyword_argument (identifier_attribs) identifier_attribs (identifier_attrib) identifier_attrib )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_click) identifier_click (identifier_echo) identifier_echo )attribute (argument_list (call (attribute (string_"Service Alias: {0}") string_"Service Alias: {0}" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_pc) identifier_pc (identifier_service_alias) identifier_service_alias )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_click) identifier_click (identifier_echo) identifier_echo )attribute (argument_list (call (attribute (string_"URL: {0}") string_"URL: {0}" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_pc) identifier_pc (identifier_service_url) identifier_service_url )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_click) identifier_click (identifier_echo) identifier_echo )attribute (argument_list (call (attribute (string_"Region: {0}") string_"Region: {0}" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_pc) identifier_pc (identifier_region) identifier_region )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_click) identifier_click (identifier_echo) identifier_echo )attribute (argument_list (call (attribute (string_"Product Terms: {0}") string_"Product Terms: {0}" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_pc) identifier_pc (identifier_terms) identifier_terms )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_click) identifier_click (identifier_echo) identifier_echo )attribute (argument_list (call (attribute (string_"Filtering Attributes: {0}") string_"Filtering Attributes: {0}" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_pc) identifier_pc (identifier_attributes) identifier_attributes )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_prods) identifier_prods (call (attribute (identifier_pyutu) identifier_pyutu (identifier_find_products) identifier_find_products )attribute (argument_list (identifier_pc) identifier_pc )argument_list )call )assignment )expression_statement (for_statement (identifier_p) identifier_p (identifier_prods) identifier_prods (block (expression_statement (call (attribute (identifier_click) identifier_click (identifier_echo) identifier_echo )attribute (argument_list (call (attribute (string_"Product SKU: {0} product: {1}") string_"Product SKU: {0} product: {1}" (identifier_format) identifier_format )attribute (argument_list (identifier_p) identifier_p (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (subscript (identifier_prods) identifier_prods (identifier_p) identifier_p )subscript (keyword_argument (identifier_indent) identifier_indent (integer_2) integer_2 )keyword_argument (keyword_argument (identifier_sort_keys) identifier_sort_keys (True) True )keyword_argument )argument_list )call )argument_list )call )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_click) identifier_click (identifier_echo) identifier_echo )attribute (argument_list (call (attribute (string_"Total Products Found: {0}") string_"Total Products Found: {0}" (identifier_format) identifier_format )attribute (argument_list (call (identifier_len) identifier_len (argument_list (identifier_prods) identifier_prods )argument_list )call )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_click) identifier_click (identifier_echo) identifier_echo )attribute (argument_list (call (attribute (string_"Time: {0} secs") string_"Time: {0} secs" (identifier_format) identifier_format )attribute (argument_list (call (attribute (identifier_time) identifier_time (identifier_process_time) identifier_process_time )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Get a list of a service's products. The list will be in the given region, matching the specific terms and any given attribute filters or a SKU.
(module (function_definition (function_name_controlled) function_name_controlled (parameters (identifier_num_ptr_bits) identifier_num_ptr_bits (identifier_U) identifier_U )parameters (block (expression_statement (assignment (identifier_d) identifier_d (binary_operator (integer_2) integer_2 (parenthesized_expression (binary_operator (integer_1) integer_1 (identifier_num_ptr_bits) identifier_num_ptr_bits )binary_operator )parenthesized_expression )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_m) identifier_m (call (attribute (identifier_np) identifier_np (identifier_eye) identifier_eye )attribute (argument_list (identifier_d) identifier_d )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_m) identifier_m (slice (binary_operator (identifier_d) identifier_d (integer_2) integer_2 )binary_operator (colon) colon )slice (slice (binary_operator (identifier_d) identifier_d (integer_2) integer_2 )binary_operator (colon) colon )slice )subscript (identifier_U) identifier_U )assignment )expression_statement (return_statement (identifier_m) identifier_m )return_statement )block )function_definition )module
Given a one-qubit gate matrix U, construct a controlled-U on all pointer qubits.
(module (function_definition (function_name__flat_values) function_name__flat_values (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (identifier_tuple) identifier_tuple (generator_expression (conditional_expression (attribute (identifier_np) identifier_np (identifier_nan) identifier_nan )attribute (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_x) identifier_x )argument_list )call (identifier_dict) identifier_dict )comparison_operator (identifier_x) identifier_x )conditional_expression (for_in_clause (identifier_x) identifier_x (subscript (subscript (subscript (subscript (attribute (identifier_self) identifier_self (identifier__cube_dict) identifier__cube_dict )attribute (string_"result") string_"result" )subscript (string_"measures") string_"measures" )subscript (string_"mean") string_"mean" )subscript (string_"data") string_"data" )subscript )for_in_clause )generator_expression )call )return_statement )block )function_definition )module
Return tuple of mean values as found in cube response. Mean data may include missing items represented by a dict like {'?': -1} in the cube response. These are replaced by np.nan in the returned value.
(module (function_definition (function_name_add_external_reference) function_name_add_external_reference (parameters (identifier_self) identifier_self (identifier_term_id) identifier_term_id (identifier_external_ref) identifier_external_ref )parameters (block (if_statement (comparison_operator (identifier_term_id) identifier_term_id (attribute (identifier_self) identifier_self (identifier_idx) identifier_idx )attribute )comparison_operator (block (expression_statement (assignment (identifier_term_obj) identifier_term_obj (call (identifier_Cterm) identifier_Cterm (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_idx) identifier_idx )attribute (identifier_term_id) identifier_term_id )subscript (attribute (identifier_self) identifier_self (identifier_type) identifier_type )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_term_obj) identifier_term_obj (identifier_add_external_reference) identifier_add_external_reference )attribute (argument_list (identifier_external_ref) identifier_external_ref )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_'{term_id} not in self.idx') string_'{term_id} not in self.idx' (identifier_format) identifier_format )attribute (argument_list (dictionary_splat (call (identifier_locals) identifier_locals (argument_list )argument_list )call )dictionary_splat )argument_list )call )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Adds an external reference for the given term @type term_id: string @param term_id: the term identifier @type external_ref: L{CexternalReference} @param external_ref: the external reference object
(module (function_definition (function_name_prepare) function_name_prepare (parameters (identifier_cls) identifier_cls )parameters (type (None) None )type (block (if_statement (comparison_operator (attribute (identifier_cls) identifier_cls (identifier_version) identifier_version )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_cls) identifier_cls (identifier_version) identifier_version )attribute (call (identifier_find_version) identifier_find_version (argument_list (attribute (identifier_cls) identifier_cls (identifier_name) identifier_name )attribute )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_cls) identifier_cls (identifier_long_description) identifier_long_description )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_cls) identifier_cls (identifier_long_description) identifier_long_description )attribute (call (attribute (identifier_cls) identifier_cls (identifier_parse_readme) identifier_parse_readme )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_cls) identifier_cls (identifier_packages) identifier_packages )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_cls) identifier_cls (identifier_packages) identifier_packages )attribute (call (identifier_find_packages) identifier_find_packages (argument_list (attribute (identifier_cls) identifier_cls (identifier_root_directory) identifier_root_directory )attribute )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_cls) identifier_cls (identifier_install_requires) identifier_install_requires )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_cls) identifier_cls (identifier_install_requires) identifier_install_requires )attribute (call (identifier_parse_requirements) identifier_parse_requirements (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_cls) identifier_cls (identifier_python_requires) identifier_python_requires )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_cls) identifier_cls (identifier_python_requires) identifier_python_requires )attribute (call (identifier_find_required_python_version) identifier_find_required_python_version (argument_list (attribute (identifier_cls) identifier_cls (identifier_classifiers) identifier_classifiers )attribute )argument_list )call )assignment )expression_statement )block )if_statement )block )function_definition )module
Fill in possibly missing package metadata.
(module (function_definition (function_name__normalize_string) function_name__normalize_string (parameters (identifier_raw_str) identifier_raw_str )parameters (block (return_statement (call (attribute (string_" ") string_" " (identifier_join) identifier_join )attribute (generator_expression (call (attribute (identifier_token) identifier_token (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call (for_in_clause (identifier_token) identifier_token (call (attribute (identifier_tokenizer) identifier_tokenizer (identifier_encode) identifier_encode )attribute (argument_list (call (attribute (identifier_text_encoder) identifier_text_encoder (identifier_native_to_unicode) identifier_native_to_unicode )attribute (argument_list (identifier_raw_str) identifier_raw_str )argument_list )call )argument_list )call )for_in_clause )generator_expression )call )return_statement )block )function_definition )module
Normalizes the string using tokenizer.encode. Args: raw_str: the input string Returns: A string which is ready to be tokenized using split()
(module (function_definition (function_name_from_db_value) function_name_from_db_value (parameters (identifier_self) identifier_self (identifier_value) identifier_value (identifier_expression) identifier_expression (identifier_connection) identifier_connection (identifier_context) identifier_context )parameters (block (if_statement (comparison_operator (identifier_value) identifier_value (None) None )comparison_operator (block (return_statement (identifier_value) identifier_value )return_statement )block )if_statement (if_statement (comparison_operator (identifier_value) identifier_value (string_'') string_'' )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (return_statement (call (identifier_iso_string_to_python_datetime) identifier_iso_string_to_python_datetime (argument_list (identifier_value) identifier_value )argument_list )call )return_statement )block )function_definition )module
Convert database value to Python value. Called when data is loaded from the database.
(module (function_definition (function_name__unpack) function_name__unpack (parameters (identifier_struct) identifier_struct (identifier_bc) identifier_bc (default_parameter (identifier_offset) identifier_offset (integer_0) integer_0 )default_parameter )parameters (block (return_statement (expression_list (call (attribute (identifier_struct) identifier_struct (identifier_unpack_from) identifier_unpack_from )attribute (argument_list (identifier_bc) identifier_bc (identifier_offset) identifier_offset )argument_list )call (binary_operator (identifier_offset) identifier_offset (attribute (identifier_struct) identifier_struct (identifier_size) identifier_size )attribute )binary_operator )expression_list )return_statement )block )function_definition )module
returns the unpacked data tuple, and the next offset past the unpacked data
(module (function_definition (function_name_place_visual) function_name_place_visual (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_index) identifier_index (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (identifier_bin_pos) identifier_bin_pos (call (identifier_string_to_array) identifier_string_to_array (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_bin2_body) identifier_bin2_body )attribute (identifier_get) identifier_get )attribute (argument_list (string_"pos") string_"pos" )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_bin_size) identifier_bin_size (attribute (identifier_self) identifier_self (identifier_bin_size) identifier_bin_size )attribute )assignment )expression_statement (for_statement (pattern_list (identifier__) identifier__ (identifier_obj_mjcf) identifier_obj_mjcf )pattern_list (attribute (identifier_self) identifier_self (identifier_visual_objects) identifier_visual_objects )attribute (block (expression_statement (assignment (identifier_bin_x_low) identifier_bin_x_low (subscript (identifier_bin_pos) identifier_bin_pos (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_bin_y_low) identifier_bin_y_low (subscript (identifier_bin_pos) identifier_bin_pos (integer_1) integer_1 )subscript )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_index) identifier_index (integer_0) integer_0 )comparison_operator (comparison_operator (identifier_index) identifier_index (integer_2) integer_2 )comparison_operator )boolean_operator (block (expression_statement (augmented_assignment (identifier_bin_x_low) identifier_bin_x_low (binary_operator (subscript (identifier_bin_size) identifier_bin_size (integer_0) integer_0 )subscript (integer_2) integer_2 )binary_operator )augmented_assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_index) identifier_index (integer_2) integer_2 )comparison_operator (block (expression_statement (augmented_assignment (identifier_bin_y_low) identifier_bin_y_low (binary_operator (subscript (identifier_bin_size) identifier_bin_size (integer_1) integer_1 )subscript (integer_2) integer_2 )binary_operator )augmented_assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_bin_x_high) identifier_bin_x_high (binary_operator (identifier_bin_x_low) identifier_bin_x_low (binary_operator (subscript (identifier_bin_size) identifier_bin_size (integer_0) integer_0 )subscript (integer_2) integer_2 )binary_operator )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_bin_y_high) identifier_bin_y_high (binary_operator (identifier_bin_y_low) identifier_bin_y_low (binary_operator (subscript (identifier_bin_size) identifier_bin_size (integer_1) integer_1 )subscript (integer_2) integer_2 )binary_operator )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_bottom_offset) identifier_bottom_offset (call (attribute (identifier_obj_mjcf) identifier_obj_mjcf (identifier_get_bottom_offset) identifier_get_bottom_offset )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_bin_range) identifier_bin_range (list (binary_operator (identifier_bin_x_low) identifier_bin_x_low (identifier_bin_x_high) identifier_bin_x_high )binary_operator (binary_operator (identifier_bin_y_low) identifier_bin_y_low (identifier_bin_y_high) identifier_bin_y_high )binary_operator (binary_operator (integer_2) integer_2 (subscript (identifier_bin_pos) identifier_bin_pos (integer_2) integer_2 )subscript )binary_operator )list )assignment )expression_statement (expression_statement (assignment (identifier_bin_center) identifier_bin_center (binary_operator (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (identifier_bin_range) identifier_bin_range )argument_list )call (float_2.0) float_2.0 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_pos) identifier_pos (binary_operator (identifier_bin_center) identifier_bin_center (identifier_bottom_offset) identifier_bottom_offset )binary_operator )assignment )expression_statement (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_visual_obj_mjcf) identifier_visual_obj_mjcf )attribute (identifier_index) identifier_index )subscript (identifier_set) identifier_set )attribute (argument_list (string_"pos") string_"pos" (call (identifier_array_to_string) identifier_array_to_string (argument_list (identifier_pos) identifier_pos )argument_list )call )argument_list )call )expression_statement (expression_statement (augmented_assignment (identifier_index) identifier_index (integer_1) integer_1 )augmented_assignment )expression_statement )block )for_statement )block )function_definition )module
Places visual objects randomly until no collisions or max iterations hit.
(module (function_definition (function_name_setPololuProtocol) function_name_setPololuProtocol (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__compact) identifier__compact )attribute (False) False )assignment )expression_statement (expression_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier__log) identifier__log )attribute (call (attribute (attribute (identifier_self) identifier_self (identifier__log) identifier__log )attribute (identifier_debug) identifier_debug )attribute (argument_list (string_"Pololu protocol has been set.") string_"Pololu protocol has been set." )argument_list )call )boolean_operator )expression_statement )block )function_definition )module
Set the pololu protocol.
(module (function_definition (function_name__get_description) function_name__get_description (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (attribute (string_", ") string_", " (identifier_join) identifier_join )attribute (argument_list (list_comprehension (identifier_part) identifier_part (for_in_clause (identifier_part) identifier_part (list (conditional_expression (call (attribute (string_"missing: {}") string_"missing: {}" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_missing) identifier_missing )attribute )argument_list )call (attribute (identifier_self) identifier_self (identifier_missing) identifier_missing )attribute (string_"") string_"" )conditional_expression (parenthesized_expression (conditional_expression (call (attribute (string_"forbidden: {}") string_"forbidden: {}" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_forbidden) identifier_forbidden )attribute )argument_list )call (attribute (identifier_self) identifier_self (identifier_forbidden) identifier_forbidden )attribute (string_"") string_"" )conditional_expression )parenthesized_expression (conditional_expression (call (attribute (string_"invalid: {}:") string_"invalid: {}:" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_invalid) identifier_invalid )attribute )argument_list )call (attribute (identifier_self) identifier_self (identifier_invalid) identifier_invalid )attribute (string_"") string_"" )conditional_expression (parenthesized_expression (conditional_expression (call (attribute (string_"failed to parse: {}") string_"failed to parse: {}" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_failed) identifier_failed )attribute )argument_list )call (attribute (identifier_self) identifier_self (identifier_failed) identifier_failed )attribute (string_"") string_"" )conditional_expression )parenthesized_expression )list )for_in_clause (if_clause (identifier_part) identifier_part )if_clause )list_comprehension )argument_list )call )return_statement )block )function_definition )module
Return human readable description error description. This description should explain everything that went wrong during deserialization.
(module (function_definition (function_name_find_and_modify) function_name_find_and_modify (parameters (identifier_self) identifier_self (default_parameter (identifier_query) identifier_query (None) None )default_parameter (default_parameter (identifier_update) identifier_update (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_update) identifier_update (boolean_operator (identifier_update) identifier_update (dictionary )dictionary )boolean_operator )assignment )expression_statement (for_statement (identifier_document) identifier_document (call (attribute (identifier_self) identifier_self (identifier_find) identifier_find )attribute (argument_list (keyword_argument (identifier_query) identifier_query (identifier_query) identifier_query )keyword_argument )argument_list )call (block (expression_statement (call (attribute (identifier_document) identifier_document (identifier_update) identifier_update )attribute (argument_list (identifier_update) identifier_update )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_update) identifier_update )attribute (argument_list (identifier_document) identifier_document )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Finds documents in this collection that match a given query and updates them
(module (function_definition (function_name__parse_output) function_name__parse_output (parameters (identifier_self) identifier_self (identifier_xml_response) identifier_xml_response )parameters (block (expression_statement (assignment (identifier_count) identifier_count (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (identifier_xml_dict) identifier_xml_dict (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_resp_message) identifier_resp_message (None) None )assignment )expression_statement (expression_statement (assignment (identifier_xml_start_pos) identifier_xml_start_pos (list )list )assignment )expression_statement (for_statement (identifier_m) identifier_m (call (attribute (identifier_re) identifier_re (identifier_finditer) identifier_finditer )attribute (argument_list (string_r"\<\?xml") string_r"\<\?xml" (identifier_xml_response) identifier_xml_response )argument_list )call (block (expression_statement (call (attribute (identifier_xml_start_pos) identifier_xml_start_pos (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_m) identifier_m (identifier_start) identifier_start )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )for_statement (while_statement (comparison_operator (identifier_count) identifier_count (call (identifier_len) identifier_len (argument_list (identifier_xml_start_pos) identifier_xml_start_pos )argument_list )call )comparison_operator (block (if_statement (parenthesized_expression (comparison_operator (identifier_count) identifier_count (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_xml_start_pos) identifier_xml_start_pos )argument_list )call (integer_1) integer_1 )binary_operator )comparison_operator )parenthesized_expression (block (expression_statement (assignment (identifier_result) identifier_result (subscript (identifier_xml_response) identifier_xml_response (slice (subscript (identifier_xml_start_pos) identifier_xml_start_pos (identifier_count) identifier_count )subscript (colon) colon )slice )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_start) identifier_start (subscript (identifier_xml_start_pos) identifier_xml_start_pos (identifier_count) identifier_count )subscript )assignment )expression_statement (expression_statement (assignment (identifier_end) identifier_end (subscript (identifier_xml_start_pos) identifier_xml_start_pos (binary_operator (identifier_count) identifier_count (integer_1) integer_1 )binary_operator )subscript )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (subscript (identifier_xml_response) identifier_xml_response (slice (identifier_start) identifier_start (colon) colon (identifier_end) identifier_end )slice )subscript )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_result) identifier_result (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_message) identifier_message (call (attribute (identifier_etree) identifier_etree (identifier_fromstring) identifier_fromstring )attribute (argument_list (identifier_result) identifier_result )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_resp) identifier_resp (call (attribute (identifier_self) identifier_self (identifier__validate_message) identifier__validate_message )attribute (argument_list (identifier_message) identifier_message )argument_list )call )assignment )expression_statement (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_resp) identifier_resp (string_'tag') string_'tag' )argument_list )call (block (expression_statement (assignment (identifier_xml_dict) identifier_xml_dict (call (attribute (identifier_self) identifier_self (identifier__elementtree_to_dict) identifier__elementtree_to_dict )attribute (argument_list (identifier_resp) identifier_resp )argument_list )call )assignment )expression_statement )block (elif_clause (comparison_operator (identifier_resp) identifier_resp (None) None )comparison_operator (block (expression_statement (assignment (identifier_resp_message) identifier_resp_message (identifier_resp) identifier_resp )assignment )expression_statement )block )elif_clause )if_statement (expression_statement (assignment (identifier_count) identifier_count (binary_operator (identifier_count) identifier_count (integer_1) integer_1 )binary_operator )assignment )expression_statement )block )while_statement (if_statement (identifier_xml_dict) identifier_xml_dict (block (return_statement (identifier_xml_dict) identifier_xml_dict )return_statement )block (elif_clause (comparison_operator (identifier_resp_message) identifier_resp_message (None) None )comparison_operator (block (return_statement (identifier_resp_message) identifier_resp_message )return_statement )block )elif_clause )if_statement )block )function_definition )module
Parse the response XML from iLO. This function parses the output received from ILO. As the output contains multiple XMLs, it extracts one xml at a time and loops over till all the xmls in the response are exhausted. It returns the data to APIs either in dictionary format or as the string. It creates the dictionary only if the Ilo response contains the data under the requested RIBCL command. If the Ilo response contains only the string, then the string is returned back.
(module (function_definition (function_name_dumps) function_name_dumps (parameters (identifier_self) identifier_self (identifier_data) identifier_data )parameters (block (expression_statement (assignment (identifier_data) identifier_data (call (subscript (subscript (identifier_g_serializer_drivers) identifier_g_serializer_drivers (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )subscript (string_'dumps') string_'dumps' )subscript (argument_list (identifier_data) identifier_data )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (subscript (attribute (identifier_sys) identifier_sys (identifier_version_info) identifier_version_info )attribute (integer_0) integer_0 )subscript (integer_3) integer_3 )comparison_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_data) identifier_data (identifier_str) identifier_str )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_data) identifier_data (identifier_encode) identifier_encode )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__charset) identifier__charset )attribute )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__compression) identifier__compression )attribute (string_'zlib') string_'zlib' )comparison_operator (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_zlib) identifier_zlib (identifier_compress) identifier_compress )attribute (argument_list (identifier_data) identifier_data )argument_list )call )assignment )expression_statement )block )if_statement (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_data) identifier_data (identifier_bytes) identifier_bytes )argument_list )call )assert_statement (return_statement (identifier_data) identifier_data )return_statement )block )function_definition )module
Serialize a python data type for transmission or storage. :param data: The python object to serialize. :return: The serialized representation of the object. :rtype: bytes
(module (function_definition (function_name_dumps) function_name_dumps (parameters (identifier_self) identifier_self (default_parameter (identifier_separator) identifier_separator (string_'=') string_'=' )default_parameter )parameters (block (expression_statement (assignment (identifier_s) identifier_s (call (attribute (identifier_six) identifier_six (identifier_StringIO) identifier_StringIO )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_dump) identifier_dump )attribute (argument_list (identifier_s) identifier_s (keyword_argument (identifier_separator) identifier_separator (identifier_separator) identifier_separator )keyword_argument )argument_list )call )expression_statement (return_statement (call (attribute (identifier_s) identifier_s (identifier_getvalue) identifier_getvalue )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Convert the mapping to a text string in simple line-oriented ``.properties`` format. If the instance was originally created from a file or string with `PropertiesFile.load()` or `PropertiesFile.loads()`, then the output will include the comments and whitespace from the original input, and any keys that haven't been deleted or reassigned will retain their original formatting and multiplicity. Key-value pairs that have been modified or added to the mapping will be reformatted with `join_key_value()` using the given separator. All key-value pairs are output in the order they were defined, with new keys added to the end. .. note:: Serializing a `PropertiesFile` instance with the :func:`dumps()` function instead will cause all formatting information to be ignored, as :func:`dumps()` will treat the instance like a normal mapping. :param separator: The string to use for separating new or modified keys & values. Only ``" "``, ``"="``, and ``":"`` (possibly with added whitespace) should ever be used as the separator. :type separator: text string :rtype: text string
(module (function_definition (function_name_put) function_name_put (parameters (identifier_self) identifier_self (identifier_url) identifier_url )parameters (block (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_self) identifier_self (identifier_http_request) identifier_http_request )attribute (argument_list (identifier_url) identifier_url (string_'PUT') string_'PUT' (identifier_self) identifier_self (dictionary (pair (string_'Content-Type') string_'Content-Type' (string_'application/xml; charset=utf-8') string_'application/xml; charset=utf-8' )pair )dictionary )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_response) identifier_response (identifier_status) identifier_status )attribute (integer_200) integer_200 )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_raise_http_error) identifier_raise_http_error )attribute (argument_list (identifier_response) identifier_response )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_response_xml) identifier_response_xml (call (attribute (identifier_response) identifier_response (identifier_read) identifier_read )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (call (attribute (identifier_logging) identifier_logging (identifier_getLogger) identifier_getLogger )attribute (argument_list (string_'recurly.http.response') string_'recurly.http.response' )argument_list )call (identifier_debug) identifier_debug )attribute (argument_list (identifier_response_xml) identifier_response_xml )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_update_from_element) identifier_update_from_element )attribute (argument_list (call (attribute (identifier_ElementTree) identifier_ElementTree (identifier_fromstring) identifier_fromstring )attribute (argument_list (identifier_response_xml) identifier_response_xml )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Sends this `Resource` instance to the service with a ``PUT`` request to the given URL.
(module (function_definition (function_name_until_any_child_in_state) function_name_until_any_child_in_state (parameters (identifier_self) identifier_self (identifier_state) identifier_state (default_parameter (identifier_timeout) identifier_timeout (None) None )default_parameter )parameters (block (return_statement (call (identifier_until_any) identifier_until_any (argument_list (list_splat (list_comprehension (call (attribute (identifier_r) identifier_r (identifier_until_state) identifier_until_state )attribute (argument_list (identifier_state) identifier_state )argument_list )call (for_in_clause (identifier_r) identifier_r (call (attribute (identifier_dict) identifier_dict (identifier_values) identifier_values )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_children) identifier_children )attribute )argument_list )call )for_in_clause )list_comprehension )list_splat (keyword_argument (identifier_timeout) identifier_timeout (identifier_timeout) identifier_timeout )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return a tornado Future; resolves when any client is in specified state
(module (function_definition (function_name_results) function_name_results (parameters (identifier_self) identifier_self )parameters (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_TrialResult) identifier_TrialResult )type )type_parameter )generic_type )type (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier__results) identifier__results )attribute )not_operator (block (expression_statement (assignment (identifier_job) identifier_job (call (attribute (identifier_self) identifier_self (identifier__update_job) identifier__update_job )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier__) identifier__ (call (identifier_range) identifier_range (argument_list (integer_1000) integer_1000 )argument_list )call (block (if_statement (comparison_operator (subscript (subscript (identifier_job) identifier_job (string_'executionStatus') string_'executionStatus' )subscript (string_'state') string_'state' )subscript (identifier_TERMINAL_STATES) identifier_TERMINAL_STATES )comparison_operator (block (break_statement )break_statement )block )if_statement (expression_statement (call (attribute (identifier_time) identifier_time (identifier_sleep) identifier_sleep )attribute (argument_list (float_0.5) float_0.5 )argument_list )call )expression_statement (expression_statement (assignment (identifier_job) identifier_job (call (attribute (identifier_self) identifier_self (identifier__update_job) identifier__update_job )attribute (argument_list )argument_list )call )assignment )expression_statement )block )for_statement (if_statement (comparison_operator (subscript (subscript (identifier_job) identifier_job (string_'executionStatus') string_'executionStatus' )subscript (string_'state') string_'state' )subscript (string_'SUCCESS') string_'SUCCESS' )comparison_operator (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (binary_operator (string_'Job %s did not succeed. It is in state %s.') string_'Job %s did not succeed. It is in state %s.' (tuple (subscript (identifier_job) identifier_job (string_'name') string_'name' )subscript (subscript (subscript (identifier_job) identifier_job (string_'executionStatus') string_'executionStatus' )subscript (string_'state') string_'state' )subscript )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__results) identifier__results )attribute (call (attribute (attribute (identifier_self) identifier_self (identifier__engine) identifier__engine )attribute (identifier_get_job_results) identifier_get_job_results )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_job_resource_name) identifier_job_resource_name )attribute )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier__results) identifier__results )attribute )return_statement )block )function_definition )module
Returns the job results, blocking until the job is complete.
(module (function_definition (function_name_create_api_method) function_name_create_api_method (parameters (identifier_restApiId) identifier_restApiId (identifier_resourcePath) identifier_resourcePath (identifier_httpMethod) identifier_httpMethod (identifier_authorizationType) identifier_authorizationType (default_parameter (identifier_apiKeyRequired) identifier_apiKeyRequired (False) False )default_parameter (default_parameter (identifier_requestParameters) identifier_requestParameters (None) None )default_parameter (default_parameter (identifier_requestModels) identifier_requestModels (None) None )default_parameter (default_parameter (identifier_region) identifier_region (None) None )default_parameter (default_parameter (identifier_key) identifier_key (None) None )default_parameter (default_parameter (identifier_keyid) identifier_keyid (None) None )default_parameter (default_parameter (identifier_profile) identifier_profile (None) None )default_parameter )parameters (block (try_statement (block (expression_statement (assignment (identifier_resource) identifier_resource (call (attribute (call (identifier_describe_api_resource) identifier_describe_api_resource (argument_list (identifier_restApiId) identifier_restApiId (identifier_resourcePath) identifier_resourcePath (keyword_argument (identifier_region) identifier_region (identifier_region) identifier_region )keyword_argument (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument (keyword_argument (identifier_keyid) identifier_keyid (identifier_keyid) identifier_keyid )keyword_argument (keyword_argument (identifier_profile) identifier_profile (identifier_profile) identifier_profile )keyword_argument )argument_list )call (identifier_get) identifier_get )attribute (argument_list (string_'resource') string_'resource' )argument_list )call )assignment )expression_statement (if_statement (identifier_resource) identifier_resource (block (expression_statement (assignment (identifier_requestParameters) identifier_requestParameters (conditional_expression (call (identifier_dict) identifier_dict (argument_list )argument_list )call (comparison_operator (identifier_requestParameters) identifier_requestParameters (None) None )comparison_operator (identifier_requestParameters) identifier_requestParameters )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_requestModels) identifier_requestModels (conditional_expression (call (identifier_dict) identifier_dict (argument_list )argument_list )call (comparison_operator (identifier_requestModels) identifier_requestModels (None) None )comparison_operator (identifier_requestModels) identifier_requestModels )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_conn) identifier_conn (call (identifier__get_conn) identifier__get_conn (argument_list (keyword_argument (identifier_region) identifier_region (identifier_region) identifier_region )keyword_argument (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument (keyword_argument (identifier_keyid) identifier_keyid (identifier_keyid) identifier_keyid )keyword_argument (keyword_argument (identifier_profile) identifier_profile (identifier_profile) identifier_profile )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_method) identifier_method (call (attribute (identifier_conn) identifier_conn (identifier_put_method) identifier_put_method )attribute (argument_list (keyword_argument (identifier_restApiId) identifier_restApiId (identifier_restApiId) identifier_restApiId )keyword_argument (keyword_argument (identifier_resourceId) identifier_resourceId (subscript (identifier_resource) identifier_resource (string_'id') string_'id' )subscript )keyword_argument (keyword_argument (identifier_httpMethod) identifier_httpMethod (identifier_httpMethod) identifier_httpMethod )keyword_argument (keyword_argument (identifier_authorizationType) identifier_authorizationType (call (identifier_str) identifier_str (argument_list (identifier_authorizationType) identifier_authorizationType )argument_list )call )keyword_argument (keyword_argument (identifier_apiKeyRequired) identifier_apiKeyRequired (identifier_apiKeyRequired) identifier_apiKeyRequired )keyword_argument (keyword_argument (identifier_requestParameters) identifier_requestParameters (identifier_requestParameters) identifier_requestParameters )keyword_argument (keyword_argument (identifier_requestModels) identifier_requestModels (identifier_requestModels) identifier_requestModels )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (dictionary (pair (string_'created') string_'created' (True) True )pair (pair (string_'method') string_'method' (identifier_method) identifier_method )pair )dictionary )return_statement )block )if_statement (return_statement (dictionary (pair (string_'created') string_'created' (False) False )pair (pair (string_'error') string_'error' (string_'Failed to create method') string_'Failed to create method' )pair )dictionary )return_statement )block (except_clause (as_pattern (identifier_ClientError) identifier_ClientError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (return_statement (dictionary (pair (string_'created') string_'created' (False) False )pair (pair (string_'error') string_'error' (call (subscript (identifier___utils__) identifier___utils__ (string_'boto3.get_error') string_'boto3.get_error' )subscript (argument_list (identifier_e) identifier_e )argument_list )call )pair )dictionary )return_statement )block )except_clause )try_statement )block )function_definition )module
Creates API method for a resource in the given API CLI Example: .. code-block:: bash salt myminion boto_apigateway.create_api_method restApiId resourcePath, httpMethod, authorizationType, \\ apiKeyRequired=False, requestParameters='{"name", "value"}', requestModels='{"content-type", "value"}'
(module (function_definition (function_name_connect) function_name_connect (parameters (identifier_nodes) identifier_nodes )parameters (block (for_statement (pattern_list (identifier_a) identifier_a (identifier_b) identifier_b )pattern_list (call (identifier_zip) identifier_zip (argument_list (subscript (identifier_nodes) identifier_nodes (slice (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript (subscript (identifier_nodes) identifier_nodes (slice (integer_1) integer_1 (colon) colon )slice )subscript )argument_list )call (block (expression_statement (assignment (attribute (identifier_a) identifier_a (identifier_output) identifier_output )attribute (identifier_b) identifier_b )assignment )expression_statement )block )for_statement (expression_statement (assignment (attribute (identifier_b) identifier_b (identifier_output) identifier_output )attribute (call (attribute (identifier_queues) identifier_queues (identifier_Queue) identifier_Queue )attribute (argument_list )argument_list )call )assignment )expression_statement )block )function_definition )module
Connect a list of nodes. Connected nodes have an ``output`` member which is the following node in the line. The last node's ``output`` is a :class:`Queue` for easy plumbing.
(module (function_definition (function_name_load_fixtures) function_name_load_fixtures (parameters )parameters (block (if_statement (comparison_operator (call (identifier_local) identifier_local (argument_list (string_"pwd") string_"pwd" (keyword_argument (identifier_capture) identifier_capture (True) True )keyword_argument )argument_list )call (identifier_PRODUCTION_DOCUMENT_ROOT) identifier_PRODUCTION_DOCUMENT_ROOT )comparison_operator (block (expression_statement (call (identifier_abort) identifier_abort (argument_list (string_"Refusing to automatically load fixtures into production database!") string_"Refusing to automatically load fixtures into production database!" )argument_list )call )expression_statement )block )if_statement (if_statement (not_operator (call (identifier_confirm) identifier_confirm (argument_list (string_"Are you sure you want to load all fixtures? This could have unintended consequences if the database is not empty.") string_"Are you sure you want to load all fixtures? This could have unintended consequences if the database is not empty." )argument_list )call )not_operator (block (expression_statement (call (identifier_abort) identifier_abort (argument_list (string_"Aborted.") string_"Aborted." )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_files) identifier_files (list (string_"fixtures/users/users.json") string_"fixtures/users/users.json" (string_"fixtures/eighth/sponsors.json") string_"fixtures/eighth/sponsors.json" (string_"fixtures/eighth/rooms.json") string_"fixtures/eighth/rooms.json" (string_"fixtures/eighth/blocks.json") string_"fixtures/eighth/blocks.json" (string_"fixtures/eighth/activities.json") string_"fixtures/eighth/activities.json" (string_"fixtures/eighth/scheduled_activities.json") string_"fixtures/eighth/scheduled_activities.json" (string_"fixtures/eighth/signups.json") string_"fixtures/eighth/signups.json" (string_"fixtures/announcements/announcements.json") string_"fixtures/announcements/announcements.json" )list )assignment )expression_statement (for_statement (identifier_f) identifier_f (identifier_files) identifier_files (block (expression_statement (call (identifier_local) identifier_local (argument_list (binary_operator (string_"./manage.py loaddata ") string_"./manage.py loaddata " (identifier_f) identifier_f )binary_operator )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Populate a database with data from fixtures.
(module (function_definition (function_name_add_metric) function_name_add_metric (parameters (identifier_self) identifier_self (identifier_metric_name) identifier_metric_name (identifier_measurable) identifier_measurable (default_parameter (identifier_config) identifier_config (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_metric) identifier_metric (call (identifier_KafkaMetric) identifier_KafkaMetric (argument_list (identifier_metric_name) identifier_metric_name (identifier_measurable) identifier_measurable (boolean_operator (identifier_config) identifier_config (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute )boolean_operator )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_register_metric) identifier_register_metric )attribute (argument_list (identifier_metric) identifier_metric )argument_list )call )expression_statement )block )function_definition )module
Add a metric to monitor an object that implements measurable. This metric won't be associated with any sensor. This is a way to expose existing values as metrics. Arguments: metricName (MetricName): The name of the metric measurable (AbstractMeasurable): The measurable that will be measured by this metric config (MetricConfig, optional): The configuration to use when measuring this measurable
(module (function_definition (function_name__make_expr_ops) function_name__make_expr_ops (parameters (identifier_self) identifier_self (identifier_op_list) identifier_op_list (default_parameter (identifier_op_dict) identifier_op_dict (None) None )default_parameter (default_parameter (identifier_op_class) identifier_op_class (None) None )default_parameter )parameters (block (for_statement (identifier_o) identifier_o (identifier_op_list) identifier_op_list (block (if_statement (comparison_operator (identifier_op_dict) identifier_op_dict (None) None )comparison_operator (block (if_statement (comparison_operator (identifier_o) identifier_o (identifier_op_dict) identifier_op_dict )comparison_operator (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__op_expr) identifier__op_expr )attribute (identifier_o) identifier_o )subscript (subscript (identifier_op_dict) identifier_op_dict (identifier_o) identifier_o )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_l) identifier_l (identifier_warning) identifier_warning )attribute (argument_list (string_"Operation %s not in op_dict.") string_"Operation %s not in op_dict." (identifier_o) identifier_o )argument_list )call )expression_statement )block )else_clause )if_statement )block (else_clause (block (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_op_class) identifier_op_class (identifier_o) identifier_o )argument_list )call (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__op_expr) identifier__op_expr )attribute (identifier_o) identifier_o )subscript (call (identifier_getattr) identifier_getattr (argument_list (identifier_op_class) identifier_op_class (identifier_o) identifier_o )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_l) identifier_l (identifier_warning) identifier_warning )attribute (argument_list (string_"Operation %s not in op_class %s.") string_"Operation %s not in op_class %s." (identifier_o) identifier_o (identifier_op_class) identifier_op_class )argument_list )call )expression_statement )block )else_clause )if_statement )block )else_clause )if_statement )block )for_statement )block )function_definition )module
Fill up `self._op_expr` dict. :param op_list: A list of operation names. :param op_dict: A dictionary of operation methods. :param op_class: Where the operation method comes from. :return:
(module (function_definition (function_name_timing) function_name_timing (parameters (identifier_func) identifier_func )parameters (block (decorated_definition (decorator (call (attribute (identifier_functools) identifier_functools (identifier_wraps) identifier_wraps )attribute (argument_list (identifier_func) identifier_func )argument_list )call )decorator (function_definition (function_name_wrap) function_name_wrap (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kw) identifier_kw )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_t0) identifier_t0 (call (identifier_time) identifier_time (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (identifier_func) identifier_func (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kw) identifier_kw )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_t1) identifier_t1 (call (identifier_time) identifier_time (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_'func:%r args:[%r, %r] took: %2.4f sec') string_'func:%r args:[%r, %r] took: %2.4f sec' (tuple (attribute (identifier_func) identifier_func (identifier___name__) identifier___name__ )attribute (identifier_args) identifier_args (identifier_kw) identifier_kw (binary_operator (identifier_t1) identifier_t1 (identifier_t0) identifier_t0 )binary_operator )tuple )binary_operator )argument_list )call )expression_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )decorated_definition (return_statement (identifier_wrap) identifier_wrap )return_statement )block )function_definition )module
Measure the execution time of a function call and print the result.
(module (function_definition (function_name__adopt_notifications) function_name__adopt_notifications (parameters (identifier_self) identifier_self (identifier_state) identifier_state )parameters (block (function_definition (function_name_iterator) function_name_iterator (parameters )parameters (block (expression_statement (assignment (identifier_it) identifier_it (call (attribute (attribute (attribute (identifier_state) identifier_state (identifier_descriptor) identifier_descriptor )attribute (identifier_pending_notifications) identifier_pending_notifications )attribute (identifier_iteritems) identifier_iteritems )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier__) identifier__ (identifier_nots) identifier_nots )pattern_list (identifier_it) identifier_it (block (for_statement (identifier_x) identifier_x (identifier_nots) identifier_nots (block (expression_statement (yield (identifier_x) identifier_x )yield )expression_statement )block )for_statement )block )for_statement )block )function_definition (expression_statement (assignment (identifier_to_adopt) identifier_to_adopt (call (identifier_list) identifier_list (argument_list (call (identifier_iterator) identifier_iterator (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_info) identifier_info )attribute (argument_list (string_"Will adopt %d pending notifications.") string_"Will adopt %d pending notifications." (call (identifier_len) identifier_len (argument_list (identifier_to_adopt) identifier_to_adopt )argument_list )call )argument_list )call )expression_statement (return_statement (call (attribute (attribute (identifier_state) identifier_state (identifier_sender) identifier_sender )attribute (identifier_notify) identifier_notify )attribute (argument_list (identifier_to_adopt) identifier_to_adopt )argument_list )call )return_statement )block )function_definition )module
Part of the "monitor" restart strategy. The pending notifications from descriptor of dead agent are imported to our pending list.
(module (function_definition (function_name_execute) function_name_execute (parameters (identifier_self) identifier_self (identifier_env) identifier_env (identifier_args) identifier_args )parameters (block (expression_statement (assignment (identifier_tasks) identifier_tasks (call (attribute (attribute (identifier_env) identifier_env (identifier_task) identifier_task )attribute (identifier_get_list_info) identifier_get_list_info )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_tasks) identifier_tasks )not_operator (block (expression_statement (call (attribute (attribute (identifier_env) identifier_env (identifier_io) identifier_io )attribute (identifier_write) identifier_write )attribute (argument_list (string_"No tasks found.") string_"No tasks found." )argument_list )call )expression_statement )block (else_clause (block (if_statement (attribute (identifier_args) identifier_args (identifier_verbose) identifier_verbose )attribute (block (expression_statement (call (identifier__print_tasks) identifier__print_tasks (argument_list (identifier_env) identifier_env (identifier_tasks) identifier_tasks (keyword_argument (identifier_mark_active) identifier_mark_active (True) True )keyword_argument )argument_list )call )expression_statement )block (else_clause (block (if_statement (attribute (attribute (identifier_env) identifier_env (identifier_task) identifier_task )attribute (identifier_active) identifier_active )attribute (block (expression_statement (assignment (identifier_active_task) identifier_active_task (attribute (attribute (identifier_env) identifier_env (identifier_task) identifier_task )attribute (identifier_name) identifier_name )attribute )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_active_task) identifier_active_task (None) None )assignment )expression_statement )block )else_clause )if_statement (for_statement (pattern_list (identifier_task) identifier_task (identifier_options) identifier_options (identifier_blocks) identifier_blocks )pattern_list (identifier_tasks) identifier_tasks (block (if_statement (comparison_operator (identifier_task) identifier_task (identifier_active_task) identifier_active_task )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_env) identifier_env (identifier_io) identifier_io )attribute (identifier_success) identifier_success )attribute (argument_list (binary_operator (identifier_task) identifier_task (string_' *') string_' *' )binary_operator )argument_list )call )expression_statement )block (else_clause (block (if_statement (boolean_operator (comparison_operator (identifier_options) identifier_options (None) None )comparison_operator (comparison_operator (identifier_blocks) identifier_blocks (None) None )comparison_operator )boolean_operator (block (expression_statement (call (attribute (attribute (identifier_env) identifier_env (identifier_io) identifier_io )attribute (identifier_error) identifier_error )attribute (argument_list (binary_operator (identifier_task) identifier_task (string_' ~') string_' ~' )binary_operator )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (attribute (identifier_env) identifier_env (identifier_io) identifier_io )attribute (identifier_write) identifier_write )attribute (argument_list (identifier_task) identifier_task )argument_list )call )expression_statement )block )else_clause )if_statement )block )else_clause )if_statement )block )for_statement )block )else_clause )if_statement )block )else_clause )if_statement )block )function_definition )module
Lists all valid tasks. `env` Runtime ``Environment`` instance. `args` Arguments object from arg parser.
(module (function_definition (function_name_track_event) function_name_track_event (parameters (identifier_self) identifier_self (identifier_name) identifier_name (default_parameter (identifier_properties) identifier_properties (None) None )default_parameter (default_parameter (identifier_measurements) identifier_measurements (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (attribute (identifier_channel) identifier_channel (identifier_contracts) identifier_contracts )attribute (identifier_EventData) identifier_EventData )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_data) identifier_data (identifier_name) identifier_name )attribute (boolean_operator (identifier_name) identifier_name (identifier_NULL_CONSTANT_STRING) identifier_NULL_CONSTANT_STRING )boolean_operator )assignment )expression_statement (if_statement (identifier_properties) identifier_properties (block (expression_statement (assignment (attribute (identifier_data) identifier_data (identifier_properties) identifier_properties )attribute (identifier_properties) identifier_properties )assignment )expression_statement )block )if_statement (if_statement (identifier_measurements) identifier_measurements (block (expression_statement (assignment (attribute (identifier_data) identifier_data (identifier_measurements) identifier_measurements )attribute (identifier_measurements) identifier_measurements )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_track) identifier_track )attribute (argument_list (identifier_data) identifier_data (attribute (identifier_self) identifier_self (identifier__context) identifier__context )attribute )argument_list )call )expression_statement )block )function_definition )module
Send information about a single event that has occurred in the context of the application. Args: name (str). the data to associate to this event.\n properties (dict). the set of custom properties the client wants attached to this data item. (defaults to: None)\n measurements (dict). the set of custom measurements the client wants to attach to this data item. (defaults to: None)
(module (function_definition (function_name_iter_predict) function_name_iter_predict (parameters (identifier_self) identifier_self (identifier_X) identifier_X (default_parameter (identifier_include_init) identifier_include_init (False) False )default_parameter )parameters (block (expression_statement (call (attribute (attribute (identifier_utils) identifier_utils (identifier_validation) identifier_validation )attribute (identifier_check_is_fitted) identifier_check_is_fitted )attribute (argument_list (identifier_self) identifier_self (string_'init_estimator_') string_'init_estimator_' )argument_list )call )expression_statement (expression_statement (assignment (identifier_X) identifier_X (call (attribute (identifier_utils) identifier_utils (identifier_check_array) identifier_check_array )attribute (argument_list (identifier_X) identifier_X (keyword_argument (identifier_accept_sparse) identifier_accept_sparse (list (string_'csr') string_'csr' (string_'csc') string_'csc' )list )keyword_argument (keyword_argument (identifier_dtype) identifier_dtype (None) None )keyword_argument (keyword_argument (identifier_force_all_finite) identifier_force_all_finite (False) False )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_y_pred) identifier_y_pred (call (attribute (attribute (identifier_self) identifier_self (identifier_init_estimator_) identifier_init_estimator_ )attribute (identifier_predict) identifier_predict )attribute (argument_list (identifier_X) identifier_X )argument_list )call )assignment )expression_statement (if_statement (identifier_include_init) identifier_include_init (block (expression_statement (yield (identifier_y_pred) identifier_y_pred )yield )expression_statement )block )if_statement (for_statement (pattern_list (identifier_estimators) identifier_estimators (identifier_line_searchers) identifier_line_searchers (identifier_cols) identifier_cols )pattern_list (call (attribute (identifier_itertools) identifier_itertools (identifier_zip_longest) identifier_zip_longest )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_estimators_) identifier_estimators_ )attribute (attribute (identifier_self) identifier_self (identifier_line_searchers_) identifier_line_searchers_ )attribute (attribute (identifier_self) identifier_self (identifier_columns_) identifier_columns_ )attribute )argument_list )call (block (for_statement (pattern_list (identifier_i) identifier_i (tuple_pattern (identifier_estimator) identifier_estimator (identifier_line_searcher) identifier_line_searcher )tuple_pattern )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (call (attribute (identifier_itertools) identifier_itertools (identifier_zip_longest) identifier_zip_longest )attribute (argument_list (identifier_estimators) identifier_estimators (boolean_operator (identifier_line_searchers) identifier_line_searchers (list )list )boolean_operator )argument_list )call )argument_list )call (block (if_statement (comparison_operator (identifier_cols) identifier_cols (None) None )comparison_operator (block (expression_statement (assignment (identifier_direction) identifier_direction (call (attribute (identifier_estimator) identifier_estimator (identifier_predict) identifier_predict )attribute (argument_list (identifier_X) identifier_X )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_direction) identifier_direction (call (attribute (identifier_estimator) identifier_estimator (identifier_predict) identifier_predict )attribute (argument_list (subscript (identifier_X) identifier_X (slice (colon) colon )slice (identifier_cols) identifier_cols )subscript )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (if_statement (identifier_line_searcher) identifier_line_searcher (block (expression_statement (assignment (identifier_direction) identifier_direction (call (attribute (identifier_line_searcher) identifier_line_searcher (identifier_update) identifier_update )attribute (argument_list (identifier_direction) identifier_direction )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (augmented_assignment (subscript (identifier_y_pred) identifier_y_pred (slice (colon) colon )slice (identifier_i) identifier_i )subscript (binary_operator (attribute (identifier_self) identifier_self (identifier_learning_rate) identifier_learning_rate )attribute (identifier_direction) identifier_direction )binary_operator )augmented_assignment )expression_statement )block )for_statement (expression_statement (yield (identifier_y_pred) identifier_y_pred )yield )expression_statement )block )for_statement )block )function_definition )module
Returns the predictions for ``X`` at every stage of the boosting procedure. Args: X (array-like or sparse matrix of shape (n_samples, n_features): The input samples. Sparse matrices are accepted only if they are supported by the weak model. include_init (bool, default=False): If ``True`` then the prediction from ``init_estimator`` will also be returned. Returns: iterator of arrays of shape (n_samples,) containing the predicted values at each stage
(module (function_definition (function_name_connect) function_name_connect (parameters (identifier_self) identifier_self (identifier_target) identifier_target (identifier_acceptor) identifier_acceptor (default_parameter (identifier_wrapper) identifier_wrapper (None) None )default_parameter )parameters (block (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_TCPTendrilManager) identifier_TCPTendrilManager (identifier_self) identifier_self )argument_list )call (identifier_connect) identifier_connect )attribute (argument_list (identifier_target) identifier_target (identifier_acceptor) identifier_acceptor (identifier_wrapper) identifier_wrapper )argument_list )call )expression_statement (expression_statement (assignment (identifier_sock) identifier_sock (call (attribute (identifier_socket) identifier_socket (identifier_socket) identifier_socket )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_addr_family) identifier_addr_family )attribute (attribute (identifier_socket) identifier_socket (identifier_SOCK_STREAM) identifier_SOCK_STREAM )attribute )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (call (attribute (identifier_utils) identifier_utils (identifier_SocketCloser) identifier_SocketCloser )attribute (argument_list (identifier_sock) identifier_sock (keyword_argument (identifier_ignore) identifier_ignore (list (attribute (identifier_application) identifier_application (identifier_RejectConnection) identifier_RejectConnection )attribute )list )keyword_argument )argument_list )call )with_item )with_clause (block (expression_statement (call (attribute (identifier_sock) identifier_sock (identifier_bind) identifier_bind )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_endpoint) identifier_endpoint )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_sock) identifier_sock (identifier_connect) identifier_connect )attribute (argument_list (identifier_target) identifier_target )argument_list )call )expression_statement (if_statement (identifier_wrapper) identifier_wrapper (block (expression_statement (assignment (identifier_sock) identifier_sock (call (identifier_wrapper) identifier_wrapper (argument_list (identifier_sock) identifier_sock )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_tend) identifier_tend (call (identifier_TCPTendril) identifier_TCPTendril (argument_list (identifier_self) identifier_self (identifier_sock) identifier_sock )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_tend) identifier_tend (identifier_application) identifier_application )attribute (call (identifier_acceptor) identifier_acceptor (argument_list (identifier_tend) identifier_tend )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__track_tendril) identifier__track_tendril )attribute (argument_list (identifier_tend) identifier_tend )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_tend) identifier_tend (identifier__start) identifier__start )attribute (argument_list )argument_list )call )expression_statement (return_statement (identifier_tend) identifier_tend )return_statement )block )with_statement (expression_statement (call (attribute (identifier_sock) identifier_sock (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (return_statement (None) None )return_statement )block )function_definition )module
Initiate a connection from the tendril manager's endpoint. Once the connection is completed, a TCPTendril object will be created and passed to the given acceptor. :param target: The target of the connection attempt. :param acceptor: A callable which will initialize the state of the new TCPTendril object. :param wrapper: A callable taking, as its first argument, a socket.socket object. The callable must return a valid proxy for the socket.socket object, which will subsequently be used to communicate on the connection. For passing extra arguments to the acceptor or the wrapper, see the ``TendrilPartial`` class; for chaining together multiple wrappers, see the ``WrapperChain`` class.
(module (function_definition (function_name_zipentry_chunk) function_name_zipentry_chunk (parameters (identifier_zipfile) identifier_zipfile (identifier_name) identifier_name (default_parameter (identifier_size) identifier_size (identifier__BUFFERING) identifier__BUFFERING )default_parameter )parameters (block (function_definition (function_name_chunks) function_name_chunks (parameters )parameters (block (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_zipfile) identifier_zipfile (identifier_open) identifier_open )attribute (argument_list (identifier_name) identifier_name )argument_list )call (as_pattern_target (identifier_fd) identifier_fd )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_buf) identifier_buf (call (attribute (identifier_fd) identifier_fd (identifier_read) identifier_read )attribute (argument_list (identifier_size) identifier_size )argument_list )call )assignment )expression_statement (while_statement (identifier_buf) identifier_buf (block (expression_statement (yield (identifier_buf) identifier_buf )yield )expression_statement (expression_statement (assignment (identifier_buf) identifier_buf (call (attribute (identifier_fd) identifier_fd (identifier_read) identifier_read )attribute (argument_list (identifier_size) identifier_size )argument_list )call )assignment )expression_statement )block )while_statement )block )with_statement )block )function_definition (return_statement (identifier_chunks) identifier_chunks )return_statement )block )function_definition )module
returns a generator function which when called will emit x-sized chunks of the named entry in the zipfile object
(module (function_definition (function_name_linspace2) function_name_linspace2 (parameters (identifier_a) identifier_a (identifier_b) identifier_b (identifier_n) identifier_n (default_parameter (identifier_dtype) identifier_dtype (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_a) identifier_a (subscript (call (identifier_linspace) identifier_linspace (argument_list (identifier_a) identifier_a (identifier_b) identifier_b (binary_operator (identifier_n) identifier_n (integer_1) integer_1 )binary_operator (keyword_argument (identifier_dtype) identifier_dtype (identifier_dtype) identifier_dtype )keyword_argument )argument_list )call (slice (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_a) identifier_a )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_diff01) identifier_diff01 (call (attribute (parenthesized_expression (binary_operator (parenthesized_expression (binary_operator (subscript (identifier_a) identifier_a (integer_1) integer_1 )subscript (subscript (identifier_a) identifier_a (integer_0) integer_0 )subscript )binary_operator )parenthesized_expression (integer_2) integer_2 )binary_operator )parenthesized_expression (identifier_astype) identifier_astype )attribute (argument_list (attribute (identifier_a) identifier_a (identifier_dtype) identifier_dtype )attribute )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_a) identifier_a (identifier_diff01) identifier_diff01 )augmented_assignment )expression_statement )block )if_statement (return_statement (identifier_a) identifier_a )return_statement )block )function_definition )module
similar to numpy.linspace but excluding the boundaries this is the normal numpy.linspace: >>> print linspace(0,1,5) [ 0. 0.25 0.5 0.75 1. ] and this gives excludes the boundaries: >>> print linspace2(0,1,5) [ 0.1 0.3 0.5 0.7 0.9]
(module (function_definition (function_name_as_subbundle) function_name_as_subbundle (parameters (identifier_cls) identifier_cls (default_parameter (identifier_name) identifier_name (None) None )default_parameter (default_parameter (identifier_title) identifier_title (None) None )default_parameter (default_parameter (identifier_title_plural) identifier_title_plural (None) None )default_parameter )parameters (block (return_statement (call (identifier_PromiseBundle) identifier_PromiseBundle (argument_list (identifier_cls) identifier_cls (keyword_argument (identifier_name) identifier_name (identifier_name) identifier_name )keyword_argument (keyword_argument (identifier_title) identifier_title (identifier_title) identifier_title )keyword_argument (keyword_argument (identifier_title_plural) identifier_title_plural (identifier_title_plural) identifier_title_plural )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Wraps the given bundle so that it can be lazily instantiated. :param name: The slug for this bundle. :param title: The verbose name for this bundle.
(module (function_definition (function_name__index_impl) function_name__index_impl (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_runs) identifier_runs (call (attribute (attribute (identifier_self) identifier_self (identifier__multiplexer) identifier__multiplexer )attribute (identifier_Runs) identifier_Runs )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (dictionary_comprehension (pair (identifier_run) identifier_run (dictionary )dictionary )pair (for_in_clause (identifier_run) identifier_run (identifier_runs) identifier_runs )for_in_clause )dictionary_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_mapping) identifier_mapping (call (attribute (attribute (identifier_self) identifier_self (identifier__multiplexer) identifier__multiplexer )attribute (identifier_PluginRunToTagToContent) identifier_PluginRunToTagToContent )attribute (argument_list (attribute (identifier_metadata) identifier_metadata (identifier_PLUGIN_NAME) identifier_PLUGIN_NAME )attribute )argument_list )call )assignment )expression_statement (for_statement (tuple_pattern (identifier_run) identifier_run (identifier_tag_to_content) identifier_tag_to_content )tuple_pattern (call (attribute (identifier_six) identifier_six (identifier_iteritems) identifier_iteritems )attribute (argument_list (identifier_mapping) identifier_mapping )argument_list )call (block (for_statement (identifier_tag) identifier_tag (identifier_tag_to_content) identifier_tag_to_content (block (expression_statement (assignment (identifier_summary_metadata) identifier_summary_metadata (call (attribute (attribute (identifier_self) identifier_self (identifier__multiplexer) identifier__multiplexer )attribute (identifier_SummaryMetadata) identifier_SummaryMetadata )attribute (argument_list (identifier_run) identifier_run (identifier_tag) identifier_tag )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tensor_events) identifier_tensor_events (call (attribute (attribute (identifier_self) identifier_self (identifier__multiplexer) identifier__multiplexer )attribute (identifier_Tensors) identifier_Tensors )attribute (argument_list (identifier_run) identifier_run (identifier_tag) identifier_tag )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_samples) identifier_samples (call (identifier_max) identifier_max (argument_list (binary_operator (list_comprehension (call (attribute (identifier_self) identifier_self (identifier__number_of_samples) identifier__number_of_samples )attribute (argument_list (attribute (identifier_event) identifier_event (identifier_tensor_proto) identifier_tensor_proto )attribute )argument_list )call (for_in_clause (identifier_event) identifier_event (identifier_tensor_events) identifier_tensor_events )for_in_clause )list_comprehension (list (integer_0) integer_0 )list )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (subscript (identifier_result) identifier_result (identifier_run) identifier_run )subscript (identifier_tag) identifier_tag )subscript (dictionary (pair (string_'displayName') string_'displayName' (attribute (identifier_summary_metadata) identifier_summary_metadata (identifier_display_name) identifier_display_name )attribute )pair (pair (string_'description') string_'description' (call (attribute (identifier_plugin_util) identifier_plugin_util (identifier_markdown_to_safe_html) identifier_markdown_to_safe_html )attribute (argument_list (attribute (identifier_summary_metadata) identifier_summary_metadata (identifier_summary_description) identifier_summary_description )attribute )argument_list )call )pair (pair (string_'samples') string_'samples' (identifier_samples) identifier_samples )pair )dictionary )assignment )expression_statement )block )for_statement )block )for_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Return information about the tags in each run. Result is a dictionary of the form { "runName1": { "tagName1": { "displayName": "The first tag", "description": "<p>Long ago there was just one tag...</p>", "samples": 3 }, "tagName2": ..., ... }, "runName2": ..., ... } For each tag, `samples` is the greatest number of audio clips that appear at any particular step. (It's not related to "samples of a waveform.") For example, if for tag `minibatch_input` there are five audio clips at step 0 and ten audio clips at step 1, then the dictionary for `"minibatch_input"` will contain `"samples": 10`.
(module (function_definition (function_name_generate_cutJ_genomic_CDR3_segs) function_name_generate_cutJ_genomic_CDR3_segs (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_max_palindrome) identifier_max_palindrome (attribute (identifier_self) identifier_self (identifier_max_delJ_palindrome) identifier_max_delJ_palindrome )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_cutJ_genomic_CDR3_segs) identifier_cutJ_genomic_CDR3_segs )attribute (list )list )assignment )expression_statement (for_statement (identifier_CDR3_J_seg) identifier_CDR3_J_seg (list_comprehension (subscript (identifier_x) identifier_x (integer_1) integer_1 )subscript (for_in_clause (identifier_x) identifier_x (attribute (identifier_self) identifier_self (identifier_genJ) identifier_genJ )attribute )for_in_clause )list_comprehension (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_CDR3_J_seg) identifier_CDR3_J_seg )argument_list )call (identifier_max_palindrome) identifier_max_palindrome )comparison_operator (block (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_cutJ_genomic_CDR3_segs) identifier_cutJ_genomic_CDR3_segs )attribute (list (call (identifier_cutL_seq) identifier_cutL_seq (argument_list (identifier_CDR3_J_seg) identifier_CDR3_J_seg (integer_0) integer_0 (call (identifier_len) identifier_len (argument_list (identifier_CDR3_J_seg) identifier_CDR3_J_seg )argument_list )call )argument_list )call )list )augmented_assignment )expression_statement )block (else_clause (block (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_cutJ_genomic_CDR3_segs) identifier_cutJ_genomic_CDR3_segs )attribute (list (call (identifier_cutL_seq) identifier_cutL_seq (argument_list (identifier_CDR3_J_seg) identifier_CDR3_J_seg (integer_0) integer_0 (identifier_max_palindrome) identifier_max_palindrome )argument_list )call )list )augmented_assignment )expression_statement )block )else_clause )if_statement )block )for_statement )block )function_definition )module
Add palindromic inserted nucleotides to germline J sequences. The maximum number of palindromic insertions are appended to the germline J segments so that delJ can index directly for number of nucleotides to delete from a segment. Sets the attribute cutJ_genomic_CDR3_segs.
(module (function_definition (function_name___standardize_result) function_name___standardize_result (parameters (identifier_status) identifier_status (identifier_message) identifier_message (default_parameter (identifier_data) identifier_data (None) None )default_parameter (default_parameter (identifier_debug_msg) identifier_debug_msg (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_result) identifier_result (dictionary (pair (string_'status') string_'status' (identifier_status) identifier_status )pair (pair (string_'message') string_'message' (identifier_message) identifier_message )pair )dictionary )assignment )expression_statement (if_statement (comparison_operator (identifier_data) identifier_data (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_result) identifier_result (string_'return') string_'return' )subscript (identifier_data) identifier_data )assignment )expression_statement )block )if_statement (if_statement (boolean_operator (comparison_operator (identifier_debug_msg) identifier_debug_msg (None) None )comparison_operator (identifier_debug) identifier_debug )boolean_operator (block (expression_statement (assignment (subscript (identifier_result) identifier_result (string_'debug') string_'debug' )subscript (identifier_debug_msg) identifier_debug_msg )assignment )expression_statement )block )if_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Standardizes all responses :param status: :param message: :param data: :param debug_msg: :return:
(module (function_definition (function_name_srem) function_name_srem (parameters (identifier_self) identifier_self (identifier_key) identifier_key (list_splat_pattern (identifier_values) identifier_values )list_splat_pattern )parameters (block (expression_statement (assignment (identifier_redis_set) identifier_redis_set (call (attribute (identifier_self) identifier_self (identifier__get_set) identifier__get_set )attribute (argument_list (identifier_key) identifier_key (string_'SREM') string_'SREM' )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_redis_set) identifier_redis_set )not_operator (block (return_statement (integer_0) integer_0 )return_statement )block )if_statement (expression_statement (assignment (identifier_before_count) identifier_before_count (call (identifier_len) identifier_len (argument_list (identifier_redis_set) identifier_redis_set )argument_list )call )assignment )expression_statement (for_statement (identifier_value) identifier_value (identifier_values) identifier_values (block (expression_statement (call (attribute (identifier_redis_set) identifier_redis_set (identifier_discard) identifier_discard )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier__encode) identifier__encode )attribute (argument_list (identifier_value) identifier_value )argument_list )call )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier_after_count) identifier_after_count (call (identifier_len) identifier_len (argument_list (identifier_redis_set) identifier_redis_set )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_before_count) identifier_before_count (integer_0) integer_0 )comparison_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_redis_set) identifier_redis_set )argument_list )call (integer_0) integer_0 )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_delete) identifier_delete )attribute (argument_list (identifier_key) identifier_key )argument_list )call )expression_statement )block )if_statement (return_statement (binary_operator (identifier_before_count) identifier_before_count (identifier_after_count) identifier_after_count )binary_operator )return_statement )block )function_definition )module
Emulate srem.
(module (function_definition (function_name_a_not_committed) function_name_a_not_committed (parameters (identifier_ctx) identifier_ctx )parameters (block (expression_statement (call (attribute (attribute (identifier_ctx) identifier_ctx (identifier_ctrl) identifier_ctrl )attribute (identifier_sendline) identifier_sendline )attribute (argument_list (string_'n') string_'n' )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_ctx) identifier_ctx (identifier_msg) identifier_msg )attribute (string_"Some active software packages are not yet committed. Reload may cause software rollback.") string_"Some active software packages are not yet committed. Reload may cause software rollback." )assignment )expression_statement (expression_statement (call (attribute (attribute (attribute (attribute (identifier_ctx) identifier_ctx (identifier_device) identifier_device )attribute (identifier_chain) identifier_chain )attribute (identifier_connection) identifier_connection )attribute (identifier_emit_message) identifier_emit_message )attribute (argument_list (attribute (identifier_ctx) identifier_ctx (identifier_msg) identifier_msg )attribute (keyword_argument (identifier_log_level) identifier_log_level (attribute (identifier_logging) identifier_logging (identifier_ERROR) identifier_ERROR )attribute )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_ctx) identifier_ctx (identifier_failed) identifier_failed )attribute (True) True )assignment )expression_statement (return_statement (False) False )return_statement )block )function_definition )module
Provide the message that current software is not committed and reload is not possible.
(module (function_definition (function_name_certify_required) function_name_certify_required (parameters (identifier_value) identifier_value (default_parameter (identifier_required) identifier_required (False) False )default_parameter )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_required) identifier_required (identifier_bool) identifier_bool )argument_list )call )not_operator (block (raise_statement (call (identifier_CertifierParamError) identifier_CertifierParamError (argument_list (string_'required') string_'required' (identifier_required) identifier_required )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_value) identifier_value (None) None )comparison_operator (block (if_statement (identifier_required) identifier_required (block (raise_statement (call (identifier_CertifierValueError) identifier_CertifierValueError (argument_list (keyword_argument (identifier_message) identifier_message (string_"required value is None") string_"required value is None" )keyword_argument )argument_list )call )raise_statement )block )if_statement (return_statement (True) True )return_statement )block )if_statement )block )function_definition )module
Certify that a value is present if required. :param object value: The value that is to be certified. :param bool required: Is the value required? :raises CertifierValueError: Required value is `None`.
(module (function_definition (function_name_t_coords) function_name_t_coords (parameters (identifier_self) identifier_self (identifier_t_coords) identifier_t_coords )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_t_coords) identifier_t_coords (attribute (identifier_np) identifier_np (identifier_ndarray) identifier_ndarray )attribute )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_'Texture coordinates must be a numpy array') string_'Texture coordinates must be a numpy array' )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_t_coords) identifier_t_coords (identifier_ndim) identifier_ndim )attribute (integer_2) integer_2 )comparison_operator (block (raise_statement (call (identifier_AssertionError) identifier_AssertionError (argument_list (string_'Texture coordinates must be a 2-dimensional array') string_'Texture coordinates must be a 2-dimensional array' )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (subscript (attribute (identifier_t_coords) identifier_t_coords (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript (attribute (identifier_self) identifier_self (identifier_n_points) identifier_n_points )attribute )comparison_operator (block (raise_statement (call (identifier_AssertionError) identifier_AssertionError (argument_list (call (attribute (string_'Number of texture coordinates ({}) must match number of points ({})') string_'Number of texture coordinates ({}) must match number of points ({})' (identifier_format) identifier_format )attribute (argument_list (subscript (attribute (identifier_t_coords) identifier_t_coords (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript (attribute (identifier_self) identifier_self (identifier_n_points) identifier_n_points )attribute )argument_list )call )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (subscript (attribute (identifier_t_coords) identifier_t_coords (identifier_shape) identifier_shape )attribute (integer_1) integer_1 )subscript (integer_2) integer_2 )comparison_operator (block (raise_statement (call (identifier_AssertionError) identifier_AssertionError (argument_list (call (attribute (string_'Texture coordinates must only have 2 components, not ({})') string_'Texture coordinates must only have 2 components, not ({})' (identifier_format) identifier_format )attribute (argument_list (subscript (attribute (identifier_t_coords) identifier_t_coords (identifier_shape) identifier_shape )attribute (integer_1) integer_1 )subscript )argument_list )call )argument_list )call )raise_statement )block )if_statement (if_statement (boolean_operator (comparison_operator (call (attribute (identifier_np) identifier_np (identifier_min) identifier_min )attribute (argument_list (identifier_t_coords) identifier_t_coords )argument_list )call (float_0.0) float_0.0 )comparison_operator (comparison_operator (call (attribute (identifier_np) identifier_np (identifier_max) identifier_max )attribute (argument_list (identifier_t_coords) identifier_t_coords )argument_list )call (float_1.0) float_1.0 )comparison_operator )boolean_operator (block (raise_statement (call (identifier_AssertionError) identifier_AssertionError (argument_list (string_'Texture coordinates must be within (0, 1) range.') string_'Texture coordinates must be within (0, 1) range.' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_vtkarr) identifier_vtkarr (call (identifier_numpy_to_vtk) identifier_numpy_to_vtk (argument_list (identifier_t_coords) identifier_t_coords )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_vtkarr) identifier_vtkarr (identifier_SetName) identifier_SetName )attribute (argument_list (string_'Texture Coordinates') string_'Texture Coordinates' )argument_list )call )expression_statement (expression_statement (call (attribute (call (attribute (identifier_self) identifier_self (identifier_GetPointData) identifier_GetPointData )attribute (argument_list )argument_list )call (identifier_SetTCoords) identifier_SetTCoords )attribute (argument_list (identifier_vtkarr) identifier_vtkarr )argument_list )call )expression_statement (expression_statement (call (attribute (call (attribute (identifier_self) identifier_self (identifier_GetPointData) identifier_GetPointData )attribute (argument_list )argument_list )call (identifier_Modified) identifier_Modified )attribute (argument_list )argument_list )call )expression_statement (return_statement )return_statement )block )function_definition )module
Set the array to use as the texture coordinates
(module (function_definition (function_name_makedirs) function_name_makedirs (parameters (identifier_self) identifier_self (identifier_path) identifier_path (default_parameter (identifier_mode) identifier_mode (integer_0o700) integer_0o700 )default_parameter )parameters (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_makedirs) identifier_makedirs )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__archive_root) identifier__archive_root )attribute (identifier_path) identifier_path )argument_list )call (keyword_argument (identifier_mode) identifier_mode (identifier_mode) identifier_mode )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_log_debug) identifier_log_debug )attribute (argument_list (binary_operator (string_"created directory at '%s' in FileCacheArchive '%s'") string_"created directory at '%s' in FileCacheArchive '%s'" (tuple (identifier_path) identifier_path (attribute (identifier_self) identifier_self (identifier__archive_root) identifier__archive_root )attribute )tuple )binary_operator )argument_list )call )expression_statement )block )function_definition )module
Create path, including leading components. Used by sos.sosreport to set up sos_* directories.
(module (function_definition (function_name__can) function_name__can (parameters (identifier_self) identifier_self (identifier_func_name) identifier_func_name (default_parameter (identifier_qualifier_id) identifier_qualifier_id (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_function_id) identifier_function_id (call (attribute (identifier_self) identifier_self (identifier__get_function_id) identifier__get_function_id )attribute (argument_list (identifier_func_name) identifier_func_name )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_qualifier_id) identifier_qualifier_id (None) None )comparison_operator (block (expression_statement (assignment (identifier_qualifier_id) identifier_qualifier_id (attribute (identifier_self) identifier_self (identifier__qualifier_id) identifier__qualifier_id )attribute )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_agent_id) identifier_agent_id (call (attribute (identifier_self) identifier_self (identifier_get_effective_agent_id) identifier_get_effective_agent_id )attribute (argument_list )argument_list )call )assignment )expression_statement (try_statement (block (return_statement (subscript (attribute (identifier_self) identifier_self (identifier__authz_cache) identifier__authz_cache )attribute (binary_operator (binary_operator (call (identifier_str) identifier_str (argument_list (identifier_agent_id) identifier_agent_id )argument_list )call (call (identifier_str) identifier_str (argument_list (identifier_function_id) identifier_function_id )argument_list )call )binary_operator (call (identifier_str) identifier_str (argument_list (identifier_qualifier_id) identifier_qualifier_id )argument_list )call )binary_operator )subscript )return_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (assignment (identifier_authz) identifier_authz (call (attribute (attribute (identifier_self) identifier_self (identifier__authz_session) identifier__authz_session )attribute (identifier_is_authorized) identifier_is_authorized )attribute (argument_list (keyword_argument (identifier_agent_id) identifier_agent_id (identifier_agent_id) identifier_agent_id )keyword_argument (keyword_argument (identifier_function_id) identifier_function_id (identifier_function_id) identifier_function_id )keyword_argument (keyword_argument (identifier_qualifier_id) identifier_qualifier_id (identifier_qualifier_id) identifier_qualifier_id )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__authz_cache) identifier__authz_cache )attribute (binary_operator (binary_operator (call (identifier_str) identifier_str (argument_list (identifier_agent_id) identifier_agent_id )argument_list )call (call (identifier_str) identifier_str (argument_list (identifier_function_id) identifier_function_id )argument_list )call )binary_operator (call (identifier_str) identifier_str (argument_list (identifier_qualifier_id) identifier_qualifier_id )argument_list )call )binary_operator )subscript (identifier_authz) identifier_authz )assignment )expression_statement (return_statement (identifier_authz) identifier_authz )return_statement )block )except_clause )try_statement )block )function_definition )module
Tests if the named function is authorized with agent and qualifier. Also, caches authz's in a dict. It is expected that this will not grow to big, as there are typically only a small number of qualifier + function combinations to store for the agent. However, if this becomes an issue, we can switch to something like cachetools.
(module (function_definition (function_name_select_area) function_name_select_area (parameters (identifier_self) identifier_self (identifier_area_uuid) identifier_area_uuid )parameters (block (expression_statement (assignment (attribute (attribute (attribute (identifier_self) identifier_self (identifier__config) identifier__config )attribute (identifier_upload) identifier_upload )attribute (identifier_current_area) identifier_current_area )attribute (identifier_area_uuid) identifier_area_uuid )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_save) identifier_save )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Update the "current area" to be the area with this UUID. :param str area_uuid: The RFC4122-compliant UUID of the Upload Area.
(module (function_definition (function_name_filter_spent_outputs) function_name_filter_spent_outputs (parameters (identifier_self) identifier_self (identifier_outputs) identifier_outputs )parameters (block (expression_statement (assignment (identifier_links) identifier_links (list_comprehension (call (attribute (identifier_o) identifier_o (identifier_to_dict) identifier_to_dict )attribute (argument_list )argument_list )call (for_in_clause (identifier_o) identifier_o (identifier_outputs) identifier_outputs )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_txs) identifier_txs (call (identifier_list) identifier_list (argument_list (call (attribute (identifier_query) identifier_query (identifier_get_spending_transactions) identifier_get_spending_transactions )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_connection) identifier_connection )attribute (identifier_links) identifier_links )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_spends) identifier_spends (set_comprehension (call (attribute (identifier_TransactionLink) identifier_TransactionLink (identifier_from_dict) identifier_from_dict )attribute (argument_list (subscript (identifier_input_) identifier_input_ (string_'fulfills') string_'fulfills' )subscript )argument_list )call (for_in_clause (identifier_tx) identifier_tx (identifier_txs) identifier_txs )for_in_clause (for_in_clause (identifier_input_) identifier_input_ (subscript (identifier_tx) identifier_tx (string_'inputs') string_'inputs' )subscript )for_in_clause )set_comprehension )assignment )expression_statement (return_statement (list_comprehension (identifier_ff) identifier_ff (for_in_clause (identifier_ff) identifier_ff (identifier_outputs) identifier_outputs )for_in_clause (if_clause (comparison_operator (identifier_ff) identifier_ff (identifier_spends) identifier_spends )comparison_operator )if_clause )list_comprehension )return_statement )block )function_definition )module
Remove outputs that have been spent Args: outputs: list of TransactionLink
(module (function_definition (function_name_Description) function_name_Description (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_descr) identifier_descr (call (attribute (string_" ") string_" " (identifier_join) identifier_join )attribute (argument_list (tuple (call (attribute (identifier_self) identifier_self (identifier_getId) identifier_getId )attribute (argument_list )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier_aq_parent) identifier_aq_parent )attribute (identifier_Title) identifier_Title )attribute (argument_list )argument_list )call )tuple )argument_list )call )assignment )expression_statement (return_statement (call (attribute (call (identifier_safe_unicode) identifier_safe_unicode (argument_list (identifier_descr) identifier_descr )argument_list )call (identifier_encode) identifier_encode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call )return_statement )block )function_definition )module
Returns searchable data as Description
(module (function_definition (function_name_div_safe) function_name_div_safe (parameters (identifier_numerator) identifier_numerator (identifier_denominator) identifier_denominator )parameters (block (if_statement (call (attribute (identifier_np) identifier_np (identifier_isscalar) identifier_isscalar )attribute (argument_list (identifier_numerator) identifier_numerator )argument_list )call (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"div_safe should only be used with an array-like numerator") string_"div_safe should only be used with an array-like numerator" )argument_list )call )raise_statement )block )if_statement (try_statement (block (with_statement (with_clause (with_item (call (attribute (identifier_np) identifier_np (identifier_errstate) identifier_errstate )attribute (argument_list (keyword_argument (identifier_divide) identifier_divide (string_'ignore') string_'ignore' )keyword_argument (keyword_argument (identifier_invalid) identifier_invalid (string_'ignore') string_'ignore' )keyword_argument )argument_list )call )with_item )with_clause (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_np) identifier_np (identifier_true_divide) identifier_true_divide )attribute (argument_list (identifier_numerator) identifier_numerator (identifier_denominator) identifier_denominator )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_result) identifier_result (unary_operator (call (attribute (identifier_np) identifier_np (identifier_isfinite) identifier_isfinite )attribute (argument_list (identifier_result) identifier_result )argument_list )call )unary_operator )subscript (integer_0) integer_0 )assignment )expression_statement )block )with_statement (return_statement (identifier_result) identifier_result )return_statement )block (except_clause (as_pattern (identifier_ValueError) identifier_ValueError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (raise_statement (identifier_e) identifier_e )raise_statement )block )except_clause )try_statement )block )function_definition )module
Ufunc-extension that returns 0 instead of nan when dividing numpy arrays Parameters ---------- numerator: array-like denominator: scalar or array-like that can be validly divided by the numerator returns a numpy array example: div_safe( [-1, 0, 1], 0 ) == [0, 0, 0]
(module (function_definition (function_name__try_instantiate) function_name__try_instantiate (parameters (identifier_self) identifier_self (identifier_ipopo) identifier_ipopo (identifier_factory) identifier_factory (identifier_component) identifier_component )parameters (block (try_statement (block (with_statement (with_clause (with_item (attribute (identifier_self) identifier_self (identifier___lock) identifier___lock )attribute )with_item )with_clause (block (expression_statement (assignment (identifier_properties) identifier_properties (subscript (subscript (attribute (identifier_self) identifier_self (identifier___queue) identifier___queue )attribute (identifier_factory) identifier_factory )subscript (identifier_component) identifier_component )subscript )assignment )expression_statement )block )with_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (return_statement )return_statement )block )except_clause (else_clause (block (try_statement (block (expression_statement (call (attribute (identifier_ipopo) identifier_ipopo (identifier_instantiate) identifier_instantiate )attribute (argument_list (identifier_factory) identifier_factory (identifier_component) identifier_component (identifier_properties) identifier_properties )argument_list )call )expression_statement )block (except_clause (identifier_TypeError) identifier_TypeError (block (pass_statement )pass_statement )block )except_clause (except_clause (as_pattern (identifier_ValueError) identifier_ValueError (as_pattern_target (identifier_ex) identifier_ex )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier__logger) identifier__logger (identifier_error) identifier_error )attribute (argument_list (string_"Component already running: %s") string_"Component already running: %s" (identifier_ex) identifier_ex )argument_list )call )expression_statement )block )except_clause (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_ex) identifier_ex )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier__logger) identifier__logger (identifier_exception) identifier_exception )attribute (argument_list (string_"Error instantiating component: %s") string_"Error instantiating component: %s" (identifier_ex) identifier_ex )argument_list )call )expression_statement )block )except_clause )try_statement )block )else_clause )try_statement )block )function_definition )module
Tries to instantiate a component from the queue. Hides all exceptions. :param ipopo: The iPOPO service :param factory: Component factory :param component: Component name
(module (function_definition (function_name_generate_schedule) function_name_generate_schedule (parameters (default_parameter (identifier_today) identifier_today (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_schedule_days) identifier_schedule_days (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_seen_items) identifier_seen_items (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_slot) identifier_slot (call (attribute (call (attribute (attribute (identifier_Slot) identifier_Slot (identifier_objects) identifier_objects )attribute (identifier_all) identifier_all )attribute (argument_list )argument_list )call (identifier_order_by) identifier_order_by )attribute (argument_list (string_'end_time') string_'end_time' (string_'start_time') string_'start_time' (string_'day') string_'day' )argument_list )call (block (expression_statement (assignment (identifier_day) identifier_day (call (attribute (identifier_slot) identifier_slot (identifier_get_day) identifier_get_day )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_today) identifier_today (comparison_operator (identifier_day) identifier_day (identifier_today) identifier_today )comparison_operator )boolean_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_schedule_day) identifier_schedule_day (call (attribute (identifier_schedule_days) identifier_schedule_days (identifier_get) identifier_get )attribute (argument_list (identifier_day) identifier_day )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_schedule_day) identifier_schedule_day (None) None )comparison_operator (block (expression_statement (assignment (identifier_schedule_day) identifier_schedule_day (assignment (subscript (identifier_schedule_days) identifier_schedule_days (identifier_day) identifier_day )subscript (call (identifier_ScheduleDay) identifier_ScheduleDay (argument_list (identifier_day) identifier_day )argument_list )call )assignment )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_row) identifier_row (call (identifier_make_schedule_row) identifier_make_schedule_row (argument_list (identifier_schedule_day) identifier_schedule_day (identifier_slot) identifier_slot (identifier_seen_items) identifier_seen_items )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_schedule_day) identifier_schedule_day (identifier_rows) identifier_rows )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_row) identifier_row )argument_list )call )expression_statement )block )for_statement (return_statement (call (identifier_sorted) identifier_sorted (argument_list (call (attribute (identifier_schedule_days) identifier_schedule_days (identifier_values) identifier_values )attribute (argument_list )argument_list )call (keyword_argument (identifier_key) identifier_key (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (attribute (attribute (identifier_x) identifier_x (identifier_day) identifier_day )attribute (identifier_date) identifier_date )attribute )lambda )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Helper function which creates an ordered list of schedule days
(module (function_definition (function_name_value_from_datadict) function_name_value_from_datadict (parameters (identifier_self) identifier_self (identifier_data) identifier_data (identifier_files) identifier_files (identifier_name) identifier_name )parameters (block (expression_statement (assignment (identifier_upload) identifier_upload (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_StickyUploadWidget) identifier_StickyUploadWidget (identifier_self) identifier_self )argument_list )call (identifier_value_from_datadict) identifier_value_from_datadict )attribute (argument_list (identifier_data) identifier_data (identifier_files) identifier_files (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_upload) identifier_upload (None) None )comparison_operator (block (return_statement (identifier_upload) identifier_upload )return_statement )block (else_clause (block (expression_statement (assignment (identifier_hidden_name) identifier_hidden_name (call (attribute (identifier_self) identifier_self (identifier_get_hidden_name) identifier_get_hidden_name )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_value) identifier_value (call (attribute (identifier_data) identifier_data (identifier_get) identifier_get )attribute (argument_list (identifier_hidden_name) identifier_hidden_name (None) None )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_value) identifier_value (None) None )comparison_operator (block (expression_statement (assignment (identifier_upload) identifier_upload (call (identifier_open_stored_file) identifier_open_stored_file (argument_list (identifier_value) identifier_value (attribute (identifier_self) identifier_self (identifier_url) identifier_url )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_upload) identifier_upload (None) None )comparison_operator (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_upload) identifier_upload (string_'_seralized_location') string_'_seralized_location' (identifier_value) identifier_value )argument_list )call )expression_statement )block )if_statement )block )if_statement )block )else_clause )if_statement (return_statement (identifier_upload) identifier_upload )return_statement )block )function_definition )module
Returns uploaded file from serialized value.
(module (function_definition (function_name__insert_data) function_name__insert_data (parameters (identifier_self) identifier_self (identifier_connection) identifier_connection (identifier_name) identifier_name (identifier_value) identifier_value (identifier_timestamp) identifier_timestamp (identifier_interval) identifier_interval (identifier_config) identifier_config )parameters (block (expression_statement (assignment (identifier_cursor) identifier_cursor (call (attribute (identifier_connection) identifier_connection (identifier_cursor) identifier_cursor )attribute (argument_list )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_stmt) identifier_stmt (call (attribute (identifier_self) identifier_self (identifier__insert_stmt) identifier__insert_stmt )attribute (argument_list (identifier_name) identifier_name (identifier_value) identifier_value (identifier_timestamp) identifier_timestamp (identifier_interval) identifier_interval (identifier_config) identifier_config )argument_list )call )assignment )expression_statement (if_statement (identifier_stmt) identifier_stmt (block (expression_statement (call (attribute (identifier_cursor) identifier_cursor (identifier_execute) identifier_execute )attribute (argument_list (identifier_stmt) identifier_stmt )argument_list )call )expression_statement )block )if_statement )block (finally_clause (block (expression_statement (call (attribute (identifier_cursor) identifier_cursor (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )finally_clause )try_statement )block )function_definition )module
Helper to insert data into cql.
(module (function_definition (function_name_add_atmost) function_name_add_atmost (parameters (identifier_self) identifier_self (identifier_lits) identifier_lits (identifier_k) identifier_k (default_parameter (identifier_no_return) identifier_no_return (True) True )default_parameter )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_minicard) identifier_minicard )attribute (block (expression_statement (assignment (identifier_res) identifier_res (call (attribute (identifier_pysolvers) identifier_pysolvers (identifier_minicard_add_am) identifier_minicard_add_am )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_minicard) identifier_minicard )attribute (identifier_lits) identifier_lits (identifier_k) identifier_k )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_res) identifier_res (False) False )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_status) identifier_status )attribute (False) False )assignment )expression_statement )block )if_statement (if_statement (not_operator (identifier_no_return) identifier_no_return )not_operator (block (return_statement (identifier_res) identifier_res )return_statement )block )if_statement )block )if_statement )block )function_definition )module
Add a new atmost constraint to solver's internal formula.
(module (function_definition (function_name_diff) function_name_diff (parameters (identifier_self) identifier_self (typed_parameter (identifier_sym) identifier_sym (type (identifier_Symbol) identifier_Symbol )type )typed_parameter (typed_default_parameter (identifier_n) identifier_n (type (identifier_int) identifier_int )type (integer_1) integer_1 )typed_default_parameter (typed_default_parameter (identifier_expand_simplify) identifier_expand_simplify (type (identifier_bool) identifier_bool )type (True) True )typed_default_parameter )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_sym) identifier_sym (attribute (identifier_sympy) identifier_sympy (identifier_Basic) identifier_Basic )attribute )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (binary_operator (string_"%s needs to be a Sympy symbol") string_"%s needs to be a Sympy symbol" (identifier_sym) identifier_sym )binary_operator )argument_list )call )raise_statement )block )if_statement (if_statement (call (attribute (attribute (identifier_sym) identifier_sym (identifier_free_symbols) identifier_free_symbols )attribute (identifier_issubset) identifier_issubset )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_free_symbols) identifier_free_symbols )attribute )argument_list )call (block (expression_statement (assignment (identifier_deriv) identifier_deriv (call (attribute (identifier_QuantumDerivative) identifier_QuantumDerivative (identifier_create) identifier_create )attribute (argument_list (identifier_self) identifier_self (keyword_argument (identifier_derivs) identifier_derivs (dictionary (pair (identifier_sym) identifier_sym (identifier_n) identifier_n )pair )dictionary )keyword_argument (keyword_argument (identifier_vals) identifier_vals (None) None )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (not_operator (attribute (identifier_deriv) identifier_deriv (identifier_is_zero) identifier_is_zero )attribute )not_operator (identifier_expand_simplify) identifier_expand_simplify )boolean_operator (block (expression_statement (assignment (identifier_deriv) identifier_deriv (call (attribute (call (attribute (identifier_deriv) identifier_deriv (identifier_expand) identifier_expand )attribute (argument_list )argument_list )call (identifier_simplify_scalar) identifier_simplify_scalar )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_deriv) identifier_deriv )return_statement )block (else_clause (block (return_statement (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier__zero) identifier__zero )attribute )return_statement )block )else_clause )if_statement )block )function_definition )module
Differentiate by scalar parameter `sym`. Args: sym: What to differentiate by. n: How often to differentiate expand_simplify: Whether to simplify the result. Returns: The n-th derivative.
(module (function_definition (function_name__StopStatusUpdateThread) function_name__StopStatusUpdateThread (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__status_update_active) identifier__status_update_active )attribute (False) False )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__status_update_thread) identifier__status_update_thread )attribute (identifier_isAlive) identifier_isAlive )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__status_update_thread) identifier__status_update_thread )attribute (identifier_join) identifier_join )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__status_update_thread) identifier__status_update_thread )attribute (None) None )assignment )expression_statement )block )function_definition )module
Stops the status update thread.
(module (function_definition (function_name_showPopup) function_name_showPopup (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_as_dialog) identifier_as_dialog (call (attribute (identifier_QApplication) identifier_QApplication (identifier_keyboardModifiers) identifier_keyboardModifiers )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_anchor) identifier_anchor (call (attribute (identifier_self) identifier_self (identifier_defaultAnchor) identifier_defaultAnchor )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (identifier_anchor) identifier_anchor (block (expression_statement (call (attribute (call (attribute (identifier_self) identifier_self (identifier_popupWidget) identifier_popupWidget )attribute (argument_list )argument_list )call (identifier_setAnchor) identifier_setAnchor )attribute (argument_list (identifier_anchor) identifier_anchor )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_anchor) identifier_anchor (call (attribute (call (attribute (identifier_self) identifier_self (identifier_popupWidget) identifier_popupWidget )attribute (argument_list )argument_list )call (identifier_anchor) identifier_anchor )attribute (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (if_statement (parenthesized_expression (binary_operator (identifier_anchor) identifier_anchor (parenthesized_expression (binary_operator (binary_operator (attribute (attribute (identifier_XPopupWidget) identifier_XPopupWidget (identifier_Anchor) identifier_Anchor )attribute (identifier_BottomLeft) identifier_BottomLeft )attribute (attribute (attribute (identifier_XPopupWidget) identifier_XPopupWidget (identifier_Anchor) identifier_Anchor )attribute (identifier_BottomCenter) identifier_BottomCenter )attribute )binary_operator (attribute (attribute (identifier_XPopupWidget) identifier_XPopupWidget (identifier_Anchor) identifier_Anchor )attribute (identifier_BottomRight) identifier_BottomRight )attribute )binary_operator )parenthesized_expression )binary_operator )parenthesized_expression (block (expression_statement (assignment (identifier_pos) identifier_pos (call (identifier_QPoint) identifier_QPoint (argument_list (binary_operator (call (attribute (identifier_self) identifier_self (identifier_width) identifier_width )attribute (argument_list )argument_list )call (integer_2) integer_2 )binary_operator (integer_0) integer_0 )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_pos) identifier_pos (call (identifier_QPoint) identifier_QPoint (argument_list (binary_operator (call (attribute (identifier_self) identifier_self (identifier_width) identifier_width )attribute (argument_list )argument_list )call (integer_2) integer_2 )binary_operator (call (attribute (identifier_self) identifier_self (identifier_height) identifier_height )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_pos) identifier_pos (call (attribute (identifier_self) identifier_self (identifier_mapToGlobal) identifier_mapToGlobal )attribute (argument_list (identifier_pos) identifier_pos )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier_signalsBlocked) identifier_signalsBlocked )attribute (argument_list )argument_list )call )not_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_popupAboutToShow) identifier_popupAboutToShow )attribute (identifier_emit) identifier_emit )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__popupWidget) identifier__popupWidget )attribute (identifier_popup) identifier_popup )attribute (argument_list (identifier_pos) identifier_pos )argument_list )call )expression_statement (if_statement (identifier_as_dialog) identifier_as_dialog (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__popupWidget) identifier__popupWidget )attribute (identifier_setCurrentMode) identifier_setCurrentMode )attribute (argument_list (attribute (attribute (identifier_XPopupWidget) identifier_XPopupWidget (identifier_Mode) identifier_Mode )attribute (identifier_Dialog) identifier_Dialog )attribute )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Shows the popup for this button.
(module (function_definition (function_name_restart) function_name_restart (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_initGrid) identifier_initGrid )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_win) identifier_win )attribute (identifier_clear) identifier_clear )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_current_gen) identifier_current_gen )attribute (integer_1) integer_1 )assignment )expression_statement (expression_statement (attribute (identifier_self) identifier_self (identifier_start) identifier_start )attribute )expression_statement )block )function_definition )module
Restart the game from a new generation 0
(module (function_definition (function_name__process_latching) function_name__process_latching (parameters (identifier_self) identifier_self (identifier_key) identifier_key (identifier_latching_entry) identifier_latching_entry )parameters (block (if_statement (subscript (identifier_latching_entry) identifier_latching_entry (attribute (identifier_Constants) identifier_Constants (identifier_LATCH_CALLBACK) identifier_LATCH_CALLBACK )attribute )subscript (block (if_statement (subscript (identifier_latching_entry) identifier_latching_entry (attribute (identifier_Constants) identifier_Constants (identifier_LATCH_CALLBACK_TYPE) identifier_LATCH_CALLBACK_TYPE )attribute )subscript (block (expression_statement (await (call (subscript (identifier_latching_entry) identifier_latching_entry (attribute (identifier_Constants) identifier_Constants (identifier_LATCH_CALLBACK) identifier_LATCH_CALLBACK )attribute )subscript (line_continuation_\) line_continuation_\ (argument_list (list (identifier_key) identifier_key (subscript (identifier_latching_entry) identifier_latching_entry (attribute (identifier_Constants) identifier_Constants (identifier_LATCHED_DATA) identifier_LATCHED_DATA )attribute )subscript (call (attribute (identifier_time) identifier_time (identifier_time) identifier_time )attribute (argument_list )argument_list )call )list )argument_list )call )await )expression_statement )block (else_clause (block (expression_statement (call (subscript (identifier_latching_entry) identifier_latching_entry (attribute (identifier_Constants) identifier_Constants (identifier_LATCH_CALLBACK) identifier_LATCH_CALLBACK )attribute )subscript (line_continuation_\) line_continuation_\ (argument_list (list (identifier_key) identifier_key (subscript (identifier_latching_entry) identifier_latching_entry (attribute (identifier_Constants) identifier_Constants (identifier_LATCHED_DATA) identifier_LATCHED_DATA )attribute )subscript (call (attribute (identifier_time) identifier_time (identifier_time) identifier_time )attribute (argument_list )argument_list )call )list )argument_list )call )expression_statement )block )else_clause )if_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_latch_map) identifier_latch_map )attribute (identifier_key) identifier_key )subscript (list (integer_0) integer_0 (integer_0) integer_0 (integer_0) integer_0 (integer_0) integer_0 (integer_0) integer_0 (None) None )list )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_updated_latch_entry) identifier_updated_latch_entry (identifier_latching_entry) identifier_latching_entry )assignment )expression_statement (expression_statement (assignment (subscript (identifier_updated_latch_entry) identifier_updated_latch_entry (attribute (identifier_Constants) identifier_Constants (identifier_LATCH_STATE) identifier_LATCH_STATE )attribute )subscript (line_continuation_\) line_continuation_\ (attribute (identifier_Constants) identifier_Constants (identifier_LATCH_LATCHED) identifier_LATCH_LATCHED )attribute )assignment )expression_statement (expression_statement (assignment (subscript (identifier_updated_latch_entry) identifier_updated_latch_entry (attribute (identifier_Constants) identifier_Constants (identifier_LATCHED_DATA) identifier_LATCHED_DATA )attribute )subscript (line_continuation_\) line_continuation_\ (subscript (identifier_latching_entry) identifier_latching_entry (attribute (identifier_Constants) identifier_Constants (identifier_LATCHED_DATA) identifier_LATCHED_DATA )attribute )subscript )assignment )expression_statement (expression_statement (assignment (subscript (identifier_updated_latch_entry) identifier_updated_latch_entry (attribute (identifier_Constants) identifier_Constants (identifier_LATCHED_TIME_STAMP) identifier_LATCHED_TIME_STAMP )attribute )subscript (call (attribute (identifier_time) identifier_time (identifier_time) identifier_time )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_latch_map) identifier_latch_map )attribute (identifier_key) identifier_key )subscript (identifier_updated_latch_entry) identifier_updated_latch_entry )assignment )expression_statement )block )else_clause )if_statement )block )function_definition )module
This is a private utility method. This method process latching events and either returns them via callback or stores them in the latch map :param key: Encoded pin :param latching_entry: a latch table entry :returns: Callback or store data in latch map
(module (function_definition (function_name_firmware_drivers) function_name_firmware_drivers (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier___firmware_drivers) identifier___firmware_drivers )attribute )not_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier___firmware_drivers) identifier___firmware_drivers )attribute (call (identifier_FirmwareDrivers) identifier_FirmwareDrivers (argument_list (attribute (identifier_self) identifier_self (identifier___connection) identifier___connection )attribute )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier___firmware_drivers) identifier___firmware_drivers )attribute )return_statement )block )function_definition )module
Gets the FirmwareDrivers API client. Returns: FirmwareDrivers:
(module (function_definition (function_name_decode) function_name_decode (parameters (identifier_self) identifier_self (default_parameter (identifier_charset) identifier_charset (string_'utf-8') string_'utf-8' )default_parameter (default_parameter (identifier_errors) identifier_errors (string_'replace') string_'replace' )default_parameter )parameters (block (return_statement (call (identifier_URL) identifier_URL (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_scheme) identifier_scheme )attribute (identifier_decode) identifier_decode )attribute (argument_list (string_'ascii') string_'ascii' )argument_list )call (call (attribute (identifier_self) identifier_self (identifier_decode_netloc) identifier_decode_netloc )attribute (argument_list )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute (identifier_decode) identifier_decode )attribute (argument_list (identifier_charset) identifier_charset (identifier_errors) identifier_errors )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier_query) identifier_query )attribute (identifier_decode) identifier_decode )attribute (argument_list (identifier_charset) identifier_charset (identifier_errors) identifier_errors )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier_fragment) identifier_fragment )attribute (identifier_decode) identifier_decode )attribute (argument_list (identifier_charset) identifier_charset (identifier_errors) identifier_errors )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Decodes the URL to a tuple made out of strings. The charset is only being used for the path, query and fragment.