sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_create_video_transcript) function_name_create_video_transcript (parameters (identifier_video_id) identifier_video_id (identifier_language_code) identifier_language_code (identifier_file_format) identifier_file_format (identifier_content) identifier_content (default_parameter (identifier_provider) identifier_provider (attribute (identifier_TranscriptProviderType) identifier_TranscriptProviderType (identifier_CUSTOM) identifier_CUSTOM )attribute )default_parameter )parameters (block (expression_statement (assignment (identifier_transcript_serializer) identifier_transcript_serializer (call (identifier_TranscriptSerializer) identifier_TranscriptSerializer (argument_list (keyword_argument (identifier_data) identifier_data (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_provider) identifier_provider (identifier_provider) identifier_provider )keyword_argument (keyword_argument (identifier_language_code) identifier_language_code (identifier_language_code) identifier_language_code )keyword_argument (keyword_argument (identifier_file_format) identifier_file_format (identifier_file_format) identifier_file_format )keyword_argument )argument_list )call )keyword_argument (keyword_argument (identifier_context) identifier_context (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_video_id) identifier_video_id (identifier_video_id) identifier_video_id )keyword_argument )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_transcript_serializer) identifier_transcript_serializer (identifier_is_valid) identifier_is_valid )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_transcript_serializer) identifier_transcript_serializer (identifier_save) identifier_save )attribute (argument_list (keyword_argument (identifier_content) identifier_content (identifier_content) identifier_content )keyword_argument )argument_list )call )expression_statement (return_statement (attribute (identifier_transcript_serializer) identifier_transcript_serializer (identifier_data) identifier_data )attribute )return_statement )block (else_clause (block (raise_statement (call (identifier_ValCannotCreateError) identifier_ValCannotCreateError (argument_list (attribute (identifier_transcript_serializer) identifier_transcript_serializer (identifier_errors) identifier_errors )attribute )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Create a video transcript. Arguments: video_id(unicode): An Id identifying the Video data model object. language_code(unicode): A language code. file_format(unicode): Transcript file format. content(InMemoryUploadedFile): Transcript content. provider(unicode): Transcript provider (it will be 'custom' by default if not selected).
(module (function_definition (function_name_submit) function_name_submit (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_u) identifier_u (call (identifier_urlparse) identifier_urlparse (argument_list (attribute (identifier_self) identifier_self (identifier_url) identifier_url )attribute )argument_list )call )assignment )expression_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_action) identifier_action )attribute )not_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_action) identifier_action )attribute (attribute (identifier_self) identifier_self (identifier_url) identifier_url )attribute )assignment )expression_statement )block (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier_action) identifier_action )attribute (attribute (identifier_u) identifier_u (identifier_path) identifier_path )attribute )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_action) identifier_action )attribute (attribute (identifier_self) identifier_self (identifier_url) identifier_url )attribute )assignment )expression_statement )block )elif_clause (else_clause (block (if_statement (not_operator (comparison_operator (attribute (identifier_u) identifier_u (identifier_netloc) identifier_netloc )attribute (attribute (identifier_self) identifier_self (identifier_action) identifier_action )attribute )comparison_operator )not_operator (block (expression_statement (assignment (identifier_path) identifier_path (call (attribute (string_"/") string_"/" (identifier_join) identifier_join )attribute (argument_list (subscript (call (attribute (attribute (identifier_u) identifier_u (identifier_path) identifier_path )attribute (identifier_split) identifier_split )attribute (argument_list (string_"/") string_"/" )argument_list )call (slice (integer_1) integer_1 (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript )argument_list )call )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_action) identifier_action )attribute (identifier_startswith) identifier_startswith )attribute (argument_list (string_"/") string_"/" )argument_list )call (block (expression_statement (assignment (identifier_path) identifier_path (binary_operator (identifier_path) identifier_path (attribute (identifier_self) identifier_self (identifier_action) identifier_action )attribute )binary_operator )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_path) identifier_path (binary_operator (binary_operator (identifier_path) identifier_path (string_"/") string_"/" )binary_operator (attribute (identifier_self) identifier_self (identifier_action) identifier_action )attribute )binary_operator )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_action) identifier_action )attribute (binary_operator (binary_operator (binary_operator (string_"http://") string_"http://" (attribute (identifier_u) identifier_u (identifier_netloc) identifier_netloc )attribute )binary_operator (string_"/") string_"/" )binary_operator (identifier_path) identifier_path )binary_operator )assignment )expression_statement )block )if_statement )block )else_clause )if_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_usr) identifier_usr )attribute (identifier_getPage) identifier_getPage )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_action) identifier_action )attribute (attribute (identifier_self) identifier_self (identifier_items) identifier_items )attribute (dictionary (pair (string_'Referer') string_'Referer' (attribute (identifier_self) identifier_self (identifier_url) identifier_url )attribute )pair )dictionary (attribute (identifier_self) identifier_self (identifier_usePin) identifier_usePin )attribute )argument_list )call )return_statement )block )function_definition )module
Posts the form's data and returns the resulting Page Returns Page - The resulting page
(module (function_definition (function_name_mdownload) function_name_mdownload (parameters (identifier_args) identifier_args )parameters (block (import_from_statement (dotted_name (identifier_jcvi) identifier_jcvi (identifier_apps) identifier_apps (identifier_grid) identifier_grid )dotted_name (dotted_name (identifier_Jobs) identifier_Jobs )dotted_name )import_from_statement (expression_statement (assignment (identifier_p) identifier_p (call (identifier_OptionParser) identifier_OptionParser (argument_list (attribute (identifier_mdownload) identifier_mdownload (identifier___doc__) identifier___doc__ )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_opts) identifier_opts (identifier_args) identifier_args )pattern_list (call (attribute (identifier_p) identifier_p (identifier_parse_args) identifier_parse_args )attribute (argument_list (identifier_args) identifier_args )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_args) identifier_args )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (call (attribute (identifier_sys) identifier_sys (identifier_exit) identifier_exit )attribute (argument_list (not_operator (call (attribute (identifier_p) identifier_p (identifier_print_help) identifier_print_help )attribute (argument_list )argument_list )call )not_operator )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (pattern_list (identifier_linksfile) identifier_linksfile )pattern_list (identifier_args) identifier_args )assignment )expression_statement (expression_statement (assignment (identifier_links) identifier_links (list_comprehension (tuple (call (attribute (identifier_x) identifier_x (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )tuple (for_in_clause (identifier_x) identifier_x (call (identifier_open) identifier_open (argument_list (identifier_linksfile) identifier_linksfile )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_j) identifier_j (call (identifier_Jobs) identifier_Jobs (argument_list (identifier_download) identifier_download (identifier_links) identifier_links )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_j) identifier_j (identifier_run) identifier_run )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
%prog mdownload links.txt Multiple download a list of files. Use formats.html.links() to extract the links file.
(module (function_definition (function_name_load_file) function_name_load_file (parameters (identifier_self) identifier_self (identifier_filename) identifier_filename )parameters (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_filename) identifier_filename (string_'r') string_'r' )argument_list )call (as_pattern_target (identifier_sourcefile) identifier_sourcefile )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_set_string) identifier_set_string )attribute (argument_list (call (attribute (identifier_sourcefile) identifier_sourcefile (identifier_read) identifier_read )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Read in file contents and set the current string.
(module (function_definition (function_name_delete_params_s) function_name_delete_params_s (parameters (identifier_s) identifier_s (identifier_params) identifier_params )parameters (block (expression_statement (assignment (identifier_patt) identifier_patt (binary_operator (string_'(?s)') string_'(?s)' (call (attribute (string_'|') string_'|' (identifier_join) identifier_join )attribute (generator_expression (binary_operator (binary_operator (string_'(?<=\n)') string_'(?<=\n)' (identifier_s) identifier_s )binary_operator (string_'\s*:.+?\n(?=\S+|$)') string_'\s*:.+?\n(?=\S+|$)' )binary_operator (for_in_clause (identifier_s) identifier_s (identifier_params) identifier_params )for_in_clause )generator_expression )call )binary_operator )assignment )expression_statement (return_statement (call (attribute (call (attribute (identifier_re) identifier_re (identifier_sub) identifier_sub )attribute (argument_list (identifier_patt) identifier_patt (string_'') string_'' (binary_operator (binary_operator (string_'\n') string_'\n' (call (attribute (identifier_s) identifier_s (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )binary_operator (string_'\n') string_'\n' )binary_operator )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Delete the given parameters from a string Same as :meth:`delete_params` but does not use the :attr:`params` dictionary Parameters ---------- s: str The string of the parameters section params: list of str The names of the parameters to delete Returns ------- str The modified string `s` without the descriptions of `params`
(module (function_definition (function_name_iterkeys) function_name_iterkeys (parameters (identifier_self) identifier_self )parameters (block (function_definition (function_name__iterkeys) function_name__iterkeys (parameters (identifier_bin) identifier_bin )parameters (block (for_statement (identifier_item) identifier_item (identifier_bin) identifier_bin (block (expression_statement (yield (attribute (identifier_item) identifier_item (identifier_key) identifier_key )attribute )yield )expression_statement )block )for_statement )block )function_definition (for_statement (identifier_bin) identifier_bin (attribute (identifier_self) identifier_self (identifier_bins) identifier_bins )attribute (block (expression_statement (yield (call (identifier__iterkeys) identifier__iterkeys (argument_list (identifier_bin) identifier_bin )argument_list )call )yield )expression_statement )block )for_statement )block )function_definition )module
An iterator over the keys of each bin.
(module (function_definition (function_name_removeOntology) function_name_removeOntology (parameters (identifier_self) identifier_self (identifier_ontology) identifier_ontology )parameters (block (expression_statement (assignment (identifier_q) identifier_q (call (attribute (call (attribute (attribute (identifier_models) identifier_models (identifier_Ontology) identifier_Ontology )attribute (identifier_delete) identifier_delete )attribute (argument_list )argument_list )call (identifier_where) identifier_where )attribute (argument_list (comparison_operator (identifier_id) identifier_id (call (attribute (identifier_ontology) identifier_ontology (identifier_getId) identifier_getId )attribute (argument_list )argument_list )call )comparison_operator )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_q) identifier_q (identifier_execute) identifier_execute )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Removes the specified ontology term map from this repository.
(module (function_definition (function_name_get_job_info) function_name_get_job_info (parameters (identifier_current_job) identifier_current_job )parameters (block (expression_statement (assignment (identifier_trials) identifier_trials (call (attribute (attribute (identifier_TrialRecord) identifier_TrialRecord (identifier_objects) identifier_objects )attribute (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_job_id) identifier_job_id (attribute (identifier_current_job) identifier_current_job (identifier_job_id) identifier_job_id )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_total_num) identifier_total_num (call (identifier_len) identifier_len (argument_list (identifier_trials) identifier_trials )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_running_num) identifier_running_num (call (identifier_sum) identifier_sum (generator_expression (comparison_operator (attribute (identifier_t) identifier_t (identifier_trial_status) identifier_trial_status )attribute (attribute (identifier_Trial) identifier_Trial (identifier_RUNNING) identifier_RUNNING )attribute )comparison_operator (for_in_clause (identifier_t) identifier_t (identifier_trials) identifier_trials )for_in_clause )generator_expression )call )assignment )expression_statement (expression_statement (assignment (identifier_success_num) identifier_success_num (call (identifier_sum) identifier_sum (generator_expression (comparison_operator (attribute (identifier_t) identifier_t (identifier_trial_status) identifier_trial_status )attribute (attribute (identifier_Trial) identifier_Trial (identifier_TERMINATED) identifier_TERMINATED )attribute )comparison_operator (for_in_clause (identifier_t) identifier_t (identifier_trials) identifier_trials )for_in_clause )generator_expression )call )assignment )expression_statement (expression_statement (assignment (identifier_failed_num) identifier_failed_num (call (identifier_sum) identifier_sum (generator_expression (comparison_operator (attribute (identifier_t) identifier_t (identifier_trial_status) identifier_trial_status )attribute (attribute (identifier_Trial) identifier_Trial (identifier_ERROR) identifier_ERROR )attribute )comparison_operator (for_in_clause (identifier_t) identifier_t (identifier_trials) identifier_trials )for_in_clause )generator_expression )call )assignment )expression_statement (if_statement (comparison_operator (identifier_total_num) identifier_total_num (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_progress) identifier_progress (integer_0) integer_0 )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_progress) identifier_progress (call (identifier_int) identifier_int (argument_list (binary_operator (binary_operator (call (identifier_float) identifier_float (argument_list (identifier_success_num) identifier_success_num )argument_list )call (identifier_total_num) identifier_total_num )binary_operator (integer_100) integer_100 )binary_operator )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_winner) identifier_winner (call (identifier_get_winner) identifier_get_winner (argument_list (identifier_trials) identifier_trials )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_job_info) identifier_job_info (dictionary (pair (string_"job_id") string_"job_id" (attribute (identifier_current_job) identifier_current_job (identifier_job_id) identifier_job_id )attribute )pair (pair (string_"job_name") string_"job_name" (attribute (identifier_current_job) identifier_current_job (identifier_name) identifier_name )attribute )pair (pair (string_"user") string_"user" (attribute (identifier_current_job) identifier_current_job (identifier_user) identifier_user )attribute )pair (pair (string_"type") string_"type" (attribute (identifier_current_job) identifier_current_job (identifier_type) identifier_type )attribute )pair (pair (string_"start_time") string_"start_time" (attribute (identifier_current_job) identifier_current_job (identifier_start_time) identifier_start_time )attribute )pair (pair (string_"end_time") string_"end_time" (attribute (identifier_current_job) identifier_current_job (identifier_end_time) identifier_end_time )attribute )pair (pair (string_"total_num") string_"total_num" (identifier_total_num) identifier_total_num )pair (pair (string_"running_num") string_"running_num" (identifier_running_num) identifier_running_num )pair (pair (string_"success_num") string_"success_num" (identifier_success_num) identifier_success_num )pair (pair (string_"failed_num") string_"failed_num" (identifier_failed_num) identifier_failed_num )pair (pair (string_"best_trial_id") string_"best_trial_id" (attribute (identifier_current_job) identifier_current_job (identifier_best_trial_id) identifier_best_trial_id )attribute )pair (pair (string_"progress") string_"progress" (identifier_progress) identifier_progress )pair (pair (string_"winner") string_"winner" (identifier_winner) identifier_winner )pair )dictionary )assignment )expression_statement (return_statement (identifier_job_info) identifier_job_info )return_statement )block )function_definition )module
Get job information for current job.
(module (function_definition (function_name_get_decomp_and_e_above_hull) function_name_get_decomp_and_e_above_hull (parameters (identifier_self) identifier_self (identifier_entry) identifier_entry (default_parameter (identifier_allow_negative) identifier_allow_negative (False) False )default_parameter )parameters (block (if_statement (comparison_operator (identifier_entry) identifier_entry (attribute (identifier_self) identifier_self (identifier_stable_entries) identifier_stable_entries )attribute )comparison_operator (block (return_statement (expression_list (dictionary (pair (identifier_entry) identifier_entry (integer_1) integer_1 )pair )dictionary (integer_0) integer_0 )expression_list )return_statement )block )if_statement (expression_statement (assignment (identifier_comp) identifier_comp (attribute (identifier_entry) identifier_entry (identifier_composition) identifier_composition )attribute )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_facet) identifier_facet (identifier_simplex) identifier_simplex )pattern_list (call (attribute (identifier_self) identifier_self (identifier__get_facet_and_simplex) identifier__get_facet_and_simplex )attribute (argument_list (identifier_comp) identifier_comp )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_decomp_amts) identifier_decomp_amts (call (attribute (identifier_simplex) identifier_simplex (identifier_bary_coords) identifier_bary_coords )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_pd_coords) identifier_pd_coords )attribute (argument_list (identifier_comp) identifier_comp )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_decomp) identifier_decomp (dictionary_comprehension (pair (subscript (attribute (identifier_self) identifier_self (identifier_qhull_entries) identifier_qhull_entries )attribute (identifier_f) identifier_f )subscript (identifier_amt) identifier_amt )pair (for_in_clause (pattern_list (identifier_f) identifier_f (identifier_amt) identifier_amt )pattern_list (call (identifier_zip) identifier_zip (argument_list (identifier_facet) identifier_facet (identifier_decomp_amts) identifier_decomp_amts )argument_list )call )for_in_clause (if_clause (comparison_operator (call (identifier_abs) identifier_abs (argument_list (identifier_amt) identifier_amt )argument_list )call (attribute (identifier_PhaseDiagram) identifier_PhaseDiagram (identifier_numerical_tol) identifier_numerical_tol )attribute )comparison_operator )if_clause )dictionary_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_energies) identifier_energies (list_comprehension (attribute (subscript (attribute (identifier_self) identifier_self (identifier_qhull_entries) identifier_qhull_entries )attribute (identifier_i) identifier_i )subscript (identifier_energy_per_atom) identifier_energy_per_atom )attribute (for_in_clause (identifier_i) identifier_i (identifier_facet) identifier_facet )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_ehull) identifier_ehull (binary_operator (attribute (identifier_entry) identifier_entry (identifier_energy_per_atom) identifier_energy_per_atom )attribute (call (attribute (identifier_np) identifier_np (identifier_dot) identifier_dot )attribute (argument_list (identifier_decomp_amts) identifier_decomp_amts (identifier_energies) identifier_energies )argument_list )call )binary_operator )assignment )expression_statement (if_statement (boolean_operator (identifier_allow_negative) identifier_allow_negative (comparison_operator (identifier_ehull) identifier_ehull (unary_operator (attribute (identifier_PhaseDiagram) identifier_PhaseDiagram (identifier_numerical_tol) identifier_numerical_tol )attribute )unary_operator )comparison_operator )boolean_operator (block (return_statement (expression_list (identifier_decomp) identifier_decomp (identifier_ehull) identifier_ehull )expression_list )return_statement )block )if_statement (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"No valid decomp found!") string_"No valid decomp found!" )argument_list )call )raise_statement )block )function_definition )module
Provides the decomposition and energy above convex hull for an entry. Due to caching, can be much faster if entries with the same composition are processed together. Args: entry: A PDEntry like object allow_negative: Whether to allow negative e_above_hulls. Used to calculate equilibrium reaction energies. Defaults to False. Returns: (decomp, energy above convex hull) Stable entries should have energy above hull of 0. The decomposition is provided as a dict of {Entry: amount}.
(module (function_definition (function_name_upload_object) function_name_upload_object (parameters (identifier_self) identifier_self (identifier_instance) identifier_instance (identifier_bucket_name) identifier_bucket_name (identifier_object_name) identifier_object_name (identifier_file_obj) identifier_file_obj (default_parameter (identifier_content_type) identifier_content_type (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_url) identifier_url (call (attribute (string_'/buckets/{}/{}/{}') string_'/buckets/{}/{}/{}' (identifier_format) identifier_format )attribute (argument_list (identifier_instance) identifier_instance (identifier_bucket_name) identifier_bucket_name (identifier_object_name) identifier_object_name )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_file_obj) identifier_file_obj (string_'rb') string_'rb' )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (if_statement (identifier_content_type) identifier_content_type (block (expression_statement (assignment (identifier_files) identifier_files (dictionary (pair (identifier_object_name) identifier_object_name (tuple (identifier_object_name) identifier_object_name (identifier_f) identifier_f (identifier_content_type) identifier_content_type )tuple )pair )dictionary )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_files) identifier_files (dictionary (pair (identifier_object_name) identifier_object_name (tuple (identifier_object_name) identifier_object_name (identifier_f) identifier_f )tuple )pair )dictionary )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__client) identifier__client )attribute (identifier_request) identifier_request )attribute (argument_list (keyword_argument (identifier_path) identifier_path (identifier_url) identifier_url )keyword_argument (keyword_argument (identifier_method) identifier_method (string_'post') string_'post' )keyword_argument (keyword_argument (identifier_files) identifier_files (identifier_files) identifier_files )keyword_argument )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Upload an object to a bucket. :param str instance: A Yamcs instance name. :param str bucket_name: The name of the bucket. :param str object_name: The target name of the object. :param file file_obj: The file (or file-like object) to upload. :param str content_type: The content type associated to this object. This is mainly useful when accessing an object directly via a web browser. If unspecified, a content type *may* be automatically derived from the specified ``file_obj``.
(module (function_definition (function_name_odometry2Pose3D) function_name_odometry2Pose3D (parameters (identifier_odom) identifier_odom )parameters (block (expression_statement (assignment (identifier_pose) identifier_pose (call (identifier_Pose3d) identifier_Pose3d (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ori) identifier_ori (attribute (attribute (attribute (identifier_odom) identifier_odom (identifier_pose) identifier_pose )attribute (identifier_pose) identifier_pose )attribute (identifier_orientation) identifier_orientation )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_pose) identifier_pose (identifier_x) identifier_x )attribute (attribute (attribute (attribute (attribute (identifier_odom) identifier_odom (identifier_pose) identifier_pose )attribute (identifier_pose) identifier_pose )attribute (identifier_position) identifier_position )attribute (identifier_x) identifier_x )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_pose) identifier_pose (identifier_y) identifier_y )attribute (attribute (attribute (attribute (attribute (identifier_odom) identifier_odom (identifier_pose) identifier_pose )attribute (identifier_pose) identifier_pose )attribute (identifier_position) identifier_position )attribute (identifier_y) identifier_y )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_pose) identifier_pose (identifier_z) identifier_z )attribute (attribute (attribute (attribute (attribute (identifier_odom) identifier_odom (identifier_pose) identifier_pose )attribute (identifier_pose) identifier_pose )attribute (identifier_position) identifier_position )attribute (identifier_z) identifier_z )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_pose) identifier_pose (identifier_yaw) identifier_yaw )attribute (call (identifier_quat2Yaw) identifier_quat2Yaw (argument_list (attribute (identifier_ori) identifier_ori (identifier_w) identifier_w )attribute (attribute (identifier_ori) identifier_ori (identifier_x) identifier_x )attribute (attribute (identifier_ori) identifier_ori (identifier_y) identifier_y )attribute (attribute (identifier_ori) identifier_ori (identifier_z) identifier_z )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_pose) identifier_pose (identifier_pitch) identifier_pitch )attribute (call (identifier_quat2Pitch) identifier_quat2Pitch (argument_list (attribute (identifier_ori) identifier_ori (identifier_w) identifier_w )attribute (attribute (identifier_ori) identifier_ori (identifier_x) identifier_x )attribute (attribute (identifier_ori) identifier_ori (identifier_y) identifier_y )attribute (attribute (identifier_ori) identifier_ori (identifier_z) identifier_z )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_pose) identifier_pose (identifier_roll) identifier_roll )attribute (call (identifier_quat2Roll) identifier_quat2Roll (argument_list (attribute (identifier_ori) identifier_ori (identifier_w) identifier_w )attribute (attribute (identifier_ori) identifier_ori (identifier_x) identifier_x )attribute (attribute (identifier_ori) identifier_ori (identifier_y) identifier_y )attribute (attribute (identifier_ori) identifier_ori (identifier_z) identifier_z )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_pose) identifier_pose (identifier_q) identifier_q )attribute (list (attribute (identifier_ori) identifier_ori (identifier_w) identifier_w )attribute (attribute (identifier_ori) identifier_ori (identifier_x) identifier_x )attribute (attribute (identifier_ori) identifier_ori (identifier_y) identifier_y )attribute (attribute (identifier_ori) identifier_ori (identifier_z) identifier_z )attribute )list )assignment )expression_statement (expression_statement (assignment (attribute (identifier_pose) identifier_pose (identifier_timeStamp) identifier_timeStamp )attribute (binary_operator (attribute (attribute (attribute (identifier_odom) identifier_odom (identifier_header) identifier_header )attribute (identifier_stamp) identifier_stamp )attribute (identifier_secs) identifier_secs )attribute (parenthesized_expression (binary_operator (attribute (attribute (attribute (identifier_odom) identifier_odom (identifier_header) identifier_header )attribute (identifier_stamp) identifier_stamp )attribute (identifier_nsecs) identifier_nsecs )attribute (float_1e-9) float_1e-9 )binary_operator )parenthesized_expression )binary_operator )assignment )expression_statement (return_statement (identifier_pose) identifier_pose )return_statement )block )function_definition )module
Translates from ROS Odometry to JderobotTypes Pose3d. @param odom: ROS Odometry to translate @type odom: Odometry @return a Pose3d translated from odom
(module (function_definition (function_name__parse_nodes_section) function_name__parse_nodes_section (parameters (identifier_f) identifier_f (identifier_current_section) identifier_current_section (identifier_nodes) identifier_nodes )parameters (block (expression_statement (assignment (identifier_section) identifier_section (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_dimensions) identifier_dimensions (None) None )assignment )expression_statement (if_statement (comparison_operator (identifier_current_section) identifier_current_section (string_'NODE_COORD_SECTION') string_'NODE_COORD_SECTION' )comparison_operator (block (expression_statement (assignment (identifier_dimensions) identifier_dimensions (integer_3) integer_3 )assignment )expression_statement )block (elif_clause (comparison_operator (identifier_current_section) identifier_current_section (string_'DEMAND_SECTION') string_'DEMAND_SECTION' )comparison_operator (block (expression_statement (assignment (identifier_dimensions) identifier_dimensions (integer_2) integer_2 )assignment )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_ParseException) identifier_ParseException (argument_list (call (attribute (string_'Invalid section {}') string_'Invalid section {}' (identifier_format) identifier_format )attribute (argument_list (identifier_current_section) identifier_current_section )argument_list )call )argument_list )call )raise_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_n) identifier_n (integer_0) integer_0 )assignment )expression_statement (for_statement (identifier_line) identifier_line (identifier_f) identifier_f (block (expression_statement (assignment (identifier_line) identifier_line (call (identifier_strip) identifier_strip (argument_list (identifier_line) identifier_line )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_definitions) identifier_definitions (call (attribute (identifier_re) identifier_re (identifier_split) identifier_split )attribute (argument_list (string_r'\s*') string_r'\s*' (identifier_line) identifier_line )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_definitions) identifier_definitions )argument_list )call (identifier_dimensions) identifier_dimensions )comparison_operator (block (raise_statement (call (identifier_ParseException) identifier_ParseException (argument_list (call (attribute (string_'Invalid dimensions from section {}. Expected: {}') string_'Invalid dimensions from section {}. Expected: {}' (identifier_format) identifier_format )attribute (argument_list (identifier_current_section) identifier_current_section (identifier_dimensions) identifier_dimensions )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_node) identifier_node (call (identifier_int) identifier_int (argument_list (subscript (identifier_definitions) identifier_definitions (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_values) identifier_values (list_comprehension (call (identifier_int) identifier_int (argument_list (identifier_v) identifier_v )argument_list )call (for_in_clause (identifier_v) identifier_v (subscript (identifier_definitions) identifier_definitions (slice (integer_1) integer_1 (colon) colon )slice )subscript )for_in_clause )list_comprehension )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_values) identifier_values )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_values) identifier_values (subscript (identifier_values) identifier_values (integer_0) integer_0 )subscript )assignment )expression_statement )block )if_statement (expression_statement (assignment (subscript (identifier_section) identifier_section (identifier_node) identifier_node )subscript (identifier_values) identifier_values )assignment )expression_statement (expression_statement (assignment (identifier_n) identifier_n (binary_operator (identifier_n) identifier_n (integer_1) integer_1 )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_n) identifier_n (identifier_nodes) identifier_nodes )comparison_operator (block (break_statement )break_statement )block )if_statement )block )for_statement (if_statement (comparison_operator (identifier_n) identifier_n (identifier_nodes) identifier_nodes )comparison_operator (block (raise_statement (call (identifier_ParseException) identifier_ParseException (argument_list (call (attribute (string_'Missing {} nodes definition from section {}') string_'Missing {} nodes definition from section {}' (identifier_format) identifier_format )attribute (argument_list (binary_operator (identifier_nodes) identifier_nodes (identifier_n) identifier_n )binary_operator (identifier_current_section) identifier_current_section )argument_list )call )argument_list )call )raise_statement )block )if_statement (return_statement (identifier_section) identifier_section )return_statement )block )function_definition )module
Parse TSPLIB NODE_COORD_SECTION or DEMAND_SECTION from file descript f Returns a dict containing the node as key
(module (function_definition (function_name_raster_to_projection_coords) function_name_raster_to_projection_coords (parameters (identifier_self) identifier_self (identifier_pixel_x) identifier_pixel_x (identifier_pixel_y) identifier_pixel_y )parameters (block (expression_statement (assignment (identifier_h_px_py) identifier_h_px_py (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (list (integer_1) integer_1 (identifier_pixel_x) identifier_pixel_x (identifier_pixel_y) identifier_pixel_y )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_gt) identifier_gt (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (list (list (integer_1) integer_1 (integer_0) integer_0 (integer_0) integer_0 )list (subscript (attribute (identifier_self) identifier_self (identifier_geotransform) identifier_geotransform )attribute (slice (integer_0) integer_0 (colon) colon (integer_3) integer_3 )slice )subscript (subscript (attribute (identifier_self) identifier_self (identifier_geotransform) identifier_geotransform )attribute (slice (integer_3) integer_3 (colon) colon (integer_6) integer_6 )slice )subscript )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_arr) identifier_arr (call (attribute (identifier_np) identifier_np (identifier_inner) identifier_inner )attribute (argument_list (identifier_gt) identifier_gt (identifier_h_px_py) identifier_h_px_py )argument_list )call )assignment )expression_statement (return_statement (expression_list (subscript (identifier_arr) identifier_arr (integer_2) integer_2 )subscript (subscript (identifier_arr) identifier_arr (integer_1) integer_1 )subscript )expression_list )return_statement )block )function_definition )module
Use pixel centers when appropriate. See documentation for the GDAL function GetGeoTransform for details.
(module (function_definition (function_name__j9SaveCurrent) function_name__j9SaveCurrent (parameters (default_parameter (identifier_sDir) identifier_sDir (string_'.') string_'.' )default_parameter )parameters (block (expression_statement (assignment (identifier_dname) identifier_dname (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_normpath) identifier_normpath )attribute (argument_list (binary_operator (binary_operator (identifier_sDir) identifier_sDir (string_'/') string_'/' )binary_operator (call (attribute (call (attribute (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute (identifier_now) identifier_now )attribute (argument_list )argument_list )call (identifier_strftime) identifier_strftime )attribute (argument_list (string_"%Y-%m-%d_J9_AbbreviationDocs") string_"%Y-%m-%d_J9_AbbreviationDocs" )argument_list )call )binary_operator )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isdir) identifier_isdir )attribute (argument_list (identifier_dname) identifier_dname )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_mkdir) identifier_mkdir )attribute (argument_list (identifier_dname) identifier_dname )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_chdir) identifier_chdir )attribute (argument_list (identifier_dname) identifier_dname )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_chdir) identifier_chdir )attribute (argument_list (identifier_dname) identifier_dname )argument_list )call )expression_statement )block )else_clause )if_statement (for_statement (pattern_list (identifier_urlID) identifier_urlID (identifier_urlString) identifier_urlString )pattern_list (call (attribute (call (identifier_j9urlGenerator) identifier_j9urlGenerator (argument_list (keyword_argument (identifier_nameDict) identifier_nameDict (True) True )keyword_argument )argument_list )call (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_fname) identifier_fname (call (attribute (string_"{}_abrvjt.html") string_"{}_abrvjt.html" (identifier_format) identifier_format )attribute (argument_list (identifier_urlID) identifier_urlID )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_f) identifier_f (call (identifier_open) identifier_open (argument_list (identifier_fname) identifier_fname (string_'wb') string_'wb' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_f) identifier_f (identifier_write) identifier_write )attribute (argument_list (call (attribute (call (attribute (attribute (identifier_urllib) identifier_urllib (identifier_request) identifier_request )attribute (identifier_urlopen) identifier_urlopen )attribute (argument_list (identifier_urlString) identifier_urlString )argument_list )call (identifier_read) identifier_read )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Downloads and saves all the webpages For Backend
(module (function_definition (function_name_get_series_episodes) function_name_get_series_episodes (parameters (identifier_self) identifier_self (identifier_id) identifier_id (default_parameter (identifier_page) identifier_page (integer_1) integer_1 )default_parameter )parameters (block (expression_statement (assignment (identifier_params) identifier_params (dictionary (pair (string_'page') string_'page' (identifier_page) identifier_page )pair )dictionary )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 (binary_operator (attribute (identifier_self) identifier_self (identifier_base_url) identifier_base_url )attribute (call (attribute (string_'/series/{}/episodes') string_'/series/{}/episodes' (identifier_format) identifier_format )attribute (argument_list (identifier_id) identifier_id )argument_list )call )binary_operator (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_r) identifier_r (identifier_status_code) identifier_status_code )attribute (integer_404) integer_404 )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (call (attribute (identifier_r) identifier_r (identifier_raise_for_status) identifier_raise_for_status )attribute (argument_list )argument_list )call )expression_statement (return_statement (call (attribute (identifier_r) identifier_r (identifier_json) identifier_json )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Get series episodes
(module (function_definition (function_name_info) function_name_info (parameters (identifier_self) identifier_self (default_parameter (identifier_abspath) identifier_abspath (True) True )default_parameter )parameters (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (call (identifier_str) identifier_str (argument_list (string_'') string_'' )argument_list )call )argument_list )call )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__call_and_parse) identifier__call_and_parse )attribute (argument_list (list (string_'info') string_'info' (string_'--json') string_'--json' )list (keyword_argument (identifier_abspath) identifier_abspath (identifier_abspath) identifier_abspath )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return a dictionary with configuration information. No guarantee is made about which keys exist. Therefore this function should only be used for testing and debugging.
(module (function_definition (function_name_usearch_cluster_error_correction) function_name_usearch_cluster_error_correction (parameters (identifier_fasta_filepath) identifier_fasta_filepath (default_parameter (identifier_output_filepath) identifier_output_filepath (None) None )default_parameter (default_parameter (identifier_output_uc_filepath) identifier_output_uc_filepath (None) None )default_parameter (default_parameter (identifier_percent_id_err) identifier_percent_id_err (float_0.97) float_0.97 )default_parameter (default_parameter (identifier_sizein) identifier_sizein (True) True )default_parameter (default_parameter (identifier_sizeout) identifier_sizeout (True) True )default_parameter (default_parameter (identifier_w) identifier_w (integer_64) integer_64 )default_parameter (default_parameter (identifier_slots) identifier_slots (integer_16769023) integer_16769023 )default_parameter (default_parameter (identifier_maxrejects) identifier_maxrejects (integer_64) integer_64 )default_parameter (default_parameter (identifier_log_name) identifier_log_name (string_"usearch_cluster_err_corrected.log") string_"usearch_cluster_err_corrected.log" )default_parameter (default_parameter (identifier_usersort) identifier_usersort (False) False )default_parameter (default_parameter (identifier_HALT_EXEC) identifier_HALT_EXEC (False) False )default_parameter (default_parameter (identifier_save_intermediate_files) identifier_save_intermediate_files (False) False )default_parameter (default_parameter (identifier_remove_usearch_logs) identifier_remove_usearch_logs (False) False )default_parameter (default_parameter (identifier_working_dir) identifier_working_dir (None) None )default_parameter )parameters (block (if_statement (not_operator (identifier_output_filepath) identifier_output_filepath )not_operator (block (expression_statement (assignment (pattern_list (identifier__) identifier__ (identifier_output_filepath) identifier_output_filepath )pattern_list (call (identifier_mkstemp) identifier_mkstemp (argument_list (keyword_argument (identifier_prefix) identifier_prefix (string_'usearch_cluster_err_corrected') string_'usearch_cluster_err_corrected' )keyword_argument (keyword_argument (identifier_suffix) identifier_suffix (string_'.fasta') string_'.fasta' )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_log_filepath) identifier_log_filepath (call (identifier_join) identifier_join (argument_list (identifier_working_dir) identifier_working_dir (identifier_log_name) identifier_log_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_params) identifier_params (dictionary (pair (string_'--sizein') string_'--sizein' (identifier_sizein) identifier_sizein )pair (pair (string_'--sizeout') string_'--sizeout' (identifier_sizeout) identifier_sizeout )pair (pair (string_'--id') string_'--id' (identifier_percent_id_err) identifier_percent_id_err )pair (pair (string_'--w') string_'--w' (identifier_w) identifier_w )pair (pair (string_'--slots') string_'--slots' (identifier_slots) identifier_slots )pair (pair (string_'--maxrejects') string_'--maxrejects' (identifier_maxrejects) identifier_maxrejects )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_app) identifier_app (call (identifier_Usearch) identifier_Usearch (argument_list (identifier_params) identifier_params (keyword_argument (identifier_WorkingDir) identifier_WorkingDir (identifier_working_dir) identifier_working_dir )keyword_argument (keyword_argument (identifier_HALT_EXEC) identifier_HALT_EXEC (identifier_HALT_EXEC) identifier_HALT_EXEC )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (identifier_usersort) identifier_usersort (block (expression_statement (call (attribute (subscript (attribute (identifier_app) identifier_app (identifier_Parameters) identifier_Parameters )attribute (string_'--usersort') string_'--usersort' )subscript (identifier_on) identifier_on )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_data) identifier_data (dictionary (pair (string_'--cluster') string_'--cluster' (identifier_fasta_filepath) identifier_fasta_filepath )pair (pair (string_'--consout') string_'--consout' (identifier_output_filepath) identifier_output_filepath )pair )dictionary )assignment )expression_statement (if_statement (not_operator (identifier_remove_usearch_logs) identifier_remove_usearch_logs )not_operator (block (expression_statement (assignment (subscript (identifier_data) identifier_data (string_'--log') string_'--log' )subscript (identifier_log_filepath) identifier_log_filepath )assignment )expression_statement )block )if_statement (if_statement (identifier_output_uc_filepath) identifier_output_uc_filepath (block (expression_statement (assignment (subscript (identifier_data) identifier_data (string_'--uc') string_'--uc' )subscript (identifier_output_uc_filepath) identifier_output_uc_filepath )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_app_result) identifier_app_result (call (identifier_app) identifier_app (argument_list (identifier_data) identifier_data )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_app_result) identifier_app_result (identifier_output_filepath) identifier_output_filepath )expression_list )return_statement )block )function_definition )module
Cluster for err. correction at percent_id_err, output consensus fasta fasta_filepath = input fasta file, generally a dereplicated fasta output_filepath = output error corrected fasta filepath percent_id_err = minimum identity percent. sizein = not defined in usearch helpstring sizeout = not defined in usearch helpstring w = Word length for U-sorting slots = Size of compressed index table. Should be prime, e.g. 40000003. Should also specify --w, typical is --w 16 or --w 32. maxrejects = Max rejected targets, 0=ignore, default 32. log_name = string specifying output log name usersort = Enable if input fasta not sorted by length purposefully, lest usearch will raise an error. HALT_EXEC: Used for debugging app controller save_intermediate_files: Preserve all intermediate files created.
(module (function_definition (function_name_render_to_response) function_name_render_to_response (parameters (identifier_self) identifier_self (identifier_template_name) identifier_template_name (identifier___data) identifier___data (default_parameter (identifier_content_type) identifier_content_type (string_"text/html") string_"text/html" )default_parameter )parameters (block (expression_statement (assignment (identifier_resp) identifier_resp (call (attribute (identifier_self) identifier_self (identifier_render) identifier_render )attribute (argument_list (identifier_template_name) identifier_template_name (identifier___data) identifier___data )argument_list )call )assignment )expression_statement (return_statement (call (identifier_Response) identifier_Response (argument_list (identifier_resp) identifier_resp (keyword_argument (identifier_content_type) identifier_content_type (identifier_content_type) identifier_content_type )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Given a template name and template data. Renders a template and returns `webob.Response` object
(module (function_definition (function_name_get_comments_of_confirmation_per_page) function_name_get_comments_of_confirmation_per_page (parameters (identifier_self) identifier_self (identifier_confirmation_id) identifier_confirmation_id (default_parameter (identifier_per_page) identifier_per_page (integer_1000) integer_1000 )default_parameter (default_parameter (identifier_page) identifier_page (integer_1) integer_1 )default_parameter )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__get_resource_per_page) identifier__get_resource_per_page )attribute (argument_list (keyword_argument (identifier_resource) identifier_resource (identifier_CONFIRMATION_COMMENTS) identifier_CONFIRMATION_COMMENTS )keyword_argument (keyword_argument (identifier_per_page) identifier_per_page (identifier_per_page) identifier_per_page )keyword_argument (keyword_argument (identifier_page) identifier_page (identifier_page) identifier_page )keyword_argument (keyword_argument (identifier_params) identifier_params (dictionary (pair (string_'confirmation_id') string_'confirmation_id' (identifier_confirmation_id) identifier_confirmation_id )pair )dictionary )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Get comments of confirmation per page :param confirmation_id: the confirmation id :param per_page: How many objects per page. Default: 1000 :param page: Which page. Default: 1 :return: list
(module (function_definition (function_name_on_new_line) function_name_on_new_line (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_set_cursor_position) identifier_set_cursor_position )attribute (argument_list (string_'eof') string_'eof' )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_current_prompt_pos) identifier_current_prompt_pos )attribute (call (attribute (identifier_self) identifier_self (identifier_get_position) identifier_get_position )attribute (argument_list (string_'cursor') string_'cursor' )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_new_input_line) identifier_new_input_line )attribute (False) False )assignment )expression_statement )block )function_definition )module
On new input line
(module (function_definition (function_name_compute_ecc_hash) function_name_compute_ecc_hash (parameters (identifier_ecc_manager) identifier_ecc_manager (identifier_hasher) identifier_hasher (identifier_buf) identifier_buf (identifier_max_block_size) identifier_max_block_size (identifier_rate) identifier_rate (default_parameter (identifier_message_size) identifier_message_size (None) None )default_parameter (default_parameter (identifier_as_string) identifier_as_string (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_result) identifier_result (list )list )assignment )expression_statement (if_statement (not_operator (identifier_message_size) identifier_message_size )not_operator (block (expression_statement (assignment (identifier_ecc_params) identifier_ecc_params (call (identifier_compute_ecc_params) identifier_compute_ecc_params (argument_list (identifier_max_block_size) identifier_max_block_size (identifier_rate) identifier_rate (identifier_hasher) identifier_hasher )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_message_size) identifier_message_size (subscript (identifier_ecc_params) identifier_ecc_params (string_"message_size") string_"message_size" )subscript )assignment )expression_statement )block )if_statement (for_statement (identifier_i) identifier_i (call (identifier_xrange) identifier_xrange (argument_list (integer_0) integer_0 (call (identifier_len) identifier_len (argument_list (identifier_buf) identifier_buf )argument_list )call (identifier_message_size) identifier_message_size )argument_list )call (block (expression_statement (assignment (identifier_mes) identifier_mes (subscript (identifier_buf) identifier_buf (slice (identifier_i) identifier_i (colon) colon (binary_operator (identifier_i) identifier_i (identifier_message_size) identifier_message_size )binary_operator )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_ecc) identifier_ecc (call (attribute (identifier_ecc_manager) identifier_ecc_manager (identifier_encode) identifier_encode )attribute (argument_list (identifier_mes) identifier_mes )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_hash) identifier_hash (call (attribute (identifier_hasher) identifier_hasher (identifier_hash) identifier_hash )attribute (argument_list (identifier_mes) identifier_mes )argument_list )call )assignment )expression_statement (if_statement (identifier_as_string) identifier_as_string (block (expression_statement (call (attribute (identifier_result) identifier_result (identifier_append) identifier_append )attribute (argument_list (binary_operator (string_"%s%s") string_"%s%s" (tuple (call (identifier_str) identifier_str (argument_list (identifier_hash) identifier_hash )argument_list )call (call (identifier_str) identifier_str (argument_list (identifier_ecc) identifier_ecc )argument_list )call )tuple )binary_operator )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_result) identifier_result (identifier_append) identifier_append )attribute (argument_list (list (identifier_hash) identifier_hash (identifier_ecc) identifier_ecc )list )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Split a string in blocks given max_block_size and compute the hash and ecc for each block, and then return a nice list with both for easy processing.
(module (function_definition (function_name_context_list_users) function_name_context_list_users (parameters (identifier_zap_helper) identifier_zap_helper (identifier_context_name) identifier_context_name )parameters (block (with_statement (with_clause (with_item (call (identifier_zap_error_handler) identifier_zap_error_handler (argument_list )argument_list )call )with_item )with_clause (block (expression_statement (assignment (identifier_info) identifier_info (call (attribute (identifier_zap_helper) identifier_zap_helper (identifier_get_context_info) identifier_get_context_info )attribute (argument_list (identifier_context_name) identifier_context_name )argument_list )call )assignment )expression_statement )block )with_statement (expression_statement (assignment (identifier_users) identifier_users (call (attribute (attribute (attribute (identifier_zap_helper) identifier_zap_helper (identifier_zap) identifier_zap )attribute (identifier_users) identifier_users )attribute (identifier_users_list) identifier_users_list )attribute (argument_list (subscript (identifier_info) identifier_info (string_'id') string_'id' )subscript )argument_list )call )assignment )expression_statement (if_statement (call (identifier_len) identifier_len (argument_list (identifier_users) identifier_users )argument_list )call (block (expression_statement (assignment (identifier_user_list) identifier_user_list (call (attribute (string_', ') string_', ' (identifier_join) identifier_join )attribute (argument_list (list_comprehension (subscript (identifier_user) identifier_user (string_'name') string_'name' )subscript (for_in_clause (identifier_user) identifier_user (identifier_users) identifier_users )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_console) identifier_console (identifier_info) identifier_info )attribute (argument_list (call (attribute (string_'Available users for the context {0}: {1}') string_'Available users for the context {0}: {1}' (identifier_format) identifier_format )attribute (argument_list (identifier_context_name) identifier_context_name (identifier_user_list) identifier_user_list )argument_list )call )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_console) identifier_console (identifier_info) identifier_info )attribute (argument_list (call (attribute (string_'No users configured for the context {}') string_'No users configured for the context {}' (identifier_format) identifier_format )attribute (argument_list (identifier_context_name) identifier_context_name )argument_list )call )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
List the users available for a given context.
(module (function_definition (function_name_add_job_from_json) function_name_add_job_from_json (parameters (identifier_self) identifier_self (identifier_job_json) identifier_job_json (default_parameter (identifier_destructive) identifier_destructive (False) False )default_parameter )parameters (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_'Importing job from JSON document: {0}') string_'Importing job from JSON document: {0}' (identifier_format) identifier_format )attribute (argument_list (identifier_job_json) identifier_job_json )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_rec) identifier_rec (call (attribute (attribute (identifier_self) identifier_self (identifier_backend) identifier_backend )attribute (identifier_decode_import_json) identifier_decode_import_json )attribute (argument_list (identifier_job_json) identifier_job_json )argument_list )call )assignment )expression_statement (if_statement (identifier_destructive) identifier_destructive (block (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_delete_job) identifier_delete_job )attribute (argument_list (subscript (identifier_rec) identifier_rec (string_'name') string_'name' )subscript )argument_list )call )expression_statement )block (except_clause (identifier_DagobahError) identifier_DagobahError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__add_job_from_spec) identifier__add_job_from_spec )attribute (argument_list (identifier_rec) identifier_rec (keyword_argument (identifier_use_job_id) identifier_use_job_id (False) False )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_commit) identifier_commit )attribute (argument_list (keyword_argument (identifier_cascade) identifier_cascade (True) True )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Construct a new Job from an imported JSON spec.
(module (function_definition (function_name_get_last_lineno) function_name_get_last_lineno (parameters (identifier_node) identifier_node )parameters (block (expression_statement (assignment (identifier_max_lineno) identifier_max_lineno (integer_0) integer_0 )assignment )expression_statement (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_node) identifier_node (string_"lineno") string_"lineno" )argument_list )call (block (expression_statement (assignment (identifier_max_lineno) identifier_max_lineno (attribute (identifier_node) identifier_node (identifier_lineno) identifier_lineno )attribute )assignment )expression_statement )block )if_statement (for_statement (pattern_list (identifier__) identifier__ (identifier_field) identifier_field )pattern_list (call (attribute (identifier_ast) identifier_ast (identifier_iter_fields) identifier_iter_fields )attribute (argument_list (identifier_node) identifier_node )argument_list )call (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_field) identifier_field (identifier_list) identifier_list )argument_list )call (block (for_statement (identifier_value) identifier_value (identifier_field) identifier_field (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (attribute (identifier_ast) identifier_ast (identifier_AST) identifier_AST )attribute )argument_list )call (block (expression_statement (assignment (identifier_max_lineno) identifier_max_lineno (call (identifier_max) identifier_max (argument_list (identifier_max_lineno) identifier_max_lineno (call (identifier_get_last_lineno) identifier_get_last_lineno (argument_list (identifier_value) identifier_value )argument_list )call )argument_list )call )assignment )expression_statement )block )if_statement )block )for_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_field) identifier_field (attribute (identifier_ast) identifier_ast (identifier_AST) identifier_AST )attribute )argument_list )call (block (expression_statement (assignment (identifier_max_lineno) identifier_max_lineno (call (identifier_max) identifier_max (argument_list (identifier_max_lineno) identifier_max_lineno (call (identifier_get_last_lineno) identifier_get_last_lineno (argument_list (identifier_field) identifier_field )argument_list )call )argument_list )call )assignment )expression_statement )block )elif_clause )if_statement )block )for_statement (return_statement (identifier_max_lineno) identifier_max_lineno )return_statement )block )function_definition )module
Recursively find the last line number of the ast node.
(module (function_definition (function_name_drain) function_name_drain (parameters (identifier_iterable) identifier_iterable )parameters (block (if_statement (call (identifier_getattr) identifier_getattr (argument_list (identifier_iterable) identifier_iterable (string_"popleft") string_"popleft" (False) False )argument_list )call (block (function_definition (function_name_next_item) function_name_next_item (parameters (identifier_coll) identifier_coll )parameters (block (return_statement (call (attribute (identifier_coll) identifier_coll (identifier_popleft) identifier_popleft )attribute (argument_list )argument_list )call )return_statement )block )function_definition )block (elif_clause (call (identifier_getattr) identifier_getattr (argument_list (identifier_iterable) identifier_iterable (string_"popitem") string_"popitem" (False) False )argument_list )call (block (function_definition (function_name_next_item) function_name_next_item (parameters (identifier_coll) identifier_coll )parameters (block (return_statement (call (attribute (identifier_coll) identifier_coll (identifier_popitem) identifier_popitem )attribute (argument_list )argument_list )call )return_statement )block )function_definition )block )elif_clause (else_clause (block (function_definition (function_name_next_item) function_name_next_item (parameters (identifier_coll) identifier_coll )parameters (block (return_statement (call (attribute (identifier_coll) identifier_coll (identifier_pop) identifier_pop )attribute (argument_list )argument_list )call )return_statement )block )function_definition )block )else_clause )if_statement (while_statement (True) True (block (try_statement (block (expression_statement (yield (call (identifier_next_item) identifier_next_item (argument_list (identifier_iterable) identifier_iterable )argument_list )call )yield )expression_statement )block (except_clause (tuple (identifier_IndexError) identifier_IndexError (identifier_KeyError) identifier_KeyError )tuple (block (raise_statement (identifier_StopIteration) identifier_StopIteration )raise_statement )block )except_clause )try_statement )block )while_statement )block )function_definition )module
Helper method that empties an iterable as it is iterated over. Works for: * ``dict`` * ``collections.deque`` * ``list`` * ``set``
(module (function_definition (function_name_has_changed) function_name_has_changed (parameters (identifier_filename) identifier_filename )parameters (block (expression_statement (assignment (identifier_key) identifier_key (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_abspath) identifier_abspath )attribute (argument_list (identifier_filename) identifier_filename )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_mtime) identifier_mtime (call (identifier_get_mtime) identifier_get_mtime (argument_list (identifier_key) identifier_key )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_key) identifier_key (identifier__mtime_cache) identifier__mtime_cache )comparison_operator (block (expression_statement (assignment (subscript (identifier__mtime_cache) identifier__mtime_cache (identifier_key) identifier_key )subscript (identifier_mtime) identifier_mtime )assignment )expression_statement (return_statement (True) True )return_statement )block )if_statement (return_statement (comparison_operator (identifier_mtime) identifier_mtime (subscript (identifier__mtime_cache) identifier__mtime_cache (identifier_key) identifier_key )subscript )comparison_operator )return_statement )block )function_definition )module
Check if filename has changed since the last check. If this is the first check, assume the file is changed.
(module (function_definition (function_name_load_entry_points) function_name_load_entry_points (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_entry_point_group) identifier_entry_point_group )attribute (block (expression_statement (assignment (identifier_task_packages) identifier_task_packages (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_item) identifier_item (call (attribute (identifier_pkg_resources) identifier_pkg_resources (identifier_iter_entry_points) identifier_iter_entry_points )attribute (argument_list (keyword_argument (identifier_group) identifier_group (attribute (identifier_self) identifier_self (identifier_entry_point_group) identifier_entry_point_group )attribute )keyword_argument )argument_list )call (block (try_statement (block (expression_statement (assignment (pattern_list (identifier_pkg) identifier_pkg (identifier_related_name) identifier_related_name )pattern_list (call (attribute (attribute (identifier_item) identifier_item (identifier_module_name) identifier_module_name )attribute (identifier_rsplit) identifier_rsplit )attribute (argument_list (string_'.') string_'.' (integer_1) integer_1 )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (expression_statement (call (attribute (identifier_warnings) identifier_warnings (identifier_warn) identifier_warn )attribute (argument_list (call (attribute (concatenated_string (string_'The celery task module "{}" was not loaded. ') string_'The celery task module "{}" was not loaded. ' (string_'Defining modules in bare Python modules is no longer ') string_'Defining modules in bare Python modules is no longer ' (string_'supported due to Celery v4.2 constraints. Please ') string_'supported due to Celery v4.2 constraints. Please ' (string_'move the module into a Python package.') string_'move the module into a Python package.' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_item) identifier_item (identifier_module_name) identifier_module_name )attribute )argument_list )call (identifier_RuntimeWarning) identifier_RuntimeWarning )argument_list )call )expression_statement (continue_statement )continue_statement )block )except_clause )try_statement (if_statement (comparison_operator (identifier_related_name) identifier_related_name (identifier_task_packages) identifier_task_packages )comparison_operator (block (expression_statement (assignment (subscript (identifier_task_packages) identifier_task_packages (identifier_related_name) identifier_related_name )subscript (list )list )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (subscript (identifier_task_packages) identifier_task_packages (identifier_related_name) identifier_related_name )subscript (identifier_append) identifier_append )attribute (argument_list (identifier_pkg) identifier_pkg )argument_list )call )expression_statement )block )for_statement (if_statement (identifier_task_packages) identifier_task_packages (block (for_statement (pattern_list (identifier_related_name) identifier_related_name (identifier_packages) identifier_packages )pattern_list (call (attribute (identifier_task_packages) identifier_task_packages (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_celery) identifier_celery )attribute (identifier_autodiscover_tasks) identifier_autodiscover_tasks )attribute (argument_list (identifier_packages) identifier_packages (keyword_argument (identifier_related_name) identifier_related_name (identifier_related_name) identifier_related_name )keyword_argument (keyword_argument (identifier_force) identifier_force (True) True )keyword_argument )argument_list )call )expression_statement )block )for_statement )block )if_statement )block )if_statement )block )function_definition )module
Load tasks from entry points.
(module (function_definition (function_name__get_jvm_opts) function_name__get_jvm_opts (parameters (identifier_out_file) identifier_out_file (identifier_data) identifier_data )parameters (block (expression_statement (assignment (identifier_resources) identifier_resources (call (attribute (identifier_config_utils) identifier_config_utils (identifier_get_resources) identifier_get_resources )attribute (argument_list (string_"purple") string_"purple" (subscript (identifier_data) identifier_data (string_"config") string_"config" )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_jvm_opts) identifier_jvm_opts (call (attribute (identifier_resources) identifier_resources (identifier_get) identifier_get )attribute (argument_list (string_"jvm_opts") string_"jvm_opts" (list (string_"-Xms750m") string_"-Xms750m" (string_"-Xmx3500m") string_"-Xmx3500m" )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_jvm_opts) identifier_jvm_opts (call (attribute (identifier_config_utils) identifier_config_utils (identifier_adjust_opts) identifier_adjust_opts )attribute (argument_list (identifier_jvm_opts) identifier_jvm_opts (dictionary (pair (string_"algorithm") string_"algorithm" (dictionary (pair (string_"memory_adjust") string_"memory_adjust" (dictionary (pair (string_"direction") string_"direction" (string_"increase") string_"increase" )pair (pair (string_"maximum") string_"maximum" (string_"30000M") string_"30000M" )pair (pair (string_"magnitude") string_"magnitude" (call (attribute (identifier_dd) identifier_dd (identifier_get_cores) identifier_get_cores )attribute (argument_list (identifier_data) identifier_data )argument_list )call )pair )dictionary )pair )dictionary )pair )dictionary )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_jvm_opts) identifier_jvm_opts (call (attribute (identifier_broad) identifier_broad (identifier_get_default_jvm_opts) identifier_get_default_jvm_opts )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (identifier_out_file) identifier_out_file )argument_list )call )argument_list )call )augmented_assignment )expression_statement (return_statement (identifier_jvm_opts) identifier_jvm_opts )return_statement )block )function_definition )module
Retrieve Java options, adjusting memory for available cores.
(module (function_definition (function_name___json) function_name___json (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_exclude_list) identifier_exclude_list )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_exclude_list) identifier_exclude_list )attribute (list )list )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_fields) identifier_fields (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_item) identifier_item )pattern_list (call (attribute (call (identifier_vars) identifier_vars (argument_list (identifier_self) identifier_self )argument_list )call (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_self) identifier_self (string_'_sa_instance_state') string_'_sa_instance_state' )argument_list )call (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (call (attribute (attribute (identifier_orm) identifier_orm (identifier_attributes) identifier_attributes )attribute (identifier_instance_state) identifier_instance_state )attribute (argument_list (identifier_self) identifier_self )argument_list )call (identifier_unloaded) identifier_unloaded )attribute )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_mapper) identifier_mapper (call (identifier_inspect) identifier_inspect (argument_list (identifier_self) identifier_self )argument_list )call )assignment )expression_statement (for_statement (identifier_column) identifier_column (attribute (identifier_mapper) identifier_mapper (identifier_attrs) identifier_attrs )attribute (block (expression_statement (attribute (identifier_column) identifier_column (identifier_key) identifier_key )attribute )expression_statement (expression_statement (attribute (identifier_column) identifier_column (identifier_value) identifier_value )attribute )expression_statement )block )for_statement )block )if_statement )block )if_statement (if_statement (boolean_operator (call (attribute (call (identifier_str) identifier_str (argument_list (identifier_key) identifier_key )argument_list )call (identifier_startswith) identifier_startswith )attribute (argument_list (string_'_') string_'_' )argument_list )call (comparison_operator (identifier_key) identifier_key (attribute (identifier_self) identifier_self (identifier_exclude_list) identifier_exclude_list )attribute )comparison_operator )boolean_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (subscript (identifier_fields) identifier_fields (identifier_key) identifier_key )subscript (identifier_item) identifier_item )assignment )expression_statement )block )for_statement (expression_statement (assignment (identifier_obj) identifier_obj (call (attribute (identifier_Json) identifier_Json (identifier_safe_object) identifier_safe_object )attribute (argument_list (identifier_fields) identifier_fields )argument_list )call )assignment )expression_statement (return_statement (call (identifier_str) identifier_str (argument_list (identifier_obj) identifier_obj )argument_list )call )return_statement )block )function_definition )module
Using the exclude lists, convert fields to a string.
(module (function_definition (function_name__TemplateExists) function_name__TemplateExists (parameters (identifier_unused_value) identifier_unused_value (identifier_context) identifier_context (identifier_args) identifier_args )parameters (block (try_statement (block (expression_statement (assignment (identifier_name) identifier_name (subscript (identifier_args) identifier_args (integer_0) integer_0 )subscript )assignment )expression_statement )block (except_clause (identifier_IndexError) identifier_IndexError (block (raise_statement (call (identifier_EvaluationError) identifier_EvaluationError (argument_list (string_'The "template" predicate requires an argument.') string_'The "template" predicate requires an argument.' )argument_list )call )raise_statement )block )except_clause )try_statement (return_statement (call (attribute (identifier_context) identifier_context (identifier_HasTemplate) identifier_HasTemplate )attribute (argument_list (identifier_name) identifier_name )argument_list )call )return_statement )block )function_definition )module
Returns whether the given name is in the current Template's template group.
(module (function_definition (function_name_read_comment) function_name_read_comment (parameters (identifier_self) identifier_self (typed_parameter (identifier_start) identifier_start (type (identifier_int) identifier_int )type )typed_parameter (typed_parameter (identifier_line) identifier_line (type (identifier_int) identifier_int )type )typed_parameter (typed_parameter (identifier_col) identifier_col (type (identifier_int) identifier_int )type )typed_parameter (typed_parameter (identifier_prev) identifier_prev (type (identifier_Token) identifier_Token )type )typed_parameter )parameters (type (identifier_Token) identifier_Token )type (block (expression_statement (assignment (identifier_body) identifier_body (attribute (attribute (identifier_self) identifier_self (identifier_source) identifier_source )attribute (identifier_body) identifier_body )attribute )assignment )expression_statement (expression_statement (assignment (identifier_body_length) identifier_body_length (call (identifier_len) identifier_len (argument_list (identifier_body) identifier_body )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_position) identifier_position (identifier_start) identifier_start )assignment )expression_statement (while_statement (True) True (block (expression_statement (augmented_assignment (identifier_position) identifier_position (integer_1) integer_1 )augmented_assignment )expression_statement (if_statement (comparison_operator (identifier_position) identifier_position (identifier_body_length) identifier_body_length )comparison_operator (block (break_statement )break_statement )block )if_statement (expression_statement (assignment (identifier_char) identifier_char (subscript (identifier_body) identifier_body (identifier_position) identifier_position )subscript )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_char) identifier_char (string_" ") string_" " )comparison_operator (comparison_operator (identifier_char) identifier_char (string_"\t") string_"\t" )comparison_operator )boolean_operator (block (break_statement )break_statement )block )if_statement )block )while_statement (return_statement (call (identifier_Token) identifier_Token (argument_list (attribute (identifier_TokenKind) identifier_TokenKind (identifier_COMMENT) identifier_COMMENT )attribute (identifier_start) identifier_start (identifier_position) identifier_position (identifier_line) identifier_line (identifier_col) identifier_col (identifier_prev) identifier_prev (subscript (identifier_body) identifier_body (slice (binary_operator (identifier_start) identifier_start (integer_1) integer_1 )binary_operator (colon) colon (identifier_position) identifier_position )slice )subscript )argument_list )call )return_statement )block )function_definition )module
Read a comment token from the source file.
(module (function_definition (function_name_create) function_name_create (parameters (dictionary_splat_pattern (identifier_data) identifier_data )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_http_client) identifier_http_client (call (identifier_HttpClient) identifier_HttpClient (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_response) identifier_response (identifier__) identifier__ )pattern_list (call (attribute (identifier_http_client) identifier_http_client (identifier_post) identifier_post )attribute (argument_list (call (attribute (identifier_routes) identifier_routes (identifier_url) identifier_url )attribute (argument_list (attribute (identifier_routes) identifier_routes (identifier_PAYMENT_RESOURCE) identifier_PAYMENT_RESOURCE )attribute )argument_list )call (identifier_data) identifier_data )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_resources) identifier_resources (identifier_Payment) identifier_Payment )attribute (argument_list (dictionary_splat (identifier_response) identifier_response )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Create a Payment request. :param data: data required to create the payment :return: The payment resource :rtype resources.Payment
(module (function_definition (function_name_related_obj_to_dict) function_name_related_obj_to_dict (parameters (identifier_obj) identifier_obj (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (call (attribute (identifier_kwargs) identifier_kwargs (identifier_pop) identifier_pop )attribute (argument_list (string_'formatter') string_'formatter' (None) None )argument_list )call )expression_statement (expression_statement (assignment (identifier_suppress_private_attr) identifier_suppress_private_attr (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_"suppress_private_attr") string_"suppress_private_attr" (False) False )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_suppress_empty_values) identifier_suppress_empty_values (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_"suppress_empty_values") string_"suppress_empty_values" (False) False )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_attrs) identifier_attrs (call (identifier_fields) identifier_fields (argument_list (attribute (identifier_obj) identifier_obj (identifier___class__) identifier___class__ )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_return_dict) identifier_return_dict (call (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_"dict_factory") string_"dict_factory" (identifier_OrderedDict) identifier_OrderedDict )argument_list )call (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_a) identifier_a (identifier_attrs) identifier_attrs (block (if_statement (boolean_operator (identifier_suppress_private_attr) identifier_suppress_private_attr (call (attribute (attribute (identifier_a) identifier_a (identifier_name) identifier_name )attribute (identifier_startswith) identifier_startswith )attribute (argument_list (string_"_") string_"_" )argument_list )call )boolean_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_metadata) identifier_metadata (boolean_operator (attribute (identifier_a) identifier_a (identifier_metadata) identifier_metadata )attribute (dictionary )dictionary )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_formatter) identifier_formatter (call (attribute (identifier_metadata) identifier_metadata (identifier_get) identifier_get )attribute (argument_list (string_'formatter') string_'formatter' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_value) identifier_value (call (identifier_getattr) identifier_getattr (argument_list (identifier_obj) identifier_obj (attribute (identifier_a) identifier_a (identifier_name) identifier_name )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_value) identifier_value (call (identifier_to_dict) identifier_to_dict (argument_list (identifier_value) identifier_value (keyword_argument (identifier_formatter) identifier_formatter (identifier_formatter) identifier_formatter )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_suppress_empty_values) identifier_suppress_empty_values (comparison_operator (identifier_value) identifier_value (None) None )comparison_operator )boolean_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_key_name) identifier_key_name (boolean_operator (call (attribute (attribute (identifier_a) identifier_a (identifier_metadata) identifier_metadata )attribute (identifier_get) identifier_get )attribute (argument_list (string_'key') string_'key' )argument_list )call (attribute (identifier_a) identifier_a (identifier_name) identifier_name )attribute )boolean_operator )assignment )expression_statement (expression_statement (assignment (subscript (identifier_return_dict) identifier_return_dict (identifier_key_name) identifier_key_name )subscript (identifier_value) identifier_value )assignment )expression_statement )block )for_statement (return_statement (identifier_return_dict) identifier_return_dict )return_statement )block )function_definition )module
Covert a known related object to a dictionary.
(module (function_definition (function_name_protocol_str) function_name_protocol_str (parameters (identifier_protocol) identifier_protocol )parameters (block (if_statement (comparison_operator (identifier_protocol) identifier_protocol (attribute (identifier_const) identifier_const (identifier_PROTOCOL_MRP) identifier_PROTOCOL_MRP )attribute )comparison_operator (block (return_statement (string_'MRP') string_'MRP' )return_statement )block )if_statement (if_statement (comparison_operator (identifier_protocol) identifier_protocol (attribute (identifier_const) identifier_const (identifier_PROTOCOL_DMAP) identifier_PROTOCOL_DMAP )attribute )comparison_operator (block (return_statement (string_'DMAP') string_'DMAP' )return_statement )block )if_statement (if_statement (comparison_operator (identifier_protocol) identifier_protocol (attribute (identifier_const) identifier_const (identifier_PROTOCOL_AIRPLAY) identifier_PROTOCOL_AIRPLAY )attribute )comparison_operator (block (return_statement (string_'AirPlay') string_'AirPlay' )return_statement )block )if_statement (return_statement (string_'Unknown') string_'Unknown' )return_statement )block )function_definition )module
Convert internal API protocol to string.
(module (function_definition (function_name__cellrepr) function_name__cellrepr (parameters (identifier_value) identifier_value (identifier_allow_formulas) identifier_allow_formulas )parameters (block (if_statement (comparison_operator (call (attribute (identifier_pd) identifier_pd (identifier_isnull) identifier_isnull )attribute (argument_list (identifier_value) identifier_value )argument_list )call (True) True )comparison_operator (block (return_statement (string_"") string_"" )return_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (identifier_float) identifier_float )argument_list )call (block (expression_statement (assignment (identifier_value) identifier_value (call (identifier_repr) identifier_repr (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_value) identifier_value (call (identifier_str) identifier_str (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (if_statement (boolean_operator (parenthesized_expression (not_operator (identifier_allow_formulas) identifier_allow_formulas )not_operator )parenthesized_expression (call (attribute (identifier_value) identifier_value (identifier_startswith) identifier_startswith )attribute (argument_list (string_'=') string_'=' )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_value) identifier_value (binary_operator (string_"'%s") string_"'%s" (identifier_value) identifier_value )binary_operator )assignment )expression_statement )block )if_statement (return_statement (identifier_value) identifier_value )return_statement )block )function_definition )module
Get a string representation of dataframe value. :param :value: the value to represent :param :allow_formulas: if True, allow values starting with '=' to be interpreted as formulas; otherwise, escape them with an apostrophe to avoid formula interpretation.
(module (function_definition (function_name_clean_title) function_name_clean_title (parameters (identifier_title) identifier_title )parameters (block (expression_statement (assignment (identifier_date_pattern) identifier_date_pattern (call (attribute (identifier_re) identifier_re (identifier_compile) identifier_compile )attribute (argument_list (concatenated_string (string_r'\W*') string_r'\W*' (string_r'\d{1,2}') string_r'\d{1,2}' (string_r'[/\-.]') string_r'[/\-.]' (string_r'\d{1,2}') string_r'\d{1,2}' (string_r'[/\-.]') string_r'[/\-.]' (string_r'(?=\d*)(?:.{4}|.{2})') string_r'(?=\d*)(?:.{4}|.{2})' (string_r'\W*') string_r'\W*' )concatenated_string )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_title) identifier_title (call (attribute (identifier_date_pattern) identifier_date_pattern (identifier_sub) identifier_sub )attribute (argument_list (string_' ') string_' ' (identifier_title) identifier_title )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_title) identifier_title (call (attribute (identifier_re) identifier_re (identifier_sub) identifier_sub )attribute (argument_list (string_r'\s{2,}') string_r'\s{2,}' (string_' ') string_' ' (identifier_title) identifier_title )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_title) identifier_title (call (attribute (identifier_title) identifier_title (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (identifier_title) identifier_title )return_statement )block )function_definition )module
Clean title -> remove dates, remove duplicated spaces and strip title. Args: title (str): Title. Returns: str: Clean title without dates, duplicated, trailing and leading spaces.
(module (function_definition (function_name__secret_yaml) function_name__secret_yaml (parameters (identifier_loader) identifier_loader (identifier_node) identifier_node )parameters (block (expression_statement (assignment (identifier_fname) identifier_fname (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 (attribute (identifier_loader) identifier_loader (identifier_name) identifier_name )attribute )argument_list )call (string_"secrets.yaml") string_"secrets.yaml" )argument_list )call )assignment )expression_statement (try_statement (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_fname) identifier_fname (keyword_argument (identifier_encoding) identifier_encoding (string_"utf-8") string_"utf-8" )keyword_argument )argument_list )call (as_pattern_target (identifier_secret_file) identifier_secret_file )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_secrets) identifier_secrets (call (attribute (call (identifier_YAML) identifier_YAML (argument_list (keyword_argument (identifier_typ) identifier_typ (string_"safe") string_"safe" )keyword_argument )argument_list )call (identifier_load) identifier_load )attribute (argument_list (identifier_secret_file) identifier_secret_file )argument_list )call )assignment )expression_statement )block )with_statement )block (except_clause (identifier_FileNotFoundError) identifier_FileNotFoundError (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"Secrets file {} not found") string_"Secrets file {} not found" (identifier_format) identifier_format )attribute (argument_list (identifier_fname) identifier_fname )argument_list )call )argument_list )call (None) None )raise_statement )block )except_clause )try_statement (try_statement (block (return_statement (subscript (identifier_secrets) identifier_secrets (attribute (identifier_node) identifier_node (identifier_value) identifier_value )attribute )subscript )return_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"Secret {} not found") string_"Secret {} not found" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_node) identifier_node (identifier_value) identifier_value )attribute )argument_list )call )argument_list )call (None) None )raise_statement )block )except_clause )try_statement )block )function_definition )module
Load secrets and embed it into the configuration YAML.
(module (function_definition (function_name_decimal) function_name_decimal (parameters (identifier_self) identifier_self (identifier_var) identifier_var (default_parameter (identifier_default) identifier_default (identifier_NOTSET) identifier_NOTSET )default_parameter (default_parameter (identifier_force) identifier_force (True) True )default_parameter )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__get) identifier__get )attribute (argument_list (identifier_var) identifier_var (keyword_argument (identifier_default) identifier_default (identifier_default) identifier_default )keyword_argument (keyword_argument (identifier_cast) identifier_cast (identifier_Decimal) identifier_Decimal )keyword_argument (keyword_argument (identifier_force) identifier_force (identifier_force) identifier_force )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Convenience method for casting to a decimal.Decimal Note: Casting
(module (function_definition (function_name_error) function_name_error (parameters (identifier_self) identifier_self (default_parameter (identifier_reason) identifier_reason (None) None )default_parameter )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_set_status) identifier_set_status )attribute (argument_list (attribute (identifier_Report) identifier_Report (identifier_ERROR) identifier_ERROR )attribute )argument_list )call )expression_statement (if_statement (identifier_reason) identifier_reason (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add) identifier_add )attribute (argument_list (string_'reason') string_'reason' (identifier_reason) identifier_reason )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Set the test status to Report.ERROR, and set the error reason :param reason: error reason (default: None)
(module (function_definition (function_name_authenticate) function_name_authenticate (parameters (identifier_self) identifier_self (default_parameter (identifier_username) identifier_username (None) None )default_parameter (default_parameter (identifier_password) identifier_password (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_u) identifier_u (attribute (identifier_self) identifier_self (identifier_username) identifier_username )attribute )assignment )expression_statement (expression_statement (assignment (identifier_p) identifier_p (attribute (identifier_self) identifier_self (identifier_password) identifier_password )attribute )assignment )expression_statement (if_statement (boolean_operator (identifier_username) identifier_username (identifier_password) identifier_password )boolean_operator (block (expression_statement (assignment (identifier_u) identifier_u (identifier_username) identifier_username )assignment )expression_statement (expression_statement (assignment (identifier_p) identifier_p (identifier_password) identifier_password )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_client) identifier_client (call (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_query) identifier_query (call (attribute (identifier_client) identifier_client (identifier_authenticated_query) identifier_authenticated_query )attribute (argument_list (keyword_argument (identifier_username) identifier_username (identifier_u) identifier_u )keyword_argument (keyword_argument (identifier_password) identifier_password (identifier_p) identifier_p )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_res) identifier_res (call (attribute (identifier_client) identifier_client (identifier_post) identifier_post )attribute (argument_list (identifier_query) identifier_query )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ofx) identifier_ofx (call (identifier_BeautifulSoup) identifier_BeautifulSoup (argument_list (identifier_res) identifier_res (string_'lxml') string_'lxml' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_sonrs) identifier_sonrs (call (attribute (identifier_ofx) identifier_ofx (identifier_find) identifier_find )attribute (argument_list (string_'sonrs') string_'sonrs' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_code) identifier_code (call (identifier_int) identifier_int (argument_list (call (attribute (subscript (attribute (call (attribute (identifier_sonrs) identifier_sonrs (identifier_find) identifier_find )attribute (argument_list (string_'code') string_'code' )argument_list )call (identifier_contents) identifier_contents )attribute (integer_0) integer_0 )subscript (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_status) identifier_status (call (attribute (subscript (attribute (call (attribute (identifier_sonrs) identifier_sonrs (identifier_find) identifier_find )attribute (argument_list (string_'message') string_'message' )argument_list )call (identifier_contents) identifier_contents )attribute (integer_0) integer_0 )subscript (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (expression_statement (assignment (identifier_status) identifier_status (string_'') string_'' )assignment )expression_statement )block )except_clause )try_statement (if_statement (comparison_operator (identifier_code) identifier_code (integer_0) integer_0 )comparison_operator (block (return_statement (integer_1) integer_1 )return_statement )block )if_statement (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (identifier_status) identifier_status )argument_list )call )raise_statement )block )function_definition )module
Test the authentication credentials Raises a ``ValueError`` if there is a problem authenticating with the human readable reason given by the institution. :param username: optional username (use self.username by default) :type username: string or None :param password: optional password (use self.password by default) :type password: string or None
(module (function_definition (function_name_slices) function_name_slices (parameters (identifier_src_path) identifier_src_path )parameters (block (expression_statement (assignment (identifier_pages) identifier_pages (call (identifier_list_slices) identifier_list_slices (argument_list (identifier_src_path) identifier_src_path )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_slices) identifier_slices (list )list )assignment )expression_statement (for_statement (identifier_page) identifier_page (identifier_pages) identifier_pages (block (expression_statement (call (attribute (identifier_slices) identifier_slices (identifier_extend) identifier_extend )attribute (argument_list (attribute (identifier_page) identifier_page (identifier_slices) identifier_slices )attribute )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_slices) identifier_slices )return_statement )block )function_definition )module
Return slices as a flat list
(module (function_definition (function_name__get_all_policy_ids) function_name__get_all_policy_ids (parameters (identifier_zap_helper) identifier_zap_helper )parameters (block (expression_statement (assignment (identifier_policies) identifier_policies (call (attribute (attribute (attribute (identifier_zap_helper) identifier_zap_helper (identifier_zap) identifier_zap )attribute (identifier_ascan) identifier_ascan )attribute (identifier_policies) identifier_policies )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (list_comprehension (subscript (identifier_p) identifier_p (string_'id') string_'id' )subscript (for_in_clause (identifier_p) identifier_p (identifier_policies) identifier_policies )for_in_clause )list_comprehension )return_statement )block )function_definition )module
Get all policy IDs.
(module (function_definition (function_name_set_defaults) function_name_set_defaults (parameters (identifier_self) identifier_self )parameters (block (for_statement (pattern_list (identifier_key) identifier_key (identifier_val) identifier_val )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_c_default) identifier_c_default )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__dict) identifier__dict )attribute (identifier_key) identifier_key )subscript (identifier_val) identifier_val )assignment )expression_statement )block )for_statement )block )function_definition )module
Based on specification set a parameters value to the default value.
(module (function_definition (function_name__format_method_nodes) function_name__format_method_nodes (parameters (identifier_self) identifier_self (identifier_task_method) identifier_task_method (identifier_modulename) identifier_modulename (identifier_classname) identifier_classname )parameters (block (expression_statement (assignment (identifier_methodname) identifier_methodname (attribute (identifier_task_method) identifier_task_method (identifier___name__) identifier___name__ )attribute )assignment )expression_statement (expression_statement (assignment (identifier_fullname) identifier_fullname (call (attribute (string_'.') string_'.' (identifier_join) identifier_join )attribute (argument_list (tuple (identifier_modulename) identifier_modulename (identifier_classname) identifier_classname (identifier_methodname) identifier_methodname )tuple )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_signature) identifier_signature (call (identifier_Signature) identifier_Signature (argument_list (identifier_task_method) identifier_task_method (keyword_argument (identifier_bound_method) identifier_bound_method (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_desc_sig_node) identifier_desc_sig_node (call (attribute (identifier_self) identifier_self (identifier__format_signature) identifier__format_signature )attribute (argument_list (identifier_signature) identifier_signature (identifier_modulename) identifier_modulename (identifier_classname) identifier_classname (identifier_fullname) identifier_fullname (string_'py:meth') string_'py:meth' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_content_node) identifier_content_node (call (identifier_desc_content) identifier_desc_content (argument_list )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_content_node) identifier_content_node (call (attribute (identifier_self) identifier_self (identifier__create_doc_summary) identifier__create_doc_summary )attribute (argument_list (identifier_task_method) identifier_task_method (identifier_fullname) identifier_fullname (string_'py:meth') string_'py:meth' )argument_list )call )augmented_assignment )expression_statement (expression_statement (assignment (identifier_desc_node) identifier_desc_node (call (identifier_desc) identifier_desc (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_desc_node) identifier_desc_node (string_'noindex') string_'noindex' )subscript (True) True )assignment )expression_statement (expression_statement (assignment (subscript (identifier_desc_node) identifier_desc_node (string_'domain') string_'domain' )subscript (string_'py') string_'py' )assignment )expression_statement (expression_statement (assignment (subscript (identifier_desc_node) identifier_desc_node (string_'objtype') string_'objtype' )subscript (string_'method') string_'method' )assignment )expression_statement (expression_statement (augmented_assignment (identifier_desc_node) identifier_desc_node (identifier_desc_sig_node) identifier_desc_sig_node )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_desc_node) identifier_desc_node (identifier_content_node) identifier_content_node )augmented_assignment )expression_statement (return_statement (identifier_desc_node) identifier_desc_node )return_statement )block )function_definition )module
Create a ``desc`` node summarizing a method docstring.
(module (function_definition (function_name_sortByColumn) function_name_sortByColumn (parameters (identifier_self) identifier_self (identifier_index) identifier_index )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_sort_old) identifier_sort_old )attribute (list (None) None )list )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_header_class) identifier_header_class )attribute (identifier_setSortIndicatorShown) identifier_setSortIndicatorShown )attribute (argument_list (True) True )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_sort_order) identifier_sort_order (call (attribute (attribute (identifier_self) identifier_self (identifier_header_class) identifier_header_class )attribute (identifier_sortIndicatorOrder) identifier_sortIndicatorOrder )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_sig_sort_by_column) identifier_sig_sort_by_column )attribute (identifier_emit) identifier_emit )attribute (argument_list )argument_list )call )expression_statement (if_statement (not_operator (call (attribute (call (attribute (identifier_self) identifier_self (identifier_model) identifier_model )attribute (argument_list )argument_list )call (identifier_sort) identifier_sort )attribute (argument_list (identifier_index) identifier_index (identifier_sort_order) identifier_sort_order )argument_list )call )not_operator (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_sort_old) identifier_sort_old )attribute )argument_list )call (integer_2) integer_2 )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_header_class) identifier_header_class )attribute (identifier_setSortIndicatorShown) identifier_setSortIndicatorShown )attribute (argument_list (False) False )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_header_class) identifier_header_class )attribute (identifier_setSortIndicator) identifier_setSortIndicator )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_sort_old) identifier_sort_old )attribute (integer_0) integer_0 )subscript (subscript (attribute (identifier_self) identifier_self (identifier_sort_old) identifier_sort_old )attribute (integer_1) integer_1 )subscript )argument_list )call )expression_statement )block )else_clause )if_statement (return_statement )return_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_sort_old) identifier_sort_old )attribute (list (identifier_index) identifier_index (call (attribute (attribute (identifier_self) identifier_self (identifier_header_class) identifier_header_class )attribute (identifier_sortIndicatorOrder) identifier_sortIndicatorOrder )attribute (argument_list )argument_list )call )list )assignment )expression_statement )block )function_definition )module
Implement a column sort.
(module (function_definition (function_name_buildASNList) function_name_buildASNList (parameters (identifier_rootnames) identifier_rootnames (identifier_asnname) identifier_asnname (default_parameter (identifier_check_for_duplicates) identifier_check_for_duplicates (True) True )default_parameter )parameters (block (expression_statement (assignment (pattern_list (identifier_filelist) identifier_filelist (identifier_duplicates) identifier_duplicates )pattern_list (call (identifier_checkForDuplicateInputs) identifier_checkForDuplicateInputs (argument_list (identifier_rootnames) identifier_rootnames )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_check_for_duplicates) identifier_check_for_duplicates (identifier_duplicates) identifier_duplicates )boolean_operator (block (expression_statement (assignment (identifier_origasn) identifier_origasn (call (identifier_changeSuffixinASN) identifier_changeSuffixinASN (argument_list (identifier_asnname) identifier_asnname (string_'flt') string_'flt' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_dupasn) identifier_dupasn (call (identifier_changeSuffixinASN) identifier_changeSuffixinASN (argument_list (identifier_asnname) identifier_asnname (string_'flc') string_'flc' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_errstr) identifier_errstr (string_'ERROR:\nMultiple valid input files found:\n') string_'ERROR:\nMultiple valid input files found:\n' )assignment )expression_statement (for_statement (pattern_list (identifier_fname) identifier_fname (identifier_dname) identifier_dname )pattern_list (call (identifier_zip) identifier_zip (argument_list (identifier_filelist) identifier_filelist (identifier_duplicates) identifier_duplicates )argument_list )call (block (expression_statement (augmented_assignment (identifier_errstr) identifier_errstr (binary_operator (string_' %s %s\n') string_' %s %s\n' (tuple (identifier_fname) identifier_fname (identifier_dname) identifier_dname )tuple )binary_operator )augmented_assignment )expression_statement )block )for_statement (expression_statement (augmented_assignment (identifier_errstr) identifier_errstr (parenthesized_expression (binary_operator (concatenated_string (string_'\nNew association files have been generated for each ') string_'\nNew association files have been generated for each ' (string_'version of these files.\n %s\n %s\n\nPlease ') string_'version of these files.\n %s\n %s\n\nPlease ' (string_'re-start astrodrizzle using of these new ASN files or ') string_'re-start astrodrizzle using of these new ASN files or ' (string_'use widlcards for the input to only select one type of ') string_'use widlcards for the input to only select one type of ' (string_'input file.') string_'input file.' )concatenated_string (tuple (identifier_dupasn) identifier_dupasn (identifier_origasn) identifier_origasn )tuple )binary_operator )parenthesized_expression )augmented_assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (identifier_textutil) identifier_textutil (identifier_textbox) identifier_textbox )attribute (argument_list (identifier_errstr) identifier_errstr )argument_list )call (keyword_argument (identifier_file) identifier_file (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute )keyword_argument )argument_list )call )expression_statement (raise_statement (identifier_ValueError) identifier_ValueError )raise_statement )block )if_statement (return_statement (identifier_filelist) identifier_filelist )return_statement )block )function_definition )module
Return the list of filenames for a given set of rootnames
(module (function_definition (function_name_spearmanr) function_name_spearmanr (parameters (identifier_self) identifier_self (identifier_target) identifier_target (identifier_correlation_length) identifier_correlation_length (default_parameter (identifier_mask) identifier_mask (identifier_NotSpecified) identifier_NotSpecified )default_parameter )parameters (block (import_from_statement (relative_import (import_prefix )import_prefix (dotted_name (identifier_statistical) identifier_statistical )dotted_name )relative_import (dotted_name (identifier_RollingSpearman) identifier_RollingSpearman )dotted_name )import_from_statement (return_statement (call (identifier_RollingSpearman) identifier_RollingSpearman (argument_list (keyword_argument (identifier_base_factor) identifier_base_factor (identifier_self) identifier_self )keyword_argument (keyword_argument (identifier_target) identifier_target (identifier_target) identifier_target )keyword_argument (keyword_argument (identifier_correlation_length) identifier_correlation_length (identifier_correlation_length) identifier_correlation_length )keyword_argument (keyword_argument (identifier_mask) identifier_mask (identifier_mask) identifier_mask )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Construct a new Factor that computes rolling spearman rank correlation coefficients between `target` and the columns of `self`. This method can only be called on factors which are deemed safe for use as inputs to other factors. This includes `Returns` and any factors created from `Factor.rank` or `Factor.zscore`. Parameters ---------- target : zipline.pipeline.Term with a numeric dtype The term used to compute correlations against each column of data produced by `self`. This may be a Factor, a BoundColumn or a Slice. If `target` is two-dimensional, correlations are computed asset-wise. correlation_length : int Length of the lookback window over which to compute each correlation coefficient. mask : zipline.pipeline.Filter, optional A Filter describing which assets should have their correlation with the target slice computed each day. Returns ------- correlations : zipline.pipeline.factors.RollingSpearman A new Factor that will compute correlations between `target` and the columns of `self`. Examples -------- Suppose we want to create a factor that computes the correlation between AAPL's 10-day returns and the 10-day returns of all other assets, computing each correlation over 30 days. This can be achieved by doing the following:: returns = Returns(window_length=10) returns_slice = returns[sid(24)] aapl_correlations = returns.spearmanr( target=returns_slice, correlation_length=30, ) This is equivalent to doing:: aapl_correlations = RollingSpearmanOfReturns( target=sid(24), returns_length=10, correlation_length=30, ) See Also -------- :func:`scipy.stats.spearmanr` :class:`zipline.pipeline.factors.RollingSpearmanOfReturns` :meth:`Factor.pearsonr`
(module (function_definition (function_name_chain) function_name_chain (parameters (list_splat_pattern (identifier_steps) identifier_steps )list_splat_pattern )parameters (block (if_statement (not_operator (identifier_steps) identifier_steps )not_operator (block (return_statement )return_statement )block )if_statement (function_definition (function_name_on_done) function_name_on_done (parameters (default_parameter (identifier_sprite) identifier_sprite (None) None )default_parameter )parameters (block (expression_statement (call (identifier_chain) identifier_chain (argument_list (list_splat (subscript (identifier_steps) identifier_steps (slice (integer_2) integer_2 (colon) colon )slice )subscript )list_splat )argument_list )call )expression_statement )block )function_definition (expression_statement (assignment (pattern_list (identifier_obj) identifier_obj (identifier_params) identifier_params )pattern_list (subscript (identifier_steps) identifier_steps (slice (colon) colon (integer_2) integer_2 )slice )subscript )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_steps) identifier_steps )argument_list )call (integer_2) integer_2 )comparison_operator (block (expression_statement (assignment (subscript (identifier_params) identifier_params (string_'on_complete') string_'on_complete' )subscript (identifier_on_done) identifier_on_done )assignment )expression_statement )block )if_statement (if_statement (call (identifier_callable) identifier_callable (argument_list (identifier_obj) identifier_obj )argument_list )call (block (expression_statement (call (identifier_obj) identifier_obj (argument_list (dictionary_splat (identifier_params) identifier_params )dictionary_splat )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_obj) identifier_obj (identifier_animate) identifier_animate )attribute (argument_list (dictionary_splat (identifier_params) identifier_params )dictionary_splat )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
chains the given list of functions and object animations into a callback string. Expects an interlaced list of object and params, something like: object, {params}, callable, {params}, object, {}, object, {params} Assumes that all callees accept on_complete named param. The last item in the list can omit that. XXX - figure out where to place these guys as they are quite useful
(module (function_definition (function_name_find) function_name_find (parameters (identifier_self) identifier_self (identifier_name) identifier_name (identifier_current_location) identifier_current_location )parameters (block (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_name) identifier_name (identifier_basestring) identifier_basestring )argument_list )call )assert_statement (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_current_location) identifier_current_location (identifier_basestring) identifier_basestring )argument_list )call )assert_statement (expression_statement (assignment (identifier_project_module) identifier_project_module (None) None )assignment )expression_statement (if_statement (comparison_operator (subscript (identifier_name) identifier_name (integer_0) integer_0 )subscript (string_'/') string_'/' )comparison_operator (block (expression_statement (assignment (identifier_project_module) identifier_project_module (call (attribute (attribute (identifier_self) identifier_self (identifier_id2module) identifier_id2module )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (not_operator (identifier_project_module) identifier_project_module )not_operator (block (expression_statement (assignment (identifier_location) identifier_location (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_current_location) identifier_current_location (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_project_module) identifier_project_module (call (attribute (identifier_self) identifier_self (identifier_module_name) identifier_module_name )attribute (argument_list (identifier_location) identifier_location )argument_list )call )assignment )expression_statement (if_statement (not_operator (comparison_operator (identifier_project_module) identifier_project_module (attribute (identifier_self) identifier_self (identifier_jamfile_modules) identifier_jamfile_modules )attribute )comparison_operator )not_operator (block (if_statement (call (attribute (attribute (attribute (identifier_b2) identifier_b2 (identifier_util) identifier_util )attribute (identifier_path) identifier_path )attribute (identifier_glob) identifier_glob )attribute (argument_list (list (identifier_location) identifier_location )list (binary_operator (attribute (identifier_self) identifier_self (identifier_JAMROOT) identifier_JAMROOT )attribute (attribute (identifier_self) identifier_self (identifier_JAMFILE) identifier_JAMFILE )attribute )binary_operator )argument_list )call (block (expression_statement (assignment (identifier_project_module) identifier_project_module (call (attribute (identifier_self) identifier_self (identifier_load) identifier_load )attribute (argument_list (identifier_location) identifier_location )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_project_module) identifier_project_module (None) None )assignment )expression_statement )block )else_clause )if_statement )block )if_statement )block )if_statement (return_statement (identifier_project_module) identifier_project_module )return_statement )block )function_definition )module
Given 'name' which can be project-id or plain directory name, return project module corresponding to that id or directory. Returns nothing of project is not found.
(module (function_definition (function_name_vn) function_name_vn (parameters (identifier_x) identifier_x )parameters (block (if_statement (comparison_operator (identifier_x) identifier_x (list )list )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_x) identifier_x (identifier_list) identifier_list )argument_list )call (block (return_statement (call (attribute (string_'|') string_'|' (identifier_join) identifier_join )attribute (argument_list (identifier_x) identifier_x )argument_list )call )return_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_x) identifier_x (identifier_datetime) identifier_datetime )argument_list )call (block (return_statement (call (attribute (identifier_x) identifier_x (identifier_isoformat) identifier_isoformat )attribute (argument_list )argument_list )call )return_statement )block )if_statement (return_statement (identifier_x) identifier_x )return_statement )block )function_definition )module
value or none, returns none if x is an empty list
(module (function_definition (function_name_popen_uci) function_name_popen_uci (parameters (typed_parameter (identifier_command) identifier_command (type (generic_type (identifier_Union) identifier_Union (type_parameter (type (identifier_str) identifier_str )type (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_str) identifier_str )type )type_parameter )generic_type )type )type_parameter )generic_type )type )typed_parameter (keyword_separator )keyword_separator (typed_default_parameter (identifier_setpgrp) identifier_setpgrp (type (identifier_bool) identifier_bool )type (False) False )typed_default_parameter (default_parameter (identifier_loop) identifier_loop (None) None )default_parameter (typed_parameter (dictionary_splat_pattern (identifier_popen_args) identifier_popen_args )dictionary_splat_pattern (type (identifier_Any) identifier_Any )type )typed_parameter )parameters (type (generic_type (identifier_Tuple) identifier_Tuple (type_parameter (type (attribute (identifier_asyncio) identifier_asyncio (identifier_SubprocessTransport) identifier_SubprocessTransport )attribute )type (type (identifier_UciProtocol) identifier_UciProtocol )type )type_parameter )generic_type )type (block (expression_statement (assignment (pattern_list (identifier_transport) identifier_transport (identifier_protocol) identifier_protocol )pattern_list (await (call (attribute (identifier_UciProtocol) identifier_UciProtocol (identifier_popen) identifier_popen )attribute (argument_list (identifier_command) identifier_command (keyword_argument (identifier_setpgrp) identifier_setpgrp (identifier_setpgrp) identifier_setpgrp )keyword_argument (keyword_argument (identifier_loop) identifier_loop (identifier_loop) identifier_loop )keyword_argument (dictionary_splat (identifier_popen_args) identifier_popen_args )dictionary_splat )argument_list )call )await )assignment )expression_statement (try_statement (block (expression_statement (await (call (attribute (identifier_protocol) identifier_protocol (identifier_initialize) identifier_initialize )attribute (argument_list )argument_list )call )await )expression_statement )block (except_clause (block (expression_statement (call (attribute (identifier_transport) identifier_transport (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (raise_statement )raise_statement )block )except_clause )try_statement (return_statement (expression_list (identifier_transport) identifier_transport (identifier_protocol) identifier_protocol )expression_list )return_statement )block )function_definition )module
Spawns and initializes an UCI engine. :param command: Path of the engine executable, or a list including the path and arguments. :param setpgrp: Open the engine process in a new process group. This will stop signals (such as keyboard interrupts) from propagating from the parent process. Defaults to ``False``. :param popen_args: Additional arguments for `popen <https://docs.python.org/3/library/subprocess.html#popen-constructor>`_. Do not set ``stdin``, ``stdout``, ``bufsize`` or ``universal_newlines``. Returns a subprocess transport and engine protocol pair.
(module (function_definition (function_name_insert_row) function_name_insert_row (parameters (identifier_self) identifier_self (identifier_index) identifier_index (identifier_row) identifier_row )parameters (block (expression_statement (assignment (identifier_row) identifier_row (call (attribute (identifier_self) identifier_self (identifier__validate_row) identifier__validate_row )attribute (argument_list (identifier_row) identifier_row )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_row_obj) identifier_row_obj (call (identifier_RowData) identifier_RowData (argument_list (identifier_self) identifier_self (identifier_row) identifier_row )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__table) identifier__table )attribute (identifier_insert) identifier_insert )attribute (argument_list (identifier_index) identifier_index (identifier_row_obj) identifier_row_obj )argument_list )call )expression_statement )block )function_definition )module
Insert a row before index in the table. Parameters ---------- index : int List index rules apply row : iterable Any iterable of appropriate length. Raises ------ TypeError: If `row` is not an iterable. ValueError: If size of `row` is inconsistent with the current number of columns.
(module (function_definition (function_name_no_auth) function_name_no_auth (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (pattern_list (identifier_old_basic_auth) identifier_old_basic_auth (attribute (identifier_self) identifier_self (identifier_auth) identifier_auth )attribute )pattern_list (expression_list (attribute (identifier_self) identifier_self (identifier_auth) identifier_auth )attribute (None) None )expression_list )assignment )expression_statement (expression_statement (assignment (identifier_old_token_auth) identifier_old_token_auth (call (attribute (attribute (identifier_self) identifier_self (identifier_headers) identifier_headers )attribute (identifier_pop) identifier_pop )attribute (argument_list (string_'Authorization') string_'Authorization' (None) None )argument_list )call )assignment )expression_statement (expression_statement (yield )yield )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_auth) identifier_auth )attribute (identifier_old_basic_auth) identifier_old_basic_auth )assignment )expression_statement (if_statement (identifier_old_token_auth) identifier_old_token_auth (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_headers) identifier_headers )attribute (string_'Authorization') string_'Authorization' )subscript (identifier_old_token_auth) identifier_old_token_auth )assignment )expression_statement )block )if_statement )block )function_definition )module
Unset authentication temporarily as a context manager.
(module (function_definition (function_name_evolve) function_name_evolve (parameters (identifier_self) identifier_self (identifier_years) identifier_years )parameters (block (expression_statement (assignment (identifier_world_file) identifier_world_file (binary_operator (binary_operator (binary_operator (identifier_fldr) identifier_fldr (attribute (identifier_os) identifier_os (identifier_sep) identifier_sep )attribute )binary_operator (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )binary_operator (string_'.txt') string_'.txt' )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_build_base) identifier_build_base )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_world) identifier_world )attribute (identifier_add_mountains) identifier_add_mountains )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add_life) identifier_add_life )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_world) identifier_world )attribute (identifier_grd) identifier_grd )attribute (identifier_save) identifier_save )attribute (argument_list (identifier_world_file) identifier_world_file )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (binary_operator (string_'TODO - run ') string_'TODO - run ' (call (identifier_str) identifier_str (argument_list (identifier_years) identifier_years )argument_list )call )binary_operator (string_' years') string_' years' )binary_operator )argument_list )call )expression_statement )block )function_definition )module
run the evolution of the planet to see how it looks after 'years'
(module (function_definition (function_name__dump_multipoint) function_name__dump_multipoint (parameters (identifier_obj) identifier_obj (identifier_big_endian) identifier_big_endian (identifier_meta) identifier_meta )parameters (block (expression_statement (assignment (identifier_coords) identifier_coords (subscript (identifier_obj) identifier_obj (string_'coordinates') string_'coordinates' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_vertex) identifier_vertex (subscript (identifier_coords) identifier_coords (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_num_dims) identifier_num_dims (call (identifier_len) identifier_len (argument_list (identifier_vertex) identifier_vertex )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_wkb_string) identifier_wkb_string (identifier_byte_fmt) identifier_byte_fmt (identifier_byte_order) identifier_byte_order )pattern_list (call (identifier__header_bytefmt_byteorder) identifier__header_bytefmt_byteorder (argument_list (string_'MultiPoint') string_'MultiPoint' (identifier_num_dims) identifier_num_dims (identifier_big_endian) identifier_big_endian (identifier_meta) identifier_meta )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_point_type) identifier_point_type (subscript (subscript (identifier__WKB) identifier__WKB (call (attribute (identifier__INT_TO_DIM_LABEL) identifier__INT_TO_DIM_LABEL (identifier_get) identifier_get )attribute (argument_list (identifier_num_dims) identifier_num_dims )argument_list )call )subscript (string_'Point') string_'Point' )subscript )assignment )expression_statement (if_statement (identifier_big_endian) identifier_big_endian (block (expression_statement (assignment (identifier_point_type) identifier_point_type (binary_operator (identifier_BIG_ENDIAN) identifier_BIG_ENDIAN (identifier_point_type) identifier_point_type )binary_operator )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_point_type) identifier_point_type (binary_operator (identifier_LITTLE_ENDIAN) identifier_LITTLE_ENDIAN (subscript (identifier_point_type) identifier_point_type (slice (colon) colon (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript )binary_operator )assignment )expression_statement )block )else_clause )if_statement (expression_statement (augmented_assignment (identifier_wkb_string) identifier_wkb_string (call (attribute (identifier_struct) identifier_struct (identifier_pack) identifier_pack )attribute (argument_list (binary_operator (string_'%sl') string_'%sl' (identifier_byte_order) identifier_byte_order )binary_operator (call (identifier_len) identifier_len (argument_list (identifier_coords) identifier_coords )argument_list )call )argument_list )call )augmented_assignment )expression_statement (for_statement (identifier_vertex) identifier_vertex (identifier_coords) identifier_coords (block (expression_statement (augmented_assignment (identifier_wkb_string) identifier_wkb_string (identifier_point_type) identifier_point_type )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_wkb_string) identifier_wkb_string (call (attribute (identifier_struct) identifier_struct (identifier_pack) identifier_pack )attribute (argument_list (identifier_byte_fmt) identifier_byte_fmt (list_splat (identifier_vertex) identifier_vertex )list_splat )argument_list )call )augmented_assignment )expression_statement )block )for_statement (return_statement (identifier_wkb_string) identifier_wkb_string )return_statement )block )function_definition )module
Dump a GeoJSON-like `dict` to a multipoint WKB string. Input parameters and output are similar to :funct:`_dump_point`.
(module (function_definition (function_name_find_paths_breadth_first) function_name_find_paths_breadth_first (parameters (identifier_from_target) identifier_from_target (identifier_to_target) identifier_to_target (identifier_log) identifier_log )parameters (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_'Looking for all paths from {} to {}') string_'Looking for all paths from {} to {}' (identifier_format) identifier_format )attribute (argument_list (call (attribute (attribute (identifier_from_target) identifier_from_target (identifier_address) identifier_address )attribute (identifier_reference) identifier_reference )attribute (argument_list )argument_list )call (call (attribute (attribute (identifier_to_target) identifier_to_target (identifier_address) identifier_address )attribute (identifier_reference) identifier_reference )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_from_target) identifier_from_target (identifier_to_target) identifier_to_target )comparison_operator (block (expression_statement (yield (list (identifier_from_target) identifier_from_target )list )yield )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_visited_edges) identifier_visited_edges (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_to_walk_paths) identifier_to_walk_paths (call (identifier_deque) identifier_deque (argument_list (list (list (identifier_from_target) identifier_from_target )list )list )argument_list )call )assignment )expression_statement (while_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_to_walk_paths) identifier_to_walk_paths )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_cur_path) identifier_cur_path (call (attribute (identifier_to_walk_paths) identifier_to_walk_paths (identifier_popleft) identifier_popleft )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_target) identifier_target (subscript (identifier_cur_path) identifier_cur_path (unary_operator (integer_1) integer_1 )unary_operator )subscript )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_cur_path) identifier_cur_path )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_prev_target) identifier_prev_target (subscript (identifier_cur_path) identifier_cur_path (unary_operator (integer_2) integer_2 )unary_operator )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_prev_target) identifier_prev_target (None) None )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_current_edge) identifier_current_edge (tuple (identifier_prev_target) identifier_prev_target (identifier_target) identifier_target )tuple )assignment )expression_statement (if_statement (comparison_operator (identifier_current_edge) identifier_current_edge (identifier_visited_edges) identifier_visited_edges )comparison_operator (block (for_statement (identifier_dep) identifier_dep (attribute (identifier_target) identifier_target (identifier_dependencies) identifier_dependencies )attribute (block (expression_statement (assignment (identifier_dep_path) identifier_dep_path (binary_operator (identifier_cur_path) identifier_cur_path (list (identifier_dep) identifier_dep )list )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_dep) identifier_dep (identifier_to_target) identifier_to_target )comparison_operator (block (expression_statement (yield (identifier_dep_path) identifier_dep_path )yield )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_to_walk_paths) identifier_to_walk_paths (identifier_append) identifier_append )attribute (argument_list (identifier_dep_path) identifier_dep_path )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (expression_statement (call (attribute (identifier_visited_edges) identifier_visited_edges (identifier_add) identifier_add )attribute (argument_list (identifier_current_edge) identifier_current_edge )argument_list )call )expression_statement )block )if_statement )block )while_statement )block )function_definition )module
Yields the paths between from_target to to_target if they exist. The paths are returned ordered by length, shortest first. If there are cycles, it checks visited edges to prevent recrossing them.
(module (function_definition (function_name_list_entitlements) function_name_list_entitlements (parameters (identifier_owner) identifier_owner (identifier_repo) identifier_repo (identifier_page) identifier_page (identifier_page_size) identifier_page_size (identifier_show_tokens) identifier_show_tokens )parameters (block (expression_statement (assignment (identifier_client) identifier_client (call (identifier_get_entitlements_api) identifier_get_entitlements_api (argument_list )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (call (identifier_catch_raise_api_exception) identifier_catch_raise_api_exception (argument_list )argument_list )call )with_item )with_clause (block (expression_statement (assignment (pattern_list (identifier_data) identifier_data (identifier__) identifier__ (identifier_headers) identifier_headers )pattern_list (call (attribute (identifier_client) identifier_client (identifier_entitlements_list_with_http_info) identifier_entitlements_list_with_http_info )attribute (argument_list (keyword_argument (identifier_owner) identifier_owner (identifier_owner) identifier_owner )keyword_argument (keyword_argument (identifier_repo) identifier_repo (identifier_repo) identifier_repo )keyword_argument (keyword_argument (identifier_page) identifier_page (identifier_page) identifier_page )keyword_argument (keyword_argument (identifier_page_size) identifier_page_size (identifier_page_size) identifier_page_size )keyword_argument (keyword_argument (identifier_show_tokens) identifier_show_tokens (identifier_show_tokens) identifier_show_tokens )keyword_argument )argument_list )call )assignment )expression_statement )block )with_statement (expression_statement (call (attribute (identifier_ratelimits) identifier_ratelimits (identifier_maybe_rate_limit) identifier_maybe_rate_limit )attribute (argument_list (identifier_client) identifier_client (identifier_headers) identifier_headers )argument_list )call )expression_statement (expression_statement (assignment (identifier_page_info) identifier_page_info (call (attribute (identifier_PageInfo) identifier_PageInfo (identifier_from_headers) identifier_from_headers )attribute (argument_list (identifier_headers) identifier_headers )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_entitlements) identifier_entitlements (list_comprehension (call (attribute (identifier_ent) identifier_ent (identifier_to_dict) identifier_to_dict )attribute (argument_list )argument_list )call (for_in_clause (identifier_ent) identifier_ent (identifier_data) identifier_data )for_in_clause )list_comprehension )assignment )expression_statement (return_statement (expression_list (identifier_entitlements) identifier_entitlements (identifier_page_info) identifier_page_info )expression_list )return_statement )block )function_definition )module
Get a list of entitlements on a repository.
(module (function_definition (function_name_basename) function_name_basename (parameters (typed_parameter (identifier_path) identifier_path (type (generic_type (identifier_Optional) identifier_Optional (type_parameter (type (identifier_str) identifier_str )type )type_parameter )generic_type )type )typed_parameter )parameters (type (generic_type (identifier_Optional) identifier_Optional (type_parameter (type (identifier_str) identifier_str )type )type_parameter )generic_type )type (block (if_statement (comparison_operator (identifier_path) identifier_path (None) None )comparison_operator (block (return_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_basename) identifier_basename )attribute (argument_list (identifier_path) identifier_path )argument_list )call )return_statement )block )if_statement )block )function_definition )module
Returns the final component of a pathname and None if the argument is None
(module (function_definition (function_name_get_new_session) function_name_get_new_session (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_session) identifier_session (call (identifier_Session) identifier_Session (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_session) identifier_session (identifier_headers) identifier_headers )attribute (attribute (identifier_self) identifier_self (identifier_headers) identifier_headers )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_session) identifier_session (identifier_proxies) identifier_proxies )attribute (call (attribute (identifier_self) identifier_self (identifier__get_request_proxies) identifier__get_request_proxies )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (identifier_session) identifier_session )return_statement )block )function_definition )module
Returns a new session using the object's proxies and headers
(module (function_definition (function_name_get_registration_fields) function_name_get_registration_fields (parameters (identifier_xmlstream) identifier_xmlstream (default_parameter (identifier_timeout) identifier_timeout (integer_60) integer_60 )default_parameter )parameters (block (expression_statement (assignment (identifier_iq) identifier_iq (call (attribute (identifier_aioxmpp) identifier_aioxmpp (identifier_IQ) identifier_IQ )attribute (argument_list (keyword_argument (identifier_to) identifier_to (call (attribute (attribute (identifier_aioxmpp) identifier_aioxmpp (identifier_JID) identifier_JID )attribute (identifier_fromstr) identifier_fromstr )attribute (argument_list (attribute (identifier_xmlstream) identifier_xmlstream (identifier__to) identifier__to )attribute )argument_list )call )keyword_argument (keyword_argument (identifier_type_) identifier_type_ (attribute (attribute (identifier_aioxmpp) identifier_aioxmpp (identifier_IQType) identifier_IQType )attribute (identifier_GET) identifier_GET )attribute )keyword_argument (keyword_argument (identifier_payload) identifier_payload (call (attribute (identifier_xso) identifier_xso (identifier_Query) identifier_Query )attribute (argument_list )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_iq) identifier_iq (identifier_autoset_id) identifier_autoset_id )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_reply) identifier_reply (yield (call (attribute (attribute (identifier_aioxmpp) identifier_aioxmpp (identifier_protocol) identifier_protocol )attribute (identifier_send_and_wait_for) identifier_send_and_wait_for )attribute (argument_list (identifier_xmlstream) identifier_xmlstream (list (identifier_iq) identifier_iq )list (list (attribute (identifier_aioxmpp) identifier_aioxmpp (identifier_IQ) identifier_IQ )attribute )list (keyword_argument (identifier_timeout) identifier_timeout (identifier_timeout) identifier_timeout )keyword_argument )argument_list )call )yield )assignment )expression_statement (return_statement (attribute (identifier_reply) identifier_reply (identifier_payload) identifier_payload )attribute )return_statement )block )function_definition )module
A query is sent to the server to obtain the fields that need to be filled to register with the server. :param xmlstream: Specifies the stream connected to the server where the account will be created. :type xmlstream: :class:`aioxmpp.protocol.XMLStream` :param timeout: Maximum time in seconds to wait for an IQ response, or :data:`None` to disable the timeout. :type timeout: :class:`~numbers.Real` or :data:`None` :return: :attr:`list`
(module (function_definition (function_name__update_frozencell) function_name__update_frozencell (parameters (identifier_self) identifier_self (identifier_frozen) identifier_frozen )parameters (block (expression_statement (assignment (identifier_toggle_state) identifier_toggle_state (comparison_operator (identifier_frozen) identifier_frozen (False) False )comparison_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_ToggleTool) identifier_ToggleTool )attribute (argument_list (attribute (identifier_wx) identifier_wx (identifier_FONTFLAG_MASK) identifier_FONTFLAG_MASK )attribute (identifier_toggle_state) identifier_toggle_state )argument_list )call )expression_statement )block )function_definition )module
Updates frozen cell widget Parameters ---------- frozen: Bool or string \tUntoggled iif False
(module (function_definition (function_name_read_magic_file) function_name_read_magic_file (parameters (identifier_self) identifier_self (identifier_path) identifier_path (identifier_sort_by_this_name) identifier_sort_by_this_name )parameters (block (expression_statement (assignment (identifier_DATA) identifier_DATA (dictionary )dictionary )assignment )expression_statement (try_statement (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_path) identifier_path (string_'r') string_'r' )argument_list )call (as_pattern_target (identifier_finput) identifier_finput )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_lines) identifier_lines (call (identifier_list) identifier_list (argument_list (subscript (call (attribute (identifier_finput) identifier_finput (identifier_readlines) identifier_readlines )attribute (argument_list )argument_list )call (slice (integer_1) integer_1 (colon) colon )slice )subscript )argument_list )call )assignment )expression_statement )block )with_statement )block (except_clause (identifier_FileNotFoundError) identifier_FileNotFoundError (block (return_statement (list )list )return_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_line) identifier_line (subscript (identifier_lines) identifier_lines (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_header) identifier_header (call (attribute (call (attribute (identifier_line) identifier_line (identifier_strip) identifier_strip )attribute (argument_list (string_'\n') string_'\n' )argument_list )call (identifier_split) identifier_split )attribute (argument_list (string_'\t') string_'\t' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_error_strings) identifier_error_strings (list )list )assignment )expression_statement (for_statement (identifier_line) identifier_line (subscript (identifier_lines) identifier_lines (slice (integer_1) integer_1 (colon) colon )slice )subscript (block (expression_statement (assignment (identifier_tmp_data) identifier_tmp_data (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_tmp_line) identifier_tmp_line (call (attribute (call (attribute (identifier_line) identifier_line (identifier_strip) identifier_strip )attribute (argument_list (string_'\n') string_'\n' )argument_list )call (identifier_split) identifier_split )attribute (argument_list (string_'\t') string_'\t' )argument_list )call )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (identifier_tmp_line) identifier_tmp_line )argument_list )call )argument_list )call (block (expression_statement (assignment (subscript (identifier_tmp_data) identifier_tmp_data (subscript (identifier_header) identifier_header (identifier_i) identifier_i )subscript )subscript (subscript (identifier_tmp_line) identifier_tmp_line (identifier_i) identifier_i )subscript )assignment )expression_statement )block )for_statement (if_statement (comparison_operator (subscript (identifier_tmp_data) identifier_tmp_data (identifier_sort_by_this_name) identifier_sort_by_this_name )subscript (call (identifier_list) identifier_list (argument_list (call (attribute (identifier_DATA) identifier_DATA (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )comparison_operator (block (expression_statement (assignment (identifier_error_string) identifier_error_string (binary_operator (string_"-E- ERROR: magic file %s has more than one line for %s %s") string_"-E- ERROR: magic file %s has more than one line for %s %s" (tuple (identifier_path) identifier_path (identifier_sort_by_this_name) identifier_sort_by_this_name (subscript (identifier_tmp_data) identifier_tmp_data (identifier_sort_by_this_name) identifier_sort_by_this_name )subscript )tuple )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_error_string) identifier_error_string (identifier_error_strings) identifier_error_strings )comparison_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (identifier_error_string) identifier_error_string )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_error_strings) identifier_error_strings (identifier_append) identifier_append )attribute (argument_list (identifier_error_string) identifier_error_string )argument_list )call )expression_statement )block )if_statement )block )if_statement (expression_statement (assignment (subscript (identifier_DATA) identifier_DATA (subscript (identifier_tmp_data) identifier_tmp_data (identifier_sort_by_this_name) identifier_sort_by_this_name )subscript )subscript (identifier_tmp_data) identifier_tmp_data )assignment )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_finput) identifier_finput (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (return_statement (parenthesized_expression (identifier_DATA) identifier_DATA )parenthesized_expression )return_statement )block )function_definition )module
reads a magic formated data file from path and sorts the keys according to sort_by_this_name Parameters ---------- path : path to file to read sort_by_this_name : variable to sort data by
(module (function_definition (function_name_remove_template) function_name_remove_template (parameters (identifier_self) identifier_self (identifier_tpl) identifier_tpl )parameters (block (try_statement (block (delete_statement (subscript (attribute (identifier_self) identifier_self (identifier_templates) identifier_templates )attribute (attribute (identifier_tpl) identifier_tpl (identifier_uuid) identifier_uuid )attribute )subscript )delete_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (pass_statement )pass_statement )block )except_clause )try_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_unindex_template) identifier_unindex_template )attribute (argument_list (identifier_tpl) identifier_tpl )argument_list )call )expression_statement )block )function_definition )module
Removes and un-index a template from the `templates` container. :param tpl: The template to remove :type tpl: alignak.objects.item.Item :return: None
(module (function_definition (function_name_open_netcdf_reader) function_name_open_netcdf_reader (parameters (identifier_self) identifier_self (default_parameter (identifier_flatten) identifier_flatten (False) False )default_parameter (default_parameter (identifier_isolate) identifier_isolate (False) False )default_parameter (default_parameter (identifier_timeaxis) identifier_timeaxis (integer_1) integer_1 )default_parameter )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__netcdf_reader) identifier__netcdf_reader )attribute (call (attribute (identifier_netcdftools) identifier_netcdftools (identifier_NetCDFInterface) identifier_NetCDFInterface )attribute (argument_list (keyword_argument (identifier_flatten) identifier_flatten (call (identifier_bool) identifier_bool (argument_list (identifier_flatten) identifier_flatten )argument_list )call )keyword_argument (keyword_argument (identifier_isolate) identifier_isolate (call (identifier_bool) identifier_bool (argument_list (identifier_isolate) identifier_isolate )argument_list )call )keyword_argument (keyword_argument (identifier_timeaxis) identifier_timeaxis (call (identifier_int) identifier_int (argument_list (identifier_timeaxis) identifier_timeaxis )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement )block )function_definition )module
Prepare a new |NetCDFInterface| object for reading data.
(module (function_definition (function_name_wirevector_subset) function_name_wirevector_subset (parameters (identifier_self) identifier_self (default_parameter (identifier_cls) identifier_cls (None) None )default_parameter (default_parameter (identifier_exclude) identifier_exclude (call (identifier_tuple) identifier_tuple (argument_list )argument_list )call )default_parameter )parameters (block (if_statement (comparison_operator (identifier_cls) identifier_cls (None) None )comparison_operator (block (expression_statement (assignment (identifier_initial_set) identifier_initial_set (attribute (identifier_self) identifier_self (identifier_wirevector_set) identifier_wirevector_set )attribute )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_initial_set) identifier_initial_set (generator_expression (identifier_x) identifier_x (for_in_clause (identifier_x) identifier_x (attribute (identifier_self) identifier_self (identifier_wirevector_set) identifier_wirevector_set )attribute )for_in_clause (if_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_x) identifier_x (identifier_cls) identifier_cls )argument_list )call )if_clause )generator_expression )assignment )expression_statement )block )else_clause )if_statement (if_statement (comparison_operator (identifier_exclude) identifier_exclude (call (identifier_tuple) identifier_tuple (argument_list )argument_list )call )comparison_operator (block (return_statement (call (identifier_set) identifier_set (argument_list (identifier_initial_set) identifier_initial_set )argument_list )call )return_statement )block (else_clause (block (return_statement (call (identifier_set) identifier_set (generator_expression (identifier_x) identifier_x (for_in_clause (identifier_x) identifier_x (identifier_initial_set) identifier_initial_set )for_in_clause (if_clause (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_x) identifier_x (identifier_exclude) identifier_exclude )argument_list )call )not_operator )if_clause )generator_expression )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Return set of wirevectors, filtered by the type or tuple of types provided as cls. If no cls is specified, the full set of wirevectors associated with the Block are returned. If cls is a single type, or a tuple of types, only those wirevectors of the matching types will be returned. This is helpful for getting all inputs, outputs, or registers of a block for example.
(module (function_definition (function_name_process) function_name_process (parameters (identifier_self) identifier_self (identifier_checksum) identifier_checksum (default_parameter (identifier_revision) identifier_revision (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_revert) identifier_revert (None) None )assignment )expression_statement (if_statement (comparison_operator (identifier_checksum) identifier_checksum (identifier_self) identifier_self )comparison_operator (block (expression_statement (assignment (identifier_reverteds) identifier_reverteds (call (identifier_list) identifier_list (argument_list (call (attribute (identifier_self) identifier_self (identifier_up_to) identifier_up_to )attribute (argument_list (identifier_checksum) identifier_checksum )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_reverteds) identifier_reverteds )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_revert) identifier_revert (call (identifier_Revert) identifier_Revert (argument_list (identifier_revision) identifier_revision (identifier_reverteds) identifier_reverteds (subscript (identifier_self) identifier_self (identifier_checksum) identifier_checksum )subscript )argument_list )call )assignment )expression_statement )block )if_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_insert) identifier_insert )attribute (argument_list (identifier_checksum) identifier_checksum (identifier_revision) identifier_revision )argument_list )call )expression_statement (return_statement (identifier_revert) identifier_revert )return_statement )block )function_definition )module
Process a new revision and detect a revert if it occurred. Note that you can pass whatever you like as `revision` and it will be returned in the case that a revert occurs. :Parameters: checksum : str Any identity-machable string-based hash of revision content revision : `mixed` Revision metadata. Note that any data will just be returned in the case of a revert. :Returns: a :class:`~mwreverts.Revert` if one occured or `None`
(module (function_definition (function_name_get_monkeypatched_pathset) function_name_get_monkeypatched_pathset (parameters (identifier_self) identifier_self )parameters (block (import_from_statement (dotted_name (identifier_pip_shims) identifier_pip_shims (identifier_shims) identifier_shims )dotted_name (dotted_name (identifier_InstallRequirement) identifier_InstallRequirement )dotted_name )import_from_statement (expression_statement (assignment (identifier_uninstall_path) identifier_uninstall_path (call (attribute (attribute (identifier_InstallRequirement) identifier_InstallRequirement (identifier___module__) identifier___module__ )attribute (identifier_replace) identifier_replace )attribute (argument_list (string_"req_install") string_"req_install" (string_"req_uninstall") string_"req_uninstall" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_req_uninstall) identifier_req_uninstall (call (attribute (identifier_self) identifier_self (identifier_safe_import) identifier_safe_import )attribute (argument_list (identifier_uninstall_path) identifier_uninstall_path )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_recursive_monkey_patch) identifier_recursive_monkey_patch )attribute (identifier_monkey_patch) identifier_monkey_patch )attribute (argument_list (identifier_PatchedUninstaller) identifier_PatchedUninstaller (attribute (identifier_req_uninstall) identifier_req_uninstall (identifier_UninstallPathSet) identifier_UninstallPathSet )attribute )argument_list )call )expression_statement (return_statement (attribute (identifier_req_uninstall) identifier_req_uninstall (identifier_UninstallPathSet) identifier_UninstallPathSet )attribute )return_statement )block )function_definition )module
Returns a monkeypatched `UninstallPathset` for using to uninstall packages from the virtualenv :return: A patched `UninstallPathset` which enables uninstallation of venv packages :rtype: :class:`pip._internal.req.req_uninstall.UninstallPathset`
(module (function_definition (function_name_add_current_user_is_applied_representation) function_name_add_current_user_is_applied_representation (parameters (identifier_func) identifier_func )parameters (block (decorated_definition (decorator (call (identifier_wraps) identifier_wraps (argument_list (identifier_func) identifier_func )argument_list )call )decorator (function_definition (function_name__impl) function_name__impl (parameters (identifier_self) identifier_self (identifier_instance) identifier_instance )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (call (identifier_func) identifier_func (argument_list (identifier_self) identifier_self (identifier_instance) identifier_instance )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_user) identifier_user (attribute (subscript (attribute (identifier_self) identifier_self (identifier_context) identifier_context )attribute (string_"request") string_"request" )subscript (identifier_user) identifier_user )attribute )assignment )expression_statement (expression_statement (assignment (identifier_applied) identifier_applied (False) False )assignment )expression_statement (if_statement (not_operator (call (attribute (identifier_user) identifier_user (identifier_is_anonymous) identifier_is_anonymous )attribute (argument_list )argument_list )call )not_operator (block (try_statement (block (expression_statement (assignment (identifier_applied) identifier_applied (comparison_operator (call (attribute (call (attribute (attribute (attribute (identifier_models) identifier_models (identifier_Apply) identifier_Apply )attribute (identifier_objects) identifier_objects )attribute (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_user) identifier_user (identifier_user) identifier_user )keyword_argument (keyword_argument (identifier_project) identifier_project (identifier_instance) identifier_instance )keyword_argument )argument_list )call (identifier_count) identifier_count )attribute (argument_list )argument_list )call (integer_0) integer_0 )comparison_operator )assignment )expression_statement )block (except_clause (block (pass_statement )pass_statement )block )except_clause )try_statement )block )if_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_"current_user_is_applied") string_"current_user_is_applied" )subscript (identifier_applied) identifier_applied )assignment )expression_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )decorated_definition (return_statement (identifier__impl) identifier__impl )return_statement )block )function_definition )module
Used to decorate Serializer.to_representation method. It sets the field "current_user_is_applied" if the user is applied to the project
(module (function_definition (function_name___set_log_file_name) function_name___set_log_file_name (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (pattern_list (identifier_dir) identifier_dir (identifier__) identifier__ )pattern_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_split) identifier_split )attribute (argument_list (attribute (identifier_self) identifier_self (identifier___logFileBasename) identifier___logFileBasename )attribute )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (call (identifier_len) identifier_len (argument_list (identifier_dir) identifier_dir )argument_list )call (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 )boolean_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 (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier___logFileName) identifier___logFileName )attribute (binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier___logFileBasename) identifier___logFileBasename )attribute (string_".") string_"." )binary_operator (attribute (identifier_self) identifier_self (identifier___logFileExtension) identifier___logFileExtension )attribute )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_number) identifier_number (integer_0) integer_0 )assignment )expression_statement (while_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (attribute (identifier_self) identifier_self (identifier___logFileName) identifier___logFileName )attribute )argument_list )call (block (if_statement (comparison_operator (binary_operator (attribute (call (attribute (identifier_os) identifier_os (identifier_stat) identifier_stat )attribute (argument_list (attribute (identifier_self) identifier_self (identifier___logFileName) identifier___logFileName )attribute )argument_list )call (identifier_st_size) identifier_st_size )attribute (float_1e6) float_1e6 )binary_operator (attribute (identifier_self) identifier_self (identifier___maxlogFileSize) identifier___maxlogFileSize )attribute )comparison_operator (block (break_statement )break_statement )block )if_statement (expression_statement (augmented_assignment (identifier_number) identifier_number (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier___logFileName) identifier___logFileName )attribute (binary_operator (binary_operator (binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier___logFileBasename) identifier___logFileBasename )attribute (string_"_") string_"_" )binary_operator (call (identifier_str) identifier_str (argument_list (identifier_number) identifier_number )argument_list )call )binary_operator (string_".") string_"." )binary_operator (attribute (identifier_self) identifier_self (identifier___logFileExtension) identifier___logFileExtension )attribute )binary_operator )assignment )expression_statement )block )while_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier___logFileStream) identifier___logFileStream )attribute (None) None )assignment )expression_statement )block )function_definition )module
Automatically set logFileName attribute
(module (function_definition (function_name__seconds_to_days) function_name__seconds_to_days (parameters (identifier_cls) identifier_cls (identifier_val) identifier_val (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_zero_value) identifier_zero_value (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'zero_value') string_'zero_value' (integer_0) integer_0 )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_val) identifier_val (None) None )comparison_operator (block (if_statement (comparison_operator (identifier_val) identifier_val (identifier_zero_value) identifier_zero_value )comparison_operator (block (return_statement (integer_0) integer_0 )return_statement )block )if_statement (return_statement (binary_operator (identifier_val) identifier_val (integer_86400) integer_86400 )binary_operator )return_statement )block (else_clause (block (return_statement (string_'Not Defined') string_'Not Defined' )return_statement )block )else_clause )if_statement )block )function_definition )module
converts a number of seconds to days
(module (function_definition (function_name_bind) function_name_bind (parameters (identifier_self) identifier_self (identifier_name) identifier_name (identifier_filterset) identifier_filterset )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute (None) None )comparison_operator (block (expression_statement (assignment (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_field) identifier_field )attribute (identifier_bind) identifier_bind )attribute (argument_list (identifier_name) identifier_name (identifier_self) identifier_self )argument_list )call )expression_statement )block )function_definition )module
attach filter to filterset gives a name to use to extract arguments from querydict
(module (function_definition (function_name_fetch) function_name_fetch (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_params) identifier_params (call (attribute (identifier_values) identifier_values (identifier_of) identifier_of )attribute (argument_list (dictionary )dictionary )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_payload) identifier_payload (call (attribute (attribute (identifier_self) identifier_self (identifier__version) identifier__version )attribute (identifier_fetch) identifier_fetch )attribute (argument_list (string_'GET') string_'GET' (attribute (identifier_self) identifier_self (identifier__uri) identifier__uri )attribute (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (identifier_ExportInstance) identifier_ExportInstance (argument_list (attribute (identifier_self) identifier_self (identifier__version) identifier__version )attribute (identifier_payload) identifier_payload (keyword_argument (identifier_resource_type) identifier_resource_type (subscript (attribute (identifier_self) identifier_self (identifier__solution) identifier__solution )attribute (string_'resource_type') string_'resource_type' )subscript )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Fetch a ExportInstance :returns: Fetched ExportInstance :rtype: twilio.rest.preview.bulk_exports.export.ExportInstance
(module (function_definition (function_name_hide) function_name_hide (parameters (identifier_self) identifier_self (default_parameter (identifier__unhide) identifier__unhide (False) False )default_parameter )parameters (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_reddit_session) identifier_reddit_session )attribute (identifier_hide) identifier_hide )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_fullname) identifier_fullname )attribute (keyword_argument (identifier__unhide) identifier__unhide (identifier__unhide) identifier__unhide )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Hide object in the context of the logged in user. :param _unhide: If True, unhide the item instead. Use :meth:`~praw.objects.Hideable.unhide` instead of setting this manually. :returns: The json response from the server.
(module (function_definition (function_name_merge) function_name_merge (parameters (identifier_self) identifier_self (identifier_paths) identifier_paths )parameters (block (expression_statement (assignment (identifier_topojson_binary) identifier_topojson_binary (string_'node_modules/bin/topojson') string_'node_modules/bin/topojson' )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_topojson_binary) identifier_topojson_binary )argument_list )call )not_operator (block (expression_statement (assignment (identifier_topojson_binary) identifier_topojson_binary (string_'topojson') string_'topojson' )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_merge_cmd) identifier_merge_cmd (binary_operator (string_'%(binary)s -o %(output_path)s --bbox -p -- %(paths)s') string_'%(binary)s -o %(output_path)s --bbox -p -- %(paths)s' (dictionary (pair (string_'output_path') string_'output_path' (attribute (attribute (identifier_self) identifier_self (identifier_args) identifier_args )attribute (identifier_output_path) identifier_output_path )attribute )pair (pair (string_'paths') string_'paths' (call (attribute (string_' ') string_' ' (identifier_join) identifier_join )attribute (argument_list (identifier_paths) identifier_paths )argument_list )call )pair (pair (string_'binary') string_'binary' (identifier_topojson_binary) identifier_topojson_binary )pair )dictionary )binary_operator )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute (identifier_write) identifier_write )attribute (argument_list (string_'Merging layers\n') string_'Merging layers\n' )argument_list )call )expression_statement (if_statement (attribute (attribute (identifier_self) identifier_self (identifier_args) identifier_args )attribute (identifier_verbose) identifier_verbose )attribute (block (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute (identifier_write) identifier_write )attribute (argument_list (binary_operator (string_' %s\n') string_' %s\n' (identifier_merge_cmd) identifier_merge_cmd )binary_operator )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_r) identifier_r (call (attribute (identifier_envoy) identifier_envoy (identifier_run) identifier_run )attribute (argument_list (identifier_merge_cmd) identifier_merge_cmd )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_r) identifier_r (identifier_status_code) identifier_status_code )attribute (integer_0) integer_0 )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute (identifier_write) identifier_write )attribute (argument_list (attribute (identifier_r) identifier_r (identifier_std_err) identifier_std_err )attribute )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Merge data layers into a single topojson file.
(module (function_definition (function_name_load_projects) function_name_load_projects (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_server_config) identifier_server_config (call (attribute (call (attribute (identifier_Config) identifier_Config (identifier_instance) identifier_instance )attribute (argument_list )argument_list )call (identifier_get_section_config) identifier_get_section_config )attribute (argument_list (string_"Server") string_"Server" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_projects_path) identifier_projects_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_expanduser) identifier_expanduser )attribute (argument_list (call (attribute (identifier_server_config) identifier_server_config (identifier_get) identifier_get )attribute (argument_list (string_"projects_path") string_"projects_path" (string_"~/GNS3/projects") string_"~/GNS3/projects" )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_makedirs) identifier_makedirs )attribute (argument_list (identifier_projects_path) identifier_projects_path (keyword_argument (identifier_exist_ok) identifier_exist_ok (True) True )keyword_argument )argument_list )call )expression_statement (try_statement (block (for_statement (identifier_project_path) identifier_project_path (call (attribute (identifier_os) identifier_os (identifier_listdir) identifier_listdir )attribute (argument_list (identifier_projects_path) identifier_projects_path )argument_list )call (block (expression_statement (assignment (identifier_project_dir) identifier_project_dir (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_projects_path) identifier_projects_path (identifier_project_path) identifier_project_path )argument_list )call )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isdir) identifier_isdir )attribute (argument_list (identifier_project_dir) identifier_project_dir )argument_list )call (block (for_statement (identifier_file) identifier_file (call (attribute (identifier_os) identifier_os (identifier_listdir) identifier_listdir )attribute (argument_list (identifier_project_dir) identifier_project_dir )argument_list )call (block (if_statement (call (attribute (identifier_file) identifier_file (identifier_endswith) identifier_endswith )attribute (argument_list (string_".gns3") string_".gns3" )argument_list )call (block (try_statement (block (expression_statement (yield (call (attribute (identifier_self) identifier_self (identifier_load_project) identifier_load_project )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_project_dir) identifier_project_dir (identifier_file) identifier_file )argument_list )call (keyword_argument (identifier_load) identifier_load (False) False )keyword_argument )argument_list )call )yield )expression_statement )block (except_clause (tuple (attribute (attribute (identifier_aiohttp) identifier_aiohttp (identifier_web_exceptions) identifier_web_exceptions )attribute (identifier_HTTPConflict) identifier_HTTPConflict )attribute (identifier_NotImplementedError) identifier_NotImplementedError )tuple (block (pass_statement )pass_statement )block )except_clause )try_statement )block )if_statement )block )for_statement )block )if_statement )block )for_statement )block (except_clause (as_pattern (identifier_OSError) identifier_OSError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_error) identifier_error )attribute (argument_list (call (identifier_str) identifier_str (argument_list (identifier_e) identifier_e )argument_list )call )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )module
Preload the list of projects from disk
(module (function_definition (function_name_name) function_name_name (parameters (identifier_self) identifier_self )parameters (type (generic_type (identifier_Optional) identifier_Optional (type_parameter (type (identifier_str) identifier_str )type )type_parameter )generic_type )type (block (expression_statement (assignment (pattern_list (identifier__) identifier__ (identifier_params) identifier_params )pattern_list (call (identifier_parse_content_disposition) identifier_parse_content_disposition (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_headers) identifier_headers )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_CONTENT_DISPOSITION) identifier_CONTENT_DISPOSITION )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (call (identifier_content_disposition_filename) identifier_content_disposition_filename (argument_list (identifier_params) identifier_params (string_'name') string_'name' )argument_list )call )return_statement )block )function_definition )module
Returns name specified in Content-Disposition header or None if missed or header is malformed.
(module (function_definition (function_name_router_id) function_name_router_id (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_router_id) identifier_router_id (call (attribute (identifier_kwargs) identifier_kwargs (identifier_pop) identifier_pop )attribute (argument_list (string_'router_id') string_'router_id' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_rbridge_id) identifier_rbridge_id (call (attribute (identifier_kwargs) identifier_kwargs (identifier_pop) identifier_pop )attribute (argument_list (string_'rbridge_id') string_'rbridge_id' (string_'1') string_'1' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_callback) identifier_callback (call (attribute (identifier_kwargs) identifier_kwargs (identifier_pop) identifier_pop )attribute (argument_list (string_'callback') string_'callback' (attribute (identifier_self) identifier_self (identifier__callback) identifier__callback )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_rid_args) identifier_rid_args (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_rbridge_id) identifier_rbridge_id (identifier_rbridge_id) identifier_rbridge_id )keyword_argument (keyword_argument (identifier_router_id) identifier_router_id (identifier_router_id) identifier_router_id )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_config) identifier_config (call (attribute (attribute (identifier_self) identifier_self (identifier__rbridge) identifier__rbridge )attribute (identifier_rbridge_id_ip_rtm_config_router_id) identifier_rbridge_id_ip_rtm_config_router_id )attribute (argument_list (dictionary_splat (identifier_rid_args) identifier_rid_args )dictionary_splat )argument_list )call )assignment )expression_statement (return_statement (call (identifier_callback) identifier_callback (argument_list (identifier_config) identifier_config )argument_list )call )return_statement )block )function_definition )module
Configures device's Router ID. Args: router_id (str): Router ID for the device. rbridge_id (str): The rbridge ID of the device on which BGP will be configured in a VCS fabric. callback (function): A function executed upon completion of the method. The only parameter passed to `callback` will be the ``ElementTree`` `config`. Returns: Return value of `callback`. Raises: KeyError: if `router_id` is not specified. Examples: >>> import pynos.device >>> conn = ('10.24.39.211', '22') >>> auth = ('admin', 'password') >>> with pynos.device.Device(conn=conn, auth=auth) as dev: ... output = dev.system.router_id(router_id='10.24.39.211', ... rbridge_id='225') ... dev.system.router_id() # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): KeyError
(module (function_definition (function_name_title_line) function_name_title_line (parameters (identifier_text) identifier_text )parameters (block (expression_statement (assignment (identifier_columns) identifier_columns (subscript (call (attribute (identifier_shutil) identifier_shutil (identifier_get_terminal_size) identifier_get_terminal_size )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_start) identifier_start (binary_operator (binary_operator (identifier_columns) identifier_columns (integer_2) integer_2 )binary_operator (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_text) identifier_text )argument_list )call (integer_2) integer_2 )binary_operator )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_output) identifier_output (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (string_'=') string_'=' (identifier_columns) identifier_columns )binary_operator (string_'\n\n') string_'\n\n' )binary_operator (binary_operator (string_' ') string_' ' (identifier_start) identifier_start )binary_operator )binary_operator (call (identifier_str) identifier_str (argument_list (identifier_text) identifier_text )argument_list )call )binary_operator (string_"\n\n") string_"\n\n" )binary_operator (binary_operator (string_'=') string_'=' (identifier_columns) identifier_columns )binary_operator )binary_operator (string_'\n') string_'\n' )binary_operator )assignment )expression_statement (return_statement (identifier_output) identifier_output )return_statement )block )function_definition )module
Returns a string that represents the text as a title blurb
(module (function_definition (function_name_compress) function_name_compress (parameters (identifier_samples) identifier_samples (identifier_run_parallel) identifier_run_parallel )parameters (block (expression_statement (assignment (identifier_to_cram) identifier_to_cram (list )list )assignment )expression_statement (expression_statement (assignment (identifier_finished) identifier_finished (list )list )assignment )expression_statement (for_statement (identifier_data) identifier_data (list_comprehension (subscript (identifier_x) identifier_x (integer_0) integer_0 )subscript (for_in_clause (identifier_x) identifier_x (identifier_samples) identifier_samples )for_in_clause )list_comprehension (block (if_statement (boolean_operator (comparison_operator (string_"cram") string_"cram" (call (attribute (identifier_dd) identifier_dd (identifier_get_archive) identifier_get_archive )attribute (argument_list (identifier_data) identifier_data )argument_list )call )comparison_operator (comparison_operator (string_"cram-lossless") string_"cram-lossless" (call (attribute (identifier_dd) identifier_dd (identifier_get_archive) identifier_get_archive )attribute (argument_list (identifier_data) identifier_data )argument_list )call )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_to_cram) identifier_to_cram (identifier_append) identifier_append )attribute (argument_list (list (identifier_data) identifier_data )list )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_finished) identifier_finished (identifier_append) identifier_append )attribute (argument_list (list (identifier_data) identifier_data )list )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (expression_statement (assignment (identifier_crammed) identifier_crammed (call (identifier_run_parallel) identifier_run_parallel (argument_list (string_"archive_to_cram") string_"archive_to_cram" (identifier_to_cram) identifier_to_cram )argument_list )call )assignment )expression_statement (return_statement (binary_operator (identifier_finished) identifier_finished (identifier_crammed) identifier_crammed )binary_operator )return_statement )block )function_definition )module
Perform compression of output files for long term storage.
(module (function_definition (function_name_groups_setPurpose) function_name_groups_setPurpose (parameters (identifier_self) identifier_self (keyword_separator )keyword_separator (typed_parameter (identifier_channel) identifier_channel (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_purpose) identifier_purpose (type (identifier_str) identifier_str )type )typed_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (type (identifier_SlackResponse) identifier_SlackResponse )type (block (expression_statement (call (attribute (identifier_kwargs) identifier_kwargs (identifier_update) identifier_update )attribute (argument_list (dictionary (pair (string_"channel") string_"channel" (identifier_channel) identifier_channel )pair (pair (string_"purpose") string_"purpose" (identifier_purpose) identifier_purpose )pair )dictionary )argument_list )call )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_api_call) identifier_api_call )attribute (argument_list (string_"groups.setPurpose") string_"groups.setPurpose" (keyword_argument (identifier_json) identifier_json (identifier_kwargs) identifier_kwargs )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Sets the purpose for a private channel. Args: channel (str): The channel id. e.g. 'G1234567890' purpose (str): The new purpose for the channel. e.g. 'My Purpose'
(module (function_definition (function_name_calc_login_v1) function_name_calc_login_v1 (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_der) identifier_der (attribute (attribute (attribute (identifier_self) identifier_self (identifier_parameters) identifier_parameters )attribute (identifier_derived) identifier_derived )attribute (identifier_fastaccess) identifier_fastaccess )attribute )assignment )expression_statement (expression_statement (assignment (identifier_flu) identifier_flu (attribute (attribute (attribute (identifier_self) identifier_self (identifier_sequences) identifier_sequences )attribute (identifier_fluxes) identifier_fluxes )attribute (identifier_fastaccess) identifier_fastaccess )attribute )assignment )expression_statement (expression_statement (assignment (identifier_log) identifier_log (attribute (attribute (attribute (identifier_self) identifier_self (identifier_sequences) identifier_sequences )attribute (identifier_logs) identifier_logs )attribute (identifier_fastaccess) identifier_fastaccess )attribute )assignment )expression_statement (for_statement (identifier_idx) identifier_idx (call (identifier_range) identifier_range (argument_list (attribute (identifier_der) identifier_der (identifier_nmb) identifier_nmb )attribute )argument_list )call (block (for_statement (identifier_jdx) identifier_jdx (call (identifier_range) identifier_range (argument_list (binary_operator (subscript (attribute (identifier_der) identifier_der (identifier_ma_order) identifier_ma_order )attribute (identifier_idx) identifier_idx )subscript (integer_2) integer_2 )binary_operator (unary_operator (integer_1) integer_1 )unary_operator (unary_operator (integer_1) integer_1 )unary_operator )argument_list )call (block (expression_statement (assignment (subscript (attribute (identifier_log) identifier_log (identifier_login) identifier_login )attribute (identifier_idx) identifier_idx (binary_operator (identifier_jdx) identifier_jdx (integer_1) integer_1 )binary_operator )subscript (subscript (attribute (identifier_log) identifier_log (identifier_login) identifier_login )attribute (identifier_idx) identifier_idx (identifier_jdx) identifier_jdx )subscript )assignment )expression_statement )block )for_statement )block )for_statement (for_statement (identifier_idx) identifier_idx (call (identifier_range) identifier_range (argument_list (attribute (identifier_der) identifier_der (identifier_nmb) identifier_nmb )attribute )argument_list )call (block (expression_statement (assignment (subscript (attribute (identifier_log) identifier_log (identifier_login) identifier_login )attribute (identifier_idx) identifier_idx (integer_0) integer_0 )subscript (subscript (attribute (identifier_flu) identifier_flu (identifier_qpin) identifier_qpin )attribute (identifier_idx) identifier_idx )subscript )assignment )expression_statement )block )for_statement )block )function_definition )module
Refresh the input log sequence for the different MA processes. Required derived parameters: |Nmb| |MA_Order| Required flux sequence: |QPIn| Updated log sequence: |LogIn| Example: Assume there are three response functions, involving one, two and three MA coefficients respectively: >>> from hydpy.models.arma import * >>> parameterstep() >>> derived.nmb(3) >>> derived.ma_order.shape = 3 >>> derived.ma_order = 1, 2, 3 >>> fluxes.qpin.shape = 3 >>> logs.login.shape = (3, 3) The "memory values" of the different MA processes are defined as follows (one row for each process): >>> logs.login = ((1.0, nan, nan), ... (2.0, 3.0, nan), ... (4.0, 5.0, 6.0)) These are the new inflow discharge portions to be included into the memories of the different processes: >>> fluxes.qpin = 7.0, 8.0, 9.0 Through applying method |calc_login_v1| all values already existing are shifted to the right ("into the past"). Values, which are no longer required due to the limited order or the different MA processes, are discarded. The new values are inserted in the first column: >>> model.calc_login_v1() >>> logs.login login([[7.0, nan, nan], [8.0, 2.0, nan], [9.0, 4.0, 5.0]])
(module (function_definition (function_name_aroon_down) function_name_aroon_down (parameters (identifier_data) identifier_data (identifier_period) identifier_period )parameters (block (expression_statement (call (attribute (identifier_catch_errors) identifier_catch_errors (identifier_check_for_period_error) identifier_check_for_period_error )attribute (argument_list (identifier_data) identifier_data (identifier_period) identifier_period )argument_list )call )expression_statement (expression_statement (assignment (identifier_period) identifier_period (call (identifier_int) identifier_int (argument_list (identifier_period) identifier_period )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_a_down) identifier_a_down (list_comprehension (binary_operator (parenthesized_expression (binary_operator (parenthesized_expression (binary_operator (identifier_period) identifier_period (call (attribute (call (identifier_list) identifier_list (argument_list (call (identifier_reversed) identifier_reversed (argument_list (subscript (identifier_data) identifier_data (slice (binary_operator (binary_operator (identifier_idx) identifier_idx (integer_1) integer_1 )binary_operator (identifier_period) identifier_period )binary_operator (colon) colon (binary_operator (identifier_idx) identifier_idx (integer_1) integer_1 )binary_operator )slice )subscript )argument_list )call )argument_list )call (identifier_index) identifier_index )attribute (argument_list (call (attribute (identifier_np) identifier_np (identifier_min) identifier_min )attribute (argument_list (subscript (identifier_data) identifier_data (slice (binary_operator (binary_operator (identifier_idx) identifier_idx (integer_1) integer_1 )binary_operator (identifier_period) identifier_period )binary_operator (colon) colon (binary_operator (identifier_idx) identifier_idx (integer_1) integer_1 )binary_operator )slice )subscript )argument_list )call )argument_list )call )binary_operator )parenthesized_expression (call (identifier_float) identifier_float (argument_list (identifier_period) identifier_period )argument_list )call )binary_operator )parenthesized_expression (integer_100) integer_100 )binary_operator (for_in_clause (identifier_idx) identifier_idx (call (identifier_range) identifier_range (argument_list (binary_operator (identifier_period) identifier_period (integer_1) integer_1 )binary_operator (call (identifier_len) identifier_len (argument_list (identifier_data) identifier_data )argument_list )call )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_a_down) identifier_a_down (call (identifier_fill_for_noncomputable_vals) identifier_fill_for_noncomputable_vals (argument_list (identifier_data) identifier_data (identifier_a_down) identifier_a_down )argument_list )call )assignment )expression_statement (return_statement (identifier_a_down) identifier_a_down )return_statement )block )function_definition )module
Aroon Down. Formula: AROONDWN = (((PERIOD) - (PERIODS SINCE PERIOD LOW)) / (PERIOD)) * 100
(module (function_definition (function_name_update) function_name_update (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isdir) identifier_isdir )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute )argument_list )call )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_makedirs) identifier_makedirs )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute )argument_list )call )expression_statement )block )if_statement (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isdir) identifier_isdir )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute (string_'refs') string_'refs' )argument_list )call )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_subprocess) identifier_subprocess (identifier_check_output) identifier_check_output )attribute (argument_list (list (string_'git') string_'git' (string_'clone') string_'clone' (string_'--bare') string_'--bare' (attribute (identifier_self) identifier_self (identifier_repo_git) identifier_repo_git )attribute (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute )list )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_run) identifier_run )attribute (argument_list (list (string_'gc') string_'gc' (string_'--auto') string_'--auto' (string_'--prune=all') string_'--prune=all' )list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_run) identifier_run )attribute (argument_list (list (string_'fetch') string_'fetch' (string_'-p') string_'-p' (string_'origin') string_'origin' (string_'+refs/heads/*:refs/heads/*') string_'+refs/heads/*:refs/heads/*' )list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_run) identifier_run )attribute (argument_list (list (string_'fetch') string_'fetch' (string_'origin') string_'origin' (string_'+refs/pull/*/head:refs/pull/*') string_'+refs/pull/*/head:refs/pull/*' )list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_run) identifier_run )attribute (argument_list (list (string_'fetch') string_'fetch' (string_'origin') string_'origin' (string_'+refs/merge-requests/*/head:refs/pull/*') string_'+refs/merge-requests/*/head:refs/pull/*' )list )argument_list )call )expression_statement )block )function_definition )module
Get a repository git or update it
(module (function_definition (function_name__format_pair_with_equals) function_name__format_pair_with_equals (parameters (identifier_explode) identifier_explode (identifier_separator) identifier_separator (identifier_escape) identifier_escape (identifier_key) identifier_key (identifier_value) identifier_value )parameters (block (if_statement (not_operator (identifier_value) identifier_value )not_operator (block (return_statement (binary_operator (identifier_key) identifier_key (string_'=') string_'=' )binary_operator )return_statement )block )if_statement (return_statement (call (identifier__format_pair) identifier__format_pair (argument_list (identifier_explode) identifier_explode (identifier_separator) identifier_separator (identifier_escape) identifier_escape (identifier_key) identifier_key (identifier_value) identifier_value )argument_list )call )return_statement )block )function_definition )module
Format a key, value pair including the equals sign when there is no value
(module (function_definition (function_name_rastrigin) function_name_rastrigin (parameters (identifier_self) identifier_self (identifier_x) identifier_x )parameters (block (if_statement (not_operator (call (identifier_isscalar) identifier_isscalar (argument_list (subscript (identifier_x) identifier_x (integer_0) integer_0 )subscript )argument_list )call )not_operator (block (expression_statement (assignment (identifier_N) identifier_N (call (identifier_len) identifier_len (argument_list (subscript (identifier_x) identifier_x (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (return_statement (list_comprehension (binary_operator (binary_operator (integer_10) integer_10 (identifier_N) identifier_N )binary_operator (call (identifier_sum) identifier_sum (argument_list (binary_operator (binary_operator (identifier_xi) identifier_xi (integer_2) integer_2 )binary_operator (binary_operator (integer_10) integer_10 (call (attribute (identifier_np) identifier_np (identifier_cos) identifier_cos )attribute (argument_list (binary_operator (binary_operator (integer_2) integer_2 (attribute (identifier_np) identifier_np (identifier_pi) identifier_pi )attribute )binary_operator (identifier_xi) identifier_xi )binary_operator )argument_list )call )binary_operator )binary_operator )argument_list )call )binary_operator (for_in_clause (identifier_xi) identifier_xi (identifier_x) identifier_x )for_in_clause )list_comprehension )return_statement )block )if_statement (expression_statement (assignment (identifier_N) identifier_N (call (identifier_len) identifier_len (argument_list (identifier_x) identifier_x )argument_list )call )assignment )expression_statement (return_statement (binary_operator (binary_operator (integer_10) integer_10 (identifier_N) identifier_N )binary_operator (call (identifier_sum) identifier_sum (argument_list (binary_operator (binary_operator (identifier_x) identifier_x (integer_2) integer_2 )binary_operator (binary_operator (integer_10) integer_10 (call (attribute (identifier_np) identifier_np (identifier_cos) identifier_cos )attribute (argument_list (binary_operator (binary_operator (integer_2) integer_2 (attribute (identifier_np) identifier_np (identifier_pi) identifier_pi )attribute )binary_operator (identifier_x) identifier_x )binary_operator )argument_list )call )binary_operator )binary_operator )argument_list )call )binary_operator )return_statement )block )function_definition )module
Rastrigin test objective function
(module (function_definition (function_name_fix_attr_encoding) function_name_fix_attr_encoding (parameters (identifier_ds) identifier_ds )parameters (block (function_definition (function_name__maybe_del_attr) function_name__maybe_del_attr (parameters (identifier_da) identifier_da (identifier_attr) identifier_attr )parameters (block (if_statement (comparison_operator (identifier_attr) identifier_attr (attribute (identifier_da) identifier_da (identifier_attrs) identifier_attrs )attribute )comparison_operator (block (delete_statement (subscript (attribute (identifier_da) identifier_da (identifier_attrs) identifier_attrs )attribute (identifier_attr) identifier_attr )subscript )delete_statement )block )if_statement (return_statement (identifier_da) identifier_da )return_statement )block )function_definition (function_definition (function_name__maybe_decode_attr) function_name__maybe_decode_attr (parameters (identifier_da) identifier_da (identifier_attr) identifier_attr )parameters (block (if_statement (boolean_operator (parenthesized_expression (comparison_operator (identifier_attr) identifier_attr (attribute (identifier_da) identifier_da (identifier_attrs) identifier_attrs )attribute )comparison_operator )parenthesized_expression (parenthesized_expression (call (identifier_type) identifier_type (argument_list (comparison_operator (subscript (attribute (identifier_da) identifier_da (identifier_attrs) identifier_attrs )attribute (identifier_attr) identifier_attr )subscript (identifier_bool) identifier_bool )comparison_operator )argument_list )call )parenthesized_expression )boolean_operator (block (expression_statement (assignment (subscript (attribute (identifier_da) identifier_da (identifier_attrs) identifier_attrs )attribute (identifier_attr) identifier_attr )subscript (call (identifier_int) identifier_int (argument_list (subscript (attribute (identifier_da) identifier_da (identifier_attrs) identifier_attrs )attribute (identifier_attr) identifier_attr )subscript )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_da) identifier_da )return_statement )block )function_definition (for_statement (identifier_v) identifier_v (attribute (identifier_ds) identifier_ds (identifier_data_vars) identifier_data_vars )attribute (block (expression_statement (assignment (identifier_da) identifier_da (subscript (identifier_ds) identifier_ds (identifier_v) identifier_v )subscript )assignment )expression_statement (expression_statement (assignment (identifier_da) identifier_da (call (identifier__maybe_del_attr) identifier__maybe_del_attr (argument_list (identifier_da) identifier_da (string_'scale_factor') string_'scale_factor' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_da) identifier_da (call (identifier__maybe_del_attr) identifier__maybe_del_attr (argument_list (identifier_da) identifier_da (string_'units') string_'units' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_da) identifier_da (call (identifier__maybe_decode_attr) identifier__maybe_decode_attr (argument_list (identifier_da) identifier_da (string_'hydrocarbon') string_'hydrocarbon' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_da) identifier_da (call (identifier__maybe_decode_attr) identifier__maybe_decode_attr (argument_list (identifier_da) identifier_da (string_'chemical') string_'chemical' )argument_list )call )assignment )expression_statement )block )for_statement (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_ds) identifier_ds (string_'time') string_'time' )argument_list )call (block (expression_statement (assignment (identifier_times) identifier_times (attribute (identifier_ds) identifier_ds (identifier_time) identifier_time )attribute )assignment )expression_statement (expression_statement (assignment (identifier_times) identifier_times (call (identifier__maybe_del_attr) identifier__maybe_del_attr (argument_list (identifier_times) identifier_times (string_'units') string_'units' )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_ds) identifier_ds )return_statement )block )function_definition )module
This is a temporary hot-fix to handle the way metadata is encoded when we read data directly from bpch files. It removes the 'scale_factor' and 'units' attributes we encode with the data we ingest, converts the 'hydrocarbon' and 'chemical' attribute to a binary integer instead of a boolean, and removes the 'units' attribute from the "time" dimension since that too is implicitly encoded. In future versions of this library, when upstream issues in decoding data wrapped in dask arrays is fixed, this won't be necessary and will be removed.
(module (function_definition (function_name_prune) function_name_prune (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_target_user_ids) identifier_target_user_ids (call (attribute (call (attribute (identifier_self) identifier_self (identifier_get_queryset) identifier_get_queryset )attribute (argument_list )argument_list )call (identifier_values_list) identifier_values_list )attribute (argument_list (string_'id') string_'id' (keyword_argument (identifier_flat) identifier_flat (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_exclude_user_ids) identifier_exclude_user_ids (call (attribute (call (attribute (attribute (identifier_SentDrip) identifier_SentDrip (identifier_objects) identifier_objects )attribute (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_date__lt) identifier_date__lt (call (identifier_conditional_now) identifier_conditional_now (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_drip) identifier_drip (attribute (identifier_self) identifier_self (identifier_drip_model) identifier_drip_model )attribute )keyword_argument (keyword_argument (identifier_user__id__in) identifier_user__id__in (identifier_target_user_ids) identifier_target_user_ids )keyword_argument )argument_list )call (line_continuation_\) line_continuation_\ (identifier_values_list) identifier_values_list )attribute (argument_list (string_'user_id') string_'user_id' (keyword_argument (identifier_flat) identifier_flat (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__queryset) identifier__queryset )attribute (call (attribute (call (attribute (identifier_self) identifier_self (identifier_get_queryset) identifier_get_queryset )attribute (argument_list )argument_list )call (identifier_exclude) identifier_exclude )attribute (argument_list (keyword_argument (identifier_id__in) identifier_id__in (identifier_exclude_user_ids) identifier_exclude_user_ids )keyword_argument )argument_list )call )assignment )expression_statement )block )function_definition )module
Do an exclude for all Users who have a SentDrip already.
(module (function_definition (function_name_get_data_by_hex_uuid_or_404) function_name_get_data_by_hex_uuid_or_404 (parameters (identifier_model) identifier_model (identifier_hex_uuid) identifier_hex_uuid (default_parameter (identifier_kind) identifier_kind (string_'') string_'' )default_parameter )parameters (block (expression_statement (assignment (identifier_uuid) identifier_uuid (call (identifier_UUID) identifier_UUID (argument_list (identifier_hex_uuid) identifier_hex_uuid )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_bin_uuid) identifier_bin_uuid (call (attribute (identifier_uuid) identifier_uuid (identifier_get_bytes) identifier_get_bytes )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_instance) identifier_instance (call (identifier_get_instance_by_bin_uuid) identifier_get_instance_by_bin_uuid (argument_list (identifier_model) identifier_model (identifier_bin_uuid) identifier_bin_uuid )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_instance) identifier_instance )not_operator (block (return_statement (call (identifier_abort) identifier_abort (argument_list (integer_404) integer_404 )argument_list )call )return_statement )block )if_statement (return_statement (call (identifier_ins2dict) identifier_ins2dict (argument_list (identifier_instance) identifier_instance (identifier_kind) identifier_kind )argument_list )call )return_statement )block )function_definition )module
Get instance data by uuid and kind. Raise 404 Not Found if there is no data. This requires model has a `bin_uuid` column. :param model: a string, model name in rio.models :param hex_uuid: a hex uuid string in 24-bytes human-readable representation. :return: a dict.
(module (function_definition (function_name__to_numpy) function_name__to_numpy (parameters (identifier_nd4j_array) identifier_nd4j_array )parameters (block (expression_statement (assignment (identifier_buff) identifier_buff (call (attribute (identifier_nd4j_array) identifier_nd4j_array (identifier_data) identifier_data )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_address) identifier_address (call (attribute (call (attribute (identifier_buff) identifier_buff (identifier_pointer) identifier_pointer )attribute (argument_list )argument_list )call (identifier_address) identifier_address )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_dtype) identifier_dtype (call (identifier_get_context_dtype) identifier_get_context_dtype (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_mapping) identifier_mapping (dictionary (pair (string_'double') string_'double' (attribute (identifier_ctypes) identifier_ctypes (identifier_c_double) identifier_c_double )attribute )pair (pair (string_'float') string_'float' (attribute (identifier_ctypes) identifier_ctypes (identifier_c_float) identifier_c_float )attribute )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_Pointer) identifier_Pointer (call (attribute (identifier_ctypes) identifier_ctypes (identifier_POINTER) identifier_POINTER )attribute (argument_list (subscript (identifier_mapping) identifier_mapping (identifier_dtype) identifier_dtype )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_pointer) identifier_pointer (call (attribute (identifier_ctypes) identifier_ctypes (identifier_cast) identifier_cast )attribute (argument_list (identifier_address) identifier_address (identifier_Pointer) identifier_Pointer )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_np_array) identifier_np_array (call (attribute (attribute (identifier_np) identifier_np (identifier_ctypeslib) identifier_ctypeslib )attribute (identifier_as_array) identifier_as_array )attribute (argument_list (identifier_pointer) identifier_pointer (call (identifier_tuple) identifier_tuple (argument_list (call (attribute (identifier_nd4j_array) identifier_nd4j_array (identifier_shape) identifier_shape )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (identifier_np_array) identifier_np_array )return_statement )block )function_definition )module
Convert nd4j array to numpy array
(module (function_definition (function_name_delete) function_name_delete (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_params) identifier_params (dictionary (pair (string_"email") string_"email" (attribute (identifier_self) identifier_self (identifier_email_address) identifier_email_address )attribute )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_self) identifier_self (identifier__delete) identifier__delete )attribute (argument_list (string_"/admins.json") string_"/admins.json" (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument )argument_list )call )assignment )expression_statement )block )function_definition )module
Deletes the administrator from the account.
(module (function_definition (function_name_exit_frames) function_name_exit_frames (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__exit_frames) identifier__exit_frames )attribute (None) None )comparison_operator (block (expression_statement (assignment (identifier_exit_frames) identifier_exit_frames (list )list )assignment )expression_statement (for_statement (identifier_frame) identifier_frame (attribute (identifier_self) identifier_self (identifier_frames) identifier_frames )attribute (block (if_statement (call (identifier_any) identifier_any (generator_expression (comparison_operator (attribute (identifier_c) identifier_c (identifier_group) identifier_group )attribute (identifier_self) identifier_self )comparison_operator (for_in_clause (identifier_c) identifier_c (attribute (identifier_frame) identifier_frame (identifier_children) identifier_children )attribute )for_in_clause )generator_expression )call (block (expression_statement (call (attribute (identifier_exit_frames) identifier_exit_frames (identifier_append) identifier_append )attribute (argument_list (identifier_frame) identifier_frame )argument_list )call )expression_statement )block )if_statement )block )for_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__exit_frames) identifier__exit_frames )attribute (identifier_exit_frames) identifier_exit_frames )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier__exit_frames) identifier__exit_frames )attribute )return_statement )block )function_definition )module
Returns a list of frames whose children include a frame outside of the group
(module (function_definition (function_name_get_new_locations) function_name_get_new_locations (parameters (identifier_self) identifier_self (identifier_urls) identifier_urls )parameters (block (expression_statement (assignment (identifier_seen) identifier_seen (call (identifier_set) identifier_set (argument_list (identifier_urls) identifier_urls )argument_list )call )assignment )expression_statement (for_statement (identifier_i) identifier_i (identifier_urls) identifier_urls (block (for_statement (identifier_k) identifier_k (call (attribute (identifier_self) identifier_self (identifier_get_locations) identifier_get_locations )attribute (argument_list (identifier_i) identifier_i )argument_list )call (block (if_statement (comparison_operator (identifier_k) identifier_k (identifier_seen) identifier_seen )comparison_operator (block (expression_statement (call (attribute (identifier_seen) identifier_seen (identifier_add) identifier_add )attribute (argument_list (identifier_k) identifier_k )argument_list )call )expression_statement (expression_statement (yield (identifier_k) identifier_k )yield )expression_statement )block )if_statement )block )for_statement )block )for_statement )block )function_definition )module
Get valid location header values for all given URLs. The returned values are new, that is: they do not repeat any value contained in the original input. Only unique values are yielded. :param urls: a list of URL addresses :returns: valid location header values from responses to the URLs
(module (function_definition (function_name_service) function_name_service (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier__service) identifier__service )attribute )not_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__service) identifier__service )attribute (call (attribute (attribute (identifier_self) identifier_self (identifier__client) identifier__client )attribute (identifier_service) identifier_service )attribute (argument_list (keyword_argument (identifier_id) identifier_id (attribute (identifier_self) identifier_self (identifier_service_id) identifier_service_id )attribute )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier__service) identifier__service )attribute )return_statement )block )function_definition )module
Retrieve the `Service` object to which this execution is associated.
(module (function_definition (function_name_dataset_format_to_extension) function_name_dataset_format_to_extension (parameters (identifier_ds_format) identifier_ds_format )parameters (block (try_statement (block (return_statement (subscript (identifier_DATASET_FORMATS) identifier_DATASET_FORMATS (identifier_ds_format) identifier_ds_format )subscript )return_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"dataset_format is expected to be one of %s. '%s' is not valid") string_"dataset_format is expected to be one of %s. '%s' is not valid" (tuple (call (attribute (string_", ") string_", " (identifier_join) identifier_join )attribute (argument_list (call (attribute (identifier_DATASET_FORMATS) identifier_DATASET_FORMATS (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call (identifier_ds_format) identifier_ds_format )tuple )binary_operator )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Get the preferred Dataset format extension :param str ds_format: Format of the Dataset (expected to be one of `csv` or `xml`) :rtype: str
(module (function_definition (function_name_fai_from_bam) function_name_fai_from_bam (parameters (identifier_ref_file) identifier_ref_file (identifier_bam_file) identifier_bam_file (identifier_out_file) identifier_out_file (identifier_data) identifier_data )parameters (block (expression_statement (assignment (identifier_contigs) identifier_contigs (call (identifier_set) identifier_set (argument_list (list_comprehension (attribute (identifier_x) identifier_x (identifier_contig) identifier_contig )attribute (for_in_clause (identifier_x) identifier_x (call (identifier_idxstats) identifier_idxstats (argument_list (identifier_bam_file) identifier_bam_file (identifier_data) identifier_data )argument_list )call )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (identifier_utils) identifier_utils (identifier_file_uptodate) identifier_file_uptodate )attribute (argument_list (identifier_out_file) identifier_out_file (identifier_bam_file) identifier_bam_file )argument_list )call )not_operator (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (call (attribute (identifier_ref) identifier_ref (identifier_fasta_idx) identifier_fasta_idx )attribute (argument_list (identifier_ref_file) identifier_ref_file (subscript (identifier_data) identifier_data (string_"config") string_"config" )subscript )argument_list )call )argument_list )call (as_pattern_target (identifier_in_handle) identifier_in_handle )as_pattern_target )as_pattern )with_item )with_clause (block (with_statement (with_clause (with_item (as_pattern (call (identifier_file_transaction) identifier_file_transaction (argument_list (identifier_data) identifier_data (identifier_out_file) identifier_out_file )argument_list )call (as_pattern_target (identifier_tx_out_file) identifier_tx_out_file )as_pattern_target )as_pattern )with_item )with_clause (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_tx_out_file) identifier_tx_out_file (string_"w") string_"w" )argument_list )call (as_pattern_target (identifier_out_handle) identifier_out_handle )as_pattern_target )as_pattern )with_item )with_clause (block (for_statement (identifier_line) identifier_line (generator_expression (identifier_l) identifier_l (for_in_clause (identifier_l) identifier_l (identifier_in_handle) identifier_in_handle )for_in_clause (if_clause (call (attribute (identifier_l) identifier_l (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )if_clause )generator_expression (block (if_statement (comparison_operator (subscript (call (attribute (identifier_line) identifier_line (identifier_split) identifier_split )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript (identifier_contigs) identifier_contigs )comparison_operator (block (expression_statement (call (attribute (identifier_out_handle) identifier_out_handle (identifier_write) identifier_write )attribute (argument_list (identifier_line) identifier_line )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )with_statement )block )with_statement )block )with_statement )block )if_statement (return_statement (identifier_out_file) identifier_out_file )return_statement )block )function_definition )module
Create a fai index with only contigs in the input BAM file.
(module (function_definition (function_name_package_manager_owns) function_name_package_manager_owns (parameters (identifier_self) identifier_self (identifier_dist) identifier_dist )parameters (block (if_statement (comparison_operator (call (attribute (attribute (identifier_dist) identifier_dist (identifier_location) identifier_location )attribute (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (call (attribute (call (identifier_get_python_lib) identifier_get_python_lib (argument_list )argument_list )call (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )comparison_operator (block (expression_statement (assignment (identifier_filename) identifier_filename (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_dist) identifier_dist (identifier_location) identifier_location )attribute (binary_operator (call (attribute (identifier_dist) identifier_dist (identifier_egg_name) identifier_egg_name )attribute (argument_list )argument_list )call (string_".egg-info") string_".egg-info" )binary_operator )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_filename) identifier_filename (attribute (identifier_dist) identifier_dist (identifier_location) identifier_location )attribute )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (pattern_list (identifier_status) identifier_status (identifier_output) identifier_output )pattern_list (call (identifier_getstatusoutput) identifier_getstatusoutput (argument_list (binary_operator (string_"/usr/bin/acmefile -q %s") string_"/usr/bin/acmefile -q %s" (identifier_filename) identifier_filename )binary_operator )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_status) identifier_status (integer_0) integer_0 )comparison_operator (block (return_statement (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )return_statement )block (else_clause (block (return_statement (string_"") string_"" )return_statement )block )else_clause )if_statement )block )function_definition )module
Returns True if package manager 'owns' file Returns False if package manager does not 'own' file There is currently no way to determine if distutils or setuptools installed a package. A future feature of setuptools will make a package manifest which can be checked. 'filename' must be the full path to file
(module (function_definition (function_name_generate_routes) function_name_generate_routes (parameters (identifier_config) identifier_config )parameters (block (expression_statement (assignment (identifier_routes) identifier_routes (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_name) identifier_name (identifier_config) identifier_config )pattern_list (call (identifier_iteritems) identifier_iteritems (argument_list (identifier_config) identifier_config )argument_list )call (block (expression_statement (assignment (identifier_pattern) identifier_pattern (binary_operator (string_r'^%s(?P<url>.*)$') string_r'^%s(?P<url>.*)$' (call (attribute (identifier_re) identifier_re (identifier_escape) identifier_escape )attribute (argument_list (call (attribute (subscript (identifier_config) identifier_config (string_'prefix') string_'prefix' )subscript (identifier_lstrip) identifier_lstrip )attribute (argument_list (string_'/') string_'/' )argument_list )call )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_proxy) identifier_proxy (call (identifier_generate_proxy) identifier_generate_proxy (argument_list (keyword_argument (identifier_prefix) identifier_prefix (subscript (identifier_config) identifier_config (string_'prefix') string_'prefix' )subscript )keyword_argument (keyword_argument (identifier_base_url) identifier_base_url (subscript (identifier_config) identifier_config (string_'base_url') string_'base_url' )subscript )keyword_argument (keyword_argument (identifier_verify_ssl) identifier_verify_ssl (call (attribute (identifier_config) identifier_config (identifier_get) identifier_get )attribute (argument_list (string_'verify_ssl') string_'verify_ssl' (True) True )argument_list )call )keyword_argument (keyword_argument (identifier_middleware) identifier_middleware (call (attribute (identifier_config) identifier_config (identifier_get) identifier_get )attribute (argument_list (string_'middleware') string_'middleware' )argument_list )call )keyword_argument (keyword_argument (identifier_append_middleware) identifier_append_middleware (call (attribute (identifier_config) identifier_config (identifier_get) identifier_get )attribute (argument_list (string_'append_middleware') string_'append_middleware' )argument_list )call )keyword_argument (keyword_argument (identifier_cert) identifier_cert (call (attribute (identifier_config) identifier_config (identifier_get) identifier_get )attribute (argument_list (string_'cert') string_'cert' )argument_list )call )keyword_argument (keyword_argument (identifier_timeout) identifier_timeout (call (attribute (identifier_config) identifier_config (identifier_get) identifier_get )attribute (argument_list (string_'timeout') string_'timeout' )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_proxy_view_function) identifier_proxy_view_function (call (attribute (identifier_proxy) identifier_proxy (identifier_as_view) identifier_as_view )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_proxy_view_function) identifier_proxy_view_function (identifier_csrf_exempt) identifier_csrf_exempt )attribute (call (attribute (identifier_config) identifier_config (identifier_get) identifier_get )attribute (argument_list (string_'csrf_exempt') string_'csrf_exempt' (True) True )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_routes) identifier_routes (identifier_append) identifier_append )attribute (argument_list (call (identifier_url) identifier_url (argument_list (identifier_pattern) identifier_pattern (identifier_proxy_view_function) identifier_proxy_view_function (keyword_argument (identifier_name) identifier_name (identifier_name) identifier_name )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_routes) identifier_routes )return_statement )block )function_definition )module
Generate a list of urls that map to generated proxy views. generate_routes({ 'test_proxy': { 'base_url': 'https://google.com/', 'prefix': '/test_prefix/', 'verify_ssl': False, 'csrf_exempt: False', 'middleware': ['djproxy.proxy_middleware.AddXFF'], 'append_middleware': ['djproxy.proxy_middleware.AddXFF'], 'timeout': 3.0, 'cert': None } }) Required configuration keys: * `base_url` * `prefix` Optional configuration keys: * `verify_ssl`: defaults to `True`. * `csrf_exempt`: defaults to `True`. * `cert`: defaults to `None`. * `timeout`: defaults to `None`. * `middleware`: Defaults to `None`. Specifying `None` causes djproxy to use the default middleware set. If a list is passed, the default middleware list specified by the HttpProxy definition will be replaced with the provided list. * `append_middleware`: Defaults to `None`. `None` results in no changes to the default middleware set. If a list is specified, the list will be appended to the default middleware list specified in the HttpProxy definition or, if provided, the middleware key specificed in the config dict. Returns: [ url(r'^test_prefix/', GeneratedProxy.as_view(), name='test_proxy')), ]
(module (function_definition (function_name_AssertType) function_name_AssertType (parameters (identifier_value) identifier_value (identifier_expected_type) identifier_expected_type )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (identifier_expected_type) identifier_expected_type )argument_list )call )not_operator (block (expression_statement (assignment (identifier_message) identifier_message (string_"Expected type `%r`, but got value `%r` of type `%s`") string_"Expected type `%r`, but got value `%r` of type `%s`" )assignment )expression_statement (expression_statement (augmented_assignment (identifier_message) identifier_message (tuple (identifier_expected_type) identifier_expected_type (identifier_value) identifier_value (call (identifier_type) identifier_type (argument_list (identifier_value) identifier_value )argument_list )call )tuple )augmented_assignment )expression_statement (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (identifier_message) identifier_message )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Ensures that given value has certain type. Args: value: A value to assert the type for. expected_type: An expected type for the given value. Raises: TypeError: If given value does not have the expected type.
(module (function_definition (function_name_infer_len) function_name_infer_len (parameters (identifier_node) identifier_node (default_parameter (identifier_context) identifier_context (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_call) identifier_call (call (attribute (attribute (identifier_arguments) identifier_arguments (identifier_CallSite) identifier_CallSite )attribute (identifier_from_call) identifier_from_call )attribute (argument_list (identifier_node) identifier_node )argument_list )call )assignment )expression_statement (if_statement (attribute (identifier_call) identifier_call (identifier_keyword_arguments) identifier_keyword_arguments )attribute (block (raise_statement (call (identifier_UseInferenceDefault) identifier_UseInferenceDefault (argument_list (string_"TypeError: len() must take no keyword arguments") string_"TypeError: len() must take no keyword arguments" )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_call) identifier_call (identifier_positional_arguments) identifier_positional_arguments )attribute )argument_list )call (integer_1) integer_1 )comparison_operator (block (raise_statement (call (identifier_UseInferenceDefault) identifier_UseInferenceDefault (argument_list (call (attribute (concatenated_string (string_"TypeError: len() must take exactly one argument ") string_"TypeError: len() must take exactly one argument " (string_"({len}) given") string_"({len}) given" )concatenated_string (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_len) identifier_len (call (identifier_len) identifier_len (argument_list (attribute (identifier_call) identifier_call (identifier_positional_arguments) identifier_positional_arguments )attribute )argument_list )call )keyword_argument )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (list_pattern (identifier_argument_node) identifier_argument_node )list_pattern (attribute (identifier_call) identifier_call (identifier_positional_arguments) identifier_positional_arguments )attribute )assignment )expression_statement (try_statement (block (return_statement (call (attribute (identifier_nodes) identifier_nodes (identifier_Const) identifier_Const )attribute (argument_list (call (attribute (identifier_helpers) identifier_helpers (identifier_object_len) identifier_object_len )attribute (argument_list (identifier_argument_node) identifier_argument_node (keyword_argument (identifier_context) identifier_context (identifier_context) identifier_context )keyword_argument )argument_list )call )argument_list )call )return_statement )block (except_clause (as_pattern (tuple (identifier_AstroidTypeError) identifier_AstroidTypeError (identifier_InferenceError) identifier_InferenceError )tuple (as_pattern_target (identifier_exc) identifier_exc )as_pattern_target )as_pattern (block (raise_statement (call (identifier_UseInferenceDefault) identifier_UseInferenceDefault (argument_list (call (identifier_str) identifier_str (argument_list (identifier_exc) identifier_exc )argument_list )call )argument_list )call (identifier_exc) identifier_exc )raise_statement )block )except_clause )try_statement )block )function_definition )module
Infer length calls :param nodes.Call node: len call to infer :param context.InferenceContext: node context :rtype nodes.Const: a Const node with the inferred length, if possible
(module (function_definition (function_name_count) function_name_count (parameters (identifier_self) identifier_self )parameters (block (return_statement (parenthesized_expression (call (attribute (call (attribute (identifier_self) identifier_self (identifier_mapPartitions) identifier_mapPartitions )attribute (argument_list (lambda (lambda_parameters (identifier_p) identifier_p )lambda_parameters (list (call (identifier_sum) identifier_sum (generator_expression (integer_1) integer_1 (for_in_clause (identifier__) identifier__ (identifier_p) identifier_p )for_in_clause )generator_expression )call )list )lambda )argument_list )call (identifier_reduce) identifier_reduce )attribute (argument_list (attribute (identifier_operator) identifier_operator (identifier_add) identifier_add )attribute )argument_list )call )parenthesized_expression )return_statement )block )function_definition )module
Count elements per RDD. Creates a new RDD stream where each RDD has a single entry that is the count of the elements. :rtype: DStream