idx int64 0 251k | question stringlengths 53 3.53k | target stringlengths 5 1.23k | len_question int64 20 893 | len_target int64 3 238 |
|---|---|---|---|---|
13,500 | def url ( request , json_list , nested , url_name = 'show_{}' , ignore_get = None ) : if not ignore_get : ignore_get = [ ] if isinstance ( url_name , str ) : url_string = str ( url_name ) url_name = lambda x : url_string . format ( x ) urls = cache . get ( 'proso_urls' ) if urls is None : urls = { } else : urls = json_lib . loads ( urls ) cache_updated = False pass_string = pass_get_parameters_string ( request , ignore_get ) for json in json_list : if 'object_type' not in json or 'id' not in json : continue key = 'show_%s_%s' % ( json [ 'object_type' ] , json [ 'id' ] ) if key in urls : json [ 'url' ] = urls [ key ] else : cache_updated = True json [ 'url' ] = reverse ( url_name ( json [ 'object_type' ] ) , kwargs = { 'id' : json [ 'id' ] } ) urls [ key ] = json [ 'url' ] json [ 'url' ] = append_get_parameters ( json [ 'url' ] , pass_string ) if cache_updated : cache . set ( 'proso_urls' , json_lib . dumps ( urls ) , CACHE_EXPIRATION ) | Enrich the given list of objects so they have URL . | 331 | 12 |
13,501 | def sub_state_by_gene_name ( self , * gene_names : str ) -> 'State' : return State ( { gene : state for gene , state in self . items ( ) if gene . name in gene_names } ) | Create a sub state with only the gene passed in arguments . | 53 | 12 |
13,502 | def combine_events_to_queries ( _mongo_events ) : queries = { } # map on the request_id for event in _mongo_events : if event . request_id not in queries : try : connection = ProfilingQueryConnection ( * event . connection_id ) except NameError : connection = event . connection_id queries [ event . request_id ] = dict ( # all event types have this command_name = event . command_name , # Unpack host, connection = connection , operation_id = event . operation_id , ) if isinstance ( event , pymongo . monitoring . CommandStartedEvent ) : queries [ event . request_id ] . update ( command = sanitize_dict ( event . command . to_dict ( ) ) , database_name = event . database_name , ) elif isinstance ( event , pymongo . monitoring . CommandSucceededEvent ) : queries [ event . request_id ] . update ( duration = event . duration_micros / 1000 ) elif isinstance ( event , pymongo . monitoring . CommandFailedEvent ) : queries [ event . request_id ] . update ( failure = sanitize_dict ( event . failure ) , duration = event . duration_micros / 1000 , ) return queries . values ( ) | Combines pymongo . monitoring events to queries . | 284 | 11 |
13,503 | def lograptor ( files , patterns = None , matcher = 'ruled' , cfgfiles = None , apps = None , hosts = None , filters = None , time_period = None , time_range = None , case = False , invert = False , word = False , files_with_match = None , count = False , quiet = False , max_count = 0 , only_matching = False , line_number = False , with_filename = None , ip_lookup = False , uid_lookup = False , anonymize = False , thread = False , before_context = 0 , after_context = 0 , context = 0 ) : cli_parser = create_argument_parser ( ) args = cli_parser . parse_args ( ) args . files = files args . matcher = matcher args . cfgfiles = cfgfiles args . time_period = time_period args . time_range = time_range args . case = case args . invert = invert args . word = word args . files_with_match = files_with_match args . count = count args . quiet = quiet args . max_count = max_count args . only_matching = only_matching args . line_number = line_number args . with_filename = with_filename args . anonymize = anonymize args . ip_lookup = ip_lookup args . uid_lookup = uid_lookup args . thread = thread args . context = context args . after_context = after_context args . before_context = before_context args . patterns = [ '' ] if patterns is None else patterns if apps is not None : args . apps = apps if hosts is not None : args . hosts = hosts if filters is not None : args . filters = filters _lograptor = LogRaptor ( args ) return _lograptor ( ) | Run lograptor with arguments . Experimental feature to use the log processor into generic Python scripts . This part is still under development do not use . | 412 | 30 |
13,504 | def generate_config ( conf ) : c = { } def to_key ( key , default ) : if conf . get ( key ) : c [ key ] = '{} = {}' . format ( key , conf . get ( key ) ) else : c [ key ] = default to_key ( 'username' , '# username = u1234...' ) to_key ( 'password' , '# password = secret...' ) to_key ( 'from' , '# from = elkme' ) to_key ( 'to' , '# to = +46700000000' ) return ( True , c ) | Generates a configuration file using the ConfigParser library that can be saved to a file for subsequent reads | 135 | 20 |
13,505 | def retrieve_xml ( pdb_id , silent = True ) : xml_gz = retrieve_file_from_RCSB ( get_rcsb_files_connection ( ) , "/download/%s.xml.gz" % pdb_id , silent = silent ) cf = StringIO . StringIO ( ) cf . write ( xml_gz ) cf . seek ( 0 ) df = gzip . GzipFile ( fileobj = cf , mode = 'rb' ) contents = df . read ( ) df . close ( ) return contents | The RCSB website now compresses XML files . | 116 | 11 |
13,506 | def mail_logger ( app , level = None ) : credentials = None if app . config [ 'MAIL_USERNAME' ] and app . config [ 'MAIL_PASSWORD' ] : credentials = ( app . config [ 'MAIL_USERNAME' ] , app . config [ 'MAIL_PASSWORD' ] ) secure = None if app . config [ 'MAIL_USE_TLS' ] : secure = tuple ( ) # @todo: move to configuration config = dict ( mailhost = ( app . config [ 'MAIL_SERVER' ] , app . config [ 'MAIL_PORT' ] ) , fromaddr = app . config [ 'MAIL_DEFAULT_SENDER' ] , toaddrs = app . config [ 'ADMINS' ] , credentials = credentials , subject = 'Application exception' , secure = secure , timeout = 1.0 ) mail_handler = SMTPHandler ( * * config ) if level is None : level = logging . ERROR mail_handler . setLevel ( level ) mail_log_format = ''' Message type: %(levelname)s Location: %(pathname)s:%(lineno)d Module: %(module)s Function: %(funcName)s Time: %(asctime)s Message: %(message)s ''' mail_handler . setFormatter ( logging . Formatter ( mail_log_format ) ) return mail_handler | Get mail logger Returns configured instance of mail logger ready to be attached to app . | 316 | 16 |
13,507 | def dual_use_decorator ( fn ) : @ functools . wraps ( fn ) def decorator ( * args , * * kw ) : if len ( args ) == 1 and not kw and callable ( args [ 0 ] ) : return fn ( ) ( args [ 0 ] ) else : return fn ( * args , * * kw ) return decorator | Turn a function into a decorator that can be called with or without arguments . | 81 | 16 |
13,508 | def get_args ( obj ) : if inspect . isfunction ( obj ) : return inspect . getargspec ( obj ) . args elif inspect . ismethod ( obj ) : return inspect . getargspec ( obj ) . args [ 1 : ] elif inspect . isclass ( obj ) : return inspect . getargspec ( obj . __init__ ) . args [ 1 : ] elif hasattr ( obj , '__call__' ) : return inspect . getargspec ( obj . __call__ ) . args [ 1 : ] else : raise TypeError ( "Can't inspect signature of '%s' object." % obj ) | Get a list of argument names for a callable . | 136 | 11 |
13,509 | def apply_ctx ( fn , ctx ) : if 'ctx' in get_args ( fn ) : return functools . partial ( fn , ctx = ctx ) else : return fn | Return fn with ctx partially applied if requested . | 42 | 10 |
13,510 | def log_exception ( exc_info = None , stream = None ) : exc_info = exc_info or sys . exc_info ( ) stream = stream or sys . stderr try : from traceback import print_exception print_exception ( exc_info [ 0 ] , exc_info [ 1 ] , exc_info [ 2 ] , None , stream ) stream . flush ( ) finally : exc_info = None | Log the exc_info tuple in the server log . | 93 | 11 |
13,511 | def _create_get_request ( self , resource , billomat_id = '' , command = None , params = None ) : if not params : params = { } if not command : command = '' else : command = '/' + command assert ( isinstance ( resource , str ) ) if billomat_id : assert ( isinstance ( billomat_id , int ) or isinstance ( billomat_id , str ) ) if isinstance ( billomat_id , int ) : billomat_id = str ( billomat_id ) response = self . session . get ( url = self . api_url + resource + ( '/' + billomat_id if billomat_id else '' ) + command , params = params , ) return self . _handle_response ( response ) | Creates a get request and return the response data | 176 | 10 |
13,512 | def _create_put_request ( self , resource , billomat_id , command = None , send_data = None ) : assert ( isinstance ( resource , str ) ) if isinstance ( billomat_id , int ) : billomat_id = str ( billomat_id ) if not command : command = '' else : command = '/' + command response = self . session . put ( url = self . api_url + resource + '/' + billomat_id + command , data = json . dumps ( send_data ) , ) return self . _handle_response ( response ) | Creates a put request and return the response data | 132 | 10 |
13,513 | def _create_delete_request ( self , resource , billomat_id ) : assert ( isinstance ( resource , str ) ) if isinstance ( billomat_id , int ) : billomat_id = str ( billomat_id ) response = self . session . delete ( url = self . api_url + resource + '/' + billomat_id , ) return self . _handle_response ( response ) | Creates a post request and return the response data | 94 | 10 |
13,514 | def _handle_failed_response ( self , response ) : if response . status_code == requests . codes . too_many_requests : return self . rate_limit_exceeded ( response ) else : response . raise_for_status ( ) | Handle the failed response and check for rate limit exceeded If rate limit exceeded it runs the rate_limit_exceeded function which you should overwrite | 55 | 29 |
13,515 | def _get_resource_per_page ( self , resource , per_page = 1000 , page = 1 , params = None ) : assert ( isinstance ( resource , str ) ) common_params = { 'per_page' : per_page , 'page' : page } if not params : params = common_params else : params . update ( common_params ) return self . _create_get_request ( resource = resource , params = params ) | Gets specific data per resource page and per page | 97 | 10 |
13,516 | def resolve_response_data ( head_key , data_key , data ) : new_data = [ ] if isinstance ( data , list ) : for data_row in data : if head_key in data_row and data_key in data_row [ head_key ] : if isinstance ( data_row [ head_key ] [ data_key ] , list ) : new_data += data_row [ head_key ] [ data_key ] else : new_data . append ( data_row [ head_key ] [ data_key ] ) elif data_key in data_row : return data_row [ data_key ] else : if head_key in data and data_key in data [ head_key ] : new_data += data [ head_key ] [ data_key ] elif data_key in data : return data [ data_key ] return new_data | Resolves the responses you get from billomat If you have done a get_one_element request then you will get a dictionary If you have done a get_all_elements request then you will get a list with all elements in it | 195 | 50 |
13,517 | def get_clients_per_page ( self , per_page = 1000 , page = 1 , params = None ) : return self . _get_resource_per_page ( resource = CLIENTS , per_page = per_page , page = page , params = params ) | Get clients per page | 60 | 4 |
13,518 | def get_all_clients ( self , params = None ) : return self . _iterate_through_pages ( get_function = self . get_clients_per_page , resource = CLIENTS , * * { 'params' : params } ) | Get all clients This will iterate over all pages until it gets all elements . So if the rate limit exceeded it will throw an Exception and you will get nothing | 56 | 32 |
13,519 | def update_client ( self , client_id , client_dict ) : return self . _create_put_request ( resource = CLIENTS , billomat_id = client_id , send_data = client_dict ) | Updates a client | 49 | 4 |
13,520 | def get_client_properties_per_page ( self , per_page = 1000 , page = 1 , params = None ) : return self . _get_resource_per_page ( resource = CLIENT_PROPERTIES , per_page = per_page , page = page , params = params ) | Get client properties per page | 65 | 5 |
13,521 | def get_client_tags_per_page ( self , per_page = 1000 , page = 1 , params = None ) : return self . _get_resource_per_page ( resource = CLIENT_TAGS , per_page = per_page , page = page , params = params ) | Get client tags per page | 63 | 5 |
13,522 | def get_all_client_tags ( self , params = None ) : return self . _iterate_through_pages ( get_function = self . get_client_tags_per_page , resource = CLIENT_TAGS , * * { 'params' : params } ) | Get all client tags This will iterate over all pages until it gets all elements . So if the rate limit exceeded it will throw an Exception and you will get nothing | 60 | 33 |
13,523 | def get_contacts_of_client_per_page ( self , client_id , per_page = 1000 , page = 1 ) : return self . _get_resource_per_page ( resource = CONTACTS , per_page = per_page , page = page , params = { 'client_id' : client_id } , ) | Get contacts of client per page | 76 | 6 |
13,524 | def update_contact_of_client ( self , contact_id , contact_dict ) : return self . _create_put_request ( resource = CONTACTS , billomat_id = contact_id , send_data = contact_dict ) | Updates a contact | 54 | 4 |
13,525 | def get_suppliers_per_page ( self , per_page = 1000 , page = 1 , params = None ) : return self . _get_resource_per_page ( resource = SUPPLIERS , per_page = per_page , page = page , params = params ) | Get suppliers per page | 63 | 4 |
13,526 | def get_all_suppliers ( self , params = None ) : if not params : params = { } return self . _iterate_through_pages ( get_function = self . get_suppliers_per_page , resource = SUPPLIERS , * * { 'params' : params } ) | Get all suppliers This will iterate over all pages until it gets all elements . So if the rate limit exceeded it will throw an Exception and you will get nothing | 68 | 32 |
13,527 | def update_supplier ( self , supplier_id , supplier_dict ) : return self . _create_put_request ( resource = SUPPLIERS , billomat_id = supplier_id , send_data = supplier_dict ) | Updates a supplier | 52 | 4 |
13,528 | def get_supplier_properties_per_page ( self , per_page = 1000 , page = 1 , params = None ) : return self . _get_resource_per_page ( resource = SUPPLIER_PROPERTIES , per_page = per_page , page = page , params = params ) | Get supplier properties per page | 68 | 5 |
13,529 | def get_tags_of_supplier_per_page ( self , supplier_id , per_page = 1000 , page = 1 ) : return self . _get_resource_per_page ( resource = SUPPLIER_TAGS , per_page = per_page , page = page , params = { 'supplier_id' : supplier_id } , ) | Get tags of suppliers per page | 80 | 6 |
13,530 | def get_articles_per_page ( self , per_page = 1000 , page = 1 , params = None ) : return self . _get_resource_per_page ( resource = ARTICLES , per_page = per_page , page = page , params = params ) | Get articles per page | 60 | 4 |
13,531 | def get_all_articles ( self , params = None ) : if not params : params = { } return self . _iterate_through_pages ( self . get_articles_per_page , resource = ARTICLES , * * { 'params' : params } ) | Get all articles This will iterate over all pages until it gets all elements . So if the rate limit exceeded it will throw an Exception and you will get nothing | 59 | 32 |
13,532 | def update_article ( self , article_id , article_dict ) : return self . _create_put_request ( resource = ARTICLES , billomat_id = article_id , send_data = article_dict ) | Updates an article | 50 | 4 |
13,533 | def get_article_properties_per_page ( self , per_page = 1000 , page = 1 , params = None ) : return self . _get_resource_per_page ( resource = ARTICLE_PROPERTIES , per_page = per_page , page = page , params = params ) | Get article properties per page | 65 | 5 |
13,534 | def get_all_article_properties ( self , params = None ) : if not params : params = { } return self . _iterate_through_pages ( get_function = self . get_article_properties_per_page , resource = ARTICLE_PROPERTIES , * * { 'params' : params } ) | Get all article properties This will iterate over all pages until it gets all elements . So if the rate limit exceeded it will throw an Exception and you will get nothing | 70 | 33 |
13,535 | def get_tags_of_article_per_page ( self , article_id , per_page = 1000 , page = 1 ) : return self . _get_resource_per_page ( resource = ARTICLE_TAGS , per_page = per_page , page = page , params = { 'article_id' : article_id } , ) | Get articles tags per page | 76 | 5 |
13,536 | def get_all_tags_of_article ( self , article_id ) : return self . _iterate_through_pages ( get_function = self . get_tags_of_article_per_page , resource = ARTICLE_TAGS , * * { 'article_id' : article_id } ) | Get all tags of article This will iterate over all pages until it gets all elements . So if the rate limit exceeded it will throw an Exception and you will get nothing | 68 | 34 |
13,537 | def get_units_per_page ( self , per_page = 1000 , page = 1 , params = None ) : return self . _get_resource_per_page ( resource = UNITS , per_page = per_page , page = page , params = params ) | Get units per page | 59 | 4 |
13,538 | def get_all_units ( self , params = None ) : if not params : params = { } return self . _iterate_through_pages ( self . get_units_per_page , resource = UNITS , * * { 'params' : params } ) | Get all units This will iterate over all pages until it gets all elements . So if the rate limit exceeded it will throw an Exception and you will get nothing | 58 | 32 |
13,539 | def update_unit ( self , unit_id , unit_dict ) : return self . _create_put_request ( resource = UNITS , billomat_id = unit_id , send_data = unit_dict ) | Updates an unit | 49 | 4 |
13,540 | def get_invoices_per_page ( self , per_page = 1000 , page = 1 , params = None ) : return self . _get_resource_per_page ( resource = INVOICES , per_page = per_page , page = page , params = params ) | Get invoices per page | 62 | 6 |
13,541 | def get_all_invoices ( self , params = None ) : if not params : params = { } return self . _iterate_through_pages ( self . get_invoices_per_page , resource = INVOICES , * * { 'params' : params } ) | Get all invoices This will iterate over all pages until it gets all elements . So if the rate limit exceeded it will throw an Exception and you will get nothing | 63 | 34 |
13,542 | def update_invoice ( self , invoice_id , invoice_dict ) : return self . _create_put_request ( resource = INVOICES , billomat_id = invoice_id , send_data = invoice_dict ) | Updates an invoice | 51 | 4 |
13,543 | def complete_invoice ( self , invoice_id , complete_dict ) : return self . _create_put_request ( resource = INVOICES , billomat_id = invoice_id , command = COMPLETE , send_data = complete_dict ) | Completes an invoice | 56 | 5 |
13,544 | def invoice_pdf ( self , invoice_id ) : return self . _create_get_request ( resource = INVOICES , billomat_id = invoice_id , command = PDF ) | Opens a pdf of an invoice | 42 | 7 |
13,545 | def upload_invoice_signature ( self , invoice_id , signature_dict ) : return self . _create_put_request ( resource = INVOICES , billomat_id = invoice_id , send_data = signature_dict , command = UPLOAD_SIGNATURE ) | Uploads a signature for the invoice | 63 | 7 |
13,546 | def cancel_invoice ( self , invoice_id ) : return self . _create_put_request ( resource = INVOICES , billomat_id = invoice_id , command = CANCEL , ) | Cancelles an invoice | 46 | 6 |
13,547 | def get_items_of_invoice_per_page ( self , invoice_id , per_page = 1000 , page = 1 ) : return self . _get_resource_per_page ( resource = INVOICE_ITEMS , per_page = per_page , page = page , params = { 'invoice_id' : invoice_id } , ) | Get invoice items of invoice per page | 80 | 7 |
13,548 | def get_all_items_of_invoice ( self , invoice_id ) : return self . _iterate_through_pages ( get_function = self . get_items_of_invoice_per_page , resource = INVOICE_ITEMS , * * { 'invoice_id' : invoice_id } ) | Get all items of invoice This will iterate over all pages until it gets all elements . So if the rate limit exceeded it will throw an Exception and you will get nothing | 73 | 34 |
13,549 | def update_invoice_item ( self , invoice_item_id , invoice_item_dict ) : return self . _create_put_request ( resource = INVOICE_ITEMS , billomat_id = invoice_item_id , send_data = invoice_item_dict ) | Updates an invoice item | 64 | 5 |
13,550 | def get_comments_of_invoice_per_page ( self , invoice_id , per_page = 1000 , page = 1 ) : return self . _get_resource_per_page ( resource = INVOICE_COMMENTS , per_page = per_page , page = page , params = { 'invoice_id' : invoice_id } , ) | Get comments of invoice per page | 80 | 6 |
13,551 | def get_all_comments_of_invoice ( self , invoice_id ) : return self . _iterate_through_pages ( get_function = self . get_comments_of_invoice_per_page , resource = INVOICE_COMMENTS , * * { 'invoice_id' : invoice_id } ) | Get all invoice comments of invoice This will iterate over all pages until it gets all elements . So if the rate limit exceeded it will throw an Exception and you will get nothing | 73 | 35 |
13,552 | def update_invoice_comment ( self , invoice_comment_id , invoice_comment_dict ) : return self . _create_put_request ( resource = INVOICE_COMMENTS , billomat_id = invoice_comment_id , send_data = invoice_comment_dict ) | Updates an invoice comment | 64 | 5 |
13,553 | def get_invoice_payments_per_page ( self , per_page = 1000 , page = 1 , params = None ) : if not params : params = { } return self . _get_resource_per_page ( resource = INVOICE_PAYMENTS , per_page = per_page , page = page , params = params , ) | Get invoice payments per page | 77 | 5 |
13,554 | def get_all_invoice_payments ( self , params = None ) : if not params : params = { } return self . _iterate_through_pages ( get_function = self . get_invoice_payments_per_page , resource = INVOICE_PAYMENTS , * * { 'params' : params } ) | Get all invoice payments This will iterate over all pages until it gets all elements . So if the rate limit exceeded it will throw an Exception and you will get nothing | 75 | 33 |
13,555 | def get_tags_of_invoice_per_page ( self , invoice_id , per_page = 1000 , page = 1 ) : return self . _get_resource_per_page ( resource = INVOICE_TAGS , per_page = per_page , page = page , params = { 'invoice_id' : invoice_id } , ) | Get tags of invoice per page | 80 | 6 |
13,556 | def get_all_tags_of_invoice ( self , invoice_id ) : return self . _iterate_through_pages ( get_function = self . get_tags_of_invoice_per_page , resource = INVOICE_TAGS , * * { 'invoice_id' : invoice_id } ) | Get all tags of invoice This will iterate over all pages until it gets all elements . So if the rate limit exceeded it will throw an Exception and you will get nothing | 73 | 34 |
13,557 | def get_recurrings_per_page ( self , per_page = 1000 , page = 1 , params = None ) : return self . _get_resource_per_page ( resource = RECURRINGS , per_page = per_page , page = page , params = params ) | Get recurrings per page | 62 | 6 |
13,558 | def get_all_recurrings ( self , params = None ) : if not params : params = { } return self . _iterate_through_pages ( self . get_recurrings_per_page , resource = RECURRINGS , * * { 'params' : params } ) | Get all recurrings This will iterate over all pages until it gets all elements . So if the rate limit exceeded it will throw an Exception and you will get nothing | 63 | 34 |
13,559 | def update_recurring ( self , recurring_id , recurring_dict ) : return self . _create_put_request ( resource = RECURRINGS , billomat_id = recurring_id , send_data = recurring_dict ) | Updates a recurring | 51 | 4 |
13,560 | def get_items_of_recurring_per_page ( self , recurring_id , per_page = 1000 , page = 1 ) : return self . _get_resource_per_page ( resource = RECURRING_ITEMS , per_page = per_page , page = page , params = { 'recurring_id' : recurring_id } , ) | Get items of recurring per page | 80 | 6 |
13,561 | def get_all_items_of_recurring ( self , recurring_id ) : return self . _iterate_through_pages ( get_function = self . get_items_of_recurring_per_page , resource = RECURRING_ITEMS , * * { 'recurring_id' : recurring_id } ) | Get all items of recurring This will iterate over all pages until it gets all elements . So if the rate limit exceeded it will throw an Exception and you will get nothing | 73 | 34 |
13,562 | def update_recurring_item ( self , recurring_item_id , recurring_item_dict ) : return self . _create_put_request ( resource = RECURRING_ITEMS , billomat_id = recurring_item_id , send_data = recurring_item_dict ) | Updates a recurring item | 64 | 5 |
13,563 | def get_tags_of_recurring_per_page ( self , recurring_id , per_page = 1000 , page = 1 ) : return self . _get_resource_per_page ( resource = RECURRING_TAGS , per_page = per_page , page = page , params = { 'recurring_id' : recurring_id } , ) | Get tags of recurring per page | 80 | 6 |
13,564 | def get_all_tags_of_recurring ( self , recurring_id ) : return self . _iterate_through_pages ( get_function = self . get_tags_of_recurring_per_page , resource = RECURRING_TAGS , * * { 'recurring_id' : recurring_id } ) | Get all tags of recurring This will iterate over all pages until it gets all elements . So if the rate limit exceeded it will throw an Exception and you will get nothing | 73 | 34 |
13,565 | def get_email_receivers_of_recurring_per_page ( self , recurring_id , per_page = 1000 , page = 1 ) : return self . _get_resource_per_page ( resource = RECURRING_EMAIL_RECEIVERS , per_page = per_page , page = page , params = { 'recurring_id' : recurring_id } , ) | Get email receivers of recurring per page | 88 | 7 |
13,566 | def get_all_email_receivers_of_recurring ( self , recurring_id ) : return self . _iterate_through_pages ( get_function = self . get_email_receivers_of_recurring_per_page , resource = RECURRING_EMAIL_RECEIVERS , * * { 'recurring_id' : recurring_id } ) | Get all email receivers of recurring This will iterate over all pages until it gets all elements . So if the rate limit exceeded it will throw an Exception and you will get nothing | 85 | 35 |
13,567 | def get_incomings_per_page ( self , per_page = 1000 , page = 1 , params = None ) : return self . _get_resource_per_page ( resource = INCOMINGS , per_page = per_page , page = page , params = params ) | Get incomings per page | 61 | 5 |
13,568 | def get_all_incomings ( self , params = None ) : if not params : params = { } return self . _iterate_through_pages ( self . get_incomings_per_page , resource = INCOMINGS , * * { 'params' : params } ) | Get all incomings This will iterate over all pages until it gets all elements . So if the rate limit exceeded it will throw an Exception and you will get nothing | 61 | 33 |
13,569 | def update_incoming ( self , incoming_id , incoming_dict ) : return self . _create_put_request ( resource = INCOMINGS , billomat_id = incoming_id , send_data = incoming_dict ) | Updates an incoming | 51 | 4 |
13,570 | def get_comments_of_incoming_per_page ( self , incoming_id , per_page = 1000 , page = 1 ) : return self . _get_resource_per_page ( resource = INCOMING_COMMENTS , per_page = per_page , page = page , params = { 'incoming_id' : incoming_id } , ) | Get comments of incoming per page | 80 | 6 |
13,571 | def get_all_comments_of_incoming ( self , incoming_id ) : return self . _iterate_through_pages ( get_function = self . get_comments_of_incoming_per_page , resource = INCOMING_COMMENTS , * * { 'incoming_id' : incoming_id } ) | Get all comments of incoming This will iterate over all pages until it gets all elements . So if the rate limit exceeded it will throw an Exception and you will get nothing | 73 | 34 |
13,572 | def get_payments_of_incoming_per_page ( self , incoming_id , per_page = 1000 , page = 1 ) : return self . _get_resource_per_page ( resource = INCOMING_PAYMENTS , per_page = per_page , page = page , params = { 'incoming_id' : incoming_id } , ) | Get payments of incoming per page | 82 | 6 |
13,573 | def get_all_payments_of_incoming ( self , incoming_id ) : return self . _iterate_through_pages ( get_function = self . get_payments_of_incoming_per_page , resource = INCOMING_PAYMENTS , * * { 'incoming_id' : incoming_id } ) | Get all payments of incoming This will iterate over all pages until it gets all elements . So if the rate limit exceeded it will throw an Exception and you will get nothing | 76 | 34 |
13,574 | def get_incoming_properties_per_page ( self , per_page = 1000 , page = 1 , params = None ) : return self . _get_resource_per_page ( resource = INCOMING_PROPERTIES , per_page = per_page , page = page , params = params ) | Get incoming properties per page | 68 | 5 |
13,575 | def get_all_incoming_properties ( self , params = None ) : if not params : params = { } return self . _iterate_through_pages ( self . get_incoming_properties_per_page , resource = INCOMING_PROPERTIES , * * { 'params' : params } ) | Get all incoming properties This will iterate over all pages until it gets all elements . So if the rate limit exceeded it will throw an Exception and you will get nothing | 70 | 33 |
13,576 | def get_tags_of_incoming_per_page ( self , incoming_id , per_page = 1000 , page = 1 ) : return self . _get_resource_per_page ( resource = INCOMING_TAGS , per_page = per_page , page = page , params = { 'incoming_id' : incoming_id } , ) | Get tags of incoming per page | 80 | 6 |
13,577 | def get_all_tags_of_incoming ( self , incoming_id ) : return self . _iterate_through_pages ( get_function = self . get_tags_of_incoming_per_page , resource = INCOMING_TAGS , * * { 'incoming_id' : incoming_id } ) | Get all tags of incoming This will iterate over all pages until it gets all elements . So if the rate limit exceeded it will throw an Exception and you will get nothing | 73 | 34 |
13,578 | def get_inbox_documents_per_page ( self , per_page = 1000 , page = 1 ) : return self . _get_resource_per_page ( resource = INBOX_DOCUMENTS , per_page = per_page , page = page , ) | Get inbox documents per page | 60 | 5 |
13,579 | def get_offers_per_page ( self , per_page = 1000 , page = 1 , params = None ) : return self . _get_resource_per_page ( resource = OFFERS , per_page = per_page , page = page , params = params ) | Get offers per page | 60 | 4 |
13,580 | def get_all_offers ( self , params = None ) : if not params : params = { } return self . _iterate_through_pages ( self . get_offers_per_page , resource = OFFERS , * * { 'params' : params } ) | Get all offers This will iterate over all pages until it gets all elements . So if the rate limit exceeded it will throw an Exception and you will get nothing | 60 | 32 |
13,581 | def update_offer ( self , offer_id , offer_dict ) : return self . _create_put_request ( resource = OFFERS , billomat_id = offer_id , send_data = offer_dict ) | Updates an offer | 49 | 4 |
13,582 | def complete_offer ( self , offer_id , complete_dict ) : return self . _create_put_request ( resource = OFFERS , billomat_id = offer_id , command = COMPLETE , send_data = complete_dict ) | Completes an offer | 54 | 5 |
13,583 | def offer_pdf ( self , offer_id ) : return self . _create_get_request ( resource = OFFERS , billomat_id = offer_id , command = PDF ) | Opens a pdf of an offer | 41 | 7 |
13,584 | def cancel_offer ( self , offer_id ) : return self . _create_put_request ( resource = OFFERS , billomat_id = offer_id , command = CANCEL , ) | Cancelles an offer | 44 | 6 |
13,585 | def mark_offer_as_win ( self , offer_id ) : return self . _create_put_request ( resource = OFFERS , billomat_id = offer_id , command = WIN , ) | Mark offer as win | 46 | 4 |
13,586 | def mark_offer_as_lose ( self , offer_id ) : return self . _create_put_request ( resource = OFFERS , billomat_id = offer_id , command = LOSE , ) | Mark offer as lose | 48 | 4 |
13,587 | def mark_offer_as_clear ( self , offer_id ) : return self . _create_put_request ( resource = OFFERS , billomat_id = offer_id , command = CLEAR , ) | Mark offer as clear | 47 | 4 |
13,588 | def mark_offer_as_unclear ( self , offer_id ) : return self . _create_put_request ( resource = OFFERS , billomat_id = offer_id , command = UNCLEAR , ) | Mark offer as unclear | 49 | 4 |
13,589 | def get_items_of_offer_per_page ( self , offer_id , per_page = 1000 , page = 1 ) : return self . _get_resource_per_page ( resource = OFFER_ITEMS , per_page = per_page , page = page , params = { 'offer_id' : offer_id } , ) | Get items of offer per page | 77 | 6 |
13,590 | def get_all_items_of_offer ( self , offer_id ) : return self . _iterate_through_pages ( get_function = self . get_items_of_offer_per_page , resource = OFFER_ITEMS , * * { 'offer_id' : offer_id } ) | Get all items of offer This will iterate over all pages until it gets all elements . So if the rate limit exceeded it will throw an Exception and you will get nothing | 69 | 34 |
13,591 | def update_offer_item ( self , offer_item_id , offer_item_dict ) : return self . _create_put_request ( resource = OFFER_ITEMS , billomat_id = offer_item_id , send_data = offer_item_dict ) | Updates an offer item | 62 | 5 |
13,592 | def get_comments_of_offer_per_page ( self , offer_id , per_page = 1000 , page = 1 ) : return self . _get_resource_per_page ( resource = OFFER_COMMENTS , per_page = per_page , page = page , params = { 'offer_id' : offer_id } , ) | Get comments of offer per page | 77 | 6 |
13,593 | def get_all_comments_of_offer ( self , offer_id ) : return self . _iterate_through_pages ( get_function = self . get_comments_of_offer_per_page , resource = OFFER_COMMENTS , * * { 'offer_id' : offer_id } ) | Get all comments of offer This will iterate over all pages until it gets all elements . So if the rate limit exceeded it will throw an Exception and you will get nothing | 69 | 34 |
13,594 | def update_offer_comment ( self , offer_comment_id , offer_comment_dict ) : return self . _create_put_request ( resource = OFFER_COMMENTS , billomat_id = offer_comment_id , send_data = offer_comment_dict ) | Updates an offer comment | 62 | 5 |
13,595 | def get_tags_of_offer_per_page ( self , offer_id , per_page = 1000 , page = 1 ) : return self . _get_resource_per_page ( resource = OFFER_TAGS , per_page = per_page , page = page , params = { 'offer_id' : offer_id } , ) | Get tags of offer per page | 77 | 6 |
13,596 | def get_all_tags_of_offer ( self , offer_id ) : return self . _iterate_through_pages ( get_function = self . get_tags_of_offer_per_page , resource = OFFER_TAGS , * * { 'offer_id' : offer_id } ) | Get all tags of offer This will iterate over all pages until it gets all elements . So if the rate limit exceeded it will throw an Exception and you will get nothing | 69 | 34 |
13,597 | def get_credit_notes_per_page ( self , per_page = 1000 , page = 1 , params = None ) : return self . _get_resource_per_page ( resource = CREDIT_NOTES , per_page = per_page , page = page , params = params ) | Get credit notes per page | 64 | 5 |
13,598 | def get_all_credit_notes ( self , params = None ) : if not params : params = { } return self . _iterate_through_pages ( self . get_credit_notes_per_page , resource = CREDIT_NOTES , * * { 'params' : params } ) | Get all credit notes This will iterate over all pages until it gets all elements . So if the rate limit exceeded it will throw an Exception and you will get nothing | 65 | 33 |
13,599 | def update_credit_note ( self , credit_note_id , credit_note_dict ) : return self . _create_put_request ( resource = CREDIT_NOTES , billomat_id = credit_note_id , send_data = credit_note_dict ) | Updates a credit note | 62 | 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.