sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_getDebt) function_name_getDebt (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_debt) identifier_debt (binary_operator (call (identifier_float) identifier_float (argument_list (subscript (identifier_self) identifier_self (string_'principalBalance') string_'principalBalance' )subscript )argument_list )call (call (identifier_float) identifier_float (argument_list (subscript (identifier_self) identifier_self (string_'interestBalance') string_'interestBalance' )subscript )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (augmented_assignment (identifier_debt) identifier_debt (binary_operator (call (identifier_float) identifier_float (argument_list (subscript (identifier_self) identifier_self (string_'feesBalance') string_'feesBalance' )subscript )argument_list )call (call (identifier_float) identifier_float (argument_list (subscript (identifier_self) identifier_self (string_'penaltyBalance') string_'penaltyBalance' )subscript )argument_list )call )binary_operator )augmented_assignment )expression_statement (return_statement (identifier_debt) identifier_debt )return_statement )block )function_definition )module
Sums up all the balances of the account and returns them.
(module (function_definition (function_name_overlap) function_name_overlap (parameters (identifier_ival0) identifier_ival0 (identifier_ival1) identifier_ival1 )parameters (block (expression_statement (assignment (pattern_list (identifier_min0) identifier_min0 (identifier_max0) identifier_max0 )pattern_list (identifier_ival0) identifier_ival0 )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_min1) identifier_min1 (identifier_max1) identifier_max1 )pattern_list (identifier_ival1) identifier_ival1 )assignment )expression_statement (return_statement (comparison_operator (call (identifier_max) identifier_max (argument_list (integer_0) integer_0 (binary_operator (call (identifier_min) identifier_min (argument_list (identifier_max0) identifier_max0 (identifier_max1) identifier_max1 )argument_list )call (call (identifier_max) identifier_max (argument_list (identifier_min0) identifier_min0 (identifier_min1) identifier_min1 )argument_list )call )binary_operator )argument_list )call (integer_0) integer_0 )comparison_operator )return_statement )block )function_definition )module
Determine if two interval tuples have overlap. Args: iv0 ((int,int)): An interval tuple iv1 ((int,int)); An interval tuple Returns: (bool): True if the intervals overlap, otherwise False
(module (function_definition (function_name_publish) function_name_publish (parameters (identifier_self) identifier_self (identifier_message) identifier_message )parameters (block (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_write) identifier_write )attribute (argument_list (call (attribute (string_'data: {}\n\n') string_'data: {}\n\n' (identifier_format) identifier_format )attribute (argument_list (identifier_message) identifier_message )argument_list )call )argument_list )call )expression_statement (expression_statement (await (call (attribute (identifier_self) identifier_self (identifier_flush) identifier_flush )attribute (argument_list )argument_list )call )await )expression_statement )block (except_clause (identifier_StreamClosedError) identifier_StreamClosedError (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_finished) identifier_finished )attribute (True) True )assignment )expression_statement )block )except_clause )try_statement )block )function_definition )module
Pushes data to a listener.
(module (function_definition (function_name_removeClassBreak) function_name_removeClassBreak (parameters (identifier_self) identifier_self (identifier_label) identifier_label )parameters (block (for_statement (identifier_v) identifier_v (attribute (identifier_self) identifier_self (identifier__classBreakInfos) identifier__classBreakInfos )attribute (block (if_statement (comparison_operator (subscript (identifier_v) identifier_v (string_'label') string_'label' )subscript (identifier_label) identifier_label )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__classBreakInfos) identifier__classBreakInfos )attribute (identifier_remove) identifier_remove )attribute (argument_list (identifier_v) identifier_v )argument_list )call )expression_statement (return_statement (True) True )return_statement )block )if_statement (delete_statement (identifier_v) identifier_v )delete_statement )block )for_statement (return_statement (False) False )return_statement )block )function_definition )module
removes a classification break value to the renderer
(module (function_definition (function_name_load_z_meso) function_name_load_z_meso (parameters (identifier_self) identifier_self (identifier_z_meso_path) identifier_z_meso_path )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_z_meso) identifier_z_meso )attribute (list )list )assignment )expression_statement (expression_statement (assignment (identifier_z_meso_file_path) identifier_z_meso_file_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_z_meso_path) identifier_z_meso_path (attribute (identifier_self) identifier_self (identifier_Z_MESO_FILE_NAME) identifier_Z_MESO_FILE_NAME )attribute )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_z_meso_file_path) identifier_z_meso_file_path )argument_list )call )not_operator (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (call (attribute (string_"z_meso.txt file: '{}' does not exist.") string_"z_meso.txt file: '{}' does not exist." (identifier_format) identifier_format )attribute (argument_list (identifier_uwg_param_file) identifier_uwg_param_file )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_f) identifier_f (call (identifier_open) identifier_open (argument_list (identifier_z_meso_file_path) identifier_z_meso_file_path (string_'r') string_'r' )argument_list )call )assignment )expression_statement (for_statement (identifier_txtline) identifier_txtline (identifier_f) identifier_f (block (expression_statement (assignment (identifier_z_) identifier_z_ (call (identifier_float) identifier_float (argument_list (call (attribute (string_"") string_"" (identifier_join) identifier_join )attribute (argument_list (call (attribute (identifier_txtline) identifier_txtline (identifier_split) identifier_split )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_z_meso) identifier_z_meso )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_z_) identifier_z_ )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_f) identifier_f (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Open the z_meso.txt file and return heights as list
(module (function_definition (function_name_log_url) function_name_log_url (parameters (identifier_self) identifier_self (identifier_url_data) identifier_url_data )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_check_active_loggers) identifier_check_active_loggers )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_do_print) identifier_do_print (call (attribute (identifier_self) identifier_self (identifier_do_print) identifier_do_print )attribute (argument_list (identifier_url_data) identifier_url_data )argument_list )call )assignment )expression_statement (for_statement (identifier_log) identifier_log (attribute (identifier_self) identifier_self (identifier_loggers) identifier_loggers )attribute (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_log_filter_url) identifier_log_filter_url )attribute (argument_list (identifier_url_data) identifier_url_data (identifier_do_print) identifier_do_print )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Send new url to all configured loggers.
(module (function_definition (function_name_phase_by) function_name_phase_by (parameters (typed_parameter (identifier_val) identifier_val (type (identifier_Any) identifier_Any )type )typed_parameter (typed_parameter (identifier_phase_turns) identifier_phase_turns (type (identifier_float) identifier_float )type )typed_parameter (typed_parameter (identifier_qubit_index) identifier_qubit_index (type (identifier_int) identifier_int )type )typed_parameter (typed_default_parameter (identifier_default) identifier_default (type (identifier_TDefault) identifier_TDefault )type (identifier_RaiseTypeErrorIfNotProvided) identifier_RaiseTypeErrorIfNotProvided )typed_default_parameter )parameters (block (expression_statement (assignment (identifier_getter) identifier_getter (call (identifier_getattr) identifier_getattr (argument_list (identifier_val) identifier_val (string_'_phase_by_') string_'_phase_by_' (None) None )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (conditional_expression (identifier_NotImplemented) identifier_NotImplemented (comparison_operator (identifier_getter) identifier_getter (None) None )comparison_operator (call (identifier_getter) identifier_getter (argument_list (identifier_phase_turns) identifier_phase_turns (identifier_qubit_index) identifier_qubit_index )argument_list )call )conditional_expression )assignment )expression_statement (if_statement (comparison_operator (identifier_result) identifier_result (identifier_NotImplemented) identifier_NotImplemented )comparison_operator (block (return_statement (identifier_result) identifier_result )return_statement )block )if_statement (if_statement (comparison_operator (identifier_default) identifier_default (identifier_RaiseTypeErrorIfNotProvided) identifier_RaiseTypeErrorIfNotProvided )comparison_operator (block (return_statement (identifier_default) identifier_default )return_statement )block )if_statement (if_statement (comparison_operator (identifier_getter) identifier_getter (None) None )comparison_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (call (attribute (concatenated_string (string_"object of type '{}' ") string_"object of type '{}' " (string_"has no _phase_by_ method.") string_"has no _phase_by_ method." )concatenated_string (identifier_format) identifier_format )attribute (argument_list (call (identifier_type) identifier_type (argument_list (identifier_val) identifier_val )argument_list )call )argument_list )call )argument_list )call )raise_statement )block )if_statement (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (call (attribute (concatenated_string (string_"object of type '{}' does have a _phase_by_ method, ") string_"object of type '{}' does have a _phase_by_ method, " (string_"but it returned NotImplemented.") string_"but it returned NotImplemented." )concatenated_string (identifier_format) identifier_format )attribute (argument_list (call (identifier_type) identifier_type (argument_list (identifier_val) identifier_val )argument_list )call )argument_list )call )argument_list )call )raise_statement )block )function_definition )module
Returns a phased version of the effect. For example, an X gate phased by 90 degrees would be a Y gate. This works by calling `val`'s _phase_by_ method and returning the result. Args: val: The value to describe with a unitary matrix. phase_turns: The amount to phase the gate, in fractions of a whole turn. Divide by 2pi to get radians. qubit_index: The index of the target qubit the phasing applies to. For operations this is the index of the qubit within the operation's qubit list. For gates it's the index of the qubit within the tuple of qubits taken by the gate's `on` method. default: The default value to return if `val` can't be phased. If not specified, an error is raised when `val` can't be phased. Returns: If `val` has a _phase_by_ method and its result is not NotImplemented, that result is returned. Otherwise, the function will return the default value provided or raise a TypeError if none was provided. Raises: TypeError: `val` doesn't have a _phase_by_ method (or that method returned NotImplemented) and no `default` was specified.
(module (function_definition (function_name_contains_is_html) function_name_contains_is_html (parameters (identifier_cls) identifier_cls (identifier_data) identifier_data )parameters (block (for_statement (pattern_list (identifier_key) identifier_key (identifier_val) identifier_val )pattern_list (call (attribute (identifier_data) identifier_data (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_key) identifier_key (identifier_str) identifier_str )argument_list )call (call (attribute (identifier_key) identifier_key (identifier_endswith) identifier_endswith )attribute (argument_list (string_"IsHTML") string_"IsHTML" )argument_list )call )boolean_operator (block (return_statement (True) True )return_statement )block )if_statement (if_statement (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_val) identifier_val (tuple (identifier_OrderedDict) identifier_OrderedDict (identifier_dict) identifier_dict )tuple )argument_list )call (call (attribute (identifier_cls) identifier_cls (identifier_contains_is_html) identifier_contains_is_html )attribute (argument_list (identifier_val) identifier_val )argument_list )call )boolean_operator (block (return_statement (True) True )return_statement )block )if_statement )block )for_statement (return_statement (False) False )return_statement )block )function_definition )module
Detect if the problem has at least one "xyzIsHTML" key
(module (function_definition (function_name_pause) function_name_pause (parameters (identifier_self) identifier_self (identifier_queue_name) identifier_queue_name (default_parameter (identifier_kw_in) identifier_kw_in (None) None )default_parameter (default_parameter (identifier_kw_out) identifier_kw_out (None) None )default_parameter (default_parameter (identifier_kw_all) identifier_kw_all (None) None )default_parameter (default_parameter (identifier_kw_none) identifier_kw_none (None) None )default_parameter (default_parameter (identifier_kw_state) identifier_kw_state (None) None )default_parameter (default_parameter (identifier_kw_bcast) identifier_kw_bcast (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_command) identifier_command (list (string_"PAUSE") string_"PAUSE" (identifier_queue_name) identifier_queue_name )list )assignment )expression_statement (if_statement (identifier_kw_in) identifier_kw_in (block (expression_statement (augmented_assignment (identifier_command) identifier_command (list (string_"in") string_"in" )list )augmented_assignment )expression_statement )block )if_statement (if_statement (identifier_kw_out) identifier_kw_out (block (expression_statement (augmented_assignment (identifier_command) identifier_command (list (string_"out") string_"out" )list )augmented_assignment )expression_statement )block )if_statement (if_statement (identifier_kw_all) identifier_kw_all (block (expression_statement (augmented_assignment (identifier_command) identifier_command (list (string_"all") string_"all" )list )augmented_assignment )expression_statement )block )if_statement (if_statement (identifier_kw_none) identifier_kw_none (block (expression_statement (augmented_assignment (identifier_command) identifier_command (list (string_"none") string_"none" )list )augmented_assignment )expression_statement )block )if_statement (if_statement (identifier_kw_state) identifier_kw_state (block (expression_statement (augmented_assignment (identifier_command) identifier_command (list (string_"state") string_"state" )list )augmented_assignment )expression_statement )block )if_statement (if_statement (identifier_kw_bcast) identifier_kw_bcast (block (expression_statement (augmented_assignment (identifier_command) identifier_command (list (string_"bcast") string_"bcast" )list )augmented_assignment )expression_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_execute_command) identifier_execute_command )attribute (argument_list (list_splat (identifier_command) identifier_command )list_splat )argument_list )call )return_statement )block )function_definition )module
Pause a queue. Unfortunately, the PAUSE keywords are mostly reserved words in Python, so I've been a little creative in the function variable names. Open to suggestions to change it (canardleteer) :param queue_name: The job queue we are modifying. :param kw_in: pause the queue in input. :param kw_out: pause the queue in output. :param kw_all: pause the queue in input and output (same as specifying both the in and out options). :param kw_none: clear the paused state in input and output. :param kw_state: just report the current queue state. :param kw_bcast: send a PAUSE command to all the reachable nodes of the cluster to set the same queue in the other nodes to the same state.
(module (function_definition (function_name_bogoliubov_trans) function_name_bogoliubov_trans (parameters (identifier_p) identifier_p (identifier_q) identifier_q (identifier_theta) identifier_theta )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (expression_statement (assignment (identifier_expo) identifier_expo (binary_operator (binary_operator (unary_operator (integer_4) integer_4 )unary_operator (identifier_theta) identifier_theta )binary_operator (attribute (identifier_np) identifier_np (identifier_pi) identifier_pi )attribute )binary_operator )assignment )expression_statement (expression_statement (yield (call (attribute (identifier_cirq) identifier_cirq (identifier_X) identifier_X )attribute (argument_list (identifier_p) identifier_p )argument_list )call )yield )expression_statement (expression_statement (yield (call (attribute (identifier_cirq) identifier_cirq (identifier_S) identifier_S )attribute (argument_list (identifier_p) identifier_p )argument_list )call )yield )expression_statement (expression_statement (yield (binary_operator (call (attribute (identifier_cirq) identifier_cirq (identifier_ISWAP) identifier_ISWAP )attribute (argument_list (identifier_p) identifier_p (identifier_q) identifier_q )argument_list )call (identifier_expo) identifier_expo )binary_operator )yield )expression_statement (expression_statement (yield (binary_operator (call (attribute (identifier_cirq) identifier_cirq (identifier_S) identifier_S )attribute (argument_list (identifier_p) identifier_p )argument_list )call (float_1.5) float_1.5 )binary_operator )yield )expression_statement (expression_statement (yield (call (attribute (identifier_cirq) identifier_cirq (identifier_X) identifier_X )attribute (argument_list (identifier_p) identifier_p )argument_list )call )yield )expression_statement )block )function_definition )module
r"""The 2-mode Bogoliubov transformation is mapped to two-qubit operations. We use the identity X S^\dag X S X = Y X S^\dag Y S X = X to transform the Hamiltonian XY+YX to XX+YY type. The time evolution of the XX + YY Hamiltonian can be expressed as a power of the iSWAP gate. Args: p: the first qubit q: the second qubit theta: The rotational angle that specifies the Bogoliubov transformation, which is a function of the kinetic energy and the superconducting gap.
(module (function_definition (function_name_decodeRPCErrorMsg) function_name_decodeRPCErrorMsg (parameters (identifier_e) identifier_e )parameters (block (expression_statement (assignment (identifier_found) identifier_found (call (attribute (identifier_re) identifier_re (identifier_search) identifier_search )attribute (argument_list (parenthesized_expression (concatenated_string (string_"(10 assert_exception: Assert Exception\n|") string_"(10 assert_exception: Assert Exception\n|" (string_"3030000 tx_missing_posting_auth)") string_"3030000 tx_missing_posting_auth)" (string_".*: (.*)\n") string_".*: (.*)\n" )concatenated_string )parenthesized_expression (call (identifier_str) identifier_str (argument_list (identifier_e) identifier_e )argument_list )call (keyword_argument (identifier_flags) identifier_flags (attribute (identifier_re) identifier_re (identifier_M) identifier_M )attribute )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (identifier_found) identifier_found (block (return_statement (call (attribute (call (attribute (identifier_found) identifier_found (identifier_group) identifier_group )attribute (argument_list (integer_2) integer_2 )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )return_statement )block (else_clause (block (return_statement (call (identifier_str) identifier_str (argument_list (identifier_e) identifier_e )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Helper function to decode the raised Exception and give it a python Exception class
(module (function_definition (function_name_start) function_name_start (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_run) identifier_run )attribute (True) True )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_job) identifier_job )attribute (call (attribute (identifier_multiprocessing) identifier_multiprocessing (identifier_Process) identifier_Process )attribute (argument_list (keyword_argument (identifier_target) identifier_target (attribute (identifier_self) identifier_self (identifier_indicator) identifier_indicator )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_job) identifier_job )attribute (identifier_start) identifier_start )attribute (argument_list )argument_list )call )expression_statement (return_statement (attribute (identifier_self) identifier_self (identifier_job) identifier_job )attribute )return_statement )block )if_statement )block )function_definition )module
Indicate that we are performing work in a thread. :returns: multiprocessing job object
(module (function_definition (function_name_simulate) function_name_simulate (parameters (default_parameter (identifier_radius) identifier_radius (float_5e-6) float_5e-6 )default_parameter (default_parameter (identifier_sphere_index) identifier_sphere_index (float_1.339) float_1.339 )default_parameter (default_parameter (identifier_medium_index) identifier_medium_index (float_1.333) float_1.333 )default_parameter (default_parameter (identifier_wavelength) identifier_wavelength (float_550e-9) float_550e-9 )default_parameter (default_parameter (identifier_grid_size) identifier_grid_size (tuple (integer_80) integer_80 (integer_80) integer_80 )tuple )default_parameter (default_parameter (identifier_model) identifier_model (string_"projection") string_"projection" )default_parameter (default_parameter (identifier_pixel_size) identifier_pixel_size (None) None )default_parameter (default_parameter (identifier_center) identifier_center (None) None )default_parameter )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_grid_size) identifier_grid_size (attribute (identifier_numbers) identifier_numbers (identifier_Integral) identifier_Integral )attribute )argument_list )call (block (expression_statement (assignment (identifier_grid_size) identifier_grid_size (tuple (identifier_grid_size) identifier_grid_size (identifier_grid_size) identifier_grid_size )tuple )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_pixel_size) identifier_pixel_size (None) None )comparison_operator (block (expression_statement (assignment (identifier_rl) identifier_rl (binary_operator (identifier_radius) identifier_radius (identifier_wavelength) identifier_wavelength )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_rl) identifier_rl (integer_5) integer_5 )comparison_operator (block (expression_statement (assignment (identifier_fact) identifier_fact (integer_4) integer_4 )assignment )expression_statement )block (elif_clause (boolean_operator (comparison_operator (identifier_rl) identifier_rl (integer_5) integer_5 )comparison_operator (comparison_operator (identifier_rl) identifier_rl (integer_10) integer_10 )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_fact) identifier_fact (binary_operator (integer_4) integer_4 (binary_operator (parenthesized_expression (binary_operator (identifier_rl) identifier_rl (integer_5) integer_5 )binary_operator )parenthesized_expression (integer_5) integer_5 )binary_operator )binary_operator )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_fact) identifier_fact (integer_3) integer_3 )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_pixel_size) identifier_pixel_size (binary_operator (binary_operator (identifier_fact) identifier_fact (identifier_radius) identifier_radius )binary_operator (call (attribute (identifier_np) identifier_np (identifier_min) identifier_min )attribute (argument_list (identifier_grid_size) identifier_grid_size )argument_list )call )binary_operator )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_center) identifier_center (None) None )comparison_operator (block (expression_statement (assignment (identifier_center) identifier_center (binary_operator (parenthesized_expression (binary_operator (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (identifier_grid_size) identifier_grid_size )argument_list )call (integer_1) integer_1 )binary_operator )parenthesized_expression (integer_2) integer_2 )binary_operator )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_model) identifier_model (subscript (identifier_model_dict) identifier_model_dict (identifier_model) identifier_model )subscript )assignment )expression_statement (expression_statement (assignment (identifier_qpi) identifier_qpi (call (identifier_model) identifier_model (argument_list (keyword_argument (identifier_radius) identifier_radius (identifier_radius) identifier_radius )keyword_argument (keyword_argument (identifier_sphere_index) identifier_sphere_index (identifier_sphere_index) identifier_sphere_index )keyword_argument (keyword_argument (identifier_medium_index) identifier_medium_index (identifier_medium_index) identifier_medium_index )keyword_argument (keyword_argument (identifier_wavelength) identifier_wavelength (identifier_wavelength) identifier_wavelength )keyword_argument (keyword_argument (identifier_pixel_size) identifier_pixel_size (identifier_pixel_size) identifier_pixel_size )keyword_argument (keyword_argument (identifier_grid_size) identifier_grid_size (identifier_grid_size) identifier_grid_size )keyword_argument (keyword_argument (identifier_center) identifier_center (identifier_center) identifier_center )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_qpi) identifier_qpi )return_statement )block )function_definition )module
Simulate scattering at a sphere Parameters ---------- radius: float Radius of the sphere [m] sphere_index: float Refractive index of the object medium_index: float Refractive index of the surrounding medium wavelength: float Vacuum wavelength of the imaging light [m] grid_size: tuple of ints or int Resulting image size in x and y [px] model: str Sphere model to use (see :const:`available`) pixel_size: float or None Pixel size [m]; if set to `None` the pixel size is chosen such that the radius fits at least three to four times into the grid. center: tuple of floats or None Center position in image coordinates [px]; if set to None, the center of the image (grid_size - 1)/2 is used. Returns ------- qpi: qpimage.QPImage Quantitative phase data set
(module (function_definition (function_name_assert_estimator_equal) function_name_assert_estimator_equal (parameters (identifier_left) identifier_left (identifier_right) identifier_right (default_parameter (identifier_exclude) identifier_exclude (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_left_attrs) identifier_left_attrs (list_comprehension (identifier_x) identifier_x (for_in_clause (identifier_x) identifier_x (call (identifier_dir) identifier_dir (argument_list (identifier_left) identifier_left )argument_list )call )for_in_clause (if_clause (boolean_operator (call (attribute (identifier_x) identifier_x (identifier_endswith) identifier_endswith )attribute (argument_list (string_"_") string_"_" )argument_list )call (not_operator (call (attribute (identifier_x) identifier_x (identifier_startswith) identifier_startswith )attribute (argument_list (string_"_") string_"_" )argument_list )call )not_operator )boolean_operator )if_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_right_attrs) identifier_right_attrs (list_comprehension (identifier_x) identifier_x (for_in_clause (identifier_x) identifier_x (call (identifier_dir) identifier_dir (argument_list (identifier_right) identifier_right )argument_list )call )for_in_clause (if_clause (boolean_operator (call (attribute (identifier_x) identifier_x (identifier_endswith) identifier_endswith )attribute (argument_list (string_"_") string_"_" )argument_list )call (not_operator (call (attribute (identifier_x) identifier_x (identifier_startswith) identifier_startswith )attribute (argument_list (string_"_") string_"_" )argument_list )call )not_operator )boolean_operator )if_clause )list_comprehension )assignment )expression_statement (if_statement (comparison_operator (identifier_exclude) identifier_exclude (None) None )comparison_operator (block (expression_statement (assignment (identifier_exclude) identifier_exclude (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_exclude) identifier_exclude (identifier_str) identifier_str )argument_list )call (block (expression_statement (assignment (identifier_exclude) identifier_exclude (set (identifier_exclude) identifier_exclude )set )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_exclude) identifier_exclude (call (identifier_set) identifier_set (argument_list (identifier_exclude) identifier_exclude )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (assert_statement (comparison_operator (parenthesized_expression (binary_operator (call (identifier_set) identifier_set (argument_list (identifier_left_attrs) identifier_left_attrs )argument_list )call (identifier_exclude) identifier_exclude )binary_operator )parenthesized_expression (binary_operator (call (identifier_set) identifier_set (argument_list (identifier_right_attrs) identifier_right_attrs )argument_list )call (identifier_exclude) identifier_exclude )binary_operator )comparison_operator )assert_statement (for_statement (identifier_attr) identifier_attr (binary_operator (call (identifier_set) identifier_set (argument_list (identifier_left_attrs) identifier_left_attrs )argument_list )call (identifier_exclude) identifier_exclude )binary_operator (block (expression_statement (assignment (identifier_l) identifier_l (call (identifier_getattr) identifier_getattr (argument_list (identifier_left) identifier_left (identifier_attr) identifier_attr )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_r) identifier_r (call (identifier_getattr) identifier_getattr (argument_list (identifier_right) identifier_right (identifier_attr) identifier_attr )argument_list )call )assignment )expression_statement (expression_statement (call (identifier__assert_eq) identifier__assert_eq (argument_list (identifier_l) identifier_l (identifier_r) identifier_r (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Check that two Estimators are equal Parameters ---------- left, right : Estimators exclude : str or sequence of str attributes to skip in the check kwargs : dict Passed through to the dask `assert_eq` method.
(module (function_definition (function_name_state_cpfs) function_name_state_cpfs (parameters (identifier_self) identifier_self )parameters (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_CPF) identifier_CPF )type )type_parameter )generic_type )type (block (expression_statement (assignment (pattern_list (identifier__) identifier__ (identifier_cpfs) identifier_cpfs )pattern_list (attribute (identifier_self) identifier_self (identifier_cpfs) identifier_cpfs )attribute )assignment )expression_statement (expression_statement (assignment (identifier_state_cpfs) identifier_state_cpfs (list )list )assignment )expression_statement (for_statement (identifier_cpf) identifier_cpf (identifier_cpfs) identifier_cpfs (block (expression_statement (assignment (identifier_name) identifier_name (call (attribute (identifier_utils) identifier_utils (identifier_rename_next_state_fluent) identifier_rename_next_state_fluent )attribute (argument_list (attribute (identifier_cpf) identifier_cpf (identifier_name) identifier_name )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier_state_fluents) identifier_state_fluents )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_state_cpfs) identifier_state_cpfs (identifier_append) identifier_append )attribute (argument_list (identifier_cpf) identifier_cpf )argument_list )call )expression_statement )block )if_statement )block )for_statement (expression_statement (assignment (identifier_state_cpfs) identifier_state_cpfs (call (identifier_sorted) identifier_sorted (argument_list (identifier_state_cpfs) identifier_state_cpfs (keyword_argument (identifier_key) identifier_key (lambda (lambda_parameters (identifier_cpf) identifier_cpf )lambda_parameters (attribute (identifier_cpf) identifier_cpf (identifier_name) identifier_name )attribute )lambda )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_state_cpfs) identifier_state_cpfs )return_statement )block )function_definition )module
Returns list of state-fluent CPFs.
(module (function_definition (function_name_get_rng) function_name_get_rng (parameters (default_parameter (identifier_obj) identifier_obj (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_seed) identifier_seed (binary_operator (parenthesized_expression (binary_operator (binary_operator (call (identifier_id) identifier_id (argument_list (identifier_obj) identifier_obj )argument_list )call (call (attribute (identifier_os) identifier_os (identifier_getpid) identifier_getpid )attribute (argument_list )argument_list )call )binary_operator (call (identifier_int) identifier_int (argument_list (call (attribute (call (attribute (identifier_datetime) identifier_datetime (identifier_now) identifier_now )attribute (argument_list )argument_list )call (identifier_strftime) identifier_strftime )attribute (argument_list (string_"%Y%m%d%H%M%S%f") string_"%Y%m%d%H%M%S%f" )argument_list )call )argument_list )call )binary_operator )parenthesized_expression (integer_4294967295) integer_4294967295 )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier__RNG_SEED) identifier__RNG_SEED (None) None )comparison_operator (block (expression_statement (assignment (identifier_seed) identifier_seed (identifier__RNG_SEED) identifier__RNG_SEED )assignment )expression_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_np) identifier_np (identifier_random) identifier_random )attribute (identifier_RandomState) identifier_RandomState )attribute (argument_list (identifier_seed) identifier_seed )argument_list )call )return_statement )block )function_definition )module
Get a good RNG seeded with time, pid and the object. Args: obj: some object to use to generate random seed. Returns: np.random.RandomState: the RNG.
(module (function_definition (function_name_get_cas_client) function_name_get_cas_client (parameters (identifier_self) identifier_self (identifier_request) identifier_request (identifier_provider) identifier_provider (default_parameter (identifier_renew) identifier_renew (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_service_url) identifier_service_url (call (attribute (identifier_utils) identifier_utils (identifier_get_current_url) identifier_get_current_url )attribute (argument_list (identifier_request) identifier_request (set (string_"ticket") string_"ticket" (string_"provider") string_"provider" )set )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_service_url) identifier_service_url )attribute (identifier_service_url) identifier_service_url )assignment )expression_statement (return_statement (call (identifier_CASFederateValidateUser) identifier_CASFederateValidateUser (argument_list (identifier_provider) identifier_provider (identifier_service_url) identifier_service_url (keyword_argument (identifier_renew) identifier_renew (identifier_renew) identifier_renew )keyword_argument )argument_list )call )return_statement )block )function_definition )module
return a CAS client object matching provider :param django.http.HttpRequest request: The current request object :param cas_server.models.FederatedIendityProvider provider: the user identity provider :return: The user CAS client object :rtype: :class:`federate.CASFederateValidateUser <cas_server.federate.CASFederateValidateUser>`
(module (function_definition (function_name_offset) function_name_offset (parameters (identifier_self) identifier_self (identifier_offset) identifier_offset )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_log) identifier_log )attribute (argument_list (string_u"Applying offset to all fragments...") string_u"Applying offset to all fragments..." )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_log) identifier_log )attribute (argument_list (list (string_u" Offset %.3f") string_u" Offset %.3f" (identifier_offset) identifier_offset )list )argument_list )call )expression_statement (for_statement (identifier_fragment) identifier_fragment (attribute (identifier_self) identifier_self (identifier_fragments) identifier_fragments )attribute (block (expression_statement (call (attribute (attribute (identifier_fragment) identifier_fragment (identifier_interval) identifier_interval )attribute (identifier_offset) identifier_offset )attribute (argument_list (keyword_argument (identifier_offset) identifier_offset (identifier_offset) identifier_offset )keyword_argument (keyword_argument (identifier_allow_negative) identifier_allow_negative (False) False )keyword_argument (keyword_argument (identifier_min_begin_value) identifier_min_begin_value (attribute (identifier_self) identifier_self (identifier_begin) identifier_begin )attribute )keyword_argument (keyword_argument (identifier_max_end_value) identifier_max_end_value (attribute (identifier_self) identifier_self (identifier_end) identifier_end )attribute )keyword_argument )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_log) identifier_log )attribute (argument_list (string_u"Applying offset to all fragments... done") string_u"Applying offset to all fragments... done" )argument_list )call )expression_statement )block )function_definition )module
Move all the intervals in the list by the given ``offset``. :param offset: the shift to be applied :type offset: :class:`~aeneas.exacttiming.TimeValue` :raises TypeError: if ``offset`` is not an instance of ``TimeValue``
(module (function_definition (function_name_query_source) function_name_query_source (parameters (identifier_self) identifier_self (identifier_source) identifier_source )parameters (block (return_statement (call (attribute (call (attribute (identifier_self) identifier_self (identifier__get_repo_filter) identifier__get_repo_filter )attribute (argument_list (attribute (identifier_Layer) identifier_Layer (identifier_objects) identifier_objects )attribute )argument_list )call (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_url) identifier_url (identifier_source) identifier_source )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Query by source
(module (function_definition (function_name_on_before_transform_template) function_name_on_before_transform_template (parameters (identifier_self) identifier_self (identifier_template_dict) identifier_template_dict )parameters (block (expression_statement (assignment (identifier_template) identifier_template (call (identifier_SamTemplate) identifier_SamTemplate (argument_list (identifier_template_dict) identifier_template_dict )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_existing_implicit_api_resource) identifier_existing_implicit_api_resource )attribute (call (attribute (identifier_copy) identifier_copy (identifier_deepcopy) identifier_deepcopy )attribute (argument_list (call (attribute (identifier_template) identifier_template (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_implicit_api_logical_id) identifier_implicit_api_logical_id )attribute )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_template) identifier_template (identifier_set) identifier_set )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_implicit_api_logical_id) identifier_implicit_api_logical_id )attribute (call (attribute (call (identifier_ImplicitApiResource) identifier_ImplicitApiResource (argument_list )argument_list )call (identifier_to_dict) identifier_to_dict )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_errors) identifier_errors (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_logicalId) identifier_logicalId (identifier_function) identifier_function )pattern_list (call (attribute (identifier_template) identifier_template (identifier_iterate) identifier_iterate )attribute (argument_list (attribute (attribute (identifier_SamResourceType) identifier_SamResourceType (identifier_Function) identifier_Function )attribute (identifier_value) identifier_value )attribute )argument_list )call (block (expression_statement (assignment (identifier_api_events) identifier_api_events (call (attribute (identifier_self) identifier_self (identifier__get_api_events) identifier__get_api_events )attribute (argument_list (identifier_function) identifier_function )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_condition) identifier_condition (attribute (identifier_function) identifier_function (identifier_condition) identifier_condition )attribute )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_api_events) identifier_api_events )argument_list )call (integer_0) integer_0 )comparison_operator (block (continue_statement )continue_statement )block )if_statement (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__process_api_events) identifier__process_api_events )attribute (argument_list (identifier_function) identifier_function (identifier_api_events) identifier_api_events (identifier_template) identifier_template (identifier_condition) identifier_condition )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_InvalidEventException) identifier_InvalidEventException (as_pattern_target (identifier_ex) identifier_ex )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_errors) identifier_errors (identifier_append) identifier_append )attribute (argument_list (call (identifier_InvalidResourceException) identifier_InvalidResourceException (argument_list (identifier_logicalId) identifier_logicalId (attribute (identifier_ex) identifier_ex (identifier_message) identifier_message )attribute )argument_list )call )argument_list )call )expression_statement )block )except_clause )try_statement )block )for_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__maybe_add_condition_to_implicit_api) identifier__maybe_add_condition_to_implicit_api )attribute (argument_list (identifier_template_dict) identifier_template_dict )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__maybe_add_conditions_to_implicit_api_paths) identifier__maybe_add_conditions_to_implicit_api_paths )attribute (argument_list (identifier_template) identifier_template )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__maybe_remove_implicit_api) identifier__maybe_remove_implicit_api )attribute (argument_list (identifier_template) identifier_template )argument_list )call )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_errors) identifier_errors )argument_list )call (integer_0) integer_0 )comparison_operator (block (raise_statement (call (identifier_InvalidDocumentException) identifier_InvalidDocumentException (argument_list (identifier_errors) identifier_errors )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Hook method that gets called before the SAM template is processed. The template has pass the validation and is guaranteed to contain a non-empty "Resources" section. :param dict template_dict: Dictionary of the SAM template :return: Nothing
(module (function_definition (function_name_app_start) function_name_app_start (parameters (identifier_name) identifier_name (identifier_profile) identifier_profile (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_ctx) identifier_ctx (call (identifier_Context) identifier_Context (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_ctx) identifier_ctx (identifier_execute_action) identifier_execute_action )attribute (argument_list (string_'app:start') string_'app:start' (dictionary_splat (dictionary (pair (string_'node') string_'node' (call (attribute (attribute (identifier_ctx) identifier_ctx (identifier_repo) identifier_repo )attribute (identifier_create_secure_service) identifier_create_secure_service )attribute (argument_list (string_'node') string_'node' )argument_list )call )pair (pair (string_'name') string_'name' (identifier_name) identifier_name )pair (pair (string_'profile') string_'profile' (identifier_profile) identifier_profile )pair )dictionary )dictionary_splat )argument_list )call )expression_statement )block )function_definition )module
Start an application with specified profile. Does nothing if application is already running.
(module (function_definition (function_name_list_supported_categories) function_name_list_supported_categories (parameters )parameters (block (expression_statement (assignment (identifier_categories) identifier_categories (call (identifier_get_supported_categories) identifier_get_supported_categories (argument_list (identifier_api) identifier_api )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_category_names) identifier_category_names (list_comprehension (attribute (identifier_category) identifier_category (identifier_name) identifier_name )attribute (for_in_clause (identifier_category) identifier_category (identifier_categories) identifier_categories )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_"Supported account categories by name: {0}") string_"Supported account categories by name: {0}" (identifier_format) identifier_format )attribute (argument_list (call (attribute (identifier_COMMA_WITH_SPACE) identifier_COMMA_WITH_SPACE (identifier_join) identifier_join )attribute (argument_list (call (identifier_map) identifier_map (argument_list (identifier_str) identifier_str (identifier_category_names) identifier_category_names )argument_list )call )argument_list )call )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Prints a list of supported external account category names. For example, "AWS" is a supported external account category name.
(module (function_definition (function_name_remove_suffix) function_name_remove_suffix (parameters (identifier_text) identifier_text (identifier_suffix) identifier_suffix )parameters (block (expression_statement (assignment (pattern_list (identifier_rest) identifier_rest (identifier_suffix) identifier_suffix (identifier_null) identifier_null )pattern_list (call (attribute (identifier_text) identifier_text (identifier_partition) identifier_partition )attribute (argument_list (identifier_suffix) identifier_suffix )argument_list )call )assignment )expression_statement (return_statement (identifier_rest) identifier_rest )return_statement )block )function_definition )module
Remove the suffix from the text if it exists. >>> remove_suffix('name.git', '.git') 'name' >>> remove_suffix('something special', 'sample') 'something special'
(module (function_definition (function_name_update) function_name_update (parameters (identifier_self) identifier_self (identifier_resource) identifier_resource (default_parameter (identifier_timeout) identifier_timeout (unary_operator (integer_1) integer_1 )unary_operator )default_parameter )parameters (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__client) identifier__client )attribute (identifier_update) identifier_update )attribute (argument_list (identifier_resource) identifier_resource (keyword_argument (identifier_timeout) identifier_timeout (identifier_timeout) identifier_timeout )keyword_argument (keyword_argument (identifier_default_values) identifier_default_values (attribute (identifier_self) identifier_self (identifier_DEFAULT_VALUES) identifier_DEFAULT_VALUES )attribute )keyword_argument (keyword_argument (identifier_uri) identifier_uri (attribute (identifier_self) identifier_self (identifier_URI) identifier_URI )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Updates a User. Args: resource (dict): Object to update. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView, just stop waiting for its completion. Returns: dict: Updated resource.
(module (function_definition (function_name_search) function_name_search (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (return_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_ApiV4As) identifier_ApiV4As (identifier_self) identifier_self )argument_list )call (identifier_get) identifier_get )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_prepare_url) identifier_prepare_url )attribute (argument_list (string_'api/v4/as/') string_'api/v4/as/' (identifier_kwargs) identifier_kwargs )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Method to search asns based on extends search. :param search: Dict containing QuerySets to find asns. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :param fields: Array containing fields to override default fields. :param kind: Determine if result will be detailed ('detail') or basic ('basic'). :return: Dict containing asns
(module (function_definition (function_name_download_log) function_name_download_log (parameters (default_parameter (identifier_currentfile) identifier_currentfile (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_currentfile) identifier_currentfile (None) None )comparison_operator (block (return_statement )return_statement )block )if_statement (if_statement (not_operator (call (attribute (identifier_currentfile) identifier_currentfile (identifier_endswith) identifier_endswith )attribute (argument_list (string_".err.log") string_".err.log" )argument_list )call )not_operator (block (expression_statement (assignment (identifier_currentfile) identifier_currentfile (binary_operator (identifier_currentfile) identifier_currentfile (string_".err.log") string_".err.log" )binary_operator )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_list) identifier_list (binary_operator (call (identifier_get_base_ev3dev_cmd) identifier_get_base_ev3dev_cmd (argument_list )argument_list )call (list (string_'download') string_'download' (string_'--force') string_'--force' )list )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_list) identifier_list (identifier_append) identifier_append )attribute (argument_list (identifier_currentfile) identifier_currentfile )argument_list )call )expression_statement (expression_statement (assignment (identifier_env) identifier_env (call (attribute (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_env) identifier_env (string_"PYTHONUSERBASE") string_"PYTHONUSERBASE" )subscript (identifier_THONNY_USER_BASE) identifier_THONNY_USER_BASE )assignment )expression_statement (expression_statement (assignment (identifier_proc) identifier_proc (call (attribute (identifier_subprocess) identifier_subprocess (identifier_Popen) identifier_Popen )attribute (argument_list (identifier_list) identifier_list (keyword_argument (identifier_stdout) identifier_stdout (attribute (identifier_subprocess) identifier_subprocess (identifier_PIPE) identifier_PIPE )attribute )keyword_argument (keyword_argument (identifier_stderr) identifier_stderr (attribute (identifier_subprocess) identifier_subprocess (identifier_STDOUT) identifier_STDOUT )attribute )keyword_argument (keyword_argument (identifier_universal_newlines) identifier_universal_newlines (True) True )keyword_argument (keyword_argument (identifier_env) identifier_env (identifier_env) identifier_env )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_dlg) identifier_dlg (call (identifier_MySubprocessDialog) identifier_MySubprocessDialog (argument_list (call (identifier_get_workbench) identifier_get_workbench (argument_list )argument_list )call (identifier_proc) identifier_proc (string_"Downloading log of program from EV3") string_"Downloading log of program from EV3" (keyword_argument (identifier_autoclose) identifier_autoclose (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_dlg) identifier_dlg (identifier_wait_window) identifier_wait_window )attribute (argument_list )argument_list )call )expression_statement (if_statement (comparison_operator (attribute (identifier_dlg) identifier_dlg (identifier_returncode) identifier_returncode )attribute (integer_0) integer_0 )comparison_operator (block (import_from_statement (dotted_name (identifier_pathlib) identifier_pathlib )dotted_name (dotted_name (identifier_Path) identifier_Path )dotted_name )import_from_statement (expression_statement (assignment (identifier_home) identifier_home (call (identifier_str) identifier_str (argument_list (call (attribute (identifier_Path) identifier_Path (identifier_home) identifier_home )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_open_file) identifier_open_file (argument_list (identifier_currentfile) identifier_currentfile (identifier_home) identifier_home (True) True )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
downloads log of given .py file from EV3.
(module (function_definition (function_name_save_graph) function_name_save_graph (parameters (identifier_cn_topo) identifier_cn_topo (identifier_filename) identifier_filename (default_parameter (identifier_showintfs) identifier_showintfs (False) False )default_parameter (default_parameter (identifier_showaddrs) identifier_showaddrs (False) False )default_parameter )parameters (block (expression_statement (call (identifier___do_draw) identifier___do_draw (argument_list (identifier_cn_topo) identifier_cn_topo (keyword_argument (identifier_showintfs) identifier_showintfs (identifier_showintfs) identifier_showintfs )keyword_argument (keyword_argument (identifier_showaddrs) identifier_showaddrs (identifier_showaddrs) identifier_showaddrs )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_pyp) identifier_pyp (identifier_savefig) identifier_savefig )attribute (argument_list (identifier_filename) identifier_filename )argument_list )call )expression_statement )block )function_definition )module
Save the topology to an image file
(module (function_definition (function_name_format_content_type_object) function_name_format_content_type_object (parameters (identifier_repo) identifier_repo (identifier_content_type) identifier_content_type (identifier_uuid) identifier_uuid )parameters (block (try_statement (block (expression_statement (assignment (identifier_storage_manager) identifier_storage_manager (call (identifier_StorageManager) identifier_StorageManager (argument_list (identifier_repo) identifier_repo )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_model_class) identifier_model_class (call (identifier_load_model_class) identifier_load_model_class (argument_list (identifier_repo) identifier_repo (identifier_content_type) identifier_content_type )argument_list )call )assignment )expression_statement (return_statement (call (identifier_dict) identifier_dict (argument_list (call (attribute (identifier_storage_manager) identifier_storage_manager (identifier_get) identifier_get )attribute (argument_list (identifier_model_class) identifier_model_class (identifier_uuid) identifier_uuid )argument_list )call )argument_list )call )return_statement )block (except_clause (identifier_GitCommandError) identifier_GitCommandError (block (raise_statement (call (identifier_NotFound) identifier_NotFound (argument_list (string_'Object does not exist.') string_'Object does not exist.' )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Return a content object from a repository for a given content_type and uuid :param Repo repo: The git repository. :param str content_type: The content type to list :returns: dict
(module (function_definition (function_name_enable) function_name_enable (parameters (identifier_self) identifier_self (identifier_key_id) identifier_key_id (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_path) identifier_path (binary_operator (string_'%s/%s/enable') string_'%s/%s/enable' (tuple (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute (identifier_key_id) identifier_key_id )tuple )binary_operator )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_gitlab) identifier_gitlab )attribute (identifier_http_post) identifier_http_post )attribute (argument_list (identifier_path) identifier_path (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement )block )function_definition )module
Enable a deploy key for a project. Args: key_id (int): The ID of the key to enable **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabProjectDeployKeyError: If the key could not be enabled
(module (function_definition (function_name_change_name) function_name_change_name (parameters (identifier_self) identifier_self (identifier_username) identifier_username )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_release_name) identifier_release_name )attribute (argument_list )argument_list )call )expression_statement (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_server) identifier_server )attribute (identifier_register_name) identifier_register_name )attribute (argument_list (identifier_username) identifier_username )argument_list )call )expression_statement )block (except_clause (identifier_UsernameInUseException) identifier_UsernameInUseException (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_log) identifier_log )attribute (argument_list (call (attribute (string_', ') string_', ' (identifier_join) identifier_join )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_server) identifier_server )attribute (identifier_registered_names) identifier_registered_names )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_server) identifier_server )attribute (identifier_register_name) identifier_register_name )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )argument_list )call )expression_statement (raise_statement )raise_statement )block )except_clause )try_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute (identifier_username) identifier_username )assignment )expression_statement )block )function_definition )module
changes the username to given username, throws exception if username used
(module (function_definition (function_name_task2ics) function_name_task2ics (parameters )parameters (block (import_from_statement (dotted_name (identifier_argparse) identifier_argparse )dotted_name (dotted_name (identifier_ArgumentParser) identifier_ArgumentParser )dotted_name (dotted_name (identifier_FileType) identifier_FileType )dotted_name )import_from_statement (import_from_statement (dotted_name (identifier_sys) identifier_sys )dotted_name (dotted_name (identifier_stdout) identifier_stdout )dotted_name )import_from_statement (expression_statement (assignment (identifier_parser) identifier_parser (call (identifier_ArgumentParser) identifier_ArgumentParser (argument_list (keyword_argument (identifier_description) identifier_description (string_'Converter from Taskwarrior to iCalendar syntax.') string_'Converter from Taskwarrior to iCalendar syntax.' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_parser) identifier_parser (identifier_add_argument) identifier_add_argument )attribute (argument_list (string_'indir') string_'indir' (keyword_argument (identifier_nargs) identifier_nargs (string_'?') string_'?' )keyword_argument (keyword_argument (identifier_help) identifier_help (string_'Input Taskwarrior directory (default to ~/.task)') string_'Input Taskwarrior directory (default to ~/.task)' )keyword_argument (keyword_argument (identifier_default) identifier_default (call (identifier_expanduser) identifier_expanduser (argument_list (string_'~/.task') string_'~/.task' )argument_list )call )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_parser) identifier_parser (identifier_add_argument) identifier_add_argument )attribute (argument_list (string_'outfile') string_'outfile' (keyword_argument (identifier_nargs) identifier_nargs (string_'?') string_'?' )keyword_argument (keyword_argument (identifier_type) identifier_type (call (identifier_FileType) identifier_FileType (argument_list (string_'w') string_'w' )argument_list )call )keyword_argument (keyword_argument (identifier_default) identifier_default (identifier_stdout) identifier_stdout )keyword_argument (keyword_argument (identifier_help) identifier_help (string_'Output iCalendar file (default: stdout)') string_'Output iCalendar file (default: stdout)' )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_args) identifier_args (call (attribute (identifier_parser) identifier_parser (identifier_parse_args) identifier_parse_args )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_task) identifier_task (call (identifier_IcsTask) identifier_IcsTask (argument_list (attribute (identifier_args) identifier_args (identifier_indir) identifier_indir )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_args) identifier_args (identifier_outfile) identifier_outfile )attribute (identifier_write) identifier_write )attribute (argument_list (call (attribute (call (attribute (identifier_task) identifier_task (identifier_to_vobject) identifier_to_vobject )attribute (argument_list )argument_list )call (identifier_serialize) identifier_serialize )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Command line tool to convert from Taskwarrior to iCalendar
(module (function_definition (function_name_precompile_python_code) function_name_precompile_python_code (parameters (typed_parameter (identifier_context) identifier_context (type (identifier_Context) identifier_Context )type )typed_parameter )parameters (block (import_from_statement (dotted_name (identifier_compileall) identifier_compileall )dotted_name (dotted_name (identifier_compile_dir) identifier_compile_dir )dotted_name )import_from_statement (expression_statement (assignment (identifier_kwargs) identifier_kwargs (dictionary )dictionary )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_context) identifier_context (identifier_verbosity) identifier_verbosity )attribute (integer_2) integer_2 )comparison_operator (block (expression_statement (assignment (subscript (identifier_kwargs) identifier_kwargs (string_'quiet') string_'quiet' )subscript (True) True )assignment )expression_statement )block )if_statement (expression_statement (call (identifier_compile_dir) identifier_compile_dir (argument_list (attribute (attribute (identifier_context) identifier_context (identifier_app) identifier_app )attribute (identifier_django_app_name) identifier_django_app_name )attribute (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement )block )function_definition )module
Pre-compiles python modules
(module (function_definition (function_name_layerize) function_name_layerize (parameters (default_parameter (identifier_begin_update) identifier_begin_update (None) None )default_parameter (default_parameter (identifier_predict) identifier_predict (None) None )default_parameter (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 (identifier_begin_update) identifier_begin_update (None) None )comparison_operator (block (return_statement (call (identifier_FunctionLayer) identifier_FunctionLayer (argument_list (identifier_begin_update) identifier_begin_update (keyword_argument (identifier_predict) identifier_predict (identifier_predict) identifier_predict )keyword_argument (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )if_statement (function_definition (function_name_wrapper) function_name_wrapper (parameters (identifier_begin_update) identifier_begin_update )parameters (block (return_statement (call (identifier_FunctionLayer) identifier_FunctionLayer (argument_list (identifier_begin_update) identifier_begin_update (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition (return_statement (identifier_wrapper) identifier_wrapper )return_statement )block )function_definition )module
Wrap a function into a layer
(module (function_definition (function_name_set_as_error) function_name_set_as_error (parameters (identifier_self) identifier_self (default_parameter (identifier_color) identifier_color (attribute (identifier_Qt) identifier_Qt (identifier_red) identifier_red )attribute )default_parameter )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_format) identifier_format )attribute (identifier_setUnderlineStyle) identifier_setUnderlineStyle )attribute (argument_list (attribute (identifier_QTextCharFormat) identifier_QTextCharFormat (identifier_WaveUnderline) identifier_WaveUnderline )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_format) identifier_format )attribute (identifier_setUnderlineColor) identifier_setUnderlineColor )attribute (argument_list (identifier_color) identifier_color )argument_list )call )expression_statement )block )function_definition )module
Highlights text as a syntax error. :param color: Underline color :type color: QtGui.QColor
(module (function_definition (function_name__parse) function_name__parse (parameters (identifier_cls) identifier_cls (identifier_data) identifier_data (default_parameter (identifier_key) identifier_key (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_parse) identifier_parse (conditional_expression (attribute (identifier_cls) identifier_cls (identifier_parse) identifier_parse )attribute (comparison_operator (attribute (identifier_cls) identifier_cls (identifier_parse) identifier_parse )attribute (None) None )comparison_operator (call (attribute (identifier_cls) identifier_cls (identifier_get_endpoint) identifier_get_endpoint )attribute (argument_list )argument_list )call )conditional_expression )assignment )expression_statement (if_statement (call (identifier_callable) identifier_callable (argument_list (identifier_parse) identifier_parse )argument_list )call (block (expression_statement (assignment (identifier_data) identifier_data (call (identifier_parse) identifier_parse (argument_list (identifier_data) identifier_data )argument_list )call )assignment )expression_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_parse) identifier_parse (identifier_str) identifier_str )argument_list )call (block (expression_statement (assignment (identifier_data) identifier_data (subscript (identifier_data) identifier_data (identifier_key) identifier_key )subscript )assignment )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (call (attribute (string_'"parse" should be a callable or string got, {0}') string_'"parse" should be a callable or string got, {0}' (identifier_format) identifier_format )attribute (argument_list (identifier_parse) identifier_parse )argument_list )call )argument_list )call )raise_statement )block )else_clause )if_statement (return_statement (identifier_data) identifier_data )return_statement )block )function_definition )module
Parse a set of data to extract entity-only data. Use classmethod `parse` if available, otherwise use the `endpoint` class variable to extract data from a data blob.
(module (function_definition (function_name_set_category) function_name_set_category (parameters (identifier_self) identifier_self (identifier_category) identifier_category )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_category) identifier_category (identifier_Category) identifier_Category )argument_list )call (block (expression_statement (assignment (identifier_name) identifier_name (attribute (identifier_category) identifier_category (identifier_name) identifier_name )attribute )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_name) identifier_name (identifier_category) identifier_category )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (attribute (call (attribute (identifier_self) identifier_self (identifier_find) identifier_find )attribute (argument_list (string_"category") string_"category" )argument_list )call (identifier_text) identifier_text )attribute (identifier_name) identifier_name )assignment )expression_statement )block )function_definition )module
Set package category Args: category: String of an existing category's name, or a Category object.
(module (function_definition (function_name_capture) function_name_capture (parameters (identifier_returns) identifier_returns (identifier_factor_returns) identifier_factor_returns (default_parameter (identifier_period) identifier_period (identifier_DAILY) identifier_DAILY )default_parameter )parameters (block (return_statement (parenthesized_expression (binary_operator (call (identifier_annual_return) identifier_annual_return (argument_list (identifier_returns) identifier_returns (keyword_argument (identifier_period) identifier_period (identifier_period) identifier_period )keyword_argument )argument_list )call (call (identifier_annual_return) identifier_annual_return (argument_list (identifier_factor_returns) identifier_factor_returns (keyword_argument (identifier_period) identifier_period (identifier_period) identifier_period )keyword_argument )argument_list )call )binary_operator )parenthesized_expression )return_statement )block )function_definition )module
Compute capture ratio. Parameters ---------- returns : pd.Series or np.ndarray Returns of the strategy, noncumulative. - See full explanation in :func:`~empyrical.stats.cum_returns`. factor_returns : pd.Series or np.ndarray Noncumulative returns of the factor to which beta is computed. Usually a benchmark such as the market. - This is in the same style as returns. period : str, optional Defines the periodicity of the 'returns' data for purposes of annualizing. Value ignored if `annualization` parameter is specified. Defaults are:: 'monthly':12 'weekly': 52 'daily': 252 Returns ------- capture_ratio : float Note ---- See http://www.investopedia.com/terms/u/up-market-capture-ratio.asp for details.
(module (function_definition (function_name_load_extra_data) function_name_load_extra_data (parameters (identifier_cls) identifier_cls (identifier_data) identifier_data )parameters (block (try_statement (block (expression_statement (call (attribute (attribute (identifier_cls) identifier_cls (identifier__extra_config) identifier__extra_config )attribute (identifier_update) identifier_update )attribute (argument_list (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (identifier_data) identifier_data )argument_list )call )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_ValueError) identifier_ValueError (as_pattern_target (identifier_exception) identifier_exception )as_pattern_target )as_pattern (block (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute (identifier_write) identifier_write )attribute (argument_list (call (attribute (string_'Could convert to JSON. {0:s}') string_'Could convert to JSON. {0:s}' (identifier_format) identifier_format )attribute (argument_list (identifier_exception) identifier_exception )argument_list )call )argument_list )call )expression_statement (expression_statement (call (identifier_exit) identifier_exit (argument_list (unary_operator (integer_1) integer_1 )unary_operator )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )module
Loads extra JSON configuration parameters from a data buffer. The data buffer must represent a JSON object. Args: data: str, the buffer to load the JSON data from.
(module (function_definition (function_name__ensure_slack) function_name__ensure_slack (parameters (identifier_self) identifier_self (typed_parameter (identifier_connector) identifier_connector (type (identifier_Any) identifier_Any )type )typed_parameter (typed_parameter (identifier_retries) identifier_retries (type (identifier_int) identifier_int )type )typed_parameter (typed_parameter (identifier_backoff) identifier_backoff (type (generic_type (identifier_Callable) identifier_Callable (type_parameter (type (list (identifier_int) identifier_int )list )type (type (identifier_float) identifier_float )type )type_parameter )generic_type )type )typed_parameter )parameters (type (None) None )type (block (expression_statement (assignment (identifier_connector) identifier_connector (conditional_expression (attribute (identifier_self) identifier_self (identifier__env_var) identifier__env_var )attribute (comparison_operator (identifier_connector) identifier_connector (None) None )comparison_operator (identifier_connector) identifier_connector )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_slack) identifier_slack (type (identifier_SlackClient) identifier_SlackClient )type (call (identifier__create_slack) identifier__create_slack (argument_list (identifier_connector) identifier_connector )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__slack) identifier__slack )attribute (call (identifier__SlackClientWrapper) identifier__SlackClientWrapper (argument_list (keyword_argument (identifier_slack) identifier_slack (identifier_slack) identifier_slack )keyword_argument (keyword_argument (identifier_retries) identifier_retries (identifier_retries) identifier_retries )keyword_argument (keyword_argument (identifier_backoff) identifier_backoff (identifier_backoff) identifier_backoff )keyword_argument )argument_list )call )assignment )expression_statement )block )function_definition )module
Ensure we have a SlackClient.
(module (function_definition (function_name_twofilter_smoothing) function_name_twofilter_smoothing (parameters (identifier_self) identifier_self (identifier_t) identifier_t (identifier_info) identifier_info (identifier_phi) identifier_phi (identifier_loggamma) identifier_loggamma (default_parameter (identifier_linear_cost) identifier_linear_cost (False) False )default_parameter (default_parameter (identifier_return_ess) identifier_return_ess (False) False )default_parameter (default_parameter (identifier_modif_forward) identifier_modif_forward (None) None )default_parameter (default_parameter (identifier_modif_info) identifier_modif_info (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_ti) identifier_ti (binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_T) identifier_T )attribute (integer_2) integer_2 )binary_operator (identifier_t) identifier_t )binary_operator )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_t) identifier_t (integer_0) integer_0 )comparison_operator (comparison_operator (identifier_t) identifier_t (binary_operator (attribute (identifier_self) identifier_self (identifier_T) identifier_T )attribute (integer_1) integer_1 )binary_operator )comparison_operator )boolean_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'two-filter smoothing: t must be in range 0,...,T-2') string_'two-filter smoothing: t must be in range 0,...,T-2' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_lwinfo) identifier_lwinfo (binary_operator (attribute (subscript (attribute (attribute (identifier_info) identifier_info (identifier_hist) identifier_hist )attribute (identifier_wgt) identifier_wgt )attribute (identifier_ti) identifier_ti )subscript (identifier_lw) identifier_lw )attribute (call (identifier_loggamma) identifier_loggamma (argument_list (subscript (attribute (attribute (identifier_info) identifier_info (identifier_hist) identifier_hist )attribute (identifier_X) identifier_X )attribute (identifier_ti) identifier_ti )subscript )argument_list )call )binary_operator )assignment )expression_statement (if_statement (identifier_linear_cost) identifier_linear_cost (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__twofilter_smoothing_ON) identifier__twofilter_smoothing_ON )attribute (argument_list (identifier_t) identifier_t (identifier_ti) identifier_ti (identifier_info) identifier_info (identifier_phi) identifier_phi (identifier_lwinfo) identifier_lwinfo (identifier_return_ess) identifier_return_ess (identifier_modif_forward) identifier_modif_forward (identifier_modif_info) identifier_modif_info )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__twofilter_smoothing_ON2) identifier__twofilter_smoothing_ON2 )attribute (argument_list (identifier_t) identifier_t (identifier_ti) identifier_ti (identifier_info) identifier_info (identifier_phi) identifier_phi (identifier_lwinfo) identifier_lwinfo )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Two-filter smoothing. Parameters ---------- t: time, in range 0 <= t < T-1 info: SMC object the information filter phi: function test function, a function of (X_t,X_{t+1}) loggamma: function a function of (X_{t+1}) linear_cost: bool if True, use the O(N) variant (basic version is O(N^2)) Returns ------- Two-filter estimate of the smoothing expectation of phi(X_t,x_{t+1})
(module (function_definition (function_name__send) function_name__send (parameters (identifier_self) identifier_self (identifier_email_message) identifier_email_message )parameters (block (expression_statement (call (attribute (identifier_pre_send) identifier_pre_send (identifier_send) identifier_send )attribute (argument_list (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (keyword_argument (identifier_message) identifier_message (identifier_email_message) identifier_email_message )keyword_argument )argument_list )call )expression_statement (if_statement (not_operator (call (attribute (identifier_email_message) identifier_email_message (identifier_recipients) identifier_recipients )attribute (argument_list )argument_list )call )not_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_from_email) identifier_from_email (call (identifier_sanitize_address) identifier_sanitize_address (argument_list (attribute (identifier_email_message) identifier_email_message (identifier_from_email) identifier_from_email )attribute (attribute (identifier_email_message) identifier_email_message (identifier_encoding) identifier_encoding )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_recipients) identifier_recipients (list_comprehension (call (identifier_sanitize_address) identifier_sanitize_address (argument_list (identifier_addr) identifier_addr (attribute (identifier_email_message) identifier_email_message (identifier_encoding) identifier_encoding )attribute )argument_list )call (for_in_clause (identifier_addr) identifier_addr (call (attribute (identifier_email_message) identifier_email_message (identifier_recipients) identifier_recipients )attribute (argument_list )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_message) identifier_message (call (attribute (call (attribute (identifier_email_message) identifier_email_message (identifier_message) identifier_message )attribute (argument_list )argument_list )call (identifier_as_bytes) identifier_as_bytes )attribute (argument_list (keyword_argument (identifier_linesep) identifier_linesep (string_'\r\n') string_'\r\n' )keyword_argument )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (attribute (identifier_self) identifier_self (identifier_conn) identifier_conn )attribute (identifier_send_raw_email) identifier_send_raw_email )attribute (argument_list (keyword_argument (identifier_Source) identifier_Source (identifier_from_email) identifier_from_email )keyword_argument (keyword_argument (identifier_Destinations) identifier_Destinations (identifier_recipients) identifier_recipients )keyword_argument (keyword_argument (identifier_RawMessage) identifier_RawMessage (dictionary (pair (string_'Data') string_'Data' (identifier_message) identifier_message )pair )dictionary )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_message_id) identifier_message_id (subscript (identifier_result) identifier_result (string_'MessageId') string_'MessageId' )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_post_send) identifier_post_send (identifier_send) identifier_send )attribute (argument_list (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (keyword_argument (identifier_message) identifier_message (identifier_email_message) identifier_email_message )keyword_argument (keyword_argument (identifier_message_id) identifier_message_id (identifier_message_id) identifier_message_id )keyword_argument )argument_list )call )expression_statement )block (except_clause (identifier_ClientError) identifier_ClientError (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_fail_silently) identifier_fail_silently )attribute )not_operator (block (raise_statement )raise_statement )block )if_statement (return_statement (False) False )return_statement )block )except_clause )try_statement (return_statement (True) True )return_statement )block )function_definition )module
Sends an individual message via the Amazon SES HTTP API. Args: email_message: A single Django EmailMessage object. Returns: True if the EmailMessage was sent successfully, otherwise False. Raises: ClientError: An interaction with the Amazon SES HTTP API failed.
(module (function_definition (function_name_post_build_time_coverage) function_name_post_build_time_coverage (parameters (identifier_self) identifier_self )parameters (block (import_from_statement (dotted_name (identifier_ambry) identifier_ambry (identifier_util) identifier_util (identifier_datestimes) identifier_datestimes )dotted_name (dotted_name (identifier_expand_to_years) identifier_expand_to_years )dotted_name )import_from_statement (expression_statement (assignment (identifier_years) identifier_years (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement (if_statement (attribute (attribute (attribute (identifier_self) identifier_self (identifier_metadata) identifier_metadata )attribute (identifier_about) identifier_about )attribute (identifier_time) identifier_time )attribute (block (for_statement (identifier_year) identifier_year (call (identifier_expand_to_years) identifier_expand_to_years (argument_list (attribute (attribute (attribute (identifier_self) identifier_self (identifier_metadata) identifier_metadata )attribute (identifier_about) identifier_about )attribute (identifier_time) identifier_time )attribute )argument_list )call (block (expression_statement (call (attribute (identifier_years) identifier_years (identifier_add) identifier_add )attribute (argument_list (identifier_year) identifier_year )argument_list )call )expression_statement )block )for_statement )block )if_statement (if_statement (attribute (attribute (identifier_self) identifier_self (identifier_identity) identifier_identity )attribute (identifier_btime) identifier_btime )attribute (block (for_statement (identifier_year) identifier_year (call (identifier_expand_to_years) identifier_expand_to_years (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_identity) identifier_identity )attribute (identifier_btime) identifier_btime )attribute )argument_list )call (block (expression_statement (call (attribute (identifier_years) identifier_years (identifier_add) identifier_add )attribute (argument_list (identifier_year) identifier_year )argument_list )call )expression_statement )block )for_statement )block )if_statement (for_statement (identifier_p) identifier_p (attribute (identifier_self) identifier_self (identifier_partitions) identifier_partitions )attribute (block (expression_statement (augmented_assignment (identifier_years) identifier_years (call (identifier_set) identifier_set (argument_list (attribute (identifier_p) identifier_p (identifier_time_coverage) identifier_time_coverage )attribute )argument_list )call )augmented_assignment )expression_statement )block )for_statement )block )function_definition )module
Collect all of the time coverage for the bundle.
(module (function_definition (function_name__get_gradient_log_pdf) function_name__get_gradient_log_pdf (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_sub_vec) identifier_sub_vec (binary_operator (attribute (identifier_self) identifier_self (identifier_variable_assignments) identifier_variable_assignments )attribute (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_model) identifier_model )attribute (identifier_mean) identifier_mean )attribute (identifier_flatten) identifier_flatten )attribute (argument_list )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_grad) identifier_grad (unary_operator (call (attribute (identifier_np) identifier_np (identifier_dot) identifier_dot )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_model) identifier_model )attribute (identifier_precision_matrix) identifier_precision_matrix )attribute (identifier_sub_vec) identifier_sub_vec )argument_list )call )unary_operator )assignment )expression_statement (expression_statement (assignment (identifier_log_pdf) identifier_log_pdf (binary_operator (float_0.5) float_0.5 (call (attribute (identifier_np) identifier_np (identifier_dot) identifier_dot )attribute (argument_list (identifier_sub_vec) identifier_sub_vec (identifier_grad) identifier_grad )argument_list )call )binary_operator )assignment )expression_statement (return_statement (expression_list (identifier_grad) identifier_grad (identifier_log_pdf) identifier_log_pdf )expression_list )return_statement )block )function_definition )module
Method that finds gradient and its log at position
(module (function_definition (function_name_value) function_name_value (parameters (identifier_dtype) identifier_dtype (identifier_arg) identifier_arg )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_arg) identifier_arg (attribute (identifier_ir) identifier_ir (identifier_Expr) identifier_Expr )attribute )argument_list )call )not_operator (block (expression_statement (assignment (identifier_arg) identifier_arg (call (attribute (identifier_ir) identifier_ir (identifier_literal) identifier_literal )attribute (argument_list (identifier_arg) identifier_arg )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_arg) identifier_arg (attribute (identifier_ir) identifier_ir (identifier_AnyValue) identifier_AnyValue )attribute )argument_list )call )not_operator (block (raise_statement (call (attribute (identifier_com) identifier_com (identifier_IbisTypeError) identifier_IbisTypeError )attribute (argument_list (call (attribute (concatenated_string (string_'Given argument with type {} is not a value ') string_'Given argument with type {} is not a value ' (string_'expression') string_'expression' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (call (identifier_type) identifier_type (argument_list (identifier_arg) identifier_arg )argument_list )call )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_value) identifier_value (call (identifier_getattr) identifier_getattr (argument_list (call (attribute (identifier_arg) identifier_arg (identifier_op) identifier_op )attribute (argument_list )argument_list )call (string_'value') string_'value' (None) None )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_dtype) identifier_dtype (identifier_type) identifier_type )argument_list )call (call (identifier_isinstance) identifier_isinstance (argument_list (call (attribute (identifier_arg) identifier_arg (identifier_type) identifier_type )attribute (argument_list )argument_list )call (identifier_dtype) identifier_dtype )argument_list )call )boolean_operator (block (return_statement (identifier_arg) identifier_arg )return_statement )block (elif_clause (call (attribute (identifier_dt) identifier_dt (identifier_castable) identifier_castable )attribute (argument_list (call (attribute (identifier_arg) identifier_arg (identifier_type) identifier_type )attribute (argument_list )argument_list )call (call (attribute (identifier_dt) identifier_dt (identifier_dtype) identifier_dtype )attribute (argument_list (identifier_dtype) identifier_dtype )argument_list )call (keyword_argument (identifier_value) identifier_value (identifier_value) identifier_value )keyword_argument )argument_list )call (block (return_statement (identifier_arg) identifier_arg )return_statement )block )elif_clause (else_clause (block (raise_statement (call (attribute (identifier_com) identifier_com (identifier_IbisTypeError) identifier_IbisTypeError )attribute (argument_list (call (attribute (concatenated_string (string_'Given argument with datatype {} is not ') string_'Given argument with datatype {} is not ' (string_'subtype of {} nor implicitly castable to ') string_'subtype of {} nor implicitly castable to ' (string_'it') string_'it' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (call (attribute (identifier_arg) identifier_arg (identifier_type) identifier_type )attribute (argument_list )argument_list )call (identifier_dtype) identifier_dtype )argument_list )call )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Validates that the given argument is a Value with a particular datatype Parameters ---------- dtype : DataType subclass or DataType instance arg : python literal or an ibis expression If a python literal is given the validator tries to coerce it to an ibis literal. Returns ------- arg : AnyValue An ibis value expression with the specified datatype
(module (function_definition (function_name_login) function_name_login (parameters (identifier_session) identifier_session (identifier_user) identifier_user (identifier_password) identifier_password (default_parameter (identifier_database) identifier_database (None) None )default_parameter (default_parameter (identifier_server) identifier_server (None) None )default_parameter )parameters (block (if_statement (not_operator (identifier_user) identifier_user )not_operator (block (expression_statement (assignment (identifier_user) identifier_user (call (attribute (identifier_click) identifier_click (identifier_prompt) identifier_prompt )attribute (argument_list (string_"Username") string_"Username" (keyword_argument (identifier_type) identifier_type (identifier_str) identifier_str )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (not_operator (identifier_password) identifier_password )not_operator (block (expression_statement (assignment (identifier_password) identifier_password (call (attribute (identifier_click) identifier_click (identifier_prompt) identifier_prompt )attribute (argument_list (string_"Password") string_"Password" (keyword_argument (identifier_hide_input) identifier_hide_input (True) True )keyword_argument (keyword_argument (identifier_type) identifier_type (identifier_str) identifier_str )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement (try_statement (block (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_click) identifier_click (identifier_progressbar) identifier_progressbar )attribute (argument_list (keyword_argument (identifier_length) identifier_length (integer_1) integer_1 )keyword_argument (keyword_argument (identifier_label) identifier_label (string_"Logging in...") string_"Logging in..." )keyword_argument )argument_list )call (as_pattern_target (identifier_progressbar) identifier_progressbar )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_session) identifier_session (identifier_login) identifier_login )attribute (argument_list (identifier_user) identifier_user (identifier_password) identifier_password (identifier_database) identifier_database (identifier_server) identifier_server )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_progressbar) identifier_progressbar (identifier_update) identifier_update )attribute (argument_list (integer_1) integer_1 )argument_list )call )expression_statement )block )with_statement (if_statement (attribute (identifier_session) identifier_session (identifier_credentials) identifier_credentials )attribute (block (expression_statement (call (attribute (identifier_click) identifier_click (identifier_echo) identifier_echo )attribute (argument_list (binary_operator (string_'Logged in as: %s') string_'Logged in as: %s' (attribute (identifier_session) identifier_session (identifier_credentials) identifier_credentials )attribute )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_session) identifier_session (identifier_load) identifier_load )attribute (argument_list (identifier_database) identifier_database )argument_list )call )expression_statement )block )if_statement (return_statement (call (attribute (identifier_session) identifier_session (identifier_get_api) identifier_get_api )attribute (argument_list )argument_list )call )return_statement )block (except_clause (attribute (identifier_mygeotab) identifier_mygeotab (identifier_AuthenticationException) identifier_AuthenticationException )attribute (block (expression_statement (call (attribute (identifier_click) identifier_click (identifier_echo) identifier_echo )attribute (argument_list (string_'Incorrect credentials. Please try again.') string_'Incorrect credentials. Please try again.' )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_sys) identifier_sys (identifier_exit) identifier_exit )attribute (argument_list (integer_0) integer_0 )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )module
Logs into a MyGeotab server and stores the returned credentials. :param session: The current Session object. :param user: The username used for MyGeotab servers. Usually an email address. :param password: The password associated with the username. Optional if `session_id` is provided. :param database: The database or company name. Optional as this usually gets resolved upon authentication. :param server: The server ie. my23.geotab.com. Optional as this usually gets resolved upon authentication.
(module (function_definition (function_name_internal_writer) function_name_internal_writer (parameters (identifier_self) identifier_self (identifier_outputs) identifier_outputs (identifier_stdout) identifier_stdout )parameters (block (for_statement (identifier_output) identifier_output (identifier_outputs) identifier_outputs (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_"\t") string_"\t" (identifier_join) identifier_join )attribute (argument_list (call (identifier_map) identifier_map (argument_list (attribute (identifier_self) identifier_self (identifier_internal_serialize) identifier_internal_serialize )attribute (identifier_output) identifier_output )argument_list )call )argument_list )call (keyword_argument (identifier_file) identifier_file (identifier_stdout) identifier_stdout )keyword_argument )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Writer which outputs the python repr for each item.
(module (function_definition (function_name_start_event) function_name_start_event (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_with_outframe_pool) identifier_with_outframe_pool )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_update_config) identifier_update_config )attribute (argument_list )argument_list )call )expression_statement (for_statement (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier_outputs) identifier_outputs )attribute (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_outframe_pool) identifier_outframe_pool )attribute (identifier_name) identifier_name )subscript (call (identifier_ObjectPool) identifier_ObjectPool (argument_list (identifier_Frame) identifier_Frame (attribute (identifier_self) identifier_self (identifier_new_frame) identifier_new_frame )attribute (subscript (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (string_'outframe_pool_len') string_'outframe_pool_len' )subscript )argument_list )call )assignment )expression_statement )block )for_statement )block )if_statement (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_on_start) identifier_on_start )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_ex) identifier_ex )as_pattern_target )as_pattern (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_exception) identifier_exception )attribute (argument_list (identifier_ex) identifier_ex )argument_list )call )expression_statement (raise_statement (call (identifier_StopIteration) identifier_StopIteration (argument_list )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Called by the event loop when it is started. Creates the output frame pools (if used) then calls :py:meth:`on_start`. Creating the output frame pools now allows their size to be configured before starting the component.
(module (function_definition (function_name_filter) function_name_filter (parameters (identifier_configs) identifier_configs (identifier_settings) identifier_settings )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_configs) identifier_configs (attribute (identifier_pd) identifier_pd (identifier_DataFrame) identifier_DataFrame )attribute )argument_list )call (block (expression_statement (assignment (identifier_configs) identifier_configs (attribute (subscript (identifier_configs) identifier_configs (list (string_'a') string_'a' (string_'b') string_'b' (string_'m') string_'m' (string_'n') string_'n' )list )subscript (identifier_values) identifier_values )attribute )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_filter_funcs) identifier_filter_funcs (dictionary (pair (string_'dd') string_'dd' (identifier__filter_dipole_dipole) identifier__filter_dipole_dipole )pair (pair (string_'schlumberger') string_'schlumberger' (identifier__filter_schlumberger) identifier__filter_schlumberger )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_keys) identifier_keys (list (string_'dd') string_'dd' (string_'schlumberger') string_'schlumberger' )list )assignment )expression_statement (expression_statement (assignment (identifier_allowed_keys) identifier_allowed_keys (call (attribute (identifier_settings) identifier_settings (identifier_get) identifier_get )attribute (argument_list (string_'only_types') string_'only_types' (call (attribute (identifier_filter_funcs) identifier_filter_funcs (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_results) identifier_results (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_configs_filtered) identifier_configs_filtered (call (attribute (call (attribute (identifier_configs) identifier_configs (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call (identifier_astype) identifier_astype )attribute (argument_list (identifier_float) identifier_float )argument_list )call )assignment )expression_statement (for_statement (identifier_key) identifier_key (identifier_keys) identifier_keys (block (if_statement (comparison_operator (identifier_key) identifier_key (identifier_allowed_keys) identifier_allowed_keys )comparison_operator (block (expression_statement (assignment (pattern_list (identifier_configs_filtered) identifier_configs_filtered (identifier_indices_filtered) identifier_indices_filtered )pattern_list (call (subscript (identifier_filter_funcs) identifier_filter_funcs (identifier_key) identifier_key )subscript (argument_list (identifier_configs_filtered) identifier_configs_filtered )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_indices_filtered) identifier_indices_filtered )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (subscript (identifier_results) identifier_results (identifier_key) identifier_key )subscript (identifier_indices_filtered) identifier_indices_filtered )assignment )expression_statement )block )if_statement )block )if_statement )block )for_statement (expression_statement (assignment (subscript (identifier_results) identifier_results (string_'not_sorted') string_'not_sorted' )subscript (subscript (call (attribute (identifier_np) identifier_np (identifier_where) identifier_where )attribute (argument_list (unary_operator (call (attribute (identifier_np) identifier_np (identifier_all) identifier_all )attribute (argument_list (call (attribute (identifier_np) identifier_np (identifier_isnan) identifier_isnan )attribute (argument_list (identifier_configs_filtered) identifier_configs_filtered )argument_list )call (keyword_argument (identifier_axis) identifier_axis (integer_1) integer_1 )keyword_argument )argument_list )call )unary_operator )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (return_statement (identifier_results) identifier_results )return_statement )block )function_definition )module
Main entry function to filtering configuration types Parameters ---------- configs: Nx4 array array containing A-B-M-N configurations settings: dict 'only_types': ['dd', 'other'], # filter only for those types Returns ------- dict results dict containing filter results (indices) for all registered filter functions. All remaining configs are stored under the keywords 'remaining'
(module (function_definition (function_name__get_json) function_name__get_json (parameters (identifier_self) identifier_self (identifier_path) identifier_path (default_parameter (identifier_params) identifier_params (None) None )default_parameter (default_parameter (identifier_base) identifier_base (identifier_JIRA_BASE_URL) identifier_JIRA_BASE_URL )default_parameter )parameters (block (expression_statement (assignment (identifier_url) identifier_url (call (attribute (identifier_self) identifier_self (identifier__get_url) identifier__get_url )attribute (argument_list (identifier_path) identifier_path (identifier_base) identifier_base )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_r) identifier_r (call (attribute (attribute (identifier_self) identifier_self (identifier__session) identifier__session )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_url) identifier_url (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_r_json) identifier_r_json (call (identifier_json_loads) identifier_json_loads (argument_list (identifier_r) identifier_r )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (identifier_ValueError) identifier_ValueError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_error) identifier_error )attribute (argument_list (binary_operator (string_"%s\n%s") string_"%s\n%s" (tuple (identifier_e) identifier_e (attribute (identifier_r) identifier_r (identifier_text) identifier_text )attribute )tuple )binary_operator )argument_list )call )expression_statement (raise_statement (identifier_e) identifier_e )raise_statement )block )except_clause )try_statement (return_statement (identifier_r_json) identifier_r_json )return_statement )block )function_definition )module
Get the json for a given path and params. :param path: The subpath required :type path: str :param params: Parameters to filter the json query. :type params: Optional[Dict[str, Any]] :param base: The Base JIRA URL, defaults to the instance base. :type base: Optional[str] :rtype: Union[Dict[str, Any], List[Dict[str, str]]]
(module (function_definition (function_name_add_pagination_meta) function_name_add_pagination_meta (parameters (identifier_self) identifier_self (identifier_params) identifier_params (identifier_meta) identifier_meta )parameters (block (expression_statement (assignment (subscript (identifier_meta) identifier_meta (string_'page_size') string_'page_size' )subscript (subscript (identifier_params) identifier_params (string_'page_size') string_'page_size' )subscript )assignment )expression_statement (expression_statement (assignment (subscript (identifier_meta) identifier_meta (string_'page') string_'page' )subscript (subscript (identifier_params) identifier_params (string_'page') string_'page' )subscript )assignment )expression_statement (expression_statement (assignment (subscript (identifier_meta) identifier_meta (string_'prev') string_'prev' )subscript (conditional_expression (call (attribute (string_"page={0}&page_size={1}") string_"page={0}&page_size={1}" (identifier_format) identifier_format )attribute (argument_list (binary_operator (subscript (identifier_params) identifier_params (string_'page') string_'page' )subscript (integer_1) integer_1 )binary_operator (subscript (identifier_params) identifier_params (string_'page_size') string_'page_size' )subscript )argument_list )call (comparison_operator (subscript (identifier_meta) identifier_meta (string_'page') string_'page' )subscript (integer_0) integer_0 )comparison_operator (None) None )conditional_expression )assignment )expression_statement (expression_statement (assignment (subscript (identifier_meta) identifier_meta (string_'next') string_'next' )subscript (conditional_expression (call (attribute (string_"page={0}&page_size={1}") string_"page={0}&page_size={1}" (identifier_format) identifier_format )attribute (argument_list (binary_operator (subscript (identifier_params) identifier_params (string_'page') string_'page' )subscript (integer_1) integer_1 )binary_operator (subscript (identifier_params) identifier_params (string_'page_size') string_'page_size' )subscript )argument_list )call (call (attribute (identifier_meta) identifier_meta (identifier_get) identifier_get )attribute (argument_list (string_'has_more') string_'has_more' (True) True )argument_list )call (None) None )conditional_expression )assignment )expression_statement )block )function_definition )module
Extend default meta dictionary value with pagination hints. Note: This method handler attaches values to ``meta`` dictionary without changing it's reference. This means that you should never replace ``meta`` dictionary with any other dict instance but simply modify its content. Args: params (dict): dictionary of decoded parameter values meta (dict): dictionary of meta values attached to response
(module (function_definition (function_name___undo_filter_average) function_name___undo_filter_average (parameters (identifier_self) identifier_self (identifier_scanline) identifier_scanline )parameters (block (expression_statement (assignment (identifier_ai) identifier_ai (unary_operator (attribute (identifier_self) identifier_self (identifier_fu) identifier_fu )attribute )unary_operator )assignment )expression_statement (expression_statement (assignment (identifier_previous) identifier_previous (attribute (identifier_self) identifier_self (identifier_prev) identifier_prev )attribute )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (identifier_scanline) identifier_scanline )argument_list )call )argument_list )call (block (expression_statement (assignment (identifier_x) identifier_x (subscript (identifier_scanline) identifier_scanline (identifier_i) identifier_i )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_ai) identifier_ai (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_a) identifier_a (integer_0) integer_0 )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_a) identifier_a (subscript (identifier_scanline) identifier_scanline (identifier_ai) identifier_ai )subscript )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_b) identifier_b (subscript (identifier_previous) identifier_previous (identifier_i) identifier_i )subscript )assignment )expression_statement (expression_statement (assignment (subscript (identifier_scanline) identifier_scanline (identifier_i) identifier_i )subscript (binary_operator (parenthesized_expression (binary_operator (identifier_x) identifier_x (parenthesized_expression (binary_operator (parenthesized_expression (binary_operator (identifier_a) identifier_a (identifier_b) identifier_b )binary_operator )parenthesized_expression (integer_1) integer_1 )binary_operator )parenthesized_expression )binary_operator )parenthesized_expression (integer_0xff) integer_0xff )binary_operator )assignment )expression_statement (expression_statement (augmented_assignment (identifier_ai) identifier_ai (integer_1) integer_1 )augmented_assignment )expression_statement )block )for_statement )block )function_definition )module
Undo average filter.
(module (function_definition (function_name__compute_mean) function_name__compute_mean (parameters (identifier_self) identifier_self (identifier_C) identifier_C (identifier_g) identifier_g (identifier_mag) identifier_mag (identifier_hypo_depth) identifier_hypo_depth (identifier_rrup) identifier_rrup (identifier_vs30) identifier_vs30 (identifier_pga_rock) identifier_pga_rock (identifier_imt) identifier_imt )parameters (block (if_statement (comparison_operator (identifier_hypo_depth) identifier_hypo_depth (integer_100) integer_100 )comparison_operator (block (expression_statement (assignment (identifier_hypo_depth) identifier_hypo_depth (integer_100) integer_100 )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_delta) identifier_delta (binary_operator (float_0.00724) float_0.00724 (binary_operator (integer_10) integer_10 (parenthesized_expression (binary_operator (float_0.507) float_0.507 (identifier_mag) identifier_mag )binary_operator )parenthesized_expression )binary_operator )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_R) identifier_R (call (attribute (identifier_np) identifier_np (identifier_sqrt) identifier_sqrt )attribute (argument_list (binary_operator (binary_operator (identifier_rrup) identifier_rrup (integer_2) integer_2 )binary_operator (binary_operator (identifier_delta) identifier_delta (integer_2) integer_2 )binary_operator )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_s_amp) identifier_s_amp (call (attribute (identifier_self) identifier_self (identifier__compute_soil_amplification) identifier__compute_soil_amplification )attribute (argument_list (identifier_C) identifier_C (identifier_vs30) identifier_vs30 (identifier_pga_rock) identifier_pga_rock (identifier_imt) identifier_imt )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_mean) identifier_mean (parenthesized_expression (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (subscript (identifier_C) identifier_C (string_'c1') string_'c1' )subscript (binary_operator (subscript (identifier_C) identifier_C (string_'c2') string_'c2' )subscript (identifier_mag) identifier_mag )binary_operator )binary_operator (binary_operator (subscript (identifier_C) identifier_C (string_'c3') string_'c3' )subscript (identifier_hypo_depth) identifier_hypo_depth )binary_operator )binary_operator (binary_operator (subscript (identifier_C) identifier_C (string_'c4') string_'c4' )subscript (identifier_R) identifier_R )binary_operator )binary_operator (binary_operator (identifier_g) identifier_g (call (attribute (identifier_np) identifier_np (identifier_log10) identifier_log10 )attribute (argument_list (identifier_R) identifier_R )argument_list )call )binary_operator )binary_operator (identifier_s_amp) identifier_s_amp )binary_operator )parenthesized_expression )assignment )expression_statement (return_statement (identifier_mean) identifier_mean )return_statement )block )function_definition )module
Compute mean according to equation 1, page 1706.
(module (function_definition (function_name_connect) function_name_connect (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_future) identifier_future (call (attribute (identifier_concurrent) identifier_concurrent (identifier_Future) identifier_Future )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_connected) identifier_connected )attribute (block (raise_statement (call (attribute (identifier_exceptions) identifier_exceptions (identifier_ConnectError) identifier_ConnectError )attribute (argument_list (string_'already connected') string_'already connected' )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_debug) identifier_debug )attribute (argument_list (string_'%s connecting') string_'%s connecting' (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_io_loop) identifier_io_loop )attribute (identifier_add_future) identifier_add_future )attribute (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier__client) identifier__client )attribute (identifier_connect) identifier_connect )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_host) identifier_host )attribute (attribute (identifier_self) identifier_self (identifier_port) identifier_port )attribute )argument_list )call (lambda (lambda_parameters (identifier_f) identifier_f )lambda_parameters (call (attribute (identifier_self) identifier_self (identifier__on_connected) identifier__on_connected )attribute (argument_list (identifier_f) identifier_f (identifier_future) identifier_future )argument_list )call )lambda )argument_list )call )expression_statement (return_statement (identifier_future) identifier_future )return_statement )block )function_definition )module
Connect to the Redis server if necessary. :rtype: :class:`~tornado.concurrent.Future` :raises: :class:`~tredis.exceptions.ConnectError` :class:`~tredis.exceptinos.RedisError`
(module (function_definition (function_name_post) function_name_post (parameters (identifier_self) identifier_self (identifier_request) identifier_request (default_parameter (identifier_format) identifier_format (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_serializer_class) identifier_serializer_class (call (attribute (identifier_self) identifier_self (identifier_get_serializer_class) identifier_get_serializer_class )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_serializer) identifier_serializer (call (identifier_serializer_class) identifier_serializer_class (argument_list (keyword_argument (identifier_data) identifier_data (attribute (identifier_request) identifier_request (identifier_data) identifier_data )attribute )keyword_argument (keyword_argument (identifier_instance) identifier_instance (attribute (identifier_request) identifier_request (identifier_user) identifier_user )attribute )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_serializer) identifier_serializer (identifier_is_valid) identifier_is_valid )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_serializer) identifier_serializer (identifier_save) identifier_save )attribute (argument_list )argument_list )call )expression_statement (return_statement (call (identifier_Response) identifier_Response (argument_list (dictionary (pair (string_'detail') string_'detail' (call (identifier__) identifier__ (argument_list (string_u'Password successfully changed') string_u'Password successfully changed' )argument_list )call )pair )dictionary )argument_list )call )return_statement )block )if_statement (return_statement (call (identifier_Response) identifier_Response (argument_list (attribute (identifier_serializer) identifier_serializer (identifier_errors) identifier_errors )attribute (keyword_argument (identifier_status) identifier_status (integer_400) integer_400 )keyword_argument )argument_list )call )return_statement )block )function_definition )module
validate password change operation and return result
(module (function_definition (function_name_hildatree2dgparentedtree) function_name_hildatree2dgparentedtree (parameters (identifier_self) identifier_self )parameters (block (function_definition (function_name_transform) function_name_transform (parameters (identifier_hilda_tree) identifier_hilda_tree )parameters (block (if_statement (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_hilda_tree) identifier_hilda_tree (identifier_basestring) identifier_basestring )argument_list )call (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_hilda_tree) identifier_hilda_tree (string_'label') string_'label' )argument_list )call )not_operator )boolean_operator (block (return_statement (identifier_hilda_tree) identifier_hilda_tree )return_statement )block )if_statement (assert_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_hilda_tree) identifier_hilda_tree )argument_list )call (integer_2) integer_2 )comparison_operator (string_"We can only handle binary trees.") string_"We can only handle binary trees." )assert_statement (expression_statement (assignment (identifier_match) identifier_match (call (attribute (identifier_HILDA_REL_RE) identifier_HILDA_REL_RE (identifier_match) identifier_match )attribute (argument_list (call (attribute (identifier_hilda_tree) identifier_hilda_tree (identifier_label) identifier_label )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (assert_statement (identifier_match) identifier_match (call (attribute (string_"Relation '{}' does not match regex '{}'") string_"Relation '{}' does not match regex '{}'" (identifier_format) identifier_format )attribute (argument_list (call (attribute (identifier_hilda_tree) identifier_hilda_tree (identifier_label) identifier_label )attribute (argument_list )argument_list )call (identifier_HILDA_REL_RE) identifier_HILDA_REL_RE )argument_list )call )assert_statement (expression_statement (assignment (pattern_list (identifier_relname) identifier_relname (identifier_left_child_nuc) identifier_left_child_nuc (identifier_right_child_nuc) identifier_right_child_nuc )pattern_list (call (attribute (identifier_match) identifier_match (identifier_groups) identifier_groups )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_hilda_tree) identifier_hilda_tree (identifier__label) identifier__label )attribute (identifier_relname) identifier_relname )assignment )expression_statement (for_statement (pattern_list (identifier_i) identifier_i (identifier_child_nuclearity) identifier_child_nuclearity )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (list (identifier_left_child_nuc) identifier_left_child_nuc (identifier_right_child_nuc) identifier_right_child_nuc )list )argument_list )call (block (expression_statement (assignment (identifier_child) identifier_child (subscript (identifier_hilda_tree) identifier_hilda_tree (identifier_i) identifier_i )subscript )assignment )expression_statement (expression_statement (assignment (subscript (identifier_hilda_tree) identifier_hilda_tree (identifier_i) identifier_i )subscript (call (identifier_Tree) identifier_Tree (argument_list (identifier_child_nuclearity) identifier_child_nuclearity (list (call (identifier_transform) identifier_transform (argument_list (identifier_child) identifier_child )argument_list )call )list )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_hilda_tree) identifier_hilda_tree )return_statement )block )function_definition (expression_statement (assignment (identifier_tree) identifier_tree (call (identifier_transform) identifier_transform (argument_list (attribute (identifier_self) identifier_self (identifier_hildafile_tree) identifier_hildafile_tree )attribute )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_DGParentedTree) identifier_DGParentedTree (identifier_convert) identifier_convert )attribute (argument_list (identifier_tree) identifier_tree )argument_list )call )return_statement )block )function_definition )module
Convert the tree from HILDA's format into a conventional binary tree, which can be easily converted into output formats like RS3.
(module (function_definition (function_name_config_as_dict) function_name_config_as_dict (parameters (identifier_cfg) identifier_cfg )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (call (attribute (attribute (identifier_cfg) identifier_cfg (identifier___dict__) identifier___dict__ )attribute (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (delete_statement (subscript (identifier_ret) identifier_ret (string_'rand_crop_samplers') string_'rand_crop_samplers' )subscript )delete_statement (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (identifier_cfg) identifier_cfg (identifier_rand_crop_samplers) identifier_rand_crop_samplers )attribute (identifier_list) identifier_list )argument_list )call )assert_statement (expression_statement (assignment (identifier_ret) identifier_ret (call (identifier_merge_dict) identifier_merge_dict (argument_list (identifier_ret) identifier_ret (call (identifier_zip_namedtuple) identifier_zip_namedtuple (argument_list (attribute (identifier_cfg) identifier_cfg (identifier_rand_crop_samplers) identifier_rand_crop_samplers )attribute )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_num_crop_sampler) identifier_num_crop_sampler (call (identifier_len) identifier_len (argument_list (attribute (identifier_cfg) identifier_cfg (identifier_rand_crop_samplers) identifier_rand_crop_samplers )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'num_crop_sampler') string_'num_crop_sampler' )subscript (identifier_num_crop_sampler) identifier_num_crop_sampler )assignment )expression_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'rand_crop_prob') string_'rand_crop_prob' )subscript (binary_operator (binary_operator (float_1.0) float_1.0 (parenthesized_expression (binary_operator (identifier_num_crop_sampler) identifier_num_crop_sampler (integer_1) integer_1 )binary_operator )parenthesized_expression )binary_operator (identifier_num_crop_sampler) identifier_num_crop_sampler )binary_operator )assignment )expression_statement (delete_statement (subscript (identifier_ret) identifier_ret (string_'rand_pad') string_'rand_pad' )subscript )delete_statement (expression_statement (assignment (identifier_ret) identifier_ret (call (identifier_merge_dict) identifier_merge_dict (argument_list (identifier_ret) identifier_ret (call (attribute (attribute (identifier_cfg) identifier_cfg (identifier_rand_pad) identifier_rand_pad )attribute (identifier__asdict) identifier__asdict )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (delete_statement (subscript (identifier_ret) identifier_ret (string_'color_jitter') string_'color_jitter' )subscript )delete_statement (expression_statement (assignment (identifier_ret) identifier_ret (call (identifier_merge_dict) identifier_merge_dict (argument_list (identifier_ret) identifier_ret (call (attribute (attribute (identifier_cfg) identifier_cfg (identifier_color_jitter) identifier_color_jitter )attribute (identifier__asdict) identifier__asdict )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
convert raw configuration to unified dictionary
(module (function_definition (function_name_speed_difference) function_name_speed_difference (parameters (identifier_points) identifier_points )parameters (block (expression_statement (assignment (identifier_data) identifier_data (list (integer_0) integer_0 )list )assignment )expression_statement (for_statement (pattern_list (identifier_before) identifier_before (identifier_after) identifier_after )pattern_list (call (identifier_pairwise) identifier_pairwise (argument_list (identifier_points) identifier_points )argument_list )call (block (expression_statement (call (attribute (identifier_data) identifier_data (identifier_append) identifier_append )attribute (argument_list (binary_operator (attribute (identifier_before) identifier_before (identifier_vel) identifier_vel )attribute (attribute (identifier_after) identifier_after (identifier_vel) identifier_vel )attribute )binary_operator )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_data) identifier_data )return_statement )block )function_definition )module
Computes the speed difference between each adjacent point Args: points (:obj:`Point`) Returns: :obj:`list` of int: Indexes of changepoints
(module (function_definition (function_name_factorize_groupby_cols) function_name_factorize_groupby_cols (parameters (identifier_self) identifier_self (identifier_groupby_cols) identifier_groupby_cols )parameters (block (expression_statement (assignment (identifier_factor_list) identifier_factor_list (list )list )assignment )expression_statement (expression_statement (assignment (identifier_values_list) identifier_values_list (list )list )assignment )expression_statement (for_statement (identifier_col) identifier_col (identifier_groupby_cols) identifier_groupby_cols (block (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier_auto_cache) identifier_auto_cache )attribute (call (attribute (identifier_self) identifier_self (identifier_cache_valid) identifier_cache_valid )attribute (argument_list (identifier_col) identifier_col )argument_list )call )boolean_operator (block (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier_cache_valid) identifier_cache_valid )attribute (argument_list (identifier_col) identifier_col )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_cache_factor) identifier_cache_factor )attribute (argument_list (list (identifier_col) identifier_col )list )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_col_rootdir) identifier_col_rootdir (attribute (subscript (identifier_self) identifier_self (identifier_col) identifier_col )subscript (identifier_rootdir) identifier_rootdir )attribute )assignment )expression_statement (expression_statement (assignment (identifier_col_factor_rootdir) identifier_col_factor_rootdir (binary_operator (identifier_col_rootdir) identifier_col_rootdir (string_'.factor') string_'.factor' )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_col_values_rootdir) identifier_col_values_rootdir (binary_operator (identifier_col_rootdir) identifier_col_rootdir (string_'.values') string_'.values' )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_col_carray_factor) identifier_col_carray_factor (line_continuation_\) line_continuation_\ (call (attribute (identifier_bcolz) identifier_bcolz (identifier_carray) identifier_carray )attribute (argument_list (keyword_argument (identifier_rootdir) identifier_rootdir (identifier_col_factor_rootdir) identifier_col_factor_rootdir )keyword_argument (keyword_argument (identifier_mode) identifier_mode (string_'r') string_'r' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_col_carray_values) identifier_col_carray_values (line_continuation_\) line_continuation_\ (call (attribute (identifier_bcolz) identifier_bcolz (identifier_carray) identifier_carray )attribute (argument_list (keyword_argument (identifier_rootdir) identifier_rootdir (identifier_col_values_rootdir) identifier_col_values_rootdir )keyword_argument (keyword_argument (identifier_mode) identifier_mode (string_'r') string_'r' )keyword_argument )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (pattern_list (identifier_col_carray_factor) identifier_col_carray_factor (identifier_values) identifier_values )pattern_list (call (attribute (identifier_ctable_ext) identifier_ctable_ext (identifier_factorize) identifier_factorize )attribute (argument_list (subscript (identifier_self) identifier_self (identifier_col) identifier_col )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_col_carray_values) identifier_col_carray_values (line_continuation_\) line_continuation_\ (call (attribute (identifier_bcolz) identifier_bcolz (identifier_carray) identifier_carray )attribute (argument_list (call (attribute (identifier_np) identifier_np (identifier_fromiter) identifier_fromiter )attribute (argument_list (call (attribute (identifier_values) identifier_values (identifier_values) identifier_values )attribute (argument_list )argument_list )call (keyword_argument (identifier_dtype) identifier_dtype (attribute (subscript (identifier_self) identifier_self (identifier_col) identifier_col )subscript (identifier_dtype) identifier_dtype )attribute )keyword_argument )argument_list )call )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_factor_list) identifier_factor_list (identifier_append) identifier_append )attribute (argument_list (identifier_col_carray_factor) identifier_col_carray_factor )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_values_list) identifier_values_list (identifier_append) identifier_append )attribute (argument_list (identifier_col_carray_values) identifier_col_carray_values )argument_list )call )expression_statement )block )for_statement (return_statement (expression_list (identifier_factor_list) identifier_factor_list (identifier_values_list) identifier_values_list )expression_list )return_statement )block )function_definition )module
factorizes all columns that are used in the groupby it will use cache carrays if available if not yet auto_cache is valid, it will create cache carrays
(module (function_definition (function_name_ls) function_name_ls (parameters (identifier_path) identifier_path (default_parameter (identifier_pattern) identifier_pattern (string_'*') string_'*' )default_parameter )parameters (block (expression_statement (assignment (identifier_path_iter) identifier_path_iter (call (identifier_glob) identifier_glob (argument_list (identifier_path) identifier_path (identifier_pattern) identifier_pattern (keyword_argument (identifier_recursive) identifier_recursive (False) False )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (identifier_sorted) identifier_sorted (argument_list (call (identifier_list) identifier_list (argument_list (identifier_path_iter) identifier_path_iter )argument_list )call )argument_list )call )return_statement )block )function_definition )module
like unix ls - lists all files and dirs in path
(module (function_definition (function_name__assert_has_data_for_time) function_name__assert_has_data_for_time (parameters (identifier_da) identifier_da (identifier_start_date) identifier_start_date (identifier_end_date) identifier_end_date )parameters (block (if_statement (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_start_date) identifier_start_date (identifier_str) identifier_str )argument_list )call (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_end_date) identifier_end_date (identifier_str) identifier_str )argument_list )call )boolean_operator (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_warning) identifier_warning )attribute (argument_list (concatenated_string (string_'When using strings to specify start and end dates, the check ') string_'When using strings to specify start and end dates, the check ' (string_'to determine if data exists for the full extent of the desired ') string_'to determine if data exists for the full extent of the desired ' (string_'interval is not implemented. Therefore it is possible that ') string_'interval is not implemented. Therefore it is possible that ' (string_'you are doing a calculation for a lesser interval than you ') string_'you are doing a calculation for a lesser interval than you ' (string_'specified. If you would like this check to occur, use explicit ') string_'specified. If you would like this check to occur, use explicit ' (string_'datetime-like objects for bounds instead.') string_'datetime-like objects for bounds instead.' )concatenated_string )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (if_statement (comparison_operator (identifier_RAW_START_DATE_STR) identifier_RAW_START_DATE_STR (attribute (identifier_da) identifier_da (identifier_coords) identifier_coords )attribute )comparison_operator (block (with_statement (with_clause (with_item (call (attribute (identifier_warnings) identifier_warnings (identifier_catch_warnings) identifier_catch_warnings )attribute (argument_list (keyword_argument (identifier_record) identifier_record (True) True )keyword_argument )argument_list )call )with_item )with_clause (block (expression_statement (assignment (identifier_da_start) identifier_da_start (attribute (subscript (identifier_da) identifier_da (identifier_RAW_START_DATE_STR) identifier_RAW_START_DATE_STR )subscript (identifier_values) identifier_values )attribute )assignment )expression_statement (expression_statement (assignment (identifier_da_end) identifier_da_end (attribute (subscript (identifier_da) identifier_da (identifier_RAW_END_DATE_STR) identifier_RAW_END_DATE_STR )subscript (identifier_values) identifier_values )attribute )assignment )expression_statement )block )with_statement )block (else_clause (block (expression_statement (assignment (identifier_times) identifier_times (call (attribute (attribute (identifier_da) identifier_da (identifier_time) identifier_time )attribute (identifier_isel) identifier_isel )attribute (argument_list (dictionary_splat (dictionary (pair (identifier_TIME_STR) identifier_TIME_STR (list (integer_0) integer_0 (unary_operator (integer_1) integer_1 )unary_operator )list )pair )dictionary )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_da_start) identifier_da_start (identifier_da_end) identifier_da_end )pattern_list (attribute (identifier_times) identifier_times (identifier_values) identifier_values )attribute )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_message) identifier_message (parenthesized_expression (concatenated_string (string_'Data does not exist for requested time range: {0} to {1};') string_'Data does not exist for requested time range: {0} to {1};' (string_' found data from time range: {2} to {3}.') string_' found data from time range: {2} to {3}.' )concatenated_string )parenthesized_expression )assignment )expression_statement (expression_statement (assignment (identifier_tol) identifier_tol (call (attribute (identifier_datetime) identifier_datetime (identifier_timedelta) identifier_timedelta )attribute (argument_list (keyword_argument (identifier_seconds) identifier_seconds (integer_1) integer_1 )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_da_start) identifier_da_start (attribute (identifier_np) identifier_np (identifier_datetime64) identifier_datetime64 )attribute )argument_list )call (block (expression_statement (assignment (identifier_tol) identifier_tol (call (attribute (identifier_np) identifier_np (identifier_timedelta64) identifier_timedelta64 )attribute (argument_list (identifier_tol) identifier_tol (string_'ns') string_'ns' )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_range_exists) identifier_range_exists (parenthesized_expression (boolean_operator (comparison_operator (parenthesized_expression (binary_operator (identifier_da_start) identifier_da_start (identifier_tol) identifier_tol )binary_operator )parenthesized_expression (identifier_start_date) identifier_start_date )comparison_operator (comparison_operator (parenthesized_expression (binary_operator (identifier_da_end) identifier_da_end (identifier_tol) identifier_tol )binary_operator )parenthesized_expression (identifier_end_date) identifier_end_date )comparison_operator )boolean_operator )parenthesized_expression )assignment )expression_statement (assert_statement (parenthesized_expression (identifier_range_exists) identifier_range_exists )parenthesized_expression (call (attribute (identifier_message) identifier_message (identifier_format) identifier_format )attribute (argument_list (identifier_start_date) identifier_start_date (identifier_end_date) identifier_end_date (identifier_da_start) identifier_da_start (identifier_da_end) identifier_da_end )argument_list )call )assert_statement )block )function_definition )module
Check to make sure data is in Dataset for the given time range. Parameters ---------- da : DataArray DataArray with a time variable start_date : datetime-like object or str start date end_date : datetime-like object or str end date Raises ------ AssertionError If the time range is not within the time range of the DataArray
(module (function_definition (function_name_write) function_name_write (parameters (identifier_self) identifier_self (identifier_output) identifier_output )parameters (block (expression_statement (assignment (identifier_w) identifier_w (call (identifier_c_int32) identifier_c_int32 (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_WriteAnalogF64) identifier_WriteAnalogF64 )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_bufsize) identifier_bufsize )attribute (integer_0) integer_0 (float_10.0) float_10.0 (identifier_DAQmx_Val_GroupByChannel) identifier_DAQmx_Val_GroupByChannel (identifier_output) identifier_output (identifier_w) identifier_w (None) None )argument_list )call )expression_statement )block )function_definition )module
Writes the data to be output to the device buffer, output will be looped when the data runs out :param output: data to output :type output: numpy.ndarray
(module (function_definition (function_name_long2ip) function_name_long2ip (parameters (identifier_l) identifier_l )parameters (block (if_statement (boolean_operator (comparison_operator (identifier_MAX_IP) identifier_MAX_IP (identifier_l) identifier_l )comparison_operator (comparison_operator (identifier_l) identifier_l (identifier_MIN_IP) identifier_MIN_IP )comparison_operator )boolean_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (binary_operator (string_"expected int between %d and %d inclusive") string_"expected int between %d and %d inclusive" (tuple (identifier_MIN_IP) identifier_MIN_IP (identifier_MAX_IP) identifier_MAX_IP )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement (return_statement (binary_operator (string_'%d.%d.%d.%d') string_'%d.%d.%d.%d' (tuple (binary_operator (binary_operator (identifier_l) identifier_l (integer_24) integer_24 )binary_operator (integer_255) integer_255 )binary_operator (binary_operator (binary_operator (identifier_l) identifier_l (integer_16) integer_16 )binary_operator (integer_255) integer_255 )binary_operator (binary_operator (binary_operator (identifier_l) identifier_l (integer_8) integer_8 )binary_operator (integer_255) integer_255 )binary_operator (binary_operator (identifier_l) identifier_l (integer_255) integer_255 )binary_operator )tuple )binary_operator )return_statement )block )function_definition )module
Convert a network byte order 32-bit integer to a dotted quad ip address. >>> long2ip(2130706433) '127.0.0.1' >>> long2ip(MIN_IP) '0.0.0.0' >>> long2ip(MAX_IP) '255.255.255.255' >>> long2ip(None) #doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... TypeError: unsupported operand type(s) for >>: 'NoneType' and 'int' >>> long2ip(-1) #doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... TypeError: expected int between 0 and 4294967295 inclusive >>> long2ip(374297346592387463875) #doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... TypeError: expected int between 0 and 4294967295 inclusive >>> long2ip(MAX_IP + 1) #doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... TypeError: expected int between 0 and 4294967295 inclusive :param l: Network byte order 32-bit integer. :type l: int :returns: Dotted-quad ip address (eg. '127.0.0.1'). :raises: TypeError
(module (function_definition (function_name_query) function_name_query (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 (not_operator (call (identifier_issubclass) identifier_issubclass (argument_list (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'itercls') string_'itercls' (None) None )argument_list )call (identifier_AsyncViewBase) identifier_AsyncViewBase )argument_list )call )not_operator (block (raise_statement (call (attribute (identifier_ArgumentError) identifier_ArgumentError (identifier_pyexc) identifier_pyexc )attribute (argument_list (concatenated_string (string_"itercls must be defined ") string_"itercls must be defined " (string_"and must be derived from AsyncViewBase") string_"and must be derived from AsyncViewBase" )concatenated_string )argument_list )call )raise_statement )block )if_statement (return_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_AsyncBucket) identifier_AsyncBucket (identifier_self) identifier_self )argument_list )call (identifier_query) identifier_query )attribute (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Reimplemented from base class. This method does not add additional functionality of the base class' :meth:`~couchbase.bucket.Bucket.query` method (all the functionality is encapsulated in the view class anyway). However it does require one additional keyword argument :param class itercls: A class used for instantiating the view object. This should be a subclass of :class:`~couchbase.asynchronous.view.AsyncViewBase`.
(module (function_definition (function_name_get_code) function_name_get_code (parameters (identifier_node) identifier_node (default_parameter (identifier_coder) identifier_coder (call (identifier_Coder) identifier_Coder (argument_list )argument_list )call )default_parameter )parameters (block (return_statement (call (attribute (identifier_cgi) identifier_cgi (identifier_escape) identifier_escape )attribute (argument_list (call (identifier_str) identifier_str (argument_list (call (attribute (identifier_coder) identifier_coder (identifier_code) identifier_code )attribute (argument_list (identifier_node) identifier_node )argument_list )call )argument_list )call (keyword_argument (identifier_quote) identifier_quote (True) True )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return a node's code
(module (function_definition (function_name_spin_z) function_name_spin_z (parameters (identifier_particles) identifier_particles (identifier_index) identifier_index )parameters (block (expression_statement (assignment (identifier_mat) identifier_mat (call (attribute (identifier_np) identifier_np (identifier_zeros) identifier_zeros )attribute (argument_list (tuple (binary_operator (integer_2) integer_2 (identifier_particles) identifier_particles )binary_operator (binary_operator (integer_2) integer_2 (identifier_particles) identifier_particles )binary_operator )tuple )argument_list )call )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (binary_operator (integer_2) integer_2 (identifier_particles) identifier_particles )binary_operator )argument_list )call (block (expression_statement (assignment (identifier_ispin) identifier_ispin (call (identifier_btest) identifier_btest (argument_list (identifier_i) identifier_i (identifier_index) identifier_index )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_ispin) identifier_ispin (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (subscript (identifier_mat) identifier_mat (identifier_i) identifier_i (identifier_i) identifier_i )subscript (integer_1) integer_1 )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_mat) identifier_mat (identifier_i) identifier_i (identifier_i) identifier_i )subscript (unary_operator (integer_1) integer_1 )unary_operator )assignment )expression_statement )block )else_clause )if_statement )block )for_statement (return_statement (binary_operator (binary_operator (integer_1) integer_1 (float_2.) float_2. )binary_operator (identifier_mat) identifier_mat )binary_operator )return_statement )block )function_definition )module
Generates the spin_z projection operator for a system of N=particles and for the selected spin index name. where index=0..N-1
(module (function_definition (function_name_auth_list) function_name_auth_list (parameters (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_ctx) identifier_ctx (call (identifier_Context) identifier_Context (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_ctx) identifier_ctx (identifier_execute_action) identifier_execute_action )attribute (argument_list (string_'auth:group:list') string_'auth:group:list' (dictionary_splat (dictionary (pair (string_'storage') string_'storage' (call (attribute (attribute (identifier_ctx) identifier_ctx (identifier_repo) identifier_repo )attribute (identifier_create_secure_service) identifier_create_secure_service )attribute (argument_list (string_'storage') string_'storage' )argument_list )call )pair )dictionary )dictionary_splat )argument_list )call )expression_statement )block )function_definition )module
Shows available authorization groups.
(module (function_definition (function_name_get) function_name_get (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_set_status) identifier_set_status )attribute (argument_list (integer_401) integer_401 )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_set_header) identifier_set_header )attribute (argument_list (string_'WWW-Authenticate') string_'WWW-Authenticate' (string_'Session') string_'Session' )argument_list )call )expression_statement (expression_statement (assignment (identifier_ret) identifier_ret (dictionary (pair (string_'status') string_'status' (string_'401 Unauthorized') string_'401 Unauthorized' )pair (pair (string_'return') string_'return' (string_'Please log in') string_'Please log in' )pair )dictionary )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_write) identifier_write )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_serialize) identifier_serialize )attribute (argument_list (identifier_ret) identifier_ret )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
All logins are done over post, this is a parked endpoint .. http:get:: /login :status 401: |401| :status 406: |406| **Example request:** .. code-block:: bash curl -i localhost:8000/login .. code-block:: text GET /login HTTP/1.1 Host: localhost:8000 Accept: application/json **Example response:** .. code-block:: text HTTP/1.1 401 Unauthorized Content-Type: application/json Content-Length: 58 {"status": "401 Unauthorized", "return": "Please log in"}
(module (function_definition (function_name_launch_shell) function_name_launch_shell (parameters (identifier_username) identifier_username (identifier_hostname) identifier_hostname (identifier_password) identifier_password (default_parameter (identifier_port) identifier_port (integer_22) integer_22 )default_parameter )parameters (block (if_statement (boolean_operator (boolean_operator (not_operator (identifier_username) identifier_username )not_operator (not_operator (identifier_hostname) identifier_hostname )not_operator )boolean_operator (not_operator (identifier_password) identifier_password )not_operator )boolean_operator (block (return_statement (False) False )return_statement )block )if_statement (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_tempfile) identifier_tempfile (identifier_NamedTemporaryFile) identifier_NamedTemporaryFile )attribute (argument_list )argument_list )call (as_pattern_target (identifier_tmpFile) identifier_tmpFile )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_system) identifier_system )attribute (argument_list (call (attribute (identifier_sshCmdLine) identifier_sshCmdLine (identifier_format) identifier_format )attribute (argument_list (identifier_password) identifier_password (attribute (identifier_tmpFile) identifier_tmpFile (identifier_name) identifier_name )attribute (identifier_username) identifier_username (identifier_hostname) identifier_hostname (identifier_port) identifier_port )argument_list )call )argument_list )call )expression_statement )block )with_statement (return_statement (True) True )return_statement )block )function_definition )module
Launches an ssh shell
(module (function_definition (function_name_get_data) function_name_get_data (parameters (identifier_self) identifier_self (identifier_datatype) identifier_datatype (identifier_data) identifier_data )parameters (block (expression_statement (assignment (identifier_result) identifier_result (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_params) identifier_params (call (attribute (identifier_StopforumspamClient) identifier_StopforumspamClient (identifier__set_payload) identifier__set_payload )attribute (argument_list (identifier_datatype) identifier_datatype (identifier_data) identifier_data )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_get) identifier_get )attribute (argument_list (string_'https://api.stopforumspam.org/api') string_'https://api.stopforumspam.org/api' (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument (keyword_argument (identifier_proxies) identifier_proxies (attribute (identifier_self) identifier_self (identifier_proxies) identifier_proxies )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_response) identifier_response (identifier_raise_for_status) identifier_raise_for_status )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_report) identifier_report (call (attribute (identifier_response) identifier_response (identifier_json) identifier_json )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (subscript (identifier_report) identifier_report (string_'success') string_'success' )subscript (block (expression_statement (assignment (identifier_data) identifier_data (subscript (identifier_report) identifier_report (subscript (attribute (identifier_StopforumspamClient) identifier_StopforumspamClient (identifier__type_conversion) identifier__type_conversion )attribute (identifier_datatype) identifier_datatype )subscript )subscript )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_self) identifier_self (identifier__data_conversion) identifier__data_conversion )attribute (argument_list (identifier_data) identifier_data )argument_list )call )assignment )expression_statement )block (else_clause (block (pass_statement )pass_statement )block )else_clause )if_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Look for an IP address or an email address in the spammer database. :param datatype: Which type of data is to be looked up. Allowed values are 'ip' or 'mail'. :param data: The value to be looked up through the API. :type datatype: str :type data: str :return: Data relative to the looked up artifact. :rtype: dict
(module (function_definition (function_name_delete) function_name_delete (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_r) identifier_r (call (attribute (attribute (identifier_self) identifier_self (identifier__client) identifier__client )attribute (identifier__request) identifier__request )attribute (argument_list (string_'DELETE') string_'DELETE' (call (attribute (attribute (identifier_self) identifier_self (identifier__client) identifier__client )attribute (identifier__build_url) identifier__build_url )attribute (argument_list (string_'property') string_'property' (keyword_argument (identifier_property_id) identifier_property_id (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute )keyword_argument )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_r) identifier_r (identifier_status_code) identifier_status_code )attribute (attribute (attribute (identifier_requests) identifier_requests (identifier_codes) identifier_codes )attribute (identifier_no_content) identifier_no_content )attribute )comparison_operator (block (raise_statement (call (identifier_APIError) identifier_APIError (argument_list (call (attribute (string_"Could not delete property: {} with id {}") string_"Could not delete property: {} with id {}" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute )argument_list )call )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Delete this property. :return: None :raises APIError: if delete was not successful
(module (function_definition (function_name_get_version) function_name_get_version (parameters (identifier_self) identifier_self (identifier_dependency) identifier_dependency )parameters (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"getting installed version for %s") string_"getting installed version for %s" (identifier_dependency) identifier_dependency )argument_list )call )expression_statement (expression_statement (assignment (identifier_stdout) identifier_stdout (call (attribute (identifier_helpers) identifier_helpers (identifier_logged_exec) identifier_logged_exec )attribute (argument_list (list (attribute (identifier_self) identifier_self (identifier_pip_exe) identifier_pip_exe )attribute (string_"show") string_"show" (call (identifier_str) identifier_str (argument_list (identifier_dependency) identifier_dependency )argument_list )call )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_version) identifier_version (list_comprehension (identifier_line) identifier_line (for_in_clause (identifier_line) identifier_line (identifier_stdout) identifier_stdout )for_in_clause (if_clause (call (attribute (identifier_line) identifier_line (identifier_startswith) identifier_startswith )attribute (argument_list (string_'Version:') string_'Version:' )argument_list )call )if_clause )list_comprehension )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_version) identifier_version )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_version) identifier_version (subscript (call (attribute (call (attribute (subscript (identifier_version) identifier_version (integer_0) integer_0 )subscript (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call (identifier_split) identifier_split )attribute (argument_list )argument_list )call (integer_1) integer_1 )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"Installed version of %s is: %s") string_"Installed version of %s is: %s" (identifier_dependency) identifier_dependency (identifier_version) identifier_version )argument_list )call )expression_statement (return_statement (identifier_version) identifier_version )return_statement )block (else_clause (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (concatenated_string (string_'Fades is having problems getting the installed version. ') string_'Fades is having problems getting the installed version. ' (string_'Run with -v or check the logs for details') string_'Run with -v or check the logs for details' )concatenated_string )argument_list )call )expression_statement (return_statement (string_'') string_'' )return_statement )block )else_clause )if_statement )block )function_definition )module
Return the installed version parsing the output of 'pip show'.
(module (function_definition (function_name_format_to_json) function_name_format_to_json (parameters (identifier_data) identifier_data )parameters (block (if_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute (identifier_isatty) identifier_isatty )attribute (argument_list )argument_list )call (block (return_statement (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_data) identifier_data (keyword_argument (identifier_indent) identifier_indent (integer_4) integer_4 )keyword_argument (keyword_argument (identifier_separators) identifier_separators (tuple (string_',') string_',' (string_': ') string_': ' )tuple )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 (identifier_data) identifier_data )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Converts `data` into json If stdout is a tty it performs a pretty print.
(module (function_definition (function_name__format_options_usage) function_name__format_options_usage (parameters (identifier_options) identifier_options )parameters (block (expression_statement (assignment (identifier_options_usage) identifier_options_usage (string_"") string_"" )assignment )expression_statement (for_statement (identifier_op) identifier_op (identifier_options) identifier_options (block (expression_statement (assignment (pattern_list (identifier_short) identifier_short (identifier_long) identifier_long )pattern_list (call (attribute (identifier_op) identifier_op (identifier_get_flags) identifier_get_flags )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (attribute (identifier_op) identifier_op (identifier_arg) identifier_arg )attribute (block (expression_statement (assignment (identifier_flag) identifier_flag (call (attribute (string_"{short} {arg} {long}={arg}") string_"{short} {arg} {long}={arg}" (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_short) identifier_short (identifier_short) identifier_short )keyword_argument (keyword_argument (identifier_long) identifier_long (identifier_long) identifier_long )keyword_argument (keyword_argument (identifier_arg) identifier_arg (attribute (identifier_op) identifier_op (identifier_arg) identifier_arg )attribute )keyword_argument )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_flag) identifier_flag (call (attribute (string_"{short} {long}") string_"{short} {long}" (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_short) identifier_short (identifier_short) identifier_short )keyword_argument (keyword_argument (identifier_long) identifier_long (identifier_long) identifier_long )keyword_argument )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_wrapped_description) identifier_wrapped_description (call (attribute (identifier_textwrap) identifier_textwrap (identifier_wrap) identifier_wrap )attribute (argument_list (call (attribute (identifier_inspect) identifier_inspect (identifier_cleandoc) identifier_cleandoc )attribute (argument_list (attribute (identifier_op) identifier_op (identifier___doc__) identifier___doc__ )attribute )argument_list )call (keyword_argument (identifier_width) identifier_width (integer_79) integer_79 )keyword_argument (keyword_argument (identifier_initial_indent) identifier_initial_indent (binary_operator (string_' ') string_' ' (integer_32) integer_32 )binary_operator )keyword_argument (keyword_argument (identifier_subsequent_indent) identifier_subsequent_indent (binary_operator (string_' ') string_' ' (integer_32) integer_32 )binary_operator )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_wrapped_description) identifier_wrapped_description (call (attribute (call (attribute (string_"\n") string_"\n" (identifier_join) identifier_join )attribute (argument_list (identifier_wrapped_description) identifier_wrapped_description )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_options_usage) identifier_options_usage (call (attribute (string_" {0:28} {1}\n") string_" {0:28} {1}\n" (identifier_format) identifier_format )attribute (argument_list (identifier_flag) identifier_flag (identifier_wrapped_description) identifier_wrapped_description )argument_list )call )augmented_assignment )expression_statement )block )for_statement (return_statement (identifier_options_usage) identifier_options_usage )return_statement )block )function_definition )module
Format the Options-part of the usage text. Parameters ---------- options : list[sacred.commandline_options.CommandLineOption] A list of all supported commandline options. Returns ------- str Text formatted as a description for the commandline options
(module (function_definition (function_name_unique_prefixes) function_name_unique_prefixes (parameters (identifier_context) identifier_context )parameters (block (expression_statement (assignment (identifier_res) identifier_res (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_m) identifier_m (call (attribute (attribute (identifier_context) identifier_context (identifier_modules) identifier_modules )attribute (identifier_values) identifier_values )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (attribute (identifier_m) identifier_m (identifier_keyword) identifier_keyword )attribute (string_"submodule") string_"submodule" )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_prf) identifier_prf (assignment (identifier_new) identifier_new (attribute (identifier_m) identifier_m (identifier_i_prefix) identifier_i_prefix )attribute )assignment )assignment )expression_statement (expression_statement (assignment (identifier_suff) identifier_suff (integer_0) integer_0 )assignment )expression_statement (while_statement (comparison_operator (identifier_new) identifier_new (call (attribute (identifier_res) identifier_res (identifier_values) identifier_values )attribute (argument_list )argument_list )call )comparison_operator (block (expression_statement (augmented_assignment (identifier_suff) identifier_suff (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (assignment (identifier_new) identifier_new (binary_operator (string_"%s%x") string_"%s%x" (tuple (identifier_prf) identifier_prf (identifier_suff) identifier_suff )tuple )binary_operator )assignment )expression_statement )block )while_statement (expression_statement (assignment (subscript (identifier_res) identifier_res (identifier_m) identifier_m )subscript (identifier_new) identifier_new )assignment )expression_statement )block )for_statement (return_statement (identifier_res) identifier_res )return_statement )block )function_definition )module
Return a dictionary with unique prefixes for modules in `context`. Keys are 'module' statements and values are prefixes, disambiguated where necessary.
(module (function_definition (function_name_prepare_image_data) function_name_prepare_image_data (parameters (identifier_extracted_image_data) identifier_extracted_image_data (identifier_output_directory) identifier_output_directory (identifier_image_mapping) identifier_image_mapping )parameters (block (expression_statement (assignment (identifier_img_list) identifier_img_list (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_image) identifier_image (identifier_caption) identifier_caption (identifier_label) identifier_label )pattern_list (identifier_extracted_image_data) identifier_extracted_image_data (block (if_statement (boolean_operator (not_operator (identifier_image) identifier_image )not_operator (comparison_operator (identifier_image) identifier_image (string_'ERROR') string_'ERROR' )comparison_operator )boolean_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_image_location) identifier_image_location (call (identifier_get_image_location) identifier_get_image_location (argument_list (identifier_image) identifier_image (identifier_output_directory) identifier_output_directory (call (attribute (identifier_image_mapping) identifier_image_mapping (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (boolean_operator (not_operator (identifier_image_location) identifier_image_location )not_operator (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_image_location) identifier_image_location )argument_list )call )not_operator )boolean_operator (line_continuation_\) line_continuation_\ (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_image_location) identifier_image_location )argument_list )call (integer_3) integer_3 )comparison_operator )boolean_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_image_location) identifier_image_location (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_normpath) identifier_normpath )attribute (argument_list (identifier_image_location) identifier_image_location )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_image_location) identifier_image_location (identifier_img_list) identifier_img_list )comparison_operator (block (if_statement (comparison_operator (identifier_caption) identifier_caption (subscript (subscript (identifier_img_list) identifier_img_list (identifier_image_location) identifier_image_location )subscript (string_'captions') string_'captions' )subscript )comparison_operator (block (expression_statement (call (attribute (subscript (subscript (identifier_img_list) identifier_img_list (identifier_image_location) identifier_image_location )subscript (string_'captions') string_'captions' )subscript (identifier_append) identifier_append )attribute (argument_list (identifier_caption) identifier_caption )argument_list )call )expression_statement )block )if_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_img_list) identifier_img_list (identifier_image_location) identifier_image_location )subscript (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_url) identifier_url (identifier_image_location) identifier_image_location )keyword_argument (keyword_argument (identifier_original_url) identifier_original_url (subscript (identifier_image_mapping) identifier_image_mapping (identifier_image_location) identifier_image_location )subscript )keyword_argument (keyword_argument (identifier_captions) identifier_captions (list (identifier_caption) identifier_caption )list )keyword_argument (keyword_argument (identifier_label) identifier_label (identifier_label) identifier_label )keyword_argument (keyword_argument (identifier_name) identifier_name (call (identifier_get_name_from_path) identifier_get_name_from_path (argument_list (identifier_image_location) identifier_image_location (identifier_output_directory) identifier_output_directory )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block )for_statement (return_statement (call (attribute (identifier_img_list) identifier_img_list (identifier_values) identifier_values )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Prepare and clean image-data from duplicates and other garbage. :param: extracted_image_data ([(string, string, list, list) ...], ...])): the images and their captions + contexts, ordered :param: tex_file (string): the location of the TeX (used for finding the associated images; the TeX is assumed to be in the same directory as the converted images) :param: image_list ([string, string, ...]): a list of the converted image file names :return extracted_image_data ([(string, string, list, list) ...], ...])) again the list of image data cleaned for output
(module (function_definition (function_name__total_counts) function_name__total_counts (parameters (identifier_seqs) identifier_seqs (identifier_seqL) identifier_seqL (default_parameter (identifier_aligned) identifier_aligned (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_total) identifier_total (call (identifier_Counter) identifier_Counter (argument_list )argument_list )call )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_seqs) identifier_seqs (identifier_list) identifier_list )argument_list )call (block (if_statement (not_operator (identifier_aligned) identifier_aligned )not_operator (block (expression_statement (assignment (identifier_l) identifier_l (call (identifier_len) identifier_len (argument_list (list_comprehension (call (attribute (identifier_total) identifier_total (identifier_update) identifier_update )attribute (argument_list (attribute (subscript (identifier_seqL) identifier_seqL (identifier_s) identifier_s )subscript (identifier_freq) identifier_freq )attribute )argument_list )call (for_in_clause (identifier_s) identifier_s (identifier_seqs) identifier_seqs )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_l) identifier_l (call (identifier_len) identifier_len (argument_list (list_comprehension (call (attribute (identifier_total) identifier_total (identifier_update) identifier_update )attribute (argument_list (attribute (subscript (identifier_seqL) identifier_seqL (identifier_s) identifier_s )subscript (identifier_freq) identifier_freq )attribute )argument_list )call (for_in_clause (identifier_s) identifier_s (identifier_seqs) identifier_seqs )for_in_clause (if_clause (comparison_operator (attribute (subscript (identifier_seqL) identifier_seqL (identifier_s) identifier_s )subscript (identifier_align) identifier_align )attribute (integer_0) integer_0 )comparison_operator )if_clause )list_comprehension )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_seqs) identifier_seqs (identifier_dict) identifier_dict )argument_list )call (block (expression_statement (list_comprehension (call (attribute (identifier_total) identifier_total (identifier_update) identifier_update )attribute (argument_list (call (attribute (subscript (identifier_seqs) identifier_seqs (identifier_s) identifier_s )subscript (identifier_get_freq) identifier_get_freq )attribute (argument_list (identifier_seqL) identifier_seqL )argument_list )call )argument_list )call (for_in_clause (identifier_s) identifier_s (identifier_seqs) identifier_seqs )for_in_clause )list_comprehension )expression_statement (expression_statement (assignment (identifier_l) identifier_l (call (identifier_sum) identifier_sum (generator_expression (call (identifier_len) identifier_len (argument_list (attribute (subscript (identifier_seqs) identifier_seqs (identifier_s) identifier_s )subscript (identifier_idmembers) identifier_idmembers )attribute )argument_list )call (for_in_clause (identifier_s) identifier_s (identifier_seqs) identifier_seqs )for_in_clause )generator_expression )call )assignment )expression_statement )block )elif_clause )if_statement (return_statement (expression_list (identifier_total) identifier_total (identifier_l) identifier_l )expression_list )return_statement )block )function_definition )module
Counts total seqs after each step
(module (function_definition (function_name__next_sample_index) function_name__next_sample_index (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_idx) identifier_idx (attribute (identifier_self) identifier_self (identifier_active_index_) identifier_active_index_ )attribute )assignment )expression_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_active_index_) identifier_active_index_ )attribute (integer_1) integer_1 )augmented_assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_active_index_) identifier_active_index_ )attribute (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_streams_) identifier_streams_ )attribute )argument_list )call )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_active_index_) identifier_active_index_ )attribute (integer_0) integer_0 )assignment )expression_statement )block )if_statement (while_statement (comparison_operator (subscript (attribute (identifier_self) identifier_self (identifier_streams_) identifier_streams_ )attribute (identifier_idx) identifier_idx )subscript (None) None )comparison_operator (block (expression_statement (assignment (identifier_idx) identifier_idx (attribute (identifier_self) identifier_self (identifier_active_index_) identifier_active_index_ )attribute )assignment )expression_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_active_index_) identifier_active_index_ )attribute (integer_1) integer_1 )augmented_assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_active_index_) identifier_active_index_ )attribute (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_streams_) identifier_streams_ )attribute )argument_list )call )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_active_index_) identifier_active_index_ )attribute (integer_0) integer_0 )assignment )expression_statement )block )if_statement )block )while_statement (return_statement (identifier_idx) identifier_idx )return_statement )block )function_definition )module
Rotates through each active sampler by incrementing the index
(module (function_definition (function_name_array) function_name_array (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__ind) identifier__ind )attribute (attribute (identifier_self) identifier_self (identifier_shape) identifier_shape )attribute )comparison_operator (block (return_statement (subscript (attribute (identifier_self) identifier_self (identifier__values) identifier__values )attribute (slice (colon) colon (attribute (identifier_self) identifier_self (identifier__ind) identifier__ind )attribute )slice )subscript )return_statement )block )if_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier__cached) identifier__cached )attribute )not_operator (block (expression_statement (assignment (identifier_ind) identifier_ind (call (identifier_int) identifier_int (argument_list (binary_operator (attribute (identifier_self) identifier_self (identifier__ind) identifier__ind )attribute (attribute (identifier_self) identifier_self (identifier_shape) identifier_shape )attribute )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__cache) identifier__cache )attribute (slice (colon) colon (binary_operator (attribute (identifier_self) identifier_self (identifier_shape) identifier_shape )attribute (identifier_ind) identifier_ind )binary_operator )slice )subscript (subscript (attribute (identifier_self) identifier_self (identifier__values) identifier__values )attribute (slice (identifier_ind) identifier_ind (colon) colon )slice )subscript )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__cache) identifier__cache )attribute (slice (binary_operator (attribute (identifier_self) identifier_self (identifier_shape) identifier_shape )attribute (identifier_ind) identifier_ind )binary_operator (colon) colon )slice )subscript (subscript (attribute (identifier_self) identifier_self (identifier__values) identifier__values )attribute (slice (colon) colon (identifier_ind) identifier_ind )slice )subscript )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__cached) identifier__cached )attribute (True) True )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier__cache) identifier__cache )attribute )return_statement )block )function_definition )module
Returns a numpy array containing the last stored values.
(module (function_definition (function_name_socket) function_name_socket (parameters (identifier_self) identifier_self (default_parameter (identifier_blocking) identifier_blocking (True) True )default_parameter )parameters (block (if_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__socket_lock) identifier__socket_lock )attribute (identifier_acquire) identifier_acquire )attribute (argument_list (identifier_blocking) identifier_blocking )argument_list )call (block (try_statement (block (expression_statement (yield (attribute (identifier_self) identifier_self (identifier__socket) identifier__socket )attribute )yield )expression_statement )block (finally_clause (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__socket_lock) identifier__socket_lock )attribute (identifier_release) identifier_release )attribute (argument_list )argument_list )call )expression_statement )block )finally_clause )try_statement )block )if_statement )block )function_definition )module
Blockingly yield the socket
(module (function_definition (function_name_run) function_name_run (parameters (identifier_self) identifier_self (default_parameter (identifier_format) identifier_format (None) None )default_parameter (default_parameter (identifier_reduce) identifier_reduce (False) False )default_parameter (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_plan) identifier_plan (call (attribute (identifier_self) identifier_self (identifier__generate_plan) identifier__generate_plan )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (identifier_reduce) identifier_reduce (block (expression_statement (call (attribute (attribute (identifier_plan) identifier_plan (identifier_graph) identifier_graph )attribute (identifier_transitive_reduction) identifier_transitive_reduction )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_fn) identifier_fn (subscript (identifier_FORMATTERS) identifier_FORMATTERS (identifier_format) identifier_format )subscript )assignment )expression_statement (expression_statement (call (identifier_fn) identifier_fn (argument_list (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute (attribute (identifier_plan) identifier_plan (identifier_graph) identifier_graph )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute (identifier_flush) identifier_flush )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Generates the underlying graph and prints it.
(module (function_definition (function_name___telnet_event_listener) function_name___telnet_event_listener (parameters (identifier_self) identifier_self (identifier_ip) identifier_ip (identifier_callback) identifier_callback )parameters (block (expression_statement (assignment (identifier_tn) identifier_tn (call (attribute (identifier_telnetlib) identifier_telnetlib (identifier_Telnet) identifier_Telnet )attribute (argument_list (identifier_ip) identifier_ip (integer_2708) integer_2708 )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__last_event) identifier__last_event )attribute (string_"") string_"" )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__telnet_running) identifier__telnet_running )attribute (True) True )assignment )expression_statement (while_statement (attribute (identifier_self) identifier_self (identifier__telnet_running) identifier__telnet_running )attribute (block (try_statement (block (expression_statement (assignment (identifier_raw_string) identifier_raw_string (call (attribute (identifier_tn) identifier_tn (identifier_read_until) identifier_read_until )attribute (argument_list (string_b'.\n') string_b'.\n' (integer_5) integer_5 )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_raw_string) identifier_raw_string )argument_list )call (integer_2) integer_2 )comparison_operator (comparison_operator (subscript (identifier_raw_string) identifier_raw_string (slice (unary_operator (integer_2) integer_2 )unary_operator (colon) colon )slice )subscript (string_b'.\n') string_b'.\n' )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_json_string) identifier_json_string (subscript (call (attribute (identifier_raw_string) identifier_raw_string (identifier_decode) identifier_decode )attribute (argument_list (string_'ascii') string_'ascii' )argument_list )call (slice (integer_0) integer_0 (colon) colon (unary_operator (integer_2) integer_2 )unary_operator )slice )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_json_string) identifier_json_string (attribute (identifier_self) identifier_self (identifier__last_event) identifier__last_event )attribute )comparison_operator (block (expression_statement (call (identifier_callback) identifier_callback (argument_list (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (identifier_json_string) identifier_json_string )argument_list )call )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__last_event) identifier__last_event )attribute (identifier_json_string) identifier_json_string )assignment )expression_statement )block )if_statement )block (except_clause (block (pass_statement )pass_statement )block )except_clause )try_statement )block )while_statement (expression_statement (call (attribute (identifier_tn) identifier_tn (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
creates a telnet connection to the lightpad
(module (function_definition (function_name_mkdir) function_name_mkdir (parameters (identifier_dir) identifier_dir (identifier_enter) identifier_enter )parameters (block (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_dir) identifier_dir )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_makedirs) identifier_makedirs )attribute (argument_list (identifier_dir) identifier_dir )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Create directory with template for topic of the current environment
(module (function_definition (function_name_alg2keytype) function_name_alg2keytype (parameters (identifier_alg) identifier_alg )parameters (block (if_statement (boolean_operator (not_operator (identifier_alg) identifier_alg )not_operator (comparison_operator (call (attribute (identifier_alg) identifier_alg (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (string_"none") string_"none" )comparison_operator )boolean_operator (block (return_statement (string_"none") string_"none" )return_statement )block (elif_clause (boolean_operator (call (attribute (identifier_alg) identifier_alg (identifier_startswith) identifier_startswith )attribute (argument_list (string_"RS") string_"RS" )argument_list )call (call (attribute (identifier_alg) identifier_alg (identifier_startswith) identifier_startswith )attribute (argument_list (string_"PS") string_"PS" )argument_list )call )boolean_operator (block (return_statement (string_"RSA") string_"RSA" )return_statement )block )elif_clause (elif_clause (boolean_operator (call (attribute (identifier_alg) identifier_alg (identifier_startswith) identifier_startswith )attribute (argument_list (string_"HS") string_"HS" )argument_list )call (call (attribute (identifier_alg) identifier_alg (identifier_startswith) identifier_startswith )attribute (argument_list (string_"A") string_"A" )argument_list )call )boolean_operator (block (return_statement (string_"oct") string_"oct" )return_statement )block )elif_clause (elif_clause (boolean_operator (call (attribute (identifier_alg) identifier_alg (identifier_startswith) identifier_startswith )attribute (argument_list (string_"ES") string_"ES" )argument_list )call (call (attribute (identifier_alg) identifier_alg (identifier_startswith) identifier_startswith )attribute (argument_list (string_"ECDH-ES") string_"ECDH-ES" )argument_list )call )boolean_operator (block (return_statement (string_"EC") string_"EC" )return_statement )block )elif_clause (else_clause (block (return_statement (None) None )return_statement )block )else_clause )if_statement )block )function_definition )module
Go from algorithm name to key type. :param alg: The algorithm name :return: The key type
(module (function_definition (function_name_get) function_name_get (parameters (identifier_self) identifier_self )parameters (block (if_statement (boolean_operator (call (attribute (attribute (identifier_self) identifier_self (identifier_arch) identifier_arch )attribute (identifier_startswith) identifier_startswith )attribute (argument_list (string_"i") string_"i" )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier_arch) identifier_arch )attribute (identifier_endswith) identifier_endswith )attribute (argument_list (string_"86") string_"86" )argument_list )call )boolean_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_arch) identifier_arch )attribute (attribute (identifier_self) identifier_self (identifier_x86) identifier_x86 )attribute )assignment )expression_statement )block (elif_clause (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_meta) identifier_meta )attribute (identifier_arch) identifier_arch )attribute (identifier_startswith) identifier_startswith )attribute (argument_list (string_"arm") string_"arm" )argument_list )call (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_arch) identifier_arch )attribute (attribute (identifier_self) identifier_self (identifier_arm) identifier_arm )attribute )assignment )expression_statement )block )elif_clause )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier_arch) identifier_arch )attribute )return_statement )block )function_definition )module
Return sbo arch
(module (function_definition (function_name_source_sum) function_name_source_sum (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier__is_completely_masked) identifier__is_completely_masked )attribute (block (return_statement (binary_operator (attribute (identifier_np) identifier_np (identifier_nan) identifier_nan )attribute (attribute (identifier_self) identifier_self (identifier__data_unit) identifier__data_unit )attribute )binary_operator )return_statement )block (else_clause (block (return_statement (call (attribute (identifier_np) identifier_np (identifier_sum) identifier_sum )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_values) identifier_values )attribute )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
The sum of the unmasked ``data`` values within the source segment. .. math:: F = \\sum_{i \\in S} (I_i - B_i) where :math:`F` is ``source_sum``, :math:`(I_i - B_i)` is the ``data``, and :math:`S` are the unmasked pixels in the source segment. Non-finite pixel values (e.g. NaN, infs) are excluded (automatically masked).
(module (function_definition (function_name_compose) function_name_compose (parameters (list_splat_pattern (identifier_funcs) identifier_funcs )list_splat_pattern )parameters (block (function_definition (function_name_compose_two) function_name_compose_two (parameters (identifier_f1) identifier_f1 (identifier_f2) identifier_f2 )parameters (block (return_statement (lambda (lambda_parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )lambda_parameters (call (identifier_f1) identifier_f1 (argument_list (call (identifier_f2) identifier_f2 (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )argument_list )call )lambda )return_statement )block )function_definition (return_statement (call (attribute (identifier_functools) identifier_functools (identifier_reduce) identifier_reduce )attribute (argument_list (identifier_compose_two) identifier_compose_two (identifier_funcs) identifier_funcs )argument_list )call )return_statement )block )function_definition )module
Compose any number of unary functions into a single unary function. >>> import textwrap >>> from six import text_type >>> stripped = text_type.strip(textwrap.dedent(compose.__doc__)) >>> compose(text_type.strip, textwrap.dedent)(compose.__doc__) == stripped True Compose also allows the innermost function to take arbitrary arguments. >>> round_three = lambda x: round(x, ndigits=3) >>> f = compose(round_three, int.__truediv__) >>> [f(3*x, x+1) for x in range(1,10)] [1.5, 2.0, 2.25, 2.4, 2.5, 2.571, 2.625, 2.667, 2.7]
(module (function_definition (function_name_get_crimes_area) function_name_get_crimes_area (parameters (identifier_self) identifier_self (identifier_points) identifier_points (default_parameter (identifier_date) identifier_date (None) None )default_parameter (default_parameter (identifier_category) identifier_category (None) None )default_parameter )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_category) identifier_category (identifier_CrimeCategory) identifier_CrimeCategory )argument_list )call (block (expression_statement (assignment (identifier_category) identifier_category (attribute (identifier_category) identifier_category (identifier_id) identifier_id )attribute )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_method) identifier_method (binary_operator (string_'crimes-street/%s') string_'crimes-street/%s' (parenthesized_expression (boolean_operator (identifier_category) identifier_category (string_'all-crime') string_'all-crime' )boolean_operator )parenthesized_expression )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_kwargs) identifier_kwargs (dictionary (pair (string_'poly') string_'poly' (call (identifier_encode_polygon) identifier_encode_polygon (argument_list (identifier_points) identifier_points )argument_list )call )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_crimes) identifier_crimes (list )list )assignment )expression_statement (if_statement (comparison_operator (identifier_date) identifier_date (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_kwargs) identifier_kwargs (string_'date') string_'date' )subscript (identifier_date) identifier_date )assignment )expression_statement )block )if_statement (for_statement (identifier_c) identifier_c (call (attribute (attribute (identifier_self) identifier_self (identifier_service) identifier_service )attribute (identifier_request) identifier_request )attribute (argument_list (string_'POST') string_'POST' (identifier_method) identifier_method (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call (block (expression_statement (call (attribute (identifier_crimes) identifier_crimes (identifier_append) identifier_append )attribute (argument_list (call (identifier_Crime) identifier_Crime (argument_list (identifier_self) identifier_self (keyword_argument (identifier_data) identifier_data (identifier_c) identifier_c )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_crimes) identifier_crimes )return_statement )block )function_definition )module
Get crimes within a custom area. Uses the crime-street_ API call. .. _crime-street: https//data.police.uk/docs/method/crime-street/ :rtype: list :param list points: A ``list`` of ``(lat, lng)`` tuples. :param date: The month in which the crimes were reported in the format ``YYYY-MM`` (the latest date is used if ``None``). :type date: str or None :param category: The category of the crimes to filter by (either by ID or CrimeCategory object) :type category: str or CrimeCategory :return: A ``list`` of crimes which were reported within the specified boundary, in the given month (optionally filtered by category).
(module (function_definition (function_name__table_set_column) function_name__table_set_column (parameters (identifier_table) identifier_table (identifier_name) identifier_name (identifier_expr) identifier_expr )parameters (block (expression_statement (assignment (identifier_expr) identifier_expr (call (attribute (identifier_table) identifier_table (identifier__ensure_expr) identifier__ensure_expr )attribute (argument_list (identifier_expr) identifier_expr )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_expr) identifier_expr (identifier__name) identifier__name )attribute (identifier_name) identifier_name )comparison_operator (block (expression_statement (assignment (identifier_expr) identifier_expr (call (attribute (identifier_expr) identifier_expr (identifier_name) identifier_name )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_name) identifier_name (identifier_table) identifier_table )comparison_operator (block (raise_statement (call (identifier_KeyError) identifier_KeyError (argument_list (call (attribute (string_'{0} is not in the table') string_'{0} is not in the table' (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_proj_exprs) identifier_proj_exprs (list )list )assignment )expression_statement (for_statement (identifier_key) identifier_key (attribute (identifier_table) identifier_table (identifier_columns) identifier_columns )attribute (block (if_statement (comparison_operator (identifier_key) identifier_key (identifier_name) identifier_name )comparison_operator (block (expression_statement (call (attribute (identifier_proj_exprs) identifier_proj_exprs (identifier_append) identifier_append )attribute (argument_list (identifier_expr) identifier_expr )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_proj_exprs) identifier_proj_exprs (identifier_append) identifier_append )attribute (argument_list (subscript (identifier_table) identifier_table (identifier_key) identifier_key )subscript )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (return_statement (call (attribute (identifier_table) identifier_table (identifier_projection) identifier_projection )attribute (argument_list (identifier_proj_exprs) identifier_proj_exprs )argument_list )call )return_statement )block )function_definition )module
Replace an existing column with a new expression Parameters ---------- name : string Column name to replace expr : value expression New data for column Returns ------- set_table : TableExpr New table expression
(module (function_definition (function_name_set_location) function_name_set_location (parameters (identifier_self) identifier_self (identifier_uri) identifier_uri (identifier_size) identifier_size (identifier_checksum) identifier_checksum (default_parameter (identifier_storage_class) identifier_storage_class (None) None )default_parameter )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_file) identifier_file )attribute (call (identifier_FileInstance) identifier_FileInstance (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_file) identifier_file )attribute (identifier_set_uri) identifier_set_uri )attribute (argument_list (identifier_uri) identifier_uri (identifier_size) identifier_size (identifier_checksum) identifier_checksum (keyword_argument (identifier_storage_class) identifier_storage_class (identifier_storage_class) identifier_storage_class )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_db) identifier_db (identifier_session) identifier_session )attribute (identifier_add) identifier_add )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_file) identifier_file )attribute )argument_list )call )expression_statement (return_statement (identifier_self) identifier_self )return_statement )block )function_definition )module
Set only URI location of for object. Useful to link files on externally controlled storage. If a file instance has already been set, this methods raises an ``FileInstanceAlreadySetError`` exception. :param uri: Full URI to object (which can be interpreted by the storage interface). :param size: Size of file. :param checksum: Checksum of file. :param storage_class: Storage class where file is stored ()
(module (function_definition (function_name_get_smart_storage_config) function_name_get_smart_storage_config (parameters (identifier_self) identifier_self (identifier_smart_storage_config_url) identifier_smart_storage_config_url )parameters (block (return_statement (parenthesized_expression (call (attribute (identifier_smart_storage_config) identifier_smart_storage_config (identifier_HPESmartStorageConfig) identifier_HPESmartStorageConfig )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__conn) identifier__conn )attribute (identifier_smart_storage_config_url) identifier_smart_storage_config_url (keyword_argument (identifier_redfish_version) identifier_redfish_version (attribute (identifier_self) identifier_self (identifier_redfish_version) identifier_redfish_version )attribute )keyword_argument )argument_list )call )parenthesized_expression )return_statement )block )function_definition )module
Returns a SmartStorageConfig Instance for each controller.
(module (function_definition (function_name_get_file) function_name_get_file (parameters (identifier_fn) identifier_fn )parameters (block (expression_statement (assignment (identifier_fn) identifier_fn (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (identifier___file__) identifier___file__ )argument_list )call (string_'data') string_'data' (identifier_fn) identifier_fn )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_f) identifier_f (call (identifier_open) identifier_open (argument_list (identifier_fn) identifier_fn (string_'rb') string_'rb' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_lines) identifier_lines (list_comprehension (call (attribute (call (attribute (identifier_line) identifier_line (identifier_decode) identifier_decode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call (for_in_clause (identifier_line) identifier_line (call (attribute (identifier_f) identifier_f (identifier_readlines) identifier_readlines )attribute (argument_list )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (return_statement (identifier_lines) identifier_lines )return_statement )block )function_definition )module
Returns file contents in unicode as list.
(module (function_definition (function_name_keytype_path_to) function_name_keytype_path_to (parameters (identifier_args) identifier_args (identifier_keytype) identifier_keytype )parameters (block (if_statement (comparison_operator (identifier_keytype) identifier_keytype (string_"admin") string_"admin" )comparison_operator (block (return_statement (call (attribute (string_'{cluster}.client.admin.keyring') string_'{cluster}.client.admin.keyring' (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_cluster) identifier_cluster (attribute (identifier_args) identifier_args (identifier_cluster) identifier_cluster )attribute )keyword_argument )argument_list )call )return_statement )block )if_statement (if_statement (comparison_operator (identifier_keytype) identifier_keytype (string_"mon") string_"mon" )comparison_operator (block (return_statement (call (attribute (string_'{cluster}.mon.keyring') string_'{cluster}.mon.keyring' (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_cluster) identifier_cluster (attribute (identifier_args) identifier_args (identifier_cluster) identifier_cluster )attribute )keyword_argument )argument_list )call )return_statement )block )if_statement (return_statement (call (attribute (string_'{cluster}.bootstrap-{what}.keyring') string_'{cluster}.bootstrap-{what}.keyring' (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_cluster) identifier_cluster (attribute (identifier_args) identifier_args (identifier_cluster) identifier_cluster )attribute )keyword_argument (keyword_argument (identifier_what) identifier_what (identifier_keytype) identifier_keytype )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Get the local filename for a keyring type
(module (function_definition (function_name_findlast) function_name_findlast (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 (pattern_list (identifier_list_) identifier_list_ (identifier_idx) identifier_idx )pattern_list (call (identifier__index) identifier__index (argument_list (list_splat (identifier_args) identifier_args )list_splat (keyword_argument (identifier_start) identifier_start (attribute (identifier_sys) identifier_sys (identifier_maxsize) identifier_maxsize )attribute )keyword_argument (keyword_argument (identifier_step) identifier_step (unary_operator (integer_1) integer_1 )unary_operator )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_idx) identifier_idx (integer_0) integer_0 )comparison_operator (block (raise_statement (call (identifier_IndexError) identifier_IndexError (argument_list (string_"element not found") string_"element not found" )argument_list )call )raise_statement )block )if_statement (return_statement (subscript (identifier_list_) identifier_list_ (identifier_idx) identifier_idx )subscript )return_statement )block )function_definition )module
Find the last matching element in a list and return it. Usage:: findlast(element, list_) findlast(of=element, in_=list_) findlast(where=predicate, in_=list_) :param element, of: Element to search for (by equality comparison) :param where: Predicate defining an element to search for. This should be a callable taking a single argument and returning a boolean result. :param list_, in_: List to search in :return: Last matching element :raise IndexError: If no matching elements were found .. versionadded:: 0.0.4
(module (function_definition (function_name__validate_namespaces) function_name__validate_namespaces (parameters (identifier_self) identifier_self (identifier_input_namespaces) identifier_input_namespaces )parameters (block (expression_statement (assignment (identifier_output_namespaces) identifier_output_namespaces (list )list )assignment )expression_statement (if_statement (comparison_operator (identifier_input_namespaces) identifier_input_namespaces (list )list )comparison_operator (block (return_statement (identifier_output_namespaces) identifier_output_namespaces )return_statement )block (elif_clause (comparison_operator (string_'*') string_'*' (identifier_input_namespaces) identifier_input_namespaces )comparison_operator (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_input_namespaces) identifier_input_namespaces )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_warning) identifier_warning (string_'Warning: Multiple namespaces are ') string_'Warning: Multiple namespaces are ' )assignment )expression_statement (expression_statement (augmented_assignment (identifier_warning) identifier_warning (string_'ignored when one namespace is "*"\n') string_'ignored when one namespace is "*"\n' )augmented_assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute (identifier_write) identifier_write )attribute (argument_list (identifier_warning) identifier_warning )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_output_namespaces) identifier_output_namespaces )return_statement )block )elif_clause (else_clause (block (for_statement (identifier_namespace) identifier_namespace (identifier_input_namespaces) identifier_input_namespaces (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_namespace) identifier_namespace (identifier_unicode) identifier_unicode )argument_list )call )not_operator (block (expression_statement (assignment (identifier_namespace) identifier_namespace (call (identifier_unicode) identifier_unicode (argument_list (identifier_namespace) identifier_namespace )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_namespace_tuple) identifier_namespace_tuple (call (attribute (identifier_self) identifier_self (identifier__tuplefy_namespace) identifier__tuplefy_namespace )attribute (argument_list (identifier_namespace) identifier_namespace )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_namespace_tuple) identifier_namespace_tuple (None) None )comparison_operator (block (expression_statement (assignment (identifier_warning) identifier_warning (binary_operator (string_'Warning: Invalid namespace ') string_'Warning: Invalid namespace ' (identifier_namespace) identifier_namespace )binary_operator )assignment )expression_statement (expression_statement (augmented_assignment (identifier_warning) identifier_warning (string_' will be ignored\n') string_' will be ignored\n' )augmented_assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute (identifier_write) identifier_write )attribute (argument_list (identifier_warning) identifier_warning )argument_list )call )expression_statement )block (else_clause (block (if_statement (comparison_operator (identifier_namespace_tuple) identifier_namespace_tuple (identifier_output_namespaces) identifier_output_namespaces )comparison_operator (block (expression_statement (call (attribute (identifier_output_namespaces) identifier_output_namespaces (identifier_append) identifier_append )attribute (argument_list (identifier_namespace_tuple) identifier_namespace_tuple )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_warning) identifier_warning (binary_operator (string_'Warning: Duplicate namespace ') string_'Warning: Duplicate namespace ' (identifier_namespace) identifier_namespace )binary_operator )assignment )expression_statement (expression_statement (augmented_assignment (identifier_warning) identifier_warning (string_' will be ignored\n') string_' will be ignored\n' )augmented_assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute (identifier_write) identifier_write )attribute (argument_list (identifier_warning) identifier_warning )argument_list )call )expression_statement )block )else_clause )if_statement )block )else_clause )if_statement )block )for_statement )block )else_clause )if_statement (return_statement (identifier_output_namespaces) identifier_output_namespaces )return_statement )block )function_definition )module
Converts a list of db namespaces to a list of namespace tuples, supporting basic commandline wildcards
(module (function_definition (function_name_string) function_name_string (parameters (identifier_self) identifier_self (typed_default_parameter (identifier_units) identifier_units (type (subscript (attribute (identifier_typing) identifier_typing (identifier_Optional) identifier_Optional )attribute (identifier_str) identifier_str )subscript )type (None) None )typed_default_parameter )parameters (type (identifier_str) identifier_str )type (block (if_statement (not_operator (identifier_units) identifier_units )not_operator (block (expression_statement (assignment (identifier__units) identifier__units (type (identifier_str) identifier_str )type (attribute (identifier_self) identifier_self (identifier__units) identifier__units )attribute )assignment )expression_statement )block (else_clause (block (if_statement (not_operator (comparison_operator (call (attribute (identifier_units) identifier_units (identifier_upper) identifier_upper )attribute (argument_list )argument_list )call (attribute (identifier_CustomPressure) identifier_CustomPressure (identifier_legal_units) identifier_legal_units )attribute )comparison_operator )not_operator (block (raise_statement (call (identifier_UnitsError) identifier_UnitsError (argument_list (binary_operator (binary_operator (string_"unrecognized pressure unit: '") string_"unrecognized pressure unit: '" (identifier_units) identifier_units )binary_operator (string_"'") string_"'" )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier__units) identifier__units (call (attribute (identifier_units) identifier_units (identifier_upper) identifier_upper )attribute (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_val) identifier_val (call (attribute (identifier_self) identifier_self (identifier_value) identifier_value )attribute (argument_list (identifier_units) identifier_units )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier__units) identifier__units (string_"MB") string_"MB" )comparison_operator (block (return_statement (binary_operator (string_"%.0f mb") string_"%.0f mb" (identifier_val) identifier_val )binary_operator )return_statement )block )if_statement (if_statement (comparison_operator (identifier__units) identifier__units (string_"HPA") string_"HPA" )comparison_operator (block (return_statement (binary_operator (string_"%.0f hPa") string_"%.0f hPa" (identifier_val) identifier_val )binary_operator )return_statement )block )if_statement (if_statement (comparison_operator (identifier__units) identifier__units (string_"IN") string_"IN" )comparison_operator (block (return_statement (binary_operator (string_"%.2f inches") string_"%.2f inches" (identifier_val) identifier_val )binary_operator )return_statement )block )if_statement (if_statement (comparison_operator (identifier__units) identifier__units (string_"MM") string_"MM" )comparison_operator (block (return_statement (binary_operator (string_"%.0f mmHg") string_"%.0f mmHg" (identifier_val) identifier_val )binary_operator )return_statement )block )if_statement (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (identifier__units) identifier__units )argument_list )call )raise_statement )block )function_definition )module
Return a string representation of the pressure, using the given units.
(module (function_definition (function_name_set) function_name_set (parameters (identifier_self) identifier_self (identifier_field) identifier_field (identifier_value) identifier_value )parameters (block (if_statement (comparison_operator (identifier_field) identifier_field (string_'uuid') string_'uuid' )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'uuid cannot be set') string_'uuid cannot be set' )argument_list )call )raise_statement )block (elif_clause (comparison_operator (identifier_field) identifier_field (string_'key') string_'key' )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'key cannot be set. Use \'reset_key\' method') string_'key cannot be set. Use \'reset_key\' method' )argument_list )call )raise_statement )block )elif_clause (else_clause (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (identifier_field) identifier_field )subscript (identifier_value) identifier_value )assignment )expression_statement )block )else_clause )if_statement )block )function_definition )module
Sets the value of an app field. :param str field: The name of the app field. Trying to set immutable fields ``uuid`` or ``key`` will raise a ValueError. :param value: The new value of the app field. :raises: ValueError
(module (function_definition (function_name_set) function_name_set (parameters (identifier_self) identifier_self (identifier_section) identifier_section (identifier_option) identifier_option (default_parameter (identifier_value) identifier_value (string_'') string_'' )default_parameter )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__string_check) identifier__string_check )attribute (argument_list (identifier_value) identifier_value )argument_list )call )expression_statement (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_GitConfigParser) identifier_GitConfigParser (identifier_self) identifier_self )argument_list )call (identifier_set) identifier_set )attribute (argument_list (identifier_section) identifier_section (identifier_option) identifier_option (identifier_value) identifier_value )argument_list )call )expression_statement )block )function_definition )module
This is overridden from the RawConfigParser merely to change the default value for the 'value' argument.
(module (function_definition (function_name_render_source) function_name_render_source (parameters (identifier_self) identifier_self (identifier_source) identifier_source (default_parameter (identifier_variables) identifier_variables (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_variables) identifier_variables (None) None )comparison_operator (block (expression_statement (assignment (identifier_variables) identifier_variables (dictionary )dictionary )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_template) identifier_template (call (attribute (attribute (identifier_self) identifier_self (identifier__engine) identifier__engine )attribute (identifier_from_string) identifier_from_string )attribute (argument_list (identifier_source) identifier_source )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_template) identifier_template (identifier_render) identifier_render )attribute (argument_list (dictionary_splat (identifier_variables) identifier_variables )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Render a source with the passed variables.
(module (function_definition (function_name_translate) function_name_translate (parameters (identifier_self) identifier_self (identifier_exc) identifier_exc )parameters (block (import_from_statement (dotted_name (identifier_boto) identifier_boto (identifier_exception) identifier_exception )dotted_name (dotted_name (identifier_StorageResponseError) identifier_StorageResponseError )dotted_name )import_from_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_exc) identifier_exc (identifier_StorageResponseError) identifier_StorageResponseError )argument_list )call (block (if_statement (comparison_operator (attribute (identifier_exc) identifier_exc (identifier_status) identifier_status )attribute (integer_404) integer_404 )comparison_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_error_cls) identifier_error_cls )attribute (argument_list (call (identifier_str) identifier_str (argument_list (identifier_exc) identifier_exc )argument_list )call )argument_list )call )return_statement )block )if_statement )block )if_statement (return_statement (None) None )return_statement )block )function_definition )module
Return whether or not to do translation.
(module (function_definition (function_name_ekf1_pos) function_name_ekf1_pos (parameters (identifier_EKF1) identifier_EKF1 )parameters (block (global_statement (identifier_ekf_home) identifier_ekf_home )global_statement (import_from_statement (relative_import (import_prefix )import_prefix )relative_import (dotted_name (identifier_mavutil) identifier_mavutil )dotted_name )import_from_statement (expression_statement (assignment (identifier_self) identifier_self (attribute (identifier_mavutil) identifier_mavutil (identifier_mavfile_global) identifier_mavfile_global )attribute )assignment )expression_statement (if_statement (comparison_operator (identifier_ekf_home) identifier_ekf_home (None) None )comparison_operator (block (if_statement (boolean_operator (not_operator (comparison_operator (string_'GPS') string_'GPS' (attribute (identifier_self) identifier_self (identifier_messages) identifier_messages )attribute )comparison_operator )not_operator (comparison_operator (attribute (subscript (attribute (identifier_self) identifier_self (identifier_messages) identifier_messages )attribute (string_'GPS') string_'GPS' )subscript (identifier_Status) identifier_Status )attribute (integer_3) integer_3 )comparison_operator )boolean_operator (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_ekf_home) identifier_ekf_home (subscript (attribute (identifier_self) identifier_self (identifier_messages) identifier_messages )attribute (string_'GPS') string_'GPS' )subscript )assignment )expression_statement (expression_statement (assignment (tuple_pattern (attribute (identifier_ekf_home) identifier_ekf_home (identifier_Lat) identifier_Lat )attribute (attribute (identifier_ekf_home) identifier_ekf_home (identifier_Lng) identifier_Lng )attribute )tuple_pattern (call (identifier_gps_offset) identifier_gps_offset (argument_list (attribute (identifier_ekf_home) identifier_ekf_home (identifier_Lat) identifier_Lat )attribute (attribute (identifier_ekf_home) identifier_ekf_home (identifier_Lng) identifier_Lng )attribute (unary_operator (attribute (identifier_EKF1) identifier_EKF1 (identifier_PE) identifier_PE )attribute )unary_operator (unary_operator (attribute (identifier_EKF1) identifier_EKF1 (identifier_PN) identifier_PN )attribute )unary_operator )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (tuple_pattern (identifier_lat) identifier_lat (identifier_lon) identifier_lon )tuple_pattern (call (identifier_gps_offset) identifier_gps_offset (argument_list (attribute (identifier_ekf_home) identifier_ekf_home (identifier_Lat) identifier_Lat )attribute (attribute (identifier_ekf_home) identifier_ekf_home (identifier_Lng) identifier_Lng )attribute (attribute (identifier_EKF1) identifier_EKF1 (identifier_PE) identifier_PE )attribute (attribute (identifier_EKF1) identifier_EKF1 (identifier_PN) identifier_PN )attribute )argument_list )call )assignment )expression_statement (return_statement (tuple (identifier_lat) identifier_lat (identifier_lon) identifier_lon )tuple )return_statement )block )function_definition )module
calculate EKF position when EKF disabled