sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_member_of) function_name_member_of (parameters (identifier_self) identifier_self (identifier_group) identifier_group )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_group) identifier_group (identifier_Group) identifier_Group )argument_list )call (block (expression_statement (assignment (identifier_group) identifier_group (attribute (identifier_group) identifier_group (identifier_name) identifier_name )attribute )assignment )expression_statement )block )if_statement (return_statement (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_groups) identifier_groups )attribute (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_name) identifier_name (identifier_group) identifier_group )keyword_argument )argument_list )call (identifier_exists) identifier_exists )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Returns whether a user is a member of a certain group. Args: group The name of a group (string) or a group object Returns: Boolean
(module (function_definition (function_name_install) function_name_install (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_domain_settings) identifier_domain_settings (call (attribute (identifier_DomainSettings) identifier_DomainSettings (identifier_get) identifier_get )attribute (argument_list )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (call (identifier_root) identifier_root (argument_list )argument_list )call )with_item )with_clause (block (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_SMBCONF_FILE) identifier_SMBCONF_FILE )attribute )argument_list )call (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_remove) identifier_remove )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_SMBCONF_FILE) identifier_SMBCONF_FILE )attribute )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_domain_settings) identifier_domain_settings (identifier_mode) identifier_mode )attribute (string_'ad') string_'ad' )comparison_operator (block (expression_statement (assignment (attribute (identifier_domain_settings) identifier_domain_settings (identifier_adminpass) identifier_adminpass )attribute (call (identifier_make_password) identifier_make_password (argument_list (integer_15) integer_15 )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_domain_settings) identifier_domain_settings (identifier_save) identifier_save )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (identifier_run) identifier_run (argument_list (binary_operator (concatenated_string (string_"samba-tool domain provision ") string_"samba-tool domain provision " (string_"--domain='%s' ") string_"--domain='%s' " (string_"--workgroup='%s' ") string_"--workgroup='%s' " (string_"--realm='%s' ") string_"--realm='%s' " (string_"--use-xattrs=yes ") string_"--use-xattrs=yes " (string_"--use-rfc2307 ") string_"--use-rfc2307 " (string_"--server-role='domain controller' ") string_"--server-role='domain controller' " (string_"--use-ntvfs ") string_"--use-ntvfs " (string_"--adminpass='%s'") string_"--adminpass='%s'" )concatenated_string (tuple (attribute (identifier_domain_settings) identifier_domain_settings (identifier_domain) identifier_domain )attribute (attribute (identifier_domain_settings) identifier_domain_settings (identifier_workgroup) identifier_workgroup )attribute (attribute (identifier_domain_settings) identifier_domain_settings (identifier_realm) identifier_realm )attribute (attribute (identifier_domain_settings) identifier_domain_settings (identifier_adminpass) identifier_adminpass )attribute )tuple )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_smbconf) identifier_smbconf )attribute (identifier_write) identifier_write )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_shutil) identifier_shutil (identifier_copy2) identifier_copy2 )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_SMB_KRB5CONF_FILE) identifier_SMB_KRB5CONF_FILE )attribute (attribute (identifier_self) identifier_self (identifier_KRB5CONF_FILE) identifier_KRB5CONF_FILE )attribute )argument_list )call )expression_statement (expression_statement (call (identifier_run) identifier_run (argument_list (string_"echo 'nameserver 127.0.0.1' > /etc/resolv.conf") string_"echo 'nameserver 127.0.0.1' > /etc/resolv.conf" )argument_list )call )expression_statement (expression_statement (call (identifier_run) identifier_run (argument_list (string_"touch /etc/samba/shares.conf") string_"touch /etc/samba/shares.conf" )argument_list )call )expression_statement )block (elif_clause (comparison_operator (attribute (identifier_domain_settings) identifier_domain_settings (identifier_mode) identifier_mode )attribute (string_'member') string_'member' )comparison_operator (block (pass_statement )pass_statement )block )elif_clause )if_statement )block )with_statement )block )function_definition )module
Installation procedure, it writes basic smb.conf and uses samba-tool to provision the domain
(module (function_definition (function_name_fingerprint) function_name_fingerprint (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_num_vertices) identifier_num_vertices )attribute (integer_0) integer_0 )comparison_operator (block (return_statement (call (attribute (identifier_np) identifier_np (identifier_zeros) identifier_zeros )attribute (argument_list (integer_20) integer_20 (attribute (identifier_np) identifier_np (identifier_ubyte) identifier_ubyte )attribute )argument_list )call )return_statement )block (else_clause (block (return_statement (call (identifier_sum) identifier_sum (argument_list (attribute (identifier_self) identifier_self (identifier_vertex_fingerprints) identifier_vertex_fingerprints )attribute )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
A total graph fingerprint The result is invariant under permutation of the vertex indexes. The chance that two different (molecular) graphs yield the same fingerprint is small but not zero. (See unit tests.)
(module (function_definition (function_name_get_package_name_in_pipfile) function_name_get_package_name_in_pipfile (parameters (identifier_self) identifier_self (identifier_package_name) identifier_package_name (default_parameter (identifier_dev) identifier_dev (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_key) identifier_key (conditional_expression (string_"dev-packages") string_"dev-packages" (identifier_dev) identifier_dev (string_"packages") string_"packages" )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_section) identifier_section (call (attribute (attribute (identifier_self) identifier_self (identifier_parsed_pipfile) identifier_parsed_pipfile )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_key) identifier_key (dictionary )dictionary )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_package_name) identifier_package_name (call (identifier_pep423_name) identifier_pep423_name (argument_list (identifier_package_name) identifier_package_name )argument_list )call )assignment )expression_statement (for_statement (identifier_name) identifier_name (call (attribute (identifier_section) identifier_section (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (call (identifier_pep423_name) identifier_pep423_name (argument_list (identifier_name) identifier_name )argument_list )call (identifier_package_name) identifier_package_name )comparison_operator (block (return_statement (identifier_name) identifier_name )return_statement )block )if_statement )block )for_statement (return_statement (None) None )return_statement )block )function_definition )module
Get the equivalent package name in pipfile
(module (function_definition (function_name__walk_modules) function_name__walk_modules (parameters (identifier_modules) identifier_modules (identifier_class_name) identifier_class_name (identifier_path) identifier_path (identifier_ignored_formats) identifier_ignored_formats (identifier_args) identifier_args )parameters (block (for_statement (identifier_module) identifier_module (call (identifier__iter_modules) identifier__iter_modules (argument_list (keyword_argument (identifier_modules) identifier_modules (identifier_modules) identifier_modules )keyword_argument (keyword_argument (identifier_class_name) identifier_class_name (identifier_class_name) identifier_class_name )keyword_argument (keyword_argument (identifier_path) identifier_path (identifier_path) identifier_path )keyword_argument (keyword_argument (identifier_ignored_formats) identifier_ignored_formats (identifier_ignored_formats) identifier_ignored_formats )keyword_argument (keyword_argument (identifier_args) identifier_args (identifier_args) identifier_args )keyword_argument )argument_list )call (block (for_statement (identifier_section) identifier_section (attribute (identifier_module) identifier_module (identifier_sections) identifier_sections )attribute (block (for_statement (identifier_lecture) identifier_lecture (attribute (identifier_section) identifier_section (identifier_lectures) identifier_lectures )attribute (block (for_statement (identifier_resource) identifier_resource (attribute (identifier_lecture) identifier_lecture (identifier_resources) identifier_resources )attribute (block (expression_statement (yield (expression_list (identifier_module) identifier_module (identifier_section) identifier_section (identifier_lecture) identifier_lecture (identifier_resource) identifier_resource )expression_list )yield )expression_statement )block )for_statement )block )for_statement )block )for_statement )block )for_statement )block )function_definition )module
Helper generator that traverses modules in returns a flattened iterator.
(module (function_definition (function_name_whitespace_around_keywords) function_name_whitespace_around_keywords (parameters (identifier_logical_line) identifier_logical_line )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (for_statement (identifier_match) identifier_match (call (attribute (identifier_KEYWORD_REGEX) identifier_KEYWORD_REGEX (identifier_finditer) identifier_finditer )attribute (argument_list (identifier_logical_line) identifier_logical_line )argument_list )call (block (expression_statement (assignment (pattern_list (identifier_before) identifier_before (identifier_after) identifier_after )pattern_list (call (attribute (identifier_match) identifier_match (identifier_groups) identifier_groups )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_'\t') string_'\t' (identifier_before) identifier_before )comparison_operator (block (expression_statement (yield (expression_list (call (attribute (identifier_match) identifier_match (identifier_start) identifier_start )attribute (argument_list (integer_1) integer_1 )argument_list )call (string_"E274 tab before keyword") string_"E274 tab before keyword" )expression_list )yield )expression_statement )block (elif_clause (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_before) identifier_before )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (yield (expression_list (call (attribute (identifier_match) identifier_match (identifier_start) identifier_start )attribute (argument_list (integer_1) integer_1 )argument_list )call (string_"E272 multiple spaces before keyword") string_"E272 multiple spaces before keyword" )expression_list )yield )expression_statement )block )elif_clause )if_statement (if_statement (comparison_operator (string_'\t') string_'\t' (identifier_after) identifier_after )comparison_operator (block (expression_statement (yield (expression_list (call (attribute (identifier_match) identifier_match (identifier_start) identifier_start )attribute (argument_list (integer_2) integer_2 )argument_list )call (string_"E273 tab after keyword") string_"E273 tab after keyword" )expression_list )yield )expression_statement )block (elif_clause (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_after) identifier_after )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (yield (expression_list (call (attribute (identifier_match) identifier_match (identifier_start) identifier_start )attribute (argument_list (integer_2) integer_2 )argument_list )call (string_"E271 multiple spaces after keyword") string_"E271 multiple spaces after keyword" )expression_list )yield )expression_statement )block )elif_clause )if_statement )block )for_statement )block )function_definition )module
r"""Avoid extraneous whitespace around keywords. Okay: True and False E271: True and False E272: True and False E273: True and\tFalse E274: True\tand False
(module (function_definition (function_name__fetch_options) function_name__fetch_options (parameters (identifier_self) identifier_self (identifier_merge) identifier_merge )parameters (block (expression_statement (assignment (identifier_cmd) identifier_cmd (call (identifier_tuple) identifier_tuple (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_option) identifier_option (identifier_FETCH_DEFAULTS) identifier_FETCH_DEFAULTS (block (expression_statement (assignment (identifier_value) identifier_value (call (attribute (identifier_merge) identifier_merge (identifier_get) identifier_get )attribute (argument_list (identifier_option) identifier_option (call (attribute (attribute (identifier_self) identifier_self (identifier_defaults) identifier_defaults )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_option) identifier_option )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (identifier_value) identifier_value (block (expression_statement (augmented_assignment (identifier_cmd) identifier_cmd (tuple (binary_operator (string_"--%s") string_"--%s" (identifier_option) identifier_option )binary_operator (call (identifier_str) identifier_str (argument_list (identifier_value) identifier_value )argument_list )call )tuple )augmented_assignment )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_cmd) identifier_cmd )return_statement )block )function_definition )module
Get the fetch options from the given merge dict.
(module (function_definition (function_name_get_urls) function_name_get_urls (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_urls) identifier_urls (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_TreeAdmin) identifier_TreeAdmin (identifier_self) identifier_self )argument_list )call (identifier_get_urls) identifier_get_urls )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_django) identifier_django (identifier_VERSION) identifier_VERSION )attribute (tuple (integer_1) integer_1 (integer_10) integer_10 )tuple )comparison_operator (block (import_from_statement (dotted_name (identifier_django) identifier_django (identifier_views) identifier_views (identifier_i18n) identifier_i18n )dotted_name (dotted_name (identifier_javascript_catalog) identifier_javascript_catalog )dotted_name )import_from_statement (expression_statement (assignment (identifier_jsi18n_url) identifier_jsi18n_url (call (identifier_url) identifier_url (argument_list (string_r'^jsi18n/$') string_r'^jsi18n/$' (identifier_javascript_catalog) identifier_javascript_catalog (dictionary (pair (string_'packages') string_'packages' (tuple (string_'treebeard') string_'treebeard' )tuple )pair )dictionary )argument_list )call )assignment )expression_statement )block (else_clause (block (import_from_statement (dotted_name (identifier_django) identifier_django (identifier_views) identifier_views (identifier_i18n) identifier_i18n )dotted_name (dotted_name (identifier_JavaScriptCatalog) identifier_JavaScriptCatalog )dotted_name )import_from_statement (expression_statement (assignment (identifier_jsi18n_url) identifier_jsi18n_url (call (identifier_url) identifier_url (argument_list (string_r'^jsi18n/$') string_r'^jsi18n/$' (call (attribute (identifier_JavaScriptCatalog) identifier_JavaScriptCatalog (identifier_as_view) identifier_as_view )attribute (argument_list (keyword_argument (identifier_packages) identifier_packages (list (string_'treebeard') string_'treebeard' )list )keyword_argument )argument_list )call (keyword_argument (identifier_name) identifier_name (string_'javascript-catalog') string_'javascript-catalog' )keyword_argument )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_new_urls) identifier_new_urls (list (call (identifier_url) identifier_url (argument_list (string_'^move/$') string_'^move/$' (call (attribute (attribute (identifier_self) identifier_self (identifier_admin_site) identifier_admin_site )attribute (identifier_admin_view) identifier_admin_view )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_move_node) identifier_move_node )attribute )argument_list )call )argument_list )call (identifier_jsi18n_url) identifier_jsi18n_url )list )assignment )expression_statement (return_statement (binary_operator (identifier_new_urls) identifier_new_urls (identifier_urls) identifier_urls )binary_operator )return_statement )block )function_definition )module
Adds a url to move nodes to this admin
(module (function_definition (function_name_get_marathon_task) function_name_get_marathon_task (parameters (identifier_task_name) identifier_task_name (default_parameter (identifier_inactive) identifier_inactive (False) False )default_parameter (default_parameter (identifier_completed) identifier_completed (False) False )default_parameter )parameters (block (return_statement (call (identifier_get_service_task) identifier_get_service_task (argument_list (string_'marathon') string_'marathon' (identifier_task_name) identifier_task_name (identifier_inactive) identifier_inactive (identifier_completed) identifier_completed )argument_list )call )return_statement )block )function_definition )module
Get a dictionary describing a named marathon task
(module (function_definition (function_name_get_type) function_name_get_type (parameters (identifier_self) identifier_self (identifier_idx) identifier_idx )parameters (block (expression_statement (assignment (identifier__type) identifier__type (call (attribute (identifier_self) identifier_self (identifier_get_type_ref) identifier_get_type_ref )attribute (argument_list (identifier_idx) identifier_idx )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier__type) identifier__type (unary_operator (integer_1) integer_1 )unary_operator )comparison_operator (block (return_statement (string_"AG:ITI: invalid type") string_"AG:ITI: invalid type" )return_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_get_string) identifier_get_string )attribute (argument_list (identifier__type) identifier__type )argument_list )call )return_statement )block )function_definition )module
Return the resolved type name based on the index This returns the string associated with the type. :param int idx: :return: the type name :rtype: str
(module (function_definition (function_name__aggregate_metrics) function_name__aggregate_metrics (parameters (identifier_self) identifier_self (identifier_session_group) identifier_session_group )parameters (block (if_statement (parenthesized_expression (boolean_operator (comparison_operator (attribute (attribute (identifier_self) identifier_self (identifier__request) identifier__request )attribute (identifier_aggregation_type) identifier_aggregation_type )attribute (attribute (identifier_api_pb2) identifier_api_pb2 (identifier_AGGREGATION_AVG) identifier_AGGREGATION_AVG )attribute )comparison_operator (comparison_operator (attribute (attribute (identifier_self) identifier_self (identifier__request) identifier__request )attribute (identifier_aggregation_type) identifier_aggregation_type )attribute (attribute (identifier_api_pb2) identifier_api_pb2 (identifier_AGGREGATION_UNSET) identifier_AGGREGATION_UNSET )attribute )comparison_operator )boolean_operator )parenthesized_expression (block (expression_statement (call (identifier__set_avg_session_metrics) identifier__set_avg_session_metrics (argument_list (identifier_session_group) identifier_session_group )argument_list )call )expression_statement )block (elif_clause (comparison_operator (attribute (attribute (identifier_self) identifier_self (identifier__request) identifier__request )attribute (identifier_aggregation_type) identifier_aggregation_type )attribute (attribute (identifier_api_pb2) identifier_api_pb2 (identifier_AGGREGATION_MEDIAN) identifier_AGGREGATION_MEDIAN )attribute )comparison_operator (block (expression_statement (call (identifier__set_median_session_metrics) identifier__set_median_session_metrics (argument_list (identifier_session_group) identifier_session_group (attribute (attribute (identifier_self) identifier_self (identifier__request) identifier__request )attribute (identifier_aggregation_metric) identifier_aggregation_metric )attribute )argument_list )call )expression_statement )block )elif_clause (elif_clause (comparison_operator (attribute (attribute (identifier_self) identifier_self (identifier__request) identifier__request )attribute (identifier_aggregation_type) identifier_aggregation_type )attribute (attribute (identifier_api_pb2) identifier_api_pb2 (identifier_AGGREGATION_MIN) identifier_AGGREGATION_MIN )attribute )comparison_operator (block (expression_statement (call (identifier__set_extremum_session_metrics) identifier__set_extremum_session_metrics (argument_list (identifier_session_group) identifier_session_group (attribute (attribute (identifier_self) identifier_self (identifier__request) identifier__request )attribute (identifier_aggregation_metric) identifier_aggregation_metric )attribute (identifier_min) identifier_min )argument_list )call )expression_statement )block )elif_clause (elif_clause (comparison_operator (attribute (attribute (identifier_self) identifier_self (identifier__request) identifier__request )attribute (identifier_aggregation_type) identifier_aggregation_type )attribute (attribute (identifier_api_pb2) identifier_api_pb2 (identifier_AGGREGATION_MAX) identifier_AGGREGATION_MAX )attribute )comparison_operator (block (expression_statement (call (identifier__set_extremum_session_metrics) identifier__set_extremum_session_metrics (argument_list (identifier_session_group) identifier_session_group (attribute (attribute (identifier_self) identifier_self (identifier__request) identifier__request )attribute (identifier_aggregation_metric) identifier_aggregation_metric )attribute (identifier_max) identifier_max )argument_list )call )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (attribute (identifier_error) identifier_error (identifier_HParamsError) identifier_HParamsError )attribute (argument_list (binary_operator (string_'Unknown aggregation_type in request: %s') string_'Unknown aggregation_type in request: %s' (attribute (attribute (identifier_self) identifier_self (identifier__request) identifier__request )attribute (identifier_aggregation_type) identifier_aggregation_type )attribute )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Sets the metrics of the group based on aggregation_type.
(module (function_definition (function_name__request) function_name__request (parameters (identifier_self) identifier_self (identifier_method) identifier_method (default_parameter (identifier_body) identifier_body (None) None )default_parameter (default_parameter (identifier_raise_exc) identifier_raise_exc (True) True )default_parameter (default_parameter (identifier_headers) identifier_headers (None) None )default_parameter (default_parameter (identifier_files) identifier_files (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_headers) identifier_headers (boolean_operator (identifier_headers) identifier_headers (dictionary )dictionary )boolean_operator )assignment )expression_statement (if_statement (boolean_operator (identifier_body) identifier_body (comparison_operator (string_'Content-Type') string_'Content-Type' (identifier_headers) identifier_headers )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_headers) identifier_headers (identifier_update) identifier_update )attribute (argument_list (dictionary (pair (string_'Content-Type') string_'Content-Type' (string_'application/json') string_'application/json' )pair )dictionary )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier__core) identifier__core )attribute (identifier_session) identifier_session )attribute (identifier_request) identifier_request )attribute (argument_list (identifier_method) identifier_method (attribute (identifier_self) identifier_self (identifier_uri) identifier_uri )attribute (keyword_argument (identifier_data) identifier_data (conditional_expression (identifier_body) identifier_body (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_body) identifier_body (identifier_dict) identifier_dict )argument_list )call )not_operator (None) None )conditional_expression )keyword_argument (keyword_argument (identifier_json) identifier_json (conditional_expression (identifier_body) identifier_body (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_body) identifier_body (identifier_dict) identifier_dict )argument_list )call (None) None )conditional_expression )keyword_argument (keyword_argument (identifier_files) identifier_files (identifier_files) identifier_files )keyword_argument (keyword_argument (identifier_headers) identifier_headers (identifier_headers) identifier_headers )keyword_argument (keyword_argument (identifier_allow_redirects) identifier_allow_redirects (False) False )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_nav) identifier_nav (call (attribute (identifier_self) identifier_self (identifier__create_navigator) identifier__create_navigator )attribute (argument_list (identifier_response) identifier_response (keyword_argument (identifier_raise_exc) identifier_raise_exc (identifier_raise_exc) identifier_raise_exc )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_raise_exc) identifier_raise_exc (not_operator (identifier_response) identifier_response )not_operator )boolean_operator (block (raise_statement (call (attribute (identifier_exc) identifier_exc (identifier_HALNavigatorError) identifier_HALNavigatorError )attribute (argument_list (keyword_argument (identifier_message) identifier_message (attribute (identifier_response) identifier_response (identifier_text) identifier_text )attribute )keyword_argument (keyword_argument (identifier_status) identifier_status (attribute (identifier_response) identifier_response (identifier_status_code) identifier_status_code )attribute )keyword_argument (keyword_argument (identifier_nav) identifier_nav (identifier_nav) identifier_nav )keyword_argument (keyword_argument (identifier_response) identifier_response (identifier_response) identifier_response )keyword_argument )argument_list )call )raise_statement )block (else_clause (block (return_statement (identifier_nav) identifier_nav )return_statement )block )else_clause )if_statement )block )function_definition )module
Fetches HTTP response using the passed http method. Raises HALNavigatorError if response is in the 400-500 range.
(module (function_definition (function_name_copy) function_name_copy (parameters (identifier_self) identifier_self (default_parameter (identifier_new_grab) identifier_new_grab (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_obj) identifier_obj (call (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_obj) identifier_obj (identifier_process_grab) identifier_process_grab )attribute (argument_list (conditional_expression (identifier_new_grab) identifier_new_grab (identifier_new_grab) identifier_new_grab (attribute (identifier_self) identifier_self (identifier_grab) identifier_grab )attribute )conditional_expression )argument_list )call )expression_statement (expression_statement (assignment (identifier_copy_keys) identifier_copy_keys (tuple (string_'status') string_'status' (string_'code') string_'code' (string_'head') string_'head' (string_'body') string_'body' (string_'total_time') string_'total_time' (string_'connect_time') string_'connect_time' (string_'name_lookup_time') string_'name_lookup_time' (string_'url') string_'url' (string_'charset') string_'charset' (string_'_unicode_body') string_'_unicode_body' (string_'_grab_config') string_'_grab_config' )tuple )assignment )expression_statement (for_statement (identifier_key) identifier_key (identifier_copy_keys) identifier_copy_keys (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_obj) identifier_obj (identifier_key) identifier_key (call (identifier_getattr) identifier_getattr (argument_list (identifier_self) identifier_self (identifier_key) identifier_key )argument_list )call )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (attribute (identifier_obj) identifier_obj (identifier_headers) identifier_headers )attribute (call (identifier_copy) identifier_copy (argument_list (attribute (identifier_self) identifier_self (identifier_headers) identifier_headers )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_obj) identifier_obj (identifier_cookies) identifier_cookies )attribute (call (identifier_copy) identifier_copy (argument_list (attribute (identifier_self) identifier_self (identifier_cookies) identifier_cookies )attribute )argument_list )call )assignment )expression_statement (return_statement (identifier_obj) identifier_obj )return_statement )block )function_definition )module
Clone the Response object.
(module (function_definition (function_name__get_broadcasts) function_name__get_broadcasts (parameters (identifier_tables) identifier_tables )parameters (block (expression_statement (assignment (identifier_tables) identifier_tables (call (identifier_set) identifier_set (argument_list (identifier_tables) identifier_tables )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_casts) identifier_casts (call (attribute (identifier_tz) identifier_tz (identifier_keyfilter) identifier_keyfilter )attribute (argument_list (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (boolean_operator (comparison_operator (subscript (identifier_x) identifier_x (integer_0) integer_0 )subscript (identifier_tables) identifier_tables )comparison_operator (comparison_operator (subscript (identifier_x) identifier_x (integer_1) integer_1 )subscript (identifier_tables) identifier_tables )comparison_operator )boolean_operator )lambda (identifier__BROADCASTS) identifier__BROADCASTS )argument_list )call )assignment )expression_statement (if_statement (binary_operator (identifier_tables) identifier_tables (call (identifier_set) identifier_set (argument_list (call (attribute (identifier_tz) identifier_tz (identifier_concat) identifier_concat )attribute (argument_list (call (attribute (identifier_casts) identifier_casts (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call )binary_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Not enough links to merge all tables.') string_'Not enough links to merge all tables.' )argument_list )call )raise_statement )block )if_statement (return_statement (identifier_casts) identifier_casts )return_statement )block )function_definition )module
Get the broadcasts associated with a set of tables. Parameters ---------- tables : sequence of str Table names for which broadcasts have been registered. Returns ------- casts : dict of `Broadcast` Keys are tuples of strings like (cast_name, onto_name).
(module (function_definition (function_name_get) function_name_get (parameters (identifier_self) identifier_self (identifier_request) identifier_request )parameters (block (expression_statement (assignment (identifier_sections) identifier_sections (call (attribute (identifier_self) identifier_self (identifier_generate_sections) identifier_generate_sections )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_paginated) identifier_paginated )attribute (block (expression_statement (assignment (identifier_p) identifier_p (call (identifier_Paginator) identifier_Paginator (argument_list (identifier_sections) identifier_sections (integer_25) integer_25 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_page) identifier_page (call (attribute (attribute (identifier_request) identifier_request (identifier_GET) identifier_GET )attribute (identifier_get) identifier_get )attribute (argument_list (string_'page') string_'page' )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_sections) identifier_sections (call (attribute (identifier_p) identifier_p (identifier_page) identifier_page )attribute (argument_list (identifier_page) identifier_page )argument_list )call )assignment )expression_statement )block (except_clause (identifier_PageNotAnInteger) identifier_PageNotAnInteger (block (expression_statement (assignment (identifier_sections) identifier_sections (call (attribute (identifier_p) identifier_p (identifier_page) identifier_page )attribute (argument_list (integer_1) integer_1 )argument_list )call )assignment )expression_statement )block )except_clause (except_clause (identifier_EmptyPage) identifier_EmptyPage (block (expression_statement (assignment (identifier_sections) identifier_sections (call (attribute (identifier_p) identifier_p (identifier_page) identifier_page )attribute (argument_list (attribute (identifier_p) identifier_p (identifier_num_pages) identifier_num_pages )attribute )argument_list )call )assignment )expression_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_pageUpper) identifier_pageUpper (binary_operator (call (identifier_int) identifier_int (argument_list (attribute (identifier_p) identifier_p (identifier_num_pages) identifier_num_pages )attribute )argument_list )call (integer_2) integer_2 )binary_operator )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_pageLower) identifier_pageLower (binary_operator (call (identifier_int) identifier_int (argument_list (identifier_page) identifier_page )argument_list )call (integer_2) integer_2 )binary_operator )assignment )expression_statement )block (except_clause (identifier_TypeError) identifier_TypeError (block (expression_statement (assignment (identifier_pageLower) identifier_pageLower (unary_operator (integer_999) integer_999 )unary_operator )assignment )expression_statement )block )except_clause )try_statement )block (else_clause (block (expression_statement (assignment (identifier_pageUpper) identifier_pageUpper (None) None )assignment )expression_statement (expression_statement (assignment (identifier_pageLower) identifier_pageLower (None) None )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_context) identifier_context (dictionary (pair (string_'sections') string_'sections' (identifier_sections) identifier_sections )pair (pair (string_'page_title') string_'page_title' (call (attribute (identifier_self) identifier_self (identifier_generate_page_title) identifier_generate_page_title )attribute (argument_list )argument_list )call )pair (pair (string_'browse_type') string_'browse_type' (attribute (identifier_self) identifier_self (identifier_browse_type) identifier_browse_type )attribute )pair (pair (string_'pageUpper') string_'pageUpper' (identifier_pageUpper) identifier_pageUpper )pair (pair (string_'pageLower') string_'pageLower' (identifier_pageLower) identifier_pageLower )pair )dictionary )assignment )expression_statement (return_statement (call (identifier_render) identifier_render (argument_list (identifier_request) identifier_request (attribute (identifier_self) identifier_self (identifier_template_path) identifier_template_path )attribute (identifier_context) identifier_context )argument_list )call )return_statement )block )function_definition )module
View for HTTP GET method. Returns template and context from generate_page_title and generate_sections to populate template.
(module (function_definition (function_name_mouse_press_event) function_name_mouse_press_event (parameters (identifier_self) identifier_self (identifier_x) identifier_x (identifier_y) identifier_y (identifier_button) identifier_button )parameters (block (if_statement (comparison_operator (identifier_button) identifier_button (integer_1) integer_1 )comparison_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Left mouse button pressed @") string_"Left mouse button pressed @" (identifier_x) identifier_x (identifier_y) identifier_y )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_button) identifier_button (integer_2) integer_2 )comparison_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Right mouse button pressed @") string_"Right mouse button pressed @" (identifier_x) identifier_x (identifier_y) identifier_y )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Reports left and right mouse button presses + position
(module (function_definition (function_name_add_metric_group_definition) function_name_add_metric_group_definition (parameters (identifier_self) identifier_self (identifier_definition) identifier_definition )parameters (block (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_definition) identifier_definition (identifier_FakedMetricGroupDefinition) identifier_FakedMetricGroupDefinition )argument_list )call )assert_statement (expression_statement (assignment (identifier_group_name) identifier_group_name (attribute (identifier_definition) identifier_definition (identifier_name) identifier_name )attribute )assignment )expression_statement (if_statement (comparison_operator (identifier_group_name) identifier_group_name (attribute (identifier_self) identifier_self (identifier__metric_group_defs) identifier__metric_group_defs )attribute )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (concatenated_string (string_"A metric group definition with this name ") string_"A metric group definition with this name " (string_"already exists: {}") string_"already exists: {}" )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_group_name) identifier_group_name )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__metric_group_defs) identifier__metric_group_defs )attribute (identifier_group_name) identifier_group_name )subscript (identifier_definition) identifier_definition )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__metric_group_def_names) identifier__metric_group_def_names )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_group_name) identifier_group_name )argument_list )call )expression_statement )block )function_definition )module
Add a faked metric group definition. The definition will be used: * For later addition of faked metrics responses. * For returning the metric-group-info objects in the response of the Create Metrics Context operations. For defined metric groups, see chapter "Metric groups" in the :term:`HMC API` book. Parameters: definition (:class:~zhmcclient.FakedMetricGroupDefinition`): Definition of the metric group. Raises: ValueError: A metric group definition with this name already exists.
(module (function_definition (function_name_as_dict) function_name_as_dict (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_d) identifier_d (dictionary (pair (string_"@module") string_"@module" (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier___module__) identifier___module__ )attribute )pair (pair (string_"@class") string_"@class" (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute )pair (pair (string_"structure") string_"structure" (call (attribute (attribute (identifier_self) identifier_self (identifier_structure) identifier_structure )attribute (identifier_as_dict) identifier_as_dict )attribute (argument_list )argument_list )call )pair (pair (string_"frequencies") string_"frequencies" (call (identifier_list) identifier_list (argument_list (attribute (identifier_self) identifier_self (identifier_frequencies) identifier_frequencies )attribute )argument_list )call )pair (pair (string_"densities") string_"densities" (call (identifier_list) identifier_list (argument_list (attribute (identifier_self) identifier_self (identifier_densities) identifier_densities )attribute )argument_list )call )pair (pair (string_"pdos") string_"pdos" (list )list )pair )dictionary )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_pdos) identifier_pdos )attribute )argument_list )call (integer_0) integer_0 )comparison_operator (block (for_statement (identifier_at) identifier_at (attribute (identifier_self) identifier_self (identifier_structure) identifier_structure )attribute (block (expression_statement (call (attribute (subscript (identifier_d) identifier_d (string_"pdos") string_"pdos" )subscript (identifier_append) identifier_append )attribute (argument_list (call (identifier_list) identifier_list (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_pdos) identifier_pdos )attribute (identifier_at) identifier_at )subscript )argument_list )call )argument_list )call )expression_statement )block )for_statement )block )if_statement (return_statement (identifier_d) identifier_d )return_statement )block )function_definition )module
Json-serializable dict representation of CompletePhononDos.
(module (function_definition (function_name_param_redirect) function_name_param_redirect (parameters (identifier_request) identifier_request (identifier_viewname) identifier_viewname (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern )parameters (block (expression_statement (assignment (identifier_url) identifier_url (call (identifier_reverse) identifier_reverse (argument_list (identifier_viewname) identifier_viewname (identifier_PARAMS_URL_CONF) identifier_PARAMS_URL_CONF (identifier_args) identifier_args )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_params) identifier_params (call (attribute (call (attribute (attribute (identifier_request) identifier_request (identifier_GET) identifier_GET )attribute (identifier_urlencode) identifier_urlencode )attribute (argument_list )argument_list )call (identifier_split) identifier_split )attribute (argument_list (string_'&') string_'&' )argument_list )call )assignment )expression_statement (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_request) identifier_request (string_'cparam') string_'cparam' )argument_list )call (block (for_statement (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (attribute (identifier_request) identifier_request (identifier_cparam) identifier_cparam )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_params) identifier_params (identifier_append) identifier_append )attribute (argument_list (call (attribute (string_'{0}={1}') string_'{0}={1}' (identifier_format) identifier_format )attribute (argument_list (identifier_k) identifier_k (identifier_v) identifier_v )argument_list )call )argument_list )call )expression_statement )block )for_statement )block )if_statement (expression_statement (assignment (identifier_new_params) identifier_new_params (call (attribute (string_'&') string_'&' (identifier_join) identifier_join )attribute (generator_expression (identifier_x) identifier_x (for_in_clause (identifier_x) identifier_x (identifier_params) identifier_params )for_in_clause (if_clause (comparison_operator (identifier_x) identifier_x (string_'') string_'' )comparison_operator )if_clause )generator_expression )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_new_params) identifier_new_params )argument_list )call (integer_0) integer_0 )comparison_operator (block (return_statement (call (identifier_HttpResponseRedirect) identifier_HttpResponseRedirect (argument_list (call (attribute (string_'{0}?{1}') string_'{0}?{1}' (identifier_format) identifier_format )attribute (argument_list (identifier_url) identifier_url (identifier_new_params) identifier_new_params )argument_list )call )argument_list )call )return_statement )block )if_statement (return_statement (call (identifier_HttpResponseRedirect) identifier_HttpResponseRedirect (argument_list (identifier_url) identifier_url )argument_list )call )return_statement )block )function_definition )module
Redirect and keep URL parameters if any.
(module (function_definition (function_name__close_pidfile) function_name__close_pidfile (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__pid_fd) identifier__pid_fd )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_close) identifier_close )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__pid_fd) identifier__pid_fd )attribute )argument_list )call )expression_statement )block )if_statement (try_statement (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_remove) identifier_remove )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_pidfile) identifier_pidfile )attribute )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_OSError) identifier_OSError (as_pattern_target (identifier_ex) identifier_ex )as_pattern_target )as_pattern (block (if_statement (comparison_operator (attribute (identifier_ex) identifier_ex (identifier_errno) identifier_errno )attribute (attribute (identifier_errno) identifier_errno (identifier_ENOENT) identifier_ENOENT )attribute )comparison_operator (block (raise_statement )raise_statement )block )if_statement )block )except_clause )try_statement )block )function_definition )module
Closes and removes the PID file.
(module (function_definition (function_name_ToOBMag) function_name_ToOBMag (parameters (identifier_self) identifier_self (identifier_wave) identifier_wave (identifier_flux) identifier_flux (default_parameter (identifier_area) identifier_area (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_area) identifier_area (conditional_expression (identifier_area) identifier_area (identifier_area) identifier_area (attribute (identifier_refs) identifier_refs (identifier_PRIMARY_AREA) identifier_PRIMARY_AREA )attribute )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_bin_widths) identifier_bin_widths (line_continuation_\) line_continuation_\ (call (attribute (identifier_binning) identifier_binning (identifier_calculate_bin_widths) identifier_calculate_bin_widths )attribute (argument_list (call (attribute (identifier_binning) identifier_binning (identifier_calculate_bin_edges) identifier_calculate_bin_edges )attribute (argument_list (identifier_wave) identifier_wave )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_arg) identifier_arg (binary_operator (binary_operator (identifier_flux) identifier_flux (identifier_bin_widths) identifier_bin_widths )binary_operator (identifier_area) identifier_area )binary_operator )assignment )expression_statement (return_statement (binary_operator (unary_operator (float_1.085736) float_1.085736 )unary_operator (call (attribute (identifier_N) identifier_N (identifier_log) identifier_log )attribute (argument_list (identifier_arg) identifier_arg )argument_list )call )binary_operator )return_statement )block )function_definition )module
Convert to ``obmag``. .. math:: \\textnormal{obmag} = -2.5 \\; \\log(\\delta \\lambda \\; \\times \\; \\textnormal{area} \\; \\times \\; \\textnormal{photlam}) where :math:`\\delta \\lambda` represent bin widths derived from :func:`~pysynphot.binning.calculate_bin_edges` and :func:`~pysynphot.binning.calculate_bin_widths`, using the input wavelength values as bin centers. Parameters ---------- wave, flux : number or array_like Wavelength and flux values to be used for conversion. area : number or `None` Telescope collecting area. If not given, default value from :ref:`pysynphot-refdata` is used. Returns ------- result : number or array_like Converted values.
(module (function_definition (function_name_serialize_to_file) function_name_serialize_to_file (parameters (identifier_root_processor) identifier_root_processor (identifier_value) identifier_value (identifier_xml_file_path) identifier_xml_file_path (default_parameter (identifier_encoding) identifier_encoding (string_'utf-8') string_'utf-8' )default_parameter (default_parameter (identifier_indent) identifier_indent (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_serialized_value) identifier_serialized_value (call (identifier_serialize_to_string) identifier_serialize_to_string (argument_list (identifier_root_processor) identifier_root_processor (identifier_value) identifier_value (identifier_indent) identifier_indent )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_xml_file_path) identifier_xml_file_path (string_'w') string_'w' (keyword_argument (identifier_encoding) identifier_encoding (identifier_encoding) identifier_encoding )keyword_argument )argument_list )call (as_pattern_target (identifier_xml_file) identifier_xml_file )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_xml_file) identifier_xml_file (identifier_write) identifier_write )attribute (argument_list (identifier_serialized_value) identifier_serialized_value )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Serialize the value to an XML file using the root processor. :param root_processor: Root processor of the XML document. :param value: Value to serialize. :param xml_file_path: Path to the XML file to which the serialized value will be written. :param encoding: Encoding of the file. :param indent: If specified, then the XML will be formatted with the specified indentation.
(module (function_definition (function_name_build_pipelines_lsst_io_configs) function_name_build_pipelines_lsst_io_configs (parameters (keyword_separator )keyword_separator (identifier_project_name) identifier_project_name (default_parameter (identifier_copyright) identifier_copyright (None) None )default_parameter )parameters (block (expression_statement (call (attribute (identifier_sys) identifier_sys (identifier_setrecursionlimit) identifier_setrecursionlimit )attribute (argument_list (integer_2000) integer_2000 )argument_list )call )expression_statement (expression_statement (assignment (identifier_c) identifier_c (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_c) identifier_c (call (identifier__insert_common_sphinx_configs) identifier__insert_common_sphinx_configs (argument_list (identifier_c) identifier_c (keyword_argument (identifier_project_name) identifier_project_name (identifier_project_name) identifier_project_name )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_c) identifier_c (call (identifier__insert_html_configs) identifier__insert_html_configs (argument_list (identifier_c) identifier_c (keyword_argument (identifier_project_name) identifier_project_name (identifier_project_name) identifier_project_name )keyword_argument (keyword_argument (identifier_short_project_name) identifier_short_project_name (identifier_project_name) identifier_project_name )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_c) identifier_c (call (identifier__insert_extensions) identifier__insert_extensions (argument_list (identifier_c) identifier_c )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_c) identifier_c (call (identifier__insert_intersphinx_mapping) identifier__insert_intersphinx_mapping (argument_list (identifier_c) identifier_c )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_c) identifier_c (call (identifier__insert_automodapi_configs) identifier__insert_automodapi_configs (argument_list (identifier_c) identifier_c )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_c) identifier_c (call (identifier__insert_matplotlib_configs) identifier__insert_matplotlib_configs (argument_list (identifier_c) identifier_c )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_c) identifier_c (call (identifier__insert_graphviz_configs) identifier__insert_graphviz_configs (argument_list (identifier_c) identifier_c )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_c) identifier_c (call (identifier__insert_eups_version) identifier__insert_eups_version (argument_list (identifier_c) identifier_c )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_date) identifier_date (call (attribute (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute (identifier_now) identifier_now )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_c) identifier_c (string_'today') string_'today' )subscript (call (attribute (identifier_date) identifier_date (identifier_strftime) identifier_strftime )attribute (argument_list (string_'%Y-%m-%d') string_'%Y-%m-%d' )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_c) identifier_c (string_'copyright') string_'copyright' )subscript (call (attribute (string_'2015-{year} LSST contributors') string_'2015-{year} LSST contributors' (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_year) identifier_year (attribute (identifier_date) identifier_date (identifier_year) identifier_year )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_c) identifier_c (string_'todo_include_todos') string_'todo_include_todos' )subscript (False) False )assignment )expression_statement (expression_statement (assignment (subscript (identifier_c) identifier_c (string_'exclude_patterns') string_'exclude_patterns' )subscript (list (string_'README.rst') string_'README.rst' (string_'_build') string_'_build' (string_'releases/note-source/*.rst') string_'releases/note-source/*.rst' (string_'releases/tickets-source/*.rst') string_'releases/tickets-source/*.rst' (string_'ups') string_'ups' (string_'.pyvenv') string_'.pyvenv' (string_'.github') string_'.github' (string_'home') string_'home' )list )assignment )expression_statement (expression_statement (assignment (identifier_c) identifier_c (call (identifier__insert_rst_epilog) identifier__insert_rst_epilog (argument_list (identifier_c) identifier_c )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_c) identifier_c (call (identifier__insert_jinja_configuration) identifier__insert_jinja_configuration (argument_list (identifier_c) identifier_c )argument_list )call )assignment )expression_statement (return_statement (identifier_c) identifier_c )return_statement )block )function_definition )module
Build a `dict` of Sphinx configurations that populate the ``conf.py`` of the main pipelines_lsst_io Sphinx project for LSST Science Pipelines documentation. The ``conf.py`` file can ingest these configurations via:: from documenteer.sphinxconfig.stackconf import \ build_pipelines_lsst_io_configs _g = globals() _g.update(build_pipelines_lsst_io_configs( project_name='LSST Science Pipelines') You can subsequently customize the Sphinx configuration by directly assigning global variables, as usual in a Sphinx ``config.py``, e.g.:: copyright = '2016 Association of Universities for ' 'Research in Astronomy, Inc.' Parameters ---------- project_name : `str` Name of the project copyright : `str`, optional Copyright statement. Do not include the 'Copyright (c)' string; it'll be added automatically. Returns ------- c : dict Dictionary of configurations that should be added to the ``conf.py`` global namespace via:: _g = global() _g.update(c)
(module (function_definition (function_name_wait) function_name_wait (parameters (identifier_self) identifier_self (keyword_separator )keyword_separator (default_parameter (identifier_block) identifier_block (True) True )default_parameter (default_parameter (identifier_timeout) identifier_timeout (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_cleared) identifier_cleared (not_operator (call (attribute (attribute (identifier_self) identifier_self (identifier_backend) identifier_backend )attribute (identifier_decr) identifier_decr )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_key) identifier_key )attribute (integer_1) integer_1 (integer_1) integer_1 (attribute (identifier_self) identifier_self (identifier_ttl) identifier_ttl )attribute )argument_list )call )not_operator )assignment )expression_statement (if_statement (identifier_cleared) identifier_cleared (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_backend) identifier_backend )attribute (identifier_wait_notify) identifier_wait_notify )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_key_events) identifier_key_events )attribute (attribute (identifier_self) identifier_self (identifier_ttl) identifier_ttl )attribute )argument_list )call )expression_statement (return_statement (True) True )return_statement )block )if_statement (if_statement (identifier_block) identifier_block (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_backend) identifier_backend )attribute (identifier_wait) identifier_wait )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_key_events) identifier_key_events )attribute (identifier_timeout) identifier_timeout )argument_list )call )return_statement )block )if_statement (return_statement (False) False )return_statement )block )function_definition )module
Signal that a party has reached the barrier. Warning: Barrier blocking is currently only supported by the stub and Redis backends. Warning: Re-using keys between blocking calls may lead to undefined behaviour. Make sure your barrier keys are always unique (use a UUID). Parameters: block(bool): Whether or not to block while waiting for the other parties. timeout(int): The maximum number of milliseconds to wait for the barrier to be cleared. Returns: bool: Whether or not the barrier has been reached by all parties.
(module (function_definition (function_name_get_graphql_schema_from_orientdb_schema_data) function_name_get_graphql_schema_from_orientdb_schema_data (parameters (identifier_schema_data) identifier_schema_data (default_parameter (identifier_class_to_field_type_overrides) identifier_class_to_field_type_overrides (None) None )default_parameter (default_parameter (identifier_hidden_classes) identifier_hidden_classes (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_class_to_field_type_overrides) identifier_class_to_field_type_overrides (None) None )comparison_operator (block (expression_statement (assignment (identifier_class_to_field_type_overrides) identifier_class_to_field_type_overrides (call (identifier_dict) identifier_dict (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_hidden_classes) identifier_hidden_classes (None) None )comparison_operator (block (expression_statement (assignment (identifier_hidden_classes) identifier_hidden_classes (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_schema_graph) identifier_schema_graph (call (identifier_SchemaGraph) identifier_SchemaGraph (argument_list (identifier_schema_data) identifier_schema_data )argument_list )call )assignment )expression_statement (return_statement (call (identifier_get_graphql_schema_from_schema_graph) identifier_get_graphql_schema_from_schema_graph (argument_list (identifier_schema_graph) identifier_schema_graph (identifier_class_to_field_type_overrides) identifier_class_to_field_type_overrides (identifier_hidden_classes) identifier_hidden_classes )argument_list )call )return_statement )block )function_definition )module
Construct a GraphQL schema from an OrientDB schema. Args: schema_data: list of dicts describing the classes in the OrientDB schema. The following format is the way the data is structured in OrientDB 2. See the README.md file for an example of how to query this data. Each dict has the following string fields: - name: string, the name of the class. - superClasses (optional): list of strings, the name of the class's superclasses. - superClass (optional): string, the name of the class's superclass. May be used instead of superClasses if there is only one superClass. Used for backwards compatibility with OrientDB. - customFields (optional): dict, string -> string, data defined on the class instead of instances of the class. - abstract: bool, true if the class is abstract. - properties: list of dicts, describing the class's properties. Each property dictionary has the following string fields: - name: string, the name of the property. - type: int, builtin OrientDB type ID of the property. See schema_properties.py for the mapping. - linkedType (optional): int, if the property is a collection of builtin OrientDB objects, then it indicates their type ID. - linkedClass (optional): string, if the property is a collection of class instances, then it indicates the name of the class. If class is an edge class, and the field name is either 'in' or 'out', then it describes the name of an endpoint of the edge. - defaultValue: string, the textual representation of the default value for the property, as returned by OrientDB's schema introspection code, e.g., '{}' for the embedded set type. Note that if the property is a collection type, it must have a default value. class_to_field_type_overrides: optional dict, class name -> {field name -> field type}, (string -> {string -> GraphQLType}). Used to override the type of a field in the class where it's first defined and all the class's subclasses. hidden_classes: optional set of strings, classes to not include in the GraphQL schema. Returns: tuple of (GraphQL schema object, GraphQL type equivalence hints dict). The tuple is of type (GraphQLSchema, {GraphQLObjectType -> GraphQLUnionType}).
(module (function_definition (function_name_has_publish_permission) function_name_has_publish_permission (parameters (identifier_self) identifier_self (identifier_request) identifier_request (default_parameter (identifier_obj) identifier_obj (None) None )default_parameter )parameters (block (if_statement (call (identifier_is_automatic_publishing_enabled) identifier_is_automatic_publishing_enabled (argument_list (attribute (identifier_self) identifier_self (identifier_model) identifier_model )attribute )argument_list )call (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_user_obj) identifier_user_obj (attribute (identifier_request) identifier_request (identifier_user) identifier_user )attribute )assignment )expression_statement (if_statement (not_operator (attribute (identifier_user_obj) identifier_user_obj (identifier_is_active) identifier_is_active )attribute )not_operator (block (return_statement (False) False )return_statement )block )if_statement (if_statement (attribute (identifier_user_obj) identifier_user_obj (identifier_is_superuser) identifier_is_superuser )attribute (block (return_statement (True) True )return_statement )block )if_statement (if_statement (call (attribute (identifier_user_obj) identifier_user_obj (identifier_has_perm) identifier_has_perm )attribute (argument_list (binary_operator (string_'%s.can_publish') string_'%s.can_publish' (attribute (attribute (identifier_self) identifier_self (identifier_opts) identifier_opts )attribute (identifier_app_label) identifier_app_label )attribute )binary_operator )argument_list )call (block (return_statement (True) True )return_statement )block )if_statement (if_statement (boolean_operator (boolean_operator (call (attribute (identifier_user_obj) identifier_user_obj (identifier_has_perm) identifier_has_perm )attribute (argument_list (binary_operator (string_'%s.can_republish') string_'%s.can_republish' (attribute (attribute (identifier_self) identifier_self (identifier_opts) identifier_opts )attribute (identifier_app_label) identifier_app_label )attribute )binary_operator )argument_list )call (line_continuation_\) line_continuation_\ (identifier_obj) identifier_obj )boolean_operator (call (identifier_getattr) identifier_getattr (argument_list (identifier_obj) identifier_obj (string_'has_been_published') string_'has_been_published' (False) False )argument_list )call )boolean_operator (block (return_statement (True) True )return_statement )block )if_statement (return_statement (False) False )return_statement )block )function_definition )module
Determines if the user has permissions to publish. :param request: Django request object. :param obj: The object to determine if the user has permissions to publish. :return: Boolean.
(module (function_definition (function_name_azureContainerSAS) function_name_azureContainerSAS (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 (return_statement (call (attribute (identifier_self) identifier_self (identifier__makeApiCall) identifier__makeApiCall )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_funcinfo) identifier_funcinfo )attribute (string_"azureContainerSAS") string_"azureContainerSAS" )subscript (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Get Shared-Access-Signature for Azure Container Get a shared access signature (SAS) string for use with a specific Azure Blob Storage container. The `level` parameter can be `read-write` or `read-only` and determines which type of credentials are returned. If level is read-write, it will create the container if it doesn't already exist. This method gives output: ``v1/azure-container-response.json#`` This method is ``stable``
(module (function_definition (function_name_css_number) function_name_css_number (parameters (identifier_self) identifier_self (identifier_path) identifier_path (default_parameter (identifier_default) identifier_default (identifier_NULL) identifier_NULL )default_parameter (default_parameter (identifier_ignore_spaces) identifier_ignore_spaces (False) False )default_parameter (default_parameter (identifier_smart) identifier_smart (False) False )default_parameter (default_parameter (identifier_make_int) identifier_make_int (True) True )default_parameter )parameters (block (try_statement (block (expression_statement (assignment (identifier_text) identifier_text (call (attribute (identifier_self) identifier_self (identifier_css_text) identifier_css_text )attribute (argument_list (identifier_path) identifier_path (keyword_argument (identifier_smart) identifier_smart (identifier_smart) identifier_smart )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (identifier_find_number) identifier_find_number (argument_list (identifier_text) identifier_text (keyword_argument (identifier_ignore_spaces) identifier_ignore_spaces (identifier_ignore_spaces) identifier_ignore_spaces )keyword_argument (keyword_argument (identifier_make_int) identifier_make_int (identifier_make_int) identifier_make_int )keyword_argument )argument_list )call )return_statement )block (except_clause (identifier_IndexError) identifier_IndexError (block (if_statement (comparison_operator (identifier_default) identifier_default (identifier_NULL) identifier_NULL )comparison_operator (block (raise_statement )raise_statement )block (else_clause (block (return_statement (identifier_default) identifier_default )return_statement )block )else_clause )if_statement )block )except_clause )try_statement )block )function_definition )module
Find number in normalized text of node which matches the given css path.
(module (function_definition (function_name_predict) function_name_predict (parameters (identifier_self) identifier_self (identifier_date) identifier_date (default_parameter (identifier_obs_code) identifier_obs_code (integer_568) integer_568 )default_parameter )parameters (block (expression_statement (assignment (identifier_time) identifier_time (call (identifier_Time) identifier_Time (argument_list (identifier_date) identifier_date (keyword_argument (identifier_scale) identifier_scale (string_'utc') string_'utc' )keyword_argument (keyword_argument (identifier_precision) identifier_precision (integer_6) integer_6 )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_jd) identifier_jd (call (attribute (identifier_ctypes) identifier_ctypes (identifier_c_double) identifier_c_double )attribute (argument_list (attribute (identifier_time) identifier_time (identifier_jd) identifier_jd )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (attribute (attribute (identifier_self) identifier_self (identifier_orbfit) identifier_orbfit )attribute (identifier_predict) identifier_predict )attribute (identifier_restype) identifier_restype )attribute (call (attribute (identifier_ctypes) identifier_ctypes (identifier_POINTER) identifier_POINTER )attribute (argument_list (binary_operator (attribute (identifier_ctypes) identifier_ctypes (identifier_c_double) identifier_c_double )attribute (integer_5) integer_5 )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (attribute (attribute (identifier_self) identifier_self (identifier_orbfit) identifier_orbfit )attribute (identifier_predict) identifier_predict )attribute (identifier_argtypes) identifier_argtypes )attribute (list (attribute (identifier_ctypes) identifier_ctypes (identifier_c_char_p) identifier_c_char_p )attribute (attribute (identifier_ctypes) identifier_ctypes (identifier_c_double) identifier_c_double )attribute (attribute (identifier_ctypes) identifier_ctypes (identifier_c_int) identifier_c_int )attribute )list )assignment )expression_statement (expression_statement (assignment (identifier_predict) identifier_predict (call (attribute (attribute (identifier_self) identifier_self (identifier_orbfit) identifier_orbfit )attribute (identifier_predict) identifier_predict )attribute (argument_list (call (attribute (identifier_ctypes) identifier_ctypes (identifier_c_char_p) identifier_c_char_p )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_abg) identifier_abg )attribute (identifier_name) identifier_name )attribute )argument_list )call (identifier_jd) identifier_jd (call (attribute (identifier_ctypes) identifier_ctypes (identifier_c_int) identifier_c_int )attribute (argument_list (identifier_obs_code) identifier_obs_code )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_coordinate) identifier_coordinate )attribute (call (attribute (identifier_coordinates) identifier_coordinates (identifier_SkyCoord) identifier_SkyCoord )attribute (argument_list (subscript (attribute (identifier_predict) identifier_predict (identifier_contents) identifier_contents )attribute (integer_0) integer_0 )subscript (subscript (attribute (identifier_predict) identifier_predict (identifier_contents) identifier_contents )attribute (integer_1) integer_1 )subscript (keyword_argument (identifier_unit) identifier_unit (tuple (attribute (identifier_units) identifier_units (identifier_degree) identifier_degree )attribute (attribute (identifier_units) identifier_units (identifier_degree) identifier_degree )attribute )tuple )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_dra) identifier_dra )attribute (subscript (attribute (identifier_predict) identifier_predict (identifier_contents) identifier_contents )attribute (integer_2) integer_2 )subscript )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_ddec) identifier_ddec )attribute (subscript (attribute (identifier_predict) identifier_predict (identifier_contents) identifier_contents )attribute (integer_3) integer_3 )subscript )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_pa) identifier_pa )attribute (subscript (attribute (identifier_predict) identifier_predict (identifier_contents) identifier_contents )attribute (integer_4) integer_4 )subscript )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_date) identifier_date )attribute (call (identifier_str) identifier_str (argument_list (identifier_time) identifier_time )argument_list )call )assignment )expression_statement )block )function_definition )module
use the bk predict method to compute the location of the source on the given date.
(module (function_definition (function_name_average_datetimes) function_name_average_datetimes (parameters (identifier_dt_list) identifier_dt_list )parameters (block (if_statement (comparison_operator (attribute (identifier_sys) identifier_sys (identifier_version_info) identifier_version_info )attribute (tuple (integer_3) integer_3 (integer_3) integer_3 )tuple )comparison_operator (block (import_statement (dotted_name (identifier_time) identifier_time )dotted_name )import_statement (function_definition (function_name_timestamp_func) function_name_timestamp_func (parameters (identifier_dt) identifier_dt )parameters (block (return_statement (call (attribute (identifier_time) identifier_time (identifier_mktime) identifier_mktime )attribute (argument_list (call (attribute (identifier_dt) identifier_dt (identifier_timetuple) identifier_timetuple )attribute (argument_list )argument_list )call )argument_list )call )return_statement )block )function_definition )block (else_clause (block (expression_statement (assignment (identifier_timestamp_func) identifier_timestamp_func (attribute (identifier_datetime) identifier_datetime (identifier_timestamp) identifier_timestamp )attribute )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_total) identifier_total (list_comprehension (call (identifier_timestamp_func) identifier_timestamp_func (argument_list (identifier_dt) identifier_dt )argument_list )call (for_in_clause (identifier_dt) identifier_dt (identifier_dt_list) identifier_dt_list )for_in_clause )list_comprehension )assignment )expression_statement (return_statement (call (attribute (identifier_datetime) identifier_datetime (identifier_fromtimestamp) identifier_fromtimestamp )attribute (argument_list (binary_operator (call (identifier_sum) identifier_sum (argument_list (identifier_total) identifier_total )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_total) identifier_total )argument_list )call )binary_operator )argument_list )call )return_statement )block )function_definition )module
Average a series of datetime objects. .. note:: This function assumes all datetime objects are naive and in the same time zone (UTC). Args: dt_list (iterable): Datetime objects to average Returns: Average datetime as a datetime object
(module (function_definition (function_name_marginalize_out) function_name_marginalize_out (parameters (identifier_node_indices) identifier_node_indices (identifier_tpm) identifier_tpm )parameters (block (return_statement (binary_operator (call (attribute (identifier_tpm) identifier_tpm (identifier_sum) identifier_sum )attribute (argument_list (call (identifier_tuple) identifier_tuple (argument_list (identifier_node_indices) identifier_node_indices )argument_list )call (keyword_argument (identifier_keepdims) identifier_keepdims (True) True )keyword_argument )argument_list )call (parenthesized_expression (call (attribute (subscript (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (attribute (identifier_tpm) identifier_tpm (identifier_shape) identifier_shape )attribute )argument_list )call (call (identifier_list) identifier_list (argument_list (identifier_node_indices) identifier_node_indices )argument_list )call )subscript (identifier_prod) identifier_prod )attribute (argument_list )argument_list )call )parenthesized_expression )binary_operator )return_statement )block )function_definition )module
Marginalize out nodes from a TPM. Args: node_indices (list[int]): The indices of nodes to be marginalized out. tpm (np.ndarray): The TPM to marginalize the node out of. Returns: np.ndarray: A TPM with the same number of dimensions, with the nodes marginalized out.
(module (function_definition (function_name__get_per_location_glob) function_name__get_per_location_glob (parameters (identifier_tasks) identifier_tasks (identifier_outputs) identifier_outputs (identifier_regexes) identifier_regexes )parameters (block (expression_statement (assignment (identifier_paths) identifier_paths (list_comprehension (attribute (identifier_o) identifier_o (identifier_path) identifier_path )attribute (for_in_clause (identifier_o) identifier_o (identifier_outputs) identifier_outputs )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_matches) identifier_matches (list_comprehension (call (attribute (identifier_r) identifier_r (identifier_search) identifier_search )attribute (argument_list (identifier_p) identifier_p )argument_list )call (for_in_clause (pattern_list (identifier_r) identifier_r (identifier_p) identifier_p )pattern_list (call (identifier_zip) identifier_zip (argument_list (identifier_regexes) identifier_regexes (identifier_paths) identifier_paths )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (for_statement (pattern_list (identifier_m) identifier_m (identifier_p) identifier_p (identifier_t) identifier_t )pattern_list (call (identifier_zip) identifier_zip (argument_list (identifier_matches) identifier_matches (identifier_paths) identifier_paths (identifier_tasks) identifier_tasks )argument_list )call (block (if_statement (comparison_operator (identifier_m) identifier_m (None) None )comparison_operator (block (raise_statement (call (identifier_NotImplementedError) identifier_NotImplementedError (argument_list (binary_operator (string_"Couldn't deduce datehour representation in output path %r of task %s") string_"Couldn't deduce datehour representation in output path %r of task %s" (tuple (identifier_p) identifier_p (identifier_t) identifier_t )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement )block )for_statement (expression_statement (assignment (identifier_n_groups) identifier_n_groups (call (identifier_len) identifier_len (argument_list (call (attribute (subscript (identifier_matches) identifier_matches (integer_0) integer_0 )subscript (identifier_groups) identifier_groups )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_positions) identifier_positions (list_comprehension (subscript (call (identifier_most_common) identifier_most_common (generator_expression (tuple (call (attribute (identifier_m) identifier_m (identifier_start) identifier_start )attribute (argument_list (identifier_i) identifier_i )argument_list )call (call (attribute (identifier_m) identifier_m (identifier_end) identifier_end )attribute (argument_list (identifier_i) identifier_i )argument_list )call )tuple (for_in_clause (identifier_m) identifier_m (identifier_matches) identifier_matches )for_in_clause )generator_expression )call (integer_0) integer_0 )subscript (for_in_clause (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (integer_1) integer_1 (binary_operator (identifier_n_groups) identifier_n_groups (integer_1) integer_1 )binary_operator )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_glob) identifier_glob (call (identifier_list) identifier_list (argument_list (subscript (identifier_paths) identifier_paths (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_start) identifier_start (identifier_end) identifier_end )pattern_list (identifier_positions) identifier_positions (block (expression_statement (assignment (identifier_glob) identifier_glob (binary_operator (binary_operator (subscript (identifier_glob) identifier_glob (slice (colon) colon (identifier_start) identifier_start )slice )subscript (binary_operator (list (string_'[0-9]') string_'[0-9]' )list (parenthesized_expression (binary_operator (identifier_end) identifier_end (identifier_start) identifier_start )binary_operator )parenthesized_expression )binary_operator )binary_operator (subscript (identifier_glob) identifier_glob (slice (identifier_end) identifier_end (colon) colon )slice )subscript )binary_operator )assignment )expression_statement )block )for_statement (return_statement (subscript (call (attribute (call (attribute (string_'') string_'' (identifier_join) identifier_join )attribute (argument_list (identifier_glob) identifier_glob )argument_list )call (identifier_rsplit) identifier_rsplit )attribute (argument_list (string_'/') string_'/' (integer_1) integer_1 )argument_list )call (integer_0) integer_0 )subscript )return_statement )block )function_definition )module
Builds a glob listing existing output paths. Esoteric reverse engineering, but worth it given that (compared to an equivalent contiguousness guarantee by naive complete() checks) requests to the filesystem are cut by orders of magnitude, and users don't even have to retrofit existing tasks anyhow.
(module (function_definition (function_name_reader) function_name_reader (parameters (identifier_stream) identifier_stream )parameters (block (expression_statement (assignment (identifier_string) identifier_string (call (attribute (identifier_stream) identifier_stream (identifier_read) identifier_read )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_decoder) identifier_decoder (attribute (call (attribute (identifier_json) identifier_json (identifier_JSONDecoder) identifier_JSONDecoder )attribute (argument_list )argument_list )call (identifier_raw_decode) identifier_raw_decode )attribute )assignment )expression_statement (expression_statement (assignment (identifier_index) identifier_index (call (attribute (call (attribute (identifier_START) identifier_START (identifier_match) identifier_match )attribute (argument_list (identifier_string) identifier_string (integer_0) integer_0 )argument_list )call (identifier_end) identifier_end )attribute (argument_list )argument_list )call )assignment )expression_statement (while_statement (comparison_operator (identifier_index) identifier_index (call (identifier_len) identifier_len (argument_list (identifier_string) identifier_string )argument_list )call )comparison_operator (block (expression_statement (assignment (pattern_list (identifier_obj) identifier_obj (identifier_end) identifier_end )pattern_list (call (identifier_decoder) identifier_decoder (argument_list (identifier_string) identifier_string (identifier_index) identifier_index )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_item) identifier_item (call (identifier_Item) identifier_Item (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_item) identifier_item (identifier_primitive) identifier_primitive )attribute (identifier_obj) identifier_obj )assignment )expression_statement (expression_statement (yield (identifier_item) identifier_item )yield )expression_statement (expression_statement (assignment (identifier_index) identifier_index (call (attribute (call (attribute (identifier_END) identifier_END (identifier_match) identifier_match )attribute (argument_list (identifier_string) identifier_string (identifier_end) identifier_end )argument_list )call (identifier_end) identifier_end )attribute (argument_list )argument_list )call )assignment )expression_statement )block )while_statement )block )function_definition )module
Read Items from a stream containing a JSON array.
(module (function_definition (function_name_has_files) function_name_has_files (parameters (identifier_the_path) identifier_the_path )parameters (block (expression_statement (assignment (identifier_the_path) identifier_the_path (call (identifier_Path) identifier_Path (argument_list (identifier_the_path) identifier_the_path )argument_list )call )assignment )expression_statement (try_statement (block (for_statement (identifier__) identifier__ (call (attribute (identifier_the_path) identifier_the_path (identifier_walkfiles) identifier_walkfiles )attribute (argument_list )argument_list )call (block (return_statement (True) True )return_statement )block )for_statement (return_statement (False) False )return_statement )block (except_clause (as_pattern (identifier_OSError) identifier_OSError (as_pattern_target (identifier_ex) identifier_ex )as_pattern_target )as_pattern (block (if_statement (comparison_operator (attribute (identifier_ex) identifier_ex (identifier_errno) identifier_errno )attribute (attribute (identifier_errno) identifier_errno (identifier_ENOENT) identifier_ENOENT )attribute )comparison_operator (block (return_statement (False) False )return_statement )block (else_clause (block (raise_statement )raise_statement )block )else_clause )if_statement )block )except_clause )try_statement )block )function_definition )module
Given a path, returns whether the path has any files in it or any subfolders. Works recursively.
(module (function_definition (function_name_search_nn) function_name_search_nn (parameters (identifier_self) identifier_self (identifier_point) identifier_point (default_parameter (identifier_dist) identifier_dist (None) None )default_parameter )parameters (block (return_statement (call (identifier_next) identifier_next (argument_list (call (identifier_iter) identifier_iter (argument_list (call (attribute (identifier_self) identifier_self (identifier_search_knn) identifier_search_knn )attribute (argument_list (identifier_point) identifier_point (integer_1) integer_1 (identifier_dist) identifier_dist )argument_list )call )argument_list )call (None) None )argument_list )call )return_statement )block )function_definition )module
Search the nearest node of the given point point must be an actual point, not a node. The nearest node to the point is returned. If a location of an actual node is used, the Node with this location will be returned (not its neighbor). dist is a distance function, expecting two points and returning a distance value. Distance values can be any comparable type. The result is a (node, distance) tuple.
(module (function_definition (function_name_polarity_as_string) function_name_polarity_as_string (parameters (identifier_self) identifier_self (default_parameter (identifier_add_colour) identifier_add_colour (True) True )default_parameter )parameters (block (with_statement (with_clause (with_item (attribute (identifier_self) identifier_self (identifier__mutex) identifier__mutex )attribute )with_item )with_clause (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_polarity) identifier_polarity )attribute (attribute (identifier_self) identifier_self (identifier_PROVIDED) identifier_PROVIDED )attribute )comparison_operator (block (expression_statement (assignment (identifier_result) identifier_result (expression_list (string_'Provided') string_'Provided' (list (string_'reset') string_'reset' )list )expression_list )assignment )expression_statement )block (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier_polarity) identifier_polarity )attribute (attribute (identifier_self) identifier_self (identifier_REQUIRED) identifier_REQUIRED )attribute )comparison_operator (block (expression_statement (assignment (identifier_result) identifier_result (expression_list (string_'Required') string_'Required' (list (string_'reset') string_'reset' )list )expression_list )assignment )expression_statement )block )elif_clause )if_statement (if_statement (identifier_add_colour) identifier_add_colour (block (return_statement (binary_operator (binary_operator (call (attribute (identifier_utils) identifier_utils (identifier_build_attr_string) identifier_build_attr_string )attribute (argument_list (subscript (identifier_result) identifier_result (integer_1) integer_1 )subscript (keyword_argument (identifier_supported) identifier_supported (identifier_add_colour) identifier_add_colour )keyword_argument )argument_list )call (line_continuation_\) line_continuation_\ (subscript (identifier_result) identifier_result (integer_0) integer_0 )subscript )binary_operator (call (attribute (identifier_utils) identifier_utils (identifier_build_attr_string) identifier_build_attr_string )attribute (argument_list (string_'reset') string_'reset' (keyword_argument (identifier_supported) identifier_supported (identifier_add_colour) identifier_add_colour )keyword_argument )argument_list )call )binary_operator )return_statement )block (else_clause (block (return_statement (subscript (identifier_result) identifier_result (integer_0) integer_0 )subscript )return_statement )block )else_clause )if_statement )block )with_statement )block )function_definition )module
Get the polarity of this interface as a string. @param add_colour If True, ANSI colour codes will be added to the string. @return A string describing the polarity of this interface.
(module (function_definition (function_name_fit_row) function_name_fit_row (parameters (identifier_connection) identifier_connection (identifier_row) identifier_row (identifier_unique_keys) identifier_unique_keys )parameters (block (expression_statement (assignment (identifier_new_columns) identifier_new_columns (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_column_name) identifier_column_name (identifier_column_value) identifier_column_value )pattern_list (call (identifier_list) identifier_list (argument_list (call (attribute (identifier_row) identifier_row (identifier_items) identifier_items )attribute (argument_list )argument_list )call )argument_list )call (block (expression_statement (assignment (identifier_new_column) identifier_new_column (call (attribute (identifier_sqlalchemy) identifier_sqlalchemy (identifier_Column) identifier_Column )attribute (argument_list (identifier_column_name) identifier_column_name (call (identifier_get_column_type) identifier_get_column_type (argument_list (identifier_column_value) identifier_column_value )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (not_operator (comparison_operator (identifier_column_name) identifier_column_name (call (identifier_list) identifier_list (argument_list (call (attribute (attribute (attribute (identifier__State) identifier__State (identifier_table) identifier_table )attribute (identifier_columns) identifier_columns )attribute (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )comparison_operator )not_operator (block (expression_statement (call (attribute (identifier_new_columns) identifier_new_columns (identifier_append) identifier_append )attribute (argument_list (identifier_new_column) identifier_new_column )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier__State) identifier__State (identifier_table) identifier_table )attribute (identifier_append_column) identifier_append_column )attribute (argument_list (identifier_new_column) identifier_new_column )argument_list )call )expression_statement )block )if_statement )block )for_statement (if_statement (attribute (identifier__State) identifier__State (identifier_table_pending) identifier_table_pending )attribute (block (expression_statement (call (identifier_create_table) identifier_create_table (argument_list (identifier_unique_keys) identifier_unique_keys )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (for_statement (identifier_new_column) identifier_new_column (identifier_new_columns) identifier_new_columns (block (expression_statement (call (identifier_add_column) identifier_add_column (argument_list (identifier_connection) identifier_connection (identifier_new_column) identifier_new_column )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Takes a row and checks to make sure it fits in the columns of the current table. If it does not fit, adds the required columns.
(module (function_definition (function_name_fetch_coords) function_name_fetch_coords (parameters (identifier_self) identifier_self (identifier_query) identifier_query )parameters (block (expression_statement (assignment (identifier_q) identifier_q (call (attribute (identifier_query) identifier_query (identifier_add_query_parameter) identifier_add_query_parameter )attribute (argument_list (keyword_argument (identifier_req) identifier_req (string_'coord') string_'coord' )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__parse_messages) identifier__parse_messages )attribute (argument_list (attribute (call (attribute (identifier_self) identifier_self (identifier_get_query) identifier_get_query )attribute (argument_list (identifier_q) identifier_q )argument_list )call (identifier_content) identifier_content )attribute )argument_list )call )return_statement )block )function_definition )module
Pull down coordinate data from the endpoint.
(module (function_definition (function_name_element_should_be_disabled) function_name_element_should_be_disabled (parameters (identifier_self) identifier_self (identifier_locator) identifier_locator (default_parameter (identifier_loglevel) identifier_loglevel (string_'INFO') string_'INFO' )default_parameter )parameters (block (if_statement (call (attribute (call (attribute (identifier_self) identifier_self (identifier__element_find) identifier__element_find )attribute (argument_list (identifier_locator) identifier_locator (True) True (True) True )argument_list )call (identifier_is_enabled) identifier_is_enabled )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_log_source) identifier_log_source )attribute (argument_list (identifier_loglevel) identifier_loglevel )argument_list )call )expression_statement (raise_statement (call (identifier_AssertionError) identifier_AssertionError (argument_list (binary_operator (concatenated_string (string_"Element '%s' should be disabled ") string_"Element '%s' should be disabled " (string_"but did not") string_"but did not" )concatenated_string (identifier_locator) identifier_locator )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__info) identifier__info )attribute (argument_list (binary_operator (string_"Element '%s' is disabled .") string_"Element '%s' is disabled ." (identifier_locator) identifier_locator )binary_operator )argument_list )call )expression_statement )block )function_definition )module
Verifies that element identified with locator is disabled. Key attributes for arbitrary elements are `id` and `name`. See `introduction` for details about locating elements.
(module (function_definition (function_name_del_functions) function_name_del_functions (parameters (identifier_self) identifier_self (identifier_names) identifier_names )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_names) identifier_names (identifier_string_types) identifier_string_types )argument_list )call (block (expression_statement (assignment (identifier_names) identifier_names (list (identifier_names) identifier_names )list )assignment )expression_statement )block )if_statement (for_statement (identifier_name) identifier_name (identifier_names) identifier_names (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__functionlib) identifier__functionlib )attribute (identifier_pop) identifier_pop )attribute (argument_list (identifier_name) identifier_name )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Removes the specified function names from the function library. Functions are removed from this instance of the array; all copies and slices of this array will also have the functions removed. Parameters ---------- names : (list of) string(s) Name or list of names of the functions to remove.
(module (function_definition (function_name__check_pool_attr) function_name__check_pool_attr (parameters (identifier_self) identifier_self (identifier_attr) identifier_attr (default_parameter (identifier_req_attr) identifier_req_attr (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_req_attr) identifier_req_attr (None) None )comparison_operator (block (expression_statement (assignment (identifier_req_attr) identifier_req_attr (list )list )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__check_attr) identifier__check_attr )attribute (argument_list (identifier_attr) identifier_attr (identifier_req_attr) identifier_req_attr (identifier__pool_attrs) identifier__pool_attrs )argument_list )call )expression_statement (if_statement (comparison_operator (call (attribute (identifier_attr) identifier_attr (identifier_get) identifier_get )attribute (argument_list (string_'ipv4_default_prefix_length') string_'ipv4_default_prefix_length' )argument_list )call (None) None )comparison_operator (block (try_statement (block (expression_statement (assignment (subscript (identifier_attr) identifier_attr (string_'ipv4_default_prefix_length') string_'ipv4_default_prefix_length' )subscript (line_continuation_\) line_continuation_\ (call (identifier_int) identifier_int (argument_list (subscript (identifier_attr) identifier_attr (string_'ipv4_default_prefix_length') string_'ipv4_default_prefix_length' )subscript )argument_list )call )assignment )expression_statement (if_statement (parenthesized_expression (boolean_operator (comparison_operator (subscript (identifier_attr) identifier_attr (string_'ipv4_default_prefix_length') string_'ipv4_default_prefix_length' )subscript (integer_32) integer_32 )comparison_operator (comparison_operator (subscript (identifier_attr) identifier_attr (string_'ipv4_default_prefix_length') string_'ipv4_default_prefix_length' )subscript (integer_1) integer_1 )comparison_operator )boolean_operator )parenthesized_expression (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list )argument_list )call )raise_statement )block )if_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (raise_statement (call (identifier_NipapValueError) identifier_NipapValueError (argument_list (string_'Default IPv4 prefix length must be an integer between 1 and 32.') string_'Default IPv4 prefix length must be an integer between 1 and 32.' )argument_list )call )raise_statement )block )except_clause )try_statement )block )if_statement (if_statement (call (attribute (identifier_attr) identifier_attr (identifier_get) identifier_get )attribute (argument_list (string_'ipv6_default_prefix_length') string_'ipv6_default_prefix_length' )argument_list )call (block (try_statement (block (expression_statement (assignment (subscript (identifier_attr) identifier_attr (string_'ipv6_default_prefix_length') string_'ipv6_default_prefix_length' )subscript (line_continuation_\) line_continuation_\ (call (identifier_int) identifier_int (argument_list (subscript (identifier_attr) identifier_attr (string_'ipv6_default_prefix_length') string_'ipv6_default_prefix_length' )subscript )argument_list )call )assignment )expression_statement (if_statement (parenthesized_expression (boolean_operator (comparison_operator (subscript (identifier_attr) identifier_attr (string_'ipv6_default_prefix_length') string_'ipv6_default_prefix_length' )subscript (integer_128) integer_128 )comparison_operator (comparison_operator (subscript (identifier_attr) identifier_attr (string_'ipv6_default_prefix_length') string_'ipv6_default_prefix_length' )subscript (integer_1) integer_1 )comparison_operator )boolean_operator )parenthesized_expression (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list )argument_list )call )raise_statement )block )if_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (raise_statement (call (identifier_NipapValueError) identifier_NipapValueError (argument_list (string_'Default IPv6 prefix length must be an integer between 1 and 128.') string_'Default IPv6 prefix length must be an integer between 1 and 128.' )argument_list )call )raise_statement )block )except_clause )try_statement )block )if_statement )block )function_definition )module
Check pool attributes.
(module (function_definition (function_name_do_GET) function_name_do_GET (parameters (identifier_self) identifier_self )parameters (block (if_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute (identifier_endswith) identifier_endswith )attribute (argument_list (string_"http_manifest.json") string_"http_manifest.json" )argument_list )call (block (try_statement (block (expression_statement (assignment (identifier_manifest) identifier_manifest (call (attribute (identifier_self) identifier_self (identifier_generate_http_manifest) identifier_generate_http_manifest )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_send_response) identifier_send_response )attribute (argument_list (integer_200) integer_200 )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_end_headers) identifier_end_headers )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_wfile) identifier_wfile )attribute (identifier_write) identifier_write )attribute (argument_list (identifier_manifest) identifier_manifest )argument_list )call )expression_statement )block (except_clause (attribute (identifier_dtoolcore) identifier_dtoolcore (identifier_DtoolCoreTypeError) identifier_DtoolCoreTypeError )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_send_response) identifier_send_response )attribute (argument_list (integer_400) integer_400 )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_end_headers) identifier_end_headers )attribute (argument_list )argument_list )call )expression_statement )block )except_clause )try_statement )block (else_clause (block (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_DtoolHTTPRequestHandler) identifier_DtoolHTTPRequestHandler (identifier_self) identifier_self )argument_list )call (identifier_do_GET) identifier_do_GET )attribute (argument_list )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Override inherited do_GET method. Include logic for returning a http manifest when the URL ends with "http_manifest.json".
(module (function_definition (function_name_installedApp) function_name_installedApp (parameters (identifier_self) identifier_self )parameters (block (try_statement (block (return_statement (attribute (identifier_self) identifier_self (identifier__installedApp) identifier__installedApp )attribute )return_statement )block (except_clause (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__installedApp) identifier__installedApp )attribute (call (attribute (identifier_runConfigs) identifier_runConfigs (identifier_get) identifier_get )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (attribute (identifier_self) identifier_self (identifier__installedApp) identifier__installedApp )attribute )return_statement )block )except_clause )try_statement )block )function_definition )module
identify the propery application to launch, given the configuration
(module (function_definition (function_name_iter_ensure_instance) function_name_iter_ensure_instance (parameters (identifier_iterable) identifier_iterable (identifier_types) identifier_types )parameters (block (expression_statement (call (identifier_ensure_instance) identifier_ensure_instance (argument_list (identifier_iterable) identifier_iterable (identifier_Iterable) identifier_Iterable )argument_list )call )expression_statement (expression_statement (list_comprehension (call (identifier_ensure_instance) identifier_ensure_instance (argument_list (identifier_item) identifier_item (identifier_types) identifier_types )argument_list )call (for_in_clause (identifier_item) identifier_item (identifier_iterable) identifier_iterable )for_in_clause )list_comprehension )expression_statement )block )function_definition )module
Iterate over object and check each item type >>> iter_ensure_instance([1,2,3], [str]) Traceback (most recent call last): TypeError: >>> iter_ensure_instance([1,2,3], int) >>> iter_ensure_instance(1, int) Traceback (most recent call last): TypeError:
(module (function_definition (function_name_is_equal) function_name_is_equal (parameters (identifier_self) identifier_self (identifier_other) identifier_other )parameters (block (expression_statement (assignment (identifier_other) identifier_other (call (attribute (identifier_StringCell) identifier_StringCell (identifier_coerce) identifier_coerce )attribute (argument_list (identifier_other) identifier_other )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_empties) identifier_empties (list (None) None (string_'') string_'' )list )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_value) identifier_value )attribute (identifier_empties) identifier_empties )comparison_operator (comparison_operator (attribute (identifier_other) identifier_other (identifier_value) identifier_value )attribute (identifier_empties) identifier_empties )comparison_operator )boolean_operator (block (return_statement (True) True )return_statement )block )if_statement (return_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_value) identifier_value )attribute (attribute (identifier_other) identifier_other (identifier_value) identifier_value )attribute )comparison_operator )return_statement )block )function_definition )module
Whether two strings are equal
(module (function_definition (function_name__handle_request_noblock) function_name__handle_request_noblock (parameters (identifier_self) identifier_self )parameters (block (try_statement (block (expression_statement (assignment (pattern_list (identifier_request) identifier_request (identifier_client_address) identifier_client_address )pattern_list (call (attribute (identifier_self) identifier_self (identifier_get_request) identifier_get_request )attribute (argument_list )argument_list )call )assignment )expression_statement )block (except_clause (attribute (identifier_socket) identifier_socket (identifier_error) identifier_error )attribute (block (return_statement )return_statement )block )except_clause )try_statement (if_statement (call (attribute (identifier_self) identifier_self (identifier_verify_request) identifier_verify_request )attribute (argument_list (identifier_request) identifier_request (identifier_client_address) identifier_client_address )argument_list )call (block (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_process_request) identifier_process_request )attribute (argument_list (identifier_request) identifier_request (identifier_client_address) identifier_client_address )argument_list )call )expression_statement )block (except_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_handle_error) identifier_handle_error )attribute (argument_list (identifier_request) identifier_request (identifier_client_address) identifier_client_address )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_shutdown_request) identifier_shutdown_request )attribute (argument_list (identifier_request) identifier_request )argument_list )call )expression_statement )block )except_clause )try_statement )block )if_statement )block )function_definition )module
Handle one request, without blocking.
(module (function_definition (function_name___pathToTuple) function_name___pathToTuple (parameters (identifier_self) identifier_self (identifier_path) identifier_path )parameters (block (if_statement (boolean_operator (not_operator (identifier_path) identifier_path )not_operator (comparison_operator (call (attribute (identifier_path) identifier_path (identifier_count) identifier_count )attribute (argument_list (string_'/') string_'/' )argument_list )call (integer_2) integer_2 )comparison_operator )boolean_operator (block (raise_statement (call (attribute (identifier_YTFS) identifier_YTFS (identifier_PathConvertError) identifier_PathConvertError )attribute (argument_list (string_"Bad path given") string_"Bad path given" )argument_list )call )raise_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier_split) identifier_split (call (attribute (identifier_path) identifier_path (identifier_split) identifier_split )attribute (argument_list (string_'/') string_'/' )argument_list )call )assignment )expression_statement )block (except_clause (tuple (identifier_AttributeError) identifier_AttributeError (identifier_TypeError) identifier_TypeError )tuple (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"Path has to be string") string_"Path has to be string" )argument_list )call )raise_statement )block )except_clause )try_statement (if_statement (subscript (identifier_split) identifier_split (integer_0) integer_0 )subscript (block (raise_statement (call (attribute (identifier_YTFS) identifier_YTFS (identifier_PathConvertError) identifier_PathConvertError )attribute (argument_list (string_"Path needs to start with '/'") string_"Path needs to start with '/'" )argument_list )call )raise_statement )block )if_statement (delete_statement (subscript (identifier_split) identifier_split (integer_0) integer_0 )subscript )delete_statement (try_statement (block (if_statement (not_operator (subscript (identifier_split) identifier_split (unary_operator (integer_1) integer_1 )unary_operator )subscript )not_operator (block (expression_statement (call (attribute (identifier_split) identifier_split (identifier_pop) identifier_pop )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block (except_clause (identifier_IndexError) identifier_IndexError (block (raise_statement (call (attribute (identifier_YTFS) identifier_YTFS (identifier_PathConvertError) identifier_PathConvertError )attribute (argument_list (string_"Bad path given") string_"Bad path given" )argument_list )call )raise_statement )block )except_clause )try_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_split) identifier_split )argument_list )call (integer_2) integer_2 )comparison_operator (block (raise_statement (call (attribute (identifier_YTFS) identifier_YTFS (identifier_PathConvertError) identifier_PathConvertError )attribute (argument_list (string_"Path is too deep. Max allowed level is 2") string_"Path is too deep. Max allowed level is 2" )argument_list )call )raise_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier_d) identifier_d (subscript (identifier_split) identifier_split (integer_0) integer_0 )subscript )assignment )expression_statement )block (except_clause (identifier_IndexError) identifier_IndexError (block (expression_statement (assignment (identifier_d) identifier_d (None) None )assignment )expression_statement )block )except_clause )try_statement (try_statement (block (expression_statement (assignment (identifier_f) identifier_f (subscript (identifier_split) identifier_split (integer_1) integer_1 )subscript )assignment )expression_statement )block (except_clause (identifier_IndexError) identifier_IndexError (block (expression_statement (assignment (identifier_f) identifier_f (None) None )assignment )expression_statement )block )except_clause )try_statement (if_statement (boolean_operator (not_operator (identifier_d) identifier_d )not_operator (identifier_f) identifier_f )boolean_operator (block (raise_statement (call (attribute (identifier_YTFS) identifier_YTFS (identifier_PathConvertError) identifier_PathConvertError )attribute (argument_list (string_"Bad path given") string_"Bad path given" )argument_list )call )raise_statement )block )if_statement (return_statement (tuple (identifier_d) identifier_d (identifier_f) identifier_f )tuple )return_statement )block )function_definition )module
Convert directory or file path to its tuple identifier. Parameters ---------- path : str Path to convert. It can look like /, /directory, /directory/ or /directory/filename. Returns ------- tup_id : tuple Two element tuple identifier of directory/file of (`directory`, `filename`) format. If path leads to main directory, then both fields of tuple will be ``None``. If path leads to a directory, then field `filename` will be ``None``. Raises ------ YTFS.PathConvertError When invalid path is given.
(module (function_definition (function_name__get_template) function_name__get_template (parameters (identifier_querystring_key) identifier_querystring_key (identifier_mapping) identifier_mapping )parameters (block (expression_statement (assignment (identifier_default) identifier_default (None) None )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_template_and_keys) identifier_template_and_keys (call (attribute (identifier_mapping) identifier_mapping (identifier_items) identifier_items )attribute (argument_list )argument_list )call )assignment )expression_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (expression_statement (assignment (identifier_template_and_keys) identifier_template_and_keys (identifier_mapping) identifier_mapping )assignment )expression_statement )block )except_clause )try_statement (for_statement (pattern_list (identifier_template) identifier_template (identifier_key) identifier_key )pattern_list (identifier_template_and_keys) identifier_template_and_keys (block (if_statement (comparison_operator (identifier_key) identifier_key (None) None )comparison_operator (block (expression_statement (assignment (identifier_key) identifier_key (identifier_PAGE_LABEL) identifier_PAGE_LABEL )assignment )expression_statement (expression_statement (assignment (identifier_default) identifier_default (identifier_template) identifier_template )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_key) identifier_key (identifier_querystring_key) identifier_querystring_key )comparison_operator (block (return_statement (identifier_template) identifier_template )return_statement )block )if_statement )block )for_statement (return_statement (identifier_default) identifier_default )return_statement )block )function_definition )module
Return the template corresponding to the given ``querystring_key``.
(module (function_definition (function_name_wait) function_name_wait (parameters (identifier_self) identifier_self (default_parameter (identifier_timeout) identifier_timeout (None) None )default_parameter )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier___stopped) identifier___stopped )attribute (identifier_wait) identifier_wait )attribute (argument_list (identifier_timeout) identifier_timeout )argument_list )call )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier___stopped) identifier___stopped )attribute (identifier_is_set) identifier_is_set )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Waits for the client to stop its loop
(module (function_definition (function_name_ExecuteCommandFromClient) function_name_ExecuteCommandFromClient (parameters (identifier_command) identifier_command )parameters (block (expression_statement (assignment (identifier_cmd) identifier_cmd (attribute (identifier_command) identifier_command (identifier_cmd) identifier_cmd )attribute )assignment )expression_statement (expression_statement (assignment (identifier_args) identifier_args (attribute (identifier_command) identifier_command (identifier_args) identifier_args )attribute )assignment )expression_statement (expression_statement (assignment (identifier_time_limit) identifier_time_limit (attribute (identifier_command) identifier_command (identifier_time_limit) identifier_time_limit )attribute )assignment )expression_statement (expression_statement (assignment (identifier_res) identifier_res (call (attribute (identifier_client_utils_common) identifier_client_utils_common (identifier_Execute) identifier_Execute )attribute (argument_list (identifier_cmd) identifier_cmd (identifier_args) identifier_args (identifier_time_limit) identifier_time_limit )argument_list )call )assignment )expression_statement (expression_statement (assignment (tuple_pattern (identifier_stdout) identifier_stdout (identifier_stderr) identifier_stderr (identifier_status) identifier_status (identifier_time_used) identifier_time_used )tuple_pattern (identifier_res) identifier_res )assignment )expression_statement (expression_statement (assignment (identifier_stdout) identifier_stdout (subscript (identifier_stdout) identifier_stdout (slice (colon) colon (binary_operator (binary_operator (integer_10) integer_10 (integer_1024) integer_1024 )binary_operator (integer_1024) integer_1024 )binary_operator )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_stderr) identifier_stderr (subscript (identifier_stderr) identifier_stderr (slice (colon) colon (binary_operator (binary_operator (integer_10) integer_10 (integer_1024) integer_1024 )binary_operator (integer_1024) integer_1024 )binary_operator )slice )subscript )assignment )expression_statement (expression_statement (yield (call (attribute (identifier_rdf_client_action) identifier_rdf_client_action (identifier_ExecuteResponse) identifier_ExecuteResponse )attribute (argument_list (keyword_argument (identifier_request) identifier_request (identifier_command) identifier_command )keyword_argument (keyword_argument (identifier_stdout) identifier_stdout (identifier_stdout) identifier_stdout )keyword_argument (keyword_argument (identifier_stderr) identifier_stderr (identifier_stderr) identifier_stderr )keyword_argument (keyword_argument (identifier_exit_status) identifier_exit_status (identifier_status) identifier_status )keyword_argument (keyword_argument (identifier_time_used) identifier_time_used (call (identifier_int) identifier_int (argument_list (binary_operator (float_1e6) float_1e6 (identifier_time_used) identifier_time_used )binary_operator )argument_list )call )keyword_argument )argument_list )call )yield )expression_statement )block )function_definition )module
Executes one of the predefined commands. Args: command: An `ExecuteRequest` object. Yields: `rdf_client_action.ExecuteResponse` objects.
(module (function_definition (function_name_can_process_matrix) function_name_can_process_matrix (parameters (identifier_entry) identifier_entry (identifier_matrix_tags) identifier_matrix_tags )parameters (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_matrix_tags) identifier_matrix_tags )argument_list )call (integer_0) integer_0 )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement (expression_statement (assignment (identifier_count) identifier_count (integer_0) integer_0 )assignment )expression_statement (if_statement (comparison_operator (string_'tags') string_'tags' (identifier_entry) identifier_entry )comparison_operator (block (for_statement (identifier_tag) identifier_tag (identifier_matrix_tags) identifier_matrix_tags (block (if_statement (comparison_operator (identifier_tag) identifier_tag (subscript (identifier_entry) identifier_entry (string_'tags') string_'tags' )subscript )comparison_operator (block (expression_statement (augmented_assignment (identifier_count) identifier_count (integer_1) integer_1 )augmented_assignment )expression_statement )block )if_statement )block )for_statement )block )if_statement (return_statement (comparison_operator (identifier_count) identifier_count (integer_0) integer_0 )comparison_operator )return_statement )block )function_definition )module
Check given matrix tags to be in the given list of matric tags. Args: entry (dict): matrix item (in yaml). matrix_tags (list): represents --matrix-tags defined by user in command line. Returns: bool: True when matrix entry can be processed.
(module (function_definition (function_name_main) function_name_main (parameters (identifier_self) identifier_self )parameters (type (None) None )type (block (expression_statement (assignment (identifier_path) identifier_path (call (identifier_ask_path) identifier_ask_path (argument_list (string_"where should the config be stored?") string_"where should the config be stored?" (string_".snekrc") string_".snekrc" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_conf) identifier_conf (call (attribute (identifier_configobj) identifier_configobj (identifier_ConfigObj) identifier_ConfigObj )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tools) identifier_tools (call (attribute (identifier_self) identifier_self (identifier_get_tools) identifier_get_tools )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_tool) identifier_tool (identifier_tools) identifier_tools (block (expression_statement (assignment (subscript (identifier_conf) identifier_conf (identifier_tool) identifier_tool )subscript (call (call (identifier_getattr) identifier_getattr (argument_list (identifier_self) identifier_self (identifier_tool) identifier_tool )argument_list )call (argument_list )argument_list )call )assignment )expression_statement )block )for_statement (expression_statement (assignment (attribute (identifier_conf) identifier_conf (identifier_filename) identifier_filename )attribute (identifier_path) identifier_path )assignment )expression_statement (expression_statement (call (attribute (identifier_conf) identifier_conf (identifier_write) identifier_write )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Written config file!") string_"Written config file!" )argument_list )call )expression_statement (if_statement (comparison_operator (string_"pylint") string_"pylint" (identifier_tools) identifier_tools )comparison_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Please also run `pylint --generate-rcfile` to complete setup") string_"Please also run `pylint --generate-rcfile` to complete setup" )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
The main function for generating the config file
(module (function_definition (function_name_sort_timeplaceentries) function_name_sort_timeplaceentries (parameters (identifier_self) identifier_self (identifier_timeentry) identifier_timeentry (identifier_placeentry) identifier_placeentry )parameters (type (generic_type (identifier_Tuple) identifier_Tuple (type_parameter (type (identifier_Any) identifier_Any )type (type (identifier_Any) identifier_Any )type )type_parameter )generic_type )type (block (if_statement (attribute (identifier_self) identifier_self (identifier__timeaxis) identifier__timeaxis )attribute (block (return_statement (expression_list (identifier_placeentry) identifier_placeentry (identifier_timeentry) identifier_timeentry )expression_list )return_statement )block )if_statement (return_statement (expression_list (identifier_timeentry) identifier_timeentry (identifier_placeentry) identifier_placeentry )expression_list )return_statement )block )function_definition )module
Return a |tuple| containing the given `timeentry` and `placeentry` sorted in agreement with the currently selected `timeaxis`. >>> from hydpy.core.netcdftools import NetCDFVariableBase >>> from hydpy import make_abc_testable >>> NCVar = make_abc_testable(NetCDFVariableBase) >>> ncvar = NCVar('flux_nkor', isolate=True, timeaxis=1) >>> ncvar.sort_timeplaceentries('time', 'place') ('place', 'time') >>> ncvar = NetCDFVariableDeep('test', isolate=False, timeaxis=0) >>> ncvar.sort_timeplaceentries('time', 'place') ('time', 'place')
(module (function_definition (function_name_get_seconds) function_name_get_seconds (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_parsed) identifier_parsed (call (attribute (identifier_self) identifier_self (identifier_parse_hh_mm_ss) identifier_parse_hh_mm_ss )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_total_seconds) identifier_total_seconds (attribute (identifier_parsed) identifier_parsed (identifier_second) identifier_second )attribute )assignment )expression_statement (expression_statement (augmented_assignment (identifier_total_seconds) identifier_total_seconds (binary_operator (attribute (identifier_parsed) identifier_parsed (identifier_minute) identifier_minute )attribute (float_60.0) float_60.0 )binary_operator )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_total_seconds) identifier_total_seconds (binary_operator (binary_operator (attribute (identifier_parsed) identifier_parsed (identifier_hour) identifier_hour )attribute (float_60.0) float_60.0 )binary_operator (float_60.0) float_60.0 )binary_operator )augmented_assignment )expression_statement (return_statement (identifier_total_seconds) identifier_total_seconds )return_statement )block )function_definition )module
Gets seconds from raw time :return: Seconds in time
(module (function_definition (function_name_request_password_reset) function_name_request_password_reset (parameters (identifier_self) identifier_self (identifier_user) identifier_user (identifier_base_url) identifier_base_url )parameters (block (expression_statement (call (attribute (identifier_user) identifier_user (identifier_generate_password_link) identifier_generate_password_link )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_db) identifier_db (identifier_session) identifier_session )attribute (identifier_add) identifier_add )attribute (argument_list (identifier_user) identifier_user )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_db) identifier_db (identifier_session) identifier_session )attribute (identifier_commit) identifier_commit )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_events) identifier_events (identifier_password_change_requested_event) identifier_password_change_requested_event )attribute (identifier_send) identifier_send )attribute (argument_list (identifier_user) identifier_user )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_send_password_change_message) identifier_send_password_change_message )attribute (argument_list (identifier_user) identifier_user (identifier_base_url) identifier_base_url )argument_list )call )expression_statement )block )function_definition )module
Regenerate password link and send message
(module (function_definition (function_name_tokens) function_name_tokens (parameters (identifier_self) identifier_self (identifier_instance) identifier_instance )parameters (block (if_statement (not_operator (attribute (identifier_instance) identifier_instance (identifier_pk) identifier_pk )attribute )not_operator (block (return_statement (string_"-") string_"-" )return_statement )block )if_statement (expression_statement (assignment (identifier_totp) identifier_totp (call (identifier_TOTP) identifier_TOTP (argument_list (attribute (identifier_instance) identifier_instance (identifier_bin_key) identifier_bin_key )attribute (attribute (identifier_instance) identifier_instance (identifier_step) identifier_step )attribute (attribute (identifier_instance) identifier_instance (identifier_t0) identifier_t0 )attribute (attribute (identifier_instance) identifier_instance (identifier_digits) identifier_digits )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tokens) identifier_tokens (list )list )assignment )expression_statement (for_statement (identifier_offset) identifier_offset (call (identifier_range) identifier_range (argument_list (unary_operator (attribute (identifier_instance) identifier_instance (identifier_tolerance) identifier_tolerance )attribute )unary_operator (binary_operator (attribute (identifier_instance) identifier_instance (identifier_tolerance) identifier_tolerance )attribute (integer_1) integer_1 )binary_operator )argument_list )call (block (expression_statement (assignment (attribute (identifier_totp) identifier_totp (identifier_drift) identifier_drift )attribute (binary_operator (attribute (identifier_instance) identifier_instance (identifier_drift) identifier_drift )attribute (identifier_offset) identifier_offset )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_tokens) identifier_tokens (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_totp) identifier_totp (identifier_token) identifier_token )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (call (attribute (string_" ") string_" " (identifier_join) identifier_join )attribute (argument_list (list_comprehension (binary_operator (string_"%s") string_"%s" (identifier_token) identifier_token )binary_operator (for_in_clause (identifier_token) identifier_token (identifier_tokens) identifier_tokens )for_in_clause )list_comprehension )argument_list )call )return_statement )block )function_definition )module
Just display current acceptable TOTP tokens
(module (function_definition (function_name_seq_view_shot) function_name_seq_view_shot (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_cur_seq) identifier_cur_seq )attribute )not_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_i) identifier_i (call (attribute (attribute (identifier_self) identifier_self (identifier_seq_shot_tablev) identifier_seq_shot_tablev )attribute (identifier_currentIndex) identifier_currentIndex )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_item) identifier_item (call (attribute (identifier_i) identifier_i (identifier_internalPointer) identifier_internalPointer )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (identifier_item) identifier_item (block (expression_statement (assignment (identifier_shot) identifier_shot (call (attribute (identifier_item) identifier_item (identifier_internal_data) identifier_internal_data )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_view_shot) identifier_view_shot )attribute (argument_list (identifier_shot) identifier_shot )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
View the shot that is selected in the table view of the sequence page :returns: None :rtype: None :raises: None
(module (function_definition (function_name_transformer_wikitext103_l4k_memory_v0) function_name_transformer_wikitext103_l4k_memory_v0 (parameters )parameters (block (expression_statement (assignment (identifier_hparams) identifier_hparams (call (identifier_transformer_wikitext103_l4k_v0) identifier_transformer_wikitext103_l4k_v0 (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_hparams) identifier_hparams (identifier_split_targets_chunk_length) identifier_split_targets_chunk_length )attribute (integer_64) integer_64 )assignment )expression_statement (expression_statement (assignment (attribute (identifier_hparams) identifier_hparams (identifier_split_targets_max_chunks) identifier_split_targets_max_chunks )attribute (integer_64) integer_64 )assignment )expression_statement (expression_statement (assignment (attribute (identifier_hparams) identifier_hparams (identifier_split_targets_strided_training) identifier_split_targets_strided_training )attribute (True) True )assignment )expression_statement (expression_statement (call (attribute (identifier_hparams) identifier_hparams (identifier_add_hparam) identifier_add_hparam )attribute (argument_list (string_"memory_type") string_"memory_type" (string_"transformer_xl") string_"transformer_xl" )argument_list )call )expression_statement (expression_statement (assignment (identifier_target_tokens_per_batch) identifier_target_tokens_per_batch (integer_4096) integer_4096 )assignment )expression_statement (expression_statement (assignment (attribute (identifier_hparams) identifier_hparams (identifier_batch_size) identifier_batch_size )attribute (call (identifier_int) identifier_int (argument_list (binary_operator (identifier_target_tokens_per_batch) identifier_target_tokens_per_batch (parenthesized_expression (binary_operator (attribute (identifier_hparams) identifier_hparams (identifier_max_length) identifier_max_length )attribute (attribute (identifier_hparams) identifier_hparams (identifier_split_targets_chunk_length) identifier_split_targets_chunk_length )attribute )binary_operator )parenthesized_expression )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_hparams) identifier_hparams (identifier_pos) identifier_pos )attribute (None) None )assignment )expression_statement (expression_statement (assignment (attribute (identifier_hparams) identifier_hparams (identifier_self_attention_type) identifier_self_attention_type )attribute (string_"dot_product_relative") string_"dot_product_relative" )assignment )expression_statement (expression_statement (assignment (attribute (identifier_hparams) identifier_hparams (identifier_max_relative_position) identifier_max_relative_position )attribute (binary_operator (integer_2) integer_2 (attribute (identifier_hparams) identifier_hparams (identifier_split_targets_chunk_length) identifier_split_targets_chunk_length )attribute )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_hparams) identifier_hparams (identifier_add_hparam) identifier_add_hparam )attribute (argument_list (string_"unconditional") string_"unconditional" (True) True )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_hparams) identifier_hparams (identifier_add_hparam) identifier_add_hparam )attribute (argument_list (string_"recurrent_memory_batch_size") string_"recurrent_memory_batch_size" (integer_0) integer_0 )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_hparams) identifier_hparams (identifier_add_hparam) identifier_add_hparam )attribute (argument_list (string_"num_memory_items") string_"num_memory_items" (attribute (identifier_hparams) identifier_hparams (identifier_split_targets_chunk_length) identifier_split_targets_chunk_length )attribute )argument_list )call )expression_statement (return_statement (identifier_hparams) identifier_hparams )return_statement )block )function_definition )module
HParams for training languagemodel_wikitext103_l4k with memory.
(module (function_definition (function_name_get_parsed_context) function_name_get_parsed_context (parameters (identifier_pipeline) identifier_pipeline (identifier_context_in_string) identifier_context_in_string )parameters (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"starting") string_"starting" )argument_list )call )expression_statement (if_statement (comparison_operator (string_'context_parser') string_'context_parser' (identifier_pipeline) identifier_pipeline )comparison_operator (block (expression_statement (assignment (identifier_parser_module_name) identifier_parser_module_name (subscript (identifier_pipeline) identifier_pipeline (string_'context_parser') string_'context_parser' )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_f"context parser found: {parser_module_name}") string_f"context parser found: {parser_module_name}" )argument_list )call )expression_statement (expression_statement (assignment (identifier_parser_module) identifier_parser_module (call (attribute (attribute (identifier_pypyr) identifier_pypyr (identifier_moduleloader) identifier_moduleloader )attribute (identifier_get_module) identifier_get_module )attribute (argument_list (identifier_parser_module_name) identifier_parser_module_name )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_f"running parser {parser_module_name}") string_f"running parser {parser_module_name}" )argument_list )call )expression_statement (expression_statement (assignment (identifier_result_context) identifier_result_context (call (attribute (identifier_parser_module) identifier_parser_module (identifier_get_parsed_context) identifier_get_parsed_context )attribute (argument_list (identifier_context_in_string) identifier_context_in_string )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_f"step {parser_module_name} done") string_f"step {parser_module_name} done" )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_result_context) identifier_result_context (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (concatenated_string (string_f"{parser_module_name} returned None. Using ") string_f"{parser_module_name} returned None. Using " (string_"empty context instead") string_"empty context instead" )concatenated_string )argument_list )call )expression_statement (return_statement (call (attribute (attribute (identifier_pypyr) identifier_pypyr (identifier_context) identifier_context )attribute (identifier_Context) identifier_Context )attribute (argument_list )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (attribute (identifier_pypyr) identifier_pypyr (identifier_context) identifier_context )attribute (identifier_Context) identifier_Context )attribute (argument_list (identifier_result_context) identifier_result_context )argument_list )call )return_statement )block )else_clause )if_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (concatenated_string (string_f"The parser {parser_module_name} doesn't have a ") string_f"The parser {parser_module_name} doesn't have a " (string_"get_parsed_context(context) function.") string_"get_parsed_context(context) function." )concatenated_string )argument_list )call )expression_statement (raise_statement )raise_statement )block )except_clause )try_statement )block (else_clause (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (concatenated_string (string_"pipeline does not have custom context parser. Using ") string_"pipeline does not have custom context parser. Using " (string_"empty context.") string_"empty context." )concatenated_string )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"done") string_"done" )argument_list )call )expression_statement (return_statement (call (attribute (attribute (identifier_pypyr) identifier_pypyr (identifier_context) identifier_context )attribute (identifier_Context) identifier_Context )attribute (argument_list )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Execute get_parsed_context handler if specified. Dynamically load the module specified by the context_parser key in pipeline dict and execute the get_parsed_context function on that module. Args: pipeline: dict. Pipeline object. context_in_string: string. Argument string used to initialize context. Returns: pypyr.context.Context() instance. Raises: AttributeError: parser specified on pipeline missing get_parsed_context function.
(module (function_definition (function_name_get_version) function_name_get_version (parameters (identifier_version) identifier_version )parameters (block (if_statement (boolean_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_version) identifier_version )argument_list )call (integer_2) integer_2 )comparison_operator (comparison_operator (subscript (identifier_version) identifier_version (integer_2) integer_2 )subscript (None) None )comparison_operator )boolean_operator (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (subscript (identifier_version) identifier_version (integer_2) integer_2 )subscript (identifier_int) identifier_int )argument_list )call (block (expression_statement (assignment (identifier_str_version) identifier_str_version (binary_operator (string_"%s.%s.%s") string_"%s.%s.%s" (subscript (identifier_version) identifier_version (slice (colon) colon (integer_3) integer_3 )slice )subscript )binary_operator )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_str_version) identifier_str_version (binary_operator (string_"%s.%s_%s") string_"%s.%s_%s" (subscript (identifier_version) identifier_version (slice (colon) colon (integer_3) integer_3 )slice )subscript )binary_operator )assignment )expression_statement )block )else_clause )if_statement )block (else_clause (block (expression_statement (assignment (identifier_str_version) identifier_str_version (binary_operator (string_"%s.%s") string_"%s.%s" (subscript (identifier_version) identifier_version (slice (colon) colon (integer_2) integer_2 )slice )subscript )binary_operator )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_str_version) identifier_str_version )return_statement )block )function_definition )module
Dynamically calculate the version based on VERSION tuple.
(module (function_definition (function_name_max_brightness) function_name_max_brightness (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (pattern_list (attribute (identifier_self) identifier_self (identifier__max_brightness) identifier__max_brightness )attribute (identifier_value) identifier_value )pattern_list (call (attribute (identifier_self) identifier_self (identifier_get_cached_attr_int) identifier_get_cached_attr_int )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__max_brightness) identifier__max_brightness )attribute (string_'max_brightness') string_'max_brightness' )argument_list )call )assignment )expression_statement (return_statement (identifier_value) identifier_value )return_statement )block )function_definition )module
Returns the maximum allowable brightness value.
(module (function_definition (function_name_remove_root_log) function_name_remove_root_log (parameters (identifier_self) identifier_self (identifier_log_id) identifier_log_id )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__catalog_session) identifier__catalog_session )attribute (None) None )comparison_operator (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__catalog_session) identifier__catalog_session )attribute (identifier_remove_root_catalog) identifier_remove_root_catalog )attribute (argument_list (keyword_argument (identifier_catalog_id) identifier_catalog_id (identifier_log_id) identifier_log_id )keyword_argument )argument_list )call )return_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__hierarchy_session) identifier__hierarchy_session )attribute (identifier_remove_root) identifier_remove_root )attribute (argument_list (keyword_argument (identifier_id_) identifier_id_ (identifier_log_id) identifier_log_id )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Removes a root log. arg: log_id (osid.id.Id): the ``Id`` of a log raise: NotFound - ``log_id`` is not a root raise: NullArgument - ``log_id`` is ``null`` raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure *compliance: mandatory -- This method must be implemented.*
(module (function_definition (function_name_generate_id) function_name_generate_id (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_use_repeatable_ids) identifier_use_repeatable_ids )attribute (block (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_repeatable_id_counter) identifier_repeatable_id_counter )attribute (integer_1) integer_1 )augmented_assignment )expression_statement (return_statement (call (attribute (string_'autobaked-{}') string_'autobaked-{}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_repeatable_id_counter) identifier_repeatable_id_counter )attribute )argument_list )call )return_statement )block (else_clause (block (return_statement (call (identifier_str) identifier_str (argument_list (call (identifier_uuid4) identifier_uuid4 (argument_list )argument_list )call )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Generate a fresh id
(module (function_definition (function_name_validate_on_submit) function_name_validate_on_submit (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_valid) identifier_valid (call (attribute (identifier_FlaskWtf) identifier_FlaskWtf (identifier_validate_on_submit) identifier_validate_on_submit )attribute (argument_list (identifier_self) identifier_self )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (not_operator (attribute (identifier_self) identifier_self (identifier__schema) identifier__schema )attribute )not_operator (not_operator (call (attribute (identifier_self) identifier_self (identifier_is_submitted) identifier_is_submitted )attribute (argument_list )argument_list )call )not_operator )boolean_operator (block (return_statement (identifier_valid) identifier_valid )return_statement )block )if_statement (expression_statement (assignment (identifier_data) identifier_data (call (identifier_dict) identifier_dict (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_field) identifier_field (attribute (identifier_self) identifier_self (identifier__fields) identifier__fields )attribute (block (expression_statement (assignment (subscript (identifier_data) identifier_data (identifier_field) identifier_field )subscript (attribute (subscript (attribute (identifier_self) identifier_self (identifier__fields) identifier__fields )attribute (identifier_field) identifier_field )subscript (identifier_data) identifier_data )attribute )assignment )expression_statement )block )for_statement (expression_statement (assignment (identifier_result) identifier_result (call (attribute (attribute (identifier_self) identifier_self (identifier_schema) identifier_schema )attribute (identifier_process) identifier_process )attribute (argument_list (identifier_data) identifier_data (keyword_argument (identifier_context) identifier_context (attribute (identifier_self) identifier_self (identifier__force_context) identifier__force_context )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_set_errors) identifier_set_errors )attribute (argument_list (identifier_result) identifier_result )argument_list )call )expression_statement (for_statement (identifier_field) identifier_field (identifier_data) identifier_data (block (expression_statement (assignment (attribute (subscript (attribute (identifier_self) identifier_self (identifier__fields) identifier__fields )attribute (identifier_field) identifier_field )subscript (identifier_data) identifier_data )attribute (subscript (identifier_data) identifier_data (identifier_field) identifier_field )subscript )assignment )expression_statement )block )for_statement (return_statement (boolean_operator (identifier_valid) identifier_valid (not_operator (call (identifier_bool) identifier_bool (argument_list (attribute (identifier_self) identifier_self (identifier_errors) identifier_errors )attribute )argument_list )call )not_operator )boolean_operator )return_statement )block )function_definition )module
Extend validate on submit to allow validation with schema
(module (function_definition (function_name_get_selected_tab) function_name_get_selected_tab (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_selected) identifier_selected (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_request) identifier_request )attribute (identifier_GET) identifier_GET )attribute (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_param_name) identifier_param_name )attribute (None) None )argument_list )call )assignment )expression_statement (if_statement (identifier_selected) identifier_selected (block (try_statement (block (expression_statement (assignment (pattern_list (identifier_tab_group) identifier_tab_group (identifier_tab_name) identifier_tab_name )pattern_list (call (attribute (identifier_selected) identifier_selected (identifier_split) identifier_split )attribute (argument_list (identifier_SEPARATOR) identifier_SEPARATOR )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (return_statement (None) None )return_statement )block )except_clause )try_statement (if_statement (comparison_operator (identifier_tab_group) identifier_tab_group (call (attribute (identifier_self) identifier_self (identifier_get_id) identifier_get_id )attribute (argument_list )argument_list )call )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__selected) identifier__selected )attribute (call (attribute (identifier_self) identifier_self (identifier_get_tab) identifier_get_tab )attribute (argument_list (identifier_tab_name) identifier_tab_name )argument_list )call )assignment )expression_statement )block )if_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier__selected) identifier__selected )attribute )return_statement )block )function_definition )module
Returns the tab specific by the GET request parameter. In the event that there is no GET request parameter, the value of the query parameter is invalid, or the tab is not allowed/enabled, the return value of this function is None.
(module (function_definition (function_name_complement) function_name_complement (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_is_empty) identifier_is_empty )attribute (block (return_statement (call (attribute (identifier_StridedInterval) identifier_StridedInterval (identifier_top) identifier_top )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_bits) identifier_bits )attribute )argument_list )call )return_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier_is_top) identifier_is_top )attribute (block (return_statement (call (attribute (identifier_StridedInterval) identifier_StridedInterval (identifier_empty) identifier_empty )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_bits) identifier_bits )attribute )argument_list )call )return_statement )block )if_statement (expression_statement (assignment (identifier_y_plus_1) identifier_y_plus_1 (call (attribute (identifier_StridedInterval) identifier_StridedInterval (identifier__modular_add) identifier__modular_add )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_upper_bound) identifier_upper_bound )attribute (integer_1) integer_1 (attribute (identifier_self) identifier_self (identifier_bits) identifier_bits )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_x_minus_1) identifier_x_minus_1 (call (attribute (identifier_StridedInterval) identifier_StridedInterval (identifier__modular_sub) identifier__modular_sub )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_lower_bound) identifier_lower_bound )attribute (integer_1) integer_1 (attribute (identifier_self) identifier_self (identifier_bits) identifier_bits )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_dist) identifier_dist (binary_operator (call (attribute (identifier_StridedInterval) identifier_StridedInterval (identifier__wrapped_cardinality) identifier__wrapped_cardinality )attribute (argument_list (identifier_y_plus_1) identifier_y_plus_1 (identifier_x_minus_1) identifier_x_minus_1 (attribute (identifier_self) identifier_self (identifier_bits) identifier_bits )attribute )argument_list )call (integer_1) integer_1 )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_dist) identifier_dist (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_new_stride) identifier_new_stride (integer_0) integer_0 )assignment )expression_statement )block (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier__stride) identifier__stride )attribute (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_new_stride) identifier_new_stride (integer_1) integer_1 )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_new_stride) identifier_new_stride (call (attribute (identifier_fractions) identifier_fractions (identifier_gcd) identifier_gcd )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__stride) identifier__stride )attribute (identifier_dist) identifier_dist )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (call (identifier_StridedInterval) identifier_StridedInterval (argument_list (keyword_argument (identifier_lower_bound) identifier_lower_bound (identifier_y_plus_1) identifier_y_plus_1 )keyword_argument (keyword_argument (identifier_upper_bound) identifier_upper_bound (identifier_x_minus_1) identifier_x_minus_1 )keyword_argument (keyword_argument (identifier_bits) identifier_bits (attribute (identifier_self) identifier_self (identifier_bits) identifier_bits )attribute )keyword_argument (keyword_argument (identifier_stride) identifier_stride (identifier_new_stride) identifier_new_stride )keyword_argument (keyword_argument (identifier_uninitialized) identifier_uninitialized (attribute (identifier_self) identifier_self (identifier_uninitialized) identifier_uninitialized )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return the complement of the interval Refer section 3.1 augmented for managing strides :return:
(module (function_definition (function_name__check_current_value) function_name__check_current_value (parameters (identifier_gnome_kwargs) identifier_gnome_kwargs (identifier_value) identifier_value )parameters (block (expression_statement (assignment (identifier_current_value) identifier_current_value (call (subscript (identifier___salt__) identifier___salt__ (string_'gnome.get') string_'gnome.get' )subscript (argument_list (dictionary_splat (identifier_gnome_kwargs) identifier_gnome_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (return_statement (comparison_operator (call (attribute (identifier_six) identifier_six (identifier_text_type) identifier_text_type )attribute (argument_list (identifier_current_value) identifier_current_value )argument_list )call (call (attribute (identifier_six) identifier_six (identifier_text_type) identifier_text_type )attribute (argument_list (identifier_value) identifier_value )argument_list )call )comparison_operator )return_statement )block )function_definition )module
Check the current value with the passed value
(module (function_definition (function_name_get_class_doc) function_name_get_class_doc (parameters (identifier_klass) identifier_klass (default_parameter (identifier_config) identifier_config (identifier_default_config) identifier_default_config )default_parameter )parameters (block (if_statement (attribute (identifier_config) identifier_config (identifier_exclude_class) identifier_exclude_class )attribute (block (for_statement (identifier_ex) identifier_ex (attribute (identifier_config) identifier_config (identifier_exclude_class) identifier_exclude_class )attribute (block (if_statement (call (attribute (identifier_ex) identifier_ex (identifier_match) identifier_match )attribute (argument_list (attribute (identifier_klass) identifier_klass (identifier___name__) identifier___name__ )attribute )argument_list )call (block (return_statement (None) None )return_statement )block )if_statement )block )for_statement )block )if_statement (expression_statement (assignment (identifier_nested_doc) identifier_nested_doc (list )list )assignment )expression_statement (expression_statement (assignment (identifier_class_dict) identifier_class_dict (attribute (identifier_klass) identifier_klass (identifier___dict__) identifier___dict__ )attribute )assignment )expression_statement (for_statement (identifier_item) identifier_item (call (identifier_dir) identifier_dir (argument_list (identifier_klass) identifier_klass )argument_list )call (block (if_statement (comparison_operator (identifier_item) identifier_item (call (attribute (identifier_class_dict) identifier_class_dict (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )comparison_operator (block (expression_statement (assignment (identifier_appended) identifier_appended (None) None )assignment )expression_statement (if_statement (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (subscript (identifier_class_dict) identifier_class_dict (identifier_item) identifier_item )subscript (identifier_type) identifier_type )argument_list )call (attribute (identifier_config) identifier_config (identifier_nested_class) identifier_nested_class )attribute )boolean_operator (block (expression_statement (assignment (identifier_appended) identifier_appended (call (identifier_get_class_doc) identifier_get_class_doc (argument_list (subscript (identifier_class_dict) identifier_class_dict (identifier_item) identifier_item )subscript (identifier_config) identifier_config )argument_list )call )assignment )expression_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (subscript (identifier_class_dict) identifier_class_dict (identifier_item) identifier_item )subscript (attribute (identifier_types) identifier_types (identifier_FunctionType) identifier_FunctionType )attribute )argument_list )call (block (expression_statement (assignment (identifier_appended) identifier_appended (call (identifier_get_function_doc) identifier_get_function_doc (argument_list (subscript (identifier_class_dict) identifier_class_dict (identifier_item) identifier_item )subscript (identifier_config) identifier_config )argument_list )call )assignment )expression_statement )block )elif_clause )if_statement (if_statement (comparison_operator (identifier_appended) identifier_appended (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_nested_doc) identifier_nested_doc (identifier_append) identifier_append )attribute (argument_list (identifier_appended) identifier_appended )argument_list )call )expression_statement )block )if_statement )block )if_statement )block )for_statement (return_statement (call (identifier__doc_object) identifier__doc_object (argument_list (identifier_klass) identifier_klass (string_'class') string_'class' (identifier_nested_doc) identifier_nested_doc (identifier_config) identifier_config )argument_list )call )return_statement )block )function_definition )module
Return doc for a class.
(module (function_definition (function_name_main) function_name_main (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__setup_task_manager) identifier__setup_task_manager )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__setup_source_and_destination) identifier__setup_source_and_destination )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_task_manager) identifier_task_manager )attribute (identifier_blocking_start) identifier_blocking_start )attribute (argument_list (keyword_argument (identifier_waiting_func) identifier_waiting_func (attribute (identifier_self) identifier_self (identifier_waiting_func) identifier_waiting_func )attribute )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (identifier_logger) identifier_logger )attribute (identifier_info) identifier_info )attribute (argument_list (string_'done.') string_'done.' )argument_list )call )expression_statement )block )function_definition )module
this main routine sets up the signal handlers, the source and destination crashstorage systems at the theaded task manager. That starts a flock of threads that are ready to shepherd crashes from the source to the destination.
(module (function_definition (function_name_num_samples) function_name_num_samples (parameters (identifier_self) identifier_self (default_parameter (identifier_sr) identifier_sr (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_native_sr) identifier_native_sr (attribute (identifier_self) identifier_self (identifier_sampling_rate) identifier_sampling_rate )attribute )assignment )expression_statement (expression_statement (assignment (identifier_num_samples) identifier_num_samples (call (attribute (identifier_units) identifier_units (identifier_seconds_to_sample) identifier_seconds_to_sample )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_duration) identifier_duration )attribute (identifier_native_sr) identifier_native_sr )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_sr) identifier_sr (None) None )comparison_operator (block (expression_statement (assignment (identifier_ratio) identifier_ratio (binary_operator (call (identifier_float) identifier_float (argument_list (identifier_sr) identifier_sr )argument_list )call (identifier_native_sr) identifier_native_sr )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_num_samples) identifier_num_samples (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_np) identifier_np (identifier_ceil) identifier_ceil )attribute (argument_list (binary_operator (identifier_num_samples) identifier_num_samples (identifier_ratio) identifier_ratio )binary_operator )argument_list )call )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_num_samples) identifier_num_samples )return_statement )block )function_definition )module
Return the number of samples. Args: sr (int): Calculate the number of samples with the given sampling-rate. If None use the native sampling-rate. Returns: int: Number of samples
(module (function_definition (function_name_ratio) function_name_ratio (parameters (identifier_self) identifier_self (typed_parameter (identifier_col) identifier_col (type (identifier_str) identifier_str )type )typed_parameter (typed_default_parameter (identifier_ratio_col) identifier_ratio_col (type (identifier_str) identifier_str )type (string_"Ratio") string_"Ratio" )typed_default_parameter )parameters (block (try_statement (block (expression_statement (assignment (identifier_df) identifier_df (call (attribute (attribute (identifier_self) identifier_self (identifier_df) identifier_df )attribute (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_df) identifier_df (identifier_ratio_col) identifier_ratio_col )subscript (call (attribute (subscript (identifier_df) identifier_df (list (identifier_col) identifier_col )list )subscript (identifier_apply) identifier_apply )attribute (argument_list (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (binary_operator (binary_operator (integer_100) integer_100 (identifier_x) identifier_x )binary_operator (call (identifier_float) identifier_float (argument_list (call (attribute (identifier_x) identifier_x (identifier_sum) identifier_sum )attribute (argument_list )argument_list )call )argument_list )call )binary_operator )lambda )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_df) identifier_df )attribute (identifier_df) identifier_df )assignment )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_err) identifier_err )attribute (argument_list (identifier_e) identifier_e (attribute (identifier_self) identifier_self (identifier_ratio) identifier_ratio )attribute (string_"Can not calculate ratio") string_"Can not calculate ratio" )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )module
Add a column whith the percentages ratio from a column :param col: column to calculate ratio from :type col: str :param ratio_col: new ratio column name, defaults to "Ratio" :param ratio_col: str, optional :example: ``ds2 = ds.ratio("Col 1")``
(module (function_definition (function_name__get_attrs) function_name__get_attrs (parameters (identifier_self) identifier_self (identifier_names) identifier_names )parameters (block (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_names) identifier_names (identifier_str) identifier_str )argument_list )call )assert_statement (expression_statement (assignment (identifier_names) identifier_names (call (attribute (call (attribute (identifier_names) identifier_names (identifier_replace) identifier_replace )attribute (argument_list (string_",") string_"," (string_" ") string_" " )argument_list )call (identifier_split) identifier_split )attribute (argument_list (string_" ") string_" " )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_res) identifier_res (list )list )assignment )expression_statement (for_statement (identifier_n) identifier_n (identifier_names) identifier_names (block (if_statement (comparison_operator (identifier_n) identifier_n (string_"") string_"" )comparison_operator (block (continue_statement )continue_statement )block )if_statement (if_statement (comparison_operator (identifier_n) identifier_n (attribute (identifier_self) identifier_self (identifier___dict__) identifier___dict__ )attribute )comparison_operator (block (raise_statement (call (identifier_KeyError) identifier_KeyError (argument_list (call (attribute (string_"Unknown name for Container attribute: '{}'") string_"Unknown name for Container attribute: '{}'" (identifier_format) identifier_format )attribute (argument_list (identifier_n) identifier_n )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_res) identifier_res (identifier_append) identifier_append )attribute (argument_list (call (identifier_getattr) identifier_getattr (argument_list (identifier_self) identifier_self (identifier_n) identifier_n )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_res) identifier_res )return_statement )block )function_definition )module
Convenience function to extract multiple attributes at once :param names: string of names separated by comma or space :return:
(module (function_definition (function_name_dbg_repr) function_name_dbg_repr (parameters (identifier_self) identifier_self (default_parameter (identifier_max_display) identifier_max_display (integer_10) integer_10 )default_parameter )parameters (block (expression_statement (assignment (identifier_s) identifier_s (binary_operator (call (identifier_repr) identifier_repr (argument_list (identifier_self) identifier_self )argument_list )call (string_"\n") string_"\n" )binary_operator )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_chosen_statements) identifier_chosen_statements )attribute )argument_list )call (identifier_max_display) identifier_max_display )comparison_operator (block (expression_statement (augmented_assignment (identifier_s) identifier_s (binary_operator (string_"%d SimRuns in program slice, displaying %d.\n") string_"%d SimRuns in program slice, displaying %d.\n" (tuple (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_chosen_statements) identifier_chosen_statements )attribute )argument_list )call (identifier_max_display) identifier_max_display )tuple )binary_operator )augmented_assignment )expression_statement )block (else_clause (block (expression_statement (augmented_assignment (identifier_s) identifier_s (binary_operator (string_"%d SimRuns in program slice.\n") string_"%d SimRuns in program slice.\n" (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_chosen_statements) identifier_chosen_statements )attribute )argument_list )call )binary_operator )augmented_assignment )expression_statement )block )else_clause )if_statement (if_statement (comparison_operator (identifier_max_display) identifier_max_display (None) None )comparison_operator (block (expression_statement (assignment (identifier_run_addrs) identifier_run_addrs (call (identifier_sorted) identifier_sorted (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_chosen_statements) identifier_chosen_statements )attribute (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_run_addrs) identifier_run_addrs (subscript (call (identifier_sorted) identifier_sorted (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_chosen_statements) identifier_chosen_statements )attribute (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call (slice (colon) colon (identifier_max_display) identifier_max_display )slice )subscript )assignment )expression_statement )block )else_clause )if_statement (for_statement (identifier_run_addr) identifier_run_addr (identifier_run_addrs) identifier_run_addrs (block (expression_statement (augmented_assignment (identifier_s) identifier_s (binary_operator (call (attribute (identifier_self) identifier_self (identifier_dbg_repr_run) identifier_dbg_repr_run )attribute (argument_list (identifier_run_addr) identifier_run_addr )argument_list )call (string_"\n") string_"\n" )binary_operator )augmented_assignment )expression_statement )block )for_statement (return_statement (identifier_s) identifier_s )return_statement )block )function_definition )module
Debugging output of this slice. :param max_display: The maximum number of SimRun slices to show. :return: A string representation.
(module (function_definition (function_name_exec_before_request_actions) function_name_exec_before_request_actions (parameters (identifier_actions) identifier_actions (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_groups) identifier_groups (tuple (string_"before") string_"before" (binary_operator (string_"before_") string_"before_" (call (attribute (attribute (attribute (identifier_flask) identifier_flask (identifier_request) identifier_request )attribute (identifier_method) identifier_method )attribute (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )binary_operator )tuple )assignment )expression_statement (return_statement (call (identifier_execute_actions) identifier_execute_actions (argument_list (identifier_actions) identifier_actions (keyword_argument (identifier_limit_groups) identifier_limit_groups (identifier_groups) identifier_groups )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Execute actions in the "before" and "before_METHOD" groups
(module (function_definition (function_name_get_static_properties) function_name_get_static_properties (parameters (identifier_self) identifier_self )parameters (block (return_statement (dictionary_comprehension (pair (attribute (identifier_tags) identifier_tags (identifier_tag) identifier_tag )attribute (call (attribute (identifier_tags) identifier_tags (identifier_get) identifier_get )attribute (argument_list (string_'VALUE') string_'VALUE' )argument_list )call )pair (for_in_clause (identifier_tags) identifier_tags (call (attribute (attribute (identifier_self) identifier_self (identifier_bnmodel) identifier_bnmodel )attribute (identifier_find) identifier_find )attribute (argument_list (string_'STATICPROPERTIES') string_'STATICPROPERTIES' )argument_list )call )for_in_clause )dictionary_comprehension )return_statement )block )function_definition )module
Returns a dictionary of STATICPROPERTIES Examples -------- >>> reader = XBNReader('xbn_test.xml') >>> reader.get_static_properties() {'FORMAT': 'MSR DTAS XML', 'VERSION': '0.2', 'CREATOR': 'Microsoft Research DTAS'}
(module (function_definition (function_name_enterEvent) function_name_enterEvent (parameters (identifier_self) identifier_self (identifier_event) identifier_event )parameters (block (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_XViewPanelItem) identifier_XViewPanelItem (identifier_self) identifier_self )argument_list )call (identifier_enterEvent) identifier_enterEvent )attribute (argument_list (identifier_event) identifier_event )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__hovered) identifier__hovered )attribute (True) True )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_update) identifier_update )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Mark the hovered state as being true. :param event | <QtCore.QEnterEvent>
(module (function_definition (function_name__get_data_volumes) function_name__get_data_volumes (parameters (identifier_vm_) identifier_vm_ )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (list )list )assignment )expression_statement (expression_statement (assignment (identifier_volumes) identifier_volumes (subscript (identifier_vm_) identifier_vm_ (string_'volumes') string_'volumes' )subscript )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (identifier_six) identifier_six (identifier_iteritems) identifier_iteritems )attribute (argument_list (identifier_volumes) identifier_volumes )argument_list )call (block (if_statement (comparison_operator (string_'disk_size') string_'disk_size' (call (attribute (subscript (identifier_volumes) identifier_volumes (identifier_key) identifier_key )subscript (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )comparison_operator (block (raise_statement (call (identifier_SaltCloudConfigError) identifier_SaltCloudConfigError (argument_list (call (attribute (string_'The volume \'{0}\' is missing \'disk_size\'') string_'The volume \'{0}\' is missing \'disk_size\'' (identifier_format) identifier_format )attribute (argument_list (identifier_key) identifier_key )argument_list )call )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (string_'disk_type') string_'disk_type' (call (attribute (subscript (identifier_volumes) identifier_volumes (identifier_key) identifier_key )subscript (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )comparison_operator (block (expression_statement (assignment (subscript (subscript (identifier_volumes) identifier_volumes (identifier_key) identifier_key )subscript (string_'disk_type') string_'disk_type' )subscript (string_'HDD') string_'HDD' )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_volume) identifier_volume (call (identifier_Volume) identifier_Volume (argument_list (keyword_argument (identifier_name) identifier_name (identifier_key) identifier_key )keyword_argument (keyword_argument (identifier_size) identifier_size (subscript (subscript (identifier_volumes) identifier_volumes (identifier_key) identifier_key )subscript (string_'disk_size') string_'disk_size' )subscript )keyword_argument (keyword_argument (identifier_disk_type) identifier_disk_type (subscript (subscript (identifier_volumes) identifier_volumes (identifier_key) identifier_key )subscript (string_'disk_type') string_'disk_type' )subscript )keyword_argument (keyword_argument (identifier_licence_type) identifier_licence_type (string_'OTHER') string_'OTHER' )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_'disk_availability_zone') string_'disk_availability_zone' (call (attribute (subscript (identifier_volumes) identifier_volumes (identifier_key) identifier_key )subscript (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )comparison_operator (block (expression_statement (assignment (attribute (identifier_volume) identifier_volume (identifier_availability_zone) identifier_availability_zone )attribute (subscript (subscript (identifier_volumes) identifier_volumes (identifier_key) identifier_key )subscript (string_'disk_availability_zone') string_'disk_availability_zone' )subscript )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_ret) identifier_ret (identifier_append) identifier_append )attribute (argument_list (identifier_volume) identifier_volume )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Construct a list of optional data volumes from the cloud profile
(module (function_definition (function_name_pop) function_name_pop (parameters (identifier_self) identifier_self (identifier_key) identifier_key (default_parameter (identifier_default) identifier_default (None) None )default_parameter )parameters (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__dictionary) identifier__dictionary )attribute (identifier_pop) identifier_pop )attribute (argument_list (call (attribute (identifier_key) identifier_key (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (identifier_default) identifier_default )argument_list )call )return_statement )block )function_definition )module
Remove the key and return the associated value or default if not found Args: key (str): The key to remove default (obj): The value to return if key is not present
(module (function_definition (function_name_addPrivateCertificate) function_name_addPrivateCertificate (parameters (identifier_self) identifier_self (identifier_subjectName) identifier_subjectName (default_parameter (identifier_existingCertificate) identifier_existingCertificate (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_existingCertificate) identifier_existingCertificate (None) None )comparison_operator (block (assert_statement (comparison_operator (string_'@') string_'@' (identifier_subjectName) identifier_subjectName )comparison_operator (string_"Don't self-sign user certs!") string_"Don't self-sign user certs!" )assert_statement (expression_statement (assignment (identifier_mainDN) identifier_mainDN (call (identifier_DistinguishedName) identifier_DistinguishedName (argument_list (keyword_argument (identifier_commonName) identifier_commonName (identifier_subjectName) identifier_subjectName )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_mainKey) identifier_mainKey (call (attribute (identifier_KeyPair) identifier_KeyPair (identifier_generate) identifier_generate )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_mainCertReq) identifier_mainCertReq (call (attribute (identifier_mainKey) identifier_mainKey (identifier_certificateRequest) identifier_certificateRequest )attribute (argument_list (identifier_mainDN) identifier_mainDN )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_mainCertData) identifier_mainCertData (call (attribute (identifier_mainKey) identifier_mainKey (identifier_signCertificateRequest) identifier_signCertificateRequest )attribute (argument_list (identifier_mainDN) identifier_mainDN (identifier_mainCertReq) identifier_mainCertReq (lambda (lambda_parameters (identifier_dn) identifier_dn )lambda_parameters (True) True )lambda (call (attribute (identifier_self) identifier_self (identifier_genSerial) identifier_genSerial )attribute (argument_list (identifier_subjectName) identifier_subjectName )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_mainCert) identifier_mainCert (call (attribute (identifier_mainKey) identifier_mainKey (identifier_newCertificate) identifier_newCertificate )attribute (argument_list (identifier_mainCertData) identifier_mainCertData )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_mainCert) identifier_mainCert (identifier_existingCertificate) identifier_existingCertificate )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_localStore) identifier_localStore )attribute (identifier_subjectName) identifier_subjectName )subscript (identifier_mainCert) identifier_mainCert )assignment )expression_statement )block )function_definition )module
Add a PrivateCertificate object to this store for this subjectName. If existingCertificate is None, add a new self-signed certificate.
(module (function_definition (function_name_find) function_name_find (parameters (identifier_self) identifier_self (identifier_soup) identifier_soup )parameters (block (for_statement (identifier_tag) identifier_tag (call (attribute (identifier_soup) identifier_soup (identifier_recursiveChildGenerator) identifier_recursiveChildGenerator )attribute (argument_list )argument_list )call (block (if_statement (call (attribute (identifier_self) identifier_self (identifier_match_criterion) identifier_match_criterion )attribute (argument_list (identifier_tag) identifier_tag )argument_list )call (block (expression_statement (yield (identifier_tag) identifier_tag )yield )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Yield tags matching the tag criterion from a soup. There is no need to override this if you are satisfied with finding tags that match match_criterion. Args: soup: A BeautifulSoup to search through. Yields: BeautifulSoup Tags that match the criterion.
(module (function_definition (function_name__print) function_name__print (parameters (identifier_self) identifier_self (default_parameter (identifier_force_flush) identifier_force_flush (False) False )default_parameter )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__stream_flush) identifier__stream_flush )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_next_perc) identifier_next_perc (call (attribute (identifier_self) identifier_self (identifier__calc_percent) identifier__calc_percent )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_update_interval) identifier_update_interval )attribute (block (expression_statement (assignment (identifier_do_update) identifier_do_update (comparison_operator (binary_operator (call (attribute (identifier_time) identifier_time (identifier_time) identifier_time )attribute (argument_list )argument_list )call (attribute (identifier_self) identifier_self (identifier_last_time) identifier_last_time )attribute )binary_operator (attribute (identifier_self) identifier_self (identifier_update_interval) identifier_update_interval )attribute )comparison_operator )assignment )expression_statement )block (elif_clause (identifier_force_flush) identifier_force_flush (block (expression_statement (assignment (identifier_do_update) identifier_do_update (True) True )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_do_update) identifier_do_update (comparison_operator (identifier_next_perc) identifier_next_perc (attribute (identifier_self) identifier_self (identifier_last_progress) identifier_last_progress )attribute )comparison_operator )assignment )expression_statement )block )else_clause )if_statement (if_statement (boolean_operator (identifier_do_update) identifier_do_update (attribute (identifier_self) identifier_self (identifier_active) identifier_active )attribute )boolean_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_last_progress) identifier_last_progress )attribute (identifier_next_perc) identifier_next_perc )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__cache_percent_indicator) identifier__cache_percent_indicator )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_last_progress) identifier_last_progress )attribute )argument_list )call )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_track) identifier_track )attribute (block (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier__cached_output) identifier__cached_output )attribute (binary_operator (string_' Time elapsed: ') string_' Time elapsed: ' (line_continuation_\) line_continuation_\ (call (attribute (identifier_self) identifier_self (identifier__get_time) identifier__get_time )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier__elapsed) identifier__elapsed )attribute (argument_list )argument_list )call )argument_list )call )binary_operator )augmented_assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__cache_eta) identifier__cache_eta )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier_item_id) identifier_item_id )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__cache_item_id) identifier__cache_item_id )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__stream_out) identifier__stream_out )attribute (argument_list (binary_operator (string_'\r%s') string_'\r%s' (attribute (identifier_self) identifier_self (identifier__cached_output) identifier__cached_output )attribute )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__stream_flush) identifier__stream_flush )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__cached_output) identifier__cached_output )attribute (string_'') string_'' )assignment )expression_statement )block )if_statement )block )function_definition )module
Prints formatted percentage and tracked time to the screen.
(module (function_definition (function_name_where) function_name_where (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_clauses) identifier_clauses (call (identifier_copy) identifier_copy (argument_list (attribute (identifier_self) identifier_self (identifier_clauses) identifier_clauses )attribute )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_dimension) identifier_dimension (identifier_condition) identifier_condition )pattern_list (call (attribute (identifier_kwargs) identifier_kwargs (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (identifier_dimension) identifier_dimension (attribute (identifier_self) identifier_self (identifier_clauses) identifier_clauses )attribute )comparison_operator (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (call (attribute (string_'There should be only one clause for {}') string_'There should be only one clause for {}' (identifier_format) identifier_format )attribute (argument_list (identifier_dimension) identifier_dimension )argument_list )call )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_dimension) identifier_dimension (attribute (identifier_self) identifier_self (identifier_schema) identifier_schema )attribute )comparison_operator (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (call (attribute (string_'The dimension {} doesn\'t exist') string_'The dimension {} doesn\'t exist' (identifier_format) identifier_format )attribute (argument_list (identifier_dimension) identifier_dimension )argument_list )call )argument_list )call )raise_statement )block )if_statement (if_statement (boolean_operator (call (identifier_isfunction) identifier_isfunction (argument_list (identifier_condition) identifier_condition )argument_list )call (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_condition) identifier_condition (attribute (identifier_functools) identifier_functools (identifier_partial) identifier_partial )attribute )argument_list )call )boolean_operator (block (expression_statement (assignment (subscript (identifier_clauses) identifier_clauses (identifier_dimension) identifier_dimension )subscript (identifier_condition) identifier_condition )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_clauses) identifier_clauses (identifier_dimension) identifier_dimension )subscript (call (attribute (identifier_functools) identifier_functools (identifier_partial) identifier_partial )attribute (argument_list (parenthesized_expression (lambda (lambda_parameters (identifier_x) identifier_x (identifier_y) identifier_y )lambda_parameters (comparison_operator (identifier_x) identifier_x (identifier_y) identifier_y )comparison_operator )lambda )parenthesized_expression (call (attribute (identifier_self) identifier_self (identifier__sanitize_dimension) identifier__sanitize_dimension )attribute (argument_list (call (identifier_str) identifier_str (argument_list (identifier_condition) identifier_condition )argument_list )call )argument_list )call )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block )for_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__copy) identifier__copy )attribute (argument_list (keyword_argument (identifier_clauses) identifier_clauses (identifier_clauses) identifier_clauses )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return a new Dataset refined using the given condition :param kwargs: a map of `dimension` => `condition` to filter the elements of the dataset. `condition` can either be an exact value or a callable returning a boolean value. If `condition` is a value, it is converted to a string, then sanitized. If `condition` is a callable, note that it will be passed sanitized values -- i.e., characters outside [a-zA-Z0-9_.] are converted to `_`.
(module (function_definition (function_name_send_raw_packet) function_name_send_raw_packet (parameters (identifier_self) identifier_self (typed_parameter (identifier_packet) identifier_packet (type (identifier_str) identifier_str )type )typed_parameter )parameters (block (expression_statement (assignment (identifier_data) identifier_data (binary_operator (identifier_packet) identifier_packet (string_'\r\n') string_'\r\n' )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (string_'writing data: %s') string_'writing data: %s' (call (identifier_repr) identifier_repr (argument_list (identifier_data) identifier_data )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_transport) identifier_transport )attribute (identifier_write) identifier_write )attribute (argument_list (call (attribute (identifier_data) identifier_data (identifier_encode) identifier_encode )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Encode and put packet string onto write buffer.
(module (function_definition (function_name_add_user_rating) function_name_add_user_rating (parameters (identifier_self) identifier_self (identifier_item_type) identifier_item_type (identifier_item_id) identifier_item_id (identifier_item_rating) identifier_item_rating )parameters (block (expression_statement (assignment (identifier_raw_response) identifier_raw_response (call (attribute (identifier_requests_util) identifier_requests_util (identifier_run_request) identifier_run_request )attribute (argument_list (string_'put') string_'put' (binary_operator (attribute (identifier_self) identifier_self (identifier_API_BASE_URL) identifier_API_BASE_URL )attribute (binary_operator (string_'/user/ratings/%s/%d/%d') string_'/user/ratings/%s/%d/%d' (tuple (identifier_item_type) identifier_item_type (identifier_item_id) identifier_item_id (identifier_item_rating) identifier_item_rating )tuple )binary_operator )binary_operator (keyword_argument (identifier_headers) identifier_headers (call (attribute (identifier_self) identifier_self (identifier___get_header_with_auth) identifier___get_header_with_auth )attribute (argument_list )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_parse_raw_response) identifier_parse_raw_response )attribute (argument_list (identifier_raw_response) identifier_raw_response )argument_list )call )return_statement )block )function_definition )module
Adds the rating for the item indicated for the current user. :param item_type: One of: series, episode, banner. :param item_id: The TheTVDB id of the item. :param item_rating: The rating from 0 to 10. :return:
(module (function_definition (function_name_remove_empty_cols) function_name_remove_empty_cols (parameters (identifier_records) identifier_records )parameters (block (expression_statement (assignment (identifier_records) identifier_records (call (identifier_list) identifier_list (argument_list (identifier_records) identifier_records )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_seqstrs) identifier_seqstrs (list_comprehension (call (identifier_str) identifier_str (argument_list (attribute (identifier_rec) identifier_rec (identifier_seq) identifier_seq )attribute )argument_list )call (for_in_clause (identifier_rec) identifier_rec (identifier_records) identifier_records )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_clean_cols) identifier_clean_cols (list_comprehension (identifier_col) identifier_col (for_in_clause (identifier_col) identifier_col (call (identifier_zip) identifier_zip (argument_list (list_splat (identifier_seqstrs) identifier_seqstrs )list_splat )argument_list )call )for_in_clause (if_clause (not_operator (call (identifier_all) identifier_all (generator_expression (comparison_operator (identifier_c) identifier_c (string_'-') string_'-' )comparison_operator (for_in_clause (identifier_c) identifier_c (identifier_col) identifier_col )for_in_clause )generator_expression )call )not_operator )if_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_clean_seqs) identifier_clean_seqs (list_comprehension (call (attribute (string_'') string_'' (identifier_join) identifier_join )attribute (argument_list (identifier_row) identifier_row )argument_list )call (for_in_clause (identifier_row) identifier_row (call (identifier_zip) identifier_zip (argument_list (list_splat (identifier_clean_cols) identifier_clean_cols )list_splat )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (for_statement (pattern_list (identifier_rec) identifier_rec (identifier_clean_seq) identifier_clean_seq )pattern_list (call (identifier_zip) identifier_zip (argument_list (identifier_records) identifier_records (identifier_clean_seqs) identifier_clean_seqs )argument_list )call (block (expression_statement (yield (call (identifier_SeqRecord) identifier_SeqRecord (argument_list (call (identifier_Seq) identifier_Seq (argument_list (identifier_clean_seq) identifier_clean_seq (attribute (attribute (identifier_rec) identifier_rec (identifier_seq) identifier_seq )attribute (identifier_alphabet) identifier_alphabet )attribute )argument_list )call (keyword_argument (identifier_id) identifier_id (attribute (identifier_rec) identifier_rec (identifier_id) identifier_id )attribute )keyword_argument (keyword_argument (identifier_name) identifier_name (attribute (identifier_rec) identifier_rec (identifier_name) identifier_name )attribute )keyword_argument (keyword_argument (identifier_description) identifier_description (attribute (identifier_rec) identifier_rec (identifier_description) identifier_description )attribute )keyword_argument (keyword_argument (identifier_dbxrefs) identifier_dbxrefs (attribute (identifier_rec) identifier_rec (identifier_dbxrefs) identifier_dbxrefs )attribute )keyword_argument (keyword_argument (identifier_features) identifier_features (attribute (identifier_rec) identifier_rec (identifier_features) identifier_features )attribute )keyword_argument (keyword_argument (identifier_annotations) identifier_annotations (attribute (identifier_rec) identifier_rec (identifier_annotations) identifier_annotations )attribute )keyword_argument (keyword_argument (identifier_letter_annotations) identifier_letter_annotations (attribute (identifier_rec) identifier_rec (identifier_letter_annotations) identifier_letter_annotations )attribute )keyword_argument )argument_list )call )yield )expression_statement )block )for_statement )block )function_definition )module
Remove all-gap columns from aligned SeqRecords.
(module (function_definition (function_name_collect_directories) function_name_collect_directories (parameters (identifier_self) identifier_self (identifier_directories) identifier_directories )parameters (block (expression_statement (assignment (identifier_directories) identifier_directories (call (attribute (identifier_util) identifier_util (identifier_to_absolute_paths) identifier_to_absolute_paths )attribute (argument_list (identifier_directories) identifier_directories )argument_list )call )assignment )expression_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_recursive) identifier_recursive )attribute )not_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__remove_blacklisted) identifier__remove_blacklisted )attribute (argument_list (identifier_directories) identifier_directories )argument_list )call )return_statement )block )if_statement (expression_statement (assignment (identifier_recursive_dirs) identifier_recursive_dirs (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_dir_) identifier_dir_ (identifier_directories) identifier_directories (block (expression_statement (assignment (identifier_walk_iter) identifier_walk_iter (call (attribute (identifier_os) identifier_os (identifier_walk) identifier_walk )attribute (argument_list (identifier_dir_) identifier_dir_ (keyword_argument (identifier_followlinks) identifier_followlinks (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_walk_iter) identifier_walk_iter (list_comprehension (subscript (identifier_w) identifier_w (integer_0) integer_0 )subscript (for_in_clause (identifier_w) identifier_w (identifier_walk_iter) identifier_walk_iter )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_walk_iter) identifier_walk_iter (call (attribute (identifier_util) identifier_util (identifier_to_absolute_paths) identifier_to_absolute_paths )attribute (argument_list (identifier_walk_iter) identifier_walk_iter )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_walk_iter) identifier_walk_iter (call (attribute (identifier_self) identifier_self (identifier__remove_blacklisted) identifier__remove_blacklisted )attribute (argument_list (identifier_walk_iter) identifier_walk_iter )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_recursive_dirs) identifier_recursive_dirs (identifier_update) identifier_update )attribute (argument_list (identifier_walk_iter) identifier_walk_iter )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_recursive_dirs) identifier_recursive_dirs )return_statement )block )function_definition )module
Collects all the directories into a `set` object. If `self.recursive` is set to `True` this method will iterate through and return all of the directories and the subdirectories found from `directories` that are not blacklisted. if `self.recursive` is set to `False` this will return all the directories that are not balcklisted. `directories` may be either a single object or an iterable. Recommend passing in absolute paths instead of relative. `collect_directories` will attempt to convert `directories` to absolute paths if they are not already.
(module (function_definition (function_name_area2lonlat) function_name_area2lonlat (parameters (identifier_dataarray) identifier_dataarray )parameters (block (expression_statement (assignment (identifier_area) identifier_area (subscript (attribute (identifier_dataarray) identifier_dataarray (identifier_attrs) identifier_attrs )attribute (string_'area') string_'area' )subscript )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_lons) identifier_lons (identifier_lats) identifier_lats )pattern_list (call (attribute (identifier_area) identifier_area (identifier_get_lonlats_dask) identifier_get_lonlats_dask )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_lons) identifier_lons (call (attribute (identifier_xr) identifier_xr (identifier_DataArray) identifier_DataArray )attribute (argument_list (identifier_lons) identifier_lons (keyword_argument (identifier_dims) identifier_dims (list (string_'y') string_'y' (string_'x') string_'x' )list )keyword_argument (keyword_argument (identifier_attrs) identifier_attrs (dictionary (pair (string_'name') string_'name' (string_"longitude") string_"longitude" )pair (pair (string_'standard_name') string_'standard_name' (string_"longitude") string_"longitude" )pair (pair (string_'units') string_'units' (string_'degrees_east') string_'degrees_east' )pair )dictionary )keyword_argument (keyword_argument (identifier_name) identifier_name (string_'longitude') string_'longitude' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_lats) identifier_lats (call (attribute (identifier_xr) identifier_xr (identifier_DataArray) identifier_DataArray )attribute (argument_list (identifier_lats) identifier_lats (keyword_argument (identifier_dims) identifier_dims (list (string_'y') string_'y' (string_'x') string_'x' )list )keyword_argument (keyword_argument (identifier_attrs) identifier_attrs (dictionary (pair (string_'name') string_'name' (string_"latitude") string_"latitude" )pair (pair (string_'standard_name') string_'standard_name' (string_"latitude") string_"latitude" )pair (pair (string_'units') string_'units' (string_'degrees_north') string_'degrees_north' )pair )dictionary )keyword_argument (keyword_argument (identifier_name) identifier_name (string_'latitude') string_'latitude' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_dataarray) identifier_dataarray (identifier_attrs) identifier_attrs )attribute (string_'coordinates') string_'coordinates' )subscript (string_'longitude latitude') string_'longitude latitude' )assignment )expression_statement (return_statement (list (identifier_dataarray) identifier_dataarray (identifier_lons) identifier_lons (identifier_lats) identifier_lats )list )return_statement )block )function_definition )module
Convert an area to longitudes and latitudes.
(module (function_definition (function_name_open_url) function_name_open_url (parameters (identifier_self) identifier_self (identifier_url) identifier_url (default_parameter (identifier_sleep_after_open) identifier_sleep_after_open (integer_2) integer_2 )default_parameter )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_zap) identifier_zap )attribute (identifier_urlopen) identifier_urlopen )attribute (argument_list (identifier_url) identifier_url )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_time) identifier_time (identifier_sleep) identifier_sleep )attribute (argument_list (identifier_sleep_after_open) identifier_sleep_after_open )argument_list )call )expression_statement )block )function_definition )module
Access a URL through ZAP.
(module (function_definition (function_name_map_position) function_name_map_position (parameters (identifier_pos) identifier_pos )parameters (block (expression_statement (assignment (identifier_posiction_dict) identifier_posiction_dict (call (identifier_dict) identifier_dict (argument_list (call (identifier_zip) identifier_zip (argument_list (call (identifier_range) identifier_range (argument_list (integer_1) integer_1 (integer_17) integer_17 )argument_list )call (list_comprehension (identifier_i) identifier_i (for_in_clause (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (integer_30) integer_30 (integer_62) integer_62 )argument_list )call )for_in_clause (if_clause (binary_operator (identifier_i) identifier_i (integer_2) integer_2 )binary_operator )if_clause )list_comprehension )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (subscript (identifier_posiction_dict) identifier_posiction_dict (identifier_pos) identifier_pos )subscript )return_statement )block )function_definition )module
Map natural position to machine code postion
(module (function_definition (function_name_process_bind_param) function_name_process_bind_param (parameters (identifier_self) identifier_self (identifier_obj) identifier_obj (identifier_dialect) identifier_dialect )parameters (block (expression_statement (assignment (identifier_value) identifier_value (boolean_operator (identifier_obj) identifier_obj (dictionary )dictionary )boolean_operator )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (attribute (identifier_flask_cloudy) identifier_flask_cloudy (identifier_Object) identifier_Object )attribute )argument_list )call (block (expression_statement (assignment (identifier_value) identifier_value (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_k) identifier_k (attribute (identifier_self) identifier_self (identifier_DEFAULT_KEYS) identifier_DEFAULT_KEYS )attribute (block (expression_statement (assignment (subscript (identifier_value) identifier_value (identifier_k) identifier_k )subscript (call (identifier_getattr) identifier_getattr (argument_list (identifier_obj) identifier_obj (identifier_k) identifier_k )argument_list )call )assignment )expression_statement )block )for_statement )block )if_statement (return_statement (call (attribute (call (identifier_super) identifier_super (argument_list (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier_self) identifier_self )argument_list )call (identifier_process_bind_param) identifier_process_bind_param )attribute (argument_list (identifier_value) identifier_value (identifier_dialect) identifier_dialect )argument_list )call )return_statement )block )function_definition )module
Get a flask_cloudy.Object and save it as a dict
(module (function_definition (function_name_get_log_id) function_name_get_log_id (parameters (identifier_cls) identifier_cls (identifier_id) identifier_id )parameters (block (expression_statement (assignment (identifier_conn) identifier_conn (call (attribute (identifier_Qubole) identifier_Qubole (identifier_agent) identifier_agent )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_r) identifier_r (call (attribute (identifier_conn) identifier_conn (identifier_get_raw) identifier_get_raw )attribute (argument_list (binary_operator (call (attribute (identifier_cls) identifier_cls (identifier_element_path) identifier_element_path )attribute (argument_list (identifier_id) identifier_id )argument_list )call (string_"/logs") string_"/logs" )binary_operator )argument_list )call )assignment )expression_statement (return_statement (attribute (identifier_r) identifier_r (identifier_text) identifier_text )attribute )return_statement )block )function_definition )module
Fetches log for the command represented by this id Args: `id`: command id
(module (function_definition (function_name_clean_line) function_name_clean_line (parameters (identifier_str) identifier_str (identifier_delimiter) identifier_delimiter )parameters (block (return_statement (list_comprehension (call (attribute (identifier_x) identifier_x (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call (for_in_clause (identifier_x) identifier_x (call (attribute (call (attribute (identifier_str) identifier_str (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call (identifier_split) identifier_split )attribute (argument_list (identifier_delimiter) identifier_delimiter )argument_list )call )for_in_clause (if_clause (comparison_operator (identifier_x) identifier_x (string_'') string_'' )comparison_operator )if_clause )list_comprehension )return_statement )block )function_definition )module
Split string on given delimiter, remove whitespace from each field.
(module (function_definition (function_name_height) function_name_height (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_alloc_h) identifier_alloc_h (attribute (identifier_self) identifier_self (identifier_alloc_h) identifier_alloc_h )attribute )assignment )expression_statement (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier_parent) identifier_parent )attribute (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (identifier_self) identifier_self (identifier_parent) identifier_parent )attribute (attribute (identifier_graphics) identifier_graphics (identifier_Scene) identifier_Scene )attribute )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_alloc_h) identifier_alloc_h (attribute (attribute (identifier_self) identifier_self (identifier_parent) identifier_parent )attribute (identifier_height) identifier_height )attribute )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_min_height) identifier_min_height (binary_operator (binary_operator (parenthesized_expression (boolean_operator (attribute (identifier_self) identifier_self (identifier_min_height) identifier_min_height )attribute (integer_0) integer_0 )boolean_operator )parenthesized_expression (attribute (identifier_self) identifier_self (identifier_margin_top) identifier_margin_top )attribute )binary_operator (attribute (identifier_self) identifier_self (identifier_margin_bottom) identifier_margin_bottom )attribute )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_h) identifier_h (conditional_expression (identifier_alloc_h) identifier_alloc_h (boolean_operator (comparison_operator (identifier_alloc_h) identifier_alloc_h (None) None )comparison_operator (attribute (identifier_self) identifier_self (identifier_fill) identifier_fill )attribute )boolean_operator (identifier_min_height) identifier_min_height )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_h) identifier_h (call (identifier_max) identifier_max (argument_list (boolean_operator (identifier_h) identifier_h (integer_0) integer_0 )boolean_operator (subscript (call (attribute (identifier_self) identifier_self (identifier_get_min_size) identifier_get_min_size )attribute (argument_list )argument_list )call (integer_1) integer_1 )subscript )argument_list )call )assignment )expression_statement (return_statement (binary_operator (binary_operator (identifier_h) identifier_h (attribute (identifier_self) identifier_self (identifier_margin_top) identifier_margin_top )attribute )binary_operator (attribute (identifier_self) identifier_self (identifier_margin_bottom) identifier_margin_bottom )attribute )binary_operator )return_statement )block )function_definition )module
height in pixels
(module (function_definition (function_name_get_entries) function_name_get_entries (parameters (identifier_self) identifier_self (default_parameter (identifier_start) identifier_start (integer_0) integer_0 )default_parameter (default_parameter (identifier_end) identifier_end (integer_0) integer_0 )default_parameter (default_parameter (identifier_data_request) identifier_data_request (None) None )default_parameter (default_parameter (identifier_steam_ids) identifier_steam_ids (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_message) identifier_message (call (identifier_MsgProto) identifier_MsgProto (argument_list (attribute (identifier_EMsg) identifier_EMsg (identifier_ClientLBSGetLBEntries) identifier_ClientLBSGetLBEntries )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_message) identifier_message (identifier_body) identifier_body )attribute (identifier_app_id) identifier_app_id )attribute (attribute (identifier_self) identifier_self (identifier_app_id) identifier_app_id )attribute )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_message) identifier_message (identifier_body) identifier_body )attribute (identifier_leaderboard_id) identifier_leaderboard_id )attribute (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_message) identifier_message (identifier_body) identifier_body )attribute (identifier_range_start) identifier_range_start )attribute (identifier_start) identifier_start )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_message) identifier_message (identifier_body) identifier_body )attribute (identifier_range_end) identifier_range_end )attribute (identifier_end) identifier_end )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_message) identifier_message (identifier_body) identifier_body )attribute (identifier_leaderboard_data_request) identifier_leaderboard_data_request )attribute (conditional_expression (attribute (identifier_self) identifier_self (identifier_data_request) identifier_data_request )attribute (comparison_operator (identifier_data_request) identifier_data_request (None) None )comparison_operator (identifier_data_request) identifier_data_request )conditional_expression )assignment )expression_statement (if_statement (identifier_steam_ids) identifier_steam_ids (block (expression_statement (call (attribute (attribute (attribute (identifier_message) identifier_message (identifier_body) identifier_body )attribute (identifier_steamids) identifier_steamids )attribute (identifier_extend) identifier_extend )attribute (argument_list (identifier_steam_ids) identifier_steam_ids )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_resp) identifier_resp (call (attribute (attribute (identifier_self) identifier_self (identifier__steam) identifier__steam )attribute (identifier_send_job_and_wait) identifier_send_job_and_wait )attribute (argument_list (identifier_message) identifier_message (keyword_argument (identifier_timeout) identifier_timeout (integer_15) integer_15 )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_resp) identifier_resp )not_operator (block (raise_statement (call (identifier_LookupError) identifier_LookupError (argument_list (string_"Didn't receive response within 15seconds :(") string_"Didn't receive response within 15seconds :(" )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_resp) identifier_resp (identifier_eresult) identifier_eresult )attribute (attribute (identifier_EResult) identifier_EResult (identifier_OK) identifier_OK )attribute )comparison_operator (block (raise_statement (call (identifier_LookupError) identifier_LookupError (argument_list (call (identifier_EResult) identifier_EResult (argument_list (attribute (identifier_resp) identifier_resp (identifier_eresult) identifier_eresult )attribute )argument_list )call )argument_list )call )raise_statement )block )if_statement (if_statement (call (attribute (identifier_resp) identifier_resp (identifier_HasField) identifier_HasField )attribute (argument_list (string_'leaderboard_entry_count') string_'leaderboard_entry_count' )argument_list )call (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_entry_count) identifier_entry_count )attribute (attribute (identifier_resp) identifier_resp (identifier_leaderboard_entry_count) identifier_leaderboard_entry_count )attribute )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_resp) identifier_resp (identifier_entries) identifier_entries )attribute )return_statement )block )function_definition )module
Get leaderboard entries. :param start: start entry, not index (e.g. rank 1 is ``start=1``) :type start: :class:`int` :param end: end entry, not index (e.g. only one entry then ``start=1,end=1``) :type end: :class:`int` :param data_request: data being requested :type data_request: :class:`steam.enums.common.ELeaderboardDataRequest` :param steam_ids: list of steam ids when using :prop:`.ELeaderboardDataRequest.Users` :type steamids: :class:`list` :return: a list of entries, see ``CMsgClientLBSGetLBEntriesResponse`` :rtype: :class:`list` :raises: :class:`LookupError` on message timeout or error
(module (function_definition (function_name_policy) function_name_policy (parameters (identifier_self) identifier_self (identifier_observations) identifier_observations )parameters (block (expression_statement (assignment (identifier_input_data) identifier_input_data (call (attribute (identifier_self) identifier_self (identifier_input_block) identifier_input_block )attribute (argument_list (identifier_observations) identifier_observations )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_policy_base_output) identifier_policy_base_output (call (attribute (identifier_self) identifier_self (identifier_policy_backbone) identifier_policy_backbone )attribute (argument_list (identifier_input_data) identifier_input_data )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_policy_params) identifier_policy_params (call (attribute (identifier_self) identifier_self (identifier_action_head) identifier_action_head )attribute (argument_list (identifier_policy_base_output) identifier_policy_base_output )argument_list )call )assignment )expression_statement (return_statement (identifier_policy_params) identifier_policy_params )return_statement )block )function_definition )module
Calculate only action head for given state
(module (function_definition (function_name_deleteByOrigIndex) function_name_deleteByOrigIndex (parameters (identifier_self) identifier_self (identifier_index) identifier_index )parameters (block (expression_statement (assignment (identifier_result) identifier_result (list )list )assignment )expression_statement (expression_statement (assignment (identifier_result_tracker) identifier_result_tracker (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_counter) identifier_counter (identifier_row) identifier_row )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (attribute (identifier_self) identifier_self (identifier_table) identifier_table )attribute )argument_list )call (block (if_statement (comparison_operator (subscript (attribute (identifier_self) identifier_self (identifier_index_track) identifier_index_track )attribute (identifier_counter) identifier_counter )subscript (identifier_index) identifier_index )comparison_operator (block (expression_statement (call (attribute (identifier_result) identifier_result (identifier_append) identifier_append )attribute (argument_list (identifier_row) identifier_row )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_result_tracker) identifier_result_tracker (identifier_append) identifier_append )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_index_track) identifier_index_track )attribute (identifier_counter) identifier_counter )subscript )argument_list )call )expression_statement )block )if_statement )block )for_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_table) identifier_table )attribute (identifier_result) identifier_result )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_index_track) identifier_index_track )attribute (identifier_result_tracker) identifier_result_tracker )assignment )expression_statement (return_statement (identifier_self) identifier_self )return_statement )block )function_definition )module
Removes a single entry from the list given the index reference. The index, in this instance, is a reference to the *original* list indexing as seen when the list was first inserted into PLOD. An example: >>> test = [ ... {"name": "Jim", "age": 18, "income": 93000, "wigs": 68 }, ... {"name": "Larry", "age": 18, "wigs": [3, 2, 9]}, ... {"name": "Joe", "age": 20, "income": 15000, "wigs": [1, 2, 3]}, ... {"name": "Bill", "age": 19, "income": 29000 }, ... ] >>> myPLOD = PLOD(test) >>> print myPLOD.sort("name").returnString() [ {age: 19, income: 29000, name: 'Bill' , wigs: None }, {age: 18, income: 93000, name: 'Jim' , wigs: 68}, {age: 20, income: 15000, name: 'Joe' , wigs: [1, 2, 3]}, {age: 18, income: None , name: 'Larry', wigs: [3, 2, 9]} ] >>> print myPLOD.deleteByOrigIndex(0).returnString() [ {age: 19, income: 29000, name: 'Bill' , wigs: None }, {age: 20, income: 15000, name: 'Joe' , wigs: [1, 2, 3]}, {age: 18, income: None , name: 'Larry', wigs: [3, 2, 9]} ] As you can see in the example, the list was sorted by 'name', which placed 'Bill' as the first entry. Yet, when the deleteByOrigIndex was passed a zero (for the first entry), it removed 'Jim' instead since it was the original first entry. :param index: An integer representing the place of entry in the original list of dictionaries. :return: self
(module (function_definition (function_name_LDA_discriminants) function_name_LDA_discriminants (parameters (identifier_x) identifier_x (identifier_labels) identifier_labels )parameters (block (try_statement (block (expression_statement (assignment (identifier_x) identifier_x (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (identifier_x) identifier_x )argument_list )call )assignment )expression_statement )block (except_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Impossible to convert x to a numpy array.') string_'Impossible to convert x to a numpy array.' )argument_list )call )raise_statement )block )except_clause )try_statement (expression_statement (assignment (pattern_list (identifier_eigen_values) identifier_eigen_values (identifier_eigen_vectors) identifier_eigen_vectors )pattern_list (call (identifier_LDA_base) identifier_LDA_base (argument_list (identifier_x) identifier_x (identifier_labels) identifier_labels )argument_list )call )assignment )expression_statement (return_statement (subscript (identifier_eigen_values) identifier_eigen_values (call (attribute (parenthesized_expression (unary_operator (identifier_eigen_values) identifier_eigen_values )unary_operator )parenthesized_expression (identifier_argsort) identifier_argsort )attribute (argument_list )argument_list )call )subscript )return_statement )block )function_definition )module
Linear Discriminant Analysis helper for determination how many columns of data should be reduced. **Args:** * `x` : input matrix (2d array), every row represents new sample * `labels` : list of labels (iterable), every item should be label for \ sample with corresponding index **Returns:** * `discriminants` : array of eigenvalues sorted in descending order
(module (function_definition (function_name_check_signature) function_name_check_signature (parameters (identifier_signature) identifier_signature (identifier_key) identifier_key (identifier_data) identifier_data )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_key) identifier_key (call (identifier_type) identifier_type (argument_list (string_u'') string_u'' )argument_list )call )argument_list )call (block (expression_statement (assignment (identifier_key) identifier_key (call (attribute (identifier_key) identifier_key (identifier_encode) identifier_encode )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_digest) identifier_digest (binary_operator (string_'sha1=') string_'sha1=' (call (attribute (call (attribute (identifier_hmac) identifier_hmac (identifier_new) identifier_new )attribute (argument_list (identifier_key) identifier_key (identifier_data) identifier_data (attribute (identifier_hashlib) identifier_hashlib (identifier_sha1) identifier_sha1 )attribute )argument_list )call (identifier_hexdigest) identifier_hexdigest )attribute (argument_list )argument_list )call )binary_operator )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_digest) identifier_digest (call (identifier_type) identifier_type (argument_list (string_u'') string_u'' )argument_list )call )argument_list )call (block (expression_statement (assignment (identifier_digest) identifier_digest (call (attribute (identifier_digest) identifier_digest (identifier_encode) identifier_encode )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_signature) identifier_signature (call (identifier_type) identifier_type (argument_list (string_u'') string_u'' )argument_list )call )argument_list )call (block (expression_statement (assignment (identifier_signature) identifier_signature (call (attribute (identifier_signature) identifier_signature (identifier_encode) identifier_encode )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_werkzeug) identifier_werkzeug (identifier_security) identifier_security )attribute (identifier_safe_str_cmp) identifier_safe_str_cmp )attribute (argument_list (identifier_digest) identifier_digest (identifier_signature) identifier_signature )argument_list )call )return_statement )block )function_definition )module
Compute the HMAC signature and test against a given hash.
(module (function_definition (function_name_purge) function_name_purge (parameters (default_parameter (identifier_root) identifier_root (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (call (attribute (identifier_base) identifier_base (identifier_data_dir) identifier_data_dir )attribute (argument_list )argument_list )call (string_'models') string_'models' )argument_list )call )default_parameter )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (expression_statement (assignment (identifier_root) identifier_root (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_expanduser) identifier_expanduser )attribute (argument_list (identifier_root) identifier_root )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_files) identifier_files (call (attribute (identifier_os) identifier_os (identifier_listdir) identifier_listdir )attribute (argument_list (identifier_root) identifier_root )argument_list )call )assignment )expression_statement (for_statement (identifier_f) identifier_f (identifier_files) identifier_files (block (if_statement (call (attribute (identifier_f) identifier_f (identifier_endswith) identifier_endswith )attribute (argument_list (string_".params") string_".params" )argument_list )call (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_remove) identifier_remove )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_root) identifier_root (identifier_f) identifier_f )argument_list )call )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
r"""Purge all pretrained model files in local file store. Parameters ---------- root : str, default '$MXNET_HOME/models' Location for keeping the model parameters.
(module (function_definition (function_name_add) function_name_add (parameters (identifier_self) identifier_self (identifier_resource) identifier_resource )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_resource) identifier_resource (attribute (identifier_collections) identifier_collections (identifier_Iterable) identifier_Iterable )attribute )argument_list )call (block (for_statement (identifier_r) identifier_r (identifier_resource) identifier_resource (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_resources) identifier_resources )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_r) identifier_r )argument_list )call )expression_statement )block )for_statement )block (else_clause (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_resources) identifier_resources )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_resource) identifier_resource )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Add a resource or an iterable collection of resources to this container. Must be implemented in derived class.