🔍 Code Extractor

Browse Components

Showing 20 of 2143 components

  • class FlaskUser

    A Flask-Login compatible user wrapper class that adapts CDocs DocUser objects for authentication and authorization in Flask applications.

    File: /tf/active/vicechatdev/CDocs/main_flask.py | Lines: 106-144

    authentication authorization flask-login user-management rbac
  • function get_status_color

    Retrieves the color code associated with a given document status code from a configuration dictionary, returning a default gray color if the status is not found.

    File: /tf/active/vicechatdev/CDocs/settings_prod.py | Lines: 784-788

    status color ui configuration lookup
  • function is_valid_status_transition

    Validates whether a transition from one status to another is allowed based on predefined valid status transitions.

    File: /tf/active/vicechatdev/CDocs/settings_prod.py | Lines: 780-782

    validation state-machine workflow status-transition business-logic
  • function is_valid_document_status

    Validates whether a given status code exists in the DOCUMENT_STATUS_CONFIG configuration.

    File: /tf/active/vicechatdev/CDocs/settings_prod.py | Lines: 776-778

    validation document-management status-check configuration utility
  • function get_document_status_code

    Retrieves a document status code from a dictionary lookup using the provided full name, returning the name itself if not found.

    File: /tf/active/vicechatdev/CDocs/settings_prod.py | Lines: 772-774

    lookup dictionary document-management status-code mapping
  • function get_document_status_name

    Retrieves the full document status name corresponding to a given status code by performing a reverse lookup in the DOCUMENT_STATUSES dictionary.

    File: /tf/active/vicechatdev/CDocs/settings_prod.py | Lines: 765-770

    lookup mapping dictionary reverse-lookup status
  • function _generate_document_number_fallback

    Generates a fallback document number using in-memory counters when database access fails, creating unique identifiers based on document type, department, and year.

    File: /tf/active/vicechatdev/CDocs/settings_prod.py | Lines: 654-694

    document-management numbering fallback resilience counter
  • function generate_document_number

    Generates unique, sequential document numbers for a given document type and department using persistent counters stored in Neo4j database.

    File: /tf/active/vicechatdev/CDocs/settings_prod.py | Lines: 561-652

    document-management numbering neo4j counter unique-identifier
  • function generate_document_number_v1

    Generates a unique document number by combining document type code, department code, and using a settings-based generation function, with UUID fallback on error.

    File: /tf/active/vicechatdev/document_controller_backup.py | Lines: 470-492

    document-management unique-identifier document-number code-generation error-handling
  • function get_document_type

    Retrieves configuration details for a specific document type by looking it up in DOCUMENT_CONFIG or DOCUMENT_TYPES, returning a dictionary with document metadata or an empty dict if not found.

    File: /tf/active/vicechatdev/CDocs/settings_prod.py | Lines: 513-538

    document-management configuration lookup metadata document-type
  • function get_config_value

    Retrieves a configuration value from a nested dictionary structure in the global scope, with fallback to a default value if not found.

    File: /tf/active/vicechatdev/CDocs/settings_prod.py | Lines: 493-510

    configuration settings config-management dictionary-access error-handling
  • function get_department_code

    Retrieves a department code by looking up a department's full name in a DEPARTMENTS dictionary, returning the original name if not found.

    File: /tf/active/vicechatdev/CDocs/settings_prod.py | Lines: 363-365

    lookup dictionary mapping department code-conversion
  • function get_department_name

    Looks up and returns the full department name corresponding to a given department code by searching through a DEPARTMENTS dictionary.

    File: /tf/active/vicechatdev/CDocs/settings_prod.py | Lines: 356-361

    lookup dictionary mapping department reverse-lookup
  • function get_document_type_code

    Retrieves a document type code from a dictionary lookup using the provided document type name, returning the name itself if no mapping exists.

    File: /tf/active/vicechatdev/CDocs/settings_prod.py | Lines: 352-354

    lookup mapping document-type code-conversion dictionary-lookup
  • function get_document_type_name

    Looks up and returns the full document type name corresponding to a given document type code by searching through a DOCUMENT_TYPES dictionary.

    File: /tf/active/vicechatdev/CDocs/settings_prod.py | Lines: 345-350

    lookup dictionary reverse-mapping document-types code-to-name
  • function detect_outliers_iqr_v2

    Detects statistical outliers in a dataset using the Interquartile Range (IQR) method with a conservative 3×IQR threshold.

    File: /tf/active/vicechatdev/vice_ai/smartstat_scripts/84b9ac09-e646-4422-9d3a-e9f96529a553/analysis_1.py | Lines: 82-91

    outlier-detection statistics data-cleaning IQR interquartile-range
  • function clean_for_json

    Recursively traverses and sanitizes Python data structures (dicts, lists, tuples, numpy arrays) to ensure all values are JSON-serializable by converting numpy types, handling NaN/Inf values, and normalizing data types.

    File: /tf/active/vicechatdev/vice_ai/smartstat_scripts/f0b81d95-24d9-418a-8d9f-1b241684e64c/project_1/analysis.py | Lines: 472-494

    json serialization data-cleaning numpy pandas
  • function clean_for_json_v1

    Recursively traverses nested data structures (dicts, lists) and replaces NaN and Infinity float values with None to ensure JSON serialization compatibility.

    File: /tf/active/vicechatdev/vice_ai/new_app.py | Lines: 290-304

    json serialization data-cleaning nan-handling infinity-handling
  • function clean_for_json_v12

    Recursively sanitizes Python objects to make them JSON-serializable by converting non-serializable types (NumPy types, pandas objects, tuples, NaN/Inf values) into JSON-compatible formats.

    File: /tf/active/vicechatdev/vice_ai/smartstat_scripts/290a39ea-3ae0-4301-8e2f-9d5c3bf80e6e/project_3/analysis.py | Lines: 409-428

    json serialization data-cleaning numpy pandas
  • function clean_for_json_v15

    Recursively sanitizes Python objects to make them JSON-serializable by converting NumPy types to native Python types and handling NaN/Inf float values.

    File: /tf/active/vicechatdev/vice_ai/smartstat_scripts/290a39ea-3ae0-4301-8e2f-9d5c3bf80e6e/analysis_3.py | Lines: 392-407

    json serialization data-cleaning numpy type-conversion