sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_preserve_namespace) function_name_preserve_namespace (parameters (default_parameter (identifier_newns) identifier_newns (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_ns) identifier_ns (call (attribute (identifier_cmds) identifier_cmds (identifier_namespaceInfo) identifier_namespaceInfo )attribute (argument_list (keyword_argument (identifier_an) identifier_an (True) True )keyword_argument )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_cmds) identifier_cmds (identifier_namespace) identifier_namespace )attribute (argument_list (keyword_argument (identifier_set) identifier_set (identifier_newns) identifier_newns )keyword_argument )argument_list )call )expression_statement (expression_statement (yield )yield )expression_statement )block (finally_clause (block (expression_statement (call (attribute (identifier_cmds) identifier_cmds (identifier_namespace) identifier_namespace )attribute (argument_list (keyword_argument (identifier_set) identifier_set (identifier_ns) identifier_ns )keyword_argument )argument_list )call )expression_statement )block )finally_clause )try_statement )block )function_definition )module
Contextmanager that will restore the current namespace :param newns: a name of namespace that should be set in the beginning. the original namespace will be restored afterwards. If None, does not set a namespace. :type newns: str | None :returns: None :rtype: None :raises: None
(module (function_definition (function_name_make_dir_structure) function_name_make_dir_structure (parameters (identifier_base_dir) identifier_base_dir )parameters (block (function_definition (function_name_maybe_makedir) function_name_maybe_makedir (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern )parameters (block (expression_statement (assignment (identifier_p) identifier_p (call (identifier_join) identifier_join (argument_list (identifier_base_dir) identifier_base_dir (list_splat (identifier_args) identifier_args )list_splat )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (call (identifier_exists) identifier_exists (argument_list (identifier_p) identifier_p )argument_list )call (not_operator (call (identifier_isdir) identifier_isdir (argument_list (identifier_p) identifier_p )argument_list )call )not_operator )boolean_operator (block (raise_statement (call (identifier_IOError) identifier_IOError (argument_list (call (attribute (string_"File '{}' exists but is not a directory ") string_"File '{}' exists but is not a directory " (identifier_format) identifier_format )attribute (argument_list (identifier_p) identifier_p )argument_list )call )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (call (identifier_exists) identifier_exists (argument_list (identifier_p) identifier_p )argument_list )call )not_operator (block (expression_statement (call (identifier_makedirs) identifier_makedirs (argument_list (identifier_p) identifier_p )argument_list )call )expression_statement )block )if_statement )block )function_definition (expression_statement (call (identifier_maybe_makedir) identifier_maybe_makedir (argument_list (identifier_DOWNLOAD_DIR) identifier_DOWNLOAD_DIR )argument_list )call )expression_statement (expression_statement (call (identifier_maybe_makedir) identifier_maybe_makedir (argument_list (identifier_PACKAGE_DIR) identifier_PACKAGE_DIR )argument_list )call )expression_statement (expression_statement (call (identifier_maybe_makedir) identifier_maybe_makedir (argument_list (identifier_OLD_DIR) identifier_OLD_DIR )argument_list )call )expression_statement )block )function_definition )module
Make the build directory structure.
(module (function_definition (function_name_paste) function_name_paste (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_html) identifier_html (call (attribute (call (attribute (identifier_QApplication) identifier_QApplication (identifier_clipboard) identifier_clipboard )attribute (argument_list )argument_list )call (identifier_text) identifier_text )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier_isRichTextEditEnabled) identifier_isRichTextEditEnabled )attribute (argument_list )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_insertPlainText) identifier_insertPlainText )attribute (argument_list (call (attribute (attribute (identifier_projex) identifier_projex (identifier_text) identifier_text )attribute (identifier_toAscii) identifier_toAscii )attribute (argument_list (identifier_html) identifier_html )argument_list )call )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_XTextEdit) identifier_XTextEdit (identifier_self) identifier_self )argument_list )call (identifier_paste) identifier_paste )attribute (argument_list )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Pastes text from the clipboard into this edit.
(module (function_definition (function_name_download_image) function_name_download_image (parameters (identifier_self) identifier_self (identifier_handle) identifier_handle (identifier_dest) identifier_dest )parameters (block (expression_statement (call (attribute (identifier_shutil) identifier_shutil (identifier_copyfile) identifier_copyfile )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier__prefixed) identifier__prefixed )attribute (argument_list (identifier_handle) identifier_handle )argument_list )call (identifier_dest) identifier_dest )argument_list )call )expression_statement )block )function_definition )module
Copies over the handl to the destination Args: handle (str): path to copy over dest (str): path to copy to Returns: None
(module (function_definition (function_name_get_job_id_from_name) function_name_get_job_id_from_name (parameters (identifier_self) identifier_self (identifier_job_name) identifier_job_name )parameters (block (expression_statement (assignment (identifier_jobs) identifier_jobs (subscript (call (attribute (attribute (identifier_self) identifier_self (identifier__client) identifier__client )attribute (identifier_list_jobs) identifier_list_jobs )attribute (argument_list (keyword_argument (identifier_jobQueue) identifier_jobQueue (attribute (identifier_self) identifier_self (identifier__queue) identifier__queue )attribute )keyword_argument (keyword_argument (identifier_jobStatus) identifier_jobStatus (string_'RUNNING') string_'RUNNING' )keyword_argument )argument_list )call (string_'jobSummaryList') string_'jobSummaryList' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_matching_jobs) identifier_matching_jobs (list_comprehension (identifier_job) identifier_job (for_in_clause (identifier_job) identifier_job (identifier_jobs) identifier_jobs )for_in_clause (if_clause (comparison_operator (subscript (identifier_job) identifier_job (string_'jobName') string_'jobName' )subscript (identifier_job_name) identifier_job_name )comparison_operator )if_clause )list_comprehension )assignment )expression_statement (if_statement (identifier_matching_jobs) identifier_matching_jobs (block (return_statement (subscript (subscript (identifier_matching_jobs) identifier_matching_jobs (integer_0) integer_0 )subscript (string_'jobId') string_'jobId' )subscript )return_statement )block )if_statement )block )function_definition )module
Retrieve the first job ID matching the given name
(module (function_definition (function_name_filter_options) function_name_filter_options (parameters (identifier_cls) identifier_cls (identifier_kwargs) identifier_kwargs (identifier_keys) identifier_keys )parameters (block (return_statement (call (identifier_dict) identifier_dict (generator_expression (tuple (identifier_k) identifier_k (identifier_v) identifier_v )tuple (for_in_clause (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (identifier_filter_kwargs) identifier_filter_kwargs (argument_list (identifier_keys) identifier_keys (identifier_kwargs) identifier_kwargs )argument_list )call )for_in_clause )generator_expression )call )return_statement )block )function_definition )module
Make optional kwargs valid and optimized for each template engines. :param kwargs: keyword arguements to process :param keys: optional argument names >>> Engine.filter_options(dict(aaa=1, bbb=2), ("aaa", )) {'aaa': 1} >>> Engine.filter_options(dict(bbb=2), ("aaa", )) {}
(module (function_definition (function_name__request) function_name__request (parameters (identifier_self) identifier_self (identifier_method) identifier_method (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_open) identifier_open )attribute )not_operator (block (expression_statement (await (call (attribute (identifier_self) identifier_self (identifier__connect) identifier__connect )attribute (argument_list )argument_list )call )await )expression_statement )block )if_statement (while_statement (attribute (identifier_self) identifier_self (identifier_waiting) identifier_waiting )attribute (block (expression_statement (await (call (attribute (identifier_asyncio) identifier_asyncio (identifier_sleep) identifier_sleep )attribute (argument_list (float_0.1) float_0.1 )argument_list )call )await )expression_statement )block )while_statement (if_statement (boolean_operator (comparison_operator (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_protocol) identifier_protocol )attribute (None) None )comparison_operator (not_operator (attribute (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_protocol) identifier_protocol )attribute (identifier_connected) identifier_connected )attribute )not_operator )boolean_operator (block (raise_statement (call (identifier_TimeoutError) identifier_TimeoutError (argument_list (string_"Not connected to device.") string_"Not connected to device." )argument_list )call )raise_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier_future) identifier_future (call (call (identifier_getattr) identifier_getattr (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_protocol) identifier_protocol )attribute (identifier_method) identifier_method )argument_list )call (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 (except_clause (identifier_AttributeError) identifier_AttributeError (block (raise_statement (call (identifier_TimeoutError) identifier_TimeoutError (argument_list (string_"Not connected to device.") string_"Not connected to device." )argument_list )call )raise_statement )block )except_clause )try_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_waiting) identifier_waiting )attribute (True) True )assignment )expression_statement (try_statement (block (return_statement (await (call (attribute (identifier_asyncio) identifier_asyncio (identifier_wait_for) identifier_wait_for )attribute (argument_list (identifier_future) identifier_future (keyword_argument (identifier_timeout) identifier_timeout (attribute (identifier_self) identifier_self (identifier_timeout) identifier_timeout )attribute )keyword_argument )argument_list )call )await )return_statement )block (except_clause (as_pattern (attribute (identifier_asyncio) identifier_asyncio (identifier_TimeoutError) identifier_TimeoutError )attribute (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (if_statement (attribute (identifier_self) identifier_self (identifier_open) identifier_open )attribute (block (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_self) identifier_self (string_'modbus') string_'modbus' )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_protocol_lost_connection) identifier_protocol_lost_connection )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_modbus) identifier_modbus )attribute )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_open) identifier_open )attribute (False) False )assignment )expression_statement )block )if_statement (raise_statement (call (identifier_TimeoutError) identifier_TimeoutError (argument_list (identifier_e) identifier_e )argument_list )call )raise_statement )block )except_clause (except_clause (as_pattern (attribute (attribute (identifier_pymodbus) identifier_pymodbus (identifier_exceptions) identifier_exceptions )attribute (identifier_ConnectionException) identifier_ConnectionException )attribute (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (raise_statement (call (identifier_ConnectionError) identifier_ConnectionError (argument_list (identifier_e) identifier_e )argument_list )call )raise_statement )block )except_clause (finally_clause (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_waiting) identifier_waiting )attribute (False) False )assignment )expression_statement )block )finally_clause )try_statement )block )function_definition )module
Send a request to the device and awaits a response. This mainly ensures that requests are sent serially, as the Modbus protocol does not allow simultaneous requests (it'll ignore any request sent while it's processing something). The driver handles this by assuming there is only one client instance. If other clients exist, other logic will have to be added to either prevent or manage race conditions.
(module (function_definition (function_name_get_all_pipelines) function_name_get_all_pipelines (parameters (default_parameter (identifier_app) identifier_app (string_'') string_'' )default_parameter )parameters (block (expression_statement (assignment (identifier_url) identifier_url (call (attribute (string_'{host}/applications/{app}/pipelineConfigs') string_'{host}/applications/{app}/pipelineConfigs' (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_host) identifier_host (identifier_API_URL) identifier_API_URL )keyword_argument (keyword_argument (identifier_app) identifier_app (identifier_app) identifier_app )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_requests) identifier_requests (identifier_get) identifier_get )attribute (argument_list (identifier_url) identifier_url (keyword_argument (identifier_verify) identifier_verify (identifier_GATE_CA_BUNDLE) identifier_GATE_CA_BUNDLE )keyword_argument (keyword_argument (identifier_cert) identifier_cert (identifier_GATE_CLIENT_CERT) identifier_GATE_CLIENT_CERT )keyword_argument )argument_list )call )assignment )expression_statement (assert_statement (attribute (identifier_response) identifier_response (identifier_ok) identifier_ok )attribute (call (attribute (string_'Could not retrieve Pipelines for {0}.') string_'Could not retrieve Pipelines for {0}.' (identifier_format) identifier_format )attribute (argument_list (identifier_app) identifier_app )argument_list )call )assert_statement (expression_statement (assignment (identifier_pipelines) identifier_pipelines (call (attribute (identifier_response) identifier_response (identifier_json) identifier_json )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_debug) identifier_debug )attribute (argument_list (string_'Pipelines:\n%s') string_'Pipelines:\n%s' (identifier_pipelines) identifier_pipelines )argument_list )call )expression_statement (return_statement (identifier_pipelines) identifier_pipelines )return_statement )block )function_definition )module
Get a list of all the Pipelines in _app_. Args: app (str): Name of Spinnaker Application. Returns: requests.models.Response: Response from Gate containing Pipelines.
(module (function_definition (function_name_set_cookie) function_name_set_cookie (parameters (identifier_response) identifier_response (identifier_name) identifier_name (identifier_value) identifier_value (default_parameter (identifier_expiry_seconds) identifier_expiry_seconds (None) None )default_parameter (default_parameter (identifier_secure) identifier_secure (False) False )default_parameter )parameters (block (if_statement (comparison_operator (identifier_expiry_seconds) identifier_expiry_seconds (None) None )comparison_operator (block (expression_statement (assignment (identifier_expiry_seconds) identifier_expiry_seconds (binary_operator (binary_operator (binary_operator (integer_90) integer_90 (integer_24) integer_24 )binary_operator (integer_60) integer_60 )binary_operator (integer_60) integer_60 )binary_operator )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_expires) identifier_expires (call (attribute (identifier_datetime) identifier_datetime (identifier_strftime) identifier_strftime )attribute (argument_list (binary_operator (call (attribute (identifier_datetime) identifier_datetime (identifier_utcnow) identifier_utcnow )attribute (argument_list )argument_list )call (call (identifier_timedelta) identifier_timedelta (argument_list (keyword_argument (identifier_seconds) identifier_seconds (identifier_expiry_seconds) identifier_expiry_seconds )keyword_argument )argument_list )call )binary_operator (string_"%a, %d-%b-%Y %H:%M:%S GMT") string_"%a, %d-%b-%Y %H:%M:%S GMT" )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_response) identifier_response (identifier_set_cookie) identifier_set_cookie )attribute (argument_list (identifier_name) identifier_name (identifier_value) identifier_value (keyword_argument (identifier_expires) identifier_expires (identifier_expires) identifier_expires )keyword_argument (keyword_argument (identifier_secure) identifier_secure (identifier_secure) identifier_secure )keyword_argument )argument_list )call )expression_statement )block (except_clause (tuple (identifier_KeyError) identifier_KeyError (identifier_TypeError) identifier_TypeError )tuple (block (expression_statement (call (attribute (identifier_response) identifier_response (identifier_set_cookie) identifier_set_cookie )attribute (argument_list (call (attribute (identifier_name) identifier_name (identifier_encode) identifier_encode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call (identifier_value) identifier_value (keyword_argument (identifier_expires) identifier_expires (identifier_expires) identifier_expires )keyword_argument (keyword_argument (identifier_secure) identifier_secure (identifier_secure) identifier_secure )keyword_argument )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )module
Set cookie wrapper that allows number of seconds to be given as the expiry time, and ensures values are correctly encoded.
(module (function_definition (function_name__extra_stats) function_name__extra_stats (parameters (identifier_self) identifier_self )parameters (block (return_statement (binary_operator (binary_operator (list (string_'loglr') string_'loglr' )list (line_continuation_\) line_continuation_\ (list_comprehension (call (attribute (string_'{}_optimal_snrsq') string_'{}_optimal_snrsq' (identifier_format) identifier_format )attribute (argument_list (identifier_det) identifier_det )argument_list )call (for_in_clause (identifier_det) identifier_det (attribute (identifier_self) identifier_self (identifier__data) identifier__data )attribute )for_in_clause )list_comprehension )binary_operator (line_continuation_\) line_continuation_\ (list_comprehension (call (attribute (string_'{}_matchedfilter_snrsq') string_'{}_matchedfilter_snrsq' (identifier_format) identifier_format )attribute (argument_list (identifier_det) identifier_det )argument_list )call (for_in_clause (identifier_det) identifier_det (attribute (identifier_self) identifier_self (identifier__data) identifier__data )attribute )for_in_clause )list_comprehension )binary_operator )return_statement )block )function_definition )module
Adds ``loglr``, ``optimal_snrsq`` and matched filter snrsq in each detector to the default stats.
(module (function_definition (function_name_histogram) function_name_histogram (parameters (identifier_title) identifier_title (identifier_title_x) identifier_title_x (identifier_title_y) identifier_title_y (identifier_x) identifier_x (identifier_bins_x) identifier_bins_x )parameters (block (expression_statement (call (attribute (identifier_plt) identifier_plt (identifier_figure) identifier_figure )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_plt) identifier_plt (identifier_hist) identifier_hist )attribute (argument_list (identifier_x) identifier_x (identifier_bins_x) identifier_bins_x )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_plt) identifier_plt (identifier_xlabel) identifier_xlabel )attribute (argument_list (identifier_title_x) identifier_title_x )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_plt) identifier_plt (identifier_ylabel) identifier_ylabel )attribute (argument_list (identifier_title_y) identifier_title_y )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_plt) identifier_plt (identifier_title) identifier_title )attribute (argument_list (identifier_title) identifier_title )argument_list )call )expression_statement )block )function_definition )module
Plot a basic histogram.
(module (function_definition (function_name_add_node_from_data) function_name_add_node_from_data (parameters (identifier_self) identifier_self (typed_parameter (identifier_node) identifier_node (type (identifier_BaseEntity) identifier_BaseEntity )type )typed_parameter )parameters (type (identifier_BaseEntity) identifier_BaseEntity )type (block (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_node) identifier_node (identifier_BaseEntity) identifier_BaseEntity )argument_list )call )assert_statement (if_statement (comparison_operator (identifier_node) identifier_node (identifier_self) identifier_self )comparison_operator (block (return_statement (identifier_node) identifier_node )return_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add_node) identifier_add_node )attribute (argument_list (identifier_node) identifier_node )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_VARIANTS) identifier_VARIANTS (identifier_node) identifier_node )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add_has_variant) identifier_add_has_variant )attribute (argument_list (call (attribute (identifier_node) identifier_node (identifier_get_parent) identifier_get_parent )attribute (argument_list )argument_list )call (identifier_node) identifier_node )argument_list )call )expression_statement )block (elif_clause (comparison_operator (identifier_MEMBERS) identifier_MEMBERS (identifier_node) identifier_node )comparison_operator (block (for_statement (identifier_member) identifier_member (subscript (identifier_node) identifier_node (identifier_MEMBERS) identifier_MEMBERS )subscript (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add_has_component) identifier_add_has_component )attribute (argument_list (identifier_node) identifier_node (identifier_member) identifier_member )argument_list )call )expression_statement )block )for_statement )block )elif_clause (elif_clause (boolean_operator (comparison_operator (identifier_PRODUCTS) identifier_PRODUCTS (identifier_node) identifier_node )comparison_operator (comparison_operator (identifier_REACTANTS) identifier_REACTANTS (identifier_node) identifier_node )comparison_operator )boolean_operator (block (for_statement (identifier_reactant_tokens) identifier_reactant_tokens (subscript (identifier_node) identifier_node (identifier_REACTANTS) identifier_REACTANTS )subscript (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add_has_reactant) identifier_add_has_reactant )attribute (argument_list (identifier_node) identifier_node (identifier_reactant_tokens) identifier_reactant_tokens )argument_list )call )expression_statement )block )for_statement (for_statement (identifier_product_tokens) identifier_product_tokens (subscript (identifier_node) identifier_node (identifier_PRODUCTS) identifier_PRODUCTS )subscript (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add_has_product) identifier_add_has_product )attribute (argument_list (identifier_node) identifier_node (identifier_product_tokens) identifier_product_tokens )argument_list )call )expression_statement )block )for_statement )block )elif_clause )if_statement (return_statement (identifier_node) identifier_node )return_statement )block )function_definition )module
Add an entity to the graph.
(module (function_definition (function_name_state_dict) function_name_state_dict (parameters (identifier_self) identifier_self )parameters (type (generic_type (identifier_Dict) identifier_Dict (type_parameter (type (identifier_str) identifier_str )type (type (identifier_Any) identifier_Any )type )type_parameter )generic_type )type (block (return_statement (dictionary_comprehension (pair (identifier_key) identifier_key (identifier_value) identifier_value )pair (for_in_clause (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier___dict__) identifier___dict__ )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause (if_clause (comparison_operator (identifier_key) identifier_key (string_'optimizer') string_'optimizer' )comparison_operator )if_clause )dictionary_comprehension )return_statement )block )function_definition )module
Returns the state of the scheduler as a ``dict``.
(module (function_definition (function_name_wiggleFileHandleToProtocol) function_name_wiggleFileHandleToProtocol (parameters (identifier_self) identifier_self (identifier_fileHandle) identifier_fileHandle )parameters (block (for_statement (identifier_line) identifier_line (identifier_fileHandle) identifier_fileHandle (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_readWiggleLine) identifier_readWiggleLine )attribute (argument_list (identifier_line) identifier_line )argument_list )call )expression_statement )block )for_statement (return_statement (attribute (identifier_self) identifier_self (identifier__data) identifier__data )attribute )return_statement )block )function_definition )module
Return a continuous protocol object satsifiying the given query parameters from the given wiggle file handle.
(module (function_definition (function_name_conv2d) function_name_conv2d (parameters (identifier_self) identifier_self (typed_parameter (identifier_x_in) identifier_x_in (type (identifier_Connection) identifier_Connection )type )typed_parameter (typed_parameter (identifier_w_in) identifier_w_in (type (identifier_Connection) identifier_Connection )type )typed_parameter (identifier_receptive_field_size) identifier_receptive_field_size (identifier_filters_number) identifier_filters_number (default_parameter (identifier_stride) identifier_stride (integer_1) integer_1 )default_parameter (default_parameter (identifier_padding) identifier_padding (integer_1) integer_1 )default_parameter (default_parameter (identifier_name) identifier_name (string_"") string_"" )default_parameter )parameters (block (expression_statement (assignment (identifier_x_cols) identifier_x_cols (call (attribute (identifier_self) identifier_self (identifier_tensor_3d_to_cols) identifier_tensor_3d_to_cols )attribute (argument_list (identifier_x_in) identifier_x_in (identifier_receptive_field_size) identifier_receptive_field_size (keyword_argument (identifier_stride) identifier_stride (identifier_stride) identifier_stride )keyword_argument (keyword_argument (identifier_padding) identifier_padding (identifier_padding) identifier_padding )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_mul) identifier_mul (call (attribute (identifier_self) identifier_self (identifier_transpose) identifier_transpose )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_matrix_multiply) identifier_matrix_multiply )attribute (argument_list (identifier_x_cols) identifier_x_cols (identifier_w_in) identifier_w_in )argument_list )call (integer_0) integer_0 (integer_2) integer_2 (integer_1) integer_1 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_output) identifier_output (call (attribute (identifier_self) identifier_self (identifier_reshape) identifier_reshape )attribute (argument_list (identifier_mul) identifier_mul (tuple (unary_operator (integer_1) integer_1 )unary_operator (identifier_filters_number) identifier_filters_number (identifier_receptive_field_size) identifier_receptive_field_size (identifier_receptive_field_size) identifier_receptive_field_size )tuple )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_output) identifier_output (identifier_name) identifier_name )attribute (identifier_name) identifier_name )assignment )expression_statement (return_statement (identifier_output) identifier_output )return_statement )block )function_definition )module
Computes a 2-D convolution given 4-D input and filter tensors.
(module (function_definition (function_name_url_add_params) function_name_url_add_params (parameters (identifier_url) identifier_url (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_parsed_url) identifier_parsed_url (call (attribute (identifier_urlparse) identifier_urlparse (identifier_urlsplit) identifier_urlsplit )attribute (argument_list (identifier_url) identifier_url )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_params) identifier_params (call (attribute (identifier_urlparse) identifier_urlparse (identifier_parse_qsl) identifier_parse_qsl )attribute (argument_list (attribute (identifier_parsed_url) identifier_parsed_url (identifier_query) identifier_query )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_parsed_url) identifier_parsed_url (call (identifier_list) identifier_list (argument_list (identifier_parsed_url) identifier_parsed_url )argument_list )call )assignment )expression_statement (for_statement (identifier_pair) identifier_pair (call (attribute (identifier_kwargs) identifier_kwargs (identifier_iteritems) identifier_iteritems )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_params) identifier_params (identifier_append) identifier_append )attribute (argument_list (identifier_pair) identifier_pair )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (subscript (identifier_parsed_url) identifier_parsed_url (integer_3) integer_3 )subscript (call (attribute (identifier_urllib) identifier_urllib (identifier_urlencode) identifier_urlencode )attribute (argument_list (identifier_params) identifier_params )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_urlparse) identifier_urlparse (identifier_urlunsplit) identifier_urlunsplit )attribute (argument_list (identifier_parsed_url) identifier_parsed_url )argument_list )call )return_statement )block )function_definition )module
Add parameters to an url >>> url_add_params('http://example.com/', a=1, b=3) 'http://example.com/?a=1&b=3' >>> url_add_params('http://example.com/?c=8', a=1, b=3) 'http://example.com/?c=8&a=1&b=3' >>> url_add_params('http://example.com/#/irock', a=1, b=3) 'http://example.com/?a=1&b=3#/irock' >>> url_add_params('http://example.com/?id=10#/irock', a=1, b=3) 'http://example.com/?id=10&a=1&b=3#/irock'
(module (function_definition (function_name_name) function_name_name (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (attribute (call (attribute (identifier_ffi) identifier_ffi (identifier_string) identifier_string )attribute (argument_list (call (attribute (identifier_lib) identifier_lib (identifier_EnvGetDeftemplateName) identifier_EnvGetDeftemplateName )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__env) identifier__env )attribute (attribute (identifier_self) identifier_self (identifier__tpl) identifier__tpl )attribute )argument_list )call )argument_list )call (identifier_decode) identifier_decode )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Template name.
(module (function_definition (function_name_get_cert_serial) function_name_get_cert_serial (parameters (identifier_cert_file) identifier_cert_file )parameters (block (expression_statement (assignment (identifier_cmd) identifier_cmd (call (attribute (string_"certutil.exe -silent -verify {0}") string_"certutil.exe -silent -verify {0}" (identifier_format) identifier_format )attribute (argument_list (identifier_cert_file) identifier_cert_file )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_out) identifier_out (call (subscript (identifier___salt__) identifier___salt__ (string_'cmd.run') string_'cmd.run' )subscript (argument_list (identifier_cmd) identifier_cmd )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_matches) identifier_matches (call (attribute (identifier_re) identifier_re (identifier_search) identifier_search )attribute (argument_list (string_r":\s*(\w*)\r\n\r\n") string_r":\s*(\w*)\r\n\r\n" (identifier_out) identifier_out )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_matches) identifier_matches (None) None )comparison_operator (block (return_statement (call (attribute (subscript (call (attribute (identifier_matches) identifier_matches (identifier_groups) identifier_groups )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )return_statement )block (else_clause (block (return_statement (None) None )return_statement )block )else_clause )if_statement )block )function_definition )module
Get the serial number of a certificate file cert_file The certificate file to find the serial for CLI Example: .. code-block:: bash salt '*' certutil.get_cert_serial <certificate name>
(module (function_definition (function_name_cut_references) function_name_cut_references (parameters (identifier_text_lines) identifier_text_lines )parameters (block (expression_statement (assignment (identifier_ref_sect_start) identifier_ref_sect_start (call (identifier_find_reference_section) identifier_find_reference_section (argument_list (identifier_text_lines) identifier_text_lines )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_ref_sect_start) identifier_ref_sect_start (None) None )comparison_operator (block (expression_statement (assignment (identifier_start) identifier_start (subscript (identifier_ref_sect_start) identifier_ref_sect_start (string_"start_line") string_"start_line" )subscript )assignment )expression_statement (expression_statement (assignment (identifier_end) identifier_end (call (identifier_find_end_of_reference_section) identifier_find_end_of_reference_section (argument_list (identifier_text_lines) identifier_text_lines (identifier_start) identifier_start (subscript (identifier_ref_sect_start) identifier_ref_sect_start (string_"marker") string_"marker" )subscript (subscript (identifier_ref_sect_start) identifier_ref_sect_start (string_"marker_pattern") string_"marker_pattern" )subscript )argument_list )call )assignment )expression_statement (delete_statement (subscript (identifier_text_lines) identifier_text_lines (slice (identifier_start) identifier_start (colon) colon (binary_operator (identifier_end) identifier_end (integer_1) integer_1 )binary_operator )slice )subscript )delete_statement )block (else_clause (block (expression_statement (call (attribute (attribute (identifier_current_app) identifier_current_app (identifier_logger) identifier_logger )attribute (identifier_warning) identifier_warning )attribute (argument_list (string_"Found no references to remove.") string_"Found no references to remove." )argument_list )call )expression_statement (return_statement (identifier_text_lines) identifier_text_lines )return_statement )block )else_clause )if_statement (return_statement (identifier_text_lines) identifier_text_lines )return_statement )block )function_definition )module
Return the text lines with the references cut.
(module (function_definition (function_name__check_iscsi_rest_patch_allowed) function_name__check_iscsi_rest_patch_allowed (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (pattern_list (identifier_headers) identifier_headers (identifier_bios_uri) identifier_bios_uri (identifier_bios_settings) identifier_bios_settings )pattern_list (call (attribute (identifier_self) identifier_self (identifier__check_bios_resource) identifier__check_bios_resource )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (parenthesized_expression (boolean_operator (comparison_operator (string_'links') string_'links' (identifier_bios_settings) identifier_bios_settings )comparison_operator (comparison_operator (string_'iScsi') string_'iScsi' (subscript (identifier_bios_settings) identifier_bios_settings (string_'links') string_'links' )subscript )comparison_operator )boolean_operator )parenthesized_expression (block (expression_statement (assignment (identifier_iscsi_uri) identifier_iscsi_uri (subscript (subscript (subscript (identifier_bios_settings) identifier_bios_settings (string_'links') string_'links' )subscript (string_'iScsi') string_'iScsi' )subscript (string_'href') string_'href' )subscript )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_status) identifier_status (identifier_headers) identifier_headers (identifier_settings) identifier_settings )pattern_list (call (attribute (identifier_self) identifier_self (identifier__rest_get) identifier__rest_get )attribute (argument_list (identifier_iscsi_uri) identifier_iscsi_uri )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_status) identifier_status (integer_200) integer_200 )comparison_operator (block (expression_statement (assignment (identifier_msg) identifier_msg (call (attribute (identifier_self) identifier_self (identifier__get_extended_error) identifier__get_extended_error )attribute (argument_list (identifier_settings) identifier_settings )argument_list )call )assignment )expression_statement (raise_statement (call (attribute (identifier_exception) identifier_exception (identifier_IloError) identifier_IloError )attribute (argument_list (identifier_msg) identifier_msg )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier__operation_allowed) identifier__operation_allowed )attribute (argument_list (identifier_headers) identifier_headers (string_'PATCH') string_'PATCH' )argument_list )call )not_operator (block (expression_statement (assignment (pattern_list (identifier_headers) identifier_headers (identifier_iscsi_uri) identifier_iscsi_uri (identifier_settings) identifier_settings )pattern_list (parenthesized_expression (call (attribute (identifier_self) identifier_self (identifier__get_iscsi_settings_resource) identifier__get_iscsi_settings_resource )attribute (argument_list (identifier_settings) identifier_settings )argument_list )call )parenthesized_expression )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__validate_if_patch_supported) identifier__validate_if_patch_supported )attribute (argument_list (identifier_headers) identifier_headers (identifier_iscsi_uri) identifier_iscsi_uri )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_iscsi_uri) identifier_iscsi_uri )return_statement )block (else_clause (block (expression_statement (assignment (identifier_msg) identifier_msg (parenthesized_expression (concatenated_string (string_'"links/iScsi" section in bios') string_'"links/iScsi" section in bios' (string_' does not exist') string_' does not exist' )concatenated_string )parenthesized_expression )assignment )expression_statement (raise_statement (call (attribute (identifier_exception) identifier_exception (identifier_IloCommandNotSupportedError) identifier_IloCommandNotSupportedError )attribute (argument_list (identifier_msg) identifier_msg )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Checks if patch is supported on iscsi. :returns: iscsi url. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server.
(module (function_definition (function_name_cwise) function_name_cwise (parameters (identifier_tf_fn) identifier_tf_fn (identifier_xs) identifier_xs (default_parameter (identifier_output_dtype) identifier_output_dtype (None) None )default_parameter (default_parameter (identifier_grad_function) identifier_grad_function (None) None )default_parameter (default_parameter (identifier_name) identifier_name (None) None )default_parameter )parameters (block (return_statement (call (identifier_slicewise) identifier_slicewise (argument_list (identifier_tf_fn) identifier_tf_fn (identifier_xs) identifier_xs (keyword_argument (identifier_output_dtype) identifier_output_dtype (identifier_output_dtype) identifier_output_dtype )keyword_argument (keyword_argument (identifier_splittable_dims) identifier_splittable_dims (attribute (attribute (subscript (identifier_xs) identifier_xs (integer_0) integer_0 )subscript (identifier_shape) identifier_shape )attribute (identifier_dims) identifier_dims )attribute )keyword_argument (keyword_argument (identifier_grad_function) identifier_grad_function (identifier_grad_function) identifier_grad_function )keyword_argument (keyword_argument (identifier_name) identifier_name (boolean_operator (identifier_name) identifier_name (string_"cwise") string_"cwise" )boolean_operator )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Component-wise operation with no broadcasting. Args: tf_fn: a component-wise function taking n tf.Tensor inputs and producing a tf.Tensor output xs: n Tensors output_dtype: an optional dtype grad_function: an optional python function name: an optional string Returns: a Tensor
(module (function_definition (function_name_encode_conjure_union_type) function_name_encode_conjure_union_type (parameters (identifier_cls) identifier_cls (identifier_obj) identifier_obj )parameters (block (expression_statement (assignment (identifier_encoded) identifier_encoded (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (subscript (identifier_encoded) identifier_encoded (string_"type") string_"type" )subscript (attribute (identifier_obj) identifier_obj (identifier_type) identifier_type )attribute )assignment )expression_statement (for_statement (pattern_list (identifier_attr) identifier_attr (identifier_field_definition) identifier_field_definition )pattern_list (call (attribute (call (attribute (identifier_obj) identifier_obj (identifier__options) identifier__options )attribute (argument_list )argument_list )call (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (attribute (identifier_field_definition) identifier_field_definition (identifier_identifier) identifier_identifier )attribute (attribute (identifier_obj) identifier_obj (identifier_type) identifier_type )attribute )comparison_operator (block (expression_statement (assignment (identifier_attribute) identifier_attribute (identifier_attr) identifier_attr )assignment )expression_statement (break_statement )break_statement )block )if_statement )block (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"could not find attribute for union ") string_"could not find attribute for union " (call (attribute (string_"member {0} of type {1}") string_"member {0} of type {1}" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_obj) identifier_obj (identifier_type) identifier_type )attribute (attribute (identifier_obj) identifier_obj (identifier___class__) identifier___class__ )attribute )argument_list )call )binary_operator )argument_list )call )raise_statement )block )else_clause )for_statement (expression_statement (assignment (identifier_defined_field_definition) identifier_defined_field_definition (subscript (call (attribute (identifier_obj) identifier_obj (identifier__options) identifier__options )attribute (argument_list )argument_list )call (identifier_attribute) identifier_attribute )subscript )assignment )expression_statement (expression_statement (assignment (subscript (identifier_encoded) identifier_encoded (attribute (identifier_defined_field_definition) identifier_defined_field_definition (identifier_identifier) identifier_identifier )attribute )subscript (call (attribute (identifier_cls) identifier_cls (identifier_do_encode) identifier_do_encode )attribute (argument_list (call (identifier_getattr) identifier_getattr (argument_list (identifier_obj) identifier_obj (identifier_attribute) identifier_attribute )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (identifier_encoded) identifier_encoded )return_statement )block )function_definition )module
Encodes a conjure union into json
(module (function_definition (function_name_handle_message) function_name_handle_message (parameters (identifier_self) identifier_self (identifier_msg) identifier_msg )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__messages) identifier__messages )attribute (identifier_append) identifier_append )attribute (argument_list (dictionary (pair (string_'type') string_'type' (attribute (identifier_msg) identifier_msg (identifier_category) identifier_category )attribute )pair (pair (string_'module') string_'module' (attribute (identifier_msg) identifier_msg (identifier_module) identifier_module )attribute )pair (pair (string_'obj') string_'obj' (attribute (identifier_msg) identifier_msg (identifier_obj) identifier_obj )attribute )pair (pair (string_'line') string_'line' (attribute (identifier_msg) identifier_msg (identifier_line) identifier_line )attribute )pair (pair (string_'column') string_'column' (attribute (identifier_msg) identifier_msg (identifier_column) identifier_column )attribute )pair (pair (string_'path') string_'path' (attribute (identifier_msg) identifier_msg (identifier_path) identifier_path )attribute )pair (pair (string_'symbol') string_'symbol' (attribute (identifier_msg) identifier_msg (identifier_symbol) identifier_symbol )attribute )pair (pair (string_'message') string_'message' (boolean_operator (call (identifier_str) identifier_str (argument_list (attribute (identifier_msg) identifier_msg (identifier_msg) identifier_msg )attribute )argument_list )call (string_'') string_'' )boolean_operator )pair (pair (string_'message-id') string_'message-id' (attribute (identifier_msg) identifier_msg (identifier_msg_id) identifier_msg_id )attribute )pair )dictionary )argument_list )call )expression_statement )block )function_definition )module
Store new message for later use. .. seealso:: :meth:`~JsonExtendedReporter.on_close`
(module (function_definition (function_name_save) function_name_save (parameters (identifier_self) identifier_self )parameters (block (for_statement (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier_mutedGlyphsNames) identifier_mutedGlyphsNames )attribute (block (if_statement (comparison_operator (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier_font) identifier_font )attribute )comparison_operator (block (continue_statement )continue_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_info) identifier_info )attribute (argument_list (string_"removing muted glyph %s") string_"removing muted glyph %s" (identifier_name) identifier_name )argument_list )call )expression_statement )block )if_statement (delete_statement (subscript (attribute (identifier_self) identifier_self (identifier_font) identifier_font )attribute (identifier_name) identifier_name )subscript )delete_statement )block )for_statement (expression_statement (assignment (identifier_directory) identifier_directory (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_normpath) identifier_normpath )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_directory) identifier_directory (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_directory) identifier_directory )argument_list )call )not_operator )boolean_operator (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_makedirs) identifier_makedirs )attribute (argument_list (identifier_directory) identifier_directory )argument_list )call )expression_statement )block )if_statement (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_font) identifier_font )attribute (identifier_save) identifier_save )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_abspath) identifier_abspath )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute )argument_list )call (attribute (identifier_self) identifier_self (identifier_ufoVersion) identifier_ufoVersion )attribute )argument_list )call )expression_statement )block (except_clause (as_pattern (attribute (identifier_defcon) identifier_defcon (identifier_DefconError) identifier_DefconError )attribute (as_pattern_target (identifier_error) identifier_error )as_pattern_target )as_pattern (block (if_statement (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_exception) identifier_exception )attribute (argument_list (string_"Error generating.") string_"Error generating." )argument_list )call )expression_statement )block )if_statement (return_statement (expression_list (False) False (attribute (identifier_error) identifier_error (identifier_report) identifier_report )attribute )expression_list )return_statement )block )except_clause )try_statement (return_statement (expression_list (True) True (None) None )expression_list )return_statement )block )function_definition )module
Save the UFO.
(module (function_definition (function_name_to_dict) function_name_to_dict (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_task_desc_as_dict) identifier_task_desc_as_dict (dictionary (pair (string_'uid') string_'uid' (attribute (identifier_self) identifier_self (identifier__uid) identifier__uid )attribute )pair (pair (string_'name') string_'name' (attribute (identifier_self) identifier_self (identifier__name) identifier__name )attribute )pair (pair (string_'state') string_'state' (attribute (identifier_self) identifier_self (identifier__state) identifier__state )attribute )pair (pair (string_'state_history') string_'state_history' (attribute (identifier_self) identifier_self (identifier__state_history) identifier__state_history )attribute )pair (pair (string_'pre_exec') string_'pre_exec' (attribute (identifier_self) identifier_self (identifier__pre_exec) identifier__pre_exec )attribute )pair (pair (string_'executable') string_'executable' (attribute (identifier_self) identifier_self (identifier__executable) identifier__executable )attribute )pair (pair (string_'arguments') string_'arguments' (attribute (identifier_self) identifier_self (identifier__arguments) identifier__arguments )attribute )pair (pair (string_'post_exec') string_'post_exec' (attribute (identifier_self) identifier_self (identifier__post_exec) identifier__post_exec )attribute )pair (pair (string_'cpu_reqs') string_'cpu_reqs' (attribute (identifier_self) identifier_self (identifier__cpu_reqs) identifier__cpu_reqs )attribute )pair (pair (string_'gpu_reqs') string_'gpu_reqs' (attribute (identifier_self) identifier_self (identifier__gpu_reqs) identifier__gpu_reqs )attribute )pair (pair (string_'lfs_per_process') string_'lfs_per_process' (attribute (identifier_self) identifier_self (identifier__lfs_per_process) identifier__lfs_per_process )attribute )pair (pair (string_'upload_input_data') string_'upload_input_data' (attribute (identifier_self) identifier_self (identifier__upload_input_data) identifier__upload_input_data )attribute )pair (pair (string_'copy_input_data') string_'copy_input_data' (attribute (identifier_self) identifier_self (identifier__copy_input_data) identifier__copy_input_data )attribute )pair (pair (string_'link_input_data') string_'link_input_data' (attribute (identifier_self) identifier_self (identifier__link_input_data) identifier__link_input_data )attribute )pair (pair (string_'move_input_data') string_'move_input_data' (attribute (identifier_self) identifier_self (identifier__move_input_data) identifier__move_input_data )attribute )pair (pair (string_'copy_output_data') string_'copy_output_data' (attribute (identifier_self) identifier_self (identifier__copy_output_data) identifier__copy_output_data )attribute )pair (pair (string_'move_output_data') string_'move_output_data' (attribute (identifier_self) identifier_self (identifier__move_output_data) identifier__move_output_data )attribute )pair (pair (string_'download_output_data') string_'download_output_data' (attribute (identifier_self) identifier_self (identifier__download_output_data) identifier__download_output_data )attribute )pair (pair (string_'stdout') string_'stdout' (attribute (identifier_self) identifier_self (identifier__stdout) identifier__stdout )attribute )pair (pair (string_'stderr') string_'stderr' (attribute (identifier_self) identifier_self (identifier__stderr) identifier__stderr )attribute )pair (pair (string_'exit_code') string_'exit_code' (attribute (identifier_self) identifier_self (identifier__exit_code) identifier__exit_code )attribute )pair (pair (string_'path') string_'path' (attribute (identifier_self) identifier_self (identifier__path) identifier__path )attribute )pair (pair (string_'tag') string_'tag' (attribute (identifier_self) identifier_self (identifier__tag) identifier__tag )attribute )pair (pair (string_'parent_stage') string_'parent_stage' (attribute (identifier_self) identifier_self (identifier__p_stage) identifier__p_stage )attribute )pair (pair (string_'parent_pipeline') string_'parent_pipeline' (attribute (identifier_self) identifier_self (identifier__p_pipeline) identifier__p_pipeline )attribute )pair )dictionary )assignment )expression_statement (return_statement (identifier_task_desc_as_dict) identifier_task_desc_as_dict )return_statement )block )function_definition )module
Convert current Task into a dictionary :return: python dictionary
(module (function_definition (function_name_add_component_definition) function_name_add_component_definition (parameters (identifier_self) identifier_self (identifier_definition) identifier_definition )parameters (block (if_statement (comparison_operator (attribute (identifier_definition) identifier_definition (identifier_identity) identifier_identity )attribute (call (attribute (attribute (identifier_self) identifier_self (identifier__components) identifier__components )attribute (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )comparison_operator (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__components) identifier__components )attribute (attribute (identifier_definition) identifier_definition (identifier_identity) identifier_identity )attribute )subscript (identifier_definition) identifier_definition )assignment )expression_statement )block (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"{} has already been defined") string_"{} has already been defined" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_definition) identifier_definition (identifier_identity) identifier_identity )attribute )argument_list )call )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Add a ComponentDefinition to the document
(module (function_definition (function_name_featureclass_to_json) function_name_featureclass_to_json (parameters (identifier_fc) identifier_fc )parameters (block (if_statement (comparison_operator (identifier_arcpyFound) identifier_arcpyFound (False) False )comparison_operator (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (string_"ArcPy is required to use this function") string_"ArcPy is required to use this function" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_desc) identifier_desc (call (attribute (identifier_arcpy) identifier_arcpy (identifier_Describe) identifier_Describe )attribute (argument_list (identifier_fc) identifier_fc )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (attribute (identifier_desc) identifier_desc (identifier_dataType) identifier_dataType )attribute (string_"Table") string_"Table" )comparison_operator (comparison_operator (attribute (identifier_desc) identifier_desc (identifier_dataType) identifier_dataType )attribute (string_"TableView") string_"TableView" )comparison_operator )boolean_operator (block (return_statement (call (identifier_recordset_to_json) identifier_recordset_to_json (argument_list (keyword_argument (identifier_table) identifier_table (identifier_fc) identifier_fc )keyword_argument )argument_list )call )return_statement )block (else_clause (block (return_statement (attribute (call (attribute (identifier_arcpy) identifier_arcpy (identifier_FeatureSet) identifier_FeatureSet )attribute (argument_list (identifier_fc) identifier_fc )argument_list )call (identifier_JSON) identifier_JSON )attribute )return_statement )block )else_clause )if_statement )block )function_definition )module
converts a feature class to JSON
(module (function_definition (function_name_format_ret) function_name_format_ret (parameters (identifier_return_set) identifier_return_set (default_parameter (identifier_as_json) identifier_as_json (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_ret_list) identifier_ret_list (call (identifier_list) identifier_list (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_item) identifier_item (identifier_return_set) identifier_return_set (block (expression_statement (assignment (identifier_d) identifier_d (dictionary (pair (string_"ip") string_"ip" (identifier_item) identifier_item )pair )dictionary )assignment )expression_statement (expression_statement (call (attribute (identifier_ret_list) identifier_ret_list (identifier_append) identifier_append )attribute (argument_list (identifier_d) identifier_d )argument_list )call )expression_statement )block )for_statement (if_statement (identifier_as_json) identifier_as_json (block (return_statement (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_ret_list) identifier_ret_list )argument_list )call )return_statement )block )if_statement (return_statement (identifier_ret_list) identifier_ret_list )return_statement )block )function_definition )module
decouple, allow for modifications to return type returns a list of ip addresses in object or json form
(module (function_definition (function_name_from_content) function_name_from_content (parameters (identifier_cls) identifier_cls (identifier_content) identifier_content )parameters (block (if_statement (comparison_operator (string_"An internal error has occurred") string_"An internal error has occurred" (identifier_content) identifier_content )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_parsed_content) identifier_parsed_content (call (identifier_parse_tibiacom_content) identifier_parse_tibiacom_content (argument_list (identifier_content) identifier_content )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_name_header) identifier_name_header (call (attribute (identifier_parsed_content) identifier_parsed_content (identifier_find) identifier_find )attribute (argument_list (string_'h1') string_'h1' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_guild) identifier_guild (call (identifier_Guild) identifier_Guild (argument_list (call (attribute (attribute (identifier_name_header) identifier_name_header (identifier_text) identifier_text )attribute (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (raise_statement (call (identifier_InvalidContent) identifier_InvalidContent (argument_list (string_"content does not belong to a Tibia.com guild page.") string_"content does not belong to a Tibia.com guild page." )argument_list )call )raise_statement )block )except_clause )try_statement (if_statement (not_operator (call (attribute (identifier_guild) identifier_guild (identifier__parse_logo) identifier__parse_logo )attribute (argument_list (identifier_parsed_content) identifier_parsed_content )argument_list )call )not_operator (block (raise_statement (call (identifier_InvalidContent) identifier_InvalidContent (argument_list (string_"content does not belong to a Tibia.com guild page.") string_"content does not belong to a Tibia.com guild page." )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_info_container) identifier_info_container (call (attribute (identifier_parsed_content) identifier_parsed_content (identifier_find) identifier_find )attribute (argument_list (string_"div") string_"div" (keyword_argument (identifier_id) identifier_id (string_"GuildInformationContainer") string_"GuildInformationContainer" )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_guild) identifier_guild (identifier__parse_guild_info) identifier__parse_guild_info )attribute (argument_list (identifier_info_container) identifier_info_container )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_guild) identifier_guild (identifier__parse_application_info) identifier__parse_application_info )attribute (argument_list (identifier_info_container) identifier_info_container )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_guild) identifier_guild (identifier__parse_guild_homepage) identifier__parse_guild_homepage )attribute (argument_list (identifier_info_container) identifier_info_container )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_guild) identifier_guild (identifier__parse_guild_guildhall) identifier__parse_guild_guildhall )attribute (argument_list (identifier_info_container) identifier_info_container )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_guild) identifier_guild (identifier__parse_guild_disband_info) identifier__parse_guild_disband_info )attribute (argument_list (identifier_info_container) identifier_info_container )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_guild) identifier_guild (identifier__parse_guild_members) identifier__parse_guild_members )attribute (argument_list (identifier_parsed_content) identifier_parsed_content )argument_list )call )expression_statement (if_statement (boolean_operator (attribute (identifier_guild) identifier_guild (identifier_guildhall) identifier_guildhall )attribute (attribute (identifier_guild) identifier_guild (identifier_members) identifier_members )attribute )boolean_operator (block (expression_statement (assignment (attribute (attribute (identifier_guild) identifier_guild (identifier_guildhall) identifier_guildhall )attribute (identifier_owner) identifier_owner )attribute (attribute (subscript (attribute (identifier_guild) identifier_guild (identifier_members) identifier_members )attribute (integer_0) integer_0 )subscript (identifier_name) identifier_name )attribute )assignment )expression_statement )block )if_statement (return_statement (identifier_guild) identifier_guild )return_statement )block )function_definition )module
Creates an instance of the class from the HTML content of the guild's page. Parameters ----------- content: :class:`str` The HTML content of the page. Returns ---------- :class:`Guild` The guild contained in the page or None if it doesn't exist. Raises ------ InvalidContent If content is not the HTML of a guild's page.
(module (function_definition (function_name__get_dbt_columns_from_bq_table) function_name__get_dbt_columns_from_bq_table (parameters (identifier_self) identifier_self (identifier_table) identifier_table )parameters (block (expression_statement (string_"Translates BQ SchemaField dicts into dbt BigQueryColumn objects") string_"Translates BQ SchemaField dicts into dbt BigQueryColumn objects" )expression_statement (expression_statement (assignment (identifier_columns) identifier_columns (list )list )assignment )expression_statement (for_statement (identifier_col) identifier_col (attribute (identifier_table) identifier_table (identifier_schema) identifier_schema )attribute (block (expression_statement (assignment (identifier_dtype) identifier_dtype (call (attribute (attribute (identifier_self) identifier_self (identifier_Column) identifier_Column )attribute (identifier_translate_type) identifier_translate_type )attribute (argument_list (attribute (identifier_col) identifier_col (identifier_field_type) identifier_field_type )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_column) identifier_column (call (attribute (identifier_self) identifier_self (identifier_Column) identifier_Column )attribute (argument_list (attribute (identifier_col) identifier_col (identifier_name) identifier_name )attribute (identifier_dtype) identifier_dtype (attribute (identifier_col) identifier_col (identifier_fields) identifier_fields )attribute (attribute (identifier_col) identifier_col (identifier_mode) identifier_mode )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_columns) identifier_columns (identifier_append) identifier_append )attribute (argument_list (identifier_column) identifier_column )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_columns) identifier_columns )return_statement )block )function_definition )module
Translates BQ SchemaField dicts into dbt BigQueryColumn objects
(module (function_definition (function_name__accumulate_random) function_name__accumulate_random (parameters (identifier_count) identifier_count (identifier_found) identifier_found (identifier_oldthing) identifier_oldthing (identifier_newthing) identifier_newthing )parameters (block (if_statement (comparison_operator (call (identifier_randint) identifier_randint (argument_list (integer_1) integer_1 (binary_operator (identifier_count) identifier_count (identifier_found) identifier_found )binary_operator )argument_list )call (identifier_found) identifier_found )comparison_operator (block (return_statement (expression_list (binary_operator (identifier_count) identifier_count (identifier_found) identifier_found )binary_operator (identifier_newthing) identifier_newthing )expression_list )return_statement )block (else_clause (block (return_statement (expression_list (binary_operator (identifier_count) identifier_count (identifier_found) identifier_found )binary_operator (identifier_oldthing) identifier_oldthing )expression_list )return_statement )block )else_clause )if_statement )block )function_definition )module
This performs on-line random selection. We have a stream of objects o_1,c_1; o_2,c_2; ... where there are c_i equivalent objects like o_1. We'd like to pick a random object o uniformly at random from the list [o_1]*c_1 + [o_2]*c_2 + ... (actually, this algorithm allows arbitrary positive weights, not necessarily integers) without spending the time&space to actually create that list. Luckily, the following works: thing = None c_tot for o_n, c_n in things: c_tot += c_n if randint(1,c_tot) <= c_n: thing = o_n This function is written in an accumulator format, so it can be used one call at a time: EXAMPLE: > thing = None > count = 0 > for i in range(10): > c = 10-i > count, thing = accumulate_random(count,c,thing,i) INPUTS: count: integer, sum of weights found before newthing found: integer, weight for newthing oldthing: previously selected object (will never be selected if count == 0) newthing: incoming object OUTPUT: (newcount, pick): newcount is count+found, pick is the newly selected object.
(module (function_definition (function_name_load) function_name_load (parameters (identifier_cls) identifier_cls (identifier_filename) identifier_filename (identifier_gzipped) identifier_gzipped (default_parameter (identifier_byteorder) identifier_byteorder (string_'big') string_'big' )default_parameter )parameters (block (expression_statement (assignment (identifier_open_file) identifier_open_file (conditional_expression (attribute (identifier_gzip) identifier_gzip (identifier_open) identifier_open )attribute (identifier_gzipped) identifier_gzipped (identifier_open) identifier_open )conditional_expression )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open_file) identifier_open_file (argument_list (identifier_filename) identifier_filename (string_'rb') string_'rb' )argument_list )call (as_pattern_target (identifier_buff) identifier_buff )as_pattern_target )as_pattern )with_item )with_clause (block (return_statement (call (attribute (identifier_cls) identifier_cls (identifier_from_buffer) identifier_from_buffer )attribute (argument_list (identifier_buff) identifier_buff (identifier_byteorder) identifier_byteorder )argument_list )call )return_statement )block )with_statement )block )function_definition )module
Read, parse and return the file at the specified location. The `gzipped` argument is used to indicate if the specified file is gzipped. The `byteorder` argument lets you specify whether the file is big-endian or little-endian.
(module (function_definition (function_name_dfs_recursive) function_name_dfs_recursive (parameters (identifier_graph) identifier_graph (identifier_node) identifier_node (identifier_seen) identifier_seen )parameters (block (expression_statement (assignment (subscript (identifier_seen) identifier_seen (identifier_node) identifier_node )subscript (True) True )assignment )expression_statement (for_statement (identifier_neighbor) identifier_neighbor (subscript (identifier_graph) identifier_graph (identifier_node) identifier_node )subscript (block (if_statement (not_operator (subscript (identifier_seen) identifier_seen (identifier_neighbor) identifier_neighbor )subscript )not_operator (block (expression_statement (call (identifier_dfs_recursive) identifier_dfs_recursive (argument_list (identifier_graph) identifier_graph (identifier_neighbor) identifier_neighbor (identifier_seen) identifier_seen )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
DFS, detect connected component, recursive implementation :param graph: directed graph in listlist or listdict format :param int node: to start graph exploration :param boolean-table seen: will be set true for the connected component containing node. :complexity: `O(|V|+|E|)`
(module (function_definition (function_name_init_app) function_name_init_app (parameters (identifier_self) identifier_self (identifier_app) identifier_app )parameters (block (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_app) identifier_app (string_'extensions') string_'extensions' )argument_list )call )not_operator (block (expression_statement (assignment (attribute (identifier_app) identifier_app (identifier_extensions) identifier_extensions )attribute (dictionary )dictionary )assignment )expression_statement )block )if_statement (expression_statement (assignment (subscript (attribute (identifier_app) identifier_app (identifier_extensions) identifier_extensions )attribute (string_'flask-jwt-simple') string_'flask-jwt-simple' )subscript (identifier_self) identifier_self )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__set_default_configuration_options) identifier__set_default_configuration_options )attribute (argument_list (identifier_app) identifier_app )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__set_error_handler_callbacks) identifier__set_error_handler_callbacks )attribute (argument_list (identifier_app) identifier_app )argument_list )call )expression_statement (expression_statement (assignment (subscript (attribute (identifier_app) identifier_app (identifier_config) identifier_config )attribute (string_'PROPAGATE_EXCEPTIONS') string_'PROPAGATE_EXCEPTIONS' )subscript (True) True )assignment )expression_statement )block )function_definition )module
Register this extension with the flask app :param app: A flask application
(module (function_definition (function_name_construct_ctcp) function_name_construct_ctcp (parameters (list_splat_pattern (identifier_parts) identifier_parts )list_splat_pattern )parameters (block (expression_statement (assignment (identifier_message) identifier_message (call (attribute (string_' ') string_' ' (identifier_join) identifier_join )attribute (argument_list (identifier_parts) identifier_parts )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_message) identifier_message (call (attribute (identifier_message) identifier_message (identifier_replace) identifier_replace )attribute (argument_list (string_'\0') string_'\0' (binary_operator (identifier_CTCP_ESCAPE_CHAR) identifier_CTCP_ESCAPE_CHAR (string_'0') string_'0' )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_message) identifier_message (call (attribute (identifier_message) identifier_message (identifier_replace) identifier_replace )attribute (argument_list (string_'\n') string_'\n' (binary_operator (identifier_CTCP_ESCAPE_CHAR) identifier_CTCP_ESCAPE_CHAR (string_'n') string_'n' )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_message) identifier_message (call (attribute (identifier_message) identifier_message (identifier_replace) identifier_replace )attribute (argument_list (string_'\r') string_'\r' (binary_operator (identifier_CTCP_ESCAPE_CHAR) identifier_CTCP_ESCAPE_CHAR (string_'r') string_'r' )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_message) identifier_message (call (attribute (identifier_message) identifier_message (identifier_replace) identifier_replace )attribute (argument_list (identifier_CTCP_ESCAPE_CHAR) identifier_CTCP_ESCAPE_CHAR (binary_operator (identifier_CTCP_ESCAPE_CHAR) identifier_CTCP_ESCAPE_CHAR (identifier_CTCP_ESCAPE_CHAR) identifier_CTCP_ESCAPE_CHAR )binary_operator )argument_list )call )assignment )expression_statement (return_statement (binary_operator (binary_operator (identifier_CTCP_DELIMITER) identifier_CTCP_DELIMITER (identifier_message) identifier_message )binary_operator (identifier_CTCP_DELIMITER) identifier_CTCP_DELIMITER )binary_operator )return_statement )block )function_definition )module
Construct CTCP message.
(module (function_definition (function_name__worker_status) function_name__worker_status (parameters (identifier_target) identifier_target (identifier_worker) identifier_worker (identifier_activation) identifier_activation (default_parameter (identifier_profile) identifier_profile (string_'default') string_'default' )default_parameter (default_parameter (identifier_tgt_type) identifier_tgt_type (string_'glob') string_'glob' )default_parameter )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (dictionary (pair (string_'result') string_'result' (True) True )pair (pair (string_'errors') string_'errors' (list )list )pair (pair (string_'wrong_state') string_'wrong_state' (list )list )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_args) identifier_args (list (identifier_worker) identifier_worker (identifier_profile) identifier_profile )list )assignment )expression_statement (expression_statement (assignment (identifier_status) identifier_status (call (subscript (identifier___salt__) identifier___salt__ (string_'publish.publish') string_'publish.publish' )subscript (argument_list (identifier_target) identifier_target (string_'modjk.worker_status') string_'modjk.worker_status' (identifier_args) identifier_args (identifier_tgt_type) identifier_tgt_type )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_status) identifier_status )not_operator (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'result') string_'result' )subscript (False) False )assignment )expression_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )if_statement (for_statement (identifier_balancer) identifier_balancer (identifier_status) identifier_status (block (if_statement (not_operator (subscript (identifier_status) identifier_status (identifier_balancer) identifier_balancer )subscript )not_operator (block (expression_statement (call (attribute (subscript (identifier_ret) identifier_ret (string_'errors') string_'errors' )subscript (identifier_append) identifier_append )attribute (argument_list (identifier_balancer) identifier_balancer )argument_list )call )expression_statement )block (elif_clause (comparison_operator (subscript (subscript (identifier_status) identifier_status (identifier_balancer) identifier_balancer )subscript (string_'activation') string_'activation' )subscript (identifier_activation) identifier_activation )comparison_operator (block (expression_statement (call (attribute (subscript (identifier_ret) identifier_ret (string_'wrong_state') string_'wrong_state' )subscript (identifier_append) identifier_append )attribute (argument_list (identifier_balancer) identifier_balancer )argument_list )call )expression_statement )block )elif_clause )if_statement )block )for_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Check if the worker is in `activation` state in the targeted load balancers The function will return the following dictionary: result - False if no server returned from the published command errors - list of servers that couldn't find the worker wrong_state - list of servers that the worker was in the wrong state (not activation)
(module (function_definition (function_name_to_chords) function_name_to_chords (parameters (identifier_progression) identifier_progression (default_parameter (identifier_key) identifier_key (string_'C') string_'C' )default_parameter )parameters (block (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_progression) identifier_progression )argument_list )call (identifier_str) identifier_str )comparison_operator (block (expression_statement (assignment (identifier_progression) identifier_progression (list (identifier_progression) identifier_progression )list )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_result) identifier_result (list )list )assignment )expression_statement (for_statement (identifier_chord) identifier_chord (identifier_progression) identifier_progression (block (expression_statement (assignment (tuple_pattern (identifier_roman_numeral) identifier_roman_numeral (identifier_acc) identifier_acc (identifier_suffix) identifier_suffix )tuple_pattern (call (identifier_parse_string) identifier_parse_string (argument_list (identifier_chord) identifier_chord )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_roman_numeral) identifier_roman_numeral (identifier_numerals) identifier_numerals )comparison_operator (block (return_statement (list )list )return_statement )block )if_statement (if_statement (boolean_operator (comparison_operator (identifier_suffix) identifier_suffix (string_'7') string_'7' )comparison_operator (comparison_operator (identifier_suffix) identifier_suffix (string_'') string_'' )comparison_operator )boolean_operator (block (expression_statement (augmented_assignment (identifier_roman_numeral) identifier_roman_numeral (identifier_suffix) identifier_suffix )augmented_assignment )expression_statement (expression_statement (assignment (identifier_r) identifier_r (call (subscript (attribute (identifier_chords) identifier_chords (identifier___dict__) identifier___dict__ )attribute (identifier_roman_numeral) identifier_roman_numeral )subscript (argument_list (identifier_key) identifier_key )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_r) identifier_r (call (subscript (attribute (identifier_chords) identifier_chords (identifier___dict__) identifier___dict__ )attribute (identifier_roman_numeral) identifier_roman_numeral )subscript (argument_list (identifier_key) identifier_key )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_r) identifier_r (call (subscript (attribute (identifier_chords) identifier_chords (identifier_chord_shorthand) identifier_chord_shorthand )attribute (identifier_suffix) identifier_suffix )subscript (argument_list (subscript (identifier_r) identifier_r (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (while_statement (comparison_operator (identifier_acc) identifier_acc (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_r) identifier_r (call (identifier_map) identifier_map (argument_list (attribute (identifier_notes) identifier_notes (identifier_diminish) identifier_diminish )attribute (identifier_r) identifier_r )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_acc) identifier_acc (integer_1) integer_1 )augmented_assignment )expression_statement )block )while_statement (while_statement (comparison_operator (identifier_acc) identifier_acc (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_r) identifier_r (call (identifier_map) identifier_map (argument_list (attribute (identifier_notes) identifier_notes (identifier_augment) identifier_augment )attribute (identifier_r) identifier_r )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_acc) identifier_acc (integer_1) integer_1 )augmented_assignment )expression_statement )block )while_statement (expression_statement (call (attribute (identifier_result) identifier_result (identifier_append) identifier_append )attribute (argument_list (identifier_r) identifier_r )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Convert a list of chord functions or a string to a list of chords. Examples: >>> to_chords(['I', 'V7']) [['C', 'E', 'G'], ['G', 'B', 'D', 'F']] >>> to_chords('I7') [['C', 'E', 'G', 'B']] Any number of accidentals can be used as prefix to augment or diminish; for example: bIV or #I. All the chord abbreviations in the chord module can be used as suffixes; for example: Im7, IVdim7, etc. You can combine prefixes and suffixes to manage complex progressions: #vii7, #iidim7, iii7, etc. Using 7 as suffix is ambiguous, since it is classicly used to denote the seventh chord when talking about progressions instead of just the dominant seventh chord. We have taken the classic route; I7 will get you a major seventh chord. If you specifically want a dominanth seventh, use Idom7.
(module (function_definition (function_name__validate_open_msg) function_name__validate_open_msg (parameters (identifier_self) identifier_self (identifier_open_msg) identifier_open_msg )parameters (block (assert_statement (comparison_operator (attribute (identifier_open_msg) identifier_open_msg (identifier_type) identifier_type )attribute (identifier_BGP_MSG_OPEN) identifier_BGP_MSG_OPEN )comparison_operator )assert_statement (expression_statement (assignment (identifier_opt_param_cap_map) identifier_opt_param_cap_map (attribute (identifier_open_msg) identifier_open_msg (identifier_opt_param_cap_map) identifier_opt_param_cap_map )attribute )assignment )expression_statement (expression_statement (assignment (identifier_remote_as) identifier_remote_as (attribute (identifier_open_msg) identifier_open_msg (identifier_my_as) identifier_my_as )attribute )assignment )expression_statement (expression_statement (assignment (identifier_cap4as) identifier_cap4as (call (attribute (identifier_opt_param_cap_map) identifier_opt_param_cap_map (identifier_get) identifier_get )attribute (argument_list (identifier_BGP_CAP_FOUR_OCTET_AS_NUMBER) identifier_BGP_CAP_FOUR_OCTET_AS_NUMBER (None) None )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_cap4as) identifier_cap4as (None) None )comparison_operator (block (if_statement (comparison_operator (identifier_remote_as) identifier_remote_as (identifier_AS_TRANS) identifier_AS_TRANS )comparison_operator (block (raise_statement (call (attribute (identifier_bgp) identifier_bgp (identifier_BadPeerAs) identifier_BadPeerAs )attribute (argument_list )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_cap_four_octet_as_number) identifier_cap_four_octet_as_number )attribute (False) False )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_remote_as) identifier_remote_as (attribute (identifier_cap4as) identifier_cap4as (identifier_as_number) identifier_as_number )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_cap_four_octet_as_number) identifier_cap_four_octet_as_number )attribute (True) True )assignment )expression_statement )block )else_clause )if_statement (if_statement (comparison_operator (identifier_remote_as) identifier_remote_as (attribute (attribute (identifier_self) identifier_self (identifier__peer) identifier__peer )attribute (identifier_remote_as) identifier_remote_as )attribute )comparison_operator (block (raise_statement (call (attribute (identifier_bgp) identifier_bgp (identifier_BadPeerAs) identifier_BadPeerAs )attribute (argument_list )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_open_msg) identifier_open_msg (identifier_version) identifier_version )attribute (identifier_BGP_VERSION_NUM) identifier_BGP_VERSION_NUM )comparison_operator (block (raise_statement (call (attribute (identifier_bgp) identifier_bgp (identifier_UnsupportedVersion) identifier_UnsupportedVersion )attribute (argument_list (identifier_BGP_VERSION_NUM) identifier_BGP_VERSION_NUM )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Validates BGP OPEN message according from application context. Parsing modules takes care of validating OPEN message that need no context. But here we validate it according to current application settings. RTC or RR/ERR are MUST capability if peer does not support either one of them we have to end session.
(module (function_definition (function_name_makepipebranch) function_name_makepipebranch (parameters (identifier_idf) identifier_idf (identifier_bname) identifier_bname )parameters (block (expression_statement (assignment (identifier_pname) identifier_pname (binary_operator (string_"%s_pipe") string_"%s_pipe" (tuple (identifier_bname) identifier_bname )tuple )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_apipe) identifier_apipe (call (identifier_makepipecomponent) identifier_makepipecomponent (argument_list (identifier_idf) identifier_idf (identifier_pname) identifier_pname )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_abranch) identifier_abranch (call (attribute (identifier_idf) identifier_idf (identifier_newidfobject) identifier_newidfobject )attribute (argument_list (string_"BRANCH") string_"BRANCH" (keyword_argument (identifier_Name) identifier_Name (identifier_bname) identifier_bname )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_abranch) identifier_abranch (identifier_Component_1_Object_Type) identifier_Component_1_Object_Type )attribute (string_'Pipe:Adiabatic') string_'Pipe:Adiabatic' )assignment )expression_statement (expression_statement (assignment (attribute (identifier_abranch) identifier_abranch (identifier_Component_1_Name) identifier_Component_1_Name )attribute (identifier_pname) identifier_pname )assignment )expression_statement (expression_statement (assignment (attribute (identifier_abranch) identifier_abranch (identifier_Component_1_Inlet_Node_Name) identifier_Component_1_Inlet_Node_Name )attribute (attribute (identifier_apipe) identifier_apipe (identifier_Inlet_Node_Name) identifier_Inlet_Node_Name )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_abranch) identifier_abranch (identifier_Component_1_Outlet_Node_Name) identifier_Component_1_Outlet_Node_Name )attribute (attribute (identifier_apipe) identifier_apipe (identifier_Outlet_Node_Name) identifier_Outlet_Node_Name )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_abranch) identifier_abranch (identifier_Component_1_Branch_Control_Type) identifier_Component_1_Branch_Control_Type )attribute (string_"Bypass") string_"Bypass" )assignment )expression_statement (return_statement (identifier_abranch) identifier_abranch )return_statement )block )function_definition )module
make a branch with a pipe use standard inlet outlet names
(module (function_definition (function_name_pad) function_name_pad (parameters (identifier_a) identifier_a (identifier_desiredlength) identifier_desiredlength )parameters (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_a) identifier_a )argument_list )call (identifier_desiredlength) identifier_desiredlength )comparison_operator (block (return_statement (identifier_a) identifier_a )return_statement )block )if_statement (expression_statement (assignment (identifier_islist) identifier_islist (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_a) identifier_a (identifier_list) identifier_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_a) identifier_a (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (identifier_a) identifier_a )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_diff) identifier_diff (binary_operator (identifier_desiredlength) identifier_desiredlength (call (identifier_len) identifier_len (argument_list (identifier_a) identifier_a )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_shape) identifier_shape (call (identifier_list) identifier_list (argument_list (attribute (identifier_a) identifier_a (identifier_shape) identifier_shape )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_shape) identifier_shape (integer_0) integer_0 )subscript (identifier_diff) identifier_diff )assignment )expression_statement (expression_statement (assignment (identifier_padded) identifier_padded (call (attribute (identifier_np) identifier_np (identifier_concatenate) identifier_concatenate )attribute (argument_list (list (identifier_a) identifier_a (call (attribute (identifier_np) identifier_np (identifier_zeros) identifier_zeros )attribute (argument_list (identifier_shape) identifier_shape (keyword_argument (identifier_dtype) identifier_dtype (attribute (identifier_a) identifier_a (identifier_dtype) identifier_dtype )attribute )keyword_argument )argument_list )call )list )argument_list )call )assignment )expression_statement (return_statement (conditional_expression (call (attribute (identifier_padded) identifier_padded (identifier_tolist) identifier_tolist )attribute (argument_list )argument_list )call (identifier_islist) identifier_islist (identifier_padded) identifier_padded )conditional_expression )return_statement )block )function_definition )module
Pad an n-dimensional numpy array with zeros along the zero-th dimension so that it is the desired length. Return it unchanged if it is greater than or equal to the desired length
(module (function_definition (function_name_check_dependee_exists) function_name_check_dependee_exists (parameters (identifier_self) identifier_self (identifier_depender) identifier_depender (identifier_dependee) identifier_dependee (identifier_dependee_id) identifier_dependee_id )parameters (block (expression_statement (call (attribute (attribute (identifier_shutit_global) identifier_shutit_global (identifier_shutit_global_object) identifier_shutit_global_object )attribute (identifier_yield_to_draw) identifier_yield_to_draw )attribute (argument_list )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_dependee) identifier_dependee (None) None )comparison_operator (block (return_statement (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (string_'module: \n\n') string_'module: \n\n' (identifier_dependee_id) identifier_dependee_id )binary_operator (string_'\n\nnot found in paths: ') string_'\n\nnot found in paths: ' )binary_operator (call (identifier_str) identifier_str (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_host) identifier_host )attribute (string_'shutit_module_path') string_'shutit_module_path' )subscript )argument_list )call )binary_operator (string_' but needed for ') string_' but needed for ' )binary_operator (attribute (identifier_depender) identifier_depender (identifier_module_id) identifier_module_id )attribute )binary_operator (string_'\nCheck your --shutit_module_path setting and ensure that all modules configured to be built are in that path setting, eg "--shutit_module_path /path/to/other/module/:."\n\nAlso check that the module is configured to be built with the correct module id in that module\'s configs/build.cnf file.\n\nSee also help.') string_'\nCheck your --shutit_module_path setting and ensure that all modules configured to be built are in that path setting, eg "--shutit_module_path /path/to/other/module/:."\n\nAlso check that the module is configured to be built with the correct module id in that module\'s configs/build.cnf file.\n\nSee also help.' )binary_operator )return_statement )block )if_statement (return_statement (string_'') string_'' )return_statement )block )function_definition )module
Checks whether a depended-on module is available.
(module (function_definition (function_name_build_current_graph) function_name_build_current_graph (parameters )parameters (block (expression_statement (assignment (identifier_graph) identifier_graph (call (identifier_SQLStateGraph) identifier_SQLStateGraph (argument_list )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_app_name) identifier_app_name (identifier_config) identifier_config )pattern_list (call (attribute (attribute (identifier_apps) identifier_apps (identifier_app_configs) identifier_app_configs )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (try_statement (block (expression_statement (assignment (identifier_module) identifier_module (call (identifier_import_module) identifier_import_module (argument_list (call (attribute (string_'.') string_'.' (identifier_join) identifier_join )attribute (argument_list (tuple (attribute (attribute (identifier_config) identifier_config (identifier_module) identifier_module )attribute (identifier___name__) identifier___name__ )attribute (identifier_SQL_CONFIG_MODULE) identifier_SQL_CONFIG_MODULE )tuple )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_sql_items) identifier_sql_items (attribute (identifier_module) identifier_module (identifier_sql_items) identifier_sql_items )attribute )assignment )expression_statement )block (except_clause (tuple (identifier_ImportError) identifier_ImportError (identifier_AttributeError) identifier_AttributeError )tuple (block (continue_statement )continue_statement )block )except_clause )try_statement (for_statement (identifier_sql_item) identifier_sql_item (identifier_sql_items) identifier_sql_items (block (expression_statement (call (attribute (identifier_graph) identifier_graph (identifier_add_node) identifier_add_node )attribute (argument_list (tuple (identifier_app_name) identifier_app_name (attribute (identifier_sql_item) identifier_sql_item (identifier_name) identifier_name )attribute )tuple (identifier_sql_item) identifier_sql_item )argument_list )call )expression_statement (for_statement (identifier_dep) identifier_dep (attribute (identifier_sql_item) identifier_sql_item (identifier_dependencies) identifier_dependencies )attribute (block (expression_statement (call (attribute (identifier_graph) identifier_graph (identifier_add_lazy_dependency) identifier_add_lazy_dependency )attribute (argument_list (tuple (identifier_app_name) identifier_app_name (attribute (identifier_sql_item) identifier_sql_item (identifier_name) identifier_name )attribute )tuple (identifier_dep) identifier_dep )argument_list )call )expression_statement )block )for_statement )block )for_statement )block )for_statement (expression_statement (call (attribute (identifier_graph) identifier_graph (identifier_build_graph) identifier_build_graph )attribute (argument_list )argument_list )call )expression_statement (return_statement (identifier_graph) identifier_graph )return_statement )block )function_definition )module
Read current state of SQL items from the current project state. Returns: (SQLStateGraph) Current project state graph.
(module (function_definition (function_name_attach_protocol) function_name_attach_protocol (parameters (identifier_self) identifier_self (identifier_proto) identifier_proto )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__protocol) identifier__protocol )attribute (None) None )comparison_operator (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (string_"Already have a protocol.") string_"Already have a protocol." )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_save) identifier_save )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier___dict__) identifier___dict__ )attribute (string_'_protocol') string_'_protocol' )subscript (identifier_proto) identifier_proto )assignment )expression_statement (delete_statement (subscript (attribute (identifier_self) identifier_self (identifier___dict__) identifier___dict__ )attribute (string_'_accept_all_') string_'_accept_all_' )subscript )delete_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier___dict__) identifier___dict__ )attribute (string_'post_bootstrap') string_'post_bootstrap' )subscript (call (attribute (identifier_defer) identifier_defer (identifier_Deferred) identifier_Deferred )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (attribute (identifier_proto) identifier_proto (identifier_post_bootstrap) identifier_post_bootstrap )attribute (block (expression_statement (call (attribute (attribute (identifier_proto) identifier_proto (identifier_post_bootstrap) identifier_post_bootstrap )attribute (identifier_addCallback) identifier_addCallback )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_bootstrap) identifier_bootstrap )attribute )argument_list )call )expression_statement )block )if_statement (return_statement (subscript (attribute (identifier_self) identifier_self (identifier___dict__) identifier___dict__ )attribute (string_'post_bootstrap') string_'post_bootstrap' )subscript )return_statement )block )function_definition )module
returns a Deferred that fires once we've set this object up to track the protocol. Fails if we already have a protocol.
(module (function_definition (function_name_to_line_protocol) function_name_to_line_protocol (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_tags) identifier_tags (call (attribute (identifier_self) identifier_self (identifier_get_output_tags) identifier_get_output_tags )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (call (attribute (string_u"{0}{1} {2}{3}") string_u"{0}{1} {2}{3}" (identifier_format) identifier_format )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_get_output_measurement) identifier_get_output_measurement )attribute (argument_list )argument_list )call (conditional_expression (binary_operator (string_",") string_"," (identifier_tags) identifier_tags )binary_operator (identifier_tags) identifier_tags (string_'') string_'' )conditional_expression (call (attribute (identifier_self) identifier_self (identifier_get_output_values) identifier_get_output_values )attribute (argument_list )argument_list )call (call (attribute (identifier_self) identifier_self (identifier_get_output_timestamp) identifier_get_output_timestamp )attribute (argument_list )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Converts the given metrics as a single line of InfluxDB line protocol
(module (function_definition (function_name_do_tagg) function_name_do_tagg (parameters (identifier_self) identifier_self (typed_parameter (identifier_arglist) identifier_arglist (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_str) identifier_str )type )type_parameter )generic_type )type )typed_parameter )parameters (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_arglist) identifier_arglist )argument_list )call (integer_2) integer_2 )comparison_operator (block (expression_statement (assignment (identifier_tag) identifier_tag (subscript (identifier_arglist) identifier_arglist (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_content) identifier_content (subscript (identifier_arglist) identifier_arglist (slice (integer_1) integer_1 (colon) colon )slice )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_poutput) identifier_poutput )attribute (argument_list (call (attribute (string_'<{0}>{1}</{0}>') string_'<{0}>{1}</{0}>' (identifier_format) identifier_format )attribute (argument_list (identifier_tag) identifier_tag (call (attribute (string_' ') string_' ' (identifier_join) identifier_join )attribute (argument_list (identifier_content) identifier_content )argument_list )call )argument_list )call )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_perror) identifier_perror )attribute (argument_list (string_"tagg requires at least 2 arguments") string_"tagg requires at least 2 arguments" )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
version of creating an html tag using arglist instead of argparser
(module (function_definition (function_name_parseFASTAFilteringCommandLineOptions) function_name_parseFASTAFilteringCommandLineOptions (parameters (identifier_args) identifier_args (identifier_reads) identifier_reads )parameters (block (expression_statement (assignment (identifier_keepSequences) identifier_keepSequences (parenthesized_expression (conditional_expression (call (identifier_parseRangeString) identifier_parseRangeString (argument_list (attribute (identifier_args) identifier_args (identifier_keepSequences) identifier_keepSequences )attribute (keyword_argument (identifier_convertToZeroBased) identifier_convertToZeroBased (True) True )keyword_argument )argument_list )call (attribute (identifier_args) identifier_args (identifier_keepSequences) identifier_keepSequences )attribute (None) None )conditional_expression )parenthesized_expression )assignment )expression_statement (expression_statement (assignment (identifier_removeSequences) identifier_removeSequences (parenthesized_expression (conditional_expression (call (identifier_parseRangeString) identifier_parseRangeString (argument_list (attribute (identifier_args) identifier_args (identifier_removeSequences) identifier_removeSequences )attribute (keyword_argument (identifier_convertToZeroBased) identifier_convertToZeroBased (True) True )keyword_argument )argument_list )call (attribute (identifier_args) identifier_args (identifier_removeSequences) identifier_removeSequences )attribute (None) None )conditional_expression )parenthesized_expression )assignment )expression_statement (return_statement (call (attribute (identifier_reads) identifier_reads (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_minLength) identifier_minLength (attribute (identifier_args) identifier_args (identifier_minLength) identifier_minLength )attribute )keyword_argument (keyword_argument (identifier_maxLength) identifier_maxLength (attribute (identifier_args) identifier_args (identifier_maxLength) identifier_maxLength )attribute )keyword_argument (keyword_argument (identifier_whitelist) identifier_whitelist (conditional_expression (call (identifier_set) identifier_set (argument_list (attribute (identifier_args) identifier_args (identifier_whitelist) identifier_whitelist )attribute )argument_list )call (attribute (identifier_args) identifier_args (identifier_whitelist) identifier_whitelist )attribute (None) None )conditional_expression )keyword_argument (keyword_argument (identifier_blacklist) identifier_blacklist (conditional_expression (call (identifier_set) identifier_set (argument_list (attribute (identifier_args) identifier_args (identifier_blacklist) identifier_blacklist )attribute )argument_list )call (attribute (identifier_args) identifier_args (identifier_blacklist) identifier_blacklist )attribute (None) None )conditional_expression )keyword_argument (keyword_argument (identifier_whitelistFile) identifier_whitelistFile (attribute (identifier_args) identifier_args (identifier_whitelistFile) identifier_whitelistFile )attribute )keyword_argument (keyword_argument (identifier_blacklistFile) identifier_blacklistFile (attribute (identifier_args) identifier_args (identifier_blacklistFile) identifier_blacklistFile )attribute )keyword_argument (keyword_argument (identifier_titleRegex) identifier_titleRegex (attribute (identifier_args) identifier_args (identifier_titleRegex) identifier_titleRegex )attribute )keyword_argument (keyword_argument (identifier_negativeTitleRegex) identifier_negativeTitleRegex (attribute (identifier_args) identifier_args (identifier_negativeTitleRegex) identifier_negativeTitleRegex )attribute )keyword_argument (keyword_argument (identifier_keepSequences) identifier_keepSequences (identifier_keepSequences) identifier_keepSequences )keyword_argument (keyword_argument (identifier_removeSequences) identifier_removeSequences (identifier_removeSequences) identifier_removeSequences )keyword_argument (keyword_argument (identifier_head) identifier_head (attribute (identifier_args) identifier_args (identifier_head) identifier_head )attribute )keyword_argument (keyword_argument (identifier_removeDuplicates) identifier_removeDuplicates (attribute (identifier_args) identifier_args (identifier_removeDuplicates) identifier_removeDuplicates )attribute )keyword_argument (keyword_argument (identifier_removeDuplicatesById) identifier_removeDuplicatesById (attribute (identifier_args) identifier_args (identifier_removeDuplicatesById) identifier_removeDuplicatesById )attribute )keyword_argument (keyword_argument (identifier_randomSubset) identifier_randomSubset (attribute (identifier_args) identifier_args (identifier_randomSubset) identifier_randomSubset )attribute )keyword_argument (keyword_argument (identifier_trueLength) identifier_trueLength (attribute (identifier_args) identifier_args (identifier_trueLength) identifier_trueLength )attribute )keyword_argument (keyword_argument (identifier_sampleFraction) identifier_sampleFraction (attribute (identifier_args) identifier_args (identifier_sampleFraction) identifier_sampleFraction )attribute )keyword_argument (keyword_argument (identifier_sequenceNumbersFile) identifier_sequenceNumbersFile (attribute (identifier_args) identifier_args (identifier_sequenceNumbersFile) identifier_sequenceNumbersFile )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Examine parsed FASTA filtering command-line options and return filtered reads. @param args: An argparse namespace, as returned by the argparse C{parse_args} function. @param reads: A C{Reads} instance to filter. @return: The filtered C{Reads} instance.
(module (function_definition (function_name_wait) function_name_wait (parameters (identifier_self) identifier_self (keyword_separator )keyword_separator (default_parameter (identifier_timeout) identifier_timeout (None) None )default_parameter )parameters (block (for_statement (identifier__) identifier__ (call (attribute (identifier_self) identifier_self (identifier_get_results) identifier_get_results )attribute (argument_list (keyword_argument (identifier_block) identifier_block (True) True )keyword_argument (keyword_argument (identifier_timeout) identifier_timeout (identifier_timeout) identifier_timeout )keyword_argument )argument_list )call (block (pass_statement )pass_statement )block )for_statement )block )function_definition )module
Block until all the jobs in the group have finished or until the timeout expires. Parameters: timeout(int): The maximum amount of time, in ms, to wait. Defaults to 10 seconds.
(module (function_definition (function_name__hack_namedtuple) function_name__hack_namedtuple (parameters (identifier_cls) identifier_cls )parameters (block (expression_statement (assignment (identifier_name) identifier_name (attribute (identifier_cls) identifier_cls (identifier___name__) identifier___name__ )attribute )assignment )expression_statement (expression_statement (assignment (identifier_fields) identifier_fields (attribute (identifier_cls) identifier_cls (identifier__fields) identifier__fields )attribute )assignment )expression_statement (function_definition (function_name___reduce__) function_name___reduce__ (parameters (identifier_self) identifier_self )parameters (block (return_statement (tuple (identifier__restore) identifier__restore (tuple (identifier_name) identifier_name (identifier_fields) identifier_fields (call (identifier_tuple) identifier_tuple (argument_list (identifier_self) identifier_self )argument_list )call )tuple )tuple )return_statement )block )function_definition (expression_statement (assignment (attribute (identifier_cls) identifier_cls (identifier___reduce__) identifier___reduce__ )attribute (identifier___reduce__) identifier___reduce__ )assignment )expression_statement (expression_statement (assignment (attribute (identifier_cls) identifier_cls (identifier__is_namedtuple_) identifier__is_namedtuple_ )attribute (True) True )assignment )expression_statement (return_statement (identifier_cls) identifier_cls )return_statement )block )function_definition )module
Make class generated by namedtuple picklable
(module (function_definition (function_name_get_gravatar) function_name_get_gravatar (parameters (identifier_email) identifier_email (default_parameter (identifier_size) identifier_size (integer_80) integer_80 )default_parameter (default_parameter (identifier_rating) identifier_rating (string_'g') string_'g' )default_parameter (default_parameter (identifier_default) identifier_default (None) None )default_parameter (default_parameter (identifier_protocol) identifier_protocol (identifier_PROTOCOL) identifier_PROTOCOL )default_parameter )parameters (block (expression_statement (assignment (identifier_gravatar_protocols) identifier_gravatar_protocols (dictionary (pair (string_'http') string_'http' (string_'http://www') string_'http://www' )pair (pair (string_'https') string_'https' (string_'https://secure') string_'https://secure' )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_url) identifier_url (binary_operator (string_'%s.gravatar.com/avatar/%s') string_'%s.gravatar.com/avatar/%s' (tuple (subscript (identifier_gravatar_protocols) identifier_gravatar_protocols (identifier_protocol) identifier_protocol )subscript (call (attribute (call (identifier_md5) identifier_md5 (argument_list (call (attribute (call (attribute (call (attribute (identifier_email) identifier_email (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (identifier_encode) identifier_encode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call )argument_list )call (identifier_hexdigest) identifier_hexdigest )attribute (argument_list )argument_list )call )tuple )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_options) identifier_options (dictionary (pair (string_'s') string_'s' (identifier_size) identifier_size )pair (pair (string_'r') string_'r' (identifier_rating) identifier_rating )pair )dictionary )assignment )expression_statement (if_statement (identifier_default) identifier_default (block (expression_statement (assignment (subscript (identifier_options) identifier_options (string_'d') string_'d' )subscript (identifier_default) identifier_default )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_url) identifier_url (binary_operator (string_'%s?%s') string_'%s?%s' (tuple (identifier_url) identifier_url (call (identifier_urlencode) identifier_urlencode (argument_list (identifier_options) identifier_options )argument_list )call )tuple )binary_operator )assignment )expression_statement (return_statement (call (attribute (identifier_url) identifier_url (identifier_replace) identifier_replace )attribute (argument_list (string_'&') string_'&' (string_'&amp;') string_'&amp;' )argument_list )call )return_statement )block )function_definition )module
Return url for a Gravatar.
(module (function_definition (function_name_get_authenticity_token) function_name_get_authenticity_token (parameters (identifier_self) identifier_self (default_parameter (identifier_url) identifier_url (identifier__SIGNIN_URL) identifier__SIGNIN_URL )default_parameter )parameters (block (expression_statement (assignment (identifier_res) identifier_res (call (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier__get) identifier__get )attribute (argument_list (keyword_argument (identifier_url) identifier_url (identifier_url) identifier_url )keyword_argument (keyword_argument (identifier_expected_status_code) identifier_expected_status_code (integer_200) integer_200 )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_soup) identifier_soup (call (identifier_BeautifulSoup) identifier_BeautifulSoup (argument_list (attribute (identifier_res) identifier_res (identifier_text) identifier_text )attribute (identifier__DEFAULT_BEAUTIFULSOUP_PARSER) identifier__DEFAULT_BEAUTIFULSOUP_PARSER )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_selection) identifier_selection (call (attribute (identifier_soup) identifier_soup (identifier_select) identifier_select )attribute (argument_list (identifier__AUTHENTICITY_TOKEN_SELECTOR) identifier__AUTHENTICITY_TOKEN_SELECTOR )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_authenticity_token) identifier_authenticity_token (call (attribute (subscript (identifier_selection) identifier_selection (integer_0) integer_0 )subscript (identifier_get) identifier_get )attribute (argument_list (string_"content") string_"content" )argument_list )call )assignment )expression_statement )block (except_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"authenticity_token not found in {} with {}\n{}") string_"authenticity_token not found in {} with {}\n{}" (identifier_format) identifier_format )attribute (argument_list (identifier__SIGNIN_URL) identifier__SIGNIN_URL (identifier__AUTHENTICITY_TOKEN_SELECTOR) identifier__AUTHENTICITY_TOKEN_SELECTOR (attribute (identifier_res) identifier_res (identifier_text) identifier_text )attribute )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement (return_statement (identifier_authenticity_token) identifier_authenticity_token )return_statement )block )function_definition )module
Returns an authenticity_token, mandatory for signing in
(module (function_definition (function_name__updateEndpoints) function_name__updateEndpoints (parameters (identifier_self) identifier_self (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_sender) identifier_sender (call (attribute (identifier_self) identifier_self (identifier_sender) identifier_sender )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_ignoreEvents) identifier_ignoreEvents )attribute )not_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_ignoreEvents) identifier_ignoreEvents )attribute (True) True )assignment )expression_statement (for_statement (identifier_binding) identifier_binding (call (attribute (attribute (identifier_self) identifier_self (identifier_bindings) identifier_bindings )attribute (identifier_values) identifier_values )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (attribute (identifier_binding) identifier_binding (identifier_instanceId) identifier_instanceId )attribute (call (identifier_id) identifier_id (argument_list (identifier_sender) identifier_sender )argument_list )call )comparison_operator (block (continue_statement )continue_statement )block )if_statement (if_statement (identifier_args) identifier_args (block (expression_statement (call (attribute (identifier_binding) identifier_binding (identifier_setter) identifier_setter )attribute (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_binding) identifier_binding (identifier_setter) identifier_setter )attribute (argument_list (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_bindings) identifier_bindings )attribute (call (identifier_id) identifier_id (argument_list (identifier_sender) identifier_sender )argument_list )call )subscript (identifier_getter) identifier_getter )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_ignoreEvents) identifier_ignoreEvents )attribute (False) False )assignment )expression_statement )block )if_statement )block )function_definition )module
Updates all endpoints except the one from which this slot was called. Note: this method is probably not complete threadsafe. Maybe a lock is needed when setter self.ignoreEvents
(module (function_definition (function_name__generateGUID) function_name__generateGUID (parameters (identifier_slnfile) identifier_slnfile (identifier_name) identifier_name )parameters (block (expression_statement (assignment (identifier_m) identifier_m (call (attribute (identifier_hashlib) identifier_hashlib (identifier_md5) identifier_md5 )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_m) identifier_m (identifier_update) identifier_update )attribute (argument_list (call (identifier_bytearray) identifier_bytearray (argument_list (binary_operator (call (attribute (identifier_ntpath) identifier_ntpath (identifier_normpath) identifier_normpath )attribute (argument_list (call (identifier_str) identifier_str (argument_list (identifier_slnfile) identifier_slnfile )argument_list )call )argument_list )call (call (identifier_str) identifier_str (argument_list (identifier_name) identifier_name )argument_list )call )binary_operator (string_'utf-8') string_'utf-8' )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_solution) identifier_solution (call (attribute (call (attribute (identifier_m) identifier_m (identifier_hexdigest) identifier_hexdigest )attribute (argument_list )argument_list )call (identifier_upper) identifier_upper )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_solution) identifier_solution (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (string_"{") string_"{" (subscript (identifier_solution) identifier_solution (slice (colon) colon (integer_8) integer_8 )slice )subscript )binary_operator (string_"-") string_"-" )binary_operator (subscript (identifier_solution) identifier_solution (slice (integer_8) integer_8 (colon) colon (integer_12) integer_12 )slice )subscript )binary_operator (string_"-") string_"-" )binary_operator (subscript (identifier_solution) identifier_solution (slice (integer_12) integer_12 (colon) colon (integer_16) integer_16 )slice )subscript )binary_operator (string_"-") string_"-" )binary_operator (subscript (identifier_solution) identifier_solution (slice (integer_16) integer_16 (colon) colon (integer_20) integer_20 )slice )subscript )binary_operator (string_"-") string_"-" )binary_operator (subscript (identifier_solution) identifier_solution (slice (integer_20) integer_20 (colon) colon (integer_32) integer_32 )slice )subscript )binary_operator (string_"}") string_"}" )binary_operator )assignment )expression_statement (return_statement (identifier_solution) identifier_solution )return_statement )block )function_definition )module
This generates a dummy GUID for the sln file to use. It is based on the MD5 signatures of the sln filename plus the name of the project. It basically just needs to be unique, and not change with each invocation.
(module (function_definition (function_name_visit_constant) function_name_visit_constant (parameters (identifier_self) identifier_self (identifier_node) identifier_node (identifier_parent) identifier_parent )parameters (block (return_statement (call (attribute (identifier_nodes) identifier_nodes (identifier_Const) identifier_Const )attribute (argument_list (attribute (identifier_node) identifier_node (identifier_value) identifier_value )attribute (call (identifier_getattr) identifier_getattr (argument_list (identifier_node) identifier_node (string_"lineno") string_"lineno" (None) None )argument_list )call (call (identifier_getattr) identifier_getattr (argument_list (identifier_node) identifier_node (string_"col_offset") string_"col_offset" (None) None )argument_list )call (identifier_parent) identifier_parent )argument_list )call )return_statement )block )function_definition )module
visit a Constant node by returning a fresh instance of Const
(module (function_definition (function_name_mid) function_name_mid (parameters (identifier_self) identifier_self (identifier_value) identifier_value )parameters (block (if_statement (boolean_operator (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (identifier_int) identifier_int )argument_list )call )not_operator (comparison_operator (identifier_value) identifier_value (integer_65536) integer_65536 )comparison_operator )boolean_operator (block (raise_statement (identifier_AttributeError) identifier_AttributeError )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__mid) identifier__mid )attribute (identifier_value) identifier_value )assignment )expression_statement )block )function_definition )module
Sets the MID of the message. :type value: Integer :param value: the MID :raise AttributeError: if value is not int or cannot be represented on 16 bits.
(module (function_definition (function_name_update_room) function_name_update_room (parameters (identifier_self) identifier_self (identifier_stream_id) identifier_stream_id (identifier_room_definition) identifier_room_definition )parameters (block (expression_statement (assignment (identifier_req_hook) identifier_req_hook (binary_operator (binary_operator (string_'pod/v2/room/') string_'pod/v2/room/' (call (identifier_str) identifier_str (argument_list (identifier_stream_id) identifier_stream_id )argument_list )call )binary_operator (string_'/update') string_'/update' )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_req_args) identifier_req_args (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_room_definition) identifier_room_definition )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_status_code) identifier_status_code (identifier_response) identifier_response )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier___rest__) identifier___rest__ )attribute (identifier_POST_query) identifier_POST_query )attribute (argument_list (identifier_req_hook) identifier_req_hook (identifier_req_args) identifier_req_args )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_debug) identifier_debug )attribute (argument_list (binary_operator (string_'%s: %s') string_'%s: %s' (tuple (identifier_status_code) identifier_status_code (identifier_response) identifier_response )tuple )binary_operator )argument_list )call )expression_statement (return_statement (expression_list (identifier_status_code) identifier_status_code (identifier_response) identifier_response )expression_list )return_statement )block )function_definition )module
update a room definition
(module (function_definition (function_name_coerce) function_name_coerce (parameters (identifier_cls) identifier_cls (identifier_key) identifier_key (identifier_value) identifier_value )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (identifier_MutationDict) identifier_MutationDict )argument_list )call )not_operator (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (identifier_dict) identifier_dict )argument_list )call (block (return_statement (call (identifier_MutationDict) identifier_MutationDict (argument_list (identifier_value) identifier_value )argument_list )call )return_statement )block )if_statement (return_statement (call (attribute (identifier_Mutable) identifier_Mutable (identifier_coerce) identifier_coerce )attribute (argument_list (identifier_key) identifier_key (identifier_value) identifier_value )argument_list )call )return_statement )block (else_clause (block (return_statement (identifier_value) identifier_value )return_statement )block )else_clause )if_statement )block )function_definition )module
Convert plain dictionaries to MutationDict.
(module (function_definition (function_name_get_screenshot_as_file) function_name_get_screenshot_as_file (parameters (identifier_self) identifier_self (identifier_filename) identifier_filename )parameters (block (if_statement (not_operator (call (attribute (call (attribute (identifier_filename) identifier_filename (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (identifier_endswith) identifier_endswith )attribute (argument_list (string_'.png') string_'.png' )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_warnings) identifier_warnings (identifier_warn) identifier_warn )attribute (argument_list (concatenated_string (string_"name used for saved screenshot does not match file ") string_"name used for saved screenshot does not match file " (string_"type. It should end with a `.png` extension") string_"type. It should end with a `.png` extension" )concatenated_string (identifier_UserWarning) identifier_UserWarning )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_png) identifier_png (call (attribute (identifier_self) identifier_self (identifier_get_screenshot_as_png) identifier_get_screenshot_as_png )attribute (argument_list )argument_list )call )assignment )expression_statement (try_statement (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_filename) identifier_filename (string_'wb') string_'wb' )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_f) identifier_f (identifier_write) identifier_write )attribute (argument_list (identifier_png) identifier_png )argument_list )call )expression_statement )block )with_statement )block (except_clause (identifier_IOError) identifier_IOError (block (return_statement (False) False )return_statement )block )except_clause (finally_clause (block (delete_statement (identifier_png) identifier_png )delete_statement )block )finally_clause )try_statement (return_statement (True) True )return_statement )block )function_definition )module
Saves a screenshot of the current window to a PNG image file. Returns False if there is any IOError, else returns True. Use full paths in your filename. :Args: - filename: The full path you wish to save your screenshot to. This should end with a `.png` extension. :Usage: :: driver.get_screenshot_as_file('/Screenshots/foo.png')
(module (function_definition (function_name__get_lonely_contract) function_name__get_lonely_contract (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_contracts) identifier_contracts (dictionary )dictionary )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_raw_res) identifier_raw_res (yield (call (attribute (attribute (identifier_self) identifier_self (identifier__session) identifier__session )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_MAIN_URL) identifier_MAIN_URL (keyword_argument (identifier_timeout) identifier_timeout (attribute (identifier_self) identifier_self (identifier__timeout) identifier__timeout )attribute )keyword_argument )argument_list )call )yield )assignment )expression_statement )block (except_clause (identifier_OSError) identifier_OSError (block (raise_statement (call (identifier_PyHydroQuebecError) identifier_PyHydroQuebecError (argument_list (string_"Can not get main page") string_"Can not get main page" )argument_list )call )raise_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_content) identifier_content (yield (call (attribute (identifier_raw_res) identifier_raw_res (identifier_text) identifier_text )attribute (argument_list )argument_list )call )yield )assignment )expression_statement (expression_statement (assignment (identifier_soup) identifier_soup (call (identifier_BeautifulSoup) identifier_BeautifulSoup (argument_list (identifier_content) identifier_content (string_'html.parser') string_'html.parser' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_info_node) identifier_info_node (call (attribute (identifier_soup) identifier_soup (identifier_find) identifier_find )attribute (argument_list (string_"div") string_"div" (dictionary (pair (string_"class") string_"class" (string_"span3 contrat") string_"span3 contrat" )pair )dictionary )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_info_node) identifier_info_node (None) None )comparison_operator (block (raise_statement (call (identifier_PyHydroQuebecError) identifier_PyHydroQuebecError (argument_list (string_"Can not found contract") string_"Can not found contract" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_research) identifier_research (call (attribute (identifier_re) identifier_re (identifier_search) identifier_search )attribute (argument_list (string_"Contrat ([0-9]{4} [0-9]{5})") string_"Contrat ([0-9]{4} [0-9]{5})" (attribute (identifier_info_node) identifier_info_node (identifier_text) identifier_text )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_research) identifier_research (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_contracts) identifier_contracts (call (attribute (call (attribute (identifier_research) identifier_research (identifier_group) identifier_group )attribute (argument_list (integer_1) integer_1 )argument_list )call (identifier_replace) identifier_replace )attribute (argument_list (string_" ") string_" " (string_"") string_"" )argument_list )call )subscript (None) None )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_contracts) identifier_contracts (dictionary )dictionary )comparison_operator (block (raise_statement (call (identifier_PyHydroQuebecError) identifier_PyHydroQuebecError (argument_list (string_"Can not found contract") string_"Can not found contract" )argument_list )call )raise_statement )block )if_statement (return_statement (identifier_contracts) identifier_contracts )return_statement )block )function_definition )module
Get contract number when we have only one contract.
(module (function_definition (function_name_unit_vector) function_name_unit_vector (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (identifier_Point2D) identifier_Point2D (argument_list (binary_operator (attribute (identifier_self) identifier_self (identifier_x) identifier_x )attribute (attribute (identifier_self) identifier_self (identifier_magnitude) identifier_magnitude )attribute )binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_y) identifier_y )attribute (attribute (identifier_self) identifier_self (identifier_magnitude) identifier_magnitude )attribute )binary_operator )argument_list )call )return_statement )block )function_definition )module
Return the unit vector.
(module (function_definition (function_name__open_for_read) function_name__open_for_read (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (pattern_list (identifier_ownerid) identifier_ownerid (identifier_datasetid) identifier_datasetid )pattern_list (call (identifier_parse_dataset_key) identifier_parse_dataset_key (argument_list (attribute (identifier_self) identifier_self (identifier__dataset_key) identifier__dataset_key )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_requests) identifier_requests (identifier_get) identifier_get )attribute (argument_list (call (attribute (string_'{}/file_download/{}/{}/{}') string_'{}/file_download/{}/{}/{}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__query_host) identifier__query_host )attribute (identifier_ownerid) identifier_ownerid (identifier_datasetid) identifier_datasetid (attribute (identifier_self) identifier_self (identifier__file_name) identifier__file_name )attribute )argument_list )call (keyword_argument (identifier_headers) identifier_headers (dictionary (pair (string_'User-Agent') string_'User-Agent' (attribute (identifier_self) identifier_self (identifier__user_agent) identifier__user_agent )attribute )pair (pair (string_'Authorization') string_'Authorization' (call (attribute (string_'Bearer {}') string_'Bearer {}' (identifier_format) identifier_format )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier__config) identifier__config )attribute (identifier_auth_token) identifier_auth_token )attribute )argument_list )call )pair )dictionary )keyword_argument (keyword_argument (identifier_stream) identifier_stream (True) True )keyword_argument )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_response) identifier_response (identifier_raise_for_status) identifier_raise_for_status )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (raise_statement (call (identifier_RestApiError) identifier_RestApiError (argument_list (keyword_argument (identifier_cause) identifier_cause (identifier_e) identifier_e )keyword_argument )argument_list )call )raise_statement )block )except_clause )try_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__read_response) identifier__read_response )attribute (identifier_response) identifier_response )assignment )expression_statement )block )function_definition )module
open the file in read mode
(module (function_definition (function_name_resizeToContents) function_name_resizeToContents (parameters (identifier_self) identifier_self )parameters (block (if_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__toolbar) identifier__toolbar )attribute (identifier_isVisible) identifier_isVisible )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_doc) identifier_doc (call (attribute (identifier_self) identifier_self (identifier_document) identifier_document )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_h) identifier_h (call (attribute (call (attribute (call (attribute (identifier_doc) identifier_doc (identifier_documentLayout) identifier_documentLayout )attribute (argument_list )argument_list )call (identifier_documentSize) identifier_documentSize )attribute (argument_list )argument_list )call (identifier_height) identifier_height )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_offset) identifier_offset (integer_34) integer_34 )assignment )expression_statement (expression_statement (assignment (identifier_edit) identifier_edit (attribute (identifier_self) identifier_self (identifier__attachmentsEdit) identifier__attachmentsEdit )attribute )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier__attachments) identifier__attachments )attribute (block (expression_statement (call (attribute (identifier_edit) identifier_edit (identifier_move) identifier_move )attribute (argument_list (integer_2) integer_2 (binary_operator (binary_operator (call (attribute (identifier_self) identifier_self (identifier_height) identifier_height )attribute (argument_list )argument_list )call (call (attribute (identifier_edit) identifier_edit (identifier_height) identifier_height )attribute (argument_list )argument_list )call )binary_operator (integer_31) integer_31 )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_edit) identifier_edit (identifier_setTags) identifier_setTags )attribute (argument_list (call (identifier_sorted) identifier_sorted (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier__attachments) identifier__attachments )attribute (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_edit) identifier_edit (identifier_show) identifier_show )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_offset) identifier_offset (binary_operator (integer_34) integer_34 (call (attribute (identifier_edit) identifier_edit (identifier_height) identifier_height )attribute (argument_list )argument_list )call )binary_operator )assignment )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_edit) identifier_edit (identifier_hide) identifier_hide )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_offset) identifier_offset (integer_34) integer_34 )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_setFixedHeight) identifier_setFixedHeight )attribute (argument_list (binary_operator (identifier_h) identifier_h (identifier_offset) identifier_offset )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__toolbar) identifier__toolbar )attribute (identifier_move) identifier_move )attribute (argument_list (integer_2) integer_2 (binary_operator (call (attribute (identifier_self) identifier_self (identifier_height) identifier_height )attribute (argument_list )argument_list )call (integer_32) integer_32 )binary_operator )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_XCommentEdit) identifier_XCommentEdit (identifier_self) identifier_self )argument_list )call (identifier_resizeToContents) identifier_resizeToContents )attribute (argument_list )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Resizes this toolbar based on the contents of its text.
(module (function_definition (function_name__get_all_merges) function_name__get_all_merges (parameters (identifier_routing_table) identifier_routing_table )parameters (block (expression_statement (assignment (identifier_considered_entries) identifier_considered_entries (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_i) identifier_i (identifier_entry) identifier_entry )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_routing_table) identifier_routing_table )argument_list )call (block (if_statement (comparison_operator (identifier_i) identifier_i (identifier_considered_entries) identifier_considered_entries )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_merge) identifier_merge (call (identifier_set) identifier_set (argument_list (list (identifier_i) identifier_i )list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_merge) identifier_merge (identifier_update) identifier_update )attribute (generator_expression (identifier_j) identifier_j (for_in_clause (pattern_list (identifier_j) identifier_j (identifier_other_entry) identifier_other_entry )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (subscript (identifier_routing_table) identifier_routing_table (slice (binary_operator (identifier_i) identifier_i (integer_1) integer_1 )binary_operator (colon) colon )slice )subscript (keyword_argument (identifier_start) identifier_start (binary_operator (identifier_i) identifier_i (integer_1) integer_1 )binary_operator )keyword_argument )argument_list )call )for_in_clause (if_clause (comparison_operator (attribute (identifier_entry) identifier_entry (identifier_route) identifier_route )attribute (attribute (identifier_other_entry) identifier_other_entry (identifier_route) identifier_route )attribute )comparison_operator )if_clause )generator_expression )call )expression_statement (expression_statement (call (attribute (identifier_considered_entries) identifier_considered_entries (identifier_update) identifier_update )attribute (argument_list (identifier_merge) identifier_merge )argument_list )call )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_merge) identifier_merge )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (yield (call (identifier__Merge) identifier__Merge (argument_list (identifier_routing_table) identifier_routing_table (identifier_merge) identifier_merge )argument_list )call )yield )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Get possible sets of entries to merge. Yields ------ :py:class:`~.Merge`
(module (function_definition (function_name__prepare_errcheck) function_name__prepare_errcheck (parameters )parameters (block (function_definition (function_name_errcheck) function_name_errcheck (parameters (identifier_result) identifier_result (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern )parameters (block (global_statement (identifier__exc_info_from_callback) identifier__exc_info_from_callback )global_statement (if_statement (comparison_operator (identifier__exc_info_from_callback) identifier__exc_info_from_callback (None) None )comparison_operator (block (expression_statement (assignment (identifier_exc) identifier_exc (identifier__exc_info_from_callback) identifier__exc_info_from_callback )assignment )expression_statement (expression_statement (assignment (identifier__exc_info_from_callback) identifier__exc_info_from_callback (None) None )assignment )expression_statement (expression_statement (call (identifier__reraise) identifier__reraise (argument_list (subscript (identifier_exc) identifier_exc (integer_1) integer_1 )subscript (subscript (identifier_exc) identifier_exc (integer_2) integer_2 )subscript )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition (for_statement (identifier_symbol) identifier_symbol (call (identifier_dir) identifier_dir (argument_list (identifier__glfw) identifier__glfw )argument_list )call (block (if_statement (call (attribute (identifier_symbol) identifier_symbol (identifier_startswith) identifier_startswith )attribute (argument_list (string_'glfw') string_'glfw' )argument_list )call (block (expression_statement (assignment (attribute (call (identifier_getattr) identifier_getattr (argument_list (identifier__glfw) identifier__glfw (identifier_symbol) identifier_symbol )argument_list )call (identifier_errcheck) identifier_errcheck )attribute (identifier_errcheck) identifier_errcheck )assignment )expression_statement )block )if_statement )block )for_statement (expression_statement (assignment (identifier__globals) identifier__globals (call (identifier_globals) identifier_globals (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_symbol) identifier_symbol (identifier__globals) identifier__globals (block (if_statement (boolean_operator (call (attribute (identifier_symbol) identifier_symbol (identifier_startswith) identifier_startswith )attribute (argument_list (string_'_GLFW') string_'_GLFW' )argument_list )call (call (attribute (identifier_symbol) identifier_symbol (identifier_endswith) identifier_endswith )attribute (argument_list (string_'fun') string_'fun' )argument_list )call )boolean_operator (block (function_definition (function_name_wrapper_cfunctype) function_name_wrapper_cfunctype (parameters (identifier_func) identifier_func (default_parameter (identifier_cfunctype) identifier_cfunctype (subscript (identifier__globals) identifier__globals (identifier_symbol) identifier_symbol )subscript )default_parameter )parameters (block (return_statement (call (identifier_cfunctype) identifier_cfunctype (argument_list (call (identifier__callback_exception_decorator) identifier__callback_exception_decorator (argument_list (identifier_func) identifier_func )argument_list )call )argument_list )call )return_statement )block )function_definition (expression_statement (assignment (subscript (identifier__globals) identifier__globals (identifier_symbol) identifier_symbol )subscript (identifier_wrapper_cfunctype) identifier_wrapper_cfunctype )assignment )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
This function sets the errcheck attribute of all ctypes wrapped functions to evaluate the _exc_info_from_callback global variable and re-raise any exceptions that might have been raised in callbacks. It also modifies all callback types to automatically wrap the function using the _callback_exception_decorator.
(module (function_definition (function_name_parseSetEnv) function_name_parseSetEnv (parameters (identifier_l) identifier_l )parameters (block (expression_statement (assignment (identifier_d) identifier_d (call (identifier_dict) identifier_dict (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_i) identifier_i (identifier_l) identifier_l (block (try_statement (block (expression_statement (assignment (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (identifier_i) identifier_i (identifier_split) identifier_split )attribute (argument_list (string_'=') string_'=' (integer_1) integer_1 )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (expression_statement (assignment (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (expression_list (identifier_i) identifier_i (None) None )expression_list )assignment )expression_statement )block )except_clause )try_statement (if_statement (not_operator (identifier_k) identifier_k )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Empty name') string_'Empty name' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (subscript (identifier_d) identifier_d (identifier_k) identifier_k )subscript (identifier_v) identifier_v )assignment )expression_statement )block )for_statement (return_statement (identifier_d) identifier_d )return_statement )block )function_definition )module
Parses a list of strings of the form "NAME=VALUE" or just "NAME" into a dictionary. Strings of the latter from will result in dictionary entries whose value is None. :type l: list[str] :rtype: dict[str,str] >>> parseSetEnv([]) {} >>> parseSetEnv(['a']) {'a': None} >>> parseSetEnv(['a=']) {'a': ''} >>> parseSetEnv(['a=b']) {'a': 'b'} >>> parseSetEnv(['a=a', 'a=b']) {'a': 'b'} >>> parseSetEnv(['a=b', 'c=d']) {'a': 'b', 'c': 'd'} >>> parseSetEnv(['a=b=c']) {'a': 'b=c'} >>> parseSetEnv(['']) Traceback (most recent call last): ... ValueError: Empty name >>> parseSetEnv(['=1']) Traceback (most recent call last): ... ValueError: Empty name
(module (function_definition (function_name_CommitAll) function_name_CommitAll (parameters (default_parameter (identifier_close) identifier_close (None) None )default_parameter )parameters (block (if_statement (identifier_close) identifier_close (block (expression_statement (call (attribute (identifier_warnings) identifier_warnings (identifier_simplefilter) identifier_simplefilter )attribute (argument_list (string_'default') string_'default' )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_warnings) identifier_warnings (identifier_warn) identifier_warn )attribute (argument_list (string_"close parameter will not need at all.") string_"close parameter will not need at all." (identifier_DeprecationWarning) identifier_DeprecationWarning )argument_list )call )expression_statement )block )if_statement (for_statement (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (identifier_engine_manager) identifier_engine_manager (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_session) identifier_session (call (attribute (identifier_v) identifier_v (identifier_session) identifier_session )attribute (argument_list (keyword_argument (identifier_create) identifier_create (False) False )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (identifier_session) identifier_session (block (expression_statement (call (attribute (identifier_session) identifier_session (identifier_commit) identifier_commit )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Commit all transactions according Local.conn
(module (function_definition (function_name_get_config) function_name_get_config (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (string_'rmq_port') string_'rmq_port' (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_rmq_port) identifier_rmq_port )attribute (call (identifier_int) identifier_int (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (string_'rmq_port') string_'rmq_port' )subscript )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (string_'rmq_user') string_'rmq_user' (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_rmq_user) identifier_rmq_user )attribute (subscript (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (string_'rmq_user') string_'rmq_user' )subscript )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (string_'rmq_password') string_'rmq_password' (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_rmq_password) identifier_rmq_password )attribute (subscript (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (string_'rmq_password') string_'rmq_password' )subscript )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (string_'rmq_vhost') string_'rmq_vhost' (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_rmq_vhost) identifier_rmq_vhost )attribute (subscript (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (string_'rmq_vhost') string_'rmq_vhost' )subscript )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (string_'rmq_exchange_type') string_'rmq_exchange_type' (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_rmq_exchange_type) identifier_rmq_exchange_type )attribute (subscript (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (string_'rmq_exchange_type') string_'rmq_exchange_type' )subscript )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (string_'rmq_durable') string_'rmq_durable' (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_rmq_durable) identifier_rmq_durable )attribute (call (identifier_bool) identifier_bool (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (string_'rmq_durable') string_'rmq_durable' )subscript )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (string_'rmq_heartbeat_interval') string_'rmq_heartbeat_interval' (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_rmq_heartbeat_interval) identifier_rmq_heartbeat_interval )attribute (call (identifier_int) identifier_int (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (string_'rmq_heartbeat_interval') string_'rmq_heartbeat_interval' )subscript )argument_list )call )assignment )expression_statement )block )if_statement )block )function_definition )module
Get and set config options from config file
(module (function_definition (function_name_get_string) function_name_get_string (parameters (identifier_string) identifier_string )parameters (block (expression_statement (assignment (identifier_truestring) identifier_truestring (identifier_string) identifier_string )assignment )expression_statement (if_statement (comparison_operator (identifier_string) identifier_string (None) None )comparison_operator (block (if_statement (comparison_operator (string_'/') string_'/' (identifier_string) identifier_string )comparison_operator (block (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (identifier_string) identifier_string )argument_list )call (block (try_statement (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open_) identifier_open_ (argument_list (identifier_string) identifier_string (string_'r') string_'r' )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_truestring) identifier_truestring (call (attribute (string_' ') string_' ' (identifier_join) identifier_join )attribute (generator_expression (call (attribute (identifier_line) identifier_line (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call (for_in_clause (identifier_line) identifier_line (identifier_f) identifier_f )for_in_clause )generator_expression )call )assignment )expression_statement )block )with_statement )block (except_clause (block (pass_statement )pass_statement )block )except_clause )try_statement )block )if_statement )block )if_statement (if_statement (comparison_operator (call (attribute (identifier_truestring) identifier_truestring (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call (string_'') string_'' )comparison_operator (block (expression_statement (assignment (identifier_truestring) identifier_truestring (None) None )assignment )expression_statement )block )if_statement )block )if_statement (return_statement (identifier_truestring) identifier_truestring )return_statement )block )function_definition )module
This function checks if a path was given as string, and tries to read the file and return the string.
(module (function_definition (function_name_set_default_decoder_parameters) function_name_set_default_decoder_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_DecompressionParametersType) identifier_DecompressionParametersType )argument_list )call )list )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_OPENJP2) identifier_OPENJP2 (identifier_opj_set_default_decoder_parameters) identifier_opj_set_default_decoder_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_decoder_parameters) identifier_opj_set_default_decoder_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_dparams) identifier_dparams (call (identifier_DecompressionParametersType) identifier_DecompressionParametersType (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_OPENJP2) identifier_OPENJP2 (identifier_opj_set_default_decoder_parameters) identifier_opj_set_default_decoder_parameters )attribute (argument_list (call (attribute (identifier_ctypes) identifier_ctypes (identifier_byref) identifier_byref )attribute (argument_list (identifier_dparams) identifier_dparams )argument_list )call )argument_list )call )expression_statement (return_statement (identifier_dparams) identifier_dparams )return_statement )block )function_definition )module
Wraps openjp2 library function opj_set_default_decoder_parameters. Sets decoding parameters to default values. Returns ------- dparam : DecompressionParametersType Decompression parameters.
(module (function_definition (function_name__safe_minmax) function_name__safe_minmax (parameters (identifier_values) identifier_values )parameters (block (expression_statement (assignment (identifier_isfinite) identifier_isfinite (call (attribute (identifier_np) identifier_np (identifier_isfinite) identifier_isfinite )attribute (argument_list (identifier_values) identifier_values )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_np) identifier_np (identifier_any) identifier_any )attribute (argument_list (identifier_isfinite) identifier_isfinite )argument_list )call (block (expression_statement (assignment (identifier_values) identifier_values (subscript (identifier_values) identifier_values (identifier_isfinite) identifier_isfinite )subscript )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_minval) identifier_minval (call (attribute (identifier_np) identifier_np (identifier_min) identifier_min )attribute (argument_list (identifier_values) identifier_values )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_maxval) identifier_maxval (call (attribute (identifier_np) identifier_np (identifier_max) identifier_max )attribute (argument_list (identifier_values) identifier_values )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_minval) identifier_minval (identifier_maxval) identifier_maxval )expression_list )return_statement )block )function_definition )module
Calculate min and max of array with guards for nan and inf.
(module (function_definition (function_name_commit_api) function_name_commit_api (parameters (identifier_api) identifier_api )parameters (block (if_statement (comparison_operator (identifier_api) identifier_api (identifier_QT_API_PYSIDE) identifier_QT_API_PYSIDE )comparison_operator (block (expression_statement (call (attribute (identifier_ID) identifier_ID (identifier_forbid) identifier_forbid )attribute (argument_list (string_'PyQt4') string_'PyQt4' )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_ID) identifier_ID (identifier_forbid) identifier_forbid )attribute (argument_list (string_'PyQt5') string_'PyQt5' )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_ID) identifier_ID (identifier_forbid) identifier_forbid )attribute (argument_list (string_'PySide') string_'PySide' )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Commit to a particular API, and trigger ImportErrors on subsequent dangerous imports
(module (function_definition (function_name_setdefault) function_name_setdefault (parameters (identifier_self) identifier_self (identifier_key) identifier_key (identifier_value) identifier_value )parameters (block (with_statement (with_clause (with_item (attribute (identifier_self) identifier_self (identifier_lock) identifier_lock )attribute )with_item )with_clause (block (if_statement (comparison_operator (identifier_key) identifier_key (identifier_self) identifier_self )comparison_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_getitem) identifier_getitem )attribute (argument_list (identifier_key) identifier_key )argument_list )call )return_statement )block (else_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_setitem) identifier_setitem )attribute (argument_list (identifier_key) identifier_key (identifier_value) identifier_value )argument_list )call )expression_statement (return_statement (identifier_value) identifier_value )return_statement )block )else_clause )if_statement )block )with_statement )block )function_definition )module
Atomic store conditional. Stores _value_ into dictionary at _key_, but only if _key_ does not already exist in the dictionary. Returns the old value found or the new value.
(module (function_definition (function_name_release) function_name_release (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_monitor) identifier_monitor )attribute (identifier_acquire) identifier_acquire )attribute (argument_list )argument_list )call )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_rwlock) identifier_rwlock )attribute (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_rwlock) identifier_rwlock )attribute (integer_0) integer_0 )assignment )expression_statement )block (else_clause (block (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_rwlock) identifier_rwlock )attribute (integer_1) integer_1 )augmented_assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_wake_writers) identifier_wake_writers (boolean_operator (attribute (identifier_self) identifier_self (identifier_writers_waiting) identifier_writers_waiting )attribute (comparison_operator (attribute (identifier_self) identifier_self (identifier_rwlock) identifier_rwlock )attribute (integer_0) integer_0 )comparison_operator )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_wake_readers) identifier_wake_readers (comparison_operator (attribute (identifier_self) identifier_self (identifier_writers_waiting) identifier_writers_waiting )attribute (integer_0) integer_0 )comparison_operator )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_monitor) identifier_monitor )attribute (identifier_release) identifier_release )attribute (argument_list )argument_list )call )expression_statement (if_statement (identifier_wake_writers) identifier_wake_writers (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_writers_ok) identifier_writers_ok )attribute (identifier_acquire) identifier_acquire )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_writers_ok) identifier_writers_ok )attribute (identifier_notify) identifier_notify )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_writers_ok) identifier_writers_ok )attribute (identifier_release) identifier_release )attribute (argument_list )argument_list )call )expression_statement )block (elif_clause (identifier_wake_readers) identifier_wake_readers (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_readers_ok) identifier_readers_ok )attribute (identifier_acquire) identifier_acquire )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_readers_ok) identifier_readers_ok )attribute (identifier_notifyAll) identifier_notifyAll )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_readers_ok) identifier_readers_ok )attribute (identifier_release) identifier_release )attribute (argument_list )argument_list )call )expression_statement )block )elif_clause )if_statement )block )function_definition )module
Release a lock, whether read or write.
(module (function_definition (function_name_wrap) function_name_wrap (parameters (identifier_cls) identifier_cls (identifier_meth) identifier_meth )parameters (block (function_definition (function_name_inner) function_name_inner (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_sock) identifier_sock (await (call (identifier_meth) identifier_meth (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )await )assignment )expression_statement (return_statement (call (identifier_cls) identifier_cls (argument_list (identifier_sock) identifier_sock )argument_list )call )return_statement )block )function_definition (return_statement (identifier_inner) identifier_inner )return_statement )block )function_definition )module
Wraps a connection opening method in this class.
(module (function_definition (function_name_get_all_changes) function_name_get_all_changes (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwds) identifier_kwds )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_result) identifier_result (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_project) identifier_project (identifier_refactoring) identifier_refactoring )pattern_list (call (identifier_zip) identifier_zip (argument_list (attribute (identifier_self) identifier_self (identifier_projects) identifier_projects )attribute (attribute (identifier_self) identifier_self (identifier_refactorings) identifier_refactorings )attribute )argument_list )call (block (expression_statement (assignment (pattern_list (identifier_args) identifier_args (identifier_kwds) identifier_kwds )pattern_list (call (attribute (identifier_self) identifier_self (identifier__resources_for_args) identifier__resources_for_args )attribute (argument_list (identifier_project) identifier_project (identifier_args) identifier_args (identifier_kwds) identifier_kwds )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_result) identifier_result (identifier_append) identifier_append )attribute (argument_list (tuple (identifier_project) identifier_project (call (attribute (identifier_refactoring) identifier_refactoring (identifier_get_changes) identifier_get_changes )attribute (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwds) identifier_kwds )dictionary_splat )argument_list )call )tuple )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Get a project to changes dict
(module (function_definition (function_name_invite_user) function_name_invite_user (parameters (identifier_self) identifier_self (identifier_user_id) identifier_user_id )parameters (block (try_statement (block (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_api) identifier_api )attribute (identifier_invite_user) identifier_invite_user )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_room_id) identifier_room_id )attribute (identifier_user_id) identifier_user_id )argument_list )call )expression_statement (return_statement (True) True )return_statement )block (except_clause (identifier_MatrixRequestError) identifier_MatrixRequestError (block (return_statement (False) False )return_statement )block )except_clause )try_statement )block )function_definition )module
Invite a user to this room. Returns: boolean: Whether invitation was sent.
(module (function_definition (function_name_add) function_name_add (parameters (identifier_self) identifier_self (identifier_key) identifier_key )parameters (block (if_statement (comparison_operator (identifier_key) identifier_key (attribute (identifier_self) identifier_self (identifier_map) identifier_map )attribute )comparison_operator (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_map) identifier_map )attribute (identifier_key) identifier_key )subscript (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_items) identifier_items )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_items) identifier_items )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_key) identifier_key )argument_list )call )expression_statement )block )if_statement (return_statement (subscript (attribute (identifier_self) identifier_self (identifier_map) identifier_map )attribute (identifier_key) identifier_key )subscript )return_statement )block )function_definition )module
Add `key` as an item to this OrderedSet, then return its index. If `key` is already in the OrderedSet, return the index it already had.
(module (function_definition (function_name_learningCurve) function_name_learningCurve (parameters (identifier_expPath) identifier_expPath (identifier_suite) identifier_suite )parameters (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"\nLEARNING CURVE ================") string_"\nLEARNING CURVE ================" (identifier_expPath) identifier_expPath (string_"=====================") string_"=====================" )argument_list )call )expression_statement (try_statement (block (expression_statement (assignment (identifier_headers) identifier_headers (list (string_"testerror") string_"testerror" (string_"totalCorrect") string_"totalCorrect" (string_"elapsedTime") string_"elapsedTime" (string_"entropy") string_"entropy" )list )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_suite) identifier_suite (identifier_get_value) identifier_get_value )attribute (argument_list (identifier_expPath) identifier_expPath (integer_0) integer_0 (identifier_headers) identifier_headers (string_"all") string_"all" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_info) identifier_info (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_i) identifier_i (identifier_v) identifier_v )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (call (identifier_zip) identifier_zip (argument_list (subscript (identifier_result) identifier_result (string_"testerror") string_"testerror" )subscript (subscript (identifier_result) identifier_result (string_"totalCorrect") string_"totalCorrect" )subscript (subscript (identifier_result) identifier_result (string_"elapsedTime") string_"elapsedTime" )subscript (subscript (identifier_result) identifier_result (string_"entropy") string_"entropy" )subscript )argument_list )call )argument_list )call (block (expression_statement (call (attribute (identifier_info) identifier_info (identifier_append) identifier_append )attribute (argument_list (list (identifier_i) identifier_i (subscript (identifier_v) identifier_v (integer_0) integer_0 )subscript (subscript (identifier_v) identifier_v (integer_1) integer_1 )subscript (call (identifier_int) identifier_int (argument_list (subscript (identifier_v) identifier_v (integer_2) integer_2 )subscript )argument_list )call (subscript (identifier_v) identifier_v (integer_3) integer_3 )subscript )list )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_headers) identifier_headers (identifier_insert) identifier_insert )attribute (argument_list (integer_0) integer_0 (string_"iteration") string_"iteration" )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (identifier_tabulate) identifier_tabulate (argument_list (identifier_info) identifier_info (keyword_argument (identifier_headers) identifier_headers (identifier_headers) identifier_headers )keyword_argument (keyword_argument (identifier_tablefmt) identifier_tablefmt (string_"grid") string_"grid" )keyword_argument )argument_list )call )argument_list )call )expression_statement )block (except_clause (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Couldn't load experiment") string_"Couldn't load experiment" (identifier_expPath) identifier_expPath )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )module
Print the test and overall noise errors from each iteration of this experiment
(module (function_definition (function_name_decompile) function_name_decompile (parameters (identifier_input_) identifier_input_ (identifier_file_) identifier_file_ (identifier_output) identifier_output (identifier_format_) identifier_format_ (identifier_jar) identifier_jar (identifier_limit) identifier_limit (identifier_decompiler) identifier_decompiler )parameters (block (import_from_statement (dotted_name (identifier_androguard) identifier_androguard )dotted_name (dotted_name (identifier_session) identifier_session )dotted_name )import_from_statement (if_statement (boolean_operator (identifier_file_) identifier_file_ (identifier_input_) identifier_input_ )boolean_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (concatenated_string (string_"Can not give --input and positional argument! ") string_"Can not give --input and positional argument! " (string_"Please use only one of them!") string_"Please use only one of them!" )concatenated_string (keyword_argument (identifier_file) identifier_file (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_sys) identifier_sys (identifier_exit) identifier_exit )attribute (argument_list (integer_1) integer_1 )argument_list )call )expression_statement )block )if_statement (if_statement (boolean_operator (not_operator (identifier_input_) identifier_input_ )not_operator (not_operator (identifier_file_) identifier_file_ )not_operator )boolean_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Give one file to decode!") string_"Give one file to decode!" (keyword_argument (identifier_file) identifier_file (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_sys) identifier_sys (identifier_exit) identifier_exit )attribute (argument_list (integer_1) integer_1 )argument_list )call )expression_statement )block )if_statement (if_statement (identifier_input_) identifier_input_ (block (expression_statement (assignment (identifier_fname) identifier_fname (identifier_input_) identifier_input_ )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_fname) identifier_fname (identifier_file_) identifier_file_ )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_s) identifier_s (call (attribute (identifier_session) identifier_session (identifier_Session) identifier_Session )attribute (argument_list )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_fname) identifier_fname (string_"rb") string_"rb" )argument_list )call (as_pattern_target (identifier_fd) identifier_fd )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_s) identifier_s (identifier_add) identifier_add )attribute (argument_list (identifier_fname) identifier_fname (call (attribute (identifier_fd) identifier_fd (identifier_read) identifier_read )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )with_statement (expression_statement (call (identifier_export_apps_to_format) identifier_export_apps_to_format (argument_list (identifier_fname) identifier_fname (identifier_s) identifier_s (identifier_output) identifier_output (identifier_limit) identifier_limit (identifier_jar) identifier_jar (identifier_decompiler) identifier_decompiler (identifier_format_) identifier_format_ )argument_list )call )expression_statement )block )function_definition )module
Decompile an APK and create Control Flow Graphs. Example: \b $ androguard resources.arsc
(module (function_definition (function_name_update) function_name_update (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_pixels) identifier_pixels (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_matrix) identifier_matrix )attribute )argument_list )call )assignment )expression_statement (for_statement (identifier_x) identifier_x (call (identifier_range) identifier_range (argument_list (attribute (identifier_self) identifier_self (identifier_width) identifier_width )attribute )argument_list )call (block (for_statement (identifier_y) identifier_y (call (identifier_range) identifier_range (argument_list (attribute (identifier_self) identifier_self (identifier_height) identifier_height )attribute )argument_list )call (block (expression_statement (assignment (identifier_pixel) identifier_pixel (binary_operator (binary_operator (binary_operator (identifier_y) identifier_y (attribute (identifier_self) identifier_self (identifier_width) identifier_width )attribute )binary_operator (integer_3) integer_3 )binary_operator (binary_operator (identifier_x) identifier_x (integer_3) integer_3 )binary_operator )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_pixel) identifier_pixel (identifier_pixels) identifier_pixels )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_pygame) identifier_pygame (identifier_draw) identifier_draw )attribute (identifier_circle) identifier_circle )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_screen) identifier_screen )attribute (tuple (subscript (attribute (identifier_self) identifier_self (identifier_matrix) identifier_matrix )attribute (identifier_pixel) identifier_pixel )subscript (subscript (attribute (identifier_self) identifier_self (identifier_matrix) identifier_matrix )attribute (binary_operator (identifier_pixel) identifier_pixel (integer_1) integer_1 )binary_operator )subscript (subscript (attribute (identifier_self) identifier_self (identifier_matrix) identifier_matrix )attribute (binary_operator (identifier_pixel) identifier_pixel (integer_2) integer_2 )binary_operator )subscript )tuple (tuple (binary_operator (binary_operator (identifier_x) identifier_x (attribute (identifier_self) identifier_self (identifier_dotsize) identifier_dotsize )attribute )binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_dotsize) identifier_dotsize )attribute (integer_2) integer_2 )binary_operator )binary_operator (binary_operator (binary_operator (identifier_y) identifier_y (attribute (identifier_self) identifier_self (identifier_dotsize) identifier_dotsize )attribute )binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_dotsize) identifier_dotsize )attribute (integer_2) integer_2 )binary_operator )binary_operator )tuple (binary_operator (attribute (identifier_self) identifier_self (identifier_dotsize) identifier_dotsize )attribute (integer_2) integer_2 )binary_operator (integer_0) integer_0 )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )for_statement )block )function_definition )module
Generate the output from the matrix.
(module (function_definition (function_name__mark_lines) function_name__mark_lines (parameters (identifier_lines) identifier_lines (identifier_sender) identifier_sender )parameters (block (global_statement (identifier_EXTRACTOR) identifier_EXTRACTOR )global_statement (expression_statement (assignment (identifier_candidate) identifier_candidate (call (identifier_get_signature_candidate) identifier_get_signature_candidate (argument_list (identifier_lines) identifier_lines )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_markers) identifier_markers (call (identifier_list) identifier_list (argument_list (binary_operator (string_'t') string_'t' (call (identifier_len) identifier_len (argument_list (identifier_lines) identifier_lines )argument_list )call )binary_operator )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_i) identifier_i (identifier_line) identifier_line )pattern_list (call (identifier_reversed) identifier_reversed (argument_list (call (identifier_list) identifier_list (argument_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_candidate) identifier_candidate )argument_list )call )argument_list )call )argument_list )call (block (expression_statement (assignment (identifier_j) identifier_j (binary_operator (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_lines) identifier_lines )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_candidate) identifier_candidate )argument_list )call )binary_operator (identifier_i) identifier_i )binary_operator )assignment )expression_statement (if_statement (not_operator (call (attribute (identifier_line) identifier_line (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )not_operator (block (expression_statement (assignment (subscript (identifier_markers) identifier_markers (identifier_j) identifier_j )subscript (string_'e') string_'e' )assignment )expression_statement )block (elif_clause (call (identifier_is_signature_line) identifier_is_signature_line (argument_list (identifier_line) identifier_line (identifier_sender) identifier_sender (identifier_EXTRACTOR) identifier_EXTRACTOR )argument_list )call (block (expression_statement (assignment (subscript (identifier_markers) identifier_markers (identifier_j) identifier_j )subscript (string_'s') string_'s' )assignment )expression_statement )block )elif_clause )if_statement )block )for_statement (return_statement (call (attribute (string_"") string_"" (identifier_join) identifier_join )attribute (argument_list (identifier_markers) identifier_markers )argument_list )call )return_statement )block )function_definition )module
Mark message lines with markers to distinguish signature lines. Markers: * e - empty line * s - line identified as signature * t - other i.e. ordinary text line >>> mark_message_lines(['Some text', '', 'Bob'], 'Bob') 'tes'
(module (function_definition (function_name_extract_root_meta) function_name_extract_root_meta (parameters (identifier_cls) identifier_cls (identifier_serializer) identifier_serializer (identifier_resource) identifier_resource )parameters (block (expression_statement (assignment (identifier_many) identifier_many (False) False )assignment )expression_statement (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_serializer) identifier_serializer (string_'child') string_'child' )argument_list )call (block (expression_statement (assignment (identifier_many) identifier_many (True) True )assignment )expression_statement (expression_statement (assignment (identifier_serializer) identifier_serializer (attribute (identifier_serializer) identifier_serializer (identifier_child) identifier_child )attribute )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_data) identifier_data (dictionary )dictionary )assignment )expression_statement (if_statement (call (identifier_getattr) identifier_getattr (argument_list (identifier_serializer) identifier_serializer (string_'get_root_meta') string_'get_root_meta' (None) None )argument_list )call (block (expression_statement (assignment (identifier_json_api_meta) identifier_json_api_meta (call (attribute (identifier_serializer) identifier_serializer (identifier_get_root_meta) identifier_get_root_meta )attribute (argument_list (identifier_resource) identifier_resource (identifier_many) identifier_many )argument_list )call )assignment )expression_statement (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_json_api_meta) identifier_json_api_meta (identifier_dict) identifier_dict )argument_list )call (string_'get_root_meta must return a dict') string_'get_root_meta must return a dict' )assert_statement (expression_statement (call (attribute (identifier_data) identifier_data (identifier_update) identifier_update )attribute (argument_list (identifier_json_api_meta) identifier_json_api_meta )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_data) identifier_data )return_statement )block )function_definition )module
Calls a `get_root_meta` function on a serializer, if it exists.
(module (function_definition (function_name_find_range_ix_in_section_list) function_name_find_range_ix_in_section_list (parameters (identifier_start) identifier_start (identifier_end) identifier_end (identifier_section_list) identifier_section_list )parameters (block (if_statement (boolean_operator (comparison_operator (identifier_start) identifier_start (subscript (identifier_section_list) identifier_section_list (unary_operator (integer_1) integer_1 )unary_operator )subscript )comparison_operator (comparison_operator (identifier_end) identifier_end (subscript (identifier_section_list) identifier_section_list (integer_0) integer_0 )subscript )comparison_operator )boolean_operator (block (return_statement (list (integer_0) integer_0 (integer_0) integer_0 )list )return_statement )block )if_statement (if_statement (comparison_operator (identifier_start) identifier_start (subscript (identifier_section_list) identifier_section_list (integer_0) integer_0 )subscript )comparison_operator (block (expression_statement (assignment (identifier_start_section) identifier_start_section (subscript (identifier_section_list) identifier_section_list (integer_0) integer_0 )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_start_section) identifier_start_section (call (identifier_find_point_in_section_list) identifier_find_point_in_section_list (argument_list (identifier_start) identifier_start (identifier_section_list) identifier_section_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (if_statement (comparison_operator (identifier_end) identifier_end (subscript (identifier_section_list) identifier_section_list (unary_operator (integer_1) integer_1 )unary_operator )subscript )comparison_operator (block (expression_statement (assignment (identifier_end_section) identifier_end_section (subscript (identifier_section_list) identifier_section_list (unary_operator (integer_2) integer_2 )unary_operator )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_end_section) identifier_end_section (call (identifier_find_point_in_section_list) identifier_find_point_in_section_list (argument_list (identifier_end) identifier_end (identifier_section_list) identifier_section_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (list (call (attribute (identifier_section_list) identifier_section_list (identifier_index) identifier_index )attribute (argument_list (identifier_start_section) identifier_start_section )argument_list )call (binary_operator (call (attribute (identifier_section_list) identifier_section_list (identifier_index) identifier_index )attribute (argument_list (identifier_end_section) identifier_end_section )argument_list )call (integer_1) integer_1 )binary_operator )list )return_statement )block )function_definition )module
Returns the index range all sections belonging to the given range. The given list is assumed to contain start points of consecutive sections, except for the final point, assumed to be the end point of the last section. For example, the list [5, 8, 30, 31] is interpreted as the following list of sections: [5-8), [8-30), [30-31]. As such, this function will return [5,8] for the range (7,9) and [5,8,30] while for (7, 30). Parameters --------- start : float The start of the desired range. end : float The end of the desired range. section_list : sortedcontainers.SortedList A list of start points of consecutive sections. Returns ------- iterable The index range of all sections belonging to the given range. Example ------- >>> from sortedcontainers import SortedList >>> seclist = SortedList([5, 8, 30, 31]) >>> find_range_ix_in_section_list(3, 4, seclist) [0, 0] >>> find_range_ix_in_section_list(6, 7, seclist) [0, 1] >>> find_range_ix_in_section_list(7, 9, seclist) [0, 2] >>> find_range_ix_in_section_list(7, 30, seclist) [0, 3] >>> find_range_ix_in_section_list(7, 321, seclist) [0, 3] >>> find_range_ix_in_section_list(4, 321, seclist) [0, 3]
(module (function_definition (function_name_calculate) function_name_calculate (parameters (identifier_price) identifier_price (identifier_to_code) identifier_to_code (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_qs) identifier_qs (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'qs') string_'qs' (call (identifier_get_active_currencies_qs) identifier_get_active_currencies_qs (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_kwargs) identifier_kwargs (string_'qs') string_'qs' )subscript (identifier_qs) identifier_qs )assignment )expression_statement (expression_statement (assignment (identifier_default_code) identifier_default_code (attribute (call (attribute (identifier_qs) identifier_qs (identifier_default) identifier_default )attribute (argument_list )argument_list )call (identifier_code) identifier_code )attribute )assignment )expression_statement (return_statement (call (identifier_convert) identifier_convert (argument_list (identifier_price) identifier_price (identifier_default_code) identifier_default_code (identifier_to_code) identifier_to_code (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Converts a price in the default currency to another currency
(module (function_definition (function_name_query) function_name_query (parameters (identifier_self) identifier_self (identifier_sql) identifier_sql (default_parameter (identifier_args) identifier_args (None) None )default_parameter (default_parameter (identifier_many) identifier_many (None) None )default_parameter (default_parameter (identifier_as_dict) identifier_as_dict (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_con) identifier_con (call (attribute (attribute (identifier_self) identifier_self (identifier_pool) identifier_pool )attribute (identifier_pop) identifier_pop )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_c) identifier_c (None) None )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_c) identifier_c (call (attribute (identifier_con) identifier_con (identifier_cursor) identifier_cursor )attribute (argument_list (identifier_as_dict) identifier_as_dict )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_debug) identifier_debug )attribute (argument_list (binary_operator (binary_operator (binary_operator (string_"Query sql: ") string_"Query sql: " (identifier_sql) identifier_sql )binary_operator (string_" args:") string_" args:" )binary_operator (call (identifier_str) identifier_str (argument_list (identifier_args) identifier_args )argument_list )call )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_c) identifier_c (identifier_execute) identifier_execute )attribute (argument_list (identifier_sql) identifier_sql (identifier_args) identifier_args )argument_list )call )expression_statement (if_statement (boolean_operator (identifier_many) identifier_many (comparison_operator (identifier_many) identifier_many (integer_0) integer_0 )comparison_operator )boolean_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__yield) identifier__yield )attribute (argument_list (identifier_con) identifier_con (identifier_c) identifier_c (identifier_many) identifier_many )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (identifier_c) identifier_c (identifier_fetchall) identifier_fetchall )attribute (argument_list )argument_list )call )return_statement )block )else_clause )if_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_error) identifier_error )attribute (argument_list (string_"Error Qeury on %s") string_"Error Qeury on %s" (call (identifier_str) identifier_str (argument_list (identifier_e) identifier_e )argument_list )call )argument_list )call )expression_statement (raise_statement (call (identifier_DBError) identifier_DBError (argument_list (subscript (attribute (identifier_e) identifier_e (identifier_args) identifier_args )attribute (integer_0) integer_0 )subscript (subscript (attribute (identifier_e) identifier_e (identifier_args) identifier_args )attribute (integer_1) integer_1 )subscript )argument_list )call )raise_statement )block )except_clause (finally_clause (block (expression_statement (boolean_operator (identifier_many) identifier_many (parenthesized_expression (boolean_operator (identifier_c) identifier_c (call (attribute (identifier_c) identifier_c (identifier_close) identifier_close )attribute (argument_list )argument_list )call )boolean_operator )parenthesized_expression )boolean_operator )expression_statement (expression_statement (boolean_operator (identifier_many) identifier_many (parenthesized_expression (boolean_operator (identifier_con) identifier_con (call (attribute (attribute (identifier_self) identifier_self (identifier_pool) identifier_pool )attribute (identifier_push) identifier_push )attribute (argument_list (identifier_con) identifier_con )argument_list )call )boolean_operator )parenthesized_expression )boolean_operator )expression_statement )block )finally_clause )try_statement )block )function_definition )module
The connection raw sql query, when select table, show table to fetch records, it is compatible the dbi execute method. :param sql string: the sql stamtement like 'select * from %s' :param args list: Wen set None, will use dbi execute(sql), else dbi execute(sql, args), the args keep the original rules, it shuld be tuple or list of list :param many int: when set, the query method will return genarate an iterate :param as_dict bool: when is true, the type of row will be dict, otherwise is tuple
(module (function_definition (function_name_rotation) function_name_rotation (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_screen_rotation) identifier_screen_rotation )attribute (call (identifier_range) identifier_range (argument_list (integer_4) integer_4 )argument_list )call )comparison_operator (block (return_statement (attribute (identifier_self) identifier_self (identifier_screen_rotation) identifier_screen_rotation )attribute )return_statement )block )if_statement (return_statement (boolean_operator (call (attribute (attribute (identifier_self) identifier_self (identifier_adb_device) identifier_adb_device )attribute (identifier_rotation) identifier_rotation )attribute (argument_list )argument_list )call (subscript (attribute (identifier_self) identifier_self (identifier_info) identifier_info )attribute (string_'displayRotation') string_'displayRotation' )subscript )boolean_operator )return_statement )block )function_definition )module
Rotaion of the phone 0: normal 1: home key on the right 2: home key on the top 3: home key on the left
(module (function_definition (function_name_push) function_name_push (parameters (identifier_self) identifier_self (identifier_message) identifier_message (default_parameter (identifier_device) identifier_device (None) None )default_parameter (default_parameter (identifier_title) identifier_title (None) None )default_parameter (default_parameter (identifier_url) identifier_url (None) None )default_parameter (default_parameter (identifier_url_title) identifier_url_title (None) None )default_parameter (default_parameter (identifier_priority) identifier_priority (None) None )default_parameter (default_parameter (identifier_timestamp) identifier_timestamp (None) None )default_parameter (default_parameter (identifier_sound) identifier_sound (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_api_url) identifier_api_url (string_'https://api.pushover.net/1/messages.json') string_'https://api.pushover.net/1/messages.json' )assignment )expression_statement (expression_statement (assignment (identifier_payload) identifier_payload (dictionary (pair (string_'token') string_'token' (attribute (identifier_self) identifier_self (identifier_api_token) identifier_api_token )attribute )pair (pair (string_'user') string_'user' (attribute (identifier_self) identifier_self (identifier_user) identifier_user )attribute )pair (pair (string_'message') string_'message' (identifier_message) identifier_message )pair (pair (string_'device') string_'device' (identifier_device) identifier_device )pair (pair (string_'title') string_'title' (identifier_title) identifier_title )pair (pair (string_'url') string_'url' (identifier_url) identifier_url )pair (pair (string_'url_title') string_'url_title' (identifier_url_title) identifier_url_title )pair (pair (string_'priority') string_'priority' (identifier_priority) identifier_priority )pair (pair (string_'timestamp') string_'timestamp' (identifier_timestamp) identifier_timestamp )pair (pair (string_'sound') string_'sound' (identifier_sound) identifier_sound )pair )dictionary )assignment )expression_statement (return_statement (call (attribute (identifier_requests) identifier_requests (identifier_post) identifier_post )attribute (argument_list (identifier_api_url) identifier_api_url (keyword_argument (identifier_params) identifier_params (identifier_payload) identifier_payload )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Pushes the notification, returns the Requests response. Arguments: message -- your message Keyword arguments: device -- your user's device name to send the message directly to that device, rather than all of the user's devices title -- your message's title, otherwise your app's name is used url -- a supplementary URL to show with your message url_title -- a title for your supplementary URL, otherwise just the URL is shown priority -- send as --1 to always send as a quiet notification, 1 to display as high--priority and bypass the user's quiet hours, or 2 to also require confirmation from the user timestamp -- a Unix timestamp of your message's date and time to display to the user, rather than the time your message is received by our API sound -- the name of one of the sounds supported by device clients to override the user's default sound choice.
(module (function_definition (function_name_mail_partial_json) function_name_mail_partial_json (parameters (identifier_self) identifier_self )parameters (block (if_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_mail_partial) identifier_mail_partial )attribute (identifier_get) identifier_get )attribute (argument_list (string_"date") string_"date" )argument_list )call (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__mail_partial) identifier__mail_partial )attribute (string_"date") string_"date" )subscript (call (attribute (attribute (identifier_self) identifier_self (identifier_date) identifier_date )attribute (identifier_isoformat) identifier_isoformat )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_mail_partial) identifier_mail_partial )attribute (keyword_argument (identifier_ensure_ascii) identifier_ensure_ascii (False) False )keyword_argument (keyword_argument (identifier_indent) identifier_indent (integer_2) integer_2 )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return the JSON of mail parsed partial
(module (function_definition (function_name_download_next_song_cache) function_name_download_next_song_cache (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_queue) identifier_queue )attribute )argument_list )call (integer_0) integer_0 )comparison_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_cache_ydl_opts) identifier_cache_ydl_opts (call (identifier_dict) identifier_dict (argument_list (identifier_ydl_opts) identifier_ydl_opts )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_cache_ydl_opts) identifier_cache_ydl_opts (string_"outtmpl") string_"outtmpl" )subscript (attribute (identifier_self) identifier_self (identifier_output_format_next) identifier_output_format_next )attribute )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_youtube_dl) identifier_youtube_dl (identifier_YoutubeDL) identifier_YoutubeDL )attribute (argument_list (identifier_cache_ydl_opts) identifier_cache_ydl_opts )argument_list )call (as_pattern_target (identifier_ydl) identifier_ydl )as_pattern_target )as_pattern )with_item )with_clause (block (try_statement (block (expression_statement (assignment (identifier_url) identifier_url (subscript (subscript (attribute (identifier_self) identifier_self (identifier_queue) identifier_queue )attribute (integer_0) integer_0 )subscript (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_ydl) identifier_ydl (identifier_download) identifier_download )attribute (argument_list (list (identifier_url) identifier_url )list )argument_list )call )expression_statement )block (except_clause (block (pass_statement )pass_statement )block )except_clause )try_statement )block )with_statement )block )function_definition )module
Downloads the next song in the queue to the cache
(module (function_definition (function_name__has_valid_token) function_name__has_valid_token (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (identifier_bool) identifier_bool (argument_list (boolean_operator (attribute (identifier_self) identifier_self (identifier_token) identifier_token )attribute (parenthesized_expression (comparison_operator (attribute (identifier_self) identifier_self (identifier_expires) identifier_expires )attribute (call (attribute (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute (identifier_now) identifier_now )attribute (argument_list )argument_list )call )comparison_operator )parenthesized_expression )boolean_operator )argument_list )call )return_statement )block )function_definition )module
This only checks the token's existence and expiration. If it has been invalidated on the server, this method may indicate that the token is valid when it might actually not be.
(module (function_definition (function_name_build_branch) function_name_build_branch (parameters (identifier_self) identifier_self )parameters (block (if_statement (boolean_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_dutinformation) identifier_dutinformation )attribute )argument_list )call (integer_0) integer_0 )comparison_operator (parenthesized_expression (comparison_operator (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_dutinformation) identifier_dutinformation )attribute (identifier_get) identifier_get )attribute (argument_list (integer_0) integer_0 )argument_list )call (identifier_build) identifier_build )attribute (None) None )comparison_operator )parenthesized_expression )boolean_operator (block (return_statement (attribute (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_dutinformation) identifier_dutinformation )attribute (identifier_get) identifier_get )attribute (argument_list (integer_0) integer_0 )argument_list )call (identifier_build) identifier_build )attribute (identifier_branch) identifier_branch )attribute )return_statement )block )if_statement (return_statement (None) None )return_statement )block )function_definition )module
get build branch. :return: build branch or None if not found
(module (function_definition (function_name_check_validity) function_name_check_validity (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (identifier_self) identifier_self (identifier_pianoroll) identifier_pianoroll )attribute (attribute (identifier_np) identifier_np (identifier_ndarray) identifier_ndarray )attribute )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"`pianoroll` must be a numpy array.") string_"`pianoroll` must be a numpy array." )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (parenthesized_expression (boolean_operator (call (attribute (identifier_np) identifier_np (identifier_issubdtype) identifier_issubdtype )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_pianoroll) identifier_pianoroll )attribute (identifier_dtype) identifier_dtype )attribute (attribute (identifier_np) identifier_np (identifier_bool_) identifier_bool_ )attribute )argument_list )call (call (attribute (identifier_np) identifier_np (identifier_issubdtype) identifier_issubdtype )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_pianoroll) identifier_pianoroll )attribute (identifier_dtype) identifier_dtype )attribute (attribute (identifier_np) identifier_np (identifier_number) identifier_number )attribute )argument_list )call )boolean_operator )parenthesized_expression )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (concatenated_string (string_"The data type of `pianoroll` must be np.bool_ or ") string_"The data type of `pianoroll` must be np.bool_ or " (string_"a subdtype of np.number.") string_"a subdtype of np.number." )concatenated_string )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (attribute (attribute (identifier_self) identifier_self (identifier_pianoroll) identifier_pianoroll )attribute (identifier_ndim) identifier_ndim )attribute (integer_2) integer_2 )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"`pianoroll` must have exactly two dimensions.") string_"`pianoroll` must have exactly two dimensions." )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (subscript (attribute (attribute (identifier_self) identifier_self (identifier_pianoroll) identifier_pianoroll )attribute (identifier_shape) identifier_shape )attribute (integer_1) integer_1 )subscript (integer_128) integer_128 )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (concatenated_string (string_"The length of the second axis of `pianoroll` ") string_"The length of the second axis of `pianoroll` " (string_"must be 128.") string_"must be 128." )concatenated_string )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (identifier_self) identifier_self (identifier_program) identifier_program )attribute (identifier_int) identifier_int )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"`program` must be int.") string_"`program` must be int." )argument_list )call )raise_statement )block )if_statement (if_statement (boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_program) identifier_program )attribute (integer_0) integer_0 )comparison_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_program) identifier_program )attribute (integer_127) integer_127 )comparison_operator )boolean_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"`program` must be in between 0 to 127.") string_"`program` must be in between 0 to 127." )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (identifier_self) identifier_self (identifier_is_drum) identifier_is_drum )attribute (identifier_bool) identifier_bool )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"`is_drum` must be bool.") string_"`is_drum` must be bool." )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute (identifier_string_types) identifier_string_types )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"`name` must be a string.") string_"`name` must be a string." )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Raise error if any invalid attribute found.
(module (function_definition (function_name_get_identities) function_name_get_identities (parameters (identifier_self) identifier_self (default_parameter (identifier_identity) identifier_identity (None) None )default_parameter (default_parameter (identifier_attrs) identifier_attrs (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_resp) identifier_resp (call (attribute (identifier_self) identifier_self (identifier_request) identifier_request )attribute (argument_list (string_'GetIdentities') string_'GetIdentities' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_'identity') string_'identity' (identifier_resp) identifier_resp )comparison_operator (block (expression_statement (assignment (identifier_identities) identifier_identities (subscript (identifier_resp) identifier_resp (string_'identity') string_'identity' )subscript )assignment )expression_statement (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_identities) identifier_identities )argument_list )call (identifier_list) identifier_list )comparison_operator (block (expression_statement (assignment (identifier_identities) identifier_identities (list (identifier_identities) identifier_identities )list )assignment )expression_statement )block )if_statement (if_statement (boolean_operator (identifier_identity) identifier_identity (identifier_attrs) identifier_attrs )boolean_operator (block (expression_statement (assignment (identifier_wanted_identities) identifier_wanted_identities (list )list )assignment )expression_statement (for_statement (identifier_u_identity) identifier_u_identity (list_comprehension (call (attribute (attribute (identifier_zobjects) identifier_zobjects (identifier_Identity) identifier_Identity )attribute (identifier_from_dict) identifier_from_dict )attribute (argument_list (identifier_i) identifier_i )argument_list )call (for_in_clause (identifier_i) identifier_i (identifier_identities) identifier_identities )for_in_clause )list_comprehension (block (if_statement (identifier_identity) identifier_identity (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_identity) identifier_identity (attribute (identifier_zobjects) identifier_zobjects (identifier_Identity) identifier_Identity )attribute )argument_list )call (block (if_statement (comparison_operator (attribute (identifier_u_identity) identifier_u_identity (identifier_name) identifier_name )attribute (attribute (identifier_identity) identifier_identity (identifier_name) identifier_name )attribute )comparison_operator (block (return_statement (list (identifier_u_identity) identifier_u_identity )list )return_statement )block )if_statement )block (else_clause (block (if_statement (comparison_operator (attribute (identifier_u_identity) identifier_u_identity (identifier_name) identifier_name )attribute (identifier_identity) identifier_identity )comparison_operator (block (return_statement (list (identifier_u_identity) identifier_u_identity )list )return_statement )block )if_statement )block )else_clause )if_statement )block (elif_clause (identifier_attrs) identifier_attrs (block (for_statement (pattern_list (identifier_attr) identifier_attr (identifier_value) identifier_value )pattern_list (call (attribute (identifier_attrs) identifier_attrs (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (parenthesized_expression (boolean_operator (comparison_operator (identifier_attr) identifier_attr (attribute (identifier_u_identity) identifier_u_identity (identifier__a_tags) identifier__a_tags )attribute )comparison_operator (comparison_operator (subscript (attribute (identifier_u_identity) identifier_u_identity (identifier__a_tags) identifier__a_tags )attribute (identifier_attr) identifier_attr )subscript (identifier_value) identifier_value )comparison_operator )boolean_operator )parenthesized_expression (block (expression_statement (call (attribute (identifier_wanted_identities) identifier_wanted_identities (identifier_append) identifier_append )attribute (argument_list (identifier_u_identity) identifier_u_identity )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )elif_clause )if_statement )block )for_statement (return_statement (identifier_wanted_identities) identifier_wanted_identities )return_statement )block (else_clause (block (return_statement (list_comprehension (call (attribute (attribute (identifier_zobjects) identifier_zobjects (identifier_Identity) identifier_Identity )attribute (identifier_from_dict) identifier_from_dict )attribute (argument_list (identifier_i) identifier_i )argument_list )call (for_in_clause (identifier_i) identifier_i (identifier_identities) identifier_identities )for_in_clause )list_comprehension )return_statement )block )else_clause )if_statement )block (else_clause (block (return_statement (list )list )return_statement )block )else_clause )if_statement )block )function_definition )module
Get identities matching name and attrs of the user, as a list :param: zobjects.Identity or identity name (string) :param: attrs dict of attributes to return only identities matching :returns: list of zobjects.Identity
(module (function_definition (function_name_GetSubFileEntryByName) function_name_GetSubFileEntryByName (parameters (identifier_self) identifier_self (identifier_name) identifier_name (default_parameter (identifier_case_sensitive) identifier_case_sensitive (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_name_lower) identifier_name_lower (call (attribute (identifier_name) identifier_name (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_matching_sub_file_entry) identifier_matching_sub_file_entry (None) None )assignment )expression_statement (for_statement (identifier_sub_file_entry) identifier_sub_file_entry (attribute (identifier_self) identifier_self (identifier_sub_file_entries) identifier_sub_file_entries )attribute (block (if_statement (comparison_operator (attribute (identifier_sub_file_entry) identifier_sub_file_entry (identifier_name) identifier_name )attribute (identifier_name) identifier_name )comparison_operator (block (return_statement (identifier_sub_file_entry) identifier_sub_file_entry )return_statement )block )if_statement (if_statement (boolean_operator (not_operator (identifier_case_sensitive) identifier_case_sensitive )not_operator (comparison_operator (call (attribute (attribute (identifier_sub_file_entry) identifier_sub_file_entry (identifier_name) identifier_name )attribute (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (identifier_name_lower) identifier_name_lower )comparison_operator )boolean_operator (block (if_statement (not_operator (identifier_matching_sub_file_entry) identifier_matching_sub_file_entry )not_operator (block (expression_statement (assignment (identifier_matching_sub_file_entry) identifier_matching_sub_file_entry (identifier_sub_file_entry) identifier_sub_file_entry )assignment )expression_statement )block )if_statement )block )if_statement )block )for_statement (return_statement (identifier_matching_sub_file_entry) identifier_matching_sub_file_entry )return_statement )block )function_definition )module
Retrieves a sub file entry by name. Args: name (str): name of the file entry. case_sensitive (Optional[bool]): True if the name is case sensitive. Returns: FileEntry: a file entry or None if not available.
(module (function_definition (function_name__full_axis_reduce) function_name__full_axis_reduce (parameters (identifier_self) identifier_self (identifier_axis) identifier_axis (identifier_func) identifier_func (default_parameter (identifier_alternate_index) identifier_alternate_index (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (identifier_map_across_full_axis) identifier_map_across_full_axis )attribute (argument_list (identifier_axis) identifier_axis (identifier_func) identifier_func )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_axis) identifier_axis (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_columns) identifier_columns (conditional_expression (identifier_alternate_index) identifier_alternate_index (comparison_operator (identifier_alternate_index) identifier_alternate_index (None) None )comparison_operator (attribute (identifier_self) identifier_self (identifier_columns) identifier_columns )attribute )conditional_expression )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier___constructor__) identifier___constructor__ )attribute (argument_list (identifier_result) identifier_result (keyword_argument (identifier_index) identifier_index (list (string_"__reduced__") string_"__reduced__" )list )keyword_argument (keyword_argument (identifier_columns) identifier_columns (identifier_columns) identifier_columns )keyword_argument )argument_list )call )return_statement )block (else_clause (block (expression_statement (assignment (identifier_index) identifier_index (conditional_expression (identifier_alternate_index) identifier_alternate_index (comparison_operator (identifier_alternate_index) identifier_alternate_index (None) None )comparison_operator (attribute (identifier_self) identifier_self (identifier_index) identifier_index )attribute )conditional_expression )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier___constructor__) identifier___constructor__ )attribute (argument_list (identifier_result) identifier_result (keyword_argument (identifier_index) identifier_index (identifier_index) identifier_index )keyword_argument (keyword_argument (identifier_columns) identifier_columns (list (string_"__reduced__") string_"__reduced__" )list )keyword_argument )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Applies map that reduce Manager to series but require knowledge of full axis. Args: func: Function to reduce the Manager by. This function takes in a Manager. axis: axis to apply the function to. alternate_index: If the resulting series should have an index different from the current query_compiler's index or columns. Return: Pandas series containing the reduced data.
(module (function_definition (function_name__has_bad_coords) function_name__has_bad_coords (parameters (identifier_root) identifier_root (identifier_stream) identifier_stream )parameters (block (if_statement (comparison_operator (identifier_stream) identifier_stream (string_"com.dc3/dc3.broker") string_"com.dc3/dc3.broker" )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement (if_statement (not_operator (comparison_operator (subscript (call (attribute (identifier_stream) identifier_stream (identifier_split) identifier_split )attribute (argument_list (string_'/') string_'/' )argument_list )call (integer_0) integer_0 )subscript (string_'nasa.gsfc.gcn') string_'nasa.gsfc.gcn' )comparison_operator )not_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_toplevel_params) identifier_toplevel_params (call (attribute (identifier_vp) identifier_vp (identifier_get_toplevel_params) identifier_get_toplevel_params )attribute (argument_list (identifier_root) identifier_root )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_"Coords_String") string_"Coords_String" (identifier_toplevel_params) identifier_toplevel_params )comparison_operator (block (if_statement (parenthesized_expression (comparison_operator (subscript (subscript (identifier_toplevel_params) identifier_toplevel_params (string_"Coords_String") string_"Coords_String" )subscript (string_'value') string_'value' )subscript (string_"unavailable/inappropriate") string_"unavailable/inappropriate" )comparison_operator )parenthesized_expression (block (return_statement (True) True )return_statement )block )if_statement )block )if_statement (return_statement (False) False )return_statement )block )function_definition )module
Predicate function encapsulating 'data clean up' filter code. Currently minimal, but these sort of functions tend to grow over time. Problem 1: Some of the GCN packets have an RA /Dec equal to (0,0) in the WhereWhen, and a flag in the What signifying that those are actually dummy co-ords. (This is used for time-stamping an event which is not localised). So, we don't load those positions, to avoid muddying the database corpus. Problem 2: com.dc3/dc3.broker#BrokerTest packets have dummy RA/Dec values, with no units specified. (They're also marked role=test, so it's not such a big deal, but it generates a lot of debug-log churn.)
(module (function_definition (function_name_check_existing_filename) function_name_check_existing_filename (parameters (identifier_filename) identifier_filename (default_parameter (identifier_onlyfiles) identifier_onlyfiles (True) True )default_parameter )parameters (block (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_filename) identifier_filename )argument_list )call )not_operator (block (raise_statement (call (identifier_PatoolError) identifier_PatoolError (argument_list (binary_operator (string_"file `%s' was not found") string_"file `%s' was not found" (identifier_filename) identifier_filename )binary_operator )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (call (attribute (identifier_os) identifier_os (identifier_access) identifier_access )attribute (argument_list (identifier_filename) identifier_filename (attribute (identifier_os) identifier_os (identifier_R_OK) identifier_R_OK )attribute )argument_list )call )not_operator (block (raise_statement (call (identifier_PatoolError) identifier_PatoolError (argument_list (binary_operator (string_"file `%s' is not readable") string_"file `%s' is not readable" (identifier_filename) identifier_filename )binary_operator )argument_list )call )raise_statement )block )if_statement (if_statement (boolean_operator (identifier_onlyfiles) identifier_onlyfiles (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (identifier_filename) identifier_filename )argument_list )call )not_operator )boolean_operator (block (raise_statement (call (identifier_PatoolError) identifier_PatoolError (argument_list (binary_operator (string_"`%s' is not a file") string_"`%s' is not a file" (identifier_filename) identifier_filename )binary_operator )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Ensure that given filename is a valid, existing file.
(module (function_definition (function_name_do_create) function_name_do_create (parameters (identifier_marfile) identifier_marfile (identifier_files) identifier_files (identifier_compress) identifier_compress (default_parameter (identifier_productversion) identifier_productversion (None) None )default_parameter (default_parameter (identifier_channel) identifier_channel (None) None )default_parameter (default_parameter (identifier_signing_key) identifier_signing_key (None) None )default_parameter (default_parameter (identifier_signing_algorithm) identifier_signing_algorithm (None) None )default_parameter )parameters (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_marfile) identifier_marfile (string_'w+b') string_'w+b' )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (with_statement (with_clause (with_item (as_pattern (call (identifier_MarWriter) identifier_MarWriter (argument_list (identifier_f) identifier_f (keyword_argument (identifier_productversion) identifier_productversion (identifier_productversion) identifier_productversion )keyword_argument (keyword_argument (identifier_channel) identifier_channel (identifier_channel) identifier_channel )keyword_argument (keyword_argument (identifier_signing_key) identifier_signing_key (identifier_signing_key) identifier_signing_key )keyword_argument (keyword_argument (identifier_signing_algorithm) identifier_signing_algorithm (identifier_signing_algorithm) identifier_signing_algorithm )keyword_argument )argument_list )call (as_pattern_target (identifier_m) identifier_m )as_pattern_target )as_pattern )with_item )with_clause (block (for_statement (identifier_f) identifier_f (identifier_files) identifier_files (block (expression_statement (call (attribute (identifier_m) identifier_m (identifier_add) identifier_add )attribute (argument_list (identifier_f) identifier_f (keyword_argument (identifier_compress) identifier_compress (identifier_compress) identifier_compress )keyword_argument )argument_list )call )expression_statement )block )for_statement )block )with_statement )block )with_statement )block )function_definition )module
Create a new MAR file.
(module (function_definition (function_name_interfaces_info) function_name_interfaces_info (parameters )parameters (block (function_definition (function_name_replace) function_name_replace (parameters (identifier_value) identifier_value )parameters (block (if_statement (comparison_operator (identifier_value) identifier_value (attribute (identifier_netifaces) identifier_netifaces (identifier_AF_LINK) identifier_AF_LINK )attribute )comparison_operator (block (return_statement (string_'link') string_'link' )return_statement )block )if_statement (if_statement (comparison_operator (identifier_value) identifier_value (attribute (identifier_netifaces) identifier_netifaces (identifier_AF_INET) identifier_AF_INET )attribute )comparison_operator (block (return_statement (string_'ipv4') string_'ipv4' )return_statement )block )if_statement (if_statement (comparison_operator (identifier_value) identifier_value (attribute (identifier_netifaces) identifier_netifaces (identifier_AF_INET6) identifier_AF_INET6 )attribute )comparison_operator (block (return_statement (string_'ipv6') string_'ipv6' )return_statement )block )if_statement (return_statement (identifier_value) identifier_value )return_statement )block )function_definition (expression_statement (assignment (identifier_results) identifier_results (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_iface) identifier_iface (call (attribute (identifier_netifaces) identifier_netifaces (identifier_interfaces) identifier_interfaces )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_addrs) identifier_addrs (call (attribute (identifier_netifaces) identifier_netifaces (identifier_ifaddresses) identifier_ifaddresses )attribute (argument_list (identifier_iface) identifier_iface )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_results) identifier_results (identifier_iface) identifier_iface )subscript (dictionary_comprehension (pair (call (identifier_replace) identifier_replace (argument_list (identifier_k) identifier_k )argument_list )call (identifier_v) identifier_v )pair (for_in_clause (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (identifier_addrs) identifier_addrs (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause )dictionary_comprehension )assignment )expression_statement )block )for_statement (return_statement (identifier_results) identifier_results )return_statement )block )function_definition )module
Returns interfaces data.
(module (function_definition (function_name_start) function_name_start (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (attribute (identifier_Global) identifier_Global (identifier_LOGGER) identifier_LOGGER )attribute (identifier_info) identifier_info )attribute (argument_list (string_"starting the flow manager") string_"starting the flow manager" )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__start_actions) identifier__start_actions )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__start_message_fetcher) identifier__start_message_fetcher )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_Global) identifier_Global (identifier_LOGGER) identifier_LOGGER )attribute (identifier_debug) identifier_debug )attribute (argument_list (string_"flow manager started") string_"flow manager started" )argument_list )call )expression_statement )block )function_definition )module
Start all the processes
(module (function_definition (function_name_tabs_or_spaces) function_name_tabs_or_spaces (parameters (identifier_physical_line) identifier_physical_line (identifier_indent_char) identifier_indent_char )parameters (block (expression_statement (assignment (identifier_indent) identifier_indent (call (attribute (call (identifier_indent_match) identifier_indent_match (argument_list (identifier_physical_line) identifier_physical_line )argument_list )call (identifier_group) identifier_group )attribute (argument_list (integer_1) integer_1 )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_offset) identifier_offset (identifier_char) identifier_char )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_indent) identifier_indent )argument_list )call (block (if_statement (comparison_operator (identifier_char) identifier_char (identifier_indent_char) identifier_indent_char )comparison_operator (block (return_statement (expression_list (identifier_offset) identifier_offset (string_"E101 indentation contains mixed spaces and tabs") string_"E101 indentation contains mixed spaces and tabs" )expression_list )return_statement )block )if_statement )block )for_statement )block )function_definition )module
Never mix tabs and spaces. The most popular way of indenting Python is with spaces only. The second-most popular way is with tabs only. Code indented with a mixture of tabs and spaces should be converted to using spaces exclusively. When invoking the Python command line interpreter with the -t option, it issues warnings about code that illegally mixes tabs and spaces. When using -tt these warnings become errors. These options are highly recommended!