sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_set_default_encoder_parameters) function_name_set_default_encoder_parameters (parameters )parameters (block (expression_statement (assignment (identifier_ARGTYPES) identifier_ARGTYPES (list (call (attribute (identifier_ctypes) identifier_ctypes (identifier_POINTER) identifier_POINTER )attribute (argument_list (identifier_CompressionParametersType) identifier_CompressionParametersType )argument_list )call )list )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_OPENJP2) identifier_OPENJP2 (identifier_opj_set_default_encoder_parameters) identifier_opj_set_default_encoder_parameters )attribute (identifier_argtypes) identifier_argtypes )attribute (identifier_ARGTYPES) identifier_ARGTYPES )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_OPENJP2) identifier_OPENJP2 (identifier_opj_set_default_encoder_parameters) identifier_opj_set_default_encoder_parameters )attribute (identifier_restype) identifier_restype )attribute (attribute (identifier_ctypes) identifier_ctypes (identifier_c_void_p) identifier_c_void_p )attribute )assignment )expression_statement (expression_statement (assignment (identifier_cparams) identifier_cparams (call (identifier_CompressionParametersType) identifier_CompressionParametersType (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_OPENJP2) identifier_OPENJP2 (identifier_opj_set_default_encoder_parameters) identifier_opj_set_default_encoder_parameters )attribute (argument_list (call (attribute (identifier_ctypes) identifier_ctypes (identifier_byref) identifier_byref )attribute (argument_list (identifier_cparams) identifier_cparams )argument_list )call )argument_list )call )expression_statement (return_statement (identifier_cparams) identifier_cparams )return_statement )block )function_definition )module
Wraps openjp2 library function opj_set_default_encoder_parameters. Sets encoding parameters to default values. That means lossless 1 tile size of precinct : 2^15 x 2^15 (means 1 precinct) size of code-block : 64 x 64 number of resolutions: 6 no SOP marker in the codestream no EPH marker in the codestream no sub-sampling in x or y direction no mode switch activated progression order: LRCP no index file no ROI upshifted no offset of the origin of the image no offset of the origin of the tiles reversible DWT 5-3 The signature for this function differs from its C library counterpart, as the the C function pass-by-reference parameter becomes the Python return value. Returns ------- cparameters : CompressionParametersType Compression parameters.
(module (function_definition (function_name_get_current_path) function_name_get_current_path (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_path) identifier_path (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_tree_view) identifier_tree_view )attribute (identifier_fileInfo) identifier_fileInfo )attribute (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_tree_view) identifier_tree_view )attribute (identifier_currentIndex) identifier_currentIndex )attribute (argument_list )argument_list )call )argument_list )call (identifier_filePath) identifier_filePath )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_path) identifier_path )not_operator (block (expression_statement (assignment (identifier_path) identifier_path (attribute (attribute (identifier_self) identifier_self (identifier_tree_view) identifier_tree_view )attribute (identifier_root_path) identifier_root_path )attribute )assignment )expression_statement )block )if_statement (return_statement (identifier_path) identifier_path )return_statement )block )function_definition )module
Gets the path of the currently selected item.
(module (function_definition (function_name_iter_setup_packages) function_name_iter_setup_packages (parameters (identifier_srcdir) identifier_srcdir (identifier_packages) identifier_packages )parameters (block (for_statement (identifier_packagename) identifier_packagename (identifier_packages) identifier_packages (block (expression_statement (assignment (identifier_package_parts) identifier_package_parts (call (attribute (identifier_packagename) identifier_packagename (identifier_split) identifier_split )attribute (argument_list (string_'.') string_'.' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_package_path) identifier_package_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_srcdir) identifier_srcdir (list_splat (identifier_package_parts) identifier_package_parts )list_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_setup_package) identifier_setup_package (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_relpath) identifier_relpath )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_package_path) identifier_package_path (string_'setup_package.py') string_'setup_package.py' )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (identifier_setup_package) identifier_setup_package )argument_list )call (block (expression_statement (assignment (identifier_module) identifier_module (call (identifier_import_file) identifier_import_file (argument_list (identifier_setup_package) identifier_setup_package (keyword_argument (identifier_name) identifier_name (binary_operator (identifier_packagename) identifier_packagename (string_'.setup_package') string_'.setup_package' )binary_operator )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (yield (identifier_module) identifier_module )yield )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
A generator that finds and imports all of the ``setup_package.py`` modules in the source packages. Returns ------- modgen : generator A generator that yields (modname, mod), where `mod` is the module and `modname` is the module name for the ``setup_package.py`` modules.
(module (function_definition (function_name_sendmail) function_name_sendmail (parameters (identifier_self) identifier_self (identifier_sender) identifier_sender (identifier_recipients) identifier_recipients (identifier_message) identifier_message (default_parameter (identifier_mail_options) identifier_mail_options (None) None )default_parameter (default_parameter (identifier_rcpt_options) identifier_rcpt_options (None) None )default_parameter )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_recipients) identifier_recipients (identifier_str) identifier_str )argument_list )call (block (expression_statement (assignment (identifier_recipients) identifier_recipients (list (identifier_recipients) identifier_recipients )list )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_mail_options) identifier_mail_options (None) None )comparison_operator (block (expression_statement (assignment (identifier_mail_options) identifier_mail_options (list )list )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_rcpt_options) identifier_rcpt_options (None) None )comparison_operator (block (expression_statement (assignment (identifier_rcpt_options) identifier_rcpt_options (list )list )assignment )expression_statement )block )if_statement (expression_statement (await (call (attribute (identifier_self) identifier_self (identifier_ehlo_or_helo_if_needed) identifier_ehlo_or_helo_if_needed )attribute (argument_list )argument_list )call )await )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_supports_esmtp) identifier_supports_esmtp )attribute (block (if_statement (comparison_operator (string_"size") string_"size" (attribute (identifier_self) identifier_self (identifier_esmtp_extensions) identifier_esmtp_extensions )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_mail_options) identifier_mail_options (identifier_append) identifier_append )attribute (argument_list (call (attribute (string_"size={}") string_"size={}" (identifier_format) identifier_format )attribute (argument_list (call (identifier_len) identifier_len (argument_list (identifier_message) identifier_message )argument_list )call )argument_list )call )argument_list )call )expression_statement )block )if_statement )block )if_statement (expression_statement (await (call (attribute (identifier_self) identifier_self (identifier_mail) identifier_mail )attribute (argument_list (identifier_sender) identifier_sender (identifier_mail_options) identifier_mail_options )argument_list )call )await )expression_statement (expression_statement (assignment (identifier_errors) identifier_errors (list )list )assignment )expression_statement (for_statement (identifier_recipient) identifier_recipient (identifier_recipients) identifier_recipients (block (try_statement (block (expression_statement (await (call (attribute (identifier_self) identifier_self (identifier_rcpt) identifier_rcpt )attribute (argument_list (identifier_recipient) identifier_recipient (identifier_rcpt_options) identifier_rcpt_options )argument_list )call )await )expression_statement )block (except_clause (as_pattern (identifier_SMTPCommandFailedError) identifier_SMTPCommandFailedError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_errors) identifier_errors (identifier_append) identifier_append )attribute (argument_list (identifier_e) identifier_e )argument_list )call )expression_statement )block )except_clause )try_statement )block )for_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_recipients) identifier_recipients )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_errors) identifier_errors )argument_list )call )comparison_operator (block (raise_statement (call (identifier_SMTPNoRecipientError) identifier_SMTPNoRecipientError (argument_list (identifier_errors) identifier_errors )argument_list )call )raise_statement )block )if_statement (expression_statement (await (call (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (argument_list (identifier_message) identifier_message )argument_list )call )await )expression_statement (return_statement (identifier_errors) identifier_errors )return_statement )block )function_definition )module
Performs an entire e-mail transaction. Example: >>> try: >>> with SMTP() as client: >>> try: >>> r = client.sendmail(sender, recipients, message) >>> except SMTPException: >>> print("Error while sending message.") >>> else: >>> print("Result: {}.".format(r)) >>> except ConnectionError as e: >>> print(e) Result: {}. Args: sender (str): E-mail address of the sender. recipients (list of str or str): E-mail(s) address(es) of the recipient(s). message (str or bytes): Message body. mail_options (list of str): ESMTP options (such as *8BITMIME*) to send along the *MAIL* command. rcpt_options (list of str): ESMTP options (such as *DSN*) to send along all the *RCPT* commands. Raises: ConnectionResetError: If the connection with the server is unexpectedely lost. SMTPCommandFailedError: If the server refuses our EHLO/HELO greeting. SMTPCommandFailedError: If the server refuses our MAIL command. SMTPCommandFailedError: If the server refuses our DATA command. SMTPNoRecipientError: If the server refuses all given recipients. Returns: dict: A dict containing an entry for each recipient that was refused. Each entry is associated with a (code, message) 2-tuple containing the error code and message, as returned by the server. When everythign runs smoothly, the returning dict is empty. .. note:: The connection remains open after. It's your responsibility to close it. A good practice is to use the asynchronous context manager instead. See :meth:`SMTP.__aenter__` for further details.
(module (function_definition (function_name_runCommandReturnOutput) function_name_runCommandReturnOutput (parameters (identifier_cmd) identifier_cmd )parameters (block (expression_statement (assignment (identifier_splits) identifier_splits (call (attribute (identifier_shlex) identifier_shlex (identifier_split) identifier_split )attribute (argument_list (identifier_cmd) identifier_cmd )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_proc) identifier_proc (call (attribute (identifier_subprocess) identifier_subprocess (identifier_Popen) identifier_Popen )attribute (argument_list (identifier_splits) identifier_splits (keyword_argument (identifier_stdout) identifier_stdout (attribute (identifier_subprocess) identifier_subprocess (identifier_PIPE) identifier_PIPE )attribute )keyword_argument (keyword_argument (identifier_stderr) identifier_stderr (attribute (identifier_subprocess) identifier_subprocess (identifier_PIPE) identifier_PIPE )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_stdout) identifier_stdout (identifier_stderr) identifier_stderr )pattern_list (call (attribute (identifier_proc) identifier_proc (identifier_communicate) identifier_communicate )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_proc) identifier_proc (identifier_returncode) identifier_returncode )attribute (integer_0) integer_0 )comparison_operator (block (raise_statement (call (attribute (identifier_subprocess) identifier_subprocess (identifier_CalledProcessError) identifier_CalledProcessError )attribute (argument_list (identifier_stdout) identifier_stdout (identifier_stderr) identifier_stderr )argument_list )call )raise_statement )block )if_statement (return_statement (expression_list (identifier_stdout) identifier_stdout (identifier_stderr) identifier_stderr )expression_list )return_statement )block )function_definition )module
Runs a shell command and return the stdout and stderr
(module (function_definition (function_name__str_dtype) function_name__str_dtype (parameters (identifier_dtype) identifier_dtype )parameters (block (assert_statement (comparison_operator (attribute (identifier_dtype) identifier_dtype (identifier_byteorder) identifier_byteorder )attribute (string_'>') string_'>' )comparison_operator )assert_statement (if_statement (comparison_operator (attribute (identifier_dtype) identifier_dtype (identifier_kind) identifier_kind )attribute (string_'i') string_'i' )comparison_operator (block (assert_statement (comparison_operator (attribute (identifier_dtype) identifier_dtype (identifier_itemsize) identifier_itemsize )attribute (integer_8) integer_8 )comparison_operator )assert_statement (return_statement (string_'int64') string_'int64' )return_statement )block (elif_clause (comparison_operator (attribute (identifier_dtype) identifier_dtype (identifier_kind) identifier_kind )attribute (string_'f') string_'f' )comparison_operator (block (assert_statement (comparison_operator (attribute (identifier_dtype) identifier_dtype (identifier_itemsize) identifier_itemsize )attribute (integer_8) integer_8 )comparison_operator )assert_statement (return_statement (string_'float64') string_'float64' )return_statement )block )elif_clause (elif_clause (comparison_operator (attribute (identifier_dtype) identifier_dtype (identifier_kind) identifier_kind )attribute (string_'U') string_'U' )comparison_operator (block (return_statement (binary_operator (string_'U%d') string_'U%d' (parenthesized_expression (binary_operator (attribute (identifier_dtype) identifier_dtype (identifier_itemsize) identifier_itemsize )attribute (integer_4) integer_4 )binary_operator )parenthesized_expression )binary_operator )return_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_UnhandledDtypeException) identifier_UnhandledDtypeException (argument_list (binary_operator (string_"Bad dtype '%s'") string_"Bad dtype '%s'" (identifier_dtype) identifier_dtype )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Represent dtypes without byte order, as earlier Java tickstore code doesn't support explicit byte order.
(module (function_definition (function_name__psed) function_name__psed (parameters (identifier_text) identifier_text (identifier_before) identifier_before (identifier_after) identifier_after (identifier_limit) identifier_limit (identifier_flags) identifier_flags )parameters (block (expression_statement (assignment (identifier_atext) identifier_atext (identifier_text) identifier_text )assignment )expression_statement (if_statement (identifier_limit) identifier_limit (block (expression_statement (assignment (identifier_limit) identifier_limit (call (attribute (identifier_re) identifier_re (identifier_compile) identifier_compile )attribute (argument_list (identifier_limit) identifier_limit )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_comps) identifier_comps (call (attribute (identifier_text) identifier_text (identifier_split) identifier_split )attribute (argument_list (identifier_limit) identifier_limit )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_atext) identifier_atext (call (attribute (string_'') string_'' (identifier_join) identifier_join )attribute (argument_list (subscript (identifier_comps) identifier_comps (slice (integer_1) integer_1 (colon) colon )slice )subscript )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_count) identifier_count (integer_1) integer_1 )assignment )expression_statement (if_statement (comparison_operator (string_'g') string_'g' (identifier_flags) identifier_flags )comparison_operator (block (expression_statement (assignment (identifier_count) identifier_count (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (identifier_flags) identifier_flags (call (attribute (identifier_flags) identifier_flags (identifier_replace) identifier_replace )attribute (argument_list (string_'g') string_'g' (string_'') string_'' )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_aflags) identifier_aflags (integer_0) integer_0 )assignment )expression_statement (for_statement (identifier_flag) identifier_flag (identifier_flags) identifier_flags (block (expression_statement (augmented_assignment (identifier_aflags) identifier_aflags (subscript (identifier_RE_FLAG_TABLE) identifier_RE_FLAG_TABLE (identifier_flag) identifier_flag )subscript )augmented_assignment )expression_statement )block )for_statement (expression_statement (assignment (identifier_before) identifier_before (call (attribute (identifier_re) identifier_re (identifier_compile) identifier_compile )attribute (argument_list (identifier_before) identifier_before (keyword_argument (identifier_flags) identifier_flags (identifier_aflags) identifier_aflags )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_text) identifier_text (call (attribute (identifier_re) identifier_re (identifier_sub) identifier_sub )attribute (argument_list (identifier_before) identifier_before (identifier_after) identifier_after (identifier_atext) identifier_atext (keyword_argument (identifier_count) identifier_count (identifier_count) identifier_count )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_text) identifier_text )return_statement )block )function_definition )module
Does the actual work for file.psed, so that single lines can be passed in
(module (function_definition (function_name_trigger_actions) function_name_trigger_actions (parameters (identifier_self) identifier_self (identifier_subsystem) identifier_subsystem )parameters (block (for_statement (pattern_list (identifier_py3_module) identifier_py3_module (identifier_trigger_action) identifier_trigger_action )pattern_list (subscript (attribute (identifier_self) identifier_self (identifier_udev_consumers) identifier_udev_consumers )attribute (identifier_subsystem) identifier_subsystem )subscript (block (if_statement (comparison_operator (identifier_trigger_action) identifier_trigger_action (identifier_ON_TRIGGER_ACTIONS) identifier_ON_TRIGGER_ACTIONS )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_py3_wrapper) identifier_py3_wrapper )attribute (identifier_log) identifier_log )attribute (argument_list (binary_operator (string_"%s udev event, refresh consumer %s") string_"%s udev event, refresh consumer %s" (tuple (identifier_subsystem) identifier_subsystem (attribute (identifier_py3_module) identifier_py3_module (identifier_module_full_name) identifier_module_full_name )attribute )tuple )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_py3_module) identifier_py3_module (identifier_force_update) identifier_force_update )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Refresh all modules which subscribed to the given subsystem.
(module (function_definition (function_name_to_text) function_name_to_text (parameters (identifier_self) identifier_self (identifier_line) identifier_line )parameters (block (return_statement (call (call (identifier_getattr) identifier_getattr (argument_list (identifier_self) identifier_self (subscript (attribute (identifier_self) identifier_self (identifier_ENTRY_TRANSFORMERS) identifier_ENTRY_TRANSFORMERS )attribute (attribute (identifier_line) identifier_line (identifier___class__) identifier___class__ )attribute )subscript )argument_list )call (argument_list (identifier_line) identifier_line )argument_list )call )return_statement )block )function_definition )module
Return the textual representation of the given `line`.
(module (function_definition (function_name_fault_zone) function_name_fault_zone (parameters (identifier_self) identifier_self (identifier_zone) identifier_zone (default_parameter (identifier_simulate_wire_problem) identifier_simulate_wire_problem (False) False )default_parameter )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_zone) identifier_zone (identifier_tuple) identifier_tuple )argument_list )call (block (expression_statement (assignment (pattern_list (identifier_expander_idx) identifier_expander_idx (identifier_channel) identifier_channel )pattern_list (identifier_zone) identifier_zone )assignment )expression_statement (expression_statement (assignment (identifier_zone) identifier_zone (call (attribute (attribute (identifier_self) identifier_self (identifier__zonetracker) identifier__zonetracker )attribute (identifier_expander_to_zone) identifier_expander_to_zone )attribute (argument_list (identifier_expander_idx) identifier_expander_idx (identifier_channel) identifier_channel )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_status) identifier_status (conditional_expression (integer_2) integer_2 (identifier_simulate_wire_problem) identifier_simulate_wire_problem (integer_1) integer_1 )conditional_expression )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_send) identifier_send )attribute (argument_list (call (attribute (string_"L{0:02}{1}\r") string_"L{0:02}{1}\r" (identifier_format) identifier_format )attribute (argument_list (identifier_zone) identifier_zone (identifier_status) identifier_status )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Faults a zone if we are emulating a zone expander. :param zone: zone to fault :type zone: int :param simulate_wire_problem: Whether or not to simulate a wire fault :type simulate_wire_problem: bool
(module (function_definition (function_name_query_certificate) function_name_query_certificate (parameters (identifier_self) identifier_self (identifier_cert_hash) identifier_cert_hash )parameters (block (try_statement (block (expression_statement (assignment (identifier_cquery) identifier_cquery (call (attribute (attribute (identifier_self) identifier_self (identifier_pssl) identifier_pssl )attribute (identifier_query_cert) identifier_query_cert )attribute (argument_list (identifier_cert_hash) identifier_cert_hash )argument_list )call )assignment )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_error) identifier_error )attribute (argument_list (concatenated_string (string_'Exception during processing with passiveSSL. ') string_'Exception during processing with passiveSSL. ' (string_'This happens if the given hash is not sha1 or contains dashes/colons etc. ') string_'This happens if the given hash is not sha1 or contains dashes/colons etc. ' (string_'Please make sure to submit a clean formatted sha1 hash.') string_'Please make sure to submit a clean formatted sha1 hash.' )concatenated_string )argument_list )call )expression_statement )block )except_clause )try_statement (try_statement (block (expression_statement (assignment (identifier_cfetch) identifier_cfetch (call (attribute (attribute (identifier_self) identifier_self (identifier_pssl) identifier_pssl )attribute (identifier_fetch_cert) identifier_fetch_cert )attribute (argument_list (identifier_cert_hash) identifier_cert_hash (keyword_argument (identifier_make_datetime) identifier_make_datetime (False) False )keyword_argument )argument_list )call )assignment )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (expression_statement (assignment (identifier_cfetch) identifier_cfetch (dictionary )dictionary )assignment )expression_statement )block )except_clause )try_statement (return_statement (dictionary (pair (string_'query') string_'query' (identifier_cquery) identifier_cquery )pair (pair (string_'cert') string_'cert' (identifier_cfetch) identifier_cfetch )pair )dictionary )return_statement )block )function_definition )module
Queries Circl.lu Passive SSL for a certificate hash using PyPSSL class. Returns error if nothing is found. :param cert_hash: hash to query for :type cert_hash: str :return: python dict of results :rtype: dict
(module (function_definition (function_name_finish) function_name_finish (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_system) identifier_system )attribute (argument_list (string_'setterm -cursor on') string_'setterm -cursor on' )argument_list )call )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_nl) identifier_nl )attribute (block (expression_statement (call (attribute (call (identifier_Echo) identifier_Echo (argument_list (attribute (identifier_self) identifier_self (identifier_label) identifier_label )attribute )argument_list )call (identifier_done) identifier_done )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Update widgets on finish
(module (function_definition (function_name_check_token) function_name_check_token (parameters (identifier_self) identifier_self (identifier_token) identifier_token (identifier_allowed_roles) identifier_allowed_roles (identifier_resource) identifier_resource (identifier_method) identifier_method )parameters (block (expression_statement (assignment (identifier_resource_conf) identifier_resource_conf (subscript (attribute (identifier_config) identifier_config (identifier_DOMAIN) identifier_DOMAIN )attribute (identifier_resource) identifier_resource )subscript )assignment )expression_statement (expression_statement (assignment (identifier_audiences) identifier_audiences (call (attribute (identifier_resource_conf) identifier_resource_conf (identifier_get) identifier_get )attribute (argument_list (string_'audiences') string_'audiences' (attribute (identifier_config) identifier_config (identifier_JWT_AUDIENCES) identifier_JWT_AUDIENCES )attribute )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__perform_verification) identifier__perform_verification )attribute (argument_list (identifier_token) identifier_token (identifier_audiences) identifier_audiences (identifier_allowed_roles) identifier_allowed_roles )argument_list )call )return_statement )block )function_definition )module
This function is called when a token is sent throught the access_token parameter or the Authorization header as specified in the oAuth 2 specification. The provided token is validated with the JWT_SECRET defined in the Eve configuration. The token issuer (iss claim) must be the one specified by JWT_ISSUER and the audience (aud claim) must be one of the value(s) defined by the either the "audiences" resource parameter or the global JWT_AUDIENCES configuration. If JWT_ROLES_CLAIM is defined and a claim by that name is present in the token, roles are checked using this claim. If a JWT_SCOPE_CLAIM is defined and a claim by that name is present in the token, the claim value is check, and if "viewer" is present, only GET and HEAD methods will be allowed. The scope name is then added to the list of roles with the scope: prefix. If the validation succeed, the claims are stored and accessible thru the get_authen_claims() method.
(module (function_definition (function_name_extractVersion) function_name_extractVersion (parameters (identifier_string) identifier_string (default_parameter (identifier_default) identifier_default (string_'?') string_'?' )default_parameter )parameters (block (return_statement (call (identifier_extract) identifier_extract (argument_list (identifier_VERSION_PATTERN) identifier_VERSION_PATTERN (identifier_string) identifier_string (keyword_argument (identifier_condense) identifier_condense (True) True )keyword_argument (keyword_argument (identifier_default) identifier_default (identifier_default) identifier_default )keyword_argument (keyword_argument (identifier_one) identifier_one (True) True )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Extracts a three digit standard format version number
(module (function_definition (function_name_calc_fft_with_PyCUDA) function_name_calc_fft_with_PyCUDA (parameters (identifier_Signal) identifier_Signal )parameters (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"starting fft") string_"starting fft" )argument_list )call )expression_statement (expression_statement (assignment (identifier_Signal) identifier_Signal (call (attribute (identifier_Signal) identifier_Signal (identifier_astype) identifier_astype )attribute (argument_list (attribute (identifier__np) identifier__np (identifier_float32) identifier_float32 )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_Signal_gpu) identifier_Signal_gpu (call (attribute (identifier__gpuarray) identifier__gpuarray (identifier_to_gpu) identifier_to_gpu )attribute (argument_list (identifier_Signal) identifier_Signal )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_Signalfft_gpu) identifier_Signalfft_gpu (call (attribute (identifier__gpuarray) identifier__gpuarray (identifier_empty) identifier_empty )attribute (argument_list (binary_operator (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_Signal) identifier_Signal )argument_list )call (integer_2) integer_2 )binary_operator (integer_1) integer_1 )binary_operator (attribute (identifier__np) identifier__np (identifier_complex64) identifier_complex64 )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_plan) identifier_plan (call (identifier__Plan) identifier__Plan (argument_list (attribute (identifier_Signal) identifier_Signal (identifier_shape) identifier_shape )attribute (attribute (identifier__np) identifier__np (identifier_float32) identifier_float32 )attribute (attribute (identifier__np) identifier__np (identifier_complex64) identifier_complex64 )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (identifier__fft) identifier__fft (argument_list (identifier_Signal_gpu) identifier_Signal_gpu (identifier_Signalfft_gpu) identifier_Signalfft_gpu (identifier_plan) identifier_plan )argument_list )call )expression_statement (expression_statement (assignment (identifier_Signalfft) identifier_Signalfft (call (attribute (identifier_Signalfft_gpu) identifier_Signalfft_gpu (identifier_get) identifier_get )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_Signalfft) identifier_Signalfft (call (attribute (identifier__np) identifier__np (identifier_hstack) identifier_hstack )attribute (argument_list (tuple (identifier_Signalfft) identifier_Signalfft (call (attribute (identifier__np) identifier__np (identifier_conj) identifier_conj )attribute (argument_list (call (attribute (identifier__np) identifier__np (identifier_flipud) identifier_flipud )attribute (argument_list (subscript (identifier_Signalfft) identifier_Signalfft (slice (integer_1) integer_1 (colon) colon (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_Signal) identifier_Signal )argument_list )call (integer_2) integer_2 )binary_operator )slice )subscript )argument_list )call )argument_list )call )tuple )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"fft done") string_"fft done" )argument_list )call )expression_statement (return_statement (identifier_Signalfft) identifier_Signalfft )return_statement )block )function_definition )module
Calculates the FFT of the passed signal by using the scikit-cuda libary which relies on PyCUDA Parameters ---------- Signal : ndarray Signal to be transformed into Fourier space Returns ------- Signalfft : ndarray Array containing the signal's FFT
(module (function_definition (function_name_list_ifd) function_name_list_ifd (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_i) identifier_i (call (attribute (identifier_self) identifier_self (identifier__first_ifd) identifier__first_ifd )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ifds) identifier_ifds (list )list )assignment )expression_statement (while_statement (identifier_i) identifier_i (block (expression_statement (call (attribute (identifier_ifds) identifier_ifds (identifier_append) identifier_append )attribute (argument_list (identifier_i) identifier_i )argument_list )call )expression_statement (expression_statement (assignment (identifier_i) identifier_i (call (attribute (identifier_self) identifier_self (identifier__next_ifd) identifier__next_ifd )attribute (argument_list (identifier_i) identifier_i )argument_list )call )assignment )expression_statement )block )while_statement (return_statement (identifier_ifds) identifier_ifds )return_statement )block )function_definition )module
Return the list of IFDs in the header.
(module (function_definition (function_name_highlight_null) function_name_highlight_null (parameters (identifier_self) identifier_self (default_parameter (identifier_null_color) identifier_null_color (string_'red') string_'red' )default_parameter )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_applymap) identifier_applymap )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__highlight_null) identifier__highlight_null )attribute (keyword_argument (identifier_null_color) identifier_null_color (identifier_null_color) identifier_null_color )keyword_argument )argument_list )call )expression_statement (return_statement (identifier_self) identifier_self )return_statement )block )function_definition )module
Shade the background ``null_color`` for missing values. Parameters ---------- null_color : str Returns ------- self : Styler
(module (function_definition (function_name_with_host) function_name_with_host (parameters (identifier_self) identifier_self (identifier_host) identifier_host )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_host) identifier_host (identifier_str) identifier_str )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"Invalid host type") string_"Invalid host type" )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier_is_absolute) identifier_is_absolute )attribute (argument_list )argument_list )call )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (concatenated_string (string_"host replacement is not allowed ") string_"host replacement is not allowed " (string_"for relative URLs") string_"for relative URLs" )concatenated_string )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (identifier_host) identifier_host )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"host removing is not allowed") string_"host removing is not allowed" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_host) identifier_host (call (attribute (identifier_self) identifier_self (identifier__encode_host) identifier__encode_host )attribute (argument_list (identifier_host) identifier_host )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_val) identifier_val (attribute (identifier_self) identifier_self (identifier__val) identifier__val )attribute )assignment )expression_statement (return_statement (call (identifier_URL) identifier_URL (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier__val) identifier__val )attribute (identifier__replace) identifier__replace )attribute (argument_list (keyword_argument (identifier_netloc) identifier_netloc (call (attribute (identifier_self) identifier_self (identifier__make_netloc) identifier__make_netloc )attribute (argument_list (attribute (identifier_val) identifier_val (identifier_username) identifier_username )attribute (attribute (identifier_val) identifier_val (identifier_password) identifier_password )attribute (identifier_host) identifier_host (attribute (identifier_val) identifier_val (identifier_port) identifier_port )attribute (keyword_argument (identifier_encode) identifier_encode (False) False )keyword_argument )argument_list )call )keyword_argument )argument_list )call (keyword_argument (identifier_encoded) identifier_encoded (True) True )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return a new URL with host replaced. Autoencode host if needed. Changing host for relative URLs is not allowed, use .join() instead.
(module (function_definition (function_name_get_all_json_from_indexq) function_name_get_all_json_from_indexq (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_files) identifier_files (call (attribute (identifier_self) identifier_self (identifier_get_all_as_list) identifier_get_all_as_list )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_out) identifier_out (list )list )assignment )expression_statement (for_statement (identifier_efile) identifier_efile (identifier_files) identifier_files (block (expression_statement (call (attribute (identifier_out) identifier_out (identifier_extend) identifier_extend )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier__open_file) identifier__open_file )attribute (argument_list (identifier_efile) identifier_efile )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_out) identifier_out )return_statement )block )function_definition )module
Gets all data from the todo files in indexq and returns one huge list of all data.
(module (function_definition (function_name_write_data) function_name_write_data (parameters (identifier_self) identifier_self (identifier_data) identifier_data (default_parameter (identifier_start_position) identifier_start_position (integer_0) integer_0 )default_parameter )parameters (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_data) identifier_data )argument_list )call (call (attribute (identifier_self) identifier_self (identifier_height) identifier_height )attribute (argument_list )argument_list )call )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Data too long (too many strings)') string_'Data too long (too many strings)' )argument_list )call )raise_statement )block )if_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (identifier_data) identifier_data )argument_list )call )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_write_line) identifier_write_line )attribute (argument_list (binary_operator (identifier_start_position) identifier_start_position (identifier_i) identifier_i )binary_operator (subscript (identifier_data) identifier_data (identifier_i) identifier_i )subscript )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Write data from the specified line :param data: string to write, each one on new line :param start_position: starting line :return:
(module (function_definition (function_name_bind_unix_socket) function_name_bind_unix_socket (parameters (identifier_file_) identifier_file_ (default_parameter (identifier_mode) identifier_mode (integer_0o600) integer_0o600 )default_parameter (default_parameter (identifier_backlog) identifier_backlog (identifier__DEFAULT_BACKLOG) identifier__DEFAULT_BACKLOG )default_parameter )parameters (block (expression_statement (assignment (identifier_sock) identifier_sock (call (attribute (identifier_socket) identifier_socket (identifier_socket) identifier_socket )attribute (argument_list (attribute (identifier_socket) identifier_socket (identifier_AF_UNIX) identifier_AF_UNIX )attribute (attribute (identifier_socket) identifier_socket (identifier_SOCK_STREAM) identifier_SOCK_STREAM )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_sock) identifier_sock (identifier_setsockopt) identifier_setsockopt )attribute (argument_list (attribute (identifier_socket) identifier_socket (identifier_SOL_SOCKET) identifier_SOL_SOCKET )attribute (attribute (identifier_socket) identifier_socket (identifier_SO_REUSEADDR) identifier_SO_REUSEADDR )attribute (integer_1) integer_1 )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_sock) identifier_sock (identifier_setblocking) identifier_setblocking )attribute (argument_list (integer_0) integer_0 )argument_list )call )expression_statement (try_statement (block (expression_statement (assignment (identifier_st) identifier_st (call (attribute (identifier_os) identifier_os (identifier_stat) identifier_stat )attribute (argument_list (identifier_file_) identifier_file_ )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (identifier_OSError) identifier_OSError (as_pattern_target (identifier_err) identifier_err )as_pattern_target )as_pattern (block (if_statement (comparison_operator (attribute (identifier_err) identifier_err (identifier_errno) identifier_errno )attribute (attribute (identifier_errno) identifier_errno (identifier_ENOENT) identifier_ENOENT )attribute )comparison_operator (block (raise_statement )raise_statement )block )if_statement )block )except_clause (else_clause (block (if_statement (call (attribute (identifier_stat) identifier_stat (identifier_S_ISSOCK) identifier_S_ISSOCK )attribute (argument_list (attribute (identifier_st) identifier_st (identifier_st_mode) identifier_st_mode )attribute )argument_list )call (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_remove) identifier_remove )attribute (argument_list (identifier_file_) identifier_file_ )argument_list )call )expression_statement )block (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'File %s exists and is not a socket') string_'File %s exists and is not a socket' (identifier_file_) identifier_file_ )argument_list )call )raise_statement )block )else_clause )if_statement )block )else_clause )try_statement (expression_statement (call (attribute (identifier_sock) identifier_sock (identifier_bind) identifier_bind )attribute (argument_list (identifier_file_) identifier_file_ )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_chmod) identifier_chmod )attribute (argument_list (identifier_file_) identifier_file_ (identifier_mode) identifier_mode )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_sock) identifier_sock (identifier_listen) identifier_listen )attribute (argument_list (identifier_backlog) identifier_backlog )argument_list )call )expression_statement (return_statement (identifier_sock) identifier_sock )return_statement )block )function_definition )module
Creates a listening unix socket. If a socket with the given name already exists, it will be deleted. If any other file with that name exists, an exception will be raised. Returns a socket object (not a list of socket objects like `bind_sockets`)
(module (function_definition (function_name__edge_list_to_sframe) function_name__edge_list_to_sframe (parameters (identifier_ls) identifier_ls (identifier_src_column_name) identifier_src_column_name (identifier_dst_column_name) identifier_dst_column_name )parameters (block (expression_statement (assignment (identifier_sf) identifier_sf (call (identifier_SFrame) identifier_SFrame (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_ls) identifier_ls )argument_list )call (identifier_list) identifier_list )comparison_operator (block (expression_statement (assignment (identifier_cols) identifier_cols (call (identifier_reduce) identifier_reduce (argument_list (attribute (identifier_set) identifier_set (identifier_union) identifier_union )attribute (generator_expression (call (identifier_set) identifier_set (argument_list (call (attribute (attribute (identifier_v) identifier_v (identifier_attr) identifier_attr )attribute (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call (for_in_clause (identifier_v) identifier_v (identifier_ls) identifier_ls )for_in_clause )generator_expression )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_sf) identifier_sf (identifier_src_column_name) identifier_src_column_name )subscript (list_comprehension (attribute (identifier_e) identifier_e (identifier_src_vid) identifier_src_vid )attribute (for_in_clause (identifier_e) identifier_e (identifier_ls) identifier_ls )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (subscript (identifier_sf) identifier_sf (identifier_dst_column_name) identifier_dst_column_name )subscript (list_comprehension (attribute (identifier_e) identifier_e (identifier_dst_vid) identifier_dst_vid )attribute (for_in_clause (identifier_e) identifier_e (identifier_ls) identifier_ls )for_in_clause )list_comprehension )assignment )expression_statement (for_statement (identifier_c) identifier_c (identifier_cols) identifier_cols (block (expression_statement (assignment (subscript (identifier_sf) identifier_sf (identifier_c) identifier_c )subscript (list_comprehension (call (attribute (attribute (identifier_e) identifier_e (identifier_attr) identifier_attr )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_c) identifier_c )argument_list )call (for_in_clause (identifier_e) identifier_e (identifier_ls) identifier_ls )for_in_clause )list_comprehension )assignment )expression_statement )block )for_statement )block (elif_clause (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_ls) identifier_ls )argument_list )call (identifier_Edge) identifier_Edge )comparison_operator (block (expression_statement (assignment (subscript (identifier_sf) identifier_sf (identifier_src_column_name) identifier_src_column_name )subscript (list (attribute (identifier_ls) identifier_ls (identifier_src_vid) identifier_src_vid )attribute )list )assignment )expression_statement (expression_statement (assignment (subscript (identifier_sf) identifier_sf (identifier_dst_column_name) identifier_dst_column_name )subscript (list (attribute (identifier_ls) identifier_ls (identifier_dst_vid) identifier_dst_vid )attribute )list )assignment )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (call (attribute (string_'Edges type {} is Not supported.') string_'Edges type {} is Not supported.' (identifier_format) identifier_format )attribute (argument_list (call (identifier_type) identifier_type (argument_list (identifier_ls) identifier_ls )argument_list )call )argument_list )call )argument_list )call )raise_statement )block )else_clause )if_statement (return_statement (identifier_sf) identifier_sf )return_statement )block )function_definition )module
Convert a list of edges into an SFrame.
(module (function_definition (function_name_dict_head) function_name_dict_head (parameters (identifier_d) identifier_d (default_parameter (identifier_N) identifier_N (integer_5) integer_5 )default_parameter )parameters (block (return_statement (dictionary_comprehension (pair (identifier_k) identifier_k (subscript (identifier_d) identifier_d (identifier_k) identifier_k )subscript )pair (for_in_clause (identifier_k) identifier_k (subscript (call (identifier_list) identifier_list (argument_list (call (attribute (identifier_d) identifier_d (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call (slice (colon) colon (identifier_N) identifier_N )slice )subscript )for_in_clause )dictionary_comprehension )return_statement )block )function_definition )module
Return the head of a dictionary. It will be random! Default is to return the first 5 key/value pairs in a dictionary. Args: d: Dictionary to get head. N: Number of elements to display. Returns: dict: the first N items of the dictionary.
(module (function_definition (function_name_on_lstCategories_itemSelectionChanged) function_name_on_lstCategories_itemSelectionChanged (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_clear_further_steps) identifier_clear_further_steps )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_purpose) identifier_purpose (call (attribute (identifier_self) identifier_self (identifier_selected_purpose) identifier_selected_purpose )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_purpose) identifier_purpose )not_operator (block (return_statement )return_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_lblDescribeCategory) identifier_lblDescribeCategory )attribute (identifier_setText) identifier_setText )attribute (argument_list (subscript (identifier_purpose) identifier_purpose (string_"description") string_"description" )subscript )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_lblIconCategory) identifier_lblIconCategory )attribute (identifier_setPixmap) identifier_setPixmap )attribute (argument_list (call (identifier_QPixmap) identifier_QPixmap (argument_list (call (identifier_resources_path) identifier_resources_path (argument_list (string_'img') string_'img' (string_'wizard') string_'wizard' (binary_operator (string_'keyword-category-%s.svg') string_'keyword-category-%s.svg' (parenthesized_expression (boolean_operator (subscript (identifier_purpose) identifier_purpose (string_'key') string_'key' )subscript (string_'notset') string_'notset' )boolean_operator )parenthesized_expression )binary_operator )argument_list )call )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_parent) identifier_parent )attribute (identifier_pbnNext) identifier_pbnNext )attribute (identifier_setEnabled) identifier_setEnabled )attribute (argument_list (True) True )argument_list )call )expression_statement )block )function_definition )module
Update purpose description label. .. note:: This is an automatic Qt slot executed when the purpose selection changes.
(module (function_definition (function_name_optimise_z) function_name_optimise_z (parameters (identifier_z) identifier_z (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern )parameters (block (expression_statement (assignment (pattern_list (identifier_x) identifier_x (identifier_y) identifier_y (identifier_elements) identifier_elements (identifier_coordinates) identifier_coordinates )pattern_list (identifier_args) identifier_args )assignment )expression_statement (expression_statement (assignment (identifier_window_com) identifier_window_com (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (list (identifier_x) identifier_x (identifier_y) identifier_y (identifier_z) identifier_z )list )argument_list )call )assignment )expression_statement (return_statement (subscript (call (identifier_pore_diameter) identifier_pore_diameter (argument_list (identifier_elements) identifier_elements (identifier_coordinates) identifier_coordinates (keyword_argument (identifier_com) identifier_com (identifier_window_com) identifier_window_com )keyword_argument )argument_list )call (integer_0) integer_0 )subscript )return_statement )block )function_definition )module
Return pore diameter for coordinates optimisation in z direction.
(module (function_definition (function_name_simulated_quantize) function_name_simulated_quantize (parameters (identifier_x) identifier_x (identifier_num_bits) identifier_num_bits (identifier_noise) identifier_noise )parameters (block (expression_statement (assignment (identifier_shape) identifier_shape (call (attribute (call (attribute (identifier_x) identifier_x (identifier_get_shape) identifier_get_shape )attribute (argument_list )argument_list )call (identifier_as_list) identifier_as_list )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (not_operator (parenthesized_expression (boolean_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_shape) identifier_shape )argument_list )call (integer_2) integer_2 )comparison_operator (comparison_operator (subscript (identifier_shape) identifier_shape (unary_operator (integer_1) integer_1 )unary_operator )subscript (integer_1) integer_1 )comparison_operator )boolean_operator )parenthesized_expression )not_operator (block (return_statement (identifier_x) identifier_x )return_statement )block )if_statement (expression_statement (assignment (identifier_max_abs) identifier_max_abs (binary_operator (call (attribute (identifier_tf) identifier_tf (identifier_reduce_max) identifier_reduce_max )attribute (argument_list (call (attribute (identifier_tf) identifier_tf (identifier_abs) identifier_abs )attribute (argument_list (identifier_x) identifier_x )argument_list )call (unary_operator (integer_1) integer_1 )unary_operator (keyword_argument (identifier_keepdims) identifier_keepdims (True) True )keyword_argument )argument_list )call (float_1e-9) float_1e-9 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_max_int) identifier_max_int (binary_operator (binary_operator (integer_2) integer_2 (parenthesized_expression (binary_operator (identifier_num_bits) identifier_num_bits (integer_1) integer_1 )binary_operator )parenthesized_expression )binary_operator (integer_1) integer_1 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_scale) identifier_scale (binary_operator (identifier_max_abs) identifier_max_abs (identifier_max_int) identifier_max_int )binary_operator )assignment )expression_statement (expression_statement (augmented_assignment (identifier_x) identifier_x (identifier_scale) identifier_scale )augmented_assignment )expression_statement (expression_statement (assignment (identifier_x) identifier_x (call (attribute (identifier_tf) identifier_tf (identifier_floor) identifier_floor )attribute (argument_list (binary_operator (identifier_x) identifier_x (identifier_noise) identifier_noise )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_x) identifier_x (identifier_scale) identifier_scale )augmented_assignment )expression_statement (return_statement (identifier_x) identifier_x )return_statement )block )function_definition )module
Simulate quantization to num_bits bits, with externally-stored scale. num_bits is the number of bits used to store each value. noise is a float32 Tensor containing values in [0, 1). Each value in noise should take different values across different steps, approximating a uniform distribution over [0, 1). In the case of replicated TPU training, noise should be identical across replicas in order to keep the parameters identical across replicas. The natural choice for noise would be tf.random_uniform(), but this is not possible for TPU, since there is currently no way to seed the different cores to produce identical values across replicas. Instead we use noise_from_step_num() (see below). The quantization scheme is as follows: Compute the maximum absolute value by row (call this max_abs). Store this either in an auxiliary variable or in an extra column. Divide the parameters by (max_abs / (2^(num_bits-1)-1)). This gives a float32 value in the range [-2^(num_bits-1)-1, 2^(num_bits-1)-1] Unbiased randomized roundoff by adding noise and rounding down. This produces a signed integer with num_bits bits which can then be stored. Args: x: a float32 Tensor num_bits: an integer between 1 and 22 noise: a float Tensor broadcastable to the shape of x. Returns: a float32 Tensor
(module (function_definition (function_name_clear) function_name_clear (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_io) identifier_io )attribute (identifier_seek) identifier_seek )attribute (argument_list (integer_0) integer_0 )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_io) identifier_io )attribute (identifier_truncate) identifier_truncate )attribute (argument_list )argument_list )call )expression_statement (for_statement (identifier_item) identifier_item (attribute (identifier_self) identifier_self (identifier_monitors) identifier_monitors )attribute (block (expression_statement (assignment (subscript (identifier_item) identifier_item (integer_2) integer_2 )subscript (integer_0) integer_0 )assignment )expression_statement )block )for_statement )block )function_definition )module
Removes all data from the buffer.
(module (function_definition (function_name_fill_notebook) function_name_fill_notebook (parameters (identifier_work_notebook) identifier_work_notebook (identifier_script_blocks) identifier_script_blocks )parameters (block (for_statement (pattern_list (identifier_blabel) identifier_blabel (identifier_bcontent) identifier_bcontent (identifier_lineno) identifier_lineno )pattern_list (identifier_script_blocks) identifier_script_blocks (block (if_statement (comparison_operator (identifier_blabel) identifier_blabel (string_'code') string_'code' )comparison_operator (block (expression_statement (call (identifier_add_code_cell) identifier_add_code_cell (argument_list (identifier_work_notebook) identifier_work_notebook (identifier_bcontent) identifier_bcontent )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (identifier_add_markdown_cell) identifier_add_markdown_cell (argument_list (identifier_work_notebook) identifier_work_notebook (binary_operator (identifier_bcontent) identifier_bcontent (string_'\n') string_'\n' )binary_operator )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement )block )function_definition )module
Writes the Jupyter notebook cells Parameters ---------- script_blocks : list Each list element should be a tuple of (label, content, lineno).
(module (function_definition (function_name_validate_enum_attribute) function_name_validate_enum_attribute (parameters (identifier_self) identifier_self (typed_parameter (identifier_attribute) identifier_attribute (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_candidates) identifier_candidates (type (generic_type (identifier_Set) identifier_Set (type_parameter (type (generic_type (identifier_Union) identifier_Union (type_parameter (type (identifier_str) identifier_str )type (type (identifier_int) identifier_int )type (type (identifier_float) identifier_float )type )type_parameter )generic_type )type )type_parameter )generic_type )type )typed_parameter )parameters (type (None) None )type (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add_errors) identifier_add_errors )attribute (argument_list (call (identifier_validate_enum_attribute) identifier_validate_enum_attribute (argument_list (attribute (identifier_self) identifier_self (identifier_fully_qualified_name) identifier_fully_qualified_name )attribute (attribute (identifier_self) identifier_self (identifier__spec) identifier__spec )attribute (identifier_attribute) identifier_attribute (identifier_candidates) identifier_candidates )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Validates that the attribute value is among the candidates
(module (function_definition (function_name_get_migrations_to_down) function_name_get_migrations_to_down (parameters (identifier_self) identifier_self (identifier_migration_id) identifier_migration_id )parameters (block (expression_statement (assignment (identifier_migration_id) identifier_migration_id (call (attribute (identifier_MigrationFile) identifier_MigrationFile (identifier_validate_id) identifier_validate_id )attribute (argument_list (identifier_migration_id) identifier_migration_id )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_migration_id) identifier_migration_id )not_operator (block (return_statement (list )list )return_statement )block )if_statement (expression_statement (assignment (identifier_migrations) identifier_migrations (call (attribute (identifier_self) identifier_self (identifier_get_migration_files) identifier_get_migration_files )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_last_migration_id) identifier_last_migration_id (call (attribute (identifier_self) identifier_self (identifier_get_last_migrated_id) identifier_get_last_migrated_id )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_migration_id) identifier_migration_id (generator_expression (attribute (identifier_m) identifier_m (identifier_id) identifier_id )attribute (for_in_clause (identifier_m) identifier_m (call (attribute (identifier_self) identifier_self (identifier_get_unregistered_migrations) identifier_get_unregistered_migrations )attribute (argument_list )argument_list )call )for_in_clause )generator_expression )comparison_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (binary_operator (string_'Migration is not applied %s') string_'Migration is not applied %s' (identifier_migration_id) identifier_migration_id )binary_operator )argument_list )call )expression_statement (return_statement (list )list )return_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier_migration) identifier_migration (subscript (list_comprehension (identifier_m) identifier_m (for_in_clause (identifier_m) identifier_m (identifier_migrations) identifier_migrations )for_in_clause (if_clause (comparison_operator (attribute (identifier_m) identifier_m (identifier_id) identifier_id )attribute (identifier_migration_id) identifier_migration_id )comparison_operator )if_clause )list_comprehension (integer_0) integer_0 )subscript )assignment )expression_statement )block (except_clause (identifier_IndexError) identifier_IndexError (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (binary_operator (string_'Migration does not exists %s') string_'Migration does not exists %s' (identifier_migration_id) identifier_migration_id )binary_operator )argument_list )call )expression_statement (return_statement (list )list )return_statement )block )except_clause )try_statement (return_statement (call (identifier_list) identifier_list (argument_list (call (identifier_reversed) identifier_reversed (argument_list (list_comprehension (identifier_m) identifier_m (for_in_clause (identifier_m) identifier_m (identifier_migrations) identifier_migrations )for_in_clause (if_clause (comparison_operator (attribute (identifier_migration) identifier_migration (identifier_id) identifier_id )attribute (attribute (identifier_m) identifier_m (identifier_id) identifier_id )attribute (identifier_last_migration_id) identifier_last_migration_id )comparison_operator )if_clause )list_comprehension )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Find migrations to rollback.
(module (function_definition (function_name_pointspace) function_name_pointspace (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_scale_array) identifier_scale_array (call (attribute (identifier_numpy) identifier_numpy (identifier_array) identifier_array )attribute (argument_list (list (list (binary_operator (call (identifier_prefix_factor) identifier_prefix_factor (argument_list (attribute (identifier_self) identifier_self (identifier_independent) identifier_independent )attribute )argument_list )call (parenthesized_expression (unary_operator (integer_1) integer_1 )unary_operator )parenthesized_expression )binary_operator )list (list (binary_operator (call (identifier_prefix_factor) identifier_prefix_factor (argument_list (attribute (identifier_self) identifier_self (identifier_dependent) identifier_dependent )attribute )argument_list )call (parenthesized_expression (unary_operator (integer_1) integer_1 )unary_operator )parenthesized_expression )binary_operator )list )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_linspace) identifier_linspace (call (attribute (identifier_numpy) identifier_numpy (identifier_linspace) identifier_linspace )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_limits) identifier_limits )attribute (integer_0) integer_0 )subscript (subscript (attribute (identifier_self) identifier_self (identifier_limits) identifier_limits )attribute (integer_1) integer_1 )subscript (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (return_statement (dictionary (pair (string_'data') string_'data' (binary_operator (attribute (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (identifier_array) identifier_array )attribute (identifier_scale_array) identifier_scale_array )binary_operator )pair (pair (string_'fit') string_'fit' (binary_operator (call (attribute (identifier_numpy) identifier_numpy (identifier_array) identifier_array )attribute (argument_list (list (identifier_linspace) identifier_linspace (call (attribute (identifier_self) identifier_self (identifier_fitted_function) identifier_fitted_function )attribute (argument_list (identifier_linspace) identifier_linspace )argument_list )call )list )argument_list )call (identifier_scale_array) identifier_scale_array )binary_operator )pair )dictionary )return_statement )block )function_definition )module
Returns a dictionary with the keys `data` and `fit`. `data` is just `scipy_data_fitting.Data.array`. `fit` is a two row [`numpy.ndarray`][1], the first row values correspond to the independent variable and are generated using [`numpy.linspace`][2]. The second row are the values of `scipy_data_fitting.Fit.fitted_function` evaluated on the linspace. For both `fit` and `data`, each row will be scaled by the corresponding inverse prefix if given in `scipy_data_fitting.Fit.independent` or `scipy_data_fitting.Fit.dependent`. Any keyword arguments are passed to [`numpy.linspace`][2]. [1]: http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html [2]: http://docs.scipy.org/doc/numpy/reference/generated/numpy.linspace.html
(module (function_definition (function_name_to_frame) function_name_to_frame (parameters (identifier_self) identifier_self (default_parameter (identifier_index) identifier_index (True) True )default_parameter (default_parameter (identifier_name) identifier_name (None) None )default_parameter )parameters (block (import_from_statement (dotted_name (identifier_pandas) identifier_pandas )dotted_name (dotted_name (identifier_DataFrame) identifier_DataFrame )dotted_name )import_from_statement (if_statement (comparison_operator (identifier_name) identifier_name (None) None )comparison_operator (block (if_statement (not_operator (call (identifier_is_list_like) identifier_is_list_like (argument_list (identifier_name) identifier_name )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (concatenated_string (string_"'name' must be a list / sequence ") string_"'name' must be a list / sequence " (string_"of column names.") string_"of column names." )concatenated_string )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_name) identifier_name )argument_list )call (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_levels) identifier_levels )attribute )argument_list )call )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (concatenated_string (string_"'name' should have same length as ") string_"'name' should have same length as " (string_"number of levels on index.") string_"number of levels on index." )concatenated_string )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_idx_names) identifier_idx_names (identifier_name) identifier_name )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_idx_names) identifier_idx_names (attribute (identifier_self) identifier_self (identifier_names) identifier_names )attribute )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_result) identifier_result (call (identifier_DataFrame) identifier_DataFrame (argument_list (call (identifier_OrderedDict) identifier_OrderedDict (argument_list (list_comprehension (tuple (parenthesized_expression (conditional_expression (identifier_level) identifier_level (comparison_operator (identifier_lvlname) identifier_lvlname (None) None )comparison_operator (identifier_lvlname) identifier_lvlname )conditional_expression )parenthesized_expression (call (attribute (identifier_self) identifier_self (identifier__get_level_values) identifier__get_level_values )attribute (argument_list (identifier_level) identifier_level )argument_list )call )tuple (for_in_clause (pattern_list (identifier_lvlname) identifier_lvlname (identifier_level) identifier_level )pattern_list (call (identifier_zip) identifier_zip (argument_list (identifier_idx_names) identifier_idx_names (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_levels) identifier_levels )attribute )argument_list )call )argument_list )call )argument_list )call )for_in_clause )list_comprehension )argument_list )call (keyword_argument (identifier_copy) identifier_copy (False) False )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (identifier_index) identifier_index (block (expression_statement (assignment (attribute (identifier_result) identifier_result (identifier_index) identifier_index )attribute (identifier_self) identifier_self )assignment )expression_statement )block )if_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Create a DataFrame with the levels of the MultiIndex as columns. Column ordering is determined by the DataFrame constructor with data as a dict. .. versionadded:: 0.24.0 Parameters ---------- index : boolean, default True Set the index of the returned DataFrame as the original MultiIndex. name : list / sequence of strings, optional The passed names should substitute index level names. Returns ------- DataFrame : a DataFrame containing the original MultiIndex data. See Also -------- DataFrame
(module (function_definition (function_name_getOverlayDualAnalogTransform) function_name_getOverlayDualAnalogTransform (parameters (identifier_self) identifier_self (identifier_ulOverlay) identifier_ulOverlay (identifier_eWhich) identifier_eWhich )parameters (block (expression_statement (assignment (identifier_fn) identifier_fn (attribute (attribute (identifier_self) identifier_self (identifier_function_table) identifier_function_table )attribute (identifier_getOverlayDualAnalogTransform) identifier_getOverlayDualAnalogTransform )attribute )assignment )expression_statement (expression_statement (assignment (identifier_pvCenter) identifier_pvCenter (call (identifier_HmdVector2_t) identifier_HmdVector2_t (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_pfRadius) identifier_pfRadius (call (identifier_c_float) identifier_c_float (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (identifier_fn) identifier_fn (argument_list (identifier_ulOverlay) identifier_ulOverlay (identifier_eWhich) identifier_eWhich (call (identifier_byref) identifier_byref (argument_list (identifier_pvCenter) identifier_pvCenter )argument_list )call (call (identifier_byref) identifier_byref (argument_list (identifier_pfRadius) identifier_pfRadius )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_result) identifier_result (identifier_pvCenter) identifier_pvCenter (attribute (identifier_pfRadius) identifier_pfRadius (identifier_value) identifier_value )attribute )expression_list )return_statement )block )function_definition )module
Gets the analog input to Dual Analog coordinate scale for the specified overlay.
(module (function_definition (function_name_render_path) function_name_render_path (parameters (identifier_self) identifier_self (identifier_template_path) identifier_template_path (list_splat_pattern (identifier_context) identifier_context )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_loader) identifier_loader (call (attribute (identifier_self) identifier_self (identifier__make_loader) identifier__make_loader )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_template) identifier_template (call (attribute (identifier_loader) identifier_loader (identifier_read) identifier_read )attribute (argument_list (identifier_template_path) identifier_template_path )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__render_string) identifier__render_string )attribute (argument_list (identifier_template) identifier_template (list_splat (identifier_context) identifier_context )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Render the template at the given path using the given context. Read the render() docstring for more information.
(module (function_definition (function_name_OnSafeModeEntry) function_name_OnSafeModeEntry (parameters (identifier_self) identifier_self (identifier_event) identifier_event )parameters (block (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_main_window) identifier_main_window )attribute (identifier_main_menu) identifier_main_menu )attribute (identifier_enable_file_approve) identifier_enable_file_approve )attribute (argument_list (True) True )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_main_window) identifier_main_window )attribute (identifier_grid) identifier_grid )attribute (identifier_Refresh) identifier_Refresh )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_event) identifier_event (identifier_Skip) identifier_Skip )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Safe mode entry event handler
(module (function_definition (function_name_apply_visitor) function_name_apply_visitor (parameters (identifier_visitor) identifier_visitor (identifier_decl_inst) identifier_decl_inst )parameters (block (expression_statement (assignment (identifier_fname) identifier_fname (binary_operator (string_'visit_') string_'visit_' (line_continuation_\) line_continuation_\ (subscript (attribute (attribute (identifier_decl_inst) identifier_decl_inst (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute (slice (colon) colon (unary_operator (integer_2) integer_2 )unary_operator )slice )subscript )binary_operator )assignment )expression_statement (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_visitor) identifier_visitor (identifier_fname) identifier_fname )argument_list )call )not_operator (block (raise_statement (call (attribute (identifier_runtime_errors) identifier_runtime_errors (identifier_visit_function_has_not_been_found_t) identifier_visit_function_has_not_been_found_t )attribute (argument_list (identifier_visitor) identifier_visitor (identifier_decl_inst) identifier_decl_inst )argument_list )call )raise_statement )block )if_statement (return_statement (call (call (identifier_getattr) identifier_getattr (argument_list (identifier_visitor) identifier_visitor (identifier_fname) identifier_fname )argument_list )call (argument_list )argument_list )call )return_statement )block )function_definition )module
Applies a visitor on declaration instance. :param visitor: instance :type visitor: :class:`type_visitor_t` or :class:`decl_visitor_t`
(module (function_definition (function_name__create_dist) function_name__create_dist (parameters (identifier_self) identifier_self (identifier_dist_tgt) identifier_dist_tgt (identifier_dist_target_dir) identifier_dist_target_dir (identifier_setup_requires_pex) identifier_setup_requires_pex (identifier_snapshot_fingerprint) identifier_snapshot_fingerprint (identifier_is_platform_specific) identifier_is_platform_specific )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__copy_sources) identifier__copy_sources )attribute (argument_list (identifier_dist_tgt) identifier_dist_tgt (identifier_dist_target_dir) identifier_dist_target_dir )argument_list )call )expression_statement (expression_statement (assignment (identifier_setup_py_snapshot_version_argv) identifier_setup_py_snapshot_version_argv (call (attribute (identifier_self) identifier_self (identifier__generate_snapshot_bdist_wheel_argv) identifier__generate_snapshot_bdist_wheel_argv )attribute (argument_list (identifier_snapshot_fingerprint) identifier_snapshot_fingerprint (identifier_is_platform_specific) identifier_is_platform_specific )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cmd) identifier_cmd (call (identifier_safe_shlex_join) identifier_safe_shlex_join (argument_list (call (attribute (identifier_setup_requires_pex) identifier_setup_requires_pex (identifier_cmdline) identifier_cmdline )attribute (argument_list (identifier_setup_py_snapshot_version_argv) identifier_setup_py_snapshot_version_argv )argument_list )call )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (attribute (attribute (identifier_self) identifier_self (identifier_context) identifier_context )attribute (identifier_new_workunit) identifier_new_workunit )attribute (argument_list (string_'setup.py') string_'setup.py' (keyword_argument (identifier_cmd) identifier_cmd (identifier_cmd) identifier_cmd )keyword_argument (keyword_argument (identifier_labels) identifier_labels (list (attribute (identifier_WorkUnitLabel) identifier_WorkUnitLabel (identifier_TOOL) identifier_TOOL )attribute )list )keyword_argument )argument_list )call (as_pattern_target (identifier_workunit) identifier_workunit )as_pattern_target )as_pattern )with_item )with_clause (block (with_statement (with_clause (with_item (call (identifier_pushd) identifier_pushd (argument_list (identifier_dist_target_dir) identifier_dist_target_dir )argument_list )call )with_item )with_clause (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_setup_requires_pex) identifier_setup_requires_pex (identifier_run) identifier_run )attribute (argument_list (keyword_argument (identifier_args) identifier_args (identifier_setup_py_snapshot_version_argv) identifier_setup_py_snapshot_version_argv )keyword_argument (keyword_argument (identifier_stdout) identifier_stdout (call (attribute (identifier_workunit) identifier_workunit (identifier_output) identifier_output )attribute (argument_list (string_'stdout') string_'stdout' )argument_list )call )keyword_argument (keyword_argument (identifier_stderr) identifier_stderr (call (attribute (identifier_workunit) identifier_workunit (identifier_output) identifier_output )attribute (argument_list (string_'stderr') string_'stderr' )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_result) identifier_result (integer_0) integer_0 )comparison_operator (block (raise_statement (call (attribute (identifier_self) identifier_self (identifier_BuildLocalPythonDistributionsError) identifier_BuildLocalPythonDistributionsError )attribute (argument_list (call (attribute (concatenated_string (string_"Installation of python distribution from target {target} into directory {into_dir} ") string_"Installation of python distribution from target {target} into directory {into_dir} " (string_"failed (return value of run() was: {rc!r}).\n") string_"failed (return value of run() was: {rc!r}).\n" (string_"The pex with any requirements is located at: {interpreter}.\n") string_"The pex with any requirements is located at: {interpreter}.\n" (string_"The host system's compiler and linker were used.\n") string_"The host system's compiler and linker were used.\n" (string_"The setup command was: {command}.") string_"The setup command was: {command}." )concatenated_string (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_target) identifier_target (identifier_dist_tgt) identifier_dist_tgt )keyword_argument (keyword_argument (identifier_into_dir) identifier_into_dir (identifier_dist_target_dir) identifier_dist_target_dir )keyword_argument (keyword_argument (identifier_rc) identifier_rc (identifier_result) identifier_result )keyword_argument (keyword_argument (identifier_interpreter) identifier_interpreter (call (attribute (identifier_setup_requires_pex) identifier_setup_requires_pex (identifier_path) identifier_path )attribute (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_command) identifier_command (identifier_setup_py_snapshot_version_argv) identifier_setup_py_snapshot_version_argv )keyword_argument )argument_list )call )argument_list )call )raise_statement )block )if_statement )block )with_statement )block )with_statement )block )function_definition )module
Create a .whl file for the specified python_distribution target.
(module (function_definition (function_name_greg2julian) function_name_greg2julian (parameters (identifier_year) identifier_year (identifier_month) identifier_month (identifier_day) identifier_day (identifier_hour) identifier_hour (identifier_minute) identifier_minute (identifier_second) identifier_second )parameters (block (expression_statement (assignment (identifier_year) identifier_year (call (attribute (identifier_year) identifier_year (identifier_astype) identifier_astype )attribute (argument_list (identifier_float) identifier_float )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_month) identifier_month (call (attribute (identifier_month) identifier_month (identifier_astype) identifier_astype )attribute (argument_list (identifier_float) identifier_float )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_day) identifier_day (call (attribute (identifier_day) identifier_day (identifier_astype) identifier_astype )attribute (argument_list (identifier_float) identifier_float )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_timeut) identifier_timeut (binary_operator (binary_operator (call (attribute (identifier_hour) identifier_hour (identifier_astype) identifier_astype )attribute (argument_list (identifier_float) identifier_float )argument_list )call (parenthesized_expression (binary_operator (call (attribute (identifier_minute) identifier_minute (identifier_astype) identifier_astype )attribute (argument_list (identifier_float) identifier_float )argument_list )call (float_60.0) float_60.0 )binary_operator )parenthesized_expression )binary_operator (line_continuation_\) line_continuation_\ (parenthesized_expression (binary_operator (identifier_second) identifier_second (float_3600.0) float_3600.0 )binary_operator )parenthesized_expression )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_julian_time) identifier_julian_time (parenthesized_expression (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (parenthesized_expression (binary_operator (float_367.0) float_367.0 (identifier_year) identifier_year )binary_operator )parenthesized_expression (call (attribute (identifier_np) identifier_np (identifier_floor) identifier_floor )attribute (argument_list (binary_operator (binary_operator (float_7.0) float_7.0 (parenthesized_expression (binary_operator (identifier_year) identifier_year (call (attribute (identifier_np) identifier_np (identifier_floor) identifier_floor )attribute (argument_list (binary_operator (parenthesized_expression (binary_operator (identifier_month) identifier_month (float_9.0) float_9.0 )binary_operator )parenthesized_expression (float_12.0) float_12.0 )binary_operator )argument_list )call )binary_operator )parenthesized_expression )binary_operator (float_4.0) float_4.0 )binary_operator )argument_list )call )binary_operator (call (attribute (identifier_np) identifier_np (identifier_floor) identifier_floor )attribute (argument_list (binary_operator (binary_operator (float_3.0) float_3.0 (parenthesized_expression (binary_operator (call (attribute (identifier_np) identifier_np (identifier_floor) identifier_floor )attribute (argument_list (binary_operator (parenthesized_expression (binary_operator (identifier_year) identifier_year (binary_operator (parenthesized_expression (binary_operator (identifier_month) identifier_month (float_9.0) float_9.0 )binary_operator )parenthesized_expression (float_7.0) float_7.0 )binary_operator )binary_operator )parenthesized_expression (float_100.0) float_100.0 )binary_operator )argument_list )call (float_1.0) float_1.0 )binary_operator )parenthesized_expression )binary_operator (float_4.0) float_4.0 )binary_operator )argument_list )call )binary_operator (call (attribute (identifier_np) identifier_np (identifier_floor) identifier_floor )attribute (argument_list (binary_operator (parenthesized_expression (binary_operator (float_275.0) float_275.0 (identifier_month) identifier_month )binary_operator )parenthesized_expression (float_9.0) float_9.0 )binary_operator )argument_list )call )binary_operator (identifier_day) identifier_day )binary_operator (float_1721028.5) float_1721028.5 )binary_operator (parenthesized_expression (binary_operator (identifier_timeut) identifier_timeut (float_24.0) float_24.0 )binary_operator )parenthesized_expression )binary_operator )parenthesized_expression )assignment )expression_statement (return_statement (identifier_julian_time) identifier_julian_time )return_statement )block )function_definition )module
Function to convert a date from Gregorian to Julian format :param year: Year of events (integer numpy.ndarray) :param month: Month of events (integer numpy.ndarray) :param day: Days of event (integer numpy.ndarray) :param hour: Hour of event (integer numpy.ndarray) :param minute: Minute of event (integer numpy.ndarray) :param second: Second of event (float numpy.ndarray) :returns julian_time: Julian representation of the time (as float numpy.ndarray)
(module (function_definition (function_name_load_or_import_from_config) function_name_load_or_import_from_config (parameters (identifier_key) identifier_key (default_parameter (identifier_app) identifier_app (None) None )default_parameter (default_parameter (identifier_default) identifier_default (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_app) identifier_app (boolean_operator (identifier_app) identifier_app (identifier_current_app) identifier_current_app )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_imp) identifier_imp (call (attribute (attribute (identifier_app) identifier_app (identifier_config) identifier_config )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_key) identifier_key )argument_list )call )assignment )expression_statement (return_statement (call (identifier_obj_or_import_string) identifier_obj_or_import_string (argument_list (identifier_imp) identifier_imp (keyword_argument (identifier_default) identifier_default (identifier_default) identifier_default )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Load or import value from config. :returns: The loaded value.
(module (function_definition (function_name_probe) function_name_probe (parameters (identifier_w) identifier_w (default_parameter (identifier_name) identifier_name (None) None )default_parameter )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_w) identifier_w (identifier_WireVector) identifier_WireVector )argument_list )call )not_operator (block (raise_statement (call (identifier_PyrtlError) identifier_PyrtlError (argument_list (string_'Only WireVectors can be probed') string_'Only WireVectors can be probed' )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_name) identifier_name (None) None )comparison_operator (block (expression_statement (assignment (identifier_name) identifier_name (binary_operator (string_'(%s: %s)') string_'(%s: %s)' (tuple (call (attribute (identifier_probeIndexer) identifier_probeIndexer (identifier_make_valid_string) identifier_make_valid_string )attribute (argument_list )argument_list )call (attribute (identifier_w) identifier_w (identifier_name) identifier_name )attribute )tuple )binary_operator )assignment )expression_statement )block )if_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (binary_operator (binary_operator (string_"Probe: ") string_"Probe: " (identifier_name) identifier_name )binary_operator (string_' ') string_' ' )binary_operator (call (identifier_get_stack) identifier_get_stack (argument_list (identifier_w) identifier_w )argument_list )call )binary_operator )argument_list )call )expression_statement (expression_statement (assignment (identifier_p) identifier_p (call (identifier_Output) identifier_Output (argument_list (keyword_argument (identifier_name) identifier_name (identifier_name) identifier_name )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_p) identifier_p (identifier_w) identifier_w )augmented_assignment )expression_statement (return_statement (identifier_w) identifier_w )return_statement )block )function_definition )module
Print useful information about a WireVector when in debug mode. :param w: WireVector from which to get info :param name: optional name for probe (defaults to an autogenerated name) :return: original WireVector w Probe can be inserted into a existing design easily as it returns the original wire unmodified. For example ``y <<= x[0:3] + 4`` could be turned into ``y <<= probe(x)[0:3] + 4`` to give visibility into both the origin of ``x`` (including the line that WireVector was originally created) and the run-time values of ``x`` (which will be named and thus show up by default in a trace. Likewise ``y <<= probe(x[0:3]) + 4``, ``y <<= probe(x[0:3] + 4)``, and ``probe(y) <<= x[0:3] + 4`` are all valid uses of `probe`. Note: `probe` does actually add a wire to the working block of w (which can confuse various post-processing transforms such as output to verilog).
(module (function_definition (function_name_process_selectors) function_name_process_selectors (parameters (identifier_self) identifier_self (default_parameter (identifier_index) identifier_index (integer_0) integer_0 )default_parameter (default_parameter (identifier_flags) identifier_flags (integer_0) integer_0 )default_parameter )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_parse_selectors) identifier_parse_selectors )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_selector_iter) identifier_selector_iter )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_pattern) identifier_pattern )attribute )argument_list )call (identifier_index) identifier_index (identifier_flags) identifier_flags )argument_list )call )return_statement )block )function_definition )module
Process selectors. We do our own selectors as BeautifulSoup4 has some annoying quirks, and we don't really need to do nth selectors or siblings or descendants etc.
(module (function_definition (function_name_enclosure_directed) function_name_enclosure_directed (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (pattern_list (identifier_root) identifier_root (identifier_enclosure) identifier_enclosure )pattern_list (call (attribute (identifier_polygons) identifier_polygons (identifier_enclosure_tree) identifier_enclosure_tree )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_polygons_closed) identifier_polygons_closed )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__cache) identifier__cache )attribute (string_'root') string_'root' )subscript (identifier_root) identifier_root )assignment )expression_statement (return_statement (identifier_enclosure) identifier_enclosure )return_statement )block )function_definition )module
Networkx DiGraph of polygon enclosure
(module (function_definition (function_name_rename) function_name_rename (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_mapping) identifier_mapping )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_params) identifier_params (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 (identifier_self) identifier_self (identifier_get_param_values) identifier_get_param_values )attribute (argument_list )argument_list )call )for_in_clause (if_clause (comparison_operator (identifier_k) identifier_k (string_'name') string_'name' )comparison_operator )if_clause )dictionary_comprehension )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (argument_list (keyword_argument (identifier_rename) identifier_rename (identifier_mapping) identifier_mapping )keyword_argument (keyword_argument (identifier_source) identifier_source (parenthesized_expression (conditional_expression (call (attribute (identifier_self) identifier_self (identifier__source) identifier__source )attribute (argument_list )argument_list )call (attribute (identifier_self) identifier_self (identifier__source) identifier__source )attribute (None) None )conditional_expression )parenthesized_expression )keyword_argument (keyword_argument (identifier_linked) identifier_linked (attribute (identifier_self) identifier_self (identifier_linked) identifier_linked )attribute )keyword_argument (dictionary_splat (identifier_params) identifier_params )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
The rename method allows stream parameters to be allocated to new names to avoid clashes with other stream parameters of the same name. Returns a new clone of the stream instance with the specified name mapping.
(module (function_definition (function_name_start) function_name_start (parameters (identifier_self) identifier_self (identifier_local_port) identifier_local_port (identifier_remote_address) identifier_remote_address (identifier_remote_port) identifier_remote_port )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_local_port) identifier_local_port )attribute (identifier_local_port) identifier_local_port )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_remote_address) identifier_remote_address )attribute (identifier_remote_address) identifier_remote_address )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_remote_port) identifier_remote_port )attribute (identifier_remote_port) identifier_remote_port )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (parenthesized_expression (call (attribute (concatenated_string (string_"Starting ssh tunnel {0}:{1}:{2} for ") string_"Starting ssh tunnel {0}:{1}:{2} for " (string_"{3}@{4}") string_"{3}@{4}" )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_local_port) identifier_local_port (identifier_remote_address) identifier_remote_address (identifier_remote_port) identifier_remote_port (attribute (identifier_self) identifier_self (identifier_username) identifier_username )attribute (attribute (identifier_self) identifier_self (identifier_address) identifier_address )attribute )argument_list )call )parenthesized_expression )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_forward) identifier_forward )attribute (call (identifier_Forward) identifier_Forward (argument_list (identifier_local_port) identifier_local_port (identifier_remote_address) identifier_remote_address (identifier_remote_port) identifier_remote_port (attribute (identifier_self) identifier_self (identifier_transport) identifier_transport )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_forward) identifier_forward )attribute (identifier_start) identifier_start )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Start ssh tunnel type: local_port: int param: local_port: local tunnel endpoint ip binding type: remote_address: str param: remote_address: Remote tunnel endpoing ip binding type: remote_port: int param: remote_port: Remote tunnel endpoint port binding
(module (function_definition (function_name_rate_of_change) function_name_rate_of_change (parameters (identifier_data) identifier_data (identifier_period) identifier_period )parameters (block (expression_statement (call (attribute (identifier_catch_errors) identifier_catch_errors (identifier_check_for_period_error) identifier_check_for_period_error )attribute (argument_list (identifier_data) identifier_data (identifier_period) identifier_period )argument_list )call )expression_statement (expression_statement (assignment (identifier_rocs) identifier_rocs (list_comprehension (binary_operator (parenthesized_expression (binary_operator (parenthesized_expression (binary_operator (subscript (identifier_data) identifier_data (identifier_idx) identifier_idx )subscript (subscript (identifier_data) identifier_data (binary_operator (identifier_idx) identifier_idx (parenthesized_expression (binary_operator (identifier_period) identifier_period (integer_1) integer_1 )binary_operator )parenthesized_expression )binary_operator )subscript )binary_operator )parenthesized_expression (subscript (identifier_data) identifier_data (binary_operator (identifier_idx) identifier_idx (parenthesized_expression (binary_operator (identifier_period) identifier_period (integer_1) integer_1 )binary_operator )parenthesized_expression )binary_operator )subscript )binary_operator )parenthesized_expression (integer_100) integer_100 )binary_operator (for_in_clause (identifier_idx) identifier_idx (call (identifier_range) identifier_range (argument_list (binary_operator (identifier_period) identifier_period (integer_1) integer_1 )binary_operator (call (identifier_len) identifier_len (argument_list (identifier_data) identifier_data )argument_list )call )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_rocs) identifier_rocs (call (identifier_fill_for_noncomputable_vals) identifier_fill_for_noncomputable_vals (argument_list (identifier_data) identifier_data (identifier_rocs) identifier_rocs )argument_list )call )assignment )expression_statement (return_statement (identifier_rocs) identifier_rocs )return_statement )block )function_definition )module
Rate of Change. Formula: (Close - Close n periods ago) / (Close n periods ago) * 100
(module (function_definition (function_name_probes_used_extract_scores) function_name_probes_used_extract_scores (parameters (identifier_full_scores) identifier_full_scores (identifier_same_probes) identifier_same_probes )parameters (block (if_statement (comparison_operator (subscript (attribute (identifier_full_scores) identifier_full_scores (identifier_shape) identifier_shape )attribute (integer_1) integer_1 )subscript (subscript (attribute (identifier_same_probes) identifier_same_probes (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript )comparison_operator (block (raise_statement (string_"Size mismatch") string_"Size mismatch" )raise_statement )block )if_statement (import_statement (aliased_import (dotted_name (identifier_numpy) identifier_numpy )dotted_name (identifier_np) identifier_np )aliased_import )import_statement (expression_statement (assignment (identifier_model_scores) identifier_model_scores (call (attribute (identifier_np) identifier_np (identifier_ndarray) identifier_ndarray )attribute (argument_list (tuple (subscript (attribute (identifier_full_scores) identifier_full_scores (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript (call (attribute (identifier_np) identifier_np (identifier_sum) identifier_sum )attribute (argument_list (identifier_same_probes) identifier_same_probes )argument_list )call )tuple (string_'float64') string_'float64' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_c) identifier_c (integer_0) integer_0 )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (integer_0) integer_0 (subscript (attribute (identifier_full_scores) identifier_full_scores (identifier_shape) identifier_shape )attribute (integer_1) integer_1 )subscript )argument_list )call (block (if_statement (subscript (identifier_same_probes) identifier_same_probes (identifier_i) identifier_i )subscript (block (for_statement (identifier_j) identifier_j (call (identifier_range) identifier_range (argument_list (integer_0) integer_0 (subscript (attribute (identifier_full_scores) identifier_full_scores (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript )argument_list )call (block (expression_statement (assignment (subscript (identifier_model_scores) identifier_model_scores (identifier_j) identifier_j (identifier_c) identifier_c )subscript (subscript (identifier_full_scores) identifier_full_scores (identifier_j) identifier_j (identifier_i) identifier_i )subscript )assignment )expression_statement )block )for_statement (expression_statement (augmented_assignment (identifier_c) identifier_c (integer_1) integer_1 )augmented_assignment )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_model_scores) identifier_model_scores )return_statement )block )function_definition )module
Extracts a matrix of scores for a model, given a probes_used row vector of boolean
(module (function_definition (function_name__readall) function_name__readall (parameters (identifier_self) identifier_self (identifier_file) identifier_file (identifier_count) identifier_count )parameters (block (expression_statement (assignment (identifier_data) identifier_data (string_b"") string_b"" )assignment )expression_statement (while_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_data) identifier_data )argument_list )call (identifier_count) identifier_count )comparison_operator (block (expression_statement (assignment (identifier_d) identifier_d (call (attribute (identifier_file) identifier_file (identifier_read) identifier_read )attribute (argument_list (binary_operator (identifier_count) identifier_count (call (identifier_len) identifier_len (argument_list (identifier_data) identifier_data )argument_list )call )binary_operator )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_d) identifier_d )not_operator (block (raise_statement (call (identifier_GeneralProxyError) identifier_GeneralProxyError (argument_list (string_"Connection closed unexpectedly") string_"Connection closed unexpectedly" )argument_list )call )raise_statement )block )if_statement (expression_statement (augmented_assignment (identifier_data) identifier_data (identifier_d) identifier_d )augmented_assignment )expression_statement )block )while_statement (return_statement (identifier_data) identifier_data )return_statement )block )function_definition )module
Receive EXACTLY the number of bytes requested from the file object. Blocks until the required number of bytes have been received.
(module (function_definition (function_name_lockfile) function_name_lockfile (parameters (identifier_lockfile_name) identifier_lockfile_name (default_parameter (identifier_lock_wait_timeout) identifier_lock_wait_timeout (unary_operator (integer_1) integer_1 )unary_operator )default_parameter )parameters (block (function_definition (function_name_decorator) function_name_decorator (parameters (identifier_func) identifier_func )parameters (block (decorated_definition (decorator (call (identifier_wraps) identifier_wraps (argument_list (identifier_func) identifier_func )argument_list )call )decorator (function_definition (function_name_wrapper) function_name_wrapper (parameters (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_lock) identifier_lock (call (identifier_FileLock) identifier_FileLock (argument_list (identifier_lockfile_name) identifier_lockfile_name )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_lock) identifier_lock (identifier_acquire) identifier_acquire )attribute (argument_list (identifier_lock_wait_timeout) identifier_lock_wait_timeout )argument_list )call )expression_statement )block (except_clause (identifier_AlreadyLocked) identifier_AlreadyLocked (block (return_statement )return_statement )block )except_clause (except_clause (identifier_LockTimeout) identifier_LockTimeout (block (return_statement )return_statement )block )except_clause )try_statement (try_statement (block (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_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement )block (finally_clause (block (expression_statement (call (attribute (identifier_lock) identifier_lock (identifier_release) identifier_release )attribute (argument_list )argument_list )call )expression_statement )block )finally_clause )try_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )decorated_definition (return_statement (identifier_wrapper) identifier_wrapper )return_statement )block )function_definition (return_statement (identifier_decorator) identifier_decorator )return_statement )block )function_definition )module
Only runs the method if the lockfile is not acquired. You should create a setting ``LOCKFILE_PATH`` which points to ``/home/username/tmp/``. In your management command, use it like so:: LOCKFILE = os.path.join( settings.LOCKFILE_FOLDER, 'command_name') class Command(NoArgsCommand): @lockfile(LOCKFILE) def handle_noargs(self, **options): # your command here :lockfile_name: A unique name for a lockfile that belongs to the wrapped method. :lock_wait_timeout: Seconds to wait if lockfile is acquired. If ``-1`` we will not wait and just quit.
(module (function_definition (function_name__GetOrderedEntries) function_name__GetOrderedEntries (parameters (identifier_data) identifier_data )parameters (block (function_definition (function_name_Tag) function_name_Tag (parameters (identifier_field) identifier_field )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_field) identifier_field (identifier_string_types) identifier_string_types )argument_list )call (block (return_statement (expression_list (integer_0) integer_0 (identifier_field) identifier_field )expression_list )return_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_field) identifier_field (identifier_int) identifier_int )argument_list )call (block (return_statement (expression_list (integer_1) integer_1 (identifier_field) identifier_field )expression_list )return_statement )block )if_statement (expression_statement (assignment (identifier_message) identifier_message (call (attribute (string_"Unexpected field '{}' of type '{}'") string_"Unexpected field '{}' of type '{}'" (identifier_format) identifier_format )attribute (argument_list (identifier_field) identifier_field (call (identifier_type) identifier_type (argument_list (identifier_field) identifier_field )argument_list )call )argument_list )call )assignment )expression_statement (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (identifier_message) identifier_message )argument_list )call )raise_statement )block )function_definition (for_statement (identifier_field) identifier_field (call (identifier_sorted) identifier_sorted (argument_list (call (identifier_iterkeys) identifier_iterkeys (argument_list (identifier_data) identifier_data )argument_list )call (keyword_argument (identifier_key) identifier_key (identifier_Tag) identifier_Tag )keyword_argument )argument_list )call (block (expression_statement (yield (subscript (identifier_data) identifier_data (identifier_field) identifier_field )subscript )yield )expression_statement )block )for_statement )block )function_definition )module
Gets entries of `RDFProtoStruct` in a well-defined order. Args: data: A raw data dictionary of `RDFProtoStruct`. Yields: Entries of the structured in a well-defined order.
(module (function_definition (function_name_mean_squared_error) function_name_mean_squared_error (parameters (typed_parameter (identifier_pred) identifier_pred (type (identifier_Tensor) identifier_Tensor )type )typed_parameter (typed_parameter (identifier_targ) identifier_targ (type (identifier_Tensor) identifier_Tensor )type )typed_parameter )parameters (type (identifier_Rank0Tensor) identifier_Rank0Tensor )type (block (expression_statement (string_"Mean squared error between `pred` and `targ`.") string_"Mean squared error between `pred` and `targ`." )expression_statement (expression_statement (assignment (pattern_list (identifier_pred) identifier_pred (identifier_targ) identifier_targ )pattern_list (call (identifier_flatten_check) identifier_flatten_check (argument_list (identifier_pred) identifier_pred (identifier_targ) identifier_targ )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_F) identifier_F (identifier_mse_loss) identifier_mse_loss )attribute (argument_list (identifier_pred) identifier_pred (identifier_targ) identifier_targ )argument_list )call )return_statement )block )function_definition )module
Mean squared error between `pred` and `targ`.
(module (function_definition (function_name_instance_norm) function_name_instance_norm (parameters (identifier_x) identifier_x )parameters (block (with_statement (with_clause (with_item (call (attribute (identifier_tf) identifier_tf (identifier_variable_scope) identifier_variable_scope )attribute (argument_list (string_"instance_norm") string_"instance_norm" )argument_list )call )with_item )with_clause (block (expression_statement (assignment (identifier_epsilon) identifier_epsilon (float_1e-5) float_1e-5 )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_mean) identifier_mean (identifier_var) identifier_var )pattern_list (call (attribute (attribute (identifier_tf) identifier_tf (identifier_nn) identifier_nn )attribute (identifier_moments) identifier_moments )attribute (argument_list (identifier_x) identifier_x (list (integer_1) integer_1 (integer_2) integer_2 )list (keyword_argument (identifier_keep_dims) identifier_keep_dims (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_scale) identifier_scale (call (attribute (identifier_tf) identifier_tf (identifier_get_variable) identifier_get_variable )attribute (argument_list (string_"scale") string_"scale" (list (subscript (call (attribute (identifier_x) identifier_x (identifier_get_shape) identifier_get_shape )attribute (argument_list )argument_list )call (unary_operator (integer_1) integer_1 )unary_operator )subscript )list (keyword_argument (identifier_initializer) identifier_initializer (call (attribute (identifier_tf) identifier_tf (identifier_truncated_normal_initializer) identifier_truncated_normal_initializer )attribute (argument_list (keyword_argument (identifier_mean) identifier_mean (float_1.0) float_1.0 )keyword_argument (keyword_argument (identifier_stddev) identifier_stddev (float_0.02) float_0.02 )keyword_argument )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_offset) identifier_offset (call (attribute (identifier_tf) identifier_tf (identifier_get_variable) identifier_get_variable )attribute (argument_list (string_"offset") string_"offset" (list (subscript (call (attribute (identifier_x) identifier_x (identifier_get_shape) identifier_get_shape )attribute (argument_list )argument_list )call (unary_operator (integer_1) integer_1 )unary_operator )subscript )list (keyword_argument (identifier_initializer) identifier_initializer (call (attribute (identifier_tf) identifier_tf (identifier_constant_initializer) identifier_constant_initializer )attribute (argument_list (float_0.0) float_0.0 )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_out) identifier_out (binary_operator (binary_operator (identifier_scale) identifier_scale (call (attribute (identifier_tf) identifier_tf (identifier_div) identifier_div )attribute (argument_list (binary_operator (identifier_x) identifier_x (identifier_mean) identifier_mean )binary_operator (call (attribute (identifier_tf) identifier_tf (identifier_sqrt) identifier_sqrt )attribute (argument_list (binary_operator (identifier_var) identifier_var (identifier_epsilon) identifier_epsilon )binary_operator )argument_list )call )argument_list )call )binary_operator (identifier_offset) identifier_offset )binary_operator )assignment )expression_statement (return_statement (identifier_out) identifier_out )return_statement )block )with_statement )block )function_definition )module
Instance normalization layer.
(module (function_definition (function_name_funding_info) function_name_funding_info (parameters (identifier_self) identifier_self (identifier_key) identifier_key (identifier_value) identifier_value )parameters (block (return_statement (dictionary (pair (string_'agency') string_'agency' (call (attribute (identifier_value) identifier_value (identifier_get) identifier_get )attribute (argument_list (string_'a') string_'a' )argument_list )call )pair (pair (string_'grant_number') string_'grant_number' (call (attribute (identifier_value) identifier_value (identifier_get) identifier_get )attribute (argument_list (string_'c') string_'c' )argument_list )call )pair (pair (string_'project_number') string_'project_number' (call (attribute (identifier_value) identifier_value (identifier_get) identifier_get )attribute (argument_list (string_'f') string_'f' )argument_list )call )pair )dictionary )return_statement )block )function_definition )module
Populate the ``funding_info`` key.
(module (function_definition (function_name_remove_example) function_name_remove_example (parameters (identifier_self) identifier_self (identifier_data) identifier_data (default_parameter (identifier_cloud) identifier_cloud (None) None )default_parameter (default_parameter (identifier_batch) identifier_batch (False) False )default_parameter (default_parameter (identifier_api_key) identifier_api_key (None) None )default_parameter (default_parameter (identifier_version) identifier_version (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_batch) identifier_batch (call (identifier_detect_batch) identifier_detect_batch (argument_list (identifier_data) identifier_data )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (identifier_data_preprocess) identifier_data_preprocess (argument_list (identifier_data) identifier_data (keyword_argument (identifier_batch) identifier_batch (identifier_batch) identifier_batch )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_url_params) identifier_url_params (dictionary (pair (string_"batch") string_"batch" (identifier_batch) identifier_batch )pair (pair (string_"api_key") string_"api_key" (identifier_api_key) identifier_api_key )pair (pair (string_"version") string_"version" (identifier_version) identifier_version )pair (pair (string_'method') string_'method' (string_'remove_example') string_'remove_example' )pair )dictionary )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__api_handler) identifier__api_handler )attribute (argument_list (identifier_data) identifier_data (keyword_argument (identifier_cloud) identifier_cloud (identifier_cloud) identifier_cloud )keyword_argument (keyword_argument (identifier_api) identifier_api (string_"custom") string_"custom" )keyword_argument (keyword_argument (identifier_url_params) identifier_url_params (identifier_url_params) identifier_url_params )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
This is an API made to remove a single instance of training data. This is useful in cases where a single instance of content has been modified, but the remaining examples remain valid. For example, if a piece of content has been retagged. Inputs data - String: The exact text you wish to remove from the given collection. If the string provided does not match a known piece of text then this will fail. Again, this is required if an id is not provided, and vice-versa. api_key (optional) - String: Your API key, required only if the key has not been declared elsewhere. This allows the API to recognize a request as yours and automatically route it to the appropriate destination. cloud (optional) - String: Your private cloud domain, required only if the key has not been declared elsewhere. This allows the API to recognize a request as yours and automatically route it to the appropriate destination.
(module (function_definition (function_name_html_encode) function_name_html_encode (parameters (identifier_text) identifier_text )parameters (block (expression_statement (assignment (identifier_text) identifier_text (call (attribute (identifier_text) identifier_text (identifier_replace) identifier_replace )attribute (argument_list (string_'&') string_'&' (string_'&amp;') string_'&amp;' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_text) identifier_text (call (attribute (identifier_text) identifier_text (identifier_replace) identifier_replace )attribute (argument_list (string_'<') string_'<' (string_'&lt;') string_'&lt;' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_text) identifier_text (call (attribute (identifier_text) identifier_text (identifier_replace) identifier_replace )attribute (argument_list (string_'>') string_'>' (string_'&gt;') string_'&gt;' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_text) identifier_text (call (attribute (identifier_text) identifier_text (identifier_replace) identifier_replace )attribute (argument_list (string_'"') string_'"' (string_'&quot;') string_'&quot;' )argument_list )call )assignment )expression_statement (return_statement (identifier_text) identifier_text )return_statement )block )function_definition )module
Encode characters with a special meaning as HTML. :param text: The plain text (a string). :returns: The text converted to HTML (a string).
(module (function_definition (function_name__parse_ppm_segment) function_name__parse_ppm_segment (parameters (identifier_self) identifier_self (identifier_fptr) identifier_fptr )parameters (block (expression_statement (assignment (identifier_offset) identifier_offset (binary_operator (call (attribute (identifier_fptr) identifier_fptr (identifier_tell) identifier_tell )attribute (argument_list )argument_list )call (integer_2) integer_2 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_read_buffer) identifier_read_buffer (call (attribute (identifier_fptr) identifier_fptr (identifier_read) identifier_read )attribute (argument_list (integer_3) integer_3 )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_length) identifier_length (identifier_zppm) identifier_zppm )pattern_list (call (attribute (identifier_struct) identifier_struct (identifier_unpack) identifier_unpack )attribute (argument_list (string_'>HB') string_'>HB' (identifier_read_buffer) identifier_read_buffer )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_numbytes) identifier_numbytes (binary_operator (identifier_length) identifier_length (integer_3) integer_3 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_read_buffer) identifier_read_buffer (call (attribute (identifier_fptr) identifier_fptr (identifier_read) identifier_read )attribute (argument_list (identifier_numbytes) identifier_numbytes )argument_list )call )assignment )expression_statement (return_statement (call (identifier_PPMsegment) identifier_PPMsegment (argument_list (identifier_zppm) identifier_zppm (identifier_read_buffer) identifier_read_buffer (identifier_length) identifier_length (identifier_offset) identifier_offset )argument_list )call )return_statement )block )function_definition )module
Parse the PPM segment. Parameters ---------- fptr : file Open file object. Returns ------- PPMSegment The current PPM segment.
(module (function_definition (function_name_count_courses) function_name_count_courses (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_c) identifier_c (integer_0) integer_0 )assignment )expression_statement (for_statement (identifier_x) identifier_x (attribute (identifier_self) identifier_self (identifier_tuning) identifier_tuning )attribute (block (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_x) identifier_x )argument_list )call (identifier_list) identifier_list )comparison_operator (block (expression_statement (augmented_assignment (identifier_c) identifier_c (call (identifier_len) identifier_len (argument_list (identifier_x) identifier_x )argument_list )call )augmented_assignment )expression_statement )block (else_clause (block (expression_statement (augmented_assignment (identifier_c) identifier_c (integer_1) integer_1 )augmented_assignment )expression_statement )block )else_clause )if_statement )block )for_statement (return_statement (binary_operator (call (identifier_float) identifier_float (argument_list (identifier_c) identifier_c )argument_list )call (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_tuning) identifier_tuning )attribute )argument_list )call )binary_operator )return_statement )block )function_definition )module
Return the average number of courses per string.
(module (function_definition (function_name_get_catalog_hierarchy_design_session) function_name_get_catalog_hierarchy_design_session (parameters (identifier_self) identifier_self (identifier_proxy) identifier_proxy )parameters (block (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier_supports_catalog_hierarchy_design) identifier_supports_catalog_hierarchy_design )attribute (argument_list )argument_list )call )not_operator (block (raise_statement (call (attribute (identifier_errors) identifier_errors (identifier_Unimplemented) identifier_Unimplemented )attribute (argument_list )argument_list )call )raise_statement )block )if_statement (return_statement (call (attribute (identifier_sessions) identifier_sessions (identifier_CatalogHierarchyDesignSession) identifier_CatalogHierarchyDesignSession )attribute (argument_list (keyword_argument (identifier_proxy) identifier_proxy (identifier_proxy) identifier_proxy )keyword_argument (keyword_argument (identifier_runtime) identifier_runtime (attribute (identifier_self) identifier_self (identifier__runtime) identifier__runtime )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Gets the catalog hierarchy design session. arg: proxy (osid.proxy.Proxy): proxy return: (osid.cataloging.CatalogHierarchyDesignSession) - a ``CatalogHierarchyDesignSession`` raise: NullArgument - ``proxy`` is null raise: OperationFailed - unable to complete request raise: Unimplemented - ``supports_catalog_hierarchy_design()`` is ``false`` *compliance: optional -- This method must be implemented if ``supports_catalog_hierarchy_design()`` is ``true``.*
(module (function_definition (function_name_transform) function_name_transform (parameters (identifier_self) identifier_self (identifier_X) identifier_X )parameters (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_sess) identifier_sess )attribute (identifier_run) identifier_run )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_z_mean) identifier_z_mean )attribute (keyword_argument (identifier_feed_dict) identifier_feed_dict (dictionary (pair (attribute (identifier_self) identifier_self (identifier_x) identifier_x )attribute (identifier_X) identifier_X )pair )dictionary )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Transform data by mapping it into the latent space.
(module (function_definition (function_name_get_logx) function_name_get_logx (parameters (identifier_nlive) identifier_nlive (default_parameter (identifier_simulate) identifier_simulate (False) False )default_parameter )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (assert_statement (comparison_operator (call (attribute (identifier_nlive) identifier_nlive (identifier_min) identifier_min )attribute (argument_list )argument_list )call (integer_0) integer_0 )comparison_operator (parenthesized_expression (binary_operator (string_'nlive contains zeros or negative values! nlive = ') string_'nlive contains zeros or negative values! nlive = ' (call (identifier_str) identifier_str (argument_list (identifier_nlive) identifier_nlive )argument_list )call )binary_operator )parenthesized_expression )assert_statement (if_statement (identifier_simulate) identifier_simulate (block (expression_statement (assignment (identifier_logx_steps) identifier_logx_steps (binary_operator (call (attribute (identifier_np) identifier_np (identifier_log) identifier_log )attribute (argument_list (call (attribute (attribute (identifier_np) identifier_np (identifier_random) identifier_random )attribute (identifier_random) identifier_random )attribute (argument_list (attribute (identifier_nlive) identifier_nlive (identifier_shape) identifier_shape )attribute )argument_list )call )argument_list )call (identifier_nlive) identifier_nlive )binary_operator )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_logx_steps) identifier_logx_steps (binary_operator (unary_operator (integer_1) integer_1 )unary_operator (parenthesized_expression (binary_operator (call (attribute (identifier_nlive) identifier_nlive (identifier_astype) identifier_astype )attribute (argument_list (identifier_float) identifier_float )argument_list )call (unary_operator (integer_1) integer_1 )unary_operator )binary_operator )parenthesized_expression )binary_operator )assignment )expression_statement )block )else_clause )if_statement (return_statement (call (attribute (identifier_np) identifier_np (identifier_cumsum) identifier_cumsum )attribute (argument_list (identifier_logx_steps) identifier_logx_steps )argument_list )call )return_statement )block )function_definition )module
r"""Returns a logx vector showing the expected or simulated logx positions of points. The shrinkage factor between two points .. math:: t_i = X_{i-1} / X_{i} is distributed as the largest of :math:`n_i` uniform random variables between 1 and 0, where :math:`n_i` is the local number of live points. We are interested in .. math:: \log(t_i) = \log X_{i-1} - \log X_{i} which has expected value :math:`-1/n_i`. Parameters ---------- nlive_array: 1d numpy array Ordered local number of live points present at each point's iso-likelihood contour. simulate: bool, optional Should log prior volumes logx be simulated from their distribution (if False their expected values are used). Returns ------- logx: 1d numpy array log X values for points.
(module (function_definition (function_name__FlushAllRows) function_name__FlushAllRows (parameters (identifier_self) identifier_self (identifier_db_connection) identifier_db_connection (identifier_table_name) identifier_table_name )parameters (block (for_statement (identifier_sql) identifier_sql (call (attribute (identifier_db_connection) identifier_db_connection (identifier_iterdump) identifier_iterdump )attribute (argument_list )argument_list )call (block (if_statement (parenthesized_expression (boolean_operator (boolean_operator (call (attribute (identifier_sql) identifier_sql (identifier_startswith) identifier_startswith )attribute (argument_list (string_"CREATE TABLE") string_"CREATE TABLE" )argument_list )call (call (attribute (identifier_sql) identifier_sql (identifier_startswith) identifier_startswith )attribute (argument_list (string_"BEGIN TRANSACTION") string_"BEGIN TRANSACTION" )argument_list )call )boolean_operator (call (attribute (identifier_sql) identifier_sql (identifier_startswith) identifier_startswith )attribute (argument_list (string_"COMMIT") string_"COMMIT" )argument_list )call )boolean_operator )parenthesized_expression (block (continue_statement )continue_statement )block )if_statement (expression_statement (yield (call (attribute (attribute (identifier_self) identifier_self (identifier_archive_generator) identifier_archive_generator )attribute (identifier_WriteFileChunk) identifier_WriteFileChunk )attribute (argument_list (call (attribute (parenthesized_expression (binary_operator (identifier_sql) identifier_sql (string_"\n") string_"\n" )binary_operator )parenthesized_expression (identifier_encode) identifier_encode )attribute (argument_list (string_"utf-8") string_"utf-8" )argument_list )call )argument_list )call )yield )expression_statement )block )for_statement (with_statement (with_clause (with_item (identifier_db_connection) identifier_db_connection )with_item )with_clause (block (expression_statement (call (attribute (call (attribute (identifier_db_connection) identifier_db_connection (identifier_cursor) identifier_cursor )attribute (argument_list )argument_list )call (identifier_execute) identifier_execute )attribute (argument_list (binary_operator (string_"DELETE FROM \"%s\";") string_"DELETE FROM \"%s\";" (identifier_table_name) identifier_table_name )binary_operator )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Copies rows from the given db into the output file then deletes them.
(module (function_definition (function_name_refactor) function_name_refactor (parameters (identifier_self) identifier_self (identifier_items) identifier_items (default_parameter (identifier_write) identifier_write (False) False )default_parameter (default_parameter (identifier_doctests_only) identifier_doctests_only (False) False )default_parameter )parameters (block (for_statement (identifier_dir_or_file) identifier_dir_or_file (identifier_items) identifier_items (block (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isdir) identifier_isdir )attribute (argument_list (identifier_dir_or_file) identifier_dir_or_file )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_refactor_dir) identifier_refactor_dir )attribute (argument_list (identifier_dir_or_file) identifier_dir_or_file (identifier_write) identifier_write (identifier_doctests_only) identifier_doctests_only )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_refactor_file) identifier_refactor_file )attribute (argument_list (identifier_dir_or_file) identifier_dir_or_file (identifier_write) identifier_write (identifier_doctests_only) identifier_doctests_only )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement )block )function_definition )module
Refactor a list of files and directories.
(module (function_definition (function_name_reset) function_name_reset (parameters (default_parameter (identifier_all) identifier_all (False) False )default_parameter (default_parameter (identifier_vms) identifier_vms (False) False )default_parameter (default_parameter (identifier_switches) identifier_switches (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (False) False )assignment )expression_statement (expression_statement (assignment (identifier_cmd) identifier_cmd (list (string_'vmctl') string_'vmctl' (string_'reset') string_'reset' )list )assignment )expression_statement (if_statement (identifier_all) identifier_all (block (expression_statement (call (attribute (identifier_cmd) identifier_cmd (identifier_append) identifier_append )attribute (argument_list (string_'all') string_'all' )argument_list )call )expression_statement )block (elif_clause (identifier_vms) identifier_vms (block (expression_statement (call (attribute (identifier_cmd) identifier_cmd (identifier_append) identifier_append )attribute (argument_list (string_'vms') string_'vms' )argument_list )call )expression_statement )block )elif_clause (elif_clause (identifier_switches) identifier_switches (block (expression_statement (call (attribute (identifier_cmd) identifier_cmd (identifier_append) identifier_append )attribute (argument_list (string_'switches') string_'switches' )argument_list )call )expression_statement )block )elif_clause )if_statement (expression_statement (assignment (identifier_result) identifier_result (call (subscript (identifier___salt__) identifier___salt__ (string_'cmd.run_all') string_'cmd.run_all' )subscript (argument_list (identifier_cmd) identifier_cmd (keyword_argument (identifier_output_loglevel) identifier_output_loglevel (string_'trace') string_'trace' )keyword_argument (keyword_argument (identifier_python_shell) identifier_python_shell (False) False )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (subscript (identifier_result) identifier_result (string_'retcode') string_'retcode' )subscript (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_ret) identifier_ret (True) True )assignment )expression_statement )block (else_clause (block (raise_statement (call (identifier_CommandExecutionError) identifier_CommandExecutionError (argument_list (string_'Problem encountered running vmctl') string_'Problem encountered running vmctl' (keyword_argument (identifier_info) identifier_info (dictionary (pair (string_'errors') string_'errors' (list (subscript (identifier_result) identifier_result (string_'stderr') string_'stderr' )subscript )list )pair (pair (string_'changes') string_'changes' (identifier_ret) identifier_ret )pair )dictionary )keyword_argument )argument_list )call )raise_statement )block )else_clause )if_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Reset the running state of VMM or a subsystem. all: Reset the running state. switches: Reset the configured switches. vms: Reset and terminate all VMs. CLI Example: .. code-block:: bash salt '*' vmctl.reset all=True
(module (function_definition (function_name__stream_docker_logs) function_name__stream_docker_logs (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_thread) identifier_thread (call (attribute (identifier_threading) identifier_threading (identifier_Thread) identifier_Thread )attribute (argument_list (keyword_argument (identifier_target) identifier_target (attribute (identifier_self) identifier_self (identifier__stderr_stream_worker) identifier__stderr_stream_worker )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_thread) identifier_thread (identifier_start) identifier_start )attribute (argument_list )argument_list )call )expression_statement (for_statement (identifier_line) identifier_line (call (attribute (attribute (identifier_self) identifier_self (identifier_docker_client) identifier_docker_client )attribute (identifier_logs) identifier_logs )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_container) identifier_container )attribute (keyword_argument (identifier_stdout) identifier_stdout (True) True )keyword_argument (keyword_argument (identifier_stderr) identifier_stderr (False) False )keyword_argument (keyword_argument (identifier_stream) identifier_stream (True) True )keyword_argument )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute (identifier_write) identifier_write )attribute (argument_list (identifier_line) identifier_line )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_thread) identifier_thread (identifier_join) identifier_join )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Stream stdout and stderr from the task container to this process's stdout and stderr, respectively.
(module (function_definition (function_name_exists) function_name_exists (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_path) identifier_path (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute )assignment )expression_statement (if_statement (boolean_operator (boolean_operator (boolean_operator (comparison_operator (string_'*') string_'*' (identifier_path) identifier_path )comparison_operator (comparison_operator (string_'?') string_'?' (identifier_path) identifier_path )comparison_operator )boolean_operator (comparison_operator (string_'[') string_'[' (identifier_path) identifier_path )comparison_operator )boolean_operator (comparison_operator (string_'{') string_'{' (identifier_path) identifier_path )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_warning) identifier_warning )attribute (argument_list (concatenated_string (string_"Using wildcards in path %s might lead to processing of an incomplete dataset; ") string_"Using wildcards in path %s might lead to processing of an incomplete dataset; " (string_"override exists() to suppress the warning.") string_"override exists() to suppress the warning." )concatenated_string (identifier_path) identifier_path )argument_list )call )expression_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_fs) identifier_fs )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_path) identifier_path )argument_list )call )return_statement )block )function_definition )module
Returns ``True`` if the path for this FileSystemTarget exists; ``False`` otherwise. This method is implemented by using :py:attr:`fs`.
(module (function_definition (function_name_run_query) function_name_run_query (parameters (identifier_db) identifier_db (identifier_query) identifier_query )parameters (block (if_statement (comparison_operator (identifier_db) identifier_db (list_comprehension (subscript (call (attribute (identifier_x) identifier_x (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript (for_in_clause (identifier_x) identifier_x (call (identifier_show_dbs) identifier_show_dbs (argument_list )argument_list )call )for_in_clause )list_comprehension )comparison_operator (block (expression_statement (assignment (identifier_conn) identifier_conn (call (identifier__connect) identifier__connect (argument_list (subscript (subscript (call (identifier_show_dbs) identifier_show_dbs (argument_list (identifier_db) identifier_db )argument_list )call (identifier_db) identifier_db )subscript (string_'uri') string_'uri' )subscript )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (string_'No uri found in pillars - will try to use oratab') string_'No uri found in pillars - will try to use oratab' )argument_list )call )expression_statement (expression_statement (assignment (identifier_conn) identifier_conn (call (identifier__connect) identifier__connect (argument_list (keyword_argument (identifier_uri) identifier_uri (identifier_db) identifier_db )keyword_argument )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (call (attribute (call (attribute (call (attribute (identifier_conn) identifier_conn (identifier_cursor) identifier_cursor )attribute (argument_list )argument_list )call (identifier_execute) identifier_execute )attribute (argument_list (identifier_query) identifier_query )argument_list )call (identifier_fetchall) identifier_fetchall )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Run SQL query and return result CLI Example: .. code-block:: bash salt '*' oracle.run_query my_db "select * from my_table"
(module (function_definition (function_name_strictly_positive_int_or_none) function_name_strictly_positive_int_or_none (parameters (identifier_val) identifier_val )parameters (block (expression_statement (assignment (identifier_val) identifier_val (call (identifier_positive_int_or_none) identifier_positive_int_or_none (argument_list (identifier_val) identifier_val )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_val) identifier_val (None) None )comparison_operator (comparison_operator (identifier_val) identifier_val (integer_0) integer_0 )comparison_operator )boolean_operator (block (return_statement (identifier_val) identifier_val )return_statement )block )if_statement (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_'"{}" must be strictly positive') string_'"{}" must be strictly positive' (identifier_format) identifier_format )attribute (argument_list (identifier_val) identifier_val )argument_list )call )argument_list )call )raise_statement )block )function_definition )module
Parse `val` into either `None` or a strictly positive integer.
(module (function_definition (function_name__get_top_file_envs) function_name__get_top_file_envs (parameters )parameters (block (try_statement (block (return_statement (subscript (identifier___context__) identifier___context__ (string_'saltutil._top_file_envs') string_'saltutil._top_file_envs' )subscript )return_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (try_statement (block (expression_statement (assignment (identifier_st_) identifier_st_ (call (attribute (attribute (identifier_salt) identifier_salt (identifier_state) identifier_state )attribute (identifier_HighState) identifier_HighState )attribute (argument_list (identifier___opts__) identifier___opts__ (keyword_argument (identifier_initial_pillar) identifier_initial_pillar (identifier___pillar__) identifier___pillar__ )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_top) identifier_top (call (attribute (identifier_st_) identifier_st_ (identifier_get_top) identifier_get_top )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (identifier_top) identifier_top (block (expression_statement (assignment (identifier_envs) identifier_envs (boolean_operator (call (identifier_list) identifier_list (argument_list (call (attribute (call (attribute (identifier_st_) identifier_st_ (identifier_top_matches) identifier_top_matches )attribute (argument_list (identifier_top) identifier_top )argument_list )call (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call (string_'base') string_'base' )boolean_operator )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_envs) identifier_envs (string_'base') string_'base' )assignment )expression_statement )block )else_clause )if_statement )block (except_clause (as_pattern (identifier_SaltRenderError) identifier_SaltRenderError (as_pattern_target (identifier_exc) identifier_exc )as_pattern_target )as_pattern (block (raise_statement (call (identifier_CommandExecutionError) identifier_CommandExecutionError (argument_list (call (attribute (string_'Unable to render top file(s): {0}') string_'Unable to render top file(s): {0}' (identifier_format) identifier_format )attribute (argument_list (identifier_exc) identifier_exc )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement (expression_statement (assignment (subscript (identifier___context__) identifier___context__ (string_'saltutil._top_file_envs') string_'saltutil._top_file_envs' )subscript (identifier_envs) identifier_envs )assignment )expression_statement (return_statement (identifier_envs) identifier_envs )return_statement )block )except_clause )try_statement )block )function_definition )module
Get all environments from the top file
(module (function_definition (function_name_time_reached) function_name_time_reached (parameters (identifier_self) identifier_self (identifier_current_time) identifier_current_time (identifier_scheduled_call) identifier_scheduled_call )parameters (block (if_statement (comparison_operator (identifier_current_time) identifier_current_time (subscript (identifier_scheduled_call) identifier_scheduled_call (string_'ts') string_'ts' )subscript )comparison_operator (block (expression_statement (call (subscript (identifier_scheduled_call) identifier_scheduled_call (string_'callback') string_'callback' )subscript (argument_list (subscript (identifier_scheduled_call) identifier_scheduled_call (string_'args') string_'args' )subscript )argument_list )call )expression_statement (return_statement (True) True )return_statement )block (else_clause (block (return_statement (False) False )return_statement )block )else_clause )if_statement )block )function_definition )module
Checks to see if it's time to run a scheduled call or not. If it IS time to run a scheduled call, this function will execute the method associated with that call. Args: current_time (float): Current timestamp from time.time(). scheduled_call (dict): A scheduled call dictionary that contains the timestamp to execute the call, the method to execute, and the arguments used to call the method. Returns: None Examples: >>> scheduled_call {'callback': <function foo at 0x7f022c42cf50>, 'args': {'k': 'v'}, 'ts': 1415066599.769509}
(module (function_definition (function_name_determine_band_channel) function_name_determine_band_channel (parameters (identifier_kal_out) identifier_kal_out )parameters (block (expression_statement (assignment (identifier_band) identifier_band (string_"") string_"" )assignment )expression_statement (expression_statement (assignment (identifier_channel) identifier_channel (string_"") string_"" )assignment )expression_statement (expression_statement (assignment (identifier_tgt_freq) identifier_tgt_freq (string_"") string_"" )assignment )expression_statement (while_statement (comparison_operator (identifier_band) identifier_band (string_"") string_"" )comparison_operator (block (for_statement (identifier_line) identifier_line (call (attribute (identifier_kal_out) identifier_kal_out (identifier_splitlines) identifier_splitlines )attribute (argument_list )argument_list )call (block (if_statement (boolean_operator (comparison_operator (string_"Using ") string_"Using " (identifier_line) identifier_line )comparison_operator (comparison_operator (string_" channel ") string_" channel " (identifier_line) identifier_line )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_band) identifier_band (call (identifier_str) identifier_str (argument_list (subscript (call (attribute (identifier_line) identifier_line (identifier_split) identifier_split )attribute (argument_list )argument_list )call (integer_1) integer_1 )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_channel) identifier_channel (call (identifier_str) identifier_str (argument_list (subscript (call (attribute (identifier_line) identifier_line (identifier_split) identifier_split )attribute (argument_list )argument_list )call (integer_3) integer_3 )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tgt_freq) identifier_tgt_freq (call (attribute (call (attribute (call (identifier_str) identifier_str (argument_list (subscript (call (attribute (identifier_line) identifier_line (identifier_split) identifier_split )attribute (argument_list )argument_list )call (integer_4) integer_4 )subscript )argument_list )call (identifier_replace) identifier_replace )attribute (argument_list (string_"(") string_"(" (string_"") string_"" )argument_list )call (identifier_replace) identifier_replace )attribute (argument_list (string_")") string_")" (string_"") string_"" )argument_list )call )assignment )expression_statement )block )if_statement )block )for_statement (if_statement (comparison_operator (identifier_band) identifier_band (string_"") string_"" )comparison_operator (block (expression_statement (assignment (identifier_band) identifier_band (None) None )assignment )expression_statement )block )if_statement )block )while_statement (return_statement (tuple (identifier_band) identifier_band (identifier_channel) identifier_channel (identifier_tgt_freq) identifier_tgt_freq )tuple )return_statement )block )function_definition )module
Return band, channel, target frequency from kal output.
(module (function_definition (function_name___marshal_matches) function_name___marshal_matches (parameters (identifier_matched) identifier_matched )parameters (block (expression_statement (assignment (identifier_json_matches) identifier_json_matches (list )list )assignment )expression_statement (for_statement (identifier_m) identifier_m (identifier_matched) identifier_matched (block (expression_statement (assignment (identifier_identities) identifier_identities (list_comprehension (attribute (identifier_i) identifier_i (identifier_uuid) identifier_uuid )attribute (for_in_clause (identifier_i) identifier_i (identifier_m) identifier_m )for_in_clause )list_comprehension )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_identities) identifier_identities )argument_list )call (integer_1) integer_1 )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_json_match) identifier_json_match (dictionary (pair (string_'identities') string_'identities' (identifier_identities) identifier_identities )pair (pair (string_'processed') string_'processed' (False) False )pair )dictionary )assignment )expression_statement (expression_statement (call (attribute (identifier_json_matches) identifier_json_matches (identifier_append) identifier_append )attribute (argument_list (identifier_json_match) identifier_json_match )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_json_matches) identifier_json_matches )return_statement )block )function_definition )module
Convert matches to JSON format. :param matched: a list of matched identities :returns json_matches: a list of matches in JSON format
(module (function_definition (function_name__extract_delta) function_name__extract_delta (parameters (identifier_expr) identifier_expr (identifier_idx) identifier_idx )parameters (block (import_from_statement (dotted_name (identifier_qnet) identifier_qnet (identifier_algebra) identifier_algebra (identifier_core) identifier_core (identifier_abstract_quantum_algebra) identifier_abstract_quantum_algebra )dotted_name (dotted_name (identifier_QuantumExpression) identifier_QuantumExpression )dotted_name )import_from_statement (import_from_statement (dotted_name (identifier_qnet) identifier_qnet (identifier_algebra) identifier_algebra (identifier_core) identifier_core (identifier_scalar_algebra) identifier_scalar_algebra )dotted_name (dotted_name (identifier_ScalarValue) identifier_ScalarValue )dotted_name )import_from_statement (expression_statement (assignment (pattern_list (identifier_sympy_factor) identifier_sympy_factor (identifier_quantum_factor) identifier_quantum_factor )pattern_list (call (identifier__split_sympy_quantum_factor) identifier__split_sympy_quantum_factor (argument_list (identifier_expr) identifier_expr )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_delta) identifier_delta (identifier_new_expr) identifier_new_expr )pattern_list (call (identifier__sympy_extract_delta) identifier__sympy_extract_delta (argument_list (identifier_sympy_factor) identifier_sympy_factor (identifier_idx) identifier_idx )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_delta) identifier_delta (None) None )comparison_operator (block (expression_statement (assignment (identifier_new_expr) identifier_new_expr (identifier_expr) identifier_expr )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_new_expr) identifier_new_expr (binary_operator (identifier_new_expr) identifier_new_expr (identifier_quantum_factor) identifier_quantum_factor )binary_operator )assignment )expression_statement )block )else_clause )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_new_expr) identifier_new_expr (attribute (identifier_ScalarValue) identifier_ScalarValue (identifier__val_types) identifier__val_types )attribute )argument_list )call (block (expression_statement (assignment (identifier_new_expr) identifier_new_expr (call (attribute (identifier_ScalarValue) identifier_ScalarValue (identifier_create) identifier_create )attribute (argument_list (identifier_new_expr) identifier_new_expr )argument_list )call )assignment )expression_statement )block )if_statement (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_new_expr) identifier_new_expr (identifier_QuantumExpression) identifier_QuantumExpression )argument_list )call )assert_statement (return_statement (expression_list (identifier_delta) identifier_delta (identifier_new_expr) identifier_new_expr )expression_list )return_statement )block )function_definition )module
Extract a "simple" Kronecker delta containing `idx` from `expr`. Assuming `expr` can be written as the product of a Kronecker Delta and a `new_expr`, return a tuple of the sympy.KroneckerDelta instance and `new_expr`. Otherwise, return a tuple of None and the original `expr` (possibly converted to a :class:`.QuantumExpression`). On input, `expr` can be a :class:`QuantumExpression` or a :class:`sympy.Basic` object. On output, `new_expr` is guaranteed to be a :class:`QuantumExpression`.
(module (function_definition (function_name_run_cleanup) function_name_run_cleanup (parameters (identifier_build_ext_cmd) identifier_build_ext_cmd )parameters (block (if_statement (not_operator (attribute (identifier_build_ext_cmd) identifier_build_ext_cmd (identifier_inplace) identifier_inplace )attribute )not_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_bezier_dir) identifier_bezier_dir (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (string_"src") string_"src" (string_"bezier") string_"bezier" )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_shutil) identifier_shutil (identifier_move) identifier_move )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_build_ext_cmd) identifier_build_ext_cmd (identifier_build_lib) identifier_build_lib )attribute (identifier_LIB_DIR) identifier_LIB_DIR )argument_list )call (identifier_bezier_dir) identifier_bezier_dir )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_shutil) identifier_shutil (identifier_move) identifier_move )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_build_ext_cmd) identifier_build_ext_cmd (identifier_build_lib) identifier_build_lib )attribute (identifier_DLL_DIR) identifier_DLL_DIR )argument_list )call (identifier_bezier_dir) identifier_bezier_dir )argument_list )call )expression_statement )block )function_definition )module
Cleanup after ``BuildFortranThenExt.run``. For in-place builds, moves the built shared library into the source directory.
(module (function_definition (function_name_connect) function_name_connect (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (parenthesized_expression (boolean_operator (boolean_operator (boolean_operator (attribute (identifier_self) identifier_self (identifier_consumer_key) identifier_consumer_key )attribute (attribute (identifier_self) identifier_self (identifier_consumer_secret) identifier_consumer_secret )attribute )boolean_operator (attribute (identifier_self) identifier_self (identifier_access_token) identifier_access_token )attribute )boolean_operator (attribute (identifier_self) identifier_self (identifier_access_token_secret) identifier_access_token_secret )attribute )boolean_operator )parenthesized_expression )not_operator (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (string_"MissingKeys") string_"MissingKeys" )argument_list )call )raise_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (string_"closing existing http session") string_"closing existing http session" )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier_last_response) identifier_last_response )attribute (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (string_"closing last response") string_"closing last response" )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_last_response) identifier_last_response )attribute (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (string_"creating http session") string_"creating http session" )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (call (identifier_OAuth1Session) identifier_OAuth1Session (argument_list (keyword_argument (identifier_client_key) identifier_client_key (attribute (identifier_self) identifier_self (identifier_consumer_key) identifier_consumer_key )attribute )keyword_argument (keyword_argument (identifier_client_secret) identifier_client_secret (attribute (identifier_self) identifier_self (identifier_consumer_secret) identifier_consumer_secret )attribute )keyword_argument (keyword_argument (identifier_resource_owner_key) identifier_resource_owner_key (attribute (identifier_self) identifier_self (identifier_access_token) identifier_access_token )attribute )keyword_argument (keyword_argument (identifier_resource_owner_secret) identifier_resource_owner_secret (attribute (identifier_self) identifier_self (identifier_access_token_secret) identifier_access_token_secret )attribute )keyword_argument )argument_list )call )assignment )expression_statement )block )function_definition )module
Sets up the HTTP session to talk to Twitter. If one is active it is closed and another one is opened.
(module (function_definition (function_name_rm_gos) function_name_rm_gos (parameters (identifier_self) identifier_self (identifier_rm_goids) identifier_rm_goids )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_edges) identifier_edges )attribute (call (attribute (identifier_self) identifier_self (identifier__rm_gos_edges) identifier__rm_gos_edges )attribute (argument_list (identifier_rm_goids) identifier_rm_goids (attribute (identifier_self) identifier_self (identifier_edges) identifier_edges )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_edges_rel) identifier_edges_rel )attribute (call (attribute (identifier_self) identifier_self (identifier__rm_gos_edges_rel) identifier__rm_gos_edges_rel )attribute (argument_list (identifier_rm_goids) identifier_rm_goids (attribute (identifier_self) identifier_self (identifier_edges_rel) identifier_edges_rel )attribute )argument_list )call )assignment )expression_statement )block )function_definition )module
Remove any edges that contain user-specified edges.
(module (function_definition (function_name_replace) function_name_replace (parameters (identifier_self) identifier_self (identifier_old) identifier_old (identifier_new) identifier_new )parameters (block (if_statement (comparison_operator (attribute (identifier_old) identifier_old (identifier_type) identifier_type )attribute (attribute (identifier_new) identifier_new (identifier_type) identifier_type )attribute )comparison_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"new instruction has a different type") string_"new instruction has a different type" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_pos) identifier_pos (call (attribute (attribute (identifier_self) identifier_self (identifier_instructions) identifier_instructions )attribute (identifier_index) identifier_index )attribute (argument_list (identifier_old) identifier_old )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_instructions) identifier_instructions )attribute (identifier_remove) identifier_remove )attribute (argument_list (identifier_old) identifier_old )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_instructions) identifier_instructions )attribute (identifier_insert) identifier_insert )attribute (argument_list (identifier_pos) identifier_pos (identifier_new) identifier_new )argument_list )call )expression_statement (for_statement (identifier_bb) identifier_bb (attribute (attribute (identifier_self) identifier_self (identifier_parent) identifier_parent )attribute (identifier_basic_blocks) identifier_basic_blocks )attribute (block (for_statement (identifier_instr) identifier_instr (attribute (identifier_bb) identifier_bb (identifier_instructions) identifier_instructions )attribute (block (expression_statement (call (attribute (identifier_instr) identifier_instr (identifier_replace_usage) identifier_replace_usage )attribute (argument_list (identifier_old) identifier_old (identifier_new) identifier_new )argument_list )call )expression_statement )block )for_statement )block )for_statement )block )function_definition )module
Replace an instruction
(module (function_definition (function_name_get) function_name_get (parameters (identifier_self) identifier_self (identifier_obj) identifier_obj (identifier_id) identifier_id (default_parameter (identifier_sub_object) identifier_sub_object (None) None )default_parameter )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_url) identifier_url )attribute (call (attribute (string_'{}{}/{}') string_'{}{}/{}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_base_url) identifier_base_url )attribute (identifier_obj) identifier_obj (identifier_id) identifier_id )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_method) identifier_method )attribute (string_'GET') string_'GET' )assignment )expression_statement (if_statement (identifier_sub_object) identifier_sub_object (block (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_url) identifier_url )attribute (binary_operator (string_'/') string_'/' (identifier_sub_object) identifier_sub_object )binary_operator )augmented_assignment )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_resp) identifier_resp )attribute (call (attribute (identifier_requests) identifier_requests (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier_url) identifier_url (attribute (identifier_self) identifier_self (identifier_url) identifier_url )attribute )keyword_argument (keyword_argument (identifier_auth) identifier_auth (attribute (identifier_self) identifier_self (identifier_auth) identifier_auth )attribute )keyword_argument (keyword_argument (identifier_headers) identifier_headers (attribute (identifier_self) identifier_self (identifier_headers) identifier_headers )attribute )keyword_argument (keyword_argument (identifier_cert) identifier_cert (attribute (identifier_self) identifier_self (identifier_ca_cert) identifier_ca_cert )attribute )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_self) identifier_self (identifier___process_resp__) identifier___process_resp__ )attribute (argument_list (identifier_obj) identifier_obj )argument_list )call (block (return_statement (attribute (identifier_self) identifier_self (identifier_res) identifier_res )attribute )return_statement )block )if_statement (return_statement (False) False )return_statement )block )function_definition )module
Function get Get an object by id @param obj: object name ('hosts', 'puppetclasses'...) @param id: the id of the object (name or id) @return RETURN: the targeted object
(module (function_definition (function_name_concretize_write_addr) function_name_concretize_write_addr (parameters (identifier_self) identifier_self (identifier_addr) identifier_addr (default_parameter (identifier_strategies) identifier_strategies (None) None )default_parameter )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_addr) identifier_addr (identifier_int) identifier_int )argument_list )call (block (return_statement (list (identifier_addr) identifier_addr )list )return_statement )block (elif_clause (not_operator (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_state) identifier_state )attribute (identifier_solver) identifier_solver )attribute (identifier_symbolic) identifier_symbolic )attribute (argument_list (identifier_addr) identifier_addr )argument_list )call )not_operator (block (return_statement (list (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_state) identifier_state )attribute (identifier_solver) identifier_solver )attribute (identifier_eval) identifier_eval )attribute (argument_list (identifier_addr) identifier_addr )argument_list )call )list )return_statement )block )elif_clause )if_statement (expression_statement (assignment (identifier_strategies) identifier_strategies (conditional_expression (attribute (identifier_self) identifier_self (identifier_write_strategies) identifier_write_strategies )attribute (comparison_operator (identifier_strategies) identifier_strategies (None) None )comparison_operator (identifier_strategies) identifier_strategies )conditional_expression )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__apply_concretization_strategies) identifier__apply_concretization_strategies )attribute (argument_list (identifier_addr) identifier_addr (identifier_strategies) identifier_strategies (string_'store') string_'store' )argument_list )call )return_statement )block )function_definition )module
Concretizes an address meant for writing. :param addr: An expression for the address. :param strategies: A list of concretization strategies (to override the default). :returns: A list of concrete addresses.
(module (function_definition (function_name_run) function_name_run (parameters (identifier_self) identifier_self (identifier_cmd) identifier_cmd (default_parameter (identifier_fn) identifier_fn (None) None )default_parameter (default_parameter (identifier_globals) identifier_globals (None) None )default_parameter (default_parameter (identifier_locals) identifier_locals (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_globals) identifier_globals (None) None )comparison_operator (block (import_statement (dotted_name (identifier___main__) identifier___main__ )dotted_name )import_statement (expression_statement (assignment (identifier_globals) identifier_globals (attribute (identifier___main__) identifier___main__ (identifier___dict__) identifier___dict__ )attribute )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_locals) identifier_locals (None) None )comparison_operator (block (expression_statement (assignment (identifier_locals) identifier_locals (identifier_globals) identifier_globals )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_reset) identifier_reset )attribute (argument_list )argument_list )call )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_cmd) identifier_cmd (identifier_str) identifier_str )argument_list )call (block (expression_statement (assignment (identifier_str_cmd) identifier_str_cmd (identifier_cmd) identifier_cmd )assignment )expression_statement (expression_statement (assignment (identifier_cmd) identifier_cmd (call (identifier_compile) identifier_compile (argument_list (identifier_str_cmd) identifier_str_cmd (boolean_operator (identifier_fn) identifier_fn (string_"<wdb>") string_"<wdb>" )boolean_operator (string_"exec") string_"exec" )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_compile_cache) identifier_compile_cache )attribute (call (identifier_id) identifier_id (argument_list (identifier_cmd) identifier_cmd )argument_list )call )subscript (identifier_str_cmd) identifier_str_cmd )assignment )expression_statement )block )if_statement (if_statement (identifier_fn) identifier_fn (block (import_from_statement (dotted_name (identifier_linecache) identifier_linecache )dotted_name (dotted_name (identifier_getline) identifier_getline )dotted_name )import_from_statement (expression_statement (assignment (identifier_lno) identifier_lno (integer_1) integer_1 )assignment )expression_statement (while_statement (True) True (block (expression_statement (assignment (identifier_line) identifier_line (call (identifier_getline) identifier_getline (argument_list (identifier_fn) identifier_fn (identifier_lno) identifier_lno (identifier_globals) identifier_globals )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_line) identifier_line (None) None )comparison_operator (block (expression_statement (assignment (identifier_lno) identifier_lno (None) None )assignment )expression_statement (break_statement )break_statement )block )if_statement (if_statement (call (identifier_executable_line) identifier_executable_line (argument_list (identifier_line) identifier_line )argument_list )call (block (break_statement )break_statement )block )if_statement (expression_statement (augmented_assignment (identifier_lno) identifier_lno (integer_1) integer_1 )augmented_assignment )expression_statement )block )while_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_start_trace) identifier_start_trace )attribute (argument_list )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_lno) identifier_lno (None) None )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_breakpoints) identifier_breakpoints )attribute (identifier_add) identifier_add )attribute (argument_list (call (identifier_LineBreakpoint) identifier_LineBreakpoint (argument_list (identifier_fn) identifier_fn (identifier_lno) identifier_lno (keyword_argument (identifier_temporary) identifier_temporary (True) True )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )if_statement (try_statement (block (expression_statement (call (identifier_execute) identifier_execute (argument_list (identifier_cmd) identifier_cmd (identifier_globals) identifier_globals (identifier_locals) identifier_locals )argument_list )call )expression_statement )block (finally_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_stop_trace) identifier_stop_trace )attribute (argument_list )argument_list )call )expression_statement )block )finally_clause )try_statement )block )function_definition )module
Run the cmd `cmd` with trace
(module (function_definition (function_name_add) function_name_add (parameters (identifier_self) identifier_self (identifier_filetype) identifier_filetype (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_location) identifier_location (call (attribute (identifier_self) identifier_self (identifier_location) identifier_location )attribute (argument_list (identifier_filetype) identifier_filetype (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_source) identifier_source (call (attribute (identifier_self) identifier_self (identifier_url) identifier_url )attribute (argument_list (identifier_filetype) identifier_filetype (keyword_argument (identifier_sasdir) identifier_sasdir (conditional_expression (string_'sas') string_'sas' (not_operator (attribute (identifier_self) identifier_self (identifier_public) identifier_public )attribute )not_operator (string_'') string_'' )conditional_expression )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_'full') string_'full' (identifier_kwargs) identifier_kwargs )comparison_operator (block (expression_statement (assignment (identifier_destination) identifier_destination (call (attribute (identifier_self) identifier_self (identifier_full) identifier_full )attribute (argument_list (identifier_filetype) identifier_filetype (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_destination) identifier_destination (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'full') string_'full' )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (if_statement (boolean_operator (boolean_operator (identifier_location) identifier_location (identifier_source) identifier_source )boolean_operator (identifier_destination) identifier_destination )boolean_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_initial_stream) identifier_initial_stream )attribute (identifier_append_task) identifier_append_task )attribute (argument_list (keyword_argument (identifier_location) identifier_location (identifier_location) identifier_location )keyword_argument (keyword_argument (identifier_source) identifier_source (identifier_source) identifier_source )keyword_argument (keyword_argument (identifier_destination) identifier_destination (identifier_destination) identifier_destination )keyword_argument )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_"There is no file with filetype=%r to access in the tree module loaded") string_"There is no file with filetype=%r to access in the tree module loaded" (identifier_filetype) identifier_filetype )binary_operator )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Adds a filepath into the list of tasks to download
(module (function_definition (function_name_confusion_matrix) function_name_confusion_matrix (parameters (typed_parameter (identifier_expected) identifier_expected (type (attribute (identifier_np) identifier_np (identifier_ndarray) identifier_ndarray )attribute )type )typed_parameter (typed_parameter (identifier_predicted) identifier_predicted (type (attribute (identifier_np) identifier_np (identifier_ndarray) identifier_ndarray )attribute )type )typed_parameter (typed_parameter (identifier_num_classes) identifier_num_classes (type (identifier_int) identifier_int )type )typed_parameter )parameters (type (attribute (identifier_np) identifier_np (identifier_ndarray) identifier_ndarray )attribute )type (block (assert_statement (call (attribute (identifier_np) identifier_np (identifier_issubclass_) identifier_issubclass_ )attribute (argument_list (attribute (attribute (identifier_expected) identifier_expected (identifier_dtype) identifier_dtype )attribute (identifier_type) identifier_type )attribute (attribute (identifier_np) identifier_np (identifier_integer) identifier_integer )attribute )argument_list )call (string_" Classes' indices must be integers") string_" Classes' indices must be integers" )assert_statement (assert_statement (call (attribute (identifier_np) identifier_np (identifier_issubclass_) identifier_issubclass_ )attribute (argument_list (attribute (attribute (identifier_predicted) identifier_predicted (identifier_dtype) identifier_dtype )attribute (identifier_type) identifier_type )attribute (attribute (identifier_np) identifier_np (identifier_integer) identifier_integer )attribute )argument_list )call (string_" Classes' indices must be integers") string_" Classes' indices must be integers" )assert_statement (assert_statement (comparison_operator (attribute (identifier_expected) identifier_expected (identifier_shape) identifier_shape )attribute (attribute (identifier_predicted) identifier_predicted (identifier_shape) identifier_shape )attribute )comparison_operator (string_"Predicted and expected data must be the same length") string_"Predicted and expected data must be the same length" )assert_statement (assert_statement (comparison_operator (identifier_num_classes) identifier_num_classes (call (attribute (identifier_np) identifier_np (identifier_max) identifier_max )attribute (argument_list (list (identifier_predicted) identifier_predicted (identifier_expected) identifier_expected )list )argument_list )call )comparison_operator (string_"Number of classes must be at least the number of indices in predicted/expected data") string_"Number of classes must be at least the number of indices in predicted/expected data" )assert_statement (assert_statement (comparison_operator (call (attribute (identifier_np) identifier_np (identifier_min) identifier_min )attribute (argument_list (list (identifier_predicted) identifier_predicted (identifier_expected) identifier_expected )list )argument_list )call (integer_0) integer_0 )comparison_operator (string_" Classes' indices must be positive integers") string_" Classes' indices must be positive integers" )assert_statement (expression_statement (assignment (identifier_cm_abs) identifier_cm_abs (call (attribute (identifier_np) identifier_np (identifier_zeros) identifier_zeros )attribute (argument_list (tuple (identifier_num_classes) identifier_num_classes (identifier_num_classes) identifier_num_classes )tuple (keyword_argument (identifier_dtype) identifier_dtype (attribute (identifier_np) identifier_np (identifier_int32) identifier_int32 )attribute )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_pred) identifier_pred (identifier_exp) identifier_exp )pattern_list (call (identifier_zip) identifier_zip (argument_list (identifier_predicted) identifier_predicted (identifier_expected) identifier_expected )argument_list )call (block (expression_statement (augmented_assignment (subscript (identifier_cm_abs) identifier_cm_abs (identifier_exp) identifier_exp (identifier_pred) identifier_pred )subscript (integer_1) integer_1 )augmented_assignment )expression_statement )block )for_statement (return_statement (identifier_cm_abs) identifier_cm_abs )return_statement )block )function_definition )module
Calculate and return confusion matrix for the predicted and expected labels :param expected: array of expected classes (integers) with shape `[num_of_data]` :param predicted: array of predicted classes (integers) with shape `[num_of_data]` :param num_classes: number of classification classes :return: confusion matrix (cm) with absolute values
(module (function_definition (function_name_principal_inertia_transform) function_name_principal_inertia_transform (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_order) identifier_order (subscript (subscript (call (attribute (identifier_np) identifier_np (identifier_argsort) identifier_argsort )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_principal_inertia_components) identifier_principal_inertia_components )attribute )argument_list )call (slice (integer_1) integer_1 (colon) colon )slice )subscript (slice (colon) colon (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_vectors) identifier_vectors (subscript (attribute (identifier_self) identifier_self (identifier_principal_inertia_vectors) identifier_principal_inertia_vectors )attribute (identifier_order) identifier_order )subscript )assignment )expression_statement (expression_statement (assignment (identifier_vectors) identifier_vectors (call (attribute (identifier_np) identifier_np (identifier_vstack) identifier_vstack )attribute (argument_list (tuple (identifier_vectors) identifier_vectors (call (attribute (identifier_np) identifier_np (identifier_cross) identifier_cross )attribute (argument_list (list_splat (identifier_vectors) identifier_vectors )list_splat )argument_list )call )tuple )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_transform) identifier_transform (call (attribute (identifier_np) identifier_np (identifier_eye) identifier_eye )attribute (argument_list (integer_4) integer_4 )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_transform) identifier_transform (slice (colon) colon (integer_3) integer_3 )slice (slice (colon) colon (integer_3) integer_3 )slice )subscript (identifier_vectors) identifier_vectors )assignment )expression_statement (expression_statement (assignment (identifier_transform) identifier_transform (call (attribute (identifier_transformations) identifier_transformations (identifier_transform_around) identifier_transform_around )attribute (argument_list (keyword_argument (identifier_matrix) identifier_matrix (identifier_transform) identifier_transform )keyword_argument (keyword_argument (identifier_point) identifier_point (attribute (identifier_self) identifier_self (identifier_centroid) identifier_centroid )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (subscript (identifier_transform) identifier_transform (slice (colon) colon (integer_3) integer_3 )slice (integer_3) integer_3 )subscript (attribute (identifier_self) identifier_self (identifier_centroid) identifier_centroid )attribute )augmented_assignment )expression_statement (return_statement (identifier_transform) identifier_transform )return_statement )block )function_definition )module
A transform which moves the current mesh so the principal inertia vectors are on the X,Y, and Z axis, and the centroid is at the origin. Returns ---------- transform : (4, 4) float Homogenous transformation matrix
(module (function_definition (function_name_delete_field_value) function_name_delete_field_value (parameters (identifier_self) identifier_self (identifier_name) identifier_name )parameters (block (expression_statement (assignment (identifier_name) identifier_name (call (attribute (identifier_self) identifier_self (identifier_get_real_name) identifier_get_real_name )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_name) identifier_name (call (attribute (identifier_self) identifier_self (identifier__can_write_field) identifier__can_write_field )attribute (argument_list (identifier_name) identifier_name )argument_list )call )boolean_operator (block (if_statement (comparison_operator (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier___modified_data__) identifier___modified_data__ )attribute )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier___modified_data__) identifier___modified_data__ )attribute (identifier_pop) identifier_pop )attribute (argument_list (identifier_name) identifier_name )argument_list )call )expression_statement )block )if_statement (if_statement (boolean_operator (comparison_operator (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier___original_data__) identifier___original_data__ )attribute )comparison_operator (comparison_operator (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier___deleted_fields__) identifier___deleted_fields__ )attribute )comparison_operator )boolean_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier___deleted_fields__) identifier___deleted_fields__ )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_name) identifier_name )argument_list )call )expression_statement )block )if_statement )block )if_statement )block )function_definition )module
Mark this field to be deleted
(module (function_definition (function_name_delete) function_name_delete (parameters (identifier_self) identifier_self (identifier_identity_id) identifier_identity_id (identifier_service) identifier_service )parameters (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_request) identifier_request )attribute (identifier_delete) identifier_delete )attribute (argument_list (binary_operator (binary_operator (call (identifier_str) identifier_str (argument_list (identifier_identity_id) identifier_identity_id )argument_list )call (string_'/limit/') string_'/limit/' )binary_operator (identifier_service) identifier_service )binary_operator )argument_list )call )return_statement )block )function_definition )module
Delete the limit for the given identity and service :param identity_id: The ID of the identity to retrieve :param service: The service that the token is linked to :return: dict of REST API output with headers attached :rtype: :class:`~datasift.request.DictResponse` :raises: :class:`~datasift.exceptions.DataSiftApiException`, :class:`requests.exceptions.HTTPError`
(module (function_definition (function_name__convert_name) function_name__convert_name (parameters (identifier_self) identifier_self (identifier_name) identifier_name )parameters (block (if_statement (call (attribute (identifier_re) identifier_re (identifier_search) identifier_search )attribute (argument_list (string_'^\d+$') string_'^\d+$' (identifier_name) identifier_name )argument_list )call (block (if_statement (boolean_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_name) identifier_name )argument_list )call (integer_1) integer_1 )comparison_operator (comparison_operator (subscript (identifier_name) identifier_name (integer_0) integer_0 )subscript (string_'0') string_'0' )comparison_operator )boolean_operator (block (return_statement (identifier_name) identifier_name )return_statement )block )if_statement (return_statement (call (identifier_int) identifier_int (argument_list (identifier_name) identifier_name )argument_list )call )return_statement )block )if_statement (return_statement (identifier_name) identifier_name )return_statement )block )function_definition )module
Convert ``name`` to int if it looks like an int. Otherwise, return it as is.
(module (function_definition (function_name_update_view_state) function_name_update_view_state (parameters (identifier_self) identifier_self (identifier_view) identifier_view (identifier_state) identifier_state )parameters (block (if_statement (comparison_operator (attribute (identifier_view) identifier_view (identifier_name) identifier_name )attribute (identifier_self) identifier_self )comparison_operator (block (expression_statement (assignment (subscript (identifier_self) identifier_self (attribute (identifier_view) identifier_view (identifier_name) identifier_name )attribute )subscript (call (identifier_Bunch) identifier_Bunch (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (subscript (identifier_self) identifier_self (attribute (identifier_view) identifier_view (identifier_name) identifier_name )attribute )subscript (identifier_update) identifier_update )attribute (argument_list (identifier_state) identifier_state )argument_list )call )expression_statement )block )function_definition )module
Update the state of a view.
(module (function_definition (function_name_resample_dset) function_name_resample_dset (parameters (identifier_dset) identifier_dset (identifier_template) identifier_template (default_parameter (identifier_prefix) identifier_prefix (None) None )default_parameter (default_parameter (identifier_resam) identifier_resam (string_'NN') string_'NN' )default_parameter )parameters (block (if_statement (comparison_operator (identifier_prefix) identifier_prefix (None) None )comparison_operator (block (expression_statement (assignment (identifier_prefix) identifier_prefix (call (attribute (identifier_nl) identifier_nl (identifier_suffix) identifier_suffix )attribute (argument_list (identifier_dset) identifier_dset (string_'_resam') string_'_resam' )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_nl) identifier_nl (identifier_run) identifier_run )attribute (argument_list (list (string_'3dresample') string_'3dresample' (string_'-master') string_'-master' (identifier_template) identifier_template (string_'-rmode') string_'-rmode' (identifier_resam) identifier_resam (string_'-prefix') string_'-prefix' (identifier_prefix) identifier_prefix (string_'-inset') string_'-inset' (identifier_dset) identifier_dset )list )argument_list )call )expression_statement )block )function_definition )module
Resamples ``dset`` to the grid of ``template`` using resampling mode ``resam``. Default prefix is to suffix ``_resam`` at the end of ``dset`` Available resampling modes: :NN: Nearest Neighbor :Li: Linear :Cu: Cubic :Bk: Blocky
(module (function_definition (function_name__get_ui_content) function_name__get_ui_content (parameters (identifier_self) identifier_self (identifier_cli) identifier_cli (identifier_width) identifier_width (identifier_height) identifier_height )parameters (block (function_definition (function_name_get_content) function_name_get_content (parameters )parameters (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_content) identifier_content )attribute (identifier_create_content) identifier_create_content )attribute (argument_list (identifier_cli) identifier_cli (keyword_argument (identifier_width) identifier_width (identifier_width) identifier_width )keyword_argument (keyword_argument (identifier_height) identifier_height (identifier_height) identifier_height )keyword_argument )argument_list )call )return_statement )block )function_definition (expression_statement (assignment (identifier_key) identifier_key (tuple (attribute (identifier_cli) identifier_cli (identifier_render_counter) identifier_render_counter )attribute (identifier_width) identifier_width (identifier_height) identifier_height )tuple )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__ui_content_cache) identifier__ui_content_cache )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_key) identifier_key (identifier_get_content) identifier_get_content )argument_list )call )return_statement )block )function_definition )module
Create a `UIContent` instance.
(module (function_definition (function_name_nb_to_python) function_name_nb_to_python (parameters (identifier_nb_path) identifier_nb_path )parameters (block (expression_statement (assignment (identifier_exporter) identifier_exporter (call (attribute (identifier_python) identifier_python (identifier_PythonExporter) identifier_PythonExporter )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_output) identifier_output (identifier_resources) identifier_resources )pattern_list (call (attribute (identifier_exporter) identifier_exporter (identifier_from_filename) identifier_from_filename )attribute (argument_list (identifier_nb_path) identifier_nb_path )argument_list )call )assignment )expression_statement (return_statement (identifier_output) identifier_output )return_statement )block )function_definition )module
convert notebook to python script
(module (function_definition (function_name_check_recommended_files) function_name_check_recommended_files (parameters (identifier_data) identifier_data (identifier_vcs) identifier_vcs )parameters (block (expression_statement (assignment (identifier_main_files) identifier_main_files (call (attribute (identifier_os) identifier_os (identifier_listdir) identifier_listdir )attribute (argument_list (subscript (identifier_data) identifier_data (string_'workingdir') string_'workingdir' )subscript )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (not_operator (comparison_operator (string_'setup.py') string_'setup.py' (identifier_main_files) identifier_main_files )comparison_operator )not_operator (not_operator (comparison_operator (string_'setup.cfg') string_'setup.cfg' (identifier_main_files) identifier_main_files )comparison_operator )not_operator )boolean_operator (block (return_statement (True) True )return_statement )block )if_statement (if_statement (boolean_operator (not_operator (comparison_operator (string_'MANIFEST.in') string_'MANIFEST.in' (identifier_main_files) identifier_main_files )comparison_operator )not_operator (not_operator (comparison_operator (string_'MANIFEST') string_'MANIFEST' (identifier_main_files) identifier_main_files )comparison_operator )not_operator )boolean_operator (block (expression_statement (assignment (identifier_q) identifier_q (parenthesized_expression (concatenated_string (string_"This package is missing a MANIFEST.in file. This file is ") string_"This package is missing a MANIFEST.in file. This file is " (string_"recommended. ") string_"recommended. " (string_"See http://docs.python.org/distutils/sourcedist.html") string_"See http://docs.python.org/distutils/sourcedist.html" (string_" for more info. Sample contents:") string_" for more info. Sample contents:" (string_"\n") string_"\n" (string_"recursive-include main_directory *") string_"recursive-include main_directory *" (string_"recursive-include docs *") string_"recursive-include docs *" (string_"include *") string_"include *" (string_"global-exclude *.pyc") string_"global-exclude *.pyc" (string_"\n") string_"\n" (string_"You may want to quit and fix this.") string_"You may want to quit and fix this." )concatenated_string )parenthesized_expression )assignment )expression_statement (if_statement (not_operator (call (attribute (identifier_vcs) identifier_vcs (identifier_is_setuptools_helper_package_installed) identifier_is_setuptools_helper_package_installed )attribute (argument_list )argument_list )call )not_operator (block (expression_statement (augmented_assignment (identifier_q) identifier_q (binary_operator (string_"Installing %s may help too.\n") string_"Installing %s may help too.\n" (line_continuation_\) line_continuation_\ (attribute (identifier_vcs) identifier_vcs (identifier_setuptools_helper_package) identifier_setuptools_helper_package )attribute )binary_operator )augmented_assignment )expression_statement )block )if_statement (expression_statement (augmented_assignment (identifier_q) identifier_q (string_"Do you want to continue with the release?") string_"Do you want to continue with the release?" )augmented_assignment )expression_statement (if_statement (not_operator (call (identifier_ask) identifier_ask (argument_list (identifier_q) identifier_q (keyword_argument (identifier_default) identifier_default (False) False )keyword_argument )argument_list )call )not_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (call (identifier_print) identifier_print (argument_list (identifier_q) identifier_q )argument_list )call )expression_statement )block )if_statement (return_statement (True) True )return_statement )block )function_definition )module
Do check for recommended files. Returns True when all is fine.
(module (function_definition (function_name_type) function_name_type (parameters (identifier_self) identifier_self (typed_parameter (identifier_name) identifier_name (type (identifier_str) identifier_str )type )typed_parameter )parameters (block (for_statement (identifier_f) identifier_f (attribute (identifier_self) identifier_self (identifier_body) identifier_body )attribute (block (if_statement (parenthesized_expression (boolean_operator (boolean_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_f) identifier_f (string_'_ctype') string_'_ctype' )argument_list )call (comparison_operator (attribute (attribute (identifier_f) identifier_f (identifier__ctype) identifier__ctype )attribute (identifier__storage) identifier__storage )attribute (attribute (identifier_Storages) identifier_Storages (identifier_TYPEDEF) identifier_TYPEDEF )attribute )comparison_operator )boolean_operator (comparison_operator (attribute (identifier_f) identifier_f (identifier__name) identifier__name )attribute (identifier_name) identifier_name )comparison_operator )boolean_operator )parenthesized_expression (block (return_statement (identifier_f) identifier_f )return_statement )block )if_statement )block )for_statement )block )function_definition )module
return the first complete definition of type 'name
(module (function_definition (function_name_nCr) function_name_nCr (parameters (identifier_n) identifier_n (identifier_r) identifier_r )parameters (block (expression_statement (assignment (identifier_f) identifier_f (attribute (identifier_math) identifier_math (identifier_factorial) identifier_factorial )attribute )assignment )expression_statement (return_statement (call (identifier_int) identifier_int (argument_list (binary_operator (binary_operator (call (identifier_f) identifier_f (argument_list (identifier_n) identifier_n )argument_list )call (call (identifier_f) identifier_f (argument_list (identifier_r) identifier_r )argument_list )call )binary_operator (call (identifier_f) identifier_f (argument_list (binary_operator (identifier_n) identifier_n (identifier_r) identifier_r )binary_operator )argument_list )call )binary_operator )argument_list )call )return_statement )block )function_definition )module
Calculates nCr. Args: n (int): total number of items. r (int): items to choose Returns: nCr.
(module (function_definition (function_name___log_overview_errors) function_name___log_overview_errors (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_error_file_names) identifier_error_file_names )attribute (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__io) identifier__io )attribute (identifier_warning) identifier_warning )attribute (argument_list (string_'Routines in the files below are not loaded:') string_'Routines in the files below are not loaded:' )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__io) identifier__io )attribute (identifier_listing) identifier_listing )attribute (argument_list (call (identifier_sorted) identifier_sorted (argument_list (attribute (identifier_self) identifier_self (identifier_error_file_names) identifier_error_file_names )attribute )argument_list )call )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Show info about sources files of stored routines that were not loaded successfully.
(module (function_definition (function_name_discard) function_name_discard (parameters (identifier_samples) identifier_samples (identifier_chains) identifier_chains )parameters (block (expression_statement (assignment (identifier_samples) identifier_samples (call (attribute (identifier_np) identifier_np (identifier_asarray) identifier_asarray )attribute (argument_list (identifier_samples) identifier_samples )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_samples) identifier_samples (identifier_ndim) identifier_ndim )attribute (integer_2) integer_2 )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"expected samples to be a numpy 2D array") string_"expected samples to be a numpy 2D array" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (pattern_list (identifier_num_samples) identifier_num_samples (identifier_num_variables) identifier_num_variables )pattern_list (attribute (identifier_samples) identifier_samples (identifier_shape) identifier_shape )attribute )assignment )expression_statement (expression_statement (assignment (identifier_num_chains) identifier_num_chains (call (identifier_len) identifier_len (argument_list (identifier_chains) identifier_chains )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_broken) identifier_broken (call (identifier_broken_chains) identifier_broken_chains (argument_list (identifier_samples) identifier_samples (identifier_chains) identifier_chains )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_unbroken_idxs) identifier_unbroken_idxs )pattern_list (call (attribute (identifier_np) identifier_np (identifier_where) identifier_where )attribute (argument_list (unary_operator (call (attribute (identifier_broken) identifier_broken (identifier_any) identifier_any )attribute (argument_list (keyword_argument (identifier_axis) identifier_axis (integer_1) integer_1 )keyword_argument )argument_list )call )unary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_chain_variables) identifier_chain_variables (call (attribute (identifier_np) identifier_np (identifier_fromiter) identifier_fromiter )attribute (argument_list (generator_expression (conditional_expression (subscript (call (attribute (identifier_np) identifier_np (identifier_asarray) identifier_asarray )attribute (argument_list (call (identifier_tuple) identifier_tuple (argument_list (identifier_chain) identifier_chain )argument_list )call )argument_list )call (integer_0) integer_0 )subscript (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_chain) identifier_chain (identifier_set) identifier_set )argument_list )call (subscript (call (attribute (identifier_np) identifier_np (identifier_asarray) identifier_asarray )attribute (argument_list (identifier_chain) identifier_chain )argument_list )call (integer_0) integer_0 )subscript )conditional_expression (for_in_clause (identifier_chain) identifier_chain (identifier_chains) identifier_chains )for_in_clause )generator_expression (keyword_argument (identifier_count) identifier_count (identifier_num_chains) identifier_num_chains )keyword_argument (keyword_argument (identifier_dtype) identifier_dtype (identifier_int) identifier_int )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (expression_list (subscript (identifier_samples) identifier_samples (call (attribute (identifier_np) identifier_np (identifier_ix_) identifier_ix_ )attribute (argument_list (identifier_unbroken_idxs) identifier_unbroken_idxs (identifier_chain_variables) identifier_chain_variables )argument_list )call )subscript (identifier_unbroken_idxs) identifier_unbroken_idxs )expression_list )return_statement )block )function_definition )module
Discard broken chains. Args: samples (array_like): Samples as a nS x nV array_like object where nS is the number of samples and nV is the number of variables. The values should all be 0/1 or -1/+1. chains (list[array_like]): List of chains of length nC where nC is the number of chains. Each chain should be an array_like collection of column indices in samples. Returns: tuple: A 2-tuple containing: :obj:`numpy.ndarray`: An array of unembedded samples. Broken chains are discarded. The array has dtype 'int8'. :obj:`numpy.ndarray`: The indicies of the rows with unbroken chains. Examples: This example unembeds two samples that chains nodes 0 and 1 to represent a single source node. The first sample has an unbroken chain, the second a broken chain. >>> import dimod >>> import numpy as np ... >>> chains = [(0, 1), (2,)] >>> samples = np.array([[1, 1, 0], [1, 0, 0]], dtype=np.int8) >>> unembedded, idx = dwave.embedding.discard(samples, chains) >>> unembedded array([[1, 0]], dtype=int8) >>> idx array([0])
(module (function_definition (function_name_search) function_name_search (parameters (identifier_self) identifier_self (identifier_start_ts) identifier_start_ts (identifier_end_ts) identifier_end_ts )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__stream_search) identifier__stream_search )attribute (argument_list (keyword_argument (identifier_index) identifier_index (attribute (identifier_self) identifier_self (identifier_meta_index_name) identifier_meta_index_name )attribute )keyword_argument (keyword_argument (identifier_body) identifier_body (dictionary (pair (string_"query") string_"query" (dictionary (pair (string_"range") string_"range" (dictionary (pair (string_"_ts") string_"_ts" (dictionary (pair (string_"gte") string_"gte" (identifier_start_ts) identifier_start_ts )pair (pair (string_"lte") string_"lte" (identifier_end_ts) identifier_end_ts )pair )dictionary )pair )dictionary )pair )dictionary )pair )dictionary )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Query Elasticsearch for documents in a time range. This method is used to find documents that may be in conflict during a rollback event in MongoDB.
(module (function_definition (function_name_list_records_for_build_configuration) function_name_list_records_for_build_configuration (parameters (default_parameter (identifier_id) identifier_id (None) None )default_parameter (default_parameter (identifier_name) identifier_name (None) None )default_parameter (default_parameter (identifier_page_size) identifier_page_size (integer_200) integer_200 )default_parameter (default_parameter (identifier_page_index) identifier_page_index (integer_0) integer_0 )default_parameter (default_parameter (identifier_sort) identifier_sort (string_"") string_"" )default_parameter (default_parameter (identifier_q) identifier_q (string_"") string_"" )default_parameter )parameters (block (expression_statement (assignment (identifier_data) identifier_data (call (identifier_list_records_for_build_configuration_raw) identifier_list_records_for_build_configuration_raw (argument_list (identifier_id) identifier_id (identifier_name) identifier_name (identifier_page_size) identifier_page_size (identifier_page_index) identifier_page_index (identifier_sort) identifier_sort (identifier_q) identifier_q )argument_list )call )assignment )expression_statement (if_statement (identifier_data) identifier_data (block (return_statement (call (attribute (identifier_utils) identifier_utils (identifier_format_json_list) identifier_format_json_list )attribute (argument_list (identifier_data) identifier_data )argument_list )call )return_statement )block )if_statement )block )function_definition )module
List all BuildRecords for a given BuildConfiguration
(module (function_definition (function_name_get_default_config) function_name_get_default_config (parameters (identifier_self) identifier_self (identifier_jid) identifier_jid (default_parameter (identifier_node) identifier_node (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_iq) identifier_iq (call (attribute (attribute (identifier_aioxmpp) identifier_aioxmpp (identifier_stanza) identifier_stanza )attribute (identifier_IQ) identifier_IQ )attribute (argument_list (keyword_argument (identifier_to) identifier_to (identifier_jid) identifier_jid )keyword_argument (keyword_argument (identifier_type_) identifier_type_ (attribute (attribute (attribute (identifier_aioxmpp) identifier_aioxmpp (identifier_structs) identifier_structs )attribute (identifier_IQType) identifier_IQType )attribute (identifier_GET) identifier_GET )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_iq) identifier_iq (identifier_payload) identifier_payload )attribute (call (attribute (identifier_pubsub_xso) identifier_pubsub_xso (identifier_Request) identifier_Request )attribute (argument_list (call (attribute (identifier_pubsub_xso) identifier_pubsub_xso (identifier_Default) identifier_Default )attribute (argument_list (keyword_argument (identifier_node) identifier_node (identifier_node) identifier_node )keyword_argument )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (yield (call (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_send) identifier_send )attribute (argument_list (identifier_iq) identifier_iq )argument_list )call )yield )assignment )expression_statement (return_statement (attribute (attribute (identifier_response) identifier_response (identifier_payload) identifier_payload )attribute (identifier_data) identifier_data )attribute )return_statement )block )function_definition )module
Request the default configuration of a node. :param jid: Address of the PubSub service. :type jid: :class:`aioxmpp.JID` :param node: Name of the PubSub node to query. :type node: :class:`str` :raises aioxmpp.errors.XMPPError: as returned by the service :return: The default configuration of subscriptions at the node. :rtype: :class:`~.forms.Data` On success, the :class:`~.forms.Data` form is returned. If an error occurs, the corresponding :class:`~.errors.XMPPError` is raised.
(module (function_definition (function_name_i18n_javascript) function_name_i18n_javascript (parameters (identifier_self) identifier_self (identifier_request) identifier_request )parameters (block (if_statement (attribute (identifier_settings) identifier_settings (identifier_USE_I18N) identifier_USE_I18N )attribute (block (import_from_statement (dotted_name (identifier_django) identifier_django (identifier_views) identifier_views (identifier_i18n) identifier_i18n )dotted_name (dotted_name (identifier_javascript_catalog) identifier_javascript_catalog )dotted_name )import_from_statement )block (else_clause (block (import_from_statement (dotted_name (identifier_django) identifier_django (identifier_views) identifier_views (identifier_i18n) identifier_i18n )dotted_name (aliased_import (dotted_name (identifier_null_javascript_catalog) identifier_null_javascript_catalog )dotted_name (identifier_javascript_catalog) identifier_javascript_catalog )aliased_import )import_from_statement )block )else_clause )if_statement (return_statement (call (identifier_javascript_catalog) identifier_javascript_catalog (argument_list (identifier_request) identifier_request (keyword_argument (identifier_packages) identifier_packages (list (string_'media_tree') string_'media_tree' )list )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Displays the i18n JavaScript that the Django admin requires. This takes into account the USE_I18N setting. If it's set to False, the generated JavaScript will be leaner and faster.
(module (function_definition (function_name_worker_failed) function_name_worker_failed (parameters )parameters (block (expression_statement (assignment (identifier_participant_id) identifier_participant_id (call (attribute (attribute (identifier_request) identifier_request (identifier_args) identifier_args )attribute (identifier_get) identifier_get )attribute (argument_list (string_"participant_id") string_"participant_id" )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_participant_id) identifier_participant_id )not_operator (block (return_statement (call (identifier_error_response) identifier_error_response (argument_list (keyword_argument (identifier_error_type) identifier_error_type (string_"bad request") string_"bad request" )keyword_argument (keyword_argument (identifier_error_text) identifier_error_text (string_"participantId parameter is required") string_"participantId parameter is required" )keyword_argument )argument_list )call )return_statement )block )if_statement (try_statement (block (expression_statement (call (identifier__worker_failed) identifier__worker_failed (argument_list (identifier_participant_id) identifier_participant_id )argument_list )call )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (return_statement (call (identifier_error_response) identifier_error_response (argument_list (keyword_argument (identifier_error_type) identifier_error_type (call (attribute (string_"ParticipantId not found: {}") string_"ParticipantId not found: {}" (identifier_format) identifier_format )attribute (argument_list (identifier_participant_id) identifier_participant_id )argument_list )call )keyword_argument )argument_list )call )return_statement )block )except_clause )try_statement (return_statement (call (identifier_success_response) identifier_success_response (argument_list (keyword_argument (identifier_field) identifier_field (string_"status") string_"status" )keyword_argument (keyword_argument (identifier_data) identifier_data (string_"success") string_"success" )keyword_argument (keyword_argument (identifier_request_type) identifier_request_type (string_"worker failed") string_"worker failed" )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Fail worker. Used by bots only for now.
(module (function_definition (function_name_collect_hosts) function_name_collect_hosts (parameters (identifier_api) identifier_api (identifier_wanted_hostnames) identifier_wanted_hostnames )parameters (block (expression_statement (assignment (identifier_all_hosts) identifier_all_hosts (call (attribute (identifier_api) identifier_api (identifier_get_all_hosts) identifier_get_all_hosts )attribute (argument_list (keyword_argument (identifier_view) identifier_view (string_'full') string_'full' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_all_hostnames) identifier_all_hostnames (call (identifier_set) identifier_set (argument_list (list_comprehension (attribute (identifier_h) identifier_h (identifier_hostname) identifier_hostname )attribute (for_in_clause (identifier_h) identifier_h (identifier_all_hosts) identifier_all_hosts )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_wanted_hostnames) identifier_wanted_hostnames (call (identifier_set) identifier_set (argument_list (identifier_wanted_hostnames) identifier_wanted_hostnames )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_unknown_hosts) identifier_unknown_hosts (call (attribute (identifier_wanted_hostnames) identifier_wanted_hostnames (identifier_difference) identifier_difference )attribute (argument_list (identifier_all_hostnames) identifier_all_hostnames )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_unknown_hosts) identifier_unknown_hosts )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_msg) identifier_msg (binary_operator (concatenated_string (string_"The following hosts are not found in Cloudera Manager. ") string_"The following hosts are not found in Cloudera Manager. " (string_"Please check for typos:\n%s") string_"Please check for typos:\n%s" )concatenated_string (parenthesized_expression (call (attribute (string_'\n') string_'\n' (identifier_join) identifier_join )attribute (argument_list (identifier_unknown_hosts) identifier_unknown_hosts )argument_list )call )parenthesized_expression )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_error) identifier_error )attribute (argument_list (identifier_msg) identifier_msg )argument_list )call )expression_statement (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (identifier_msg) identifier_msg )argument_list )call )raise_statement )block )if_statement (return_statement (list_comprehension (identifier_h) identifier_h (for_in_clause (identifier_h) identifier_h (identifier_all_hosts) identifier_all_hosts )for_in_clause (if_clause (comparison_operator (attribute (identifier_h) identifier_h (identifier_hostname) identifier_hostname )attribute (identifier_wanted_hostnames) identifier_wanted_hostnames )comparison_operator )if_clause )list_comprehension )return_statement )block )function_definition )module
Return a list of ApiHost objects for the set of hosts that we want to change config for.
(module (function_definition (function_name_AskYesNoCancel) function_name_AskYesNoCancel (parameters (identifier_message) identifier_message (default_parameter (identifier_title) identifier_title (string_'FontParts') string_'FontParts' )default_parameter (default_parameter (identifier_default) identifier_default (integer_0) integer_0 )default_parameter (default_parameter (identifier_informativeText) identifier_informativeText (string_"") string_"" )default_parameter )parameters (block (return_statement (call (subscript (identifier_dispatcher) identifier_dispatcher (string_"AskYesNoCancel") string_"AskYesNoCancel" )subscript (argument_list (keyword_argument (identifier_message) identifier_message (identifier_message) identifier_message )keyword_argument (keyword_argument (identifier_title) identifier_title (identifier_title) identifier_title )keyword_argument (keyword_argument (identifier_default) identifier_default (identifier_default) identifier_default )keyword_argument (keyword_argument (identifier_informativeText) identifier_informativeText (identifier_informativeText) identifier_informativeText )keyword_argument )argument_list )call )return_statement )block )function_definition )module
An ask yes, no or cancel dialog, a `message` is required. Optionally a `title`, `default` and `informativeText` can be provided. The `default` option is to indicate which button is the default button. :: from fontParts.ui import AskYesNoCancel print(AskYesNoCancel("who are you?"))