sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_from_config) function_name_from_config (parameters (identifier_cls) identifier_cls (identifier_cp) identifier_cp (identifier_variable_params) identifier_variable_params )parameters (block (if_statement (not_operator (call (attribute (identifier_cp) identifier_cp (identifier_has_section) identifier_has_section )attribute (argument_list (string_'sampling_params') string_'sampling_params' )argument_list )call )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"no sampling_params section found in config file") string_"no sampling_params section found in config file" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (pattern_list (identifier_sampling_params) identifier_sampling_params (identifier_replace_parameters) identifier_replace_parameters )pattern_list (line_continuation_\) line_continuation_\ (call (identifier_read_sampling_params_from_config) identifier_read_sampling_params_from_config (argument_list (identifier_cp) identifier_cp )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_sampling_transforms) identifier_sampling_transforms (call (attribute (identifier_transforms) identifier_transforms (identifier_read_transforms_from_config) identifier_read_transforms_from_config )attribute (argument_list (identifier_cp) identifier_cp (string_'sampling_transforms') string_'sampling_transforms' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_info) identifier_info )attribute (argument_list (call (attribute (string_"Sampling in {} in place of {}") string_"Sampling in {} in place of {}" (identifier_format) identifier_format )attribute (argument_list (call (attribute (string_', ') string_', ' (identifier_join) identifier_join )attribute (argument_list (identifier_sampling_params) identifier_sampling_params )argument_list )call (call (attribute (string_', ') string_', ' (identifier_join) identifier_join )attribute (argument_list (identifier_replace_parameters) identifier_replace_parameters )argument_list )call )argument_list )call )argument_list )call )expression_statement (return_statement (call (identifier_cls) identifier_cls (argument_list (identifier_variable_params) identifier_variable_params (identifier_sampling_params) identifier_sampling_params (identifier_replace_parameters) identifier_replace_parameters (identifier_sampling_transforms) identifier_sampling_transforms )argument_list )call )return_statement )block )function_definition )module
Gets sampling transforms specified in a config file. Sampling parameters and the parameters they replace are read from the ``sampling_params`` section, if it exists. Sampling transforms are read from the ``sampling_transforms`` section(s), using ``transforms.read_transforms_from_config``. An ``AssertionError`` is raised if no ``sampling_params`` section exists in the config file. Parameters ---------- cp : WorkflowConfigParser Config file parser to read. variable_params : list List of parameter names of the original variable params. Returns ------- SamplingTransforms A sampling transforms class.
(module (function_definition (function_name_close) function_name_close (parameters (identifier_self) identifier_self )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 (attribute (identifier_self) identifier_self (identifier_is_closed) identifier_is_closed )attribute (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_is_closed) identifier_is_closed )attribute (True) True )assignment )expression_statement )block )with_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (string_"Closing connection (%s) to %s") string_"Closing connection (%s) to %s" (call (identifier_id) identifier_id (argument_list (identifier_self) identifier_self )argument_list )call (attribute (identifier_self) identifier_self (identifier_endpoint) identifier_endpoint )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_reactor) identifier_reactor (identifier_callFromThread) identifier_callFromThread )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_connector) identifier_connector )attribute (identifier_disconnect) identifier_disconnect )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (string_"Closed socket to %s") string_"Closed socket to %s" (attribute (identifier_self) identifier_self (identifier_endpoint) identifier_endpoint )attribute )argument_list )call )expression_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_is_defunct) identifier_is_defunct )attribute )not_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_error_all_requests) identifier_error_all_requests )attribute (argument_list (call (identifier_ConnectionShutdown) identifier_ConnectionShutdown (argument_list (binary_operator (string_"Connection to %s was closed") string_"Connection to %s was closed" (attribute (identifier_self) identifier_self (identifier_endpoint) identifier_endpoint )attribute )binary_operator )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_connected_event) identifier_connected_event )attribute (identifier_set) identifier_set )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Disconnect and error-out all requests.
(module (function_definition (function_name_open_bare_resource) function_name_open_bare_resource (parameters (identifier_self) identifier_self (identifier_resource_name) identifier_resource_name (default_parameter (identifier_access_mode) identifier_access_mode (attribute (attribute (identifier_constants) identifier_constants (identifier_AccessModes) identifier_AccessModes )attribute (identifier_no_lock) identifier_no_lock )attribute )default_parameter (default_parameter (identifier_open_timeout) identifier_open_timeout (attribute (identifier_constants) identifier_constants (identifier_VI_TMO_IMMEDIATE) identifier_VI_TMO_IMMEDIATE )attribute )default_parameter )parameters (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_visalib) identifier_visalib )attribute (identifier_open) identifier_open )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_session) identifier_session )attribute (identifier_resource_name) identifier_resource_name (identifier_access_mode) identifier_access_mode (identifier_open_timeout) identifier_open_timeout )argument_list )call )return_statement )block )function_definition )module
Open the specified resource without wrapping into a class :param resource_name: name or alias of the resource to open. :param access_mode: access mode. :type access_mode: :class:`pyvisa.constants.AccessModes` :param open_timeout: time out to open. :return: Unique logical identifier reference to a session.
(module (function_definition (function_name_do_cprofile) function_name_do_cprofile (parameters (identifier_func) identifier_func )parameters (block (function_definition (function_name_profiled_func) function_name_profiled_func (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_profile) identifier_profile (call (attribute (identifier_cProfile) identifier_cProfile (identifier_Profile) identifier_Profile )attribute (argument_list )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_profile) identifier_profile (identifier_enable) identifier_enable )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (identifier_func) identifier_func (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_profile) identifier_profile (identifier_disable) identifier_disable )attribute (argument_list )argument_list )call )expression_statement (return_statement (identifier_result) identifier_result )return_statement )block (finally_clause (block (expression_statement (call (attribute (identifier_profile) identifier_profile (identifier_print_stats) identifier_print_stats )attribute (argument_list )argument_list )call )expression_statement )block )finally_clause )try_statement )block )function_definition (return_statement (identifier_profiled_func) identifier_profiled_func )return_statement )block )function_definition )module
Decorator to profile a function It gives good numbers on various function calls but it omits a vital piece of information: what is it about a function that makes it so slow? However, it is a great start to basic profiling. Sometimes it can even point you to the solution with very little fuss. I often use it as a gut check to start the debugging process before I dig deeper into the specific functions that are either slow are called way too often. Pros: No external dependencies and quite fast. Useful for quick high-level checks. Cons: Rather limited information that usually requires deeper debugging; reports are a bit unintuitive, especially for complex codebases. See also -------- do_profile, test_do_profile
(module (function_definition (function_name_infile_path) function_name_infile_path (parameters (identifier_self) identifier_self )parameters (type (generic_type (identifier_Optional) identifier_Optional (type_parameter (type (identifier_PurePath) identifier_PurePath )type )type_parameter )generic_type )type (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier___infile_path) identifier___infile_path )attribute )not_operator (block (return_statement (call (attribute (call (identifier_Path) identifier_Path (argument_list (attribute (identifier_self) identifier_self (identifier___infile_path) identifier___infile_path )attribute )argument_list )call (identifier_expanduser) identifier_expanduser )attribute (argument_list )argument_list )call )return_statement )block )if_statement (return_statement (None) None )return_statement )block )function_definition )module
Read-only property. :return: A ``pathlib.PurePath`` object or ``None``.
(module (function_definition (function_name_GetVersionNamespace) function_name_GetVersionNamespace (parameters (identifier_version) identifier_version )parameters (block (expression_statement (assignment (identifier_ns) identifier_ns (subscript (identifier_nsMap) identifier_nsMap (identifier_version) identifier_version )subscript )assignment )expression_statement (if_statement (not_operator (identifier_ns) identifier_ns )not_operator (block (expression_statement (assignment (identifier_ns) identifier_ns (subscript (identifier_serviceNsMap) identifier_serviceNsMap (identifier_version) identifier_version )subscript )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_versionId) identifier_versionId (subscript (identifier_versionIdMap) identifier_versionIdMap (identifier_version) identifier_version )subscript )assignment )expression_statement (if_statement (not_operator (identifier_versionId) identifier_versionId )not_operator (block (expression_statement (assignment (identifier_namespace) identifier_namespace (identifier_ns) identifier_ns )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_namespace) identifier_namespace (binary_operator (string_'%s/%s') string_'%s/%s' (tuple (identifier_ns) identifier_ns (identifier_versionId) identifier_versionId )tuple )binary_operator )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_namespace) identifier_namespace )return_statement )block )function_definition )module
Get version namespace from version
(module (function_definition (function_name_write_text) function_name_write_text (parameters (identifier__command) identifier__command (identifier_txt_file) identifier_txt_file )parameters (block (expression_statement (assignment (identifier_command) identifier_command (call (attribute (identifier__command) identifier__command (identifier_strip) identifier_strip )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_txt_file) identifier_txt_file (string_'w') string_'w' )argument_list )call (as_pattern_target (identifier_txt) identifier_txt )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_txt) identifier_txt (identifier_writelines) identifier_writelines )attribute (argument_list (identifier_command) identifier_command )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Dump SQL command to a text file.
(module (function_definition (function_name_expand_matrix_in_orthogonal_basis) function_name_expand_matrix_in_orthogonal_basis (parameters (typed_parameter (identifier_m) identifier_m (type (attribute (identifier_np) identifier_np (identifier_ndarray) identifier_ndarray )attribute )type )typed_parameter (typed_parameter (identifier_basis) identifier_basis (type (generic_type (identifier_Dict) identifier_Dict (type_parameter (type (identifier_str) identifier_str )type (type (attribute (identifier_np) identifier_np (identifier_ndarray) identifier_ndarray )attribute )type )type_parameter )generic_type )type )typed_parameter )parameters (type (subscript (attribute (identifier_value) identifier_value (identifier_LinearDict) identifier_LinearDict )attribute (identifier_str) identifier_str )subscript )type (block (return_statement (call (attribute (identifier_value) identifier_value (identifier_LinearDict) identifier_LinearDict )attribute (argument_list (dictionary_comprehension (pair (identifier_name) identifier_name (parenthesized_expression (binary_operator (call (identifier_hilbert_schmidt_inner_product) identifier_hilbert_schmidt_inner_product (argument_list (identifier_b) identifier_b (identifier_m) identifier_m )argument_list )call (call (identifier_hilbert_schmidt_inner_product) identifier_hilbert_schmidt_inner_product (argument_list (identifier_b) identifier_b (identifier_b) identifier_b )argument_list )call )binary_operator )parenthesized_expression )pair (for_in_clause (pattern_list (identifier_name) identifier_name (identifier_b) identifier_b )pattern_list (call (attribute (identifier_basis) identifier_basis (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause )dictionary_comprehension )argument_list )call )return_statement )block )function_definition )module
Computes coefficients of expansion of m in basis. We require that basis be orthogonal w.r.t. the Hilbert-Schmidt inner product. We do not require that basis be orthonormal. Note that Pauli basis (I, X, Y, Z) is orthogonal, but not orthonormal.
(module (function_definition (function_name_fetch_single_representation) function_name_fetch_single_representation (parameters (identifier_self) identifier_self (identifier_item_xlink_href) identifier_item_xlink_href )parameters (block (expression_statement (assignment (identifier_journal_urls) identifier_journal_urls (dictionary (pair (string_'pgen') string_'pgen' (string_'http://www.plosgenetics.org/article/{0}') string_'http://www.plosgenetics.org/article/{0}' )pair (pair (string_'pcbi') string_'pcbi' (string_'http://www.ploscompbiol.org/article/{0}') string_'http://www.ploscompbiol.org/article/{0}' )pair (pair (string_'ppat') string_'ppat' (string_'http://www.plospathogens.org/article/{0}') string_'http://www.plospathogens.org/article/{0}' )pair (pair (string_'pntd') string_'pntd' (string_'http://www.plosntds.org/article/{0}') string_'http://www.plosntds.org/article/{0}' )pair (pair (string_'pmed') string_'pmed' (string_'http://www.plosmedicine.org/article/{0}') string_'http://www.plosmedicine.org/article/{0}' )pair (pair (string_'pbio') string_'pbio' (string_'http://www.plosbiology.org/article/{0}') string_'http://www.plosbiology.org/article/{0}' )pair (pair (string_'pone') string_'pone' (string_'http://www.plosone.org/article/{0}') string_'http://www.plosone.org/article/{0}' )pair (pair (string_'pctr') string_'pctr' (string_'http://clinicaltrials.ploshubs.org/article/{0}') string_'http://clinicaltrials.ploshubs.org/article/{0}' )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_subjournal_name) identifier_subjournal_name (subscript (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_article) identifier_article )attribute (identifier_doi) identifier_doi )attribute (identifier_split) identifier_split )attribute (argument_list (string_'.') string_'.' )argument_list )call (integer_2) integer_2 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_base_url) identifier_base_url (subscript (identifier_journal_urls) identifier_journal_urls (identifier_subjournal_name) identifier_subjournal_name )subscript )assignment )expression_statement (expression_statement (assignment (identifier_resource) identifier_resource (binary_operator (string_'fetchSingleRepresentation.action?uri=') string_'fetchSingleRepresentation.action?uri=' (identifier_item_xlink_href) identifier_item_xlink_href )binary_operator )assignment )expression_statement (return_statement (call (attribute (identifier_base_url) identifier_base_url (identifier_format) identifier_format )attribute (argument_list (identifier_resource) identifier_resource )argument_list )call )return_statement )block )function_definition )module
This function will render a formatted URL for accessing the PLoS' server SingleRepresentation of an object.
(module (function_definition (function_name_freefn) function_name_freefn (parameters (identifier_self) identifier_self (identifier_item) identifier_item (identifier_fn) identifier_fn (identifier_at_tail) identifier_at_tail )parameters (block (return_statement (call (identifier_c_void_p) identifier_c_void_p (argument_list (call (attribute (identifier_lib) identifier_lib (identifier_zlist_freefn) identifier_zlist_freefn )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__as_parameter_) identifier__as_parameter_ )attribute (identifier_item) identifier_item (identifier_fn) identifier_fn (identifier_at_tail) identifier_at_tail )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Set a free function for the specified list item. When the item is destroyed, the free function, if any, is called on that item. Use this when list items are dynamically allocated, to ensure that you don't have memory leaks. You can pass 'free' or NULL as a free_fn. Returns the item, or NULL if there is no such item.
(module (function_definition (function_name_animate) function_name_animate (parameters (identifier_self) identifier_self (identifier_images) identifier_images (default_parameter (identifier_delay) identifier_delay (float_.25) float_.25 )default_parameter )parameters (block (for_statement (identifier_image) identifier_image (identifier_images) identifier_images (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_set_image) identifier_set_image )attribute (argument_list (identifier_image) identifier_image )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_write_display) identifier_write_display )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_time) identifier_time (identifier_sleep) identifier_sleep )attribute (argument_list (identifier_delay) identifier_delay )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Displays each of the input images in order, pausing for "delay" seconds after each image. Keyword arguments: image -- An iterable collection of Image objects. delay -- How many seconds to wait after displaying an image before displaying the next one. (Default = .25)
(module (function_definition (function_name_protract) function_name_protract (parameters (identifier_self) identifier_self (identifier_x) identifier_x )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_active) identifier_active )attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_active) identifier_active )attribute (identifier_protract) identifier_protract )attribute (argument_list (identifier_x) identifier_x )argument_list )call )assignment )expression_statement (return_statement (attribute (identifier_self) identifier_self (identifier_active) identifier_active )attribute )return_statement )block )function_definition )module
Protract each of the `active` `Segments` by ``x`` seconds. This method subtracts ``x`` from each segment's lower bound, and adds ``x`` to the upper bound, while maintaining that each `Segment` stays within the `known` bounds. The :attr:`~DataQualityFlag.active` `SegmentList` is modified in place. Parameters ---------- x : `float` number of seconds by which to protact each `Segment`.
(module (function_definition (function_name_find) function_name_find (parameters (identifier_self) identifier_self (identifier_id) identifier_id )parameters (block (for_statement (identifier_sprite) identifier_sprite (attribute (identifier_self) identifier_self (identifier_sprites) identifier_sprites )attribute (block (if_statement (comparison_operator (attribute (identifier_sprite) identifier_sprite (identifier_id) identifier_id )attribute (identifier_id) identifier_id )comparison_operator (block (return_statement (identifier_sprite) identifier_sprite )return_statement )block )if_statement )block )for_statement (for_statement (identifier_sprite) identifier_sprite (attribute (identifier_self) identifier_self (identifier_sprites) identifier_sprites )attribute (block (expression_statement (assignment (identifier_found) identifier_found (call (attribute (identifier_sprite) identifier_sprite (identifier_find) identifier_find )attribute (argument_list (identifier_id) identifier_id )argument_list )call )assignment )expression_statement (if_statement (identifier_found) identifier_found (block (return_statement (identifier_found) identifier_found )return_statement )block )if_statement )block )for_statement )block )function_definition )module
breadth-first sprite search by ID
(module (function_definition (function_name_get_elastic_page_numbers) function_name_get_elastic_page_numbers (parameters (identifier_current_page) identifier_current_page (identifier_num_pages) identifier_num_pages )parameters (block (if_statement (comparison_operator (identifier_num_pages) identifier_num_pages (integer_10) integer_10 )comparison_operator (block (return_statement (call (identifier_list) identifier_list (argument_list (call (identifier_range) identifier_range (argument_list (integer_1) integer_1 (binary_operator (identifier_num_pages) identifier_num_pages (integer_1) integer_1 )binary_operator )argument_list )call )argument_list )call )return_statement )block )if_statement (if_statement (comparison_operator (identifier_current_page) identifier_current_page (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_pages) identifier_pages (list (integer_1) integer_1 )list )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_pages) identifier_pages (list (string_'first') string_'first' (string_'previous') string_'previous' )list )assignment )expression_statement (expression_statement (call (attribute (identifier_pages) identifier_pages (identifier_extend) identifier_extend )attribute (argument_list (call (identifier__make_elastic_range) identifier__make_elastic_range (argument_list (integer_1) integer_1 (identifier_current_page) identifier_current_page )argument_list )call )argument_list )call )expression_statement )block )else_clause )if_statement (if_statement (comparison_operator (identifier_current_page) identifier_current_page (identifier_num_pages) identifier_num_pages )comparison_operator (block (expression_statement (call (attribute (identifier_pages) identifier_pages (identifier_extend) identifier_extend )attribute (argument_list (subscript (call (identifier__make_elastic_range) identifier__make_elastic_range (argument_list (identifier_current_page) identifier_current_page (identifier_num_pages) identifier_num_pages )argument_list )call (slice (integer_1) integer_1 (colon) colon )slice )subscript )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_pages) identifier_pages (identifier_extend) identifier_extend )attribute (argument_list (list (string_'next') string_'next' (string_'last') string_'last' )list )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_pages) identifier_pages )return_statement )block )function_definition )module
Alternative callable for page listing. Produce an adaptive pagination, useful for big numbers of pages, by splitting the num_pages ranges in two parts at current_page. Each part will have its own S-curve.
(module (function_definition (function_name_search_function) function_name_search_function (parameters (identifier_cls) identifier_cls (identifier_encoding) identifier_encoding )parameters (block (if_statement (comparison_operator (identifier_encoding) identifier_encoding (attribute (identifier_cls) identifier_cls (identifier__codec_name) identifier__codec_name )attribute )comparison_operator (block (return_statement (call (attribute (identifier_codecs) identifier_codecs (identifier_CodecInfo) identifier_CodecInfo )attribute (argument_list (keyword_argument (identifier_name) identifier_name (attribute (identifier_cls) identifier_cls (identifier__codec_name) identifier__codec_name )attribute )keyword_argument (keyword_argument (identifier_encode) identifier_encode (attribute (identifier_cls) identifier_cls (identifier_encode) identifier_encode )attribute )keyword_argument (keyword_argument (identifier_decode) identifier_decode (attribute (identifier_cls) identifier_cls (identifier_decode) identifier_decode )attribute )keyword_argument )argument_list )call )return_statement )block )if_statement (return_statement (None) None )return_statement )block )function_definition )module
Search function to find 'rotunicode' codec.
(module (function_definition (function_name_setup_package) function_name_setup_package (parameters )parameters (block (import_statement (dotted_name (identifier_json) identifier_json )dotted_name )import_statement (import_from_statement (dotted_name (identifier_setuptools) identifier_setuptools )dotted_name (dotted_name (identifier_setup) identifier_setup )dotted_name (dotted_name (identifier_find_packages) identifier_find_packages )dotted_name )import_from_statement (expression_statement (assignment (identifier_filename_setup_json) identifier_filename_setup_json (string_'setup.json') string_'setup.json' )assignment )expression_statement (expression_statement (assignment (identifier_filename_description) identifier_filename_description (string_'README.md') string_'README.md' )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_filename_setup_json) identifier_filename_setup_json (string_'r') string_'r' )argument_list )call (as_pattern_target (identifier_handle) identifier_handle )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_setup_json) identifier_setup_json (call (attribute (identifier_json) identifier_json (identifier_load) identifier_load )attribute (argument_list (identifier_handle) identifier_handle )argument_list )call )assignment )expression_statement )block )with_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_filename_description) identifier_filename_description (string_'r') string_'r' )argument_list )call (as_pattern_target (identifier_handle) identifier_handle )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_description) identifier_description (call (attribute (identifier_handle) identifier_handle (identifier_read) identifier_read )attribute (argument_list )argument_list )call )assignment )expression_statement )block )with_statement (expression_statement (call (identifier_setup) identifier_setup (argument_list (keyword_argument (identifier_include_package_data) identifier_include_package_data (True) True )keyword_argument (keyword_argument (identifier_packages) identifier_packages (call (identifier_find_packages) identifier_find_packages (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_setup_requires) identifier_setup_requires (list (string_'reentry') string_'reentry' )list )keyword_argument (keyword_argument (identifier_reentry_register) identifier_reentry_register (True) True )keyword_argument (keyword_argument (identifier_long_description) identifier_long_description (identifier_description) identifier_description )keyword_argument (keyword_argument (identifier_long_description_content_type) identifier_long_description_content_type (string_'text/markdown') string_'text/markdown' )keyword_argument (dictionary_splat (identifier_setup_json) identifier_setup_json )dictionary_splat )argument_list )call )expression_statement )block )function_definition )module
Setup procedure.
(module (function_definition (function_name_to_json_serializable) function_name_to_json_serializable (parameters (identifier_obj) identifier_obj )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (identifier_Entity) identifier_Entity )argument_list )call (block (return_statement (call (attribute (identifier_obj) identifier_obj (identifier_to_json_dict) identifier_to_json_dict )attribute (argument_list )argument_list )call )return_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (identifier_dict) identifier_dict )argument_list )call (block (return_statement (dictionary_comprehension (pair (identifier_k) identifier_k (call (identifier_to_json_serializable) identifier_to_json_serializable (argument_list (identifier_v) identifier_v )argument_list )call )pair (for_in_clause (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (identifier_obj) identifier_obj (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause )dictionary_comprehension )return_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (tuple (identifier_list) identifier_list (identifier_tuple) identifier_tuple )tuple )argument_list )call (block (return_statement (list_comprehension (call (identifier_to_json_serializable) identifier_to_json_serializable (argument_list (identifier_v) identifier_v )argument_list )call (for_in_clause (identifier_v) identifier_v (identifier_obj) identifier_obj )for_in_clause )list_comprehension )return_statement )block )elif_clause (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (identifier_datetime) identifier_datetime )argument_list )call (block (return_statement (call (attribute (identifier_obj) identifier_obj (identifier_strftime) identifier_strftime )attribute (argument_list (string_'%Y-%m-%d %H:%M:%S') string_'%Y-%m-%d %H:%M:%S' )argument_list )call )return_statement )block )elif_clause (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (identifier_date) identifier_date )argument_list )call (block (return_statement (call (attribute (identifier_obj) identifier_obj (identifier_strftime) identifier_strftime )attribute (argument_list (string_'%Y-%m-%d') string_'%Y-%m-%d' )argument_list )call )return_statement )block )elif_clause )if_statement (return_statement (identifier_obj) identifier_obj )return_statement )block )function_definition )module
Transforms obj into a json serializable object. :param obj: entity or any json serializable object :return: serializable object
(module (function_definition (function_name_render_to_response) function_name_render_to_response (parameters (identifier_self) identifier_self (identifier_context) identifier_context )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_setup_forms) identifier_setup_forms )attribute (argument_list )argument_list )call )expression_statement (return_statement (call (identifier_TemplateResponse) identifier_TemplateResponse (argument_list (attribute (identifier_self) identifier_self (identifier_request) identifier_request )attribute (attribute (identifier_self) identifier_self (identifier_form_template) identifier_form_template )attribute (identifier_context) identifier_context (keyword_argument (identifier_current_app) identifier_current_app (attribute (attribute (identifier_self) identifier_self (identifier_admin_site) identifier_admin_site )attribute (identifier_name) identifier_name )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Add django-crispy form helper and draw the template Returns the ``TemplateResponse`` ready to be displayed
(module (function_definition (function_name_AddAttribute) function_name_AddAttribute (parameters (identifier_self) identifier_self (identifier_attribute) identifier_attribute (default_parameter (identifier_value) identifier_value (None) None )default_parameter (default_parameter (identifier_age) identifier_age (None) None )default_parameter )parameters (block (if_statement (comparison_operator (string_"w") string_"w" (attribute (identifier_self) identifier_self (identifier_mode) identifier_mode )attribute )comparison_operator (block (raise_statement (call (identifier_IOError) identifier_IOError (argument_list (binary_operator (string_"Writing attribute %s to read only object.") string_"Writing attribute %s to read only object." (identifier_attribute) identifier_attribute )binary_operator )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_value) identifier_value (None) None )comparison_operator (block (expression_statement (assignment (identifier_value) identifier_value (identifier_attribute) identifier_attribute )assignment )expression_statement (expression_statement (assignment (identifier_attribute) identifier_attribute (attribute (identifier_value) identifier_value (identifier_attribute_instance) identifier_attribute_instance )attribute )assignment )expression_statement )block )if_statement (if_statement (boolean_operator (boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_mode) identifier_mode )attribute (string_"w") string_"w" )comparison_operator (attribute (identifier_attribute) identifier_attribute (identifier_lock_protected) identifier_lock_protected )attribute )boolean_operator (not_operator (attribute (identifier_self) identifier_self (identifier_transaction) identifier_transaction )attribute )not_operator )boolean_operator (block (raise_statement (call (identifier_IOError) identifier_IOError (argument_list (binary_operator (string_"Object must be locked to write attribute %s.") string_"Object must be locked to write attribute %s." (identifier_attribute) identifier_attribute )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__CheckAttribute) identifier__CheckAttribute )attribute (argument_list (identifier_attribute) identifier_attribute (identifier_value) identifier_value )argument_list )call )expression_statement (if_statement (attribute (identifier_attribute) identifier_attribute (identifier_versioned) identifier_versioned )attribute (block (if_statement (attribute (identifier_attribute) identifier_attribute (identifier_creates_new_object_version) identifier_creates_new_object_version )attribute (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__new_version) identifier__new_version )attribute (True) True )assignment )expression_statement )block )if_statement (if_statement (identifier_age) identifier_age (block (expression_statement (assignment (attribute (identifier_value) identifier_value (identifier_age) identifier_age )attribute (identifier_age) identifier_age )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (attribute (identifier_value) identifier_value (identifier_age) identifier_age )attribute (call (attribute (attribute (identifier_rdfvalue) identifier_rdfvalue (identifier_RDFDatetime) identifier_RDFDatetime )attribute (identifier_Now) identifier_Now )attribute (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block (else_clause (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__to_delete) identifier__to_delete )attribute (identifier_add) identifier_add )attribute (argument_list (identifier_attribute) identifier_attribute )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_synced_attributes) identifier_synced_attributes )attribute (identifier_pop) identifier_pop )attribute (argument_list (identifier_attribute) identifier_attribute (None) None )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_new_attributes) identifier_new_attributes )attribute (identifier_pop) identifier_pop )attribute (argument_list (identifier_attribute) identifier_attribute (None) None )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_value) identifier_value (identifier_age) identifier_age )attribute (integer_0) integer_0 )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__AddAttributeToCache) identifier__AddAttributeToCache )attribute (argument_list (identifier_attribute) identifier_attribute (identifier_value) identifier_value (attribute (identifier_self) identifier_self (identifier_new_attributes) identifier_new_attributes )attribute )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__dirty) identifier__dirty )attribute (True) True )assignment )expression_statement )block )function_definition )module
Add an additional attribute to this object. If value is None, attribute is expected to be already initialized with a value. For example: fd.AddAttribute(fd.Schema.CONTAINS("some data")) Args: attribute: The attribute name or an RDFValue derived from the attribute. value: The value the attribute will be set to. age: Age (timestamp) of the attribute. If None, current time is used. Raises: IOError: If this object is read only.
(module (function_definition (function_name_listar_por_equipamento) function_name_listar_por_equipamento (parameters (identifier_self) identifier_self (identifier_id_equipamento) identifier_id_equipamento )parameters (block (if_statement (not_operator (call (identifier_is_valid_int_param) identifier_is_valid_int_param (argument_list (identifier_id_equipamento) identifier_id_equipamento )argument_list )call )not_operator (block (raise_statement (call (identifier_InvalidParameterError) identifier_InvalidParameterError (argument_list (string_u'Equipment id is invalid or was not informed.') string_u'Equipment id is invalid or was not informed.' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_url) identifier_url (binary_operator (binary_operator (string_'interface/equipamento/') string_'interface/equipamento/' (call (identifier_str) identifier_str (argument_list (identifier_id_equipamento) identifier_id_equipamento )argument_list )call )binary_operator (string_'/') string_'/' )binary_operator )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_code) identifier_code (identifier_map) identifier_map )pattern_list (call (attribute (identifier_self) identifier_self (identifier_submit) identifier_submit )attribute (argument_list (None) None (string_'GET') string_'GET' (identifier_url) identifier_url )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_key) identifier_key (string_'interface') string_'interface' )assignment )expression_statement (return_statement (call (identifier_get_list_map) identifier_get_list_map (argument_list (call (attribute (identifier_self) identifier_self (identifier_response) identifier_response )attribute (argument_list (identifier_code) identifier_code (identifier_map) identifier_map (list (identifier_key) identifier_key )list )argument_list )call (identifier_key) identifier_key )argument_list )call )return_statement )block )function_definition )module
List all interfaces of an equipment. :param id_equipamento: Equipment identifier. :return: Dictionary with the following: :: {'interface': [{'protegida': < protegida >, 'nome': < nome >, 'id_ligacao_front': < id_ligacao_front >, 'id_equipamento': < id_equipamento >, 'id': < id >, 'descricao': < descricao >, 'id_ligacao_back': < id_ligacao_back >}, ... other interfaces ...]} :raise InvalidParameterError: Equipment identifier is invalid or none. :raise DataBaseError: Networkapi failed to access the database. :raise XMLError: Networkapi failed to generate the XML response.
(module (function_definition (function_name_convert_svhn) function_name_convert_svhn (parameters (identifier_which_format) identifier_which_format (identifier_directory) identifier_directory (identifier_output_directory) identifier_output_directory (default_parameter (identifier_output_filename) identifier_output_filename (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_which_format) identifier_which_format (tuple (integer_1) integer_1 (integer_2) integer_2 )tuple )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"SVHN format needs to be either 1 or 2.") string_"SVHN format needs to be either 1 or 2." )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (identifier_output_filename) identifier_output_filename )not_operator (block (expression_statement (assignment (identifier_output_filename) identifier_output_filename (call (attribute (string_'svhn_format_{}.hdf5') string_'svhn_format_{}.hdf5' (identifier_format) identifier_format )attribute (argument_list (identifier_which_format) identifier_which_format )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_which_format) identifier_which_format (integer_1) integer_1 )comparison_operator (block (return_statement (call (identifier_convert_svhn_format_1) identifier_convert_svhn_format_1 (argument_list (identifier_directory) identifier_directory (identifier_output_directory) identifier_output_directory (identifier_output_filename) identifier_output_filename )argument_list )call )return_statement )block (else_clause (block (return_statement (call (identifier_convert_svhn_format_2) identifier_convert_svhn_format_2 (argument_list (identifier_directory) identifier_directory (identifier_output_directory) identifier_output_directory (identifier_output_filename) identifier_output_filename )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Converts the SVHN dataset to HDF5. Converts the SVHN dataset [SVHN] to an HDF5 dataset compatible with :class:`fuel.datasets.SVHN`. The converted dataset is saved as 'svhn_format_1.hdf5' or 'svhn_format_2.hdf5', depending on the `which_format` argument. .. [SVHN] Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, Andrew Y. Ng. *Reading Digits in Natural Images with Unsupervised Feature Learning*, NIPS Workshop on Deep Learning and Unsupervised Feature Learning, 2011. Parameters ---------- which_format : int Either 1 or 2. Determines which format (format 1: full numbers or format 2: cropped digits) to convert. directory : str Directory in which input files reside. output_directory : str Directory in which to save the converted dataset. output_filename : str, optional Name of the saved dataset. Defaults to 'svhn_format_1.hdf5' or 'svhn_format_2.hdf5', depending on `which_format`. Returns ------- output_paths : tuple of str Single-element tuple containing the path to the converted dataset.
(module (function_definition (function_name_get_issuer_keys) function_name_get_issuer_keys (parameters (identifier_self) identifier_self (identifier_issuer) identifier_issuer )parameters (block (expression_statement (assignment (identifier_res) identifier_res (list )list )assignment )expression_statement (for_statement (identifier_kbl) identifier_kbl (subscript (attribute (identifier_self) identifier_self (identifier_issuer_keys) identifier_issuer_keys )attribute (identifier_issuer) identifier_issuer )subscript (block (expression_statement (call (attribute (identifier_res) identifier_res (identifier_extend) identifier_extend )attribute (argument_list (call (attribute (identifier_kbl) identifier_kbl (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_res) identifier_res )return_statement )block )function_definition )module
Get all the keys that belong to an entity. :param issuer: The entity ID :return: A possibly empty list of keys
(module (function_definition (function_name_update_config) function_name_update_config (parameters (identifier_self) identifier_self (identifier_config) identifier_config (default_parameter (identifier_timeout) identifier_timeout (unary_operator (integer_1) integer_1 )unary_operator )default_parameter )parameters (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__client) identifier__client )attribute (identifier_update) identifier_update )attribute (argument_list (identifier_config) identifier_config (keyword_argument (identifier_uri) identifier_uri (binary_operator (attribute (identifier_self) identifier_self (identifier_URI) identifier_URI )attribute (string_"/config") string_"/config" )binary_operator )keyword_argument (keyword_argument (identifier_timeout) identifier_timeout (identifier_timeout) identifier_timeout )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Updates the remote server configuration and the automatic backup schedule for backup. Args: config (dict): Object to update. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView, just stop waiting for its completion. Returns: dict: Backup details.
(module (function_definition (function_name_path) function_name_path (parameters (identifier_args) identifier_args )parameters (block (import_from_statement (relative_import (import_prefix )import_prefix (dotted_name (identifier_query) identifier_query )dotted_name )relative_import (dotted_name (identifier_Database) identifier_Database )dotted_name )import_from_statement (expression_statement (assignment (identifier_db) identifier_db (call (identifier_Database) identifier_Database (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_output) identifier_output (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute )assignment )expression_statement (if_statement (attribute (identifier_args) identifier_args (identifier_selftest) identifier_selftest )attribute (block (import_from_statement (dotted_name (identifier_bob) identifier_bob (identifier_db) identifier_db (identifier_utils) identifier_utils )dotted_name (dotted_name (identifier_null) identifier_null )dotted_name )import_from_statement (expression_statement (assignment (identifier_output) identifier_output (call (identifier_null) identifier_null (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_r) identifier_r (call (attribute (identifier_db) identifier_db (identifier_paths) identifier_paths )attribute (argument_list (attribute (identifier_args) identifier_args (identifier_id) identifier_id )attribute (keyword_argument (identifier_prefix) identifier_prefix (attribute (identifier_args) identifier_args (identifier_directory) identifier_directory )attribute )keyword_argument (keyword_argument (identifier_suffix) identifier_suffix (attribute (identifier_args) identifier_args (identifier_extension) identifier_extension )attribute )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (identifier_path) identifier_path (identifier_r) identifier_r (block (expression_statement (call (attribute (identifier_output) identifier_output (identifier_write) identifier_write )attribute (argument_list (binary_operator (string_'%s\n') string_'%s\n' (identifier_path) identifier_path )binary_operator )argument_list )call )expression_statement )block )for_statement (if_statement (not_operator (identifier_r) identifier_r )not_operator (block (return_statement (integer_1) integer_1 )return_statement )block )if_statement (return_statement (integer_0) integer_0 )return_statement )block )function_definition )module
Returns a list of fully formed paths or stems given some file id
(module (function_definition (function_name__bse_cli_get_basis) function_name__bse_cli_get_basis (parameters (identifier_args) identifier_args )parameters (block (return_statement (call (attribute (identifier_api) identifier_api (identifier_get_basis) identifier_get_basis )attribute (argument_list (keyword_argument (identifier_name) identifier_name (attribute (identifier_args) identifier_args (identifier_basis) identifier_basis )attribute )keyword_argument (keyword_argument (identifier_elements) identifier_elements (attribute (identifier_args) identifier_args (identifier_elements) identifier_elements )attribute )keyword_argument (keyword_argument (identifier_version) identifier_version (attribute (identifier_args) identifier_args (identifier_version) identifier_version )attribute )keyword_argument (keyword_argument (identifier_fmt) identifier_fmt (attribute (identifier_args) identifier_args (identifier_fmt) identifier_fmt )attribute )keyword_argument (keyword_argument (identifier_uncontract_general) identifier_uncontract_general (attribute (identifier_args) identifier_args (identifier_unc_gen) identifier_unc_gen )attribute )keyword_argument (keyword_argument (identifier_uncontract_spdf) identifier_uncontract_spdf (attribute (identifier_args) identifier_args (identifier_unc_spdf) identifier_unc_spdf )attribute )keyword_argument (keyword_argument (identifier_uncontract_segmented) identifier_uncontract_segmented (attribute (identifier_args) identifier_args (identifier_unc_seg) identifier_unc_seg )attribute )keyword_argument (keyword_argument (identifier_make_general) identifier_make_general (attribute (identifier_args) identifier_args (identifier_make_gen) identifier_make_gen )attribute )keyword_argument (keyword_argument (identifier_optimize_general) identifier_optimize_general (attribute (identifier_args) identifier_args (identifier_opt_gen) identifier_opt_gen )attribute )keyword_argument (keyword_argument (identifier_data_dir) identifier_data_dir (attribute (identifier_args) identifier_args (identifier_data_dir) identifier_data_dir )attribute )keyword_argument (keyword_argument (identifier_header) identifier_header (not_operator (attribute (identifier_args) identifier_args (identifier_noheader) identifier_noheader )attribute )not_operator )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Handles the get-basis subcommand
(module (function_definition (function_name_feature_passthrough) function_name_feature_passthrough (parameters (identifier_early_feat) identifier_early_feat (identifier_late_feat) identifier_late_feat (identifier_filters) identifier_filters (identifier_name) identifier_name (default_parameter (identifier_kernel_size) identifier_kernel_size (tuple (integer_1) integer_1 (integer_1) integer_1 )tuple )default_parameter )parameters (block (expression_statement (assignment (pattern_list (identifier__) identifier__ (identifier_h_early) identifier_h_early (identifier_w_early) identifier_w_early (identifier_c_early) identifier_c_early )pattern_list (call (attribute (call (attribute (identifier_early_feat) identifier_early_feat (identifier_get_shape) identifier_get_shape )attribute (argument_list )argument_list )call (identifier_as_list) identifier_as_list )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier__) identifier__ (identifier_h_late) identifier_h_late (identifier_w_late) identifier_w_late (identifier_c_late) identifier_c_late )pattern_list (call (attribute (call (attribute (identifier_late_feat) identifier_late_feat (identifier_get_shape) identifier_get_shape )attribute (argument_list )argument_list )call (identifier_as_list) identifier_as_list )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_s_x) identifier_s_x (call (identifier_int) identifier_int (argument_list (binary_operator (identifier_w_early) identifier_w_early (identifier_w_late) identifier_w_late )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_s_y) identifier_s_y (call (identifier_int) identifier_int (argument_list (binary_operator (identifier_h_early) identifier_h_early (identifier_h_late) identifier_h_late )binary_operator )argument_list )call )assignment )expression_statement (assert_statement (boolean_operator (comparison_operator (binary_operator (identifier_h_late) identifier_h_late (identifier_s_y) identifier_s_y )binary_operator (identifier_h_early) identifier_h_early )comparison_operator (comparison_operator (binary_operator (identifier_w_late) identifier_w_late (identifier_s_x) identifier_s_x )binary_operator (identifier_w_early) identifier_w_early )comparison_operator )boolean_operator )assert_statement (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_tf) identifier_tf (identifier_variable_scope) identifier_variable_scope )attribute (argument_list (identifier_name) identifier_name )argument_list )call (as_pattern_target (identifier_scope) identifier_scope )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_early_conv) identifier_early_conv (call (attribute (attribute (identifier_tf) identifier_tf (identifier_layers) identifier_layers )attribute (identifier_conv2d) identifier_conv2d )attribute (argument_list (identifier_early_feat) identifier_early_feat (keyword_argument (identifier_filters) identifier_filters (identifier_filters) identifier_filters )keyword_argument (keyword_argument (identifier_kernel_size) identifier_kernel_size (tuple (binary_operator (identifier_s_x) identifier_s_x (subscript (identifier_kernel_size) identifier_kernel_size (integer_0) integer_0 )subscript )binary_operator (binary_operator (identifier_s_y) identifier_s_y (subscript (identifier_kernel_size) identifier_kernel_size (integer_1) integer_1 )subscript )binary_operator )tuple )keyword_argument (keyword_argument (identifier_strides) identifier_strides (tuple (identifier_s_x) identifier_s_x (identifier_s_y) identifier_s_y )tuple )keyword_argument (keyword_argument (identifier_padding) identifier_padding (string_"same") string_"same" )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_late_conv) identifier_late_conv (call (attribute (attribute (identifier_tf) identifier_tf (identifier_layers) identifier_layers )attribute (identifier_conv2d) identifier_conv2d )attribute (argument_list (identifier_late_feat) identifier_late_feat (keyword_argument (identifier_filters) identifier_filters (identifier_filters) identifier_filters )keyword_argument (keyword_argument (identifier_kernel_size) identifier_kernel_size (identifier_kernel_size) identifier_kernel_size )keyword_argument (keyword_argument (identifier_strides) identifier_strides (tuple (integer_1) integer_1 (integer_1) integer_1 )tuple )keyword_argument (keyword_argument (identifier_padding) identifier_padding (string_"same") string_"same" )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (binary_operator (identifier_early_conv) identifier_early_conv (identifier_late_conv) identifier_late_conv )binary_operator )return_statement )block )with_statement )block )function_definition )module
A feature passthrough layer inspired by yolo9000 and the inverse tiling layer. It can be proven, that this layer does the same as conv(concat(inverse_tile(early_feat), late_feat)). This layer has no activation function. :param early_feat: The early feature layer of shape [batch_size, h * s_x, w * s_y, _]. s_x and s_y are integers computed internally describing the scale between the layers. :param late_feat: The late feature layer of shape [batch_size, h, w, _]. :param filters: The number of convolution filters. :param name: The name of the layer. :param kernel_size: The size of the kernel. Default (1x1). :return: The output tensor of shape [batch_size, h, w, outputs]
(module (function_definition (function_name_handle_endtag) function_name_handle_endtag (parameters (identifier_self) identifier_self (identifier_tagName) identifier_tagName )parameters (block (expression_statement (assignment (identifier_inTag) identifier_inTag (attribute (identifier_self) identifier_self (identifier__inTag) identifier__inTag )attribute )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_foundIt) identifier_foundIt (False) False )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (identifier_inTag) identifier_inTag )argument_list )call )argument_list )call (block (if_statement (comparison_operator (attribute (subscript (identifier_inTag) identifier_inTag (identifier_i) identifier_i )subscript (identifier_tagName) identifier_tagName )attribute (identifier_tagName) identifier_tagName )comparison_operator (block (expression_statement (assignment (identifier_foundIt) identifier_foundIt (True) True )assignment )expression_statement (break_statement )break_statement )block )if_statement )block )for_statement (if_statement (not_operator (identifier_foundIt) identifier_foundIt )not_operator (block (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute (identifier_write) identifier_write )attribute (argument_list (string_'WARNING: found close tag with no matching start.\n') string_'WARNING: found close tag with no matching start.\n' )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (while_statement (comparison_operator (attribute (subscript (identifier_inTag) identifier_inTag (unary_operator (integer_1) integer_1 )unary_operator )subscript (identifier_tagName) identifier_tagName )attribute (identifier_tagName) identifier_tagName )comparison_operator (block (expression_statement (assignment (identifier_oldTag) identifier_oldTag (call (attribute (identifier_inTag) identifier_inTag (identifier_pop) identifier_pop )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_oldTag) identifier_oldTag (identifier_tagName) identifier_tagName )attribute (identifier_PREFORMATTED_TAGS) identifier_PREFORMATTED_TAGS )comparison_operator (block (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_inPreformatted) identifier_inPreformatted )attribute (integer_1) integer_1 )augmented_assignment )expression_statement )block )if_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_currentIndentLevel) identifier_currentIndentLevel )attribute (integer_1) integer_1 )augmented_assignment )expression_statement )block )while_statement (expression_statement (call (attribute (identifier_inTag) identifier_inTag (identifier_pop) identifier_pop )attribute (argument_list )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_tagName) identifier_tagName (identifier_INVISIBLE_ROOT_TAG) identifier_INVISIBLE_ROOT_TAG )comparison_operator (block (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_currentIndentLevel) identifier_currentIndentLevel )attribute (integer_1) integer_1 )augmented_assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_tagName) identifier_tagName (identifier_PREFORMATTED_TAGS) identifier_PREFORMATTED_TAGS )comparison_operator (block (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_inPreformatted) identifier_inPreformatted )attribute (integer_1) integer_1 )augmented_assignment )expression_statement )block )if_statement )block (except_clause (block (pass_statement )pass_statement )block )except_clause )try_statement )block )function_definition )module
handle_endtag - Internal for parsing
(module (function_definition (function_name_encode_timeseries_put) function_name_encode_timeseries_put (parameters (identifier_self) identifier_self (identifier_tsobj) identifier_tsobj )parameters (block (if_statement (attribute (identifier_tsobj) identifier_tsobj (identifier_columns) identifier_columns )attribute (block (raise_statement (call (identifier_NotImplementedError) identifier_NotImplementedError (argument_list (string_'columns are not used') string_'columns are not used' )argument_list )call )raise_statement )block )if_statement (if_statement (boolean_operator (attribute (identifier_tsobj) identifier_tsobj (identifier_rows) identifier_rows )attribute (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (identifier_tsobj) identifier_tsobj (identifier_rows) identifier_rows )attribute (identifier_list) identifier_list )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_req_rows) identifier_req_rows (list )list )assignment )expression_statement (for_statement (identifier_row) identifier_row (attribute (identifier_tsobj) identifier_tsobj (identifier_rows) identifier_rows )attribute (block (expression_statement (assignment (identifier_req_r) identifier_req_r (list )list )assignment )expression_statement (for_statement (identifier_cell) identifier_cell (identifier_row) identifier_row (block (expression_statement (call (attribute (identifier_req_r) identifier_req_r (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_encode_to_ts_cell) identifier_encode_to_ts_cell )attribute (argument_list (identifier_cell) identifier_cell )argument_list )call )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_req_rows) identifier_req_rows (identifier_append) identifier_append )attribute (argument_list (call (identifier_tuple) identifier_tuple (argument_list (identifier_req_r) identifier_req_r )argument_list )call )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier_req) identifier_req (expression_list (identifier_tsputreq_a) identifier_tsputreq_a (attribute (attribute (identifier_tsobj) identifier_tsobj (identifier_table) identifier_table )attribute (identifier_name) identifier_name )attribute (list )list (identifier_req_rows) identifier_req_rows )expression_list )assignment )expression_statement (expression_statement (assignment (identifier_mc) identifier_mc (identifier_MSG_CODE_TS_TTB_MSG) identifier_MSG_CODE_TS_TTB_MSG )assignment )expression_statement (expression_statement (assignment (identifier_rc) identifier_rc (identifier_MSG_CODE_TS_TTB_MSG) identifier_MSG_CODE_TS_TTB_MSG )assignment )expression_statement (return_statement (call (identifier_Msg) identifier_Msg (argument_list (identifier_mc) identifier_mc (call (identifier_encode) identifier_encode (argument_list (identifier_req) identifier_req )argument_list )call (identifier_rc) identifier_rc )argument_list )call )return_statement )block (else_clause (block (raise_statement (call (identifier_RiakError) identifier_RiakError (argument_list (string_"TsObject requires a list of rows") string_"TsObject requires a list of rows" )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Returns an Erlang-TTB encoded tuple with the appropriate data and metadata from a TsObject. :param tsobj: a TsObject :type tsobj: TsObject :rtype: term-to-binary encoded object
(module (function_definition (function_name_normalize_name) function_name_normalize_name (parameters (identifier_name) identifier_name (default_parameter (identifier_overrides) identifier_overrides (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_normalized_name) identifier_normalized_name (call (attribute (identifier_name) identifier_name (identifier_title) identifier_title )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (identifier_overrides) identifier_overrides (block (expression_statement (assignment (identifier_override_map) identifier_override_map (call (identifier_dict) identifier_dict (argument_list (list_comprehension (tuple (call (attribute (identifier_name) identifier_name (identifier_title) identifier_title )attribute (argument_list )argument_list )call (identifier_name) identifier_name )tuple (for_in_clause (identifier_name) identifier_name (identifier_overrides) identifier_overrides )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_override_map) identifier_override_map (identifier_get) identifier_get )attribute (argument_list (identifier_normalized_name) identifier_normalized_name (identifier_normalized_name) identifier_normalized_name )argument_list )call )return_statement )block (else_clause (block (return_statement (identifier_normalized_name) identifier_normalized_name )return_statement )block )else_clause )if_statement )block )function_definition )module
Normalize the key name to title case. For example, ``normalize_name('content-id')`` will become ``Content-Id`` Args: name (str): The name to normalize. overrides (set, sequence): A set or sequence containing keys that should be cased to themselves. For example, passing ``set('WARC-Type')`` will normalize any key named "warc-type" to ``WARC-Type`` instead of the default ``Warc-Type``. Returns: str
(module (function_definition (function_name_compute_bbox_with_margins) function_name_compute_bbox_with_margins (parameters (identifier_margin) identifier_margin (identifier_x) identifier_x (identifier_y) identifier_y )parameters (block (expression_statement (string_'Helper function to compute bounding box for the plot') string_'Helper function to compute bounding box for the plot' )expression_statement (expression_statement (assignment (identifier_pos) identifier_pos (call (attribute (identifier_np) identifier_np (identifier_asarray) identifier_asarray )attribute (argument_list (tuple (identifier_x) identifier_x (identifier_y) identifier_y )tuple )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_minxy) identifier_minxy (identifier_maxxy) identifier_maxxy )pattern_list (expression_list (call (attribute (identifier_pos) identifier_pos (identifier_min) identifier_min )attribute (argument_list (keyword_argument (identifier_axis) identifier_axis (integer_1) integer_1 )keyword_argument )argument_list )call (call (attribute (identifier_pos) identifier_pos (identifier_max) identifier_max )attribute (argument_list (keyword_argument (identifier_axis) identifier_axis (integer_1) integer_1 )keyword_argument )argument_list )call )expression_list )assignment )expression_statement (expression_statement (assignment (identifier_xy1) identifier_xy1 (binary_operator (identifier_minxy) identifier_minxy (binary_operator (identifier_margin) identifier_margin (parenthesized_expression (binary_operator (identifier_maxxy) identifier_maxxy (identifier_minxy) identifier_minxy )binary_operator )parenthesized_expression )binary_operator )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_xy2) identifier_xy2 (binary_operator (identifier_maxxy) identifier_maxxy (binary_operator (identifier_margin) identifier_margin (parenthesized_expression (binary_operator (identifier_maxxy) identifier_maxxy (identifier_minxy) identifier_minxy )binary_operator )parenthesized_expression )binary_operator )binary_operator )assignment )expression_statement (return_statement (expression_list (call (identifier_tuple) identifier_tuple (argument_list (identifier_xy1) identifier_xy1 )argument_list )call (call (identifier_tuple) identifier_tuple (argument_list (identifier_xy2) identifier_xy2 )argument_list )call )expression_list )return_statement )block )function_definition )module
Helper function to compute bounding box for the plot
(module (function_definition (function_name_set_value) function_name_set_value (parameters (identifier_self) identifier_self (identifier_value) identifier_value (default_parameter (identifier_force) identifier_force (False) False )default_parameter )parameters (block (if_statement (identifier_force) identifier_force (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__value) identifier__value )attribute (identifier_value) identifier_value )assignment )expression_statement (return_statement )return_statement )block )if_statement (if_statement (comparison_operator (identifier_value) identifier_value (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__value) identifier__value )attribute (identifier_value) identifier_value )assignment )expression_statement (return_statement )return_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (attribute (identifier_six) identifier_six (identifier_integer_types) identifier_integer_types )attribute )argument_list )call (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__value) identifier__value )attribute (identifier_value) identifier_value )assignment )expression_statement (return_statement )return_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (attribute (identifier_six) identifier_six (identifier_string_types) identifier_string_types )attribute )argument_list )call (block (for_statement (pattern_list (identifier_v) identifier_v (identifier_n) identifier_n )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_enums) identifier_enums )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (identifier_n) identifier_n (identifier_value) identifier_value )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__value) identifier__value )attribute (identifier_v) identifier_v )assignment )expression_statement (return_statement )return_statement )block )if_statement )block )for_statement (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"Unable to find value name in enum list") string_"Unable to find value name in enum list" )argument_list )call )raise_statement )block )if_statement (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (binary_operator (string_"Value for '%s' must by of type String or Integer not '%s'") string_"Value for '%s' must by of type String or Integer not '%s'" (tuple (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute (call (identifier_type) identifier_type (argument_list (identifier_value) identifier_value )argument_list )call )tuple )binary_operator )argument_list )call )raise_statement )block )function_definition )module
Set the value. :param String|Integer value: The value to set. Must be in the enum list. :param Boolean force: Set the value without checking it :raises ValueError: If value name given but it isn't available :raises TypeError: If value is not String or Integer
(module (function_definition (function_name_verify) function_name_verify (parameters (identifier_self) identifier_self (identifier_payload) identifier_payload )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_authenticator) identifier_authenticator )attribute )not_operator (block (return_statement (identifier_payload) identifier_payload )return_statement )block )if_statement (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_authenticator) identifier_authenticator )attribute (identifier_auth) identifier_auth )attribute (argument_list (identifier_payload) identifier_payload )argument_list )call )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_authenticator) identifier_authenticator )attribute (identifier_unsigned) identifier_unsigned )attribute (argument_list (identifier_payload) identifier_payload )argument_list )call )return_statement )block (except_clause (identifier_AuthenticatorInvalidSignature) identifier_AuthenticatorInvalidSignature (block (raise_statement )raise_statement )block )except_clause (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_exception) identifier_exception )as_pattern_target )as_pattern (block (raise_statement (call (identifier_AuthenticateError) identifier_AuthenticateError (argument_list (call (identifier_str) identifier_str (argument_list (identifier_exception) identifier_exception )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Verify payload authenticity via the supplied authenticator
(module (function_definition (function_name_maybe_create_placement_group) function_name_maybe_create_placement_group (parameters (default_parameter (identifier_name) identifier_name (string_'') string_'' )default_parameter (default_parameter (identifier_max_retries) identifier_max_retries (integer_10) integer_10 )default_parameter )parameters (block (if_statement (not_operator (identifier_name) identifier_name )not_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_client) identifier_client (call (identifier_get_ec2_client) identifier_get_ec2_client (argument_list )argument_list )call )assignment )expression_statement (while_statement (True) True (block (try_statement (block (expression_statement (call (attribute (identifier_client) identifier_client (identifier_describe_placement_groups) identifier_describe_placement_groups )attribute (argument_list (keyword_argument (identifier_GroupNames) identifier_GroupNames (list (identifier_name) identifier_name )list )keyword_argument )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_"Reusing placement_group group: ") string_"Reusing placement_group group: " (identifier_name) identifier_name )binary_operator )argument_list )call )expression_statement (break_statement )break_statement )block (except_clause (identifier_Exception) identifier_Exception (block (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_"Creating placement_group group: ") string_"Creating placement_group group: " (identifier_name) identifier_name )binary_operator )argument_list )call )expression_statement (try_statement (block (expression_statement (assignment (identifier__response) identifier__response (call (attribute (identifier_client) identifier_client (identifier_create_placement_group) identifier_create_placement_group )attribute (argument_list (keyword_argument (identifier_GroupName) identifier_GroupName (identifier_name) identifier_name )keyword_argument (keyword_argument (identifier_Strategy) identifier_Strategy (string_'cluster') string_'cluster' )keyword_argument )argument_list )call )assignment )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (pass_statement )pass_statement )block )except_clause )try_statement )block )except_clause )try_statement )block )while_statement (expression_statement (assignment (identifier_counter) identifier_counter (integer_0) integer_0 )assignment )expression_statement (while_statement (True) True (block (try_statement (block (expression_statement (assignment (identifier_res) identifier_res (call (attribute (identifier_client) identifier_client (identifier_describe_placement_groups) identifier_describe_placement_groups )attribute (argument_list (keyword_argument (identifier_GroupNames) identifier_GroupNames (list (identifier_name) identifier_name )list )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_res_entry) identifier_res_entry (subscript (subscript (identifier_res) identifier_res (string_'PlacementGroups') string_'PlacementGroups' )subscript (integer_0) integer_0 )subscript )assignment )expression_statement (if_statement (comparison_operator (subscript (identifier_res_entry) identifier_res_entry (string_'State') string_'State' )subscript (string_'available') string_'available' )comparison_operator (block (assert_statement (comparison_operator (subscript (identifier_res_entry) identifier_res_entry (string_'Strategy') string_'Strategy' )subscript (string_'cluster') string_'cluster' )comparison_operator )assert_statement (break_statement )break_statement )block )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 (identifier_print) identifier_print (argument_list (binary_operator (string_"Got exception: %s") string_"Got exception: %s" (tuple (identifier_e) identifier_e )tuple )binary_operator )argument_list )call )expression_statement )block )except_clause )try_statement (expression_statement (augmented_assignment (identifier_counter) identifier_counter (integer_1) integer_1 )augmented_assignment )expression_statement (if_statement (comparison_operator (identifier_counter) identifier_counter (identifier_max_retries) identifier_max_retries )comparison_operator (block (assert_statement (False) False (string_f'Failed to create placement_group group {name} in {max_retries} attempts') string_f'Failed to create placement_group group {name} in {max_retries} attempts' )assert_statement )block )if_statement (expression_statement (call (attribute (identifier_time) identifier_time (identifier_sleep) identifier_sleep )attribute (argument_list (identifier_RETRY_INTERVAL_SEC) identifier_RETRY_INTERVAL_SEC )argument_list )call )expression_statement )block )while_statement )block )function_definition )module
Creates placement_group group or reuses existing one. Crash if unable to create placement_group group. If name is empty, ignores request.
(module (function_definition (function_name_delete) function_name_delete (parameters (identifier_self) identifier_self (identifier_photo_id) identifier_photo_id (default_parameter (identifier_album_id) identifier_album_id (integer_0) integer_0 )default_parameter )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_photo_id) identifier_photo_id (identifier_Info) identifier_Info )argument_list )call (block (expression_statement (assignment (identifier_photo_id) identifier_photo_id (attribute (identifier_photo_id) identifier_photo_id (identifier_id) identifier_id )attribute )assignment )expression_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__session) identifier__session )attribute (identifier_okc_post) identifier_okc_post )attribute (argument_list (string_'photoupload') string_'photoupload' (keyword_argument (identifier_data) identifier_data (dictionary (pair (string_'albumid') string_'albumid' (identifier_album_id) identifier_album_id )pair (pair (string_'picid') string_'picid' (identifier_photo_id) identifier_photo_id )pair (pair (string_'authcode') string_'authcode' (attribute (identifier_self) identifier_self (identifier__authcode) identifier__authcode )attribute )pair (pair (string_'picture.delete_ajax') string_'picture.delete_ajax' (integer_1) integer_1 )pair )dictionary )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Delete a photo from the logged in users account. :param photo_id: The okcupid id of the photo to delete. :param album_id: The album from which to delete the photo.
(module (function_definition (function_name_certify) function_name_certify (parameters (typed_parameter (identifier_client) identifier_client (type (identifier_Client) identifier_Client )type )typed_parameter (typed_parameter (identifier_certification_signed_raw) identifier_certification_signed_raw (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (identifier_ClientResponse) identifier_ClientResponse )type (block (return_statement (await (call (attribute (identifier_client) identifier_client (identifier_post) identifier_post )attribute (argument_list (binary_operator (identifier_MODULE) identifier_MODULE (string_'/certify') string_'/certify' )binary_operator (dictionary (pair (string_'cert') string_'cert' (identifier_certification_signed_raw) identifier_certification_signed_raw )pair )dictionary (keyword_argument (identifier_rtype) identifier_rtype (identifier_RESPONSE_AIOHTTP) identifier_RESPONSE_AIOHTTP )keyword_argument )argument_list )call )await )return_statement )block )function_definition )module
POST certification raw document :param client: Client to connect to the api :param certification_signed_raw: Certification raw document :return:
(module (function_definition (function_name__build_date_time_time_zone) function_name__build_date_time_time_zone (parameters (identifier_self) identifier_self (identifier_date_time) identifier_date_time )parameters (block (expression_statement (assignment (identifier_timezone) identifier_timezone (conditional_expression (attribute (attribute (identifier_date_time) identifier_date_time (identifier_tzinfo) identifier_tzinfo )attribute (identifier_zone) identifier_zone )attribute (comparison_operator (attribute (identifier_date_time) identifier_date_time (identifier_tzinfo) identifier_tzinfo )attribute (None) None )comparison_operator (None) None )conditional_expression )assignment )expression_statement (return_statement (dictionary (pair (call (attribute (identifier_self) identifier_self (identifier__cc) identifier__cc )attribute (argument_list (string_'dateTime') string_'dateTime' )argument_list )call (call (attribute (identifier_date_time) identifier_date_time (identifier_strftime) identifier_strftime )attribute (argument_list (string_'%Y-%m-%dT%H:%M:%S') string_'%Y-%m-%dT%H:%M:%S' )argument_list )call )pair (pair (call (attribute (identifier_self) identifier_self (identifier__cc) identifier__cc )attribute (argument_list (string_'timeZone') string_'timeZone' )argument_list )call (call (identifier_get_windows_tz) identifier_get_windows_tz (argument_list (boolean_operator (identifier_timezone) identifier_timezone (attribute (attribute (identifier_self) identifier_self (identifier_protocol) identifier_protocol )attribute (identifier_timezone) identifier_timezone )attribute )boolean_operator )argument_list )call )pair )dictionary )return_statement )block )function_definition )module
Converts a datetime to a dateTimeTimeZone resource
(module (function_definition (function_name_serialize_to_normalized_pretty_json) function_name_serialize_to_normalized_pretty_json (parameters (identifier_py_obj) identifier_py_obj )parameters (block (return_statement (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_py_obj) identifier_py_obj (keyword_argument (identifier_sort_keys) identifier_sort_keys (True) True )keyword_argument (keyword_argument (identifier_indent) identifier_indent (integer_2) integer_2 )keyword_argument (keyword_argument (identifier_cls) identifier_cls (identifier_ToJsonCompatibleTypes) identifier_ToJsonCompatibleTypes )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Serialize a native object to normalized, pretty printed JSON. The JSON string is normalized by sorting any dictionary keys. Args: py_obj: object Any object that can be represented in JSON. Some types, such as datetimes are automatically converted to strings. Returns: str: normalized, pretty printed JSON string.
(module (function_definition (function_name_from_dict) function_name_from_dict (parameters (identifier_cls) identifier_cls (identifier_d) identifier_d )parameters (block (expression_statement (assignment (identifier_name) identifier_name (call (attribute (identifier_PartitionIdentity) identifier_PartitionIdentity (identifier__name_class) identifier__name_class )attribute (argument_list (dictionary_splat (identifier_d) identifier_d )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (string_'id') string_'id' (identifier_d) identifier_d )comparison_operator (comparison_operator (string_'revision') string_'revision' (identifier_d) identifier_d )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_on) identifier_on (parenthesized_expression (call (attribute (call (attribute (identifier_ObjectNumber) identifier_ObjectNumber (identifier_parse) identifier_parse )attribute (argument_list (subscript (identifier_d) identifier_d (string_'id') string_'id' )subscript )argument_list )call (identifier_rev) identifier_rev )attribute (argument_list (subscript (identifier_d) identifier_d (string_'revision') string_'revision' )subscript )argument_list )call )parenthesized_expression )assignment )expression_statement )block (elif_clause (comparison_operator (string_'vid') string_'vid' (identifier_d) identifier_d )comparison_operator (block (expression_statement (assignment (identifier_on) identifier_on (call (attribute (identifier_ObjectNumber) identifier_ObjectNumber (identifier_parse) identifier_parse )attribute (argument_list (subscript (identifier_d) identifier_d (string_'vid') string_'vid' )subscript )argument_list )call )assignment )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"Must have id and revision, or vid") string_"Must have id and revision, or vid" )argument_list )call )raise_statement )block )else_clause )if_statement (try_statement (block (return_statement (call (identifier_PartitionIdentity) identifier_PartitionIdentity (argument_list (identifier_name) identifier_name (identifier_on) identifier_on )argument_list )call )return_statement )block (except_clause (as_pattern (identifier_TypeError) identifier_TypeError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (call (attribute (string_"Failed to make identity from \n{}\n: {}") string_"Failed to make identity from \n{}\n: {}" (identifier_format) identifier_format )attribute (argument_list (identifier_d) identifier_d (attribute (identifier_e) identifier_e (identifier_message) identifier_message )attribute )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Like Identity.from_dict, but will cast the class type based on the format. i.e. if the format is hdf, return an HdfPartitionIdentity. :param d: :return:
(module (function_definition (function_name_load_image) function_name_load_image (parameters (identifier_filename) identifier_filename (default_parameter (identifier_timeout) identifier_timeout (integer_120) integer_120 )default_parameter )parameters (block (expression_statement (assignment (identifier_c) identifier_c (call (identifier_docker_fabric) identifier_docker_fabric (argument_list )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (call (identifier_expand_path) identifier_expand_path (argument_list (identifier_filename) identifier_filename )argument_list )call (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__timeout) identifier__timeout (attribute (identifier_c) identifier_c (identifier__timeout) identifier__timeout )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_c) identifier_c (identifier__timeout) identifier__timeout )attribute (identifier_timeout) identifier_timeout )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_c) identifier_c (identifier_load_image) identifier_load_image )attribute (argument_list (identifier_f) identifier_f )argument_list )call )expression_statement )block (finally_clause (block (expression_statement (assignment (attribute (identifier_c) identifier_c (identifier__timeout) identifier__timeout )attribute (identifier__timeout) identifier__timeout )assignment )expression_statement )block )finally_clause )try_statement )block )with_statement )block )function_definition )module
Uploads an image from a local file to a Docker remote. Note that this temporarily has to extend the service timeout period. :param filename: Local file name. :type filename: unicode :param timeout: Timeout in seconds to set temporarily for the upload. :type timeout: int
(module (function_definition (function_name_create_app) function_name_create_app (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_utils) identifier_utils (identifier_banner) identifier_banner )attribute (argument_list (string_"Creating Spinnaker App") string_"Creating Spinnaker App" )argument_list )call )expression_statement (expression_statement (assignment (identifier_spinnakerapp) identifier_spinnakerapp (call (attribute (identifier_app) identifier_app (identifier_SpinnakerApp) identifier_SpinnakerApp )attribute (argument_list (keyword_argument (identifier_app) identifier_app (attribute (identifier_self) identifier_self (identifier_app) identifier_app )attribute )keyword_argument (keyword_argument (identifier_email) identifier_email (attribute (identifier_self) identifier_self (identifier_email) identifier_email )attribute )keyword_argument (keyword_argument (identifier_project) identifier_project (attribute (identifier_self) identifier_self (identifier_group) identifier_group )attribute )keyword_argument (keyword_argument (identifier_repo) identifier_repo (attribute (identifier_self) identifier_self (identifier_repo) identifier_repo )attribute )keyword_argument (keyword_argument (identifier_pipeline_config) identifier_pipeline_config (subscript (attribute (identifier_self) identifier_self (identifier_configs) identifier_configs )attribute (string_'pipeline') string_'pipeline' )subscript )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_spinnakerapp) identifier_spinnakerapp (identifier_create_app) identifier_create_app )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Create the spinnaker application.
(module (function_definition (function_name__diff_bounds) function_name__diff_bounds (parameters (identifier_bounds) identifier_bounds (identifier_coord) identifier_coord )parameters (block (try_statement (block (return_statement (binary_operator (subscript (identifier_bounds) identifier_bounds (slice (colon) colon )slice (integer_1) integer_1 )subscript (subscript (identifier_bounds) identifier_bounds (slice (colon) colon )slice (integer_0) integer_0 )subscript )binary_operator )return_statement )block (except_clause (identifier_IndexError) identifier_IndexError (block (expression_statement (assignment (identifier_diff) identifier_diff (call (attribute (identifier_np) identifier_np (identifier_diff) identifier_diff )attribute (argument_list (identifier_bounds) identifier_bounds (keyword_argument (identifier_axis) identifier_axis (integer_0) integer_0 )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_xr) identifier_xr (identifier_DataArray) identifier_DataArray )attribute (argument_list (identifier_diff) identifier_diff (keyword_argument (identifier_dims) identifier_dims (attribute (identifier_coord) identifier_coord (identifier_dims) identifier_dims )attribute )keyword_argument (keyword_argument (identifier_coords) identifier_coords (attribute (identifier_coord) identifier_coord (identifier_coords) identifier_coords )attribute )keyword_argument )argument_list )call )return_statement )block )except_clause )try_statement )block )function_definition )module
Get grid spacing by subtracting upper and lower bounds.
(module (function_definition (function_name_get_fba_flux) function_name_get_fba_flux (parameters (identifier_self) identifier_self (identifier_objective) identifier_objective )parameters (block (expression_statement (assignment (identifier_flux_result) identifier_flux_result (call (attribute (identifier_self) identifier_self (identifier_solve_fba) identifier_solve_fba )attribute (argument_list (identifier_objective) identifier_objective )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_fba_fluxes) identifier_fba_fluxes (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_key) identifier_key (attribute (attribute (identifier_self) identifier_self (identifier__model) identifier__model )attribute (identifier_reactions) identifier_reactions )attribute (block (expression_statement (assignment (subscript (identifier_fba_fluxes) identifier_fba_fluxes (identifier_key) identifier_key )subscript (call (attribute (identifier_flux_result) identifier_flux_result (identifier_get_value) identifier_get_value )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier__v_wt) identifier__v_wt )attribute (identifier_key) identifier_key )subscript )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_fba_fluxes) identifier_fba_fluxes )return_statement )block )function_definition )module
Return a dictionary of all the fluxes solved by FBA. Dictionary of fluxes is used in :meth:`.lin_moma` and :meth:`.moma` to minimize changes in the flux distributions following model perturbation. Args: objective: The objective reaction that is maximized. Returns: Dictionary of fluxes for each reaction in the model.
(module (function_definition (function_name_current_bed_temp) function_name_current_bed_temp (parameters (identifier_self) identifier_self )parameters (block (try_statement (block (expression_statement (assignment (identifier_bedtemps) identifier_bedtemps (subscript (subscript (subscript (attribute (identifier_self) identifier_self (identifier_intervals) identifier_intervals )attribute (integer_0) integer_0 )subscript (string_'timeseries') string_'timeseries' )subscript (string_'tempBedC') string_'tempBedC' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_num_temps) identifier_num_temps (call (identifier_len) identifier_len (argument_list (identifier_bedtemps) identifier_bedtemps )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_num_temps) identifier_num_temps (integer_0) integer_0 )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_bedtemp) identifier_bedtemp (subscript (subscript (identifier_bedtemps) identifier_bedtemps (binary_operator (identifier_num_temps) identifier_num_temps (integer_1) integer_1 )binary_operator )subscript (integer_1) integer_1 )subscript )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (assignment (identifier_bedtemp) identifier_bedtemp (None) None )assignment )expression_statement )block )except_clause )try_statement (return_statement (identifier_bedtemp) identifier_bedtemp )return_statement )block )function_definition )module
Return current bed temperature for in-progress session.
(module (function_definition (function_name_length) function_name_length (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (attribute (call (attribute (identifier_np) identifier_np (identifier_sqrt) identifier_sqrt )attribute (argument_list (call (attribute (identifier_np) identifier_np (identifier_sum) identifier_sum )attribute (argument_list (binary_operator (identifier_self) identifier_self (integer_2) integer_2 )binary_operator (keyword_argument (identifier_axis) identifier_axis (integer_1) integer_1 )keyword_argument )argument_list )call )argument_list )call (identifier_view) identifier_view )attribute (argument_list (attribute (identifier_np) identifier_np (identifier_ndarray) identifier_ndarray )attribute )argument_list )call )return_statement )block )function_definition )module
Array of vector lengths
(module (function_definition (function_name_defaults) function_name_defaults (parameters (default_parameter (identifier_default) identifier_default (None) None )default_parameter )parameters (block (function_definition (function_name__f) function_name__f (parameters (identifier_func) identifier_func )parameters (block (decorated_definition (decorator (call (attribute (identifier_functools) identifier_functools (identifier_wraps) identifier_wraps )attribute (argument_list (identifier_func) identifier_func )argument_list )call )decorator (function_definition (function_name___f) function_name___f (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 (try_statement (block (return_statement (call (identifier_func) identifier_func (argument_list (identifier_self) identifier_self (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block (except_clause (identifier_Exception) identifier_Exception (block (return_statement (identifier_default) identifier_default )return_statement )block )except_clause )try_statement )block )function_definition )decorated_definition (return_statement (identifier___f) identifier___f )return_statement )block )function_definition (return_statement (identifier__f) identifier__f )return_statement )block )function_definition )module
Catches any exception thrown by the wrapped function and returns `default` instead. Parameters ---------- default : object The default value to return if the wrapped function throws an exception
(module (function_definition (function_name_serialise) function_name_serialise (parameters (identifier_self) identifier_self (typed_parameter (identifier_element) identifier_element (type (identifier_Element) identifier_Element )type )typed_parameter )parameters (type (identifier_str) identifier_str )type (block (return_statement (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_serialise_element) identifier_serialise_element )attribute (argument_list (identifier_element) identifier_element )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Serialises the given element into Compact JSON. >>> CompactJSONSerialiser().serialise(String(content='Hello')) '["string", null, null, "Hello"]'
(module (function_definition (function_name__enforceDataType) function_name__enforceDataType (parameters (identifier_self) identifier_self (identifier_data) identifier_data )parameters (block (expression_statement (assignment (identifier_idx) identifier_idx (call (identifier_int) identifier_int (argument_list (identifier_data) identifier_data )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_idx) identifier_idx (integer_0) integer_0 )comparison_operator (block (expression_statement (augmented_assignment (identifier_idx) identifier_idx (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier__displayValues) identifier__displayValues )attribute )argument_list )call )augmented_assignment )expression_statement )block )if_statement (assert_statement (comparison_operator (integer_0) integer_0 (identifier_idx) identifier_idx (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier__displayValues) identifier__displayValues )attribute )argument_list )call )comparison_operator (call (attribute (string_"Index should be >= 0 and < {}. Got {}") string_"Index should be >= 0 and < {}. Got {}" (identifier_format) identifier_format )attribute (argument_list (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier__displayValues) identifier__displayValues )attribute )argument_list )call (identifier_idx) identifier_idx )argument_list )call )assert_statement (return_statement (identifier_idx) identifier_idx )return_statement )block )function_definition )module
Converts to int so that this CTI always stores that type. The data be set to a negative value, e.g. use -1 to select the last item by default. However, it will be converted to a positive by this method.
(module (function_definition (function_name_send) function_name_send (parameters (identifier_self) identifier_self (identifier_text) identifier_text )parameters (block (if_statement (identifier_text) identifier_text (block (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_send_buffer) identifier_send_buffer )attribute (call (attribute (identifier_text) identifier_text (identifier_replace) identifier_replace )attribute (argument_list (string_'\n') string_'\n' (string_'\r\n') string_'\r\n' )argument_list )call )augmented_assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_send_pending) identifier_send_pending )attribute (True) True )assignment )expression_statement )block )if_statement )block )function_definition )module
Send raw text to the distant end.
(module (function_definition (function_name_replace) function_name_replace (parameters (identifier_self) identifier_self (identifier_key) identifier_key (identifier_value) identifier_value (default_parameter (identifier_expire) identifier_expire (integer_0) integer_0 )default_parameter (default_parameter (identifier_noreply) identifier_noreply (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_noreply) identifier_noreply (None) None )comparison_operator (block (expression_statement (assignment (identifier_noreply) identifier_noreply (attribute (identifier_self) identifier_self (identifier_default_noreply) identifier_default_noreply )attribute )assignment )expression_statement )block )if_statement (return_statement (subscript (call (attribute (identifier_self) identifier_self (identifier__store_cmd) identifier__store_cmd )attribute (argument_list (string_b'replace') string_b'replace' (dictionary (pair (identifier_key) identifier_key (identifier_value) identifier_value )pair )dictionary (identifier_expire) identifier_expire (identifier_noreply) identifier_noreply )argument_list )call (identifier_key) identifier_key )subscript )return_statement )block )function_definition )module
The memcached "replace" command. Args: key: str, see class docs for details. value: str, see class docs for details. expire: optional int, number of seconds until the item is expired from the cache, or zero for no expiry (the default). noreply: optional bool, True to not wait for the reply (defaults to self.default_noreply). Returns: If noreply is True, always returns True. Otherwise returns True if the value was stored and False if it wasn't (because the key didn't already exist).
(module (function_definition (function_name_prep_directory) function_name_prep_directory (parameters (identifier_self) identifier_self (identifier_target_dir) identifier_target_dir )parameters (block (expression_statement (assignment (identifier_dirname) identifier_dirname (call (attribute (identifier_path) identifier_path (identifier_dirname) identifier_dirname )attribute (argument_list (identifier_target_dir) identifier_target_dir )argument_list )call )assignment )expression_statement (if_statement (identifier_dirname) identifier_dirname (block (expression_statement (assignment (identifier_dirname) identifier_dirname (call (attribute (identifier_path) identifier_path (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_settings) identifier_settings (identifier_BUILD_DIR) identifier_BUILD_DIR )attribute (identifier_dirname) identifier_dirname )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (attribute (identifier_self) identifier_self (identifier_fs) identifier_fs )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_dirname) identifier_dirname )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_"Creating directory at {}{}") string_"Creating directory at {}{}" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_fs_name) identifier_fs_name )attribute (identifier_dirname) identifier_dirname )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_fs) identifier_fs )attribute (identifier_makedirs) identifier_makedirs )attribute (argument_list (identifier_dirname) identifier_dirname )argument_list )call )expression_statement )block )if_statement )block )if_statement )block )function_definition )module
Prepares a new directory to store the file at the provided path, if needed.
(module (function_definition (function_name_build) function_name_build (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_markdown_html) identifier_markdown_html (call (attribute (identifier_markdown) identifier_markdown (identifier_markdown) identifier_markdown )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_markdown_text) identifier_markdown_text )attribute (keyword_argument (identifier_extensions) identifier_extensions (list (call (identifier_TocExtension) identifier_TocExtension (argument_list )argument_list )call (string_'fenced_code') string_'fenced_code' (string_'markdown_checklist.extension') string_'markdown_checklist.extension' (string_'markdown.extensions.tables') string_'markdown.extensions.tables' )list )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_markdown_soup) identifier_markdown_soup (call (identifier_BeautifulSoup) identifier_BeautifulSoup (argument_list (identifier_markdown_html) identifier_markdown_html (string_'html.parser') string_'html.parser' )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_markdown_soup) identifier_markdown_soup (identifier_find) identifier_find )attribute (argument_list (string_'code') string_'code' (keyword_argument (identifier_attrs) identifier_attrs (dictionary (pair (string_'class') string_'class' (string_'mermaid') string_'mermaid' )pair )dictionary )keyword_argument )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__add_mermaid_js) identifier__add_mermaid_js )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (for_statement (identifier_dot_tag) identifier_dot_tag (call (attribute (identifier_markdown_soup) identifier_markdown_soup (identifier_find_all) identifier_find_all )attribute (argument_list (string_'code') string_'code' (keyword_argument (identifier_attrs) identifier_attrs (dictionary (pair (string_'class') string_'class' (string_'dotgraph') string_'dotgraph' )pair )dictionary )keyword_argument )argument_list )call (block (expression_statement (assignment (identifier_grap_svg) identifier_grap_svg (call (attribute (identifier_self) identifier_self (identifier__text_to_graphiz) identifier__text_to_graphiz )attribute (argument_list (attribute (identifier_dot_tag) identifier_dot_tag (identifier_string) identifier_string )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_graph_soup) identifier_graph_soup (call (identifier_BeautifulSoup) identifier_BeautifulSoup (argument_list (identifier_grap_svg) identifier_grap_svg (string_'html.parser') string_'html.parser' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_dot_tag) identifier_dot_tag (identifier_parent) identifier_parent )attribute (identifier_replaceWith) identifier_replaceWith )attribute (argument_list (identifier_graph_soup) identifier_graph_soup )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_main_soup) identifier_main_soup )attribute (identifier_body) identifier_body )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_markdown_soup) identifier_markdown_soup )argument_list )call )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_main_soup) identifier_main_soup )attribute (identifier_prettify) identifier_prettify )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
convert Markdown text as html. return the html file as string
(module (function_definition (function_name_package_locations) function_name_package_locations (parameters (identifier_self) identifier_self (identifier_package_keyname) identifier_package_keyname )parameters (block (expression_statement (assignment (identifier_mask) identifier_mask (string_"mask[description, keyname, locations]") string_"mask[description, keyname, locations]" )assignment )expression_statement (expression_statement (assignment (identifier_package) identifier_package (call (attribute (identifier_self) identifier_self (identifier_get_package_by_key) identifier_get_package_by_key )attribute (argument_list (identifier_package_keyname) identifier_package_keyname (keyword_argument (identifier_mask) identifier_mask (string_'id') string_'id' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_regions) identifier_regions (call (attribute (attribute (identifier_self) identifier_self (identifier_package_svc) identifier_package_svc )attribute (identifier_getRegions) identifier_getRegions )attribute (argument_list (keyword_argument (identifier_id) identifier_id (subscript (identifier_package) identifier_package (string_'id') string_'id' )subscript )keyword_argument (keyword_argument (identifier_mask) identifier_mask (identifier_mask) identifier_mask )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_regions) identifier_regions )return_statement )block )function_definition )module
List datacenter locations for a package keyname :param str package_keyname: The package for which to get the items. :returns: List of locations a package is orderable in
(module (function_definition (function_name_search_form) function_name_search_form (parameters (identifier_context) identifier_context (default_parameter (identifier_search_model_names) identifier_search_model_names (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_template_vars) identifier_template_vars (dictionary (pair (string_"request") string_"request" (subscript (identifier_context) identifier_context (string_"request") string_"request" )subscript )pair )dictionary )assignment )expression_statement (if_statement (boolean_operator (not_operator (identifier_search_model_names) identifier_search_model_names )not_operator (not_operator (attribute (identifier_settings) identifier_settings (identifier_SEARCH_MODEL_CHOICES) identifier_SEARCH_MODEL_CHOICES )attribute )not_operator )boolean_operator (block (expression_statement (assignment (identifier_search_model_names) identifier_search_model_names (list )list )assignment )expression_statement )block (elif_clause (comparison_operator (identifier_search_model_names) identifier_search_model_names (string_"all") string_"all" )comparison_operator (block (expression_statement (assignment (identifier_search_model_names) identifier_search_model_names (call (identifier_list) identifier_list (argument_list (attribute (identifier_settings) identifier_settings (identifier_SEARCH_MODEL_CHOICES) identifier_SEARCH_MODEL_CHOICES )attribute )argument_list )call )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_search_model_names) identifier_search_model_names (call (attribute (identifier_search_model_names) identifier_search_model_names (identifier_split) identifier_split )attribute (argument_list (string_" ") string_" " )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_search_model_choices) identifier_search_model_choices (list )list )assignment )expression_statement (for_statement (identifier_model_name) identifier_model_name (identifier_search_model_names) identifier_search_model_names (block (try_statement (block (expression_statement (assignment (identifier_model) identifier_model (call (attribute (identifier_apps) identifier_apps (identifier_get_model) identifier_get_model )attribute (argument_list (list_splat (call (attribute (identifier_model_name) identifier_model_name (identifier_split) identifier_split )attribute (argument_list (string_".") string_"." (integer_1) integer_1 )argument_list )call )list_splat )argument_list )call )assignment )expression_statement )block (except_clause (identifier_LookupError) identifier_LookupError (block (pass_statement )pass_statement )block )except_clause (else_clause (block (expression_statement (assignment (identifier_verbose_name) identifier_verbose_name (call (attribute (attribute (attribute (identifier_model) identifier_model (identifier__meta) identifier__meta )attribute (identifier_verbose_name_plural) identifier_verbose_name_plural )attribute (identifier_capitalize) identifier_capitalize )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_search_model_choices) identifier_search_model_choices (identifier_append) identifier_append )attribute (argument_list (tuple (identifier_verbose_name) identifier_verbose_name (identifier_model_name) identifier_model_name )tuple )argument_list )call )expression_statement )block )else_clause )try_statement )block )for_statement (expression_statement (assignment (subscript (identifier_template_vars) identifier_template_vars (string_"search_model_choices") string_"search_model_choices" )subscript (call (identifier_sorted) identifier_sorted (argument_list (identifier_search_model_choices) identifier_search_model_choices )argument_list )call )assignment )expression_statement (return_statement (identifier_template_vars) identifier_template_vars )return_statement )block )function_definition )module
Includes the search form with a list of models to use as choices for filtering the search by. Models should be a string with models in the format ``app_label.model_name`` separated by spaces. The string ``all`` can also be used, in which case the models defined by the ``SEARCH_MODEL_CHOICES`` setting will be used.
(module (function_definition (function_name_merge_elisions) function_name_merge_elisions (parameters (typed_parameter (identifier_elided) identifier_elided (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_str) identifier_str )type )type_parameter )generic_type )type )typed_parameter )parameters (type (identifier_str) identifier_str )type (block (expression_statement (assignment (identifier_results) identifier_results (call (identifier_list) identifier_list (argument_list (subscript (identifier_elided) identifier_elided (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (for_statement (identifier_line) identifier_line (identifier_elided) identifier_elided (block (for_statement (pattern_list (identifier_idx) identifier_idx (identifier_car) identifier_car )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_line) identifier_line )argument_list )call (block (if_statement (comparison_operator (identifier_car) identifier_car (string_" ") string_" " )comparison_operator (block (expression_statement (assignment (subscript (identifier_results) identifier_results (identifier_idx) identifier_idx )subscript (string_" ") string_" " )assignment )expression_statement )block )if_statement )block )for_statement )block )for_statement (return_statement (call (attribute (string_"") string_"" (identifier_join) identifier_join )attribute (argument_list (identifier_results) identifier_results )argument_list )call )return_statement )block )function_definition )module
Given a list of strings with different space swapping elisions applied, merge the elisions, taking the most without compounding the omissions. :param elided: :return: >>> merge_elisions([ ... "ignavae agua multum hiatus", "ignav agua multum hiatus" ,"ignavae agua mult hiatus"]) 'ignav agua mult hiatus'
(module (function_definition (function_name_save) function_name_save (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_old_tags) identifier_old_tags (call (identifier_list) identifier_list (argument_list (subscript (attribute (identifier_self) identifier_self (identifier__orig_data) identifier__orig_data )attribute (string_'tags') string_'tags' )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_new_tags) identifier_new_tags (call (identifier_list) identifier_list (argument_list (attribute (identifier_self) identifier_self (identifier_tags) identifier_tags )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__changed_data) identifier__changed_data )attribute (identifier_pop) identifier_pop )attribute (argument_list (string_'tags') string_'tags' (None) None )argument_list )call )expression_statement (expression_statement (await (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_BlockDevice) identifier_BlockDevice (identifier_self) identifier_self )argument_list )call (identifier_save) identifier_save )attribute (argument_list )argument_list )call )await )expression_statement (for_statement (identifier_tag_name) identifier_tag_name (identifier_new_tags) identifier_new_tags (block (if_statement (comparison_operator (identifier_tag_name) identifier_tag_name (identifier_old_tags) identifier_old_tags )comparison_operator (block (expression_statement (await (call (attribute (attribute (identifier_self) identifier_self (identifier__handler) identifier__handler )attribute (identifier_add_tag) identifier_add_tag )attribute (argument_list (keyword_argument (identifier_system_id) identifier_system_id (attribute (attribute (identifier_self) identifier_self (identifier_node) identifier_node )attribute (identifier_system_id) identifier_system_id )attribute )keyword_argument (keyword_argument (identifier_id) identifier_id (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute )keyword_argument (keyword_argument (identifier_tag) identifier_tag (identifier_tag_name) identifier_tag_name )keyword_argument )argument_list )call )await )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_old_tags) identifier_old_tags (identifier_remove) identifier_remove )attribute (argument_list (identifier_tag_name) identifier_tag_name )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (for_statement (identifier_tag_name) identifier_tag_name (identifier_old_tags) identifier_old_tags (block (expression_statement (await (call (attribute (attribute (identifier_self) identifier_self (identifier__handler) identifier__handler )attribute (identifier_remove_tag) identifier_remove_tag )attribute (argument_list (keyword_argument (identifier_system_id) identifier_system_id (attribute (attribute (identifier_self) identifier_self (identifier_node) identifier_node )attribute (identifier_system_id) identifier_system_id )attribute )keyword_argument (keyword_argument (identifier_id) identifier_id (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute )keyword_argument (keyword_argument (identifier_tag) identifier_tag (identifier_tag_name) identifier_tag_name )keyword_argument )argument_list )call )await )expression_statement )block )for_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__orig_data) identifier__orig_data )attribute (string_'tags') string_'tags' )subscript (identifier_new_tags) identifier_new_tags )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__data) identifier__data )attribute (string_'tags') string_'tags' )subscript (call (identifier_list) identifier_list (argument_list (identifier_new_tags) identifier_new_tags )argument_list )call )assignment )expression_statement )block )function_definition )module
Save this block device.
(module (function_definition (function_name_nice_size) function_name_nice_size (parameters (identifier_size) identifier_size )parameters (block (expression_statement (assignment (identifier_unit) identifier_unit (string_'B') string_'B' )assignment )expression_statement (if_statement (comparison_operator (identifier_size) identifier_size (integer_1024) integer_1024 )comparison_operator (block (expression_statement (augmented_assignment (identifier_size) identifier_size (float_1024.0) float_1024.0 )augmented_assignment )expression_statement (expression_statement (assignment (identifier_unit) identifier_unit (string_'KB') string_'KB' )assignment )expression_statement (if_statement (comparison_operator (identifier_size) identifier_size (integer_1024) integer_1024 )comparison_operator (block (expression_statement (augmented_assignment (identifier_size) identifier_size (float_1024.0) float_1024.0 )augmented_assignment )expression_statement (expression_statement (assignment (identifier_unit) identifier_unit (string_'MB') string_'MB' )assignment )expression_statement (if_statement (comparison_operator (identifier_size) identifier_size (integer_1024) integer_1024 )comparison_operator (block (expression_statement (augmented_assignment (identifier_size) identifier_size (float_1024.0) float_1024.0 )augmented_assignment )expression_statement (expression_statement (assignment (identifier_unit) identifier_unit (string_'GB') string_'GB' )assignment )expression_statement )block )if_statement )block )if_statement )block )if_statement (return_statement (binary_operator (string_'%s %s') string_'%s %s' (tuple (call (identifier_nice_number) identifier_nice_number (argument_list (identifier_size) identifier_size (keyword_argument (identifier_max_ndigits_after_dot) identifier_max_ndigits_after_dot (integer_2) integer_2 )keyword_argument )argument_list )call (identifier_unit) identifier_unit )tuple )binary_operator )return_statement )block )function_definition )module
Nice size. :param size: the size. :type size: int :return: a nicely printed size. :rtype: string
(module (function_definition (function_name_vinet_p) function_name_vinet_p (parameters (identifier_v) identifier_v (identifier_v0) identifier_v0 (identifier_k0) identifier_k0 (identifier_k0p) identifier_k0p )parameters (block (return_statement (call (identifier_cal_p_vinet) identifier_cal_p_vinet (argument_list (identifier_v) identifier_v (list (identifier_v0) identifier_v0 (identifier_k0) identifier_k0 (identifier_k0p) identifier_k0p )list (keyword_argument (identifier_uncertainties) identifier_uncertainties (call (identifier_isuncertainties) identifier_isuncertainties (argument_list (list (identifier_v) identifier_v (identifier_v0) identifier_v0 (identifier_k0) identifier_k0 (identifier_k0p) identifier_k0p )list )argument_list )call )keyword_argument )argument_list )call )return_statement )block )function_definition )module
calculate pressure from vinet equation :param v: unit-cell volume in A^3 :param v0: unit-cell volume in A^3 at 1 bar :param k0: bulk modulus at reference conditions :param k0p: pressure derivative of bulk modulus at reference conditions :return: pressure in GPa
(module (function_definition (function_name_copy) function_name_copy (parameters (identifier_self) identifier_self (identifier_old_name) identifier_old_name (identifier_new_name) identifier_new_name (default_parameter (identifier_index) identifier_index (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_index) identifier_index (None) None )comparison_operator (block (expression_statement (assignment (identifier_index) identifier_index (call (identifier_len) identifier_len (argument_list (identifier_self) identifier_self )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__copy) identifier__copy )attribute (argument_list (identifier_old_name) identifier_old_name (identifier_new_name) identifier_new_name (identifier_index) identifier_index )argument_list )call )expression_statement (return_statement (subscript (identifier_self) identifier_self (identifier_new_name) identifier_new_name )subscript )return_statement )block )function_definition )module
Copies an old sheet with the old_name to a new sheet with new_name. If an optional index argument is not provided then the created sheet is appended at the end. Returns the new sheet.
(module (function_definition (function_name_get_build_scanner_path) function_name_get_build_scanner_path (parameters (identifier_self) identifier_self (identifier_scanner) identifier_scanner )parameters (block (expression_statement (assignment (identifier_env) identifier_env (call (attribute (identifier_self) identifier_self (identifier_get_build_env) identifier_get_build_env )attribute (argument_list )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_cwd) identifier_cwd (attribute (subscript (attribute (subscript (attribute (identifier_self) identifier_self (identifier_batches) identifier_batches )attribute (integer_0) integer_0 )subscript (identifier_targets) identifier_targets )attribute (integer_0) integer_0 )subscript (identifier_cwd) identifier_cwd )attribute )assignment )expression_statement )block (except_clause (tuple (identifier_IndexError) identifier_IndexError (identifier_AttributeError) identifier_AttributeError )tuple (block (expression_statement (assignment (identifier_cwd) identifier_cwd (None) None )assignment )expression_statement )block )except_clause )try_statement (return_statement (call (attribute (identifier_scanner) identifier_scanner (identifier_path) identifier_path )attribute (argument_list (identifier_env) identifier_env (identifier_cwd) identifier_cwd (call (attribute (identifier_self) identifier_self (identifier_get_all_targets) identifier_get_all_targets )attribute (argument_list )argument_list )call (call (attribute (identifier_self) identifier_self (identifier_get_all_sources) identifier_get_all_sources )attribute (argument_list )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Fetch the scanner path for this executor's targets and sources.
(module (function_definition (function_name_get_variable_grammar) function_name_get_variable_grammar (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_word_expr) identifier_word_expr (call (identifier_Word) identifier_Word (argument_list (binary_operator (binary_operator (identifier_alphanums) identifier_alphanums (string_'_') string_'_' )binary_operator (string_'-') string_'-' )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_word_expr2) identifier_word_expr2 (call (identifier_Word) identifier_Word (argument_list (keyword_argument (identifier_initChars) identifier_initChars (identifier_printables) identifier_printables )keyword_argument (keyword_argument (identifier_excludeChars) identifier_excludeChars (list (string_'{') string_'{' (string_'}') string_'}' (string_',') string_',' (string_' ') string_' ' )list )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_name_expr) identifier_name_expr (binary_operator (binary_operator (call (identifier_Suppress) identifier_Suppress (argument_list (string_'variable') string_'variable' )argument_list )call (identifier_word_expr) identifier_word_expr )binary_operator (call (identifier_Suppress) identifier_Suppress (argument_list (string_'{') string_'{' )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_state_expr) identifier_state_expr (call (identifier_ZeroOrMore) identifier_ZeroOrMore (argument_list (binary_operator (identifier_word_expr2) identifier_word_expr2 (call (identifier_Optional) identifier_Optional (argument_list (call (identifier_Suppress) identifier_Suppress (argument_list (string_",") string_"," )argument_list )call )argument_list )call )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_variable_state_expr) identifier_variable_state_expr (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (call (identifier_Suppress) identifier_Suppress (argument_list (string_'type') string_'type' )argument_list )call (call (identifier_Suppress) identifier_Suppress (argument_list (identifier_word_expr) identifier_word_expr )argument_list )call )binary_operator (call (identifier_Suppress) identifier_Suppress (argument_list (string_'[') string_'[' )argument_list )call )binary_operator (call (identifier_Suppress) identifier_Suppress (argument_list (call (identifier_Word) identifier_Word (argument_list (identifier_nums) identifier_nums )argument_list )call )argument_list )call )binary_operator (line_continuation_\) line_continuation_\ (call (identifier_Suppress) identifier_Suppress (argument_list (string_']') string_']' )argument_list )call )binary_operator (call (identifier_Suppress) identifier_Suppress (argument_list (string_'{') string_'{' )argument_list )call )binary_operator (call (identifier_Group) identifier_Group (argument_list (identifier_state_expr) identifier_state_expr )argument_list )call )binary_operator (call (identifier_Suppress) identifier_Suppress (argument_list (string_'}') string_'}' )argument_list )call )binary_operator (call (identifier_Suppress) identifier_Suppress (argument_list (string_';') string_';' )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_property_expr) identifier_property_expr (binary_operator (binary_operator (call (identifier_Suppress) identifier_Suppress (argument_list (string_'property') string_'property' )argument_list )call (call (identifier_CharsNotIn) identifier_CharsNotIn (argument_list (string_';') string_';' )argument_list )call )binary_operator (call (identifier_Suppress) identifier_Suppress (argument_list (string_';') string_';' )argument_list )call )binary_operator )assignment )expression_statement (return_statement (expression_list (identifier_name_expr) identifier_name_expr (identifier_variable_state_expr) identifier_variable_state_expr (identifier_property_expr) identifier_property_expr )expression_list )return_statement )block )function_definition )module
A method that returns variable grammar
(module (function_definition (function_name_process_sparser_output) function_name_process_sparser_output (parameters (identifier_output_fname) identifier_output_fname (default_parameter (identifier_output_fmt) identifier_output_fmt (string_'json') string_'json' )default_parameter )parameters (block (if_statement (comparison_operator (identifier_output_fmt) identifier_output_fmt (list (string_'json') string_'json' (string_'xml') string_'xml' )list )comparison_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (binary_operator (string_"Unrecognized output format '%s'.") string_"Unrecognized output format '%s'." (identifier_output_fmt) identifier_output_fmt )binary_operator )argument_list )call )expression_statement (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_sp) identifier_sp (None) None )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_output_fname) identifier_output_fname (string_'rt') string_'rt' )argument_list )call (as_pattern_target (identifier_fh) identifier_fh )as_pattern_target )as_pattern )with_item )with_clause (block (if_statement (comparison_operator (identifier_output_fmt) identifier_output_fmt (string_'json') string_'json' )comparison_operator (block (expression_statement (assignment (identifier_json_dict) identifier_json_dict (call (attribute (identifier_json) identifier_json (identifier_load) identifier_load )attribute (argument_list (identifier_fh) identifier_fh )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_sp) identifier_sp (call (identifier_process_json_dict) identifier_process_json_dict (argument_list (identifier_json_dict) identifier_json_dict )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_xml_str) identifier_xml_str (call (attribute (identifier_fh) identifier_fh (identifier_read) identifier_read )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_sp) identifier_sp (call (identifier_process_xml) identifier_process_xml (argument_list (identifier_xml_str) identifier_xml_str )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block )with_statement (return_statement (identifier_sp) identifier_sp )return_statement )block )function_definition )module
Return a processor with Statements extracted from Sparser XML or JSON Parameters ---------- output_fname : str The path to the Sparser output file to be processed. The file can either be JSON or XML output from Sparser, with the output_fmt parameter defining what format is assumed to be processed. output_fmt : Optional[str] The format of the Sparser output to be processed, can either be 'json' or 'xml'. Default: 'json' Returns ------- sp : SparserXMLProcessor or SparserJSONProcessor depending on what output format was chosen.
(module (function_definition (function_name_init_live_reload) function_name_init_live_reload (parameters (identifier_run) identifier_run )parameters (block (import_from_statement (dotted_name (identifier_asyncio) identifier_asyncio )dotted_name (dotted_name (identifier_get_event_loop) identifier_get_event_loop )dotted_name )import_from_statement (import_from_statement (relative_import (import_prefix )import_prefix (dotted_name (identifier__live_reload) identifier__live_reload )dotted_name )relative_import (dotted_name (identifier_start_child) identifier_start_child )dotted_name )import_from_statement (expression_statement (assignment (identifier_loop) identifier_loop (call (identifier_get_event_loop) identifier_get_event_loop (argument_list )argument_list )call )assignment )expression_statement (if_statement (identifier_run) identifier_run (block (expression_statement (call (attribute (identifier_loop) identifier_loop (identifier_run_until_complete) identifier_run_until_complete )attribute (argument_list (call (identifier_start_child) identifier_start_child (argument_list )argument_list )call )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (call (identifier_get_event_loop) identifier_get_event_loop (argument_list )argument_list )call (identifier_create_task) identifier_create_task )attribute (argument_list (call (identifier_start_child) identifier_start_child (argument_list )argument_list )call )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Start the live reload task :param run: run the task inside of this function or just create it
(module (function_definition (function_name_check) function_name_check (parameters (identifier_cls) identifier_cls (identifier_dap) identifier_dap (default_parameter (identifier_network) identifier_network (False) False )default_parameter (default_parameter (identifier_yamls) identifier_yamls (True) True )default_parameter (default_parameter (identifier_raises) identifier_raises (False) False )default_parameter (default_parameter (identifier_logger) identifier_logger (identifier_logger) identifier_logger )default_parameter )parameters (block (expression_statement (assignment (attribute (identifier_dap) identifier_dap (identifier__check_raises) identifier__check_raises )attribute (identifier_raises) identifier_raises )assignment )expression_statement (expression_statement (assignment (attribute (identifier_dap) identifier_dap (identifier__problematic) identifier__problematic )attribute (False) False )assignment )expression_statement (expression_statement (assignment (attribute (identifier_dap) identifier_dap (identifier__logger) identifier__logger )attribute (identifier_logger) identifier_logger )assignment )expression_statement (expression_statement (assignment (identifier_problems) identifier_problems (call (identifier_list) identifier_list (argument_list )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_problems) identifier_problems (call (attribute (identifier_cls) identifier_cls (identifier_check_meta) identifier_check_meta )attribute (argument_list (identifier_dap) identifier_dap )argument_list )call )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_problems) identifier_problems (call (attribute (identifier_cls) identifier_cls (identifier_check_no_self_dependency) identifier_check_no_self_dependency )attribute (argument_list (identifier_dap) identifier_dap )argument_list )call )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_problems) identifier_problems (call (attribute (identifier_cls) identifier_cls (identifier_check_topdir) identifier_check_topdir )attribute (argument_list (identifier_dap) identifier_dap )argument_list )call )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_problems) identifier_problems (call (attribute (identifier_cls) identifier_cls (identifier_check_files) identifier_check_files )attribute (argument_list (identifier_dap) identifier_dap )argument_list )call )augmented_assignment )expression_statement (if_statement (identifier_yamls) identifier_yamls (block (expression_statement (augmented_assignment (identifier_problems) identifier_problems (call (attribute (identifier_cls) identifier_cls (identifier_check_yamls) identifier_check_yamls )attribute (argument_list (identifier_dap) identifier_dap )argument_list )call )augmented_assignment )expression_statement )block )if_statement (if_statement (identifier_network) identifier_network (block (expression_statement (augmented_assignment (identifier_problems) identifier_problems (call (attribute (identifier_cls) identifier_cls (identifier_check_name_not_on_dapi) identifier_check_name_not_on_dapi )attribute (argument_list (identifier_dap) identifier_dap )argument_list )call )augmented_assignment )expression_statement )block )if_statement (for_statement (identifier_problem) identifier_problem (identifier_problems) identifier_problems (block (expression_statement (call (attribute (identifier_dap) identifier_dap (identifier__report_problem) identifier__report_problem )attribute (argument_list (attribute (identifier_problem) identifier_problem (identifier_message) identifier_message )attribute (attribute (identifier_problem) identifier_problem (identifier_level) identifier_level )attribute )argument_list )call )expression_statement )block )for_statement (delete_statement (attribute (identifier_dap) identifier_dap (identifier__check_raises) identifier__check_raises )attribute )delete_statement (return_statement (not_operator (attribute (identifier_dap) identifier_dap (identifier__problematic) identifier__problematic )attribute )not_operator )return_statement )block )function_definition )module
Checks if the dap is valid, reports problems Parameters: network -- whether to run checks that requires network connection output -- where to write() problems, might be None raises -- whether to raise an exception immediately after problem is detected
(module (function_definition (function_name_update_cors_configuration) function_name_update_cors_configuration (parameters (identifier_self) identifier_self (default_parameter (identifier_enable_cors) identifier_enable_cors (True) True )default_parameter (default_parameter (identifier_allow_credentials) identifier_allow_credentials (True) True )default_parameter (default_parameter (identifier_origins) identifier_origins (None) None )default_parameter (default_parameter (identifier_overwrite_origins) identifier_overwrite_origins (False) False )default_parameter )parameters (block (if_statement (comparison_operator (identifier_origins) identifier_origins (None) None )comparison_operator (block (expression_statement (assignment (identifier_origins) identifier_origins (list )list )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_cors_config) identifier_cors_config (dictionary (pair (string_'enable_cors') string_'enable_cors' (identifier_enable_cors) identifier_enable_cors )pair (pair (string_'allow_credentials') string_'allow_credentials' (identifier_allow_credentials) identifier_allow_credentials )pair (pair (string_'origins') string_'origins' (identifier_origins) identifier_origins )pair )dictionary )assignment )expression_statement (if_statement (identifier_overwrite_origins) identifier_overwrite_origins (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__write_cors_configuration) identifier__write_cors_configuration )attribute (argument_list (identifier_cors_config) identifier_cors_config )argument_list )call )return_statement )block )if_statement (expression_statement (assignment (identifier_old_config) identifier_old_config (call (attribute (identifier_self) identifier_self (identifier_cors_configuration) identifier_cors_configuration )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_updated_config) identifier_updated_config (call (attribute (identifier_old_config) identifier_old_config (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_updated_config) identifier_updated_config (string_'enable_cors') string_'enable_cors' )subscript (call (attribute (identifier_cors_config) identifier_cors_config (identifier_get) identifier_get )attribute (argument_list (string_'enable_cors') string_'enable_cors' )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_updated_config) identifier_updated_config (string_'allow_credentials') string_'allow_credentials' )subscript (call (attribute (identifier_cors_config) identifier_cors_config (identifier_get) identifier_get )attribute (argument_list (string_'allow_credentials') string_'allow_credentials' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (attribute (identifier_cors_config) identifier_cors_config (identifier_get) identifier_get )attribute (argument_list (string_'origins') string_'origins' )argument_list )call (list (string_"*") string_"*" )list )comparison_operator (block (expression_statement (assignment (subscript (identifier_updated_config) identifier_updated_config (string_'origins') string_'origins' )subscript (list (string_"*") string_"*" )list )assignment )expression_statement )block (elif_clause (comparison_operator (call (attribute (identifier_old_config) identifier_old_config (identifier_get) identifier_get )attribute (argument_list (string_'origins') string_'origins' )argument_list )call (call (attribute (identifier_cors_config) identifier_cors_config (identifier_get) identifier_get )attribute (argument_list (string_'origins') string_'origins' )argument_list )call )comparison_operator (block (expression_statement (assignment (identifier_new_origins) identifier_new_origins (call (identifier_list) identifier_list (argument_list (call (attribute (call (identifier_set) identifier_set (argument_list (call (attribute (identifier_old_config) identifier_old_config (identifier_get) identifier_get )attribute (argument_list (string_'origins') string_'origins' )argument_list )call )argument_list )call (identifier_union) identifier_union )attribute (argument_list (call (identifier_set) identifier_set (argument_list (call (attribute (identifier_cors_config) identifier_cors_config (identifier_get) identifier_get )attribute (argument_list (string_'origins') string_'origins' )argument_list )call )argument_list )call )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_updated_config) identifier_updated_config (string_'origins') string_'origins' )subscript (identifier_new_origins) identifier_new_origins )assignment )expression_statement )block )elif_clause )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__write_cors_configuration) identifier__write_cors_configuration )attribute (argument_list (identifier_updated_config) identifier_updated_config )argument_list )call )return_statement )block )function_definition )module
Merges existing CORS configuration with updated values. :param bool enable_cors: Enables/disables CORS. Defaults to True. :param bool allow_credentials: Allows authentication credentials. Defaults to True. :param list origins: List of allowed CORS origin(s). Special cases are a list containing a single "*" which will allow any origin and an empty list which will not allow any origin. Defaults to None. :param bool overwrite_origins: Dictates whether the origins list is overwritten of appended to. Defaults to False. :returns: CORS configuration update status in JSON format
(module (function_definition (function_name_get_instance) function_name_get_instance (parameters )parameters (block (expression_statement (assignment (identifier_resources) identifier_resources (list )list )assignment )expression_statement (expression_statement (assignment (identifier_env_resource) identifier_env_resource (call (attribute (identifier_resource) identifier_resource (identifier_get_from_env) identifier_get_from_env )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_env_resource) identifier_env_resource (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_resources) identifier_resources (identifier_append) identifier_append )attribute (argument_list (identifier_env_resource) identifier_env_resource )argument_list )call )expression_statement )block )if_statement (if_statement (call (attribute (identifier_k8s_utils) identifier_k8s_utils (identifier_is_k8s_environment) identifier_is_k8s_environment )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_resources) identifier_resources (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_resource) identifier_resource (identifier_Resource) identifier_Resource )attribute (argument_list (identifier__K8S_CONTAINER) identifier__K8S_CONTAINER (call (attribute (identifier_k8s_utils) identifier_k8s_utils (identifier_get_k8s_metadata) identifier_get_k8s_metadata )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call )expression_statement )block )if_statement (if_statement (call (identifier_is_gce_environment) identifier_is_gce_environment (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_resources) identifier_resources (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_resource) identifier_resource (identifier_Resource) identifier_Resource )attribute (argument_list (identifier__GCE_INSTANCE) identifier__GCE_INSTANCE (call (attribute (call (attribute (identifier_gcp_metadata_config) identifier_gcp_metadata_config (identifier_GcpMetadataConfig) identifier_GcpMetadataConfig )attribute (argument_list )argument_list )call (identifier_get_gce_metadata) identifier_get_gce_metadata )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call )expression_statement )block (elif_clause (call (identifier_is_aws_environment) identifier_is_aws_environment (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_resources) identifier_resources (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_resource) identifier_resource (identifier_Resource) identifier_Resource )attribute (argument_list (identifier__AWS_EC2_INSTANCE) identifier__AWS_EC2_INSTANCE (parenthesized_expression (call (attribute (call (attribute (identifier_aws_identity_doc_utils) identifier_aws_identity_doc_utils (identifier_AwsIdentityDocumentUtils) identifier_AwsIdentityDocumentUtils )attribute (argument_list )argument_list )call (identifier_get_aws_metadata) identifier_get_aws_metadata )attribute (argument_list )argument_list )call )parenthesized_expression )argument_list )call )argument_list )call )expression_statement )block )elif_clause )if_statement (if_statement (not_operator (identifier_resources) identifier_resources )not_operator (block (return_statement (None) None )return_statement )block )if_statement (return_statement (call (attribute (identifier_resource) identifier_resource (identifier_merge_resources) identifier_merge_resources )attribute (argument_list (identifier_resources) identifier_resources )argument_list )call )return_statement )block )function_definition )module
Get a resource based on the application environment. Returns a `Resource` configured for the current environment, or None if the environment is unknown or unsupported. :rtype: :class:`opencensus.common.resource.Resource` or None :return: A `Resource` configured for the current environment.
(module (function_definition (function_name_group_channels) function_name_group_channels (parameters (identifier_self) identifier_self (identifier_group) identifier_group )parameters (block (expression_statement (assignment (identifier_path) identifier_path (call (attribute (identifier_self) identifier_self (identifier__path) identifier__path )attribute (argument_list (identifier_group) identifier_group )argument_list )call )assignment )expression_statement (return_statement (list_comprehension (subscript (attribute (identifier_self) identifier_self (identifier_objects) identifier_objects )attribute (identifier_p) identifier_p )subscript (for_in_clause (identifier_p) identifier_p (attribute (identifier_self) identifier_self (identifier_objects) identifier_objects )attribute )for_in_clause (if_clause (call (attribute (identifier_p) identifier_p (identifier_startswith) identifier_startswith )attribute (argument_list (binary_operator (identifier_path) identifier_path (string_'/') string_'/' )binary_operator )argument_list )call )if_clause )list_comprehension )return_statement )block )function_definition )module
Returns a list of channel objects for the given group :param group: Name of the group to get channels for. :rtype: List of :class:`TdmsObject` objects.
(module (function_definition (function_name_tokenize) function_name_tokenize (parameters (identifier_s) identifier_s )parameters (block (expression_statement (assignment (identifier_s) identifier_s (call (attribute (identifier_re) identifier_re (identifier_sub) identifier_sub )attribute (argument_list (string_r'(?a)(\w+)\'s') string_r'(?a)(\w+)\'s' (string_r'\1') string_r'\1' (identifier_s) identifier_s )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_split_pattern) identifier_split_pattern (call (attribute (string_r'[{} ]+') string_r'[{} ]+' (identifier_format) identifier_format )attribute (argument_list (call (attribute (identifier_re) identifier_re (identifier_escape) identifier_escape )attribute (argument_list (identifier_STOPCHARS) identifier_STOPCHARS )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tokens) identifier_tokens (list_comprehension (identifier_token) identifier_token (for_in_clause (identifier_token) identifier_token (call (attribute (identifier_re) identifier_re (identifier_split) identifier_split )attribute (argument_list (identifier_split_pattern) identifier_split_pattern (identifier_s) identifier_s )argument_list )call )for_in_clause (if_clause (not_operator (comparison_operator (call (identifier_set) identifier_set (argument_list (identifier_token) identifier_token )argument_list )call (call (identifier_set) identifier_set (argument_list (attribute (identifier_string) identifier_string (identifier_punctuation) identifier_punctuation )attribute )argument_list )call )comparison_operator )not_operator )if_clause )list_comprehension )assignment )expression_statement (return_statement (identifier_tokens) identifier_tokens )return_statement )block )function_definition )module
A simple tokneizer
(module (function_definition (function_name_ls) function_name_ls (parameters (typed_parameter (identifier_manager) identifier_manager (type (identifier_Manager) identifier_Manager )type )typed_parameter (typed_parameter (identifier_offset) identifier_offset (type (generic_type (identifier_Optional) identifier_Optional (type_parameter (type (identifier_int) identifier_int )type )type_parameter )generic_type )type )typed_parameter (typed_parameter (identifier_limit) identifier_limit (type (generic_type (identifier_Optional) identifier_Optional (type_parameter (type (identifier_int) identifier_int )type )type_parameter )generic_type )type )typed_parameter )parameters (block (expression_statement (assignment (identifier_q) identifier_q (call (attribute (attribute (identifier_manager) identifier_manager (identifier_session) identifier_session )attribute (identifier_query) identifier_query )attribute (argument_list (identifier_Edge) identifier_Edge )argument_list )call )assignment )expression_statement (if_statement (identifier_offset) identifier_offset (block (expression_statement (assignment (identifier_q) identifier_q (call (attribute (identifier_q) identifier_q (identifier_offset) identifier_offset )attribute (argument_list (identifier_offset) identifier_offset )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_limit) identifier_limit (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_q) identifier_q (call (attribute (identifier_q) identifier_q (identifier_limit) identifier_limit )attribute (argument_list (identifier_limit) identifier_limit )argument_list )call )assignment )expression_statement )block )if_statement (for_statement (identifier_e) identifier_e (identifier_q) identifier_q (block (expression_statement (call (attribute (identifier_click) identifier_click (identifier_echo) identifier_echo )attribute (argument_list (attribute (identifier_e) identifier_e (identifier_bel) identifier_bel )attribute )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
List edges.
(module (function_definition (function_name_register_phone_view) function_name_register_phone_view (parameters (identifier_request) identifier_request )parameters (block (if_statement (comparison_operator (attribute (identifier_request) identifier_request (identifier_method) identifier_method )attribute (string_"POST") string_"POST" )comparison_operator (block (expression_statement (assignment (identifier_form) identifier_form (call (identifier_PhoneRegistrationForm) identifier_PhoneRegistrationForm (argument_list (attribute (identifier_request) identifier_request (identifier_POST) identifier_POST )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (identifier_form) identifier_form )argument_list )call )expression_statement (if_statement (call (attribute (identifier_form) identifier_form (identifier_is_valid) identifier_is_valid )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_obj) identifier_obj (call (attribute (identifier_form) identifier_form (identifier_save) identifier_save )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_obj) identifier_obj (identifier_user) identifier_user )attribute (attribute (identifier_request) identifier_request (identifier_user) identifier_user )attribute )assignment )expression_statement (expression_statement (call (attribute (identifier_obj) identifier_obj (identifier_save) identifier_save )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_messages) identifier_messages (identifier_success) identifier_success )attribute (argument_list (identifier_request) identifier_request (string_"Successfully added phone.") string_"Successfully added phone." )argument_list )call )expression_statement (return_statement (call (identifier_redirect) identifier_redirect (argument_list (string_"itemreg") string_"itemreg" )argument_list )call )return_statement )block (else_clause (block (expression_statement (call (attribute (identifier_messages) identifier_messages (identifier_error) identifier_error )attribute (argument_list (identifier_request) identifier_request (string_"Error adding phone.") string_"Error adding phone." )argument_list )call )expression_statement )block )else_clause )if_statement )block (else_clause (block (expression_statement (assignment (identifier_form) identifier_form (call (identifier_PhoneRegistrationForm) identifier_PhoneRegistrationForm (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (call (identifier_render) identifier_render (argument_list (identifier_request) identifier_request (string_"itemreg/register_form.html") string_"itemreg/register_form.html" (dictionary (pair (string_"form") string_"form" (identifier_form) identifier_form )pair (pair (string_"action") string_"action" (string_"add") string_"add" )pair (pair (string_"type") string_"type" (string_"phone") string_"phone" )pair (pair (string_"form_route") string_"form_route" (string_"itemreg_phone") string_"itemreg_phone" )pair )dictionary )argument_list )call )return_statement )block )function_definition )module
Register a phone.
(module (function_definition (function_name_evaluate) function_name_evaluate (parameters (identifier_self) identifier_self (identifier_dataset) identifier_dataset (default_parameter (identifier_metric) identifier_metric (string_'auto') string_'auto' )default_parameter (default_parameter (identifier_missing_value_action) identifier_missing_value_action (string_'auto') string_'auto' )default_parameter )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (expression_statement (call (identifier__raise_error_evaluation_metric_is_valid) identifier__raise_error_evaluation_metric_is_valid (argument_list (identifier_metric) identifier_metric (list (string_'auto') string_'auto' (string_'rmse') string_'rmse' (string_'max_error') string_'max_error' )list )argument_list )call )expression_statement (return_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_LinearRegression) identifier_LinearRegression (identifier_self) identifier_self )argument_list )call (identifier_evaluate) identifier_evaluate )attribute (argument_list (identifier_dataset) identifier_dataset (keyword_argument (identifier_missing_value_action) identifier_missing_value_action (identifier_missing_value_action) identifier_missing_value_action )keyword_argument (keyword_argument (identifier_metric) identifier_metric (identifier_metric) identifier_metric )keyword_argument )argument_list )call )return_statement )block )function_definition )module
r"""Evaluate the model by making target value predictions and comparing to actual values. Two metrics are used to evaluate linear regression models. The first is root-mean-squared error (RMSE) while the second is the absolute value of the maximum error between the actual and predicted values. Let :math:`y` and :math:`\hat{y}` denote vectors of length :math:`N` (number of examples) with actual and predicted values. The RMSE is defined as: .. math:: RMSE = \sqrt{\frac{1}{N} \sum_{i=1}^N (\widehat{y}_i - y_i)^2} while the max-error is defined as .. math:: max-error = \max_{i=1}^N \|\widehat{y}_i - y_i\| Parameters ---------- dataset : SFrame Dataset of new observations. Must include columns with the same names as the target and features used for model training. Additional columns are ignored. metric : str, optional Name of the evaluation metric. Possible values are: - 'auto': Compute all metrics. - 'rmse': Rooted mean squared error. - 'max_error': Maximum error. missing_value_action : str, optional Action to perform when missing values are encountered. This can be one of: - 'auto': Default to 'impute' - 'impute': Proceed with evaluation by filling in the missing values with the mean of the training data. Missing values are also imputed if an entire column of data is missing during evaluation. - 'error': Do not proceed with evaluation and terminate with an error message. Returns ------- out : dict Results from model evaluation procedure. See Also ---------- create, predict Examples ---------- >>> data = turicreate.SFrame('https://static.turi.com/datasets/regression/houses.csv') >>> model = turicreate.linear_regression.create(data, target='price', features=['bath', 'bedroom', 'size']) >>> results = model.evaluate(data)
(module (function_definition (function_name_remove_custom_field_setting) function_name_remove_custom_field_setting (parameters (identifier_self) identifier_self (identifier_project) identifier_project (default_parameter (identifier_params) identifier_params (dictionary )dictionary )default_parameter (dictionary_splat_pattern (identifier_options) identifier_options )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_path) identifier_path (binary_operator (string_"/projects/%s/removeCustomFieldSetting") string_"/projects/%s/removeCustomFieldSetting" (parenthesized_expression (identifier_project) identifier_project )parenthesized_expression )binary_operator )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_post) identifier_post )attribute (argument_list (identifier_path) identifier_path (identifier_params) identifier_params (dictionary_splat (identifier_options) identifier_options )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Remove a custom field setting on the project. Parameters ---------- project : {Id} The project to associate the custom field with [data] : {Object} Data for the request - [custom_field] : {Id} The id of the custom field to remove from this project.
(module (function_definition (function_name_setup_app) function_name_setup_app (parameters (identifier_command) identifier_command (identifier_conf) identifier_conf (identifier_vars) identifier_vars )parameters (block (if_statement (not_operator (attribute (attribute (identifier_pylons) identifier_pylons (identifier_test) identifier_test )attribute (identifier_pylonsapp) identifier_pylonsapp )attribute )not_operator (block (expression_statement (call (identifier_load_environment) identifier_load_environment (argument_list (attribute (identifier_conf) identifier_conf (identifier_global_conf) identifier_global_conf )attribute (attribute (identifier_conf) identifier_conf (identifier_local_conf) identifier_local_conf )attribute )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Place any commands to setup nipapwww here
(module (function_definition (function_name_get_current_scene_node) function_name_get_current_scene_node (parameters )parameters (block (expression_statement (assignment (identifier_c) identifier_c (call (attribute (identifier_cmds) identifier_cmds (identifier_namespaceInfo) identifier_namespaceInfo )attribute (argument_list (string_':') string_':' (keyword_argument (identifier_listOnlyDependencyNodes) identifier_listOnlyDependencyNodes (True) True )keyword_argument (keyword_argument (identifier_absoluteName) identifier_absoluteName (True) True )keyword_argument (keyword_argument (identifier_dagPath) identifier_dagPath (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_l) identifier_l (call (attribute (identifier_cmds) identifier_cmds (identifier_ls) identifier_ls )attribute (argument_list (identifier_c) identifier_c (keyword_argument (identifier_type) identifier_type (string_'jb_sceneNode') string_'jb_sceneNode' )keyword_argument (keyword_argument (identifier_absoluteName) identifier_absoluteName (True) True )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_l) identifier_l )not_operator (block (return_statement )return_statement )block (else_clause (block (for_statement (identifier_n) identifier_n (call (identifier_sorted) identifier_sorted (argument_list (identifier_l) identifier_l )argument_list )call (block (if_statement (not_operator (call (attribute (identifier_cmds) identifier_cmds (identifier_listConnections) identifier_listConnections )attribute (argument_list (binary_operator (string_"%s.reftrack") string_"%s.reftrack" (identifier_n) identifier_n )binary_operator (keyword_argument (identifier_d) identifier_d (False) False )keyword_argument )argument_list )call )not_operator (block (return_statement (identifier_n) identifier_n )return_statement )block )if_statement )block )for_statement )block )else_clause )if_statement )block )function_definition )module
Return the name of the jb_sceneNode, that describes the current scene or None if there is no scene node. :returns: the full name of the node or none, if there is no scene node :rtype: str | None :raises: None
(module (function_definition (function_name__find_statistics) function_name__find_statistics (parameters (identifier_X) identifier_X (identifier_y) identifier_y (identifier_variogram_function) identifier_variogram_function (identifier_variogram_model_parameters) identifier_variogram_model_parameters (identifier_coordinates_type) identifier_coordinates_type )parameters (block (expression_statement (assignment (identifier_delta) identifier_delta (call (attribute (identifier_np) identifier_np (identifier_zeros) identifier_zeros )attribute (argument_list (attribute (identifier_y) identifier_y (identifier_shape) identifier_shape )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_sigma) identifier_sigma (call (attribute (identifier_np) identifier_np (identifier_zeros) identifier_zeros )attribute (argument_list (attribute (identifier_y) identifier_y (identifier_shape) identifier_shape )attribute )argument_list )call )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (subscript (attribute (identifier_y) identifier_y (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript )argument_list )call (block (if_statement (comparison_operator (identifier_i) identifier_i (integer_0) integer_0 )comparison_operator (block (continue_statement )continue_statement )block (else_clause (block (expression_statement (assignment (pattern_list (identifier_k) identifier_k (identifier_ss) identifier_ss )pattern_list (call (identifier__krige) identifier__krige (argument_list (subscript (identifier_X) identifier_X (slice (colon) colon (identifier_i) identifier_i )slice (slice (colon) colon )slice )subscript (subscript (identifier_y) identifier_y (slice (colon) colon (identifier_i) identifier_i )slice )subscript (subscript (identifier_X) identifier_X (identifier_i) identifier_i (slice (colon) colon )slice )subscript (identifier_variogram_function) identifier_variogram_function (identifier_variogram_model_parameters) identifier_variogram_model_parameters (identifier_coordinates_type) identifier_coordinates_type )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (attribute (identifier_np) identifier_np (identifier_absolute) identifier_absolute )attribute (argument_list (identifier_ss) identifier_ss )argument_list )call (identifier_eps) identifier_eps )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (subscript (identifier_delta) identifier_delta (identifier_i) identifier_i )subscript (binary_operator (subscript (identifier_y) identifier_y (identifier_i) identifier_i )subscript (identifier_k) identifier_k )binary_operator )assignment )expression_statement (expression_statement (assignment (subscript (identifier_sigma) identifier_sigma (identifier_i) identifier_i )subscript (call (attribute (identifier_np) identifier_np (identifier_sqrt) identifier_sqrt )attribute (argument_list (identifier_ss) identifier_ss )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block )for_statement (expression_statement (assignment (identifier_delta) identifier_delta (subscript (identifier_delta) identifier_delta (comparison_operator (identifier_sigma) identifier_sigma (identifier_eps) identifier_eps )comparison_operator )subscript )assignment )expression_statement (expression_statement (assignment (identifier_sigma) identifier_sigma (subscript (identifier_sigma) identifier_sigma (comparison_operator (identifier_sigma) identifier_sigma (identifier_eps) identifier_eps )comparison_operator )subscript )assignment )expression_statement (expression_statement (assignment (identifier_epsilon) identifier_epsilon (binary_operator (identifier_delta) identifier_delta (identifier_sigma) identifier_sigma )binary_operator )assignment )expression_statement (return_statement (expression_list (identifier_delta) identifier_delta (identifier_sigma) identifier_sigma (identifier_epsilon) identifier_epsilon )expression_list )return_statement )block )function_definition )module
Calculates variogram fit statistics. Returns the delta, sigma, and epsilon values for the variogram fit. These arrays are used for statistics calculations. Parameters ---------- X: ndarray float array [n_samples, n_dim], the input array of coordinates y: ndarray float array [n_samples], the input array of measurement values variogram_function: callable function that will be called to evaluate variogram model variogram_model_parameters: list user-specified parameters for variogram model coordinates_type: str type of coordinates in X array, can be 'euclidean' for standard rectangular coordinates or 'geographic' if the coordinates are lat/lon Returns ------- delta: ndarray residuals between observed values and kriged estimates for those values sigma: ndarray mean error in kriging estimates epsilon: ndarray residuals normalized by their mean error
(module (function_definition (function_name_query_decl) function_name_query_decl (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (return_statement (call (attribute (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_session) identifier_session )attribute (identifier_query) identifier_query )attribute (argument_list (identifier_Decl) identifier_Decl )argument_list )call (identifier_filter_by) identifier_filter_by )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call (identifier_all) identifier_all )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Query declarations.
(module (function_definition (function_name_variant) function_name_variant (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_variant) identifier_variant (subscript (attribute (identifier_current_app) identifier_current_app (identifier_config) identifier_config )attribute (string_'THEME_VARIANT') string_'THEME_VARIANT' )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_variant) identifier_variant (attribute (identifier_self) identifier_self (identifier_variants) identifier_variants )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_warning) identifier_warning )attribute (argument_list (string_'Unkown theme variant: %s') string_'Unkown theme variant: %s' (identifier_variant) identifier_variant )argument_list )call )expression_statement (return_statement (string_'default') string_'default' )return_statement )block (else_clause (block (return_statement (identifier_variant) identifier_variant )return_statement )block )else_clause )if_statement )block )function_definition )module
Get the current theme variant
(module (function_definition (function_name__get_value) function_name__get_value (parameters (identifier_obj) identifier_obj (identifier_key) identifier_key )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (tuple (identifier_list) identifier_list (identifier_tuple) identifier_tuple )tuple )argument_list )call (block (for_statement (identifier_item) identifier_item (identifier_obj) identifier_obj (block (expression_statement (assignment (identifier_v) identifier_v (call (identifier__find_value) identifier__find_value (argument_list (identifier_key) identifier_key (identifier_item) identifier_item )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_v) identifier_v (None) None )comparison_operator (block (return_statement (identifier_v) identifier_v )return_statement )block )if_statement )block )for_statement (return_statement (None) None )return_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (identifier_dict) identifier_dict )argument_list )call (block (return_statement (call (attribute (identifier_obj) identifier_obj (identifier_get) identifier_get )attribute (argument_list (identifier_key) identifier_key )argument_list )call )return_statement )block )if_statement (if_statement (comparison_operator (identifier_obj) identifier_obj (None) None )comparison_operator (block (return_statement (call (identifier_getattr) identifier_getattr (argument_list (identifier_obj) identifier_obj (identifier_key) identifier_key (None) None )argument_list )call )return_statement )block )if_statement )block )function_definition )module
Get a value for 'key' from 'obj', if possible
(module (function_definition (function_name__arg) function_name__arg (parameters (identifier___decorated__) identifier___decorated__ (dictionary_splat_pattern (identifier_Config) identifier_Config )dictionary_splat_pattern )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier___decorated__) identifier___decorated__ (identifier_tuple) identifier_tuple )argument_list )call (block (expression_statement (call (attribute (subscript (identifier___decorated__) identifier___decorated__ (integer_1) integer_1 )subscript (identifier_insert) identifier_insert )attribute (argument_list (integer_0) integer_0 (identifier_Config) identifier_Config )argument_list )call )expression_statement (return_statement (identifier___decorated__) identifier___decorated__ )return_statement )block (else_clause (block (return_statement (expression_list (identifier___decorated__) identifier___decorated__ (list (identifier_Config) identifier_Config )list )expression_list )return_statement )block )else_clause )if_statement )block )function_definition )module
r"""The worker for the arg decorator.
(module (function_definition (function_name_ListGrrBinaries) function_name_ListGrrBinaries (parameters (default_parameter (identifier_context) identifier_context (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_items) identifier_items (call (attribute (identifier_context) identifier_context (identifier_SendIteratorRequest) identifier_SendIteratorRequest )attribute (argument_list (string_"ListGrrBinaries") string_"ListGrrBinaries" (None) None )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_utils) identifier_utils (identifier_MapItemsIterator) identifier_MapItemsIterator )attribute (argument_list (lambda (lambda_parameters (identifier_data) identifier_data )lambda_parameters (call (identifier_GrrBinary) identifier_GrrBinary (argument_list (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument (keyword_argument (identifier_context) identifier_context (identifier_context) identifier_context )keyword_argument )argument_list )call )lambda (identifier_items) identifier_items )argument_list )call )return_statement )block )function_definition )module
Lists all registered Grr binaries.
(module (function_definition (function_name__ListTags) function_name__ListTags (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_all_tags) identifier_all_tags (list )list )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__cursor) identifier__cursor )attribute (identifier_execute) identifier_execute )attribute (argument_list (string_'SELECT DISTINCT tag FROM log2timeline') string_'SELECT DISTINCT tag FROM log2timeline' )argument_list )call )expression_statement (expression_statement (assignment (identifier_tag_row) identifier_tag_row (call (attribute (attribute (identifier_self) identifier_self (identifier__cursor) identifier__cursor )attribute (identifier_fetchone) identifier_fetchone )attribute (argument_list )argument_list )call )assignment )expression_statement (while_statement (identifier_tag_row) identifier_tag_row (block (expression_statement (assignment (identifier_tag_string) identifier_tag_string (subscript (identifier_tag_row) identifier_tag_row (integer_0) integer_0 )subscript )assignment )expression_statement (if_statement (identifier_tag_string) identifier_tag_string (block (expression_statement (assignment (identifier_tags) identifier_tags (call (attribute (identifier_tag_string) identifier_tag_string (identifier_split) identifier_split )attribute (argument_list (string_',') string_',' )argument_list )call )assignment )expression_statement (for_statement (identifier_tag) identifier_tag (identifier_tags) identifier_tags (block (if_statement (comparison_operator (identifier_tag) identifier_tag (identifier_all_tags) identifier_all_tags )comparison_operator (block (expression_statement (call (attribute (identifier_all_tags) identifier_all_tags (identifier_append) identifier_append )attribute (argument_list (identifier_tag) identifier_tag )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )if_statement (expression_statement (assignment (identifier_tag_row) identifier_tag_row (call (attribute (attribute (identifier_self) identifier_self (identifier__cursor) identifier__cursor )attribute (identifier_fetchone) identifier_fetchone )attribute (argument_list )argument_list )call )assignment )expression_statement )block )while_statement (return_statement (identifier_all_tags) identifier_all_tags )return_statement )block )function_definition )module
Query database for unique tag types.
(module (function_definition (function_name_hover) function_name_hover (parameters (identifier_self) identifier_self (default_parameter (identifier_target) identifier_target (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_target) identifier_target (None) None )comparison_operator (block (expression_statement (assignment (identifier_target) identifier_target (boolean_operator (attribute (identifier_self) identifier_self (identifier__lastMatch) identifier__lastMatch )attribute (identifier_self) identifier_self )boolean_operator )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_target_location) identifier_target_location (None) None )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_target) identifier_target (identifier_Pattern) identifier_Pattern )argument_list )call (block (expression_statement (assignment (identifier_target_location) identifier_target_location (call (attribute (call (attribute (identifier_self) identifier_self (identifier_find) identifier_find )attribute (argument_list (identifier_target) identifier_target )argument_list )call (identifier_getTarget) identifier_getTarget )attribute (argument_list )argument_list )call )assignment )expression_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_target) identifier_target (identifier_basestring) identifier_basestring )argument_list )call (block (expression_statement (assignment (identifier_target_location) identifier_target_location (call (attribute (call (attribute (identifier_self) identifier_self (identifier_find) identifier_find )attribute (argument_list (identifier_target) identifier_target )argument_list )call (identifier_getTarget) identifier_getTarget )attribute (argument_list )argument_list )call )assignment )expression_statement )block )elif_clause (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_target) identifier_target (identifier_Match) identifier_Match )argument_list )call (block (expression_statement (assignment (identifier_target_location) identifier_target_location (call (attribute (identifier_target) identifier_target (identifier_getTarget) identifier_getTarget )attribute (argument_list )argument_list )call )assignment )expression_statement )block )elif_clause (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_target) identifier_target (identifier_Region) identifier_Region )argument_list )call (block (expression_statement (assignment (identifier_target_location) identifier_target_location (call (attribute (identifier_target) identifier_target (identifier_getCenter) identifier_getCenter )attribute (argument_list )argument_list )call )assignment )expression_statement )block )elif_clause (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_target) identifier_target (identifier_Location) identifier_Location )argument_list )call (block (expression_statement (assignment (identifier_target_location) identifier_target_location (identifier_target) identifier_target )assignment )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"hover expected Pattern, String, Match, Region, or Location object") string_"hover expected Pattern, String, Match, Region, or Location object" )argument_list )call )raise_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_Mouse) identifier_Mouse (identifier_moveSpeed) identifier_moveSpeed )attribute (argument_list (identifier_target_location) identifier_target_location (attribute (identifier_Settings) identifier_Settings (identifier_MoveMouseDelay) identifier_MoveMouseDelay )attribute )argument_list )call )expression_statement )block )function_definition )module
Moves the cursor to the target location
(module (function_definition (function_name_wrap_resource) function_name_wrap_resource (parameters (identifier_self) identifier_self (identifier_pool) identifier_pool (identifier_resource_wrapper) identifier_resource_wrapper )parameters (block (expression_statement (assignment (identifier_resource) identifier_resource (call (identifier_resource_wrapper) identifier_resource_wrapper (argument_list (attribute (identifier_self) identifier_self (identifier_resource) identifier_resource )attribute (identifier_pool) identifier_pool )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__weakref) identifier__weakref )attribute (call (attribute (identifier_weakref) identifier_weakref (identifier_ref) identifier_ref )attribute (argument_list (identifier_resource) identifier_resource )argument_list )call )assignment )expression_statement (return_statement (identifier_resource) identifier_resource )return_statement )block )function_definition )module
Return a resource wrapped in ``resource_wrapper``. :param pool: A pool instance. :type pool: :class:`CuttlePool` :param resource_wrapper: A wrapper class for the resource. :type resource_wrapper: :class:`Resource` :return: A wrapped resource. :rtype: :class:`Resource`
(module (function_definition (function_name_get_nodes) function_name_get_nodes (parameters (identifier_self) identifier_self (default_parameter (identifier_resolve_missing) identifier_resolve_missing (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_result) identifier_result (list )list )assignment )expression_statement (expression_statement (assignment (identifier_resolved) identifier_resolved (False) False )assignment )expression_statement (for_statement (identifier_node_id) identifier_node_id (attribute (identifier_self) identifier_self (identifier__node_ids) identifier__node_ids )attribute (block (try_statement (block (expression_statement (assignment (identifier_node) identifier_node (call (attribute (attribute (identifier_self) identifier_self (identifier__result) identifier__result )attribute (identifier_get_node) identifier_get_node )attribute (argument_list (identifier_node_id) identifier_node_id )argument_list )call )assignment )expression_statement )block (except_clause (attribute (identifier_exception) identifier_exception (identifier_DataIncomplete) identifier_DataIncomplete )attribute (block (expression_statement (assignment (identifier_node) identifier_node (None) None )assignment )expression_statement )block )except_clause )try_statement (if_statement (comparison_operator (identifier_node) identifier_node (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_result) identifier_result (identifier_append) identifier_append )attribute (argument_list (identifier_node) identifier_node )argument_list )call )expression_statement (continue_statement )continue_statement )block )if_statement (if_statement (not_operator (identifier_resolve_missing) identifier_resolve_missing )not_operator (block (raise_statement (call (attribute (identifier_exception) identifier_exception (identifier_DataIncomplete) identifier_DataIncomplete )attribute (argument_list (string_"Resolve missing nodes is disabled") string_"Resolve missing nodes is disabled" )argument_list )call )raise_statement )block )if_statement (if_statement (identifier_resolved) identifier_resolved (block (raise_statement (call (attribute (identifier_exception) identifier_exception (identifier_DataIncomplete) identifier_DataIncomplete )attribute (argument_list (string_"Unable to resolve all nodes") string_"Unable to resolve all nodes" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_query) identifier_query (parenthesized_expression (concatenated_string (string_"\n") string_"\n" (string_"[out:json];\n") string_"[out:json];\n" (string_"way({way_id});\n") string_"way({way_id});\n" (string_"node(w);\n") string_"node(w);\n" (string_"out body;\n") string_"out body;\n" )concatenated_string )parenthesized_expression )assignment )expression_statement (expression_statement (assignment (identifier_query) identifier_query (call (attribute (identifier_query) identifier_query (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_way_id) identifier_way_id (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tmp_result) identifier_tmp_result (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier__result) identifier__result )attribute (identifier_api) identifier_api )attribute (identifier_query) identifier_query )attribute (argument_list (identifier_query) identifier_query )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__result) identifier__result )attribute (identifier_expand) identifier_expand )attribute (argument_list (identifier_tmp_result) identifier_tmp_result )argument_list )call )expression_statement (expression_statement (assignment (identifier_resolved) identifier_resolved (True) True )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_node) identifier_node (call (attribute (attribute (identifier_self) identifier_self (identifier__result) identifier__result )attribute (identifier_get_node) identifier_get_node )attribute (argument_list (identifier_node_id) identifier_node_id )argument_list )call )assignment )expression_statement )block (except_clause (attribute (identifier_exception) identifier_exception (identifier_DataIncomplete) identifier_DataIncomplete )attribute (block (expression_statement (assignment (identifier_node) identifier_node (None) None )assignment )expression_statement )block )except_clause )try_statement (if_statement (comparison_operator (identifier_node) identifier_node (None) None )comparison_operator (block (raise_statement (call (attribute (identifier_exception) identifier_exception (identifier_DataIncomplete) identifier_DataIncomplete )attribute (argument_list (string_"Unable to resolve all nodes") string_"Unable to resolve all nodes" )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_result) identifier_result (identifier_append) identifier_append )attribute (argument_list (identifier_node) identifier_node )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Get the nodes defining the geometry of the way :param resolve_missing: Try to resolve missing nodes. :type resolve_missing: Boolean :return: List of nodes :rtype: List of overpy.Node :raises overpy.exception.DataIncomplete: At least one referenced node is not available in the result cache. :raises overpy.exception.DataIncomplete: If resolve_missing is True and at least one node can't be resolved.
(module (function_definition (function_name_return_single_convert_numpy_base) function_name_return_single_convert_numpy_base (parameters (identifier_dbpath) identifier_dbpath (identifier_folder_path) identifier_folder_path (identifier_set_object) identifier_set_object (identifier_object_id) identifier_object_id (identifier_converter) identifier_converter (default_parameter (identifier_add_args) identifier_add_args (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_engine) identifier_engine (call (identifier_create_engine) identifier_create_engine (argument_list (binary_operator (string_'sqlite:////') string_'sqlite:////' (identifier_dbpath) identifier_dbpath )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_session_cl) identifier_session_cl (call (identifier_sessionmaker) identifier_sessionmaker (argument_list (keyword_argument (identifier_bind) identifier_bind (identifier_engine) identifier_engine )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_session) identifier_session (call (identifier_session_cl) identifier_session_cl (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tmp_object) identifier_tmp_object (call (attribute (call (attribute (identifier_session) identifier_session (identifier_query) identifier_query )attribute (argument_list (identifier_set_object) identifier_set_object )argument_list )call (identifier_get) identifier_get )attribute (argument_list (identifier_object_id) identifier_object_id )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_session) identifier_session (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_add_args) identifier_add_args (None) None )comparison_operator (block (return_statement (call (identifier_converter) identifier_converter (argument_list (call (identifier_join) identifier_join (argument_list (identifier_folder_path) identifier_folder_path (attribute (identifier_tmp_object) identifier_tmp_object (identifier_path) identifier_path )attribute )argument_list )call )argument_list )call )return_statement )block (else_clause (block (return_statement (call (identifier_converter) identifier_converter (argument_list (call (identifier_join) identifier_join (argument_list (identifier_folder_path) identifier_folder_path (attribute (identifier_tmp_object) identifier_tmp_object (identifier_path) identifier_path )attribute )argument_list )call (identifier_add_args) identifier_add_args )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Generic function which converts an object specified by the object_id into a numpy array and returns the array, the conversion is done by the 'converter' function Parameters ---------- dbpath : string, path to SQLite database file folder_path : string, path to folder where the files are stored set_object : object (either TestSet or TrainSet) which is stored in the database object_id : int, id of object in database converter : function, which takes the path of a data point and *args as parameters and returns a numpy array add_args : optional arguments for the converter (list/dictionary/tuple/whatever). if None, the converter should take only one input argument - the file path. default value: None Returns ------- result : ndarray
(module (function_definition (function_name_serializable_value) function_name_serializable_value (parameters (identifier_self) identifier_self (identifier_obj) identifier_obj )parameters (block (expression_statement (assignment (identifier_value) identifier_value (call (attribute (identifier_self) identifier_self (identifier___get__) identifier___get__ )attribute (argument_list (identifier_obj) identifier_obj (attribute (identifier_obj) identifier_obj (identifier___class__) identifier___class__ )attribute )argument_list )call )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_property) identifier_property )attribute (identifier_serialize_value) identifier_serialize_value )attribute (argument_list (identifier_value) identifier_value )argument_list )call )return_statement )block )function_definition )module
Produce the value as it should be serialized. Sometimes it is desirable for the serialized value to differ from the ``__get__`` in order for the ``__get__`` value to appear simpler for user or developer convenience. Args: obj (HasProps) : the object to get the serialized attribute for Returns: JSON-like
(module (function_definition (function_name_create_option_from_value) function_name_create_option_from_value (parameters (identifier_tag) identifier_tag (identifier_value) identifier_value )parameters (block (expression_statement (call (attribute (identifier_dhcp_option) identifier_dhcp_option (identifier_parser) identifier_parser )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_fake_opt) identifier_fake_opt (call (identifier_dhcp_option) identifier_dhcp_option (argument_list (keyword_argument (identifier_tag) identifier_tag (identifier_tag) identifier_tag )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (identifier_c) identifier_c (attribute (identifier_dhcp_option) identifier_dhcp_option (identifier_subclasses) identifier_subclasses )attribute (block (if_statement (call (attribute (identifier_c) identifier_c (identifier_criteria) identifier_criteria )attribute (argument_list (identifier_fake_opt) identifier_fake_opt )argument_list )call (block (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_c) identifier_c (string_'_parse_from_value') string_'_parse_from_value' )argument_list )call (block (return_statement (call (identifier_c) identifier_c (argument_list (keyword_argument (identifier_tag) identifier_tag (identifier_tag) identifier_tag )keyword_argument (keyword_argument (identifier_value) identifier_value (call (attribute (identifier_c) identifier_c (identifier__parse_from_value) identifier__parse_from_value )attribute (argument_list (identifier_value) identifier_value )argument_list )call )keyword_argument )argument_list )call )return_statement )block (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (binary_operator (binary_operator (string_'Invalid DHCP option ') string_'Invalid DHCP option ' (call (identifier_str) identifier_str (argument_list (identifier_tag) identifier_tag )argument_list )call )binary_operator (string_": ") string_": " )binary_operator (call (identifier_repr) identifier_repr (argument_list (identifier_value) identifier_value )argument_list )call )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement )block )if_statement )block (else_clause (block (expression_statement (call (attribute (identifier_fake_opt) identifier_fake_opt (identifier__setextra) identifier__setextra )attribute (argument_list (call (identifier__tobytes) identifier__tobytes (argument_list (identifier_value) identifier_value )argument_list )call )argument_list )call )expression_statement (return_statement (identifier_fake_opt) identifier_fake_opt )return_statement )block )else_clause )for_statement )block )function_definition )module
Set DHCP option with human friendly value
(module (function_definition (function_name_inspect_task) function_name_inspect_task (parameters (identifier_self) identifier_self (identifier_task) identifier_task )parameters (block (expression_statement (assignment (identifier_url) identifier_url (call (attribute (identifier_self) identifier_self (identifier__url) identifier__url )attribute (argument_list (string_'/tasks/{0}') string_'/tasks/{0}' (identifier_task) identifier_task )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__result) identifier__result )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier__get) identifier__get )attribute (argument_list (identifier_url) identifier_url )argument_list )call (True) True )argument_list )call )return_statement )block )function_definition )module
Retrieve information about a task. Args: task (str): Task ID Returns: (dict): Information about the task. Raises: :py:class:`docker.errors.APIError` If the server returns an error.
(module (function_definition (function_name__remove_pre_formatting) function_name__remove_pre_formatting (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_preformatted_wrappers) identifier_preformatted_wrappers (list (string_'pre') string_'pre' (string_'code') string_'code' )list )assignment )expression_statement (for_statement (identifier_wrapper) identifier_wrapper (identifier_preformatted_wrappers) identifier_preformatted_wrappers (block (for_statement (identifier_formatter) identifier_formatter (identifier_FORMATTERS) identifier_FORMATTERS (block (expression_statement (assignment (identifier_tag) identifier_tag (subscript (identifier_FORMATTERS) identifier_FORMATTERS (identifier_formatter) identifier_formatter )subscript )assignment )expression_statement (expression_statement (assignment (identifier_character) identifier_character (identifier_formatter) identifier_formatter )assignment )expression_statement (expression_statement (assignment (identifier_regex) identifier_regex (call (attribute (string_r'(<{w}>.*)<{t}>(.*)</{t}>(.*</{w}>)') string_r'(<{w}>.*)<{t}>(.*)</{t}>(.*</{w}>)' (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_t) identifier_t (identifier_tag) identifier_tag )keyword_argument (keyword_argument (identifier_w) identifier_w (identifier_wrapper) identifier_wrapper )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_repl) identifier_repl (call (attribute (string_r'\g<1>{c}\g<2>{c}\g<3>') string_r'\g<1>{c}\g<2>{c}\g<3>' (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_c) identifier_c (identifier_character) identifier_character )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_cleaned_html) identifier_cleaned_html )attribute (call (attribute (identifier_re) identifier_re (identifier_sub) identifier_sub )attribute (argument_list (identifier_regex) identifier_regex (identifier_repl) identifier_repl (attribute (identifier_self) identifier_self (identifier_cleaned_html) identifier_cleaned_html )attribute )argument_list )call )assignment )expression_statement )block )for_statement )block )for_statement )block )function_definition )module
Removes formatting tags added to pre elements.
(module (function_definition (function_name_get_filename) function_name_get_filename (parameters (identifier_request) identifier_request (identifier_date) identifier_date (identifier_size_x) identifier_size_x (identifier_size_y) identifier_size_y )parameters (block (expression_statement (assignment (identifier_filename) identifier_filename (call (attribute (string_'_') string_'_' (identifier_join) identifier_join )attribute (argument_list (list (call (identifier_str) identifier_str (argument_list (attribute (attribute (identifier_request) identifier_request (identifier_service_type) identifier_service_type )attribute (identifier_value) identifier_value )attribute )argument_list )call (attribute (identifier_request) identifier_request (identifier_layer) identifier_layer )attribute (call (identifier_str) identifier_str (argument_list (attribute (attribute (identifier_request) identifier_request (identifier_bbox) identifier_bbox )attribute (identifier_crs) identifier_crs )attribute )argument_list )call (call (attribute (call (identifier_str) identifier_str (argument_list (attribute (identifier_request) identifier_request (identifier_bbox) identifier_bbox )attribute )argument_list )call (identifier_replace) identifier_replace )attribute (argument_list (string_',') string_',' (string_'_') string_'_' )argument_list )call (conditional_expression (string_'') string_'' (comparison_operator (identifier_date) identifier_date (None) None )comparison_operator (call (attribute (identifier_date) identifier_date (identifier_strftime) identifier_strftime )attribute (argument_list (string_"%Y-%m-%dT%H-%M-%S") string_"%Y-%m-%dT%H-%M-%S" )argument_list )call )conditional_expression (call (attribute (string_'{}X{}') string_'{}X{}' (identifier_format) identifier_format )attribute (argument_list (identifier_size_x) identifier_size_x (identifier_size_y) identifier_size_y )argument_list )call )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_filename) identifier_filename (call (attribute (identifier_OgcImageService) identifier_OgcImageService (identifier_filename_add_custom_url_params) identifier_filename_add_custom_url_params )attribute (argument_list (identifier_filename) identifier_filename (identifier_request) identifier_request )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_OgcImageService) identifier_OgcImageService (identifier_finalize_filename) identifier_finalize_filename )attribute (argument_list (identifier_filename) identifier_filename (attribute (identifier_request) identifier_request (identifier_image_format) identifier_image_format )attribute )argument_list )call )return_statement )block )function_definition )module
Get filename location Returns the filename's location on disk where data is or is going to be stored. The files are stored in the folder specified by the user when initialising OGC-type of request. The name of the file has the following structure: {service_type}_{layer}_{crs}_{bbox}_{time}_{size_x}X{size_y}_*{custom_url_params}.{image_format} In case of `TIFF_d32f` a `'_tiff_depth32f'` is added at the end of the filename (before format suffix) to differentiate it from 16-bit float tiff. :param request: OGC-type request with specified bounding box, cloud coverage for specific product. :type request: OgcRequest or GeopediaRequest :param date: acquisition date or None :type date: datetime.datetime or None :param size_x: horizontal image dimension :type size_x: int or str :param size_y: vertical image dimension :type size_y: int or str :return: filename for this request and date :rtype: str
(module (function_definition (function_name__counts2radiance) function_name__counts2radiance (parameters (identifier_self) identifier_self (identifier_counts) identifier_counts (identifier_coefs) identifier_coefs (identifier_channel) identifier_channel )parameters (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_'Converting counts to radiance') string_'Converting counts to radiance' )argument_list )call )expression_statement (if_statement (call (attribute (identifier_self) identifier_self (identifier__is_vis) identifier__is_vis )attribute (argument_list (identifier_channel) identifier_channel )argument_list )call (block (expression_statement (assignment (identifier_slope) identifier_slope (call (attribute (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (subscript (identifier_coefs) identifier_coefs (string_'slope') string_'slope' )subscript )argument_list )call (identifier_mean) identifier_mean )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_offset) identifier_offset (call (attribute (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (subscript (identifier_coefs) identifier_coefs (string_'offset') string_'offset' )subscript )argument_list )call (identifier_mean) identifier_mean )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__viscounts2radiance) identifier__viscounts2radiance )attribute (argument_list (keyword_argument (identifier_counts) identifier_counts (identifier_counts) identifier_counts )keyword_argument (keyword_argument (identifier_slope) identifier_slope (identifier_slope) identifier_slope )keyword_argument (keyword_argument (identifier_offset) identifier_offset (identifier_offset) identifier_offset )keyword_argument )argument_list )call )return_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__ircounts2radiance) identifier__ircounts2radiance )attribute (argument_list (keyword_argument (identifier_counts) identifier_counts (identifier_counts) identifier_counts )keyword_argument (keyword_argument (identifier_scale) identifier_scale (subscript (identifier_coefs) identifier_coefs (string_'scale') string_'scale' )subscript )keyword_argument (keyword_argument (identifier_offset) identifier_offset (subscript (identifier_coefs) identifier_coefs (string_'offset') string_'offset' )subscript )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Convert raw detector counts to radiance
(module (function_definition (function_name_upload_entities_tsv) function_name_upload_entities_tsv (parameters (identifier_namespace) identifier_namespace (identifier_workspace) identifier_workspace (identifier_entities_tsv) identifier_entities_tsv )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_entities_tsv) identifier_entities_tsv (identifier_string_types) identifier_string_types )argument_list )call (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_entities_tsv) identifier_entities_tsv (string_"r") string_"r" )argument_list )call (as_pattern_target (identifier_tsv) identifier_tsv )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_entity_data) identifier_entity_data (call (attribute (identifier_tsv) identifier_tsv (identifier_read) identifier_read )attribute (argument_list )argument_list )call )assignment )expression_statement )block )with_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_entities_tsv) identifier_entities_tsv (attribute (identifier_io) identifier_io (identifier_StringIO) identifier_StringIO )attribute )argument_list )call (block (expression_statement (assignment (identifier_entity_data) identifier_entity_data (call (attribute (identifier_entities_tsv) identifier_entities_tsv (identifier_getvalue) identifier_getvalue )attribute (argument_list )argument_list )call )assignment )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Unsupported input type.') string_'Unsupported input type.' )argument_list )call )raise_statement )block )else_clause )if_statement (return_statement (call (identifier_upload_entities) identifier_upload_entities (argument_list (identifier_namespace) identifier_namespace (identifier_workspace) identifier_workspace (identifier_entity_data) identifier_entity_data )argument_list )call )return_statement )block )function_definition )module
Upload entities from a tsv loadfile. File-based wrapper for api.upload_entities(). A loadfile is a tab-separated text file with a header row describing entity type and attribute names, followed by rows of entities and their attribute values. Ex: entity:participant_id age alive participant_23 25 Y participant_27 35 N Args: namespace (str): project to which workspace belongs workspace (str): Workspace name entities_tsv (file): FireCloud loadfile, see format above
(module (function_definition (function_name___output_unpaired_vals) function_name___output_unpaired_vals (parameters (identifier_d_vals) identifier_d_vals (identifier_used_ff_keys) identifier_used_ff_keys (identifier_f_f_header) identifier_f_f_header (identifier_sf_d) identifier_sf_d (identifier_s_f_header) identifier_s_f_header (identifier_missing_val) identifier_missing_val (identifier_out_handler) identifier_out_handler (identifier_outfh) identifier_outfh (default_parameter (identifier_delim) identifier_delim (string_"\t") string_"\t" )default_parameter )parameters (block (if_statement (comparison_operator (identifier_missing_val) identifier_missing_val (None) None )comparison_operator (block (raise_statement (call (identifier_MissingValueError) identifier_MissingValueError (argument_list (binary_operator (string_"Need missing value to output ") string_"Need missing value to output " (string_" unpaired lines") string_" unpaired lines" )binary_operator )argument_list )call )raise_statement )block )if_statement (for_statement (identifier_k) identifier_k (identifier_d_vals) identifier_d_vals (block (if_statement (comparison_operator (identifier_k) identifier_k (identifier_used_ff_keys) identifier_used_ff_keys )comparison_operator (block (expression_statement (assignment (identifier_f_f_flds) identifier_f_f_flds (subscript (identifier_d_vals) identifier_d_vals (identifier_k) identifier_k )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_s_f_header) identifier_s_f_header (None) None )comparison_operator (block (expression_statement (assignment (identifier_s_f_flds) identifier_s_f_flds (list (call (identifier_dict) identifier_dict (argument_list (call (identifier_zip) identifier_zip (argument_list (identifier_s_f_header) identifier_s_f_header (binary_operator (list (identifier_missing_val) identifier_missing_val )list (call (identifier_len) identifier_len (argument_list (identifier_s_f_header) identifier_s_f_header )argument_list )call )binary_operator )argument_list )call )argument_list )call )list )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_s_f_num_cols) identifier_s_f_num_cols (call (identifier_len) identifier_len (argument_list (subscript (subscript (identifier_sf_d) identifier_sf_d (subscript (call (attribute (identifier_d_vals) identifier_d_vals (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript )subscript (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_s_f_flds) identifier_s_f_flds (list (binary_operator (list (identifier_missing_val) identifier_missing_val )list (identifier_s_f_num_cols) identifier_s_f_num_cols )binary_operator )list )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_out_handler) identifier_out_handler (identifier_write_output) identifier_write_output )attribute (argument_list (identifier_outfh) identifier_outfh (identifier_delim) identifier_delim (identifier_s_f_flds) identifier_s_f_flds (identifier_f_f_flds) identifier_f_f_flds (identifier_s_f_header) identifier_s_f_header (identifier_f_f_header) identifier_f_f_header )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Use an output handler to output keys that could not be paired. Go over the keys in d_vals and for any that were not used (i.e. not in used_ff_keys), build an output line using the values from d_vals, populated the missing columns with missing_val, and output these using the provided output hander.
(module (function_definition (function_name_display_completions_like_readline) function_name_display_completions_like_readline (parameters (identifier_event) identifier_event )parameters (block (expression_statement (assignment (identifier_b) identifier_b (attribute (identifier_event) identifier_event (identifier_current_buffer) identifier_current_buffer )attribute )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_b) identifier_b (identifier_completer) identifier_completer )attribute (None) None )comparison_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_complete_event) identifier_complete_event (call (identifier_CompleteEvent) identifier_CompleteEvent (argument_list (keyword_argument (identifier_completion_requested) identifier_completion_requested (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_completions) identifier_completions (call (identifier_list) identifier_list (argument_list (call (attribute (attribute (identifier_b) identifier_b (identifier_completer) identifier_completer )attribute (identifier_get_completions) identifier_get_completions )attribute (argument_list (attribute (identifier_b) identifier_b (identifier_document) identifier_document )attribute (identifier_complete_event) identifier_complete_event )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_common_suffix) identifier_common_suffix (call (identifier_get_common_complete_suffix) identifier_get_common_complete_suffix (argument_list (attribute (identifier_b) identifier_b (identifier_document) identifier_document )attribute (identifier_completions) identifier_completions )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_completions) identifier_completions )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (call (attribute (identifier_b) identifier_b (identifier_delete_before_cursor) identifier_delete_before_cursor )attribute (argument_list (unary_operator (attribute (subscript (identifier_completions) identifier_completions (integer_0) integer_0 )subscript (identifier_start_position) identifier_start_position )attribute )unary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_b) identifier_b (identifier_insert_text) identifier_insert_text )attribute (argument_list (attribute (subscript (identifier_completions) identifier_completions (integer_0) integer_0 )subscript (identifier_text) identifier_text )attribute )argument_list )call )expression_statement )block (elif_clause (identifier_common_suffix) identifier_common_suffix (block (expression_statement (call (attribute (identifier_b) identifier_b (identifier_insert_text) identifier_insert_text )attribute (argument_list (identifier_common_suffix) identifier_common_suffix )argument_list )call )expression_statement )block )elif_clause (elif_clause (identifier_completions) identifier_completions (block (expression_statement (call (identifier__display_completions_like_readline) identifier__display_completions_like_readline (argument_list (attribute (identifier_event) identifier_event (identifier_cli) identifier_cli )attribute (identifier_completions) identifier_completions )argument_list )call )expression_statement )block )elif_clause )if_statement )block )function_definition )module
Key binding handler for readline-style tab completion. This is meant to be as similar as possible to the way how readline displays completions. Generate the completions immediately (blocking) and display them above the prompt in columns. Usage:: # Call this handler when 'Tab' has been pressed. registry.add_binding(Keys.ControlI)(display_completions_like_readline)
(module (function_definition (function_name_close) function_name_close (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_endpoint) identifier_endpoint (call (attribute (attribute (identifier_self) identifier_self (identifier_endpoint) identifier_endpoint )attribute (identifier_replace) identifier_replace )attribute (argument_list (string_"/api/v1/spans") string_"/api/v1/spans" (string_"") string_"" )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_"Zipkin trace may be located at this URL {}/traces/{}") string_"Zipkin trace may be located at this URL {}/traces/{}" (identifier_format) identifier_format )attribute (argument_list (identifier_endpoint) identifier_endpoint (attribute (identifier_self) identifier_self (identifier_trace_id) identifier_trace_id )attribute )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
End the report.
(module (function_definition (function_name__trim_dictionary_parameters) function_name__trim_dictionary_parameters (parameters (identifier_self) identifier_self (identifier_dict_param) identifier_dict_param )parameters (block (expression_statement (assignment (identifier_keys) identifier_keys (call (attribute (identifier_re) identifier_re (identifier_findall) identifier_findall )attribute (argument_list (string_'(?:[^%]|^)?%\((\w*)\)[a-z]') string_'(?:[^%]|^)?%\((\w*)\)[a-z]' (attribute (identifier_self) identifier_self (identifier_msgid) identifier_msgid )attribute )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (not_operator (identifier_keys) identifier_keys )not_operator (call (attribute (identifier_re) identifier_re (identifier_findall) identifier_findall )attribute (argument_list (string_'(?:[^%]|^)%[a-z]') string_'(?:[^%]|^)%[a-z]' (attribute (identifier_self) identifier_self (identifier_msgid) identifier_msgid )attribute )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_params) identifier_params (call (attribute (identifier_self) identifier_self (identifier__copy_param) identifier__copy_param )attribute (argument_list (identifier_dict_param) identifier_dict_param )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_params) identifier_params (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_src) identifier_src (dictionary )dictionary )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (identifier_self) identifier_self (identifier_params) identifier_params )attribute (identifier_dict) identifier_dict )argument_list )call (block (expression_statement (call (attribute (identifier_src) identifier_src (identifier_update) identifier_update )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_params) identifier_params )attribute )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_src) identifier_src (identifier_update) identifier_update )attribute (argument_list (identifier_dict_param) identifier_dict_param )argument_list )call )expression_statement (for_statement (identifier_key) identifier_key (identifier_keys) identifier_keys (block (expression_statement (assignment (subscript (identifier_params) identifier_params (identifier_key) identifier_key )subscript (call (attribute (identifier_self) identifier_self (identifier__copy_param) identifier__copy_param )attribute (argument_list (subscript (identifier_src) identifier_src (identifier_key) identifier_key )subscript )argument_list )call )assignment )expression_statement )block )for_statement )block )else_clause )if_statement (return_statement (identifier_params) identifier_params )return_statement )block )function_definition )module
Return a dict that only has matching entries in the msgid.
(module (function_definition (function_name_resumption_token) function_name_resumption_token (parameters (identifier_parent) identifier_parent (identifier_pagination) identifier_pagination (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (boolean_operator (comparison_operator (attribute (identifier_pagination) identifier_pagination (identifier_page) identifier_page )attribute (integer_1) integer_1 )comparison_operator (not_operator (attribute (identifier_pagination) identifier_pagination (identifier_has_next) identifier_has_next )attribute )not_operator )boolean_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_token) identifier_token (call (identifier_serialize) identifier_serialize (argument_list (identifier_pagination) identifier_pagination (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_e_resumptionToken) identifier_e_resumptionToken (call (identifier_SubElement) identifier_SubElement (argument_list (identifier_parent) identifier_parent (call (attribute (identifier_etree) identifier_etree (identifier_QName) identifier_QName )attribute (argument_list (identifier_NS_OAIPMH) identifier_NS_OAIPMH (string_'resumptionToken') string_'resumptionToken' )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (attribute (identifier_pagination) identifier_pagination (identifier_total) identifier_total )attribute (block (expression_statement (assignment (identifier_expiration_date) identifier_expiration_date (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 (subscript (attribute (identifier_current_app) identifier_current_app (identifier_config) identifier_config )attribute (string_'OAISERVER_RESUMPTION_TOKEN_EXPIRE_TIME') string_'OAISERVER_RESUMPTION_TOKEN_EXPIRE_TIME' )subscript )keyword_argument )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_e_resumptionToken) identifier_e_resumptionToken (identifier_set) identifier_set )attribute (argument_list (string_'expirationDate') string_'expirationDate' (call (identifier_datetime_to_datestamp) identifier_datetime_to_datestamp (argument_list (identifier_expiration_date) identifier_expiration_date )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_e_resumptionToken) identifier_e_resumptionToken (identifier_set) identifier_set )attribute (argument_list (string_'cursor') string_'cursor' (call (identifier_str) identifier_str (argument_list (binary_operator (parenthesized_expression (binary_operator (attribute (identifier_pagination) identifier_pagination (identifier_page) identifier_page )attribute (integer_1) integer_1 )binary_operator )parenthesized_expression (attribute (identifier_pagination) identifier_pagination (identifier_per_page) identifier_per_page )attribute )binary_operator )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_e_resumptionToken) identifier_e_resumptionToken (identifier_set) identifier_set )attribute (argument_list (string_'completeListSize') string_'completeListSize' (call (identifier_str) identifier_str (argument_list (attribute (identifier_pagination) identifier_pagination (identifier_total) identifier_total )attribute )argument_list )call )argument_list )call )expression_statement )block )if_statement (if_statement (identifier_token) identifier_token (block (expression_statement (assignment (attribute (identifier_e_resumptionToken) identifier_e_resumptionToken (identifier_text) identifier_text )attribute (identifier_token) identifier_token )assignment )expression_statement )block )if_statement )block )function_definition )module
Attach resumption token element to a parent.
(module (function_definition (function_name_rulefiles) function_name_rulefiles (parameters (identifier_self) identifier_self (default_parameter (identifier_acc) identifier_acc (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_rulesdir) identifier_rulesdir (call (attribute (identifier_self) identifier_self (identifier_rulesdir) identifier_rulesdir )attribute (argument_list (identifier_acc) identifier_acc )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_rules) identifier_rules (list_comprehension (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_rulesdir) identifier_rulesdir (identifier_x) identifier_x )argument_list )call (for_in_clause (identifier_x) identifier_x (call (attribute (identifier_self) identifier_self (identifier_get) identifier_get )attribute (argument_list (string_'rules') string_'rules' (identifier_acc) identifier_acc (list )list )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (if_statement (comparison_operator (identifier_acc) identifier_acc (None) None )comparison_operator (block (expression_statement (augmented_assignment (identifier_rules) identifier_rules (call (attribute (identifier_self) identifier_self (identifier_rulefiles) identifier_rulefiles )attribute (argument_list (keyword_argument (identifier_acc) identifier_acc (None) None )keyword_argument )argument_list )call )augmented_assignment )expression_statement )block )if_statement (return_statement (identifier_rules) identifier_rules )return_statement )block )function_definition )module
Return a list of rulefiles for the given account. Returns an empty list if none specified.
(module (function_definition (function_name_get_parler_languages_from_django_cms) function_name_get_parler_languages_from_django_cms (parameters (default_parameter (identifier_cms_languages) identifier_cms_languages (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_valid_keys) identifier_valid_keys (list (string_'code') string_'code' (string_'fallbacks') string_'fallbacks' (string_'hide_untranslated') string_'hide_untranslated' (string_'redirect_on_fallback') string_'redirect_on_fallback' )list )assignment )expression_statement (if_statement (identifier_cms_languages) identifier_cms_languages (block (if_statement (comparison_operator (attribute (identifier_sys) identifier_sys (identifier_version_info) identifier_version_info )attribute (tuple (integer_3) integer_3 (integer_0) integer_0 (integer_0) integer_0 )tuple )comparison_operator (block (expression_statement (assignment (identifier_int_types) identifier_int_types (tuple (identifier_int) identifier_int (identifier_long) identifier_long )tuple )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_int_types) identifier_int_types (identifier_int) identifier_int )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_parler_languages) identifier_parler_languages (call (attribute (identifier_copy) identifier_copy (identifier_deepcopy) identifier_deepcopy )attribute (argument_list (identifier_cms_languages) identifier_cms_languages )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_site_id) identifier_site_id (identifier_site_config) identifier_site_config )pattern_list (call (attribute (identifier_cms_languages) identifier_cms_languages (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (boolean_operator (identifier_site_id) identifier_site_id (parenthesized_expression (boolean_operator (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_site_id) identifier_site_id (identifier_int_types) identifier_int_types )argument_list )call )not_operator (comparison_operator (identifier_site_id) identifier_site_id (string_'default') string_'default' )comparison_operator )boolean_operator )parenthesized_expression )boolean_operator (block (delete_statement (subscript (identifier_parler_languages) identifier_parler_languages (identifier_site_id) identifier_site_id )subscript )delete_statement (continue_statement )continue_statement )block )if_statement (if_statement (comparison_operator (identifier_site_id) identifier_site_id (string_'default') string_'default' )comparison_operator (block (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (identifier_site_config) identifier_site_config (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (identifier_key) identifier_key (identifier_valid_keys) identifier_valid_keys )comparison_operator (block (delete_statement (subscript (subscript (identifier_parler_languages) identifier_parler_languages (string_'default') string_'default' )subscript (identifier_key) identifier_key )subscript )delete_statement )block )if_statement )block )for_statement )block (else_clause (block (for_statement (pattern_list (identifier_i) identifier_i (identifier_lang_config) identifier_lang_config )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_site_config) identifier_site_config )argument_list )call (block (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (identifier_lang_config) identifier_lang_config (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (identifier_key) identifier_key (identifier_valid_keys) identifier_valid_keys )comparison_operator (block (delete_statement (subscript (subscript (subscript (identifier_parler_languages) identifier_parler_languages (identifier_site_id) identifier_site_id )subscript (identifier_i) identifier_i )subscript (identifier_key) identifier_key )subscript )delete_statement )block )if_statement )block )for_statement )block )for_statement )block )else_clause )if_statement )block )for_statement (return_statement (identifier_parler_languages) identifier_parler_languages )return_statement )block )if_statement (return_statement (None) None )return_statement )block )function_definition )module
Converts django CMS' setting CMS_LANGUAGES into PARLER_LANGUAGES. Since CMS_LANGUAGES is a strict superset of PARLER_LANGUAGES, we do a bit of cleansing to remove irrelevant items.
(module (function_definition (function_name_mapping_of) function_name_mapping_of (parameters (identifier_cls) identifier_cls )parameters (block (function_definition (function_name_mapper) function_name_mapper (parameters (identifier_data) identifier_data )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_data) identifier_data (identifier_Mapping) identifier_Mapping )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (binary_operator (string_"data must be a mapping, not %s") string_"data must be a mapping, not %s" (attribute (call (identifier_type) identifier_type (argument_list (identifier_data) identifier_data )argument_list )call (identifier___name__) identifier___name__ )attribute )binary_operator )argument_list )call )raise_statement )block )if_statement (return_statement (dictionary_comprehension (pair (identifier_key) identifier_key (call (identifier_cls) identifier_cls (argument_list (identifier_value) identifier_value )argument_list )call )pair (for_in_clause (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (identifier_data) identifier_data (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause )dictionary_comprehension )return_statement )block )function_definition (return_statement (identifier_mapper) identifier_mapper )return_statement )block )function_definition )module
Expects a mapping from some key to data for `cls` instances.
(module (function_definition (function_name_usufyToGmlExport) function_name_usufyToGmlExport (parameters (identifier_d) identifier_d (identifier_fPath) identifier_fPath )parameters (block (try_statement (block (expression_statement (assignment (identifier_oldData) identifier_oldData (call (attribute (identifier_nx) identifier_nx (identifier_read_gml) identifier_read_gml )attribute (argument_list (identifier_fPath) identifier_fPath )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (identifier_UnicodeDecodeError) identifier_UnicodeDecodeError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_"UnicodeDecodeError:\t") string_"UnicodeDecodeError:\t" (call (identifier_str) identifier_str (argument_list (identifier_e) identifier_e )argument_list )call )binary_operator )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Something went wrong when reading the .gml file relating to the decoding of UNICODE.") string_"Something went wrong when reading the .gml file relating to the decoding of UNICODE." )argument_list )call )expression_statement (import_statement (aliased_import (dotted_name (identifier_time) identifier_time )dotted_name (identifier_time) identifier_time )aliased_import )import_statement (expression_statement (augmented_assignment (identifier_fPath) identifier_fPath (binary_operator (string_"_") string_"_" (call (identifier_str) identifier_str (argument_list (call (attribute (identifier_time) identifier_time (identifier_time) identifier_time )attribute (argument_list )argument_list )call )argument_list )call )binary_operator )augmented_assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (binary_operator (binary_operator (string_"To avoid losing data, the output file will be renamed to use the timestamp as:\n") string_"To avoid losing data, the output file will be renamed to use the timestamp as:\n" (identifier_fPath) identifier_fPath )binary_operator (string_"_") string_"_" )binary_operator (call (identifier_str) identifier_str (argument_list (call (attribute (identifier_time) identifier_time (identifier_time) identifier_time )attribute (argument_list )argument_list )call )argument_list )call )binary_operator )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_oldData) identifier_oldData (call (attribute (identifier_nx) identifier_nx (identifier_Graph) identifier_Graph )attribute (argument_list )argument_list )call )assignment )expression_statement )block )except_clause (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (assignment (identifier_oldData) identifier_oldData (call (attribute (identifier_nx) identifier_nx (identifier_Graph) identifier_Graph )attribute (argument_list )argument_list )call )assignment )expression_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_newGraph) identifier_newGraph (call (identifier__generateGraphData) identifier__generateGraphData (argument_list (identifier_d) identifier_d (identifier_oldData) identifier_oldData )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_nx) identifier_nx (identifier_write_gml) identifier_write_gml )attribute (argument_list (identifier_newGraph) identifier_newGraph (identifier_fPath) identifier_fPath )argument_list )call )expression_statement )block )function_definition )module
Workaround to export data to a .gml file. Args: ----- d: Data to export. fPath: File path for the output file.