sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_patternVector) function_name_patternVector (parameters (identifier_self) identifier_self (identifier_vector) identifier_vector )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_patterned) identifier_patterned )attribute )not_operator (block (return_statement (identifier_vector) identifier_vector )return_statement )block )if_statement (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_vector) identifier_vector )argument_list )call (identifier_int) identifier_int )comparison_operator (block (if_statement (comparison_operator (call (attribute (identifier_self) identifier_self (identifier_getWord) identifier_getWord )attribute (argument_list (identifier_vector) identifier_vector )argument_list )call (string_'') string_'' )comparison_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_getWord) identifier_getWord )attribute (argument_list (identifier_vector) identifier_vector )argument_list )call )return_statement )block (else_clause (block (return_statement (identifier_vector) identifier_vector )return_statement )block )else_clause )if_statement )block (elif_clause (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_vector) identifier_vector )argument_list )call (identifier_float) identifier_float )comparison_operator (block (if_statement (comparison_operator (call (attribute (identifier_self) identifier_self (identifier_getWord) identifier_getWord )attribute (argument_list (identifier_vector) identifier_vector )argument_list )call (string_'') string_'' )comparison_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_getWord) identifier_getWord )attribute (argument_list (identifier_vector) identifier_vector )argument_list )call )return_statement )block (else_clause (block (return_statement (identifier_vector) identifier_vector )return_statement )block )else_clause )if_statement )block )elif_clause (elif_clause (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_vector) identifier_vector )argument_list )call (identifier_str) identifier_str )comparison_operator (block (return_statement (identifier_vector) identifier_vector )return_statement )block )elif_clause (elif_clause (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_vector) identifier_vector )argument_list )call (identifier_list) identifier_list )comparison_operator (block (if_statement (comparison_operator (call (attribute (identifier_self) identifier_self (identifier_getWord) identifier_getWord )attribute (argument_list (identifier_vector) identifier_vector )argument_list )call (string_'') string_'' )comparison_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_getWord) identifier_getWord )attribute (argument_list (identifier_vector) identifier_vector )argument_list )call )return_statement )block )if_statement )block )elif_clause )if_statement (expression_statement (assignment (identifier_vec) identifier_vec (list )list )assignment )expression_statement (for_statement (identifier_v) identifier_v (identifier_vector) identifier_vector (block (if_statement (comparison_operator (call (attribute (identifier_self) identifier_self (identifier_getWord) identifier_getWord )attribute (argument_list (identifier_v) identifier_v )argument_list )call (string_'') string_'' )comparison_operator (block (expression_statement (assignment (identifier_retval) identifier_retval (call (attribute (identifier_self) identifier_self (identifier_getWord) identifier_getWord )attribute (argument_list (identifier_v) identifier_v )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_vec) identifier_vec (identifier_append) identifier_append )attribute (argument_list (identifier_retval) identifier_retval )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_retval) identifier_retval (call (attribute (identifier_self) identifier_self (identifier_patternVector) identifier_patternVector )attribute (argument_list (identifier_v) identifier_v )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_vec) identifier_vec (identifier_append) identifier_append )attribute (argument_list (identifier_retval) identifier_retval )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (return_statement (identifier_vec) identifier_vec )return_statement )block )function_definition )module
Replaces vector with patterns. Used for loading inputs or targets from a file and still preserving patterns.
(module (function_definition (function_name__server_property) function_name__server_property (parameters (identifier_self) identifier_self (identifier_attr_name) identifier_attr_name )parameters (block (expression_statement (assignment (identifier_server) identifier_server (call (attribute (attribute (identifier_self) identifier_self (identifier__topology) identifier__topology )attribute (identifier_select_server) identifier_select_server )attribute (argument_list (identifier_writable_server_selector) identifier_writable_server_selector )argument_list )call )assignment )expression_statement (return_statement (call (identifier_getattr) identifier_getattr (argument_list (attribute (identifier_server) identifier_server (identifier_description) identifier_description )attribute (identifier_attr_name) identifier_attr_name )argument_list )call )return_statement )block )function_definition )module
An attribute of the current server's description. If the client is not connected, this will block until a connection is established or raise ServerSelectionTimeoutError if no server is available. Not threadsafe if used multiple times in a single method, since the server may change. In such cases, store a local reference to a ServerDescription first, then use its properties.
(module (function_definition (function_name__parse_response) function_name__parse_response (parameters (identifier_self) identifier_self (identifier_respond) identifier_respond )parameters (block (expression_statement (assignment (identifier_mobj) identifier_mobj (call (attribute (attribute (identifier_self) identifier_self (identifier__max_qubit_error_re) identifier__max_qubit_error_re )attribute (identifier_match) identifier_match )attribute (argument_list (attribute (identifier_respond) identifier_respond (identifier_text) identifier_text )attribute )argument_list )call )assignment )expression_statement (if_statement (identifier_mobj) identifier_mobj (block (raise_statement (call (identifier_RegisterSizeError) identifier_RegisterSizeError (argument_list (call (attribute (string_'device register size must be <= {}') string_'device register size must be <= {}' (identifier_format) identifier_format )attribute (argument_list (call (attribute (identifier_mobj) identifier_mobj (identifier_group) identifier_group )attribute (argument_list (integer_1) integer_1 )argument_list )call )argument_list )call )argument_list )call )raise_statement )block )if_statement (return_statement (True) True )return_statement )block )function_definition )module
parse text of response for HTTP errors This parses the text of the response to decide whether to retry request or raise exception. At the moment this only detects an exception condition. Args: respond (Response): requests.Response object Returns: bool: False if the request should be retried, True if not. Raises: RegisterSizeError
(module (function_definition (function_name_resetScale) function_name_resetScale (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_img) identifier_img )attribute (identifier_scale) identifier_scale )attribute (argument_list (binary_operator (float_1.) float_1. (subscript (attribute (identifier_self) identifier_self (identifier_imgScale) identifier_imgScale )attribute (integer_0) integer_0 )subscript )binary_operator (binary_operator (float_1.) float_1. (subscript (attribute (identifier_self) identifier_self (identifier_imgScale) identifier_imgScale )attribute (integer_1) integer_1 )subscript )binary_operator )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_imgScale) identifier_imgScale )attribute (tuple (float_1.) float_1. (float_1.) float_1. )tuple )assignment )expression_statement )block )function_definition )module
Resets the scale on this image. Correctly aligns time scale, undoes manual scaling
(module (function_definition (function_name_find) function_name_find (parameters (identifier_self) identifier_self (identifier_start_address) identifier_start_address (identifier_end_address) identifier_end_address (default_parameter (identifier_byte_depth) identifier_byte_depth (integer_20) integer_20 )default_parameter (default_parameter (identifier_instrs_depth) identifier_instrs_depth (integer_2) integer_2 )default_parameter )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__max_bytes) identifier__max_bytes )attribute (identifier_byte_depth) identifier_byte_depth )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__instrs_depth) identifier__instrs_depth )attribute (identifier_instrs_depth) identifier_instrs_depth )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__architecture) identifier__architecture )attribute (identifier_ARCH_X86) identifier_ARCH_X86 )comparison_operator (block (expression_statement (assignment (identifier_candidates) identifier_candidates (call (attribute (identifier_self) identifier_self (identifier__find_x86_candidates) identifier__find_x86_candidates )attribute (argument_list (identifier_start_address) identifier_start_address (identifier_end_address) identifier_end_address )argument_list )call )assignment )expression_statement )block (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier__architecture) identifier__architecture )attribute (identifier_ARCH_ARM) identifier_ARCH_ARM )comparison_operator (block (expression_statement (assignment (identifier_candidates) identifier_candidates (call (attribute (identifier_self) identifier_self (identifier__find_arm_candidates) identifier__find_arm_candidates )attribute (argument_list (identifier_start_address) identifier_start_address (identifier_end_address) identifier_end_address )argument_list )call )assignment )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (string_"Architecture not supported.") string_"Architecture not supported." )argument_list )call )raise_statement )block )else_clause )if_statement (return_statement (call (identifier_sorted) identifier_sorted (argument_list (identifier_candidates) identifier_candidates (keyword_argument (identifier_key) identifier_key (lambda (lambda_parameters (identifier_g) identifier_g )lambda_parameters (attribute (identifier_g) identifier_g (identifier_address) identifier_address )attribute )lambda )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Find gadgets.
(module (function_definition (function_name__default_headers) function_name__default_headers (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_headers) identifier_headers (dictionary (pair (string_"Authorization") string_"Authorization" (call (attribute (string_'Bearer {}') string_'Bearer {}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_api_key) identifier_api_key )attribute )argument_list )call )pair (pair (string_"User-agent") string_"User-agent" (attribute (identifier_self) identifier_self (identifier_useragent) identifier_useragent )attribute )pair (pair (string_"Accept") string_"Accept" (string_'application/json') string_'application/json' )pair )dictionary )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_impersonate_subuser) identifier_impersonate_subuser )attribute (block (expression_statement (assignment (subscript (identifier_headers) identifier_headers (string_'On-Behalf-Of') string_'On-Behalf-Of' )subscript (attribute (identifier_self) identifier_self (identifier_impersonate_subuser) identifier_impersonate_subuser )attribute )assignment )expression_statement )block )if_statement (return_statement (identifier_headers) identifier_headers )return_statement )block )function_definition )module
Set the default header for a Twilio SendGrid v3 API call
(module (function_definition (function_name_ordc) function_name_ordc (parameters (identifier_item) identifier_item (identifier_inset) identifier_inset )parameters (block (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_inset) identifier_inset (attribute (identifier_stypes) identifier_stypes (identifier_SpiceCell) identifier_SpiceCell )attribute )argument_list )call )assert_statement (assert_statement (call (attribute (identifier_inset) identifier_inset (identifier_is_char) identifier_is_char )attribute (argument_list )argument_list )call )assert_statement (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_item) identifier_item (identifier_str) identifier_str )argument_list )call )assert_statement (expression_statement (assignment (identifier_item) identifier_item (call (attribute (identifier_stypes) identifier_stypes (identifier_stringToCharP) identifier_stringToCharP )attribute (argument_list (identifier_item) identifier_item )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_libspice) identifier_libspice (identifier_ordc_c) identifier_ordc_c )attribute (argument_list (identifier_item) identifier_item (call (attribute (identifier_ctypes) identifier_ctypes (identifier_byref) identifier_byref )attribute (argument_list (identifier_inset) identifier_inset )argument_list )call )argument_list )call )return_statement )block )function_definition )module
The function returns the ordinal position of any given item in a character set. If the item does not appear in the set, the function returns -1. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ordc_c.html :param item: An item to locate within a set. :type item: str :param inset: A set to search for a given item. :type inset: SpiceCharCell :return: the ordinal position of item within the set :rtype: int
(module (function_definition (function_name_escape_query) function_name_escape_query (parameters (identifier_query) identifier_query )parameters (block (return_statement (call (attribute (call (attribute (call (attribute (call (attribute (identifier_query) identifier_query (identifier_replace) identifier_replace )attribute (argument_list (string_"\\") string_"\\" (string_r"\5C") string_r"\5C" )argument_list )call (identifier_replace) identifier_replace )attribute (argument_list (string_"*") string_"*" (string_r"\2A") string_r"\2A" )argument_list )call (identifier_replace) identifier_replace )attribute (argument_list (string_"(") string_"(" (string_r"\28") string_r"\28" )argument_list )call (identifier_replace) identifier_replace )attribute (argument_list (string_")") string_")" (string_r"\29") string_r"\29" )argument_list )call )return_statement )block )function_definition )module
Escapes certain filter characters from an LDAP query.
(module (function_definition (function_name__lxml_el_to_data) function_name__lxml_el_to_data (parameters (identifier_lxml_el) identifier_lxml_el (identifier_ns) identifier_ns (identifier_nsmap) identifier_nsmap (default_parameter (identifier_snake) identifier_snake (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_tag_name) identifier_tag_name (call (identifier__to_colon_ns) identifier__to_colon_ns (argument_list (attribute (identifier_lxml_el) identifier_lxml_el (identifier_tag) identifier_tag )attribute (keyword_argument (identifier_default_ns) identifier_default_ns (identifier_ns) identifier_ns )keyword_argument (keyword_argument (identifier_nsmap) identifier_nsmap (identifier_nsmap) identifier_nsmap )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ret) identifier_ret (list (identifier_tag_name) identifier_tag_name )list )assignment )expression_statement (expression_statement (assignment (identifier_attributes) identifier_attributes (call (identifier__get_el_attributes) identifier__get_el_attributes (argument_list (identifier_lxml_el) identifier_lxml_el (keyword_argument (identifier_ns) identifier_ns (identifier_ns) identifier_ns )keyword_argument (keyword_argument (identifier_nsmap) identifier_nsmap (identifier_nsmap) identifier_nsmap )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (identifier_attributes) identifier_attributes (block (expression_statement (call (attribute (identifier_ret) identifier_ret (identifier_append) identifier_append )attribute (argument_list (identifier_attributes) identifier_attributes )argument_list )call )expression_statement )block )if_statement (for_statement (identifier_sub_el) identifier_sub_el (identifier_lxml_el) identifier_lxml_el (block (expression_statement (call (attribute (identifier_ret) identifier_ret (identifier_append) identifier_append )attribute (argument_list (call (identifier__lxml_el_to_data) identifier__lxml_el_to_data (argument_list (identifier_sub_el) identifier_sub_el (identifier_ns) identifier_ns (identifier_nsmap) identifier_nsmap (keyword_argument (identifier_snake) identifier_snake (identifier_snake) identifier_snake )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier_text) identifier_text (attribute (identifier_lxml_el) identifier_lxml_el (identifier_text) identifier_text )attribute )assignment )expression_statement (if_statement (identifier_text) identifier_text (block (expression_statement (call (attribute (identifier_ret) identifier_ret (identifier_append) identifier_append )attribute (argument_list (identifier_text) identifier_text )argument_list )call )expression_statement )block )if_statement (return_statement (call (identifier_tuple) identifier_tuple (argument_list (identifier_ret) identifier_ret )argument_list )call )return_statement )block )function_definition )module
Convert an ``lxml._Element`` instance to a Python tuple.
(module (function_definition (function_name_register_id) function_name_register_id (parameters (identifier_self) identifier_self (identifier_id_string) identifier_id_string )parameters (block (try_statement (block (expression_statement (assignment (pattern_list (identifier_prefix) identifier_prefix (identifier_count) identifier_count )pattern_list (call (attribute (identifier_id_string) identifier_id_string (identifier_rsplit) identifier_rsplit )attribute (argument_list (string_"_") string_"_" (integer_1) integer_1 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_count) identifier_count (call (identifier_int) identifier_int (argument_list (identifier_count) identifier_count )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (pass_statement )pass_statement )block )except_clause (else_clause (block (if_statement (comparison_operator (identifier_prefix) identifier_prefix (attribute (identifier_self) identifier_self (identifier_prefix) identifier_prefix )attribute )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_counter) identifier_counter )attribute (call (identifier_max) identifier_max (argument_list (identifier_count) identifier_count (attribute (identifier_self) identifier_self (identifier_counter) identifier_counter )attribute )argument_list )call )assignment )expression_statement )block )if_statement )block )else_clause )try_statement )block )function_definition )module
Register a manually assigned id as used, to avoid collisions.
(module (function_definition (function_name_facts) function_name_facts (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_fact) identifier_fact (call (attribute (identifier_lib) identifier_lib (identifier_EnvGetNextFact) identifier_EnvGetNextFact )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__env) identifier__env )attribute (attribute (identifier_ffi) identifier_ffi (identifier_NULL) identifier_NULL )attribute )argument_list )call )assignment )expression_statement (while_statement (comparison_operator (identifier_fact) identifier_fact (attribute (identifier_ffi) identifier_ffi (identifier_NULL) identifier_NULL )attribute )comparison_operator (block (expression_statement (yield (call (identifier_new_fact) identifier_new_fact (argument_list (attribute (identifier_self) identifier_self (identifier__env) identifier__env )attribute (identifier_fact) identifier_fact )argument_list )call )yield )expression_statement (expression_statement (assignment (identifier_fact) identifier_fact (call (attribute (identifier_lib) identifier_lib (identifier_EnvGetNextFact) identifier_EnvGetNextFact )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__env) identifier__env )attribute (identifier_fact) identifier_fact )argument_list )call )assignment )expression_statement )block )while_statement )block )function_definition )module
Iterate over the asserted Facts.
(module (function_definition (function_name_columns_in_filters) function_name_columns_in_filters (parameters (identifier_filters) identifier_filters )parameters (block (if_statement (not_operator (identifier_filters) identifier_filters )not_operator (block (return_statement (list )list )return_statement )block )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_filters) identifier_filters (identifier_str) identifier_str )argument_list )call )not_operator (block (expression_statement (assignment (identifier_filters) identifier_filters (call (attribute (string_' ') string_' ' (identifier_join) identifier_join )attribute (argument_list (identifier_filters) identifier_filters )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_columns) identifier_columns (list )list )assignment )expression_statement (expression_statement (assignment (identifier_reserved) identifier_reserved (set (string_'and') string_'and' (string_'or') string_'or' (string_'in') string_'in' (string_'not') string_'not' )set )assignment )expression_statement (for_statement (pattern_list (identifier_toknum) identifier_toknum (identifier_tokval) identifier_tokval (identifier__) identifier__ (identifier__) identifier__ (identifier__) identifier__ )pattern_list (call (identifier_generate_tokens) identifier_generate_tokens (argument_list (attribute (call (identifier_StringIO) identifier_StringIO (argument_list (identifier_filters) identifier_filters )argument_list )call (identifier_readline) identifier_readline )attribute )argument_list )call (block (if_statement (boolean_operator (comparison_operator (identifier_toknum) identifier_toknum (identifier_NAME) identifier_NAME )comparison_operator (comparison_operator (identifier_tokval) identifier_tokval (identifier_reserved) identifier_reserved )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_columns) identifier_columns (identifier_append) identifier_append )attribute (argument_list (identifier_tokval) identifier_tokval )argument_list )call )expression_statement )block )if_statement )block )for_statement (return_statement (call (identifier_list) identifier_list (argument_list (call (attribute (identifier_tz) identifier_tz (identifier_unique) identifier_unique )attribute (argument_list (identifier_columns) identifier_columns )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Returns a list of the columns used in a set of query filters. Parameters ---------- filters : list of str or str List of the filters as passed passed to ``apply_filter_query``. Returns ------- columns : list of str List of all the strings mentioned in the filters.
(module (function_definition (function_name_yml_fnc) function_name_yml_fnc (parameters (identifier_fname) identifier_fname (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_options) identifier_options )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_key) identifier_key (string_"ac_safe") string_"ac_safe" )assignment )expression_statement (expression_statement (assignment (identifier_fnc) identifier_fnc (call (identifier_getattr) identifier_getattr (argument_list (identifier_yaml) identifier_yaml (conditional_expression (binary_operator (string_r"safe_") string_r"safe_" (identifier_fname) identifier_fname )binary_operator (call (attribute (identifier_options) identifier_options (identifier_get) identifier_get )attribute (argument_list (identifier_key) identifier_key )argument_list )call (identifier_fname) identifier_fname )conditional_expression )argument_list )call )assignment )expression_statement (return_statement (call (identifier_fnc) identifier_fnc (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (call (attribute (identifier_common) identifier_common (identifier_filter_from_options) identifier_filter_from_options )attribute (argument_list (identifier_key) identifier_key (identifier_options) identifier_options )argument_list )call )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
An wrapper of yaml.safe_load, yaml.load, yaml.safe_dump and yaml.dump. :param fname: "load" or "dump", not checked but it should be OK. see also :func:`yml_load` and :func:`yml_dump` :param args: [stream] for load or [cnf, stream] for dump :param options: keyword args may contain "ac_safe" to load/dump safely
(module (function_definition (function_name_set_attr_value) function_name_set_attr_value (parameters (identifier_self) identifier_self (identifier_key) identifier_key (identifier_attr) identifier_attr (identifier_value) identifier_value )parameters (block (expression_statement (assignment (identifier_idx) identifier_idx (subscript (attribute (identifier_self) identifier_self (identifier__keys) identifier__keys )attribute (identifier_key) identifier_key )subscript )assignment )expression_statement (expression_statement (call (attribute (subscript (subscript (attribute (identifier_self) identifier_self (identifier__attrs) identifier__attrs )attribute (identifier_attr) identifier_attr )subscript (identifier_idx) identifier_idx )subscript (identifier_set) identifier_set )attribute (argument_list (identifier_value) identifier_value )argument_list )call )expression_statement )block )function_definition )module
set the value of a given attribute for a given key
(module (function_definition (function_name__) function_name__ (parameters (identifier_obj) identifier_obj )parameters (block (expression_statement (assignment (identifier_tz_offset) identifier_tz_offset (call (attribute (identifier_obj) identifier_obj (identifier_utcoffset) identifier_utcoffset )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (not_operator (identifier_tz_offset) identifier_tz_offset )not_operator (comparison_operator (identifier_tz_offset) identifier_tz_offset (identifier_UTC_ZERO) identifier_UTC_ZERO )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_iso_datetime) identifier_iso_datetime (call (attribute (identifier_obj) identifier_obj (identifier_strftime) identifier_strftime )attribute (argument_list (string_'%Y-%m-%dT%H:%M:%S.%fZ') string_'%Y-%m-%dT%H:%M:%S.%fZ' )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_iso_datetime) identifier_iso_datetime (call (attribute (identifier_obj) identifier_obj (identifier_isoformat) identifier_isoformat )attribute (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_iso_datetime) identifier_iso_datetime )return_statement )block )function_definition )module
ISO 8601 format. Interprets naive datetime as UTC with zulu suffix.
(module (function_definition (function_name__check_panel) function_name__check_panel (parameters (identifier_self) identifier_self (identifier_length) identifier_length )parameters (block (expression_statement (assignment (identifier_n) identifier_n (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_index) identifier_index )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (subscript (call (identifier_divmod) identifier_divmod (argument_list (identifier_n) identifier_n (identifier_length) identifier_length )argument_list )call (integer_1) integer_1 )subscript (integer_0) integer_0 )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"Panel length '%g' must evenly divide length of series '%g'") string_"Panel length '%g' must evenly divide length of series '%g'" (tuple (identifier_length) identifier_length (identifier_n) identifier_n )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_n) identifier_n (identifier_length) identifier_length )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"Panel length '%g' cannot be length of series '%g'") string_"Panel length '%g' cannot be length of series '%g'" (tuple (identifier_length) identifier_length (identifier_n) identifier_n )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Check that given fixed panel length evenly divides index. Parameters ---------- length : int Fixed length with which to subdivide index
(module (function_definition (function_name_run_alias) function_name_run_alias (parameters )parameters (block (expression_statement (assignment (identifier_mode) identifier_mode (attribute (call (identifier_Path) identifier_Path (argument_list (subscript (attribute (identifier_sys) identifier_sys (identifier_argv) identifier_argv )attribute (integer_0) integer_0 )subscript )argument_list )call (identifier_stem) identifier_stem )attribute )assignment )expression_statement (expression_statement (assignment (identifier_help) identifier_help (conditional_expression (True) True (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_sys) identifier_sys (identifier_argv) identifier_argv )attribute )argument_list )call (integer_1) integer_1 )comparison_operator (False) False )conditional_expression )assignment )expression_statement (if_statement (comparison_operator (identifier_mode) identifier_mode (string_'lcc') string_'lcc' )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_argv) identifier_argv )attribute (identifier_insert) identifier_insert )attribute (argument_list (integer_1) integer_1 (string_'c') string_'c' )argument_list )call )expression_statement )block (elif_clause (comparison_operator (identifier_mode) identifier_mode (string_'lpython') string_'lpython' )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_argv) identifier_argv )attribute (identifier_insert) identifier_insert )attribute (argument_list (integer_1) integer_1 (string_'python') string_'python' )argument_list )call )expression_statement )block )elif_clause )if_statement (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_argv) identifier_argv )attribute (identifier_insert) identifier_insert )attribute (argument_list (integer_1) integer_1 (string_'run') string_'run' )argument_list )call )expression_statement (if_statement (identifier_help) identifier_help (block (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_argv) identifier_argv )attribute (identifier_append) identifier_append )attribute (argument_list (string_'--help') string_'--help' )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_main) identifier_main (identifier_main) identifier_main )attribute (argument_list (keyword_argument (identifier_prog_name) identifier_prog_name (string_'backend.ai') string_'backend.ai' )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Quick aliases for run command.
(module (function_definition (function_name_knob_subgroup) function_name_knob_subgroup (parameters (identifier_self) identifier_self (default_parameter (identifier_cutoff) identifier_cutoff (float_7.0) float_7.0 )default_parameter )parameters (block (if_statement (comparison_operator (identifier_cutoff) identifier_cutoff (attribute (identifier_self) identifier_self (identifier_cutoff) identifier_cutoff )attribute )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"cutoff supplied ({0}) cannot be greater than self.cutoff ({1})") string_"cutoff supplied ({0}) cannot be greater than self.cutoff ({1})" (identifier_format) identifier_format )attribute (argument_list (identifier_cutoff) identifier_cutoff (attribute (identifier_self) identifier_self (identifier_cutoff) identifier_cutoff )attribute )argument_list )call )argument_list )call )raise_statement )block )if_statement (return_statement (call (identifier_KnobGroup) identifier_KnobGroup (argument_list (keyword_argument (identifier_monomers) identifier_monomers (list_comprehension (identifier_x) identifier_x (for_in_clause (identifier_x) identifier_x (call (attribute (identifier_self) identifier_self (identifier_get_monomers) identifier_get_monomers )attribute (argument_list )argument_list )call )for_in_clause (if_clause (comparison_operator (attribute (identifier_x) identifier_x (identifier_max_kh_distance) identifier_max_kh_distance )attribute (identifier_cutoff) identifier_cutoff )comparison_operator )if_clause )list_comprehension )keyword_argument (keyword_argument (identifier_ampal_parent) identifier_ampal_parent (attribute (identifier_self) identifier_self (identifier_ampal_parent) identifier_ampal_parent )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
KnobGroup where all KnobsIntoHoles have max_kh_distance <= cutoff.
(module (function_definition (function_name__get_factor) function_name__get_factor (parameters (identifier_self) identifier_self (identifier_belief_prop) identifier_belief_prop (identifier_evidence) identifier_evidence )parameters (block (expression_statement (assignment (identifier_final_factor) identifier_final_factor (call (identifier_factor_product) identifier_factor_product (argument_list (list_splat (call (attribute (attribute (identifier_belief_prop) identifier_belief_prop (identifier_junction_tree) identifier_junction_tree )attribute (identifier_get_factors) identifier_get_factors )attribute (argument_list )argument_list )call )list_splat )argument_list )call )assignment )expression_statement (if_statement (identifier_evidence) identifier_evidence (block (for_statement (identifier_var) identifier_var (identifier_evidence) identifier_evidence (block (if_statement (comparison_operator (identifier_var) identifier_var (call (attribute (identifier_final_factor) identifier_final_factor (identifier_scope) identifier_scope )attribute (argument_list )argument_list )call )comparison_operator (block (expression_statement (call (attribute (identifier_final_factor) identifier_final_factor (identifier_reduce) identifier_reduce )attribute (argument_list (list (tuple (identifier_var) identifier_var (subscript (identifier_evidence) identifier_evidence (identifier_var) identifier_var )subscript )tuple )list )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )if_statement (return_statement (identifier_final_factor) identifier_final_factor )return_statement )block )function_definition )module
Extracts the required factor from the junction tree. Parameters: ---------- belief_prop: Belief Propagation Belief Propagation which needs to be updated. evidence: dict a dict key, value pair as {var: state_of_var_observed}
(module (function_definition (function_name_building) function_name_building (parameters (default_parameter (identifier_shape) identifier_shape (None) None )default_parameter (default_parameter (identifier_gray) identifier_gray (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_name) identifier_name (string_'cms.mat') string_'cms.mat' )assignment )expression_statement (expression_statement (assignment (identifier_url) identifier_url (binary_operator (identifier_URL_CAM) identifier_URL_CAM (identifier_name) identifier_name )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_dct) identifier_dct (call (identifier_get_data) identifier_get_data (argument_list (identifier_name) identifier_name (keyword_argument (identifier_subset) identifier_subset (identifier_DATA_SUBSET) identifier_DATA_SUBSET )keyword_argument (keyword_argument (identifier_url) identifier_url (identifier_url) identifier_url )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_im) identifier_im (call (attribute (identifier_np) identifier_np (identifier_rot90) identifier_rot90 )attribute (argument_list (subscript (identifier_dct) identifier_dct (string_'im') string_'im' )subscript (keyword_argument (identifier_k) identifier_k (integer_3) integer_3 )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (identifier_convert) identifier_convert (argument_list (identifier_im) identifier_im (identifier_shape) identifier_shape (keyword_argument (identifier_gray) identifier_gray (identifier_gray) identifier_gray )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Photo of the Centre for Mathematical Sciences in Cambridge. Returns ------- An image with the following properties: image type: color (or gray scales if `gray=True`) size: [442, 331] (if not specified by `size`) scale: [0, 1] type: float64
(module (function_definition (function_name_cache_key) function_name_cache_key (parameters (identifier_self) identifier_self (typed_parameter (identifier_repo) identifier_repo (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_branch) identifier_branch (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_task) identifier_task (type (identifier_Task) identifier_Task )type )typed_parameter (typed_parameter (identifier_git_repo) identifier_git_repo (type (identifier_Repo) identifier_Repo )type )typed_parameter )parameters (type (identifier_str) identifier_str )type (block (return_statement (call (attribute (string_"{repo}_{branch}_{hash}_{task}") string_"{repo}_{branch}_{hash}_{task}" (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_repo) identifier_repo (call (attribute (identifier_self) identifier_self (identifier_repo_id) identifier_repo_id )attribute (argument_list (identifier_repo) identifier_repo )argument_list )call )keyword_argument (keyword_argument (identifier_branch) identifier_branch (identifier_branch) identifier_branch )keyword_argument (keyword_argument (identifier_hash) identifier_hash (call (attribute (identifier_self) identifier_self (identifier_current_git_hash) identifier_current_git_hash )attribute (argument_list (identifier_repo) identifier_repo (identifier_branch) identifier_branch (identifier_git_repo) identifier_git_repo )argument_list )call )keyword_argument (keyword_argument (identifier_task) identifier_task (attribute (identifier_task) identifier_task (identifier_hash) identifier_hash )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Returns the key used for storing results in cache.
(module (function_definition (function_name_humanize_filesize) function_name_humanize_filesize (parameters (typed_parameter (identifier_filesize) identifier_filesize (type (identifier_int) identifier_int )type )typed_parameter )parameters (type (generic_type (identifier_Tuple) identifier_Tuple (type_parameter (type (identifier_str) identifier_str )type (type (identifier_str) identifier_str )type )type_parameter )generic_type )type (block (for_statement (identifier_unit) identifier_unit (list (string_'') string_'' (string_'K') string_'K' (string_'M') string_'M' (string_'G') string_'G' (string_'T') string_'T' (string_'P') string_'P' (string_'E') string_'E' (string_'Z') string_'Z' )list (block (if_statement (comparison_operator (identifier_filesize) identifier_filesize (float_1024.0) float_1024.0 )comparison_operator (block (return_statement (expression_list (call (attribute (string_'{:3.1f}') string_'{:3.1f}' (identifier_format) identifier_format )attribute (argument_list (identifier_filesize) identifier_filesize )argument_list )call (binary_operator (identifier_unit) identifier_unit (string_'B') string_'B' )binary_operator )expression_list )return_statement )block )if_statement (expression_statement (augmented_assignment (identifier_filesize) identifier_filesize (float_1024.0) float_1024.0 )augmented_assignment )expression_statement )block )for_statement )block )function_definition )module
Return human readable pair of size and unit from the given filesize in bytes.
(module (function_definition (function_name_contents_match) function_name_contents_match (parameters (identifier_self) identifier_self (identifier_path) identifier_path )parameters (block (expression_statement (assignment (identifier_checksum) identifier_checksum (call (identifier_file_hash) identifier_file_hash (argument_list (identifier_path) identifier_path )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_kv) identifier_kv (call (attribute (identifier_unitdata) identifier_unitdata (identifier_kv) identifier_kv )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_stored_checksum) identifier_stored_checksum (call (attribute (identifier_kv) identifier_kv (identifier_get) identifier_get )attribute (argument_list (binary_operator (string_'hardening:%s') string_'hardening:%s' (identifier_path) identifier_path )binary_operator )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_stored_checksum) identifier_stored_checksum )not_operator (block (expression_statement (call (identifier_log) identifier_log (argument_list (binary_operator (string_'Checksum for %s has not been calculated.') string_'Checksum for %s has not been calculated.' (identifier_path) identifier_path )binary_operator (keyword_argument (identifier_level) identifier_level (identifier_DEBUG) identifier_DEBUG )keyword_argument )argument_list )call )expression_statement (return_statement (False) False )return_statement )block (elif_clause (comparison_operator (identifier_stored_checksum) identifier_stored_checksum (identifier_checksum) identifier_checksum )comparison_operator (block (expression_statement (call (identifier_log) identifier_log (argument_list (binary_operator (string_'Checksum mismatch for %s.') string_'Checksum mismatch for %s.' (identifier_path) identifier_path )binary_operator (keyword_argument (identifier_level) identifier_level (identifier_DEBUG) identifier_DEBUG )keyword_argument )argument_list )call )expression_statement (return_statement (False) False )return_statement )block )elif_clause )if_statement (return_statement (True) True )return_statement )block )function_definition )module
Determines if the file content is the same. This is determined by comparing hashsum of the file contents and the saved hashsum. If there is no hashsum, then the content cannot be sure to be the same so treat them as if they are not the same. Otherwise, return True if the hashsums are the same, False if they are not the same. :param path: the file to check.
(module (function_definition (function_name_datasets) function_name_datasets (parameters (identifier_self) identifier_self (typed_default_parameter (identifier_libref) identifier_libref (type (identifier_str) identifier_str )type (string_'') string_'' )typed_default_parameter )parameters (type (identifier_str) identifier_str )type (block (expression_statement (assignment (identifier_code) identifier_code (string_"proc datasets") string_"proc datasets" )assignment )expression_statement (if_statement (identifier_libref) identifier_libref (block (expression_statement (augmented_assignment (identifier_code) identifier_code (binary_operator (string_" dd=") string_" dd=" (identifier_libref) identifier_libref )binary_operator )augmented_assignment )expression_statement )block )if_statement (expression_statement (augmented_assignment (identifier_code) identifier_code (string_"; quit;") string_"; quit;" )augmented_assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_nosub) identifier_nosub )attribute (block (expression_statement (call (identifier_print) identifier_print (argument_list (identifier_code) identifier_code )argument_list )call )expression_statement )block (else_clause (block (if_statement (comparison_operator (call (attribute (attribute (identifier_self) identifier_self (identifier_results) identifier_results )attribute (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (string_'html') string_'html' )comparison_operator (block (expression_statement (assignment (identifier_ll) identifier_ll (call (attribute (attribute (identifier_self) identifier_self (identifier__io) identifier__io )attribute (identifier_submit) identifier_submit )attribute (argument_list (identifier_code) identifier_code (string_"html") string_"html" )argument_list )call )assignment )expression_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_batch) identifier_batch )attribute )not_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_DISPLAY) identifier_DISPLAY )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_HTML) identifier_HTML )attribute (argument_list (subscript (identifier_ll) identifier_ll (string_'LST') string_'LST' )subscript )argument_list )call )argument_list )call )expression_statement )block (else_clause (block (return_statement (identifier_ll) identifier_ll )return_statement )block )else_clause )if_statement )block (else_clause (block (expression_statement (assignment (identifier_ll) identifier_ll (call (attribute (attribute (identifier_self) identifier_self (identifier__io) identifier__io )attribute (identifier_submit) identifier_submit )attribute (argument_list (identifier_code) identifier_code (string_"text") string_"text" )argument_list )call )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_batch) identifier_batch )attribute (block (return_statement (subscript (call (attribute (subscript (identifier_ll) identifier_ll (string_'LOG') string_'LOG' )subscript (identifier_rsplit) identifier_rsplit )attribute (argument_list (string_";*\';*\";*/;\n") string_";*\';*\";*/;\n" )argument_list )call (integer_0) integer_0 )subscript )return_statement )block (else_clause (block (expression_statement (call (identifier_print) identifier_print (argument_list (subscript (call (attribute (subscript (identifier_ll) identifier_ll (string_'LOG') string_'LOG' )subscript (identifier_rsplit) identifier_rsplit )attribute (argument_list (string_";*\';*\";*/;\n") string_";*\';*\";*/;\n" )argument_list )call (integer_0) integer_0 )subscript )argument_list )call )expression_statement )block )else_clause )if_statement )block )else_clause )if_statement )block )else_clause )if_statement )block )function_definition )module
This method is used to query a libref. The results show information about the libref including members. :param libref: the libref to query :return:
(module (function_definition (function_name__decode_linode_plan_label) function_name__decode_linode_plan_label (parameters (identifier_label) identifier_label )parameters (block (expression_statement (assignment (identifier_sizes) identifier_sizes (call (identifier_avail_sizes) identifier_avail_sizes (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_label) identifier_label (identifier_sizes) identifier_sizes )comparison_operator (block (if_statement (comparison_operator (string_'GB') string_'GB' (identifier_label) identifier_label )comparison_operator (block (raise_statement (call (identifier_SaltCloudException) identifier_SaltCloudException (argument_list (call (attribute (string_'Invalid Linode plan ({}) specified - call avail_sizes() for all available options') string_'Invalid Linode plan ({}) specified - call avail_sizes() for all available options' (identifier_format) identifier_format )attribute (argument_list (identifier_label) identifier_label )argument_list )call )argument_list )call )raise_statement )block (else_clause (block (expression_statement (assignment (identifier_plan) identifier_plan (call (attribute (identifier_label) identifier_label (identifier_split) identifier_split )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_plan) identifier_plan )argument_list )call (integer_2) integer_2 )comparison_operator (block (raise_statement (call (identifier_SaltCloudException) identifier_SaltCloudException (argument_list (call (attribute (string_'Invalid Linode plan ({}) specified - call avail_sizes() for all available options') string_'Invalid Linode plan ({}) specified - call avail_sizes() for all available options' (identifier_format) identifier_format )attribute (argument_list (identifier_label) identifier_label )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_plan_type) identifier_plan_type (subscript (identifier_plan) identifier_plan (integer_0) integer_0 )subscript )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_plan_size) identifier_plan_size (call (identifier_int) identifier_int (argument_list (subscript (identifier_plan) identifier_plan (integer_1) integer_1 )subscript )argument_list )call )assignment )expression_statement )block (except_clause (identifier_TypeError) identifier_TypeError (block (expression_statement (assignment (identifier_plan_size) identifier_plan_size (integer_0) integer_0 )assignment )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (string_'Failed to decode Linode plan label in Cloud Profile: %s') string_'Failed to decode Linode plan label in Cloud Profile: %s' (identifier_label) identifier_label )argument_list )call )expression_statement )block )except_clause )try_statement (if_statement (boolean_operator (comparison_operator (identifier_plan_type) identifier_plan_type (string_'Linode') string_'Linode' )comparison_operator (comparison_operator (identifier_plan_size) identifier_plan_size (integer_1024) integer_1024 )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_plan_type) identifier_plan_type (string_'Nanode') string_'Nanode' )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_plan_size) identifier_plan_size (binary_operator (identifier_plan_size) identifier_plan_size (integer_1024) integer_1024 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_new_label) identifier_new_label (call (attribute (string_"{} {}GB") string_"{} {}GB" (identifier_format) identifier_format )attribute (argument_list (identifier_plan_type) identifier_plan_type (identifier_plan_size) identifier_plan_size )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_new_label) identifier_new_label (identifier_sizes) identifier_sizes )comparison_operator (block (raise_statement (call (identifier_SaltCloudException) identifier_SaltCloudException (argument_list (call (attribute (string_'Invalid Linode plan ({}) specified - call avail_sizes() for all available options') string_'Invalid Linode plan ({}) specified - call avail_sizes() for all available options' (identifier_format) identifier_format )attribute (argument_list (identifier_new_label) identifier_new_label )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_warning) identifier_warning )attribute (argument_list (concatenated_string (string_'An outdated Linode plan label was detected in your Cloud ') string_'An outdated Linode plan label was detected in your Cloud ' (string_'Profile (%s). Please update the profile to use the new ') string_'Profile (%s). Please update the profile to use the new ' (string_'label format (%s) for the requested Linode plan size.') string_'label format (%s) for the requested Linode plan size.' )concatenated_string (identifier_label) identifier_label (identifier_new_label) identifier_new_label )argument_list )call )expression_statement (expression_statement (assignment (identifier_label) identifier_label (identifier_new_label) identifier_new_label )assignment )expression_statement )block )else_clause )if_statement )block )if_statement (return_statement (subscript (subscript (identifier_sizes) identifier_sizes (identifier_label) identifier_label )subscript (string_'PLANID') string_'PLANID' )subscript )return_statement )block )function_definition )module
Attempts to decode a user-supplied Linode plan label into the format in Linode API output label The label, or name, of the plan to decode. Example: `Linode 2048` will decode to `Linode 2GB`
(module (function_definition (function_name_sort_dict) function_name_sort_dict (parameters (identifier_self) identifier_self (identifier_data) identifier_data (identifier_key) identifier_key )parameters (block (return_statement (conditional_expression (call (identifier_sorted) identifier_sorted (argument_list (identifier_data) identifier_data (keyword_argument (identifier_key) identifier_key (call (identifier_itemgetter) identifier_itemgetter (argument_list (identifier_key) identifier_key )argument_list )call )keyword_argument )argument_list )call (identifier_data) identifier_data (list )list )conditional_expression )return_statement )block )function_definition )module
Sort a list of dictionaries by dictionary key
(module (function_definition (function_name_allow_exception) function_name_allow_exception (parameters (identifier_self) identifier_self (identifier_exc_class) identifier_exc_class )parameters (block (expression_statement (assignment (identifier_name) identifier_name (attribute (identifier_exc_class) identifier_exc_class (identifier___name__) identifier___name__ )attribute )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__allowed_exceptions) identifier__allowed_exceptions )attribute (identifier_name) identifier_name )subscript (identifier_exc_class) identifier_exc_class )assignment )expression_statement )block )function_definition )module
Allow raising this class of exceptions from commands. When a command fails on the server side due to an exception, by default it is turned into a string and raised on the client side as an ExternalError. The original class name is sent but ignored. If you would like to instead raise an instance of the same exception on the client side, you can pass the exception class object to this method and instances of that exception will be reraised. The caveat is that the exception must be creatable with a single string parameter and it should have a ``msg`` property. Args: exc_class (class): A class object with the exception that we should allow to pass from server to client.
(module (function_definition (function_name_battlecry_requires_target) function_name_battlecry_requires_target (parameters (identifier_self) identifier_self )parameters (block (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier_has_combo) identifier_has_combo )attribute (attribute (attribute (identifier_self) identifier_self (identifier_controller) identifier_controller )attribute (identifier_combo) identifier_combo )attribute )boolean_operator (block (if_statement (comparison_operator (attribute (identifier_PlayReq) identifier_PlayReq (identifier_REQ_TARGET_FOR_COMBO) identifier_REQ_TARGET_FOR_COMBO )attribute (attribute (identifier_self) identifier_self (identifier_requirements) identifier_requirements )attribute )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement )block )if_statement (for_statement (identifier_req) identifier_req (identifier_TARGETING_PREREQUISITES) identifier_TARGETING_PREREQUISITES (block (if_statement (comparison_operator (identifier_req) identifier_req (attribute (identifier_self) identifier_self (identifier_requirements) identifier_requirements )attribute )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement )block )for_statement (return_statement (False) False )return_statement )block )function_definition )module
True if the play action of the card requires a target
(module (function_definition (function_name_signed_int_to_unsigned_hex) function_name_signed_int_to_unsigned_hex (parameters (typed_parameter (identifier_signed_int) identifier_signed_int (type (identifier_int) identifier_int )type )typed_parameter )parameters (type (identifier_str) identifier_str )type (block (expression_statement (assignment (identifier_hex_string) identifier_hex_string (subscript (call (identifier_hex) identifier_hex (argument_list (subscript (call (attribute (identifier_struct) identifier_struct (identifier_unpack) identifier_unpack )attribute (argument_list (string_'Q') string_'Q' (call (attribute (identifier_struct) identifier_struct (identifier_pack) identifier_pack )attribute (argument_list (string_'q') string_'q' (identifier_signed_int) identifier_signed_int )argument_list )call )argument_list )call (integer_0) integer_0 )subscript )argument_list )call (slice (integer_2) integer_2 (colon) colon )slice )subscript )assignment )expression_statement (if_statement (call (attribute (identifier_hex_string) identifier_hex_string (identifier_endswith) identifier_endswith )attribute (argument_list (string_'L') string_'L' )argument_list )call (block (return_statement (subscript (identifier_hex_string) identifier_hex_string (slice (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript )return_statement )block )if_statement (return_statement (identifier_hex_string) identifier_hex_string )return_statement )block )function_definition )module
Converts a signed int value to a 64-bit hex string. Examples: 1662740067609015813 => '17133d482ba4f605' -5270423489115668655 => 'b6dbb1c2b362bf51' :param signed_int: an int to convert :returns: unsigned hex string
(module (function_definition (function_name_keys) function_name_keys (parameters (identifier_cls) identifier_cls (identifier_name) identifier_name (identifier_hash_key) identifier_hash_key (default_parameter (identifier_range_key) identifier_range_key (None) None )default_parameter (default_parameter (identifier_throughput) identifier_throughput (None) None )default_parameter )parameters (block (return_statement (call (identifier_cls) identifier_cls (argument_list (attribute (identifier_cls) identifier_cls (identifier_KEYS) identifier_KEYS )attribute (identifier_name) identifier_name (identifier_hash_key) identifier_hash_key (identifier_range_key) identifier_range_key (keyword_argument (identifier_throughput) identifier_throughput (identifier_throughput) identifier_throughput )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Create an index that projects only key attributes
(module (function_definition (function_name_get_property_dict) function_name_get_property_dict (parameters (identifier_entity_proto) identifier_entity_proto )parameters (block (return_statement (call (identifier_dict) identifier_dict (generator_expression (tuple (attribute (identifier_p) identifier_p (identifier_key) identifier_key )attribute (attribute (identifier_p) identifier_p (identifier_value) identifier_value )attribute )tuple (for_in_clause (identifier_p) identifier_p (attribute (identifier_entity_proto) identifier_entity_proto (identifier_property) identifier_property )attribute )for_in_clause )generator_expression )call )return_statement )block )function_definition )module
Convert datastore.Entity to a dict of property name -> datastore.Value. Args: entity_proto: datastore.Entity proto message. Usage: >>> get_property_dict(entity_proto) {'foo': {string_value='a'}, 'bar': {integer_value=2}} Returns: dict of entity properties.
(module (function_definition (function_name_unregister_event) function_name_unregister_event (parameters (identifier_self) identifier_self (identifier_event_name) identifier_event_name (identifier_handler) identifier_handler )parameters (block (try_statement (block (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier__event_handlers) identifier__event_handlers )attribute (identifier_event_name) identifier_event_name )subscript (identifier_remove) identifier_remove )attribute (argument_list (identifier_handler) identifier_handler )argument_list )call )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )function_definition )module
Unregister a callable that will be called when event is raised. :param event_name: The name of the event (see knack.events for in-built events) :type event_name: str :param handler: The callback that was used to register the event :type handler: function
(module (function_definition (function_name_hashes) function_name_hashes (parameters (identifier_self) identifier_self )parameters (block (for_statement (identifier_url_variant) identifier_url_variant (call (attribute (identifier_self) identifier_self (identifier_url_permutations) identifier_url_permutations )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_canonical) identifier_canonical )attribute )argument_list )call (block (expression_statement (assignment (identifier_url_hash) identifier_url_hash (call (attribute (identifier_self) identifier_self (identifier_digest) identifier_digest )attribute (argument_list (identifier_url_variant) identifier_url_variant )argument_list )call )assignment )expression_statement (expression_statement (yield (identifier_url_hash) identifier_url_hash )yield )expression_statement )block )for_statement )block )function_definition )module
Hashes of all possible permutations of the URL in canonical form
(module (function_definition (function_name_get_block_by_hash) function_name_get_block_by_hash (parameters (identifier_self) identifier_self (typed_parameter (identifier_block_hash) identifier_block_hash (type (identifier_Hash32) identifier_Hash32 )type )typed_parameter )parameters (type (identifier_BaseBlock) identifier_BaseBlock )type (block (expression_statement (call (identifier_validate_word) identifier_validate_word (argument_list (identifier_block_hash) identifier_block_hash (keyword_argument (identifier_title) identifier_title (string_"Block Hash") string_"Block Hash" )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_block_header) identifier_block_header (call (attribute (identifier_self) identifier_self (identifier_get_block_header_by_hash) identifier_get_block_header_by_hash )attribute (argument_list (identifier_block_hash) identifier_block_hash )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_get_block_by_header) identifier_get_block_by_header )attribute (argument_list (identifier_block_header) identifier_block_header )argument_list )call )return_statement )block )function_definition )module
Returns the requested block as specified by block hash.
(module (function_definition (function_name_remote_file) function_name_remote_file (parameters (identifier_self) identifier_self (default_parameter (identifier_branch) identifier_branch (string_'master') string_'master' )default_parameter (default_parameter (identifier_filename) identifier_filename (string_'') string_'' )default_parameter )parameters (block (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_info) identifier_info )attribute (argument_list (string_'Retrieving "%s" from "%s".') string_'Retrieving "%s" from "%s".' (identifier_filename) identifier_filename (attribute (identifier_self) identifier_self (identifier_git_short) identifier_git_short )attribute )argument_list )call )expression_statement (expression_statement (assignment (identifier_file_contents) identifier_file_contents (string_'') string_'' )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_file_blob) identifier_file_blob (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_project) identifier_project )attribute (identifier_files) identifier_files )attribute (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier_file_path) identifier_file_path (identifier_filename) identifier_filename )keyword_argument (keyword_argument (identifier_ref) identifier_ref (identifier_branch) identifier_branch )keyword_argument )argument_list )call )assignment )expression_statement )block (except_clause (attribute (attribute (identifier_gitlab) identifier_gitlab (identifier_exceptions) identifier_exceptions )attribute (identifier_GitlabGetError) identifier_GitlabGetError )attribute (block (expression_statement (assignment (identifier_file_blob) identifier_file_blob (None) None )assignment )expression_statement )block )except_clause )try_statement (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_debug) identifier_debug )attribute (argument_list (string_'GitLab file response:\n%s') string_'GitLab file response:\n%s' (identifier_file_blob) identifier_file_blob )argument_list )call )expression_statement (if_statement (not_operator (identifier_file_blob) identifier_file_blob )not_operator (block (expression_statement (assignment (identifier_msg) identifier_msg (call (attribute (string_'Project "{0}" is missing file "{1}" in "{2}" branch.') string_'Project "{0}" is missing file "{1}" in "{2}" branch.' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_git_short) identifier_git_short )attribute (identifier_filename) identifier_filename (identifier_branch) identifier_branch )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_warning) identifier_warning )attribute (argument_list (identifier_msg) identifier_msg )argument_list )call )expression_statement (raise_statement (call (identifier_FileNotFoundError) identifier_FileNotFoundError (argument_list (identifier_msg) identifier_msg )argument_list )call )raise_statement )block (else_clause (block (expression_statement (assignment (identifier_file_contents) identifier_file_contents (call (attribute (call (identifier_b64decode) identifier_b64decode (argument_list (attribute (identifier_file_blob) identifier_file_blob (identifier_content) identifier_content )attribute )argument_list )call (identifier_decode) identifier_decode )attribute (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_debug) identifier_debug )attribute (argument_list (string_'Remote file contents:\n%s') string_'Remote file contents:\n%s' (identifier_file_contents) identifier_file_contents )argument_list )call )expression_statement (return_statement (identifier_file_contents) identifier_file_contents )return_statement )block )function_definition )module
Read the remote file on Git Server. Args: branch (str): Git Branch to find file. filename (str): Name of file to retrieve relative to root of repository. Returns: str: Contents of remote file. Raises: FileNotFoundError: Requested file missing.
(module (function_definition (function_name_get_instantiated_service) function_name_get_instantiated_service (parameters (identifier_self) identifier_self (identifier_name) identifier_name )parameters (block (if_statement (comparison_operator (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier_instantiated_services) identifier_instantiated_services )attribute )comparison_operator (block (raise_statement (identifier_UninstantiatedServiceException) identifier_UninstantiatedServiceException )raise_statement )block )if_statement (return_statement (subscript (attribute (identifier_self) identifier_self (identifier_instantiated_services) identifier_instantiated_services )attribute (identifier_name) identifier_name )subscript )return_statement )block )function_definition )module
Get instantiated service by name
(module (function_definition (function_name_register_area) function_name_register_area (parameters (identifier_self) identifier_self (identifier_area_code) identifier_area_code (identifier_index) identifier_index (identifier_userdata) identifier_userdata )parameters (block (expression_statement (assignment (identifier_size) identifier_size (call (attribute (identifier_ctypes) identifier_ctypes (identifier_sizeof) identifier_sizeof )attribute (argument_list (identifier_userdata) identifier_userdata )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (binary_operator (string_"registering area %s, index %s, size %s") string_"registering area %s, index %s, size %s" (tuple (identifier_area_code) identifier_area_code (identifier_index) identifier_index (identifier_size) identifier_size )tuple )binary_operator )argument_list )call )expression_statement (expression_statement (assignment (identifier_size) identifier_size (call (attribute (identifier_ctypes) identifier_ctypes (identifier_sizeof) identifier_sizeof )attribute (argument_list (identifier_userdata) identifier_userdata )argument_list )call )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_library) identifier_library )attribute (identifier_Srv_RegisterArea) identifier_Srv_RegisterArea )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_pointer) identifier_pointer )attribute (identifier_area_code) identifier_area_code (identifier_index) identifier_index (call (attribute (identifier_ctypes) identifier_ctypes (identifier_byref) identifier_byref )attribute (argument_list (identifier_userdata) identifier_userdata )argument_list )call (identifier_size) identifier_size )argument_list )call )return_statement )block )function_definition )module
Shares a memory area with the server. That memory block will be visible by the clients.
(module (function_definition (function_name_Search) function_name_Search (parameters (identifier_self) identifier_self (identifier_text) identifier_text (default_parameter (identifier_wholewords) identifier_wholewords (integer_0) integer_0 )default_parameter (default_parameter (identifier_titleonly) identifier_titleonly (integer_0) integer_0 )default_parameter )parameters (block (if_statement (boolean_operator (boolean_operator (identifier_text) identifier_text (comparison_operator (identifier_text) identifier_text (string_'') string_'' )comparison_operator )boolean_operator (attribute (identifier_self) identifier_self (identifier_file) identifier_file )attribute )boolean_operator (block (return_statement (call (attribute (identifier_extra) identifier_extra (identifier_search) identifier_search )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_file) identifier_file )attribute (identifier_text) identifier_text (identifier_wholewords) identifier_wholewords (identifier_titleonly) identifier_titleonly )argument_list )call )return_statement )block (else_clause (block (return_statement (None) None )return_statement )block )else_clause )if_statement )block )function_definition )module
Performs full-text search on the archive. The first parameter is the word to look for, the second indicates if the search should be for whole words only, and the third parameter indicates if the search should be restricted to page titles. This method will return a tuple, the first item indicating if the search results were partial, and the second item being a dictionary containing the results.
(module (function_definition (function_name_stop) function_name_stop (parameters (identifier_self) identifier_self )parameters (block (if_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__died) identifier__died )attribute (identifier_ready) identifier_ready )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier__log) identifier__log (identifier_debug) identifier_debug )attribute (argument_list (string_'already stopped %s') string_'already stopped %s' (identifier_self) identifier_self )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier__being_killed) identifier__being_killed )attribute (block (expression_statement (call (attribute (identifier__log) identifier__log (identifier_debug) identifier_debug )attribute (argument_list (string_'already being killed %s') string_'already being killed %s' (identifier_self) identifier_self )argument_list )call )expression_statement (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__died) identifier__died )attribute (identifier_wait) identifier_wait )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (block (pass_statement )pass_statement )block )except_clause )try_statement (return_statement )return_statement )block )if_statement (expression_statement (call (attribute (identifier__log) identifier__log (identifier_debug) identifier_debug )attribute (argument_list (string_'stopping %s') string_'stopping %s' (identifier_self) identifier_self )argument_list )call )expression_statement (with_statement (with_clause (with_item (call (identifier__log_time) identifier__log_time (argument_list (string_'stopped %s') string_'stopped %s' (identifier_self) identifier_self )argument_list )call )with_item )with_clause (block (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_entrypoints) identifier_entrypoints )attribute (identifier_all) identifier_all )attribute (identifier_stop) identifier_stop )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__worker_pool) identifier__worker_pool )attribute (identifier_waitall) identifier_waitall )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_dependencies) identifier_dependencies )attribute (identifier_all) identifier_all )attribute (identifier_stop) identifier_stop )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_subextensions) identifier_subextensions )attribute (identifier_all) identifier_all )attribute (identifier_stop) identifier_stop )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__kill_managed_threads) identifier__kill_managed_threads )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_started) identifier_started )attribute (False) False )assignment )expression_statement (if_statement (not_operator (call (attribute (attribute (identifier_self) identifier_self (identifier__died) identifier__died )attribute (identifier_ready) identifier_ready )attribute (argument_list )argument_list )call )not_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__died) identifier__died )attribute (identifier_send) identifier_send )attribute (argument_list (None) None )argument_list )call )expression_statement )block )if_statement )block )with_statement )block )function_definition )module
Stop the container gracefully. First all entrypoints are asked to ``stop()``. This ensures that no new worker threads are started. It is the extensions' responsibility to gracefully shut down when ``stop()`` is called on them and only return when they have stopped. After all entrypoints have stopped the container waits for any active workers to complete. After all active workers have stopped the container stops all dependency providers. At this point there should be no more managed threads. In case there are any managed threads, they are killed by the container.
(module (function_definition (function_name_add_tunnel_port) function_name_add_tunnel_port (parameters (identifier_self) identifier_self (identifier_name) identifier_name (identifier_tunnel_type) identifier_tunnel_type (identifier_remote_ip) identifier_remote_ip (default_parameter (identifier_local_ip) identifier_local_ip (None) None )default_parameter (default_parameter (identifier_key) identifier_key (None) None )default_parameter (default_parameter (identifier_ofport) identifier_ofport (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_options) identifier_options (binary_operator (string_'remote_ip=%(remote_ip)s') string_'remote_ip=%(remote_ip)s' (call (identifier_locals) identifier_locals (argument_list )argument_list )call )binary_operator )assignment )expression_statement (if_statement (identifier_key) identifier_key (block (expression_statement (augmented_assignment (identifier_options) identifier_options (binary_operator (string_',key=%(key)s') string_',key=%(key)s' (call (identifier_locals) identifier_locals (argument_list )argument_list )call )binary_operator )augmented_assignment )expression_statement )block )if_statement (if_statement (identifier_local_ip) identifier_local_ip (block (expression_statement (augmented_assignment (identifier_options) identifier_options (binary_operator (string_',local_ip=%(local_ip)s') string_',local_ip=%(local_ip)s' (call (identifier_locals) identifier_locals (argument_list )argument_list )call )binary_operator )augmented_assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_args) identifier_args (list (string_'Interface') string_'Interface' (identifier_name) identifier_name (binary_operator (string_'type=%s') string_'type=%s' (identifier_tunnel_type) identifier_tunnel_type )binary_operator (binary_operator (string_'options:%s') string_'options:%s' (identifier_options) identifier_options )binary_operator )list )assignment )expression_statement (if_statement (identifier_ofport) identifier_ofport (block (expression_statement (call (attribute (identifier_args) identifier_args (identifier_append) identifier_append )attribute (argument_list (binary_operator (string_'ofport_request=%(ofport)s') string_'ofport_request=%(ofport)s' (call (identifier_locals) identifier_locals (argument_list )argument_list )call )binary_operator )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_command_add) identifier_command_add (call (attribute (identifier_ovs_vsctl) identifier_ovs_vsctl (identifier_VSCtlCommand) identifier_VSCtlCommand )attribute (argument_list (string_'add-port') string_'add-port' (tuple (attribute (identifier_self) identifier_self (identifier_br_name) identifier_br_name )attribute (identifier_name) identifier_name )tuple )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_command_set) identifier_command_set (call (attribute (identifier_ovs_vsctl) identifier_ovs_vsctl (identifier_VSCtlCommand) identifier_VSCtlCommand )attribute (argument_list (string_'set') string_'set' (identifier_args) identifier_args )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_run_command) identifier_run_command )attribute (argument_list (list (identifier_command_add) identifier_command_add (identifier_command_set) identifier_command_set )list )argument_list )call )expression_statement )block )function_definition )module
Creates a tunnel port. :param name: Port name to be created :param tunnel_type: Type of tunnel (gre or vxlan) :param remote_ip: Remote IP address of tunnel :param local_ip: Local IP address of tunnel :param key: Key of GRE or VNI of VxLAN :param ofport: Requested OpenFlow port number
(module (function_definition (function_name_disable) function_name_disable (parameters (identifier_self) identifier_self (default_parameter (identifier_retain_port) identifier_retain_port (False) False )default_parameter )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_update_server) identifier_update_server )attribute (argument_list (keyword_argument (identifier_disabled) identifier_disabled (True) True )keyword_argument )argument_list )call )expression_statement (if_statement (identifier_retain_port) identifier_retain_port (block (return_statement )return_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_update_device) identifier_update_device )attribute (argument_list (keyword_argument (identifier_disabled) identifier_disabled (True) True )keyword_argument )argument_list )call )expression_statement (if_statement (boolean_operator (attribute (attribute (identifier_self) identifier_self (identifier_conf) identifier_conf )attribute (identifier_dhcp_delete_namespaces) identifier_dhcp_delete_namespaces )attribute (attribute (attribute (identifier_self) identifier_self (identifier_network) identifier_network )attribute (identifier_namespace) identifier_namespace )attribute )boolean_operator (block (expression_statement (assignment (identifier_ns_ip) identifier_ns_ip (call (attribute (identifier_ip_lib) identifier_ip_lib (identifier_IPWrapper) identifier_IPWrapper )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_root_helper) identifier_root_helper )attribute (attribute (attribute (identifier_self) identifier_self (identifier_network) identifier_network )attribute (identifier_namespace) identifier_namespace )attribute )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (attribute (identifier_ns_ip) identifier_ns_ip (identifier_netns) identifier_netns )attribute (identifier_delete) identifier_delete )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_network) identifier_network )attribute (identifier_namespace) identifier_namespace )attribute )argument_list )call )expression_statement )block (except_clause (identifier_RuntimeError) identifier_RuntimeError (block (expression_statement (assignment (identifier_msg) identifier_msg (call (identifier__) identifier__ (argument_list (string_'Failed trying to delete namespace: %s') string_'Failed trying to delete namespace: %s' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_exception) identifier_exception )attribute (argument_list (identifier_msg) identifier_msg (attribute (attribute (identifier_self) identifier_self (identifier_network) identifier_network )attribute (identifier_namespace) identifier_namespace )attribute )argument_list )call )expression_statement )block )except_clause )try_statement )block )if_statement )block )function_definition )module
Teardown DHCP. Disable DHCP for this network by updating the remote server and then destroying any local device and namespace.
(module (function_definition (function_name_getStreamNetworkAsWkt) function_name_getStreamNetworkAsWkt (parameters (identifier_self) identifier_self (identifier_session) identifier_session (default_parameter (identifier_withNodes) identifier_withNodes (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_wkt_list) identifier_wkt_list (list )list )assignment )expression_statement (for_statement (identifier_link) identifier_link (attribute (identifier_self) identifier_self (identifier_streamLinks) identifier_streamLinks )attribute (block (expression_statement (assignment (identifier_wkt_link) identifier_wkt_link (call (attribute (identifier_link) identifier_link (identifier_getAsWkt) identifier_getAsWkt )attribute (argument_list (identifier_session) identifier_session )argument_list )call )assignment )expression_statement (if_statement (identifier_wkt_link) identifier_wkt_link (block (expression_statement (call (attribute (identifier_wkt_list) identifier_wkt_list (identifier_append) identifier_append )attribute (argument_list (identifier_wkt_link) identifier_wkt_link )argument_list )call )expression_statement )block )if_statement (if_statement (identifier_withNodes) identifier_withNodes (block (for_statement (identifier_node) identifier_node (attribute (identifier_link) identifier_link (identifier_nodes) identifier_nodes )attribute (block (expression_statement (assignment (identifier_wkt_node) identifier_wkt_node (call (attribute (identifier_node) identifier_node (identifier_getAsWkt) identifier_getAsWkt )attribute (argument_list (identifier_session) identifier_session )argument_list )call )assignment )expression_statement (if_statement (identifier_wkt_node) identifier_wkt_node (block (expression_statement (call (attribute (identifier_wkt_list) identifier_wkt_list (identifier_append) identifier_append )attribute (argument_list (identifier_wkt_node) identifier_wkt_node )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )if_statement )block )for_statement (return_statement (call (attribute (string_'GEOMCOLLECTION ({0})') string_'GEOMCOLLECTION ({0})' (identifier_format) identifier_format )attribute (argument_list (call (attribute (string_', ') string_', ' (identifier_join) identifier_join )attribute (argument_list (identifier_wkt_list) identifier_wkt_list )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Retrieve the stream network geometry in Well Known Text format. Args: session (:mod:`sqlalchemy.orm.session.Session`): SQLAlchemy session object bound to PostGIS enabled database withNodes (bool, optional): Include nodes. Defaults to False. Returns: str: Well Known Text string.
(module (function_definition (function_name_filter_product_filename_generator) function_name_filter_product_filename_generator (parameters (identifier_obs_info) identifier_obs_info (identifier_nn) identifier_nn )parameters (block (expression_statement (assignment (identifier_proposal_id) identifier_proposal_id (subscript (identifier_obs_info) identifier_obs_info (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_visit_id) identifier_visit_id (subscript (identifier_obs_info) identifier_obs_info (integer_1) integer_1 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_instrument) identifier_instrument (subscript (identifier_obs_info) identifier_obs_info (integer_2) integer_2 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_detector) identifier_detector (subscript (identifier_obs_info) identifier_obs_info (integer_3) integer_3 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_filter) identifier_filter (subscript (identifier_obs_info) identifier_obs_info (integer_4) integer_4 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_product_filename_dict) identifier_product_filename_dict (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (subscript (identifier_product_filename_dict) identifier_product_filename_dict (string_"image") string_"image" )subscript (call (attribute (string_"hst_{}_{}_{}_{}_{}.fits") string_"hst_{}_{}_{}_{}_{}.fits" (identifier_format) identifier_format )attribute (argument_list (identifier_proposal_id) identifier_proposal_id (identifier_visit_id) identifier_visit_id (identifier_instrument) identifier_instrument (identifier_detector) identifier_detector (identifier_filter) identifier_filter )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_product_filename_dict) identifier_product_filename_dict (string_"source catalog") string_"source catalog" )subscript (call (attribute (subscript (identifier_product_filename_dict) identifier_product_filename_dict (string_"image") string_"image" )subscript (identifier_replace) identifier_replace )attribute (argument_list (string_".fits") string_".fits" (string_".cat") string_".cat" )argument_list )call )assignment )expression_statement (return_statement (parenthesized_expression (identifier_product_filename_dict) identifier_product_filename_dict )parenthesized_expression )return_statement )block )function_definition )module
Generate image and sourcelist filenames for filter products Parameters ---------- obs_info : list list of items that will be used to generate the filenames: proposal_id, visit_id, instrument, detector, and filter nn : string the single-exposure image number (NOTE: only used in single_exposure_product_filename_generator()) Returns -------- product_filename_dict : dictionary A dictionary containing the generated filenames.
(module (function_definition (function_name_iscsi_resource) function_name_iscsi_resource (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (attribute (identifier_iscsi) identifier_iscsi (identifier_ISCSIResource) identifier_ISCSIResource )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__conn) identifier__conn )attribute (call (attribute (identifier_utils) identifier_utils (identifier_get_subresource_path_by) identifier_get_subresource_path_by )attribute (argument_list (identifier_self) identifier_self (list (string_"Oem") string_"Oem" (string_"Hpe") string_"Hpe" (string_"Links") string_"Links" (string_"iScsi") string_"iScsi" )list )argument_list )call (keyword_argument (identifier_redfish_version) identifier_redfish_version (attribute (identifier_self) identifier_self (identifier_redfish_version) identifier_redfish_version )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Property to provide reference to bios iscsi resource instance It is calculated once when the first time it is queried. On refresh, this property gets reset.
(module (function_definition (function_name_get_logger) function_name_get_logger (parameters (identifier_self) identifier_self (default_parameter (identifier_name) identifier_name (string_"deployment-logger") string_"deployment-logger" )default_parameter (default_parameter (identifier_level) identifier_level (attribute (identifier_logging) identifier_logging (identifier_DEBUG) identifier_DEBUG )attribute )default_parameter )parameters (block (expression_statement (assignment (identifier_log) identifier_log (identifier_logging) identifier_logging )assignment )expression_statement (expression_statement (assignment (identifier_logger) identifier_logger (call (attribute (identifier_log) identifier_log (identifier_getLogger) identifier_getLogger )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_fmt) identifier_fmt (call (attribute (identifier_log) identifier_log (identifier_Formatter) identifier_Formatter )attribute (argument_list (concatenated_string (string_"%(asctime)s %(funcName)s ") string_"%(asctime)s %(funcName)s " (string_"%(levelname)s: %(message)s") string_"%(levelname)s: %(message)s" )concatenated_string )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_handler) identifier_handler (call (attribute (identifier_log) identifier_log (identifier_StreamHandler) identifier_StreamHandler )attribute (argument_list (keyword_argument (identifier_stream) identifier_stream (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_handler) identifier_handler (identifier_setLevel) identifier_setLevel )attribute (argument_list (identifier_level) identifier_level )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_handler) identifier_handler (identifier_setFormatter) identifier_setFormatter )attribute (argument_list (identifier_fmt) identifier_fmt )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_addHandler) identifier_addHandler )attribute (argument_list (identifier_handler) identifier_handler )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_setLevel) identifier_setLevel )attribute (argument_list (identifier_level) identifier_level )argument_list )call )expression_statement (return_statement (identifier_logger) identifier_logger )return_statement )block )function_definition )module
Get a logger object that will log to stdout.
(module (function_definition (function_name_ascent) function_name_ascent (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_total_ascent) identifier_total_ascent (float_0.0) float_0.0 )assignment )expression_statement (expression_statement (assignment (identifier_altitude_data) identifier_altitude_data (call (attribute (identifier_self) identifier_self (identifier_altitude_points) identifier_altitude_points )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_altitude_data) identifier_altitude_data )argument_list )call (integer_1) integer_1 )binary_operator )argument_list )call (block (expression_statement (assignment (identifier_diff) identifier_diff (binary_operator (subscript (identifier_altitude_data) identifier_altitude_data (binary_operator (identifier_i) identifier_i (integer_1) integer_1 )binary_operator )subscript (subscript (identifier_altitude_data) identifier_altitude_data (identifier_i) identifier_i )subscript )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_diff) identifier_diff (float_0.0) float_0.0 )comparison_operator (block (expression_statement (augmented_assignment (identifier_total_ascent) identifier_total_ascent (identifier_diff) identifier_diff )augmented_assignment )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_total_ascent) identifier_total_ascent )return_statement )block )function_definition )module
Returns ascent of workout in meters
(module (function_definition (function_name__load) function_name__load (parameters (identifier_self) identifier_self )parameters (block (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier_is_sw) identifier_is_sw )attribute (comparison_operator (attribute (identifier_self) identifier_self (identifier_platform_name) identifier_platform_name )attribute (string_'EOS-Aqua') string_'EOS-Aqua' )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_scale) identifier_scale (float_0.001) float_0.001 )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_scale) identifier_scale (float_1.0) float_1.0 )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_detector) identifier_detector (call (identifier_read_modis_response) identifier_read_modis_response (argument_list (attribute (identifier_self) identifier_self (identifier_requested_band_filename) identifier_requested_band_filename )attribute (identifier_scale) identifier_scale )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_rsr) identifier_rsr )attribute (identifier_detector) identifier_detector )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier__sort) identifier__sort )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_sort) identifier_sort )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Load the MODIS RSR data for the band requested
(module (function_definition (function_name__create_body) function_name__create_body (parameters (identifier_self) identifier_self (identifier_name) identifier_name (default_parameter (identifier_flavor) identifier_flavor (None) None )default_parameter (default_parameter (identifier_volume) identifier_volume (None) None )default_parameter (default_parameter (identifier_databases) identifier_databases (None) None )default_parameter (default_parameter (identifier_users) identifier_users (None) None )default_parameter (default_parameter (identifier_version) identifier_version (None) None )default_parameter (default_parameter (identifier_type) identifier_type (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_flavor) identifier_flavor (None) None )comparison_operator (block (expression_statement (assignment (identifier_flavor) identifier_flavor (integer_1) integer_1 )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_flavor_ref) identifier_flavor_ref (call (attribute (attribute (identifier_self) identifier_self (identifier_api) identifier_api )attribute (identifier__get_flavor_ref) identifier__get_flavor_ref )attribute (argument_list (identifier_flavor) identifier_flavor )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_volume) identifier_volume (None) None )comparison_operator (block (expression_statement (assignment (identifier_volume) identifier_volume (integer_1) integer_1 )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_databases) identifier_databases (None) None )comparison_operator (block (expression_statement (assignment (identifier_databases) identifier_databases (list )list )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_users) identifier_users (None) None )comparison_operator (block (expression_statement (assignment (identifier_users) identifier_users (list )list )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_body) identifier_body (dictionary (pair (string_"instance") string_"instance" (dictionary (pair (string_"name") string_"name" (identifier_name) identifier_name )pair (pair (string_"flavorRef") string_"flavorRef" (identifier_flavor_ref) identifier_flavor_ref )pair (pair (string_"volume") string_"volume" (dictionary (pair (string_"size") string_"size" (identifier_volume) identifier_volume )pair )dictionary )pair (pair (string_"databases") string_"databases" (identifier_databases) identifier_databases )pair (pair (string_"users") string_"users" (identifier_users) identifier_users )pair )dictionary )pair )dictionary )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_type) identifier_type (None) None )comparison_operator (comparison_operator (identifier_version) identifier_version (None) None )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_required) identifier_required (tuple (identifier_type) identifier_type (identifier_version) identifier_version )tuple )assignment )expression_statement (if_statement (call (identifier_all) identifier_all (argument_list (identifier_required) identifier_required )argument_list )call (block (expression_statement (assignment (subscript (subscript (identifier_body) identifier_body (string_'instance') string_'instance' )subscript (string_'datastore') string_'datastore' )subscript (dictionary (pair (string_"type") string_"type" (identifier_type) identifier_type )pair (pair (string_"version") string_"version" (identifier_version) identifier_version )pair )dictionary )assignment )expression_statement )block (else_clause (block (raise_statement (call (attribute (identifier_exc) identifier_exc (identifier_MissingCloudDatabaseParameter) identifier_MissingCloudDatabaseParameter )attribute (argument_list (concatenated_string (string_"Specifying a datastore") string_"Specifying a datastore" (string_" requires both the datastore type as well as the version.") string_" requires both the datastore type as well as the version." )concatenated_string )argument_list )call )raise_statement )block )else_clause )if_statement )block )if_statement (return_statement (identifier_body) identifier_body )return_statement )block )function_definition )module
Used to create the dict required to create a Cloud Database instance.
(module (function_definition (function_name_renew_local_branch) function_name_renew_local_branch (parameters (identifier_branch) identifier_branch (identifier_start_point) identifier_start_point (default_parameter (identifier_remote) identifier_remote (False) False )default_parameter )parameters (block (if_statement (comparison_operator (identifier_branch) identifier_branch (call (identifier_branches) identifier_branches (argument_list )argument_list )call )comparison_operator (block (expression_statement (call (identifier_checkout) identifier_checkout (argument_list (identifier_start_point) identifier_start_point )argument_list )call )expression_statement (expression_statement (call (identifier_delete) identifier_delete (argument_list (identifier_branch) identifier_branch (keyword_argument (identifier_force) identifier_force (True) True )keyword_argument (keyword_argument (identifier_remote) identifier_remote (identifier_remote) identifier_remote )keyword_argument )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_result) identifier_result (call (identifier_new_local_branch) identifier_new_local_branch (argument_list (identifier_branch) identifier_branch (identifier_start_point) identifier_start_point )argument_list )call )assignment )expression_statement (if_statement (identifier_remote) identifier_remote (block (expression_statement (call (identifier_publish) identifier_publish (argument_list (identifier_branch) identifier_branch )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Make a new local branch from that start_point start_point is a git "commit-ish", e.g branch, tag, commit If a local branch already exists it is removed If remote is true then push the new branch to origin
(module (function_definition (function_name_example_method) function_name_example_method (parameters (identifier_self) identifier_self (identifier_i3s_output_list) identifier_i3s_output_list (identifier_i3s_config) identifier_i3s_config )parameters (block (expression_statement (assignment (identifier_full_text) identifier_full_text (call (attribute (attribute (identifier_self) identifier_self (identifier_format) identifier_format )attribute (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_output) identifier_output (string_'example') string_'example' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (dictionary (pair (string_'cached_until') string_'cached_until' (binary_operator (call (identifier_time) identifier_time (argument_list )argument_list )call (attribute (identifier_self) identifier_self (identifier_cache_timeout) identifier_cache_timeout )attribute )binary_operator )pair (pair (string_'full_text') string_'full_text' (identifier_full_text) identifier_full_text )pair )dictionary )assignment )expression_statement (return_statement (identifier_response) identifier_response )return_statement )block )function_definition )module
This method will return an empty text message so it will NOT be displayed on your i3bar. If you want something displayed you should write something in the 'full_text' key of your response. See the i3bar protocol spec for more information: http://i3wm.org/docs/i3bar-protocol.html
(module (function_definition (function_name_get_structure_with_nodes) function_name_get_structure_with_nodes (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_new_s) identifier_new_s (call (attribute (identifier_Structure) identifier_Structure (identifier_from_sites) identifier_from_sites )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_structure) identifier_structure )attribute )argument_list )call )assignment )expression_statement (for_statement (identifier_v) identifier_v (attribute (identifier_self) identifier_self (identifier_vnodes) identifier_vnodes )attribute (block (expression_statement (call (attribute (identifier_new_s) identifier_new_s (identifier_append) identifier_append )attribute (argument_list (string_"X") string_"X" (attribute (identifier_v) identifier_v (identifier_frac_coords) identifier_frac_coords )attribute )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_new_s) identifier_new_s )return_statement )block )function_definition )module
Get the modified structure with the voronoi nodes inserted. The species is set as a DummySpecie X.
(module (function_definition (function_name_create) function_name_create (parameters (identifier_self) identifier_self (identifier_article) identifier_article (identifier_attachment) identifier_attachment (default_parameter (identifier_inline) identifier_inline (False) False )default_parameter (default_parameter (identifier_file_name) identifier_file_name (None) None )default_parameter (default_parameter (identifier_content_type) identifier_content_type (None) None )default_parameter )parameters (block (return_statement (call (attribute (call (identifier_HelpdeskAttachmentRequest) identifier_HelpdeskAttachmentRequest (argument_list (identifier_self) identifier_self )argument_list )call (identifier_post) identifier_post )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_endpoint) identifier_endpoint )attribute (identifier_create) identifier_create )attribute (keyword_argument (identifier_article) identifier_article (identifier_article) identifier_article )keyword_argument (keyword_argument (identifier_attachments) identifier_attachments (identifier_attachment) identifier_attachment )keyword_argument (keyword_argument (identifier_inline) identifier_inline (identifier_inline) identifier_inline )keyword_argument (keyword_argument (identifier_file_name) identifier_file_name (identifier_file_name) identifier_file_name )keyword_argument (keyword_argument (identifier_content_type) identifier_content_type (identifier_content_type) identifier_content_type )keyword_argument )argument_list )call )return_statement )block )function_definition )module
This function creates attachment attached to article. :param article: Numeric article id or :class:`Article` object. :param attachment: File object or os path to file :param inline: If true, the attached file is shown in the dedicated admin UI for inline attachments and its url can be referenced in the HTML body of the article. If false, the attachment is listed in the list of attachments. Default is `false` :param file_name: you can set filename on file upload. :param content_type: The content type of the file. `Example: image/png`, Zendesk can ignore it. :return: :class:`ArticleAttachment` object
(module (function_definition (function_name_get_repo_revision) function_name_get_repo_revision (parameters )parameters (block (expression_statement (assignment (identifier_repopath) identifier_repopath (call (identifier__findrepo) identifier__findrepo (argument_list )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_repopath) identifier_repopath )not_operator (block (return_statement (string_'') string_'' )return_statement )block )if_statement (try_statement (block (import_statement (dotted_name (identifier_mercurial) identifier_mercurial (identifier_hg) identifier_hg )dotted_name (dotted_name (identifier_mercurial) identifier_mercurial (identifier_ui) identifier_ui )dotted_name (dotted_name (identifier_mercurial) identifier_mercurial (identifier_scmutil) identifier_scmutil )dotted_name )import_statement (import_from_statement (dotted_name (identifier_mercurial) identifier_mercurial (identifier_node) identifier_node )dotted_name (aliased_import (dotted_name (identifier_short) identifier_short )dotted_name (identifier_hexfunc) identifier_hexfunc )aliased_import )import_from_statement )block (except_clause (identifier_ImportError) identifier_ImportError (block (pass_statement )pass_statement )block )except_clause (else_clause (block (expression_statement (assignment (identifier_ui) identifier_ui (call (attribute (attribute (identifier_mercurial) identifier_mercurial (identifier_ui) identifier_ui )attribute (identifier_ui) identifier_ui )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_repo) identifier_repo (call (attribute (attribute (identifier_mercurial) identifier_mercurial (identifier_hg) identifier_hg )attribute (identifier_repository) identifier_repository )attribute (argument_list (identifier_ui) identifier_ui (identifier_repopath) identifier_repopath )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_parents) identifier_parents (call (attribute (subscript (identifier_repo) identifier_repo (None) None )subscript (identifier_parents) identifier_parents )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_changed) identifier_changed (boolean_operator (boolean_operator (call (identifier_filter) identifier_filter (argument_list (None) None (call (attribute (identifier_repo) identifier_repo (identifier_status) identifier_status )attribute (argument_list )argument_list )call )argument_list )call (string_"+") string_"+" )boolean_operator (string_"") string_"" )boolean_operator )assignment )expression_statement (return_statement (call (attribute (string_';') string_';' (identifier_join) identifier_join )attribute (argument_list (list_comprehension (binary_operator (string_'%s:%s%s') string_'%s:%s%s' (tuple (call (attribute (identifier_p) identifier_p (identifier_rev) identifier_rev )attribute (argument_list )argument_list )call (call (identifier_hexfunc) identifier_hexfunc (argument_list (call (attribute (identifier_p) identifier_p (identifier_node) identifier_node )attribute (argument_list )argument_list )call )argument_list )call (identifier_changed) identifier_changed )tuple )binary_operator (for_in_clause (identifier_p) identifier_p (identifier_parents) identifier_parents )for_in_clause )list_comprehension )argument_list )call )return_statement )block )else_clause )try_statement (return_statement (string_'') string_'' )return_statement )block )function_definition )module
Returns mercurial revision string somelike `hg identify` does. Format is rev1:short-id1+;rev2:short-id2+ Returns an empty string if anything goes wrong, such as missing .hg files or an unexpected format of internal HG files or no mercurial repository found.
(module (function_definition (function_name_singledispatch) function_name_singledispatch (parameters (keyword_separator )keyword_separator (default_parameter (identifier_nargs) identifier_nargs (None) None )default_parameter (default_parameter (identifier_nouts) identifier_nouts (None) None )default_parameter (default_parameter (identifier_ndefs) identifier_ndefs (None) None )default_parameter )parameters (block (function_definition (function_name_wrapper) function_name_wrapper (parameters (identifier_f) identifier_f )parameters (block (return_statement (call (call (identifier_wraps) identifier_wraps (argument_list (identifier_f) identifier_f )argument_list )call (argument_list (call (identifier_SingleDispatchFunction) identifier_SingleDispatchFunction (argument_list (identifier_f) identifier_f (keyword_argument (identifier_nargs) identifier_nargs (identifier_nargs) identifier_nargs )keyword_argument (keyword_argument (identifier_nouts) identifier_nouts (identifier_nouts) identifier_nouts )keyword_argument (keyword_argument (identifier_ndefs) identifier_ndefs (identifier_ndefs) identifier_ndefs )keyword_argument )argument_list )call )argument_list )call )return_statement )block )function_definition (return_statement (identifier_wrapper) identifier_wrapper )return_statement )block )function_definition )module
singledispatch decorate of both functools.singledispatch and func
(module (function_definition (function_name_rmSelf) function_name_rmSelf (parameters (identifier_f) identifier_f )parameters (block (function_definition (function_name_new_f) function_name_new_f (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_newArgs) identifier_newArgs (subscript (identifier_args) identifier_args (slice (integer_1) integer_1 (colon) colon )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (identifier_f) identifier_f (argument_list (list_splat (identifier_newArgs) identifier_newArgs )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition (return_statement (identifier_new_f) identifier_new_f )return_statement )block )function_definition )module
f -> function. Decorator, removes first argument from f parameters.
(module (function_definition (function_name_parse_summary) function_name_parse_summary (parameters (identifier_content) identifier_content (default_parameter (identifier_reference_id) identifier_reference_id (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_summary) identifier_summary (None) None )assignment )expression_statement (expression_statement (assignment (identifier_m) identifier_m (call (attribute (identifier__END_SUMMARY_PATTERN) identifier__END_SUMMARY_PATTERN (identifier_search) identifier_search )attribute (argument_list (identifier_content) identifier_content )argument_list )call )assignment )expression_statement (if_statement (identifier_m) identifier_m (block (expression_statement (assignment (identifier_end_of_summary) identifier_end_of_summary (call (attribute (identifier_m) identifier_m (identifier_start) identifier_start )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_m) identifier_m (boolean_operator (call (attribute (identifier__START_SUMMARY_PATTERN) identifier__START_SUMMARY_PATTERN (identifier_search) identifier_search )attribute (argument_list (identifier_content) identifier_content (integer_0) integer_0 (identifier_end_of_summary) identifier_end_of_summary )argument_list )call (call (attribute (identifier__ALTERNATIVE_START_SUMMARY_PATTERN) identifier__ALTERNATIVE_START_SUMMARY_PATTERN (identifier_search) identifier_search )attribute (argument_list (identifier_content) identifier_content (integer_0) integer_0 (identifier_end_of_summary) identifier_end_of_summary )argument_list )call )boolean_operator )assignment )expression_statement (if_statement (identifier_m) identifier_m (block (expression_statement (assignment (identifier_summary) identifier_summary (subscript (identifier_content) identifier_content (slice (call (attribute (identifier_m) identifier_m (identifier_end) identifier_end )attribute (argument_list )argument_list )call (colon) colon (identifier_end_of_summary) identifier_end_of_summary )slice )subscript )assignment )expression_statement )block (elif_clause (comparison_operator (identifier_reference_id) identifier_reference_id (identifier__CABLES_WITH_MALFORMED_SUMMARY) identifier__CABLES_WITH_MALFORMED_SUMMARY )comparison_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (binary_operator (string_'Found "end of summary" but no start in "%s", content: "%s"') string_'Found "end of summary" but no start in "%s", content: "%s"' (tuple (identifier_reference_id) identifier_reference_id (subscript (identifier_content) identifier_content (slice (colon) colon (identifier_end_of_summary) identifier_end_of_summary )slice )subscript )tuple )binary_operator )argument_list )call )expression_statement )block )elif_clause )if_statement )block (else_clause (block (expression_statement (assignment (identifier_m) identifier_m (call (attribute (identifier__PARSE_SUMMARY_PATTERN) identifier__PARSE_SUMMARY_PATTERN (identifier_search) identifier_search )attribute (argument_list (identifier_content) identifier_content )argument_list )call )assignment )expression_statement (if_statement (identifier_m) identifier_m (block (expression_statement (assignment (identifier_summary) identifier_summary (subscript (identifier_content) identifier_content (slice (call (attribute (identifier_m) identifier_m (identifier_start) identifier_start )attribute (argument_list (integer_1) integer_1 )argument_list )call (colon) colon (call (attribute (identifier_m) identifier_m (identifier_end) identifier_end )attribute (argument_list (integer_1) integer_1 )argument_list )call )slice )subscript )assignment )expression_statement )block )if_statement )block )else_clause )if_statement (if_statement (identifier_summary) identifier_summary (block (expression_statement (assignment (identifier_summary) identifier_summary (call (attribute (identifier__CLEAN_SUMMARY_CLS_PATTERN) identifier__CLEAN_SUMMARY_CLS_PATTERN (identifier_sub) identifier_sub )attribute (argument_list (string_u'') string_u'' (identifier_summary) identifier_summary )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_summary) identifier_summary (call (attribute (identifier__CLEAN_SUMMARY_PATTERN) identifier__CLEAN_SUMMARY_PATTERN (identifier_sub) identifier_sub )attribute (argument_list (string_u' ') string_u' ' (identifier_summary) identifier_summary )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_summary) identifier_summary (call (attribute (identifier__CLEAN_SUMMARY_WS_PATTERN) identifier__CLEAN_SUMMARY_WS_PATTERN (identifier_sub) identifier_sub )attribute (argument_list (string_u' ') string_u' ' (identifier_summary) identifier_summary )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_summary) identifier_summary (call (attribute (identifier_summary) identifier_summary (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_summary) identifier_summary )return_statement )block )function_definition )module
\ Extracts the summary from the `content` of the cable. If no summary can be found, ``None`` is returned. `content` The content of the cable. `reference_id` The reference identifier of the cable.
(module (function_definition (function_name_attach_framebuffer) function_name_attach_framebuffer (parameters (identifier_self) identifier_self (identifier_screen_id) identifier_screen_id (identifier_framebuffer) identifier_framebuffer )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_screen_id) identifier_screen_id (identifier_baseinteger) identifier_baseinteger )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"screen_id can only be an instance of type baseinteger") string_"screen_id can only be an instance of type baseinteger" )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_framebuffer) identifier_framebuffer (identifier_IFramebuffer) identifier_IFramebuffer )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"framebuffer can only be an instance of type IFramebuffer") string_"framebuffer can only be an instance of type IFramebuffer" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_id_p) identifier_id_p (call (attribute (identifier_self) identifier_self (identifier__call) identifier__call )attribute (argument_list (string_"attachFramebuffer") string_"attachFramebuffer" (keyword_argument (identifier_in_p) identifier_in_p (list (identifier_screen_id) identifier_screen_id (identifier_framebuffer) identifier_framebuffer )list )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_id_p) identifier_id_p )return_statement )block )function_definition )module
Sets the graphics update target for a screen. in screen_id of type int in framebuffer of type :class:`IFramebuffer` return id_p of type str
(module (function_definition (function_name_create_archiver) function_name_create_archiver (parameters (identifier_typename) identifier_typename )parameters (block (expression_statement (assignment (identifier_archiver) identifier_archiver (call (attribute (identifier__ARCHIVER_BY_TYPE) identifier__ARCHIVER_BY_TYPE (identifier_get) identifier_get )attribute (argument_list (identifier_typename) identifier_typename )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_archiver) identifier_archiver )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_'No archiver registered for {!r}') string_'No archiver registered for {!r}' (identifier_format) identifier_format )attribute (argument_list (identifier_typename) identifier_typename )argument_list )call )argument_list )call )raise_statement )block )if_statement (return_statement (identifier_archiver) identifier_archiver )return_statement )block )function_definition )module
Returns Archivers in common configurations. :API: public The typename must correspond to one of the following: 'tar' Returns a tar archiver that applies no compression and emits .tar files. 'tgz' Returns a tar archiver that applies gzip compression and emits .tar.gz files. 'tbz2' Returns a tar archiver that applies bzip2 compression and emits .tar.bz2 files. 'zip' Returns a zip archiver that applies standard compression and emits .zip files. 'jar' Returns a jar archiver that applies no compression and emits .jar files. Note this is provided as a light way of zipping input files into a jar, without the need to prepare Manifest etc. For more advanced usages, please refer to :class: `pants.backend.jvm.subsystems.jar_tool.JarTool` or :class: `pants.backend.jvm.tasks.jar_task.JarTask`.
(module (function_definition (function_name_resume_writing) function_name_resume_writing (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (call (attribute (attribute (identifier_self) identifier_self (identifier__can_send) identifier__can_send )attribute (identifier_is_set) identifier_is_set )attribute (argument_list )argument_list )call )not_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__can_send) identifier__can_send )attribute (identifier_set) identifier_set )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_transport) identifier_transport )attribute (identifier_resume_reading) identifier_resume_reading )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Transport calls when the send buffer has room.
(module (function_definition (function_name_patch) function_name_patch (parameters (identifier_self) identifier_self (identifier_request) identifier_request (default_parameter (identifier_format) identifier_format (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (attribute (identifier_request) identifier_request (identifier_data) identifier_data )attribute (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_ct) identifier_ct (call (attribute (attribute (identifier_ChatType) identifier_ChatType (identifier_objects) identifier_objects )attribute (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier_id) identifier_id (call (attribute (identifier_data) identifier_data (identifier_pop) identifier_pop )attribute (argument_list (string_"chat_type") string_"chat_type" )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_data) identifier_data (string_"chat_type") string_"chat_type" )subscript (identifier_ct) identifier_ct )assignment )expression_statement )block (except_clause (attribute (identifier_ChatType) identifier_ChatType (identifier_DoesNotExist) identifier_DoesNotExist )attribute (block (return_statement (identifier_typeNotFound404) identifier_typeNotFound404 )return_statement )block )except_clause )try_statement (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier_is_path_unique) identifier_is_path_unique )attribute (argument_list (subscript (identifier_data) identifier_data (string_"id") string_"id" )subscript (subscript (identifier_data) identifier_data (string_"publish_path") string_"publish_path" )subscript (attribute (identifier_ct) identifier_ct (identifier_publish_path) identifier_publish_path )attribute )argument_list )call )not_operator (block (return_statement (identifier_notUnique400) identifier_notUnique400 )return_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier_c) identifier_c (call (attribute (attribute (identifier_Channel) identifier_Channel (identifier_objects) identifier_objects )attribute (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier_id) identifier_id (call (attribute (identifier_data) identifier_data (identifier_pop) identifier_pop )attribute (argument_list (string_"id") string_"id" )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement )block (except_clause (attribute (identifier_Channel) identifier_Channel (identifier_DoesNotExist) identifier_DoesNotExist )attribute (block (return_statement (identifier_channelNotFound404) identifier_channelNotFound404 )return_statement )block )except_clause )try_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (identifier_data) identifier_data (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_c) identifier_c (identifier_key) identifier_key (identifier_value) identifier_value )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_c) identifier_c (identifier_save) identifier_save )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_handle_webhook) identifier_handle_webhook )attribute (argument_list (identifier_c) identifier_c )argument_list )call )expression_statement (return_statement (call (identifier_Response) identifier_Response (argument_list (dictionary (pair (string_"text") string_"text" (string_"Channel saved.") string_"Channel saved." )pair (pair (string_"method") string_"method" (string_"PATCH") string_"PATCH" )pair (pair (string_"saved") string_"saved" (attribute (call (identifier_ChannelCMSSerializer) identifier_ChannelCMSSerializer (argument_list (identifier_c) identifier_c )argument_list )call (identifier_data) identifier_data )attribute )pair )dictionary (integer_200) integer_200 )argument_list )call )return_statement )block )function_definition )module
Update an existing Channel
(module (function_definition (function_name_take_profit_replace) function_name_take_profit_replace (parameters (identifier_self) identifier_self (identifier_accountID) identifier_accountID (identifier_orderID) identifier_orderID (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_replace) identifier_replace )attribute (argument_list (identifier_accountID) identifier_accountID (identifier_orderID) identifier_orderID (keyword_argument (identifier_order) identifier_order (call (identifier_TakeProfitOrderRequest) identifier_TakeProfitOrderRequest (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Shortcut to replace a pending Take Profit Order in an Account Args: accountID : The ID of the Account orderID : The ID of the Take Profit Order to replace kwargs : The arguments to create a TakeProfitOrderRequest Returns: v20.response.Response containing the results from submitting the request
(module (function_definition (function_name_parse_file) function_name_parse_file (parameters (identifier_file) identifier_file )parameters (block (expression_statement (assignment (identifier_lines) identifier_lines (list )list )assignment )expression_statement (for_statement (identifier_line) identifier_line (identifier_file) identifier_file (block (expression_statement (assignment (identifier_line) identifier_line (call (attribute (identifier_line) identifier_line (identifier_rstrip) identifier_rstrip )attribute (argument_list (string_'\n') string_'\n' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_line) identifier_line (string_'%%') string_'%%' )comparison_operator (block (expression_statement (yield (call (identifier_parse_item) identifier_parse_item (argument_list (identifier_lines) identifier_lines )argument_list )call )yield )expression_statement (expression_statement (call (attribute (identifier_lines) identifier_lines (identifier_clear) identifier_clear )attribute (argument_list )argument_list )call )expression_statement )block (elif_clause (call (attribute (identifier_line) identifier_line (identifier_startswith) identifier_startswith )attribute (argument_list (string_' ') string_' ' )argument_list )call (block (expression_statement (augmented_assignment (subscript (identifier_lines) identifier_lines (unary_operator (integer_1) integer_1 )unary_operator )subscript (subscript (identifier_line) identifier_line (slice (integer_1) integer_1 (colon) colon )slice )subscript )augmented_assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (call (attribute (identifier_lines) identifier_lines (identifier_append) identifier_append )attribute (argument_list (identifier_line) identifier_line )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (expression_statement (yield (call (identifier_parse_item) identifier_parse_item (argument_list (identifier_lines) identifier_lines )argument_list )call )yield )expression_statement )block )function_definition )module
Take an open file containing the IANA subtag registry, and yield a dictionary of information for each subtag it describes.
(module (function_definition (function_name_lookup) function_name_lookup (parameters (identifier_alias) identifier_alias )parameters (block (if_statement (comparison_operator (identifier_alias) identifier_alias (identifier_matchers) identifier_matchers )comparison_operator (block (return_statement (subscript (identifier_matchers) identifier_matchers (identifier_alias) identifier_alias )subscript )return_statement )block (else_clause (block (expression_statement (assignment (identifier_norm) identifier_norm (call (identifier_normalize) identifier_normalize (argument_list (identifier_alias) identifier_alias )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_norm) identifier_norm (identifier_normalized) identifier_normalized )comparison_operator (block (expression_statement (assignment (identifier_alias) identifier_alias (subscript (identifier_normalized) identifier_normalized (identifier_norm) identifier_norm )subscript )assignment )expression_statement (return_statement (subscript (identifier_matchers) identifier_matchers (identifier_alias) identifier_alias )subscript )return_statement )block )if_statement )block )else_clause )if_statement (if_statement (comparison_operator (unary_operator (integer_1) integer_1 )unary_operator (call (attribute (identifier_alias) identifier_alias (identifier_find) identifier_find )attribute (argument_list (string_'_') string_'_' )argument_list )call )comparison_operator (block (expression_statement (assignment (identifier_norm) identifier_norm (call (attribute (call (identifier_normalize) identifier_normalize (argument_list (identifier_alias) identifier_alias )argument_list )call (identifier_replace) identifier_replace )attribute (argument_list (string_'_') string_'_' (string_'') string_'' )argument_list )call )assignment )expression_statement (return_statement (call (identifier_lookup) identifier_lookup (argument_list (identifier_norm) identifier_norm )argument_list )call )return_statement )block )if_statement (return_statement (None) None )return_statement )block )function_definition )module
Tries to find a matcher callable associated to the given alias. If an exact match does not exists it will try normalizing it and even removing underscores to find one.
(module (function_definition (function_name_assign_ranks_to_grid) function_name_assign_ranks_to_grid (parameters (identifier_grid) identifier_grid (identifier_ranks) identifier_ranks )parameters (block (expression_statement (assignment (identifier_assignments) identifier_assignments (call (identifier_deepcopy) identifier_deepcopy (argument_list (identifier_grid) identifier_grid )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_ranks) identifier_ranks (string_"0b0") string_"0b0" )subscript (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (subscript (identifier_ranks) identifier_ranks (string_"-0b1") string_"-0b1" )subscript (unary_operator (integer_1) integer_1 )unary_operator )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (identifier_grid) identifier_grid )argument_list )call )argument_list )call (block (for_statement (identifier_j) identifier_j (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (subscript (identifier_grid) identifier_grid (identifier_i) identifier_i )subscript )argument_list )call )argument_list )call (block (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (subscript (subscript (identifier_grid) identifier_grid (identifier_i) identifier_i )subscript (identifier_j) identifier_j )subscript )argument_list )call (identifier_list) identifier_list )comparison_operator (block (for_statement (identifier_k) identifier_k (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (subscript (subscript (identifier_grid) identifier_grid (identifier_i) identifier_i )subscript (identifier_j) identifier_j )subscript )argument_list )call )argument_list )call (block (expression_statement (assignment (subscript (subscript (subscript (identifier_assignments) identifier_assignments (identifier_i) identifier_i )subscript (identifier_j) identifier_j )subscript (identifier_k) identifier_k )subscript (subscript (identifier_ranks) identifier_ranks (subscript (subscript (subscript (identifier_grid) identifier_grid (identifier_i) identifier_i )subscript (identifier_j) identifier_j )subscript (identifier_k) identifier_k )subscript )subscript )assignment )expression_statement )block )for_statement )block (else_clause (block (expression_statement (assignment (subscript (subscript (identifier_assignments) identifier_assignments (identifier_i) identifier_i )subscript (identifier_j) identifier_j )subscript (subscript (identifier_ranks) identifier_ranks (subscript (subscript (identifier_grid) identifier_grid (identifier_i) identifier_i )subscript (identifier_j) identifier_j )subscript )subscript )assignment )expression_statement )block )else_clause )if_statement )block )for_statement )block )for_statement (return_statement (identifier_assignments) identifier_assignments )return_statement )block )function_definition )module
Takes a 2D array of binary numbers represented as strings and a dictionary mapping binary strings to integers representing the rank of the cluster they belong to, and returns a grid in which each binary number has been replaced with the rank of its cluster.
(module (function_definition (function_name_reset) function_name_reset (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_v) identifier_v )attribute (attribute (identifier_self) identifier_self (identifier_c) identifier_c )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_u) identifier_u )attribute (binary_operator (attribute (identifier_self) identifier_self (identifier_b) identifier_b )attribute (attribute (identifier_self) identifier_self (identifier_v) identifier_v )attribute )binary_operator )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_fired) identifier_fired )attribute (float_0.0) float_0.0 )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_current) identifier_current )attribute (attribute (identifier_self) identifier_self (identifier_bias) identifier_bias )attribute )assignment )expression_statement )block )function_definition )module
Resets all state variables.
(module (function_definition (function_name_init_app) function_name_init_app (parameters (identifier_self) identifier_self (identifier_app) identifier_app (default_parameter (identifier_path) identifier_path (string_'templates.yaml') string_'templates.yaml' )default_parameter )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__route) identifier__route )attribute (None) None )comparison_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"route is a required argument when app is not None") string_"route is a required argument when app is not None" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_app) identifier_app )attribute (identifier_app) identifier_app )assignment )expression_statement (expression_statement (assignment (attribute (identifier_app) identifier_app (identifier_ask) identifier_ask )attribute (identifier_self) identifier_self )assignment )expression_statement (expression_statement (call (attribute (identifier_app) identifier_app (identifier_add_url_rule) identifier_add_url_rule )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__route) identifier__route )attribute (keyword_argument (identifier_view_func) identifier_view_func (attribute (identifier_self) identifier_self (identifier__flask_view_func) identifier__flask_view_func )attribute )keyword_argument (keyword_argument (identifier_methods) identifier_methods (list (string_'POST') string_'POST' )list )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_app) identifier_app (identifier_jinja_loader) identifier_jinja_loader )attribute (call (identifier_ChoiceLoader) identifier_ChoiceLoader (argument_list (list (attribute (identifier_app) identifier_app (identifier_jinja_loader) identifier_jinja_loader )attribute (call (identifier_YamlLoader) identifier_YamlLoader (argument_list (identifier_app) identifier_app (identifier_path) identifier_path )argument_list )call )list )argument_list )call )assignment )expression_statement )block )function_definition )module
Initializes Ask app by setting configuration variables, loading templates, and maps Ask route to a flask view. The Ask instance is given the following configuration variables by calling on Flask's configuration: `ASK_APPLICATION_ID`: Turn on application ID verification by setting this variable to an application ID or a list of allowed application IDs. By default, application ID verification is disabled and a warning is logged. This variable should be set in production to ensure requests are being sent by the applications you specify. Default: None `ASK_VERIFY_REQUESTS`: Enables or disables Alexa request verification, which ensures requests sent to your skill are from Amazon's Alexa service. This setting should not be disabled in production. It is useful for mocking JSON requests in automated tests. Default: True `ASK_VERIFY_TIMESTAMP_DEBUG`: Turn on request timestamp verification while debugging by setting this to True. Timestamp verification helps mitigate against replay attacks. It relies on the system clock being synchronized with an NTP server. This setting should not be enabled in production. Default: False `ASK_PRETTY_DEBUG_LOGS`: Add tabs and linebreaks to the Alexa request and response printed to the debug log. This improves readability when printing to the console, but breaks formatting when logging to CloudWatch. Default: False
(module (function_definition (function_name_extended_capabilities) function_name_extended_capabilities (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_buf) identifier_buf (call (parenthesized_expression (binary_operator (attribute (identifier_ctypes) identifier_ctypes (identifier_c_uint8) identifier_c_uint8 )attribute (integer_32) integer_32 )binary_operator )parenthesized_expression (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__dll) identifier__dll )attribute (identifier_JLINKARM_GetEmuCapsEx) identifier_JLINKARM_GetEmuCapsEx )attribute (argument_list (identifier_buf) identifier_buf (integer_32) integer_32 )argument_list )call )expression_statement (return_statement (call (identifier_list) identifier_list (argument_list (identifier_buf) identifier_buf )argument_list )call )return_statement )block )function_definition )module
Gets the capabilities of the connected emulator as a list. Args: self (JLink): the ``JLink`` instance Returns: List of 32 integers which define the extended capabilities based on their value and index within the list.
(module (function_definition (function_name__do_lumping) function_name__do_lumping (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_right_eigenvectors) identifier_right_eigenvectors (subscript (attribute (identifier_self) identifier_self (identifier_right_eigenvectors_) identifier_right_eigenvectors_ )attribute (slice (colon) colon )slice (slice (colon) colon (attribute (identifier_self) identifier_self (identifier_n_macrostates) identifier_n_macrostates )attribute )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_index) identifier_index (call (identifier_index_search) identifier_index_search (argument_list (identifier_right_eigenvectors) identifier_right_eigenvectors )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_A) identifier_A (subscript (identifier_right_eigenvectors) identifier_right_eigenvectors (identifier_index) identifier_index (slice (colon) colon )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_A) identifier_A (call (identifier_inv) identifier_inv (argument_list (identifier_A) identifier_A )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_A) identifier_A (call (identifier_fill_A) identifier_fill_A (argument_list (identifier_A) identifier_A (identifier_right_eigenvectors) identifier_right_eigenvectors )argument_list )call )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_do_minimization) identifier_do_minimization )attribute (block (expression_statement (assignment (identifier_A) identifier_A (call (attribute (identifier_self) identifier_self (identifier__optimize_A) identifier__optimize_A )attribute (argument_list (identifier_A) identifier_A )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_A_) identifier_A_ )attribute (call (identifier_fill_A) identifier_fill_A (argument_list (identifier_A) identifier_A (identifier_right_eigenvectors) identifier_right_eigenvectors )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_chi_) identifier_chi_ )attribute (call (identifier_dot) identifier_dot (argument_list (identifier_right_eigenvectors) identifier_right_eigenvectors (attribute (identifier_self) identifier_self (identifier_A_) identifier_A_ )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_microstate_mapping_) identifier_microstate_mapping_ )attribute (call (attribute (identifier_np) identifier_np (identifier_argmax) identifier_argmax )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_chi_) identifier_chi_ )attribute (integer_1) integer_1 )argument_list )call )assignment )expression_statement )block )function_definition )module
Perform PCCA+ algorithm by optimizing transformation matrix A. Creates the following member variables: ------- A : ndarray The transformation matrix. chi : ndarray The membership matrix microstate_mapping : ndarray Mapping from microstates to macrostates.
(module (function_definition (function_name_as_stream) function_name_as_stream (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_singular) identifier_singular )attribute )not_operator (block (raise_statement (call (identifier_ArgumentError) identifier_ArgumentError (argument_list (string_"Attempted to convert a non-singular selector to a data stream, it matches multiple") string_"Attempted to convert a non-singular selector to a data stream, it matches multiple" (keyword_argument (identifier_selector) identifier_selector (identifier_self) identifier_self )keyword_argument )argument_list )call )raise_statement )block )if_statement (return_statement (call (identifier_DataStream) identifier_DataStream (argument_list (attribute (identifier_self) identifier_self (identifier_match_type) identifier_match_type )attribute (attribute (identifier_self) identifier_self (identifier_match_id) identifier_match_id )attribute (comparison_operator (attribute (identifier_self) identifier_self (identifier_match_spec) identifier_match_spec )attribute (attribute (identifier_DataStreamSelector) identifier_DataStreamSelector (identifier_MatchSystemOnly) identifier_MatchSystemOnly )attribute )comparison_operator )argument_list )call )return_statement )block )function_definition )module
Convert this selector to a DataStream. This function will only work if this is a singular selector that matches exactly one DataStream.
(module (function_definition (function_name_oracle_approximating) function_name_oracle_approximating (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_X) identifier_X (call (attribute (identifier_np) identifier_np (identifier_nan_to_num) identifier_nan_to_num )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_X) identifier_X )attribute (identifier_values) identifier_values )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_shrunk_cov) identifier_shrunk_cov (attribute (identifier_self) identifier_self (identifier_delta) identifier_delta )attribute )pattern_list (call (attribute (identifier_covariance) identifier_covariance (identifier_oas) identifier_oas )attribute (argument_list (identifier_X) identifier_X )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_format_and_annualise) identifier_format_and_annualise )attribute (argument_list (identifier_shrunk_cov) identifier_shrunk_cov )argument_list )call )return_statement )block )function_definition )module
Calculate the Oracle Approximating Shrinkage estimate :return: shrunk sample covariance matrix :rtype: np.ndarray
(module (function_definition (function_name_create_supercut_in_batches) function_name_create_supercut_in_batches (parameters (identifier_composition) identifier_composition (identifier_outputfile) identifier_outputfile (identifier_padding) identifier_padding )parameters (block (expression_statement (assignment (identifier_total_clips) identifier_total_clips (call (identifier_len) identifier_len (argument_list (identifier_composition) identifier_composition )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_start_index) identifier_start_index (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (identifier_end_index) identifier_end_index (identifier_BATCH_SIZE) identifier_BATCH_SIZE )assignment )expression_statement (expression_statement (assignment (identifier_batch_comp) identifier_batch_comp (list )list )assignment )expression_statement (while_statement (comparison_operator (identifier_start_index) identifier_start_index (identifier_total_clips) identifier_total_clips )comparison_operator (block (expression_statement (assignment (identifier_filename) identifier_filename (binary_operator (binary_operator (binary_operator (identifier_outputfile) identifier_outputfile (string_'.tmp') string_'.tmp' )binary_operator (call (identifier_str) identifier_str (argument_list (identifier_start_index) identifier_start_index )argument_list )call )binary_operator (string_'.mp4') string_'.mp4' )binary_operator )assignment )expression_statement (try_statement (block (expression_statement (call (identifier_create_supercut) identifier_create_supercut (argument_list (subscript (identifier_composition) identifier_composition (slice (identifier_start_index) identifier_start_index (colon) colon (identifier_end_index) identifier_end_index )slice )subscript (identifier_filename) identifier_filename (identifier_padding) identifier_padding )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_batch_comp) identifier_batch_comp (identifier_append) identifier_append )attribute (argument_list (identifier_filename) identifier_filename )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_gc) identifier_gc (identifier_collect) identifier_collect )attribute (argument_list )argument_list )call )expression_statement (expression_statement (augmented_assignment (identifier_start_index) identifier_start_index (identifier_BATCH_SIZE) identifier_BATCH_SIZE )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_end_index) identifier_end_index (identifier_BATCH_SIZE) identifier_BATCH_SIZE )augmented_assignment )expression_statement )block (except_clause (block (expression_statement (augmented_assignment (identifier_start_index) identifier_start_index (identifier_BATCH_SIZE) identifier_BATCH_SIZE )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_end_index) identifier_end_index (identifier_BATCH_SIZE) identifier_BATCH_SIZE )augmented_assignment )expression_statement (expression_statement (identifier_next) identifier_next )expression_statement )block )except_clause )try_statement )block )while_statement (expression_statement (assignment (identifier_clips) identifier_clips (list_comprehension (call (identifier_VideoFileClip) identifier_VideoFileClip (argument_list (identifier_filename) identifier_filename )argument_list )call (for_in_clause (identifier_filename) identifier_filename (identifier_batch_comp) identifier_batch_comp )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_video) identifier_video (call (identifier_concatenate) identifier_concatenate (argument_list (identifier_clips) identifier_clips )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_video) identifier_video (identifier_to_videofile) identifier_to_videofile )attribute (argument_list (identifier_outputfile) identifier_outputfile (keyword_argument (identifier_codec) identifier_codec (string_"libx264") string_"libx264" )keyword_argument (keyword_argument (identifier_temp_audiofile) identifier_temp_audiofile (string_'temp-audio.m4a') string_'temp-audio.m4a' )keyword_argument (keyword_argument (identifier_remove_temp) identifier_remove_temp (True) True )keyword_argument (keyword_argument (identifier_audio_codec) identifier_audio_codec (string_'aac') string_'aac' )keyword_argument )argument_list )call )expression_statement (for_statement (identifier_filename) identifier_filename (identifier_batch_comp) identifier_batch_comp (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_remove) identifier_remove )attribute (argument_list (identifier_filename) identifier_filename )argument_list )call )expression_statement )block )for_statement (expression_statement (call (identifier_cleanup_log_files) identifier_cleanup_log_files (argument_list (identifier_outputfile) identifier_outputfile )argument_list )call )expression_statement )block )function_definition )module
Create & concatenate video clips in groups of size BATCH_SIZE and output finished video file to output directory.
(module (function_definition (function_name_updated_dimensions) function_name_updated_dimensions (parameters (identifier_self) identifier_self )parameters (block (return_statement (list (tuple (string_"ntime") string_"ntime" (attribute (identifier_args) identifier_args (identifier_ntime) identifier_ntime )attribute )tuple (tuple (string_"nchan") string_"nchan" (attribute (identifier_args) identifier_args (identifier_nchan) identifier_nchan )attribute )tuple (tuple (string_"na") string_"na" (attribute (identifier_args) identifier_args (identifier_na) identifier_na )attribute )tuple (tuple (string_"npsrc") string_"npsrc" (call (identifier_len) identifier_len (argument_list (identifier_lm_coords) identifier_lm_coords )argument_list )call )tuple )list )return_statement )block )function_definition )module
Inform montblanc about dimension sizes
(module (function_definition (function_name_string_to_response) function_name_string_to_response (parameters (identifier_content_type) identifier_content_type )parameters (block (function_definition (function_name_outer_wrapper) function_name_outer_wrapper (parameters (identifier_req_function) identifier_req_function )parameters (block (decorated_definition (decorator (call (identifier_wraps) identifier_wraps (argument_list (identifier_req_function) identifier_req_function )argument_list )call )decorator (function_definition (function_name_newreq) function_name_newreq (parameters (identifier_request) identifier_request (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (try_statement (block (expression_statement (assignment (identifier_outp) identifier_outp (call (identifier_req_function) identifier_req_function (argument_list (identifier_request) identifier_request (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (call (identifier_issubclass) identifier_issubclass (argument_list (attribute (identifier_outp) identifier_outp (identifier___class__) identifier___class__ )attribute (identifier_HttpResponse) identifier_HttpResponse )argument_list )call (block (expression_statement (assignment (identifier_response) identifier_response (identifier_outp) identifier_outp )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_response) identifier_response (call (identifier_HttpResponse) identifier_HttpResponse (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_response) identifier_response (identifier_write) identifier_write )attribute (argument_list (identifier_outp) identifier_outp )argument_list )call )expression_statement (expression_statement (assignment (subscript (identifier_response) identifier_response (string_'Content-Length') string_'Content-Length' )subscript (call (identifier_str) identifier_str (argument_list (call (identifier_len) identifier_len (argument_list (attribute (identifier_response) identifier_response (identifier_content) identifier_content )attribute )argument_list )call )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (subscript (identifier_response) identifier_response (string_'Content-Type') string_'Content-Type' )subscript (identifier_content_type) identifier_content_type )assignment )expression_statement )block (except_clause (as_pattern (identifier_HttpBadRequestException) identifier_HttpBadRequestException (as_pattern_target (identifier_bad_request) identifier_bad_request )as_pattern_target )as_pattern (block (expression_statement (assignment (identifier_response) identifier_response (call (identifier_HttpResponseBadRequest) identifier_HttpResponseBadRequest (argument_list (attribute (identifier_bad_request) identifier_bad_request (identifier_message) identifier_message )attribute )argument_list )call )assignment )expression_statement )block )except_clause )try_statement (return_statement (identifier_response) identifier_response )return_statement )block )function_definition )decorated_definition (return_statement (identifier_newreq) identifier_newreq )return_statement )block )function_definition (return_statement (identifier_outer_wrapper) identifier_outer_wrapper )return_statement )block )function_definition )module
Wrap a view-like function that returns a string and marshalls it into an HttpResponse with the given Content-Type If the view raises an HttpBadRequestException, it will be converted into an HttpResponseBadRequest.
(module (function_definition (function_name_handle_update) function_name_handle_update (parameters (identifier_self) identifier_self (identifier_args) identifier_args )parameters (block (expression_statement (assignment (identifier_component) identifier_component (call (identifier_int) identifier_int (argument_list (subscript (identifier_args) identifier_args (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_action) identifier_action (call (identifier_int) identifier_int (argument_list (subscript (identifier_args) identifier_args (integer_1) integer_1 )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_params) identifier_params (list_comprehension (call (identifier_int) identifier_int (argument_list (identifier_x) identifier_x )argument_list )call (for_in_clause (identifier_x) identifier_x (subscript (identifier_args) identifier_args (slice (integer_2) integer_2 (colon) colon )slice )subscript )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (call (attribute (identifier__LOGGER) identifier__LOGGER (identifier_debug) identifier_debug )attribute (argument_list (binary_operator (string_"Updating %d(%s): c=%d a=%d params=%s") string_"Updating %d(%s): c=%d a=%d params=%s" (tuple (attribute (identifier_self) identifier_self (identifier__integration_id) identifier__integration_id )attribute (attribute (identifier_self) identifier_self (identifier__name) identifier__name )attribute (identifier_component) identifier_component (identifier_action) identifier_action (identifier_params) identifier_params )tuple )binary_operator )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_component) identifier_component (attribute (identifier_self) identifier_self (identifier__components) identifier__components )attribute )comparison_operator (block (return_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier__components) identifier__components )attribute (identifier_component) identifier_component )subscript (identifier_handle_update) identifier_handle_update )attribute (argument_list (identifier_action) identifier_action (identifier_params) identifier_params )argument_list )call )return_statement )block )if_statement (return_statement (False) False )return_statement )block )function_definition )module
The callback invoked by the main event loop if there's an event from this keypad.
(module (function_definition (function_name_all) function_name_all (parameters (identifier_cls) identifier_cls (identifier_client) identifier_client (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_max_date) identifier_max_date (conditional_expression (subscript (identifier_kwargs) identifier_kwargs (string_'max_date') string_'max_date' )subscript (comparison_operator (string_'max_date') string_'max_date' (identifier_kwargs) identifier_kwargs )comparison_operator (None) None )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_max_fetches) identifier_max_fetches (line_continuation_\) line_continuation_\ (conditional_expression (subscript (identifier_kwargs) identifier_kwargs (string_'max_fetches') string_'max_fetches' )subscript (comparison_operator (string_'max_fetches') string_'max_fetches' (identifier_kwargs) identifier_kwargs )comparison_operator (None) None )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_url) identifier_url (string_'https://api.robinhood.com/options/positions/') string_'https://api.robinhood.com/options/positions/' )assignment )expression_statement (expression_statement (assignment (identifier_params) identifier_params (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_client) identifier_client (identifier_get) identifier_get )attribute (argument_list (identifier_url) identifier_url (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_results) identifier_results (subscript (identifier_data) identifier_data (string_"results") string_"results" )subscript )assignment )expression_statement (if_statement (call (identifier_is_max_date_gt) identifier_is_max_date_gt (argument_list (identifier_max_date) identifier_max_date (subscript (subscript (subscript (identifier_results) identifier_results (unary_operator (integer_1) integer_1 )unary_operator )subscript (string_'updated_at') string_'updated_at' )subscript (slice (integer_0) integer_0 (colon) colon (integer_10) integer_10 )slice )subscript )argument_list )call (block (return_statement (identifier_results) identifier_results )return_statement )block )if_statement (if_statement (comparison_operator (identifier_max_fetches) identifier_max_fetches (integer_1) integer_1 )comparison_operator (block (return_statement (identifier_results) identifier_results )return_statement )block )if_statement (expression_statement (assignment (identifier_fetches) identifier_fetches (integer_1) integer_1 )assignment )expression_statement (while_statement (subscript (identifier_data) identifier_data (string_"next") string_"next" )subscript (block (expression_statement (assignment (identifier_fetches) identifier_fetches (binary_operator (identifier_fetches) identifier_fetches (integer_1) integer_1 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_client) identifier_client (identifier_get) identifier_get )attribute (argument_list (subscript (identifier_data) identifier_data (string_"next") string_"next" )subscript )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_results) identifier_results (identifier_extend) identifier_extend )attribute (argument_list (subscript (identifier_data) identifier_data (string_"results") string_"results" )subscript )argument_list )call )expression_statement (if_statement (call (identifier_is_max_date_gt) identifier_is_max_date_gt (argument_list (identifier_max_date) identifier_max_date (subscript (subscript (subscript (identifier_results) identifier_results (unary_operator (integer_1) integer_1 )unary_operator )subscript (string_'updated_at') string_'updated_at' )subscript (slice (integer_0) integer_0 (colon) colon (integer_10) integer_10 )slice )subscript )argument_list )call (block (return_statement (identifier_results) identifier_results )return_statement )block )if_statement (if_statement (boolean_operator (identifier_max_fetches) identifier_max_fetches (parenthesized_expression (comparison_operator (identifier_fetches) identifier_fetches (identifier_max_fetches) identifier_max_fetches )comparison_operator )parenthesized_expression )boolean_operator (block (return_statement (identifier_results) identifier_results )return_statement )block )if_statement )block )while_statement (return_statement (identifier_results) identifier_results )return_statement )block )function_definition )module
fetch all option positions
(module (function_definition (function_name_get_redshift) function_name_get_redshift (parameters (identifier_self) identifier_self (identifier_dist) identifier_dist )parameters (block (expression_statement (assignment (pattern_list (identifier_dist) identifier_dist (identifier_input_is_array) identifier_input_is_array )pattern_list (call (identifier_ensurearray) identifier_ensurearray (argument_list (identifier_dist) identifier_dist )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_zs) identifier_zs (call (attribute (identifier_self) identifier_self (identifier_nearby_d2z) identifier_nearby_d2z )attribute (argument_list (identifier_dist) identifier_dist )argument_list )call )assignment )expression_statement )block (except_clause (identifier_TypeError) identifier_TypeError (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_setup_interpolant) identifier_setup_interpolant )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_zs) identifier_zs (call (attribute (identifier_self) identifier_self (identifier_nearby_d2z) identifier_nearby_d2z )attribute (argument_list (identifier_dist) identifier_dist )argument_list )call )assignment )expression_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_replacemask) identifier_replacemask (call (attribute (identifier_numpy) identifier_numpy (identifier_isnan) identifier_isnan )attribute (argument_list (identifier_zs) identifier_zs )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_replacemask) identifier_replacemask (identifier_any) identifier_any )attribute (argument_list )argument_list )call (block (expression_statement (assignment (subscript (identifier_zs) identifier_zs (identifier_replacemask) identifier_replacemask )subscript (call (attribute (identifier_self) identifier_self (identifier_faraway_d2z) identifier_faraway_d2z )attribute (argument_list (subscript (identifier_dist) identifier_dist (identifier_replacemask) identifier_replacemask )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_replacemask) identifier_replacemask (call (attribute (identifier_numpy) identifier_numpy (identifier_isnan) identifier_isnan )attribute (argument_list (identifier_zs) identifier_zs )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (call (attribute (identifier_replacemask) identifier_replacemask (identifier_any) identifier_any )attribute (argument_list )argument_list )call (block (if_statement (boolean_operator (not_operator (call (attribute (parenthesized_expression (comparison_operator (identifier_dist) identifier_dist (float_0.) float_0. )comparison_operator )parenthesized_expression (identifier_all) identifier_all )attribute (argument_list )argument_list )call )not_operator (call (attribute (call (attribute (identifier_numpy) identifier_numpy (identifier_isfinite) identifier_isfinite )attribute (argument_list (identifier_dist) identifier_dist )argument_list )call (identifier_all) identifier_all )attribute (argument_list )argument_list )call )boolean_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"distance must be finite and > 0") string_"distance must be finite and > 0" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (subscript (identifier_zs) identifier_zs (identifier_replacemask) identifier_replacemask )subscript (call (identifier__redshift) identifier__redshift (argument_list (subscript (identifier_dist) identifier_dist (identifier_replacemask) identifier_replacemask )subscript (keyword_argument (identifier_cosmology) identifier_cosmology (attribute (identifier_self) identifier_self (identifier_cosmology) identifier_cosmology )attribute )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (call (identifier_formatreturn) identifier_formatreturn (argument_list (identifier_zs) identifier_zs (identifier_input_is_array) identifier_input_is_array )argument_list )call )return_statement )block )function_definition )module
Returns the redshift for the given distance.
(module (function_definition (function_name_phase_type) function_name_phase_type (parameters (identifier_self) identifier_self (identifier_value) identifier_value )parameters (block (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier__params) identifier__params )attribute (identifier_phase_type) identifier_phase_type )attribute (identifier_value) identifier_value )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__overwrite_lock) identifier__overwrite_lock )attribute (identifier_disable) identifier_disable )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
compresses the waveform horizontally; one of ``"normal"``, ``"resync"``, ``"resync2"``
(module (function_definition (function_name_product) function_name_product (parameters (identifier_target) identifier_target (identifier_prop1) identifier_prop1 (identifier_prop2) identifier_prop2 (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (expression_statement (assignment (identifier_value) identifier_value (binary_operator (subscript (identifier_target) identifier_target (identifier_prop1) identifier_prop1 )subscript (subscript (identifier_target) identifier_target (identifier_prop2) identifier_prop2 )subscript )binary_operator )assignment )expression_statement (for_statement (identifier_item) identifier_item (call (attribute (identifier_kwargs) identifier_kwargs (identifier_values) identifier_values )attribute (argument_list )argument_list )call (block (expression_statement (augmented_assignment (identifier_value) identifier_value (subscript (identifier_target) identifier_target (identifier_item) identifier_item )subscript )augmented_assignment )expression_statement )block )for_statement (return_statement (identifier_value) identifier_value )return_statement )block )function_definition )module
r""" Calculates the product of multiple property values Parameters ---------- target : OpenPNM Object The object which this model is associated with. This controls the length of the calculated array, and also provides access to other necessary properties. prop1 : string The name of the first argument prop2 : string The name of the second argument Notes ----- Additional properties can be specified beyond just ``prop1`` and ``prop2`` by including additional arguments in the function call (i.e. ``prop3 = 'pore.foo'``).
(module (function_definition (function_name_getPeers) function_name_getPeers (parameters (identifier_self) identifier_self (default_parameter (identifier_offset) identifier_offset (integer_0) integer_0 )default_parameter (default_parameter (identifier_limit) identifier_limit (integer_1000) integer_1000 )default_parameter )parameters (block (expression_statement (assignment (identifier_select) identifier_select (call (attribute (call (attribute (call (attribute (call (attribute (attribute (identifier_models) identifier_models (identifier_Peer) identifier_Peer )attribute (identifier_select) identifier_select )attribute (argument_list )argument_list )call (identifier_order_by) identifier_order_by )attribute (argument_list (attribute (attribute (identifier_models) identifier_models (identifier_Peer) identifier_Peer )attribute (identifier_url) identifier_url )attribute )argument_list )call (identifier_limit) identifier_limit )attribute (argument_list (identifier_limit) identifier_limit )argument_list )call (identifier_offset) identifier_offset )attribute (argument_list (identifier_offset) identifier_offset )argument_list )call )assignment )expression_statement (return_statement (list_comprehension (call (attribute (identifier_peers) identifier_peers (identifier_Peer) identifier_Peer )attribute (argument_list (attribute (identifier_p) identifier_p (identifier_url) identifier_url )attribute (keyword_argument (identifier_record) identifier_record (identifier_p) identifier_p )keyword_argument )argument_list )call (for_in_clause (identifier_p) identifier_p (identifier_select) identifier_select )for_in_clause )list_comprehension )return_statement )block )function_definition )module
Get the list of peers using an SQL offset and limit. Returns a list of peer datamodel objects in a list.
(module (function_definition (function_name_prepare_sort_key) function_name_prepare_sort_key (parameters (identifier_self) identifier_self )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (identifier_self) identifier_self (identifier_convert_type) identifier_convert_type )attribute (identifier_str) identifier_str )argument_list )call (block (try_statement (block (expression_statement (assignment (pattern_list (identifier_app_name) identifier_app_name (identifier_model_name) identifier_model_name )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_convert_type) identifier_convert_type )attribute (identifier_split) identifier_split )attribute (argument_list (string_'.') string_'.' )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (raise_statement (call (identifier_ImproperlyConfigured) identifier_ImproperlyConfigured (argument_list (call (attribute (string_'"{}" is not a valid converter type. String-based converter types must be specified in "app.Model" format.') string_'"{}" is not a valid converter type. String-based converter types must be specified in "app.Model" format.' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_convert_type) identifier_convert_type )attribute )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement (try_statement (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_convert_type) identifier_convert_type )attribute (call (attribute (identifier_apps) identifier_apps (identifier_get_model) identifier_get_model )attribute (argument_list (identifier_app_name) identifier_app_name (identifier_model_name) identifier_model_name )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (identifier_LookupError) identifier_LookupError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (raise_statement (call (identifier_ImproperlyConfigured) identifier_ImproperlyConfigured (argument_list (call (attribute (string_'"{}" is not a valid model name. {}') string_'"{}" is not a valid model name. {}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_convert_type) identifier_convert_type )attribute (identifier_e) identifier_e )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_sort_key) identifier_sort_key )attribute (tuple (binary_operator (unary_operator (integer_1) integer_1 )unary_operator (call (identifier_len) identifier_len (argument_list (call (attribute (identifier_inspect) identifier_inspect (identifier_getmro) identifier_getmro )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_convert_type) identifier_convert_type )attribute )argument_list )call )argument_list )call )binary_operator (binary_operator (unary_operator (integer_1) integer_1 )unary_operator (attribute (identifier_self) identifier_self (identifier_source_order) identifier_source_order )attribute )binary_operator )tuple )assignment )expression_statement )block )function_definition )module
Triggered by view_function._sort_converters when our sort key should be created. This can't be called in the constructor because Django models might not be ready yet.
(module (function_definition (function_name_list_streams) function_name_list_streams (parameters (identifier_self) identifier_self (default_parameter (identifier_types) identifier_types (list )list )default_parameter (default_parameter (identifier_inactive) identifier_inactive (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_req_hook) identifier_req_hook (string_'pod/v1/streams/list') string_'pod/v1/streams/list' )assignment )expression_statement (expression_statement (assignment (identifier_json_query) identifier_json_query (dictionary (pair (string_"streamTypes") string_"streamTypes" (identifier_types) identifier_types )pair (pair (string_"includeInactiveStreams") string_"includeInactiveStreams" (identifier_inactive) identifier_inactive )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_req_args) identifier_req_args (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_json_query) identifier_json_query )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_status_code) identifier_status_code (identifier_response) identifier_response )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier___rest__) identifier___rest__ )attribute (identifier_POST_query) identifier_POST_query )attribute (argument_list (identifier_req_hook) identifier_req_hook (identifier_req_args) identifier_req_args )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_debug) identifier_debug )attribute (argument_list (binary_operator (string_'%s: %s') string_'%s: %s' (tuple (identifier_status_code) identifier_status_code (identifier_response) identifier_response )tuple )binary_operator )argument_list )call )expression_statement (return_statement (expression_list (identifier_status_code) identifier_status_code (identifier_response) identifier_response )expression_list )return_statement )block )function_definition )module
list user streams
(module (function_definition (function_name__evaluate_usecols) function_name__evaluate_usecols (parameters (identifier_usecols) identifier_usecols (identifier_names) identifier_names )parameters (block (if_statement (call (identifier_callable) identifier_callable (argument_list (identifier_usecols) identifier_usecols )argument_list )call (block (return_statement (set_comprehension (identifier_i) identifier_i (for_in_clause (pattern_list (identifier_i) identifier_i (identifier_name) identifier_name )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_names) identifier_names )argument_list )call )for_in_clause (if_clause (call (identifier_usecols) identifier_usecols (argument_list (identifier_name) identifier_name )argument_list )call )if_clause )set_comprehension )return_statement )block )if_statement (return_statement (identifier_usecols) identifier_usecols )return_statement )block )function_definition )module
Check whether or not the 'usecols' parameter is a callable. If so, enumerates the 'names' parameter and returns a set of indices for each entry in 'names' that evaluates to True. If not a callable, returns 'usecols'.
(module (function_definition (function_name_to_flat) function_name_to_flat (parameters (identifier_coord) identifier_coord )parameters (block (if_statement (comparison_operator (identifier_coord) identifier_coord (None) None )comparison_operator (block (return_statement (binary_operator (attribute (identifier_go) identifier_go (identifier_N) identifier_N )attribute (attribute (identifier_go) identifier_go (identifier_N) identifier_N )attribute )binary_operator )return_statement )block )if_statement (return_statement (binary_operator (binary_operator (attribute (identifier_go) identifier_go (identifier_N) identifier_N )attribute (subscript (identifier_coord) identifier_coord (integer_0) integer_0 )subscript )binary_operator (subscript (identifier_coord) identifier_coord (integer_1) integer_1 )subscript )binary_operator )return_statement )block )function_definition )module
Converts from a Minigo coordinate to a flattened coordinate.
(module (function_definition (function_name_remove) function_name_remove (parameters (identifier_path) identifier_path )parameters (block (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_path) identifier_path )argument_list )call )not_operator (block (return_statement )return_statement )block )if_statement (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isdir) identifier_isdir )attribute (argument_list (identifier_path) identifier_path )argument_list )call (block (return_statement (call (attribute (identifier_shutil) identifier_shutil (identifier_rmtree) identifier_rmtree )attribute (argument_list (identifier_path) identifier_path )argument_list )call )return_statement )block )if_statement (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (identifier_path) identifier_path )argument_list )call (block (return_statement (call (attribute (identifier_os) identifier_os (identifier_remove) identifier_remove )attribute (argument_list (identifier_path) identifier_path )argument_list )call )return_statement )block )if_statement )block )function_definition )module
Wrapper that switches between os.remove and shutil.rmtree depending on whether the provided path is a file or directory.
(module (function_definition (function_name_as_minimized) function_name_as_minimized (parameters (typed_parameter (identifier_values) identifier_values (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_float) identifier_float )type )type_parameter )generic_type )type )typed_parameter (typed_parameter (identifier_maximized) identifier_maximized (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_bool) identifier_bool )type )type_parameter )generic_type )type )typed_parameter )parameters (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_float) identifier_float )type )type_parameter )generic_type )type (block (return_statement (list_comprehension (conditional_expression (binary_operator (identifier_v) identifier_v (unary_operator (float_1.) float_1. )unary_operator )binary_operator (identifier_m) identifier_m (identifier_v) identifier_v )conditional_expression (for_in_clause (pattern_list (identifier_v) identifier_v (identifier_m) identifier_m )pattern_list (call (identifier_zip) identifier_zip (argument_list (identifier_values) identifier_values (identifier_maximized) identifier_maximized )argument_list )call )for_in_clause )list_comprehension )return_statement )block )function_definition )module
Return vector values as minimized
(module (function_definition (function_name_load_data) function_name_load_data (parameters )parameters (block (expression_statement (assignment (identifier_boston) identifier_boston (call (identifier_load_boston) identifier_load_boston (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_X_train) identifier_X_train (identifier_X_test) identifier_X_test (identifier_y_train) identifier_y_train (identifier_y_test) identifier_y_test )pattern_list (call (identifier_train_test_split) identifier_train_test_split (argument_list (attribute (identifier_boston) identifier_boston (identifier_data) identifier_data )attribute (attribute (identifier_boston) identifier_boston (identifier_target) identifier_target )attribute (keyword_argument (identifier_random_state) identifier_random_state (integer_99) integer_99 )keyword_argument (keyword_argument (identifier_test_size) identifier_test_size (float_0.25) float_0.25 )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ss_X) identifier_ss_X (call (identifier_StandardScaler) identifier_StandardScaler (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ss_y) identifier_ss_y (call (identifier_StandardScaler) identifier_StandardScaler (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_X_train) identifier_X_train (call (attribute (identifier_ss_X) identifier_ss_X (identifier_fit_transform) identifier_fit_transform )attribute (argument_list (identifier_X_train) identifier_X_train )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_X_test) identifier_X_test (call (attribute (identifier_ss_X) identifier_ss_X (identifier_transform) identifier_transform )attribute (argument_list (identifier_X_test) identifier_X_test )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_y_train) identifier_y_train (subscript (call (attribute (identifier_ss_y) identifier_ss_y (identifier_fit_transform) identifier_fit_transform )attribute (argument_list (subscript (identifier_y_train) identifier_y_train (slice (colon) colon )slice (None) None )subscript )argument_list )call (slice (colon) colon )slice (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_y_test) identifier_y_test (subscript (call (attribute (identifier_ss_y) identifier_ss_y (identifier_transform) identifier_transform )attribute (argument_list (subscript (identifier_y_test) identifier_y_test (slice (colon) colon )slice (None) None )subscript )argument_list )call (slice (colon) colon )slice (integer_0) integer_0 )subscript )assignment )expression_statement (return_statement (expression_list (identifier_X_train) identifier_X_train (identifier_X_test) identifier_X_test (identifier_y_train) identifier_y_train (identifier_y_test) identifier_y_test )expression_list )return_statement )block )function_definition )module
Load dataset, use boston dataset
(module (function_definition (function_name__should_ignore) function_name__should_ignore (parameters (identifier_self) identifier_self (identifier_path) identifier_path )parameters (block (for_statement (identifier_ignore) identifier_ignore (attribute (attribute (identifier_self) identifier_self (identifier_options) identifier_options )attribute (identifier_ignores) identifier_ignores )attribute (block (if_statement (call (attribute (identifier_fnmatch) identifier_fnmatch (identifier_fnmatch) identifier_fnmatch )attribute (argument_list (identifier_path) identifier_path (identifier_ignore) identifier_ignore )argument_list )call (block (return_statement (True) True )return_statement )block )if_statement )block )for_statement (return_statement (False) False )return_statement )block )function_definition )module
Return True iff path should be ignored.
(module (function_definition (function_name_preview) function_name_preview (parameters (identifier_self) identifier_self (identifier_obj) identifier_obj (default_parameter (identifier_request) identifier_request (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_source) identifier_source (call (attribute (identifier_self) identifier_self (identifier_get_thumbnail_source) identifier_get_thumbnail_source )attribute (argument_list (identifier_obj) identifier_obj )argument_list )call )assignment )expression_statement (if_statement (identifier_source) identifier_source (block (try_statement (block (import_from_statement (dotted_name (identifier_easy_thumbnails) identifier_easy_thumbnails (identifier_files) identifier_files )dotted_name (dotted_name (identifier_get_thumbnailer) identifier_get_thumbnailer )dotted_name )import_from_statement )block (except_clause (identifier_ImportError) identifier_ImportError (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_warning) identifier_warning )attribute (argument_list (call (identifier__) identifier__ (argument_list (concatenated_string (string_'`easy_thumbnails` is not installed and required for ') string_'`easy_thumbnails` is not installed and required for ' (string_'icekit.admin_tools.mixins.ThumbnailAdminMixin') string_'icekit.admin_tools.mixins.ThumbnailAdminMixin' )concatenated_string )argument_list )call )argument_list )call )expression_statement (return_statement (string_'') string_'' )return_statement )block )except_clause )try_statement (try_statement (block (expression_statement (assignment (identifier_thumbnailer) identifier_thumbnailer (call (identifier_get_thumbnailer) identifier_get_thumbnailer (argument_list (identifier_source) identifier_source )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_thumbnail) identifier_thumbnail (call (attribute (identifier_thumbnailer) identifier_thumbnailer (identifier_get_thumbnail) identifier_get_thumbnail )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_thumbnail_options) identifier_thumbnail_options )attribute )argument_list )call )assignment )expression_statement (return_statement (call (attribute (string_'<img class="thumbnail" src="{0}" />') string_'<img class="thumbnail" src="{0}" />' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_thumbnail) identifier_thumbnail (identifier_url) identifier_url )attribute )argument_list )call )return_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_ex) identifier_ex )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_warning) identifier_warning )attribute (argument_list (call (identifier__) identifier__ (argument_list (call (attribute (concatenated_string (string_u'`easy_thumbnails` failed to generate a thumbnail image') string_u'`easy_thumbnails` failed to generate a thumbnail image' (string_u' for {0}') string_u' for {0}' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_source) identifier_source )argument_list )call )argument_list )call )argument_list )call )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_thumbnail_show_exceptions) identifier_thumbnail_show_exceptions )attribute (block (return_statement (call (attribute (string_'Thumbnail exception: {0}') string_'Thumbnail exception: {0}' (identifier_format) identifier_format )attribute (argument_list (identifier_ex) identifier_ex )argument_list )call )return_statement )block )if_statement )block )except_clause )try_statement )block )if_statement (return_statement (string_'') string_'' )return_statement )block )function_definition )module
Generate the HTML to display for the image. :param obj: An object with a thumbnail_field defined. :return: HTML for image display.
(module (function_definition (function_name__CreateShapePointFolder) function_name__CreateShapePointFolder (parameters (identifier_self) identifier_self (identifier_shapes_folder) identifier_shapes_folder (identifier_shape) identifier_shape )parameters (block (expression_statement (assignment (identifier_folder_name) identifier_folder_name (binary_operator (attribute (identifier_shape) identifier_shape (identifier_shape_id) identifier_shape_id )attribute (string_' Shape Points') string_' Shape Points' )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_folder) identifier_folder (call (attribute (identifier_self) identifier_self (identifier__CreateFolder) identifier__CreateFolder )attribute (argument_list (identifier_shapes_folder) identifier_shapes_folder (identifier_folder_name) identifier_folder_name (keyword_argument (identifier_visible) identifier_visible (False) False )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (tuple_pattern (identifier_index) identifier_index (tuple_pattern (identifier_lat) identifier_lat (identifier_lon) identifier_lon (identifier_dist) identifier_dist )tuple_pattern )tuple_pattern (call (identifier_enumerate) identifier_enumerate (argument_list (attribute (identifier_shape) identifier_shape (identifier_points) identifier_points )attribute )argument_list )call (block (expression_statement (assignment (identifier_placemark) identifier_placemark (call (attribute (identifier_self) identifier_self (identifier__CreatePlacemark) identifier__CreatePlacemark )attribute (argument_list (identifier_folder) identifier_folder (call (identifier_str) identifier_str (argument_list (binary_operator (identifier_index) identifier_index (integer_1) integer_1 )binary_operator )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_point) identifier_point (call (attribute (identifier_ET) identifier_ET (identifier_SubElement) identifier_SubElement )attribute (argument_list (identifier_placemark) identifier_placemark (string_'Point') string_'Point' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_coordinates) identifier_coordinates (call (attribute (identifier_ET) identifier_ET (identifier_SubElement) identifier_SubElement )attribute (argument_list (identifier_point) identifier_point (string_'coordinates') string_'coordinates' )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_coordinates) identifier_coordinates (identifier_text) identifier_text )attribute (binary_operator (string_'%.6f,%.6f') string_'%.6f,%.6f' (tuple (identifier_lon) identifier_lon (identifier_lat) identifier_lat )tuple )binary_operator )assignment )expression_statement )block )for_statement (return_statement (identifier_folder) identifier_folder )return_statement )block )function_definition )module
Create a KML Folder containing all the shape points in a shape. The folder contains placemarks for each shapepoint. Args: shapes_folder: A KML Shape Folder ElementTree.Element instance shape: The shape to plot. Returns: The Folder ElementTree.Element instance or None.
(module (function_definition (function_name_any_match) function_name_any_match (parameters (identifier_self) identifier_self (identifier_urls) identifier_urls )parameters (block (return_statement (call (identifier_any) identifier_any (generator_expression (comparison_operator (attribute (call (identifier_urlparse) identifier_urlparse (argument_list (identifier_u) identifier_u )argument_list )call (identifier_hostname) identifier_hostname )attribute (identifier_self) identifier_self )comparison_operator (for_in_clause (identifier_u) identifier_u (identifier_urls) identifier_urls )for_in_clause )generator_expression )call )return_statement )block )function_definition )module
Check if any of the given URLs has a matching host. :param urls: an iterable containing URLs :returns: True if any host has a listed match :raises InvalidURLError: if there are any invalid URLs in the sequence
(module (function_definition (function_name_QA_fetch_get_sh_margin) function_name_QA_fetch_get_sh_margin (parameters (identifier_date) identifier_date )parameters (block (if_statement (comparison_operator (identifier_date) identifier_date (identifier_trade_date_sse) identifier_trade_date_sse )comparison_operator (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (call (attribute (call (attribute (identifier_pd) identifier_pd (identifier_read_excel) identifier_read_excel )attribute (argument_list (call (attribute (identifier__sh_url) identifier__sh_url (identifier_format) identifier_format )attribute (argument_list (call (identifier_QA_util_date_str2int) identifier_QA_util_date_str2int (argument_list (identifier_date) identifier_date )argument_list )call )argument_list )call (integer_1) integer_1 )argument_list )call (identifier_assign) identifier_assign )attribute (argument_list (keyword_argument (identifier_date) identifier_date (identifier_date) identifier_date )keyword_argument )argument_list )call (identifier_assign) identifier_assign )attribute (argument_list (keyword_argument (identifier_sse) identifier_sse (string_'sh') string_'sh' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_data) identifier_data (identifier_columns) identifier_columns )attribute (list (string_'code') string_'code' (string_'name') string_'name' (string_'leveraged_balance') string_'leveraged_balance' (string_'leveraged_buyout') string_'leveraged_buyout' (string_'leveraged_payoff') string_'leveraged_payoff' (string_'margin_left') string_'margin_left' (string_'margin_sell') string_'margin_sell' (string_'margin_repay') string_'margin_repay' (string_'date') string_'date' (string_'sse') string_'sse' )list )assignment )expression_statement (return_statement (identifier_data) identifier_data )return_statement )block (else_clause (block (pass_statement )pass_statement )block )else_clause )if_statement )block )function_definition )module
return shanghai margin data Arguments: date {str YYYY-MM-DD} -- date format Returns: pandas.DataFrame -- res for margin data
(module (function_definition (function_name_list_resources) function_name_list_resources (parameters (identifier_self) identifier_self (identifier_device_id) identifier_device_id )parameters (block (expression_statement (assignment (identifier_api) identifier_api (call (attribute (identifier_self) identifier_self (identifier__get_api) identifier__get_api )attribute (argument_list (attribute (identifier_mds) identifier_mds (identifier_EndpointsApi) identifier_EndpointsApi )attribute )argument_list )call )assignment )expression_statement (return_statement (list_comprehension (call (identifier_Resource) identifier_Resource (argument_list (identifier_r) identifier_r )argument_list )call (for_in_clause (identifier_r) identifier_r (call (attribute (identifier_api) identifier_api (identifier_get_endpoint_resources) identifier_get_endpoint_resources )attribute (argument_list (identifier_device_id) identifier_device_id )argument_list )call )for_in_clause )list_comprehension )return_statement )block )function_definition )module
List all resources registered to a connected device. .. code-block:: python >>> for r in api.list_resources(device_id): print(r.name, r.observable, r.uri) None,True,/3/0/1 Update,False,/5/0/3 ... :param str device_id: The ID of the device (Required) :returns: A list of :py:class:`Resource` objects for the device :rtype: list
(module (function_definition (function_name_file_handler) function_name_file_handler (parameters (identifier_self) identifier_self (identifier_handler_type) identifier_handler_type (identifier_path) identifier_path (identifier_prefixed_path) identifier_prefixed_path (identifier_source_storage) identifier_source_storage )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_faster) identifier_faster )attribute (block (if_statement (comparison_operator (identifier_prefixed_path) identifier_prefixed_path (attribute (identifier_self) identifier_self (identifier_found_files) identifier_found_files )attribute )comparison_operator (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_found_files) identifier_found_files )attribute (identifier_prefixed_path) identifier_prefixed_path )subscript (tuple (identifier_source_storage) identifier_source_storage (identifier_path) identifier_path )tuple )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_task_queue) identifier_task_queue )attribute (identifier_put) identifier_put )attribute (argument_list (dictionary (pair (string_'handler_type') string_'handler_type' (identifier_handler_type) identifier_handler_type )pair (pair (string_'path') string_'path' (identifier_path) identifier_path )pair (pair (string_'prefixed_path') string_'prefixed_path' (identifier_prefixed_path) identifier_prefixed_path )pair (pair (string_'source_storage') string_'source_storage' (identifier_source_storage) identifier_source_storage )pair )dictionary )argument_list )call )expression_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_counter) identifier_counter )attribute (integer_1) integer_1 )augmented_assignment )expression_statement )block (else_clause (block (if_statement (comparison_operator (identifier_handler_type) identifier_handler_type (string_'link') string_'link' )comparison_operator (block (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_Command) identifier_Command (identifier_self) identifier_self )argument_list )call (identifier_link_file) identifier_link_file )attribute (argument_list (identifier_path) identifier_path (identifier_prefixed_path) identifier_prefixed_path (identifier_source_storage) identifier_source_storage )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_Command) identifier_Command (identifier_self) identifier_self )argument_list )call (identifier_copy_file) identifier_copy_file )attribute (argument_list (identifier_path) identifier_path (identifier_prefixed_path) identifier_prefixed_path (identifier_source_storage) identifier_source_storage )argument_list )call )expression_statement )block )else_clause )if_statement )block )else_clause )if_statement )block )function_definition )module
Create a dict with all kwargs of the `copy_file` or `link_file` method of the super class and add it to the queue for later processing.
(module (function_definition (function_name_login_form_factory) function_name_login_form_factory (parameters (identifier_Form) identifier_Form (identifier_app) identifier_app )parameters (block (class_definition (identifier_LoginForm) identifier_LoginForm (argument_list (identifier_Form) identifier_Form )argument_list (block (function_definition (function_name___init__) function_name___init__ (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_LoginForm) identifier_LoginForm (identifier_self) identifier_self )argument_list )call (identifier___init__) identifier___init__ )attribute (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_remember) identifier_remember )attribute (identifier_data) identifier_data )attribute (False) False )assignment )expression_statement )block )function_definition )block )class_definition (return_statement (identifier_LoginForm) identifier_LoginForm )return_statement )block )function_definition )module
Return extended login form.
(module (function_definition (function_name_purge) function_name_purge (parameters (identifier_self) identifier_self )parameters (block (while_statement (not_operator (call (attribute (attribute (identifier_self) identifier_self (identifier_stopped) identifier_stopped )attribute (identifier_isSet) identifier_isSet )attribute (argument_list )argument_list )call )not_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_stopped) identifier_stopped )attribute (identifier_wait) identifier_wait )attribute (argument_list (keyword_argument (identifier_timeout) identifier_timeout (attribute (identifier_defines) identifier_defines (identifier_EXCHANGE_LIFETIME) identifier_EXCHANGE_LIFETIME )attribute )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__messageLayer) identifier__messageLayer )attribute (identifier_purge) identifier_purge )attribute (argument_list )argument_list )call )expression_statement )block )while_statement )block )function_definition )module
Clean old transactions
(module (function_definition (function_name_delete) function_name_delete (parameters (identifier_self) identifier_self )parameters (block (expression_statement (augmented_assignment (attribute (attribute (identifier_self) identifier_self (identifier_bucket) identifier_bucket )attribute (identifier_size) identifier_size )attribute (attribute (identifier_self) identifier_self (identifier_size) identifier_size )attribute )augmented_assignment )expression_statement (expression_statement (call (attribute (call (attribute (identifier_Part) identifier_Part (identifier_query_by_multipart) identifier_query_by_multipart )attribute (argument_list (identifier_self) identifier_self )argument_list )call (identifier_delete) identifier_delete )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_query) identifier_query )attribute (identifier_filter_by) identifier_filter_by )attribute (argument_list (keyword_argument (identifier_upload_id) identifier_upload_id (attribute (identifier_self) identifier_self (identifier_upload_id) identifier_upload_id )attribute )keyword_argument )argument_list )call (identifier_delete) identifier_delete )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Delete a multipart object.
(module (function_definition (function_name_process_xml) function_name_process_xml (parameters (identifier_xml_str) identifier_xml_str )parameters (block (try_statement (block (expression_statement (assignment (identifier_tree) identifier_tree (call (attribute (identifier_ET) identifier_ET (identifier_XML) identifier_XML )attribute (argument_list (identifier_xml_str) identifier_xml_str (keyword_argument (identifier_parser) identifier_parser (call (identifier_UTB) identifier_UTB (argument_list )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (attribute (identifier_ET) identifier_ET (identifier_ParseError) identifier_ParseError )attribute (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (string_'Could not parse XML string') string_'Could not parse XML string' )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (identifier_e) identifier_e )argument_list )call )expression_statement (return_statement (None) None )return_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_sp) identifier_sp (call (identifier__process_elementtree) identifier__process_elementtree (argument_list (identifier_tree) identifier_tree )argument_list )call )assignment )expression_statement (return_statement (identifier_sp) identifier_sp )return_statement )block )function_definition )module
Return processor with Statements extracted from a Sparser XML. Parameters ---------- xml_str : str The XML string obtained by reading content with Sparser, using the 'xml' output mode. Returns ------- sp : SparserXMLProcessor A SparserXMLProcessor which has extracted Statements as its statements attribute.
(module (function_definition (function_name_deactivate) function_name_deactivate (parameters (identifier_cls) identifier_cls (typed_parameter (identifier_access_key) identifier_access_key (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (identifier_dict) identifier_dict )type (block (expression_statement (assignment (identifier_q) identifier_q (binary_operator (string_'mutation($access_key: String!, $input: ModifyKeyPairInput!) {') string_'mutation($access_key: String!, $input: ModifyKeyPairInput!) {' (concatenated_string (string_' modify_keypair(access_key: $access_key, props: $input) {') string_' modify_keypair(access_key: $access_key, props: $input) {' (string_' ok msg') string_' ok msg' (string_' }') string_' }' (string_'}') string_'}' )concatenated_string )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_variables) identifier_variables (dictionary (pair (string_'access_key') string_'access_key' (identifier_access_key) identifier_access_key )pair (pair (string_'input') string_'input' (dictionary (pair (string_'is_active') string_'is_active' (False) False )pair (pair (string_'is_admin') string_'is_admin' (None) None )pair (pair (string_'resource_policy') string_'resource_policy' (None) None )pair (pair (string_'rate_limit') string_'rate_limit' (None) None )pair )dictionary )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_rqst) identifier_rqst (call (identifier_Request) identifier_Request (argument_list (attribute (identifier_cls) identifier_cls (identifier_session) identifier_session )attribute (string_'POST') string_'POST' (string_'/admin/graphql') string_'/admin/graphql' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_rqst) identifier_rqst (identifier_set_json) identifier_set_json )attribute (argument_list (dictionary (pair (string_'query') string_'query' (identifier_q) identifier_q )pair (pair (string_'variables') string_'variables' (identifier_variables) identifier_variables )pair )dictionary )argument_list )call )expression_statement (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_rqst) identifier_rqst (identifier_fetch) identifier_fetch )attribute (argument_list )argument_list )call (as_pattern_target (identifier_resp) identifier_resp )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_data) identifier_data (await (call (attribute (identifier_resp) identifier_resp (identifier_json) identifier_json )attribute (argument_list )argument_list )call )await )assignment )expression_statement (return_statement (subscript (identifier_data) identifier_data (string_'modify_keypair') string_'modify_keypair' )subscript )return_statement )block )with_statement )block )function_definition )module
Deactivates this keypair. Deactivated keypairs cannot make any API requests unless activated again by an administrator. You need an admin privilege for this operation.
(module (function_definition (function_name_tween) function_name_tween (parameters (identifier_self) identifier_self (identifier_t) identifier_t )parameters (block (if_statement (comparison_operator (identifier_t) identifier_t (None) None )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_method) identifier_method )attribute (attribute (identifier_self) identifier_self (identifier_method_to_tween) identifier_method_to_tween )attribute )comparison_operator (block (return_statement (call (subscript (attribute (identifier_self) identifier_self (identifier_method_to_tween) identifier_method_to_tween )attribute (attribute (identifier_self) identifier_self (identifier_method) identifier_method )attribute )subscript (argument_list (identifier_t) identifier_t )argument_list )call )return_statement )block (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier_method) identifier_method )attribute (attribute (identifier_self) identifier_self (identifier_method_1param) identifier_method_1param )attribute )comparison_operator (block (return_statement (call (subscript (attribute (identifier_self) identifier_self (identifier_method_1param) identifier_method_1param )attribute (attribute (identifier_self) identifier_self (identifier_method) identifier_method )attribute )subscript (argument_list (identifier_t) identifier_t (attribute (identifier_self) identifier_self (identifier_param1) identifier_param1 )attribute )argument_list )call )return_statement )block )elif_clause (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier_method) identifier_method )attribute (attribute (identifier_self) identifier_self (identifier_method_2param) identifier_method_2param )attribute )comparison_operator (block (return_statement (call (subscript (attribute (identifier_self) identifier_self (identifier_method_2param) identifier_method_2param )attribute (attribute (identifier_self) identifier_self (identifier_method) identifier_method )attribute )subscript (argument_list (identifier_t) identifier_t (attribute (identifier_self) identifier_self (identifier_param1) identifier_param1 )attribute (attribute (identifier_self) identifier_self (identifier_param2) identifier_param2 )attribute )argument_list )call )return_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (call (attribute (string_"Unsupported tween method {0}") string_"Unsupported tween method {0}" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_method) identifier_method )attribute )argument_list )call )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
t is number between 0 and 1 to indicate how far the tween has progressed
(module (function_definition (function_name__get_prepped_model_field) function_name__get_prepped_model_field (parameters (identifier_model_obj) identifier_model_obj (identifier_field) identifier_field )parameters (block (expression_statement (assignment (identifier_field) identifier_field (call (attribute (attribute (identifier_model_obj) identifier_model_obj (identifier__meta) identifier__meta )attribute (identifier_get_field) identifier_get_field )attribute (argument_list (identifier_field) identifier_field )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_value) identifier_value (call (attribute (identifier_field) identifier_field (identifier_get_db_prep_save) identifier_get_db_prep_save )attribute (argument_list (call (identifier_getattr) identifier_getattr (argument_list (identifier_model_obj) identifier_model_obj (attribute (identifier_field) identifier_field (identifier_attname) identifier_attname )attribute )argument_list )call (identifier_connection) identifier_connection )argument_list )call )assignment )expression_statement (return_statement (identifier_value) identifier_value )return_statement )block )function_definition )module
Gets the value of a field of a model obj that is prepared for the db.