Spaces:
Running on Zero
Running on Zero
feat: enable zerogpu minicpm lora runtime
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +44 -0
- .pytest_cache/.gitignore +2 -0
- .pytest_cache/CACHEDIR.TAG +4 -0
- .pytest_cache/README.md +8 -0
- .pytest_cache/v/cache/lastfailed +1 -0
- .pytest_cache/v/cache/nodeids +84 -0
- .venv/.lock +0 -0
- .venv/bin/Activate.ps1 +247 -0
- .venv/bin/activate +63 -0
- .venv/bin/activate.csh +26 -0
- .venv/bin/activate.fish +69 -0
- .venv/bin/f2py +6 -0
- .venv/bin/fastapi +6 -0
- .venv/bin/gradio +6 -0
- .venv/bin/hf +6 -0
- .venv/bin/hf-gradio +6 -0
- .venv/bin/httpx +6 -0
- .venv/bin/huggingface-cli +6 -0
- .venv/bin/idna +6 -0
- .venv/bin/markdown-it +6 -0
- .venv/bin/numpy-config +6 -0
- .venv/bin/pip +7 -0
- .venv/bin/pip3 +7 -0
- .venv/bin/pip3.11 +7 -0
- .venv/bin/playwright +10 -0
- .venv/bin/py.test +10 -0
- .venv/bin/pygmentize +6 -0
- .venv/bin/pytest +10 -0
- .venv/bin/python +0 -0
- .venv/bin/python3 +0 -0
- .venv/bin/python3.11 +0 -0
- .venv/bin/tiny-agents +6 -0
- .venv/bin/tqdm +6 -0
- .venv/bin/typer +6 -0
- .venv/bin/upload_theme +6 -0
- .venv/bin/uvicorn +6 -0
- .venv/include/site/python3.11/greenlet/greenlet.h +164 -0
- .venv/lib/python3.11/site-packages/PIL/.dylibs/libXau.6.dylib +0 -0
- .venv/lib/python3.11/site-packages/PIL/.dylibs/libavif.16.4.1.dylib +3 -0
- .venv/lib/python3.11/site-packages/PIL/.dylibs/libbrotlicommon.1.2.0.dylib +3 -0
- .venv/lib/python3.11/site-packages/PIL/.dylibs/libbrotlidec.1.2.0.dylib +3 -0
- .venv/lib/python3.11/site-packages/PIL/.dylibs/libfreetype.6.dylib +3 -0
- .venv/lib/python3.11/site-packages/PIL/.dylibs/libharfbuzz.0.dylib +3 -0
- .venv/lib/python3.11/site-packages/PIL/.dylibs/libjpeg.62.4.0.dylib +3 -0
- .venv/lib/python3.11/site-packages/PIL/.dylibs/liblcms2.2.dylib +3 -0
- .venv/lib/python3.11/site-packages/PIL/.dylibs/liblzma.5.dylib +3 -0
- .venv/lib/python3.11/site-packages/PIL/.dylibs/libopenjp2.2.5.4.dylib +3 -0
- .venv/lib/python3.11/site-packages/PIL/.dylibs/libpng16.16.dylib +3 -0
- .venv/lib/python3.11/site-packages/PIL/.dylibs/libsharpyuv.0.dylib +0 -0
- .venv/lib/python3.11/site-packages/PIL/.dylibs/libtiff.6.dylib +3 -0
.gitattributes
CHANGED
|
@@ -1,2 +1,46 @@
|
|
| 1 |
# Auto detect text files and perform LF normalization
|
| 2 |
* text=auto
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# Auto detect text files and perform LF normalization
|
| 2 |
* text=auto
|
| 3 |
+
.venv/lib/python3.11/site-packages/PIL/.dylibs/libavif.16.4.1.dylib filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
.venv/lib/python3.11/site-packages/PIL/.dylibs/libbrotlicommon.1.2.0.dylib filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
.venv/lib/python3.11/site-packages/PIL/.dylibs/libbrotlidec.1.2.0.dylib filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
.venv/lib/python3.11/site-packages/PIL/.dylibs/libfreetype.6.dylib filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
.venv/lib/python3.11/site-packages/PIL/.dylibs/libharfbuzz.0.dylib filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
.venv/lib/python3.11/site-packages/PIL/.dylibs/libjpeg.62.4.0.dylib filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
.venv/lib/python3.11/site-packages/PIL/.dylibs/liblcms2.2.dylib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
.venv/lib/python3.11/site-packages/PIL/.dylibs/liblzma.5.dylib filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
.venv/lib/python3.11/site-packages/PIL/.dylibs/libopenjp2.2.5.4.dylib filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
.venv/lib/python3.11/site-packages/PIL/.dylibs/libpng16.16.dylib filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
.venv/lib/python3.11/site-packages/PIL/.dylibs/libtiff.6.dylib filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
.venv/lib/python3.11/site-packages/PIL/.dylibs/libwebp.7.dylib filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
.venv/lib/python3.11/site-packages/PIL/.dylibs/libwebpmux.3.dylib filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
.venv/lib/python3.11/site-packages/PIL/.dylibs/libxcb.1.1.0.dylib filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
.venv/lib/python3.11/site-packages/PIL/.dylibs/libz.1.3.1.zlib-ng.dylib filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
.venv/lib/python3.11/site-packages/dateutil/zoneinfo/dateutil-zoneinfo.tar.gz filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
.venv/lib/python3.11/site-packages/gradio/media_assets/audio/cantina.wav filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
.venv/lib/python3.11/site-packages/gradio/media_assets/audio/recording1.wav filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
.venv/lib/python3.11/site-packages/gradio/media_assets/audio/sax.wav filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
.venv/lib/python3.11/site-packages/gradio/media_assets/images/groot.jpeg filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
.venv/lib/python3.11/site-packages/gradio/media_assets/images/tower.jpg filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
.venv/lib/python3.11/site-packages/gradio/media_assets/models3d/Duck.glb filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
.venv/lib/python3.11/site-packages/gradio/media_assets/models3d/sofia.stl filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
.venv/lib/python3.11/site-packages/gradio/media_assets/videos/a.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
.venv/lib/python3.11/site-packages/gradio/media_assets/videos/b.avi filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
.venv/lib/python3.11/site-packages/gradio/media_assets/videos/b.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
.venv/lib/python3.11/site-packages/gradio/media_assets/videos/world.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
.venv/lib/python3.11/site-packages/gradio/templates/frontend/static/fonts/Source[[:space:]]Sans[[:space:]]Pro/SourceSansPro-Bold.woff2 filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
.venv/lib/python3.11/site-packages/gradio/templates/frontend/static/fonts/Source[[:space:]]Sans[[:space:]]Pro/SourceSansPro-Regular.woff2 filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
.venv/lib/python3.11/site-packages/gradio/templates/node/build/client/_app/immutable/chunks/5J0xJHOV.js.br filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
.venv/lib/python3.11/site-packages/gradio/templates/node/build/client/_app/immutable/chunks/BMdH9xbf.js.br filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
.venv/lib/python3.11/site-packages/gradio/templates/node/build/client/_app/immutable/chunks/BmzEVe0D.js.br filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
.venv/lib/python3.11/site-packages/gradio/templates/node/build/client/_app/immutable/chunks/CGkloIng.js.br filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
.venv/lib/python3.11/site-packages/gradio/templates/node/build/client/_app/immutable/chunks/CLj6IfqE.js.br filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
.venv/lib/python3.11/site-packages/gradio/templates/node/build/client/_app/immutable/chunks/CZccx8Oi.js.br filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
.venv/lib/python3.11/site-packages/gradio/templates/node/build/client/_app/immutable/chunks/CgysOIik.js.br filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
.venv/lib/python3.11/site-packages/gradio/templates/node/build/client/_app/immutable/chunks/DuZ9aF7D.js.br filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
.venv/lib/python3.11/site-packages/gradio/templates/node/build/client/_app/immutable/chunks/Dufjs8Ut.js.br filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
.venv/lib/python3.11/site-packages/gradio/templates/node/build/client/_app/immutable/chunks/Ku4z6Hhd.js.br filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
.venv/lib/python3.11/site-packages/pip/_vendor/distlib/t64-arm.exe filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
.venv/lib/python3.11/site-packages/pip/_vendor/distlib/t64.exe filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
.venv/lib/python3.11/site-packages/pip/_vendor/distlib/w64-arm.exe filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
.venv/lib/python3.11/site-packages/pip/_vendor/distlib/w64.exe filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
.venv/lib/python3.11/site-packages/playwright/driver/node filter=lfs diff=lfs merge=lfs -text
|
.pytest_cache/.gitignore
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Created by pytest automatically.
|
| 2 |
+
*
|
.pytest_cache/CACHEDIR.TAG
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Signature: 8a477f597d28d172789f06886806bc55
|
| 2 |
+
# This file is a cache directory tag created by pytest.
|
| 3 |
+
# For information about cache directory tags, see:
|
| 4 |
+
# https://bford.info/cachedir/spec.html
|
.pytest_cache/README.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# pytest cache directory #
|
| 2 |
+
|
| 3 |
+
This directory contains data from the pytest's cache plugin,
|
| 4 |
+
which provides the `--lf` and `--ff` options, as well as the `cache` fixture.
|
| 5 |
+
|
| 6 |
+
**Do not** commit this to version control.
|
| 7 |
+
|
| 8 |
+
See [the docs](https://docs.pytest.org/en/stable/how-to/cache.html) for more information.
|
.pytest_cache/v/cache/lastfailed
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{}
|
.pytest_cache/v/cache/nodeids
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
"tests/test_agent.py::test_agent_finds_whitespace",
|
| 3 |
+
"tests/test_agent.py::test_agent_preserves_canonical_jargon_case",
|
| 4 |
+
"tests/test_agent.py::test_agent_scores_and_persists_idea",
|
| 5 |
+
"tests/test_agent.py::test_compare_ideas_reranks_board_and_selects_winner",
|
| 6 |
+
"tests/test_agent.py::test_distinct_idea_turns_append_to_board",
|
| 7 |
+
"tests/test_agent.py::test_gap_command_explores_unused_whitespace",
|
| 8 |
+
"tests/test_agent.py::test_goal_update_invalidates_current_idea_artifact",
|
| 9 |
+
"tests/test_agent.py::test_non_plan_turns_clear_stale_build_plan",
|
| 10 |
+
"tests/test_agent.py::test_plan_and_rank_do_not_create_placeholder_ideas",
|
| 11 |
+
"tests/test_agent.py::test_plan_command_uses_current_idea",
|
| 12 |
+
"tests/test_agent.py::test_plan_preserves_unwritten_whitespace_verdict",
|
| 13 |
+
"tests/test_agent.py::test_plan_uses_profile_context",
|
| 14 |
+
"tests/test_agent.py::test_planner_get_project_drives_project_response",
|
| 15 |
+
"tests/test_agent.py::test_planner_profile_and_goals_update_state",
|
| 16 |
+
"tests/test_agent.py::test_planner_profile_and_targets_update_state",
|
| 17 |
+
"tests/test_agent.py::test_planner_score_idea_scores_current_idea",
|
| 18 |
+
"tests/test_agent.py::test_rule_project_reference_does_not_create_or_score_idea",
|
| 19 |
+
"tests/test_agent.py::test_session_goals_apply_to_new_and_current_ideas",
|
| 20 |
+
"tests/test_agent.py::test_session_targets_apply_to_new_and_current_ideas",
|
| 21 |
+
"tests/test_agent.py::test_well_tuned_goal_adds_training_step_to_plan",
|
| 22 |
+
"tests/test_agent.py::test_well_tuned_target_adds_training_step_to_plan",
|
| 23 |
+
"tests/test_aliases.py::test_normalize_jargon_alias",
|
| 24 |
+
"tests/test_app.py::test_artifact_png_endpoint_returns_png_attachment",
|
| 25 |
+
"tests/test_app.py::test_bootstrap_exposes_index_metadata",
|
| 26 |
+
"tests/test_app.py::test_chapter_endpoint_exports_markdown",
|
| 27 |
+
"tests/test_app.py::test_demo_bundle_endpoint_returns_zip_attachment",
|
| 28 |
+
"tests/test_app.py::test_demo_session_endpoint_returns_export_ready_state",
|
| 29 |
+
"tests/test_app.py::test_field_notes_endpoint_exports_markdown",
|
| 30 |
+
"tests/test_app.py::test_health_exposes_index_metadata",
|
| 31 |
+
"tests/test_app.py::test_lora_dataset_endpoint_exports_sft_jsonl",
|
| 32 |
+
"tests/test_app.py::test_lora_training_kit_endpoint_returns_zip_attachment",
|
| 33 |
+
"tests/test_app.py::test_prize_ledger_endpoint_reports_submission_evidence",
|
| 34 |
+
"tests/test_app.py::test_runtime_endpoint_reports_planner",
|
| 35 |
+
"tests/test_app.py::test_submission_packet_endpoint_exports_markdown",
|
| 36 |
+
"tests/test_app.py::test_tool_contract_check_endpoint_defaults_safely",
|
| 37 |
+
"tests/test_app.py::test_tool_contracts_endpoint_exposes_schemas",
|
| 38 |
+
"tests/test_app.py::test_trace_artifact_endpoint_exports_jsonl",
|
| 39 |
+
"tests/test_artifact_bundle.py::test_demo_bundle_contains_submission_evidence_files",
|
| 40 |
+
"tests/test_chapter.py::test_chapter_markdown_contains_idea_pages_and_citations",
|
| 41 |
+
"tests/test_chapter.py::test_empty_chapter_markdown_is_explicit",
|
| 42 |
+
"tests/test_data.py::test_project_index_rejects_mismatched_snapshot",
|
| 43 |
+
"tests/test_data.py::test_project_index_searches_snapshot",
|
| 44 |
+
"tests/test_data.py::test_project_index_whitespace",
|
| 45 |
+
"tests/test_data.py::test_public_project_cards_hide_generic_submission_copy",
|
| 46 |
+
"tests/test_demo_rehearsal.py::test_demo_rehearsal_builds_complete_session",
|
| 47 |
+
"tests/test_field_notes.py::test_field_notes_markdown_contains_session_decisions",
|
| 48 |
+
"tests/test_frontend_copy.py::test_main_interface_copy_is_builder_facing",
|
| 49 |
+
"tests/test_frontend_copy.py::test_server_png_copy_uses_interface_language",
|
| 50 |
+
"tests/test_frontend_copy.py::test_visible_static_shell_does_not_promote_submission_evidence",
|
| 51 |
+
"tests/test_lora_dataset.py::test_empty_lora_dataset_only_exports_manifest",
|
| 52 |
+
"tests/test_lora_dataset.py::test_lora_dataset_exports_tool_call_and_response_examples",
|
| 53 |
+
"tests/test_lora_training_kit.py::test_lora_training_kit_contains_recipe_and_model_card",
|
| 54 |
+
"tests/test_lora_training_kit.py::test_parse_lora_dataset_jsonl_rejects_empty_payload",
|
| 55 |
+
"tests/test_lora_training_kit.py::test_train_minicpm_lora_dry_run_writes_recipe",
|
| 56 |
+
"tests/test_model_runtime.py::test_create_tool_planner_accepts_adapter_env",
|
| 57 |
+
"tests/test_model_runtime.py::test_create_tool_planner_defaults_to_rules",
|
| 58 |
+
"tests/test_model_runtime.py::test_create_tool_planner_rejects_unknown_backend",
|
| 59 |
+
"tests/test_model_runtime.py::test_minicpm_status_is_lazy",
|
| 60 |
+
"tests/test_model_runtime.py::test_render_context_includes_state",
|
| 61 |
+
"tests/test_model_runtime.py::test_rule_planner_defaults_blank_to_list_projects",
|
| 62 |
+
"tests/test_model_runtime.py::test_rule_planner_emits_valid_search_call",
|
| 63 |
+
"tests/test_model_runtime.py::test_rule_planner_keeps_empty_board_commands_as_commands",
|
| 64 |
+
"tests/test_model_runtime.py::test_rule_planner_keeps_project_words_inside_ideas",
|
| 65 |
+
"tests/test_model_runtime.py::test_rule_planner_routes_project_reference_commands",
|
| 66 |
+
"tests/test_model_runtime.py::test_rule_planner_splits_explicit_idea_pitch",
|
| 67 |
+
"tests/test_model_runtime.py::test_rule_planner_uses_plan_when_idea_exists",
|
| 68 |
+
"tests/test_model_runtime.py::test_system_prompt_keeps_runtime_role_user_facing",
|
| 69 |
+
"tests/test_model_runtime.py::test_zerogpu_disabled_leaves_function_unwrapped",
|
| 70 |
+
"tests/test_model_runtime.py::test_zerogpu_duration_validates_positive_values",
|
| 71 |
+
"tests/test_prize_ledger.py::test_prize_ledger_tracks_param_budget_and_badges",
|
| 72 |
+
"tests/test_submission_packet.py::test_empty_submission_packet_is_honest_about_missing_session_artifacts",
|
| 73 |
+
"tests/test_submission_packet.py::test_submission_packet_contains_demo_and_prize_evidence",
|
| 74 |
+
"tests/test_tool_contracts.py::test_parse_and_validate_minicpm_xml_tool_call",
|
| 75 |
+
"tests/test_tool_contracts.py::test_resolve_defaults_to_search_when_output_is_broken",
|
| 76 |
+
"tests/test_tool_contracts.py::test_resolve_defaults_to_whitespace_without_query",
|
| 77 |
+
"tests/test_tool_contracts.py::test_tool_schemas_are_model_ready",
|
| 78 |
+
"tests/test_tool_contracts.py::test_validate_rejects_bad_argument_type",
|
| 79 |
+
"tests/test_tool_contracts.py::test_validate_rejects_extra_arguments",
|
| 80 |
+
"tests/test_tool_contracts.py::test_validate_rejects_unknown_tool",
|
| 81 |
+
"tests/test_tools.py::test_idea_from_text_splits_explicit_title_and_pitch",
|
| 82 |
+
"tests/test_trace_export.py::test_checked_in_sample_trace_matches_schema",
|
| 83 |
+
"tests/test_trace_export.py::test_trace_jsonl_contains_manifest_and_turns"
|
| 84 |
+
]
|
.venv/.lock
ADDED
|
File without changes
|
.venv/bin/Activate.ps1
ADDED
|
@@ -0,0 +1,247 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<#
|
| 2 |
+
.Synopsis
|
| 3 |
+
Activate a Python virtual environment for the current PowerShell session.
|
| 4 |
+
|
| 5 |
+
.Description
|
| 6 |
+
Pushes the python executable for a virtual environment to the front of the
|
| 7 |
+
$Env:PATH environment variable and sets the prompt to signify that you are
|
| 8 |
+
in a Python virtual environment. Makes use of the command line switches as
|
| 9 |
+
well as the `pyvenv.cfg` file values present in the virtual environment.
|
| 10 |
+
|
| 11 |
+
.Parameter VenvDir
|
| 12 |
+
Path to the directory that contains the virtual environment to activate. The
|
| 13 |
+
default value for this is the parent of the directory that the Activate.ps1
|
| 14 |
+
script is located within.
|
| 15 |
+
|
| 16 |
+
.Parameter Prompt
|
| 17 |
+
The prompt prefix to display when this virtual environment is activated. By
|
| 18 |
+
default, this prompt is the name of the virtual environment folder (VenvDir)
|
| 19 |
+
surrounded by parentheses and followed by a single space (ie. '(.venv) ').
|
| 20 |
+
|
| 21 |
+
.Example
|
| 22 |
+
Activate.ps1
|
| 23 |
+
Activates the Python virtual environment that contains the Activate.ps1 script.
|
| 24 |
+
|
| 25 |
+
.Example
|
| 26 |
+
Activate.ps1 -Verbose
|
| 27 |
+
Activates the Python virtual environment that contains the Activate.ps1 script,
|
| 28 |
+
and shows extra information about the activation as it executes.
|
| 29 |
+
|
| 30 |
+
.Example
|
| 31 |
+
Activate.ps1 -VenvDir C:\Users\MyUser\Common\.venv
|
| 32 |
+
Activates the Python virtual environment located in the specified location.
|
| 33 |
+
|
| 34 |
+
.Example
|
| 35 |
+
Activate.ps1 -Prompt "MyPython"
|
| 36 |
+
Activates the Python virtual environment that contains the Activate.ps1 script,
|
| 37 |
+
and prefixes the current prompt with the specified string (surrounded in
|
| 38 |
+
parentheses) while the virtual environment is active.
|
| 39 |
+
|
| 40 |
+
.Notes
|
| 41 |
+
On Windows, it may be required to enable this Activate.ps1 script by setting the
|
| 42 |
+
execution policy for the user. You can do this by issuing the following PowerShell
|
| 43 |
+
command:
|
| 44 |
+
|
| 45 |
+
PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
|
| 46 |
+
|
| 47 |
+
For more information on Execution Policies:
|
| 48 |
+
https://go.microsoft.com/fwlink/?LinkID=135170
|
| 49 |
+
|
| 50 |
+
#>
|
| 51 |
+
Param(
|
| 52 |
+
[Parameter(Mandatory = $false)]
|
| 53 |
+
[String]
|
| 54 |
+
$VenvDir,
|
| 55 |
+
[Parameter(Mandatory = $false)]
|
| 56 |
+
[String]
|
| 57 |
+
$Prompt
|
| 58 |
+
)
|
| 59 |
+
|
| 60 |
+
<# Function declarations --------------------------------------------------- #>
|
| 61 |
+
|
| 62 |
+
<#
|
| 63 |
+
.Synopsis
|
| 64 |
+
Remove all shell session elements added by the Activate script, including the
|
| 65 |
+
addition of the virtual environment's Python executable from the beginning of
|
| 66 |
+
the PATH variable.
|
| 67 |
+
|
| 68 |
+
.Parameter NonDestructive
|
| 69 |
+
If present, do not remove this function from the global namespace for the
|
| 70 |
+
session.
|
| 71 |
+
|
| 72 |
+
#>
|
| 73 |
+
function global:deactivate ([switch]$NonDestructive) {
|
| 74 |
+
# Revert to original values
|
| 75 |
+
|
| 76 |
+
# The prior prompt:
|
| 77 |
+
if (Test-Path -Path Function:_OLD_VIRTUAL_PROMPT) {
|
| 78 |
+
Copy-Item -Path Function:_OLD_VIRTUAL_PROMPT -Destination Function:prompt
|
| 79 |
+
Remove-Item -Path Function:_OLD_VIRTUAL_PROMPT
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
# The prior PYTHONHOME:
|
| 83 |
+
if (Test-Path -Path Env:_OLD_VIRTUAL_PYTHONHOME) {
|
| 84 |
+
Copy-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME -Destination Env:PYTHONHOME
|
| 85 |
+
Remove-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
# The prior PATH:
|
| 89 |
+
if (Test-Path -Path Env:_OLD_VIRTUAL_PATH) {
|
| 90 |
+
Copy-Item -Path Env:_OLD_VIRTUAL_PATH -Destination Env:PATH
|
| 91 |
+
Remove-Item -Path Env:_OLD_VIRTUAL_PATH
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
# Just remove the VIRTUAL_ENV altogether:
|
| 95 |
+
if (Test-Path -Path Env:VIRTUAL_ENV) {
|
| 96 |
+
Remove-Item -Path env:VIRTUAL_ENV
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
# Just remove VIRTUAL_ENV_PROMPT altogether.
|
| 100 |
+
if (Test-Path -Path Env:VIRTUAL_ENV_PROMPT) {
|
| 101 |
+
Remove-Item -Path env:VIRTUAL_ENV_PROMPT
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
# Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether:
|
| 105 |
+
if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) {
|
| 106 |
+
Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
# Leave deactivate function in the global namespace if requested:
|
| 110 |
+
if (-not $NonDestructive) {
|
| 111 |
+
Remove-Item -Path function:deactivate
|
| 112 |
+
}
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
<#
|
| 116 |
+
.Description
|
| 117 |
+
Get-PyVenvConfig parses the values from the pyvenv.cfg file located in the
|
| 118 |
+
given folder, and returns them in a map.
|
| 119 |
+
|
| 120 |
+
For each line in the pyvenv.cfg file, if that line can be parsed into exactly
|
| 121 |
+
two strings separated by `=` (with any amount of whitespace surrounding the =)
|
| 122 |
+
then it is considered a `key = value` line. The left hand string is the key,
|
| 123 |
+
the right hand is the value.
|
| 124 |
+
|
| 125 |
+
If the value starts with a `'` or a `"` then the first and last character is
|
| 126 |
+
stripped from the value before being captured.
|
| 127 |
+
|
| 128 |
+
.Parameter ConfigDir
|
| 129 |
+
Path to the directory that contains the `pyvenv.cfg` file.
|
| 130 |
+
#>
|
| 131 |
+
function Get-PyVenvConfig(
|
| 132 |
+
[String]
|
| 133 |
+
$ConfigDir
|
| 134 |
+
) {
|
| 135 |
+
Write-Verbose "Given ConfigDir=$ConfigDir, obtain values in pyvenv.cfg"
|
| 136 |
+
|
| 137 |
+
# Ensure the file exists, and issue a warning if it doesn't (but still allow the function to continue).
|
| 138 |
+
$pyvenvConfigPath = Join-Path -Resolve -Path $ConfigDir -ChildPath 'pyvenv.cfg' -ErrorAction Continue
|
| 139 |
+
|
| 140 |
+
# An empty map will be returned if no config file is found.
|
| 141 |
+
$pyvenvConfig = @{ }
|
| 142 |
+
|
| 143 |
+
if ($pyvenvConfigPath) {
|
| 144 |
+
|
| 145 |
+
Write-Verbose "File exists, parse `key = value` lines"
|
| 146 |
+
$pyvenvConfigContent = Get-Content -Path $pyvenvConfigPath
|
| 147 |
+
|
| 148 |
+
$pyvenvConfigContent | ForEach-Object {
|
| 149 |
+
$keyval = $PSItem -split "\s*=\s*", 2
|
| 150 |
+
if ($keyval[0] -and $keyval[1]) {
|
| 151 |
+
$val = $keyval[1]
|
| 152 |
+
|
| 153 |
+
# Remove extraneous quotations around a string value.
|
| 154 |
+
if ("'""".Contains($val.Substring(0, 1))) {
|
| 155 |
+
$val = $val.Substring(1, $val.Length - 2)
|
| 156 |
+
}
|
| 157 |
+
|
| 158 |
+
$pyvenvConfig[$keyval[0]] = $val
|
| 159 |
+
Write-Verbose "Adding Key: '$($keyval[0])'='$val'"
|
| 160 |
+
}
|
| 161 |
+
}
|
| 162 |
+
}
|
| 163 |
+
return $pyvenvConfig
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
|
| 167 |
+
<# Begin Activate script --------------------------------------------------- #>
|
| 168 |
+
|
| 169 |
+
# Determine the containing directory of this script
|
| 170 |
+
$VenvExecPath = Split-Path -Parent $MyInvocation.MyCommand.Definition
|
| 171 |
+
$VenvExecDir = Get-Item -Path $VenvExecPath
|
| 172 |
+
|
| 173 |
+
Write-Verbose "Activation script is located in path: '$VenvExecPath'"
|
| 174 |
+
Write-Verbose "VenvExecDir Fullname: '$($VenvExecDir.FullName)"
|
| 175 |
+
Write-Verbose "VenvExecDir Name: '$($VenvExecDir.Name)"
|
| 176 |
+
|
| 177 |
+
# Set values required in priority: CmdLine, ConfigFile, Default
|
| 178 |
+
# First, get the location of the virtual environment, it might not be
|
| 179 |
+
# VenvExecDir if specified on the command line.
|
| 180 |
+
if ($VenvDir) {
|
| 181 |
+
Write-Verbose "VenvDir given as parameter, using '$VenvDir' to determine values"
|
| 182 |
+
}
|
| 183 |
+
else {
|
| 184 |
+
Write-Verbose "VenvDir not given as a parameter, using parent directory name as VenvDir."
|
| 185 |
+
$VenvDir = $VenvExecDir.Parent.FullName.TrimEnd("\\/")
|
| 186 |
+
Write-Verbose "VenvDir=$VenvDir"
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
# Next, read the `pyvenv.cfg` file to determine any required value such
|
| 190 |
+
# as `prompt`.
|
| 191 |
+
$pyvenvCfg = Get-PyVenvConfig -ConfigDir $VenvDir
|
| 192 |
+
|
| 193 |
+
# Next, set the prompt from the command line, or the config file, or
|
| 194 |
+
# just use the name of the virtual environment folder.
|
| 195 |
+
if ($Prompt) {
|
| 196 |
+
Write-Verbose "Prompt specified as argument, using '$Prompt'"
|
| 197 |
+
}
|
| 198 |
+
else {
|
| 199 |
+
Write-Verbose "Prompt not specified as argument to script, checking pyvenv.cfg value"
|
| 200 |
+
if ($pyvenvCfg -and $pyvenvCfg['prompt']) {
|
| 201 |
+
Write-Verbose " Setting based on value in pyvenv.cfg='$($pyvenvCfg['prompt'])'"
|
| 202 |
+
$Prompt = $pyvenvCfg['prompt'];
|
| 203 |
+
}
|
| 204 |
+
else {
|
| 205 |
+
Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virtual environment)"
|
| 206 |
+
Write-Verbose " Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'"
|
| 207 |
+
$Prompt = Split-Path -Path $venvDir -Leaf
|
| 208 |
+
}
|
| 209 |
+
}
|
| 210 |
+
|
| 211 |
+
Write-Verbose "Prompt = '$Prompt'"
|
| 212 |
+
Write-Verbose "VenvDir='$VenvDir'"
|
| 213 |
+
|
| 214 |
+
# Deactivate any currently active virtual environment, but leave the
|
| 215 |
+
# deactivate function in place.
|
| 216 |
+
deactivate -nondestructive
|
| 217 |
+
|
| 218 |
+
# Now set the environment variable VIRTUAL_ENV, used by many tools to determine
|
| 219 |
+
# that there is an activated venv.
|
| 220 |
+
$env:VIRTUAL_ENV = $VenvDir
|
| 221 |
+
|
| 222 |
+
if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) {
|
| 223 |
+
|
| 224 |
+
Write-Verbose "Setting prompt to '$Prompt'"
|
| 225 |
+
|
| 226 |
+
# Set the prompt to include the env name
|
| 227 |
+
# Make sure _OLD_VIRTUAL_PROMPT is global
|
| 228 |
+
function global:_OLD_VIRTUAL_PROMPT { "" }
|
| 229 |
+
Copy-Item -Path function:prompt -Destination function:_OLD_VIRTUAL_PROMPT
|
| 230 |
+
New-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Description "Python virtual environment prompt prefix" -Scope Global -Option ReadOnly -Visibility Public -Value $Prompt
|
| 231 |
+
|
| 232 |
+
function global:prompt {
|
| 233 |
+
Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) "
|
| 234 |
+
_OLD_VIRTUAL_PROMPT
|
| 235 |
+
}
|
| 236 |
+
$env:VIRTUAL_ENV_PROMPT = $Prompt
|
| 237 |
+
}
|
| 238 |
+
|
| 239 |
+
# Clear PYTHONHOME
|
| 240 |
+
if (Test-Path -Path Env:PYTHONHOME) {
|
| 241 |
+
Copy-Item -Path Env:PYTHONHOME -Destination Env:_OLD_VIRTUAL_PYTHONHOME
|
| 242 |
+
Remove-Item -Path Env:PYTHONHOME
|
| 243 |
+
}
|
| 244 |
+
|
| 245 |
+
# Add the venv to the PATH
|
| 246 |
+
Copy-Item -Path Env:PATH -Destination Env:_OLD_VIRTUAL_PATH
|
| 247 |
+
$Env:PATH = "$VenvExecDir$([System.IO.Path]::PathSeparator)$Env:PATH"
|
.venv/bin/activate
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file must be used with "source bin/activate" *from bash*
|
| 2 |
+
# you cannot run it directly
|
| 3 |
+
|
| 4 |
+
deactivate () {
|
| 5 |
+
# reset old environment variables
|
| 6 |
+
if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then
|
| 7 |
+
PATH="${_OLD_VIRTUAL_PATH:-}"
|
| 8 |
+
export PATH
|
| 9 |
+
unset _OLD_VIRTUAL_PATH
|
| 10 |
+
fi
|
| 11 |
+
if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then
|
| 12 |
+
PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}"
|
| 13 |
+
export PYTHONHOME
|
| 14 |
+
unset _OLD_VIRTUAL_PYTHONHOME
|
| 15 |
+
fi
|
| 16 |
+
|
| 17 |
+
# Call hash to forget past commands. Without forgetting
|
| 18 |
+
# past commands the $PATH changes we made may not be respected
|
| 19 |
+
hash -r 2> /dev/null
|
| 20 |
+
|
| 21 |
+
if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then
|
| 22 |
+
PS1="${_OLD_VIRTUAL_PS1:-}"
|
| 23 |
+
export PS1
|
| 24 |
+
unset _OLD_VIRTUAL_PS1
|
| 25 |
+
fi
|
| 26 |
+
|
| 27 |
+
unset VIRTUAL_ENV
|
| 28 |
+
unset VIRTUAL_ENV_PROMPT
|
| 29 |
+
if [ ! "${1:-}" = "nondestructive" ] ; then
|
| 30 |
+
# Self destruct!
|
| 31 |
+
unset -f deactivate
|
| 32 |
+
fi
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
# unset irrelevant variables
|
| 36 |
+
deactivate nondestructive
|
| 37 |
+
|
| 38 |
+
VIRTUAL_ENV=/Users/jacoblincool/Documents/GitHub/build-small-hackathon-advisor/.venv
|
| 39 |
+
export VIRTUAL_ENV
|
| 40 |
+
|
| 41 |
+
_OLD_VIRTUAL_PATH="$PATH"
|
| 42 |
+
PATH="$VIRTUAL_ENV/"bin":$PATH"
|
| 43 |
+
export PATH
|
| 44 |
+
|
| 45 |
+
# unset PYTHONHOME if set
|
| 46 |
+
# this will fail if PYTHONHOME is set to the empty string (which is bad anyway)
|
| 47 |
+
# could use `if (set -u; : $PYTHONHOME) ;` in bash
|
| 48 |
+
if [ -n "${PYTHONHOME:-}" ] ; then
|
| 49 |
+
_OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}"
|
| 50 |
+
unset PYTHONHOME
|
| 51 |
+
fi
|
| 52 |
+
|
| 53 |
+
if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
|
| 54 |
+
_OLD_VIRTUAL_PS1="${PS1:-}"
|
| 55 |
+
PS1='(.venv) '"${PS1:-}"
|
| 56 |
+
export PS1
|
| 57 |
+
VIRTUAL_ENV_PROMPT='(.venv) '
|
| 58 |
+
export VIRTUAL_ENV_PROMPT
|
| 59 |
+
fi
|
| 60 |
+
|
| 61 |
+
# Call hash to forget past commands. Without forgetting
|
| 62 |
+
# past commands the $PATH changes we made may not be respected
|
| 63 |
+
hash -r 2> /dev/null
|
.venv/bin/activate.csh
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file must be used with "source bin/activate.csh" *from csh*.
|
| 2 |
+
# You cannot run it directly.
|
| 3 |
+
# Created by Davide Di Blasi <davidedb@gmail.com>.
|
| 4 |
+
# Ported to Python 3.3 venv by Andrew Svetlov <andrew.svetlov@gmail.com>
|
| 5 |
+
|
| 6 |
+
alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; unsetenv VIRTUAL_ENV_PROMPT; test "\!:*" != "nondestructive" && unalias deactivate'
|
| 7 |
+
|
| 8 |
+
# Unset irrelevant variables.
|
| 9 |
+
deactivate nondestructive
|
| 10 |
+
|
| 11 |
+
setenv VIRTUAL_ENV /Users/jacoblincool/Documents/GitHub/build-small-hackathon-advisor/.venv
|
| 12 |
+
|
| 13 |
+
set _OLD_VIRTUAL_PATH="$PATH"
|
| 14 |
+
setenv PATH "$VIRTUAL_ENV/"bin":$PATH"
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
set _OLD_VIRTUAL_PROMPT="$prompt"
|
| 18 |
+
|
| 19 |
+
if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then
|
| 20 |
+
set prompt = '(.venv) '"$prompt"
|
| 21 |
+
setenv VIRTUAL_ENV_PROMPT '(.venv) '
|
| 22 |
+
endif
|
| 23 |
+
|
| 24 |
+
alias pydoc python -m pydoc
|
| 25 |
+
|
| 26 |
+
rehash
|
.venv/bin/activate.fish
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file must be used with "source <venv>/bin/activate.fish" *from fish*
|
| 2 |
+
# (https://fishshell.com/); you cannot run it directly.
|
| 3 |
+
|
| 4 |
+
function deactivate -d "Exit virtual environment and return to normal shell environment"
|
| 5 |
+
# reset old environment variables
|
| 6 |
+
if test -n "$_OLD_VIRTUAL_PATH"
|
| 7 |
+
set -gx PATH $_OLD_VIRTUAL_PATH
|
| 8 |
+
set -e _OLD_VIRTUAL_PATH
|
| 9 |
+
end
|
| 10 |
+
if test -n "$_OLD_VIRTUAL_PYTHONHOME"
|
| 11 |
+
set -gx PYTHONHOME $_OLD_VIRTUAL_PYTHONHOME
|
| 12 |
+
set -e _OLD_VIRTUAL_PYTHONHOME
|
| 13 |
+
end
|
| 14 |
+
|
| 15 |
+
if test -n "$_OLD_FISH_PROMPT_OVERRIDE"
|
| 16 |
+
set -e _OLD_FISH_PROMPT_OVERRIDE
|
| 17 |
+
# prevents error when using nested fish instances (Issue #93858)
|
| 18 |
+
if functions -q _old_fish_prompt
|
| 19 |
+
functions -e fish_prompt
|
| 20 |
+
functions -c _old_fish_prompt fish_prompt
|
| 21 |
+
functions -e _old_fish_prompt
|
| 22 |
+
end
|
| 23 |
+
end
|
| 24 |
+
|
| 25 |
+
set -e VIRTUAL_ENV
|
| 26 |
+
set -e VIRTUAL_ENV_PROMPT
|
| 27 |
+
if test "$argv[1]" != "nondestructive"
|
| 28 |
+
# Self-destruct!
|
| 29 |
+
functions -e deactivate
|
| 30 |
+
end
|
| 31 |
+
end
|
| 32 |
+
|
| 33 |
+
# Unset irrelevant variables.
|
| 34 |
+
deactivate nondestructive
|
| 35 |
+
|
| 36 |
+
set -gx VIRTUAL_ENV /Users/jacoblincool/Documents/GitHub/build-small-hackathon-advisor/.venv
|
| 37 |
+
|
| 38 |
+
set -gx _OLD_VIRTUAL_PATH $PATH
|
| 39 |
+
set -gx PATH "$VIRTUAL_ENV/"bin $PATH
|
| 40 |
+
|
| 41 |
+
# Unset PYTHONHOME if set.
|
| 42 |
+
if set -q PYTHONHOME
|
| 43 |
+
set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME
|
| 44 |
+
set -e PYTHONHOME
|
| 45 |
+
end
|
| 46 |
+
|
| 47 |
+
if test -z "$VIRTUAL_ENV_DISABLE_PROMPT"
|
| 48 |
+
# fish uses a function instead of an env var to generate the prompt.
|
| 49 |
+
|
| 50 |
+
# Save the current fish_prompt function as the function _old_fish_prompt.
|
| 51 |
+
functions -c fish_prompt _old_fish_prompt
|
| 52 |
+
|
| 53 |
+
# With the original prompt function renamed, we can override with our own.
|
| 54 |
+
function fish_prompt
|
| 55 |
+
# Save the return status of the last command.
|
| 56 |
+
set -l old_status $status
|
| 57 |
+
|
| 58 |
+
# Output the venv prompt; color taken from the blue of the Python logo.
|
| 59 |
+
printf "%s%s%s" (set_color 4B8BBE) '(.venv) ' (set_color normal)
|
| 60 |
+
|
| 61 |
+
# Restore the return status of the previous command.
|
| 62 |
+
echo "exit $old_status" | .
|
| 63 |
+
# Output the original/"old" prompt.
|
| 64 |
+
_old_fish_prompt
|
| 65 |
+
end
|
| 66 |
+
|
| 67 |
+
set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV"
|
| 68 |
+
set -gx VIRTUAL_ENV_PROMPT '(.venv) '
|
| 69 |
+
end
|
.venv/bin/f2py
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/Users/jacoblincool/Documents/GitHub/build-small-hackathon-advisor/.venv/bin/python
|
| 2 |
+
import sys
|
| 3 |
+
from numpy.f2py.f2py2e import main
|
| 4 |
+
if __name__ == '__main__':
|
| 5 |
+
sys.argv[0] = sys.argv[0].removesuffix('.exe')
|
| 6 |
+
sys.exit(main())
|
.venv/bin/fastapi
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/Users/jacoblincool/Documents/GitHub/build-small-hackathon-advisor/.venv/bin/python
|
| 2 |
+
import sys
|
| 3 |
+
from fastapi.cli import main
|
| 4 |
+
if __name__ == '__main__':
|
| 5 |
+
sys.argv[0] = sys.argv[0].removesuffix('.exe')
|
| 6 |
+
sys.exit(main())
|
.venv/bin/gradio
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/Users/jacoblincool/Documents/GitHub/build-small-hackathon-advisor/.venv/bin/python
|
| 2 |
+
import sys
|
| 3 |
+
from gradio.cli import cli
|
| 4 |
+
if __name__ == '__main__':
|
| 5 |
+
sys.argv[0] = sys.argv[0].removesuffix('.exe')
|
| 6 |
+
sys.exit(cli())
|
.venv/bin/hf
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/Users/jacoblincool/Documents/GitHub/build-small-hackathon-advisor/.venv/bin/python
|
| 2 |
+
import sys
|
| 3 |
+
from huggingface_hub.cli.hf import main
|
| 4 |
+
if __name__ == '__main__':
|
| 5 |
+
sys.argv[0] = sys.argv[0].removesuffix('.exe')
|
| 6 |
+
sys.exit(main())
|
.venv/bin/hf-gradio
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/Users/jacoblincool/Documents/GitHub/build-small-hackathon-advisor/.venv/bin/python
|
| 2 |
+
import sys
|
| 3 |
+
from hf_gradio.cli import app
|
| 4 |
+
if __name__ == '__main__':
|
| 5 |
+
sys.argv[0] = sys.argv[0].removesuffix('.exe')
|
| 6 |
+
sys.exit(app())
|
.venv/bin/httpx
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/Users/jacoblincool/Documents/GitHub/build-small-hackathon-advisor/.venv/bin/python
|
| 2 |
+
import sys
|
| 3 |
+
from httpx import main
|
| 4 |
+
if __name__ == '__main__':
|
| 5 |
+
sys.argv[0] = sys.argv[0].removesuffix('.exe')
|
| 6 |
+
sys.exit(main())
|
.venv/bin/huggingface-cli
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/Users/jacoblincool/Documents/GitHub/build-small-hackathon-advisor/.venv/bin/python
|
| 2 |
+
import sys
|
| 3 |
+
from huggingface_hub.cli.deprecated_cli import main
|
| 4 |
+
if __name__ == '__main__':
|
| 5 |
+
sys.argv[0] = sys.argv[0].removesuffix('.exe')
|
| 6 |
+
sys.exit(main())
|
.venv/bin/idna
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/Users/jacoblincool/Documents/GitHub/build-small-hackathon-advisor/.venv/bin/python
|
| 2 |
+
import sys
|
| 3 |
+
from idna.cli import main
|
| 4 |
+
if __name__ == '__main__':
|
| 5 |
+
sys.argv[0] = sys.argv[0].removesuffix('.exe')
|
| 6 |
+
sys.exit(main())
|
.venv/bin/markdown-it
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/Users/jacoblincool/Documents/GitHub/build-small-hackathon-advisor/.venv/bin/python
|
| 2 |
+
import sys
|
| 3 |
+
from markdown_it.cli.parse import main
|
| 4 |
+
if __name__ == '__main__':
|
| 5 |
+
sys.argv[0] = sys.argv[0].removesuffix('.exe')
|
| 6 |
+
sys.exit(main())
|
.venv/bin/numpy-config
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/Users/jacoblincool/Documents/GitHub/build-small-hackathon-advisor/.venv/bin/python
|
| 2 |
+
import sys
|
| 3 |
+
from numpy._configtool import main
|
| 4 |
+
if __name__ == '__main__':
|
| 5 |
+
sys.argv[0] = sys.argv[0].removesuffix('.exe')
|
| 6 |
+
sys.exit(main())
|
.venv/bin/pip
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/Users/jacoblincool/Documents/GitHub/build-small-hackathon-advisor/.venv/bin/python
|
| 2 |
+
import sys
|
| 3 |
+
from pip._internal.cli.main import main
|
| 4 |
+
if __name__ == '__main__':
|
| 5 |
+
if sys.argv[0].endswith('.exe'):
|
| 6 |
+
sys.argv[0] = sys.argv[0][:-4]
|
| 7 |
+
sys.exit(main())
|
.venv/bin/pip3
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/Users/jacoblincool/Documents/GitHub/build-small-hackathon-advisor/.venv/bin/python
|
| 2 |
+
import sys
|
| 3 |
+
from pip._internal.cli.main import main
|
| 4 |
+
if __name__ == '__main__':
|
| 5 |
+
if sys.argv[0].endswith('.exe'):
|
| 6 |
+
sys.argv[0] = sys.argv[0][:-4]
|
| 7 |
+
sys.exit(main())
|
.venv/bin/pip3.11
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/Users/jacoblincool/Documents/GitHub/build-small-hackathon-advisor/.venv/bin/python
|
| 2 |
+
import sys
|
| 3 |
+
from pip._internal.cli.main import main
|
| 4 |
+
if __name__ == '__main__':
|
| 5 |
+
if sys.argv[0].endswith('.exe'):
|
| 6 |
+
sys.argv[0] = sys.argv[0][:-4]
|
| 7 |
+
sys.exit(main())
|
.venv/bin/playwright
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/Users/jacoblincool/Documents/GitHub/build-small-hackathon-advisor/.venv/bin/python3
|
| 2 |
+
# -*- coding: utf-8 -*-
|
| 3 |
+
import sys
|
| 4 |
+
from playwright.__main__ import main
|
| 5 |
+
if __name__ == "__main__":
|
| 6 |
+
if sys.argv[0].endswith("-script.pyw"):
|
| 7 |
+
sys.argv[0] = sys.argv[0][:-11]
|
| 8 |
+
elif sys.argv[0].endswith(".exe"):
|
| 9 |
+
sys.argv[0] = sys.argv[0][:-4]
|
| 10 |
+
sys.exit(main())
|
.venv/bin/py.test
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/Users/jacoblincool/Documents/GitHub/build-small-hackathon-advisor/.venv/bin/python3
|
| 2 |
+
# -*- coding: utf-8 -*-
|
| 3 |
+
import sys
|
| 4 |
+
from pytest import console_main
|
| 5 |
+
if __name__ == "__main__":
|
| 6 |
+
if sys.argv[0].endswith("-script.pyw"):
|
| 7 |
+
sys.argv[0] = sys.argv[0][:-11]
|
| 8 |
+
elif sys.argv[0].endswith(".exe"):
|
| 9 |
+
sys.argv[0] = sys.argv[0][:-4]
|
| 10 |
+
sys.exit(console_main())
|
.venv/bin/pygmentize
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/Users/jacoblincool/Documents/GitHub/build-small-hackathon-advisor/.venv/bin/python
|
| 2 |
+
import sys
|
| 3 |
+
from pygments.cmdline import main
|
| 4 |
+
if __name__ == '__main__':
|
| 5 |
+
sys.argv[0] = sys.argv[0].removesuffix('.exe')
|
| 6 |
+
sys.exit(main())
|
.venv/bin/pytest
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/Users/jacoblincool/Documents/GitHub/build-small-hackathon-advisor/.venv/bin/python3
|
| 2 |
+
# -*- coding: utf-8 -*-
|
| 3 |
+
import sys
|
| 4 |
+
from pytest import console_main
|
| 5 |
+
if __name__ == "__main__":
|
| 6 |
+
if sys.argv[0].endswith("-script.pyw"):
|
| 7 |
+
sys.argv[0] = sys.argv[0][:-11]
|
| 8 |
+
elif sys.argv[0].endswith(".exe"):
|
| 9 |
+
sys.argv[0] = sys.argv[0][:-4]
|
| 10 |
+
sys.exit(console_main())
|
.venv/bin/python
ADDED
|
Binary file (52.6 kB). View file
|
|
|
.venv/bin/python3
ADDED
|
Binary file (52.6 kB). View file
|
|
|
.venv/bin/python3.11
ADDED
|
Binary file (52.6 kB). View file
|
|
|
.venv/bin/tiny-agents
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/Users/jacoblincool/Documents/GitHub/build-small-hackathon-advisor/.venv/bin/python
|
| 2 |
+
import sys
|
| 3 |
+
from huggingface_hub.inference._mcp.cli import app
|
| 4 |
+
if __name__ == '__main__':
|
| 5 |
+
sys.argv[0] = sys.argv[0].removesuffix('.exe')
|
| 6 |
+
sys.exit(app())
|
.venv/bin/tqdm
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/Users/jacoblincool/Documents/GitHub/build-small-hackathon-advisor/.venv/bin/python
|
| 2 |
+
import sys
|
| 3 |
+
from tqdm.cli import main
|
| 4 |
+
if __name__ == '__main__':
|
| 5 |
+
sys.argv[0] = sys.argv[0].removesuffix('.exe')
|
| 6 |
+
sys.exit(main())
|
.venv/bin/typer
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/Users/jacoblincool/Documents/GitHub/build-small-hackathon-advisor/.venv/bin/python
|
| 2 |
+
import sys
|
| 3 |
+
from typer.cli import main
|
| 4 |
+
if __name__ == '__main__':
|
| 5 |
+
sys.argv[0] = sys.argv[0].removesuffix('.exe')
|
| 6 |
+
sys.exit(main())
|
.venv/bin/upload_theme
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/Users/jacoblincool/Documents/GitHub/build-small-hackathon-advisor/.venv/bin/python
|
| 2 |
+
import sys
|
| 3 |
+
from gradio.themes.upload_theme import main
|
| 4 |
+
if __name__ == '__main__':
|
| 5 |
+
sys.argv[0] = sys.argv[0].removesuffix('.exe')
|
| 6 |
+
sys.exit(main())
|
.venv/bin/uvicorn
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/Users/jacoblincool/Documents/GitHub/build-small-hackathon-advisor/.venv/bin/python
|
| 2 |
+
import sys
|
| 3 |
+
from uvicorn.main import main
|
| 4 |
+
if __name__ == '__main__':
|
| 5 |
+
sys.argv[0] = sys.argv[0].removesuffix('.exe')
|
| 6 |
+
sys.exit(main())
|
.venv/include/site/python3.11/greenlet/greenlet.h
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* -*- indent-tabs-mode: nil; tab-width: 4; -*- */
|
| 2 |
+
|
| 3 |
+
/* Greenlet object interface */
|
| 4 |
+
|
| 5 |
+
#ifndef Py_GREENLETOBJECT_H
|
| 6 |
+
#define Py_GREENLETOBJECT_H
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
#include <Python.h>
|
| 10 |
+
|
| 11 |
+
#ifdef __cplusplus
|
| 12 |
+
extern "C" {
|
| 13 |
+
#endif
|
| 14 |
+
|
| 15 |
+
/* This is deprecated and undocumented. It does not change. */
|
| 16 |
+
#define GREENLET_VERSION "1.0.0"
|
| 17 |
+
|
| 18 |
+
#ifndef GREENLET_MODULE
|
| 19 |
+
#define implementation_ptr_t void*
|
| 20 |
+
#endif
|
| 21 |
+
|
| 22 |
+
typedef struct _greenlet {
|
| 23 |
+
PyObject_HEAD
|
| 24 |
+
PyObject* weakreflist;
|
| 25 |
+
PyObject* dict;
|
| 26 |
+
implementation_ptr_t pimpl;
|
| 27 |
+
} PyGreenlet;
|
| 28 |
+
|
| 29 |
+
#define PyGreenlet_Check(op) (op && PyObject_TypeCheck(op, &PyGreenlet_Type))
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
/* C API functions */
|
| 33 |
+
|
| 34 |
+
/* Total number of symbols that are exported */
|
| 35 |
+
#define PyGreenlet_API_pointers 12
|
| 36 |
+
|
| 37 |
+
#define PyGreenlet_Type_NUM 0
|
| 38 |
+
#define PyExc_GreenletError_NUM 1
|
| 39 |
+
#define PyExc_GreenletExit_NUM 2
|
| 40 |
+
|
| 41 |
+
#define PyGreenlet_New_NUM 3
|
| 42 |
+
#define PyGreenlet_GetCurrent_NUM 4
|
| 43 |
+
#define PyGreenlet_Throw_NUM 5
|
| 44 |
+
#define PyGreenlet_Switch_NUM 6
|
| 45 |
+
#define PyGreenlet_SetParent_NUM 7
|
| 46 |
+
|
| 47 |
+
#define PyGreenlet_MAIN_NUM 8
|
| 48 |
+
#define PyGreenlet_STARTED_NUM 9
|
| 49 |
+
#define PyGreenlet_ACTIVE_NUM 10
|
| 50 |
+
#define PyGreenlet_GET_PARENT_NUM 11
|
| 51 |
+
|
| 52 |
+
#ifndef GREENLET_MODULE
|
| 53 |
+
/* This section is used by modules that uses the greenlet C API */
|
| 54 |
+
static void** _PyGreenlet_API = NULL;
|
| 55 |
+
|
| 56 |
+
# define PyGreenlet_Type \
|
| 57 |
+
(*(PyTypeObject*)_PyGreenlet_API[PyGreenlet_Type_NUM])
|
| 58 |
+
|
| 59 |
+
# define PyExc_GreenletError \
|
| 60 |
+
((PyObject*)_PyGreenlet_API[PyExc_GreenletError_NUM])
|
| 61 |
+
|
| 62 |
+
# define PyExc_GreenletExit \
|
| 63 |
+
((PyObject*)_PyGreenlet_API[PyExc_GreenletExit_NUM])
|
| 64 |
+
|
| 65 |
+
/*
|
| 66 |
+
* PyGreenlet_New(PyObject *args)
|
| 67 |
+
*
|
| 68 |
+
* greenlet.greenlet(run, parent=None)
|
| 69 |
+
*/
|
| 70 |
+
# define PyGreenlet_New \
|
| 71 |
+
(*(PyGreenlet * (*)(PyObject * run, PyGreenlet * parent)) \
|
| 72 |
+
_PyGreenlet_API[PyGreenlet_New_NUM])
|
| 73 |
+
|
| 74 |
+
/*
|
| 75 |
+
* PyGreenlet_GetCurrent(void)
|
| 76 |
+
*
|
| 77 |
+
* greenlet.getcurrent()
|
| 78 |
+
*/
|
| 79 |
+
# define PyGreenlet_GetCurrent \
|
| 80 |
+
(*(PyGreenlet * (*)(void)) _PyGreenlet_API[PyGreenlet_GetCurrent_NUM])
|
| 81 |
+
|
| 82 |
+
/*
|
| 83 |
+
* PyGreenlet_Throw(
|
| 84 |
+
* PyGreenlet *greenlet,
|
| 85 |
+
* PyObject *typ,
|
| 86 |
+
* PyObject *val,
|
| 87 |
+
* PyObject *tb)
|
| 88 |
+
*
|
| 89 |
+
* g.throw(...)
|
| 90 |
+
*/
|
| 91 |
+
# define PyGreenlet_Throw \
|
| 92 |
+
(*(PyObject * (*)(PyGreenlet * self, \
|
| 93 |
+
PyObject * typ, \
|
| 94 |
+
PyObject * val, \
|
| 95 |
+
PyObject * tb)) \
|
| 96 |
+
_PyGreenlet_API[PyGreenlet_Throw_NUM])
|
| 97 |
+
|
| 98 |
+
/*
|
| 99 |
+
* PyGreenlet_Switch(PyGreenlet *greenlet, PyObject *args)
|
| 100 |
+
*
|
| 101 |
+
* g.switch(*args, **kwargs)
|
| 102 |
+
*/
|
| 103 |
+
# define PyGreenlet_Switch \
|
| 104 |
+
(*(PyObject * \
|
| 105 |
+
(*)(PyGreenlet * greenlet, PyObject * args, PyObject * kwargs)) \
|
| 106 |
+
_PyGreenlet_API[PyGreenlet_Switch_NUM])
|
| 107 |
+
|
| 108 |
+
/*
|
| 109 |
+
* PyGreenlet_SetParent(PyObject *greenlet, PyObject *new_parent)
|
| 110 |
+
*
|
| 111 |
+
* g.parent = new_parent
|
| 112 |
+
*/
|
| 113 |
+
# define PyGreenlet_SetParent \
|
| 114 |
+
(*(int (*)(PyGreenlet * greenlet, PyGreenlet * nparent)) \
|
| 115 |
+
_PyGreenlet_API[PyGreenlet_SetParent_NUM])
|
| 116 |
+
|
| 117 |
+
/*
|
| 118 |
+
* PyGreenlet_GetParent(PyObject* greenlet)
|
| 119 |
+
*
|
| 120 |
+
* return greenlet.parent;
|
| 121 |
+
*
|
| 122 |
+
* This could return NULL even if there is no exception active.
|
| 123 |
+
* If it does not return NULL, you are responsible for decrementing the
|
| 124 |
+
* reference count.
|
| 125 |
+
*/
|
| 126 |
+
# define PyGreenlet_GetParent \
|
| 127 |
+
(*(PyGreenlet* (*)(PyGreenlet*)) \
|
| 128 |
+
_PyGreenlet_API[PyGreenlet_GET_PARENT_NUM])
|
| 129 |
+
|
| 130 |
+
/*
|
| 131 |
+
* deprecated, undocumented alias.
|
| 132 |
+
*/
|
| 133 |
+
# define PyGreenlet_GET_PARENT PyGreenlet_GetParent
|
| 134 |
+
|
| 135 |
+
# define PyGreenlet_MAIN \
|
| 136 |
+
(*(int (*)(PyGreenlet*)) \
|
| 137 |
+
_PyGreenlet_API[PyGreenlet_MAIN_NUM])
|
| 138 |
+
|
| 139 |
+
# define PyGreenlet_STARTED \
|
| 140 |
+
(*(int (*)(PyGreenlet*)) \
|
| 141 |
+
_PyGreenlet_API[PyGreenlet_STARTED_NUM])
|
| 142 |
+
|
| 143 |
+
# define PyGreenlet_ACTIVE \
|
| 144 |
+
(*(int (*)(PyGreenlet*)) \
|
| 145 |
+
_PyGreenlet_API[PyGreenlet_ACTIVE_NUM])
|
| 146 |
+
|
| 147 |
+
|
| 148 |
+
|
| 149 |
+
|
| 150 |
+
/* Macro that imports greenlet and initializes C API */
|
| 151 |
+
/* NOTE: This has actually moved to ``greenlet._greenlet._C_API``, but we
|
| 152 |
+
keep the older definition to be sure older code that might have a copy of
|
| 153 |
+
the header still works. */
|
| 154 |
+
# define PyGreenlet_Import() \
|
| 155 |
+
{ \
|
| 156 |
+
_PyGreenlet_API = (void**)PyCapsule_Import("greenlet._C_API", 0); \
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
#endif /* GREENLET_MODULE */
|
| 160 |
+
|
| 161 |
+
#ifdef __cplusplus
|
| 162 |
+
}
|
| 163 |
+
#endif
|
| 164 |
+
#endif /* !Py_GREENLETOBJECT_H */
|
.venv/lib/python3.11/site-packages/PIL/.dylibs/libXau.6.dylib
ADDED
|
Binary file (70 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/PIL/.dylibs/libavif.16.4.1.dylib
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5bb2a5b4e7d256c423b103f708b39cffa4bf5e1ad51142dfb374e6707aad2866
|
| 3 |
+
size 3016336
|
.venv/lib/python3.11/site-packages/PIL/.dylibs/libbrotlicommon.1.2.0.dylib
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:851cb0b0e16b970aa6b53fbf36daa629e62f10e3a906537ac772cc7c90d82265
|
| 3 |
+
size 201184
|
.venv/lib/python3.11/site-packages/PIL/.dylibs/libbrotlidec.1.2.0.dylib
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:800767d7e41e89a33a9ce8d4bcd2e24f01cbd4634d1b56d199a4de73d0e34f99
|
| 3 |
+
size 104560
|
.venv/lib/python3.11/site-packages/PIL/.dylibs/libfreetype.6.dylib
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:037d77e2ad8f3a12b17a8bb31f1f95bb8ebc4f74acb925296979516aa23b5a4e
|
| 3 |
+
size 1127328
|
.venv/lib/python3.11/site-packages/PIL/.dylibs/libharfbuzz.0.dylib
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:af983dab86ae6e2434619fee8112f7c2e17d915d21f5a28e8e66f0c2ebbe56e3
|
| 3 |
+
size 1790224
|
.venv/lib/python3.11/site-packages/PIL/.dylibs/libjpeg.62.4.0.dylib
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ab8d3e15a237c55935b8a82b1e9525cda6c20aa408a0bd3207644f3cadc5e9e6
|
| 3 |
+
size 653536
|
.venv/lib/python3.11/site-packages/PIL/.dylibs/liblcms2.2.dylib
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:59f8f68369eb5e77a005a49ae4e3017ca92d119aef89c9787db18a84aa50985e
|
| 3 |
+
size 524672
|
.venv/lib/python3.11/site-packages/PIL/.dylibs/liblzma.5.dylib
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f01f74e8132aa74aec363fb2d03eb75266c58784a47bcd62425ba084881d6e56
|
| 3 |
+
size 325120
|
.venv/lib/python3.11/site-packages/PIL/.dylibs/libopenjp2.2.5.4.dylib
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f296c969caed39463463caf2252cf4c85190302d079532845aa4e4cd4dd38e29
|
| 3 |
+
size 666432
|
.venv/lib/python3.11/site-packages/PIL/.dylibs/libpng16.16.dylib
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:31fac5451d330df22b2c02e1fb0513efcf6e0565eb63bdedb1dcac4b5a910b76
|
| 3 |
+
size 344368
|
.venv/lib/python3.11/site-packages/PIL/.dylibs/libsharpyuv.0.dylib
ADDED
|
Binary file (86.2 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/PIL/.dylibs/libtiff.6.dylib
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3aad279ff4be1d2548327838d8304b4cc1c6fdb32e66e32c387a428d6dad09e3
|
| 3 |
+
size 770432
|