sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_make_id) function_name_make_id (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_url_id) identifier_url_id )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_url_id) identifier_url_id )attribute (call (identifier_select) identifier_select (argument_list (list (call (attribute (identifier_func) identifier_func (identifier_coalesce) identifier_coalesce )attribute (argument_list (call (attribute (identifier_func) identifier_func (identifier_max) identifier_max )attribute (argument_list (binary_operator (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier_url_id) identifier_url_id )attribute (integer_1) integer_1 )binary_operator )argument_list )call (integer_1) integer_1 )argument_list )call )list (comparison_operator (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier_parent) identifier_parent )attribute (attribute (identifier_self) identifier_self (identifier_parent) identifier_parent )attribute )comparison_operator )argument_list )call )assignment )expression_statement )block )if_statement )block )function_definition )module
Create a new URL id that is unique to the parent container
(module (function_definition (function_name_hideValue) function_name_hideValue (parameters (identifier_self) identifier_self (identifier_value) identifier_value )parameters (block (expression_statement (call (attribute (identifier_list) identifier_list (identifier_remove) identifier_remove )attribute (argument_list (identifier_self) identifier_self (identifier_value) identifier_value )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__hidden) identifier__hidden )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_value) identifier_value )argument_list )call )expression_statement )block )function_definition )module
Hide the given value from the domain After that call the given value won't be seen as a possible value on that domain anymore. The hidden value will be restored when the previous saved state is popped. @param value: Object currently available in the domain
(module (function_definition (function_name_unicoder) function_name_unicoder (parameters (identifier_p) identifier_p )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_p) identifier_p (identifier_unicode) identifier_unicode )argument_list )call (block (return_statement (identifier_p) identifier_p )return_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_p) identifier_p (identifier_str) identifier_str )argument_list )call (block (return_statement (call (identifier_decoder) identifier_decoder (argument_list (identifier_p) identifier_p )argument_list )call )return_statement )block (else_clause (block (return_statement (call (identifier_unicode) identifier_unicode (argument_list (call (identifier_decoder) identifier_decoder (argument_list (identifier_p) identifier_p )argument_list )call )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Make sure a Unicode string is returned
(module (function_definition (function_name__prepare_bam_file) function_name__prepare_bam_file (parameters (identifier_bam_file) identifier_bam_file (identifier_tmp_dir) identifier_tmp_dir (identifier_config) identifier_config )parameters (block (expression_statement (assignment (identifier_sort_mode) identifier_sort_mode (call (identifier__get_sort_order) identifier__get_sort_order (argument_list (identifier_bam_file) identifier_bam_file (identifier_config) identifier_config )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_sort_mode) identifier_sort_mode (string_"queryname") string_"queryname" )comparison_operator (block (expression_statement (assignment (identifier_bam_file) identifier_bam_file (call (identifier_sort) identifier_sort (argument_list (identifier_bam_file) identifier_bam_file (identifier_config) identifier_config (string_"queryname") string_"queryname" )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_bam_file) identifier_bam_file )return_statement )block )function_definition )module
Pipe sort by name cmd in case sort by coordinates
(module (function_definition (function_name_multipleOrderComparison) function_name_multipleOrderComparison (parameters (identifier_cls) identifier_cls (identifier_orders) identifier_orders )parameters (block (expression_statement (assignment (identifier_comparers) identifier_comparers (list_comprehension (tuple (attribute (identifier_o) identifier_o (identifier_keyfn) identifier_keyfn )attribute (conditional_expression (integer_1) integer_1 (call (attribute (identifier_o) identifier_o (identifier_isAscending) identifier_isAscending )attribute (argument_list )argument_list )call (unary_operator (integer_1) integer_1 )unary_operator )conditional_expression )tuple (for_in_clause (identifier_o) identifier_o (identifier_orders) identifier_orders )for_in_clause )list_comprehension )assignment )expression_statement (function_definition (function_name_cmpfn) function_name_cmpfn (parameters (identifier_a) identifier_a (identifier_b) identifier_b )parameters (block (for_statement (pattern_list (identifier_keyfn) identifier_keyfn (identifier_ascOrDesc) identifier_ascOrDesc )pattern_list (identifier_comparers) identifier_comparers (block (expression_statement (assignment (identifier_comparison) identifier_comparison (binary_operator (call (identifier_cmp) identifier_cmp (argument_list (call (identifier_keyfn) identifier_keyfn (argument_list (identifier_a) identifier_a )argument_list )call (call (identifier_keyfn) identifier_keyfn (argument_list (identifier_b) identifier_b )argument_list )call )argument_list )call (identifier_ascOrDesc) identifier_ascOrDesc )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_comparison) identifier_comparison (integer_0) integer_0 )comparison_operator (block (return_statement (identifier_comparison) identifier_comparison )return_statement )block )if_statement )block )for_statement (return_statement (integer_0) integer_0 )return_statement )block )function_definition (return_statement (identifier_cmpfn) identifier_cmpfn )return_statement )block )function_definition )module
Returns a function that will compare two items according to `orders`
(module (function_definition (function_name_list_tags) function_name_list_tags (parameters (identifier_self) identifier_self )parameters (block (import_from_statement (dotted_name (identifier_highton) identifier_highton (identifier_models) identifier_models (identifier_tag) identifier_tag )dotted_name (dotted_name (identifier_Tag) identifier_Tag )dotted_name )import_from_statement (return_statement (call (attribute (call (attribute (identifier_fields) identifier_fields (identifier_ListField) identifier_ListField )attribute (argument_list (keyword_argument (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier_ENDPOINT) identifier_ENDPOINT )attribute )keyword_argument (keyword_argument (identifier_init_class) identifier_init_class (identifier_Tag) identifier_Tag )keyword_argument )argument_list )call (identifier_decode) identifier_decode )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_element_from_string) identifier_element_from_string )attribute (argument_list (attribute (call (attribute (identifier_self) identifier_self (identifier__get_request) identifier__get_request )attribute (argument_list (keyword_argument (identifier_endpoint) identifier_endpoint (binary_operator (binary_operator (binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_ENDPOINT) identifier_ENDPOINT )attribute (string_'/') string_'/' )binary_operator (call (identifier_str) identifier_str (argument_list (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute )argument_list )call )binary_operator (string_'/') string_'/' )binary_operator (attribute (identifier_Tag) identifier_Tag (identifier_ENDPOINT) identifier_ENDPOINT )attribute )binary_operator )keyword_argument )argument_list )call (identifier_text) identifier_text )attribute )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Get the tags of current object :return: the tags :rtype: list
(module (function_definition (function_name_gotoHome) function_name_gotoHome (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_mode) identifier_mode (attribute (identifier_QTextCursor) identifier_QTextCursor (identifier_MoveAnchor) identifier_MoveAnchor )attribute )assignment )expression_statement (if_statement (comparison_operator (call (attribute (call (attribute (identifier_QApplication) identifier_QApplication (identifier_instance) identifier_instance )attribute (argument_list )argument_list )call (identifier_keyboardModifiers) identifier_keyboardModifiers )attribute (argument_list )argument_list )call (attribute (identifier_Qt) identifier_Qt (identifier_ShiftModifier) identifier_ShiftModifier )attribute )comparison_operator (block (expression_statement (assignment (identifier_mode) identifier_mode (attribute (identifier_QTextCursor) identifier_QTextCursor (identifier_KeepAnchor) identifier_KeepAnchor )attribute )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_cursor) identifier_cursor (call (attribute (identifier_self) identifier_self (identifier_textCursor) identifier_textCursor )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_block) identifier_block (call (attribute (attribute (identifier_projex) identifier_projex (identifier_text) identifier_text )attribute (identifier_nativestring) identifier_nativestring )attribute (argument_list (call (attribute (call (attribute (identifier_cursor) identifier_cursor (identifier_block) identifier_block )attribute (argument_list )argument_list )call (identifier_text) identifier_text )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_cursor) identifier_cursor (identifier_movePosition) identifier_movePosition )attribute (argument_list (attribute (identifier_QTextCursor) identifier_QTextCursor (identifier_StartOfBlock) identifier_StartOfBlock )attribute (identifier_mode) identifier_mode )argument_list )call )expression_statement (if_statement (call (attribute (identifier_block) identifier_block (identifier_startswith) identifier_startswith )attribute (argument_list (string_'>>> ') string_'>>> ' )argument_list )call (block (expression_statement (call (attribute (identifier_cursor) identifier_cursor (identifier_movePosition) identifier_movePosition )attribute (argument_list (attribute (identifier_QTextCursor) identifier_QTextCursor (identifier_Right) identifier_Right )attribute (identifier_mode) identifier_mode (integer_4) integer_4 )argument_list )call )expression_statement )block (elif_clause (call (attribute (identifier_block) identifier_block (identifier_startswith) identifier_startswith )attribute (argument_list (string_'... ') string_'... ' )argument_list )call (block (expression_statement (assignment (identifier_match) identifier_match (call (attribute (identifier_re) identifier_re (identifier_match) identifier_match )attribute (argument_list (string_'...\s*') string_'...\s*' (identifier_block) identifier_block )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_cursor) identifier_cursor (identifier_movePosition) identifier_movePosition )attribute (argument_list (attribute (identifier_QTextCursor) identifier_QTextCursor (identifier_Right) identifier_Right )attribute (identifier_mode) identifier_mode (call (attribute (identifier_match) identifier_match (identifier_end) identifier_end )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )elif_clause )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_setTextCursor) identifier_setTextCursor )attribute (argument_list (identifier_cursor) identifier_cursor )argument_list )call )expression_statement )block )function_definition )module
Navigates to the home position for the edit.
(module (function_definition (function_name_is_compliant) function_name_is_compliant (parameters (identifier_self) identifier_self (identifier_path) identifier_path )parameters (block (if_statement (not_operator (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 )not_operator (block (expression_statement (call (identifier_log) identifier_log (argument_list (binary_operator (string_'Path specified %s is not a directory.') string_'Path specified %s is not a directory.' (identifier_path) identifier_path )binary_operator (keyword_argument (identifier_level) identifier_level (identifier_ERROR) identifier_ERROR )keyword_argument )argument_list )call )expression_statement (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"%s is not a directory.") string_"%s is not a directory." (identifier_path) identifier_path )binary_operator )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_recursive) identifier_recursive )attribute )not_operator (block (return_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_DirectoryPermissionAudit) identifier_DirectoryPermissionAudit (identifier_self) identifier_self )argument_list )call (identifier_is_compliant) identifier_is_compliant )attribute (argument_list (identifier_path) identifier_path )argument_list )call )return_statement )block )if_statement (expression_statement (assignment (identifier_compliant) identifier_compliant (True) True )assignment )expression_statement (for_statement (pattern_list (identifier_root) identifier_root (identifier_dirs) identifier_dirs (identifier__) identifier__ )pattern_list (call (attribute (identifier_os) identifier_os (identifier_walk) identifier_walk )attribute (argument_list (identifier_path) identifier_path )argument_list )call (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_dirs) identifier_dirs )argument_list )call (integer_0) integer_0 )comparison_operator (block (continue_statement )continue_statement )block )if_statement (if_statement (not_operator (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_DirectoryPermissionAudit) identifier_DirectoryPermissionAudit (identifier_self) identifier_self )argument_list )call (identifier_is_compliant) identifier_is_compliant )attribute (argument_list (identifier_root) identifier_root )argument_list )call )not_operator (block (expression_statement (assignment (identifier_compliant) identifier_compliant (False) False )assignment )expression_statement (continue_statement )continue_statement )block )if_statement )block )for_statement (return_statement (identifier_compliant) identifier_compliant )return_statement )block )function_definition )module
Checks if the directory is compliant. Used to determine if the path specified and all of its children directories are in compliance with the check itself. :param path: the directory path to check :returns: True if the directory tree is compliant, otherwise False.
(module (function_definition (function_name_odt_to_ri) function_name_odt_to_ri (parameters (identifier_f) identifier_f (identifier_res) identifier_res (identifier_nm) identifier_nm )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (expression_statement (assignment (identifier_km) identifier_km (binary_operator (parenthesized_expression (binary_operator (binary_operator (integer_2) integer_2 (attribute (identifier_np) identifier_np (identifier_pi) identifier_pi )attribute )binary_operator (identifier_nm) identifier_nm )binary_operator )parenthesized_expression (identifier_res) identifier_res )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_ri) identifier_ri (binary_operator (identifier_nm) identifier_nm (call (attribute (identifier_np) identifier_np (identifier_sqrt) identifier_sqrt )attribute (argument_list (binary_operator (binary_operator (identifier_f) identifier_f (binary_operator (identifier_km) identifier_km (integer_2) integer_2 )binary_operator )binary_operator (integer_1) integer_1 )binary_operator )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_negrootcoord) identifier_negrootcoord (call (attribute (identifier_np) identifier_np (identifier_where) identifier_where )attribute (argument_list (comparison_operator (attribute (identifier_ri) identifier_ri (identifier_real) identifier_real )attribute (integer_0) integer_0 )comparison_operator )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (subscript (identifier_ri) identifier_ri (identifier_negrootcoord) identifier_negrootcoord )subscript (unary_operator (integer_1) integer_1 )unary_operator )augmented_assignment )expression_statement (return_statement (identifier_ri) identifier_ri )return_statement )block )function_definition )module
r"""Convert the ODT object function to refractive index In :abbr:`ODT (Optical Diffraction Tomography)`, the object function is defined by the Helmholtz equation .. math:: f(\mathbf{r}) = k_\mathrm{m}^2 \left[ \left( \frac{n(\mathbf{r})}{n_\mathrm{m}} \right)^2 - 1 \right] with :math:`k_\mathrm{m} = \frac{2\pi n_\mathrm{m}}{\lambda}`. By inverting this equation, we obtain the refractive index :math:`n(\mathbf{r})`. .. math:: n(\mathbf{r}) = n_\mathrm{m} \sqrt{\frac{f(\mathbf{r})}{k_\mathrm{m}^2} + 1 } Parameters ---------- f: n-dimensional ndarray The reconstructed object function :math:`f(\mathbf{r})`. res: float The size of the vacuum wave length :math:`\lambda` in pixels. nm: float The refractive index of the medium :math:`n_\mathrm{m}` that surrounds the object in :math:`f(\mathbf{r})`. Returns ------- ri: n-dimensional ndarray The complex refractive index :math:`n(\mathbf{r})`. Notes ----- Because this function computes the root of a complex number, there are several solutions to the refractive index. Always the positive (real) root of the refractive index is used.
(module (function_definition (function_name___ensure_suffix_stem) function_name___ensure_suffix_stem (parameters (identifier_t) identifier_t (identifier_suffix) identifier_suffix )parameters (block (expression_statement (assignment (identifier_tpath) identifier_tpath (call (identifier_str) identifier_str (argument_list (identifier_t) identifier_t )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (identifier_tpath) identifier_tpath (identifier_endswith) identifier_endswith )attribute (argument_list (identifier_suffix) identifier_suffix )argument_list )call )not_operator (block (expression_statement (assignment (identifier_stem) identifier_stem (identifier_tpath) identifier_tpath )assignment )expression_statement (expression_statement (augmented_assignment (identifier_tpath) identifier_tpath (identifier_suffix) identifier_suffix )augmented_assignment )expression_statement (return_statement (expression_list (identifier_tpath) identifier_tpath (identifier_stem) identifier_stem )expression_list )return_statement )block (else_clause (block (expression_statement (assignment (pattern_list (identifier_stem) identifier_stem (identifier_ext) identifier_ext )pattern_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_splitext) identifier_splitext )attribute (argument_list (identifier_tpath) identifier_tpath )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (expression_list (identifier_t) identifier_t (identifier_stem) identifier_stem )expression_list )return_statement )block )function_definition )module
Ensure that the target t has the given suffix, and return the file's stem.
(module (function_definition (function_name_query) function_name_query (parameters (identifier_cls) identifier_cls (typed_parameter (identifier_query) identifier_query (type (identifier_str) identifier_str )type )typed_parameter (typed_default_parameter (identifier_variables) identifier_variables (type (generic_type (identifier_Optional) identifier_Optional (type_parameter (type (generic_type (identifier_Mapping) identifier_Mapping (type_parameter (type (identifier_str) identifier_str )type (type (identifier_Any) identifier_Any )type )type_parameter )generic_type )type )type_parameter )generic_type )type (None) None )typed_default_parameter )parameters (type (identifier_Any) identifier_Any )type (block (expression_statement (assignment (identifier_gql_query) identifier_gql_query (dictionary (pair (string_'query') string_'query' (identifier_query) identifier_query )pair (pair (string_'variables') string_'variables' (conditional_expression (identifier_variables) identifier_variables (identifier_variables) identifier_variables (dictionary )dictionary )conditional_expression )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 (identifier_gql_query) identifier_gql_query )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 (return_statement (await (call (attribute (identifier_resp) identifier_resp (identifier_json) identifier_json )attribute (argument_list )argument_list )call )await )return_statement )block )with_statement )block )function_definition )module
Sends the GraphQL query and returns the response. :param query: The GraphQL query string. :param variables: An optional key-value dictionary to fill the interpolated template variables in the query. :returns: The object parsed from the response JSON string.
(module (function_definition (function_name_pprint) function_name_pprint (parameters (identifier_self) identifier_self (identifier_ind) identifier_ind )parameters (block (expression_statement (assignment (identifier_pp) identifier_pp (call (attribute (identifier_pprint) identifier_pprint (identifier_PrettyPrinter) identifier_PrettyPrinter )attribute (argument_list (keyword_argument (identifier_indent) identifier_indent (identifier_ind) identifier_ind )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_pp) identifier_pp (identifier_pprint) identifier_pprint )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_tree) identifier_tree )attribute )argument_list )call )expression_statement )block )function_definition )module
pretty prints the tree with indentation
(module (function_definition (function_name_song_play) function_name_song_play (parameters (identifier_self) identifier_self (identifier_song) identifier_song )parameters (block (if_statement (comparison_operator (string_'storeId') string_'storeId' (identifier_song) identifier_song )comparison_operator (block (expression_statement (assignment (identifier_song_id) identifier_song_id (subscript (identifier_song) identifier_song (string_'storeId') string_'storeId' )subscript )assignment )expression_statement )block (elif_clause (comparison_operator (string_'trackId') string_'trackId' (identifier_song) identifier_song )comparison_operator (block (expression_statement (assignment (identifier_song_id) identifier_song_id (subscript (identifier_song) identifier_song (string_'trackId') string_'trackId' )subscript )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_song_id) identifier_song_id (subscript (identifier_song) identifier_song (string_'id') string_'id' )subscript )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_song_duration) identifier_song_duration (subscript (identifier_song) identifier_song (string_'durationMillis') string_'durationMillis' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_event) identifier_event (call (attribute (attribute (identifier_mc_calls) identifier_mc_calls (identifier_ActivityRecordRealtime) identifier_ActivityRecordRealtime )attribute (identifier_play) identifier_play )attribute (argument_list (identifier_song_id) identifier_song_id (identifier_song_duration) identifier_song_duration )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_self) identifier_self (identifier__call) identifier__call )attribute (argument_list (attribute (identifier_mc_calls) identifier_mc_calls (identifier_ActivityRecordRealtime) identifier_ActivityRecordRealtime )attribute (identifier_event) identifier_event )argument_list )call )assignment )expression_statement (return_statement (conditional_expression (True) True (comparison_operator (subscript (subscript (subscript (attribute (identifier_response) identifier_response (identifier_body) identifier_body )attribute (string_'eventResults') string_'eventResults' )subscript (integer_0) integer_0 )subscript (string_'code') string_'code' )subscript (string_'OK') string_'OK' )comparison_operator (False) False )conditional_expression )return_statement )block )function_definition )module
Add play to song play count. Parameters: song (dict): A song dict. Returns: bool: ``True`` if successful, ``False`` if not.
(module (function_definition (function_name_get_item_name) function_name_get_item_name (parameters (identifier_self) identifier_self (identifier_item) identifier_item (identifier_parent) identifier_parent )parameters (block (expression_statement (assignment (identifier_names) identifier_names (call (attribute (identifier_self) identifier_self (identifier_get_name_elements) identifier_get_name_elements )attribute (argument_list (identifier_item) identifier_item )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_names) identifier_names )not_operator (block (raise_statement (identifier_MissingNameElementError) identifier_MissingNameElementError )raise_statement )block )if_statement (expression_statement (assignment (identifier_name) identifier_name (attribute (subscript (identifier_names) identifier_names (integer_0) integer_0 )subscript (identifier_text) identifier_text )attribute )assignment )expression_statement (expression_statement (assignment (identifier_prefix) identifier_prefix (call (attribute (identifier_self) identifier_self (identifier_item_name_prefix) identifier_item_name_prefix )attribute (argument_list (identifier_parent) identifier_parent )argument_list )call )assignment )expression_statement (if_statement (identifier_prefix) identifier_prefix (block (expression_statement (assignment (identifier_name) identifier_name (binary_operator (identifier_prefix) identifier_prefix (identifier_name) identifier_name )binary_operator )assignment )expression_statement )block )if_statement (return_statement (identifier_name) identifier_name )return_statement )block )function_definition )module
Returns the value of the first name element found inside of element
(module (function_definition (function_name_sunrise) function_name_sunrise (parameters (identifier_self) identifier_self (default_parameter (identifier_date) identifier_date (None) None )default_parameter (default_parameter (identifier_local) identifier_local (True) True )default_parameter (default_parameter (identifier_use_elevation) identifier_use_elevation (True) True )default_parameter )parameters (block (if_statement (boolean_operator (identifier_local) identifier_local (comparison_operator (attribute (identifier_self) identifier_self (identifier_timezone) identifier_timezone )attribute (None) None )comparison_operator )boolean_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"Local time requested but Location has no timezone set.") string_"Local time requested but Location has no timezone set." )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_astral) identifier_astral )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_astral) identifier_astral )attribute (call (identifier_Astral) identifier_Astral (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_date) identifier_date (None) None )comparison_operator (block (expression_statement (assignment (identifier_date) identifier_date (call (attribute (attribute (identifier_datetime) identifier_datetime (identifier_date) identifier_date )attribute (identifier_today) identifier_today )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_elevation) identifier_elevation (conditional_expression (attribute (identifier_self) identifier_self (identifier_elevation) identifier_elevation )attribute (identifier_use_elevation) identifier_use_elevation (integer_0) integer_0 )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_sunrise) identifier_sunrise (call (attribute (attribute (identifier_self) identifier_self (identifier_astral) identifier_astral )attribute (identifier_sunrise_utc) identifier_sunrise_utc )attribute (argument_list (identifier_date) identifier_date (attribute (identifier_self) identifier_self (identifier_latitude) identifier_latitude )attribute (attribute (identifier_self) identifier_self (identifier_longitude) identifier_longitude )attribute (identifier_elevation) identifier_elevation )argument_list )call )assignment )expression_statement (if_statement (identifier_local) identifier_local (block (return_statement (call (attribute (identifier_sunrise) identifier_sunrise (identifier_astimezone) identifier_astimezone )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_tz) identifier_tz )attribute )argument_list )call )return_statement )block (else_clause (block (return_statement (identifier_sunrise) identifier_sunrise )return_statement )block )else_clause )if_statement )block )function_definition )module
Return sunrise time. Calculates the time in the morning when the sun is a 0.833 degrees below the horizon. This is to account for refraction. :param date: The date for which to calculate the sunrise time. If no date is specified then the current date will be used. :type date: :class:`~datetime.date` :param local: True = Time to be returned in location's time zone; False = Time to be returned in UTC. If not specified then the time will be returned in local time :type local: bool :param use_elevation: True = Return times that allow for the location's elevation; False = Return times that don't use elevation. If not specified then times will take elevation into account. :type use_elevation: bool :returns: The date and time at which sunrise occurs. :rtype: :class:`~datetime.datetime`
(module (function_definition (function_name_disconnect_child) function_name_disconnect_child (parameters (identifier_self) identifier_self (identifier_sprite) identifier_sprite (list_splat_pattern (identifier_handlers) identifier_handlers )list_splat_pattern )parameters (block (expression_statement (assignment (identifier_handlers) identifier_handlers (boolean_operator (identifier_handlers) identifier_handlers (call (attribute (attribute (identifier_self) identifier_self (identifier__child_handlers) identifier__child_handlers )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_sprite) identifier_sprite (list )list )argument_list )call )boolean_operator )assignment )expression_statement (for_statement (identifier_handler) identifier_handler (call (identifier_list) identifier_list (argument_list (identifier_handlers) identifier_handlers )argument_list )call (block (if_statement (call (attribute (identifier_sprite) identifier_sprite (identifier_handler_is_connected) identifier_handler_is_connected )attribute (argument_list (identifier_handler) identifier_handler )argument_list )call (block (expression_statement (call (attribute (identifier_sprite) identifier_sprite (identifier_disconnect) identifier_disconnect )attribute (argument_list (identifier_handler) identifier_handler )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_handler) identifier_handler (call (attribute (attribute (identifier_self) identifier_self (identifier__child_handlers) identifier__child_handlers )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_sprite) identifier_sprite (list )list )argument_list )call )comparison_operator (block (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier__child_handlers) identifier__child_handlers )attribute (identifier_sprite) identifier_sprite )subscript (identifier_remove) identifier_remove )attribute (argument_list (identifier_handler) identifier_handler )argument_list )call )expression_statement )block )if_statement )block )for_statement (if_statement (not_operator (subscript (attribute (identifier_self) identifier_self (identifier__child_handlers) identifier__child_handlers )attribute (identifier_sprite) identifier_sprite )subscript )not_operator (block (delete_statement (subscript (attribute (identifier_self) identifier_self (identifier__child_handlers) identifier__child_handlers )attribute (identifier_sprite) identifier_sprite )subscript )delete_statement )block )if_statement )block )function_definition )module
disconnects from child event. if handler is not specified, will disconnect from all the child sprite events
(module (function_definition (function_name__put_bucket_logging) function_name__put_bucket_logging (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_logging_config) identifier_logging_config (dictionary )dictionary )assignment )expression_statement (if_statement (subscript (subscript (attribute (identifier_self) identifier_self (identifier_s3props) identifier_s3props )attribute (string_'logging') string_'logging' )subscript (string_'enabled') string_'enabled' )subscript (block (expression_statement (assignment (identifier_logging_config) identifier_logging_config (dictionary (pair (string_'LoggingEnabled') string_'LoggingEnabled' (dictionary (pair (string_'TargetBucket') string_'TargetBucket' (subscript (subscript (attribute (identifier_self) identifier_self (identifier_s3props) identifier_s3props )attribute (string_'logging') string_'logging' )subscript (string_'logging_bucket') string_'logging_bucket' )subscript )pair (pair (string_'TargetGrants') string_'TargetGrants' (subscript (subscript (attribute (identifier_self) identifier_self (identifier_s3props) identifier_s3props )attribute (string_'logging') string_'logging' )subscript (string_'logging_grants') string_'logging_grants' )subscript )pair (pair (string_'TargetPrefix') string_'TargetPrefix' (subscript (subscript (attribute (identifier_self) identifier_self (identifier_s3props) identifier_s3props )attribute (string_'logging') string_'logging' )subscript (string_'logging_bucket_prefix') string_'logging_bucket_prefix' )subscript )pair )dictionary )pair )dictionary )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier__response) identifier__response (call (attribute (attribute (identifier_self) identifier_self (identifier_s3client) identifier_s3client )attribute (identifier_put_bucket_logging) identifier_put_bucket_logging )attribute (argument_list (keyword_argument (identifier_Bucket) identifier_Bucket (attribute (identifier_self) identifier_self (identifier_bucket) identifier_bucket )attribute )keyword_argument (keyword_argument (identifier_BucketLoggingStatus) identifier_BucketLoggingStatus (identifier_logging_config) identifier_logging_config )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_debug) identifier_debug )attribute (argument_list (string_'Response setting up S3 logging: %s') string_'Response setting up S3 logging: %s' (identifier__response) identifier__response )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_info) identifier_info )attribute (argument_list (string_'S3 logging configuration updated') string_'S3 logging configuration updated' )argument_list )call )expression_statement )block )function_definition )module
Adds bucket logging policy to bucket for s3 access requests
(module (function_definition (function_name_bel_process_belrdf) function_name_bel_process_belrdf (parameters )parameters (block (if_statement (comparison_operator (attribute (identifier_request) identifier_request (identifier_method) identifier_method )attribute (string_'OPTIONS') string_'OPTIONS' )comparison_operator (block (return_statement (dictionary )dictionary )return_statement )block )if_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (call (attribute (attribute (identifier_request) identifier_request (identifier_body) identifier_body )attribute (identifier_read) identifier_read )attribute (argument_list )argument_list )call (identifier_decode) identifier_decode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_body) identifier_body (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (identifier_response) identifier_response )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_belrdf) identifier_belrdf (call (attribute (identifier_body) identifier_body (identifier_get) identifier_get )attribute (argument_list (string_'belrdf') string_'belrdf' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_bp) identifier_bp (call (attribute (identifier_bel) identifier_bel (identifier_process_belrdf) identifier_process_belrdf )attribute (argument_list (identifier_belrdf) identifier_belrdf )argument_list )call )assignment )expression_statement (return_statement (call (identifier__stmts_from_proc) identifier__stmts_from_proc (argument_list (identifier_bp) identifier_bp )argument_list )call )return_statement )block )function_definition )module
Process BEL RDF and return INDRA Statements.
(module (function_definition (function_name_resample_nn_1d) function_name_resample_nn_1d (parameters (identifier_a) identifier_a (identifier_centers) identifier_centers )parameters (block (expression_statement (assignment (identifier_ix) identifier_ix (list )list )assignment )expression_statement (for_statement (identifier_center) identifier_center (identifier_centers) identifier_centers (block (expression_statement (assignment (identifier_index) identifier_index (call (attribute (parenthesized_expression (call (attribute (identifier_np) identifier_np (identifier_abs) identifier_abs )attribute (argument_list (binary_operator (identifier_a) identifier_a (identifier_center) identifier_center )binary_operator )argument_list )call )parenthesized_expression (identifier_argmin) identifier_argmin )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_index) identifier_index (identifier_ix) identifier_ix )comparison_operator (block (expression_statement (call (attribute (identifier_ix) identifier_ix (identifier_append) identifier_append )attribute (argument_list (identifier_index) identifier_index )argument_list )call )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_ix) identifier_ix )return_statement )block )function_definition )module
Return one-dimensional nearest-neighbor indexes based on user-specified centers. Parameters ---------- a : array-like 1-dimensional array of numeric values from which to extract indexes of nearest-neighbors centers : array-like 1-dimensional array of numeric values representing a subset of values to approximate Returns ------- An array of indexes representing values closest to given array values
(module (function_definition (function_name_get_enabled) function_name_get_enabled (parameters )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_name) identifier_name (call (identifier__iter_service_names) identifier__iter_service_names (argument_list )argument_list )call (block (if_statement (call (identifier__service_is_upstart) identifier__service_is_upstart (argument_list (identifier_name) identifier_name )argument_list )call (block (if_statement (call (identifier__upstart_is_enabled) identifier__upstart_is_enabled (argument_list (identifier_name) identifier_name )argument_list )call (block (expression_statement (call (attribute (identifier_ret) identifier_ret (identifier_add) identifier_add )attribute (argument_list (identifier_name) identifier_name )argument_list )call )expression_statement )block )if_statement )block (else_clause (block (if_statement (call (identifier__service_is_sysv) identifier__service_is_sysv (argument_list (identifier_name) identifier_name )argument_list )call (block (if_statement (call (identifier__sysv_is_enabled) identifier__sysv_is_enabled (argument_list (identifier_name) identifier_name )argument_list )call (block (expression_statement (call (attribute (identifier_ret) identifier_ret (identifier_add) identifier_add )attribute (argument_list (identifier_name) identifier_name )argument_list )call )expression_statement )block )if_statement )block )if_statement )block )else_clause )if_statement )block )for_statement (return_statement (call (identifier_sorted) identifier_sorted (argument_list (identifier_ret) identifier_ret )argument_list )call )return_statement )block )function_definition )module
Return the enabled services CLI Example: .. code-block:: bash salt '*' service.get_enabled
(module (function_definition (function_name_image_list) function_name_image_list (parameters (default_parameter (identifier_list_aliases) identifier_list_aliases (False) False )default_parameter (default_parameter (identifier_remote_addr) identifier_remote_addr (None) None )default_parameter (default_parameter (identifier_cert) identifier_cert (None) None )default_parameter (default_parameter (identifier_key) identifier_key (None) None )default_parameter (default_parameter (identifier_verify_cert) identifier_verify_cert (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_client) identifier_client (call (identifier_pylxd_client_get) identifier_pylxd_client_get (argument_list (identifier_remote_addr) identifier_remote_addr (identifier_cert) identifier_cert (identifier_key) identifier_key (identifier_verify_cert) identifier_verify_cert )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_images) identifier_images (call (attribute (attribute (identifier_client) identifier_client (identifier_images) identifier_images )attribute (identifier_all) identifier_all )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (identifier_list_aliases) identifier_list_aliases (block (return_statement (dictionary_comprehension (pair (attribute (identifier_i) identifier_i (identifier_fingerprint) identifier_fingerprint )attribute (list_comprehension (subscript (identifier_a) identifier_a (string_'name') string_'name' )subscript (for_in_clause (identifier_a) identifier_a (attribute (identifier_i) identifier_i (identifier_aliases) identifier_aliases )attribute )for_in_clause )list_comprehension )pair (for_in_clause (identifier_i) identifier_i (identifier_images) identifier_images )for_in_clause )dictionary_comprehension )return_statement )block )if_statement (return_statement (call (identifier_map) identifier_map (argument_list (identifier__pylxd_model_to_dict) identifier__pylxd_model_to_dict (identifier_images) identifier_images )argument_list )call )return_statement )block )function_definition )module
Lists all images from the LXD. list_aliases : Return a dict with the fingerprint as key and a list of aliases as value instead. remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: https://myserver.lan:8443 /var/lib/mysocket.sock cert : PEM Formatted SSL Certificate. Examples: ~/.config/lxc/client.crt key : PEM Formatted SSL Key. Examples: ~/.config/lxc/client.key verify_cert : True Wherever to verify the cert, this is by default True but in the most cases you want to set it off as LXD normaly uses self-signed certificates. CLI Examples: .. code-block:: bash $ salt '*' lxd.image_list true --out=json $ salt '*' lxd.image_list --out=json
(module (function_definition (function_name_numberOfConnectedDistalSynapses) function_name_numberOfConnectedDistalSynapses (parameters (identifier_self) identifier_self (default_parameter (identifier_cells) identifier_cells (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_cells) identifier_cells (None) None )comparison_operator (block (expression_statement (assignment (identifier_cells) identifier_cells (call (identifier_xrange) identifier_xrange (argument_list (call (attribute (identifier_self) identifier_self (identifier_numberOfCells) identifier_numberOfCells )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_n) identifier_n (call (identifier__countWhereGreaterEqualInRows) identifier__countWhereGreaterEqualInRows (argument_list (attribute (identifier_self) identifier_self (identifier_internalDistalPermanences) identifier_internalDistalPermanences )attribute (identifier_cells) identifier_cells (attribute (identifier_self) identifier_self (identifier_connectedPermanenceDistal) identifier_connectedPermanenceDistal )attribute )argument_list )call )assignment )expression_statement (for_statement (identifier_permanences) identifier_permanences (attribute (identifier_self) identifier_self (identifier_distalPermanences) identifier_distalPermanences )attribute (block (expression_statement (augmented_assignment (identifier_n) identifier_n (call (identifier__countWhereGreaterEqualInRows) identifier__countWhereGreaterEqualInRows (argument_list (identifier_permanences) identifier_permanences (identifier_cells) identifier_cells (attribute (identifier_self) identifier_self (identifier_connectedPermanenceDistal) identifier_connectedPermanenceDistal )attribute )argument_list )call )augmented_assignment )expression_statement )block )for_statement (return_statement (identifier_n) identifier_n )return_statement )block )function_definition )module
Returns the number of connected distal synapses on these cells. Parameters: ---------------------------- @param cells (iterable) Indices of the cells. If None return count for all cells.
(module (function_definition (function_name_rollback) function_name_rollback (parameters (identifier_self) identifier_self (default_parameter (identifier_rb_id) identifier_rb_id (integer_1) integer_1 )default_parameter )parameters (block (expression_statement (assignment (identifier_rpc_command) identifier_rpc_command (call (attribute (string_'<Unlock/><Rollback><Previous>{rb_id}</Previous></Rollback><Lock/>') string_'<Unlock/><Rollback><Previous>{rb_id}</Previous></Rollback><Lock/>' (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_rb_id) identifier_rb_id (identifier_rb_id) identifier_rb_id )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__execute_rpc) identifier__execute_rpc )attribute (argument_list (identifier_rpc_command) identifier_rpc_command )argument_list )call )expression_statement )block )function_definition )module
Rollback the last committed configuration. :param rb_id: Rollback a specific number of steps. Default: 1
(module (function_definition (function_name__update_explicit_bucket_count) function_name__update_explicit_bucket_count (parameters (identifier_a_float) identifier_a_float (identifier_dist) identifier_dist )parameters (block (expression_statement (assignment (identifier_buckets) identifier_buckets (attribute (identifier_dist) identifier_dist (identifier_explicitBuckets) identifier_explicitBuckets )attribute )assignment )expression_statement (if_statement (comparison_operator (identifier_buckets) identifier_buckets (None) None )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (identifier__BAD_UNSET_BUCKETS) identifier__BAD_UNSET_BUCKETS (parenthesized_expression (string_u'explicit buckets') string_u'explicit buckets' )parenthesized_expression )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_bucket_counts) identifier_bucket_counts (attribute (identifier_dist) identifier_dist (identifier_bucketCounts) identifier_bucketCounts )attribute )assignment )expression_statement (expression_statement (assignment (identifier_bounds) identifier_bounds (attribute (identifier_buckets) identifier_buckets (identifier_bounds) identifier_bounds )attribute )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_bucket_counts) identifier_bucket_counts )argument_list )call (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_bounds) identifier_bounds )argument_list )call (integer_1) integer_1 )binary_operator )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (identifier__BAD_LOW_BUCKET_COUNT) identifier__BAD_LOW_BUCKET_COUNT )argument_list )call )raise_statement )block )if_statement (expression_statement (augmented_assignment (subscript (identifier_bucket_counts) identifier_bucket_counts (call (attribute (identifier_bisect) identifier_bisect (identifier_bisect) identifier_bisect )attribute (argument_list (identifier_bounds) identifier_bounds (identifier_a_float) identifier_a_float )argument_list )call )subscript (integer_1) integer_1 )augmented_assignment )expression_statement )block )function_definition )module
Adds `a_float` to `dist`, updating its explicit buckets. Args: a_float (float): a new value dist (:class:`endpoints_management.gen.servicecontrol_v1_messages.Distribution`): the Distribution being updated Raises: ValueError: if `dist` does not already have explict buckets defined ValueError: if there are not enough bucket count fields in `dist`
(module (function_definition (function_name_is_sw_writable) function_name_is_sw_writable (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_sw) identifier_sw (call (attribute (identifier_self) identifier_self (identifier_get_property) identifier_get_property )attribute (argument_list (string_'sw') string_'sw' )argument_list )call )assignment )expression_statement (return_statement (comparison_operator (identifier_sw) identifier_sw (tuple (attribute (attribute (identifier_rdltypes) identifier_rdltypes (identifier_AccessType) identifier_AccessType )attribute (identifier_rw) identifier_rw )attribute (attribute (attribute (identifier_rdltypes) identifier_rdltypes (identifier_AccessType) identifier_AccessType )attribute (identifier_rw1) identifier_rw1 )attribute (attribute (attribute (identifier_rdltypes) identifier_rdltypes (identifier_AccessType) identifier_AccessType )attribute (identifier_w) identifier_w )attribute (attribute (attribute (identifier_rdltypes) identifier_rdltypes (identifier_AccessType) identifier_AccessType )attribute (identifier_w1) identifier_w1 )attribute )tuple )comparison_operator )return_statement )block )function_definition )module
Field is writable by software
(module (function_definition (function_name_save) function_name_save (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_out) identifier_out (call (identifier_Outgest) identifier_Outgest (argument_list (attribute (identifier_self) identifier_self (identifier_output) identifier_output )attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_selection_array) identifier_selection_array )attribute (identifier_astype) identifier_astype )attribute (argument_list (string_'uint8') string_'uint8' )argument_list )call (attribute (identifier_self) identifier_self (identifier_headers) identifier_headers )attribute (attribute (identifier_self) identifier_self (identifier_config_path) identifier_config_path )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_out) identifier_out (identifier_save) identifier_save )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_out) identifier_out (identifier_upload) identifier_upload )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Save as a FITS file and attempt an upload if designated in the configuration file
(module (function_definition (function_name__daterange) function_name__daterange (parameters (identifier_self) identifier_self (identifier_recarr) identifier_recarr (identifier_date_range) identifier_date_range )parameters (block (expression_statement (assignment (identifier_idx) identifier_idx (call (attribute (identifier_self) identifier_self (identifier__datetime64_index) identifier__datetime64_index )attribute (argument_list (identifier_recarr) identifier_recarr )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_idx) identifier_idx (call (identifier_len) identifier_len (argument_list (identifier_recarr) identifier_recarr )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_dts) identifier_dts (subscript (identifier_recarr) identifier_recarr (identifier_idx) identifier_idx )subscript )assignment )expression_statement (expression_statement (assignment (identifier_mask) identifier_mask (call (identifier_Series) identifier_Series (argument_list (call (attribute (identifier_np) identifier_np (identifier_zeros) identifier_zeros )attribute (argument_list (call (identifier_len) identifier_len (argument_list (identifier_dts) identifier_dts )argument_list )call )argument_list )call (keyword_argument (identifier_index) identifier_index (identifier_dts) identifier_dts )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_start) identifier_start (identifier_end) identifier_end )pattern_list (call (identifier__start_end) identifier__start_end (argument_list (identifier_date_range) identifier_date_range (identifier_dts) identifier_dts )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_mask) identifier_mask (slice (identifier_start) identifier_start (colon) colon (identifier_end) identifier_end )slice )subscript (float_1.0) float_1.0 )assignment )expression_statement (return_statement (subscript (identifier_recarr) identifier_recarr (call (attribute (attribute (identifier_mask) identifier_mask (identifier_values) identifier_values )attribute (identifier_astype) identifier_astype )attribute (argument_list (identifier_bool) identifier_bool )argument_list )call )subscript )return_statement )block )if_statement (return_statement (identifier_recarr) identifier_recarr )return_statement )block )function_definition )module
Given a recarr, slice out the given artic.date.DateRange if a datetime64 index exists
(module (function_definition (function_name_apply) function_name_apply (parameters (identifier_self) identifier_self (identifier_func) identifier_func (default_parameter (identifier_args) identifier_args (tuple )tuple )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (call (attribute (identifier_kwargs) identifier_kwargs (identifier_pop) identifier_pop )attribute (argument_list (string_'shortcut') string_'shortcut' (None) None )argument_list )call )expression_statement (expression_statement (assignment (identifier_applied) identifier_applied (generator_expression (call (identifier_func) identifier_func (argument_list (identifier_ds) identifier_ds (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call (for_in_clause (identifier_ds) identifier_ds (call (attribute (identifier_self) identifier_self (identifier__iter_grouped) identifier__iter_grouped )attribute (argument_list )argument_list )call )for_in_clause )generator_expression )assignment )expression_statement (expression_statement (assignment (identifier_combined) identifier_combined (call (attribute (identifier_self) identifier_self (identifier__combine) identifier__combine )attribute (argument_list (identifier_applied) identifier_applied )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_combined) identifier_combined (identifier_rename) identifier_rename )attribute (argument_list (dictionary (pair (attribute (identifier_self) identifier_self (identifier__resample_dim) identifier__resample_dim )attribute (attribute (identifier_self) identifier_self (identifier__dim) identifier__dim )attribute )pair )dictionary )argument_list )call )return_statement )block )function_definition )module
Apply a function over each Dataset in the groups generated for resampling and concatenate them together into a new Dataset. `func` is called like `func(ds, *args, **kwargs)` for each dataset `ds` in this group. Apply uses heuristics (like `pandas.GroupBy.apply`) to figure out how to stack together the datasets. The rule is: 1. If the dimension along which the group coordinate is defined is still in the first grouped item after applying `func`, then stack over this dimension. 2. Otherwise, stack over the new dimension given by name of this grouping (the argument to the `groupby` function). Parameters ---------- func : function Callable to apply to each sub-dataset. args : tuple, optional Positional arguments passed on to `func`. **kwargs Used to call `func(ds, **kwargs)` for each sub-dataset `ar`. Returns ------- applied : Dataset or DataArray The result of splitting, applying and combining this dataset.
(module (function_definition (function_name_get_bin_version_str) function_name_get_bin_version_str (parameters (identifier_bin_path) identifier_bin_path (default_parameter (identifier_version_flag) identifier_version_flag (string_'-v') string_'-v' )default_parameter (default_parameter (identifier_kw) identifier_kw (dictionary )dictionary )default_parameter )parameters (block (try_statement (block (expression_statement (assignment (identifier_prog) identifier_prog (call (identifier__get_exec_binary) identifier__get_exec_binary (argument_list (identifier_bin_path) identifier_bin_path (identifier_kw) identifier_kw )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_version_str) identifier_version_str (subscript (call (attribute (call (attribute (identifier_version_expr) identifier_version_expr (identifier_search) identifier_search )attribute (argument_list (call (attribute (call (identifier_check_output) identifier_check_output (argument_list (list (identifier_prog) identifier_prog (identifier_version_flag) identifier_version_flag )list (dictionary_splat (identifier_kw) identifier_kw )dictionary_splat )argument_list )call (identifier_decode) identifier_decode )attribute (argument_list (identifier_locale) identifier_locale )argument_list )call )argument_list )call (identifier_groups) identifier_groups )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement )block (except_clause (identifier_OSError) identifier_OSError (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_warning) identifier_warning )attribute (argument_list (string_"failed to execute '%s'") string_"failed to execute '%s'" (identifier_bin_path) identifier_bin_path )argument_list )call )expression_statement (return_statement (None) None )return_statement )block )except_clause (except_clause (identifier_Exception) identifier_Exception (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_exception) identifier_exception )attribute (argument_list (concatenated_string (string_"encountered unexpected error while trying to find version of ") string_"encountered unexpected error while trying to find version of " (string_"'%s':") string_"'%s':" )concatenated_string (identifier_bin_path) identifier_bin_path )argument_list )call )expression_statement (return_statement (None) None )return_statement )block )except_clause )try_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (string_"'%s' is version '%s'") string_"'%s' is version '%s'" (identifier_bin_path) identifier_bin_path (identifier_version_str) identifier_version_str )argument_list )call )expression_statement (return_statement (identifier_version_str) identifier_version_str )return_statement )block )function_definition )module
Get the version string through the binary.
(module (function_definition (function_name__send_command) function_name__send_command (parameters (identifier_self) identifier_self (identifier_command) identifier_command (identifier_expected_bytes) identifier_expected_bytes )parameters (block (expression_statement (assignment (identifier_response) identifier_response (call (attribute (attribute (identifier_self) identifier_self (identifier_con) identifier_con )attribute (identifier_send_xid_command) identifier_send_xid_command )attribute (argument_list (identifier_command) identifier_command (identifier_expected_bytes) identifier_expected_bytes )argument_list )call )assignment )expression_statement (return_statement (identifier_response) identifier_response )return_statement )block )function_definition )module
Send an XID command to the device
(module (function_definition (function_name_shift_up_right) function_name_shift_up_right (parameters (identifier_self) identifier_self (default_parameter (identifier_times) identifier_times (integer_1) integer_1 )default_parameter )parameters (block (try_statement (block (return_statement (call (identifier_Location) identifier_Location (argument_list (binary_operator (attribute (identifier_self) identifier_self (identifier__rank) identifier__rank )attribute (identifier_times) identifier_times )binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier__file) identifier__file )attribute (identifier_times) identifier_times )binary_operator )argument_list )call )return_statement )block (except_clause (as_pattern (identifier_IndexError) identifier_IndexError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (raise_statement (call (identifier_IndexError) identifier_IndexError (argument_list (identifier_e) identifier_e )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Finds Location shifted up right by 1 :rtype: Location
(module (function_definition (function_name_read) function_name_read (parameters (identifier_self) identifier_self (default_parameter (identifier_entity) identifier_entity (None) None )default_parameter (default_parameter (identifier_attrs) identifier_attrs (None) None )default_parameter (default_parameter (identifier_ignore) identifier_ignore (None) None )default_parameter (default_parameter (identifier_params) identifier_params (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_attrs) identifier_attrs (None) None )comparison_operator (block (expression_statement (assignment (identifier_attrs) identifier_attrs (call (attribute (identifier_self) identifier_self (identifier_read_json) identifier_read_json )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (subscript (identifier_attrs) identifier_attrs (string_'search_') string_'search_' )subscript (call (attribute (identifier_attrs) identifier_attrs (identifier_pop) identifier_pop )attribute (argument_list (string_'search') string_'search' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_attr) identifier_attr (string_'max_count') string_'max_count' )assignment )expression_statement (if_statement (comparison_operator (identifier_ignore) identifier_ignore (None) None )comparison_operator (block (expression_statement (assignment (identifier_ignore) identifier_ignore (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_attr) identifier_attr (identifier_ignore) identifier_ignore )comparison_operator (block (expression_statement (assignment (subscript (identifier_attrs) identifier_attrs (identifier_attr) identifier_attr )subscript (subscript (call (attribute (call (identifier_DiscoveryRule) identifier_DiscoveryRule (argument_list (attribute (identifier_self) identifier_self (identifier__server_config) identifier__server_config )attribute (keyword_argument (identifier_id) identifier_id (subscript (identifier_attrs) identifier_attrs (string_'id') string_'id' )subscript )keyword_argument )argument_list )call (identifier_update_json) identifier_update_json )attribute (argument_list (list )list )argument_list )call (identifier_attr) identifier_attr )subscript )assignment )expression_statement )block )if_statement (return_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_DiscoveryRule) identifier_DiscoveryRule (identifier_self) identifier_self )argument_list )call (identifier_read) identifier_read )attribute (argument_list (identifier_entity) identifier_entity (identifier_attrs) identifier_attrs (identifier_ignore) identifier_ignore (identifier_params) identifier_params )argument_list )call )return_statement )block )function_definition )module
Work around a bug. Rename ``search`` to ``search_``. For more information on the bug, see `Bugzilla #1257255 <https://bugzilla.redhat.com/show_bug.cgi?id=1257255>`_.
(module (function_definition (function_name_installation) function_name_installation (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_locations) identifier_locations )attribute (list )list )assignment )expression_statement (expression_statement (assignment (identifier_url) identifier_url (parenthesized_expression (binary_operator (concatenated_string (string_"https://tccna.honeywell.com/WebAPI/emea/api/v1/location") string_"https://tccna.honeywell.com/WebAPI/emea/api/v1/location" (string_"/installationInfo?userId=%s") string_"/installationInfo?userId=%s" (string_"&includeTemperatureControlSystems=True") string_"&includeTemperatureControlSystems=True" )concatenated_string (subscript (attribute (identifier_self) identifier_self (identifier_account_info) identifier_account_info )attribute (string_'userId') string_'userId' )subscript )binary_operator )parenthesized_expression )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_requests) identifier_requests (identifier_get) identifier_get )attribute (argument_list (identifier_url) identifier_url (keyword_argument (identifier_headers) identifier_headers (call (attribute (identifier_self) identifier_self (identifier__headers) identifier__headers )attribute (argument_list )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_response) identifier_response (identifier_raise_for_status) identifier_raise_for_status )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_installation_info) identifier_installation_info )attribute (call (attribute (identifier_response) identifier_response (identifier_json) identifier_json )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_system_id) identifier_system_id )attribute (parenthesized_expression (subscript (subscript (subscript (subscript (subscript (subscript (attribute (identifier_self) identifier_self (identifier_installation_info) identifier_installation_info )attribute (integer_0) integer_0 )subscript (string_'gateways') string_'gateways' )subscript (integer_0) integer_0 )subscript (string_'temperatureControlSystems') string_'temperatureControlSystems' )subscript (integer_0) integer_0 )subscript (string_'systemId') string_'systemId' )subscript )parenthesized_expression )assignment )expression_statement (for_statement (identifier_loc_data) identifier_loc_data (attribute (identifier_self) identifier_self (identifier_installation_info) identifier_installation_info )attribute (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_locations) identifier_locations )attribute (identifier_append) identifier_append )attribute (argument_list (call (identifier_Location) identifier_Location (argument_list (identifier_self) identifier_self (identifier_loc_data) identifier_loc_data )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (attribute (identifier_self) identifier_self (identifier_installation_info) identifier_installation_info )attribute )return_statement )block )function_definition )module
Return the details of the installation.
(module (function_definition (function_name_show_pageitems) function_name_show_pageitems (parameters (identifier__) identifier__ (identifier_token) identifier_token )parameters (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (call (attribute (attribute (identifier_token) identifier_token (identifier_contents) identifier_contents )attribute (identifier_split) identifier_split )attribute (argument_list )argument_list )call )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_msg) identifier_msg (binary_operator (string_'%r tag takes no arguments') string_'%r tag takes no arguments' (subscript (call (attribute (attribute (identifier_token) identifier_token (identifier_contents) identifier_contents )attribute (identifier_split) identifier_split )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript )binary_operator )assignment )expression_statement (raise_statement (call (attribute (identifier_template) identifier_template (identifier_TemplateSyntaxError) identifier_TemplateSyntaxError )attribute (argument_list (identifier_msg) identifier_msg )argument_list )call )raise_statement )block )if_statement (return_statement (call (identifier_ShowPageItemsNode) identifier_ShowPageItemsNode (argument_list )argument_list )call )return_statement )block )function_definition )module
Show page items. Usage: .. code-block:: html+django {% show_pageitems per_page %}
(module (function_definition (function_name_is_dataset) function_name_is_dataset (parameters (identifier_ds) identifier_ds )parameters (block (import_statement (aliased_import (dotted_name (identifier_tensorflow) identifier_tensorflow )dotted_name (identifier_tf) identifier_tf )aliased_import )import_statement (import_from_statement (dotted_name (identifier_tensorflow_datasets) identifier_tensorflow_datasets (identifier_core) identifier_core (identifier_utils) identifier_utils )dotted_name (dotted_name (identifier_py_utils) identifier_py_utils )dotted_name )import_from_statement (expression_statement (assignment (identifier_dataset_types) identifier_dataset_types (list (attribute (attribute (identifier_tf) identifier_tf (identifier_data) identifier_data )attribute (identifier_Dataset) identifier_Dataset )attribute )list )assignment )expression_statement (expression_statement (assignment (identifier_v1_ds) identifier_v1_ds (call (attribute (identifier_py_utils) identifier_py_utils (identifier_rgetattr) identifier_rgetattr )attribute (argument_list (identifier_tf) identifier_tf (string_"compat.v1.data.Dataset") string_"compat.v1.data.Dataset" (None) None )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_v2_ds) identifier_v2_ds (call (attribute (identifier_py_utils) identifier_py_utils (identifier_rgetattr) identifier_rgetattr )attribute (argument_list (identifier_tf) identifier_tf (string_"compat.v2.data.Dataset") string_"compat.v2.data.Dataset" (None) None )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_v1_ds) identifier_v1_ds (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_dataset_types) identifier_dataset_types (identifier_append) identifier_append )attribute (argument_list (identifier_v1_ds) identifier_v1_ds )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_v2_ds) identifier_v2_ds (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_dataset_types) identifier_dataset_types (identifier_append) identifier_append )attribute (argument_list (identifier_v2_ds) identifier_v2_ds )argument_list )call )expression_statement )block )if_statement (return_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_ds) identifier_ds (call (identifier_tuple) identifier_tuple (argument_list (identifier_dataset_types) identifier_dataset_types )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Whether ds is a Dataset. Compatible across TF versions.
(module (function_definition (function_name__construct_location_stack_entry) function_name__construct_location_stack_entry (parameters (identifier_location) identifier_location (identifier_num_traverses) identifier_num_traverses )parameters (block (if_statement (boolean_operator (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_num_traverses) identifier_num_traverses (identifier_int) identifier_int )argument_list )call )not_operator (comparison_operator (identifier_num_traverses) identifier_num_traverses (integer_0) integer_0 )comparison_operator )boolean_operator (block (raise_statement (call (identifier_AssertionError) identifier_AssertionError (argument_list (call (attribute (concatenated_string (string_u'Attempted to create a LocationStackEntry namedtuple with an invalid ') string_u'Attempted to create a LocationStackEntry namedtuple with an invalid ' (string_u'value for "num_traverses" {}. This is not allowed.') string_u'value for "num_traverses" {}. This is not allowed.' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_num_traverses) identifier_num_traverses )argument_list )call )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_location) identifier_location (identifier_Location) identifier_Location )argument_list )call )not_operator (block (raise_statement (call (identifier_AssertionError) identifier_AssertionError (argument_list (call (attribute (concatenated_string (string_u'Attempted to create a LocationStackEntry namedtuple with an invalid ') string_u'Attempted to create a LocationStackEntry namedtuple with an invalid ' (string_u'value for "location" {}. This is not allowed.') string_u'value for "location" {}. This is not allowed.' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_location) identifier_location )argument_list )call )argument_list )call )raise_statement )block )if_statement (return_statement (call (identifier_LocationStackEntry) identifier_LocationStackEntry (argument_list (keyword_argument (identifier_location) identifier_location (identifier_location) identifier_location )keyword_argument (keyword_argument (identifier_num_traverses) identifier_num_traverses (identifier_num_traverses) identifier_num_traverses )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return a LocationStackEntry namedtuple with the specified parameters.
(module (function_definition (function_name_rrtmg_lw_gen_source) function_name_rrtmg_lw_gen_source (parameters (identifier_ext) identifier_ext (identifier_build_dir) identifier_build_dir )parameters (block (expression_statement (assignment (identifier_thispath) identifier_thispath (attribute (identifier_config) identifier_config (identifier_local_path) identifier_local_path )attribute )assignment )expression_statement (expression_statement (assignment (identifier_module_src) identifier_module_src (list )list )assignment )expression_statement (for_statement (identifier_item) identifier_item (identifier_modules) identifier_modules (block (expression_statement (assignment (identifier_fullname) identifier_fullname (call (identifier_join) identifier_join (argument_list (identifier_thispath) identifier_thispath (string_'rrtmg_lw_v4.85') string_'rrtmg_lw_v4.85' (string_'gcm_model') string_'gcm_model' (string_'modules') string_'modules' (identifier_item) identifier_item )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_module_src) identifier_module_src (identifier_append) identifier_append )attribute (argument_list (identifier_fullname) identifier_fullname )argument_list )call )expression_statement )block )for_statement (for_statement (identifier_item) identifier_item (identifier_src) identifier_src (block (if_statement (comparison_operator (identifier_item) identifier_item (identifier_mod_src) identifier_mod_src )comparison_operator (block (expression_statement (assignment (identifier_fullname) identifier_fullname (call (identifier_join) identifier_join (argument_list (identifier_thispath) identifier_thispath (string_'sourcemods') string_'sourcemods' (identifier_item) identifier_item )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_fullname) identifier_fullname (call (identifier_join) identifier_join (argument_list (identifier_thispath) identifier_thispath (string_'rrtmg_lw_v4.85') string_'rrtmg_lw_v4.85' (string_'gcm_model') string_'gcm_model' (string_'src') string_'src' (identifier_item) identifier_item )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_module_src) identifier_module_src (identifier_append) identifier_append )attribute (argument_list (identifier_fullname) identifier_fullname )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier_sourcelist) identifier_sourcelist (list (call (identifier_join) identifier_join (argument_list (identifier_thispath) identifier_thispath (string_'_rrtmg_lw.pyf') string_'_rrtmg_lw.pyf' )argument_list )call (call (identifier_join) identifier_join (argument_list (identifier_thispath) identifier_thispath (string_'Driver.f90') string_'Driver.f90' )argument_list )call )list )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_config) identifier_config (identifier_have_f90c) identifier_have_f90c )attribute (argument_list )argument_list )call )expression_statement (return_statement (binary_operator (identifier_module_src) identifier_module_src (identifier_sourcelist) identifier_sourcelist )binary_operator )return_statement )block (except_clause (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_'No Fortran 90 compiler found, not building RRTMG_LW extension!') string_'No Fortran 90 compiler found, not building RRTMG_LW extension!' )argument_list )call )expression_statement (return_statement (None) None )return_statement )block )except_clause )try_statement )block )function_definition )module
Add RRTMG_LW fortran source if Fortran 90 compiler available, if no compiler is found do not try to build the extension.
(module (function_definition (function_name_open_url) function_name_open_url (parameters (identifier_url) identifier_url (default_parameter (identifier_retries) identifier_retries (integer_0) integer_0 )default_parameter (default_parameter (identifier_sleep) identifier_sleep (float_0.5) float_0.5 )default_parameter )parameters (block (return_statement (call (identifier_open_conn) identifier_open_conn (argument_list (keyword_argument (identifier_retries) identifier_retries (identifier_retries) identifier_retries )keyword_argument (keyword_argument (identifier_sleep) identifier_sleep (identifier_sleep) identifier_sleep )keyword_argument (dictionary_splat (call (identifier_parse_url) identifier_parse_url (argument_list (identifier_url) identifier_url )argument_list )call )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Open a mysql connection to a url. Note that if your password has punctuation characters, it might break the parsing of url. url: A string in the form "mysql://username:password@host.domain/database"
(module (function_definition (function_name_client_secrets) function_name_client_secrets (parameters (identifier_cls) identifier_cls (identifier_client_id) identifier_client_id )parameters (block (expression_statement (assignment (identifier_secrets) identifier_secrets (yield (call (attribute (attribute (identifier_cls) identifier_cls (identifier_view) identifier_view )attribute (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier_key) identifier_key (identifier_client_id) identifier_client_id )keyword_argument (keyword_argument (identifier_include_docs) identifier_include_docs (True) True )keyword_argument )argument_list )call )yield )assignment )expression_statement (raise_statement (call (identifier_Return) identifier_Return (argument_list (list_comprehension (call (identifier_cls) identifier_cls (argument_list (dictionary_splat (subscript (identifier_secret) identifier_secret (string_'doc') string_'doc' )subscript )dictionary_splat )argument_list )call (for_in_clause (identifier_secret) identifier_secret (subscript (identifier_secrets) identifier_secrets (string_'rows') string_'rows' )subscript )for_in_clause )list_comprehension )argument_list )call )raise_statement )block )function_definition )module
Get the client's secrets using the client_id :param client_id: the client ID, e.g. a service ID :returns: list OAuthSecret instances
(module (function_definition (function_name_add_key) function_name_add_key (parameters (identifier_self) identifier_self (identifier_attributes) identifier_attributes (identifier_store_key) identifier_store_key )parameters (block (expression_statement (assignment (identifier_undefined) identifier_undefined (False) False )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_value) identifier_value (call (attribute (identifier_self) identifier_self (identifier_get_value) identifier_get_value )attribute (argument_list (identifier_attributes) identifier_attributes )argument_list )call )assignment )expression_statement )block (except_clause (tuple (identifier_KeyError) identifier_KeyError (identifier_IndexError) identifier_IndexError )tuple (block (expression_statement (assignment (identifier_undefined) identifier_undefined (True) True )assignment )expression_statement )block )except_clause )try_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_remove_key) identifier_remove_key )attribute (argument_list (identifier_store_key) identifier_store_key )argument_list )call )expression_statement (if_statement (not_operator (identifier_undefined) identifier_undefined )not_operator (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (tuple (identifier_list) identifier_list (identifier_tuple) identifier_tuple )tuple )argument_list )call (block (expression_statement (assignment (identifier_values) identifier_values (identifier_value) identifier_value )assignment )expression_statement (expression_statement (assignment (identifier_hash_value) identifier_hash_value (call (attribute (identifier_self) identifier_self (identifier_get_hash_for) identifier_get_hash_for )attribute (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add_hashed_value) identifier_add_hashed_value )attribute (argument_list (identifier_hash_value) identifier_hash_value (identifier_store_key) identifier_store_key )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_values) identifier_values (list (identifier_value) identifier_value )list )assignment )expression_statement )block )else_clause )if_statement (for_statement (identifier_value) identifier_value (identifier_values) identifier_values (block (expression_statement (assignment (identifier_hash_value) identifier_hash_value (call (attribute (identifier_self) identifier_self (identifier_get_hash_for) identifier_get_hash_for )attribute (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add_hashed_value) identifier_add_hashed_value )attribute (argument_list (identifier_hash_value) identifier_hash_value (identifier_store_key) identifier_store_key )argument_list )call )expression_statement )block )for_statement )block (else_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add_undefined) identifier_add_undefined )attribute (argument_list (identifier_store_key) identifier_store_key )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Add key to the index. :param attributes: Attributes to be added to the index :type attributes: dict(str) :param store_key: The key for the document in the store :type store_key: str
(module (function_definition (function_name_versions) function_name_versions (parameters (default_parameter (identifier_runas) identifier_runas (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (call (identifier__rbenv_exec) identifier__rbenv_exec (argument_list (list (string_'versions') string_'versions' (string_'--bare') string_'--bare' )list (keyword_argument (identifier_runas) identifier_runas (identifier_runas) identifier_runas )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (conditional_expression (list )list (comparison_operator (identifier_ret) identifier_ret (False) False )comparison_operator (call (attribute (identifier_ret) identifier_ret (identifier_splitlines) identifier_splitlines )attribute (argument_list )argument_list )call )conditional_expression )return_statement )block )function_definition )module
List the installed versions of ruby CLI Example: .. code-block:: bash salt '*' rbenv.versions
(module (function_definition (function_name_overlay_class_names) function_name_overlay_class_names (parameters (identifier_self) identifier_self (identifier_image) identifier_image (identifier_predictions) identifier_predictions )parameters (block (expression_statement (assignment (identifier_scores) identifier_scores (call (attribute (call (attribute (identifier_predictions) identifier_predictions (identifier_get_field) identifier_get_field )attribute (argument_list (string_"scores") string_"scores" )argument_list )call (identifier_tolist) identifier_tolist )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_labels) identifier_labels (call (attribute (call (attribute (identifier_predictions) identifier_predictions (identifier_get_field) identifier_get_field )attribute (argument_list (string_"labels") string_"labels" )argument_list )call (identifier_tolist) identifier_tolist )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_labels) identifier_labels (list_comprehension (subscript (attribute (identifier_self) identifier_self (identifier_CATEGORIES) identifier_CATEGORIES )attribute (identifier_i) identifier_i )subscript (for_in_clause (identifier_i) identifier_i (identifier_labels) identifier_labels )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_boxes) identifier_boxes (attribute (identifier_predictions) identifier_predictions (identifier_bbox) identifier_bbox )attribute )assignment )expression_statement (expression_statement (assignment (identifier_template) identifier_template (string_"{}: {:.2f}") string_"{}: {:.2f}" )assignment )expression_statement (for_statement (pattern_list (identifier_box) identifier_box (identifier_score) identifier_score (identifier_label) identifier_label )pattern_list (call (identifier_zip) identifier_zip (argument_list (identifier_boxes) identifier_boxes (identifier_scores) identifier_scores (identifier_labels) identifier_labels )argument_list )call (block (expression_statement (assignment (pattern_list (identifier_x) identifier_x (identifier_y) identifier_y )pattern_list (subscript (identifier_box) identifier_box (slice (colon) colon (integer_2) integer_2 )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_s) identifier_s (call (attribute (identifier_template) identifier_template (identifier_format) identifier_format )attribute (argument_list (identifier_label) identifier_label (identifier_score) identifier_score )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_cv2) identifier_cv2 (identifier_putText) identifier_putText )attribute (argument_list (identifier_image) identifier_image (identifier_s) identifier_s (tuple (identifier_x) identifier_x (identifier_y) identifier_y )tuple (attribute (identifier_cv2) identifier_cv2 (identifier_FONT_HERSHEY_SIMPLEX) identifier_FONT_HERSHEY_SIMPLEX )attribute (float_.5) float_.5 (tuple (integer_255) integer_255 (integer_255) integer_255 (integer_255) integer_255 )tuple (integer_1) integer_1 )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_image) identifier_image )return_statement )block )function_definition )module
Adds detected class names and scores in the positions defined by the top-left corner of the predicted bounding box Arguments: image (np.ndarray): an image as returned by OpenCV predictions (BoxList): the result of the computation by the model. It should contain the field `scores` and `labels`.
(module (function_definition (function_name_delete) function_name_delete (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_refresh_handle) identifier_refresh_handle )attribute (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_refresh_handle) identifier_refresh_handle )attribute (identifier_cancel) identifier_cancel )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_refresh_handle) identifier_refresh_handle )attribute (None) None )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_request) identifier_request (call (attribute (identifier_stun) identifier_stun (identifier_Message) identifier_Message )attribute (argument_list (keyword_argument (identifier_message_method) identifier_message_method (attribute (attribute (identifier_stun) identifier_stun (identifier_Method) identifier_Method )attribute (identifier_REFRESH) identifier_REFRESH )attribute )keyword_argument (keyword_argument (identifier_message_class) identifier_message_class (attribute (attribute (identifier_stun) identifier_stun (identifier_Class) identifier_Class )attribute (identifier_REQUEST) identifier_REQUEST )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_request) identifier_request (identifier_attributes) identifier_attributes )attribute (string_'LIFETIME') string_'LIFETIME' )subscript (integer_0) integer_0 )assignment )expression_statement (expression_statement (await (call (attribute (identifier_self) identifier_self (identifier_request) identifier_request )attribute (argument_list (identifier_request) identifier_request )argument_list )call )await )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (string_'TURN allocation deleted %s') string_'TURN allocation deleted %s' (attribute (identifier_self) identifier_self (identifier_relayed_address) identifier_relayed_address )attribute )argument_list )call )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_receiver) identifier_receiver )attribute (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_receiver) identifier_receiver )attribute (identifier_connection_lost) identifier_connection_lost )attribute (argument_list (None) None )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Delete the TURN allocation.
(module (function_definition (function_name_update) function_name_update (parameters (identifier_self) identifier_self (identifier_table_name) identifier_table_name (identifier_set_query) identifier_set_query (default_parameter (identifier_where) identifier_where (None) None )default_parameter )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_validate_access_permission) identifier_validate_access_permission )attribute (argument_list (list (string_"w") string_"w" (string_"a") string_"a" )list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_verify_table_existence) identifier_verify_table_existence )attribute (argument_list (identifier_table_name) identifier_table_name )argument_list )call )expression_statement (expression_statement (assignment (identifier_query) identifier_query (call (attribute (identifier_SqlQuery) identifier_SqlQuery (identifier_make_update) identifier_make_update )attribute (argument_list (identifier_table_name) identifier_table_name (identifier_set_query) identifier_set_query (identifier_where) identifier_where )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_execute_query) identifier_execute_query )attribute (argument_list (identifier_query) identifier_query (call (attribute (call (attribute (identifier_logging) identifier_logging (identifier_getLogger) identifier_getLogger )attribute (argument_list )argument_list )call (identifier_findCaller) identifier_findCaller )attribute (argument_list )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Execute an UPDATE query. Args: table_name (|str|): Table name of executing the query. set_query (|str|): ``SET`` clause for the update query. where (|arg_where_type| , optional): ``WHERE`` clause for the update query. Defaults to |None|. Raises: IOError: |raises_write_permission| simplesqlite.NullDatabaseConnectionError: |raises_check_connection| simplesqlite.TableNotFoundError: |raises_verify_table_existence| simplesqlite.OperationalError: |raises_operational_error|
(module (function_definition (function_name_query) function_name_query (parameters (identifier_self) identifier_self (identifier_string) identifier_string (default_parameter (identifier_repeat_n_times) identifier_repeat_n_times (None) None )default_parameter )parameters (block (if_statement (not_operator (identifier_repeat_n_times) identifier_repeat_n_times )not_operator (block (expression_statement (assignment (identifier_repeat_n_times) identifier_repeat_n_times (call (attribute (identifier_self) identifier_self (identifier___determine_how_many_times_to_repeat_query) identifier___determine_how_many_times_to_repeat_query )attribute (argument_list (identifier_string) identifier_string )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_lines) identifier_lines (call (attribute (identifier_self) identifier_self (identifier___get_command_lines) identifier___get_command_lines )attribute (argument_list (identifier_string) identifier_string )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_return_list) identifier_return_list (list )list )assignment )expression_statement (for_statement (identifier_line) identifier_line (identifier_lines) identifier_lines (block (expression_statement (assignment (identifier_lst) identifier_lst (call (attribute (identifier_self) identifier_self (identifier___query_n_times) identifier___query_n_times )attribute (argument_list (identifier_line) identifier_line (identifier_repeat_n_times) identifier_repeat_n_times )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_lst) identifier_lst (subscript (identifier_lst) identifier_lst (integer_0) integer_0 )subscript )boolean_operator (block (expression_statement (assignment (identifier_return_list) identifier_return_list (identifier_lst) identifier_lst )assignment )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_return_list) identifier_return_list )return_statement )block )function_definition )module
This method performs the operations onto self.g :param string: The list of operations to perform. The sequences of commands should be separated by a semicolon An example might be CREATE {'tag': 'PERSON', 'text': 'joseph'}(v1), {'relation': 'LIVES_AT'}(v1,v2), {'tag': 'PLACE', 'text': 'London'}(v2) MATCH {}(_a), {'relation': 'LIVES_AT'}(_a,_b), {}(_b) WHERE (= (get _a "text") "joseph") RETURN _a,_b; :param repeat_n_times: The maximum number of times the graph is queried. It sets the maximum length of the return list. If None then the value is set by the function self.__determine_how_many_times_to_repeat_query(string) :return: If the RETURN command is called with a list of variables names, a list of JSON with the corresponding properties is returned. If the RETURN command is used alone, a list with the entire graph is returned. Otherwise it returns an empty list
(module (function_definition (function_name_set_user_perm) function_name_set_user_perm (parameters (identifier_obj) identifier_obj (identifier_perm) identifier_perm (identifier_sid) identifier_sid )parameters (block (expression_statement (assignment (identifier_info) identifier_info (parenthesized_expression (binary_operator (binary_operator (attribute (identifier_win32security) identifier_win32security (identifier_OWNER_SECURITY_INFORMATION) identifier_OWNER_SECURITY_INFORMATION )attribute (attribute (identifier_win32security) identifier_win32security (identifier_GROUP_SECURITY_INFORMATION) identifier_GROUP_SECURITY_INFORMATION )attribute )binary_operator (attribute (identifier_win32security) identifier_win32security (identifier_DACL_SECURITY_INFORMATION) identifier_DACL_SECURITY_INFORMATION )attribute )binary_operator )parenthesized_expression )assignment )expression_statement (expression_statement (assignment (identifier_sd) identifier_sd (call (attribute (identifier_win32security) identifier_win32security (identifier_GetUserObjectSecurity) identifier_GetUserObjectSecurity )attribute (argument_list (identifier_obj) identifier_obj (identifier_info) identifier_info )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_dacl) identifier_dacl (call (attribute (identifier_sd) identifier_sd (identifier_GetSecurityDescriptorDacl) identifier_GetSecurityDescriptorDacl )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ace_cnt) identifier_ace_cnt (call (attribute (identifier_dacl) identifier_dacl (identifier_GetAceCount) identifier_GetAceCount )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_found) identifier_found (False) False )assignment )expression_statement (for_statement (identifier_idx) identifier_idx (call (identifier_range) identifier_range (argument_list (integer_0) integer_0 (identifier_ace_cnt) identifier_ace_cnt )argument_list )call (block (expression_statement (assignment (pattern_list (tuple_pattern (identifier_aceType) identifier_aceType (identifier_aceFlags) identifier_aceFlags )tuple_pattern (identifier_ace_mask) identifier_ace_mask (identifier_ace_sid) identifier_ace_sid )pattern_list (call (attribute (identifier_dacl) identifier_dacl (identifier_GetAce) identifier_GetAce )attribute (argument_list (identifier_idx) identifier_idx )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ace_exists) identifier_ace_exists (parenthesized_expression (boolean_operator (boolean_operator (comparison_operator (identifier_aceType) identifier_aceType (attribute (identifier_ntsecuritycon) identifier_ntsecuritycon (identifier_ACCESS_ALLOWED_ACE_TYPE) identifier_ACCESS_ALLOWED_ACE_TYPE )attribute )comparison_operator (comparison_operator (identifier_ace_mask) identifier_ace_mask (identifier_perm) identifier_perm )comparison_operator )boolean_operator (comparison_operator (identifier_ace_sid) identifier_ace_sid (identifier_sid) identifier_sid )comparison_operator )boolean_operator )parenthesized_expression )assignment )expression_statement (if_statement (identifier_ace_exists) identifier_ace_exists (block (break_statement )break_statement )block )if_statement )block (else_clause (block (expression_statement (call (attribute (identifier_dacl) identifier_dacl (identifier_AddAccessAllowedAce) identifier_AddAccessAllowedAce )attribute (argument_list (call (attribute (identifier_dacl) identifier_dacl (identifier_GetAclRevision) identifier_GetAclRevision )attribute (argument_list )argument_list )call (identifier_perm) identifier_perm (identifier_sid) identifier_sid )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_sd) identifier_sd (identifier_SetSecurityDescriptorDacl) identifier_SetSecurityDescriptorDacl )attribute (argument_list (integer_1) integer_1 (identifier_dacl) identifier_dacl (integer_0) integer_0 )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_win32security) identifier_win32security (identifier_SetUserObjectSecurity) identifier_SetUserObjectSecurity )attribute (argument_list (identifier_obj) identifier_obj (identifier_info) identifier_info (identifier_sd) identifier_sd )argument_list )call )expression_statement )block )else_clause )for_statement )block )function_definition )module
Set an object permission for the given user sid
(module (function_definition (function_name_strip_head) function_name_strip_head (parameters (identifier_sequence) identifier_sequence (identifier_values) identifier_values )parameters (block (expression_statement (assignment (identifier_values) identifier_values (call (identifier_set) identifier_set (argument_list (identifier_values) identifier_values )argument_list )call )assignment )expression_statement (return_statement (call (identifier_list) identifier_list (argument_list (call (attribute (identifier_itertools) identifier_itertools (identifier_dropwhile) identifier_dropwhile )attribute (argument_list (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (comparison_operator (identifier_x) identifier_x (identifier_values) identifier_values )comparison_operator )lambda (identifier_sequence) identifier_sequence )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Strips elements of `values` from the beginning of `sequence`.
(module (function_definition (function_name_ReceiveSOAP) function_name_ReceiveSOAP (parameters (identifier_self) identifier_self (default_parameter (identifier_readerclass) identifier_readerclass (None) None )default_parameter (dictionary_splat_pattern (identifier_kw) identifier_kw )dictionary_splat_pattern )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_ps) identifier_ps )attribute (block (return_statement (attribute (identifier_self) identifier_self (identifier_ps) identifier_ps )attribute )return_statement )block )if_statement (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier_IsSOAP) identifier_IsSOAP )attribute (argument_list )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (binary_operator (string_'Response is "%s", not "text/xml"') string_'Response is "%s", not "text/xml"' (attribute (attribute (identifier_self) identifier_self (identifier_reply_headers) identifier_reply_headers )attribute (identifier_type) identifier_type )attribute )binary_operator )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute )argument_list )call (integer_0) integer_0 )comparison_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_'Received empty response') string_'Received empty response' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_ps) identifier_ps )attribute (call (identifier_ParsedSoap) identifier_ParsedSoap (argument_list (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (keyword_argument (identifier_readerclass) identifier_readerclass (boolean_operator (identifier_readerclass) identifier_readerclass (attribute (identifier_self) identifier_self (identifier_readerclass) identifier_readerclass )attribute )boolean_operator )keyword_argument (keyword_argument (identifier_encodingStyle) identifier_encodingStyle (call (attribute (identifier_kw) identifier_kw (identifier_get) identifier_get )attribute (argument_list (string_'encodingStyle') string_'encodingStyle' )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_sig_handler) identifier_sig_handler )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_sig_handler) identifier_sig_handler )attribute (identifier_verify) identifier_verify )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_ps) identifier_ps )attribute )argument_list )call )expression_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier_ps) identifier_ps )attribute )return_statement )block )function_definition )module
Get back a SOAP message.
(module (function_definition (function_name_select) function_name_select (parameters (identifier_self) identifier_self (identifier_sql) identifier_sql )parameters (block (expression_statement (assignment (identifier_cursor) identifier_cursor (call (attribute (attribute (identifier_self) identifier_self (identifier_connection) identifier_connection )attribute (identifier_cursor) identifier_cursor )attribute (argument_list )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_cursor) identifier_cursor (identifier_execute) identifier_execute )attribute (argument_list (identifier_sql) identifier_sql )argument_list )call )expression_statement (expression_statement (assignment (identifier_results) identifier_results (list_comprehension (call (identifier_list) identifier_list (argument_list (identifier_i) identifier_i )argument_list )call (for_in_clause (identifier_i) identifier_i (call (attribute (identifier_cursor) identifier_cursor (identifier_fetchall) identifier_fetchall )attribute (argument_list )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement )block (finally_clause (block (expression_statement (call (attribute (identifier_cursor) identifier_cursor (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )finally_clause )try_statement (return_statement (identifier_results) identifier_results )return_statement )block )function_definition )module
Execute arbitrary SQL select query against the database and return the results. :param sql: SQL select query to execute :type sql: string :returns: SQL select query result :rtype: list of lists :raises: MySQLdb.Error
(module (function_definition (function_name_get_domain) function_name_get_domain (parameters (identifier_self) identifier_self (identifier_service_id) identifier_service_id (identifier_version_number) identifier_version_number (identifier_name) identifier_name )parameters (block (expression_statement (assignment (identifier_content) identifier_content (call (attribute (identifier_self) identifier_self (identifier__fetch) identifier__fetch )attribute (argument_list (binary_operator (string_"/service/%s/version/%d/domain/%s") string_"/service/%s/version/%d/domain/%s" (tuple (identifier_service_id) identifier_service_id (identifier_version_number) identifier_version_number (identifier_name) identifier_name )tuple )binary_operator )argument_list )call )assignment )expression_statement (return_statement (call (identifier_FastlyDomain) identifier_FastlyDomain (argument_list (identifier_self) identifier_self (identifier_content) identifier_content )argument_list )call )return_statement )block )function_definition )module
Get the domain for a particular service and version.
(module (function_definition (function_name__check_accept_keywords) function_name__check_accept_keywords (parameters (identifier_approved) identifier_approved (identifier_flag) identifier_flag )parameters (block (if_statement (comparison_operator (identifier_flag) identifier_flag (identifier_approved) identifier_approved )comparison_operator (block (return_statement (False) False )return_statement )block (elif_clause (boolean_operator (parenthesized_expression (boolean_operator (call (attribute (identifier_flag) identifier_flag (identifier_startswith) identifier_startswith )attribute (argument_list (string_'~') string_'~' )argument_list )call (comparison_operator (subscript (identifier_flag) identifier_flag (slice (integer_1) integer_1 (colon) colon )slice )subscript (identifier_approved) identifier_approved )comparison_operator )boolean_operator )parenthesized_expression (line_continuation_\) line_continuation_\ (parenthesized_expression (comparison_operator (binary_operator (string_'~') string_'~' (identifier_flag) identifier_flag )binary_operator (identifier_approved) identifier_approved )comparison_operator )parenthesized_expression )boolean_operator (block (return_statement (False) False )return_statement )block )elif_clause (else_clause (block (return_statement (True) True )return_statement )block )else_clause )if_statement )block )function_definition )module
check compatibility of accept_keywords
(module (function_definition (function_name__snapshot_to_data) function_name__snapshot_to_data (parameters (identifier_snapshot) identifier_snapshot )parameters (block (expression_statement (assignment (identifier_data) identifier_data (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (subscript (identifier_data) identifier_data (string_'id') string_'id' )subscript (subscript (identifier_snapshot) identifier_snapshot (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (subscript (identifier_data) identifier_data (string_'type') string_'type' )subscript (subscript (list (string_'single') string_'single' (string_'pre') string_'pre' (string_'post') string_'post' )list (subscript (identifier_snapshot) identifier_snapshot (integer_1) integer_1 )subscript )subscript )assignment )expression_statement (if_statement (comparison_operator (subscript (identifier_data) identifier_data (string_'type') string_'type' )subscript (string_'post') string_'post' )comparison_operator (block (expression_statement (assignment (subscript (identifier_data) identifier_data (string_'pre') string_'pre' )subscript (subscript (identifier_snapshot) identifier_snapshot (integer_2) integer_2 )subscript )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (subscript (identifier_snapshot) identifier_snapshot (integer_3) integer_3 )subscript (unary_operator (integer_1) integer_1 )unary_operator )comparison_operator (block (expression_statement (assignment (subscript (identifier_data) identifier_data (string_'timestamp') string_'timestamp' )subscript (subscript (identifier_snapshot) identifier_snapshot (integer_3) integer_3 )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_data) identifier_data (string_'timestamp') string_'timestamp' )subscript (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_time) identifier_time (identifier_time) identifier_time )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (subscript (identifier_data) identifier_data (string_'user') string_'user' )subscript (subscript (call (identifier_getpwuid) identifier_getpwuid (argument_list (subscript (identifier_snapshot) identifier_snapshot (integer_4) integer_4 )subscript )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (subscript (identifier_data) identifier_data (string_'description') string_'description' )subscript (subscript (identifier_snapshot) identifier_snapshot (integer_5) integer_5 )subscript )assignment )expression_statement (expression_statement (assignment (subscript (identifier_data) identifier_data (string_'cleanup') string_'cleanup' )subscript (subscript (identifier_snapshot) identifier_snapshot (integer_6) integer_6 )subscript )assignment )expression_statement (expression_statement (assignment (subscript (identifier_data) identifier_data (string_'userdata') string_'userdata' )subscript (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (subscript (identifier_snapshot) identifier_snapshot (integer_7) integer_7 )subscript (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (subscript (subscript (identifier_data) identifier_data (string_'userdata') string_'userdata' )subscript (identifier_key) identifier_key )subscript (identifier_value) identifier_value )assignment )expression_statement )block )for_statement (return_statement (identifier_data) identifier_data )return_statement )block )function_definition )module
Returns snapshot data from a D-Bus response. A snapshot D-Bus response is a dbus.Struct containing the information related to a snapshot: [id, type, pre_snapshot, timestamp, user, description, cleanup_algorithm, userdata] id: dbus.UInt32 type: dbus.UInt16 pre_snapshot: dbus.UInt32 timestamp: dbus.Int64 user: dbus.UInt32 description: dbus.String cleaup_algorithm: dbus.String userdata: dbus.Dictionary
(module (function_definition (function_name_default_storable) function_name_default_storable (parameters (identifier_python_type) identifier_python_type (default_parameter (identifier_exposes) identifier_exposes (None) None )default_parameter (default_parameter (identifier_version) identifier_version (None) None )default_parameter (default_parameter (identifier_storable_type) identifier_storable_type (None) None )default_parameter (default_parameter (identifier_peek) identifier_peek (identifier_default_peek) identifier_default_peek )default_parameter )parameters (block (if_statement (not_operator (identifier_exposes) identifier_exposes )not_operator (block (for_statement (identifier_extension) identifier_extension (identifier_expose_extensions) identifier_expose_extensions (block (try_statement (block (expression_statement (assignment (identifier_exposes) identifier_exposes (call (identifier_extension) identifier_extension (argument_list (identifier_python_type) identifier_python_type )argument_list )call )assignment )expression_statement )block (except_clause (tuple (identifier_SystemExit) identifier_SystemExit (identifier_KeyboardInterrupt) identifier_KeyboardInterrupt )tuple (block (raise_statement )raise_statement )block )except_clause (except_clause (block (pass_statement )pass_statement )block )except_clause (else_clause (block (if_statement (identifier_exposes) identifier_exposes (block (break_statement )break_statement )block )if_statement )block )else_clause )try_statement )block )for_statement (if_statement (not_operator (identifier_exposes) identifier_exposes )not_operator (block (raise_statement (call (identifier_AttributeError) identifier_AttributeError (argument_list (call (attribute (string_'`exposes` required for type: {!r}') string_'`exposes` required for type: {!r}' (identifier_format) identifier_format )attribute (argument_list (identifier_python_type) identifier_python_type )argument_list )call )argument_list )call )raise_statement )block )if_statement )block )if_statement (return_statement (call (identifier_Storable) identifier_Storable (argument_list (identifier_python_type) identifier_python_type (keyword_argument (identifier_key) identifier_key (identifier_storable_type) identifier_storable_type )keyword_argument (line_continuation_\) line_continuation_\ (keyword_argument (identifier_handlers) identifier_handlers (call (identifier_StorableHandler) identifier_StorableHandler (argument_list (keyword_argument (identifier_version) identifier_version (identifier_version) identifier_version )keyword_argument (keyword_argument (identifier_exposes) identifier_exposes (identifier_exposes) identifier_exposes )keyword_argument (line_continuation_\) line_continuation_\ (keyword_argument (identifier_poke) identifier_poke (call (identifier_poke) identifier_poke (argument_list (identifier_exposes) identifier_exposes )argument_list )call )keyword_argument (keyword_argument (identifier_peek) identifier_peek (call (identifier_peek) identifier_peek (argument_list (identifier_python_type) identifier_python_type (identifier_exposes) identifier_exposes )argument_list )call )keyword_argument )argument_list )call )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Default mechanics for building the storable instance for a type. Arguments: python_type (type): type. exposes (iterable): attributes exposed by the type. version (tuple): version number. storable_type (str): universal string identifier for the type. peek (callable): peeking routine. Returns: Storable: storable instance.
(module (function_definition (function_name_apply_to_structure) function_name_apply_to_structure (parameters (identifier_self) identifier_self (identifier_structure) identifier_structure )parameters (block (expression_statement (assignment (identifier_def_struct) identifier_def_struct (call (attribute (identifier_structure) identifier_structure (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_old_latt) identifier_old_latt (attribute (attribute (identifier_def_struct) identifier_def_struct (identifier_lattice) identifier_lattice )attribute (identifier_matrix) identifier_matrix )attribute )assignment )expression_statement (expression_statement (assignment (identifier_new_latt) identifier_new_latt (call (attribute (identifier_np) identifier_np (identifier_transpose) identifier_transpose )attribute (argument_list (call (attribute (identifier_np) identifier_np (identifier_dot) identifier_dot )attribute (argument_list (identifier_self) identifier_self (call (attribute (identifier_np) identifier_np (identifier_transpose) identifier_transpose )attribute (argument_list (identifier_old_latt) identifier_old_latt )argument_list )call )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_def_struct) identifier_def_struct (identifier_lattice) identifier_lattice )attribute (call (identifier_Lattice) identifier_Lattice (argument_list (identifier_new_latt) identifier_new_latt )argument_list )call )assignment )expression_statement (return_statement (identifier_def_struct) identifier_def_struct )return_statement )block )function_definition )module
Apply the deformation gradient to a structure. Args: structure (Structure object): the structure object to be modified by the deformation
(module (function_definition (function_name_reroot_graph) function_name_reroot_graph (parameters (typed_parameter (identifier_G) identifier_G (type (attribute (identifier_nx) identifier_nx (identifier_DiGraph) identifier_DiGraph )attribute )type )typed_parameter (typed_parameter (identifier_node) identifier_node (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (attribute (identifier_nx) identifier_nx (identifier_DiGraph) identifier_DiGraph )attribute )type (block (expression_statement (assignment (identifier_G) identifier_G (call (attribute (identifier_G) identifier_G (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_n) identifier_n (identifier_successors) identifier_successors )pattern_list (call (identifier_list) identifier_list (argument_list (call (attribute (identifier_nx) identifier_nx (identifier_bfs_successors) identifier_bfs_successors )attribute (argument_list (identifier_G) identifier_G (keyword_argument (identifier_source) identifier_source (identifier_node) identifier_node )keyword_argument )argument_list )call )argument_list )call (block (for_statement (identifier_s) identifier_s (identifier_successors) identifier_successors (block (expression_statement (call (attribute (identifier_G) identifier_G (identifier_add_edge) identifier_add_edge )attribute (argument_list (identifier_s) identifier_s (identifier_n) identifier_n (dictionary_splat (subscript (attribute (identifier_G) identifier_G (identifier_edges) identifier_edges )attribute (identifier_n) identifier_n (identifier_s) identifier_s )subscript )dictionary_splat )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_G) identifier_G (identifier_remove_edge) identifier_remove_edge )attribute (argument_list (identifier_n) identifier_n (identifier_s) identifier_s )argument_list )call )expression_statement )block )for_statement )block )for_statement (return_statement (identifier_G) identifier_G )return_statement )block )function_definition )module
Return a copy of the graph rooted at the given node
(module (function_definition (function_name_get_or_generate_vocabulary) function_name_get_or_generate_vocabulary (parameters (identifier_data_dir) identifier_data_dir (identifier_tmp_dir) identifier_tmp_dir (identifier_data_prefix) identifier_data_prefix (identifier_max_page_size_exp) identifier_max_page_size_exp (default_parameter (identifier_approx_vocab_size) identifier_approx_vocab_size (integer_32768) integer_32768 )default_parameter (default_parameter (identifier_strip) identifier_strip (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_num_pages_for_vocab_generation) identifier_num_pages_for_vocab_generation (binary_operator (identifier_approx_vocab_size) identifier_approx_vocab_size (integer_3) integer_3 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_vocab_file) identifier_vocab_file (call (identifier_vocab_filename) identifier_vocab_filename (argument_list (identifier_approx_vocab_size) identifier_approx_vocab_size (identifier_strip) identifier_strip )argument_list )call )assignment )expression_statement (function_definition (function_name_my_generator) function_name_my_generator (parameters (identifier_data_prefix) identifier_data_prefix )parameters (block (expression_statement (assignment (identifier_count) identifier_count (integer_0) integer_0 )assignment )expression_statement (for_statement (identifier_page) identifier_page (call (identifier_corpus_page_generator) identifier_corpus_page_generator (argument_list (subscript (call (identifier_all_corpus_files) identifier_all_corpus_files (argument_list (identifier_data_prefix) identifier_data_prefix )argument_list )call (slice (colon) colon (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript (identifier_tmp_dir) identifier_tmp_dir (identifier_max_page_size_exp) identifier_max_page_size_exp )argument_list )call (block (expression_statement (assignment (identifier_revisions) identifier_revisions (subscript (identifier_page) identifier_page (string_"revisions") string_"revisions" )subscript )assignment )expression_statement (if_statement (identifier_revisions) identifier_revisions (block (expression_statement (assignment (identifier_text) identifier_text (call (identifier_get_text) identifier_get_text (argument_list (subscript (identifier_revisions) identifier_revisions (unary_operator (integer_1) integer_1 )unary_operator )subscript (keyword_argument (identifier_strip) identifier_strip (identifier_strip) identifier_strip )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (yield (identifier_text) identifier_text )yield )expression_statement (expression_statement (augmented_assignment (identifier_count) identifier_count (integer_1) integer_1 )augmented_assignment )expression_statement (if_statement (comparison_operator (binary_operator (identifier_count) identifier_count (integer_100) integer_100 )binary_operator (integer_0) integer_0 )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_tf) identifier_tf (identifier_logging) identifier_logging )attribute (identifier_info) identifier_info )attribute (argument_list (binary_operator (string_"reading pages for vocab %d") string_"reading pages for vocab %d" (identifier_count) identifier_count )binary_operator )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_count) identifier_count (identifier_num_pages_for_vocab_generation) identifier_num_pages_for_vocab_generation )comparison_operator (block (break_statement )break_statement )block )if_statement )block )if_statement )block )for_statement )block )function_definition (return_statement (call (attribute (identifier_generator_utils) identifier_generator_utils (identifier_get_or_generate_vocab_inner) identifier_get_or_generate_vocab_inner )attribute (argument_list (identifier_data_dir) identifier_data_dir (identifier_vocab_file) identifier_vocab_file (identifier_approx_vocab_size) identifier_approx_vocab_size (call (identifier_my_generator) identifier_my_generator (argument_list (identifier_data_prefix) identifier_data_prefix )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Get or generate the vocabulary. Args: data_dir: a string tmp_dir: a string data_prefix: a string max_page_size_exp: an integer approx_vocab_size: an integer strip: a boolean Returns: a TextEncoder
(module (function_definition (function_name_get_config_dir) function_name_get_config_dir (parameters (identifier_path) identifier_path (default_parameter (identifier_pattern) identifier_pattern (string_"*.config") string_"*.config" )default_parameter (default_parameter (identifier_configspec) identifier_configspec (None) None )default_parameter (default_parameter (identifier_allow_errors) identifier_allow_errors (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_logger) identifier_logger (call (attribute (identifier_logging) identifier_logging (identifier_getLogger) identifier_getLogger )attribute (argument_list (identifier___name__) identifier___name__ )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_"Loading all files matching {0} in {1}") string_"Loading all files matching {0} in {1}" (identifier_format) identifier_format )attribute (argument_list (identifier_pattern) identifier_pattern (identifier_path) identifier_path )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_files) identifier_files (call (attribute (call (identifier_Globber) identifier_Globber (argument_list (identifier_path) identifier_path (keyword_argument (identifier_include) identifier_include (list (identifier_pattern) identifier_pattern )list )keyword_argument (keyword_argument (identifier_recursive) identifier_recursive (False) False )keyword_argument )argument_list )call (identifier_glob) identifier_glob )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_files) identifier_files (call (identifier_sorted) identifier_sorted (argument_list (identifier_files) identifier_files )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_config) identifier_config (call (identifier_ConfigObj) identifier_ConfigObj (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_filename) identifier_filename (identifier_files) identifier_files (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_"- Loading config for {0}") string_"- Loading config for {0}" (identifier_format) identifier_format )attribute (argument_list (identifier_filename) identifier_filename )argument_list )call )argument_list )call )expression_statement (try_statement (block (expression_statement (assignment (identifier_conf) identifier_conf (call (identifier_ConfigObj) identifier_ConfigObj (argument_list (identifier_filename) identifier_filename (keyword_argument (identifier_configspec) identifier_configspec (identifier_configspec) identifier_configspec )keyword_argument )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ConfigObjError) identifier_ConfigObjError (identifier_coe) identifier_coe (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (call (attribute (string_"An error occurred while parsing {0}: {1}") string_"An error occurred while parsing {0}: {1}" (identifier_format) identifier_format )attribute (argument_list (identifier_filename) identifier_filename (call (identifier_str) identifier_str (argument_list (identifier_coe) identifier_coe )argument_list )call )argument_list )call )argument_list )call )expression_statement (continue_statement )continue_statement )block )except_clause )try_statement (if_statement (identifier_configspec) identifier_configspec (block (expression_statement (call (attribute (identifier_conf) identifier_conf (identifier_validate) identifier_validate )attribute (argument_list (call (identifier_Validator) identifier_Validator (argument_list )argument_list )call )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_config) identifier_config (identifier_merge) identifier_merge )attribute (argument_list (identifier_conf) identifier_conf )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_config) identifier_config )return_statement )block )function_definition )module
Load an entire directory of configuration files, merging them into one. This function will load multiple configuration files matching the given pattern, in the given path, and merge them. The found files are first sorted alphabetically, and then loaded and merged. A good practice is to use ConfigObj sections, for easy loading of information like per-host configuration. Parameters ---------- path: string Absolute path to a directory of ConfigObj files pattern: string Globbing pattern used to find files. Defaults to *.config. configspec: ConfigObj Used to sanitize the values in the resulting ConfigObj. Validation errors are currently not exposed to the caller. allow_errors: boolean If False, errors raised by ConfigObj are not caught. If True, errors raise by ConfigObj are caught, and an error is logged using logger.
(module (function_definition (function_name_process_added_port) function_name_process_added_port (parameters (identifier_self) identifier_self (identifier_device_details) identifier_device_details )parameters (block (expression_statement (assignment (identifier_device) identifier_device (subscript (identifier_device_details) identifier_device_details (string_'device') string_'device' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_port_id) identifier_port_id (subscript (identifier_device_details) identifier_device_details (string_'port_id') string_'port_id' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_reprocess) identifier_reprocess (True) True )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__process_added_port) identifier__process_added_port )attribute (argument_list (identifier_device_details) identifier_device_details )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_debug) identifier_debug )attribute (argument_list (string_"Updating cached port %s status as UP.") string_"Updating cached port %s status as UP." (identifier_port_id) identifier_port_id )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__update_port_status_cache) identifier__update_port_status_cache )attribute (argument_list (identifier_device) identifier_device (keyword_argument (identifier_device_bound) identifier_device_bound (True) True )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_info) identifier_info )attribute (argument_list (string_"Port %s processed.") string_"Port %s processed." (identifier_port_id) identifier_port_id )argument_list )call )expression_statement )block (except_clause (attribute (identifier_os_win_exc) identifier_os_win_exc (identifier_HyperVvNicNotFound) identifier_HyperVvNicNotFound )attribute (block (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_debug) identifier_debug )attribute (argument_list (concatenated_string (string_'vNIC %s not found. This can happen if the VM was ') string_'vNIC %s not found. This can happen if the VM was ' (string_'destroyed.') string_'destroyed.' )concatenated_string (identifier_port_id) identifier_port_id )argument_list )call )expression_statement (expression_statement (assignment (identifier_reprocess) identifier_reprocess (False) False )assignment )expression_statement )block )except_clause (except_clause (attribute (identifier_os_win_exc) identifier_os_win_exc (identifier_HyperVPortNotFoundException) identifier_HyperVPortNotFoundException )attribute (block (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_debug) identifier_debug )attribute (argument_list (concatenated_string (string_'vSwitch port %s not found. This can happen if the VM ') string_'vSwitch port %s not found. This can happen if the VM ' (string_'was destroyed.') string_'was destroyed.' )concatenated_string (identifier_port_id) identifier_port_id )argument_list )call )expression_statement )block )except_clause (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_LOG) identifier_LOG (identifier_exception) identifier_exception )attribute (argument_list (concatenated_string (string_"Exception encountered while processing ") string_"Exception encountered while processing " (string_"port %(port_id)s. Exception: %(ex)s") string_"port %(port_id)s. Exception: %(ex)s" )concatenated_string (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_port_id) identifier_port_id (identifier_port_id) identifier_port_id )keyword_argument (keyword_argument (identifier_ex) identifier_ex (identifier_ex) identifier_ex )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )except_clause (else_clause (block (expression_statement (assignment (identifier_reprocess) identifier_reprocess (False) False )assignment )expression_statement )block )else_clause )try_statement (if_statement (identifier_reprocess) identifier_reprocess (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__added_ports) identifier__added_ports )attribute (identifier_add) identifier_add )attribute (argument_list (identifier_device) identifier_device )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__refresh_cache) identifier__refresh_cache )attribute (True) True )assignment )expression_statement (return_statement (False) False )return_statement )block )if_statement (return_statement (True) True )return_statement )block )function_definition )module
Process the new ports. Wraps _process_added_port, and treats the sucessful and exception cases.
(module (function_definition (function_name_load_kube_config) function_name_load_kube_config (parameters (default_parameter (identifier_config_file) identifier_config_file (None) None )default_parameter (default_parameter (identifier_context) identifier_context (None) None )default_parameter (default_parameter (identifier_client_configuration) identifier_client_configuration (None) None )default_parameter (default_parameter (identifier_persist_config) identifier_persist_config (True) True )default_parameter )parameters (block (if_statement (comparison_operator (identifier_config_file) identifier_config_file (None) None )comparison_operator (block (expression_statement (assignment (identifier_config_file) identifier_config_file (identifier_KUBE_CONFIG_DEFAULT_LOCATION) identifier_KUBE_CONFIG_DEFAULT_LOCATION )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_loader) identifier_loader (call (identifier__get_kube_config_loader_for_yaml_file) identifier__get_kube_config_loader_for_yaml_file (argument_list (identifier_config_file) identifier_config_file (keyword_argument (identifier_active_context) identifier_active_context (identifier_context) identifier_context )keyword_argument (keyword_argument (identifier_persist_config) identifier_persist_config (identifier_persist_config) identifier_persist_config )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_client_configuration) identifier_client_configuration (None) None )comparison_operator (block (expression_statement (assignment (identifier_config) identifier_config (call (attribute (identifier_type) identifier_type (identifier___call__) identifier___call__ )attribute (argument_list (identifier_Configuration) identifier_Configuration )argument_list )call )assignment )expression_statement (expression_statement (await (call (attribute (identifier_loader) identifier_loader (identifier_load_and_set) identifier_load_and_set )attribute (argument_list (identifier_config) identifier_config )argument_list )call )await )expression_statement (expression_statement (call (attribute (identifier_Configuration) identifier_Configuration (identifier_set_default) identifier_set_default )attribute (argument_list (identifier_config) identifier_config )argument_list )call )expression_statement )block (else_clause (block (expression_statement (await (call (attribute (identifier_loader) identifier_loader (identifier_load_and_set) identifier_load_and_set )attribute (argument_list (identifier_client_configuration) identifier_client_configuration )argument_list )call )await )expression_statement )block )else_clause )if_statement (return_statement (identifier_loader) identifier_loader )return_statement )block )function_definition )module
Loads authentication and cluster information from kube-config file and stores them in kubernetes.client.configuration. :param config_file: Name of the kube-config file. :param context: set the active context. If is set to None, current_context from config file will be used. :param client_configuration: The kubernetes.client.Configuration to set configs to. :param persist_config: If True, config file will be updated when changed (e.g GCP token refresh).
(module (function_definition (function_name_scgi_request) function_name_scgi_request (parameters (identifier_url) identifier_url (identifier_methodname) identifier_methodname (list_splat_pattern (identifier_params) identifier_params )list_splat_pattern (dictionary_splat_pattern (identifier_kw) identifier_kw )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_xmlreq) identifier_xmlreq (call (attribute (identifier_xmlrpclib) identifier_xmlrpclib (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_params) identifier_params (identifier_methodname) identifier_methodname )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_xmlresp) identifier_xmlresp (call (attribute (call (identifier_SCGIRequest) identifier_SCGIRequest (argument_list (identifier_url) identifier_url )argument_list )call (identifier_send) identifier_send )attribute (argument_list (identifier_xmlreq) identifier_xmlreq )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_kw) identifier_kw (identifier_get) identifier_get )attribute (argument_list (string_"deserialize") string_"deserialize" (True) True )argument_list )call (block (expression_statement (assignment (identifier_xmlresp) identifier_xmlresp (call (attribute (call (attribute (identifier_xmlresp) identifier_xmlresp (identifier_replace) identifier_replace )attribute (argument_list (string_"<i8>") string_"<i8>" (string_"<i4>") string_"<i4>" )argument_list )call (identifier_replace) identifier_replace )attribute (argument_list (string_"</i8>") string_"</i8>" (string_"</i4>") string_"</i4>" )argument_list )call )assignment )expression_statement (return_statement (subscript (subscript (call (attribute (identifier_xmlrpclib) identifier_xmlrpclib (identifier_loads) identifier_loads )attribute (argument_list (identifier_xmlresp) identifier_xmlresp )argument_list )call (integer_0) integer_0 )subscript (integer_0) integer_0 )subscript )return_statement )block (else_clause (block (return_statement (identifier_xmlresp) identifier_xmlresp )return_statement )block )else_clause )if_statement )block )function_definition )module
Send a XMLRPC request over SCGI to the given URL. @param url: Endpoint URL. @param methodname: XMLRPC method name. @param params: Tuple of simple python objects. @keyword deserialize: Parse XML result? (default is True) @return: XMLRPC response, or the equivalent Python data.
(module (function_definition (function_name__get_states) function_name__get_states (parameters (identifier_self) identifier_self (identifier_result) identifier_result )parameters (block (if_statement (comparison_operator (string_'devices') string_'devices' (call (attribute (identifier_result) identifier_result (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )comparison_operator (block (return_statement )return_statement )block )if_statement (for_statement (identifier_device_states) identifier_device_states (subscript (identifier_result) identifier_result (string_'devices') string_'devices' )subscript (block (expression_statement (assignment (identifier_device) identifier_device (subscript (attribute (identifier_self) identifier_self (identifier___devices) identifier___devices )attribute (subscript (identifier_device_states) identifier_device_states (string_'deviceURL') string_'deviceURL' )subscript )subscript )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_device) identifier_device (identifier_set_active_states) identifier_set_active_states )attribute (argument_list (subscript (identifier_device_states) identifier_device_states (string_'states') string_'states' )subscript )argument_list )call )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )for_statement )block )function_definition )module
Get states of devices.
(module (function_definition (function_name_token_network_connect) function_name_token_network_connect (parameters (identifier_self) identifier_self (typed_parameter (identifier_registry_address) identifier_registry_address (type (identifier_PaymentNetworkID) identifier_PaymentNetworkID )type )typed_parameter (typed_parameter (identifier_token_address) identifier_token_address (type (identifier_TokenAddress) identifier_TokenAddress )type )typed_parameter (typed_parameter (identifier_funds) identifier_funds (type (identifier_TokenAmount) identifier_TokenAmount )type )typed_parameter (typed_default_parameter (identifier_initial_channel_target) identifier_initial_channel_target (type (identifier_int) identifier_int )type (integer_3) integer_3 )typed_default_parameter (typed_default_parameter (identifier_joinable_funds_target) identifier_joinable_funds_target (type (identifier_float) identifier_float )type (float_0.4) float_0.4 )typed_default_parameter )parameters (type (None) None )type (block (if_statement (not_operator (call (identifier_is_binary_address) identifier_is_binary_address (argument_list (identifier_registry_address) identifier_registry_address )argument_list )call )not_operator (block (raise_statement (call (identifier_InvalidAddress) identifier_InvalidAddress (argument_list (string_'registry_address must be a valid address in binary') string_'registry_address must be a valid address in binary' )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (call (identifier_is_binary_address) identifier_is_binary_address (argument_list (identifier_token_address) identifier_token_address )argument_list )call )not_operator (block (raise_statement (call (identifier_InvalidAddress) identifier_InvalidAddress (argument_list (string_'token_address must be a valid address in binary') string_'token_address must be a valid address in binary' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_token_network_identifier) identifier_token_network_identifier (call (attribute (identifier_views) identifier_views (identifier_get_token_network_identifier_by_token_address) identifier_get_token_network_identifier_by_token_address )attribute (argument_list (keyword_argument (identifier_chain_state) identifier_chain_state (call (attribute (identifier_views) identifier_views (identifier_state_from_raiden) identifier_state_from_raiden )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_raiden) identifier_raiden )attribute )argument_list )call )keyword_argument (keyword_argument (identifier_payment_network_id) identifier_payment_network_id (identifier_registry_address) identifier_registry_address )keyword_argument (keyword_argument (identifier_token_address) identifier_token_address (identifier_token_address) identifier_token_address )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_connection_manager) identifier_connection_manager (call (attribute (attribute (identifier_self) identifier_self (identifier_raiden) identifier_raiden )attribute (identifier_connection_manager_for_token_network) identifier_connection_manager_for_token_network )attribute (argument_list (identifier_token_network_identifier) identifier_token_network_identifier )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_has_enough_reserve) identifier_has_enough_reserve (identifier_estimated_required_reserve) identifier_estimated_required_reserve )pattern_list (call (identifier_has_enough_gas_reserve) identifier_has_enough_gas_reserve (argument_list (keyword_argument (identifier_raiden) identifier_raiden (attribute (identifier_self) identifier_self (identifier_raiden) identifier_raiden )attribute )keyword_argument (keyword_argument (identifier_channels_to_open) identifier_channels_to_open (identifier_initial_channel_target) identifier_initial_channel_target )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_has_enough_reserve) identifier_has_enough_reserve )not_operator (block (raise_statement (call (identifier_InsufficientGasReserve) identifier_InsufficientGasReserve (argument_list (parenthesized_expression (concatenated_string (string_'The account balance is below the estimated amount necessary to ') string_'The account balance is below the estimated amount necessary to ' (string_'finish the lifecycles of all active channels. A balance of at ') string_'finish the lifecycles of all active channels. A balance of at ' (string_f'least {estimated_required_reserve} wei is required.') string_f'least {estimated_required_reserve} wei is required.' )concatenated_string )parenthesized_expression )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_connection_manager) identifier_connection_manager (identifier_connect) identifier_connect )attribute (argument_list (keyword_argument (identifier_funds) identifier_funds (identifier_funds) identifier_funds )keyword_argument (keyword_argument (identifier_initial_channel_target) identifier_initial_channel_target (identifier_initial_channel_target) identifier_initial_channel_target )keyword_argument (keyword_argument (identifier_joinable_funds_target) identifier_joinable_funds_target (identifier_joinable_funds_target) identifier_joinable_funds_target )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Automatically maintain channels open for the given token network. Args: token_address: the ERC20 token network to connect to. funds: the amount of funds that can be used by the ConnectionMananger. initial_channel_target: number of channels to open proactively. joinable_funds_target: fraction of the funds that will be used to join channels opened by other participants.
(module (function_definition (function_name_handleRequest) function_name_handleRequest (parameters (identifier_self) identifier_self (identifier_req) identifier_req )parameters (block (expression_statement (assignment (identifier_name) identifier_name (subscript (identifier_req) identifier_req (string_"method") string_"method" )subscript )assignment )expression_statement (expression_statement (assignment (identifier_params) identifier_params (subscript (identifier_req) identifier_req (string_"params") string_"params" )subscript )assignment )expression_statement (expression_statement (assignment (identifier_id) identifier_id (subscript (identifier_req) identifier_req (string_"id") string_"id" )subscript )assignment )expression_statement (expression_statement (assignment (identifier_obj) identifier_obj (None) None )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_obj) identifier_obj (call (identifier_getMethodByName) identifier_getMethodByName (argument_list (attribute (identifier_self) identifier_self (identifier_service) identifier_service )attribute (identifier_name) identifier_name )argument_list )call )assignment )expression_statement )block (except_clause (identifier_MethodNameNotAllowed) identifier_MethodNameNotAllowed (identifier_e) identifier_e (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_sendResponse) identifier_sendResponse )attribute (argument_list (identifier_id) identifier_id (None) None (identifier_e) identifier_e )argument_list )call )expression_statement )block )except_clause (except_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_sendResponse) identifier_sendResponse )attribute (argument_list (identifier_id) identifier_id (None) None (call (identifier_MethodNotFound) identifier_MethodNotFound (argument_list )argument_list )call )argument_list )call )expression_statement )block )except_clause )try_statement (if_statement (identifier_obj) identifier_obj (block (try_statement (block (expression_statement (assignment (identifier_rslt) identifier_rslt (call (identifier_obj) identifier_obj (argument_list (list_splat (identifier_params) identifier_params )list_splat )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_sendResponse) identifier_sendResponse )attribute (argument_list (identifier_id) identifier_id (identifier_rslt) identifier_rslt (None) None )argument_list )call )expression_statement )block (except_clause (identifier_TypeError) identifier_TypeError (block (expression_statement (assignment (identifier_s) identifier_s (call (identifier_getTracebackStr) identifier_getTracebackStr (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_sendResponse) identifier_sendResponse )attribute (argument_list (identifier_id) identifier_id (None) None (call (identifier_InvalidMethodParameters) identifier_InvalidMethodParameters (argument_list )argument_list )call )argument_list )call )expression_statement )block )except_clause (except_clause (block (expression_statement (assignment (identifier_s) identifier_s (call (identifier_getTracebackStr) identifier_getTracebackStr (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_sendResponse) identifier_sendResponse )attribute (argument_list (identifier_id) identifier_id (None) None (identifier_s) identifier_s )argument_list )call )expression_statement )block )except_clause )try_statement )block )if_statement )block )function_definition )module
handles a request by calling the appropriete method the service exposes
(module (function_definition (function_name_rotateInZMat) function_name_rotateInZMat (parameters (identifier_theta_deg) identifier_theta_deg )parameters (block (expression_statement (assignment (identifier_ct) identifier_ct (call (attribute (identifier_np) identifier_np (identifier_cos) identifier_cos )attribute (argument_list (call (attribute (identifier_np) identifier_np (identifier_radians) identifier_radians )attribute (argument_list (identifier_theta_deg) identifier_theta_deg )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_st) identifier_st (call (attribute (identifier_np) identifier_np (identifier_sin) identifier_sin )attribute (argument_list (call (attribute (identifier_np) identifier_np (identifier_radians) identifier_radians )attribute (argument_list (identifier_theta_deg) identifier_theta_deg )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_rMat) identifier_rMat (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (list (list (identifier_ct) identifier_ct (unary_operator (identifier_st) identifier_st )unary_operator (integer_0) integer_0 )list (list (identifier_st) identifier_st (identifier_ct) identifier_ct (integer_0) integer_0 )list (list (integer_0) integer_0 (integer_0) integer_0 (integer_1) integer_1 )list )list )argument_list )call )assignment )expression_statement (return_statement (identifier_rMat) identifier_rMat )return_statement )block )function_definition )module
Rotate a vector theta degrees around the z-axis Equivalent to yaw left Rotates the vector in the sense that the x-axis is rotated towards the y-axis. If looking along the z-axis (which is not the way you usually look at it), the vector rotates clockwise. If sitting on the vector [1,0,0], the rotation is towards the left Input: theta_deg (float) Angle through which vectors should be rotated in degrees Returns: A matrix To rotate a vector, premultiply by this matrix. To rotate the coord sys underneath the vector, post multiply
(module (function_definition (function_name_is_recording) function_name_is_recording (parameters (identifier_self) identifier_self )parameters (type (generic_type (identifier_Optional) identifier_Optional (type_parameter (type (identifier_bool) identifier_bool )type )type_parameter )generic_type )type (block (expression_statement (assignment (identifier_status_response) identifier_status_response (call (attribute (attribute (identifier_self) identifier_self (identifier__client) identifier__client )attribute (identifier_get_state) identifier_get_state )attribute (argument_list (call (attribute (string_'api/monitors/alarm/id:{}/command:status.json') string_'api/monitors/alarm/id:{}/command:status.json' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__monitor_id) identifier__monitor_id )attribute )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_status_response) identifier_status_response )not_operator (block (expression_statement (call (attribute (identifier__LOGGER) identifier__LOGGER (identifier_warning) identifier_warning )attribute (argument_list (call (attribute (string_'Could not get status for monitor {}') string_'Could not get status for monitor {}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__monitor_id) identifier__monitor_id )attribute )argument_list )call )argument_list )call )expression_statement (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_status) identifier_status (call (attribute (identifier_status_response) identifier_status_response (identifier_get) identifier_get )attribute (argument_list (string_'status') string_'status' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_status) identifier_status (string_'') string_'' )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (return_statement (comparison_operator (call (identifier_int) identifier_int (argument_list (identifier_status) identifier_status )argument_list )call (identifier_STATE_ALARM) identifier_STATE_ALARM )comparison_operator )return_statement )block )function_definition )module
Indicate if this Monitor is currently recording.
(module (function_definition (function_name_get_queryset) function_name_get_queryset (parameters (identifier_self) identifier_self )parameters (block (try_statement (block (expression_statement (assignment (identifier_date) identifier_date (call (attribute (attribute (identifier_ElectionDay) identifier_ElectionDay (identifier_objects) identifier_objects )attribute (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier_date) identifier_date (subscript (attribute (identifier_self) identifier_self (identifier_kwargs) identifier_kwargs )attribute (string_"date") string_"date" )subscript )keyword_argument )argument_list )call )assignment )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (raise_statement (call (identifier_APIException) identifier_APIException (argument_list (call (attribute (string_"No elections on {}.") string_"No elections on {}." (identifier_format) identifier_format )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_kwargs) identifier_kwargs )attribute (string_"date") string_"date" )subscript )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_division_ids) identifier_division_ids (list )list )assignment )expression_statement (expression_statement (assignment (identifier_normal_elections) identifier_normal_elections (call (attribute (attribute (identifier_date) identifier_date (identifier_elections) identifier_elections )attribute (identifier_filter) identifier_filter )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_normal_elections) identifier_normal_elections )argument_list )call (integer_0) integer_0 )comparison_operator (block (for_statement (identifier_election) identifier_election (call (attribute (attribute (identifier_date) identifier_date (identifier_elections) identifier_elections )attribute (identifier_all) identifier_all )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (attribute (attribute (attribute (identifier_election) identifier_election (identifier_division) identifier_division )attribute (identifier_level) identifier_level )attribute (identifier_name) identifier_name )attribute (attribute (identifier_DivisionLevel) identifier_DivisionLevel (identifier_STATE) identifier_STATE )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_division_ids) identifier_division_ids (identifier_append) identifier_append )attribute (argument_list (attribute (attribute (identifier_election) identifier_election (identifier_division) identifier_division )attribute (identifier_uid) identifier_uid )attribute )argument_list )call )expression_statement )block (elif_clause (comparison_operator (attribute (attribute (attribute (identifier_election) identifier_election (identifier_division) identifier_division )attribute (identifier_level) identifier_level )attribute (identifier_name) identifier_name )attribute (attribute (identifier_DivisionLevel) identifier_DivisionLevel (identifier_DISTRICT) identifier_DISTRICT )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_division_ids) identifier_division_ids (identifier_append) identifier_append )attribute (argument_list (attribute (attribute (attribute (identifier_election) identifier_election (identifier_division) identifier_division )attribute (identifier_parent) identifier_parent )attribute (identifier_uid) identifier_uid )attribute )argument_list )call )expression_statement )block )elif_clause )if_statement )block )for_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_Division) identifier_Division (identifier_objects) identifier_objects )attribute (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_uid__in) identifier_uid__in (identifier_division_ids) identifier_division_ids )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Returns a queryset of all states holding a non-special election on a date.
(module (function_definition (function_name_filename_addstring) function_name_filename_addstring (parameters (identifier_filename) identifier_filename (identifier_text) identifier_text )parameters (block (expression_statement (assignment (pattern_list (identifier_fn) identifier_fn (identifier_ext) identifier_ext )pattern_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_splitext) identifier_splitext )attribute (argument_list (identifier_filename) identifier_filename )argument_list )call )assignment )expression_statement (return_statement (binary_operator (binary_operator (identifier_fn) identifier_fn (identifier_text) identifier_text )binary_operator (identifier_ext) identifier_ext )binary_operator )return_statement )block )function_definition )module
Add `text` to filename, keeping the extension in place For example when adding a timestamp to the filename
(module (function_definition (function_name_FromFile) function_name_FromFile (parameters (identifier_cls) identifier_cls (identifier_filename) identifier_filename (default_parameter (identifier_overwrite) identifier_overwrite (False) False )default_parameter (default_parameter (identifier_auto_transfer) identifier_auto_transfer (True) True )default_parameter (dictionary_splat_pattern (identifier_kwds) identifier_kwds )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_path) identifier_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_expanduser) identifier_expanduser )attribute (argument_list (identifier_filename) identifier_filename )argument_list )call )assignment )expression_statement (if_statement (boolean_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 (identifier_overwrite) identifier_overwrite )not_operator )boolean_operator (block (raise_statement (call (attribute (identifier_exceptions) identifier_exceptions (identifier_InvalidUserInputError) identifier_InvalidUserInputError )attribute (argument_list (binary_operator (string_'File %s exists and overwrite not specified') string_'File %s exists and overwrite not specified' (identifier_path) identifier_path )binary_operator )argument_list )call )raise_statement )block )if_statement (return_statement (call (identifier_cls) identifier_cls (argument_list (call (identifier_open) identifier_open (argument_list (identifier_path) identifier_path (string_'wb') string_'wb' )argument_list )call (keyword_argument (identifier_close_stream) identifier_close_stream (True) True )keyword_argument (keyword_argument (identifier_auto_transfer) identifier_auto_transfer (identifier_auto_transfer) identifier_auto_transfer )keyword_argument (dictionary_splat (identifier_kwds) identifier_kwds )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Create a new download object from a filename.
(module (function_definition (function_name_createMonitor) function_name_createMonitor (parameters (identifier_self) identifier_self (default_parameter (identifier_callback) identifier_callback (None) None )default_parameter (default_parameter (identifier_errback) identifier_errback (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (import_statement (dotted_name (identifier_ns1) identifier_ns1 (identifier_monitoring) identifier_monitoring )dotted_name )import_statement (expression_statement (assignment (identifier_monitor) identifier_monitor (call (attribute (attribute (identifier_ns1) identifier_ns1 (identifier_monitoring) identifier_monitoring )attribute (identifier_Monitor) identifier_Monitor )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_monitor) identifier_monitor (identifier_create) identifier_create )attribute (argument_list (keyword_argument (identifier_callback) identifier_callback (identifier_callback) identifier_callback )keyword_argument (keyword_argument (identifier_errback) identifier_errback (identifier_errback) identifier_errback )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Create a monitor
(module (function_definition (function_name_get_all_messages_in_thread) function_name_get_all_messages_in_thread (parameters (identifier_self) identifier_self (identifier_participant_id) identifier_participant_id (identifier_thread_id) identifier_thread_id (default_parameter (identifier_check_who_read) identifier_check_who_read (True) True )default_parameter )parameters (block (try_statement (block (expression_statement (assignment (identifier_messages) identifier_messages (call (attribute (call (attribute (call (attribute (call (attribute (attribute (identifier_Message) identifier_Message (identifier_objects) identifier_objects )attribute (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_thread__id) identifier_thread__id (identifier_thread_id) identifier_thread_id )keyword_argument )argument_list )call (line_continuation_\) line_continuation_\ (identifier_order_by) identifier_order_by )attribute (argument_list (string_'-id') string_'-id' )argument_list )call (line_continuation_\) line_continuation_\ (identifier_select_related) identifier_select_related )attribute (argument_list (string_'thread') string_'thread' )argument_list )call (line_continuation_\) line_continuation_\ (identifier_prefetch_related) identifier_prefetch_related )attribute (argument_list (string_'thread__participation_set') string_'thread__participation_set' (string_'thread__participation_set__participant') string_'thread__participation_set__participant' )argument_list )call )assignment )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (return_statement (call (attribute (attribute (identifier_Message) identifier_Message (identifier_objects) identifier_objects )attribute (identifier_none) identifier_none )attribute (argument_list )argument_list )call )return_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_messages) identifier_messages (call (attribute (identifier_self) identifier_self (identifier_check_who_read) identifier_check_who_read )attribute (argument_list (identifier_messages) identifier_messages )argument_list )call )assignment )expression_statement (return_statement (identifier_messages) identifier_messages )return_statement )block )function_definition )module
Returns all the messages in a thread.
(module (function_definition (function_name_read_piezo_tensor) function_name_read_piezo_tensor (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_header_pattern) identifier_header_pattern (concatenated_string (string_r"PIEZOELECTRIC TENSOR for field in x, y, ") string_r"PIEZOELECTRIC TENSOR for field in x, y, " (string_r"z\s+\(C/m\^2\)\s+([X-Z][X-Z]\s+)+\-+") string_r"z\s+\(C/m\^2\)\s+([X-Z][X-Z]\s+)+\-+" )concatenated_string )assignment )expression_statement (expression_statement (assignment (identifier_row_pattern) identifier_row_pattern (binary_operator (string_r"[x-z]\s+") string_r"[x-z]\s+" (call (attribute (string_r"\s+") string_r"\s+" (identifier_join) identifier_join )attribute (argument_list (binary_operator (list (string_r"(\-*[\.\d]+)") string_r"(\-*[\.\d]+)" )list (integer_6) integer_6 )binary_operator )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_footer_pattern) identifier_footer_pattern (string_r"BORN EFFECTIVE") string_r"BORN EFFECTIVE" )assignment )expression_statement (expression_statement (assignment (identifier_pt_table) identifier_pt_table (call (attribute (identifier_self) identifier_self (identifier_read_table_pattern) identifier_read_table_pattern )attribute (argument_list (identifier_header_pattern) identifier_header_pattern (identifier_row_pattern) identifier_row_pattern (identifier_footer_pattern) identifier_footer_pattern (keyword_argument (identifier_postprocess) identifier_postprocess (identifier_float) identifier_float )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (string_"piezo_tensor") string_"piezo_tensor" )subscript (identifier_pt_table) identifier_pt_table )assignment )expression_statement )block )function_definition )module
Parse the piezo tensor data
(module (function_definition (function_name_set_album) function_name_set_album (parameters (identifier_self) identifier_self (identifier_album) identifier_album )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__set_attr) identifier__set_attr )attribute (argument_list (call (identifier_TALB) identifier_TALB (argument_list (keyword_argument (identifier_encoding) identifier_encoding (integer_3) integer_3 )keyword_argument (keyword_argument (identifier_text) identifier_text (call (attribute (identifier_album) identifier_album (identifier_decode) identifier_decode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Sets song's album :param album: album
(module (function_definition (function_name_put) function_name_put (parameters (identifier_self) identifier_self (identifier_request) identifier_request (dictionary_splat_pattern (identifier_resources) identifier_resources )dictionary_splat_pattern )parameters (block (if_statement (not_operator (attribute (attribute (identifier_self) identifier_self (identifier__meta) identifier__meta )attribute (identifier_form) identifier_form )attribute )not_operator (block (return_statement (None) None )return_statement )block )if_statement (if_statement (boolean_operator (not_operator (comparison_operator (attribute (attribute (identifier_self) identifier_self (identifier__meta) identifier__meta )attribute (identifier_name) identifier_name )attribute (identifier_resources) identifier_resources )comparison_operator )not_operator (not_operator (subscript (identifier_resources) identifier_resources (attribute (attribute (identifier_self) identifier_self (identifier__meta) identifier__meta )attribute (identifier_name) identifier_name )attribute )subscript )not_operator )boolean_operator (block (raise_statement (call (identifier_HttpError) identifier_HttpError (argument_list (string_"Resource not found.") string_"Resource not found." (keyword_argument (identifier_status) identifier_status (attribute (identifier_status) identifier_status (identifier_HTTP_404_NOT_FOUND) identifier_HTTP_404_NOT_FOUND )attribute )keyword_argument )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_resource) identifier_resource (call (attribute (identifier_resources) identifier_resources (identifier_pop) identifier_pop )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier__meta) identifier__meta )attribute (identifier_name) identifier_name )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_updated) identifier_updated (call (identifier_UpdatedList) identifier_UpdatedList (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_o) identifier_o (call (identifier_as_tuple) identifier_as_tuple (argument_list (identifier_resource) identifier_resource )argument_list )call (block (expression_statement (assignment (identifier_form) identifier_form (call (attribute (attribute (identifier_self) identifier_self (identifier__meta) identifier__meta )attribute (identifier_form) identifier_form )attribute (argument_list (keyword_argument (identifier_data) identifier_data (attribute (identifier_request) identifier_request (identifier_data) identifier_data )attribute )keyword_argument (keyword_argument (identifier_instance) identifier_instance (identifier_o) identifier_o )keyword_argument (dictionary_splat (identifier_resources) identifier_resources )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (identifier_form) identifier_form (identifier_is_valid) identifier_is_valid )attribute (argument_list )argument_list )call )not_operator (block (raise_statement (call (identifier_FormError) identifier_FormError (argument_list (identifier_form) identifier_form )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_updated) identifier_updated (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_form) identifier_form (identifier_save) identifier_save )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (conditional_expression (identifier_updated) identifier_updated (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_updated) identifier_updated )argument_list )call (integer_1) integer_1 )comparison_operator (subscript (identifier_updated) identifier_updated (unary_operator (integer_1) integer_1 )unary_operator )subscript )conditional_expression )return_statement )block )function_definition )module
Default PUT method. Uses self form. Allow bulk update. :return object: changed instance or raise form's error
(module (function_definition (function_name_get_world_size) function_name_get_world_size (parameters )parameters (block (if_statement (boolean_operator (call (attribute (attribute (identifier_torch) identifier_torch (identifier_distributed) identifier_distributed )attribute (identifier_is_available) identifier_is_available )attribute (argument_list )argument_list )call (call (attribute (attribute (identifier_torch) identifier_torch (identifier_distributed) identifier_distributed )attribute (identifier_is_initialized) identifier_is_initialized )attribute (argument_list )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_world_size) identifier_world_size (call (attribute (attribute (identifier_torch) identifier_torch (identifier_distributed) identifier_distributed )attribute (identifier_get_world_size) identifier_get_world_size )attribute (argument_list )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_world_size) identifier_world_size (integer_1) integer_1 )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_world_size) identifier_world_size )return_statement )block )function_definition )module
Gets total number of distributed workers or returns one if distributed is not initialized.
(module (function_definition (function_name_almost_equal_norm) function_name_almost_equal_norm (parameters (identifier_self) identifier_self (identifier_other) identifier_other (identifier_tol) identifier_tol (default_parameter (identifier_relative) identifier_relative (True) True )default_parameter )parameters (block (if_statement (parenthesized_expression (comparison_operator (identifier_tol) identifier_tol (integer_0) integer_0 )comparison_operator )parenthesized_expression (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"Tolerance cannot be negative") string_"Tolerance cannot be negative" )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_other) identifier_other )argument_list )call (call (identifier_type) identifier_type (argument_list (identifier_self) identifier_self )argument_list )call )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_dtype) identifier_dtype )attribute (attribute (identifier_other) identifier_other (identifier_dtype) identifier_dtype )attribute )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_self) identifier_self )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_other) identifier_other )argument_list )call )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_diff) identifier_diff (binary_operator (call (attribute (identifier_self) identifier_self (identifier_numpy) identifier_numpy )attribute (argument_list )argument_list )call (call (attribute (identifier_other) identifier_other (identifier_numpy) identifier_numpy )attribute (argument_list )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_dnorm) identifier_dnorm (call (identifier_norm) identifier_norm (argument_list (identifier_diff) identifier_diff )argument_list )call )assignment )expression_statement (if_statement (identifier_relative) identifier_relative (block (return_statement (parenthesized_expression (comparison_operator (identifier_dnorm) identifier_dnorm (binary_operator (identifier_tol) identifier_tol (call (identifier_norm) identifier_norm (argument_list (identifier_self) identifier_self )argument_list )call )binary_operator )comparison_operator )parenthesized_expression )return_statement )block (else_clause (block (return_statement (parenthesized_expression (comparison_operator (identifier_dnorm) identifier_dnorm (identifier_tol) identifier_tol )comparison_operator )parenthesized_expression )return_statement )block )else_clause )if_statement )block )function_definition )module
Compare whether two array types are almost equal, normwise. If the 'relative' parameter is 'True' (the default) then the 'tol' parameter (which must be positive) is interpreted as a relative tolerance, and the comparison returns 'True' only if abs(norm(self-other)) <= tol*abs(norm(self)). If 'relative' is 'False', then 'tol' is an absolute tolerance, and the comparison is true only if abs(norm(self-other)) <= tol Other meta-data (type, dtype, and length) must be exactly equal. If either object's memory lives on the GPU it will be copied to the CPU for the comparison, which may be slow. But the original object itself will not have its memory relocated nor scheme changed. Parameters ---------- other another Python object, that should be tested for almost-equality with 'self', based on their norms. tol a non-negative number, the tolerance, which is interpreted as either a relative tolerance (the default) or an absolute tolerance. relative A boolean, indicating whether 'tol' should be interpreted as a relative tolerance (if True, the default if this argument is omitted) or as an absolute tolerance (if tol is False). Returns ------- boolean 'True' if the data agree within the tolerance, as interpreted by the 'relative' keyword, and if the types, lengths, and dtypes are exactly the same.
(module (function_definition (function_name__add_transcripts) function_name__add_transcripts (parameters (identifier_self) identifier_self (identifier_variant_obj) identifier_variant_obj (identifier_gemini_variant) identifier_gemini_variant )parameters (block (expression_statement (assignment (identifier_query) identifier_query (call (attribute (string_"SELECT * from variant_impacts WHERE variant_id = {0}") string_"SELECT * from variant_impacts WHERE variant_id = {0}" (identifier_format) identifier_format )attribute (argument_list (subscript (identifier_gemini_variant) identifier_gemini_variant (string_'variant_id') string_'variant_id' )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_gq) identifier_gq (call (identifier_GeminiQuery) identifier_GeminiQuery (argument_list (attribute (identifier_self) identifier_self (identifier_db) identifier_db )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_gq) identifier_gq (identifier_run) identifier_run )attribute (argument_list (identifier_query) identifier_query )argument_list )call )expression_statement (for_statement (identifier_gemini_transcript) identifier_gemini_transcript (identifier_gq) identifier_gq (block (expression_statement (assignment (identifier_transcript) identifier_transcript (call (identifier_Transcript) identifier_Transcript (argument_list (keyword_argument (identifier_hgnc_symbol) identifier_hgnc_symbol (subscript (identifier_gemini_transcript) identifier_gemini_transcript (string_'gene') string_'gene' )subscript )keyword_argument (keyword_argument (identifier_transcript_id) identifier_transcript_id (subscript (identifier_gemini_transcript) identifier_gemini_transcript (string_'transcript') string_'transcript' )subscript )keyword_argument (keyword_argument (identifier_consequence) identifier_consequence (subscript (identifier_gemini_transcript) identifier_gemini_transcript (string_'impact_so') string_'impact_so' )subscript )keyword_argument (keyword_argument (identifier_biotype) identifier_biotype (subscript (identifier_gemini_transcript) identifier_gemini_transcript (string_'biotype') string_'biotype' )subscript )keyword_argument (keyword_argument (identifier_polyphen) identifier_polyphen (subscript (identifier_gemini_transcript) identifier_gemini_transcript (string_'polyphen_pred') string_'polyphen_pred' )subscript )keyword_argument (keyword_argument (identifier_sift) identifier_sift (subscript (identifier_gemini_transcript) identifier_gemini_transcript (string_'sift_pred') string_'sift_pred' )subscript )keyword_argument (keyword_argument (identifier_HGVSc) identifier_HGVSc (subscript (identifier_gemini_transcript) identifier_gemini_transcript (string_'codon_change') string_'codon_change' )subscript )keyword_argument (keyword_argument (identifier_HGVSp) identifier_HGVSp (call (attribute (string_', ') string_', ' (identifier_join) identifier_join )attribute (argument_list (list (boolean_operator (subscript (identifier_gemini_transcript) identifier_gemini_transcript (string_'aa_change') string_'aa_change' )subscript (string_'') string_'' )boolean_operator (boolean_operator (subscript (identifier_gemini_transcript) identifier_gemini_transcript (string_'aa_length') string_'aa_length' )subscript (string_'') string_'' )boolean_operator )list )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_variant_obj) identifier_variant_obj (identifier_add_transcript) identifier_add_transcript )attribute (argument_list (identifier_transcript) identifier_transcript )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Add all transcripts for a variant Go through all transcripts found for the variant Args: gemini_variant (GeminiQueryRow): The gemini variant Yields: transcript (puzzle.models.Transcript)
(module (function_definition (function_name_get_product_metadata_path) function_name_get_product_metadata_path (parameters (identifier_product_name) identifier_product_name )parameters (block (expression_statement (assignment (identifier_string_date) identifier_string_date (subscript (call (attribute (identifier_product_name) identifier_product_name (identifier_split) identifier_split )attribute (argument_list (string_'_') string_'_' )argument_list )call (unary_operator (integer_1) integer_1 )unary_operator )subscript )assignment )expression_statement (expression_statement (assignment (identifier_date) identifier_date (call (attribute (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute (identifier_strptime) identifier_strptime )attribute (argument_list (identifier_string_date) identifier_string_date (string_'%Y%m%dT%H%M%S') string_'%Y%m%dT%H%M%S' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_path) identifier_path (call (attribute (string_'products/{0}/{1}/{2}/{3}') string_'products/{0}/{1}/{2}/{3}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_date) identifier_date (identifier_year) identifier_year )attribute (attribute (identifier_date) identifier_date (identifier_month) identifier_month )attribute (attribute (identifier_date) identifier_date (identifier_day) identifier_day )attribute (identifier_product_name) identifier_product_name )argument_list )call )assignment )expression_statement (return_statement (dictionary (pair (identifier_product_name) identifier_product_name (dictionary (pair (string_'metadata') string_'metadata' (call (attribute (string_'{0}/{1}') string_'{0}/{1}' (identifier_format) identifier_format )attribute (argument_list (identifier_path) identifier_path (string_'metadata.xml') string_'metadata.xml' )argument_list )call )pair (pair (string_'tiles') string_'tiles' (call (identifier_get_tile_metadata_path) identifier_get_tile_metadata_path (argument_list (call (attribute (string_'{0}/{1}') string_'{0}/{1}' (identifier_format) identifier_format )attribute (argument_list (identifier_path) identifier_path (string_'productInfo.json') string_'productInfo.json' )argument_list )call )argument_list )call )pair )dictionary )pair )dictionary )return_statement )block )function_definition )module
gets a single products metadata
(module (function_definition (function_name_hmget) function_name_hmget (parameters (identifier_key) identifier_key (list_splat_pattern (identifier_fields) identifier_fields )list_splat_pattern (dictionary_splat_pattern (identifier_options) identifier_options )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_host) identifier_host (call (attribute (identifier_options) identifier_options (identifier_get) identifier_get )attribute (argument_list (string_'host') string_'host' (None) None )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_port) identifier_port (call (attribute (identifier_options) identifier_options (identifier_get) identifier_get )attribute (argument_list (string_'port') string_'port' (None) None )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_database) identifier_database (call (attribute (identifier_options) identifier_options (identifier_get) identifier_get )attribute (argument_list (string_'db') string_'db' (None) None )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_password) identifier_password (call (attribute (identifier_options) identifier_options (identifier_get) identifier_get )attribute (argument_list (string_'password') string_'password' (None) None )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_server) identifier_server (call (identifier__connect) identifier__connect (argument_list (identifier_host) identifier_host (identifier_port) identifier_port (identifier_database) identifier_database (identifier_password) identifier_password )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_server) identifier_server (identifier_hmget) identifier_hmget )attribute (argument_list (identifier_key) identifier_key (list_splat (identifier_fields) identifier_fields )list_splat )argument_list )call )return_statement )block )function_definition )module
Returns the values of all the given hash fields. .. versionadded:: 2017.7.0 CLI Example: .. code-block:: bash salt '*' redis.hmget foo_hash bar_field1 bar_field2
(module (function_definition (function_name_segment) function_name_segment (parameters (identifier_self) identifier_self (identifier_eps) identifier_eps (identifier_min_time) identifier_min_time )parameters (block (expression_statement (assignment (identifier_new_segments) identifier_new_segments (list )list )assignment )expression_statement (for_statement (identifier_segment) identifier_segment (attribute (identifier_self) identifier_self (identifier_segments) identifier_segments )attribute (block (expression_statement (assignment (identifier_segmented) identifier_segmented (call (attribute (identifier_segment) identifier_segment (identifier_segment) identifier_segment )attribute (argument_list (identifier_eps) identifier_eps (identifier_min_time) identifier_min_time )argument_list )call )assignment )expression_statement (for_statement (identifier_seg) identifier_seg (identifier_segmented) identifier_segmented (block (expression_statement (call (attribute (identifier_new_segments) identifier_new_segments (identifier_append) identifier_append )attribute (argument_list (call (identifier_Segment) identifier_Segment (argument_list (identifier_seg) identifier_seg )argument_list )call )argument_list )call )expression_statement )block )for_statement )block )for_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_segments) identifier_segments )attribute (identifier_new_segments) identifier_new_segments )assignment )expression_statement (return_statement (identifier_self) identifier_self )return_statement )block )function_definition )module
In-place segmentation of segments Spatio-temporal segmentation of each segment The number of segments may increse after this step Returns: This track
(module (function_definition (function_name_set_suffix) function_name_set_suffix (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_suffix) identifier_suffix )attribute (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_w) identifier_w )attribute (identifier_suffix) identifier_suffix )attribute (identifier_get_text) identifier_get_text )attribute (argument_list )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 (call (attribute (string_'Output suffix set to {0}') string_'Output suffix set to {0}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_suffix) identifier_suffix )attribute )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Set output suffix.
(module (function_definition (function_name_jdnDate) function_name_jdnDate (parameters (identifier_jdn) identifier_jdn )parameters (block (expression_statement (assignment (identifier_a) identifier_a (binary_operator (identifier_jdn) identifier_jdn (integer_32044) integer_32044 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_b) identifier_b (binary_operator (parenthesized_expression (binary_operator (binary_operator (integer_4) integer_4 (identifier_a) identifier_a )binary_operator (integer_3) integer_3 )binary_operator )parenthesized_expression (integer_146097) integer_146097 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_c) identifier_c (binary_operator (identifier_a) identifier_a (binary_operator (parenthesized_expression (binary_operator (integer_146097) integer_146097 (identifier_b) identifier_b )binary_operator )parenthesized_expression (integer_4) integer_4 )binary_operator )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_d) identifier_d (binary_operator (parenthesized_expression (binary_operator (binary_operator (integer_4) integer_4 (identifier_c) identifier_c )binary_operator (integer_3) integer_3 )binary_operator )parenthesized_expression (integer_1461) integer_1461 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_e) identifier_e (binary_operator (identifier_c) identifier_c (binary_operator (parenthesized_expression (binary_operator (integer_1461) integer_1461 (identifier_d) identifier_d )binary_operator )parenthesized_expression (integer_4) integer_4 )binary_operator )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_m) identifier_m (binary_operator (parenthesized_expression (binary_operator (binary_operator (integer_5) integer_5 (identifier_e) identifier_e )binary_operator (integer_2) integer_2 )binary_operator )parenthesized_expression (integer_153) integer_153 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_day) identifier_day (binary_operator (binary_operator (identifier_e) identifier_e (integer_1) integer_1 )binary_operator (binary_operator (parenthesized_expression (binary_operator (binary_operator (integer_153) integer_153 (identifier_m) identifier_m )binary_operator (integer_2) integer_2 )binary_operator )parenthesized_expression (integer_5) integer_5 )binary_operator )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_month) identifier_month (binary_operator (binary_operator (identifier_m) identifier_m (integer_3) integer_3 )binary_operator (binary_operator (integer_12) integer_12 (parenthesized_expression (binary_operator (identifier_m) identifier_m (integer_10) integer_10 )binary_operator )parenthesized_expression )binary_operator )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_year) identifier_year (binary_operator (binary_operator (binary_operator (binary_operator (integer_100) integer_100 (identifier_b) identifier_b )binary_operator (identifier_d) identifier_d )binary_operator (integer_4800) integer_4800 )binary_operator (binary_operator (identifier_m) identifier_m (integer_10) integer_10 )binary_operator )binary_operator )assignment )expression_statement (return_statement (list (identifier_year) identifier_year (identifier_month) identifier_month (identifier_day) identifier_day )list )return_statement )block )function_definition )module
Converts Julian Day Number to Gregorian date.
(module (function_definition (function_name_sortable_title) function_name_sortable_title (parameters (identifier_portal) identifier_portal (identifier_title) identifier_title )parameters (block (if_statement (not_operator (identifier_title) identifier_title )not_operator (block (return_statement (string_'') string_'' )return_statement )block )if_statement (expression_statement (assignment (identifier_def_charset) identifier_def_charset (call (attribute (attribute (identifier_portal) identifier_portal (identifier_plone_utils) identifier_plone_utils )attribute (identifier_getSiteEncoding) identifier_getSiteEncoding )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_sortabletitle) identifier_sortabletitle (call (identifier_str) identifier_str (argument_list (call (attribute (call (attribute (identifier_title) identifier_title (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_sortabletitle) identifier_sortabletitle (call (attribute (identifier_num_sort_regex) identifier_num_sort_regex (identifier_sub) identifier_sub )attribute (argument_list (identifier_zero_fill) identifier_zero_fill (identifier_sortabletitle) identifier_sortabletitle )argument_list )call )assignment )expression_statement (for_statement (identifier_charset) identifier_charset (list (identifier_def_charset) identifier_def_charset (string_'latin-1') string_'latin-1' (string_'utf-8') string_'utf-8' )list (block (try_statement (block (expression_statement (assignment (identifier_sortabletitle) identifier_sortabletitle (subscript (call (identifier_safe_unicode) identifier_safe_unicode (argument_list (identifier_sortabletitle) identifier_sortabletitle (identifier_charset) identifier_charset )argument_list )call (slice (colon) colon (integer_30) integer_30 )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_sortabletitle) identifier_sortabletitle (call (attribute (identifier_sortabletitle) identifier_sortabletitle (identifier_encode) identifier_encode )attribute (argument_list (boolean_operator (identifier_def_charset) identifier_def_charset (string_'utf-8') string_'utf-8' )boolean_operator )argument_list )call )assignment )expression_statement (break_statement )break_statement )block (except_clause (identifier_UnicodeError) identifier_UnicodeError (block (pass_statement )pass_statement )block )except_clause (except_clause (identifier_TypeError) identifier_TypeError (block (expression_statement (assignment (identifier_sortabletitle) identifier_sortabletitle (subscript (identifier_sortabletitle) identifier_sortabletitle (slice (colon) colon (integer_30) integer_30 )slice )subscript )assignment )expression_statement (break_statement )break_statement )block )except_clause )try_statement )block )for_statement (return_statement (identifier_sortabletitle) identifier_sortabletitle )return_statement )block )function_definition )module
Convert title to sortable title
(module (function_definition (function_name_public_key_sec) function_name_public_key_sec (parameters (identifier_self) identifier_self )parameters (block (if_statement (call (attribute (identifier_self) identifier_self (identifier_is_coinbase) identifier_is_coinbase )attribute (argument_list )argument_list )call (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_opcodes) identifier_opcodes (call (attribute (identifier_ScriptTools) identifier_ScriptTools (identifier_opcode_list) identifier_opcode_list )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_script) identifier_script )attribute )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_opcodes) identifier_opcodes )argument_list )call (integer_2) integer_2 )comparison_operator (call (attribute (subscript (identifier_opcodes) identifier_opcodes (integer_0) integer_0 )subscript (identifier_startswith) identifier_startswith )attribute (argument_list (string_"[30") string_"[30" )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_sec) identifier_sec (call (identifier_h2b) identifier_h2b (argument_list (subscript (subscript (identifier_opcodes) identifier_opcodes (integer_1) integer_1 )subscript (slice (integer_1) integer_1 (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript )argument_list )call )assignment )expression_statement (return_statement (identifier_sec) identifier_sec )return_statement )block )if_statement (return_statement (None) None )return_statement )block )function_definition )module
Return the public key as sec, or None in case of failure.
(module (function_definition (function_name_list_scans) function_name_list_scans (parameters (identifier_self) identifier_self (default_parameter (identifier_source_id) identifier_source_id (None) None )default_parameter )parameters (block (if_statement (identifier_source_id) identifier_source_id (block (expression_statement (assignment (identifier_target_url) identifier_target_url (call (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_get_url) identifier_get_url )attribute (argument_list (string_'SCAN') string_'SCAN' (string_'GET') string_'GET' (string_'multi') string_'multi' (dictionary (pair (string_'source_id') string_'source_id' (identifier_source_id) identifier_source_id )pair )dictionary )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_target_url) identifier_target_url (call (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_get_ulr) identifier_get_ulr )attribute (argument_list (string_'SCAN') string_'SCAN' (string_'GET') string_'GET' (string_'all') string_'all' )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (call (attribute (identifier_base) identifier_base (identifier_Query) identifier_Query )attribute (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_get_manager) identifier_get_manager )attribute (argument_list (identifier_Scan) identifier_Scan )argument_list )call (identifier_target_url) identifier_target_url )argument_list )call )return_statement )block )function_definition )module
Filterable list of Scans for a Source. Ordered newest to oldest by default
(module (function_definition (function_name_process_delayed_asserts) function_name_process_delayed_asserts (parameters (identifier_self) identifier_self (default_parameter (identifier_print_only) identifier_print_only (False) False )default_parameter )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier___delayed_assert_failures) identifier___delayed_assert_failures )attribute (block (expression_statement (assignment (identifier_exception_output) identifier_exception_output (string_'') string_'' )assignment )expression_statement (expression_statement (augmented_assignment (identifier_exception_output) identifier_exception_output (string_"\n*** DELAYED ASSERTION FAILURES FOR: ") string_"\n*** DELAYED ASSERTION FAILURES FOR: " )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_exception_output) identifier_exception_output (binary_operator (string_"%s\n") string_"%s\n" (call (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute (argument_list )argument_list )call )binary_operator )augmented_assignment )expression_statement (expression_statement (assignment (identifier_all_failing_checks) identifier_all_failing_checks (attribute (identifier_self) identifier_self (identifier___delayed_assert_failures) identifier___delayed_assert_failures )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier___delayed_assert_failures) identifier___delayed_assert_failures )attribute (list )list )assignment )expression_statement (for_statement (identifier_tb) identifier_tb (identifier_all_failing_checks) identifier_all_failing_checks (block (expression_statement (augmented_assignment (identifier_exception_output) identifier_exception_output (binary_operator (string_"%s\n") string_"%s\n" (identifier_tb) identifier_tb )binary_operator )augmented_assignment )expression_statement )block )for_statement (if_statement (identifier_print_only) identifier_print_only (block (expression_statement (call (identifier_print) identifier_print (argument_list (identifier_exception_output) identifier_exception_output )argument_list )call )expression_statement )block (else_clause (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (identifier_exception_output) identifier_exception_output )argument_list )call )raise_statement )block )else_clause )if_statement )block )if_statement )block )function_definition )module
To be used with any test that uses delayed_asserts, which are non-terminating verifications that only raise exceptions after this method is called. This is useful for pages with multiple elements to be checked when you want to find as many bugs as possible in a single test run before having all the exceptions get raised simultaneously. Might be more useful if this method is called after processing all the delayed asserts on a single html page so that the failure screenshot matches the location of the delayed asserts. If "print_only" is set to True, the exception won't get raised.
(module (function_definition (function_name_changed) function_name_changed (parameters (identifier_self) identifier_self (default_parameter (identifier_code_changed) identifier_code_changed (False) False )default_parameter (default_parameter (identifier_value_changed) identifier_value_changed (False) False )default_parameter )parameters (block (for_statement (identifier_d) identifier_d (attribute (identifier_self) identifier_self (identifier__dependents) identifier__dependents )attribute (block (expression_statement (call (attribute (identifier_d) identifier_d (identifier__dep_changed) identifier__dep_changed )attribute (argument_list (identifier_self) identifier_self (keyword_argument (identifier_code_changed) identifier_code_changed (identifier_code_changed) identifier_code_changed )keyword_argument (keyword_argument (identifier_value_changed) identifier_value_changed (identifier_value_changed) identifier_value_changed )keyword_argument )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Inform dependents that this shaderobject has changed.
(module (function_definition (function_name_multi_lpop) function_name_multi_lpop (parameters (identifier_self) identifier_self (identifier_queue) identifier_queue (identifier_number) identifier_number (default_parameter (identifier_transaction) identifier_transaction (False) False )default_parameter )parameters (block (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__multi_lpop_pipeline) identifier__multi_lpop_pipeline )attribute (argument_list (identifier_self) identifier_self (identifier_queue) identifier_queue (identifier_number) identifier_number )argument_list )call )expression_statement )block (except_clause (block (raise_statement )raise_statement )block )except_clause )try_statement )block )function_definition )module
Pops multiple elements from a list
(module (function_definition (function_name_visit_DictComp) function_name_visit_DictComp (parameters (identifier_self) identifier_self (typed_parameter (identifier_node) identifier_node (type (attribute (identifier_ast) identifier_ast (identifier_DictComp) identifier_DictComp )attribute )type )typed_parameter )parameters (type (None) None )type (block (if_statement (comparison_operator (identifier_node) identifier_node (attribute (identifier_self) identifier_self (identifier__recomputed_values) identifier__recomputed_values )attribute )comparison_operator (block (expression_statement (assignment (identifier_value) identifier_value (subscript (attribute (identifier_self) identifier_self (identifier__recomputed_values) identifier__recomputed_values )attribute (identifier_node) identifier_node )subscript )assignment )expression_statement (expression_statement (assignment (identifier_text) identifier_text (call (attribute (attribute (identifier_self) identifier_self (identifier__atok) identifier__atok )attribute (identifier_get_text) identifier_get_text )attribute (argument_list (identifier_node) identifier_node )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_reprs) identifier_reprs )attribute (identifier_text) identifier_text )subscript (identifier_value) identifier_value )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_generic_visit) identifier_generic_visit )attribute (argument_list (keyword_argument (identifier_node) identifier_node (identifier_node) identifier_node )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Represent the dictionary comprehension by dumping its source code.
(module (function_definition (function_name_validate) function_name_validate (parameters (identifier_self) identifier_self (identifier_value) identifier_value )parameters (block (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier_required) identifier_required )attribute (not_operator (identifier_value) identifier_value )not_operator )boolean_operator (block (raise_statement (call (identifier_OAuthValidationError) identifier_OAuthValidationError (argument_list (dictionary (pair (string_'error') string_'error' (string_'invalid_request') string_'invalid_request' )pair )dictionary )argument_list )call )raise_statement )block )if_statement (for_statement (identifier_val) identifier_val (identifier_value) identifier_value (block (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier_valid_value) identifier_valid_value )attribute (argument_list (identifier_val) identifier_val )argument_list )call )not_operator (block (raise_statement (call (identifier_OAuthValidationError) identifier_OAuthValidationError (argument_list (dictionary (pair (string_'error') string_'error' (string_'invalid_request') string_'invalid_request' )pair (pair (string_'error_description') string_'error_description' (binary_operator (call (identifier__) identifier__ (argument_list (string_"'%s' is not a valid scope.") string_"'%s' is not a valid scope." )argument_list )call (line_continuation_\) line_continuation_\ (identifier_val) identifier_val )binary_operator )pair )dictionary )argument_list )call )raise_statement )block )if_statement )block )for_statement )block )function_definition )module
Validates that the input is a list or tuple.
(module (function_definition (function_name__from_rest_on_create) function_name__from_rest_on_create (parameters (identifier_model) identifier_model (identifier_props) identifier_props )parameters (block (expression_statement (assignment (identifier_fields) identifier_fields (call (attribute (identifier_model) identifier_model (identifier_get_fields_with_prop) identifier_get_fields_with_prop )attribute (argument_list (string_'on_create') string_'on_create' )argument_list )call )assignment )expression_statement (for_statement (identifier_field) identifier_field (identifier_fields) identifier_fields (block (expression_statement (assignment (subscript (identifier_props) identifier_props (subscript (identifier_field) identifier_field (integer_0) integer_0 )subscript )subscript (subscript (identifier_field) identifier_field (integer_1) integer_1 )subscript )assignment )expression_statement )block )for_statement )block )function_definition )module
Assign the default values when creating a model This is done on fields with `on_create=<value>`.
(module (function_definition (function_name_load_args) function_name_load_args (parameters (identifier_self) identifier_self (identifier_args) identifier_args (identifier_clargs) identifier_clargs )parameters (block (expression_statement (assignment (identifier_args) identifier_args (call (attribute (attribute (identifier_self) identifier_self (identifier_parser) identifier_parser )attribute (identifier_parse_args) identifier_parse_args )attribute (argument_list (keyword_argument (identifier_args) identifier_args (identifier_clargs) identifier_clargs )keyword_argument (keyword_argument (identifier_namespace) identifier_namespace (identifier_args) identifier_args )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_args) identifier_args (identifier_subcommand) identifier_subcommand )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_parser) identifier_parser )attribute (identifier_print_help) identifier_print_help )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_args) identifier_args (None) None )assignment )expression_statement )block )if_statement (return_statement (identifier_args) identifier_args )return_statement )block )function_definition )module
Parse arguments and return configuration settings.
(module (function_definition (function_name_hosts_args) function_name_hosts_args (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_host_args) identifier_host_args (list )list )assignment )expression_statement (for_statement (identifier_row) identifier_row (attribute (identifier_self) identifier_self (identifier_hosts) identifier_hosts )attribute (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_row) identifier_row (identifier_dict) identifier_dict )argument_list )call (block (expression_statement (call (attribute (identifier_host_args) identifier_host_args (identifier_append) identifier_append )attribute (argument_list (subscript (identifier_row) identifier_row (string_"host") string_"host" )subscript )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_host_args) identifier_host_args (identifier_append) identifier_append )attribute (argument_list (identifier_row) identifier_row )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (expression_statement (assignment (identifier_dedupe) identifier_dedupe (call (identifier_list) identifier_list (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_each) identifier_each (identifier_host_args) identifier_host_args (block (if_statement (comparison_operator (identifier_each) identifier_each (identifier_dedupe) identifier_dedupe )comparison_operator (block (expression_statement (call (attribute (identifier_dedupe) identifier_dedupe (identifier_append) identifier_append )attribute (argument_list (identifier_each) identifier_each )argument_list )call )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_dedupe) identifier_dedupe )return_statement )block )function_definition )module
hosts list can contain strings specifying a host directly or dicts containing a "host" key to specify the host this way we can allow passing further config details (color, name etc.) with each host as well as simply dropping in addresses for quick setup depending on the user's needs
(module (function_definition (function_name_run) function_name_run (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_graphite) identifier_graphite )attribute (identifier_start) identifier_start )attribute (argument_list )argument_list )call )expression_statement (while_statement (True) True (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (string_'Graphite pusher is sleeping for %d seconds') string_'Graphite pusher is sleeping for %d seconds' (attribute (identifier_self) identifier_self (identifier_period) identifier_period )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_time) identifier_time (identifier_sleep) identifier_sleep )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_period) identifier_period )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (string_'Pushing stats to Graphite') string_'Pushing stats to Graphite' )argument_list )call )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_push) identifier_push )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (string_'Done pushing stats to Graphite') string_'Done pushing stats to Graphite' )argument_list )call )expression_statement )block (except_clause (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_exception) identifier_exception )attribute (argument_list (string_'Exception while pushing stats to Graphite') string_'Exception while pushing stats to Graphite' )argument_list )call )expression_statement (raise_statement )raise_statement )block )except_clause )try_statement )block )while_statement )block )function_definition )module
Loop forever, pushing out stats.
(module (function_definition (function_name_itermovieshash) function_name_itermovieshash (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_cur) identifier_cur (call (attribute (attribute (identifier_self) identifier_self (identifier__db) identifier__db )attribute (identifier_firstkey) identifier_firstkey )attribute (argument_list )argument_list )call )assignment )expression_statement (while_statement (comparison_operator (identifier_cur) identifier_cur (None) None )comparison_operator (block (expression_statement (yield (identifier_cur) identifier_cur )yield )expression_statement (expression_statement (assignment (identifier_cur) identifier_cur (call (attribute (attribute (identifier_self) identifier_self (identifier__db) identifier__db )attribute (identifier_nextkey) identifier_nextkey )attribute (argument_list (identifier_cur) identifier_cur )argument_list )call )assignment )expression_statement )block )while_statement )block )function_definition )module
Iterate over movies hash stored in the database.
(module (function_definition (function_name_aes_encrypt) function_name_aes_encrypt (parameters (typed_parameter (identifier_key) identifier_key (type (identifier_bytes) identifier_bytes )type )typed_parameter (typed_parameter (identifier_plain_text) identifier_plain_text (type (identifier_bytes) identifier_bytes )type )typed_parameter )parameters (type (identifier_bytes) identifier_bytes )type (block (expression_statement (assignment (identifier_aes_cipher) identifier_aes_cipher (call (attribute (identifier_AES) identifier_AES (identifier_new) identifier_new )attribute (argument_list (identifier_key) identifier_key (identifier_AES_CIPHER_MODE) identifier_AES_CIPHER_MODE )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_encrypted) identifier_encrypted (identifier_tag) identifier_tag )pattern_list (call (attribute (identifier_aes_cipher) identifier_aes_cipher (identifier_encrypt_and_digest) identifier_encrypt_and_digest )attribute (argument_list (identifier_plain_text) identifier_plain_text )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cipher_text) identifier_cipher_text (call (identifier_bytearray) identifier_bytearray (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_cipher_text) identifier_cipher_text (identifier_extend) identifier_extend )attribute (argument_list (attribute (identifier_aes_cipher) identifier_aes_cipher (identifier_nonce) identifier_nonce )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_cipher_text) identifier_cipher_text (identifier_extend) identifier_extend )attribute (argument_list (identifier_tag) identifier_tag )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_cipher_text) identifier_cipher_text (identifier_extend) identifier_extend )attribute (argument_list (identifier_encrypted) identifier_encrypted )argument_list )call )expression_statement (return_statement (call (identifier_bytes) identifier_bytes (argument_list (identifier_cipher_text) identifier_cipher_text )argument_list )call )return_statement )block )function_definition )module
AES-GCM encryption Parameters ---------- key: bytes AES session key, which derived from two secp256k1 keys plain_text: bytes Plain text to encrypt Returns ------- bytes nonce(16 bytes) + tag(16 bytes) + encrypted data
(module (function_definition (function_name_scroll_to) function_name_scroll_to (parameters (identifier_self) identifier_self (identifier_selector) identifier_selector (default_parameter (identifier_by) identifier_by (attribute (identifier_By) identifier_By (identifier_CSS_SELECTOR) identifier_CSS_SELECTOR )attribute )default_parameter (default_parameter (identifier_timeout) identifier_timeout (attribute (identifier_settings) identifier_settings (identifier_SMALL_TIMEOUT) identifier_SMALL_TIMEOUT )attribute )default_parameter )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_demo_mode) identifier_demo_mode )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_slow_scroll_to) identifier_slow_scroll_to )attribute (argument_list (identifier_selector) identifier_selector (keyword_argument (identifier_by) identifier_by (identifier_by) identifier_by )keyword_argument (keyword_argument (identifier_timeout) identifier_timeout (identifier_timeout) identifier_timeout )keyword_argument )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier_timeout_multiplier) identifier_timeout_multiplier )attribute (comparison_operator (identifier_timeout) identifier_timeout (attribute (identifier_settings) identifier_settings (identifier_SMALL_TIMEOUT) identifier_SMALL_TIMEOUT )attribute )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_timeout) identifier_timeout (call (attribute (identifier_self) identifier_self (identifier___get_new_timeout) identifier___get_new_timeout )attribute (argument_list (identifier_timeout) identifier_timeout )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_element) identifier_element (call (attribute (identifier_self) identifier_self (identifier_wait_for_element_visible) identifier_wait_for_element_visible )attribute (argument_list (identifier_selector) identifier_selector (keyword_argument (identifier_by) identifier_by (identifier_by) identifier_by )keyword_argument (keyword_argument (identifier_timeout) identifier_timeout (identifier_timeout) identifier_timeout )keyword_argument )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier___scroll_to_element) identifier___scroll_to_element )attribute (argument_list (identifier_element) identifier_element )argument_list )call )expression_statement )block (except_clause (tuple (identifier_StaleElementReferenceException) identifier_StaleElementReferenceException (identifier_ENI_Exception) identifier_ENI_Exception )tuple (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_wait_for_ready_state_complete) identifier_wait_for_ready_state_complete )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_time) identifier_time (identifier_sleep) identifier_sleep )attribute (argument_list (float_0.05) float_0.05 )argument_list )call )expression_statement (expression_statement (assignment (identifier_element) identifier_element (call (attribute (identifier_self) identifier_self (identifier_wait_for_element_visible) identifier_wait_for_element_visible )attribute (argument_list (identifier_selector) identifier_selector (keyword_argument (identifier_by) identifier_by (identifier_by) identifier_by )keyword_argument (keyword_argument (identifier_timeout) identifier_timeout (identifier_timeout) identifier_timeout )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier___scroll_to_element) identifier___scroll_to_element )attribute (argument_list (identifier_element) identifier_element )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )module
Fast scroll to destination
(module (function_definition (function_name_get_blocks) function_name_get_blocks (parameters (identifier_self) identifier_self (default_parameter (identifier_block_structure) identifier_block_structure (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_block_structure) identifier_block_structure (None) None )comparison_operator (block (expression_statement (assignment (identifier_block_structure) identifier_block_structure (attribute (identifier_self) identifier_self (identifier_block_structure) identifier_block_structure )attribute )assignment )expression_statement )block )if_statement (try_statement (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__get_blocks) identifier__get_blocks )attribute (argument_list (identifier_block_structure) identifier_block_structure )argument_list )call )return_statement )block (except_clause (as_pattern (identifier_IncompatibleBlockStructures) identifier_IncompatibleBlockStructures (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (raise_statement (identifier_e) identifier_e )raise_statement )block )except_clause )try_statement )block )function_definition )module
For a reducible circuit, get a sequence of subblocks that when concatenated again yield the original circuit. The block structure given has to be compatible with the circuits actual block structure, i.e. it can only be more coarse-grained. Args: block_structure (tuple): The block structure according to which the subblocks are generated (default = ``None``, corresponds to the circuit's own block structure) Returns: A tuple of subblocks that the circuit consists of. Raises: .IncompatibleBlockStructures
(module (function_definition (function_name_blend_rect) function_name_blend_rect (parameters (identifier_self) identifier_self (identifier_x0) identifier_x0 (identifier_y0) identifier_y0 (identifier_x1) identifier_x1 (identifier_y1) identifier_y1 (identifier_dx) identifier_dx (identifier_dy) identifier_dy (identifier_destination) identifier_destination (default_parameter (identifier_alpha) identifier_alpha (integer_0xff) integer_0xff )default_parameter )parameters (block (expression_statement (assignment (pattern_list (identifier_x0) identifier_x0 (identifier_y0) identifier_y0 (identifier_x1) identifier_x1 (identifier_y1) identifier_y1 )pattern_list (call (attribute (identifier_self) identifier_self (identifier_rect_helper) identifier_rect_helper )attribute (argument_list (identifier_x0) identifier_x0 (identifier_y0) identifier_y0 (identifier_x1) identifier_x1 (identifier_y1) identifier_y1 )argument_list )call )assignment )expression_statement (for_statement (identifier_x) identifier_x (call (identifier_range) identifier_range (argument_list (identifier_x0) identifier_x0 (binary_operator (identifier_x1) identifier_x1 (integer_1) integer_1 )binary_operator )argument_list )call (block (for_statement (identifier_y) identifier_y (call (identifier_range) identifier_range (argument_list (identifier_y0) identifier_y0 (binary_operator (identifier_y1) identifier_y1 (integer_1) integer_1 )binary_operator )argument_list )call (block (expression_statement (assignment (identifier_o) identifier_o (call (attribute (identifier_self) identifier_self (identifier__offset) identifier__offset )attribute (argument_list (identifier_x) identifier_x (identifier_y) identifier_y )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_rgba) identifier_rgba (subscript (attribute (identifier_self) identifier_self (identifier_canvas) identifier_canvas )attribute (slice (identifier_o) identifier_o (colon) colon (binary_operator (identifier_o) identifier_o (integer_4) integer_4 )binary_operator )slice )subscript )assignment )expression_statement (expression_statement (assignment (subscript (identifier_rgba) identifier_rgba (integer_3) integer_3 )subscript (identifier_alpha) identifier_alpha )assignment )expression_statement (expression_statement (call (attribute (identifier_destination) identifier_destination (identifier_point) identifier_point )attribute (argument_list (binary_operator (binary_operator (identifier_dx) identifier_dx (identifier_x) identifier_x )binary_operator (identifier_x0) identifier_x0 )binary_operator (binary_operator (binary_operator (identifier_dy) identifier_dy (identifier_y) identifier_y )binary_operator (identifier_y0) identifier_y0 )binary_operator (identifier_rgba) identifier_rgba )argument_list )call )expression_statement )block )for_statement )block )for_statement )block )function_definition )module
Blend a rectangle onto the image
(module (function_definition (function_name_asset_class) function_name_asset_class (parameters (identifier_self) identifier_self )parameters (type (identifier_str) identifier_str )type (block (expression_statement (assignment (identifier_result) identifier_result (conditional_expression (attribute (attribute (identifier_self) identifier_self (identifier_parent) identifier_parent )attribute (identifier_name) identifier_name )attribute (attribute (identifier_self) identifier_self (identifier_parent) identifier_parent )attribute (string_"") string_"" )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_cursor) identifier_cursor (attribute (identifier_self) identifier_self (identifier_parent) identifier_parent )attribute )assignment )expression_statement (while_statement (identifier_cursor) identifier_cursor (block (expression_statement (assignment (identifier_result) identifier_result (binary_operator (binary_operator (attribute (identifier_cursor) identifier_cursor (identifier_name) identifier_name )attribute (string_":") string_":" )binary_operator (identifier_result) identifier_result )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_cursor) identifier_cursor (attribute (identifier_cursor) identifier_cursor (identifier_parent) identifier_parent )attribute )assignment )expression_statement )block )while_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Returns the full asset class path for this stock
(module (function_definition (function_name_get_plugin_font) function_name_get_plugin_font (parameters (identifier_self) identifier_self (default_parameter (identifier_rich_text) identifier_rich_text (False) False )default_parameter )parameters (block (if_statement (identifier_rich_text) identifier_rich_text (block (expression_statement (assignment (identifier_option) identifier_option (string_'rich_font') string_'rich_font' )assignment )expression_statement (expression_statement (assignment (identifier_font_size_delta) identifier_font_size_delta (attribute (identifier_self) identifier_self (identifier_RICH_FONT_SIZE_DELTA) identifier_RICH_FONT_SIZE_DELTA )attribute )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_option) identifier_option (string_'font') string_'font' )assignment )expression_statement (expression_statement (assignment (identifier_font_size_delta) identifier_font_size_delta (attribute (identifier_self) identifier_self (identifier_FONT_SIZE_DELTA) identifier_FONT_SIZE_DELTA )attribute )assignment )expression_statement )block )else_clause )if_statement (return_statement (call (identifier_get_font) identifier_get_font (argument_list (keyword_argument (identifier_option) identifier_option (identifier_option) identifier_option )keyword_argument (keyword_argument (identifier_font_size_delta) identifier_font_size_delta (identifier_font_size_delta) identifier_font_size_delta )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return plugin font option. All plugins in Spyder use a global font. This is a convenience method in case some plugins will have a delta size based on the default size.