Last active
April 15, 2025 17:41
-
-
Save trbielec/a00a58fa97a232bef8984cc8d0161e5b to your computer and use it in GitHub Desktop.
Revisions
-
trbielec revised this gist
Mar 29, 2025 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ # Taxonomy of Python Sandbox Capabilities **Preamble:** This taxonomy outlines the tasks achievable within this sandboxed Python environment (ChatGPT Code Interpreter). Its primary strengths lie in leveraging a rich set of pre-installed libraries for offline processing of uploaded data, rapid prototyping, generating outputs (including enhanced UI displays for certain types), and executing code without requiring local setup. Use this guide to determine if the tool fits your task, considering its inherent limitations: sessions are ephemeral (work must be downloaded each time), no internet access is available, computational resources and file upload sizes are capped, and only the pre-installed libraries can be used. *Current as of March 29, 2025.* --- -
trbielec created this gist
Mar 29, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,472 @@ # Taxonomy of Python Sandbox Capabilities **Preamble:** This taxonomy outlines the tasks achievable within this sandboxed Python environment (as typical in tools like ChatGPT Code Interpreter). Its primary strengths lie in leveraging a rich set of pre-installed libraries for offline processing of uploaded data, rapid prototyping, generating outputs (including enhanced UI displays for certain types), and executing code without requiring local setup. Use this guide to determine if the tool fits your task, considering its inherent limitations: sessions are ephemeral (work must be downloaded each time), no internet access is available, computational resources and file upload sizes are capped, and only the pre-installed libraries can be used. *Current as of March 29, 2025.* --- **I. Information Transformation and Synthesis** *(Core Purpose: Using code to process data, perform computations, generate insights, and create new artifacts, including potentially triggering enhanced UI displays for specific outputs.)* * **Decision Support (Why/When Use):** Ideal for analyzing uploaded datasets, generating reports/visualizations (with enhanced display options for dataframes/charts), running offline simulations or models, and automating content creation when internet access is unavailable or unnecessary, and required libraries are present. Leverage enhanced UI features for better presentation of supported outputs. **A. Data Understanding and Transformation** *(Focus: Ingesting, cleaning, exploring, validating, and preparing data.)* * **1. Data Ingestion, Cleaning, and Preparation** * *Capabilities:* Load data (CSV, Excel, JSON, etc.); Handle missing values; Correct types; Filter, merge, reshape; Standardize. * *Examples:* `pandas.read_csv`, `openpyxl`, `pandas` methods. * *Decision:* Use for initial data wrangling on moderately sized uploaded files. * **2. Exploratory Data Analysis (EDA) and Statistical Summary** * *Capabilities:* Calculate descriptive stats; Perform statistical tests; Generate frequency tables; Create data visualizations (plots, charts). * *Examples:* `pandas.DataFrame.describe`, `scipy.stats`, `statsmodels.api`, `matplotlib.pyplot`, `seaborn`, `plotly`. * *Decision:* Excellent for quick exploration and visualization of uploaded data. * **3. Data Validation and Transformation Pipelines** * *Capabilities:* Define/enforce schemas; Validate data; Create reusable processing workflows; Serialize cleaned data. * *Examples:* `pydantic`, `jsonschema`, `pandas` chains, `cloudpickle`, `orjson`. * *Decision:* Useful for ensuring data quality or creating standardized processing steps. **B. Predictive Modeling and Artificial Intelligence Tasks (Offline)** *(Focus: Building/evaluating models for prediction, classification, pattern recognition from uploaded data.)* * **1. Machine Learning Workflow (Classical & Deep Learning Inference/Limited Training)** * *Capabilities:* Feature engineering; Train/evaluate models; Limited hyperparameter tuning; Inference with uploaded models; Explain predictions; Potential GPU* acceleration. * *Examples:* `scikit-learn`, `xgboost`, `keras`/`torch` (inference/small train), `shap`, `joblib`. * *Decision:* Suitable for applying ML to moderate datasets, inference, or prototyping. Not for large-scale training. * **2. Natural Language Processing (NLP) on Local Text** * *Capabilities:* Text cleaning; Tokenization, tagging, sentiment analysis, topic modeling; Classification/summarization (with available/uploaded models). * *Examples:* `nltk`*, `spacy`*, `textblob`, `gensim`, `scikit-learn`, `transformers` (if models uploaded). (*Depends on pre-installed models/corpora). * *Decision:* Good for analyzing uploaded text when standard libraries/models suffice. * **3. Computer Vision on Local Images/Video** * *Capabilities:* Image/video loading/manipulation; Feature extraction; Object/face detection (with available/uploaded models); Segmentation; OCR*; Barcode reading*. * *Examples:* `opencv-python`, `pillow`, `scikit-image`, `dlib`*, `mtcnn`*, `pytesseract`*, `pyzbar`*. (*Depends on external binaries/models). * *Decision:* Useful for processing uploaded media, especially with pre-trained models or standard techniques. **C. Scientific Research and Specialized Computation** *(Focus: Complex math, simulation, domain-specific analysis using specialized libraries.)* * **1. Scientific Computing & Simulation (with Optimization)** * *Capabilities:* Advanced numerical/symbolic math; Signal processing; JIT* optimization; Labelled N-D arrays; Potential GPU* acceleration. * *Examples:* `numpy`, `scipy`, `sympy`, `numba`*, `jax`*, `xarray`, `pywavelets`, `mpmath`. * *Decision:* Powerful for complex offline calculations and simulations constrained by resources. * **2. Specialized Domain Problem Solving & Modeling** * *Capabilities:* Analysis in specific fields (Finance, Geospatial, Astro, Neuro, Game Theory, Logic, Semantic Web, 3D Geometry, Fonts, etc.). * *Examples:* `exchange-calendars`, `geopandas`*, `rasterio`*, `kerykeion`*, `mne`*, `nashpy`, `trimesh`, `rdflib`, `fonttools`. (*Some may need extra data/setup). * *Decision:* Highly valuable *if* the specific required library is installed and task is offline. **D. Automated Content Generation and Reporting** *(Focus: Creating structured outputs like documents, media, formatted data, potentially with enhanced UI display.)* * **1. Custom Document, Media, and Data Output Generation** * *Capabilities:* Generate files (PDF, DOCX, PPTX, XLSX); Create images (plots, diagrams); Synthesize audio (offline TTS); Create QR codes. Trigger enhanced UI displays for pandas DataFrames and saved chart images*. * *Examples:* File generation (`reportlab`, `python-docx`, `matplotlib.pyplot.savefig`, `xlsxwriter`, `pyttsx3`, `qrcode`); Enhanced display* (`ace_tools.display_dataframe_to_user`, `ace_tools.display_chart_to_user`). (*Requires internal `ace_tools` module). * *Decision:* Excellent for automating creation of outputs. Use enhanced display functions for better presentation of dataframes/charts within the interface itself. * **2. Rendering & Format Conversion (HTML/SVG based)** * *Capabilities:* Convert HTML/CSS to PDF* or Images*; Convert SVG to PDF/Images* or ReportLab objects*; Create SVG images programmatically. * *Examples:* `weasyprint`*, `pdfkit`*, `imgkit`*, `cairosvg`*, `svglib`*, `svgwrite`. (*Often requires external binaries like wkhtmltopdf, Cairo, etc.). * *Decision:* Useful for generating PDFs/images from web formats *if* backend renderers are available. **II. Code and Environment Manipulation** *(Core Purpose: Using the environment to develop, test, analyze, or interact with the code itself or the sandbox environment.)* * **Decision Support (Why/When Use):** Suitable for quick code prototyping, testing algorithms using available libraries, debugging snippets, generating boilerplate code, or understanding the sandbox's own characteristics. **A. Code Development, Testing, and Analysis Support** *(Focus: Working directly on code structure, execution, testing, and environment inspection.)* * **1. Code Authoring & Structuring** * *Capabilities:* Write functions, classes; Define data structures; Structure CLI logic. * *Examples:* Python syntax, `pydantic` models, `click`/`typer` decoration. * *Decision:* Good for drafting snippets or generating code structures. * **2. Code Testing (Unit Tests)** * *Capabilities:* Define and run unit tests using `pytest`. * *Examples:* Writing test functions, running `pytest.main()`. * *Decision:* Useful for verifying algorithms developed interactively. * **3. Code Debugging & Logging (Enhanced)** * *Capabilities:* Utilize advanced logging; Inspect execution stacks; Use basic debugger features*. * *Examples:* `loguru`, `inspect`, `debugpy` (limited). * *Decision:* Helpful for understanding code flow beyond print statements. * **4. Code Analysis & Introspection** * *Capabilities:* Parse code into ASTs; Analyze structure; Syntax highlighting (for output). * *Examples:* `ast` module, `asttokens`, `pygments`. * *Decision:* Useful for meta-programming or analyzing code structure. * **5. Sandbox Environment Inspection** * *Capabilities:* Check resource usage (CPU/memory); Identify CPU/platform info within the sandbox. * *Examples:* `psutil`, `py-cpuinfo`, `platform`. * *Decision:* Useful for understanding environment limitations/characteristics. --- *Notes:* * Capabilities marked with `*` may depend on specific configurations of the sandbox environment (e.g., presence of external binaries like FFmpeg/Tesseract/wkhtmltopdf, installed system libraries, GPU availability and driver setup, pre-downloaded NLP models/data). * All operations are subject to the environment's resource limits (CPU time, memory, file size uploads) and the fixed set of pre-installed libraries. No internet access is available directly from user code. Sessions are ephemeral; generated files or results must be explicitly downloaded before the session ends. --- # Packages absl-py==2.1.0 ace-tools==0.0.1 aeppl==0.0.31 aesara==2.7.3 affine==2.4.0 aiohttp==3.9.5 aiosignal==1.3.1 analytics-python==1.4.post1 annotated-types==0.7.0 anyio==3.7.1 anytree==2.8.0 argon2-cffi-bindings==21.2.0 argon2-cffi==23.1.0 arviz==0.20.0 asn1crypto==1.5.1 asttokens==3.0.0 attrs==24.2.0 audioread==3.0.1 babel==2.16.0 backoff==1.10.0 basemap-data==1.3.2 basemap==1.3.9 bcrypt==4.2.1 beautifulsoup4==4.12.3 bleach==6.2.0 blinker==1.9.0 blis==0.7.11 blosc2==2.0.0 bokeh==2.4.0 branca==0.8.0 brotli==1.1.0 cachetools==5.5.0 cairocffi==1.7.1 cairosvg==2.5.2 camelot-py==0.10.1 catalogue==2.0.10 certifi==2024.8.30 cffi==1.17.1 chardet==3.0.4 charset-normalizer==2.1.1 click-plugins==1.1.1 click==8.1.7 cligj==0.7.2 cloudpathlib==0.20.0 cloudpickle==3.1.0 cmake==3.31.1 cmudict==1.0.31 comm==0.2.2 confection==0.1.5 cons==0.4.6 contourpy==1.3.1 countryinfo==0.1.2 cryptography==3.4.8 cssselect2==0.7.0 cycler==0.12.1 cymem==2.0.10 cython==0.29.36 databricks-sql-connector==0.9.1 debugpy==1.8.9 decorator==4.4.2 defusedxml==0.7.1 dlib==19.24.2 dnspython==2.7.0 docx2txt==0.8 einops==0.3.2 email-validator==2.2.0 entrypoints==0.4 et-xmlfile==2.0.0 etuples==0.3.9 exchange-calendars==3.4 executing==2.1.0 faker==8.13.2 fastapi-cli==0.0.5 fastapi==0.111.0 fastjsonschema==2.21.1 fastprogress==1.0.3 ffmpeg-python==0.2.0 ffmpy==0.4.0 filelock==3.16.1 fiona==1.9.2 flask-cachebuster==1.0.0 flask-cors==5.0.0 flask-login==0.6.3 flask==3.1.0 folium==0.12.1 fonttools==4.55.3 fpdf==1.7.2 frozenlist==1.5.0 future==1.0.0 fuzzywuzzy==0.18.0 gensim==4.3.1 geographiclib==1.52 geopandas==0.10.2 geopy==2.2.0 gradio==2.2.15 graphviz==0.17 gtts==2.2.3 h11==0.14.0 h2==4.1.0 h5netcdf==1.4.1 h5py==3.8.0 hpack==4.0.0 html5lib==1.1 httpcore==1.0.7 httptools==0.6.4 httpx==0.28.1 hypercorn==0.14.3 hyperframe==6.0.1 idna==3.10 imageio-ffmpeg==0.5.1 imageio==2.36.1 imgkit==1.2.2 importlib-metadata==8.5.0 importlib-resources==6.4.5 iniconfig==2.0.0 ipykernel==6.29.5 ipython-genutils==0.2.0 ipython==8.30.0 isodate==0.7.2 itsdangerous==2.2.0 jax==0.2.28 jedi==0.19.2 jinja2==3.1.4 joblib==1.4.2 json5==0.10.0 jsonpickle==4.0.0 jsonschema-specifications==2024.10.1 jsonschema==4.23.0 jupyter-client==7.4.9 jupyter-core==5.1.3 jupyter-server==1.23.5 jupyterlab-pygments==0.2.2 jupyterlab-server==2.19.0 jupyterlab==3.4.8 keras==2.6.0 kerykeion==2.1.16 kiwisolver==1.4.7 korean-lunar-calendar==0.3.1 langcodes==3.5.0 language-data==1.3.0 lazy-loader==0.4 librosa==0.8.1 lit==18.1.8 llvmlite==0.43.0 logical-unification==0.4.6 loguru==0.5.3 lxml==5.3.0 marisa-trie==1.2.1 markdown-it-py==3.0.0 markdown2==2.5.2 markdownify==0.9.3 markupsafe==3.0.2 matplotlib-inline==0.1.7 matplotlib-venn==0.11.6 matplotlib==3.6.3 mdurl==0.1.2 minikanren==1.0.3 mistune==3.0.2 mizani==0.10.0 mne==0.23.4 monotonic==1.6 moviepy==1.0.3 mpmath==1.3.0 msgpack==1.1.0 mtcnn==0.1.1 multidict==6.1.0 multipledispatch==1.0.0 munch==4.0.0 murmurhash==1.0.11 mutagen==1.45.1 nashpy==0.0.35 nbclassic==0.4.5 nbclient==0.10.1 nbconvert==7.16.4 nbformat==5.10.4 nest-asyncio==1.6.0 networkx==2.8.8 nltk==3.9.1 notebook-shim==0.2.4 notebook==6.5.1 numba==0.60.0 numexpr==2.10.2 numpy-financial==1.0.0 numpy==1.24.0 nvidia-cublas-cu11==11.10.3.66 nvidia-cuda-cupti-cu11==11.7.101 nvidia-cuda-nvrtc-cu11==11.7.99 nvidia-cuda-runtime-cu11==11.7.99 nvidia-cudnn-cu11==8.5.0.96 nvidia-cufft-cu11==10.9.0.58 nvidia-curand-cu11==10.2.10.91 nvidia-cusolver-cu11==11.4.0.1 nvidia-cusparse-cu11==11.7.4.91 nvidia-nccl-cu11==2.14.3 nvidia-nvtx-cu11==11.7.91 odfpy==1.4.1 opencv-python==4.5.5.62 openpyxl==3.0.10 opt-einsum==3.4.0 orjson==3.10.12 oscrypto==1.3.0 packaging==24.2 pandas==1.5.3 pandocfilters==1.5.1 paramiko==3.5.0 parso==0.8.4 patsy==1.0.1 pdf2image==1.16.3 pdfkit==0.6.1 pdfminer.six==20220319 pdfplumber==0.6.2 pdfrw==0.4 pexpect==4.9.0 pillow==9.2.0 pip==24.0 platformdirs==4.3.6 plotly==5.3.0 plotnine==0.10.1 pluggy==1.5.0 pooch==1.8.2 preshed==3.0.9 priority==2.0.0 proglog==0.1.10 prometheus-client==0.21.1 prompt-toolkit==3.0.48 pronouncing==0.2.0 propcache==0.2.1 psutil==6.1.0 ptyprocess==0.7.0 pure-eval==0.2.3 py-cpuinfo==9.0.0 py==1.11.0 pycountry==20.7.3 pycparser==2.22 pycryptodome==3.21.0 pycryptodomex==3.21.0 pydantic-core==2.23.4 pydantic-extra-types==2.10.1 pydantic-settings==2.6.1 pydantic==2.9.2 pydot==1.4.2 pydub==0.25.1 pydyf==0.11.0 pygments==2.18.0 pygraphviz==1.7 pyjwt==2.10.1 pylog==1.1 pyluach==2.2.0 pymc==4.0.1 pymupdf==1.21.1 pynacl==1.5.0 pyopenssl==21.0.0 pypandoc==1.6.3 pyparsing==3.2.0 pypdf2==1.28.6 pyphen==0.17.0 pyproj==3.6.1 pyprover==0.5.6 pyshp==2.3.1 pyswisseph==2.10.3.2 pytesseract==0.3.8 pytest==6.2.5 pyth3==0.7 python-dateutil==2.9.0.post0 python-docx==0.8.11 python-dotenv==1.0.1 python-json-logger==2.0.7 python-multipart==0.0.19 python-pptx==0.6.21 pyttsx3==2.90 pytz==2024.2 pywavelets==1.8.0 pyxlsb==1.0.8 pyyaml==6.0.2 pyzbar==0.1.8 pyzmq==26.2.0 qrcode==7.3 rarfile==4.0 rasterio==1.3.3 rdflib==6.0.0 referencing==0.35.1 regex==2024.11.6 reportlab==3.6.12 requests==2.31.0 resampy==0.4.3 rich==13.9.4 rpds-py==0.22.3 scikit-image==0.20.0 scikit-learn==1.1.3 scipy==1.9.3 seaborn==0.11.2 send2trash==1.8.3 sentencepiece==0.2.0 setuptools==65.5.1 shap==0.39.0 shapely==1.7.1 shellingham==1.5.4 six==1.17.0 slicer==0.0.7 smart-open==7.0.5 sniffio==1.3.1 snowflake-connector-python==2.7.12 snuggs==1.4.7 soundfile==0.10.2 soupsieve==2.6 spacy-legacy==3.0.12 spacy-loggers==1.0.5 spacy==3.7.5 srsly==2.5.0 stack-data==0.6.3 starlette==0.37.2 statsmodels==0.13.5 svglib==1.1.0 svgwrite==1.4.1 sympy==1.8 tables==3.8.0 tabula==1.0.5 tabulate==0.9.0 tenacity==9.0.0 terminado==0.18.1 text-unidecode==1.3 textblob==0.15.3 thinc==8.2.5 threadpoolctl==3.5.0 thrift==0.21.0 tifffile==2024.9.20 tinycss2==1.4.0 toml==0.10.2 tomli==2.2.1 toolz==1.0.0 torch==2.0.1 torchaudio==2.0.2 torchtext==0.6.0 torchvision==0.15.2 tornado==6.4.2 tqdm==4.64.0 traitlets==5.14.3 trimesh==3.9.29 triton==2.0.0 typer==0.15.1 typing-extensions==4.10.0 ujson==5.10.0 urllib3==1.26.20 uvicorn==0.19.0 uvloop==0.21.0 wand==0.6.13 wasabi==1.1.3 watchfiles==1.0.3 wcwidth==0.2.13 weasel==0.4.1 weasyprint==53.3 webencodings==0.5.1 websocket-client==1.8.0 websockets==10.3 werkzeug==3.1.3 wheel==0.43.0 wordcloud==1.9.2 wrapt==1.17.0 wsproto==1.2.0 xarray-einstats==0.8.0 xarray==2024.3.0 xgboost==1.4.2 xlsxwriter==3.2.0 xml-python==0.4.3 yarl==1.18.3 zipp==3.21.0 zopfli==0.2.3.post1