sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_authority) function_name_authority (parameters (identifier_self) identifier_self (default_parameter (identifier_column) identifier_column (None) None )default_parameter (default_parameter (identifier_value) identifier_value (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__resolve_call) identifier__resolve_call )attribute (argument_list (string_'GIC_AUTHORITY') string_'GIC_AUTHORITY' (identifier_column) identifier_column (identifier_value) identifier_value (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Provides codes and associated authorizing statutes.
(module (function_definition (function_name_txn_storeAssociation) function_name_txn_storeAssociation (parameters (identifier_self) identifier_self (identifier_server_url) identifier_server_url (identifier_association) identifier_association )parameters (block (expression_statement (assignment (identifier_a) identifier_a (identifier_association) identifier_association )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_db_set_assoc) identifier_db_set_assoc )attribute (argument_list (identifier_server_url) identifier_server_url (attribute (identifier_a) identifier_a (identifier_handle) identifier_handle )attribute (call (attribute (identifier_self) identifier_self (identifier_blobEncode) identifier_blobEncode )attribute (argument_list (attribute (identifier_a) identifier_a (identifier_secret) identifier_secret )attribute )argument_list )call (attribute (identifier_a) identifier_a (identifier_issued) identifier_issued )attribute (attribute (identifier_a) identifier_a (identifier_lifetime) identifier_lifetime )attribute (attribute (identifier_a) identifier_a (identifier_assoc_type) identifier_assoc_type )attribute )argument_list )call )expression_statement )block )function_definition )module
Set the association for the server URL. Association -> NoneType
(module (function_definition (function_name_gram_schmidt) function_name_gram_schmidt (parameters (identifier_matrix) identifier_matrix (default_parameter (identifier_return_opt) identifier_return_opt (string_'orthonormal') string_'orthonormal' )default_parameter )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (if_statement (comparison_operator (identifier_return_opt) identifier_return_opt (tuple (string_'orthonormal') string_'orthonormal' (string_'orthogonal') string_'orthogonal' (string_'both') string_'both' )tuple )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (concatenated_string (string_'Invalid return_opt, options are: "orthonormal", ') string_'Invalid return_opt, options are: "orthonormal", ' (string_'"orthogonal" or "both"') string_'"orthogonal" or "both"' )concatenated_string )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_u) identifier_u (list )list )assignment )expression_statement (expression_statement (assignment (identifier_e) identifier_e (list )list )assignment )expression_statement (for_statement (identifier_vector) identifier_vector (identifier_matrix) identifier_matrix (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_u) identifier_u )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_u_now) identifier_u_now (identifier_vector) identifier_vector )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_u_now) identifier_u_now (binary_operator (identifier_vector) identifier_vector (call (identifier_sum) identifier_sum (argument_list (list_comprehension (call (identifier_project) identifier_project (argument_list (identifier_u_i) identifier_u_i (identifier_vector) identifier_vector )argument_list )call (for_in_clause (identifier_u_i) identifier_u_i (identifier_u) identifier_u )for_in_clause )list_comprehension )argument_list )call )binary_operator )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_u) identifier_u (identifier_append) identifier_append )attribute (argument_list (identifier_u_now) identifier_u_now )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_e) identifier_e (identifier_append) identifier_append )attribute (argument_list (binary_operator (identifier_u_now) identifier_u_now (call (attribute (attribute (identifier_np) identifier_np (identifier_linalg) identifier_linalg )attribute (identifier_norm) identifier_norm )attribute (argument_list (identifier_u_now) identifier_u_now (integer_2) integer_2 )argument_list )call )binary_operator )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier_u) identifier_u (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (identifier_u) identifier_u )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_e) identifier_e (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (identifier_e) identifier_e )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_return_opt) identifier_return_opt (string_'orthonormal') string_'orthonormal' )comparison_operator (block (return_statement (identifier_e) identifier_e )return_statement )block (elif_clause (comparison_operator (identifier_return_opt) identifier_return_opt (string_'orthogonal') string_'orthogonal' )comparison_operator (block (return_statement (identifier_u) identifier_u )return_statement )block )elif_clause (elif_clause (comparison_operator (identifier_return_opt) identifier_return_opt (string_'both') string_'both' )comparison_operator (block (return_statement (expression_list (identifier_u) identifier_u (identifier_e) identifier_e )expression_list )return_statement )block )elif_clause )if_statement )block )function_definition )module
r"""Gram-Schmit This method orthonormalizes the row vectors of the input matrix. Parameters ---------- matrix : np.ndarray Input matrix array return_opt : str {orthonormal, orthogonal, both} Option to return u, e or both. Returns ------- Lists of orthogonal vectors, u, and/or orthonormal vectors, e Examples -------- >>> from modopt.math.matrix import gram_schmidt >>> a = np.arange(9).reshape(3, 3) >>> gram_schmidt(a) array([[ 0. , 0.4472136 , 0.89442719], [ 0.91287093, 0.36514837, -0.18257419], [-1. , 0. , 0. ]]) Notes ----- Implementation from: https://en.wikipedia.org/wiki/Gram%E2%80%93Schmidt_process
(module (function_definition (function_name_numeric_part) function_name_numeric_part (parameters (identifier_s) identifier_s )parameters (block (expression_statement (assignment (identifier_m) identifier_m (call (attribute (identifier_re_numeric_part) identifier_re_numeric_part (identifier_match) identifier_match )attribute (argument_list (identifier_s) identifier_s )argument_list )call )assignment )expression_statement (if_statement (identifier_m) identifier_m (block (return_statement (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_m) identifier_m (identifier_group) identifier_group )attribute (argument_list (integer_1) integer_1 )argument_list )call )argument_list )call )return_statement )block )if_statement (return_statement (None) None )return_statement )block )function_definition )module
Returns the leading numeric part of a string. >>> numeric_part("20-alpha") 20 >>> numeric_part("foo") >>> numeric_part("16b") 16
(module (function_definition (function_name__validatePullParams) function_name__validatePullParams (parameters (identifier_MaxObjectCount) identifier_MaxObjectCount (identifier_context) identifier_context )parameters (block (if_statement (parenthesized_expression (boolean_operator (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_MaxObjectCount) identifier_MaxObjectCount (attribute (identifier_six) identifier_six (identifier_integer_types) identifier_integer_types )attribute )argument_list )call )not_operator (comparison_operator (identifier_MaxObjectCount) identifier_MaxObjectCount (integer_0) integer_0 )comparison_operator )boolean_operator )parenthesized_expression (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (identifier__format) identifier__format (argument_list (concatenated_string (string_"MaxObjectCount parameter must be integer >= 0 but is ") string_"MaxObjectCount parameter must be integer >= 0 but is " (string_"{0!A}") string_"{0!A}" )concatenated_string (identifier_MaxObjectCount) identifier_MaxObjectCount )argument_list )call )argument_list )call )raise_statement )block )if_statement (if_statement (boolean_operator (comparison_operator (identifier_context) identifier_context (None) None )comparison_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_context) identifier_context )argument_list )call (integer_2) integer_2 )comparison_operator )boolean_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (identifier__format) identifier__format (argument_list (string_"Pull... Context parameter must be valid tuple {0!A}") string_"Pull... Context parameter must be valid tuple {0!A}" (identifier_context) identifier_context )argument_list )call )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Validate the input paramaters for the PullInstances, PullInstancesWithPath, and PullInstancePaths requests. MaxObjectCount: Must be integer type and ge 0 context: Must be not None and length ge 2
(module (function_definition (function_name_is_vert_aligned_left) function_name_is_vert_aligned_left (parameters (identifier_c) identifier_c )parameters (block (return_statement (call (identifier_all) identifier_all (argument_list (list_comprehension (boolean_operator (call (attribute (attribute (call (identifier__to_span) identifier__to_span (argument_list (subscript (identifier_c) identifier_c (identifier_i) identifier_i )subscript )argument_list )call (identifier_sentence) identifier_sentence )attribute (identifier_is_visual) identifier_is_visual )attribute (argument_list )argument_list )call (call (identifier_bbox_vert_aligned_left) identifier_bbox_vert_aligned_left (argument_list (call (identifier_bbox_from_span) identifier_bbox_from_span (argument_list (call (identifier__to_span) identifier__to_span (argument_list (subscript (identifier_c) identifier_c (identifier_i) identifier_i )subscript )argument_list )call )argument_list )call (call (identifier_bbox_from_span) identifier_bbox_from_span (argument_list (call (identifier__to_span) identifier__to_span (argument_list (subscript (identifier_c) identifier_c (integer_0) integer_0 )subscript )argument_list )call )argument_list )call )argument_list )call )boolean_operator (for_in_clause (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (identifier_c) identifier_c )argument_list )call )argument_list )call )for_in_clause )list_comprehension )argument_list )call )return_statement )block )function_definition )module
Return true if all components are vertically aligned on their left border. Vertical alignment means that the bounding boxes of each Mention of c shares a similar x-axis value in the visual rendering of the document. In this function the similarity of the x-axis value is based on the left border of their bounding boxes. :param c: The candidate to evaluate :rtype: boolean
(module (function_definition (function_name_from_status) function_name_from_status (parameters (identifier_status) identifier_status (default_parameter (identifier_message) identifier_message (None) None )default_parameter (default_parameter (identifier_extra) identifier_extra (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_status) identifier_status (identifier_HTTP_STATUS_CODES) identifier_HTTP_STATUS_CODES )comparison_operator (block (return_statement (call (subscript (identifier_HTTP_STATUS_CODES) identifier_HTTP_STATUS_CODES (identifier_status) identifier_status )subscript (argument_list (keyword_argument (identifier_message) identifier_message (identifier_message) identifier_message )keyword_argument (keyword_argument (identifier_extra) identifier_extra (identifier_extra) identifier_extra )keyword_argument )argument_list )call )return_statement )block (else_clause (block (return_statement (call (identifier_Error) identifier_Error (argument_list (keyword_argument (identifier_code) identifier_code (identifier_status) identifier_status )keyword_argument (keyword_argument (identifier_message) identifier_message (conditional_expression (identifier_message) identifier_message (identifier_message) identifier_message (string_"Unknown Error") string_"Unknown Error" )conditional_expression )keyword_argument (keyword_argument (identifier_extra) identifier_extra (identifier_extra) identifier_extra )keyword_argument )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Try to create an error from status code :param int status: HTTP status :param str message: Body content :param dict extra: Additional info :return: An error :rtype: cdumay_rest_client.errors.Error
(module (function_definition (function_name__get_acronyms) function_name__get_acronyms (parameters (identifier_acronyms) identifier_acronyms )parameters (block (expression_statement (assignment (identifier_acronyms_str) identifier_acronyms_str (dictionary )dictionary )assignment )expression_statement (if_statement (identifier_acronyms) identifier_acronyms (block (for_statement (pattern_list (identifier_acronym) identifier_acronym (identifier_expansions) identifier_expansions )pattern_list (call (identifier_iteritems) identifier_iteritems (argument_list (identifier_acronyms) identifier_acronyms )argument_list )call (block (expression_statement (assignment (identifier_expansions_str) identifier_expansions_str (call (attribute (string_", ") string_", " (identifier_join) identifier_join )attribute (argument_list (list_comprehension (binary_operator (string_"%s (%d)") string_"%s (%d)" (identifier_expansion) identifier_expansion )binary_operator (for_in_clause (identifier_expansion) identifier_expansion (identifier_expansions) identifier_expansions )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_acronyms_str) identifier_acronyms_str (identifier_acronym) identifier_acronym )subscript (identifier_expansions_str) identifier_expansions_str )assignment )expression_statement )block )for_statement )block )if_statement (return_statement (list_comprehension (dictionary (pair (string_'acronym') string_'acronym' (call (identifier_str) identifier_str (argument_list (identifier_key) identifier_key )argument_list )call )pair (pair (string_'expansion') string_'expansion' (call (attribute (identifier_value) identifier_value (identifier_encode) identifier_encode )attribute (argument_list (string_'utf8') string_'utf8' )argument_list )call )pair )dictionary (for_in_clause (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (identifier_acronyms_str) identifier_acronyms_str (identifier_iteritems) identifier_iteritems )attribute (argument_list )argument_list )call )for_in_clause )list_comprehension )return_statement )block )function_definition )module
Return a formatted list of acronyms.
(module (function_definition (function_name_add) function_name_add (parameters (identifier_self) identifier_self (identifier_data) identifier_data (default_parameter (identifier_id) identifier_id (string_'*') string_'*' )default_parameter (default_parameter (identifier_maxlen) identifier_maxlen (None) None )default_parameter (default_parameter (identifier_approximate) identifier_approximate (True) True )default_parameter )parameters (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_database) identifier_database )attribute (identifier_xadd) identifier_xadd )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_key) identifier_key )attribute (identifier_data) identifier_data (identifier_id) identifier_id (identifier_maxlen) identifier_maxlen (identifier_approximate) identifier_approximate )argument_list )call )return_statement )block )function_definition )module
Add data to a stream. :param dict data: data to add to stream :param id: identifier for message ('*' to automatically append) :param maxlen: maximum length for stream :param approximate: allow stream max length to be approximate :returns: the added message id.
(module (function_definition (function_name_find_peaks) function_name_find_peaks (parameters (identifier_signal) identifier_signal )parameters (block (expression_statement (assignment (identifier_derivative) identifier_derivative (call (attribute (identifier_np) identifier_np (identifier_gradient) identifier_gradient )attribute (argument_list (identifier_signal) identifier_signal (integer_2) integer_2 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_peaks) identifier_peaks (subscript (call (attribute (identifier_np) identifier_np (identifier_where) identifier_where )attribute (argument_list (call (attribute (identifier_np) identifier_np (identifier_diff) identifier_diff )attribute (argument_list (call (attribute (identifier_np) identifier_np (identifier_sign) identifier_sign )attribute (argument_list (identifier_derivative) identifier_derivative )argument_list )call )argument_list )call )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (return_statement (parenthesized_expression (identifier_peaks) identifier_peaks )parenthesized_expression )return_statement )block )function_definition )module
Locate peaks based on derivative. Parameters ---------- signal : list or array Signal. Returns ---------- peaks : array An array containing the peak indices. Example ---------- >>> signal = np.sin(np.arange(0, np.pi*10, 0.05)) >>> peaks = nk.find_peaks(signal) >>> nk.plot_events_in_signal(signal, peaks) Notes ---------- *Authors* - `Dominique Makowski <https://dominiquemakowski.github.io/>`_ *Dependencies* - scipy - pandas
(module (function_definition (function_name_azimuth) function_name_azimuth (parameters (identifier_lons1) identifier_lons1 (identifier_lats1) identifier_lats1 (identifier_lons2) identifier_lons2 (identifier_lats2) identifier_lats2 )parameters (block (expression_statement (assignment (pattern_list (identifier_lons1) identifier_lons1 (identifier_lats1) identifier_lats1 (identifier_lons2) identifier_lons2 (identifier_lats2) identifier_lats2 )pattern_list (call (identifier__prepare_coords) identifier__prepare_coords (argument_list (identifier_lons1) identifier_lons1 (identifier_lats1) identifier_lats1 (identifier_lons2) identifier_lons2 (identifier_lats2) identifier_lats2 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cos_lat2) identifier_cos_lat2 (call (attribute (identifier_numpy) identifier_numpy (identifier_cos) identifier_cos )attribute (argument_list (identifier_lats2) identifier_lats2 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_true_course) identifier_true_course (call (attribute (identifier_numpy) identifier_numpy (identifier_degrees) identifier_degrees )attribute (argument_list (call (attribute (identifier_numpy) identifier_numpy (identifier_arctan2) identifier_arctan2 )attribute (argument_list (binary_operator (call (attribute (identifier_numpy) identifier_numpy (identifier_sin) identifier_sin )attribute (argument_list (binary_operator (identifier_lons1) identifier_lons1 (identifier_lons2) identifier_lons2 )binary_operator )argument_list )call (identifier_cos_lat2) identifier_cos_lat2 )binary_operator (binary_operator (binary_operator (call (attribute (identifier_numpy) identifier_numpy (identifier_cos) identifier_cos )attribute (argument_list (identifier_lats1) identifier_lats1 )argument_list )call (call (attribute (identifier_numpy) identifier_numpy (identifier_sin) identifier_sin )attribute (argument_list (identifier_lats2) identifier_lats2 )argument_list )call )binary_operator (binary_operator (binary_operator (call (attribute (identifier_numpy) identifier_numpy (identifier_sin) identifier_sin )attribute (argument_list (identifier_lats1) identifier_lats1 )argument_list )call (identifier_cos_lat2) identifier_cos_lat2 )binary_operator (call (attribute (identifier_numpy) identifier_numpy (identifier_cos) identifier_cos )attribute (argument_list (binary_operator (identifier_lons1) identifier_lons1 (identifier_lons2) identifier_lons2 )binary_operator )argument_list )call )binary_operator )binary_operator )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (binary_operator (parenthesized_expression (binary_operator (integer_360) integer_360 (identifier_true_course) identifier_true_course )binary_operator )parenthesized_expression (integer_360) integer_360 )binary_operator )return_statement )block )function_definition )module
Calculate the azimuth between two points or two collections of points. Parameters are the same as for :func:`geodetic_distance`. Implements an "alternative formula" from http://williams.best.vwh.net/avform.htm#Crs :returns: Azimuth as an angle between direction to north from first point and direction to the second point measured clockwise in decimal degrees.
(module (function_definition (function_name_cpp_prog_builder) function_name_cpp_prog_builder (parameters (identifier_build_context) identifier_build_context (identifier_target) identifier_target )parameters (block (expression_statement (call (identifier_yprint) identifier_yprint (argument_list (attribute (identifier_build_context) identifier_build_context (identifier_conf) identifier_conf )attribute (string_'Build CppProg') string_'Build CppProg' (identifier_target) identifier_target )argument_list )call )expression_statement (expression_statement (assignment (identifier_workspace_dir) identifier_workspace_dir (call (attribute (identifier_build_context) identifier_build_context (identifier_get_workspace) identifier_get_workspace )attribute (argument_list (string_'CppProg') string_'CppProg' (attribute (identifier_target) identifier_target (identifier_name) identifier_name )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_build_cpp) identifier_build_cpp (argument_list (identifier_build_context) identifier_build_context (identifier_target) identifier_target (attribute (identifier_target) identifier_target (identifier_compiler_config) identifier_compiler_config )attribute (identifier_workspace_dir) identifier_workspace_dir )argument_list )call )expression_statement )block )function_definition )module
Build a C++ binary executable
(module (function_definition (function_name_regulatory_program) function_name_regulatory_program (parameters (identifier_self) identifier_self (default_parameter (identifier_column) identifier_column (None) None )default_parameter (default_parameter (identifier_value) identifier_value (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__resolve_call) identifier__resolve_call )attribute (argument_list (string_'RAD_REGULATORY_PROG') string_'RAD_REGULATORY_PROG' (identifier_column) identifier_column (identifier_value) identifier_value (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Identifies the regulatory authority governing a facility, and, by virtue of that identification, also identifies the regulatory program of interest and the type of facility. >>> RADInfo().regulatory_program('sec_cit_ref_flag', 'N')
(module (function_definition (function_name_is_coord_subset) function_name_is_coord_subset (parameters (identifier_subset) identifier_subset (identifier_superset) identifier_superset (default_parameter (identifier_atol) identifier_atol (float_1e-8) float_1e-8 )default_parameter )parameters (block (expression_statement (assignment (identifier_c1) identifier_c1 (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (identifier_subset) identifier_subset )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_c2) identifier_c2 (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (identifier_superset) identifier_superset )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_is_close) identifier_is_close (call (attribute (identifier_np) identifier_np (identifier_all) identifier_all )attribute (argument_list (comparison_operator (call (attribute (identifier_np) identifier_np (identifier_abs) identifier_abs )attribute (argument_list (binary_operator (subscript (identifier_c1) identifier_c1 (slice (colon) colon )slice (None) None (slice (colon) colon )slice )subscript (subscript (identifier_c2) identifier_c2 (None) None (slice (colon) colon )slice (slice (colon) colon )slice )subscript )binary_operator )argument_list )call (identifier_atol) identifier_atol )comparison_operator (keyword_argument (identifier_axis) identifier_axis (unary_operator (integer_1) integer_1 )unary_operator )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_any_close) identifier_any_close (call (attribute (identifier_np) identifier_np (identifier_any) identifier_any )attribute (argument_list (identifier_is_close) identifier_is_close (keyword_argument (identifier_axis) identifier_axis (unary_operator (integer_1) integer_1 )unary_operator )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_np) identifier_np (identifier_all) identifier_all )attribute (argument_list (identifier_any_close) identifier_any_close )argument_list )call )return_statement )block )function_definition )module
Tests if all coords in subset are contained in superset. Doesn't use periodic boundary conditions Args: subset, superset: List of coords Returns: True if all of subset is in superset.
(module (function_definition (function_name_get_api_endpoints) function_name_get_api_endpoints (parameters (identifier_self) identifier_self (identifier_apiname) identifier_apiname )parameters (block (try_statement (block (return_statement (call (attribute (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_services_by_name) identifier_services_by_name )attribute (line_continuation_\) line_continuation_\ (identifier_get) identifier_get )attribute (argument_list (identifier_apiname) identifier_apiname )argument_list )call (line_continuation_\) line_continuation_\ (identifier_get) identifier_get )attribute (argument_list (string_"endpoints") string_"endpoints" )argument_list )call (line_continuation_\) line_continuation_\ (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )return_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (string_f"Couldn't find the API endpoints") string_f"Couldn't find the API endpoints" )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Returns the API endpoints
(module (function_definition (function_name_double_click) function_name_double_click (parameters (identifier_self) identifier_self (default_parameter (identifier_on_element) identifier_on_element (None) None )default_parameter )parameters (block (if_statement (identifier_on_element) identifier_on_element (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_move_to_element) identifier_move_to_element )attribute (argument_list (identifier_on_element) identifier_on_element )argument_list )call )expression_statement )block )if_statement (if_statement (attribute (attribute (identifier_self) identifier_self (identifier__driver) identifier__driver )attribute (identifier_w3c) identifier_w3c )attribute (block (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_w3c_actions) identifier_w3c_actions )attribute (identifier_pointer_action) identifier_pointer_action )attribute (identifier_double_click) identifier_double_click )attribute (argument_list )argument_list )call )expression_statement (for_statement (identifier__) identifier__ (call (identifier_range) identifier_range (argument_list (integer_4) integer_4 )argument_list )call (block (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_w3c_actions) identifier_w3c_actions )attribute (identifier_key_action) identifier_key_action )attribute (identifier_pause) identifier_pause )attribute (argument_list )argument_list )call )expression_statement )block )for_statement )block (else_clause (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__actions) identifier__actions )attribute (identifier_append) identifier_append )attribute (argument_list (lambda (call (attribute (attribute (identifier_self) identifier_self (identifier__driver) identifier__driver )attribute (identifier_execute) identifier_execute )attribute (argument_list (attribute (identifier_Command) identifier_Command (identifier_DOUBLE_CLICK) identifier_DOUBLE_CLICK )attribute (dictionary )dictionary )argument_list )call )lambda )argument_list )call )expression_statement )block )else_clause )if_statement (return_statement (identifier_self) identifier_self )return_statement )block )function_definition )module
Double-clicks an element. :Args: - on_element: The element to double-click. If None, clicks on current mouse position.
(module (function_definition (function_name_arg_props) function_name_arg_props (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_d) identifier_d (call (identifier_dict) identifier_dict (argument_list (call (identifier_zip) identifier_zip (argument_list (list_comprehension (call (attribute (call (identifier_str) identifier_str (argument_list (identifier_e) identifier_e )argument_list )call (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (for_in_clause (identifier_e) identifier_e (attribute (attribute (identifier_self) identifier_self (identifier_section) identifier_section )attribute (identifier_property_names) identifier_property_names )attribute )for_in_clause )list_comprehension (attribute (identifier_self) identifier_self (identifier_args) identifier_args )attribute )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_d) identifier_d (call (attribute (attribute (identifier_self) identifier_self (identifier_term_value_name) identifier_term_value_name )attribute (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )subscript (attribute (identifier_self) identifier_self (identifier_value) identifier_value )attribute )assignment )expression_statement (return_statement (identifier_d) identifier_d )return_statement )block )function_definition )module
Return the value and scalar properties as a dictionary. Returns only argumnet properties, properties declared on the same row as a term. It will return an entry for all of the args declared by the term's section. Use props to get values of all children and arg props combined
(module (function_definition (function_name_add_to_group) function_name_add_to_group (parameters (identifier_self) identifier_self (identifier_group_path) identifier_group_path )parameters (block (if_statement (comparison_operator (call (attribute (identifier_self) identifier_self (identifier_get_group_path) identifier_get_group_path )attribute (argument_list )argument_list )call (identifier_group_path) identifier_group_path )comparison_operator (block (expression_statement (assignment (identifier_post_data) identifier_post_data (call (attribute (identifier_ADD_GROUP_TEMPLATE) identifier_ADD_GROUP_TEMPLATE (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_connectware_id) identifier_connectware_id (call (attribute (identifier_self) identifier_self (identifier_get_connectware_id) identifier_get_connectware_id )attribute (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_group_path) identifier_group_path (identifier_group_path) identifier_group_path )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__conn) identifier__conn )attribute (identifier_put) identifier_put )attribute (argument_list (string_'/ws/DeviceCore') string_'/ws/DeviceCore' (identifier_post_data) identifier_post_data )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__device_json) identifier__device_json )attribute (None) None )assignment )expression_statement )block )if_statement )block )function_definition )module
Add a device to a group, if the group doesn't exist it is created :param group_path: Path or "name" of the group
(module (function_definition (function_name_once) function_name_once (parameters (identifier_func) identifier_func )parameters (block (decorated_definition (decorator (call (attribute (identifier_functools) identifier_functools (identifier_wraps) identifier_wraps )attribute (argument_list (identifier_func) identifier_func )argument_list )call )decorator (function_definition (function_name_wrapper) function_name_wrapper (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_wrapper) identifier_wrapper (string_'saved_result') string_'saved_result' )argument_list )call )not_operator (block (expression_statement (assignment (attribute (identifier_wrapper) identifier_wrapper (identifier_saved_result) identifier_saved_result )attribute (call (identifier_func) identifier_func (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_wrapper) identifier_wrapper (identifier_saved_result) identifier_saved_result )attribute )return_statement )block )function_definition )decorated_definition (expression_statement (assignment (attribute (identifier_wrapper) identifier_wrapper (identifier_reset) identifier_reset )attribute (lambda (call (attribute (call (identifier_vars) identifier_vars (argument_list (identifier_wrapper) identifier_wrapper )argument_list )call (identifier___delitem__) identifier___delitem__ )attribute (argument_list (string_'saved_result') string_'saved_result' )argument_list )call )lambda )assignment )expression_statement (return_statement (identifier_wrapper) identifier_wrapper )return_statement )block )function_definition )module
Decorate func so it's only ever called the first time. This decorator can ensure that an expensive or non-idempotent function will not be expensive on subsequent calls and is idempotent. >>> add_three = once(lambda a: a+3) >>> add_three(3) 6 >>> add_three(9) 6 >>> add_three('12') 6 To reset the stored value, simply clear the property ``saved_result``. >>> del add_three.saved_result >>> add_three(9) 12 >>> add_three(8) 12 Or invoke 'reset()' on it. >>> add_three.reset() >>> add_three(-3) 0 >>> add_three(0) 0
(module (function_definition (function_name_getFasta) function_name_getFasta (parameters (identifier_opened_file) identifier_opened_file (identifier_sequence_name) identifier_sequence_name )parameters (block (expression_statement (assignment (identifier_lines) identifier_lines (call (attribute (identifier_opened_file) identifier_opened_file (identifier_readlines) identifier_readlines )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_seq) identifier_seq (call (identifier_str) identifier_str (argument_list (string_"") string_"" )argument_list )call )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (integer_0) integer_0 (call (identifier_len) identifier_len (argument_list (identifier_lines) identifier_lines )argument_list )call )argument_list )call (block (expression_statement (assignment (identifier_line) identifier_line (subscript (identifier_lines) identifier_lines (identifier_i) identifier_i )subscript )assignment )expression_statement (if_statement (comparison_operator (subscript (identifier_line) identifier_line (integer_0) integer_0 )subscript (string_">") string_">" )comparison_operator (block (expression_statement (assignment (identifier_fChr) identifier_fChr (subscript (call (attribute (subscript (call (attribute (identifier_line) identifier_line (identifier_split) identifier_split )attribute (argument_list (string_" ") string_" " )argument_list )call (integer_0) integer_0 )subscript (identifier_split) identifier_split )attribute (argument_list (string_"\n") string_"\n" )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_fChr) identifier_fChr (subscript (identifier_fChr) identifier_fChr (slice (integer_1) integer_1 (colon) colon )slice )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_fChr) identifier_fChr (identifier_sequence_name) identifier_sequence_name )comparison_operator (block (expression_statement (assignment (identifier_s) identifier_s (identifier_i) identifier_i )assignment )expression_statement (expression_statement (assignment (identifier_code) identifier_code (list (string_'N') string_'N' (string_'A') string_'A' (string_'C') string_'C' (string_'T') string_'T' (string_'G') string_'G' )list )assignment )expression_statement (expression_statement (assignment (identifier_firstbase) identifier_firstbase (subscript (subscript (identifier_lines) identifier_lines (binary_operator (identifier_s) identifier_s (integer_1) integer_1 )binary_operator )subscript (integer_0) integer_0 )subscript )assignment )expression_statement (while_statement (comparison_operator (identifier_firstbase) identifier_firstbase (identifier_code) identifier_code )comparison_operator (block (expression_statement (assignment (identifier_s) identifier_s (binary_operator (identifier_s) identifier_s (integer_1) integer_1 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_seq) identifier_seq (binary_operator (identifier_seq) identifier_seq (subscript (identifier_lines) identifier_lines (identifier_s) identifier_s )subscript )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_firstbase) identifier_firstbase (subscript (subscript (identifier_lines) identifier_lines (binary_operator (identifier_s) identifier_s (integer_1) integer_1 )binary_operator )subscript (integer_0) integer_0 )subscript )assignment )expression_statement )block )while_statement )block )if_statement )block )if_statement )block )for_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_seq) identifier_seq )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_seq) identifier_seq (None) None )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_seq) identifier_seq (call (attribute (identifier_seq) identifier_seq (identifier_split) identifier_split )attribute (argument_list (string_"\n") string_"\n" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_seq) identifier_seq (call (attribute (string_"") string_"" (identifier_join) identifier_join )attribute (argument_list (identifier_seq) identifier_seq )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_seq) identifier_seq )return_statement )block )function_definition )module
Retrieves a sequence from an opened multifasta file :param opened_file: an opened multifasta file eg. opened_file=open("/path/to/file.fa",'r+') :param sequence_name: the name of the sequence to be retrieved eg. for '>2 dna:chromosome chromosome:GRCm38:2:1:182113224:1 REF' use: sequence_name=str(2) returns: a string with the sequence of interest
(module (function_definition (function_name_strip_caret_codes) function_name_strip_caret_codes (parameters (identifier_text) identifier_text )parameters (block (expression_statement (assignment (identifier_text) identifier_text (call (attribute (identifier_text) identifier_text (identifier_replace) identifier_replace )attribute (argument_list (string_'^^') string_'^^' (string_'\x00') string_'\x00' )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_token) identifier_token (identifier_foo) identifier_foo )pattern_list (identifier__ANSI_CODES) identifier__ANSI_CODES (block (expression_statement (assignment (identifier_text) identifier_text (call (attribute (identifier_text) identifier_text (identifier_replace) identifier_replace )attribute (argument_list (identifier_token) identifier_token (string_'') string_'' )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (call (attribute (identifier_text) identifier_text (identifier_replace) identifier_replace )attribute (argument_list (string_'\x00') string_'\x00' (string_'^') string_'^' )argument_list )call )return_statement )block )function_definition )module
Strip out any caret codes from a string.
(module (function_definition (function_name_set_parent) function_name_set_parent (parameters (identifier_self) identifier_self (identifier_child) identifier_child (identifier_parent) identifier_parent )parameters (block (expression_statement (assignment (identifier_parents) identifier_parents (call (attribute (identifier_cmds) identifier_cmds (identifier_listConnections) identifier_listConnections )attribute (argument_list (binary_operator (string_"%s.parent") string_"%s.parent" (identifier_child) identifier_child )binary_operator (keyword_argument (identifier_plugs) identifier_plugs (True) True )keyword_argument (keyword_argument (identifier_source) identifier_source (True) True )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (identifier_parents) identifier_parents (block (expression_statement (call (attribute (identifier_cmds) identifier_cmds (identifier_disconnectAttr) identifier_disconnectAttr )attribute (argument_list (binary_operator (string_"%s.parent") string_"%s.parent" (identifier_child) identifier_child )binary_operator (binary_operator (string_"%s") string_"%s" (subscript (identifier_parents) identifier_parents (integer_0) integer_0 )subscript )binary_operator )argument_list )call )expression_statement )block )if_statement (if_statement (identifier_parent) identifier_parent (block (expression_statement (call (attribute (identifier_cmds) identifier_cmds (identifier_connectAttr) identifier_connectAttr )attribute (argument_list (binary_operator (string_"%s.parent") string_"%s.parent" (identifier_child) identifier_child )binary_operator (binary_operator (string_"%s.children") string_"%s.children" (identifier_parent) identifier_parent )binary_operator (keyword_argument (identifier_force) identifier_force (True) True )keyword_argument (keyword_argument (identifier_nextAvailable) identifier_nextAvailable (True) True )keyword_argument )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Set the parent of the child reftrack node :param child: the child reftrack node :type child: str :param parent: the parent reftrack node :type parent: str :returns: None :rtype: None :raises: None
(module (function_definition (function_name_fromtree) function_name_fromtree (parameters (identifier_cls) identifier_cls (identifier_tree) identifier_tree )parameters (block (expression_statement (assignment (identifier_mets) identifier_mets (call (identifier_cls) identifier_cls (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_mets) identifier_mets (identifier_tree) identifier_tree )attribute (identifier_tree) identifier_tree )assignment )expression_statement (expression_statement (call (attribute (identifier_mets) identifier_mets (identifier__parse_tree) identifier__parse_tree )attribute (argument_list (identifier_tree) identifier_tree )argument_list )call )expression_statement (return_statement (identifier_mets) identifier_mets )return_statement )block )function_definition )module
Create a METS from an ElementTree or Element. :param ElementTree tree: ElementTree to build a METS document from.
(module (function_definition (function_name_execute_contract_creation) function_name_execute_contract_creation (parameters (identifier_laser_evm) identifier_laser_evm (identifier_contract_initialization_code) identifier_contract_initialization_code (default_parameter (identifier_contract_name) identifier_contract_name (None) None )default_parameter )parameters (type (identifier_Account) identifier_Account )type (block (expression_statement (assignment (identifier_open_states) identifier_open_states (subscript (attribute (identifier_laser_evm) identifier_laser_evm (identifier_open_states) identifier_open_states )attribute (slice (colon) colon )slice )subscript )assignment )expression_statement (delete_statement (subscript (attribute (identifier_laser_evm) identifier_laser_evm (identifier_open_states) identifier_open_states )attribute (slice (colon) colon )slice )subscript )delete_statement (expression_statement (assignment (identifier_new_account) identifier_new_account (call (attribute (attribute (identifier_laser_evm) identifier_laser_evm (identifier_world_state) identifier_world_state )attribute (identifier_create_account) identifier_create_account )attribute (argument_list (integer_0) integer_0 (keyword_argument (identifier_concrete_storage) identifier_concrete_storage (True) True )keyword_argument (keyword_argument (identifier_dynamic_loader) identifier_dynamic_loader (None) None )keyword_argument (keyword_argument (identifier_creator) identifier_creator (identifier_CREATOR_ADDRESS) identifier_CREATOR_ADDRESS )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (identifier_contract_name) identifier_contract_name (block (expression_statement (assignment (attribute (identifier_new_account) identifier_new_account (identifier_contract_name) identifier_contract_name )attribute (identifier_contract_name) identifier_contract_name )assignment )expression_statement )block )if_statement (for_statement (identifier_open_world_state) identifier_open_world_state (identifier_open_states) identifier_open_states (block (expression_statement (assignment (identifier_next_transaction_id) identifier_next_transaction_id (call (identifier_get_next_transaction_id) identifier_get_next_transaction_id (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_transaction) identifier_transaction (call (identifier_ContractCreationTransaction) identifier_ContractCreationTransaction (argument_list (keyword_argument (identifier_world_state) identifier_world_state (identifier_open_world_state) identifier_open_world_state )keyword_argument (keyword_argument (identifier_identifier) identifier_identifier (identifier_next_transaction_id) identifier_next_transaction_id )keyword_argument (keyword_argument (identifier_gas_price) identifier_gas_price (call (attribute (identifier_symbol_factory) identifier_symbol_factory (identifier_BitVecSym) identifier_BitVecSym )attribute (argument_list (call (attribute (string_"gas_price{}") string_"gas_price{}" (identifier_format) identifier_format )attribute (argument_list (identifier_next_transaction_id) identifier_next_transaction_id )argument_list )call (integer_256) integer_256 )argument_list )call )keyword_argument (keyword_argument (identifier_gas_limit) identifier_gas_limit (integer_8000000) integer_8000000 )keyword_argument (keyword_argument (identifier_origin) identifier_origin (call (attribute (identifier_symbol_factory) identifier_symbol_factory (identifier_BitVecSym) identifier_BitVecSym )attribute (argument_list (call (attribute (string_"origin{}") string_"origin{}" (identifier_format) identifier_format )attribute (argument_list (identifier_next_transaction_id) identifier_next_transaction_id )argument_list )call (integer_256) integer_256 )argument_list )call )keyword_argument (keyword_argument (identifier_code) identifier_code (call (identifier_Disassembly) identifier_Disassembly (argument_list (identifier_contract_initialization_code) identifier_contract_initialization_code )argument_list )call )keyword_argument (keyword_argument (identifier_caller) identifier_caller (call (attribute (identifier_symbol_factory) identifier_symbol_factory (identifier_BitVecVal) identifier_BitVecVal )attribute (argument_list (identifier_CREATOR_ADDRESS) identifier_CREATOR_ADDRESS (integer_256) integer_256 )argument_list )call )keyword_argument (keyword_argument (identifier_callee_account) identifier_callee_account (identifier_new_account) identifier_new_account )keyword_argument (keyword_argument (identifier_call_data) identifier_call_data (list )list )keyword_argument (keyword_argument (identifier_call_value) identifier_call_value (call (attribute (identifier_symbol_factory) identifier_symbol_factory (identifier_BitVecSym) identifier_BitVecSym )attribute (argument_list (call (attribute (string_"call_value{}") string_"call_value{}" (identifier_format) identifier_format )attribute (argument_list (identifier_next_transaction_id) identifier_next_transaction_id )argument_list )call (integer_256) integer_256 )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (identifier__setup_global_state_for_execution) identifier__setup_global_state_for_execution (argument_list (identifier_laser_evm) identifier_laser_evm (identifier_transaction) identifier_transaction )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_laser_evm) identifier_laser_evm (identifier_exec) identifier_exec )attribute (argument_list (True) True )argument_list )call )expression_statement (return_statement (identifier_new_account) identifier_new_account )return_statement )block )function_definition )module
Executes a contract creation transaction from all open states. :param laser_evm: :param contract_initialization_code: :param contract_name: :return:
(module (function_definition (function_name_opponent_rank) function_name_opponent_rank (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_rank) identifier_rank (call (attribute (identifier_re) identifier_re (identifier_findall) identifier_findall )attribute (argument_list (string_r'\d+') string_r'\d+' (attribute (identifier_self) identifier_self (identifier__opponent_name) identifier__opponent_name )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_rank) identifier_rank )argument_list )call (integer_0) integer_0 )comparison_operator (block (return_statement (call (identifier_int) identifier_int (argument_list (subscript (identifier_rank) identifier_rank (integer_0) integer_0 )subscript )argument_list )call )return_statement )block )if_statement (return_statement (None) None )return_statement )block )function_definition )module
Returns a ``string`` of the opponent's rank when the game was played and None if the team was unranked.
(module (function_definition (function_name_transform) function_name_transform (parameters (identifier_self) identifier_self (identifier_sequences) identifier_sequences )parameters (block (expression_statement (call (identifier_check_iter_of_sequences) identifier_check_iter_of_sequences (argument_list (identifier_sequences) identifier_sequences )argument_list )call )expression_statement (expression_statement (assignment (identifier_transforms) identifier_transforms (list )list )assignment )expression_statement (for_statement (identifier_X) identifier_X (identifier_sequences) identifier_sequences (block (expression_statement (call (attribute (identifier_transforms) identifier_transforms (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_partial_transform) identifier_partial_transform )attribute (argument_list (identifier_X) identifier_X )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_transforms) identifier_transforms )return_statement )block )function_definition )module
Apply dimensionality reduction to sequences Parameters ---------- sequences: list of array-like, each of shape (n_samples_i, n_features) Sequence data to transform, where n_samples_i in the number of samples in sequence i and n_features is the number of features. Returns ------- sequence_new : list of array-like, each of shape (n_samples_i, n_components)
(module (function_definition (function_name_time_from_number) function_name_time_from_number (parameters (identifier_self) identifier_self (identifier_value) identifier_value )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (attribute (identifier_numbers) identifier_numbers (identifier_Real) identifier_Real )attribute )argument_list )call )not_operator (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_delta) identifier_delta (call (attribute (identifier_datetime) identifier_datetime (identifier_timedelta) identifier_timedelta )attribute (argument_list (keyword_argument (identifier_days) identifier_days (identifier_value) identifier_value )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_minutes) identifier_minutes (identifier_second) identifier_second )pattern_list (call (identifier_divmod) identifier_divmod (argument_list (attribute (identifier_delta) identifier_delta (identifier_seconds) identifier_seconds )attribute (integer_60) integer_60 )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_hour) identifier_hour (identifier_minute) identifier_minute )pattern_list (call (identifier_divmod) identifier_divmod (argument_list (identifier_minutes) identifier_minutes (integer_60) integer_60 )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_datetime) identifier_datetime (identifier_time) identifier_time )attribute (argument_list (identifier_hour) identifier_hour (identifier_minute) identifier_minute (identifier_second) identifier_second )argument_list )call )return_statement )block )function_definition )module
Converts a float value to corresponding time instance.
(module (function_definition (function_name_frames) function_name_frames (parameters (default_parameter (identifier_skip) identifier_skip (integer_1) integer_1 )default_parameter )parameters (block (import_from_statement (dotted_name (identifier_PyQt4) identifier_PyQt4 )dotted_name (dotted_name (identifier_QtGui) identifier_QtGui )dotted_name )import_from_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (integer_0) integer_0 (attribute (attribute (identifier_viewer) identifier_viewer (identifier_traj_controls) identifier_traj_controls )attribute (identifier_max_index) identifier_max_index )attribute (identifier_skip) identifier_skip )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_viewer) identifier_viewer (identifier_traj_controls) identifier_traj_controls )attribute (identifier_goto_frame) identifier_goto_frame )attribute (argument_list (identifier_i) identifier_i )argument_list )call )expression_statement (expression_statement (yield (identifier_i) identifier_i )yield )expression_statement (expression_statement (call (attribute (attribute (identifier_QtGui) identifier_QtGui (identifier_qApp) identifier_qApp )attribute (identifier_processEvents) identifier_processEvents )attribute (argument_list )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Useful command to iterate on the trajectory frames. It can be used in a for loop. :: for i in frames(): coords = current_trajectory()[i] # Do operation on coords You can use the option *skip* to take every i :sup:`th` frame.
(module (function_definition (function_name_str) function_name_str (parameters (identifier_password) identifier_password (default_parameter (identifier_opslimit) identifier_opslimit (identifier_OPSLIMIT_INTERACTIVE) identifier_OPSLIMIT_INTERACTIVE )default_parameter (default_parameter (identifier_memlimit) identifier_memlimit (identifier_MEMLIMIT_INTERACTIVE) identifier_MEMLIMIT_INTERACTIVE )default_parameter )parameters (block (return_statement (call (attribute (attribute (identifier_nacl) identifier_nacl (identifier_bindings) identifier_bindings )attribute (identifier_crypto_pwhash_scryptsalsa208sha256_str) identifier_crypto_pwhash_scryptsalsa208sha256_str )attribute (argument_list (identifier_password) identifier_password (identifier_opslimit) identifier_opslimit (identifier_memlimit) identifier_memlimit )argument_list )call )return_statement )block )function_definition )module
Hashes a password with a random salt, using the memory-hard scryptsalsa208sha256 construct and returning an ascii string that has all the needed info to check against a future password The default settings for opslimit and memlimit are those deemed correct for the interactive user login case. :param bytes password: :param int opslimit: :param int memlimit: :rtype: bytes .. versionadded:: 1.2
(module (function_definition (function_name_pop) function_name_pop (parameters (identifier_self) identifier_self (default_parameter (identifier_strip) identifier_strip (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_r) identifier_r (call (attribute (identifier_self) identifier_self (identifier_contents) identifier_contents )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_clear) identifier_clear )attribute (argument_list )argument_list )call )expression_statement (if_statement (boolean_operator (identifier_r) identifier_r (identifier_strip) identifier_strip )boolean_operator (block (expression_statement (assignment (identifier_r) identifier_r (call (attribute (identifier_r) identifier_r (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_r) identifier_r )return_statement )block )function_definition )module
Current content popped, useful for testing
(module (function_definition (function_name_access_token) function_name_access_token (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_access_token) identifier_access_token (call (attribute (identifier_self) identifier_self (identifier_get_auth_bearer) identifier_get_auth_bearer )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_access_token) identifier_access_token )not_operator (block (expression_statement (assignment (identifier_access_token) identifier_access_token (call (attribute (attribute (identifier_self) identifier_self (identifier_query_kwargs) identifier_query_kwargs )attribute (identifier_get) identifier_get )attribute (argument_list (string_'access_token') string_'access_token' (string_'') string_'' )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_access_token) identifier_access_token )not_operator (block (expression_statement (assignment (identifier_access_token) identifier_access_token (call (attribute (attribute (identifier_self) identifier_self (identifier_body_kwargs) identifier_body_kwargs )attribute (identifier_get) identifier_get )attribute (argument_list (string_'access_token') string_'access_token' (string_'') string_'' )argument_list )call )assignment )expression_statement )block )if_statement )block )if_statement (return_statement (identifier_access_token) identifier_access_token )return_statement )block )function_definition )module
return an Oauth 2.0 Bearer access token if it can be found
(module (function_definition (function_name_to_json) function_name_to_json (parameters (identifier_self) identifier_self (identifier_obj) identifier_obj (default_parameter (identifier_host) identifier_host (None) None )default_parameter (default_parameter (identifier_indent) identifier_indent (None) None )default_parameter )parameters (block (if_statement (identifier_indent) identifier_indent (block (return_statement (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (call (identifier_deep_map) identifier_deep_map (argument_list (lambda (lambda_parameters (identifier_o) identifier_o )lambda_parameters (call (attribute (identifier_self) identifier_self (identifier_encode) identifier_encode )attribute (argument_list (identifier_o) identifier_o (identifier_host) identifier_host )argument_list )call )lambda (identifier_obj) identifier_obj )argument_list )call (keyword_argument (identifier_indent) identifier_indent (identifier_indent) identifier_indent )keyword_argument )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (call (identifier_deep_map) identifier_deep_map (argument_list (lambda (lambda_parameters (identifier_o) identifier_o )lambda_parameters (call (attribute (identifier_self) identifier_self (identifier_encode) identifier_encode )attribute (argument_list (identifier_o) identifier_o (identifier_host) identifier_host )argument_list )call )lambda (identifier_obj) identifier_obj )argument_list )call )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Recursively encode `obj` and convert it to a JSON string. :param obj: Object to encode. :param host: hostname where this object is being encoded. :type host: str
(module (function_definition (function_name_get) function_name_get (parameters (identifier_key) identifier_key (default_parameter (identifier_value) identifier_value (None) None )default_parameter (default_parameter (identifier_conf_file) identifier_conf_file (identifier__DEFAULT_CONF) identifier__DEFAULT_CONF )default_parameter )parameters (block (expression_statement (assignment (identifier_current_conf) identifier_current_conf (call (identifier__parse_conf) identifier__parse_conf (argument_list (identifier_conf_file) identifier_conf_file )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_stanza) identifier_stanza (call (attribute (identifier_current_conf) identifier_current_conf (identifier_get) identifier_get )attribute (argument_list (identifier_key) identifier_key (False) False )argument_list )call )assignment )expression_statement (if_statement (identifier_value) identifier_value (block (if_statement (identifier_stanza) identifier_stanza (block (return_statement (call (attribute (identifier_stanza) identifier_stanza (identifier_get) identifier_get )attribute (argument_list (identifier_value) identifier_value (False) False )argument_list )call )return_statement )block )if_statement (expression_statement (call (attribute (identifier__LOG) identifier__LOG (identifier_warning) identifier_warning )attribute (argument_list (string_"Block '%s' not present or empty.") string_"Block '%s' not present or empty." (identifier_key) identifier_key )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_stanza) identifier_stanza )return_statement )block )function_definition )module
Get the value for a specific configuration line. :param str key: The command or stanza block to configure. :param str value: The command value or command of the block specified by the key parameter. :param str conf_file: The logrotate configuration file. :return: The value for a specific configuration line. :rtype: bool|int|str CLI Example: .. code-block:: bash salt '*' logrotate.get rotate salt '*' logrotate.get /var/log/wtmp rotate /etc/logrotate.conf
(module (function_definition (function_name_update_kwargs) function_name_update_kwargs (parameters (identifier_self) identifier_self (identifier_request) identifier_request (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (not_operator (comparison_operator (string_'base') string_'base' (identifier_kwargs) identifier_kwargs )comparison_operator )not_operator (block (expression_statement (assignment (subscript (identifier_kwargs) identifier_kwargs (string_'base') string_'base' )subscript (attribute (identifier_self) identifier_self (identifier_base) identifier_base )attribute )assignment )expression_statement (if_statement (boolean_operator (call (attribute (identifier_request) identifier_request (identifier_is_ajax) identifier_is_ajax )attribute (argument_list )argument_list )call (call (attribute (attribute (identifier_request) identifier_request (identifier_GET) identifier_GET )attribute (identifier_get) identifier_get )attribute (argument_list (string_'json') string_'json' )argument_list )call )boolean_operator (block (expression_statement (assignment (subscript (identifier_kwargs) identifier_kwargs (string_'base') string_'base' )subscript (attribute (identifier_self) identifier_self (identifier_partial_base) identifier_partial_base )attribute )assignment )expression_statement )block )if_statement )block )if_statement (return_statement (identifier_kwargs) identifier_kwargs )return_statement )block )function_definition )module
Hook for adding data to the context before rendering a template. :param kwargs: The current context keyword arguments. :param request: The current request object.
(module (function_definition (function_name__bin_zfill) function_name__bin_zfill (parameters (identifier_num) identifier_num (default_parameter (identifier_width) identifier_width (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_s) identifier_s (subscript (call (identifier_bin) identifier_bin (argument_list (identifier_num) identifier_num )argument_list )call (slice (integer_2) integer_2 (colon) colon )slice )subscript )assignment )expression_statement (return_statement (conditional_expression (identifier_s) identifier_s (comparison_operator (identifier_width) identifier_width (None) None )comparison_operator (call (attribute (identifier_s) identifier_s (identifier_zfill) identifier_zfill )attribute (argument_list (identifier_width) identifier_width )argument_list )call )conditional_expression )return_statement )block )function_definition )module
Convert a base-10 number to a binary string. Parameters num: int width: int, optional Zero-extend the string to this width. Examples -------- >>> _bin_zfill(42) '101010' >>> _bin_zfill(42, 8) '00101010'
(module (function_definition (function_name_lookup_online) function_name_lookup_online (parameters (typed_parameter (identifier_byte_sig) identifier_byte_sig (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_timeout) identifier_timeout (type (identifier_int) identifier_int )type )typed_parameter (default_parameter (identifier_proxies) identifier_proxies (None) None )default_parameter )parameters (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_str) identifier_str )type )type_parameter )generic_type )type (block (if_statement (not_operator (identifier_ethereum_input_decoder) identifier_ethereum_input_decoder )not_operator (block (return_statement (list )list )return_statement )block )if_statement (return_statement (call (identifier_list) identifier_list (argument_list (call (attribute (attribute (attribute (identifier_ethereum_input_decoder) identifier_ethereum_input_decoder (identifier_decoder) identifier_decoder )attribute (identifier_FourByteDirectory) identifier_FourByteDirectory )attribute (identifier_lookup_signatures) identifier_lookup_signatures )attribute (argument_list (identifier_byte_sig) identifier_byte_sig (keyword_argument (identifier_timeout) identifier_timeout (identifier_timeout) identifier_timeout )keyword_argument (keyword_argument (identifier_proxies) identifier_proxies (identifier_proxies) identifier_proxies )keyword_argument )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Lookup function signatures from 4byte.directory. :param byte_sig: function signature hash as hexstr :param timeout: optional timeout for online lookup :param proxies: optional proxy servers for online lookup :return: a list of matching function signatures for this hash
(module (function_definition (function_name__short_chrom) function_name__short_chrom (parameters (identifier_self) identifier_self (identifier_chrom) identifier_chrom )parameters (block (expression_statement (assignment (identifier_default_allowed) identifier_default_allowed (call (identifier_set) identifier_set (argument_list (list (string_"X") string_"X" )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_allowed_chroms) identifier_allowed_chroms (call (identifier_set) identifier_set (argument_list (call (attribute (call (identifier_getattr) identifier_getattr (argument_list (identifier_config) identifier_config (string_"goleft_indexcov_config") string_"goleft_indexcov_config" (dictionary )dictionary )argument_list )call (identifier_get) identifier_get )attribute (argument_list (string_"chromosomes") string_"chromosomes" (list )list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_chrom_clean) identifier_chrom_clean (call (attribute (identifier_chrom) identifier_chrom (identifier_replace) identifier_replace )attribute (argument_list (string_"chr") string_"chr" (string_"") string_"" )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_chrom_clean) identifier_chrom_clean (call (identifier_int) identifier_int (argument_list (identifier_chrom_clean) identifier_chrom_clean )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (if_statement (boolean_operator (comparison_operator (identifier_chrom_clean) identifier_chrom_clean (identifier_default_allowed) identifier_default_allowed )comparison_operator (comparison_operator (identifier_chrom_clean) identifier_chrom_clean (identifier_allowed_chroms) identifier_allowed_chroms )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_chrom_clean) identifier_chrom_clean (None) None )assignment )expression_statement )block )if_statement )block )except_clause )try_statement (if_statement (identifier_allowed_chroms) identifier_allowed_chroms (block (if_statement (boolean_operator (comparison_operator (identifier_chrom) identifier_chrom (identifier_allowed_chroms) identifier_allowed_chroms )comparison_operator (comparison_operator (identifier_chrom_clean) identifier_chrom_clean (identifier_allowed_chroms) identifier_allowed_chroms )comparison_operator )boolean_operator (block (return_statement (identifier_chrom_clean) identifier_chrom_clean )return_statement )block )if_statement )block (elif_clause (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_chrom_clean) identifier_chrom_clean (identifier_int) identifier_int )argument_list )call (comparison_operator (identifier_chrom_clean) identifier_chrom_clean (identifier_default_allowed) identifier_default_allowed )comparison_operator )boolean_operator (block (return_statement (identifier_chrom_clean) identifier_chrom_clean )return_statement )block )elif_clause )if_statement )block )function_definition )module
Plot standard chromosomes + X, sorted numerically. Allows specification from a list of chromosomes via config for non-standard genomes.
(module (function_definition (function_name_addChildFn) function_name_addChildFn (parameters (identifier_self) identifier_self (identifier_fn) identifier_fn (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (call (attribute (identifier_PromisedRequirement) identifier_PromisedRequirement (identifier_convertPromises) identifier_convertPromises )attribute (argument_list (identifier_kwargs) identifier_kwargs )argument_list )call (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_addChild) identifier_addChild )attribute (argument_list (call (attribute (identifier_PromisedRequirementFunctionWrappingJob) identifier_PromisedRequirementFunctionWrappingJob (identifier_create) identifier_create )attribute (argument_list (identifier_fn) identifier_fn (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_addChild) identifier_addChild )attribute (argument_list (call (identifier_FunctionWrappingJob) identifier_FunctionWrappingJob (argument_list (identifier_fn) identifier_fn (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Adds a function as a child job. :param fn: Function to be run as a child job with ``*args`` and ``**kwargs`` as \ arguments to this function. See toil.job.FunctionWrappingJob for reserved \ keyword arguments used to specify resource requirements. :return: The new child job that wraps fn. :rtype: toil.job.FunctionWrappingJob
(module (function_definition (function_name___set_authoring_nodes) function_name___set_authoring_nodes (parameters (identifier_self) identifier_self (identifier_source) identifier_source (identifier_target) identifier_target )parameters (block (expression_statement (assignment (identifier_editor) identifier_editor (call (attribute (attribute (identifier_self) identifier_self (identifier___script_editor) identifier___script_editor )attribute (identifier_get_editor) identifier_get_editor )attribute (argument_list (identifier_source) identifier_source )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_editor) identifier_editor (identifier_set_file) identifier_set_file )attribute (argument_list (identifier_target) identifier_target )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier___script_editor) identifier___script_editor )attribute (identifier_model) identifier_model )attribute (identifier_update_authoring_nodes) identifier_update_authoring_nodes )attribute (argument_list (identifier_editor) identifier_editor )argument_list )call )expression_statement )block )function_definition )module
Sets given editor authoring nodes. :param source: Source file. :type source: unicode :param target: Target file. :type target: unicode
(module (function_definition (function_name_find_orphans) function_name_find_orphans (parameters (identifier_model) identifier_model )parameters (block (expression_statement (assignment (identifier_exchange) identifier_exchange (call (identifier_frozenset) identifier_frozenset (argument_list (attribute (identifier_model) identifier_model (identifier_exchanges) identifier_exchanges )attribute )argument_list )call )assignment )expression_statement (return_statement (list_comprehension (identifier_met) identifier_met (for_in_clause (identifier_met) identifier_met (attribute (identifier_model) identifier_model (identifier_metabolites) identifier_metabolites )attribute )for_in_clause (if_clause (boolean_operator (parenthesized_expression (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_met) identifier_met (identifier_reactions) identifier_reactions )attribute )argument_list )call (integer_0) integer_0 )comparison_operator )parenthesized_expression (call (identifier_all) identifier_all (generator_expression (boolean_operator (boolean_operator (parenthesized_expression (not_operator (attribute (identifier_rxn) identifier_rxn (identifier_reversibility) identifier_reversibility )attribute )not_operator )parenthesized_expression (parenthesized_expression (comparison_operator (identifier_rxn) identifier_rxn (identifier_exchange) identifier_exchange )comparison_operator )parenthesized_expression )boolean_operator (parenthesized_expression (comparison_operator (subscript (attribute (identifier_rxn) identifier_rxn (identifier_metabolites) identifier_metabolites )attribute (identifier_met) identifier_met )subscript (integer_0) integer_0 )comparison_operator )parenthesized_expression )boolean_operator (for_in_clause (identifier_rxn) identifier_rxn (attribute (identifier_met) identifier_met (identifier_reactions) identifier_reactions )attribute )for_in_clause )generator_expression )call )boolean_operator )if_clause )list_comprehension )return_statement )block )function_definition )module
Return metabolites that are only consumed in reactions. Metabolites that are involved in an exchange reaction are never considered to be orphaned. Parameters ---------- model : cobra.Model The metabolic model under investigation.
(module (function_definition (function_name__GetUtf8Contents) function_name__GetUtf8Contents (parameters (identifier_self) identifier_self (identifier_file_name) identifier_file_name )parameters (block (expression_statement (assignment (identifier_contents) identifier_contents (call (attribute (identifier_self) identifier_self (identifier__FileContents) identifier__FileContents )attribute (argument_list (identifier_file_name) identifier_file_name )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_contents) identifier_contents )not_operator (block (return_statement )return_statement )block )if_statement (if_statement (boolean_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_contents) identifier_contents )argument_list )call (integer_2) integer_2 )comparison_operator (comparison_operator (subscript (identifier_contents) identifier_contents (slice (integer_0) integer_0 (colon) colon (integer_2) integer_2 )slice )subscript (tuple (attribute (identifier_codecs) identifier_codecs (identifier_BOM_UTF16_BE) identifier_BOM_UTF16_BE )attribute (attribute (identifier_codecs) identifier_codecs (identifier_BOM_UTF16_LE) identifier_BOM_UTF16_LE )attribute )tuple )comparison_operator )boolean_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__problems) identifier__problems )attribute (identifier_FileFormat) identifier_FileFormat )attribute (argument_list (string_"appears to be encoded in utf-16") string_"appears to be encoded in utf-16" (tuple (identifier_file_name) identifier_file_name )tuple )argument_list )call )expression_statement (expression_statement (assignment (identifier_contents) identifier_contents (call (attribute (subscript (call (call (attribute (identifier_codecs) identifier_codecs (identifier_getdecoder) identifier_getdecoder )attribute (argument_list (string_'utf-16') string_'utf-16' )argument_list )call (argument_list (identifier_contents) identifier_contents )argument_list )call (integer_0) integer_0 )subscript (identifier_encode) identifier_encode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_null_index) identifier_null_index (call (attribute (identifier_contents) identifier_contents (identifier_find) identifier_find )attribute (argument_list (string_'\0') string_'\0' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_null_index) identifier_null_index (unary_operator (integer_1) integer_1 )unary_operator )comparison_operator (block (expression_statement (assignment (identifier_m) identifier_m (call (attribute (identifier_re) identifier_re (identifier_search) identifier_search )attribute (argument_list (string_r'.{,20}\0.{,20}') string_r'.{,20}\0.{,20}' (identifier_contents) identifier_contents (attribute (identifier_re) identifier_re (identifier_DOTALL) identifier_DOTALL )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__problems) identifier__problems )attribute (identifier_FileFormat) identifier_FileFormat )attribute (argument_list (binary_operator (string_"contains a null in text \"%s\" at byte %d") string_"contains a null in text \"%s\" at byte %d" (tuple (call (call (attribute (identifier_codecs) identifier_codecs (identifier_getencoder) identifier_getencoder )attribute (argument_list (string_'string_escape') string_'string_escape' )argument_list )call (argument_list (call (attribute (identifier_m) identifier_m (identifier_group) identifier_group )attribute (argument_list )argument_list )call )argument_list )call (binary_operator (identifier_null_index) identifier_null_index (integer_1) integer_1 )binary_operator )tuple )binary_operator (tuple (identifier_file_name) identifier_file_name )tuple )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_contents) identifier_contents (call (attribute (identifier_contents) identifier_contents (identifier_lstrip) identifier_lstrip )attribute (argument_list (attribute (identifier_codecs) identifier_codecs (identifier_BOM_UTF8) identifier_BOM_UTF8 )attribute )argument_list )call )assignment )expression_statement (return_statement (identifier_contents) identifier_contents )return_statement )block )function_definition )module
Check for errors in file_name and return a string for csv reader.
(module (function_definition (function_name_read_cBpack) function_name_read_cBpack (parameters (identifier_filename) identifier_filename )parameters (block (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_gzip) identifier_gzip (identifier_open) identifier_open )attribute (argument_list (identifier_filename) identifier_filename (string_'rb') string_'rb' )argument_list )call (as_pattern_target (identifier_infile) identifier_infile )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_msgpack) identifier_msgpack (identifier_load) identifier_load )attribute (argument_list (identifier_infile) identifier_infile (keyword_argument (identifier_raw) identifier_raw (False) False )keyword_argument )argument_list )call )assignment )expression_statement )block )with_statement (expression_statement (assignment (identifier_header) identifier_header (subscript (identifier_data) identifier_data (integer_0) integer_0 )subscript )assignment )expression_statement (if_statement (parenthesized_expression (boolean_operator (boolean_operator (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_header) identifier_header (identifier_dict) identifier_dict )argument_list )call )not_operator (comparison_operator (call (attribute (identifier_header) identifier_header (identifier_get) identifier_get )attribute (argument_list (string_'format') string_'format' )argument_list )call (string_'cB') string_'cB' )comparison_operator )boolean_operator (comparison_operator (call (attribute (identifier_header) identifier_header (identifier_get) identifier_get )attribute (argument_list (string_'version') string_'version' )argument_list )call (integer_1) integer_1 )comparison_operator )boolean_operator )parenthesized_expression (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"Unexpected header: %r") string_"Unexpected header: %r" (identifier_header) identifier_header )binary_operator )argument_list )call )raise_statement )block )if_statement (return_statement (subscript (identifier_data) identifier_data (slice (integer_1) integer_1 (colon) colon )slice )subscript )return_statement )block )function_definition )module
Read a file from an idiosyncratic format that we use for storing approximate word frequencies, called "cBpack". The cBpack format is as follows: - The file on disk is a gzipped file in msgpack format, which decodes to a list whose first element is a header, and whose remaining elements are lists of words. - The header is a dictionary with 'format' and 'version' keys that make sure that we're reading the right thing. - Each inner list of words corresponds to a particular word frequency, rounded to the nearest centibel -- that is, one tenth of a decibel, or a factor of 10 ** .01. 0 cB represents a word that occurs with probability 1, so it is the only word in the data (this of course doesn't happen). -200 cB represents a word that occurs once per 100 tokens, -300 cB represents a word that occurs once per 1000 tokens, and so on. - The index of each list within the overall list (without the header) is the negative of its frequency in centibels. - Each inner list is sorted in alphabetical order. As an example, consider a corpus consisting only of the words "red fish blue fish". The word "fish" occurs as 50% of tokens (-30 cB), while "red" and "blue" occur as 25% of tokens (-60 cB). The cBpack file of their word frequencies would decode to this: [ {'format': 'cB', 'version': 1}, [], [], [], ... # 30 empty lists ['fish'], [], [], [], ... # 29 more empty lists ['blue', 'red'] ]
(module (function_definition (function_name_archive) function_name_archive (parameters (identifier_cwd) identifier_cwd (identifier_output) identifier_output (default_parameter (identifier_rev) identifier_rev (string_'tip') string_'tip' )default_parameter (default_parameter (identifier_fmt) identifier_fmt (None) None )default_parameter (default_parameter (identifier_prefix) identifier_prefix (None) None )default_parameter (default_parameter (identifier_user) identifier_user (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_cmd) identifier_cmd (list (string_'hg') string_'hg' (string_'archive') string_'archive' (call (attribute (string_'{0}') string_'{0}' (identifier_format) identifier_format )attribute (argument_list (identifier_output) identifier_output )argument_list )call (string_'--rev') string_'--rev' (call (attribute (string_'{0}') string_'{0}' (identifier_format) identifier_format )attribute (argument_list (identifier_rev) identifier_rev )argument_list )call )list )assignment )expression_statement (if_statement (identifier_fmt) identifier_fmt (block (expression_statement (call (attribute (identifier_cmd) identifier_cmd (identifier_append) identifier_append )attribute (argument_list (string_'--type') string_'--type' )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_cmd) identifier_cmd (identifier_append) identifier_append )attribute (argument_list (call (attribute (string_'{0}') string_'{0}' (identifier_format) identifier_format )attribute (argument_list (identifier_fmt) identifier_fmt )argument_list )call )argument_list )call )expression_statement )block )if_statement (if_statement (identifier_prefix) identifier_prefix (block (expression_statement (call (attribute (identifier_cmd) identifier_cmd (identifier_append) identifier_append )attribute (argument_list (string_'--prefix') string_'--prefix' )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_cmd) identifier_cmd (identifier_append) identifier_append )attribute (argument_list (call (attribute (string_'"{0}"') string_'"{0}"' (identifier_format) identifier_format )attribute (argument_list (identifier_prefix) identifier_prefix )argument_list )call )argument_list )call )expression_statement )block )if_statement (return_statement (call (subscript (identifier___salt__) identifier___salt__ (string_'cmd.run') string_'cmd.run' )subscript (argument_list (identifier_cmd) identifier_cmd (keyword_argument (identifier_cwd) identifier_cwd (identifier_cwd) identifier_cwd )keyword_argument (keyword_argument (identifier_runas) identifier_runas (identifier_user) identifier_user )keyword_argument (keyword_argument (identifier_python_shell) identifier_python_shell (False) False )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Export a tarball from the repository cwd The path to the Mercurial repository output The path to the archive tarball rev: tip The revision to create an archive from fmt: None Format of the resulting archive. Mercurial supports: tar, tbz2, tgz, zip, uzip, and files formats. prefix : None Prepend <prefix>/ to every filename in the archive user : None Run hg as a user other than what the minion runs as If ``prefix`` is not specified it defaults to the basename of the repo directory. CLI Example: .. code-block:: bash salt '*' hg.archive /path/to/repo output=/tmp/archive.tgz fmt=tgz
(module (function_definition (function_name_no_retry_on_failure) function_name_no_retry_on_failure (parameters (identifier_handler) identifier_handler )parameters (block (expression_statement (assignment (identifier_seen_request_ids) identifier_seen_request_ids (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement (decorated_definition (decorator (call (identifier_wraps) identifier_wraps (argument_list (identifier_handler) identifier_handler )argument_list )call )decorator (function_definition (function_name_wrapper) function_name_wrapper (parameters (identifier_event) identifier_event (identifier_context) identifier_context )parameters (block (if_statement (comparison_operator (attribute (identifier_context) identifier_context (identifier_aws_request_id) identifier_aws_request_id )attribute (identifier_seen_request_ids) identifier_seen_request_ids )comparison_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_critical) identifier_critical )attribute (argument_list (string_'Retry attempt on request id %s detected.') string_'Retry attempt on request id %s detected.' (attribute (identifier_context) identifier_context (identifier_aws_request_id) identifier_aws_request_id )attribute )argument_list )call )expression_statement (return_statement (dictionary (pair (string_'statusCode') string_'statusCode' (integer_200) integer_200 )pair )dictionary )return_statement )block )if_statement (expression_statement (call (attribute (identifier_seen_request_ids) identifier_seen_request_ids (identifier_add) identifier_add )attribute (argument_list (attribute (identifier_context) identifier_context (identifier_aws_request_id) identifier_aws_request_id )attribute )argument_list )call )expression_statement (return_statement (call (identifier_handler) identifier_handler (argument_list (identifier_event) identifier_event (identifier_context) identifier_context )argument_list )call )return_statement )block )function_definition )decorated_definition (return_statement (identifier_wrapper) identifier_wrapper )return_statement )block )function_definition )module
AWS Lambda retries scheduled lambdas that don't execute succesfully. This detects this by storing requests IDs in memory and exiting early on duplicates. Since this is in memory, don't use it on very frequently scheduled lambdas. It logs a critical message then exits with a statusCode of 200 to avoid further retries. Usage:: >>> import logging, sys >>> from lambda_decorators import no_retry_on_failure, logger >>> logger.addHandler(logging.StreamHandler(stream=sys.stdout)) >>> @no_retry_on_failure ... def scheduled_handler(event, context): ... return {'statusCode': 500} >>> class Context: ... aws_request_id = 1 >>> scheduled_handler({}, Context()) {'statusCode': 500} >>> scheduled_handler({}, Context()) Retry attempt on request id 1 detected. {'statusCode': 200}
(module (function_definition (function_name_merge_dicts) function_name_merge_dicts (parameters (typed_parameter (identifier_target_dict) identifier_target_dict (type (identifier_dict) identifier_dict )type )typed_parameter (typed_parameter (identifier_merge_dict) identifier_merge_dict (type (identifier_dict) identifier_dict )type )typed_parameter )parameters (type (identifier_dict) identifier_dict )type (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (string_"merging dict %s into %s") string_"merging dict %s into %s" (identifier_merge_dict) identifier_merge_dict (identifier_target_dict) identifier_target_dict )argument_list )call )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (identifier_merge_dict) identifier_merge_dict (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (identifier_key) identifier_key (identifier_target_dict) identifier_target_dict )comparison_operator (block (expression_statement (assignment (subscript (identifier_target_dict) identifier_target_dict (identifier_key) identifier_key )subscript (identifier_value) identifier_value )assignment )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_target_dict) identifier_target_dict )return_statement )block )function_definition )module
Merges ``merge_dict`` into ``target_dict`` if the latter does not already contain a value for each of the key names in ``merge_dict``. Used to cleanly merge default and environ data into notification payload. :param target_dict: The target dict to merge into and return, the user provided data for example :param merge_dict: The data that should be merged into the target data :return: A dict of merged data
(module (function_definition (function_name_intr_read) function_name_intr_read (parameters (identifier_self) identifier_self (identifier_dev_handle) identifier_dev_handle (identifier_ep) identifier_ep (identifier_intf) identifier_intf (identifier_size) identifier_size (identifier_timeout) identifier_timeout )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (expression_statement (call (identifier__not_implemented) identifier__not_implemented (argument_list (attribute (identifier_self) identifier_self (identifier_intr_read) identifier_intr_read )attribute )argument_list )call )expression_statement )block )function_definition )module
r"""Perform an interrut read. dev_handle is the value returned by the open_device() method. The ep parameter is the bEndpointAddress field whose endpoint the data will be received from. intf is the bInterfaceNumber field of the interface containing the endpoint. The buff parameter is the buffer to receive the data read, the length of the buffer tells how many bytes should be read. The timeout parameter specifies a time limit to the operation in miliseconds. The method returns the number of bytes actually read.
(module (function_definition (function_name__load_configuration) function_name__load_configuration (parameters )parameters (block (expression_statement (assignment (identifier_config) identifier_config (call (attribute (identifier_configparser) identifier_configparser (identifier_RawConfigParser) identifier_RawConfigParser )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_module_dir) identifier_module_dir (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (attribute (subscript (attribute (identifier_sys) identifier_sys (identifier_modules) identifier_modules )attribute (identifier___name__) identifier___name__ )subscript (identifier___file__) identifier___file__ )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_'APPDATA') string_'APPDATA' (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute )comparison_operator (block (expression_statement (assignment (identifier_os_config_path) identifier_os_config_path (subscript (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (string_'APPDATA') string_'APPDATA' )subscript )assignment )expression_statement )block (elif_clause (comparison_operator (string_'XDG_CONFIG_HOME') string_'XDG_CONFIG_HOME' (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute )comparison_operator (block (expression_statement (assignment (identifier_os_config_path) identifier_os_config_path (subscript (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (string_'XDG_CONFIG_HOME') string_'XDG_CONFIG_HOME' )subscript )assignment )expression_statement )block )elif_clause (elif_clause (comparison_operator (string_'HOME') string_'HOME' (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute )comparison_operator (block (expression_statement (assignment (identifier_os_config_path) identifier_os_config_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (subscript (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (string_'HOME') string_'HOME' )subscript (string_'.config') string_'.config' )argument_list )call )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_os_config_path) identifier_os_config_path (None) None )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_locations) identifier_locations (list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_module_dir) identifier_module_dir (string_'praw.ini') string_'praw.ini' )argument_list )call (string_'praw.ini') string_'praw.ini' )list )assignment )expression_statement (if_statement (comparison_operator (identifier_os_config_path) identifier_os_config_path (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_locations) identifier_locations (identifier_insert) identifier_insert )attribute (argument_list (integer_1) integer_1 (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_os_config_path) identifier_os_config_path (string_'praw.ini') string_'praw.ini' )argument_list )call )argument_list )call )expression_statement )block )if_statement (if_statement (not_operator (call (attribute (identifier_config) identifier_config (identifier_read) identifier_read )attribute (argument_list (identifier_locations) identifier_locations )argument_list )call )not_operator (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (call (attribute (string_'Could not find config file in any of: {0}') string_'Could not find config file in any of: {0}' (identifier_format) identifier_format )attribute (argument_list (identifier_locations) identifier_locations )argument_list )call )argument_list )call )raise_statement )block )if_statement (return_statement (identifier_config) identifier_config )return_statement )block )function_definition )module
Attempt to load settings from various praw.ini files.
(module (function_definition (function_name_set_pair) function_name_set_pair (parameters (identifier_self) identifier_self (identifier_term1) identifier_term1 (identifier_term2) identifier_term2 (identifier_value) identifier_value (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_key) identifier_key (call (attribute (identifier_self) identifier_self (identifier_key) identifier_key )attribute (argument_list (identifier_term1) identifier_term1 (identifier_term2) identifier_term2 )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_keys) identifier_keys )attribute (identifier_update) identifier_update )attribute (argument_list (list (identifier_term1) identifier_term1 (identifier_term2) identifier_term2 )list )argument_list )call )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_pairs) identifier_pairs )attribute (identifier_key) identifier_key )subscript (identifier_value) identifier_value )assignment )expression_statement )block )function_definition )module
Set the value for a pair of terms. Args: term1 (str) term2 (str) value (mixed)
(module (function_definition (function_name_scramble_codelist) function_name_scramble_codelist (parameters (identifier_self) identifier_self (identifier_codelist) identifier_codelist )parameters (block (expression_statement (assignment (identifier_path) identifier_path (call (attribute (string_".//{0}[@{1}='{2}']") string_".//{0}[@{1}='{2}']" (identifier_format) identifier_format )attribute (argument_list (attribute (attribute (identifier_E_ODM) identifier_E_ODM (identifier_CODELIST) identifier_CODELIST )attribute (identifier_value) identifier_value )attribute (attribute (attribute (identifier_A_ODM) identifier_A_ODM (identifier_OID) identifier_OID )attribute (identifier_value) identifier_value )attribute (identifier_codelist) identifier_codelist )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_elem) identifier_elem (call (attribute (attribute (identifier_self) identifier_self (identifier_metadata) identifier_metadata )attribute (identifier_find) identifier_find )attribute (argument_list (identifier_path) identifier_path )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_codes) identifier_codes (list )list )assignment )expression_statement (for_statement (identifier_c) identifier_c (call (attribute (identifier_elem) identifier_elem (identifier_iter) identifier_iter )attribute (argument_list (attribute (attribute (identifier_E_ODM) identifier_E_ODM (identifier_CODELIST_ITEM) identifier_CODELIST_ITEM )attribute (identifier_value) identifier_value )attribute )argument_list )call (block (expression_statement (call (attribute (identifier_codes) identifier_codes (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_c) identifier_c (identifier_get) identifier_get )attribute (argument_list (attribute (attribute (identifier_A_ODM) identifier_A_ODM (identifier_CODED_VALUE) identifier_CODED_VALUE )attribute (identifier_value) identifier_value )attribute )argument_list )call )argument_list )call )expression_statement )block )for_statement (for_statement (identifier_c) identifier_c (call (attribute (identifier_elem) identifier_elem (identifier_iter) identifier_iter )attribute (argument_list (attribute (attribute (identifier_E_ODM) identifier_E_ODM (identifier_ENUMERATED_ITEM) identifier_ENUMERATED_ITEM )attribute (identifier_value) identifier_value )attribute )argument_list )call (block (expression_statement (call (attribute (identifier_codes) identifier_codes (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_c) identifier_c (identifier_get) identifier_get )attribute (argument_list (attribute (attribute (identifier_A_ODM) identifier_A_ODM (identifier_CODED_VALUE) identifier_CODED_VALUE )attribute (identifier_value) identifier_value )attribute )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (call (attribute (identifier_fake) identifier_fake (identifier_random_element) identifier_random_element )attribute (argument_list (identifier_codes) identifier_codes )argument_list )call )return_statement )block )function_definition )module
Return random element from code list
(module (function_definition (function_name__correctArtefacts) function_name__correctArtefacts (parameters (identifier_self) identifier_self (identifier_image) identifier_image (identifier_threshold) identifier_threshold )parameters (block (expression_statement (assignment (identifier_image) identifier_image (call (attribute (identifier_np) identifier_np (identifier_nan_to_num) identifier_nan_to_num )attribute (argument_list (identifier_image) identifier_image )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_medianThreshold) identifier_medianThreshold (argument_list (identifier_image) identifier_image (identifier_threshold) identifier_threshold (keyword_argument (identifier_copy) identifier_copy (False) False )keyword_argument )argument_list )call )expression_statement (return_statement (identifier_image) identifier_image )return_statement )block )function_definition )module
Apply a thresholded median replacing high gradients and values beyond the boundaries
(module (function_definition (function_name__infer_sequence_helper) function_name__infer_sequence_helper (parameters (identifier_node) identifier_node (default_parameter (identifier_context) identifier_context (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_values) identifier_values (list )list )assignment )expression_statement (for_statement (identifier_elt) identifier_elt (attribute (identifier_node) identifier_node (identifier_elts) identifier_elts )attribute (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_elt) identifier_elt (attribute (identifier_nodes) identifier_nodes (identifier_Starred) identifier_Starred )attribute )argument_list )call (block (expression_statement (assignment (identifier_starred) identifier_starred (call (attribute (identifier_helpers) identifier_helpers (identifier_safe_infer) identifier_safe_infer )attribute (argument_list (attribute (identifier_elt) identifier_elt (identifier_value) identifier_value )attribute (identifier_context) identifier_context )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_starred) identifier_starred )not_operator (block (raise_statement (call (attribute (identifier_exceptions) identifier_exceptions (identifier_InferenceError) identifier_InferenceError )attribute (argument_list (keyword_argument (identifier_node) identifier_node (identifier_node) identifier_node )keyword_argument (keyword_argument (identifier_context) identifier_context (identifier_context) identifier_context )keyword_argument )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_starred) identifier_starred (string_"elts") string_"elts" )argument_list )call )not_operator (block (raise_statement (call (attribute (identifier_exceptions) identifier_exceptions (identifier_InferenceError) identifier_InferenceError )attribute (argument_list (keyword_argument (identifier_node) identifier_node (identifier_node) identifier_node )keyword_argument (keyword_argument (identifier_context) identifier_context (identifier_context) identifier_context )keyword_argument )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_values) identifier_values (identifier_extend) identifier_extend )attribute (argument_list (call (identifier__infer_sequence_helper) identifier__infer_sequence_helper (argument_list (identifier_starred) identifier_starred )argument_list )call )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_values) identifier_values (identifier_append) identifier_append )attribute (argument_list (identifier_elt) identifier_elt )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (return_statement (identifier_values) identifier_values )return_statement )block )function_definition )module
Infer all values based on _BaseContainer.elts
(module (function_definition (function_name_do_denyrep) function_name_do_denyrep (parameters (identifier_self) identifier_self (identifier_line) identifier_line )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__split_args) identifier__split_args )attribute (argument_list (identifier_line) identifier_line (integer_0) integer_0 (integer_0) integer_0 )argument_list )call )expression_statement (expression_statement (call (attribute (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier__command_processor) identifier__command_processor )attribute (identifier_get_session) identifier_get_session )attribute (argument_list )argument_list )call (identifier_get_replication_policy) identifier_get_replication_policy )attribute (argument_list )argument_list )call (identifier_set_replication_allowed) identifier_set_replication_allowed )attribute (argument_list (False) False )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__print_info_if_verbose) identifier__print_info_if_verbose )attribute (argument_list (string_"Set replication policy to deny replication") string_"Set replication policy to deny replication" )argument_list )call )expression_statement )block )function_definition )module
denyrep Prevent new objects from being replicated.
(module (function_definition (function_name_tx) function_name_tx (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (comparison_operator (integer_0) integer_0 (call (identifier_len) identifier_len (argument_list (identifier_args) identifier_args )argument_list )call )comparison_operator (block (return_statement (call (identifier_TX) identifier_TX (argument_list (identifier_self) identifier_self )argument_list )call )return_statement )block )if_statement (expression_statement (assignment (identifier_ops) identifier_ops (list )list )assignment )expression_statement (for_statement (identifier_op) identifier_op (identifier_args) identifier_args (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_op) identifier_op (identifier_list) identifier_list )argument_list )call (block (expression_statement (augmented_assignment (identifier_ops) identifier_ops (identifier_op) identifier_op )augmented_assignment )expression_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_op) identifier_op (tuple (identifier_str) identifier_str (identifier_unicode) identifier_unicode )tuple )argument_list )call (block (expression_statement (call (attribute (identifier_ops) identifier_ops (identifier_append) identifier_append )attribute (argument_list (identifier_op) identifier_op )argument_list )call )expression_statement )block )elif_clause )if_statement )block )for_statement (if_statement (comparison_operator (string_'debug') string_'debug' (identifier_kwargs) identifier_kwargs )comparison_operator (block (expression_statement (call (identifier_pp) identifier_pp (argument_list (identifier_ops) identifier_ops )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_tx_proc) identifier_tx_proc (binary_operator (string_"[ %s ]") string_"[ %s ]" (call (attribute (string_"") string_"" (identifier_join) identifier_join )attribute (argument_list (identifier_ops) identifier_ops )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_x) identifier_x (call (attribute (identifier_self) identifier_self (identifier_rest) identifier_rest )attribute (argument_list (string_'POST') string_'POST' (attribute (identifier_self) identifier_self (identifier_uri_db) identifier_uri_db )attribute (keyword_argument (identifier_data) identifier_data (dictionary (pair (string_"tx-data") string_"tx-data" (identifier_tx_proc) identifier_tx_proc )pair )dictionary )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_x) identifier_x )return_statement )block )function_definition )module
Executes a raw tx string, or get a new TX object to work with. Passing a raw string or list of strings will immedately transact and return the API response as a dict. >>> resp = tx('{:db/id #db/id[:db.part/user] :person/name "Bob"}') {db-before: db-after: tempids: } This gets a fresh `TX()` to prepare a transaction with. >>> tx = db.tx() New `E()` object with person/fname and person/lname attributes >>> person = tx.add('person/', {'fname':'John', 'lname':'Doe'}) New state and city objects referencing the state >>> state = tx.add('loc/state', 'WA') >>> city = tx.add('loc/city', 'Seattle', 'isin', state) Add person/city, person/state, and person/likes refs to the person entity >>> person.add('person/', {'city': city, 'state': state, 'likes': [city, state]}) Excute the transaction >>> resp = tx.tx() The resolved entity ids for our person >>> person.eid, state.eid, city.eid Fetch all attributes, behave like a dict >>> person.items() >>> person.iteritems() Access attribute as an attribute >>> person['person/name'] See `TX()` for options.
(module (function_definition (function_name_parse) function_name_parse (parameters (identifier_self) identifier_self (identifier_buf) identifier_buf )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__tokenizer) identifier__tokenizer )attribute (call (identifier_tokenize_asdl) identifier_tokenize_asdl (argument_list (identifier_buf) identifier_buf )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__advance) identifier__advance )attribute (argument_list )argument_list )call )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__parse_module) identifier__parse_module )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Parse the ASDL in the buffer and return an AST with a Module root.
(module (function_definition (function_name_f_ac_power) function_name_f_ac_power (parameters (identifier_inverter) identifier_inverter (identifier_v_mp) identifier_v_mp (identifier_p_mp) identifier_p_mp )parameters (block (return_statement (call (attribute (call (attribute (attribute (identifier_pvlib) identifier_pvlib (identifier_pvsystem) identifier_pvsystem )attribute (identifier_snlinverter) identifier_snlinverter )attribute (argument_list (identifier_v_mp) identifier_v_mp (identifier_p_mp) identifier_p_mp (identifier_inverter) identifier_inverter )argument_list )call (identifier_flatten) identifier_flatten )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Calculate AC power :param inverter: :param v_mp: :param p_mp: :return: AC power [W]
(module (function_definition (function_name__set_advertising_data) function_name__set_advertising_data (parameters (identifier_self) identifier_self (identifier_packet_type) identifier_packet_type (identifier_data) identifier_data )parameters (block (expression_statement (assignment (identifier_payload) identifier_payload (call (attribute (identifier_struct) identifier_struct (identifier_pack) identifier_pack )attribute (argument_list (binary_operator (string_"<BB%ss") string_"<BB%ss" (parenthesized_expression (call (identifier_len) identifier_len (argument_list (identifier_data) identifier_data )argument_list )call )parenthesized_expression )binary_operator (identifier_packet_type) identifier_packet_type (call (identifier_len) identifier_len (argument_list (identifier_data) identifier_data )argument_list )call (call (identifier_bytes) identifier_bytes (argument_list (identifier_data) identifier_data )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_self) identifier_self (identifier__send_command) identifier__send_command )attribute (argument_list (integer_6) integer_6 (integer_9) integer_9 (identifier_payload) identifier_payload )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_result) identifier_result )pattern_list (call (identifier_unpack) identifier_unpack (argument_list (string_"<H") string_"<H" (attribute (identifier_response) identifier_response (identifier_payload) identifier_payload )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_result) identifier_result (integer_0) integer_0 )comparison_operator (block (return_statement (expression_list (False) False (dictionary (pair (string_'reason') string_'reason' (string_'Error code from BLED112 setting advertising data') string_'Error code from BLED112 setting advertising data' )pair (pair (string_'code') string_'code' (identifier_result) identifier_result )pair )dictionary )expression_list )return_statement )block )if_statement (return_statement (expression_list (True) True (None) None )expression_list )return_statement )block )function_definition )module
Set the advertising data for advertisements sent out by this bled112 Args: packet_type (int): 0 for advertisement, 1 for scan response data (bytearray): the data to set
(module (function_definition (function_name_add_checkpoint) function_name_add_checkpoint (parameters (identifier_html_note) identifier_html_note (identifier_counter) identifier_counter )parameters (block (if_statement (attribute (identifier_html_note) identifier_html_note (identifier_text) identifier_text )attribute (block (expression_statement (assignment (attribute (identifier_html_note) identifier_html_note (identifier_text) identifier_text )attribute (parenthesized_expression (binary_operator (binary_operator (binary_operator (attribute (identifier_html_note) identifier_html_note (identifier_text) identifier_text )attribute (identifier_CHECKPOINT_PREFIX) identifier_CHECKPOINT_PREFIX )binary_operator (call (identifier_str) identifier_str (argument_list (identifier_counter) identifier_counter )argument_list )call )binary_operator (identifier_CHECKPOINT_SUFFIX) identifier_CHECKPOINT_SUFFIX )binary_operator )parenthesized_expression )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (attribute (identifier_html_note) identifier_html_note (identifier_text) identifier_text )attribute (parenthesized_expression (binary_operator (binary_operator (identifier_CHECKPOINT_PREFIX) identifier_CHECKPOINT_PREFIX (call (identifier_str) identifier_str (argument_list (identifier_counter) identifier_counter )argument_list )call )binary_operator (identifier_CHECKPOINT_SUFFIX) identifier_CHECKPOINT_SUFFIX )binary_operator )parenthesized_expression )assignment )expression_statement )block )else_clause )if_statement (expression_statement (augmented_assignment (identifier_counter) identifier_counter (integer_1) integer_1 )augmented_assignment )expression_statement (for_statement (identifier_child) identifier_child (call (attribute (identifier_html_note) identifier_html_note (identifier_iterchildren) identifier_iterchildren )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_counter) identifier_counter (call (identifier_add_checkpoint) identifier_add_checkpoint (argument_list (identifier_child) identifier_child (identifier_counter) identifier_counter )argument_list )call )assignment )expression_statement )block )for_statement (if_statement (attribute (identifier_html_note) identifier_html_note (identifier_tail) identifier_tail )attribute (block (expression_statement (assignment (attribute (identifier_html_note) identifier_html_note (identifier_tail) identifier_tail )attribute (parenthesized_expression (binary_operator (binary_operator (binary_operator (attribute (identifier_html_note) identifier_html_note (identifier_tail) identifier_tail )attribute (identifier_CHECKPOINT_PREFIX) identifier_CHECKPOINT_PREFIX )binary_operator (call (identifier_str) identifier_str (argument_list (identifier_counter) identifier_counter )argument_list )call )binary_operator (identifier_CHECKPOINT_SUFFIX) identifier_CHECKPOINT_SUFFIX )binary_operator )parenthesized_expression )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (attribute (identifier_html_note) identifier_html_note (identifier_tail) identifier_tail )attribute (parenthesized_expression (binary_operator (binary_operator (identifier_CHECKPOINT_PREFIX) identifier_CHECKPOINT_PREFIX (call (identifier_str) identifier_str (argument_list (identifier_counter) identifier_counter )argument_list )call )binary_operator (identifier_CHECKPOINT_SUFFIX) identifier_CHECKPOINT_SUFFIX )binary_operator )parenthesized_expression )assignment )expression_statement )block )else_clause )if_statement (expression_statement (augmented_assignment (identifier_counter) identifier_counter (integer_1) integer_1 )augmented_assignment )expression_statement (return_statement (identifier_counter) identifier_counter )return_statement )block )function_definition )module
Recursively adds checkpoints to html tree.
(module (function_definition (function_name__run_socket) function_name__run_socket (parameters (identifier_self) identifier_self )parameters (block (try_statement (block (while_statement (True) True (block (expression_statement (assignment (identifier_message) identifier_message (await (call (attribute (identifier_ZMQUtils) identifier_ZMQUtils (identifier_recv) identifier_recv )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__socket) identifier__socket )attribute )argument_list )call )await )assignment )expression_statement (expression_statement (assignment (identifier_msg_class) identifier_msg_class (attribute (identifier_message) identifier_message (identifier___msgtype__) identifier___msgtype__ )attribute )assignment )expression_statement (if_statement (comparison_operator (identifier_msg_class) identifier_msg_class (attribute (identifier_self) identifier_self (identifier__handlers_registered) identifier__handlers_registered )attribute )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__loop) identifier__loop )attribute (identifier_create_task) identifier_create_task )attribute (argument_list (call (subscript (attribute (identifier_self) identifier_self (identifier__handlers_registered) identifier__handlers_registered )attribute (identifier_msg_class) identifier_msg_class )subscript (argument_list (identifier_message) identifier_message )argument_list )call )argument_list )call )expression_statement )block (elif_clause (comparison_operator (identifier_msg_class) identifier_msg_class (attribute (identifier_self) identifier_self (identifier__transactions) identifier__transactions )attribute )comparison_operator (block (expression_statement (assignment (pattern_list (identifier__1) identifier__1 (identifier_get_key) identifier_get_key (identifier_coroutine_recv) identifier_coroutine_recv (identifier__2) identifier__2 (identifier_responsible) identifier_responsible )pattern_list (subscript (attribute (identifier_self) identifier_self (identifier__msgs_registered) identifier__msgs_registered )attribute (identifier_msg_class) identifier_msg_class )subscript )assignment )expression_statement (expression_statement (assignment (identifier_key) identifier_key (call (identifier_get_key) identifier_get_key (argument_list (identifier_message) identifier_message )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_key) identifier_key (subscript (attribute (identifier_self) identifier_self (identifier__transactions) identifier__transactions )attribute (identifier_msg_class) identifier_msg_class )subscript )comparison_operator (block (for_statement (pattern_list (identifier_args) identifier_args (identifier_kwargs) identifier_kwargs )pattern_list (subscript (subscript (attribute (identifier_self) identifier_self (identifier__transactions) identifier__transactions )attribute (identifier_msg_class) identifier_msg_class )subscript (identifier_key) identifier_key )subscript (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__loop) identifier__loop )attribute (identifier_create_task) identifier_create_task )attribute (argument_list (call (identifier_coroutine_recv) identifier_coroutine_recv (argument_list (identifier_message) identifier_message (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )argument_list )call )expression_statement )block )for_statement (for_statement (identifier_key2) identifier_key2 (identifier_responsible) identifier_responsible (block (delete_statement (subscript (subscript (attribute (identifier_self) identifier_self (identifier__transactions) identifier__transactions )attribute (identifier_key2) identifier_key2 )subscript (identifier_key) identifier_key )subscript )delete_statement )block )for_statement )block (else_clause (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (string_"Received message %s for an unknown transaction %s") string_"Received message %s for an unknown transaction %s" (identifier_msg_class) identifier_msg_class (identifier_key) identifier_key )argument_list )call )raise_statement )block )else_clause )if_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (string_"Received unknown message %s") string_"Received unknown message %s" (identifier_msg_class) identifier_msg_class )argument_list )call )raise_statement )block )else_clause )if_statement )block )while_statement )block (except_clause (attribute (identifier_asyncio) identifier_asyncio (identifier_CancelledError) identifier_CancelledError )attribute (block (return_statement )return_statement )block )except_clause (except_clause (identifier_KeyboardInterrupt) identifier_KeyboardInterrupt (block (return_statement )return_statement )block )except_clause )try_statement )block )function_definition )module
Task that runs this client.
(module (function_definition (function_name_read_csv) function_name_read_csv (parameters (identifier_filepath) identifier_filepath )parameters (block (expression_statement (assignment (identifier_symbols) identifier_symbols (list )list )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_filepath) identifier_filepath (string_'rb') string_'rb' )argument_list )call (as_pattern_target (identifier_csvfile) identifier_csvfile )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_spamreader) identifier_spamreader (call (attribute (identifier_csv) identifier_csv (identifier_DictReader) identifier_DictReader )attribute (argument_list (identifier_csvfile) identifier_csvfile (keyword_argument (identifier_delimiter) identifier_delimiter (string_',') string_',' )keyword_argument (keyword_argument (identifier_quotechar) identifier_quotechar (string_'"') string_'"' )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (identifier_row) identifier_row (identifier_spamreader) identifier_spamreader (block (expression_statement (call (attribute (identifier_symbols) identifier_symbols (identifier_append) identifier_append )attribute (argument_list (identifier_row) identifier_row )argument_list )call )expression_statement )block )for_statement )block )with_statement (return_statement (identifier_symbols) identifier_symbols )return_statement )block )function_definition )module
Read a CSV into a list of dictionarys. The first line of the CSV determines the keys of the dictionary. Parameters ---------- filepath : string Returns ------- list of dictionaries
(module (function_definition (function_name_vim_enter) function_name_vim_enter (parameters (identifier_self) identifier_self (identifier_filename) identifier_filename )parameters (block (expression_statement (assignment (identifier_success) identifier_success (call (attribute (identifier_self) identifier_self (identifier_setup) identifier_setup )attribute (argument_list (True) True (False) False )argument_list )call )assignment )expression_statement (if_statement (identifier_success) identifier_success (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_editor) identifier_editor )attribute (identifier_message) identifier_message )attribute (argument_list (string_"start_message") string_"start_message" )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Set up EnsimeClient when vim enters. This is useful to start the EnsimeLauncher as soon as possible.
(module (function_definition (function_name_route) function_name_route (parameters (identifier_cls) identifier_cls (identifier_path) identifier_path )parameters (block (if_statement (not_operator (call (attribute (identifier_path) identifier_path (identifier_startswith) identifier_startswith )attribute (argument_list (string_'/') string_'/' )argument_list )call )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Routes must start with "/"') string_'Routes must start with "/"' )argument_list )call )raise_statement )block )if_statement (function_definition (function_name_wrap) function_name_wrap (parameters (identifier_fn) identifier_fn )parameters (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_fn) identifier_fn (attribute (identifier_cls) identifier_cls (identifier_ROUTE_ATTRIBUTE) identifier_ROUTE_ATTRIBUTE )attribute (identifier_path) identifier_path )argument_list )call )expression_statement (return_statement (identifier_fn) identifier_fn )return_statement )block )function_definition (return_statement (identifier_wrap) identifier_wrap )return_statement )block )function_definition )module
A decorator to indicate that a method should be a routable HTTP endpoint. .. code-block:: python from compactor.process import Process class WebProcess(Process): @Process.route('/hello/world') def hello_world(self, handler): return handler.write('<html><title>hello world</title></html>') The handler passed to the method is a tornado RequestHandler. WARNING: This interface is alpha and may change in the future if or when we remove tornado as a compactor dependency. :param path: The endpoint to route to this method. :type path: ``str``
(module (function_definition (function_name_ts_stream_keys) function_name_ts_stream_keys (parameters (identifier_self) identifier_self (identifier_table) identifier_table (default_parameter (identifier_timeout) identifier_timeout (None) None )default_parameter )parameters (block (if_statement (not_operator (attribute (identifier_riak) identifier_riak (identifier_disable_list_exceptions) identifier_disable_list_exceptions )attribute )not_operator (block (raise_statement (call (identifier_ListError) identifier_ListError (argument_list )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_t) identifier_t (identifier_table) identifier_table )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_t) identifier_t (attribute (identifier_six) identifier_six (identifier_string_types) identifier_string_types )attribute )argument_list )call (block (expression_statement (assignment (identifier_t) identifier_t (call (identifier_Table) identifier_Table (argument_list (identifier_self) identifier_self (identifier_table) identifier_table )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (identifier__validate_timeout) identifier__validate_timeout (argument_list (identifier_timeout) identifier_timeout )argument_list )call )expression_statement (expression_statement (assignment (identifier_resource) identifier_resource (call (attribute (identifier_self) identifier_self (identifier__acquire) identifier__acquire )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_transport) identifier_transport (attribute (identifier_resource) identifier_resource (identifier_object) identifier_object )attribute )assignment )expression_statement (expression_statement (assignment (identifier_stream) identifier_stream (call (attribute (identifier_transport) identifier_transport (identifier_ts_stream_keys) identifier_ts_stream_keys )attribute (argument_list (identifier_t) identifier_t (identifier_timeout) identifier_timeout )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_stream) identifier_stream (identifier_attach) identifier_attach )attribute (argument_list (identifier_resource) identifier_resource )argument_list )call )expression_statement (try_statement (block (for_statement (identifier_keylist) identifier_keylist (identifier_stream) identifier_stream (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_keylist) identifier_keylist )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (yield (identifier_keylist) identifier_keylist )yield )expression_statement )block )if_statement )block )for_statement )block (finally_clause (block (expression_statement (call (attribute (identifier_stream) identifier_stream (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )finally_clause )try_statement )block )function_definition )module
Lists all keys in a time series table via a stream. This is a generator method which should be iterated over. The caller should explicitly close the returned iterator, either using :func:`contextlib.closing` or calling ``close()`` explicitly. Consuming the entire iterator will also close the stream. If it does not, the associated connection might not be returned to the pool. Example:: from contextlib import closing # Using contextlib.closing with closing(client.ts_stream_keys(mytable)) as keys: for key_list in keys: do_something(key_list) # Explicit close() stream = client.ts_stream_keys(mytable) for key_list in stream: do_something(key_list) stream.close() :param table: the table from which to stream keys :type table: string or :class:`Table <riak.table.Table>` :param timeout: a timeout value in milliseconds :type timeout: int :rtype: iterator
(module (function_definition (function_name_inputfiles) function_name_inputfiles (parameters (identifier_self) identifier_self (default_parameter (identifier_inputtemplate) identifier_inputtemplate (None) None )default_parameter )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_inputtemplate) identifier_inputtemplate (identifier_InputTemplate) identifier_InputTemplate )argument_list )call (block (expression_statement (assignment (identifier_inputtemplate) identifier_inputtemplate (attribute (identifier_inputtemplate) identifier_inputtemplate (identifier_id) identifier_id )attribute )assignment )expression_statement )block )if_statement (for_statement (identifier_inputfile) identifier_inputfile (attribute (identifier_self) identifier_self (identifier_input) identifier_input )attribute (block (if_statement (boolean_operator (not_operator (identifier_inputtemplate) identifier_inputtemplate )not_operator (comparison_operator (attribute (attribute (identifier_inputfile) identifier_inputfile (identifier_metadata) identifier_metadata )attribute (identifier_inputtemplate) identifier_inputtemplate )attribute (identifier_inputtemplate) identifier_inputtemplate )comparison_operator )boolean_operator (block (expression_statement (yield (identifier_inputfile) identifier_inputfile )yield )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Generator yielding all inputfiles for the specified inputtemplate, if ``inputtemplate=None``, inputfiles are returned regardless of inputtemplate.
(module (function_definition (function_name_get_methods) function_name_get_methods (parameters (identifier_extension_name) identifier_extension_name )parameters (block (expression_statement (assignment (identifier_extension) identifier_extension (call (identifier_get_extension) identifier_get_extension (argument_list (identifier_extension_name) identifier_extension_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_methods) identifier_methods (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_name) identifier_name (identifier_i) identifier_i )pattern_list (call (attribute (identifier_inspect) identifier_inspect (identifier_getmembers) identifier_getmembers )attribute (argument_list (identifier_extension) identifier_extension )argument_list )call (block (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_i) identifier_i (string_'nago_access') string_'nago_access' )argument_list )call (block (expression_statement (assignment (identifier_api_name) identifier_api_name (attribute (identifier_i) identifier_i (identifier_nago_name) identifier_nago_name )attribute )assignment )expression_statement (expression_statement (assignment (subscript (identifier_methods) identifier_methods (identifier_api_name) identifier_api_name )subscript (identifier_i) identifier_i )assignment )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_methods) identifier_methods )return_statement )block )function_definition )module
Return all methods in extension that have nago_access set
(module (function_definition (function_name_process_polychord_run) function_name_process_polychord_run (parameters (identifier_file_root) identifier_file_root (identifier_base_dir) identifier_base_dir (default_parameter (identifier_process_stats_file) identifier_process_stats_file (True) True )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_samples) identifier_samples (call (attribute (identifier_np) identifier_np (identifier_loadtxt) identifier_loadtxt )attribute (argument_list (binary_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_base_dir) identifier_base_dir (identifier_file_root) identifier_file_root )argument_list )call (string_'_dead-birth.txt') string_'_dead-birth.txt' )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ns_run) identifier_ns_run (call (identifier_process_samples_array) identifier_process_samples_array (argument_list (identifier_samples) identifier_samples (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_ns_run) identifier_ns_run (string_'output') string_'output' )subscript (dictionary (pair (string_'base_dir') string_'base_dir' (identifier_base_dir) identifier_base_dir )pair (pair (string_'file_root') string_'file_root' (identifier_file_root) identifier_file_root )pair )dictionary )assignment )expression_statement (if_statement (identifier_process_stats_file) identifier_process_stats_file (block (try_statement (block (expression_statement (assignment (subscript (identifier_ns_run) identifier_ns_run (string_'output') string_'output' )subscript (call (identifier_process_polychord_stats) identifier_process_polychord_stats (argument_list (identifier_file_root) identifier_file_root (identifier_base_dir) identifier_base_dir )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (tuple (identifier_OSError) identifier_OSError (identifier_IOError) identifier_IOError (identifier_ValueError) identifier_ValueError )tuple (as_pattern_target (identifier_err) identifier_err )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_warnings) identifier_warnings (identifier_warn) identifier_warn )attribute (argument_list (call (attribute (parenthesized_expression (concatenated_string (string_'process_polychord_stats raised {} processing {}.stats file. ') string_'process_polychord_stats raised {} processing {}.stats file. ' (string_' Proceeding without stats.') string_' Proceeding without stats.' )concatenated_string )parenthesized_expression (identifier_format) identifier_format )attribute (argument_list (attribute (call (identifier_type) identifier_type (argument_list (identifier_err) identifier_err )argument_list )call (identifier___name__) identifier___name__ )attribute (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_base_dir) identifier_base_dir (identifier_file_root) identifier_file_root )argument_list )call )argument_list )call (identifier_UserWarning) identifier_UserWarning )argument_list )call )expression_statement )block )except_clause )try_statement )block )if_statement (return_statement (identifier_ns_run) identifier_ns_run )return_statement )block )function_definition )module
Loads data from a PolyChord run into the nestcheck dictionary format for analysis. N.B. producing required output file containing information about the iso-likelihood contours within which points were sampled (where they were "born") requies PolyChord version v1.13 or later and the setting write_dead=True. Parameters ---------- file_root: str Root for run output file names (PolyChord file_root setting). base_dir: str Directory containing data (PolyChord base_dir setting). process_stats_file: bool, optional Should PolyChord's <root>.stats file be processed? Set to False if you don't have the <root>.stats file (such as if PolyChord was run with write_stats=False). kwargs: dict, optional Options passed to ns_run_utils.check_ns_run. Returns ------- ns_run: dict Nested sampling run dict (see the module docstring for more details).
(module (function_definition (function_name_get_many_to_many_lines) function_name_get_many_to_many_lines (parameters (identifier_self) identifier_self (default_parameter (identifier_force) identifier_force (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_lines) identifier_lines (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_field) identifier_field (identifier_rel_items) identifier_rel_items )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_many_to_many_waiting_list) identifier_many_to_many_waiting_list )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (for_statement (identifier_rel_item) identifier_rel_item (call (identifier_list) identifier_list (argument_list (identifier_rel_items) identifier_rel_items )argument_list )call (block (try_statement (block (expression_statement (assignment (identifier_pk_name) identifier_pk_name (attribute (attribute (attribute (identifier_rel_item) identifier_rel_item (identifier__meta) identifier__meta )attribute (identifier_pk) identifier_pk )attribute (identifier_name) identifier_name )attribute )assignment )expression_statement (expression_statement (assignment (identifier_key) identifier_key (binary_operator (string_'%s_%s') string_'%s_%s' (tuple (attribute (attribute (identifier_rel_item) identifier_rel_item (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute (call (identifier_getattr) identifier_getattr (argument_list (identifier_rel_item) identifier_rel_item (identifier_pk_name) identifier_pk_name )argument_list )call )tuple )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_value) identifier_value (binary_operator (string_"%s") string_"%s" (subscript (attribute (identifier_self) identifier_self (identifier_context) identifier_context )attribute (identifier_key) identifier_key )subscript )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_lines) identifier_lines (identifier_append) identifier_append )attribute (argument_list (binary_operator (string_'%s.%s.add(%s)') string_'%s.%s.add(%s)' (tuple (attribute (identifier_self) identifier_self (identifier_variable_name) identifier_variable_name )attribute (attribute (identifier_field) identifier_field (identifier_name) identifier_name )attribute (identifier_value) identifier_value )tuple )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_many_to_many_waiting_list) identifier_many_to_many_waiting_list )attribute (identifier_field) identifier_field )subscript (identifier_remove) identifier_remove )attribute (argument_list (identifier_rel_item) identifier_rel_item )argument_list )call )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (if_statement (identifier_force) identifier_force (block (expression_statement (assignment (identifier_item_locator) identifier_item_locator (call (identifier_orm_item_locator) identifier_orm_item_locator (argument_list (identifier_rel_item) identifier_rel_item )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (subscript (attribute (identifier_self) identifier_self (identifier_context) identifier_context )attribute (string_"__extra_imports") string_"__extra_imports" )subscript (attribute (attribute (identifier_rel_item) identifier_rel_item (identifier__meta) identifier__meta )attribute (identifier_object_name) identifier_object_name )attribute )subscript (attribute (identifier_rel_item) identifier_rel_item (identifier___module__) identifier___module__ )attribute )assignment )expression_statement (expression_statement (call (attribute (identifier_lines) identifier_lines (identifier_append) identifier_append )attribute (argument_list (binary_operator (string_'%s.%s.add( %s )') string_'%s.%s.add( %s )' (tuple (attribute (identifier_self) identifier_self (identifier_variable_name) identifier_variable_name )attribute (attribute (identifier_field) identifier_field (identifier_name) identifier_name )attribute (identifier_item_locator) identifier_item_locator )tuple )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_many_to_many_waiting_list) identifier_many_to_many_waiting_list )attribute (identifier_field) identifier_field )subscript (identifier_remove) identifier_remove )attribute (argument_list (identifier_rel_item) identifier_rel_item )argument_list )call )expression_statement )block )if_statement )block )except_clause )try_statement )block )for_statement )block )for_statement (if_statement (identifier_lines) identifier_lines (block (expression_statement (call (attribute (identifier_lines) identifier_lines (identifier_append) identifier_append )attribute (argument_list (string_"") string_"" )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_lines) identifier_lines )return_statement )block )function_definition )module
Generate lines that define many to many relations for this instance.
(module (function_definition (function_name__notify) function_name__notify (parameters (identifier_self) identifier_self (identifier_task) identifier_task (identifier_message) identifier_message )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_notify_func) identifier_notify_func )attribute (block (expression_statement (assignment (identifier_message) identifier_message (call (attribute (identifier_common) identifier_common (identifier_to_utf8) identifier_to_utf8 )attribute (argument_list (call (attribute (identifier_message) identifier_message (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_title) identifier_title (call (attribute (identifier_common) identifier_common (identifier_to_utf8) identifier_to_utf8 )attribute (argument_list (call (attribute (string_u'Focus ({0})') string_u'Focus ({0})' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_task) identifier_task (identifier_name) identifier_name )attribute )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_notify_func) identifier_notify_func )attribute (argument_list (identifier_title) identifier_title (identifier_message) identifier_message )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Shows system notification message according to system requirements. `message` Status message.
(module (function_definition (function_name_get_path_directories) function_name_get_path_directories (parameters )parameters (block (expression_statement (assignment (identifier_pth) identifier_pth (subscript (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (string_'PATH') string_'PATH' )subscript )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (attribute (identifier_sys) identifier_sys (identifier_platform) identifier_platform )attribute (string_'win32') string_'win32' )comparison_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (identifier_get) identifier_get )attribute (argument_list (string_"BASH") string_"BASH" )argument_list )call )boolean_operator (block (if_statement (comparison_operator (subscript (identifier_pth) identifier_pth (integer_1) integer_1 )subscript (string_';') string_';' )comparison_operator (block (expression_statement (assignment (identifier_pth) identifier_pth (call (attribute (identifier_pth) identifier_pth (identifier_replace) identifier_replace )attribute (argument_list (string_';') string_';' (string_':') string_':' (integer_1) integer_1 )argument_list )call )assignment )expression_statement )block )if_statement )block )if_statement (return_statement (list_comprehension (call (attribute (identifier_p) identifier_p (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call (for_in_clause (identifier_p) identifier_p (call (attribute (identifier_pth) identifier_pth (identifier_split) identifier_split )attribute (argument_list (attribute (identifier_os) identifier_os (identifier_pathsep) identifier_pathsep )attribute )argument_list )call )for_in_clause (if_clause (call (attribute (identifier_p) identifier_p (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )if_clause )list_comprehension )return_statement )block )function_definition )module
Return a list of all the directories on the path.
(module (function_definition (function_name___get_service_from_factory) function_name___get_service_from_factory (parameters (identifier_self) identifier_self (identifier_bundle) identifier_bundle (identifier_reference) identifier_reference )parameters (block (try_statement (block (expression_statement (assignment (pattern_list (identifier_factory) identifier_factory (identifier_svc_reg) identifier_svc_reg )pattern_list (subscript (attribute (identifier_self) identifier_self (identifier___svc_factories) identifier___svc_factories )attribute (identifier_reference) identifier_reference )subscript )assignment )expression_statement (expression_statement (assignment (identifier_imports) identifier_imports (call (attribute (attribute (identifier_self) identifier_self (identifier___bundle_imports) identifier___bundle_imports )attribute (identifier_setdefault) identifier_setdefault )attribute (argument_list (identifier_bundle) identifier_bundle (dictionary )dictionary )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_reference) identifier_reference (identifier_imports) identifier_imports )comparison_operator (block (expression_statement (assignment (identifier_usage_counter) identifier_usage_counter (call (identifier__UsageCounter) identifier__UsageCounter (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_usage_counter) identifier_usage_counter (identifier_inc) identifier_inc )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (subscript (identifier_imports) identifier_imports (identifier_reference) identifier_reference )subscript (identifier_usage_counter) identifier_usage_counter )assignment )expression_statement (expression_statement (call (attribute (identifier_reference) identifier_reference (identifier_used_by) identifier_used_by )attribute (argument_list (identifier_bundle) identifier_bundle )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_factory_counter) identifier_factory_counter (call (attribute (attribute (identifier_self) identifier_self (identifier___factory_usage) identifier___factory_usage )attribute (identifier_setdefault) identifier_setdefault )attribute (argument_list (identifier_bundle) identifier_bundle (call (identifier__FactoryCounter) identifier__FactoryCounter (argument_list (identifier_bundle) identifier_bundle )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_factory_counter) identifier_factory_counter (identifier_get_service) identifier_get_service )attribute (argument_list (identifier_factory) identifier_factory (identifier_svc_reg) identifier_svc_reg )argument_list )call )return_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (raise_statement (call (identifier_BundleException) identifier_BundleException (argument_list (call (attribute (string_"Service not found (reference: {0})") string_"Service not found (reference: {0})" (identifier_format) identifier_format )attribute (argument_list (identifier_reference) identifier_reference )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Returns a service instance from a service factory or a prototype service factory :param bundle: The bundle requiring the service :param reference: A reference pointing to a factory :return: The requested service :raise BundleException: The service could not be found
(module (function_definition (function_name_transpose) function_name_transpose (parameters (identifier_self) identifier_self (default_parameter (identifier_name) identifier_name (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_name) identifier_name (None) None )comparison_operator (block (expression_statement (assignment (identifier_name) identifier_name (binary_operator (attribute (identifier_self) identifier_self (identifier_module_name) identifier_module_name )attribute (string_"_transpose") string_"_transpose" )binary_operator )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__data_format) identifier__data_format )attribute (identifier_DATA_FORMAT_NWC) identifier_DATA_FORMAT_NWC )comparison_operator (block (expression_statement (assignment (identifier_stride) identifier_stride (subscript (attribute (identifier_self) identifier_self (identifier__stride) identifier__stride )attribute (slice (integer_1) integer_1 (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_stride) identifier_stride (subscript (attribute (identifier_self) identifier_self (identifier__stride) identifier__stride )attribute (slice (integer_2) integer_2 (colon) colon )slice )subscript )assignment )expression_statement )block )else_clause )if_statement (return_statement (call (identifier_Conv1D) identifier_Conv1D (argument_list (keyword_argument (identifier_output_channels) identifier_output_channels (lambda (attribute (identifier_self) identifier_self (identifier_input_channels) identifier_input_channels )attribute )lambda )keyword_argument (keyword_argument (identifier_kernel_shape) identifier_kernel_shape (attribute (identifier_self) identifier_self (identifier_kernel_shape) identifier_kernel_shape )attribute )keyword_argument (keyword_argument (identifier_stride) identifier_stride (identifier_stride) identifier_stride )keyword_argument (keyword_argument (identifier_padding) identifier_padding (attribute (identifier_self) identifier_self (identifier_padding) identifier_padding )attribute )keyword_argument (keyword_argument (identifier_use_bias) identifier_use_bias (attribute (identifier_self) identifier_self (identifier__use_bias) identifier__use_bias )attribute )keyword_argument (keyword_argument (identifier_initializers) identifier_initializers (attribute (identifier_self) identifier_self (identifier_initializers) identifier_initializers )attribute )keyword_argument (keyword_argument (identifier_partitioners) identifier_partitioners (attribute (identifier_self) identifier_self (identifier_partitioners) identifier_partitioners )attribute )keyword_argument (keyword_argument (identifier_regularizers) identifier_regularizers (attribute (identifier_self) identifier_self (identifier_regularizers) identifier_regularizers )attribute )keyword_argument (keyword_argument (identifier_data_format) identifier_data_format (attribute (identifier_self) identifier_self (identifier__data_format) identifier__data_format )attribute )keyword_argument (keyword_argument (identifier_custom_getter) identifier_custom_getter (attribute (identifier_self) identifier_self (identifier__custom_getter) identifier__custom_getter )attribute )keyword_argument (keyword_argument (identifier_name) identifier_name (identifier_name) identifier_name )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Returns matching `Conv1D` module. Args: name: Optional string assigning name of transpose module. The default name is constructed by appending "_transpose" to `self.name`. Returns: `Conv1D` module.
(module (function_definition (function_name_workflows) function_name_workflows (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__workflows) identifier__workflows )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__workflows) identifier__workflows )attribute (call (identifier_WorkflowList) identifier_WorkflowList (argument_list (attribute (identifier_self) identifier_self (identifier__version) identifier__version )attribute (keyword_argument (identifier_workspace_sid) identifier_workspace_sid (subscript (attribute (identifier_self) identifier_self (identifier__solution) identifier__solution )attribute (string_'sid') string_'sid' )subscript )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier__workflows) identifier__workflows )attribute )return_statement )block )function_definition )module
Access the workflows :returns: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowList :rtype: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowList
(module (function_definition (function_name_get_resultsets) function_name_get_resultsets (parameters (identifier_self) identifier_self (identifier_routine) identifier_routine (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern )parameters (block (expression_statement (assignment (tuple_pattern (identifier_query) identifier_query (identifier_replacements) identifier_replacements )tuple_pattern (call (attribute (identifier_self) identifier_self (identifier___build_raw_query) identifier___build_raw_query )attribute (argument_list (identifier_routine) identifier_routine (identifier_args) identifier_args )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_connection) identifier_connection (call (attribute (attribute (attribute (identifier_mm) identifier_mm (identifier_db) identifier_db )attribute (identifier_ENGINE) identifier_ENGINE )attribute (identifier_raw_connection) identifier_raw_connection )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_sets) identifier_sets (list )list )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_cursor) identifier_cursor (call (attribute (identifier_connection) identifier_connection (identifier_cursor) identifier_cursor )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_cursor) identifier_cursor (identifier_execute) identifier_execute )attribute (argument_list (identifier_query) identifier_query (identifier_replacements) identifier_replacements )argument_list )call )expression_statement (while_statement (integer_1) integer_1 (block (expression_statement (assignment (identifier_names) identifier_names (list_comprehension (subscript (identifier_c) identifier_c (integer_0) integer_0 )subscript (for_in_clause (identifier_c) identifier_c (attribute (identifier_cursor) identifier_cursor (identifier_description) identifier_description )attribute )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_set_) identifier_set_ (list )list )assignment )expression_statement (while_statement (integer_1) integer_1 (block (expression_statement (assignment (identifier_row_raw) identifier_row_raw (call (attribute (identifier_cursor) identifier_cursor (identifier_fetchone) identifier_fetchone )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_row_raw) identifier_row_raw (None) None )comparison_operator (block (break_statement )break_statement )block )if_statement (expression_statement (assignment (identifier_row) identifier_row (call (identifier_dict) identifier_dict (argument_list (call (identifier_zip) identifier_zip (argument_list (identifier_names) identifier_names (identifier_row_raw) identifier_row_raw )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_set_) identifier_set_ (identifier_append) identifier_append )attribute (argument_list (identifier_row) identifier_row )argument_list )call )expression_statement )block )while_statement (expression_statement (call (attribute (identifier_sets) identifier_sets (identifier_append) identifier_append )attribute (argument_list (call (identifier_list) identifier_list (argument_list (identifier_set_) identifier_set_ )argument_list )call )argument_list )call )expression_statement (if_statement (comparison_operator (call (attribute (identifier_cursor) identifier_cursor (identifier_nextset) identifier_nextset )attribute (argument_list )argument_list )call (None) None )comparison_operator (block (break_statement )break_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_cursor) identifier_cursor (identifier_description) identifier_description )attribute (None) None )comparison_operator (block (break_statement )break_statement )block )if_statement )block )while_statement )block (finally_clause (block (expression_statement (call (attribute (identifier_connection) identifier_connection (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )finally_clause )try_statement (return_statement (identifier_sets) identifier_sets )return_statement )block )function_definition )module
Return a list of lists of dictionaries, for when a query returns more than one resultset.
(module (function_definition (function_name_get_last_commit_to_master) function_name_get_last_commit_to_master (parameters (default_parameter (identifier_repo_path) identifier_repo_path (string_".") string_"." )default_parameter )parameters (block (expression_statement (assignment (identifier_last_commit) identifier_last_commit (None) None )assignment )expression_statement (expression_statement (assignment (identifier_repo) identifier_repo (None) None )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_repo) identifier_repo (call (identifier_Repo) identifier_Repo (argument_list (identifier_repo_path) identifier_repo_path )argument_list )call )assignment )expression_statement )block (except_clause (tuple (identifier_InvalidGitRepositoryError) identifier_InvalidGitRepositoryError (identifier_NoSuchPathError) identifier_NoSuchPathError )tuple (block (expression_statement (assignment (identifier_repo) identifier_repo (None) None )assignment )expression_statement )block )except_clause )try_statement (if_statement (identifier_repo) identifier_repo (block (try_statement (block (expression_statement (assignment (identifier_last_commit) identifier_last_commit (subscript (call (attribute (identifier_repo) identifier_repo (identifier_commits) identifier_commits )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (expression_statement (assignment (identifier_last_commit) identifier_last_commit (attribute (attribute (identifier_repo) identifier_repo (identifier_head) identifier_head )attribute (identifier_commit) identifier_commit )attribute )assignment )expression_statement )block )except_clause )try_statement )block )if_statement (return_statement (call (identifier_str) identifier_str (argument_list (identifier_last_commit) identifier_last_commit )argument_list )call )return_statement )block )function_definition )module
returns the last commit on the master branch. It would be more ideal to get the commit from the branch we are currently on, but as this is a check mostly to help with production issues, returning the commit from master will be sufficient.
(module (function_definition (function_name_remove_showcase) function_name_remove_showcase (parameters (identifier_self) identifier_self (identifier_showcase) identifier_showcase )parameters (block (expression_statement (assignment (identifier_dataset_showcase) identifier_dataset_showcase (call (attribute (identifier_self) identifier_self (identifier__get_dataset_showcase_dict) identifier__get_dataset_showcase_dict )attribute (argument_list (identifier_showcase) identifier_showcase )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_showcase) identifier_showcase (call (attribute (attribute (attribute (identifier_hdx) identifier_hdx (identifier_data) identifier_data )attribute (identifier_showcase) identifier_showcase )attribute (identifier_Showcase) identifier_Showcase )attribute (argument_list (dictionary (pair (string_'id') string_'id' (subscript (identifier_dataset_showcase) identifier_dataset_showcase (string_'showcase_id') string_'showcase_id' )subscript )pair )dictionary (keyword_argument (identifier_configuration) identifier_configuration (attribute (identifier_self) identifier_self (identifier_configuration) identifier_configuration )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_showcase) identifier_showcase (identifier__write_to_hdx) identifier__write_to_hdx )attribute (argument_list (string_'disassociate') string_'disassociate' (identifier_dataset_showcase) identifier_dataset_showcase (string_'package_id') string_'package_id' )argument_list )call )expression_statement )block )function_definition )module
Remove dataset from showcase Args: showcase (Union[Showcase,Dict,str]): Either a showcase id string or showcase metadata from a Showcase object or dictionary Returns: None
(module (function_definition (function_name__update) function_name__update (parameters (identifier_self) identifier_self (identifier_data) identifier_data )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_orderby) identifier_orderby )attribute (subscript (identifier_data) identifier_data (string_'orderby') string_'orderby' )subscript )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_revision) identifier_revision )attribute (subscript (identifier_data) identifier_data (string_'revisionid') string_'revisionid' )subscript )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_title) identifier_title )attribute (subscript (identifier_data) identifier_data (string_'title') string_'title' )subscript )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_lines) identifier_lines )attribute (list_comprehension (call (identifier_Line) identifier_Line (argument_list (attribute (identifier_self) identifier_self (identifier_guideid) identifier_guideid )attribute (attribute (identifier_self) identifier_self (identifier_stepid) identifier_stepid )attribute (subscript (identifier_line) identifier_line (string_'lineid') string_'lineid' )subscript (keyword_argument (identifier_data) identifier_data (identifier_line) identifier_line )keyword_argument )argument_list )call (for_in_clause (identifier_line) identifier_line (subscript (identifier_data) identifier_data (string_'lines') string_'lines' )subscript )for_in_clause )list_comprehension )assignment )expression_statement (if_statement (comparison_operator (subscript (subscript (identifier_data) identifier_data (string_'media') string_'media' )subscript (string_'type') string_'type' )subscript (string_'image') string_'image' )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_media) identifier_media )attribute (list )list )assignment )expression_statement (for_statement (identifier_image) identifier_image (subscript (subscript (identifier_data) identifier_data (string_'media') string_'media' )subscript (string_'data') string_'data' )subscript (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_media) identifier_media )attribute (identifier_append) identifier_append )attribute (argument_list (call (identifier_Image) identifier_Image (argument_list (subscript (identifier_image) identifier_image (string_'id') string_'id' )subscript )argument_list )call )argument_list )call )expression_statement )block )for_statement )block )if_statement )block )function_definition )module
Update the step using the blob of json-parsed data directly from the API.
(module (function_definition (function_name_get_hosted_zones_by_domain) function_name_get_hosted_zones_by_domain (parameters (identifier_Name) identifier_Name (default_parameter (identifier_region) identifier_region (None) None )default_parameter (default_parameter (identifier_key) identifier_key (None) None )default_parameter (default_parameter (identifier_keyid) identifier_keyid (None) None )default_parameter (default_parameter (identifier_profile) identifier_profile (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_conn) identifier_conn (call (identifier__get_conn) identifier__get_conn (argument_list (keyword_argument (identifier_region) identifier_region (identifier_region) identifier_region )keyword_argument (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument (keyword_argument (identifier_keyid) identifier_keyid (identifier_keyid) identifier_keyid )keyword_argument (keyword_argument (identifier_profile) identifier_profile (identifier_profile) identifier_profile )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_zones) identifier_zones (list_comprehension (identifier_z) identifier_z (for_in_clause (identifier_z) identifier_z (call (identifier__collect_results) identifier__collect_results (argument_list (attribute (identifier_conn) identifier_conn (identifier_list_hosted_zones) identifier_list_hosted_zones )attribute (string_'HostedZones') string_'HostedZones' (dictionary )dictionary )argument_list )call )for_in_clause (if_clause (comparison_operator (subscript (identifier_z) identifier_z (string_'Name') string_'Name' )subscript (call (identifier_aws_encode) identifier_aws_encode (argument_list (identifier_Name) identifier_Name )argument_list )call )comparison_operator )if_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_ret) identifier_ret (list )list )assignment )expression_statement (for_statement (identifier_z) identifier_z (identifier_zones) identifier_zones (block (expression_statement (augmented_assignment (identifier_ret) identifier_ret (call (identifier_get_hosted_zone) identifier_get_hosted_zone (argument_list (keyword_argument (identifier_Id) identifier_Id (subscript (identifier_z) identifier_z (string_'Id') string_'Id' )subscript )keyword_argument (keyword_argument (identifier_region) identifier_region (identifier_region) identifier_region )keyword_argument (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument (keyword_argument (identifier_keyid) identifier_keyid (identifier_keyid) identifier_keyid )keyword_argument (keyword_argument (identifier_profile) identifier_profile (identifier_profile) identifier_profile )keyword_argument )argument_list )call )augmented_assignment )expression_statement )block )for_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Find any zones with the given domain name and return detailed info about them. Note that this can return multiple Route53 zones, since a domain name can be used in both public and private zones. Name The domain name associated with the Hosted Zone(s). region Region to connect to. key Secret key to be used. keyid Access key to be used. profile Dict, or pillar key pointing to a dict, containing AWS region/key/keyid. CLI Example: .. code-block:: bash salt myminion boto3_route53.get_hosted_zones_by_domain salt.org. \ profile='{"region": "us-east-1", "keyid": "A12345678AB", "key": "xblahblahblah"}'
(module (function_definition (function_name__ssh_build_mic) function_name__ssh_build_mic (parameters (identifier_self) identifier_self (identifier_session_id) identifier_session_id (identifier_username) identifier_username (identifier_service) identifier_service (identifier_auth_method) identifier_auth_method )parameters (block (expression_statement (assignment (identifier_mic) identifier_mic (call (attribute (identifier_self) identifier_self (identifier__make_uint32) identifier__make_uint32 )attribute (argument_list (call (identifier_len) identifier_len (argument_list (identifier_session_id) identifier_session_id )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_mic) identifier_mic (identifier_session_id) identifier_session_id )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_mic) identifier_mic (call (attribute (identifier_struct) identifier_struct (identifier_pack) identifier_pack )attribute (argument_list (string_"B") string_"B" (identifier_MSG_USERAUTH_REQUEST) identifier_MSG_USERAUTH_REQUEST )argument_list )call )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_mic) identifier_mic (call (attribute (identifier_self) identifier_self (identifier__make_uint32) identifier__make_uint32 )attribute (argument_list (call (identifier_len) identifier_len (argument_list (identifier_username) identifier_username )argument_list )call )argument_list )call )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_mic) identifier_mic (call (attribute (identifier_username) identifier_username (identifier_encode) identifier_encode )attribute (argument_list )argument_list )call )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_mic) identifier_mic (call (attribute (identifier_self) identifier_self (identifier__make_uint32) identifier__make_uint32 )attribute (argument_list (call (identifier_len) identifier_len (argument_list (identifier_service) identifier_service )argument_list )call )argument_list )call )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_mic) identifier_mic (call (attribute (identifier_service) identifier_service (identifier_encode) identifier_encode )attribute (argument_list )argument_list )call )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_mic) identifier_mic (call (attribute (identifier_self) identifier_self (identifier__make_uint32) identifier__make_uint32 )attribute (argument_list (call (identifier_len) identifier_len (argument_list (identifier_auth_method) identifier_auth_method )argument_list )call )argument_list )call )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_mic) identifier_mic (call (attribute (identifier_auth_method) identifier_auth_method (identifier_encode) identifier_encode )attribute (argument_list )argument_list )call )augmented_assignment )expression_statement (return_statement (identifier_mic) identifier_mic )return_statement )block )function_definition )module
Create the SSH2 MIC filed for gssapi-with-mic. :param str session_id: The SSH session ID :param str username: The name of the user who attempts to login :param str service: The requested SSH service :param str auth_method: The requested SSH authentication mechanism :return: The MIC as defined in RFC 4462. The contents of the MIC field are: string session_identifier, byte SSH_MSG_USERAUTH_REQUEST, string user-name, string service (ssh-connection), string authentication-method (gssapi-with-mic or gssapi-keyex)
(module (function_definition (function_name_remove) function_name_remove (parameters (identifier_obj) identifier_obj (identifier_kind) identifier_kind )parameters (block (if_statement (not_operator (call (attribute (identifier_obj) identifier_obj (identifier_get_badge) identifier_get_badge )attribute (argument_list (identifier_kind) identifier_kind )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_api) identifier_api (identifier_abort) identifier_abort )attribute (argument_list (integer_404) integer_404 (string_'Badge does not exists') string_'Badge does not exists' )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_obj) identifier_obj (identifier_remove_badge) identifier_remove_badge )attribute (argument_list (identifier_kind) identifier_kind )argument_list )call )expression_statement (return_statement (expression_list (string_'') string_'' (integer_204) integer_204 )expression_list )return_statement )block )function_definition )module
Handle badge removal API - Returns 404 if the badge for this kind is absent - Returns 204 on success
(module (function_definition (function_name___getDataFromURL) function_name___getDataFromURL (parameters (identifier_url) identifier_url )parameters (block (expression_statement (assignment (identifier_code) identifier_code (integer_0) integer_0 )assignment )expression_statement (while_statement (comparison_operator (identifier_code) identifier_code (integer_200) integer_200 )comparison_operator (block (expression_statement (assignment (identifier_req) identifier_req (call (identifier_Request) identifier_Request (argument_list (identifier_url) identifier_url )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_response) identifier_response (call (identifier_urlopen) identifier_urlopen (argument_list (identifier_req) identifier_req )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_code) identifier_code (attribute (identifier_response) identifier_response (identifier_code) identifier_code )attribute )assignment )expression_statement (expression_statement (call (identifier_sleep) identifier_sleep (argument_list (float_0.01) float_0.01 )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_HTTPError) identifier_HTTPError (as_pattern_target (identifier_error) identifier_error )as_pattern_target )as_pattern (block (expression_statement (assignment (identifier_code) identifier_code (attribute (identifier_error) identifier_error (identifier_code) identifier_code )attribute )assignment )expression_statement (if_statement (comparison_operator (identifier_code) identifier_code (integer_404) integer_404 )comparison_operator (block (break_statement )break_statement )block )if_statement )block )except_clause (except_clause (as_pattern (identifier_URLError) identifier_URLError (as_pattern_target (identifier_error) identifier_error )as_pattern_target )as_pattern (block (expression_statement (call (identifier_sleep) identifier_sleep (argument_list (integer_3) integer_3 )argument_list )call )expression_statement )block )except_clause )try_statement )block )while_statement (if_statement (comparison_operator (identifier_code) identifier_code (integer_404) integer_404 )comparison_operator (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (string_"User was not found") string_"User was not found" )argument_list )call )raise_statement )block )if_statement (return_statement (call (attribute (call (attribute (identifier_response) identifier_response (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 )return_statement )block )function_definition )module
Read HTML data from an user GitHub profile. :param url: URL of the webpage to download. :type url: str. :return: webpage donwloaded. :rtype: str.
(module (function_definition (function_name_new) function_name_new (parameters (identifier_cls) identifier_cls (identifier_variable) identifier_variable (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (return_statement (call (attribute (identifier_cls) identifier_cls (identifier_array2mask) identifier_array2mask )attribute (argument_list (call (attribute (identifier_numpy) identifier_numpy (identifier_full) identifier_full )attribute (argument_list (attribute (identifier_variable) identifier_variable (identifier_shape) identifier_shape )attribute (True) True )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Return a new |DefaultMask| object associated with the given |Variable| object.
(module (function_definition (function_name_search_product) function_name_search_product (parameters (identifier_self) identifier_self (default_parameter (identifier_limit) identifier_limit (integer_100) integer_100 )default_parameter (default_parameter (identifier_offset) identifier_offset (integer_0) integer_0 )default_parameter (default_parameter (identifier_with_price) identifier_with_price (integer_0) integer_0 )default_parameter (default_parameter (identifier_with_supported_software) identifier_with_supported_software (integer_0) integer_0 )default_parameter (default_parameter (identifier_with_description) identifier_with_description (integer_0) integer_0 )default_parameter )parameters (block (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_self) identifier_self (identifier_request) identifier_request )attribute (argument_list (call (attribute (identifier_E) identifier_E (identifier_searchProductSslCertRequest) identifier_searchProductSslCertRequest )attribute (argument_list (call (attribute (identifier_E) identifier_E (identifier_limit) identifier_limit )attribute (argument_list (identifier_limit) identifier_limit )argument_list )call (call (attribute (identifier_E) identifier_E (identifier_offset) identifier_offset )attribute (argument_list (identifier_offset) identifier_offset )argument_list )call (call (attribute (identifier_E) identifier_E (identifier_withPrice) identifier_withPrice )attribute (argument_list (call (identifier_int) identifier_int (argument_list (identifier_with_price) identifier_with_price )argument_list )call )argument_list )call (call (attribute (identifier_E) identifier_E (identifier_withSupportedSoftware) identifier_withSupportedSoftware )attribute (argument_list (call (identifier_int) identifier_int (argument_list (identifier_with_supported_software) identifier_with_supported_software )argument_list )call )argument_list )call (call (attribute (identifier_E) identifier_E (identifier_withDescription) identifier_withDescription )attribute (argument_list (call (identifier_int) identifier_int (argument_list (identifier_with_description) identifier_with_description )argument_list )call )argument_list )call )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_response) identifier_response (identifier_as_models) identifier_as_models )attribute (argument_list (identifier_SSLProduct) identifier_SSLProduct )argument_list )call )return_statement )block )function_definition )module
Search the list of available products.
(module (function_definition (function_name__api_scrape) function_name__api_scrape (parameters (identifier_json_inp) identifier_json_inp (identifier_ndx) identifier_ndx )parameters (block (try_statement (block (expression_statement (assignment (identifier_headers) identifier_headers (subscript (subscript (subscript (identifier_json_inp) identifier_json_inp (string_'resultSets') string_'resultSets' )subscript (identifier_ndx) identifier_ndx )subscript (string_'headers') string_'headers' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_values) identifier_values (subscript (subscript (subscript (identifier_json_inp) identifier_json_inp (string_'resultSets') string_'resultSets' )subscript (identifier_ndx) identifier_ndx )subscript (string_'rowSet') string_'rowSet' )subscript )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (try_statement (block (expression_statement (assignment (identifier_headers) identifier_headers (subscript (subscript (subscript (identifier_json_inp) identifier_json_inp (string_'resultSet') string_'resultSet' )subscript (identifier_ndx) identifier_ndx )subscript (string_'headers') string_'headers' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_values) identifier_values (subscript (subscript (subscript (identifier_json_inp) identifier_json_inp (string_'resultSet') string_'resultSet' )subscript (identifier_ndx) identifier_ndx )subscript (string_'rowSet') string_'rowSet' )subscript )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (assignment (identifier_headers) identifier_headers (subscript (subscript (identifier_json_inp) identifier_json_inp (string_'resultSet') string_'resultSet' )subscript (string_'headers') string_'headers' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_values) identifier_values (subscript (subscript (identifier_json_inp) identifier_json_inp (string_'resultSet') string_'resultSet' )subscript (string_'rowSet') string_'rowSet' )subscript )assignment )expression_statement )block )except_clause )try_statement )block )except_clause )try_statement (if_statement (identifier_HAS_PANDAS) identifier_HAS_PANDAS (block (return_statement (call (identifier_DataFrame) identifier_DataFrame (argument_list (identifier_values) identifier_values (keyword_argument (identifier_columns) identifier_columns (identifier_headers) identifier_headers )keyword_argument )argument_list )call )return_statement )block (else_clause (block (return_statement (list_comprehension (call (identifier_dict) identifier_dict (argument_list (call (identifier_zip) identifier_zip (argument_list (identifier_headers) identifier_headers (identifier_value) identifier_value )argument_list )call )argument_list )call (for_in_clause (identifier_value) identifier_value (identifier_values) identifier_values )for_in_clause )list_comprehension )return_statement )block )else_clause )if_statement )block )function_definition )module
Internal method to streamline the getting of data from the json Args: json_inp (json): json input from our caller ndx (int): index where the data is located in the api Returns: If pandas is present: DataFrame (pandas.DataFrame): data set from ndx within the API's json else: A dictionary of both headers and values from the page
(module (function_definition (function_name_from_string) function_name_from_string (parameters (identifier_self) identifier_self (identifier_repo) identifier_repo (identifier_name) identifier_name (identifier_string) identifier_string )parameters (block (try_statement (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (binary_operator (string_'Creating new item: %s') string_'Creating new item: %s' (identifier_name) identifier_name )binary_operator )argument_list )call )expression_statement (expression_statement (assignment (identifier_blob) identifier_blob (call (attribute (identifier_Blob) identifier_Blob (identifier_from_string) identifier_from_string )attribute (argument_list (identifier_string) identifier_string )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_item) identifier_item (call (identifier_Item) identifier_Item (argument_list (keyword_argument (identifier_parent) identifier_parent (identifier_repo) identifier_repo )keyword_argument (keyword_argument (identifier_sha) identifier_sha (attribute (identifier_blob) identifier_blob (identifier_sha) identifier_sha )attribute )keyword_argument (keyword_argument (identifier_path) identifier_path (identifier_name) identifier_name )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_item) identifier_item (identifier_blob) identifier_blob )attribute (identifier_blob) identifier_blob )assignment )expression_statement (return_statement (identifier_item) identifier_item )return_statement )block (except_clause (identifier_AssertionError) identifier_AssertionError (identifier_e) identifier_e (block (raise_statement (call (identifier_ItemError) identifier_ItemError (argument_list (identifier_e) identifier_e )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Create a new Item from a data stream. :param repo: Repo object. :param name: Name of item. :param data: Data stream. :return: New Item class instance.
(module (function_definition (function_name_sql) function_name_sql (parameters (identifier_self) identifier_self (identifier_query) identifier_query )parameters (block (expression_statement (assignment (identifier_limited_query) identifier_limited_query (call (attribute (string_'SELECT * FROM ({}) t0 LIMIT 0') string_'SELECT * FROM ({}) t0 LIMIT 0' (identifier_format) identifier_format )attribute (argument_list (identifier_query) identifier_query )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_schema) identifier_schema (call (attribute (identifier_self) identifier_self (identifier__get_schema_using_query) identifier__get_schema_using_query )attribute (argument_list (identifier_limited_query) identifier_limited_query )argument_list )call )assignment )expression_statement (return_statement (call (attribute (call (attribute (identifier_ops) identifier_ops (identifier_SQLQueryResult) identifier_SQLQueryResult )attribute (argument_list (identifier_query) identifier_query (identifier_schema) identifier_schema (identifier_self) identifier_self )argument_list )call (identifier_to_expr) identifier_to_expr )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Convert a SQL query to an Ibis table expression Parameters ---------- Returns ------- table : TableExpr
(module (function_definition (function_name__audio_response_for_run) function_name__audio_response_for_run (parameters (identifier_self) identifier_self (identifier_tensor_events) identifier_tensor_events (identifier_run) identifier_run (identifier_tag) identifier_tag (identifier_sample) identifier_sample )parameters (block (expression_statement (assignment (identifier_response) identifier_response (list )list )assignment )expression_statement (expression_statement (assignment (identifier_index) identifier_index (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (identifier_filtered_events) identifier_filtered_events (call (attribute (identifier_self) identifier_self (identifier__filter_by_sample) identifier__filter_by_sample )attribute (argument_list (identifier_tensor_events) identifier_tensor_events (identifier_sample) identifier_sample )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_content_type) identifier_content_type (call (attribute (identifier_self) identifier_self (identifier__get_mime_type) identifier__get_mime_type )attribute (argument_list (identifier_run) identifier_run (identifier_tag) identifier_tag )argument_list )call )assignment )expression_statement (for_statement (tuple_pattern (identifier_index) identifier_index (identifier_tensor_event) identifier_tensor_event )tuple_pattern (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_filtered_events) identifier_filtered_events )argument_list )call (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_tensor_util) identifier_tensor_util (identifier_make_ndarray) identifier_make_ndarray )attribute (argument_list (attribute (identifier_tensor_event) identifier_tensor_event (identifier_tensor_proto) identifier_tensor_proto )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_label) identifier_label (subscript (identifier_data) identifier_data (identifier_sample) identifier_sample (integer_1) integer_1 )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_response) identifier_response (identifier_append) identifier_append )attribute (argument_list (dictionary (pair (string_'wall_time') string_'wall_time' (attribute (identifier_tensor_event) identifier_tensor_event (identifier_wall_time) identifier_wall_time )attribute )pair (pair (string_'step') string_'step' (attribute (identifier_tensor_event) identifier_tensor_event (identifier_step) identifier_step )attribute )pair (pair (string_'label') string_'label' (call (attribute (identifier_plugin_util) identifier_plugin_util (identifier_markdown_to_safe_html) identifier_markdown_to_safe_html )attribute (argument_list (identifier_label) identifier_label )argument_list )call )pair (pair (string_'contentType') string_'contentType' (identifier_content_type) identifier_content_type )pair (pair (string_'query') string_'query' (call (attribute (identifier_self) identifier_self (identifier__query_for_individual_audio) identifier__query_for_individual_audio )attribute (argument_list (identifier_run) identifier_run (identifier_tag) identifier_tag (identifier_sample) identifier_sample (identifier_index) identifier_index )argument_list )call )pair )dictionary )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_response) identifier_response )return_statement )block )function_definition )module
Builds a JSON-serializable object with information about audio. Args: tensor_events: A list of image event_accumulator.TensorEvent objects. run: The name of the run. tag: The name of the tag the audio entries all belong to. sample: The zero-indexed sample of the audio sample for which to retrieve information. For instance, setting `sample` to `2` will fetch information about only the third audio clip of each batch, and steps with fewer than three audio clips will be omitted from the results. Returns: A list of dictionaries containing the wall time, step, URL, width, and height for each audio entry.
(module (function_definition (function_name_jd_to_struct_time) function_name_jd_to_struct_time (parameters (identifier_jd) identifier_jd )parameters (block (expression_statement (assignment (pattern_list (identifier_year) identifier_year (identifier_month) identifier_month (identifier_day) identifier_day )pattern_list (call (attribute (identifier_jdutil) identifier_jdutil (identifier_jd_to_date) identifier_jd_to_date )attribute (argument_list (identifier_jd) identifier_jd )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_day_fraction) identifier_day_fraction (binary_operator (identifier_day) identifier_day (call (identifier_int) identifier_int (argument_list (identifier_day) identifier_day )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_hour) identifier_hour (identifier_minute) identifier_minute (identifier_second) identifier_second (identifier_ms) identifier_ms )pattern_list (call (attribute (identifier_jdutil) identifier_jdutil (identifier_days_to_hmsm) identifier_days_to_hmsm )attribute (argument_list (identifier_day_fraction) identifier_day_fraction )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_day) identifier_day (call (identifier_int) identifier_int (argument_list (identifier_day) identifier_day )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_year) identifier_year (identifier_month) identifier_month (identifier_day) identifier_day (identifier_hour) identifier_hour (identifier_minute) identifier_minute (identifier_second) identifier_second )pattern_list (call (identifier__roll_negative_time_fields) identifier__roll_negative_time_fields (argument_list (identifier_year) identifier_year (identifier_month) identifier_month (identifier_day) identifier_day (identifier_hour) identifier_hour (identifier_minute) identifier_minute (identifier_second) identifier_second )argument_list )call )assignment )expression_statement (return_statement (call (identifier_struct_time) identifier_struct_time (argument_list (binary_operator (list (identifier_year) identifier_year (identifier_month) identifier_month (identifier_day) identifier_day (identifier_hour) identifier_hour (identifier_minute) identifier_minute (identifier_second) identifier_second )list (identifier_TIME_EMPTY_EXTRAS) identifier_TIME_EMPTY_EXTRAS )binary_operator )argument_list )call )return_statement )block )function_definition )module
Return a `struct_time` converted from a Julian Date float number. WARNING: Conversion to then from Julian Date value to `struct_time` can be inaccurate and lose or gain time, especially for BC (negative) years. NOTE: extra fields `tm_wday`, `tm_yday`, and `tm_isdst` are set to default values, not real ones.
(module (function_definition (function_name_fix_symbol) function_name_fix_symbol (parameters (identifier_self) identifier_self (identifier_symbol) identifier_symbol (default_parameter (identifier_reverse) identifier_reverse (False) False )default_parameter )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_symbol_mapping) identifier_symbol_mapping )attribute )not_operator (block (return_statement (identifier_symbol) identifier_symbol )return_statement )block )if_statement (for_statement (pattern_list (identifier_old) identifier_old (identifier_new) identifier_new )pattern_list (attribute (identifier_self) identifier_self (identifier_symbol_mapping) identifier_symbol_mapping )attribute (block (if_statement (identifier_reverse) identifier_reverse (block (if_statement (comparison_operator (identifier_symbol) identifier_symbol (identifier_new) identifier_new )comparison_operator (block (return_statement (identifier_old) identifier_old )return_statement )block )if_statement )block (else_clause (block (if_statement (comparison_operator (identifier_symbol) identifier_symbol (identifier_old) identifier_old )comparison_operator (block (return_statement (identifier_new) identifier_new )return_statement )block )if_statement )block )else_clause )if_statement )block )for_statement (return_statement (identifier_symbol) identifier_symbol )return_statement )block )function_definition )module
In comes a moneywagon format symbol, and returned in the symbol converted to one the service can understand.
(module (function_definition (function_name_fpopen) function_name_fpopen (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_uid) identifier_uid (call (attribute (identifier_kwargs) identifier_kwargs (identifier_pop) identifier_pop )attribute (argument_list (string_'uid') string_'uid' (unary_operator (integer_1) integer_1 )unary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_gid) identifier_gid (call (attribute (identifier_kwargs) identifier_kwargs (identifier_pop) identifier_pop )attribute (argument_list (string_'gid') string_'gid' (unary_operator (integer_1) integer_1 )unary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_mode) identifier_mode (call (attribute (identifier_kwargs) identifier_kwargs (identifier_pop) identifier_pop )attribute (argument_list (string_'mode') string_'mode' (None) None )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_fopen) identifier_fopen (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call (as_pattern_target (identifier_f_handle) identifier_f_handle )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_path) identifier_path (subscript (identifier_args) identifier_args (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_d_stat) identifier_d_stat (call (attribute (identifier_os) identifier_os (identifier_stat) identifier_stat )attribute (argument_list (identifier_path) identifier_path )argument_list )call )assignment )expression_statement (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_os) identifier_os (string_'chown') string_'chown' )argument_list )call (block (if_statement (boolean_operator (parenthesized_expression (boolean_operator (comparison_operator (attribute (identifier_d_stat) identifier_d_stat (identifier_st_uid) identifier_st_uid )attribute (identifier_uid) identifier_uid )comparison_operator (comparison_operator (attribute (identifier_d_stat) identifier_d_stat (identifier_st_gid) identifier_st_gid )attribute (identifier_gid) identifier_gid )comparison_operator )boolean_operator )parenthesized_expression (line_continuation_\) line_continuation_\ (list_comprehension (identifier_i) identifier_i (for_in_clause (identifier_i) identifier_i (tuple (identifier_uid) identifier_uid (identifier_gid) identifier_gid )tuple )for_in_clause (if_clause (comparison_operator (identifier_i) identifier_i (unary_operator (integer_1) integer_1 )unary_operator )comparison_operator )if_clause )list_comprehension )boolean_operator (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_chown) identifier_chown )attribute (argument_list (identifier_path) identifier_path (identifier_uid) identifier_uid (identifier_gid) identifier_gid )argument_list )call )expression_statement )block )if_statement )block )if_statement (if_statement (comparison_operator (identifier_mode) identifier_mode (None) None )comparison_operator (block (expression_statement (assignment (identifier_mode_part) identifier_mode_part (call (attribute (identifier_stat) identifier_stat (identifier_S_IMODE) identifier_S_IMODE )attribute (argument_list (attribute (identifier_d_stat) identifier_d_stat (identifier_st_mode) identifier_st_mode )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_mode_part) identifier_mode_part (identifier_mode) identifier_mode )comparison_operator (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_chmod) identifier_chmod )attribute (argument_list (identifier_path) identifier_path (binary_operator (parenthesized_expression (binary_operator (attribute (identifier_d_stat) identifier_d_stat (identifier_st_mode) identifier_st_mode )attribute (identifier_mode_part) identifier_mode_part )binary_operator )parenthesized_expression (identifier_mode) identifier_mode )binary_operator )argument_list )call )expression_statement )block )if_statement )block )if_statement (expression_statement (yield (identifier_f_handle) identifier_f_handle )yield )expression_statement )block )with_statement )block )function_definition )module
Shortcut for fopen with extra uid, gid, and mode options. Supported optional Keyword Arguments: mode Explicit mode to set. Mode is anything os.chmod would accept as input for mode. Works only on unix/unix-like systems. uid The uid to set, if not set, or it is None or -1 no changes are made. Same applies if the path is already owned by this uid. Must be int. Works only on unix/unix-like systems. gid The gid to set, if not set, or it is None or -1 no changes are made. Same applies if the path is already owned by this gid. Must be int. Works only on unix/unix-like systems.
(module (function_definition (function_name_is_subdirectory) function_name_is_subdirectory (parameters (identifier_path_a) identifier_path_a (identifier_path_b) identifier_path_b )parameters (block (expression_statement (assignment (identifier_path_a) identifier_path_a (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_realpath) identifier_realpath )attribute (argument_list (identifier_path_a) identifier_path_a )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_path_b) identifier_path_b (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_realpath) identifier_realpath )attribute (argument_list (identifier_path_b) identifier_path_b )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_relative) identifier_relative (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_relpath) identifier_relpath )attribute (argument_list (identifier_path_a) identifier_path_a (identifier_path_b) identifier_path_b )argument_list )call )assignment )expression_statement (return_statement (parenthesized_expression (not_operator (call (attribute (identifier_relative) identifier_relative (identifier_startswith) identifier_startswith )attribute (argument_list (binary_operator (attribute (identifier_os) identifier_os (identifier_pardir) identifier_pardir )attribute (attribute (identifier_os) identifier_os (identifier_sep) identifier_sep )attribute )binary_operator )argument_list )call )not_operator )parenthesized_expression )return_statement )block )function_definition )module
Returns True if `path_a` is a subdirectory of `path_b`.
(module (function_definition (function_name_list_installed) function_name_list_installed (parameters )parameters (block (expression_statement (assignment (identifier_cmd) identifier_cmd (concatenated_string (string_'Get-WindowsFeature ') string_'Get-WindowsFeature ' (string_'-ErrorAction SilentlyContinue ') string_'-ErrorAction SilentlyContinue ' (string_'-WarningAction SilentlyContinue ') string_'-WarningAction SilentlyContinue ' (string_'| Select DisplayName,Name,Installed') string_'| Select DisplayName,Name,Installed' )concatenated_string )assignment )expression_statement (expression_statement (assignment (identifier_features) identifier_features (call (identifier__pshell_json) identifier__pshell_json (argument_list (identifier_cmd) identifier_cmd )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ret) identifier_ret (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_entry) identifier_entry (identifier_features) identifier_features (block (if_statement (subscript (identifier_entry) identifier_entry (string_'Installed') string_'Installed' )subscript (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (subscript (identifier_entry) identifier_entry (string_'Name') string_'Name' )subscript )subscript (subscript (identifier_entry) identifier_entry (string_'DisplayName') string_'DisplayName' )subscript )assignment )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
List installed features. Supported on Windows Server 2008 and Windows 8 and newer. Returns: dict: A dictionary of installed features CLI Example: .. code-block:: bash salt '*' win_servermanager.list_installed
(module (function_definition (function_name_gather_registries) function_name_gather_registries (parameters )parameters (type (generic_type (identifier_Tuple) identifier_Tuple (type_parameter (type (identifier_Dict) identifier_Dict )type (type (identifier_Mapping) identifier_Mapping )type (type (identifier_Mapping) identifier_Mapping )type )type_parameter )generic_type )type (block (expression_statement (assignment (identifier_id2devices) identifier_id2devices (call (attribute (identifier_copy) identifier_copy (identifier_copy) identifier_copy )attribute (argument_list (identifier__id2devices) identifier__id2devices )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_registry) identifier_registry (call (attribute (identifier_copy) identifier_copy (identifier_copy) identifier_copy )attribute (argument_list (identifier__registry) identifier__registry )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_selection) identifier_selection (call (attribute (identifier_copy) identifier_copy (identifier_copy) identifier_copy )attribute (argument_list (identifier__selection) identifier__selection )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_dict_) identifier_dict_ (call (identifier_globals) identifier_globals (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_dict_) identifier_dict_ (string_'_id2devices') string_'_id2devices' )subscript (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (subscript (identifier_dict_) identifier_dict_ (string_'_registry') string_'_registry' )subscript (dictionary (pair (identifier_Node) identifier_Node (dictionary )dictionary )pair (pair (identifier_Element) identifier_Element (dictionary )dictionary )pair )dictionary )assignment )expression_statement (expression_statement (assignment (subscript (identifier_dict_) identifier_dict_ (string_'_selection') string_'_selection' )subscript (dictionary (pair (identifier_Node) identifier_Node (dictionary )dictionary )pair (pair (identifier_Element) identifier_Element (dictionary )dictionary )pair )dictionary )assignment )expression_statement (return_statement (expression_list (identifier_id2devices) identifier_id2devices (identifier_registry) identifier_registry (identifier_selection) identifier_selection )expression_list )return_statement )block )function_definition )module
Get and clear the current |Node| and |Element| registries. Function |gather_registries| is thought to be used by class |Tester| only.
(module (function_definition (function_name_export_image_to_uri) function_name_export_image_to_uri (parameters (identifier_self) identifier_self (identifier_image_id) identifier_image_id (identifier_uri) identifier_uri (default_parameter (identifier_ibm_api_key) identifier_ibm_api_key (None) None )default_parameter )parameters (block (if_statement (comparison_operator (string_'cos://') string_'cos://' (identifier_uri) identifier_uri )comparison_operator (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_vgbdtg) identifier_vgbdtg )attribute (identifier_copyToIcos) identifier_copyToIcos )attribute (argument_list (dictionary (pair (string_'uri') string_'uri' (identifier_uri) identifier_uri )pair (pair (string_'ibmApiKey') string_'ibmApiKey' (identifier_ibm_api_key) identifier_ibm_api_key )pair )dictionary (keyword_argument (identifier_id) identifier_id (identifier_image_id) identifier_image_id )keyword_argument )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_vgbdtg) identifier_vgbdtg )attribute (identifier_copyToExternalSource) identifier_copyToExternalSource )attribute (argument_list (dictionary (pair (string_'uri') string_'uri' (identifier_uri) identifier_uri )pair )dictionary (keyword_argument (identifier_id) identifier_id (identifier_image_id) identifier_image_id )keyword_argument )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Export image into the given object storage :param int image_id: The ID of the image :param string uri: The URI for object storage of the format swift://<objectStorageAccount>@<cluster>/<container>/<objectPath> or cos://<regionName>/<bucketName>/<objectPath> if using IBM Cloud Object Storage :param string ibm_api_key: Ibm Api Key needed to communicate with IBM Cloud Object Storage
(module (function_definition (function_name_libvlc_media_player_get_state) function_name_libvlc_media_player_get_state (parameters (identifier_p_mi) identifier_p_mi )parameters (block (expression_statement (assignment (identifier_f) identifier_f (boolean_operator (call (attribute (identifier__Cfunctions) identifier__Cfunctions (identifier_get) identifier_get )attribute (argument_list (string_'libvlc_media_player_get_state') string_'libvlc_media_player_get_state' (None) None )argument_list )call (line_continuation_\) line_continuation_\ (call (identifier__Cfunction) identifier__Cfunction (argument_list (string_'libvlc_media_player_get_state') string_'libvlc_media_player_get_state' (tuple (tuple (integer_1) integer_1 )tuple )tuple (None) None (identifier_State) identifier_State (identifier_MediaPlayer) identifier_MediaPlayer )argument_list )call )boolean_operator )assignment )expression_statement (return_statement (call (identifier_f) identifier_f (argument_list (identifier_p_mi) identifier_p_mi )argument_list )call )return_statement )block )function_definition )module
Get current movie state. @param p_mi: the Media Player. @return: the current state of the media player (playing, paused, ...) See libvlc_state_t.
(module (function_definition (function_name__get_usage_data) function_name__get_usage_data (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_raw_res) identifier_raw_res (await (call (attribute (attribute (identifier_self) identifier_self (identifier__session) identifier__session )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_USAGE_URL) identifier_USAGE_URL )argument_list )call )await )assignment )expression_statement (expression_statement (assignment (identifier_content) identifier_content (await (call (attribute (identifier_raw_res) identifier_raw_res (identifier_text) identifier_text )attribute (argument_list )argument_list )call )await )assignment )expression_statement (expression_statement (assignment (identifier_soup) identifier_soup (call (identifier_BeautifulSoup) identifier_BeautifulSoup (argument_list (identifier_content) identifier_content (string_'html.parser') string_'html.parser' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_span_list) identifier_span_list (call (attribute (identifier_soup) identifier_soup (identifier_find_all) identifier_find_all )attribute (argument_list (string_"span") string_"span" (dictionary (pair (string_"class") string_"class" (string_"switchDisplay") string_"switchDisplay" )pair )dictionary )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_span_list) identifier_span_list (None) None )comparison_operator (block (raise_statement (call (identifier_PyEboxError) identifier_PyEboxError (argument_list (string_"Can not get usage page") string_"Can not get usage page" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_usage_data) identifier_usage_data (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_index) identifier_index )pattern_list (call (attribute (identifier_USAGE_MAP) identifier_USAGE_MAP (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (try_statement (block (expression_statement (assignment (identifier_str_value) identifier_str_value (subscript (call (attribute (call (attribute (attribute (subscript (identifier_span_list) identifier_span_list (identifier_index) identifier_index )subscript (identifier_attrs) identifier_attrs )attribute (identifier_get) identifier_get )attribute (argument_list (string_"data-m") string_"data-m" )argument_list )call (identifier_split) identifier_split )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (subscript (identifier_usage_data) identifier_usage_data (identifier_key) identifier_key )subscript (binary_operator (call (identifier_abs) identifier_abs (argument_list (call (identifier_float) identifier_float (argument_list (identifier_str_value) identifier_str_value )argument_list )call )argument_list )call (integer_1024) integer_1024 )binary_operator )assignment )expression_statement )block (except_clause (identifier_OSError) identifier_OSError (block (raise_statement (call (identifier_PyEboxError) identifier_PyEboxError (argument_list (string_"Can not get %s") string_"Can not get %s" (identifier_key) identifier_key )argument_list )call )raise_statement )block )except_clause )try_statement )block )for_statement (return_statement (identifier_usage_data) identifier_usage_data )return_statement )block )function_definition )module
Get data usage.
(module (function_definition (function_name_command) function_name_command (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (function_definition (function_name_decorator) function_name_decorator (parameters (identifier_f) identifier_f )parameters (block (if_statement (comparison_operator (string_'description') string_'description' (identifier_kwargs) identifier_kwargs )comparison_operator (block (expression_statement (assignment (subscript (identifier_kwargs) identifier_kwargs (string_'description') string_'description' )subscript (attribute (identifier_f) identifier_f (identifier___doc__) identifier___doc__ )attribute )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (string_'parents') string_'parents' (identifier_kwargs) identifier_kwargs )comparison_operator (block (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_f) identifier_f (string_'_argnames') string_'_argnames' )argument_list )call )not_operator (block (expression_statement (assignment (attribute (identifier_f) identifier_f (identifier__argnames) identifier__argnames )attribute (list )list )assignment )expression_statement )block )if_statement (for_statement (identifier_p) identifier_p (subscript (identifier_kwargs) identifier_kwargs (string_'parents') string_'parents' )subscript (block (expression_statement (augmented_assignment (attribute (identifier_f) identifier_f (identifier__argnames) identifier__argnames )attribute (conditional_expression (attribute (identifier_p) identifier_p (identifier__argnames) identifier__argnames )attribute (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_p) identifier_p (string_'_argnames') string_'_argnames' )argument_list )call (list )list )conditional_expression )augmented_assignment )expression_statement )block )for_statement (expression_statement (assignment (subscript (identifier_kwargs) identifier_kwargs (string_'parents') string_'parents' )subscript (list_comprehension (attribute (identifier_p) identifier_p (identifier_parser) identifier_parser )attribute (for_in_clause (identifier_p) identifier_p (subscript (identifier_kwargs) identifier_kwargs (string_'parents') string_'parents' )subscript )for_in_clause )list_comprehension )assignment )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_f) identifier_f (identifier_parser) identifier_parser )attribute (call (attribute (identifier_argparse) identifier_argparse (identifier_ArgumentParser) identifier_ArgumentParser )attribute (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_f) identifier_f (identifier_climax) identifier_climax )attribute (True) True )assignment )expression_statement (for_statement (identifier_arg) identifier_arg (call (identifier_getattr) identifier_getattr (argument_list (identifier_f) identifier_f (string_'_arguments') string_'_arguments' (list )list )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_f) identifier_f (identifier_parser) identifier_parser )attribute (identifier_add_argument) identifier_add_argument )attribute (argument_list (list_splat (subscript (identifier_arg) identifier_arg (integer_0) integer_0 )subscript )list_splat (dictionary_splat (subscript (identifier_arg) identifier_arg (integer_1) integer_1 )subscript )dictionary_splat )argument_list )call )expression_statement )block )for_statement (decorated_definition (decorator (call (identifier_wraps) identifier_wraps (argument_list (identifier_f) identifier_f )argument_list )call )decorator (function_definition (function_name_wrapper) function_name_wrapper (parameters (default_parameter (identifier_args) identifier_args (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_kwargs) identifier_kwargs (call (attribute (attribute (identifier_f) identifier_f (identifier_parser) identifier_parser )attribute (identifier_parse_args) identifier_parse_args )attribute (argument_list (identifier_args) identifier_args )argument_list )call )assignment )expression_statement (return_statement (call (identifier_f) identifier_f (argument_list (dictionary_splat (call (identifier_vars) identifier_vars (argument_list (identifier_kwargs) identifier_kwargs )argument_list )call )dictionary_splat )argument_list )call )return_statement )block )function_definition )decorated_definition (expression_statement (assignment (attribute (identifier_wrapper) identifier_wrapper (identifier_func) identifier_func )attribute (identifier_f) identifier_f )assignment )expression_statement (return_statement (identifier_wrapper) identifier_wrapper )return_statement )block )function_definition (return_statement (identifier_decorator) identifier_decorator )return_statement )block )function_definition )module
Decorator to define a command. The arguments to this decorator are those of the `ArgumentParser <https://docs.python.org/3/library/argparse.html\ #argumentparser-objects>`_ object constructor.
(module (function_definition (function_name_get_cache_key) function_name_get_cache_key (parameters (identifier_bucket) identifier_bucket (identifier_name) identifier_name (identifier_args) identifier_args (identifier_kwargs) identifier_kwargs )parameters (block (expression_statement (assignment (identifier_u) identifier_u (call (attribute (string_'') string_'' (identifier_join) identifier_join )attribute (argument_list (call (identifier_map) identifier_map (argument_list (identifier_str) identifier_str (tuple (identifier_bucket) identifier_bucket (identifier_name) identifier_name (identifier_args) identifier_args (identifier_kwargs) identifier_kwargs )tuple )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (binary_operator (string_'native_tags.%s') string_'native_tags.%s' (call (attribute (call (identifier_sha_constructor) identifier_sha_constructor (argument_list (identifier_u) identifier_u )argument_list )call (identifier_hexdigest) identifier_hexdigest )attribute (argument_list )argument_list )call )binary_operator )return_statement )block )function_definition )module
Gets a unique SHA1 cache key for any call to a native tag. Use args and kwargs in hash so that the same arguments use the same key
(module (function_definition (function_name_update_metadata) function_name_update_metadata (parameters (identifier_self) identifier_self (identifier_resource) identifier_resource (identifier_keys_vals) identifier_keys_vals )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_metadata_service) identifier_metadata_service )attribute (identifier_set_auth) identifier_set_auth )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__token_metadata) identifier__token_metadata )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_metadata_service) identifier_metadata_service )attribute (identifier_update) identifier_update )attribute (argument_list (identifier_resource) identifier_resource (identifier_keys_vals) identifier_keys_vals )argument_list )call )expression_statement )block )function_definition )module
Updates key-value pairs with the given resource. Will attempt to update all key-value pairs even if some fail. Keys must already exist. Args: resource (intern.resource.boss.BossResource) keys_vals (dictionary): Collection of key-value pairs to update on the given resource. Raises: HTTPErrorList on failure.
(module (function_definition (function_name__get_flaky_attributes) function_name__get_flaky_attributes (parameters (identifier_cls) identifier_cls (identifier_test_item) identifier_test_item )parameters (block (return_statement (dictionary_comprehension (pair (identifier_attr) identifier_attr (call (attribute (identifier_cls) identifier_cls (identifier__get_flaky_attribute) identifier__get_flaky_attribute )attribute (argument_list (identifier_test_item) identifier_test_item (identifier_attr) identifier_attr )argument_list )call )pair (for_in_clause (identifier_attr) identifier_attr (call (identifier_FlakyNames) identifier_FlakyNames (argument_list )argument_list )call )for_in_clause )dictionary_comprehension )return_statement )block )function_definition )module
Get all the flaky related attributes from the test. :param test_item: The test callable from which to get the flaky related attributes. :type test_item: `callable` or :class:`nose.case.Test` or :class:`Function` :return: :rtype: `dict` of `unicode` to varies
(module (function_definition (function_name_verify_day) function_name_verify_day (parameters (identifier_self) identifier_self (identifier_now) identifier_now )parameters (block (return_statement (boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_day) identifier_day )attribute (string_"*") string_"*" )comparison_operator (comparison_operator (call (identifier_str) identifier_str (argument_list (attribute (identifier_now) identifier_now (identifier_day) identifier_day )attribute )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier_day) identifier_day )attribute (identifier_split) identifier_split )attribute (argument_list (string_" ") string_" " )argument_list )call )comparison_operator )boolean_operator )return_statement )block )function_definition )module
Verify the day
(module (function_definition (function_name_GetLastKey) function_name_GetLastKey (parameters (identifier_self) identifier_self (default_parameter (identifier_voice) identifier_voice (integer_1) integer_1 )default_parameter )parameters (block (expression_statement (assignment (identifier_voice_obj) identifier_voice_obj (call (attribute (identifier_self) identifier_self (identifier_GetChild) identifier_GetChild )attribute (argument_list (identifier_voice) identifier_voice )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_voice_obj) identifier_voice_obj (None) None )comparison_operator (block (expression_statement (assignment (identifier_key) identifier_key (call (identifier_BackwardSearch) identifier_BackwardSearch (argument_list (identifier_KeyNode) identifier_KeyNode (identifier_voice_obj) identifier_voice_obj (integer_1) integer_1 )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_key) identifier_key (None) None )comparison_operator (block (return_statement (identifier_key) identifier_key )return_statement )block (else_clause (block (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_self) identifier_self (string_"key") string_"key" )argument_list )call (block (return_statement (attribute (identifier_self) identifier_self (identifier_key) identifier_key )attribute )return_statement )block )if_statement )block )else_clause )if_statement )block (else_clause (block (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_self) identifier_self (string_"key") string_"key" )argument_list )call (block (return_statement (attribute (identifier_self) identifier_self (identifier_key) identifier_key )attribute )return_statement )block )if_statement )block )else_clause )if_statement )block )function_definition )module
key as in musical key, not index