sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name__filter_plans) function_name__filter_plans (parameters (identifier_attr) identifier_attr (identifier_name) identifier_name (identifier_plans) identifier_plans )parameters (block (return_statement (list_comprehension (identifier_plan) identifier_plan (for_in_clause (identifier_plan) identifier_plan (identifier_plans) identifier_plans )for_in_clause (if_clause (comparison_operator (subscript (identifier_plan) identifier_plan (identifier_attr) identifier_attr )subscript (identifier_name) identifier_name )comparison_operator )if_clause )list_comprehension )return_statement )block )function_definition )module
Helper to return list of usage plan items matching the given attribute value.
(module (function_definition (function_name_makedbthreads) function_name_makedbthreads (parameters (identifier_self) identifier_self )parameters (block (for_statement (identifier_sample) identifier_sample (attribute (identifier_self) identifier_self (identifier_metadata) identifier_metadata )attribute (block (if_statement (comparison_operator (attribute (subscript (identifier_sample) identifier_sample (attribute (identifier_self) identifier_self (identifier_analysistype) identifier_analysistype )attribute )subscript (identifier_combinedtargets) identifier_combinedtargets )attribute (string_'NA') string_'NA' )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_targetfolders) identifier_targetfolders )attribute (identifier_add) identifier_add )attribute (argument_list (attribute (subscript (identifier_sample) identifier_sample (attribute (identifier_self) identifier_self (identifier_analysistype) identifier_analysistype )attribute )subscript (identifier_targetpath) identifier_targetpath )attribute )argument_list )call )expression_statement )block )if_statement )block )for_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_targetfolders) identifier_targetfolders )attribute )argument_list )call )argument_list )call (block (expression_statement (assignment (identifier_threads) identifier_threads (call (identifier_Thread) identifier_Thread (argument_list (keyword_argument (identifier_target) identifier_target (attribute (identifier_self) identifier_self (identifier_makeblastdb) identifier_makeblastdb )attribute )keyword_argument (keyword_argument (identifier_args) identifier_args (tuple )tuple )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_threads) identifier_threads (identifier_setDaemon) identifier_setDaemon )attribute (argument_list (True) True )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_threads) identifier_threads (identifier_start) identifier_start )attribute (argument_list )argument_list )call )expression_statement )block )for_statement (for_statement (identifier_targetdir) identifier_targetdir (attribute (identifier_self) identifier_self (identifier_targetfolders) identifier_targetfolders )attribute (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_targetfiles) identifier_targetfiles )attribute (call (identifier_glob) identifier_glob (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_targetdir) identifier_targetdir (string_'*.fasta') string_'*.fasta' )argument_list )call )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier__) identifier__ (subscript (attribute (identifier_self) identifier_self (identifier_targetfiles) identifier_targetfiles )attribute (integer_0) integer_0 )subscript )assignment )expression_statement )block (except_clause (identifier_IndexError) identifier_IndexError (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_targetfiles) identifier_targetfiles )attribute (call (identifier_glob) identifier_glob (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_targetdir) identifier_targetdir (string_'*.fasta') string_'*.fasta' )argument_list )call )argument_list )call )assignment )expression_statement )block )except_clause )try_statement (for_statement (identifier_targetfile) identifier_targetfile (attribute (identifier_self) identifier_self (identifier_targetfiles) identifier_targetfiles )attribute (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_records) identifier_records )attribute (identifier_targetfile) identifier_targetfile )subscript (call (attribute (identifier_SeqIO) identifier_SeqIO (identifier_to_dict) identifier_to_dict )attribute (argument_list (call (attribute (identifier_SeqIO) identifier_SeqIO (identifier_parse) identifier_parse )attribute (argument_list (identifier_targetfile) identifier_targetfile (string_'fasta') string_'fasta' )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_dqueue) identifier_dqueue )attribute (identifier_put) identifier_put )attribute (argument_list (identifier_targetfile) identifier_targetfile )argument_list )call )expression_statement )block )for_statement )block )for_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_dqueue) identifier_dqueue )attribute (identifier_join) identifier_join )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Setup and create threads for class
(module (function_definition (function_name_addAggShkDstn) function_name_addAggShkDstn (parameters (identifier_self) identifier_self (identifier_AggShkDstn) identifier_AggShkDstn )parameters (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_IncomeDstn) identifier_IncomeDstn )attribute (integer_0) integer_0 )subscript )argument_list )call (integer_3) integer_3 )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_IncomeDstn) identifier_IncomeDstn )attribute (attribute (identifier_self) identifier_self (identifier_IncomeDstnWithoutAggShocks) identifier_IncomeDstnWithoutAggShocks )attribute )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_IncomeDstnWithoutAggShocks) identifier_IncomeDstnWithoutAggShocks )attribute (attribute (identifier_self) identifier_self (identifier_IncomeDstn) identifier_IncomeDstn )attribute )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_IncomeDstn) identifier_IncomeDstn )attribute (list_comprehension (call (identifier_combineIndepDstns) identifier_combineIndepDstns (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_IncomeDstn) identifier_IncomeDstn )attribute (identifier_t) identifier_t )subscript (identifier_AggShkDstn) identifier_AggShkDstn )argument_list )call (for_in_clause (identifier_t) identifier_t (call (identifier_range) identifier_range (argument_list (attribute (identifier_self) identifier_self (identifier_T_cycle) identifier_T_cycle )attribute )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement )block )function_definition )module
Updates attribute IncomeDstn by combining idiosyncratic shocks with aggregate shocks. Parameters ---------- AggShkDstn : [np.array] Aggregate productivity shock distribution. First element is proba- bilities, second element is agg permanent shocks, third element is agg transitory shocks. Returns ------- None
(module (function_definition (function_name__is_device) function_name__is_device (parameters (identifier_path) identifier_path )parameters (block (expression_statement (assignment (identifier_out) identifier_out (call (subscript (identifier___salt__) identifier___salt__ (string_'cmd.run_all') string_'cmd.run_all' )subscript (argument_list (call (attribute (string_'file -i {0}') string_'file -i {0}' (identifier_format) identifier_format )attribute (argument_list (identifier_path) identifier_path )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (identifier__verify_run) identifier__verify_run (argument_list (identifier_out) identifier_out )argument_list )call )expression_statement (return_statement (comparison_operator (subscript (subscript (call (attribute (identifier_re) identifier_re (identifier_split) identifier_split )attribute (argument_list (string_r'\s+') string_r'\s+' (subscript (identifier_out) identifier_out (string_'stdout') string_'stdout' )subscript )argument_list )call (integer_1) integer_1 )subscript (slice (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript (string_'inode/blockdevice') string_'inode/blockdevice' )comparison_operator )return_statement )block )function_definition )module
Return True if path is a physical device.
(module (function_definition (function_name_convert_to_string) function_name_convert_to_string (parameters (identifier_ndarr) identifier_ndarr )parameters (block (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_contextlib) identifier_contextlib (identifier_closing) identifier_closing )attribute (argument_list (call (identifier_BytesIO) identifier_BytesIO (argument_list )argument_list )call )argument_list )call (as_pattern_target (identifier_bytesio) identifier_bytesio )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (identifier__internal_write) identifier__internal_write (argument_list (identifier_bytesio) identifier_bytesio (identifier_ndarr) identifier_ndarr )argument_list )call )expression_statement (return_statement (call (attribute (identifier_bytesio) identifier_bytesio (identifier_getvalue) identifier_getvalue )attribute (argument_list )argument_list )call )return_statement )block )with_statement )block )function_definition )module
Writes the contents of the numpy.ndarray ndarr to bytes in IDX format and returns it.
(module (function_definition (function_name__GetSignatureMatchParserNames) function_name__GetSignatureMatchParserNames (parameters (identifier_self) identifier_self (identifier_file_object) identifier_file_object )parameters (block (expression_statement (assignment (identifier_parser_names) identifier_parser_names (list )list )assignment )expression_statement (expression_statement (assignment (identifier_scan_state) identifier_scan_state (call (attribute (identifier_pysigscan) identifier_pysigscan (identifier_scan_state) identifier_scan_state )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__file_scanner) identifier__file_scanner )attribute (identifier_scan_file_object) identifier_scan_file_object )attribute (argument_list (identifier_scan_state) identifier_scan_state (identifier_file_object) identifier_file_object )argument_list )call )expression_statement (for_statement (identifier_scan_result) identifier_scan_result (call (identifier_iter) identifier_iter (argument_list (attribute (identifier_scan_state) identifier_scan_state (identifier_scan_results) identifier_scan_results )attribute )argument_list )call (block (expression_statement (assignment (identifier_format_specification) identifier_format_specification (parenthesized_expression (call (attribute (attribute (identifier_self) identifier_self (identifier__formats_with_signatures) identifier__formats_with_signatures )attribute (identifier_GetSpecificationBySignature) identifier_GetSpecificationBySignature )attribute (argument_list (attribute (identifier_scan_result) identifier_scan_result (identifier_identifier) identifier_identifier )attribute )argument_list )call )parenthesized_expression )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_format_specification) identifier_format_specification (identifier_identifier) identifier_identifier )attribute (identifier_parser_names) identifier_parser_names )comparison_operator (block (expression_statement (call (attribute (identifier_parser_names) identifier_parser_names (identifier_append) identifier_append )attribute (argument_list (attribute (identifier_format_specification) identifier_format_specification (identifier_identifier) identifier_identifier )attribute )argument_list )call )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_parser_names) identifier_parser_names )return_statement )block )function_definition )module
Determines if a file-like object matches one of the known signatures. Args: file_object (file): file-like object whose contents will be checked for known signatures. Returns: list[str]: parser names for which the contents of the file-like object matches their known signatures.
(module (function_definition (function_name_run) function_name_run (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_client_params) identifier_client_params )dictionary_splat_pattern )parameters (block (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_send) identifier_send )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_get_collection_endpoint) identifier_get_collection_endpoint )attribute (argument_list )argument_list )call (keyword_argument (identifier_http_method) identifier_http_method (string_"POST") string_"POST" )keyword_argument (dictionary_splat (identifier_client_params) identifier_client_params )dictionary_splat )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (raise_statement (call (identifier_CartoException) identifier_CartoException (argument_list (identifier_e) identifier_e )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Actually creates the async job on the CARTO server :param client_params: To be send to the CARTO API. See CARTO's documentation depending on the subclass you are using :type client_params: kwargs :return: :raise: CartoException
(module (function_definition (function_name_find_guest) function_name_find_guest (parameters (identifier_name) identifier_name (default_parameter (identifier_quiet) identifier_quiet (False) False )default_parameter (default_parameter (identifier_path) identifier_path (None) None )default_parameter )parameters (block (if_statement (identifier_quiet) identifier_quiet (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_warning) identifier_warning )attribute (argument_list (concatenated_string (string_"'quiet' argument is being deprecated.") string_"'quiet' argument is being deprecated." (string_' Please migrate to --quiet') string_' Please migrate to --quiet' )concatenated_string )argument_list )call )expression_statement )block )if_statement (for_statement (identifier_data) identifier_data (call (identifier__list_iter) identifier__list_iter (argument_list (keyword_argument (identifier_path) identifier_path (identifier_path) identifier_path )keyword_argument )argument_list )call (block (expression_statement (assignment (pattern_list (identifier_host) identifier_host (identifier_l) identifier_l )pattern_list (call (identifier_next) identifier_next (argument_list (call (attribute (identifier_six) identifier_six (identifier_iteritems) identifier_iteritems )attribute (argument_list (identifier_data) identifier_data )argument_list )call )argument_list )call )assignment )expression_statement (for_statement (identifier_x) identifier_x (expression_list (string_'running') string_'running' (string_'frozen') string_'frozen' (string_'stopped') string_'stopped' )expression_list (block (if_statement (comparison_operator (identifier_name) identifier_name (subscript (identifier_l) identifier_l (identifier_x) identifier_x )subscript )comparison_operator (block (if_statement (not_operator (identifier_quiet) identifier_quiet )not_operator (block (expression_statement (call (attribute (identifier___jid_event__) identifier___jid_event__ (identifier_fire_event) identifier_fire_event )attribute (argument_list (dictionary (pair (string_'data') string_'data' (identifier_host) identifier_host )pair (pair (string_'outputter') string_'outputter' (string_'lxc_find_host') string_'lxc_find_host' )pair )dictionary (string_'progress') string_'progress' )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_host) identifier_host )return_statement )block )if_statement )block )for_statement )block )for_statement (return_statement (None) None )return_statement )block )function_definition )module
Returns the host for a container. path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0 .. code-block:: bash salt-run lxc.find_guest name
(module (function_definition (function_name_to_sky) function_name_to_sky (parameters (identifier_self) identifier_self (identifier_wcs) identifier_wcs (default_parameter (identifier_mode) identifier_mode (string_'all') string_'all' )default_parameter )parameters (block (expression_statement (assignment (identifier_sky_params) identifier_sky_params (call (attribute (identifier_self) identifier_self (identifier__to_sky_params) identifier__to_sky_params )attribute (argument_list (identifier_wcs) identifier_wcs (keyword_argument (identifier_mode) identifier_mode (identifier_mode) identifier_mode )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (identifier_SkyCircularAperture) identifier_SkyCircularAperture (argument_list (dictionary_splat (identifier_sky_params) identifier_sky_params )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Convert the aperture to a `SkyCircularAperture` object defined in celestial coordinates. Parameters ---------- wcs : `~astropy.wcs.WCS` The world coordinate system (WCS) transformation to use. mode : {'all', 'wcs'}, optional Whether to do the transformation including distortions (``'all'``; default) or only including only the core WCS transformation (``'wcs'``). Returns ------- aperture : `SkyCircularAperture` object A `SkyCircularAperture` object.
(module (function_definition (function_name_get_empty_tracks) function_name_get_empty_tracks (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_empty_track_indices) identifier_empty_track_indices (list_comprehension (identifier_idx) identifier_idx (for_in_clause (pattern_list (identifier_idx) identifier_idx (identifier_track) identifier_track )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (attribute (identifier_self) identifier_self (identifier_tracks) identifier_tracks )attribute )argument_list )call )for_in_clause (if_clause (not_operator (call (attribute (identifier_np) identifier_np (identifier_any) identifier_any )attribute (argument_list (attribute (identifier_track) identifier_track (identifier_pianoroll) identifier_pianoroll )attribute )argument_list )call )not_operator )if_clause )list_comprehension )assignment )expression_statement (return_statement (identifier_empty_track_indices) identifier_empty_track_indices )return_statement )block )function_definition )module
Return the indices of tracks with empty pianorolls. Returns ------- empty_track_indices : list The indices of tracks with empty pianorolls.
(module (function_definition (function_name__multiline_convert) function_name__multiline_convert (parameters (identifier_config) identifier_config (default_parameter (identifier_start) identifier_start (string_"banner login") string_"banner login" )default_parameter (default_parameter (identifier_end) identifier_end (string_"EOF") string_"EOF" )default_parameter (default_parameter (identifier_depth) identifier_depth (integer_1) integer_1 )default_parameter )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (call (identifier_list) identifier_list (argument_list (identifier_config) identifier_config )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_s) identifier_s (call (attribute (identifier_ret) identifier_ret (identifier_index) identifier_index )attribute (argument_list (identifier_start) identifier_start )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_e) identifier_e (identifier_s) identifier_s )assignment )expression_statement (while_statement (identifier_depth) identifier_depth (block (expression_statement (assignment (identifier_e) identifier_e (call (attribute (identifier_ret) identifier_ret (identifier_index) identifier_index )attribute (argument_list (identifier_end) identifier_end (binary_operator (identifier_e) identifier_e (integer_1) integer_1 )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_depth) identifier_depth (binary_operator (identifier_depth) identifier_depth (integer_1) integer_1 )binary_operator )assignment )expression_statement )block )while_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (return_statement (identifier_ret) identifier_ret )return_statement )block )except_clause )try_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (identifier_s) identifier_s )subscript (dictionary (pair (string_"cmd") string_"cmd" (subscript (identifier_ret) identifier_ret (identifier_s) identifier_s )subscript )pair (pair (string_"input") string_"input" (call (attribute (string_"\n") string_"\n" (identifier_join) identifier_join )attribute (argument_list (subscript (identifier_ret) identifier_ret (slice (binary_operator (identifier_s) identifier_s (integer_1) integer_1 )binary_operator (colon) colon (identifier_e) identifier_e )slice )subscript )argument_list )call )pair )dictionary )assignment )expression_statement (delete_statement (subscript (identifier_ret) identifier_ret (slice (binary_operator (identifier_s) identifier_s (integer_1) integer_1 )binary_operator (colon) colon (binary_operator (identifier_e) identifier_e (integer_1) integer_1 )binary_operator )slice )subscript )delete_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Converts running-config HEREDOC into EAPI JSON dict
(module (function_definition (function_name_update_descriptor_le) function_name_update_descriptor_le (parameters (identifier_self) identifier_self (identifier_lineedit) identifier_lineedit (identifier_tf) identifier_tf )parameters (block (if_statement (identifier_tf) identifier_tf (block (expression_statement (assignment (identifier_descriptor) identifier_descriptor (attribute (identifier_tf) identifier_tf (identifier_descriptor) identifier_descriptor )attribute )assignment )expression_statement (expression_statement (call (attribute (identifier_lineedit) identifier_lineedit (identifier_setText) identifier_setText )attribute (argument_list (identifier_descriptor) identifier_descriptor )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_lineedit) identifier_lineedit (identifier_setText) identifier_setText )attribute (argument_list (string_"") string_"" )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Update the given line edit to show the descriptor that is stored in the index :param lineedit: the line edit to update with the descriptor :type lineedit: QLineEdit :param tf: the selected taskfileinfo :type tf: :class:`TaskFileInfo` | None :returns: None :rtype: None :raises: None
(module (function_definition (function_name_write) function_name_write (parameters (identifier_self) identifier_self (identifier_data) identifier_data )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_data) identifier_data (tuple (identifier_bytes) identifier_bytes (identifier_bytearray) identifier_bytearray (identifier_list) identifier_list )tuple )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"Invalid data type, should be bytes, bytearray, or list.") string_"Invalid data type, should be bytes, bytearray, or list." )argument_list )call )raise_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_data) identifier_data (identifier_list) identifier_list )argument_list )call (block (expression_statement (assignment (identifier_data) identifier_data (call (identifier_bytearray) identifier_bytearray (argument_list (identifier_data) identifier_data )argument_list )call )assignment )expression_statement )block )if_statement (try_statement (block (return_statement (call (attribute (identifier_os) identifier_os (identifier_write) identifier_write )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__fd) identifier__fd )attribute (identifier_data) identifier_data )argument_list )call )return_statement )block (except_clause (as_pattern (identifier_OSError) identifier_OSError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (raise_statement (call (identifier_SerialError) identifier_SerialError (argument_list (attribute (identifier_e) identifier_e (identifier_errno) identifier_errno )attribute (binary_operator (string_"Writing serial port: ") string_"Writing serial port: " (attribute (identifier_e) identifier_e (identifier_strerror) identifier_strerror )attribute )binary_operator )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Write `data` to the serial port and return the number of bytes written. Args: data (bytes, bytearray, list): a byte array or list of 8-bit integers to write. Returns: int: number of bytes written. Raises: SerialError: if an I/O or OS error occurs. TypeError: if `data` type is invalid. ValueError: if data is not valid bytes.
(module (function_definition (function_name_account_delete) function_name_account_delete (parameters (identifier_request) identifier_request (identifier_username) identifier_username (default_parameter (identifier_template_name) identifier_template_name (attribute (identifier_accounts_settings) identifier_accounts_settings (identifier_ACCOUNTS_PROFILE_DETAIL_TEMPLATE) identifier_ACCOUNTS_PROFILE_DETAIL_TEMPLATE )attribute )default_parameter (default_parameter (identifier_extra_context) identifier_extra_context (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_user) identifier_user (call (identifier_get_object_or_404) identifier_get_object_or_404 (argument_list (call (identifier_get_user_model) identifier_get_user_model (argument_list )argument_list )call (keyword_argument (identifier_username__iexact) identifier_username__iexact (identifier_username) identifier_username )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_user) identifier_user (identifier_is_active) identifier_is_active )attribute (False) False )assignment )expression_statement (expression_statement (call (attribute (identifier_user) identifier_user (identifier_save) identifier_save )attribute (argument_list )argument_list )call )expression_statement (return_statement (call (identifier_redirect) identifier_redirect (argument_list (call (identifier_reverse) identifier_reverse (argument_list (string_'accounts_admin') string_'accounts_admin' )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Delete an account.
(module (function_definition (function_name_create_mv_rule) function_name_create_mv_rule (parameters (identifier_tensorprod_rule) identifier_tensorprod_rule (identifier_dim) identifier_dim )parameters (block (function_definition (function_name_mv_rule) function_name_mv_rule (parameters (identifier_order) identifier_order (default_parameter (identifier_sparse) identifier_sparse (False) False )default_parameter (default_parameter (identifier_part) identifier_part (None) None )default_parameter )parameters (block (if_statement (identifier_sparse) identifier_sparse (block (expression_statement (assignment (identifier_order) identifier_order (binary_operator (call (attribute (identifier_numpy) identifier_numpy (identifier_ones) identifier_ones )attribute (argument_list (identifier_dim) identifier_dim (keyword_argument (identifier_dtype) identifier_dtype (identifier_int) identifier_int )keyword_argument )argument_list )call (identifier_order) identifier_order )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_tensorprod_rule_) identifier_tensorprod_rule_ (lambda (lambda_parameters (identifier_order) identifier_order (default_parameter (identifier_part) identifier_part (identifier_part) identifier_part )default_parameter )lambda_parameters (line_continuation_\) line_continuation_\ (call (identifier_tensorprod_rule) identifier_tensorprod_rule (argument_list (identifier_order) identifier_order (keyword_argument (identifier_part) identifier_part (identifier_part) identifier_part )keyword_argument )argument_list )call )lambda )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_chaospy) identifier_chaospy (identifier_quad) identifier_quad )attribute (identifier_sparse_grid) identifier_sparse_grid )attribute (argument_list (identifier_tensorprod_rule_) identifier_tensorprod_rule_ (identifier_order) identifier_order )argument_list )call )return_statement )block )if_statement (return_statement (call (identifier_tensorprod_rule) identifier_tensorprod_rule (argument_list (identifier_order) identifier_order (keyword_argument (identifier_part) identifier_part (identifier_part) identifier_part )keyword_argument )argument_list )call )return_statement )block )function_definition (return_statement (identifier_mv_rule) identifier_mv_rule )return_statement )block )function_definition )module
Convert tensor product rule into a multivariate quadrature generator.
(module (function_definition (function_name_signal_committed_filefields) function_name_signal_committed_filefields (parameters (identifier_sender) identifier_sender (identifier_instance) identifier_instance (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (for_statement (identifier_field_name) identifier_field_name (call (identifier_getattr) identifier_getattr (argument_list (identifier_instance) identifier_instance (string_'_uncommitted_filefields') string_'_uncommitted_filefields' (tuple )tuple )argument_list )call (block (expression_statement (assignment (identifier_fieldfile) identifier_fieldfile (call (identifier_getattr) identifier_getattr (argument_list (identifier_instance) identifier_instance (identifier_field_name) identifier_field_name )argument_list )call )assignment )expression_statement (if_statement (identifier_fieldfile) identifier_fieldfile (block (expression_statement (call (attribute (attribute (identifier_signals) identifier_signals (identifier_saved_file) identifier_saved_file )attribute (identifier_send_robust) identifier_send_robust )attribute (argument_list (keyword_argument (identifier_sender) identifier_sender (identifier_sender) identifier_sender )keyword_argument (keyword_argument (identifier_fieldfile) identifier_fieldfile (identifier_fieldfile) identifier_fieldfile )keyword_argument )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
A post_save signal handler which sends a signal for each ``FileField`` that was committed this save.
(module (function_definition (function_name_find_transition) function_name_find_transition (parameters (identifier_self) identifier_self (typed_parameter (identifier_gene) identifier_gene (type (identifier_Gene) identifier_Gene )type )typed_parameter (typed_parameter (identifier_multiplexes) identifier_multiplexes (type (generic_type (identifier_Tuple) identifier_Tuple (type_parameter (type (identifier_Multiplex) identifier_Multiplex )type (type (ellipsis_...) ellipsis_... )type )type_parameter )generic_type )type )typed_parameter )parameters (type (identifier_Transition) identifier_Transition )type (block (expression_statement (assignment (identifier_multiplexes) identifier_multiplexes (call (identifier_tuple) identifier_tuple (generator_expression (identifier_multiplex) identifier_multiplex (for_in_clause (identifier_multiplex) identifier_multiplex (identifier_multiplexes) identifier_multiplexes )for_in_clause (if_clause (comparison_operator (identifier_gene) identifier_gene (attribute (identifier_multiplex) identifier_multiplex (identifier_genes) identifier_genes )attribute )comparison_operator )if_clause )generator_expression )call )assignment )expression_statement (for_statement (identifier_transition) identifier_transition (attribute (identifier_self) identifier_self (identifier_transitions) identifier_transitions )attribute (block (if_statement (boolean_operator (comparison_operator (attribute (identifier_transition) identifier_transition (identifier_gene) identifier_gene )attribute (identifier_gene) identifier_gene )comparison_operator (comparison_operator (call (identifier_set) identifier_set (argument_list (attribute (identifier_transition) identifier_transition (identifier_multiplexes) identifier_multiplexes )attribute )argument_list )call (call (identifier_set) identifier_set (argument_list (identifier_multiplexes) identifier_multiplexes )argument_list )call )comparison_operator )boolean_operator (block (return_statement (identifier_transition) identifier_transition )return_statement )block )if_statement )block )for_statement (raise_statement (call (identifier_AttributeError) identifier_AttributeError (argument_list (binary_operator (binary_operator (string_f'transition K_{gene.name}') string_f'transition K_{gene.name}' (call (attribute (string_'') string_'' (identifier_join) identifier_join )attribute (generator_expression (string_f"+{multiplex!r}") string_f"+{multiplex!r}" (for_in_clause (identifier_multiplex) identifier_multiplex (identifier_multiplexes) identifier_multiplexes )for_in_clause )generator_expression )call )binary_operator (string_' does not exist') string_' does not exist' )binary_operator )argument_list )call )raise_statement )block )function_definition )module
Find and return a transition in the model for the given gene and multiplexes. Raise an AttributeError if there is no multiplex in the graph with the given name.
(module (function_definition (function_name_emit) function_name_emit (parameters (identifier_event) identifier_event (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (comparison_operator (string_'namespace') string_'namespace' (identifier_kwargs) identifier_kwargs )comparison_operator (block (expression_statement (assignment (identifier_namespace) identifier_namespace (subscript (identifier_kwargs) identifier_kwargs (string_'namespace') string_'namespace' )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_namespace) identifier_namespace (attribute (attribute (identifier_flask) identifier_flask (identifier_request) identifier_request )attribute (identifier_namespace) identifier_namespace )attribute )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_callback) identifier_callback (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'callback') string_'callback' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_broadcast) identifier_broadcast (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'broadcast') string_'broadcast' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_room) identifier_room (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'room') string_'room' )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_room) identifier_room (None) None )comparison_operator (not_operator (identifier_broadcast) identifier_broadcast )not_operator )boolean_operator (block (expression_statement (assignment (identifier_room) identifier_room (attribute (attribute (identifier_flask) identifier_flask (identifier_request) identifier_request )attribute (identifier_sid) identifier_sid )attribute )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_include_self) identifier_include_self (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'include_self') string_'include_self' (True) True )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ignore_queue) identifier_ignore_queue (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'ignore_queue') string_'ignore_queue' (False) False )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_socketio) identifier_socketio (subscript (attribute (attribute (identifier_flask) identifier_flask (identifier_current_app) identifier_current_app )attribute (identifier_extensions) identifier_extensions )attribute (string_'socketio') string_'socketio' )subscript )assignment )expression_statement (return_statement (call (attribute (identifier_socketio) identifier_socketio (identifier_emit) identifier_emit )attribute (argument_list (identifier_event) identifier_event (list_splat (identifier_args) identifier_args )list_splat (keyword_argument (identifier_namespace) identifier_namespace (identifier_namespace) identifier_namespace )keyword_argument (keyword_argument (identifier_room) identifier_room (identifier_room) identifier_room )keyword_argument (keyword_argument (identifier_include_self) identifier_include_self (identifier_include_self) identifier_include_self )keyword_argument (keyword_argument (identifier_callback) identifier_callback (identifier_callback) identifier_callback )keyword_argument (keyword_argument (identifier_ignore_queue) identifier_ignore_queue (identifier_ignore_queue) identifier_ignore_queue )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Emit a SocketIO event. This function emits a SocketIO event to one or more connected clients. A JSON blob can be attached to the event as payload. This is a function that can only be called from a SocketIO event handler, as in obtains some information from the current client context. Example:: @socketio.on('my event') def handle_my_custom_event(json): emit('my response', {'data': 42}) :param event: The name of the user event to emit. :param args: A dictionary with the JSON data to send as payload. :param namespace: The namespace under which the message is to be sent. Defaults to the namespace used by the originating event. A ``'/'`` can be used to explicitly specify the global namespace. :param callback: Callback function to invoke with the client's acknowledgement. :param broadcast: ``True`` to send the message to all clients, or ``False`` to only reply to the sender of the originating event. :param room: Send the message to all the users in the given room. If this argument is set, then broadcast is implied to be ``True``. :param include_self: ``True`` to include the sender when broadcasting or addressing a room, or ``False`` to send to everyone but the sender. :param ignore_queue: Only used when a message queue is configured. If set to ``True``, the event is emitted to the clients directly, without going through the queue. This is more efficient, but only works when a single server process is used, or when there is a single addresee. It is recommended to always leave this parameter with its default value of ``False``.
(module (function_definition (function_name_sequence_charge) function_name_sequence_charge (parameters (identifier_seq) identifier_seq (default_parameter (identifier_pH) identifier_pH (float_7.4) float_7.4 )default_parameter )parameters (block (if_statement (comparison_operator (string_'X') string_'X' (identifier_seq) identifier_seq )comparison_operator (block (expression_statement (call (attribute (identifier_warnings) identifier_warnings (identifier_warn) identifier_warn )attribute (argument_list (identifier__nc_warning_str) identifier__nc_warning_str (identifier_NoncanonicalWarning) identifier_NoncanonicalWarning )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_adj_protein_charge) identifier_adj_protein_charge (call (identifier_sum) identifier_sum (argument_list (list_comprehension (binary_operator (binary_operator (call (identifier_partial_charge) identifier_partial_charge (argument_list (identifier_aa) identifier_aa (identifier_pH) identifier_pH )argument_list )call (subscript (identifier_residue_charge) identifier_residue_charge (identifier_aa) identifier_aa )subscript )binary_operator (identifier_n) identifier_n )binary_operator (for_in_clause (pattern_list (identifier_aa) identifier_aa (identifier_n) identifier_n )pattern_list (call (attribute (call (identifier_Counter) identifier_Counter (argument_list (identifier_seq) identifier_seq )argument_list )call (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_adj_protein_charge) identifier_adj_protein_charge (parenthesized_expression (binary_operator (call (identifier_partial_charge) identifier_partial_charge (argument_list (string_'N-term') string_'N-term' (identifier_pH) identifier_pH )argument_list )call (subscript (identifier_residue_charge) identifier_residue_charge (string_'N-term') string_'N-term' )subscript )binary_operator )parenthesized_expression )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_adj_protein_charge) identifier_adj_protein_charge (parenthesized_expression (binary_operator (call (identifier_partial_charge) identifier_partial_charge (argument_list (string_'C-term') string_'C-term' (identifier_pH) identifier_pH )argument_list )call (subscript (identifier_residue_charge) identifier_residue_charge (string_'C-term') string_'C-term' )subscript )binary_operator )parenthesized_expression )augmented_assignment )expression_statement (return_statement (identifier_adj_protein_charge) identifier_adj_protein_charge )return_statement )block )function_definition )module
Calculates the total charge of the input polypeptide sequence. Parameters ---------- seq : str Sequence of amino acids. pH : float pH of interest.
(module (function_definition (function_name_allowed_transitions) function_name_allowed_transitions (parameters )parameters (block (try_statement (block (expression_statement (assignment (identifier_sdp_state) identifier_sdp_state (call (identifier_SDPState) identifier_SDPState (argument_list )argument_list )call )assignment )expression_statement (return_statement (subscript (attribute (identifier_sdp_state) identifier_sdp_state (identifier_allowed_target_states) identifier_allowed_target_states )attribute (attribute (identifier_sdp_state) identifier_sdp_state (identifier_current_state) identifier_current_state )attribute )subscript )return_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_error) identifier_error )attribute (argument_list (string_"Key Error") string_"Key Error" )argument_list )call )expression_statement (return_statement (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_state) identifier_state (string_"KeyError") string_"KeyError" )keyword_argument (keyword_argument (identifier_reason) identifier_reason (string_"KeyError") string_"KeyError" )keyword_argument )argument_list )call )return_statement )block )except_clause )try_statement )block )function_definition )module
Get target states allowed for the current state.
(module (function_definition (function_name__DecodeUrlSafe) function_name__DecodeUrlSafe (parameters (identifier_urlsafe) identifier_urlsafe )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_urlsafe) identifier_urlsafe (identifier_basestring) identifier_basestring )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (binary_operator (string_'urlsafe must be a string; received %r') string_'urlsafe must be a string; received %r' (identifier_urlsafe) identifier_urlsafe )binary_operator )argument_list )call )raise_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_urlsafe) identifier_urlsafe (identifier_unicode) identifier_unicode )argument_list )call (block (expression_statement (assignment (identifier_urlsafe) identifier_urlsafe (call (attribute (identifier_urlsafe) identifier_urlsafe (identifier_encode) identifier_encode )attribute (argument_list (string_'utf8') string_'utf8' )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_mod) identifier_mod (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_urlsafe) identifier_urlsafe )argument_list )call (integer_4) integer_4 )binary_operator )assignment )expression_statement (if_statement (identifier_mod) identifier_mod (block (expression_statement (augmented_assignment (identifier_urlsafe) identifier_urlsafe (binary_operator (string_'=') string_'=' (parenthesized_expression (binary_operator (integer_4) integer_4 (identifier_mod) identifier_mod )binary_operator )parenthesized_expression )binary_operator )augmented_assignment )expression_statement )block )if_statement (return_statement (call (attribute (identifier_base64) identifier_base64 (identifier_b64decode) identifier_b64decode )attribute (argument_list (call (attribute (call (attribute (identifier_urlsafe) identifier_urlsafe (identifier_replace) identifier_replace )attribute (argument_list (string_'-') string_'-' (string_'+') string_'+' )argument_list )call (identifier_replace) identifier_replace )attribute (argument_list (string_'_') string_'_' (string_'/') string_'/' )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Decode a url-safe base64-encoded string. This returns the decoded string.
(module (function_definition (function_name_with_params) function_name_with_params (parameters (identifier_self) identifier_self (identifier_params) identifier_params )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_replace) identifier_replace )attribute (argument_list (keyword_argument (identifier_params) identifier_params (call (identifier__merge_maps) identifier__merge_maps (argument_list (attribute (identifier_self) identifier_self (identifier_params) identifier_params )attribute (identifier_params) identifier_params )argument_list )call )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Create a new request with added query parameters Parameters ---------- params: Mapping the query parameters to add
(module (function_definition (function_name_validate_accounting_equation) function_name_validate_accounting_equation (parameters (identifier_cls) identifier_cls )parameters (block (expression_statement (assignment (identifier_balances) identifier_balances (list_comprehension (call (attribute (identifier_account) identifier_account (identifier_balance) identifier_balance )attribute (argument_list (keyword_argument (identifier_raw) identifier_raw (True) True )keyword_argument )argument_list )call (for_in_clause (identifier_account) identifier_account (call (attribute (attribute (identifier_Account) identifier_Account (identifier_objects) identifier_objects )attribute (identifier_root_nodes) identifier_root_nodes )attribute (argument_list )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (if_statement (comparison_operator (call (identifier_sum) identifier_sum (argument_list (identifier_balances) identifier_balances (call (identifier_Balance) identifier_Balance (argument_list )argument_list )call )argument_list )call (integer_0) integer_0 )comparison_operator (block (raise_statement (call (attribute (identifier_exceptions) identifier_exceptions (identifier_AccountingEquationViolationError) identifier_AccountingEquationViolationError )attribute (argument_list (call (attribute (string_"Account balances do not sum to zero. They sum to {}") string_"Account balances do not sum to zero. They sum to {}" (identifier_format) identifier_format )attribute (argument_list (call (identifier_sum) identifier_sum (argument_list (identifier_balances) identifier_balances )argument_list )call )argument_list )call )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Check that all accounts sum to 0
(module (function_definition (function_name_get_participants_for_section) function_name_get_participants_for_section (parameters (identifier_section) identifier_section (default_parameter (identifier_person) identifier_person (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_section_label) identifier_section_label (call (identifier_encode_section_label) identifier_encode_section_label (argument_list (call (attribute (identifier_section) identifier_section (identifier_section_label) identifier_section_label )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_url) identifier_url (call (attribute (string_"/rest/gradebook/v1/section/{}/participants") string_"/rest/gradebook/v1/section/{}/participants" (identifier_format) identifier_format )attribute (argument_list (identifier_section_label) identifier_section_label )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_headers) identifier_headers (dictionary )dictionary )assignment )expression_statement (if_statement (comparison_operator (identifier_person) identifier_person (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_headers) identifier_headers (string_"X-UW-Act-as") string_"X-UW-Act-as" )subscript (attribute (identifier_person) identifier_person (identifier_uwnetid) identifier_uwnetid )attribute )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_data) identifier_data (call (identifier_get_resource) identifier_get_resource (argument_list (identifier_url) identifier_url (identifier_headers) identifier_headers )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_participants) identifier_participants (list )list )assignment )expression_statement (for_statement (identifier_pt) identifier_pt (subscript (identifier_data) identifier_data (string_"participants") string_"participants" )subscript (block (expression_statement (call (attribute (identifier_participants) identifier_participants (identifier_append) identifier_append )attribute (argument_list (call (identifier__participant_from_json) identifier__participant_from_json (argument_list (identifier_pt) identifier_pt )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_participants) identifier_participants )return_statement )block )function_definition )module
Returns a list of gradebook participants for the passed section and person.
(module (function_definition (function_name__ask_questionnaire) function_name__ask_questionnaire (parameters )parameters (block (expression_statement (assignment (identifier_answers) identifier_answers (dictionary )dictionary )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (identifier_info_header) identifier_info_header )argument_list )call )expression_statement (expression_statement (call (identifier_pprint) identifier_pprint (argument_list (call (attribute (identifier_questions) identifier_questions (identifier_items) identifier_items )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (for_statement (pattern_list (identifier_question) identifier_question (identifier_default) identifier_default )pattern_list (call (attribute (identifier_questions) identifier_questions (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_response) identifier_response (call (identifier__ask) identifier__ask (argument_list (identifier_question) identifier_question (identifier_default) identifier_default (call (identifier_str) identifier_str (argument_list (call (identifier_type) identifier_type (argument_list (identifier_default) identifier_default )argument_list )call )argument_list )call (keyword_argument (identifier_show_hint) identifier_show_hint (True) True )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_default) identifier_default )argument_list )call (identifier_unicode) identifier_unicode )comparison_operator (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_response) identifier_response )argument_list )call (identifier_str) identifier_str )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_response) identifier_response (identifier_decode) identifier_decode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (subscript (identifier_answers) identifier_answers (identifier_question) identifier_question )subscript (identifier_response) identifier_response )assignment )expression_statement )block )for_statement (return_statement (identifier_answers) identifier_answers )return_statement )block )function_definition )module
Asks questions to fill out a HFOS plugin template
(module (function_definition (function_name_trigger_script) function_name_trigger_script (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (attribute (identifier_self) identifier_self (identifier_remote_bridge) identifier_remote_bridge )attribute (identifier_status) identifier_status )attribute (tuple (attribute (identifier_BRIDGE_STATUS) identifier_BRIDGE_STATUS (identifier_RECEIVED) identifier_RECEIVED )attribute )tuple )comparison_operator (block (return_statement (list (integer_1) integer_1 )list )return_statement )block )if_statement (try_statement (block (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_remote_bridge) identifier_remote_bridge )attribute (identifier_parsed_script) identifier_parsed_script )attribute (call (attribute (identifier_UpdateScript) identifier_UpdateScript (identifier_FromBinary) identifier_FromBinary )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier__device) identifier__device )attribute (identifier_script) identifier_script )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_remote_bridge) identifier_remote_bridge )attribute (identifier_status) identifier_status )attribute (attribute (identifier_BRIDGE_STATUS) identifier_BRIDGE_STATUS (identifier_IDLE) identifier_IDLE )attribute )assignment )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_exc) identifier_exc )as_pattern_target )as_pattern (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__logger) identifier__logger )attribute (identifier_exception) identifier_exception )attribute (argument_list (string_"Error parsing script streamed to device") string_"Error parsing script streamed to device" )argument_list )call )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_remote_bridge) identifier_remote_bridge )attribute (identifier_script_error) identifier_script_error )attribute (identifier_exc) identifier_exc )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_remote_bridge) identifier_remote_bridge )attribute (identifier_error) identifier_error )attribute (integer_1) integer_1 )assignment )expression_statement )block )except_clause )try_statement (return_statement (list (integer_0) integer_0 )list )return_statement )block )function_definition )module
Actually process a script.
(module (function_definition (function_name_reprkwargs) function_name_reprkwargs (parameters (identifier_kwargs) identifier_kwargs (default_parameter (identifier_sep) identifier_sep (string_', ') string_', ' )default_parameter (default_parameter (identifier_fmt) identifier_fmt (string_"{0!s}={1!r}") string_"{0!s}={1!r}" )default_parameter )parameters (block (return_statement (call (attribute (identifier_sep) identifier_sep (identifier_join) identifier_join )attribute (generator_expression (call (attribute (identifier_fmt) identifier_fmt (identifier_format) identifier_format )attribute (argument_list (identifier_k) identifier_k (identifier_v) identifier_v )argument_list )call (for_in_clause (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (identifier_kwargs) identifier_kwargs (identifier_iteritems) identifier_iteritems )attribute (argument_list )argument_list )call )for_in_clause )generator_expression )call )return_statement )block )function_definition )module
Display kwargs.
(module (function_definition (function_name_set_log_format) function_name_set_log_format (parameters (identifier_log_format) identifier_log_format (default_parameter (identifier_server) identifier_server (identifier__DEFAULT_SERVER) identifier__DEFAULT_SERVER )default_parameter )parameters (block (expression_statement (assignment (identifier_setting) identifier_setting (string_'LogPluginClsid') string_'LogPluginClsid' )assignment )expression_statement (expression_statement (assignment (identifier_log_format_types) identifier_log_format_types (call (identifier_get_log_format_types) identifier_get_log_format_types (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_format_id) identifier_format_id (call (attribute (identifier_log_format_types) identifier_log_format_types (identifier_get) identifier_get )attribute (argument_list (identifier_log_format) identifier_log_format (None) None )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_format_id) identifier_format_id )not_operator (block (expression_statement (assignment (identifier_message) identifier_message (call (attribute (parenthesized_expression (concatenated_string (string_"Invalid log format '{0}' specified. Valid formats:") string_"Invalid log format '{0}' specified. Valid formats:" (string_' {1}') string_' {1}' )concatenated_string )parenthesized_expression (identifier_format) identifier_format )attribute (argument_list (identifier_log_format) identifier_log_format (call (attribute (identifier_log_format_types) identifier_log_format_types (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (raise_statement (call (identifier_SaltInvocationError) identifier_SaltInvocationError (argument_list (identifier_message) identifier_message )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier__LOG) identifier__LOG (identifier_debug) identifier_debug )attribute (argument_list (string_"Id for '%s' found: %s") string_"Id for '%s' found: %s" (identifier_log_format) identifier_log_format (identifier_format_id) identifier_format_id )argument_list )call )expression_statement (expression_statement (assignment (identifier_current_log_format) identifier_current_log_format (call (identifier_get_log_format) identifier_get_log_format (argument_list (identifier_server) identifier_server )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_log_format) identifier_log_format (identifier_current_log_format) identifier_current_log_format )comparison_operator (block (expression_statement (call (attribute (identifier__LOG) identifier__LOG (identifier_debug) identifier_debug )attribute (argument_list (string_'%s already contains the provided format.') string_'%s already contains the provided format.' (identifier_setting) identifier_setting )argument_list )call )expression_statement (return_statement (True) True )return_statement )block )if_statement (expression_statement (call (identifier__set_wmi_setting) identifier__set_wmi_setting (argument_list (string_'IIsSmtpServerSetting') string_'IIsSmtpServerSetting' (identifier_setting) identifier_setting (identifier_format_id) identifier_format_id (identifier_server) identifier_server )argument_list )call )expression_statement (expression_statement (assignment (identifier_new_log_format) identifier_new_log_format (call (identifier_get_log_format) identifier_get_log_format (argument_list (identifier_server) identifier_server )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ret) identifier_ret (comparison_operator (identifier_log_format) identifier_log_format (identifier_new_log_format) identifier_new_log_format )comparison_operator )assignment )expression_statement (if_statement (identifier_ret) identifier_ret (block (expression_statement (call (attribute (identifier__LOG) identifier__LOG (identifier_debug) identifier_debug )attribute (argument_list (string_"Setting %s configured successfully: %s") string_"Setting %s configured successfully: %s" (identifier_setting) identifier_setting (identifier_log_format) identifier_log_format )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier__LOG) identifier__LOG (identifier_error) identifier_error )attribute (argument_list (string_"Unable to configure %s with value: %s") string_"Unable to configure %s with value: %s" (identifier_setting) identifier_setting (identifier_log_format) identifier_log_format )argument_list )call )expression_statement )block )else_clause )if_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Set the active log format for the SMTP virtual server. :param str log_format: The log format name. :param str server: The SMTP server name. :return: A boolean representing whether the change succeeded. :rtype: bool CLI Example: .. code-block:: bash salt '*' win_smtp_server.set_log_format 'Microsoft IIS Log File Format'
(module (function_definition (function_name__serve_runs) function_name__serve_runs (parameters (identifier_self) identifier_self (identifier_request) identifier_request )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier__db_connection_provider) identifier__db_connection_provider )attribute (block (expression_statement (assignment (identifier_db) identifier_db (call (attribute (identifier_self) identifier_self (identifier__db_connection_provider) identifier__db_connection_provider )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cursor) identifier_cursor (call (attribute (identifier_db) identifier_db (identifier_execute) identifier_execute )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_run_names) identifier_run_names (list_comprehension (subscript (identifier_row) identifier_row (integer_0) integer_0 )subscript (for_in_clause (identifier_row) identifier_row (identifier_cursor) identifier_cursor )for_in_clause )list_comprehension )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_run_names) identifier_run_names (call (identifier_sorted) identifier_sorted (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier__multiplexer) identifier__multiplexer )attribute (identifier_Runs) identifier_Runs )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (function_definition (function_name_get_first_event_timestamp) function_name_get_first_event_timestamp (parameters (identifier_run_name) identifier_run_name )parameters (block (try_statement (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__multiplexer) identifier__multiplexer )attribute (identifier_FirstEventTimestamp) identifier_FirstEventTimestamp )attribute (argument_list (identifier_run_name) identifier_run_name )argument_list )call )return_statement )block (except_clause (as_pattern (identifier_ValueError) identifier_ValueError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_warn) identifier_warn )attribute (argument_list (string_'Unable to get first event timestamp for run %s: %s') string_'Unable to get first event timestamp for run %s: %s' (identifier_run_name) identifier_run_name (identifier_e) identifier_e )argument_list )call )expression_statement (return_statement (call (identifier_float) identifier_float (argument_list (string_'inf') string_'inf' )argument_list )call )return_statement )block )except_clause )try_statement )block )function_definition (expression_statement (call (attribute (identifier_run_names) identifier_run_names (identifier_sort) identifier_sort )attribute (argument_list (keyword_argument (identifier_key) identifier_key (identifier_get_first_event_timestamp) identifier_get_first_event_timestamp )keyword_argument )argument_list )call )expression_statement )block )else_clause )if_statement (return_statement (call (attribute (identifier_http_util) identifier_http_util (identifier_Respond) identifier_Respond )attribute (argument_list (identifier_request) identifier_request (identifier_run_names) identifier_run_names (string_'application/json') string_'application/json' )argument_list )call )return_statement )block )function_definition )module
Serve a JSON array of run names, ordered by run started time. Sort order is by started time (aka first event time) with empty times sorted last, and then ties are broken by sorting on the run name.
(module (function_definition (function_name_chmod) function_name_chmod (parameters (identifier_f) identifier_f )parameters (block (try_statement (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_chmod) identifier_chmod )attribute (argument_list (identifier_f) identifier_f (identifier_S_IWRITE) identifier_S_IWRITE )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (pass_statement )pass_statement )block )except_clause )try_statement (try_statement (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_chmod) identifier_chmod )attribute (argument_list (identifier_f) identifier_f (integer_0o777) integer_0o777 )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (pass_statement )pass_statement )block )except_clause )try_statement )block )function_definition )module
change mod to writeable
(module (function_definition (function_name_enable_glut) function_name_enable_glut (parameters (identifier_self) identifier_self (default_parameter (identifier_app) identifier_app (None) None )default_parameter )parameters (block (import_statement (aliased_import (dotted_name (identifier_OpenGL) identifier_OpenGL (identifier_GLUT) identifier_GLUT )dotted_name (identifier_glut) identifier_glut )aliased_import )import_statement (import_from_statement (dotted_name (identifier_pydev_ipython) identifier_pydev_ipython (identifier_inputhookglut) identifier_inputhookglut )dotted_name (dotted_name (identifier_glut_display_mode) identifier_glut_display_mode )dotted_name (line_continuation_\) line_continuation_\ (dotted_name (identifier_glut_close) identifier_glut_close )dotted_name (dotted_name (identifier_glut_display) identifier_glut_display )dotted_name (line_continuation_\) line_continuation_\ (dotted_name (identifier_glut_idle) identifier_glut_idle )dotted_name (dotted_name (identifier_inputhook_glut) identifier_inputhook_glut )dotted_name )import_from_statement (if_statement (comparison_operator (identifier_GUI_GLUT) identifier_GUI_GLUT (attribute (identifier_self) identifier_self (identifier__apps) identifier__apps )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_glut) identifier_glut (identifier_glutInit) identifier_glutInit )attribute (argument_list (attribute (identifier_sys) identifier_sys (identifier_argv) identifier_argv )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_glut) identifier_glut (identifier_glutInitDisplayMode) identifier_glutInitDisplayMode )attribute (argument_list (identifier_glut_display_mode) identifier_glut_display_mode )argument_list )call )expression_statement (if_statement (call (identifier_bool) identifier_bool (argument_list (attribute (identifier_glut) identifier_glut (identifier_glutSetOption) identifier_glutSetOption )attribute )argument_list )call (block (expression_statement (call (attribute (identifier_glut) identifier_glut (identifier_glutSetOption) identifier_glutSetOption )attribute (argument_list (attribute (identifier_glut) identifier_glut (identifier_GLUT_ACTION_ON_WINDOW_CLOSE) identifier_GLUT_ACTION_ON_WINDOW_CLOSE )attribute (attribute (identifier_glut) identifier_glut (identifier_GLUT_ACTION_GLUTMAINLOOP_RETURNS) identifier_GLUT_ACTION_GLUTMAINLOOP_RETURNS )attribute )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_glut) identifier_glut (identifier_glutCreateWindow) identifier_glutCreateWindow )attribute (argument_list (subscript (attribute (identifier_sys) identifier_sys (identifier_argv) identifier_argv )attribute (integer_0) integer_0 )subscript )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_glut) identifier_glut (identifier_glutReshapeWindow) identifier_glutReshapeWindow )attribute (argument_list (integer_1) integer_1 (integer_1) integer_1 )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_glut) identifier_glut (identifier_glutHideWindow) identifier_glutHideWindow )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_glut) identifier_glut (identifier_glutWMCloseFunc) identifier_glutWMCloseFunc )attribute (argument_list (identifier_glut_close) identifier_glut_close )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_glut) identifier_glut (identifier_glutDisplayFunc) identifier_glutDisplayFunc )attribute (argument_list (identifier_glut_display) identifier_glut_display )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_glut) identifier_glut (identifier_glutIdleFunc) identifier_glutIdleFunc )attribute (argument_list (identifier_glut_idle) identifier_glut_idle )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_glut) identifier_glut (identifier_glutWMCloseFunc) identifier_glutWMCloseFunc )attribute (argument_list (identifier_glut_close) identifier_glut_close )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_glut) identifier_glut (identifier_glutDisplayFunc) identifier_glutDisplayFunc )attribute (argument_list (identifier_glut_display) identifier_glut_display )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_glut) identifier_glut (identifier_glutIdleFunc) identifier_glutIdleFunc )attribute (argument_list (identifier_glut_idle) identifier_glut_idle )argument_list )call )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_set_inputhook) identifier_set_inputhook )attribute (argument_list (identifier_inputhook_glut) identifier_inputhook_glut )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__current_gui) identifier__current_gui )attribute (identifier_GUI_GLUT) identifier_GUI_GLUT )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__apps) identifier__apps )attribute (identifier_GUI_GLUT) identifier_GUI_GLUT )subscript (True) True )assignment )expression_statement )block )function_definition )module
Enable event loop integration with GLUT. Parameters ---------- app : ignored Ignored, it's only a placeholder to keep the call signature of all gui activation methods consistent, which simplifies the logic of supporting magics. Notes ----- This methods sets the PyOS_InputHook for GLUT, which allows the GLUT to integrate with terminal based applications like IPython. Due to GLUT limitations, it is currently not possible to start the event loop without first creating a window. You should thus not create another window but use instead the created one. See 'gui-glut.py' in the docs/examples/lib directory. The default screen mode is set to: glut.GLUT_DOUBLE | glut.GLUT_RGBA | glut.GLUT_DEPTH
(module (function_definition (function_name_download_and_parse_mnist_file) function_name_download_and_parse_mnist_file (parameters (identifier_fname) identifier_fname (default_parameter (identifier_target_dir) identifier_target_dir (None) None )default_parameter (default_parameter (identifier_force) identifier_force (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_fname) identifier_fname (call (identifier_download_file) identifier_download_file (argument_list (identifier_fname) identifier_fname (keyword_argument (identifier_target_dir) identifier_target_dir (identifier_target_dir) identifier_target_dir )keyword_argument (keyword_argument (identifier_force) identifier_force (identifier_force) identifier_force )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_fopen) identifier_fopen (conditional_expression (attribute (identifier_gzip) identifier_gzip (identifier_open) identifier_open )attribute (comparison_operator (subscript (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_splitext) identifier_splitext )attribute (argument_list (identifier_fname) identifier_fname )argument_list )call (integer_1) integer_1 )subscript (string_'.gz') string_'.gz' )comparison_operator (identifier_open) identifier_open )conditional_expression )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_fopen) identifier_fopen (argument_list (identifier_fname) identifier_fname (string_'rb') string_'rb' )argument_list )call (as_pattern_target (identifier_fd) identifier_fd )as_pattern_target )as_pattern )with_item )with_clause (block (return_statement (call (identifier_parse_idx) identifier_parse_idx (argument_list (identifier_fd) identifier_fd )argument_list )call )return_statement )block )with_statement )block )function_definition )module
Download the IDX file named fname from the URL specified in dataset_url and return it as a numpy array. Parameters ---------- fname : str File name to download and parse target_dir : str Directory where to store the file force : bool Force downloading the file, if it already exists Returns ------- data : numpy.ndarray Numpy array with the dimensions and the data in the IDX file
(module (function_definition (function_name_form) function_name_form (parameters (typed_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern (type (identifier_Question) identifier_Question )type )typed_parameter )parameters (block (return_statement (call (identifier_Form) identifier_Form (argument_list (list_splat (generator_expression (call (identifier_FormField) identifier_FormField (argument_list (identifier_k) identifier_k (identifier_q) identifier_q )argument_list )call (for_in_clause (pattern_list (identifier_k) identifier_k (identifier_q) identifier_q )pattern_list (call (attribute (identifier_kwargs) identifier_kwargs (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause )generator_expression )list_splat )argument_list )call )return_statement )block )function_definition )module
Create a form with multiple questions. The parameter name of a question will be the key for the answer in the returned dict.
(module (function_definition (function_name___get_ac_tree) function_name___get_ac_tree (parameters (identifier_self) identifier_self (typed_parameter (identifier_ac) identifier_ac (type (attribute (identifier_model) identifier_model (identifier_AssetClass) identifier_AssetClass )attribute )type )typed_parameter (typed_parameter (identifier_with_stocks) identifier_with_stocks (type (identifier_bool) identifier_bool )type )typed_parameter )parameters (block (expression_statement (assignment (identifier_output) identifier_output (list )list )assignment )expression_statement (expression_statement (call (attribute (identifier_output) identifier_output (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier___get_ac_row) identifier___get_ac_row )attribute (argument_list (identifier_ac) identifier_ac )argument_list )call )argument_list )call )expression_statement (for_statement (identifier_child) identifier_child (attribute (identifier_ac) identifier_ac (identifier_classes) identifier_classes )attribute (block (expression_statement (augmented_assignment (identifier_output) identifier_output (call (attribute (identifier_self) identifier_self (identifier___get_ac_tree) identifier___get_ac_tree )attribute (argument_list (identifier_child) identifier_child (identifier_with_stocks) identifier_with_stocks )argument_list )call )augmented_assignment )expression_statement )block )for_statement (if_statement (identifier_with_stocks) identifier_with_stocks (block (for_statement (identifier_stock) identifier_stock (attribute (identifier_ac) identifier_ac (identifier_stocks) identifier_stocks )attribute (block (expression_statement (assignment (identifier_row) identifier_row (None) None )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_stock) identifier_stock (identifier_Stock) identifier_Stock )argument_list )call (block (expression_statement (assignment (identifier_row) identifier_row (call (attribute (identifier_self) identifier_self (identifier___get_stock_row) identifier___get_stock_row )attribute (argument_list (identifier_stock) identifier_stock (binary_operator (attribute (identifier_ac) identifier_ac (identifier_depth) identifier_depth )attribute (integer_1) integer_1 )binary_operator )argument_list )call )assignment )expression_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_stock) identifier_stock (identifier_CashBalance) identifier_CashBalance )argument_list )call (block (expression_statement (assignment (identifier_row) identifier_row (call (attribute (identifier_self) identifier_self (identifier___get_cash_row) identifier___get_cash_row )attribute (argument_list (identifier_stock) identifier_stock (binary_operator (attribute (identifier_ac) identifier_ac (identifier_depth) identifier_depth )attribute (integer_1) integer_1 )binary_operator )argument_list )call )assignment )expression_statement )block )elif_clause )if_statement (expression_statement (call (attribute (identifier_output) identifier_output (identifier_append) identifier_append )attribute (argument_list (identifier_row) identifier_row )argument_list )call )expression_statement )block )for_statement )block )if_statement (return_statement (identifier_output) identifier_output )return_statement )block )function_definition )module
formats the ac tree - entity with child elements
(module (function_definition (function_name_find_largest_contig) function_name_find_largest_contig (parameters (identifier_self) identifier_self )parameters (block (for_statement (identifier_sample) identifier_sample (attribute (identifier_self) identifier_self (identifier_metadata) identifier_metadata )attribute (block (expression_statement (assignment (attribute (subscript (identifier_sample) identifier_sample (attribute (identifier_self) identifier_self (identifier_analysistype) identifier_analysistype )attribute )subscript (identifier_longest_contig) identifier_longest_contig )attribute (attribute (subscript (identifier_sample) identifier_sample (attribute (identifier_self) identifier_self (identifier_analysistype) identifier_analysistype )attribute )subscript (identifier_contig_lengths) identifier_contig_lengths )attribute )assignment )expression_statement )block )for_statement )block )function_definition )module
Determine the largest contig for each strain
(module (function_definition (function_name__create_aural_content_element) function_name__create_aural_content_element (parameters (identifier_self) identifier_self (identifier_content) identifier_content (identifier_data_property_value) identifier_data_property_value )parameters (block (expression_statement (assignment (identifier_content_element) identifier_content_element (call (attribute (identifier_self) identifier_self (identifier__create_content_element) identifier__create_content_element )attribute (argument_list (identifier_content) identifier_content (identifier_data_property_value) identifier_data_property_value )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_content_element) identifier_content_element (identifier_set_attribute) identifier_set_attribute )attribute (argument_list (string_'unselectable') string_'unselectable' (string_'on') string_'on' )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_content_element) identifier_content_element (identifier_set_attribute) identifier_set_attribute )attribute (argument_list (string_'class') string_'class' (string_'screen-reader-only') string_'screen-reader-only' )argument_list )call )expression_statement (return_statement (identifier_content_element) identifier_content_element )return_statement )block )function_definition )module
Create a element to show the content, only to aural displays. :param content: The text content of element. :type content: str :param data_property_value: The value of custom attribute used to identify the fix. :type data_property_value: str :return: The element to show the content. :rtype: hatemile.util.html.htmldomelement.HTMLDOMElement
(module (function_definition (function_name__add_baseline_to_exclude_files) function_name__add_baseline_to_exclude_files (parameters (identifier_args) identifier_args )parameters (block (expression_statement (assignment (identifier_baseline_name_regex) identifier_baseline_name_regex (call (attribute (string_r'^{}$') string_r'^{}$' (identifier_format) identifier_format )attribute (argument_list (subscript (attribute (identifier_args) identifier_args (identifier_import_filename) identifier_import_filename )attribute (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (if_statement (not_operator (attribute (identifier_args) identifier_args (identifier_exclude_files) identifier_exclude_files )attribute )not_operator (block (expression_statement (assignment (attribute (identifier_args) identifier_args (identifier_exclude_files) identifier_exclude_files )attribute (identifier_baseline_name_regex) identifier_baseline_name_regex )assignment )expression_statement )block (elif_clause (comparison_operator (identifier_baseline_name_regex) identifier_baseline_name_regex (attribute (identifier_args) identifier_args (identifier_exclude_files) identifier_exclude_files )attribute )comparison_operator (block (expression_statement (augmented_assignment (attribute (identifier_args) identifier_args (identifier_exclude_files) identifier_exclude_files )attribute (call (attribute (string_r'|{}') string_r'|{}' (identifier_format) identifier_format )attribute (argument_list (identifier_baseline_name_regex) identifier_baseline_name_regex )argument_list )call )augmented_assignment )expression_statement )block )elif_clause )if_statement )block )function_definition )module
Modifies args.exclude_files in-place.
(module (function_definition (function_name_focus_changed) function_name_focus_changed (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_fwidget) identifier_fwidget (call (attribute (identifier_QApplication) identifier_QApplication (identifier_focusWidget) identifier_focusWidget )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_finfo) identifier_finfo (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (block (if_statement (comparison_operator (identifier_fwidget) identifier_fwidget (attribute (identifier_finfo) identifier_finfo (identifier_editor) identifier_editor )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_refresh) identifier_refresh )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )for_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_editor_focus_changed) identifier_editor_focus_changed )attribute (identifier_emit) identifier_emit )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Editor focus has changed
(module (function_definition (function_name_set_measurements) function_name_set_measurements (parameters (identifier_test) identifier_test )parameters (block (expression_statement (assignment (attribute (attribute (identifier_test) identifier_test (identifier_measurements) identifier_measurements )attribute (identifier_level_none) identifier_level_none )attribute (integer_0) integer_0 )assignment )expression_statement (expression_statement (call (attribute (identifier_time) identifier_time (identifier_sleep) identifier_sleep )attribute (argument_list (integer_1) integer_1 )argument_list )call )expression_statement (expression_statement (assignment (attribute (attribute (identifier_test) identifier_test (identifier_measurements) identifier_measurements )attribute (identifier_level_some) identifier_level_some )attribute (integer_8) integer_8 )assignment )expression_statement (expression_statement (call (attribute (identifier_time) identifier_time (identifier_sleep) identifier_sleep )attribute (argument_list (integer_1) integer_1 )argument_list )call )expression_statement (expression_statement (assignment (attribute (attribute (identifier_test) identifier_test (identifier_measurements) identifier_measurements )attribute (identifier_level_all) identifier_level_all )attribute (integer_9) integer_9 )assignment )expression_statement (expression_statement (call (attribute (identifier_time) identifier_time (identifier_sleep) identifier_sleep )attribute (argument_list (integer_1) integer_1 )argument_list )call )expression_statement (expression_statement (assignment (identifier_level_all) identifier_level_all (call (attribute (identifier_test) identifier_test (identifier_get_measurement) identifier_get_measurement )attribute (argument_list (string_'level_all') string_'level_all' )argument_list )call )assignment )expression_statement (assert_statement (comparison_operator (attribute (identifier_level_all) identifier_level_all (identifier_value) identifier_value )attribute (integer_9) integer_9 )comparison_operator )assert_statement )block )function_definition )module
Test phase that sets a measurement.
(module (function_definition (function_name_prepend_urls) function_name_prepend_urls (parameters (identifier_self) identifier_self )parameters (block (return_statement (list (call (identifier_url) identifier_url (argument_list (binary_operator (string_r"^(?P<resource_name>%s)/(?P<pk>\w[\w/-]*)/generate%s$") string_r"^(?P<resource_name>%s)/(?P<pk>\w[\w/-]*)/generate%s$" (tuple (attribute (attribute (identifier_self) identifier_self (identifier__meta) identifier__meta )attribute (identifier_resource_name) identifier_resource_name )attribute (call (identifier_trailing_slash) identifier_trailing_slash (argument_list )argument_list )call )tuple )binary_operator (call (attribute (identifier_self) identifier_self (identifier_wrap_view) identifier_wrap_view )attribute (argument_list (string_'generate') string_'generate' )argument_list )call (keyword_argument (identifier_name) identifier_name (string_"api_tileset_generate") string_"api_tileset_generate" )keyword_argument )argument_list )call (call (identifier_url) identifier_url (argument_list (binary_operator (string_r"^(?P<resource_name>%s)/(?P<pk>\w[\w/-]*)/download%s$") string_r"^(?P<resource_name>%s)/(?P<pk>\w[\w/-]*)/download%s$" (tuple (attribute (attribute (identifier_self) identifier_self (identifier__meta) identifier__meta )attribute (identifier_resource_name) identifier_resource_name )attribute (call (identifier_trailing_slash) identifier_trailing_slash (argument_list )argument_list )call )tuple )binary_operator (call (attribute (identifier_self) identifier_self (identifier_wrap_view) identifier_wrap_view )attribute (argument_list (string_'download') string_'download' )argument_list )call (keyword_argument (identifier_name) identifier_name (string_"api_tileset_download") string_"api_tileset_download" )keyword_argument )argument_list )call (call (identifier_url) identifier_url (argument_list (binary_operator (string_r"^(?P<resource_name>%s)/(?P<pk>\w[\w/-]*)/status%s$") string_r"^(?P<resource_name>%s)/(?P<pk>\w[\w/-]*)/status%s$" (tuple (attribute (attribute (identifier_self) identifier_self (identifier__meta) identifier__meta )attribute (identifier_resource_name) identifier_resource_name )attribute (call (identifier_trailing_slash) identifier_trailing_slash (argument_list )argument_list )call )tuple )binary_operator (call (attribute (identifier_self) identifier_self (identifier_wrap_view) identifier_wrap_view )attribute (argument_list (string_'status') string_'status' )argument_list )call (keyword_argument (identifier_name) identifier_name (string_"api_tileset_status") string_"api_tileset_status" )keyword_argument )argument_list )call (call (identifier_url) identifier_url (argument_list (binary_operator (string_r"^(?P<resource_name>%s)/(?P<pk>\w[\w/-]*)/stop%s$") string_r"^(?P<resource_name>%s)/(?P<pk>\w[\w/-]*)/stop%s$" (tuple (attribute (attribute (identifier_self) identifier_self (identifier__meta) identifier__meta )attribute (identifier_resource_name) identifier_resource_name )attribute (call (identifier_trailing_slash) identifier_trailing_slash (argument_list )argument_list )call )tuple )binary_operator (call (attribute (identifier_self) identifier_self (identifier_wrap_view) identifier_wrap_view )attribute (argument_list (string_'stop') string_'stop' )argument_list )call (keyword_argument (identifier_name) identifier_name (string_"api_tileset_stop") string_"api_tileset_stop" )keyword_argument )argument_list )call )list )return_statement )block )function_definition )module
Add the following array of urls to the Tileset base urls
(module (function_definition (function_name__abort_batches) function_name__abort_batches (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_error) identifier_error (call (attribute (identifier_Errors) identifier_Errors (identifier_IllegalStateError) identifier_IllegalStateError )attribute (argument_list (string_"Producer is closed forcefully.") string_"Producer is closed forcefully." )argument_list )call )assignment )expression_statement (for_statement (identifier_batch) identifier_batch (call (attribute (attribute (identifier_self) identifier_self (identifier__incomplete) identifier__incomplete )attribute (identifier_all) identifier_all )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_tp) identifier_tp (attribute (identifier_batch) identifier_batch (identifier_topic_partition) identifier_topic_partition )attribute )assignment )expression_statement (with_statement (with_clause (with_item (subscript (attribute (identifier_self) identifier_self (identifier__tp_locks) identifier__tp_locks )attribute (identifier_tp) identifier_tp )subscript )with_item )with_clause (block (expression_statement (call (attribute (attribute (identifier_batch) identifier_batch (identifier_records) identifier_records )attribute (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )with_statement (expression_statement (call (attribute (identifier_batch) identifier_batch (identifier_done) identifier_done )attribute (argument_list (keyword_argument (identifier_exception) identifier_exception (identifier_error) identifier_error )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_deallocate) identifier_deallocate )attribute (argument_list (identifier_batch) identifier_batch )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Go through incomplete batches and abort them.
(module (function_definition (function_name__read_protocol_line) function_name__read_protocol_line (parameters (identifier_self) identifier_self )parameters (block (while_statement (True) True (block (expression_statement (assignment (identifier_line) identifier_line (call (attribute (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier__proc) identifier__proc )attribute (identifier_stdout) identifier_stdout )attribute (identifier_readline) identifier_readline )attribute (argument_list )argument_list )call (identifier_decode) identifier_decode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_line) identifier_line )not_operator (block (raise_statement (call (attribute (identifier_jsonrpc_client_base) identifier_jsonrpc_client_base (identifier_AppStartError) identifier_AppStartError )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__ad) identifier__ad )attribute (string_'Unexpected EOF waiting for app to start') string_'Unexpected EOF waiting for app to start' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_line) identifier_line (call (attribute (identifier_line) identifier_line (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (parenthesized_expression (boolean_operator (call (attribute (identifier_line) identifier_line (identifier_startswith) identifier_startswith )attribute (argument_list (string_'INSTRUMENTATION_RESULT:') string_'INSTRUMENTATION_RESULT:' )argument_list )call (call (attribute (identifier_line) identifier_line (identifier_startswith) identifier_startswith )attribute (argument_list (string_'SNIPPET ') string_'SNIPPET ' )argument_list )call )boolean_operator )parenthesized_expression (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_log) identifier_log )attribute (identifier_debug) identifier_debug )attribute (argument_list (string_'Accepted line from instrumentation output: "%s"') string_'Accepted line from instrumentation output: "%s"' (identifier_line) identifier_line )argument_list )call )expression_statement (return_statement (identifier_line) identifier_line )return_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_log) identifier_log )attribute (identifier_debug) identifier_debug )attribute (argument_list (string_'Discarded line from instrumentation output: "%s"') string_'Discarded line from instrumentation output: "%s"' (identifier_line) identifier_line )argument_list )call )expression_statement )block )while_statement )block )function_definition )module
Reads the next line of instrumentation output relevant to snippets. This method will skip over lines that don't start with 'SNIPPET' or 'INSTRUMENTATION_RESULT'. Returns: (str) Next line of snippet-related instrumentation output, stripped. Raises: jsonrpc_client_base.AppStartError: If EOF is reached without any protocol lines being read.
(module (function_definition (function_name_log_detail) function_name_log_detail (parameters (default_parameter (identifier_job_id) identifier_job_id (None) None )default_parameter (default_parameter (identifier_task_name) identifier_task_name (None) None )default_parameter (default_parameter (identifier_log_id) identifier_log_id (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_jobs) identifier_jobs (call (identifier_get_jobs) identifier_get_jobs (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_job) identifier_job (subscript (list_comprehension (identifier_job) identifier_job (for_in_clause (identifier_job) identifier_job (identifier_jobs) identifier_jobs )for_in_clause (if_clause (comparison_operator (call (identifier_str) identifier_str (argument_list (subscript (identifier_job) identifier_job (string_'job_id') string_'job_id' )subscript )argument_list )call (identifier_job_id) identifier_job_id )comparison_operator )if_clause )list_comprehension (integer_0) integer_0 )subscript )assignment )expression_statement (return_statement (call (identifier_render_template) identifier_render_template (argument_list (string_'log_detail.html') string_'log_detail.html' (keyword_argument (identifier_job) identifier_job (identifier_job) identifier_job )keyword_argument (keyword_argument (identifier_task_name) identifier_task_name (identifier_task_name) identifier_task_name )keyword_argument (keyword_argument (identifier_task) identifier_task (subscript (list_comprehension (identifier_task) identifier_task (for_in_clause (identifier_task) identifier_task (subscript (identifier_job) identifier_job (string_'tasks') string_'tasks' )subscript )for_in_clause (if_clause (comparison_operator (subscript (identifier_task) identifier_task (string_'name') string_'name' )subscript (identifier_task_name) identifier_task_name )comparison_operator )if_clause )list_comprehension (integer_0) integer_0 )subscript )keyword_argument (keyword_argument (identifier_log_id) identifier_log_id (identifier_log_id) identifier_log_id )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Show a detailed description of a specific log.
(module (function_definition (function_name_element_href_use_filter) function_name_element_href_use_filter (parameters (identifier_name) identifier_name (identifier__filter) identifier__filter )parameters (block (if_statement (boolean_operator (identifier_name) identifier_name (identifier__filter) identifier__filter )boolean_operator (block (expression_statement (assignment (identifier_element) identifier_element (call (identifier_fetch_meta_by_name) identifier_fetch_meta_by_name (argument_list (identifier_name) identifier_name (keyword_argument (identifier_filter_context) identifier_filter_context (identifier__filter) identifier__filter )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (attribute (identifier_element) identifier_element (identifier_json) identifier_json )attribute (block (return_statement (call (attribute (call (attribute (attribute (identifier_element) identifier_element (identifier_json) identifier_json )attribute (identifier_pop) identifier_pop )attribute (argument_list )argument_list )call (identifier_get) identifier_get )attribute (argument_list (string_'href') string_'href' )argument_list )call )return_statement )block )if_statement )block )if_statement )block )function_definition )module
Get element href using filter Filter should be a valid entry point value, ie host, router, network, single_fw, etc :param name: name of element :param _filter: filter type, unknown filter will result in no matches :return: element href (if found), else None
(module (function_definition (function_name_add_note) function_name_add_note (parameters (identifier_path) identifier_path (default_parameter (identifier_filename) identifier_filename (string_"note.txt") string_"note.txt" )default_parameter )parameters (block (expression_statement (assignment (identifier_path) identifier_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_expanduser) identifier_expanduser )attribute (argument_list (identifier_path) identifier_path )argument_list )call )assignment )expression_statement (assert_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isdir) identifier_isdir )attribute (argument_list (identifier_path) identifier_path )argument_list )call (call (attribute (string_"{} is not a valid directory.") string_"{} is not a valid directory." (identifier_format) identifier_format )attribute (argument_list (identifier_path) identifier_path )argument_list )call )assert_statement (expression_statement (assignment (identifier_filepath) identifier_filepath (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_path) identifier_path (identifier_filename) identifier_filename )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_exists) identifier_exists (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (identifier_filepath) identifier_filepath )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_subprocess) identifier_subprocess (identifier_call) identifier_call )attribute (argument_list (list (identifier_EDITOR) identifier_EDITOR (identifier_filepath) identifier_filepath )list )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_exc) identifier_exc )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (string_"Editing note failed!") string_"Editing note failed!" )argument_list )call )expression_statement (raise_statement (identifier_exc) identifier_exc )raise_statement )block )except_clause )try_statement (if_statement (identifier_exists) identifier_exists (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Note updated at:") string_"Note updated at:" (identifier_filepath) identifier_filepath )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Note created at:") string_"Note created at:" (identifier_filepath) identifier_filepath )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Opens a txt file at the given path where user can add and save notes. Args: path (str): Directory where note will be saved. filename (str): Name of note. Defaults to "note.txt"
(module (function_definition (function_name__rgbtomask) function_name__rgbtomask (parameters (identifier_self) identifier_self (identifier_obj) identifier_obj )parameters (block (expression_statement (assignment (identifier_dat) identifier_dat (call (attribute (call (attribute (identifier_obj) identifier_obj (identifier_get_image) identifier_get_image )attribute (argument_list )argument_list )call (identifier_get_data) identifier_get_data )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (call (attribute (call (attribute (identifier_dat) identifier_dat (identifier_sum) identifier_sum )attribute (argument_list (keyword_argument (identifier_axis) identifier_axis (integer_2) integer_2 )keyword_argument )argument_list )call (identifier_astype) identifier_astype )attribute (argument_list (attribute (identifier_np) identifier_np (identifier_bool) identifier_bool )attribute )argument_list )call )return_statement )block )function_definition )module
Convert RGB arrays from mask canvas object back to boolean mask.
(module (function_definition (function_name_preformat_call) function_name_preformat_call (parameters (identifier_self) identifier_self (identifier_api_call) identifier_api_call )parameters (block (expression_statement (assignment (identifier_api_call_formatted) identifier_api_call_formatted (call (attribute (identifier_api_call) identifier_api_call (identifier_lstrip) identifier_lstrip )attribute (argument_list (string_'/') string_'/' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_api_call_formatted) identifier_api_call_formatted (call (attribute (identifier_api_call_formatted) identifier_api_call_formatted (identifier_rstrip) identifier_rstrip )attribute (argument_list (string_'?') string_'?' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_api_call) identifier_api_call (identifier_api_call_formatted) identifier_api_call_formatted )comparison_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (binary_operator (string_'api_call post strip =\n%s') string_'api_call post strip =\n%s' (identifier_api_call_formatted) identifier_api_call_formatted )binary_operator )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_api_call_formatted) identifier_api_call_formatted )return_statement )block )function_definition )module
Return properly formatted QualysGuard API call.
(module (function_definition (function_name_get_changed_files) function_name_get_changed_files (parameters (identifier_self) identifier_self )parameters (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_str) identifier_str )type )type_parameter )generic_type )type (block (expression_statement (assignment (identifier_out) identifier_out (call (attribute (identifier_shell_tools) identifier_shell_tools (identifier_output_of) identifier_output_of )attribute (argument_list (string_'git') string_'git' (string_'diff') string_'diff' (string_'--name-only') string_'--name-only' (attribute (identifier_self) identifier_self (identifier_compare_commit_id) identifier_compare_commit_id )attribute (attribute (identifier_self) identifier_self (identifier_actual_commit_id) identifier_actual_commit_id )attribute (string_'--') string_'--' (keyword_argument (identifier_cwd) identifier_cwd (attribute (identifier_self) identifier_self (identifier_destination_directory) identifier_destination_directory )attribute )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (list_comprehension (identifier_e) identifier_e (for_in_clause (identifier_e) identifier_e (call (attribute (identifier_out) identifier_out (identifier_split) identifier_split )attribute (argument_list (string_'\n') string_'\n' )argument_list )call )for_in_clause (if_clause (call (attribute (identifier_e) identifier_e (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )if_clause )list_comprehension )return_statement )block )function_definition )module
Get the files changed on one git branch vs another. Returns: List[str]: File paths of changed files, relative to the git repo root.
(module (function_definition (function_name__get_next) function_name__get_next (parameters (identifier_request) identifier_request )parameters (block (expression_statement (assignment (identifier_next) identifier_next (call (attribute (attribute (identifier_request) identifier_request (identifier_POST) identifier_POST )attribute (identifier_get) identifier_get )attribute (argument_list (string_'next') string_'next' (call (attribute (attribute (identifier_request) identifier_request (identifier_GET) identifier_GET )attribute (identifier_get) identifier_get )attribute (argument_list (string_'next') string_'next' (call (attribute (attribute (identifier_request) identifier_request (identifier_META) identifier_META )attribute (identifier_get) identifier_get )attribute (argument_list (string_'HTTP_REFERER') string_'HTTP_REFERER' (None) None )argument_list )call )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_next) identifier_next )not_operator (block (expression_statement (assignment (identifier_next) identifier_next (attribute (identifier_request) identifier_request (identifier_path) identifier_path )attribute )assignment )expression_statement )block )if_statement (return_statement (identifier_next) identifier_next )return_statement )block )function_definition )module
The part that's the least straightforward about views in this module is how they determine their redirects after they have finished computation. In short, they will try and determine the next place to go in the following order: 1. If there is a variable named ``next`` in the *POST* parameters, the view will redirect to that variable's value. 2. If there is a variable named ``next`` in the *GET* parameters, the view will redirect to that variable's value. 3. If Django can determine the previous page from the HTTP headers, the view will redirect to that previous page.
(module (function_definition (function_name_updates_selection) function_name_updates_selection (parameters (identifier_update_selection) identifier_update_selection )parameters (block (function_definition (function_name_handle_update) function_name_handle_update (parameters (identifier_selection) identifier_selection (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_old_selection) identifier_old_selection (call (attribute (identifier_selection) identifier_selection (identifier_get_all) identifier_get_all )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_update_selection) identifier_update_selection (argument_list (identifier_selection) identifier_selection (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement (expression_statement (assignment (identifier_new_selection) identifier_new_selection (call (attribute (identifier_selection) identifier_selection (identifier_get_all) identifier_get_all )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_affected_models) identifier_affected_models (binary_operator (identifier_old_selection) identifier_old_selection (identifier_new_selection) identifier_new_selection )binary_operator )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_affected_models) identifier_affected_models )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_deselected_models) identifier_deselected_models (binary_operator (identifier_old_selection) identifier_old_selection (identifier_new_selection) identifier_new_selection )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_selected_models) identifier_selected_models (binary_operator (identifier_new_selection) identifier_new_selection (identifier_old_selection) identifier_old_selection )binary_operator )assignment )expression_statement (expression_statement (call (identifier_map) identifier_map (argument_list (attribute (identifier_selection) identifier_selection (identifier_relieve_model) identifier_relieve_model )attribute (identifier_deselected_models) identifier_deselected_models )argument_list )call )expression_statement (expression_statement (call (identifier_map) identifier_map (argument_list (attribute (identifier_selection) identifier_selection (identifier_observe_model) identifier_observe_model )attribute (identifier_selected_models) identifier_selected_models )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_selection) identifier_selection (identifier_update_core_element_lists) identifier_update_core_element_lists )attribute (argument_list )argument_list )call )expression_statement (if_statement (boolean_operator (attribute (identifier_selection) identifier_selection (identifier_focus) identifier_focus )attribute (comparison_operator (attribute (identifier_selection) identifier_selection (identifier_focus) identifier_focus )attribute (identifier_new_selection) identifier_new_selection )comparison_operator )boolean_operator (block (delete_statement (attribute (identifier_selection) identifier_selection (identifier_focus) identifier_focus )attribute )delete_statement )block )if_statement (expression_statement (assignment (identifier_affected_classes) identifier_affected_classes (call (identifier_set) identifier_set (generator_expression (attribute (attribute (identifier_model) identifier_model (identifier_core_element) identifier_core_element )attribute (identifier___class__) identifier___class__ )attribute (for_in_clause (identifier_model) identifier_model (identifier_affected_models) identifier_affected_models )for_in_clause )generator_expression )call )assignment )expression_statement (expression_statement (assignment (identifier_msg_namedtuple) identifier_msg_namedtuple (call (identifier_SelectionChangedSignalMsg) identifier_SelectionChangedSignalMsg (argument_list (attribute (identifier_update_selection) identifier_update_selection (identifier___name__) identifier___name__ )attribute (identifier_new_selection) identifier_new_selection (identifier_old_selection) identifier_old_selection (identifier_affected_classes) identifier_affected_classes )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_selection) identifier_selection (identifier_selection_changed_signal) identifier_selection_changed_signal )attribute (identifier_emit) identifier_emit )attribute (argument_list (identifier_msg_namedtuple) identifier_msg_namedtuple )argument_list )call )expression_statement (if_statement (comparison_operator (attribute (identifier_selection) identifier_selection (identifier_parent_signal) identifier_parent_signal )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_selection) identifier_selection (identifier_parent_signal) identifier_parent_signal )attribute (identifier_emit) identifier_emit )attribute (argument_list (identifier_msg_namedtuple) identifier_msg_namedtuple )argument_list )call )expression_statement )block )if_statement )block )if_statement )block )function_definition (return_statement (identifier_handle_update) identifier_handle_update )return_statement )block )function_definition )module
Decorator indicating that the decorated method could change the selection
(module (function_definition (function_name_compute_date_range_chunks) function_name_compute_date_range_chunks (parameters (identifier_sessions) identifier_sessions (identifier_start_date) identifier_start_date (identifier_end_date) identifier_end_date (identifier_chunksize) identifier_chunksize )parameters (block (if_statement (comparison_operator (identifier_start_date) identifier_start_date (identifier_sessions) identifier_sessions )comparison_operator (block (raise_statement (call (identifier_KeyError) identifier_KeyError (argument_list (binary_operator (string_"Start date %s is not found in calendar.") string_"Start date %s is not found in calendar." (tuple (call (attribute (identifier_start_date) identifier_start_date (identifier_strftime) identifier_strftime )attribute (argument_list (string_"%Y-%m-%d") string_"%Y-%m-%d" )argument_list )call )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_end_date) identifier_end_date (identifier_sessions) identifier_sessions )comparison_operator (block (raise_statement (call (identifier_KeyError) identifier_KeyError (argument_list (binary_operator (string_"End date %s is not found in calendar.") string_"End date %s is not found in calendar." (tuple (call (attribute (identifier_end_date) identifier_end_date (identifier_strftime) identifier_strftime )attribute (argument_list (string_"%Y-%m-%d") string_"%Y-%m-%d" )argument_list )call )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_end_date) identifier_end_date (identifier_start_date) identifier_start_date )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"End date %s cannot precede start date %s.") string_"End date %s cannot precede start date %s." (tuple (call (attribute (identifier_end_date) identifier_end_date (identifier_strftime) identifier_strftime )attribute (argument_list (string_"%Y-%m-%d") string_"%Y-%m-%d" )argument_list )call (call (attribute (identifier_start_date) identifier_start_date (identifier_strftime) identifier_strftime )attribute (argument_list (string_"%Y-%m-%d") string_"%Y-%m-%d" )argument_list )call )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_chunksize) identifier_chunksize (None) None )comparison_operator (block (return_statement (list (tuple (identifier_start_date) identifier_start_date (identifier_end_date) identifier_end_date )tuple )list )return_statement )block )if_statement (expression_statement (assignment (pattern_list (identifier_start_ix) identifier_start_ix (identifier_end_ix) identifier_end_ix )pattern_list (call (attribute (identifier_sessions) identifier_sessions (identifier_slice_locs) identifier_slice_locs )attribute (argument_list (identifier_start_date) identifier_start_date (identifier_end_date) identifier_end_date )argument_list )call )assignment )expression_statement (return_statement (generator_expression (tuple (subscript (identifier_r) identifier_r (integer_0) integer_0 )subscript (subscript (identifier_r) identifier_r (unary_operator (integer_1) integer_1 )unary_operator )subscript )tuple (for_in_clause (identifier_r) identifier_r (call (identifier_partition_all) identifier_partition_all (argument_list (identifier_chunksize) identifier_chunksize (subscript (identifier_sessions) identifier_sessions (slice (identifier_start_ix) identifier_start_ix (colon) colon (identifier_end_ix) identifier_end_ix )slice )subscript )argument_list )call )for_in_clause )generator_expression )return_statement )block )function_definition )module
Compute the start and end dates to run a pipeline for. Parameters ---------- sessions : DatetimeIndex The available dates. start_date : pd.Timestamp The first date in the pipeline. end_date : pd.Timestamp The last date in the pipeline. chunksize : int or None The size of the chunks to run. Setting this to None returns one chunk. Returns ------- ranges : iterable[(np.datetime64, np.datetime64)] A sequence of start and end dates to run the pipeline for.
(module (function_definition (function_name_GetZipInfoByPathSpec) function_name_GetZipInfoByPathSpec (parameters (identifier_self) identifier_self (identifier_path_spec) identifier_path_spec )parameters (block (expression_statement (assignment (identifier_location) identifier_location (call (identifier_getattr) identifier_getattr (argument_list (identifier_path_spec) identifier_path_spec (string_'location') string_'location' (None) None )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_location) identifier_location (None) None )comparison_operator (block (raise_statement (call (attribute (identifier_errors) identifier_errors (identifier_PathSpecError) identifier_PathSpecError )attribute (argument_list (string_'Path specification missing location.') string_'Path specification missing location.' )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (call (attribute (identifier_location) identifier_location (identifier_startswith) identifier_startswith )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_LOCATION_ROOT) identifier_LOCATION_ROOT )attribute )argument_list )call )not_operator (block (raise_statement (call (attribute (identifier_errors) identifier_errors (identifier_PathSpecError) identifier_PathSpecError )attribute (argument_list (string_'Invalid location in path specification.') string_'Invalid location in path specification.' )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_location) identifier_location )argument_list )call (integer_1) integer_1 )comparison_operator (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__zip_file) identifier__zip_file )attribute (identifier_getinfo) identifier_getinfo )attribute (argument_list (subscript (identifier_location) identifier_location (slice (integer_1) integer_1 (colon) colon )slice )subscript )argument_list )call )return_statement )block )if_statement (return_statement (None) None )return_statement )block )function_definition )module
Retrieves the ZIP info for a path specification. Args: path_spec (PathSpec): a path specification. Returns: zipfile.ZipInfo: a ZIP info object or None if not available. Raises: PathSpecError: if the path specification is incorrect.
(module (function_definition (function_name__find_combo_data) function_name__find_combo_data (parameters (identifier_widget) identifier_widget (identifier_value) identifier_value )parameters (block (for_statement (identifier_idx) identifier_idx (call (identifier_range) identifier_range (argument_list (call (attribute (identifier_widget) identifier_widget (identifier_count) identifier_count )attribute (argument_list )argument_list )call )argument_list )call (block (if_statement (boolean_operator (comparison_operator (call (attribute (identifier_widget) identifier_widget (identifier_itemData) identifier_itemData )attribute (argument_list (identifier_idx) identifier_idx )argument_list )call (identifier_value) identifier_value )comparison_operator (comparison_operator (parenthesized_expression (comparison_operator (call (attribute (identifier_widget) identifier_widget (identifier_itemData) identifier_itemData )attribute (argument_list (identifier_idx) identifier_idx )argument_list )call (identifier_value) identifier_value )comparison_operator )parenthesized_expression (True) True )comparison_operator )boolean_operator (block (return_statement (identifier_idx) identifier_idx )return_statement )block )if_statement )block (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"%s not found in combo box") string_"%s not found in combo box" (tuple (identifier_value) identifier_value )tuple )binary_operator )argument_list )call )raise_statement )block )else_clause )for_statement )block )function_definition )module
Returns the index in a combo box where itemData == value Raises a ValueError if data is not found
(module (function_definition (function_name_get_scalar_product) function_name_get_scalar_product (parameters (identifier_self) identifier_self (identifier_other) identifier_other )parameters (block (return_statement (binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_x) identifier_x )attribute (attribute (identifier_other) identifier_other (identifier_x) identifier_x )attribute )binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_y) identifier_y )attribute (attribute (identifier_other) identifier_other (identifier_y) identifier_y )attribute )binary_operator )binary_operator )return_statement )block )function_definition )module
Returns the scalar product of this vector with the given other vector.
(module (function_definition (function_name_compute_mga_entropy_stat) function_name_compute_mga_entropy_stat (parameters (identifier_mga_vec) identifier_mga_vec (identifier_codon_pos) identifier_codon_pos (default_parameter (identifier_stat_func) identifier_stat_func (attribute (identifier_np) identifier_np (identifier_mean) identifier_mean )attribute )default_parameter (default_parameter (identifier_default_val) identifier_default_val (float_0.0) float_0.0 )default_parameter )parameters (block (if_statement (comparison_operator (identifier_mga_vec) identifier_mga_vec (None) None )comparison_operator (block (return_statement (identifier_default_val) identifier_default_val )return_statement )block )if_statement (expression_statement (assignment (identifier_myscores) identifier_myscores (call (identifier_fetch_mga_scores) identifier_fetch_mga_scores (argument_list (identifier_mga_vec) identifier_mga_vec (identifier_codon_pos) identifier_codon_pos )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_myscores) identifier_myscores (None) None )comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_myscores) identifier_myscores )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_score_stat) identifier_score_stat (call (identifier_stat_func) identifier_stat_func (argument_list (identifier_myscores) identifier_myscores )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_score_stat) identifier_score_stat (identifier_default_val) identifier_default_val )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_score_stat) identifier_score_stat )return_statement )block )function_definition )module
Compute MGA entropy conservation statistic Parameters ---------- mga_vec : np.array numpy vector containing MGA Entropy conservation scores for residues codon_pos : list of int position of codon in protein sequence stat_func : function, default=np.mean function that calculates a statistic default_val : float default value to return if there are no mutations Returns ------- score_stat : float MGA entropy score statistic for provided mutation list
(module (function_definition (function_name_pdf) function_name_pdf (parameters (identifier_self) identifier_self (identifier_mu) identifier_mu )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_transform) identifier_transform )attribute (None) None )comparison_operator (block (expression_statement (assignment (identifier_mu) identifier_mu (call (attribute (identifier_self) identifier_self (identifier_transform) identifier_transform )attribute (argument_list (identifier_mu) identifier_mu )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_ss) identifier_ss (identifier_poisson) identifier_poisson )attribute (identifier_pmf) identifier_pmf )attribute (argument_list (identifier_mu) identifier_mu (attribute (identifier_self) identifier_self (identifier_lmd0) identifier_lmd0 )attribute )argument_list )call )return_statement )block )function_definition )module
PDF for Poisson prior Parameters ---------- mu : float Latent variable for which the prior is being formed over Returns ---------- - p(mu)
(module (function_definition (function_name_get_alternative) function_name_get_alternative (parameters (identifier_self) identifier_self (identifier_experiment_name) identifier_experiment_name )parameters (block (expression_statement (assignment (identifier_experiment) identifier_experiment (None) None )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_experiment) identifier_experiment (subscript (identifier_experiment_manager) identifier_experiment_manager (identifier_experiment_name) identifier_experiment_name )subscript )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (pass_statement )pass_statement )block )except_clause )try_statement (if_statement (identifier_experiment) identifier_experiment (block (if_statement (call (attribute (identifier_experiment) identifier_experiment (identifier_is_displaying_alternatives) identifier_is_displaying_alternatives )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_alternative) identifier_alternative (call (attribute (identifier_self) identifier_self (identifier__get_enrollment) identifier__get_enrollment )attribute (argument_list (identifier_experiment) identifier_experiment )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_alternative) identifier_alternative (None) None )comparison_operator (block (return_statement (identifier_alternative) identifier_alternative )return_statement )block )if_statement )block (else_clause (block (return_statement (attribute (identifier_experiment) identifier_experiment (identifier_default_alternative) identifier_default_alternative )attribute )return_statement )block )else_clause )if_statement )block )if_statement (return_statement (attribute (identifier_conf) identifier_conf (identifier_CONTROL_GROUP) identifier_CONTROL_GROUP )attribute )return_statement )block )function_definition )module
Get the alternative this user is enrolled in.
(module (function_definition (function_name__mpl_marker2pgfp_marker) function_name__mpl_marker2pgfp_marker (parameters (identifier_data) identifier_data (identifier_mpl_marker) identifier_mpl_marker (identifier_marker_face_color) identifier_marker_face_color )parameters (block (try_statement (block (expression_statement (assignment (identifier_pgfplots_marker) identifier_pgfplots_marker (subscript (identifier__MP_MARKER2PGF_MARKER) identifier__MP_MARKER2PGF_MARKER (identifier_mpl_marker) identifier_mpl_marker )subscript )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (pass_statement )pass_statement )block )except_clause (else_clause (block (if_statement (boolean_operator (parenthesized_expression (comparison_operator (identifier_marker_face_color) identifier_marker_face_color (None) None )comparison_operator )parenthesized_expression (comparison_operator (identifier_pgfplots_marker) identifier_pgfplots_marker (string_"o") string_"o" )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_pgfplots_marker) identifier_pgfplots_marker (string_"*") string_"*" )assignment )expression_statement (expression_statement (call (attribute (subscript (identifier_data) identifier_data (string_"tikz libs") string_"tikz libs" )subscript (identifier_add) identifier_add )attribute (argument_list (string_"plotmarks") string_"plotmarks" )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_marker_options) identifier_marker_options (None) None )assignment )expression_statement (return_statement (tuple (identifier_data) identifier_data (identifier_pgfplots_marker) identifier_pgfplots_marker (identifier_marker_options) identifier_marker_options )tuple )return_statement )block )else_clause )try_statement (try_statement (block (expression_statement (call (attribute (subscript (identifier_data) identifier_data (string_"tikz libs") string_"tikz libs" )subscript (identifier_add) identifier_add )attribute (argument_list (string_"plotmarks") string_"plotmarks" )argument_list )call )expression_statement (expression_statement (assignment (pattern_list (identifier_pgfplots_marker) identifier_pgfplots_marker (identifier_marker_options) identifier_marker_options )pattern_list (subscript (identifier__MP_MARKER2PLOTMARKS) identifier__MP_MARKER2PLOTMARKS (identifier_mpl_marker) identifier_mpl_marker )subscript )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (pass_statement )pass_statement )block )except_clause (else_clause (block (if_statement (parenthesized_expression (boolean_operator (boolean_operator (comparison_operator (identifier_marker_face_color) identifier_marker_face_color (None) None )comparison_operator (parenthesized_expression (boolean_operator (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_marker_face_color) identifier_marker_face_color (identifier_str) identifier_str )argument_list )call )not_operator (comparison_operator (call (attribute (identifier_marker_face_color) identifier_marker_face_color (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (string_"none") string_"none" )comparison_operator )boolean_operator )parenthesized_expression )boolean_operator (comparison_operator (identifier_pgfplots_marker) identifier_pgfplots_marker (list (string_"|") string_"|" (string_"-") string_"-" (string_"asterisk") string_"asterisk" (string_"star") string_"star" )list )comparison_operator )boolean_operator )parenthesized_expression (block (expression_statement (augmented_assignment (identifier_pgfplots_marker) identifier_pgfplots_marker (string_"*") string_"*" )augmented_assignment )expression_statement )block )if_statement (return_statement (tuple (identifier_data) identifier_data (identifier_pgfplots_marker) identifier_pgfplots_marker (identifier_marker_options) identifier_marker_options )tuple )return_statement )block )else_clause )try_statement (return_statement (expression_list (identifier_data) identifier_data (None) None (None) None )expression_list )return_statement )block )function_definition )module
Translates a marker style of matplotlib to the corresponding style in PGFPlots.
(module (function_definition (function_name_bartlett) function_name_bartlett (parameters (identifier_timeseries) identifier_timeseries (identifier_segmentlength) identifier_segmentlength (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_'noverlap') string_'noverlap' (None) None )argument_list )call )expression_statement (return_statement (call (identifier_welch) identifier_welch (argument_list (identifier_timeseries) identifier_timeseries (identifier_segmentlength) identifier_segmentlength (keyword_argument (identifier_noverlap) identifier_noverlap (integer_0) integer_0 )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Calculate a PSD using Bartlett's method
(module (function_definition (function_name_stop_service) function_name_stop_service (parameters (identifier_name) identifier_name )parameters (block (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_win32) identifier_win32 (identifier_OpenSCManager) identifier_OpenSCManager )attribute (argument_list (keyword_argument (identifier_dwDesiredAccess) identifier_dwDesiredAccess (attribute (identifier_win32) identifier_win32 (identifier_SC_MANAGER_CONNECT) identifier_SC_MANAGER_CONNECT )attribute )keyword_argument )argument_list )call (as_pattern_target (identifier_hSCManager) identifier_hSCManager )as_pattern_target )as_pattern )with_item )with_clause (block (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_win32) identifier_win32 (identifier_OpenService) identifier_OpenService )attribute (argument_list (identifier_hSCManager) identifier_hSCManager (identifier_name) identifier_name (keyword_argument (identifier_dwDesiredAccess) identifier_dwDesiredAccess (attribute (identifier_win32) identifier_win32 (identifier_SERVICE_STOP) identifier_SERVICE_STOP )attribute )keyword_argument )argument_list )call (as_pattern_target (identifier_hService) identifier_hService )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_win32) identifier_win32 (identifier_ControlService) identifier_ControlService )attribute (argument_list (identifier_hService) identifier_hService (attribute (identifier_win32) identifier_win32 (identifier_SERVICE_CONTROL_STOP) identifier_SERVICE_CONTROL_STOP )attribute )argument_list )call )expression_statement )block )with_statement )block )with_statement )block )function_definition )module
Stop the service given by name. @warn: This method requires UAC elevation in Windows Vista and above. @see: L{get_services}, L{get_active_services}, L{start_service}, L{pause_service}, L{resume_service}
(module (function_definition (function_name_item_selection_changed) function_name_item_selection_changed (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_is_selection) identifier_is_selection (comparison_operator (call (identifier_len) identifier_len (argument_list (call (attribute (identifier_self) identifier_self (identifier_selectedItems) identifier_selectedItems )attribute (argument_list )argument_list )call )argument_list )call (integer_0) integer_0 )comparison_operator )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_expand_selection_action) identifier_expand_selection_action )attribute (identifier_setEnabled) identifier_setEnabled )attribute (argument_list (identifier_is_selection) identifier_is_selection )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_collapse_selection_action) identifier_collapse_selection_action )attribute (identifier_setEnabled) identifier_setEnabled )attribute (argument_list (identifier_is_selection) identifier_is_selection )argument_list )call )expression_statement )block )function_definition )module
Item selection has changed
(module (function_definition (function_name_lasio_get) function_name_lasio_get (parameters (identifier_l) identifier_l (identifier_section) identifier_section (identifier_item) identifier_item (default_parameter (identifier_attrib) identifier_attrib (string_'value') string_'value' )default_parameter (default_parameter (identifier_default) identifier_default (None) None )default_parameter (default_parameter (identifier_remap) identifier_remap (None) None )default_parameter (default_parameter (identifier_funcs) identifier_funcs (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_remap) identifier_remap (boolean_operator (identifier_remap) identifier_remap (dictionary )dictionary )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_item_to_fetch) identifier_item_to_fetch (call (attribute (identifier_remap) identifier_remap (identifier_get) identifier_get )attribute (argument_list (identifier_item) identifier_item (identifier_item) identifier_item )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_item_to_fetch) identifier_item_to_fetch (None) None )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier_obj) identifier_obj (call (identifier_getattr) identifier_getattr (argument_list (identifier_l) identifier_l (identifier_section) identifier_section )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (subscript (call (identifier_getattr) identifier_getattr (argument_list (identifier_obj) identifier_obj (identifier_item_to_fetch) identifier_item_to_fetch )argument_list )call (identifier_attrib) identifier_attrib )subscript )assignment )expression_statement )block (except_clause (block (return_statement (identifier_default) identifier_default )return_statement )block )except_clause )try_statement (if_statement (comparison_operator (identifier_funcs) identifier_funcs (None) None )comparison_operator (block (expression_statement (assignment (identifier_f) identifier_f (call (attribute (identifier_funcs) identifier_funcs (identifier_get) identifier_get )attribute (argument_list (identifier_item) identifier_item (identifier_null) identifier_null )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (identifier_f) identifier_f (argument_list (identifier_result) identifier_result )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Grabs, renames and transforms stuff from a lasio object. Args: l (lasio): a lasio instance. section (str): The LAS section to grab from, eg ``well`` item (str): The item in the LAS section to grab from, eg ``name`` attrib (str): The attribute of the item to grab, eg ``value`` default (str): What to return instead. remap (dict): Optional. A dict of 'old': 'new' LAS field names. funcs (dict): Optional. A dict of 'las field': function() for implementing a transform before loading. Can be a lambda. Returns: The transformed item.
(module (function_definition (function_name_get_system_by_name) function_name_get_system_by_name (parameters (identifier_self) identifier_self (identifier_name) identifier_name )parameters (block (for_statement (identifier_elem) identifier_elem (attribute (identifier_self) identifier_self (identifier_systems) identifier_systems )attribute (block (if_statement (comparison_operator (attribute (identifier_elem) identifier_elem (identifier_name) identifier_name )attribute (identifier_name) identifier_name )comparison_operator (block (return_statement (identifier_elem) identifier_elem )return_statement )block )if_statement )block )for_statement (return_statement (None) None )return_statement )block )function_definition )module
Return a system with that name or None.
(module (function_definition (function_name_find_nn_triangles_point) function_name_find_nn_triangles_point (parameters (identifier_tri) identifier_tri (identifier_cur_tri) identifier_cur_tri (identifier_point) identifier_point )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (expression_statement (assignment (identifier_nn) identifier_nn (list )list )assignment )expression_statement (expression_statement (assignment (identifier_candidates) identifier_candidates (call (identifier_set) identifier_set (argument_list (subscript (attribute (identifier_tri) identifier_tri (identifier_neighbors) identifier_neighbors )attribute (identifier_cur_tri) identifier_cur_tri )subscript )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_candidates) identifier_candidates (call (identifier_set) identifier_set (argument_list (attribute (subscript (attribute (identifier_tri) identifier_tri (identifier_neighbors) identifier_neighbors )attribute (subscript (attribute (identifier_tri) identifier_tri (identifier_neighbors) identifier_neighbors )attribute (identifier_cur_tri) identifier_cur_tri )subscript )subscript (identifier_flat) identifier_flat )attribute )argument_list )call )augmented_assignment )expression_statement (expression_statement (call (attribute (identifier_candidates) identifier_candidates (identifier_discard) identifier_discard )attribute (argument_list (unary_operator (integer_1) integer_1 )unary_operator )argument_list )call )expression_statement (for_statement (identifier_neighbor) identifier_neighbor (identifier_candidates) identifier_candidates (block (expression_statement (assignment (identifier_triangle) identifier_triangle (subscript (attribute (identifier_tri) identifier_tri (identifier_points) identifier_points )attribute (subscript (attribute (identifier_tri) identifier_tri (identifier_simplices) identifier_simplices )attribute (identifier_neighbor) identifier_neighbor )subscript )subscript )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_cur_x) identifier_cur_x (identifier_cur_y) identifier_cur_y )pattern_list (call (identifier_circumcenter) identifier_circumcenter (argument_list (subscript (identifier_triangle) identifier_triangle (integer_0) integer_0 )subscript (subscript (identifier_triangle) identifier_triangle (integer_1) integer_1 )subscript (subscript (identifier_triangle) identifier_triangle (integer_2) integer_2 )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_r) identifier_r (call (identifier_circumcircle_radius_2) identifier_circumcircle_radius_2 (argument_list (subscript (identifier_triangle) identifier_triangle (integer_0) integer_0 )subscript (subscript (identifier_triangle) identifier_triangle (integer_1) integer_1 )subscript (subscript (identifier_triangle) identifier_triangle (integer_2) integer_2 )subscript )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_dist_2) identifier_dist_2 (argument_list (subscript (identifier_point) identifier_point (integer_0) integer_0 )subscript (subscript (identifier_point) identifier_point (integer_1) integer_1 )subscript (identifier_cur_x) identifier_cur_x (identifier_cur_y) identifier_cur_y )argument_list )call (identifier_r) identifier_r )comparison_operator (block (expression_statement (call (attribute (identifier_nn) identifier_nn (identifier_append) identifier_append )attribute (argument_list (identifier_neighbor) identifier_neighbor )argument_list )call )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_nn) identifier_nn )return_statement )block )function_definition )module
r"""Return the natural neighbors of a triangle containing a point. This is based on the provided Delaunay Triangulation. Parameters ---------- tri: Object A Delaunay Triangulation cur_tri: int Simplex code for Delaunay Triangulation lookup of a given triangle that contains 'position'. point: (x, y) Coordinates used to calculate distances to simplexes in 'tri'. Returns ------- nn: (N, ) array List of simplex codes for natural neighbor triangles in 'tri'.
(module (function_definition (function_name_gramian) function_name_gramian (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_mode) identifier_mode )attribute (string_'spark') string_'spark' )comparison_operator (block (expression_statement (assignment (identifier_rdd) identifier_rdd (call (attribute (attribute (identifier_self) identifier_self (identifier_values) identifier_values )attribute (identifier_tordd) identifier_tordd )attribute (argument_list )argument_list )call )assignment )expression_statement (import_from_statement (dotted_name (identifier_pyspark) identifier_pyspark (identifier_accumulators) identifier_accumulators )dotted_name (dotted_name (identifier_AccumulatorParam) identifier_AccumulatorParam )dotted_name )import_from_statement (class_definition (identifier_MatrixAccumulator) identifier_MatrixAccumulator (argument_list (identifier_AccumulatorParam) identifier_AccumulatorParam )argument_list (block (function_definition (function_name_zero) function_name_zero (parameters (identifier_self) identifier_self (identifier_value) identifier_value )parameters (block (return_statement (call (identifier_zeros) identifier_zeros (argument_list (call (identifier_shape) identifier_shape (argument_list (identifier_value) identifier_value )argument_list )call )argument_list )call )return_statement )block )function_definition (function_definition (function_name_addInPlace) function_name_addInPlace (parameters (identifier_self) identifier_self (identifier_val1) identifier_val1 (identifier_val2) identifier_val2 )parameters (block (expression_statement (augmented_assignment (identifier_val1) identifier_val1 (identifier_val2) identifier_val2 )augmented_assignment )expression_statement (return_statement (identifier_val1) identifier_val1 )return_statement )block )function_definition )block )class_definition (global_statement (identifier_mat) identifier_mat )global_statement (expression_statement (assignment (identifier_init) identifier_init (call (identifier_zeros) identifier_zeros (argument_list (tuple (subscript (attribute (identifier_self) identifier_self (identifier_shape) identifier_shape )attribute (integer_1) integer_1 )subscript (subscript (attribute (identifier_self) identifier_self (identifier_shape) identifier_shape )attribute (integer_1) integer_1 )subscript )tuple )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_mat) identifier_mat (call (attribute (attribute (identifier_rdd) identifier_rdd (identifier_context) identifier_context )attribute (identifier_accumulator) identifier_accumulator )attribute (argument_list (identifier_init) identifier_init (call (identifier_MatrixAccumulator) identifier_MatrixAccumulator (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (function_definition (function_name_outer_sum) function_name_outer_sum (parameters (identifier_x) identifier_x )parameters (block (global_statement (identifier_mat) identifier_mat )global_statement (expression_statement (augmented_assignment (identifier_mat) identifier_mat (call (identifier_outer) identifier_outer (argument_list (identifier_x) identifier_x (identifier_x) identifier_x )argument_list )call )augmented_assignment )expression_statement )block )function_definition (expression_statement (call (attribute (call (attribute (identifier_rdd) identifier_rdd (identifier_values) identifier_values )attribute (argument_list )argument_list )call (identifier_foreach) identifier_foreach )attribute (argument_list (identifier_outer_sum) identifier_outer_sum )argument_list )call )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__constructor) identifier__constructor )attribute (argument_list (attribute (identifier_mat) identifier_mat (identifier_value) identifier_value )attribute (keyword_argument (identifier_index) identifier_index (attribute (identifier_self) identifier_self (identifier_index) identifier_index )attribute )keyword_argument )argument_list )call )return_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_mode) identifier_mode )attribute (string_'local') string_'local' )comparison_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__constructor) identifier__constructor )attribute (argument_list (call (identifier_dot) identifier_dot (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_values) identifier_values )attribute (identifier_T) identifier_T )attribute (attribute (identifier_self) identifier_self (identifier_values) identifier_values )attribute )argument_list )call (keyword_argument (identifier_index) identifier_index (attribute (identifier_self) identifier_self (identifier_index) identifier_index )attribute )keyword_argument )argument_list )call )return_statement )block )if_statement )block )function_definition )module
Compute gramian of a distributed matrix. The gramian is defined as the product of the matrix with its transpose, i.e. A^T * A.
(module (function_definition (function_name_transform) function_name_transform (parameters (identifier_self) identifier_self (identifier_jam) identifier_jam (default_parameter (identifier_query) identifier_query (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_anns) identifier_anns (list )list )assignment )expression_statement (if_statement (identifier_query) identifier_query (block (expression_statement (assignment (identifier_results) identifier_results (call (attribute (identifier_jam) identifier_jam (identifier_search) identifier_search )attribute (argument_list (dictionary_splat (identifier_query) identifier_query )dictionary_splat )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_results) identifier_results (attribute (identifier_jam) identifier_jam (identifier_annotations) identifier_annotations )attribute )assignment )expression_statement )block )else_clause )if_statement (for_statement (identifier_ann) identifier_ann (identifier_results) identifier_results (block (try_statement (block (expression_statement (call (attribute (identifier_anns) identifier_anns (identifier_append) identifier_append )attribute (argument_list (call (attribute (attribute (identifier_jams) identifier_jams (identifier_nsconvert) identifier_nsconvert )attribute (identifier_convert) identifier_convert )attribute (argument_list (identifier_ann) identifier_ann (attribute (identifier_self) identifier_self (identifier_namespace) identifier_namespace )attribute )argument_list )call )argument_list )call )expression_statement )block (except_clause (attribute (identifier_jams) identifier_jams (identifier_NamespaceError) identifier_NamespaceError )attribute (block (pass_statement )pass_statement )block )except_clause )try_statement )block )for_statement (expression_statement (assignment (identifier_duration) identifier_duration (attribute (attribute (identifier_jam) identifier_jam (identifier_file_metadata) identifier_file_metadata )attribute (identifier_duration) identifier_duration )attribute )assignment )expression_statement (if_statement (not_operator (identifier_anns) identifier_anns )not_operator (block (expression_statement (assignment (identifier_anns) identifier_anns (list (call (attribute (identifier_self) identifier_self (identifier_empty) identifier_empty )attribute (argument_list (identifier_duration) identifier_duration )argument_list )call )list )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_results) identifier_results (list )list )assignment )expression_statement (for_statement (identifier_ann) identifier_ann (identifier_anns) identifier_anns (block (expression_statement (call (attribute (identifier_results) identifier_results (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_transform_annotation) identifier_transform_annotation )attribute (argument_list (identifier_ann) identifier_ann (identifier_duration) identifier_duration )argument_list )call )argument_list )call )expression_statement (if_statement (boolean_operator (comparison_operator (attribute (identifier_ann) identifier_ann (identifier_time) identifier_time )attribute (None) None )comparison_operator (comparison_operator (attribute (identifier_ann) identifier_ann (identifier_duration) identifier_duration )attribute (None) None )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_valid) identifier_valid (list (integer_0) integer_0 (identifier_duration) identifier_duration )list )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_valid) identifier_valid (list (attribute (identifier_ann) identifier_ann (identifier_time) identifier_time )attribute (binary_operator (attribute (identifier_ann) identifier_ann (identifier_time) identifier_time )attribute (attribute (identifier_ann) identifier_ann (identifier_duration) identifier_duration )attribute )binary_operator )list )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (subscript (subscript (identifier_results) identifier_results (unary_operator (integer_1) integer_1 )unary_operator )subscript (string_'_valid') string_'_valid' )subscript (call (identifier_time_to_frames) identifier_time_to_frames (argument_list (identifier_valid) identifier_valid (keyword_argument (identifier_sr) identifier_sr (attribute (identifier_self) identifier_self (identifier_sr) identifier_sr )attribute )keyword_argument (keyword_argument (identifier_hop_length) identifier_hop_length (attribute (identifier_self) identifier_self (identifier_hop_length) identifier_hop_length )attribute )keyword_argument )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_merge) identifier_merge )attribute (argument_list (identifier_results) identifier_results )argument_list )call )return_statement )block )function_definition )module
Transform jam object to make data for this task Parameters ---------- jam : jams.JAMS The jams container object query : string, dict, or callable [optional] An optional query to narrow the elements of `jam.annotations` to be considered. If not provided, all annotations are considered. Returns ------- data : dict A dictionary of transformed annotations. All annotations which can be converted to the target namespace will be converted.
(module (function_definition (function_name_algebra_simplify) function_name_algebra_simplify (parameters (default_parameter (identifier_alphabet_size) identifier_alphabet_size (integer_26) integer_26 )default_parameter (default_parameter (identifier_min_depth) identifier_min_depth (integer_0) integer_0 )default_parameter (default_parameter (identifier_max_depth) identifier_max_depth (integer_2) integer_2 )default_parameter (default_parameter (identifier_nbr_cases) identifier_nbr_cases (integer_10000) integer_10000 )default_parameter )parameters (block (if_statement (comparison_operator (identifier_max_depth) identifier_max_depth (identifier_min_depth) identifier_min_depth )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (concatenated_string (string_"max_depth must be greater than or equal to min_depth. ") string_"max_depth must be greater than or equal to min_depth. " (string_"Got max_depth=%s, min_depth=%s") string_"Got max_depth=%s, min_depth=%s" )concatenated_string (tuple (identifier_max_depth) identifier_max_depth (identifier_min_depth) identifier_min_depth )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_alg_cfg) identifier_alg_cfg (call (identifier_math_dataset_init) identifier_math_dataset_init (argument_list (identifier_alphabet_size) identifier_alphabet_size (keyword_argument (identifier_digits) identifier_digits (integer_5) integer_5 )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (identifier__) identifier__ (call (identifier_range) identifier_range (argument_list (identifier_nbr_cases) identifier_nbr_cases )argument_list )call (block (expression_statement (assignment (pattern_list (identifier_sample) identifier_sample (identifier_target) identifier_target )pattern_list (call (identifier_generate_algebra_simplify_sample) identifier_generate_algebra_simplify_sample (argument_list (attribute (identifier_alg_cfg) identifier_alg_cfg (identifier_vlist) identifier_vlist )attribute (call (identifier_list) identifier_list (argument_list (call (attribute (attribute (identifier_alg_cfg) identifier_alg_cfg (identifier_ops) identifier_ops )attribute (identifier_values) identifier_values )attribute (argument_list )argument_list )call )argument_list )call (identifier_min_depth) identifier_min_depth (identifier_max_depth) identifier_max_depth )argument_list )call )assignment )expression_statement (expression_statement (yield (dictionary (pair (string_"inputs") string_"inputs" (call (attribute (identifier_alg_cfg) identifier_alg_cfg (identifier_int_encoder) identifier_int_encoder )attribute (argument_list (identifier_sample) identifier_sample )argument_list )call )pair (pair (string_"targets") string_"targets" (call (attribute (identifier_alg_cfg) identifier_alg_cfg (identifier_int_encoder) identifier_int_encoder )attribute (argument_list (identifier_target) identifier_target )argument_list )call )pair )dictionary )yield )expression_statement )block )for_statement )block )function_definition )module
Generate the algebra simplify dataset. Each sample is a symbolic math expression involving unknown variables. The task is to simplify the expression. The target is the resulting expression. Args: alphabet_size: How many possible variables there are. Max 52. min_depth: Minimum depth of the expression trees on both sides of the equals sign in the equation. max_depth: Maximum depth of the expression trees on both sides of the equals sign in the equation. nbr_cases: The number of cases to generate. Yields: A dictionary {"inputs": input-list, "targets": target-list} where input-list are the tokens encoding the expression to simplify, and target-list is a list of tokens encoding the resulting math expression after simplifying. Raises: ValueError: If `max_depth` < `min_depth`.
(module (function_definition (function_name_get_channelstate_settled) function_name_get_channelstate_settled (parameters (typed_parameter (identifier_chain_state) identifier_chain_state (type (identifier_ChainState) identifier_ChainState )type )typed_parameter (typed_parameter (identifier_payment_network_id) identifier_payment_network_id (type (identifier_PaymentNetworkID) identifier_PaymentNetworkID )type )typed_parameter (typed_parameter (identifier_token_address) identifier_token_address (type (identifier_TokenAddress) identifier_TokenAddress )type )typed_parameter )parameters (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_NettingChannelState) identifier_NettingChannelState )type )type_parameter )generic_type )type (block (return_statement (call (identifier_get_channelstate_filter) identifier_get_channelstate_filter (argument_list (identifier_chain_state) identifier_chain_state (identifier_payment_network_id) identifier_payment_network_id (identifier_token_address) identifier_token_address (lambda (lambda_parameters (identifier_channel_state) identifier_channel_state )lambda_parameters (comparison_operator (call (attribute (identifier_channel) identifier_channel (identifier_get_status) identifier_get_status )attribute (argument_list (identifier_channel_state) identifier_channel_state )argument_list )call (identifier_CHANNEL_STATE_SETTLED) identifier_CHANNEL_STATE_SETTLED )comparison_operator )lambda )argument_list )call )return_statement )block )function_definition )module
Return the state of settled channels in a token network.
(module (function_definition (function_name_get) function_name_get (parameters (identifier_self) identifier_self (default_parameter (identifier_do_process_raw_report) identifier_do_process_raw_report (True) True )default_parameter )parameters (block (expression_statement (string_"Read report from device") string_"Read report from device" )expression_statement (assert_statement (parenthesized_expression (call (attribute (attribute (identifier_self) identifier_self (identifier___hid_object) identifier___hid_object )attribute (identifier_is_opened) identifier_is_opened )attribute (argument_list )argument_list )call )parenthesized_expression )assert_statement (if_statement (boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier___report_kind) identifier___report_kind )attribute (identifier_HidP_Input) identifier_HidP_Input )comparison_operator (line_continuation_\) line_continuation_\ (comparison_operator (attribute (identifier_self) identifier_self (identifier___report_kind) identifier___report_kind )attribute (identifier_HidP_Feature) identifier_HidP_Feature )comparison_operator )boolean_operator (block (raise_statement (call (identifier_HIDError) identifier_HIDError (argument_list (string_"Only for input or feature reports") string_"Only for input or feature reports" )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier___alloc_raw_data) identifier___alloc_raw_data )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_raw_data) identifier_raw_data (attribute (identifier_self) identifier_self (identifier___raw_data) identifier___raw_data )attribute )assignment )expression_statement (expression_statement (assignment (subscript (identifier_raw_data) identifier_raw_data (integer_0) integer_0 )subscript (attribute (identifier_self) identifier_self (identifier___report_id) identifier___report_id )attribute )assignment )expression_statement (expression_statement (assignment (identifier_read_function) identifier_read_function (None) None )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier___report_kind) identifier___report_kind )attribute (identifier_HidP_Feature) identifier_HidP_Feature )comparison_operator (block (expression_statement (assignment (identifier_read_function) identifier_read_function (attribute (identifier_hid_dll) identifier_hid_dll (identifier_HidD_GetFeature) identifier_HidD_GetFeature )attribute )assignment )expression_statement )block (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier___report_kind) identifier___report_kind )attribute (identifier_HidP_Input) identifier_HidP_Input )comparison_operator (block (expression_statement (assignment (identifier_read_function) identifier_read_function (attribute (identifier_hid_dll) identifier_hid_dll (identifier_HidD_GetInputReport) identifier_HidD_GetInputReport )attribute )assignment )expression_statement )block )elif_clause )if_statement (if_statement (boolean_operator (identifier_read_function) identifier_read_function (call (identifier_read_function) identifier_read_function (argument_list (call (identifier_int) identifier_int (argument_list (attribute (attribute (identifier_self) identifier_self (identifier___hid_object) identifier___hid_object )attribute (identifier_hid_handle) identifier_hid_handle )attribute )argument_list )call (call (identifier_byref) identifier_byref (argument_list (identifier_raw_data) identifier_raw_data )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_raw_data) identifier_raw_data )argument_list )call )argument_list )call )boolean_operator (block (if_statement (identifier_do_process_raw_report) identifier_do_process_raw_report (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_set_raw_data) identifier_set_raw_data )attribute (argument_list (identifier_raw_data) identifier_raw_data )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier___hid_object) identifier___hid_object )attribute (identifier__process_raw_report) identifier__process_raw_report )attribute (argument_list (identifier_raw_data) identifier_raw_data )argument_list )call )expression_statement )block )if_statement (return_statement (call (attribute (identifier_helpers) identifier_helpers (identifier_ReadOnlyList) identifier_ReadOnlyList )attribute (argument_list (identifier_raw_data) identifier_raw_data )argument_list )call )return_statement )block )if_statement (return_statement (call (attribute (identifier_helpers) identifier_helpers (identifier_ReadOnlyList) identifier_ReadOnlyList )attribute (argument_list (list )list )argument_list )call )return_statement )block )function_definition )module
Read report from device
(module (function_definition (function_name_add_data_file) function_name_add_data_file (parameters (identifier_data_files) identifier_data_files (identifier_target) identifier_target (identifier_source) identifier_source )parameters (block (for_statement (pattern_list (identifier_t) identifier_t (identifier_f) identifier_f )pattern_list (identifier_data_files) identifier_data_files (block (if_statement (comparison_operator (identifier_t) identifier_t (identifier_target) identifier_target )comparison_operator (block (break_statement )break_statement )block )if_statement )block (else_clause (block (expression_statement (call (attribute (identifier_data_files) identifier_data_files (identifier_append) identifier_append )attribute (argument_list (tuple (identifier_target) identifier_target (list )list )tuple )argument_list )call )expression_statement (expression_statement (assignment (identifier_f) identifier_f (subscript (subscript (identifier_data_files) identifier_data_files (unary_operator (integer_1) integer_1 )unary_operator )subscript (integer_1) integer_1 )subscript )assignment )expression_statement )block )else_clause )for_statement (if_statement (comparison_operator (identifier_source) identifier_source (identifier_f) identifier_f )comparison_operator (block (expression_statement (call (attribute (identifier_f) identifier_f (identifier_append) identifier_append )attribute (argument_list (identifier_source) identifier_source )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Add an entry to data_files
(module (function_definition (function_name_output_lines) function_name_output_lines (parameters (identifier_output) identifier_output (default_parameter (identifier_encoding) identifier_encoding (string_'utf-8') string_'utf-8' )default_parameter (default_parameter (identifier_error_exc) identifier_error_exc (None) None )default_parameter )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_output) identifier_output (identifier_ExecResult) identifier_ExecResult )argument_list )call (block (expression_statement (assignment (pattern_list (identifier_exit_code) identifier_exit_code (identifier_output) identifier_output )pattern_list (identifier_output) identifier_output )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_exit_code) identifier_exit_code (integer_0) integer_0 )comparison_operator (comparison_operator (identifier_error_exc) identifier_error_exc (None) None )comparison_operator )boolean_operator (block (raise_statement (call (identifier_error_exc) identifier_error_exc (argument_list (call (attribute (identifier_output) identifier_output (identifier_decode) identifier_decode )attribute (argument_list (identifier_encoding) identifier_encoding )argument_list )call )argument_list )call )raise_statement )block )if_statement )block )if_statement (return_statement (call (attribute (call (attribute (identifier_output) identifier_output (identifier_decode) identifier_decode )attribute (argument_list (identifier_encoding) identifier_encoding )argument_list )call (identifier_splitlines) identifier_splitlines )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Convert bytestring container output or the result of a container exec command into a sequence of unicode lines. :param output: Container output bytes or an :class:`docker.models.containers.ExecResult` instance. :param encoding: The encoding to use when converting bytes to unicode (default ``utf-8``). :param error_exc: Optional exception to raise if ``output`` is an ``ExecResult`` with a nonzero exit code. :returns: list[str]
(module (function_definition (function_name_infect) function_name_infect (parameters (identifier_cls) identifier_cls (identifier_graph) identifier_graph (identifier_key) identifier_key (default_parameter (identifier_default_scope) identifier_default_scope (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_func) identifier_func (call (attribute (identifier_graph) identifier_graph (identifier_factory_for) identifier_factory_for )attribute (argument_list (identifier_key) identifier_key )argument_list )call )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_func) identifier_func (identifier_cls) identifier_cls )argument_list )call (block (expression_statement (assignment (identifier_func) identifier_func (attribute (identifier_func) identifier_func (identifier_func) identifier_func )attribute )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_factory) identifier_factory (call (identifier_cls) identifier_cls (argument_list (identifier_key) identifier_key (identifier_func) identifier_func (identifier_default_scope) identifier_default_scope )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (attribute (identifier_graph) identifier_graph (identifier__registry) identifier__registry )attribute (identifier_factories) identifier_factories )attribute (identifier_key) identifier_key )subscript (identifier_factory) identifier_factory )assignment )expression_statement (return_statement (identifier_factory) identifier_factory )return_statement )block )function_definition )module
Forcibly convert an entry-point based factory to a ScopedFactory. Must be invoked before resolving the entry point. :raises AlreadyBoundError: for non entry-points; these should be declared with @scoped_binding
(module (function_definition (function_name_create_issue) function_name_create_issue (parameters (identifier_self) identifier_self (identifier_title) identifier_title (identifier_body) identifier_body (default_parameter (identifier_labels) identifier_labels (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_kwargs) identifier_kwargs (call (attribute (attribute (identifier_self) identifier_self (identifier_github_request) identifier_github_request )attribute (identifier_create) identifier_create )attribute (argument_list (keyword_argument (identifier_title) identifier_title (identifier_title) identifier_title )keyword_argument (keyword_argument (identifier_body) identifier_body (identifier_body) identifier_body )keyword_argument (keyword_argument (identifier_labels) identifier_labels (identifier_labels) identifier_labels )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (identifier_GithubIssue) identifier_GithubIssue (argument_list (keyword_argument (identifier_github_request) identifier_github_request (attribute (identifier_self) identifier_self (identifier_github_request) identifier_github_request )attribute )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Creates a new issue in Github. :params title: title of the issue to be created :params body: body of the issue to be created :params labels: (optional) list of labels for the issue :returns: newly created issue :rtype: :class:`exreporter.stores.github.GithubIssue`
(module (function_definition (function_name_run_matrix_in_parallel) function_name_run_matrix_in_parallel (parameters (identifier_self) identifier_self (identifier_process_data) identifier_process_data )parameters (block (expression_statement (assignment (identifier_worker_data) identifier_worker_data (list_comprehension (dictionary (pair (string_'matrix') string_'matrix' (identifier_entry) identifier_entry )pair (pair (string_'pipeline') string_'pipeline' (attribute (identifier_process_data) identifier_process_data (identifier_pipeline) identifier_pipeline )attribute )pair (pair (string_'model') string_'model' (attribute (identifier_process_data) identifier_process_data (identifier_model) identifier_model )attribute )pair (pair (string_'options') string_'options' (attribute (identifier_process_data) identifier_process_data (identifier_options) identifier_options )attribute )pair (pair (string_'hooks') string_'hooks' (attribute (identifier_process_data) identifier_process_data (identifier_hooks) identifier_hooks )attribute )pair )dictionary (for_in_clause (identifier_entry) identifier_entry (attribute (identifier_self) identifier_self (identifier_matrix) identifier_matrix )attribute )for_in_clause (if_clause (call (attribute (identifier_Matrix) identifier_Matrix (identifier_can_process_matrix) identifier_can_process_matrix )attribute (argument_list (identifier_entry) identifier_entry (attribute (attribute (identifier_process_data) identifier_process_data (identifier_options) identifier_options )attribute (identifier_matrix_tags) identifier_matrix_tags )attribute )argument_list )call )if_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_output) identifier_output (list )list )assignment )expression_statement (expression_statement (assignment (identifier_success) identifier_success (True) True )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_closing) identifier_closing (argument_list (call (attribute (identifier_multiprocessing) identifier_multiprocessing (identifier_Pool) identifier_Pool )attribute (argument_list (call (attribute (identifier_multiprocessing) identifier_multiprocessing (identifier_cpu_count) identifier_cpu_count )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call (as_pattern_target (identifier_pool) identifier_pool )as_pattern_target )as_pattern )with_item )with_clause (block (for_statement (identifier_result) identifier_result (call (attribute (identifier_pool) identifier_pool (identifier_map) identifier_map )attribute (argument_list (identifier_matrix_worker) identifier_matrix_worker (identifier_worker_data) identifier_worker_data )argument_list )call (block (expression_statement (augmented_assignment (identifier_output) identifier_output (subscript (identifier_result) identifier_result (string_'output') string_'output' )subscript )augmented_assignment )expression_statement (if_statement (not_operator (subscript (identifier_result) identifier_result (string_'success') string_'success' )subscript )not_operator (block (expression_statement (assignment (identifier_success) identifier_success (False) False )assignment )expression_statement )block )if_statement )block )for_statement )block )with_statement (return_statement (dictionary (pair (string_'success') string_'success' (identifier_success) identifier_success )pair (pair (string_'output') string_'output' (identifier_output) identifier_output )pair )dictionary )return_statement )block )function_definition )module
Running pipelines in parallel.
(module (function_definition (function_name_get_namespace_entry) function_name_get_namespace_entry (parameters (identifier_self) identifier_self (typed_parameter (identifier_url) identifier_url (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_name) identifier_name (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (generic_type (identifier_Optional) identifier_Optional (type_parameter (type (identifier_NamespaceEntry) identifier_NamespaceEntry )type )type_parameter )generic_type )type (block (expression_statement (assignment (identifier_entry_filter) identifier_entry_filter (call (identifier_and_) identifier_and_ (argument_list (comparison_operator (attribute (identifier_Namespace) identifier_Namespace (identifier_url) identifier_url )attribute (identifier_url) identifier_url )comparison_operator (comparison_operator (attribute (identifier_NamespaceEntry) identifier_NamespaceEntry (identifier_name) identifier_name )attribute (identifier_name) identifier_name )comparison_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (attribute (call (attribute (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_session) identifier_session )attribute (identifier_query) identifier_query )attribute (argument_list (identifier_NamespaceEntry) identifier_NamespaceEntry )argument_list )call (identifier_join) identifier_join )attribute (argument_list (identifier_Namespace) identifier_Namespace )argument_list )call (identifier_filter) identifier_filter )attribute (argument_list (identifier_entry_filter) identifier_entry_filter )argument_list )call (identifier_all) identifier_all )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (integer_0) integer_0 (call (identifier_len) identifier_len (argument_list (identifier_result) identifier_result )argument_list )call )comparison_operator (block (return_statement )return_statement )block )if_statement (if_statement (comparison_operator (integer_1) integer_1 (call (identifier_len) identifier_len (argument_list (identifier_result) identifier_result )argument_list )call )comparison_operator (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_warning) identifier_warning )attribute (argument_list (string_'result for get_namespace_entry is too long. Returning first of %s') string_'result for get_namespace_entry is too long. Returning first of %s' (list_comprehension (call (identifier_str) identifier_str (argument_list (identifier_r) identifier_r )argument_list )call (for_in_clause (identifier_r) identifier_r (identifier_result) identifier_result )for_in_clause )list_comprehension )argument_list )call )expression_statement )block )if_statement (return_statement (subscript (identifier_result) identifier_result (integer_0) integer_0 )subscript )return_statement )block )function_definition )module
Get a given NamespaceEntry object. :param url: The url of the namespace source :param name: The value of the namespace from the given url's document
(module (function_definition (function_name_load_mmd) function_name_load_mmd (parameters )parameters (block (global_statement (identifier__MMD_LIB) identifier__MMD_LIB )global_statement (global_statement (identifier__LIB_LOCATION) identifier__LIB_LOCATION )global_statement (try_statement (block (expression_statement (assignment (identifier_lib_file) identifier_lib_file (binary_operator (string_'libMultiMarkdown') string_'libMultiMarkdown' (subscript (identifier_SHLIB_EXT) identifier_SHLIB_EXT (call (attribute (identifier_platform) identifier_platform (identifier_system) identifier_system )attribute (argument_list )argument_list )call )subscript )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier__LIB_LOCATION) identifier__LIB_LOCATION (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_abspath) identifier_abspath )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_DEFAULT_LIBRARY_DIR) identifier_DEFAULT_LIBRARY_DIR (identifier_lib_file) identifier_lib_file )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (identifier__LIB_LOCATION) identifier__LIB_LOCATION )argument_list )call )not_operator (block (expression_statement (assignment (identifier__LIB_LOCATION) identifier__LIB_LOCATION (call (attribute (attribute (identifier_ctypes) identifier_ctypes (identifier_util) identifier_util )attribute (identifier_find_library) identifier_find_library )attribute (argument_list (string_'MultiMarkdown') string_'MultiMarkdown' )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier__MMD_LIB) identifier__MMD_LIB (call (attribute (attribute (identifier_ctypes) identifier_ctypes (identifier_cdll) identifier_cdll )attribute (identifier_LoadLibrary) identifier_LoadLibrary )attribute (argument_list (identifier__LIB_LOCATION) identifier__LIB_LOCATION )argument_list )call )assignment )expression_statement )block (except_clause (block (expression_statement (assignment (identifier__MMD_LIB) identifier__MMD_LIB (None) None )assignment )expression_statement )block )except_clause )try_statement )block )function_definition )module
Loads libMultiMarkdown for usage
(module (function_definition (function_name_inference) function_name_inference (parameters (identifier_images) identifier_images (identifier_num_classes) identifier_num_classes (default_parameter (identifier_for_training) identifier_for_training (False) False )default_parameter (default_parameter (identifier_restore_logits) identifier_restore_logits (True) True )default_parameter (default_parameter (identifier_scope) identifier_scope (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_batch_norm_params) identifier_batch_norm_params (dictionary (pair (string_'decay') string_'decay' (identifier_BATCHNORM_MOVING_AVERAGE_DECAY) identifier_BATCHNORM_MOVING_AVERAGE_DECAY )pair (pair (string_'epsilon') string_'epsilon' (float_0.001) float_0.001 )pair )dictionary )assignment )expression_statement (with_statement (with_clause (with_item (call (attribute (identifier_slim) identifier_slim (identifier_arg_scope) identifier_arg_scope )attribute (argument_list (list (attribute (attribute (identifier_slim) identifier_slim (identifier_ops) identifier_ops )attribute (identifier_conv2d) identifier_conv2d )attribute (attribute (attribute (identifier_slim) identifier_slim (identifier_ops) identifier_ops )attribute (identifier_fc) identifier_fc )attribute )list (keyword_argument (identifier_weight_decay) identifier_weight_decay (float_0.00004) float_0.00004 )keyword_argument )argument_list )call )with_item )with_clause (block (with_statement (with_clause (with_item (call (attribute (identifier_slim) identifier_slim (identifier_arg_scope) identifier_arg_scope )attribute (argument_list (list (attribute (attribute (identifier_slim) identifier_slim (identifier_ops) identifier_ops )attribute (identifier_conv2d) identifier_conv2d )attribute )list (keyword_argument (identifier_stddev) identifier_stddev (float_0.1) float_0.1 )keyword_argument (keyword_argument (identifier_activation) identifier_activation (attribute (attribute (identifier_tf) identifier_tf (identifier_nn) identifier_nn )attribute (identifier_relu) identifier_relu )attribute )keyword_argument (keyword_argument (identifier_batch_norm_params) identifier_batch_norm_params (identifier_batch_norm_params) identifier_batch_norm_params )keyword_argument )argument_list )call )with_item )with_clause (block (expression_statement (assignment (pattern_list (identifier_logits) identifier_logits (identifier_endpoints) identifier_endpoints )pattern_list (call (attribute (attribute (identifier_slim) identifier_slim (identifier_inception) identifier_inception )attribute (identifier_inception_v3) identifier_inception_v3 )attribute (argument_list (identifier_images) identifier_images (keyword_argument (identifier_dropout_keep_prob) identifier_dropout_keep_prob (float_0.8) float_0.8 )keyword_argument (keyword_argument (identifier_num_classes) identifier_num_classes (identifier_num_classes) identifier_num_classes )keyword_argument (keyword_argument (identifier_is_training) identifier_is_training (identifier_for_training) identifier_for_training )keyword_argument (keyword_argument (identifier_restore_logits) identifier_restore_logits (identifier_restore_logits) identifier_restore_logits )keyword_argument (keyword_argument (identifier_scope) identifier_scope (identifier_scope) identifier_scope )keyword_argument )argument_list )call )assignment )expression_statement )block )with_statement )block )with_statement (expression_statement (call (identifier__activation_summaries) identifier__activation_summaries (argument_list (identifier_endpoints) identifier_endpoints )argument_list )call )expression_statement (expression_statement (assignment (identifier_auxiliary_logits) identifier_auxiliary_logits (subscript (identifier_endpoints) identifier_endpoints (string_'aux_logits') string_'aux_logits' )subscript )assignment )expression_statement (return_statement (expression_list (identifier_logits) identifier_logits (identifier_auxiliary_logits) identifier_auxiliary_logits )expression_list )return_statement )block )function_definition )module
Build Inception v3 model architecture. See here for reference: http://arxiv.org/abs/1512.00567 Args: images: Images returned from inputs() or distorted_inputs(). num_classes: number of classes for_training: If set to `True`, build the inference model for training. Kernels that operate differently for inference during training e.g. dropout, are appropriately configured. restore_logits: whether or not the logits layers should be restored. Useful for fine-tuning a model with different num_classes. scope: optional prefix string identifying the ImageNet tower. Returns: Logits. 2-D float Tensor. Auxiliary Logits. 2-D float Tensor of side-head. Used for training only.
(module (function_definition (function_name__prepPointsForSegments) function_name__prepPointsForSegments (parameters (identifier_points) identifier_points )parameters (block (while_statement (integer_1) integer_1 (block (expression_statement (assignment (identifier_point) identifier_point (subscript (identifier_points) identifier_points (unary_operator (integer_1) integer_1 )unary_operator )subscript )assignment )expression_statement (if_statement (attribute (identifier_point) identifier_point (identifier_segmentType) identifier_segmentType )attribute (block (break_statement )break_statement )block (else_clause (block (expression_statement (assignment (identifier_point) identifier_point (call (attribute (identifier_points) identifier_points (identifier_pop) identifier_pop )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_points) identifier_points (identifier_insert) identifier_insert )attribute (argument_list (integer_0) integer_0 (identifier_point) identifier_point )argument_list )call )expression_statement (continue_statement )continue_statement )block )else_clause )if_statement (break_statement )break_statement )block )while_statement )block )function_definition )module
Move any off curves at the end of the contour to the beginning of the contour. This makes segmentation easier.
(module (function_definition (function_name_publish_changes) function_name_publish_changes (parameters (identifier_self) identifier_self (identifier_zone) identifier_zone (identifier_changes) identifier_changes )parameters (block (expression_statement (assignment (identifier_zone_id) identifier_zone_id (call (attribute (identifier_self) identifier_self (identifier_get_managed_zone) identifier_get_managed_zone )attribute (argument_list (identifier_zone) identifier_zone )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_url) identifier_url (string_f'{self._base_url}/managedZones/{zone_id}/changes') string_f'{self._base_url}/managedZones/{zone_id}/changes' )assignment )expression_statement (expression_statement (assignment (identifier_resp) identifier_resp (await (call (attribute (identifier_self) identifier_self (identifier_request) identifier_request )attribute (argument_list (string_'post') string_'post' (identifier_url) identifier_url (keyword_argument (identifier_json) identifier_json (identifier_changes) identifier_changes )keyword_argument )argument_list )call )await )assignment )expression_statement (return_statement (subscript (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (identifier_resp) identifier_resp )argument_list )call (string_'id') string_'id' )subscript )return_statement )block )function_definition )module
Post changes to a zone. Args: zone (str): DNS zone of the change. changes (dict): JSON compatible dict of a `Change <https://cloud.google.com/dns/api/v1/changes>`_. Returns: string identifier of the change.
(module (function_definition (function_name__get_main_and_json) function_name__get_main_and_json (parameters (identifier_directory) identifier_directory )parameters (block (expression_statement (assignment (identifier_directory) identifier_directory (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_normpath) identifier_normpath )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_abspath) identifier_abspath )attribute (argument_list (identifier_directory) identifier_directory )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_checker_main) identifier_checker_main (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_normpath) identifier_normpath )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_directory) identifier_directory (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_pardir) identifier_pardir )attribute (string_"checker-workflow-wrapping-tool.cwl") string_"checker-workflow-wrapping-tool.cwl" )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_checker_main) identifier_checker_main (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_checker_main) identifier_checker_main )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_main_cwl) identifier_main_cwl (list (identifier_checker_main) identifier_checker_main )list )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_main_cwl) identifier_main_cwl (call (attribute (identifier_glob) identifier_glob (identifier_glob) identifier_glob )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_directory) identifier_directory (string_"main-*.cwl") string_"main-*.cwl" )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_main_cwl) identifier_main_cwl (list_comprehension (identifier_x) identifier_x (for_in_clause (identifier_x) identifier_x (identifier_main_cwl) identifier_main_cwl )for_in_clause (if_clause (not_operator (comparison_operator (call (attribute (identifier_x) identifier_x (identifier_find) identifier_find )attribute (argument_list (string_"-pack") string_"-pack" )argument_list )call (integer_0) integer_0 )comparison_operator )not_operator )if_clause )list_comprehension )assignment )expression_statement (assert_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_main_cwl) identifier_main_cwl )argument_list )call (integer_1) integer_1 )comparison_operator (binary_operator (string_"Did not find main CWL in %s") string_"Did not find main CWL in %s" (identifier_directory) identifier_directory )binary_operator )assert_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_main_json) identifier_main_json (call (attribute (identifier_glob) identifier_glob (identifier_glob) identifier_glob )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_directory) identifier_directory (string_"main-*-samples.json") string_"main-*-samples.json" )argument_list )call )argument_list )call )assignment )expression_statement (assert_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_main_json) identifier_main_json )argument_list )call (integer_1) integer_1 )comparison_operator (binary_operator (string_"Did not find main json in %s") string_"Did not find main json in %s" (identifier_directory) identifier_directory )binary_operator )assert_statement (expression_statement (assignment (identifier_project_name) identifier_project_name (subscript (call (attribute (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_basename) identifier_basename )attribute (argument_list (identifier_directory) identifier_directory )argument_list )call (identifier_split) identifier_split )attribute (argument_list (string_"-workflow") string_"-workflow" )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (return_statement (expression_list (subscript (identifier_main_cwl) identifier_main_cwl (integer_0) integer_0 )subscript (subscript (identifier_main_json) identifier_main_json (integer_0) integer_0 )subscript (identifier_project_name) identifier_project_name )expression_list )return_statement )block )function_definition )module
Retrieve the main CWL and sample JSON files from a bcbio generated directory.
(module (function_definition (function_name_save) function_name_save (parameters (identifier_name) identifier_name (identifier_data) identifier_data (default_parameter (identifier_rc_file) identifier_rc_file (string_'~/.odoorpcrc') string_'~/.odoorpcrc' )default_parameter )parameters (block (expression_statement (assignment (identifier_conf) identifier_conf (call (identifier_ConfigParser) identifier_ConfigParser (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_conf) identifier_conf (identifier_read) identifier_read )attribute (argument_list (list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_expanduser) identifier_expanduser )attribute (argument_list (identifier_rc_file) identifier_rc_file )argument_list )call )list )argument_list )call )expression_statement (if_statement (not_operator (call (attribute (identifier_conf) identifier_conf (identifier_has_section) identifier_has_section )attribute (argument_list (identifier_name) identifier_name )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_conf) identifier_conf (identifier_add_section) identifier_add_section )attribute (argument_list (identifier_name) identifier_name )argument_list )call )expression_statement )block )if_statement (for_statement (identifier_key) identifier_key (identifier_data) identifier_data (block (expression_statement (assignment (identifier_value) identifier_value (subscript (identifier_data) identifier_data (identifier_key) identifier_key )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_conf) identifier_conf (identifier_set) identifier_set )attribute (argument_list (identifier_name) identifier_name (identifier_key) identifier_key (call (identifier_str) identifier_str (argument_list (identifier_value) identifier_value )argument_list )call )argument_list )call )expression_statement )block )for_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_expanduser) identifier_expanduser )attribute (argument_list (identifier_rc_file) identifier_rc_file )argument_list )call (string_'w') string_'w' )argument_list )call (as_pattern_target (identifier_file_) identifier_file_ )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_chmod) identifier_chmod )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_expanduser) identifier_expanduser )attribute (argument_list (identifier_rc_file) identifier_rc_file )argument_list )call (binary_operator (attribute (identifier_stat) identifier_stat (identifier_S_IREAD) identifier_S_IREAD )attribute (attribute (identifier_stat) identifier_stat (identifier_S_IWRITE) identifier_S_IWRITE )attribute )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_conf) identifier_conf (identifier_write) identifier_write )attribute (argument_list (identifier_file_) identifier_file_ )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Save the `data` session configuration under the name `name` in the `rc_file` file. >>> import odoorpc >>> odoorpc.session.save( ... 'foo', ... {'type': 'ODOO', 'host': 'localhost', 'protocol': 'jsonrpc', ... 'port': 8069, 'timeout': 120, 'database': 'db_name' ... 'user': 'admin', 'passwd': 'password'}) # doctest: +SKIP .. doctest:: :hide: >>> import odoorpc >>> session = '%s_session' % DB >>> odoorpc.session.save( ... session, ... {'type': 'ODOO', 'host': HOST, 'protocol': PROTOCOL, ... 'port': PORT, 'timeout': 120, 'database': DB, ... 'user': USER, 'passwd': PWD})
(module (function_definition (function_name_servers) function_name_servers (parameters (identifier_self) identifier_self (default_parameter (identifier_server) identifier_server (string_'api.telldus.com') string_'api.telldus.com' )default_parameter (default_parameter (identifier_port) identifier_port (attribute (identifier_http) identifier_http (identifier_HTTPS_PORT) identifier_HTTPS_PORT )attribute )default_parameter )parameters (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_debug) identifier_debug )attribute (argument_list (string_"Fetching server list from %s:%d") string_"Fetching server list from %s:%d" (identifier_server) identifier_server (identifier_port) identifier_port )argument_list )call )expression_statement (expression_statement (assignment (identifier_conn) identifier_conn (call (attribute (identifier_http) identifier_http (identifier_HTTPSConnection) identifier_HTTPSConnection )attribute (argument_list (identifier_server) identifier_server (identifier_port) identifier_port (keyword_argument (identifier_context) identifier_context (call (attribute (identifier_self) identifier_self (identifier_ssl_context) identifier_ssl_context )attribute (argument_list )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_conn) identifier_conn (identifier_request) identifier_request )attribute (argument_list (string_'GET') string_'GET' (string_"/server/assign?protocolVersion=2") string_"/server/assign?protocolVersion=2" )argument_list )call )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_conn) identifier_conn (identifier_getresponse) identifier_getresponse )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_response) identifier_response (identifier_status) identifier_status )attribute (attribute (identifier_http) identifier_http (identifier_OK) identifier_OK )attribute )comparison_operator (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (call (attribute (string_"Could not connect to {}:{}: {} {}") string_"Could not connect to {}:{}: {} {}" (identifier_format) identifier_format )attribute (argument_list (identifier_server) identifier_server (identifier_port) identifier_port (attribute (identifier_response) identifier_response (identifier_status) identifier_status )attribute (attribute (identifier_response) identifier_response (identifier_reason) identifier_reason )attribute )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_servers) identifier_servers (list )list )assignment )expression_statement (function_definition (function_name_extract_servers) function_name_extract_servers (parameters (identifier_name) identifier_name (identifier_attributes) identifier_attributes )parameters (block (if_statement (comparison_operator (identifier_name) identifier_name (string_"server") string_"server" )comparison_operator (block (expression_statement (call (attribute (identifier_servers) identifier_servers (identifier_append) identifier_append )attribute (argument_list (tuple (subscript (identifier_attributes) identifier_attributes (string_'address') string_'address' )subscript (call (identifier_int) identifier_int (argument_list (subscript (identifier_attributes) identifier_attributes (string_'port') string_'port' )subscript )argument_list )call )tuple )argument_list )call )expression_statement )block )if_statement )block )function_definition (expression_statement (assignment (identifier_parser) identifier_parser (call (attribute (identifier_expat) identifier_expat (identifier_ParserCreate) identifier_ParserCreate )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_parser) identifier_parser (identifier_StartElementHandler) identifier_StartElementHandler )attribute (identifier_extract_servers) identifier_extract_servers )assignment )expression_statement (expression_statement (call (attribute (identifier_parser) identifier_parser (identifier_ParseFile) identifier_ParseFile )attribute (argument_list (identifier_response) identifier_response )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_debug) identifier_debug )attribute (argument_list (string_"Found %d available servers") string_"Found %d available servers" (call (identifier_len) identifier_len (argument_list (identifier_servers) identifier_servers )argument_list )call )argument_list )call )expression_statement (return_statement (identifier_servers) identifier_servers )return_statement )block )function_definition )module
Fetch list of servers that can be connected to. :return: list of (address, port) tuples
(module (function_definition (function_name_transform_bbox) function_name_transform_bbox (parameters (identifier_bbox) identifier_bbox (identifier_target_crs) identifier_target_crs )parameters (block (expression_statement (call (attribute (identifier_warnings) identifier_warnings (identifier_warn) identifier_warn )attribute (argument_list (string_"This function is deprecated, use BBox.transform method instead") string_"This function is deprecated, use BBox.transform method instead" (identifier_DeprecationWarning) identifier_DeprecationWarning (keyword_argument (identifier_stacklevel) identifier_stacklevel (integer_2) integer_2 )keyword_argument )argument_list )call )expression_statement (return_statement (call (attribute (identifier_bbox) identifier_bbox (identifier_transform) identifier_transform )attribute (argument_list (identifier_target_crs) identifier_target_crs )argument_list )call )return_statement )block )function_definition )module
Maps bbox from current crs to target_crs :param bbox: bounding box :type bbox: geometry.BBox :param target_crs: target CRS :type target_crs: constants.CRS :return: bounding box in target CRS :rtype: geometry.BBox
(module (function_definition (function_name_validate) function_name_validate (parameters (identifier_self) identifier_self )parameters (block (try_statement (block (expression_statement (assignment (identifier_resp) identifier_resp (call (attribute (call (attribute (call (attribute (identifier_self) identifier_self (identifier_request) identifier_request )attribute (argument_list )argument_list )call (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_validate_url) identifier_validate_url )attribute (keyword_argument (identifier_verify) identifier_verify (attribute (identifier_self) identifier_self (identifier_verifySSL) identifier_verifySSL )attribute )keyword_argument )argument_list )call (identifier_json) identifier_json )attribute (argument_list )argument_list )call )assignment )expression_statement )block (except_clause (identifier_TokenExpiredError) identifier_TokenExpiredError (block (return_statement (False) False )return_statement )block )except_clause (except_clause (identifier_AttributeError) identifier_AttributeError (block (return_statement (False) False )return_statement )block )except_clause )try_statement (if_statement (comparison_operator (string_'error') string_'error' (identifier_resp) identifier_resp )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (return_statement (True) True )return_statement )block )function_definition )module
Confirms the current token is still valid. Returns True if it is valid, False otherwise.
(module (function_definition (function_name_reconstruct_files) function_name_reconstruct_files (parameters (identifier_input_dir) identifier_input_dir )parameters (block (expression_statement (assignment (identifier_input_dir) identifier_input_dir (call (attribute (identifier_input_dir) identifier_input_dir (identifier_rstrip) identifier_rstrip )attribute (argument_list (string_'/') string_'/' )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (call (attribute (identifier_nl) identifier_nl (identifier_notify) identifier_notify )attribute (argument_list (string_'Attempting to organize/reconstruct directory') string_'Attempting to organize/reconstruct directory' )argument_list )call )with_item )with_clause (block (for_statement (pattern_list (identifier_r) identifier_r (identifier_ds) identifier_ds (identifier_fs) identifier_fs )pattern_list (call (attribute (identifier_os) identifier_os (identifier_walk) identifier_walk )attribute (argument_list (identifier_input_dir) identifier_input_dir )argument_list )call (block (for_statement (identifier_f) identifier_f (identifier_fs) identifier_fs (block (if_statement (comparison_operator (subscript (identifier_f) identifier_f (integer_0) integer_0 )subscript (string_'.') string_'.' )comparison_operator (block (expression_statement (call (attribute (identifier_shutil) identifier_shutil (identifier_move) identifier_move )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_r) identifier_r (identifier_f) identifier_f )argument_list )call (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_r) identifier_r (binary_operator (string_'i') string_'i' (identifier_f) identifier_f )binary_operator )argument_list )call )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )for_statement (expression_statement (call (attribute (attribute (identifier_nl) identifier_nl (identifier_dicom) identifier_dicom )attribute (identifier_organize_dir) identifier_organize_dir )attribute (argument_list (identifier_input_dir) identifier_input_dir )argument_list )call )expression_statement (expression_statement (assignment (identifier_output_dir) identifier_output_dir (binary_operator (string_'%s-sorted') string_'%s-sorted' (identifier_input_dir) identifier_input_dir )binary_operator )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_output_dir) identifier_output_dir )argument_list )call (block (with_statement (with_clause (with_item (call (attribute (identifier_nl) identifier_nl (identifier_run_in) identifier_run_in )attribute (argument_list (identifier_output_dir) identifier_output_dir )argument_list )call )with_item )with_clause (block (for_statement (identifier_dset_dir) identifier_dset_dir (call (attribute (identifier_os) identifier_os (identifier_listdir) identifier_listdir )attribute (argument_list (string_'.') string_'.' )argument_list )call (block (with_statement (with_clause (with_item (call (attribute (identifier_nl) identifier_nl (identifier_notify) identifier_notify )attribute (argument_list (binary_operator (string_'creating dataset from %s') string_'creating dataset from %s' (identifier_dset_dir) identifier_dset_dir )binary_operator )argument_list )call )with_item )with_clause (block (expression_statement (call (attribute (attribute (identifier_nl) identifier_nl (identifier_dicom) identifier_dicom )attribute (identifier_create_dset) identifier_create_dset )attribute (argument_list (identifier_dset_dir) identifier_dset_dir )argument_list )call )expression_statement )block )with_statement )block )for_statement )block )with_statement )block (else_clause (block (expression_statement (call (attribute (identifier_nl) identifier_nl (identifier_notify) identifier_notify )attribute (argument_list (binary_operator (string_'Warning: failed to auto-organize directory %s') string_'Warning: failed to auto-organize directory %s' (identifier_input_dir) identifier_input_dir )binary_operator (keyword_argument (identifier_level) identifier_level (attribute (attribute (identifier_nl) identifier_nl (identifier_level) identifier_level )attribute (identifier_warning) identifier_warning )attribute )keyword_argument )argument_list )call )expression_statement )block )else_clause )if_statement )block )with_statement )block )function_definition )module
sorts ``input_dir`` and tries to reconstruct the subdirectories found
(module (function_definition (function_name__pwl1_to_poly) function_name__pwl1_to_poly (parameters (identifier_self) identifier_self (identifier_generators) identifier_generators )parameters (block (for_statement (identifier_g) identifier_g (identifier_generators) identifier_generators (block (if_statement (boolean_operator (parenthesized_expression (comparison_operator (attribute (identifier_g) identifier_g (identifier_pcost_model) identifier_pcost_model )attribute (identifier_PW_LINEAR) identifier_PW_LINEAR )comparison_operator )parenthesized_expression (parenthesized_expression (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_g) identifier_g (identifier_p_cost) identifier_p_cost )attribute )argument_list )call (integer_2) integer_2 )comparison_operator )parenthesized_expression )boolean_operator (block (expression_statement (call (attribute (identifier_g) identifier_g (identifier_pwl_to_poly) identifier_pwl_to_poly )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_generators) identifier_generators )return_statement )block )function_definition )module
Converts single-block piecewise-linear costs into linear polynomial.
(module (function_definition (function_name_unpack_classical_reg) function_name_unpack_classical_reg (parameters (identifier_c) identifier_c )parameters (block (if_statement (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_c) identifier_c (identifier_list) identifier_list )argument_list )call (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_c) identifier_c (identifier_tuple) identifier_tuple )argument_list )call )boolean_operator (block (if_statement (boolean_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_c) identifier_c )argument_list )call (integer_2) integer_2 )comparison_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_c) identifier_c )argument_list )call (integer_0) integer_0 )comparison_operator )boolean_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"if c is a list/tuple, it should be of length <= 2") string_"if c is a list/tuple, it should be of length <= 2" )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_c) identifier_c )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_c) identifier_c (tuple (subscript (identifier_c) identifier_c (integer_0) integer_0 )subscript (integer_0) integer_0 )tuple )assignment )expression_statement )block )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (subscript (identifier_c) identifier_c (integer_0) integer_0 )subscript (identifier_str) identifier_str )argument_list )call )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"if c is a list/tuple, its first member should be a string") string_"if c is a list/tuple, its first member should be a string" )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (subscript (identifier_c) identifier_c (integer_1) integer_1 )subscript (identifier_int) identifier_int )argument_list )call )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"if c is a list/tuple, its second member should be an int") string_"if c is a list/tuple, its second member should be an int" )argument_list )call )raise_statement )block )if_statement (return_statement (call (identifier_MemoryReference) identifier_MemoryReference (argument_list (subscript (identifier_c) identifier_c (integer_0) integer_0 )subscript (subscript (identifier_c) identifier_c (integer_1) integer_1 )subscript )argument_list )call )return_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_c) identifier_c (identifier_MemoryReference) identifier_MemoryReference )argument_list )call (block (return_statement (identifier_c) identifier_c )return_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_c) identifier_c (identifier_str) identifier_str )argument_list )call (block (return_statement (call (identifier_MemoryReference) identifier_MemoryReference (argument_list (identifier_c) identifier_c (integer_0) integer_0 )argument_list )call )return_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"c should be a list of length 2, a pair, a string, or a MemoryReference") string_"c should be a list of length 2, a pair, a string, or a MemoryReference" )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Get the address for a classical register. :param c: A list of length 2, a pair, a string (to be interpreted as name[0]), or a MemoryReference. :return: The address as a MemoryReference.
(module (function_definition (function_name_configfile_from_path) function_name_configfile_from_path (parameters (identifier_path) identifier_path (default_parameter (identifier_strict) identifier_strict (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_extension) identifier_extension (subscript (call (attribute (identifier_path) identifier_path (identifier_split) identifier_split )attribute (argument_list (string_'.') string_'.' )argument_list )call (unary_operator (integer_1) integer_1 )unary_operator )subscript )assignment )expression_statement (expression_statement (assignment (identifier_conf_type) identifier_conf_type (call (attribute (identifier_FILE_TYPES) identifier_FILE_TYPES (identifier_get) identifier_get )attribute (argument_list (identifier_extension) identifier_extension )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_conf_type) identifier_conf_type )not_operator (block (raise_statement (call (attribute (identifier_exc) identifier_exc (identifier_UnrecognizedFileExtension) identifier_UnrecognizedFileExtension )attribute (argument_list (call (attribute (string_"Cannot parse file of type {0}. Choices are {1}.") string_"Cannot parse file of type {0}. Choices are {1}." (identifier_format) identifier_format )attribute (argument_list (identifier_extension) identifier_extension (call (attribute (identifier_FILE_TYPES) identifier_FILE_TYPES (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call )raise_statement )block )if_statement (return_statement (call (identifier_conf_type) identifier_conf_type (argument_list (keyword_argument (identifier_path) identifier_path (identifier_path) identifier_path )keyword_argument (keyword_argument (identifier_strict) identifier_strict (identifier_strict) identifier_strict )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Get a ConfigFile object based on a file path. This method will inspect the file extension and return the appropriate ConfigFile subclass initialized with the given path. Args: path (str): The file path which represents the configuration file. strict (bool): Whether or not to parse the file in strict mode. Returns: confpy.loaders.base.ConfigurationFile: The subclass which is specialized for the given file path. Raises: UnrecognizedFileExtension: If there is no loader for the path.
(module (function_definition (function_name_getComponentName) function_name_getComponentName (parameters (identifier_self) identifier_self (identifier_pchRenderModelName) identifier_pchRenderModelName (identifier_unComponentIndex) identifier_unComponentIndex (identifier_pchComponentName) identifier_pchComponentName (identifier_unComponentNameLen) identifier_unComponentNameLen )parameters (block (expression_statement (assignment (identifier_fn) identifier_fn (attribute (attribute (identifier_self) identifier_self (identifier_function_table) identifier_function_table )attribute (identifier_getComponentName) identifier_getComponentName )attribute )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (identifier_fn) identifier_fn (argument_list (identifier_pchRenderModelName) identifier_pchRenderModelName (identifier_unComponentIndex) identifier_unComponentIndex (identifier_pchComponentName) identifier_pchComponentName (identifier_unComponentNameLen) identifier_unComponentNameLen )argument_list )call )assignment )expression_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Use this to get the names of available components. Index does not correlate to a tracked device index, but is only used for iterating over all available components. If the index is out of range, this function will return 0. Otherwise, it will return the size of the buffer required for the name.
(module (function_definition (function_name_parse_args) function_name_parse_args (parameters (identifier_self) identifier_self (default_parameter (identifier_args) identifier_args (None) None )default_parameter (default_parameter (identifier_namespace) identifier_namespace (None) None )default_parameter )parameters (block (assert_statement (attribute (identifier_self) identifier_self (identifier_initialized) identifier_initialized )attribute (string_'`init` must be called before `parse_args`.') string_'`init` must be called before `parse_args`.' )assert_statement (expression_statement (assignment (identifier_namespace) identifier_namespace (call (attribute (attribute (identifier_self) identifier_self (identifier_parser) identifier_parser )attribute (identifier_parse_args) identifier_parse_args )attribute (argument_list (identifier_args) identifier_args (identifier_namespace) identifier_namespace )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_handler) identifier_handler (call (attribute (identifier_self) identifier_self (identifier__get_handler) identifier__get_handler )attribute (argument_list (identifier_namespace) identifier_namespace (keyword_argument (identifier_remove_handler) identifier_remove_handler (True) True )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (identifier_handler) identifier_handler (block (return_statement (call (identifier_handler) identifier_handler (argument_list (dictionary_splat (call (identifier_vars) identifier_vars (argument_list (identifier_namespace) identifier_namespace )argument_list )call )dictionary_splat )argument_list )call )return_statement )block )if_statement )block )function_definition )module
Parse the command-line arguments and call the associated handler. The signature is the same as `argparse.ArgumentParser.parse_args <https://docs.python.org/2/library/argparse.html#argparse.ArgumentParser.parse_args>`_. Args ---- args : list A list of argument strings. If ``None`` the list is taken from ``sys.argv``. namespace : argparse.Namespace A Namespace instance. Defaults to a new empty Namespace. Returns ------- The return value of the handler called with the populated Namespace as kwargs.
(module (function_definition (function_name_ground_height) function_name_ground_height (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_lat) identifier_lat (subscript (subscript (subscript (attribute (identifier_self) identifier_self (identifier_pkt) identifier_pkt )attribute (string_'I105') string_'I105' )subscript (string_'Lat') string_'Lat' )subscript (string_'val') string_'val' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_lon) identifier_lon (subscript (subscript (subscript (attribute (identifier_self) identifier_self (identifier_pkt) identifier_pkt )attribute (string_'I105') string_'I105' )subscript (string_'Lon') string_'Lon' )subscript (string_'val') string_'val' )subscript )assignment )expression_statement (global_statement (identifier_ElevationMap) identifier_ElevationMap )global_statement (expression_statement (assignment (identifier_ret) identifier_ret (call (attribute (identifier_ElevationMap) identifier_ElevationMap (identifier_GetElevation) identifier_GetElevation )attribute (argument_list (identifier_lat) identifier_lat (identifier_lon) identifier_lon )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_ret) identifier_ret (attribute (identifier_gen_settings) identifier_gen_settings (identifier_wgs84_to_AMSL) identifier_wgs84_to_AMSL )attribute )augmented_assignment )expression_statement (return_statement (binary_operator (identifier_ret) identifier_ret (float_3.2807) float_3.2807 )binary_operator )return_statement )block )function_definition )module
return height above ground in feet
(module (function_definition (function_name_filter_line) function_name_filter_line (parameters (typed_parameter (identifier_line) identifier_line (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_context) identifier_context (type (identifier_RunContext) identifier_RunContext )type )typed_parameter )parameters (type (subscript (attribute (identifier_typing) identifier_typing (identifier_Optional) identifier_Optional )attribute (identifier_str) identifier_str )subscript )type (block (if_statement (comparison_operator (attribute (identifier_context) identifier_context (identifier_filters) identifier_filters )attribute (None) None )comparison_operator (block (for_statement (identifier_filter_) identifier_filter_ (attribute (identifier_context) identifier_context (identifier_filters) identifier_filters )attribute (block (if_statement (call (attribute (identifier_re) identifier_re (identifier_match) identifier_match )attribute (argument_list (identifier_filter_) identifier_filter_ (identifier_line) identifier_line )argument_list )call (block (return_statement (None) None )return_statement )block )if_statement )block )for_statement )block )if_statement (return_statement (identifier_line) identifier_line )return_statement )block )function_definition )module
Filters out lines that match a given regex :param line: line to filter :type line: str :param context: run context :type context: _RunContext :return: line if it doesn't match the filter :rtype: optional str
(module (function_definition (function_name__update_pi_vars) function_name__update_pi_vars (parameters (identifier_self) identifier_self )parameters (block (with_statement (with_clause (with_item (call (attribute (identifier_scipy) identifier_scipy (identifier_errstate) identifier_errstate )attribute (argument_list (keyword_argument (identifier_divide) identifier_divide (string_'raise') string_'raise' )keyword_argument (keyword_argument (identifier_under) identifier_under (string_'raise') string_'raise' )keyword_argument (keyword_argument (identifier_over) identifier_over (string_'raise') string_'raise' )keyword_argument (keyword_argument (identifier_invalid) identifier_invalid (string_'raise') string_'raise' )keyword_argument )argument_list )call )with_item )with_clause (block (for_statement (identifier_r) identifier_r (call (identifier_range) identifier_range (argument_list (attribute (identifier_self) identifier_self (identifier_nsites) identifier_nsites )attribute )argument_list )call (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_pi_codon) identifier_pi_codon )attribute (identifier_r) identifier_r )subscript (subscript (subscript (attribute (identifier_self) identifier_self (identifier_pi) identifier_pi )attribute (identifier_r) identifier_r )subscript (identifier_CODON_TO_AA) identifier_CODON_TO_AA )subscript )assignment )expression_statement (expression_statement (assignment (identifier_pim) identifier_pim (call (attribute (identifier_scipy) identifier_scipy (identifier_tile) identifier_tile )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_pi_codon) identifier_pi_codon )attribute (identifier_r) identifier_r )subscript (tuple (identifier_N_CODON) identifier_N_CODON (integer_1) integer_1 )tuple )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_piAx_piAy) identifier_piAx_piAy )attribute (identifier_r) identifier_r )subscript (binary_operator (call (attribute (identifier_pim) identifier_pim (identifier_transpose) identifier_transpose )attribute (argument_list )argument_list )call (identifier_pim) identifier_pim )binary_operator )assignment )expression_statement )block )for_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_ln_pi_codon) identifier_ln_pi_codon )attribute (call (attribute (identifier_scipy) identifier_scipy (identifier_log) identifier_log )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_pi_codon) identifier_pi_codon )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_piAx_piAy_beta) identifier_piAx_piAy_beta )attribute (binary_operator (attribute (identifier_self) identifier_self (identifier_piAx_piAy) identifier_piAx_piAy )attribute (attribute (identifier_self) identifier_self (identifier_beta) identifier_beta )attribute )binary_operator )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_ln_piAx_piAy_beta) identifier_ln_piAx_piAy_beta )attribute (call (attribute (identifier_scipy) identifier_scipy (identifier_log) identifier_log )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_piAx_piAy_beta) identifier_piAx_piAy_beta )attribute )argument_list )call )assignment )expression_statement )block )with_statement )block )function_definition )module
Update variables that depend on `pi`. These are `pi_codon`, `ln_pi_codon`, `piAx_piAy`, `piAx_piAy_beta`, `ln_piAx_piAy_beta`. Update using current `pi` and `beta`.
(module (function_definition (function_name_gopro_get_request_send) function_name_gopro_get_request_send (parameters (identifier_self) identifier_self (identifier_target_system) identifier_target_system (identifier_target_component) identifier_target_component (identifier_cmd_id) identifier_cmd_id (default_parameter (identifier_force_mavlink1) identifier_force_mavlink1 (False) False )default_parameter )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_send) identifier_send )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_gopro_get_request_encode) identifier_gopro_get_request_encode )attribute (argument_list (identifier_target_system) identifier_target_system (identifier_target_component) identifier_target_component (identifier_cmd_id) identifier_cmd_id )argument_list )call (keyword_argument (identifier_force_mavlink1) identifier_force_mavlink1 (identifier_force_mavlink1) identifier_force_mavlink1 )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Request a GOPRO_COMMAND response from the GoPro target_system : System ID (uint8_t) target_component : Component ID (uint8_t) cmd_id : Command ID (uint8_t)
(module (function_definition (function_name_count_nonzero) function_name_count_nonzero (parameters (identifier_data) identifier_data (default_parameter (identifier_mapper) identifier_mapper (None) None )default_parameter (default_parameter (identifier_blen) identifier_blen (None) None )default_parameter (default_parameter (identifier_storage) identifier_storage (None) None )default_parameter (default_parameter (identifier_create) identifier_create (string_'array') string_'array' )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (return_statement (call (identifier_reduce_axis) identifier_reduce_axis (argument_list (identifier_data) identifier_data (keyword_argument (identifier_reducer) identifier_reducer (attribute (identifier_np) identifier_np (identifier_count_nonzero) identifier_count_nonzero )attribute )keyword_argument (keyword_argument (identifier_block_reducer) identifier_block_reducer (attribute (identifier_np) identifier_np (identifier_add) identifier_add )attribute )keyword_argument (keyword_argument (identifier_mapper) identifier_mapper (identifier_mapper) identifier_mapper )keyword_argument (keyword_argument (identifier_blen) identifier_blen (identifier_blen) identifier_blen )keyword_argument (keyword_argument (identifier_storage) identifier_storage (identifier_storage) identifier_storage )keyword_argument (keyword_argument (identifier_create) identifier_create (identifier_create) identifier_create )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Count the number of non-zero elements.
(module (function_definition (function_name__load_all_nodes) function_name__load_all_nodes (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_get_all_nodes_information) identifier_get_all_nodes_information (call (identifier_GetAllNodesInformation) identifier_GetAllNodesInformation (argument_list (keyword_argument (identifier_pyvlx) identifier_pyvlx (attribute (identifier_self) identifier_self (identifier_pyvlx) identifier_pyvlx )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (await (call (attribute (identifier_get_all_nodes_information) identifier_get_all_nodes_information (identifier_do_api_call) identifier_do_api_call )attribute (argument_list )argument_list )call )await )expression_statement (if_statement (not_operator (attribute (identifier_get_all_nodes_information) identifier_get_all_nodes_information (identifier_success) identifier_success )attribute )not_operator (block (raise_statement (call (identifier_PyVLXException) identifier_PyVLXException (argument_list (string_"Unable to retrieve node information") string_"Unable to retrieve node information" )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_clear) identifier_clear )attribute (argument_list )argument_list )call )expression_statement (for_statement (identifier_notification_frame) identifier_notification_frame (attribute (identifier_get_all_nodes_information) identifier_get_all_nodes_information (identifier_notification_frames) identifier_notification_frames )attribute (block (expression_statement (assignment (identifier_node) identifier_node (call (identifier_convert_frame_to_node) identifier_convert_frame_to_node (argument_list (attribute (identifier_self) identifier_self (identifier_pyvlx) identifier_pyvlx )attribute (identifier_notification_frame) identifier_notification_frame )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_node) identifier_node (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add) identifier_add )attribute (argument_list (identifier_node) identifier_node )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Load all nodes via API.
(module (function_definition (function_name_cylindrical) function_name_cylindrical (parameters (identifier_cls) identifier_cls (identifier_mag) identifier_mag (identifier_theta) identifier_theta (default_parameter (identifier_z) identifier_z (integer_0) integer_0 )default_parameter )parameters (block (return_statement (call (identifier_cls) identifier_cls (argument_list (binary_operator (identifier_mag) identifier_mag (call (attribute (identifier_math) identifier_math (identifier_cos) identifier_cos )attribute (argument_list (identifier_theta) identifier_theta )argument_list )call )binary_operator (binary_operator (identifier_mag) identifier_mag (call (attribute (identifier_math) identifier_math (identifier_sin) identifier_sin )attribute (argument_list (identifier_theta) identifier_theta )argument_list )call )binary_operator (identifier_z) identifier_z )argument_list )call )return_statement )block )function_definition )module
Returns a Vector instance from cylindircal coordinates
(module (function_definition (function_name_delete_pairwise) function_name_delete_pairwise (parameters (identifier_self) identifier_self (typed_parameter (identifier_their_did) identifier_their_did (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (None) None )type (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_debug) identifier_debug )attribute (argument_list (string_'Wallet.delete_pairwise >>> their_did: %s') string_'Wallet.delete_pairwise >>> their_did: %s' (identifier_their_did) identifier_their_did )argument_list )call )expression_statement (if_statement (not_operator (call (identifier_ok_did) identifier_ok_did (argument_list (identifier_their_did) identifier_their_did )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_debug) identifier_debug )attribute (argument_list (string_'Wallet.delete_pairwise <!< Bad DID %s') string_'Wallet.delete_pairwise <!< Bad DID %s' (identifier_their_did) identifier_their_did )argument_list )call )expression_statement (raise_statement (call (identifier_BadIdentifier) identifier_BadIdentifier (argument_list (call (attribute (string_'Bad DID {}') string_'Bad DID {}' (identifier_format) identifier_format )attribute (argument_list (identifier_their_did) identifier_their_did )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (await (call (attribute (identifier_self) identifier_self (identifier_delete_non_secret) identifier_delete_non_secret )attribute (argument_list (identifier_TYPE_PAIRWISE) identifier_TYPE_PAIRWISE (identifier_their_did) identifier_their_did )argument_list )call )await )expression_statement (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_debug) identifier_debug )attribute (argument_list (string_'Wallet.delete_pairwise <<<') string_'Wallet.delete_pairwise <<<' )argument_list )call )expression_statement )block )function_definition )module
Remove a pairwise DID record by its remote DID. Silently return if no such record is present. Raise WalletState for closed wallet, or BadIdentifier for invalid pairwise DID. :param their_did: remote DID marking pairwise DID to remove
(module (function_definition (function_name_send_message) function_name_send_message (parameters (identifier_self) identifier_self (identifier_message) identifier_message )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__state) identifier__state )attribute (identifier_STATE_DISCONNECTED) identifier_STATE_DISCONNECTED )comparison_operator (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (string_"WAMP is currently disconnected!") string_"WAMP is currently disconnected!" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_message) identifier_message (call (attribute (identifier_message) identifier_message (identifier_as_str) identifier_as_str )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_"SND>: {}") string_"SND>: {}" (identifier_format) identifier_format )attribute (argument_list (identifier_message) identifier_message )argument_list )call )argument_list )call )expression_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_ws) identifier_ws )attribute )not_operator (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (string_"WAMP is currently disconnected!") string_"WAMP is currently disconnected!" )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_ws) identifier_ws )attribute (identifier_send) identifier_send )attribute (argument_list (identifier_message) identifier_message )argument_list )call )expression_statement )block )function_definition )module
Send awamp message to the server. We don't wait for a response here. Just fire out a message
(module (function_definition (function_name_freeze) function_name_freeze (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_value) identifier_value )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_value) identifier_value )attribute (string_"") string_"" )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_dialect) identifier_dialect )attribute (list (identifier_DIALECT_ALTREE) identifier_DIALECT_ALTREE )list )comparison_operator (block (expression_statement (assignment (identifier_name_tuple) identifier_name_tuple (call (identifier_parse_name_altree) identifier_parse_name_altree (argument_list (identifier_self) identifier_self )argument_list )call )assignment )expression_statement )block (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier_dialect) identifier_dialect )attribute (list (identifier_DIALECT_MYHERITAGE) identifier_DIALECT_MYHERITAGE )list )comparison_operator (block (expression_statement (assignment (identifier_name_tuple) identifier_name_tuple (call (identifier_parse_name_myher) identifier_parse_name_myher (argument_list (identifier_self) identifier_self )argument_list )call )assignment )expression_statement )block )elif_clause (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier_dialect) identifier_dialect )attribute (list (identifier_DIALECT_ANCESTRIS) identifier_DIALECT_ANCESTRIS )list )comparison_operator (block (expression_statement (assignment (identifier_name_tuple) identifier_name_tuple (call (identifier_parse_name_ancestris) identifier_parse_name_ancestris (argument_list (identifier_self) identifier_self )argument_list )call )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_name_tuple) identifier_name_tuple (call (identifier_split_name) identifier_split_name (argument_list (attribute (identifier_self) identifier_self (identifier_value) identifier_value )attribute )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_value) identifier_value )attribute (identifier_name_tuple) identifier_name_tuple )assignment )expression_statement (return_statement (identifier_self) identifier_self )return_statement )block )function_definition )module
Method called by parser when updates to this record finish. :return: self