Hemil4 commited on
Commit
4e56cc5
·
verified ·
1 Parent(s): 9addd2b

Upload folder using huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +195 -0
  2. __pycache__/free_gaia_agent.cpython-312.pyc +0 -0
  3. free_gaia_agent.py +614 -0
  4. free_gaia_env/bin/Activate.ps1 +247 -0
  5. free_gaia_env/bin/activate +71 -0
  6. free_gaia_env/bin/activate.csh +27 -0
  7. free_gaia_env/bin/activate.fish +69 -0
  8. free_gaia_env/bin/datasets-cli +10 -0
  9. free_gaia_env/bin/f2py +10 -0
  10. free_gaia_env/bin/get_gprof +75 -0
  11. free_gaia_env/bin/get_objgraph +54 -0
  12. free_gaia_env/bin/huggingface-cli +10 -0
  13. free_gaia_env/bin/normalizer +10 -0
  14. free_gaia_env/bin/numpy-config +10 -0
  15. free_gaia_env/bin/pip +10 -0
  16. free_gaia_env/bin/pip3 +10 -0
  17. free_gaia_env/bin/pip3.12 +10 -0
  18. free_gaia_env/bin/python +3 -0
  19. free_gaia_env/bin/python3 +3 -0
  20. free_gaia_env/bin/python3.12 +3 -0
  21. free_gaia_env/bin/tiny-agents +10 -0
  22. free_gaia_env/bin/tqdm +10 -0
  23. free_gaia_env/bin/undill +22 -0
  24. free_gaia_env/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/INSTALLER +1 -0
  25. free_gaia_env/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/LICENSE +20 -0
  26. free_gaia_env/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/METADATA +46 -0
  27. free_gaia_env/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/RECORD +43 -0
  28. free_gaia_env/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/WHEEL +5 -0
  29. free_gaia_env/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/top_level.txt +2 -0
  30. free_gaia_env/lib/python3.12/site-packages/__pycache__/six.cpython-312.pyc +0 -0
  31. free_gaia_env/lib/python3.12/site-packages/__pycache__/typing_extensions.cpython-312.pyc +3 -0
  32. free_gaia_env/lib/python3.12/site-packages/_multiprocess/__init__.py +8 -0
  33. free_gaia_env/lib/python3.12/site-packages/_multiprocess/__pycache__/__init__.cpython-312.pyc +0 -0
  34. free_gaia_env/lib/python3.12/site-packages/_yaml/__init__.py +33 -0
  35. free_gaia_env/lib/python3.12/site-packages/_yaml/__pycache__/__init__.cpython-312.pyc +0 -0
  36. free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs-2.6.1.dist-info/INSTALLER +1 -0
  37. free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs-2.6.1.dist-info/LICENSE +279 -0
  38. free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs-2.6.1.dist-info/METADATA +123 -0
  39. free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs-2.6.1.dist-info/RECORD +16 -0
  40. free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs-2.6.1.dist-info/WHEEL +4 -0
  41. free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs/__init__.py +14 -0
  42. free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs/__pycache__/__init__.cpython-312.pyc +0 -0
  43. free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs/__pycache__/_staggered.cpython-312.pyc +0 -0
  44. free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs/__pycache__/impl.cpython-312.pyc +0 -0
  45. free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs/__pycache__/types.cpython-312.pyc +0 -0
  46. free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs/__pycache__/utils.cpython-312.pyc +0 -0
  47. free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs/_staggered.py +207 -0
  48. free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs/impl.py +259 -0
  49. free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs/py.typed +0 -0
  50. free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs/types.py +17 -0
.gitattributes CHANGED
@@ -33,3 +33,198 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ free_gaia_env/bin/python filter=lfs diff=lfs merge=lfs -text
37
+ free_gaia_env/bin/python3 filter=lfs diff=lfs merge=lfs -text
38
+ free_gaia_env/bin/python3.12 filter=lfs diff=lfs merge=lfs -text
39
+ free_gaia_env/lib/python3.12/site-packages/__pycache__/typing_extensions.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
40
+ free_gaia_env/lib/python3.12/site-packages/aiohttp/_http_parser.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
41
+ free_gaia_env/lib/python3.12/site-packages/aiohttp/_websocket/reader_c.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
42
+ free_gaia_env/lib/python3.12/site-packages/bs4/__pycache__/element.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
43
+ free_gaia_env/lib/python3.12/site-packages/charset_normalizer/md.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
44
+ free_gaia_env/lib/python3.12/site-packages/charset_normalizer/md__mypyc.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
45
+ free_gaia_env/lib/python3.12/site-packages/datasets/__pycache__/arrow_dataset.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
46
+ free_gaia_env/lib/python3.12/site-packages/datasets/__pycache__/dataset_dict.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
47
+ free_gaia_env/lib/python3.12/site-packages/datasets/__pycache__/iterable_dataset.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
48
+ free_gaia_env/lib/python3.12/site-packages/datasets/__pycache__/table.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
49
+ free_gaia_env/lib/python3.12/site-packages/datasets/features/__pycache__/features.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
50
+ free_gaia_env/lib/python3.12/site-packages/dill/__pycache__/_dill.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
51
+ free_gaia_env/lib/python3.12/site-packages/frozenlist/_frozenlist.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
52
+ free_gaia_env/lib/python3.12/site-packages/hf_xet/hf_xet.abi3.so filter=lfs diff=lfs merge=lfs -text
53
+ free_gaia_env/lib/python3.12/site-packages/huggingface_hub/__pycache__/hf_api.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
54
+ free_gaia_env/lib/python3.12/site-packages/huggingface_hub/inference/__pycache__/_client.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
55
+ free_gaia_env/lib/python3.12/site-packages/huggingface_hub/inference/_generated/__pycache__/_async_client.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
56
+ free_gaia_env/lib/python3.12/site-packages/idna/__pycache__/uts46data.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
57
+ free_gaia_env/lib/python3.12/site-packages/multidict/_multidict.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
58
+ free_gaia_env/lib/python3.12/site-packages/multiprocess/tests/__pycache__/__init__.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
59
+ free_gaia_env/lib/python3.12/site-packages/numpy/_core/__pycache__/_add_newdocs.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
60
+ free_gaia_env/lib/python3.12/site-packages/numpy/_core/__pycache__/fromnumeric.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
61
+ free_gaia_env/lib/python3.12/site-packages/numpy/_core/_multiarray_tests.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
62
+ free_gaia_env/lib/python3.12/site-packages/numpy/_core/_multiarray_umath.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
63
+ free_gaia_env/lib/python3.12/site-packages/numpy/_core/_simd.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
64
+ free_gaia_env/lib/python3.12/site-packages/numpy/_core/tests/__pycache__/test_datetime.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
65
+ free_gaia_env/lib/python3.12/site-packages/numpy/_core/tests/__pycache__/test_dtype.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
66
+ free_gaia_env/lib/python3.12/site-packages/numpy/_core/tests/__pycache__/test_multiarray.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
67
+ free_gaia_env/lib/python3.12/site-packages/numpy/_core/tests/__pycache__/test_nditer.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
68
+ free_gaia_env/lib/python3.12/site-packages/numpy/_core/tests/__pycache__/test_numeric.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
69
+ free_gaia_env/lib/python3.12/site-packages/numpy/_core/tests/__pycache__/test_regression.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
70
+ free_gaia_env/lib/python3.12/site-packages/numpy/_core/tests/__pycache__/test_ufunc.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
71
+ free_gaia_env/lib/python3.12/site-packages/numpy/_core/tests/__pycache__/test_umath.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
72
+ free_gaia_env/lib/python3.12/site-packages/numpy/f2py/__pycache__/crackfortran.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
73
+ free_gaia_env/lib/python3.12/site-packages/numpy/fft/_pocketfft_umath.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
74
+ free_gaia_env/lib/python3.12/site-packages/numpy/lib/__pycache__/_function_base_impl.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
75
+ free_gaia_env/lib/python3.12/site-packages/numpy/lib/tests/__pycache__/test_function_base.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
76
+ free_gaia_env/lib/python3.12/site-packages/numpy/lib/tests/__pycache__/test_io.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
77
+ free_gaia_env/lib/python3.12/site-packages/numpy/linalg/__pycache__/_linalg.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
78
+ free_gaia_env/lib/python3.12/site-packages/numpy/linalg/_umath_linalg.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
79
+ free_gaia_env/lib/python3.12/site-packages/numpy/linalg/tests/__pycache__/test_linalg.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
80
+ free_gaia_env/lib/python3.12/site-packages/numpy/ma/__pycache__/core.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
81
+ free_gaia_env/lib/python3.12/site-packages/numpy/ma/tests/__pycache__/test_core.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
82
+ free_gaia_env/lib/python3.12/site-packages/numpy/ma/tests/__pycache__/test_extras.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
83
+ free_gaia_env/lib/python3.12/site-packages/numpy/random/_bounded_integers.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
84
+ free_gaia_env/lib/python3.12/site-packages/numpy/random/_common.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
85
+ free_gaia_env/lib/python3.12/site-packages/numpy/random/_generator.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
86
+ free_gaia_env/lib/python3.12/site-packages/numpy/random/_mt19937.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
87
+ free_gaia_env/lib/python3.12/site-packages/numpy/random/_pcg64.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
88
+ free_gaia_env/lib/python3.12/site-packages/numpy/random/_philox.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
89
+ free_gaia_env/lib/python3.12/site-packages/numpy/random/bit_generator.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
90
+ free_gaia_env/lib/python3.12/site-packages/numpy/random/mtrand.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
91
+ free_gaia_env/lib/python3.12/site-packages/numpy/random/tests/__pycache__/test_generator_mt19937.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
92
+ free_gaia_env/lib/python3.12/site-packages/numpy/random/tests/__pycache__/test_random.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
93
+ free_gaia_env/lib/python3.12/site-packages/numpy/random/tests/__pycache__/test_randomstate.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
94
+ free_gaia_env/lib/python3.12/site-packages/numpy/testing/_private/__pycache__/utils.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
95
+ free_gaia_env/lib/python3.12/site-packages/numpy/testing/tests/__pycache__/test_utils.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
96
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/algos.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
97
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/arrays.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
98
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/groupby.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
99
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/hashing.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
100
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/hashtable.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
101
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/index.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
102
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/internals.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
103
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/interval.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
104
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/join.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
105
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/lib.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
106
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/missing.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
107
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/ops.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
108
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/parsers.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
109
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/properties.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
110
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/reshape.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
111
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/sas.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
112
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/sparse.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
113
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/testing.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
114
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/tslib.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
115
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/tslibs/ccalendar.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
116
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/tslibs/conversion.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
117
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/tslibs/dtypes.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
118
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/tslibs/fields.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
119
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/tslibs/nattype.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
120
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/tslibs/np_datetime.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
121
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/tslibs/offsets.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
122
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/tslibs/parsing.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
123
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/tslibs/period.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
124
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/tslibs/strptime.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
125
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/tslibs/timedeltas.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
126
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/tslibs/timestamps.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
127
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/tslibs/timezones.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
128
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/tslibs/tzconversion.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
129
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/tslibs/vectorized.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
130
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/window/aggregations.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
131
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/window/indexers.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
132
+ free_gaia_env/lib/python3.12/site-packages/pandas/_libs/writers.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
133
+ free_gaia_env/lib/python3.12/site-packages/pandas/core/__pycache__/frame.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
134
+ free_gaia_env/lib/python3.12/site-packages/pandas/core/__pycache__/generic.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
135
+ free_gaia_env/lib/python3.12/site-packages/pandas/core/__pycache__/indexing.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
136
+ free_gaia_env/lib/python3.12/site-packages/pandas/core/__pycache__/resample.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
137
+ free_gaia_env/lib/python3.12/site-packages/pandas/core/__pycache__/series.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
138
+ free_gaia_env/lib/python3.12/site-packages/pandas/core/arrays/__pycache__/categorical.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
139
+ free_gaia_env/lib/python3.12/site-packages/pandas/core/arrays/arrow/__pycache__/array.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
140
+ free_gaia_env/lib/python3.12/site-packages/pandas/core/groupby/__pycache__/generic.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
141
+ free_gaia_env/lib/python3.12/site-packages/pandas/core/groupby/__pycache__/groupby.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
142
+ free_gaia_env/lib/python3.12/site-packages/pandas/core/indexes/__pycache__/base.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
143
+ free_gaia_env/lib/python3.12/site-packages/pandas/core/indexes/__pycache__/multi.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
144
+ free_gaia_env/lib/python3.12/site-packages/pandas/core/strings/__pycache__/accessor.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
145
+ free_gaia_env/lib/python3.12/site-packages/pandas/io/__pycache__/pytables.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
146
+ free_gaia_env/lib/python3.12/site-packages/pandas/io/__pycache__/sql.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
147
+ free_gaia_env/lib/python3.12/site-packages/pandas/io/__pycache__/stata.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
148
+ free_gaia_env/lib/python3.12/site-packages/pandas/io/formats/__pycache__/style.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
149
+ free_gaia_env/lib/python3.12/site-packages/pandas/tests/__pycache__/test_algos.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
150
+ free_gaia_env/lib/python3.12/site-packages/pandas/tests/arithmetic/__pycache__/test_datetime64.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
151
+ free_gaia_env/lib/python3.12/site-packages/pandas/tests/arithmetic/__pycache__/test_timedelta64.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
152
+ free_gaia_env/lib/python3.12/site-packages/pandas/tests/computation/__pycache__/test_eval.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
153
+ free_gaia_env/lib/python3.12/site-packages/pandas/tests/copy_view/__pycache__/test_methods.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
154
+ free_gaia_env/lib/python3.12/site-packages/pandas/tests/dtypes/__pycache__/test_inference.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
155
+ free_gaia_env/lib/python3.12/site-packages/pandas/tests/extension/__pycache__/test_arrow.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
156
+ free_gaia_env/lib/python3.12/site-packages/pandas/tests/frame/__pycache__/test_arithmetic.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
157
+ free_gaia_env/lib/python3.12/site-packages/pandas/tests/frame/__pycache__/test_constructors.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
158
+ free_gaia_env/lib/python3.12/site-packages/pandas/tests/frame/__pycache__/test_reductions.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
159
+ free_gaia_env/lib/python3.12/site-packages/pandas/tests/frame/__pycache__/test_stack_unstack.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
160
+ free_gaia_env/lib/python3.12/site-packages/pandas/tests/frame/indexing/__pycache__/test_indexing.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
161
+ free_gaia_env/lib/python3.12/site-packages/pandas/tests/groupby/__pycache__/test_categorical.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
162
+ free_gaia_env/lib/python3.12/site-packages/pandas/tests/groupby/__pycache__/test_groupby.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
163
+ free_gaia_env/lib/python3.12/site-packages/pandas/tests/indexing/__pycache__/test_loc.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
164
+ free_gaia_env/lib/python3.12/site-packages/pandas/tests/io/__pycache__/test_sql.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
165
+ free_gaia_env/lib/python3.12/site-packages/pandas/tests/io/__pycache__/test_stata.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
166
+ free_gaia_env/lib/python3.12/site-packages/pandas/tests/io/formats/__pycache__/test_format.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
167
+ free_gaia_env/lib/python3.12/site-packages/pandas/tests/io/json/__pycache__/test_pandas.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
168
+ free_gaia_env/lib/python3.12/site-packages/pandas/tests/plotting/__pycache__/test_datetimelike.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
169
+ free_gaia_env/lib/python3.12/site-packages/pandas/tests/plotting/frame/__pycache__/test_frame.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
170
+ free_gaia_env/lib/python3.12/site-packages/pandas/tests/resample/__pycache__/test_datetime_index.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
171
+ free_gaia_env/lib/python3.12/site-packages/pandas/tests/reshape/__pycache__/test_pivot.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
172
+ free_gaia_env/lib/python3.12/site-packages/pandas/tests/reshape/merge/__pycache__/test_merge.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
173
+ free_gaia_env/lib/python3.12/site-packages/pandas/tests/series/__pycache__/test_constructors.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
174
+ free_gaia_env/lib/python3.12/site-packages/pandas/tests/tools/__pycache__/test_to_datetime.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
175
+ free_gaia_env/lib/python3.12/site-packages/pip/_vendor/__pycache__/typing_extensions.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
176
+ free_gaia_env/lib/python3.12/site-packages/pip/_vendor/distlib/t64-arm.exe filter=lfs diff=lfs merge=lfs -text
177
+ free_gaia_env/lib/python3.12/site-packages/pip/_vendor/distlib/t64.exe filter=lfs diff=lfs merge=lfs -text
178
+ free_gaia_env/lib/python3.12/site-packages/pip/_vendor/distlib/w64-arm.exe filter=lfs diff=lfs merge=lfs -text
179
+ free_gaia_env/lib/python3.12/site-packages/pip/_vendor/distlib/w64.exe filter=lfs diff=lfs merge=lfs -text
180
+ free_gaia_env/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/uts46data.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
181
+ free_gaia_env/lib/python3.12/site-packages/pip/_vendor/pkg_resources/__pycache__/__init__.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
182
+ free_gaia_env/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_emoji_codes.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
183
+ free_gaia_env/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/console.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
184
+ free_gaia_env/lib/python3.12/site-packages/propcache/_helpers_c.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
185
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/_acero.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
186
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/_azurefs.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
187
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/_compute.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
188
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/_csv.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
189
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/_dataset.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
190
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/_dataset_orc.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
191
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/_dataset_parquet.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
192
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/_dataset_parquet_encryption.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
193
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/_feather.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
194
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/_flight.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
195
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/_fs.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
196
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/_gcsfs.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
197
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/_hdfs.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
198
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/_json.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
199
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/_orc.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
200
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/_parquet.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
201
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/_parquet_encryption.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
202
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/_pyarrow_cpp_tests.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
203
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/_s3fs.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
204
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/_substrait.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
205
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/lib.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
206
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/libarrow.2000.dylib filter=lfs diff=lfs merge=lfs -text
207
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/libarrow_acero.2000.dylib filter=lfs diff=lfs merge=lfs -text
208
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/libarrow_dataset.2000.dylib filter=lfs diff=lfs merge=lfs -text
209
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/libarrow_flight.2000.dylib filter=lfs diff=lfs merge=lfs -text
210
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/libarrow_python.2000.0.0.dylib filter=lfs diff=lfs merge=lfs -text
211
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/libarrow_python.2000.dylib filter=lfs diff=lfs merge=lfs -text
212
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/libarrow_python.dylib filter=lfs diff=lfs merge=lfs -text
213
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/libarrow_python_flight.2000.0.0.dylib filter=lfs diff=lfs merge=lfs -text
214
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/libarrow_python_flight.2000.dylib filter=lfs diff=lfs merge=lfs -text
215
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/libarrow_python_flight.dylib filter=lfs diff=lfs merge=lfs -text
216
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/libarrow_substrait.2000.dylib filter=lfs diff=lfs merge=lfs -text
217
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/libparquet.2000.dylib filter=lfs diff=lfs merge=lfs -text
218
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/tests/__pycache__/test_array.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
219
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/tests/__pycache__/test_compute.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
220
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/tests/__pycache__/test_convert_builtin.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
221
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/tests/__pycache__/test_csv.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
222
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/tests/__pycache__/test_dataset.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
223
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/tests/__pycache__/test_extension_type.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
224
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/tests/__pycache__/test_flight.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
225
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/tests/__pycache__/test_io.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
226
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/tests/__pycache__/test_pandas.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
227
+ free_gaia_env/lib/python3.12/site-packages/pyarrow/tests/__pycache__/test_table.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
228
+ free_gaia_env/lib/python3.12/site-packages/xxhash/_xxhash.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
229
+ free_gaia_env/lib/python3.12/site-packages/yaml/_yaml.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
230
+ free_gaia_env/lib/python3.12/site-packages/yarl/_quoting_c.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text
__pycache__/free_gaia_agent.cpython-312.pyc ADDED
Binary file (26.6 kB). View file
 
free_gaia_agent.py ADDED
@@ -0,0 +1,614 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Complete Free GAIA Agent - No API Keys Required
3
+ Uses only free web services: DuckDuckGo, Wikipedia, basic math
4
+ """
5
+
6
+ import json
7
+ import requests
8
+ import wikipedia as wiki
9
+ import math
10
+ import re
11
+ import time
12
+ import urllib.parse
13
+ from typing import Dict, List, Optional
14
+ from datasets import load_dataset
15
+ import pandas as pd
16
+ from datetime import datetime
17
+
18
+ class FreeGAIAAgent:
19
+ """
20
+ Complete GAIA agent using only free services
21
+ """
22
+
23
+ def __init__(self):
24
+ print("🆓 Initializing Free GAIA Agent...")
25
+ print(" Using: DuckDuckGo search, Wikipedia, basic math")
26
+ self.results = []
27
+ self.session = requests.Session()
28
+ self.session.headers.update({
29
+ 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36'
30
+ })
31
+
32
+ def free_web_search(self, query: str, max_retries: int = 3) -> str:
33
+ """
34
+ Free web search using multiple free APIs
35
+ """
36
+ for attempt in range(max_retries):
37
+ try:
38
+ # Method 1: DuckDuckGo Instant Answer API
39
+ ddg_result = self._duckduckgo_search(query)
40
+ if ddg_result and "No results" not in ddg_result:
41
+ return f"Web search: {ddg_result}"
42
+
43
+ # Method 2: Try a simple web scraping approach
44
+ scrape_result = self._simple_web_scrape(query)
45
+ if scrape_result:
46
+ return f"Web info: {scrape_result}"
47
+
48
+ time.sleep(1) # Rate limiting
49
+
50
+ except Exception as e:
51
+ print(f" ⚠️ Search attempt {attempt + 1} failed: {e}")
52
+ if attempt < max_retries - 1:
53
+ time.sleep(2)
54
+
55
+ return "Web search unavailable"
56
+
57
+ def _duckduckgo_search(self, query: str) -> str:
58
+ """DuckDuckGo instant answer API"""
59
+ try:
60
+ url = "https://api.duckduckgo.com/"
61
+ params = {
62
+ "q": query,
63
+ "format": "json",
64
+ "pretty": 1,
65
+ "no_redirect": 1,
66
+ "skip_disambig": 1
67
+ }
68
+
69
+ response = self.session.get(url, params=params, timeout=10)
70
+ if response.status_code != 200:
71
+ return ""
72
+
73
+ data = response.json()
74
+
75
+ # Try different response fields in order of preference
76
+ for field in ["AbstractText", "Answer", "Definition"]:
77
+ if data.get(field):
78
+ return data[field]
79
+
80
+ # Try related topics
81
+ if data.get("RelatedTopics"):
82
+ for topic in data["RelatedTopics"][:2]:
83
+ if isinstance(topic, dict) and topic.get("Text"):
84
+ return topic["Text"]
85
+
86
+ return ""
87
+
88
+ except Exception as e:
89
+ return ""
90
+
91
+ def _simple_web_scrape(self, query: str) -> str:
92
+ """Simple web scraping for basic facts"""
93
+ try:
94
+ # Use a free web service that returns structured data
95
+ search_url = f"https://html.duckduckgo.com/html/?q={urllib.parse.quote(query)}"
96
+ response = self.session.get(search_url, timeout=10)
97
+
98
+ if response.status_code == 200:
99
+ # Very basic extraction - just get first meaningful text
100
+ text = response.text
101
+ # This is a simplified approach - in practice you'd use BeautifulSoup
102
+ if "capital" in query.lower() and "is" in text:
103
+ # Extract potential capital city names
104
+ import re
105
+ matches = re.findall(r'\b[A-Z][a-z]+\b', text[:1000])
106
+ for match in matches:
107
+ if len(match) > 2 and match not in ["The", "This", "That", "When"]:
108
+ return f"Possible answer: {match}"
109
+
110
+ return ""
111
+
112
+ except Exception:
113
+ return ""
114
+
115
+ def wikipedia_search(self, query: str) -> str:
116
+ """
117
+ Search Wikipedia with error handling
118
+ """
119
+ try:
120
+ # Clean the query
121
+ clean_query = re.sub(r'[^\w\s]', '', query)
122
+
123
+ # Search for pages
124
+ search_results = wiki.search(clean_query, results=5)
125
+ if not search_results:
126
+ return "No Wikipedia results found"
127
+
128
+ # Try to get page content
129
+ for page_title in search_results:
130
+ try:
131
+ page = wiki.page(page_title)
132
+ content = page.content
133
+
134
+ # Return first paragraph
135
+ paragraphs = content.split('\n\n')
136
+ first_paragraph = paragraphs[0] if paragraphs else content[:500]
137
+
138
+ # Extract key information based on question type
139
+ if "capital" in query.lower():
140
+ capital_info = self._extract_capital_info(first_paragraph, page.title)
141
+ if capital_info:
142
+ return capital_info
143
+
144
+ if "how many" in query.lower():
145
+ number_info = self._extract_number_info(first_paragraph)
146
+ if number_info:
147
+ return number_info
148
+
149
+ return first_paragraph[:400] + "..." if len(first_paragraph) > 400 else first_paragraph
150
+
151
+ except wiki.exceptions.DisambiguationError as e:
152
+ # Try the first disambiguation option
153
+ try:
154
+ page = wiki.page(e.options[0])
155
+ return page.content.split('\n\n')[0][:400]
156
+ except:
157
+ continue
158
+ except:
159
+ continue
160
+
161
+ return "Wikipedia content unavailable"
162
+
163
+ except Exception as e:
164
+ return f"Wikipedia error: {str(e)}"
165
+
166
+ def _extract_capital_info(self, text: str, page_title: str) -> str:
167
+ """Extract capital city information"""
168
+ text_lower = text.lower()
169
+
170
+ # Common patterns for capital cities
171
+ patterns = [
172
+ r'capital[^.]*?is[^.]*?([A-Z][a-z]+)',
173
+ r'([A-Z][a-z]+)[^.]*?is[^.]*?capital',
174
+ r'([A-Z][a-z]+)[^.]*?capital city'
175
+ ]
176
+
177
+ for pattern in patterns:
178
+ matches = re.findall(pattern, text)
179
+ if matches:
180
+ return f"Capital: {matches[0]}"
181
+
182
+ # If page title might be the capital
183
+ if "capital" in text_lower and len(page_title.split()) <= 2:
184
+ return f"Capital: {page_title}"
185
+
186
+ return ""
187
+
188
+ def _extract_number_info(self, text: str) -> str:
189
+ """Extract numerical information"""
190
+ # Look for numbers in context
191
+ sentences = text.split('.')
192
+ for sentence in sentences[:5]: # Check first 5 sentences
193
+ if any(word in sentence.lower() for word in ["total", "number", "count", "many"]):
194
+ numbers = re.findall(r'\b\d+\b', sentence)
195
+ if numbers:
196
+ return f"Number found: {numbers[0]}"
197
+ return ""
198
+
199
+ def solve_math(self, expression: str) -> str:
200
+ """
201
+ Solve mathematical expressions safely
202
+ """
203
+ try:
204
+ # Clean the expression - only allow safe characters
205
+ expression = re.sub(r'[^0-9+\-*/().\s]', '', expression)
206
+
207
+ if not expression.strip():
208
+ return "No valid math expression found"
209
+
210
+ # Safe evaluation with limited scope
211
+ allowed_names = {
212
+ "__builtins__": {},
213
+ "abs": abs,
214
+ "round": round,
215
+ "min": min,
216
+ "max": max,
217
+ "pow": pow,
218
+ "sqrt": math.sqrt,
219
+ "pi": math.pi,
220
+ "e": math.e
221
+ }
222
+
223
+ result = eval(expression.strip(), allowed_names)
224
+
225
+ # Format result appropriately
226
+ if isinstance(result, float):
227
+ if result.is_integer():
228
+ return str(int(result))
229
+ else:
230
+ return f"{result:.6f}".rstrip('0').rstrip('.')
231
+
232
+ return str(result)
233
+
234
+ except Exception as e:
235
+ return f"Math calculation failed: {str(e)}"
236
+
237
+ def extract_math_from_question(self, question: str) -> Optional[str]:
238
+ """Extract mathematical expressions from questions"""
239
+ # Look for explicit math expressions
240
+ math_patterns = [
241
+ r'(\d+\s*[+\-*/]\s*\d+(?:\s*[+\-*/]\s*\d+)*)',
242
+ r'what is (\d+[+\-*/]\d+)',
243
+ r'calculate (\d+[+\-*/]\d+)',
244
+ ]
245
+
246
+ for pattern in math_patterns:
247
+ matches = re.findall(pattern, question, re.IGNORECASE)
248
+ if matches:
249
+ return matches[0]
250
+
251
+ return None
252
+
253
+ def process_basic_reasoning(self, question: str) -> str:
254
+ """
255
+ Apply basic reasoning patterns for common question types
256
+ """
257
+ question_lower = question.lower()
258
+
259
+ # Math questions
260
+ math_expr = self.extract_math_from_question(question)
261
+ if math_expr:
262
+ result = self.solve_math(math_expr)
263
+ if "failed" not in result:
264
+ return result
265
+
266
+ # Simple factual questions
267
+ if "capital of" in question_lower:
268
+ # Extract country name
269
+ match = re.search(r'capital of (\w+)', question_lower)
270
+ if match:
271
+ country = match.group(1)
272
+ # Simple country-capital lookup
273
+ capitals = {
274
+ "france": "Paris",
275
+ "germany": "Berlin",
276
+ "italy": "Rome",
277
+ "spain": "Madrid",
278
+ "japan": "Tokyo",
279
+ "china": "Beijing",
280
+ "usa": "Washington",
281
+ "uk": "London",
282
+ "russia": "Moscow",
283
+ "brazil": "Brasilia",
284
+ "canada": "Ottawa",
285
+ "australia": "Canberra",
286
+ "india": "New Delhi"
287
+ }
288
+
289
+ if country in capitals:
290
+ return capitals[country]
291
+
292
+ # Color questions
293
+ if "color" in question_lower or "colour" in question_lower:
294
+ colors = ["red", "blue", "green", "yellow", "orange", "purple", "black", "white"]
295
+ for color in colors:
296
+ if color in question_lower:
297
+ return color
298
+
299
+ return "Unable to determine with basic reasoning"
300
+
301
+ def solve_question(self, question: str, task_id: str, level: str = "Unknown") -> Dict[str, str]:
302
+ """
303
+ Solve a single GAIA question using all available free tools
304
+ """
305
+ print(f"🤔 Solving Level {level}: {question[:80]}...")
306
+
307
+ reasoning_steps = []
308
+
309
+ # Step 1: Basic reasoning
310
+ basic_result = self.process_basic_reasoning(question)
311
+ reasoning_steps.append(f"Basic reasoning: {basic_result}")
312
+
313
+ if basic_result and "Unable" not in basic_result and "failed" not in basic_result:
314
+ final_answer = basic_result
315
+ else:
316
+ # Step 2: Wikipedia search
317
+ wiki_result = self.wikipedia_search(question)
318
+ reasoning_steps.append(f"Wikipedia: {wiki_result[:200]}...")
319
+
320
+ # Step 3: Web search
321
+ web_result = self.free_web_search(question)
322
+ reasoning_steps.append(f"Web search: {web_result[:200]}...")
323
+
324
+ # Step 4: Determine best answer
325
+ final_answer = self.determine_final_answer(question, basic_result, wiki_result, web_result)
326
+
327
+ reasoning_trace = "\n".join(reasoning_steps) + f"\n\nFinal answer determination: {final_answer}"
328
+
329
+ print(f"✅ Answer: {final_answer}")
330
+
331
+ return {
332
+ "task_id": task_id,
333
+ "model_answer": final_answer,
334
+ "reasoning_trace": reasoning_trace
335
+ }
336
+
337
+ def determine_final_answer(self, question: str, basic_result: str, wiki_result: str, web_result: str) -> str:
338
+ """
339
+ Intelligently determine the best answer from all available information
340
+ """
341
+ question_lower = question.lower()
342
+
343
+ # If basic reasoning worked, prefer it
344
+ if basic_result and "Unable" not in basic_result and "failed" not in basic_result:
345
+ return basic_result
346
+
347
+ # For numerical questions, extract numbers
348
+ if any(word in question_lower for word in ["how many", "number", "count", "total"]):
349
+ for result in [wiki_result, web_result]:
350
+ if result and "error" not in result.lower():
351
+ numbers = re.findall(r'\b\d+\b', result)
352
+ if numbers:
353
+ return numbers[0]
354
+
355
+ # For capital questions, extract proper nouns
356
+ if "capital" in question_lower:
357
+ for result in [wiki_result, web_result]:
358
+ if result and "error" not in result.lower():
359
+ # Look for pattern "Capital: City" or extract proper nouns
360
+ if "Capital:" in result:
361
+ return result.split("Capital:")[-1].strip().split()[0]
362
+
363
+ # Extract capitalized words that could be cities
364
+ words = re.findall(r'\b[A-Z][a-z]{2,}\b', result)
365
+ for word in words:
366
+ if word not in ["The", "This", "That", "Wikipedia", "Search", "Web"]:
367
+ return word
368
+
369
+ # For yes/no questions
370
+ if question.strip().endswith('?') and any(word in question_lower for word in ["is", "are", "does", "did", "can", "will"]):
371
+ for result in [wiki_result, web_result]:
372
+ if result and "error" not in result.lower():
373
+ if any(word in result.lower() for word in ["yes", "true", "correct", "indeed"]):
374
+ return "yes"
375
+ elif any(word in result.lower() for word in ["no", "false", "incorrect", "not"]):
376
+ return "no"
377
+
378
+ # Extract first meaningful sentence from best available source
379
+ for result in [wiki_result, web_result]:
380
+ if result and not any(error in result.lower() for error in ["error", "unavailable", "failed"]):
381
+ sentences = result.split('.')
382
+ if sentences:
383
+ first_sentence = sentences[0].strip()
384
+ if len(first_sentence) > 10 and len(first_sentence) < 100:
385
+ # Extract the most likely answer from the sentence
386
+ words = first_sentence.split()
387
+ if len(words) <= 5: # Short, likely to be an answer
388
+ return first_sentence
389
+ else:
390
+ # Try to extract key information
391
+ for word in words:
392
+ if word[0].isupper() and len(word) > 2 and word not in ["The", "This", "That"]:
393
+ return word
394
+
395
+ return "unknown"
396
+
397
+ def process_gaia_dataset(self, split="test", max_questions=None):
398
+ """
399
+ Process the GAIA dataset
400
+ """
401
+ print("📚 Loading GAIA dataset...")
402
+ try:
403
+ dataset = load_dataset("gaia-benchmark/GAIA", "2023_all")
404
+ questions = dataset[split]
405
+ except Exception as e:
406
+ print(f"❌ Failed to load dataset: {e}")
407
+ print("💡 Make sure you have access to gaia-benchmark/GAIA")
408
+ return []
409
+
410
+ if max_questions:
411
+ questions = questions.select(range(min(max_questions, len(questions))))
412
+
413
+ total = len(questions)
414
+ print(f"🎯 Processing {total} questions from {split} set...")
415
+ print(f"📊 Using free tools: DuckDuckGo, Wikipedia, math solver")
416
+ print("=" * 60)
417
+
418
+ for i, item in enumerate(questions):
419
+ task_id = item["task_id"]
420
+ question = item["Question"]
421
+ level = item.get("Level", "Unknown")
422
+ file_name = item.get("file_name", None)
423
+
424
+ print(f"\n📝 Question {i+1}/{total}")
425
+ if file_name:
426
+ print(f"📎 Note: Question has attached file ({file_name}) - will attempt without file")
427
+
428
+ result = self.solve_question(question, task_id, level)
429
+ self.results.append(result)
430
+
431
+ # Save progress every 10 questions
432
+ if (i + 1) % 10 == 0:
433
+ self.save_progress(f"free_gaia_progress_{i+1}.jsonl")
434
+ print(f"💾 Progress saved after {i+1} questions")
435
+
436
+ print("\n" + "=" * 60)
437
+ print(f"🎉 Completed processing {total} questions!")
438
+ self.print_statistics()
439
+
440
+ return self.results
441
+
442
+ def save_progress(self, filename: str):
443
+ """Save current progress"""
444
+ with open(filename, 'w') as f:
445
+ for result in self.results:
446
+ f.write(json.dumps(result) + '\n')
447
+
448
+ def print_statistics(self):
449
+ """Print processing statistics"""
450
+ if not self.results:
451
+ return
452
+
453
+ total = len(self.results)
454
+ unknown_answers = len([r for r in self.results if r["model_answer"] == "unknown"])
455
+ success_rate = ((total - unknown_answers) / total) * 100
456
+
457
+ print(f"\n📊 PROCESSING STATISTICS:")
458
+ print(f" Total Questions: {total}")
459
+ print(f" Answered: {total - unknown_answers}")
460
+ print(f" Unknown: {unknown_answers}")
461
+ print(f" Success Rate: {success_rate:.1f}%")
462
+
463
+ # Answer length distribution
464
+ answer_lengths = [len(r["model_answer"]) for r in self.results]
465
+ avg_length = sum(answer_lengths) / len(answer_lengths) if answer_lengths else 0
466
+ print(f" Average Answer Length: {avg_length:.1f} characters")
467
+
468
+ def create_submission_file(self, filename="free_gaia_submission.jsonl"):
469
+ """
470
+ Create the final GAIA submission file
471
+ """
472
+ if not self.results:
473
+ print("❌ No results to save!")
474
+ return None
475
+
476
+ print(f"💾 Creating GAIA submission file: {filename}")
477
+
478
+ with open(filename, 'w') as f:
479
+ for result in self.results:
480
+ # Ensure we only include required fields
481
+ submission_entry = {
482
+ "task_id": result["task_id"],
483
+ "model_answer": result["model_answer"],
484
+ "reasoning_trace": result["reasoning_trace"]
485
+ }
486
+ f.write(json.dumps(submission_entry) + '\n')
487
+
488
+ print(f"✅ Submission file created: {filename}")
489
+ print(f"📄 Contains {len(self.results)} entries")
490
+
491
+ # Validate file
492
+ self.validate_submission_file(filename)
493
+
494
+ return filename
495
+
496
+ def validate_submission_file(self, filename: str):
497
+ """Validate the submission file format"""
498
+ try:
499
+ with open(filename, 'r') as f:
500
+ lines = f.readlines()
501
+
502
+ print(f"🔍 Validating {filename}...")
503
+
504
+ required_fields = {"task_id", "model_answer", "reasoning_trace"}
505
+
506
+ for i, line in enumerate(lines[:3]): # Check first 3 entries
507
+ try:
508
+ entry = json.loads(line.strip())
509
+ if not all(field in entry for field in required_fields):
510
+ print(f"❌ Line {i+1} missing required fields")
511
+ return False
512
+ except json.JSONDecodeError:
513
+ print(f"❌ Line {i+1} is not valid JSON")
514
+ return False
515
+
516
+ print(f"✅ Submission file is valid!")
517
+ print(f" 📊 {len(lines)} entries")
518
+ print(f" ✅ All required fields present")
519
+
520
+ return True
521
+
522
+ except Exception as e:
523
+ print(f"❌ Validation error: {e}")
524
+ return False
525
+
526
+ def main():
527
+ """Main execution function"""
528
+ print("🆓 Free GAIA Agent - No API Keys Required!")
529
+ print("=" * 50)
530
+ print("This agent uses only free services:")
531
+ print(" • DuckDuckGo search API")
532
+ print(" • Wikipedia API")
533
+ print(" • Built-in math solver")
534
+ print(" • Basic reasoning patterns")
535
+ print("=" * 50)
536
+
537
+ agent = FreeGAIAAgent()
538
+
539
+ # Get user preferences
540
+ print("\nOptions:")
541
+ print("1. Test mode (5 questions)")
542
+ print("2. Small batch (50 questions)")
543
+ print("3. Full test set (~300 questions)")
544
+ print("4. Validation set (~150 questions)")
545
+
546
+ choice = input("\nEnter choice (1-4): ").strip()
547
+
548
+ if choice == "1":
549
+ max_questions = 5
550
+ split = "test"
551
+ print("🧪 TEST MODE: 5 questions")
552
+ elif choice == "2":
553
+ max_questions = 50
554
+ split = "test"
555
+ print("📊 SMALL BATCH: 50 questions")
556
+ elif choice == "3":
557
+ max_questions = None
558
+ split = "test"
559
+ print("🎯 FULL TEST SET: ~300 questions")
560
+ elif choice == "4":
561
+ max_questions = None
562
+ split = "validation"
563
+ print("📋 VALIDATION SET: ~150 questions")
564
+ else:
565
+ max_questions = 5
566
+ split = "test"
567
+ print("🧪 Defaulting to TEST MODE: 5 questions")
568
+
569
+ try:
570
+ # Process questions
571
+ results = agent.process_gaia_dataset(split=split, max_questions=max_questions)
572
+
573
+ if not results:
574
+ print("❌ No results generated!")
575
+ return
576
+
577
+ # Create submission file
578
+ submission_file = agent.create_submission_file()
579
+
580
+ if submission_file:
581
+ print(f"""
582
+ 🎉 SUCCESS! Your free GAIA submission is ready!
583
+
584
+ 📄 Submission file: {submission_file}
585
+ 📊 Questions processed: {len(results)}
586
+ 🕒 Generated: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}
587
+
588
+ 📋 Next Steps:
589
+ 1. Go to: https://huggingface.co/spaces/gaia-benchmark/leaderboard
590
+ 2. Fill out the submission form:
591
+ - Agent name: FreeGAIAAgent-v1
592
+ - Model family: Free Web Services
593
+ - Organization: Your name
594
+ - Contact email: Your email
595
+ 3. Upload file: {submission_file}
596
+ 4. Submit and wait for results!
597
+
598
+ 🔮 Expected Performance:
599
+ Level 1: 20-40% (basic questions)
600
+ Level 2: 10-25% (moderate complexity)
601
+ Level 3: 5-15% (complex questions)
602
+
603
+ Note: This free agent has limitations compared to API-powered systems,
604
+ but demonstrates the approach and can solve many GAIA questions!
605
+ """)
606
+
607
+ except KeyboardInterrupt:
608
+ print("\n⏹️ Process interrupted by user")
609
+ except Exception as e:
610
+ print(f"\n❌ Error: {e}")
611
+ print("💡 Make sure you have internet connection and dataset access")
612
+
613
+ if __name__ == "__main__":
614
+ main()
free_gaia_env/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"
free_gaia_env/bin/activate ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 locations. Without forgetting
18
+ # past locations the $PATH changes we made may not be respected.
19
+ # See "man bash" for more details. hash is usually a builtin of your shell
20
+ hash -r 2> /dev/null
21
+
22
+ if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then
23
+ PS1="${_OLD_VIRTUAL_PS1:-}"
24
+ export PS1
25
+ unset _OLD_VIRTUAL_PS1
26
+ fi
27
+
28
+ unset VIRTUAL_ENV
29
+ unset VIRTUAL_ENV_PROMPT
30
+ if [ ! "${1:-}" = "nondestructive" ] ; then
31
+ # Self destruct!
32
+ unset -f deactivate
33
+ fi
34
+ }
35
+
36
+ # unset irrelevant variables
37
+ deactivate nondestructive
38
+
39
+ # on Windows, a path can contain colons and backslashes and has to be converted:
40
+ if [ "${OSTYPE:-}" = "cygwin" ] || [ "${OSTYPE:-}" = "msys" ] ; then
41
+ # transform D:\path\to\venv to /d/path/to/venv on MSYS
42
+ # and to /cygdrive/d/path/to/venv on Cygwin
43
+ export VIRTUAL_ENV=$(cygpath '/Users/hemilpatel/Code/Agents Course/free_gaia_agent/free_gaia_env')
44
+ else
45
+ # use the path as-is
46
+ export VIRTUAL_ENV='/Users/hemilpatel/Code/Agents Course/free_gaia_agent/free_gaia_env'
47
+ fi
48
+
49
+ _OLD_VIRTUAL_PATH="$PATH"
50
+ PATH="$VIRTUAL_ENV/"bin":$PATH"
51
+ export PATH
52
+
53
+ # unset PYTHONHOME if set
54
+ # this will fail if PYTHONHOME is set to the empty string (which is bad anyway)
55
+ # could use `if (set -u; : $PYTHONHOME) ;` in bash
56
+ if [ -n "${PYTHONHOME:-}" ] ; then
57
+ _OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}"
58
+ unset PYTHONHOME
59
+ fi
60
+
61
+ if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
62
+ _OLD_VIRTUAL_PS1="${PS1:-}"
63
+ PS1='(free_gaia_env) '"${PS1:-}"
64
+ export PS1
65
+ VIRTUAL_ENV_PROMPT='(free_gaia_env) '
66
+ export VIRTUAL_ENV_PROMPT
67
+ fi
68
+
69
+ # Call hash to forget past commands. Without forgetting
70
+ # past commands the $PATH changes we made may not be respected
71
+ hash -r 2> /dev/null
free_gaia_env/bin/activate.csh ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file must be used with "source bin/activate.csh" *from csh*.
2
+ # You cannot run it directly.
3
+
4
+ # Created by Davide Di Blasi <davidedb@gmail.com>.
5
+ # Ported to Python 3.3 venv by Andrew Svetlov <andrew.svetlov@gmail.com>
6
+
7
+ 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'
8
+
9
+ # Unset irrelevant variables.
10
+ deactivate nondestructive
11
+
12
+ setenv VIRTUAL_ENV '/Users/hemilpatel/Code/Agents Course/free_gaia_agent/free_gaia_env'
13
+
14
+ set _OLD_VIRTUAL_PATH="$PATH"
15
+ setenv PATH "$VIRTUAL_ENV/"bin":$PATH"
16
+
17
+
18
+ set _OLD_VIRTUAL_PROMPT="$prompt"
19
+
20
+ if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then
21
+ set prompt = '(free_gaia_env) '"$prompt"
22
+ setenv VIRTUAL_ENV_PROMPT '(free_gaia_env) '
23
+ endif
24
+
25
+ alias pydoc python -m pydoc
26
+
27
+ rehash
free_gaia_env/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/hemilpatel/Code/Agents Course/free_gaia_agent/free_gaia_env'
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) '(free_gaia_env) ' (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 '(free_gaia_env) '
69
+ end
free_gaia_env/bin/datasets-cli ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ '''exec' "/Users/hemilpatel/Code/Agents Course/free_gaia_agent/free_gaia_env/bin/python3" "$0" "$@"
3
+ ' '''
4
+ # -*- coding: utf-8 -*-
5
+ import re
6
+ import sys
7
+ from datasets.commands.datasets_cli import main
8
+ if __name__ == '__main__':
9
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
10
+ sys.exit(main())
free_gaia_env/bin/f2py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ '''exec' "/Users/hemilpatel/Code/Agents Course/free_gaia_agent/free_gaia_env/bin/python3" "$0" "$@"
3
+ ' '''
4
+ # -*- coding: utf-8 -*-
5
+ import re
6
+ import sys
7
+ from numpy.f2py.f2py2e import main
8
+ if __name__ == '__main__':
9
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
10
+ sys.exit(main())
free_gaia_env/bin/get_gprof ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/Users/hemilpatel/Code/Agents Course/free_gaia_agent/free_gaia_env/bin/python3
2
+ #
3
+ # Author: Mike McKerns (mmckerns @caltech and @uqfoundation)
4
+ # Copyright (c) 2008-2016 California Institute of Technology.
5
+ # Copyright (c) 2016-2024 The Uncertainty Quantification Foundation.
6
+ # License: 3-clause BSD. The full license text is available at:
7
+ # - https://github.com/uqfoundation/dill/blob/master/LICENSE
8
+ '''
9
+ build profile graph for the given instance
10
+
11
+ running:
12
+ $ get_gprof <args> <instance>
13
+
14
+ executes:
15
+ gprof2dot -f pstats <args> <type>.prof | dot -Tpng -o <type>.call.png
16
+
17
+ where:
18
+ <args> are arguments for gprof2dot, such as "-n 5 -e 5"
19
+ <instance> is code to create the instance to profile
20
+ <type> is the class of the instance (i.e. type(instance))
21
+
22
+ For example:
23
+ $ get_gprof -n 5 -e 1 "import numpy; numpy.array([1,2])"
24
+
25
+ will create 'ndarray.call.png' with the profile graph for numpy.array([1,2]),
26
+ where '-n 5' eliminates nodes below 5% threshold, similarly '-e 1' eliminates
27
+ edges below 1% threshold
28
+ '''
29
+
30
+ if __name__ == "__main__":
31
+ import sys
32
+ if len(sys.argv) < 2:
33
+ print ("Please provide an object instance (e.g. 'import math; math.pi')")
34
+ sys.exit()
35
+ # grab args for gprof2dot
36
+ args = sys.argv[1:-1]
37
+ args = ' '.join(args)
38
+ # last arg builds the object
39
+ obj = sys.argv[-1]
40
+ obj = obj.split(';')
41
+ # multi-line prep for generating an instance
42
+ for line in obj[:-1]:
43
+ exec(line)
44
+ # one-line generation of an instance
45
+ try:
46
+ obj = eval(obj[-1])
47
+ except Exception:
48
+ print ("Error processing object instance")
49
+ sys.exit()
50
+
51
+ # get object 'name'
52
+ objtype = type(obj)
53
+ name = getattr(objtype, '__name__', getattr(objtype, '__class__', objtype))
54
+
55
+ # profile dumping an object
56
+ import dill
57
+ import os
58
+ import cProfile
59
+ #name = os.path.splitext(os.path.basename(__file__))[0]
60
+ cProfile.run("dill.dumps(obj)", filename="%s.prof" % name)
61
+ msg = "gprof2dot -f pstats %s %s.prof | dot -Tpng -o %s.call.png" % (args, name, name)
62
+ try:
63
+ res = os.system(msg)
64
+ except Exception:
65
+ print ("Please verify install of 'gprof2dot' to view profile graphs")
66
+ if res:
67
+ print ("Please verify install of 'gprof2dot' to view profile graphs")
68
+
69
+ # get stats
70
+ f_prof = "%s.prof" % name
71
+ import pstats
72
+ stats = pstats.Stats(f_prof, stream=sys.stdout)
73
+ stats.strip_dirs().sort_stats('cumtime')
74
+ stats.print_stats(20) #XXX: save to file instead of print top 20?
75
+ os.remove(f_prof)
free_gaia_env/bin/get_objgraph ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/Users/hemilpatel/Code/Agents Course/free_gaia_agent/free_gaia_env/bin/python3
2
+ #
3
+ # Author: Mike McKerns (mmckerns @caltech and @uqfoundation)
4
+ # Copyright (c) 2008-2016 California Institute of Technology.
5
+ # Copyright (c) 2016-2024 The Uncertainty Quantification Foundation.
6
+ # License: 3-clause BSD. The full license text is available at:
7
+ # - https://github.com/uqfoundation/dill/blob/master/LICENSE
8
+ """
9
+ display the reference paths for objects in ``dill.types`` or a .pkl file
10
+
11
+ Notes:
12
+ the generated image is useful in showing the pointer references in
13
+ objects that are or can be pickled. Any object in ``dill.objects``
14
+ listed in ``dill.load_types(picklable=True, unpicklable=True)`` works.
15
+
16
+ Examples::
17
+
18
+ $ get_objgraph ArrayType
19
+ Image generated as ArrayType.png
20
+ """
21
+
22
+ import dill as pickle
23
+ #pickle.debug.trace(True)
24
+ #import pickle
25
+
26
+ # get all objects for testing
27
+ from dill import load_types
28
+ load_types(pickleable=True,unpickleable=True)
29
+ from dill import objects
30
+
31
+ if __name__ == "__main__":
32
+ import sys
33
+ if len(sys.argv) != 2:
34
+ print ("Please provide exactly one file or type name (e.g. 'IntType')")
35
+ msg = "\n"
36
+ for objtype in list(objects.keys())[:40]:
37
+ msg += objtype + ', '
38
+ print (msg + "...")
39
+ else:
40
+ objtype = str(sys.argv[-1])
41
+ try:
42
+ obj = objects[objtype]
43
+ except KeyError:
44
+ obj = pickle.load(open(objtype,'rb'))
45
+ import os
46
+ objtype = os.path.splitext(objtype)[0]
47
+ try:
48
+ import objgraph
49
+ objgraph.show_refs(obj, filename=objtype+'.png')
50
+ except ImportError:
51
+ print ("Please install 'objgraph' to view object graphs")
52
+
53
+
54
+ # EOF
free_gaia_env/bin/huggingface-cli ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ '''exec' "/Users/hemilpatel/Code/Agents Course/free_gaia_agent/free_gaia_env/bin/python3" "$0" "$@"
3
+ ' '''
4
+ # -*- coding: utf-8 -*-
5
+ import re
6
+ import sys
7
+ from huggingface_hub.commands.huggingface_cli import main
8
+ if __name__ == '__main__':
9
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
10
+ sys.exit(main())
free_gaia_env/bin/normalizer ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ '''exec' "/Users/hemilpatel/Code/Agents Course/free_gaia_agent/free_gaia_env/bin/python3" "$0" "$@"
3
+ ' '''
4
+ # -*- coding: utf-8 -*-
5
+ import re
6
+ import sys
7
+ from charset_normalizer import cli
8
+ if __name__ == '__main__':
9
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
10
+ sys.exit(cli.cli_detect())
free_gaia_env/bin/numpy-config ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ '''exec' "/Users/hemilpatel/Code/Agents Course/free_gaia_agent/free_gaia_env/bin/python3" "$0" "$@"
3
+ ' '''
4
+ # -*- coding: utf-8 -*-
5
+ import re
6
+ import sys
7
+ from numpy._configtool import main
8
+ if __name__ == '__main__':
9
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
10
+ sys.exit(main())
free_gaia_env/bin/pip ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ '''exec' "/Users/hemilpatel/Code/Agents Course/free_gaia_agent/free_gaia_env/bin/python3" "$0" "$@"
3
+ ' '''
4
+ # -*- coding: utf-8 -*-
5
+ import re
6
+ import sys
7
+ from pip._internal.cli.main import main
8
+ if __name__ == '__main__':
9
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
10
+ sys.exit(main())
free_gaia_env/bin/pip3 ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ '''exec' "/Users/hemilpatel/Code/Agents Course/free_gaia_agent/free_gaia_env/bin/python3" "$0" "$@"
3
+ ' '''
4
+ # -*- coding: utf-8 -*-
5
+ import re
6
+ import sys
7
+ from pip._internal.cli.main import main
8
+ if __name__ == '__main__':
9
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
10
+ sys.exit(main())
free_gaia_env/bin/pip3.12 ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ '''exec' "/Users/hemilpatel/Code/Agents Course/free_gaia_agent/free_gaia_env/bin/python3" "$0" "$@"
3
+ ' '''
4
+ # -*- coding: utf-8 -*-
5
+ import re
6
+ import sys
7
+ from pip._internal.cli.main import main
8
+ if __name__ == '__main__':
9
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
10
+ sys.exit(main())
free_gaia_env/bin/python ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ca9bb8e8a1d9aed70b9884fc8a44dacfb8ef8dc0bfa95b428dcea53a1b8a4870
3
+ size 6916992
free_gaia_env/bin/python3 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ca9bb8e8a1d9aed70b9884fc8a44dacfb8ef8dc0bfa95b428dcea53a1b8a4870
3
+ size 6916992
free_gaia_env/bin/python3.12 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ca9bb8e8a1d9aed70b9884fc8a44dacfb8ef8dc0bfa95b428dcea53a1b8a4870
3
+ size 6916992
free_gaia_env/bin/tiny-agents ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ '''exec' "/Users/hemilpatel/Code/Agents Course/free_gaia_agent/free_gaia_env/bin/python3" "$0" "$@"
3
+ ' '''
4
+ # -*- coding: utf-8 -*-
5
+ import re
6
+ import sys
7
+ from huggingface_hub.inference._mcp.cli import app
8
+ if __name__ == '__main__':
9
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
10
+ sys.exit(app())
free_gaia_env/bin/tqdm ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ '''exec' "/Users/hemilpatel/Code/Agents Course/free_gaia_agent/free_gaia_env/bin/python3" "$0" "$@"
3
+ ' '''
4
+ # -*- coding: utf-8 -*-
5
+ import re
6
+ import sys
7
+ from tqdm.cli import main
8
+ if __name__ == '__main__':
9
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
10
+ sys.exit(main())
free_gaia_env/bin/undill ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/Users/hemilpatel/Code/Agents Course/free_gaia_agent/free_gaia_env/bin/python3
2
+ #
3
+ # Author: Mike McKerns (mmckerns @caltech and @uqfoundation)
4
+ # Copyright (c) 2008-2016 California Institute of Technology.
5
+ # Copyright (c) 2016-2024 The Uncertainty Quantification Foundation.
6
+ # License: 3-clause BSD. The full license text is available at:
7
+ # - https://github.com/uqfoundation/dill/blob/master/LICENSE
8
+ """
9
+ unpickle the contents of a pickled object file
10
+
11
+ Examples::
12
+
13
+ $ undill hello.pkl
14
+ ['hello', 'world']
15
+ """
16
+
17
+ if __name__ == '__main__':
18
+ import sys
19
+ import dill
20
+ for file in sys.argv[1:]:
21
+ print (dill.load(open(file,'rb')))
22
+
free_gaia_env/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/INSTALLER ADDED
@@ -0,0 +1 @@
 
 
1
+ pip
free_gaia_env/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/LICENSE ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Copyright (c) 2017-2021 Ingy döt Net
2
+ Copyright (c) 2006-2016 Kirill Simonov
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ this software and associated documentation files (the "Software"), to deal in
6
+ the Software without restriction, including without limitation the rights to
7
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8
+ of the Software, and to permit persons to whom the Software is furnished to do
9
+ so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ SOFTWARE.
free_gaia_env/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/METADATA ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.1
2
+ Name: PyYAML
3
+ Version: 6.0.2
4
+ Summary: YAML parser and emitter for Python
5
+ Home-page: https://pyyaml.org/
6
+ Download-URL: https://pypi.org/project/PyYAML/
7
+ Author: Kirill Simonov
8
+ Author-email: xi@resolvent.net
9
+ License: MIT
10
+ Project-URL: Bug Tracker, https://github.com/yaml/pyyaml/issues
11
+ Project-URL: CI, https://github.com/yaml/pyyaml/actions
12
+ Project-URL: Documentation, https://pyyaml.org/wiki/PyYAMLDocumentation
13
+ Project-URL: Mailing lists, http://lists.sourceforge.net/lists/listinfo/yaml-core
14
+ Project-URL: Source Code, https://github.com/yaml/pyyaml
15
+ Platform: Any
16
+ Classifier: Development Status :: 5 - Production/Stable
17
+ Classifier: Intended Audience :: Developers
18
+ Classifier: License :: OSI Approved :: MIT License
19
+ Classifier: Operating System :: OS Independent
20
+ Classifier: Programming Language :: Cython
21
+ Classifier: Programming Language :: Python
22
+ Classifier: Programming Language :: Python :: 3
23
+ Classifier: Programming Language :: Python :: 3.8
24
+ Classifier: Programming Language :: Python :: 3.9
25
+ Classifier: Programming Language :: Python :: 3.10
26
+ Classifier: Programming Language :: Python :: 3.11
27
+ Classifier: Programming Language :: Python :: 3.12
28
+ Classifier: Programming Language :: Python :: 3.13
29
+ Classifier: Programming Language :: Python :: Implementation :: CPython
30
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
31
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
32
+ Classifier: Topic :: Text Processing :: Markup
33
+ Requires-Python: >=3.8
34
+ License-File: LICENSE
35
+
36
+ YAML is a data serialization format designed for human readability
37
+ and interaction with scripting languages. PyYAML is a YAML parser
38
+ and emitter for Python.
39
+
40
+ PyYAML features a complete YAML 1.1 parser, Unicode support, pickle
41
+ support, capable extension API, and sensible error messages. PyYAML
42
+ supports standard YAML tags and provides Python-specific tags that
43
+ allow to represent an arbitrary Python object.
44
+
45
+ PyYAML is applicable for a broad range of tasks from complex
46
+ configuration files to object serialization and persistence.
free_gaia_env/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/RECORD ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ PyYAML-6.0.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
2
+ PyYAML-6.0.2.dist-info/LICENSE,sha256=jTko-dxEkP1jVwfLiOsmvXZBAqcoKVQwfT5RZ6V36KQ,1101
3
+ PyYAML-6.0.2.dist-info/METADATA,sha256=9-odFB5seu4pGPcEv7E8iyxNF51_uKnaNGjLAhz2lto,2060
4
+ PyYAML-6.0.2.dist-info/RECORD,,
5
+ PyYAML-6.0.2.dist-info/WHEEL,sha256=h9jBNgvnuEaix45NgESHvfNcOPGGNEywrbP9Un7hZlk,110
6
+ PyYAML-6.0.2.dist-info/top_level.txt,sha256=rpj0IVMTisAjh_1vG3Ccf9v5jpCQwAz6cD1IVU5ZdhQ,11
7
+ _yaml/__init__.py,sha256=04Ae_5osxahpJHa3XBZUAf4wi6XX32gR8D6X6p64GEA,1402
8
+ _yaml/__pycache__/__init__.cpython-312.pyc,,
9
+ yaml/__init__.py,sha256=N35S01HMesFTe0aRRMWkPj0Pa8IEbHpE9FK7cr5Bdtw,12311
10
+ yaml/__pycache__/__init__.cpython-312.pyc,,
11
+ yaml/__pycache__/composer.cpython-312.pyc,,
12
+ yaml/__pycache__/constructor.cpython-312.pyc,,
13
+ yaml/__pycache__/cyaml.cpython-312.pyc,,
14
+ yaml/__pycache__/dumper.cpython-312.pyc,,
15
+ yaml/__pycache__/emitter.cpython-312.pyc,,
16
+ yaml/__pycache__/error.cpython-312.pyc,,
17
+ yaml/__pycache__/events.cpython-312.pyc,,
18
+ yaml/__pycache__/loader.cpython-312.pyc,,
19
+ yaml/__pycache__/nodes.cpython-312.pyc,,
20
+ yaml/__pycache__/parser.cpython-312.pyc,,
21
+ yaml/__pycache__/reader.cpython-312.pyc,,
22
+ yaml/__pycache__/representer.cpython-312.pyc,,
23
+ yaml/__pycache__/resolver.cpython-312.pyc,,
24
+ yaml/__pycache__/scanner.cpython-312.pyc,,
25
+ yaml/__pycache__/serializer.cpython-312.pyc,,
26
+ yaml/__pycache__/tokens.cpython-312.pyc,,
27
+ yaml/_yaml.cpython-312-darwin.so,sha256=kJhYpZpKSMBUaR-esOCOg7Ao1QLyNGl3tVdptwNUd6Y,375656
28
+ yaml/composer.py,sha256=_Ko30Wr6eDWUeUpauUGT3Lcg9QPBnOPVlTnIMRGJ9FM,4883
29
+ yaml/constructor.py,sha256=kNgkfaeLUkwQYY_Q6Ff1Tz2XVw_pG1xVE9Ak7z-viLA,28639
30
+ yaml/cyaml.py,sha256=6ZrAG9fAYvdVe2FK_w0hmXoG7ZYsoYUwapG8CiC72H0,3851
31
+ yaml/dumper.py,sha256=PLctZlYwZLp7XmeUdwRuv4nYOZ2UBnDIUy8-lKfLF-o,2837
32
+ yaml/emitter.py,sha256=jghtaU7eFwg31bG0B7RZea_29Adi9CKmXq_QjgQpCkQ,43006
33
+ yaml/error.py,sha256=Ah9z-toHJUbE9j-M8YpxgSRM5CgLCcwVzJgLLRF2Fxo,2533
34
+ yaml/events.py,sha256=50_TksgQiE4up-lKo_V-nBy-tAIxkIPQxY5qDhKCeHw,2445
35
+ yaml/loader.py,sha256=UVa-zIqmkFSCIYq_PgSGm4NSJttHY2Rf_zQ4_b1fHN0,2061
36
+ yaml/nodes.py,sha256=gPKNj8pKCdh2d4gr3gIYINnPOaOxGhJAUiYhGRnPE84,1440
37
+ yaml/parser.py,sha256=ilWp5vvgoHFGzvOZDItFoGjD6D42nhlZrZyjAwa0oJo,25495
38
+ yaml/reader.py,sha256=0dmzirOiDG4Xo41RnuQS7K9rkY3xjHiVasfDMNTqCNw,6794
39
+ yaml/representer.py,sha256=IuWP-cAW9sHKEnS0gCqSa894k1Bg4cgTxaDwIcbRQ-Y,14190
40
+ yaml/resolver.py,sha256=9L-VYfm4mWHxUD1Vg4X7rjDRK_7VZd6b92wzq7Y2IKY,9004
41
+ yaml/scanner.py,sha256=YEM3iLZSaQwXcQRg2l2R4MdT0zGP2F9eHkKGKnHyWQY,51279
42
+ yaml/serializer.py,sha256=ChuFgmhU01hj4xgI8GaKv6vfM2Bujwa9i7d2FAHj7cA,4165
43
+ yaml/tokens.py,sha256=lTQIzSVw8Mg9wv459-TjiOQe6wVziqaRlqX2_89rp54,2573
free_gaia_env/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/WHEEL ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ Wheel-Version: 1.0
2
+ Generator: bdist_wheel (0.44.0)
3
+ Root-Is-Purelib: false
4
+ Tag: cp312-cp312-macosx_11_0_arm64
5
+
free_gaia_env/lib/python3.12/site-packages/PyYAML-6.0.2.dist-info/top_level.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ _yaml
2
+ yaml
free_gaia_env/lib/python3.12/site-packages/__pycache__/six.cpython-312.pyc ADDED
Binary file (41.4 kB). View file
 
free_gaia_env/lib/python3.12/site-packages/__pycache__/typing_extensions.cpython-312.pyc ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4a947f8a5de8bd80c99f3847481e4081253f1b3ee94a770a95b062cb3c645c89
3
+ size 173385
free_gaia_env/lib/python3.12/site-packages/_multiprocess/__init__.py ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+ #
3
+ # Author: Mike McKerns (mmckerns @caltech and @uqfoundation)
4
+ # Copyright (c) 2022-2024 The Uncertainty Quantification Foundation.
5
+ # License: 3-clause BSD. The full license text is available at:
6
+ # - https://github.com/uqfoundation/multiprocess/blob/master/LICENSE
7
+
8
+ from _multiprocessing import *
free_gaia_env/lib/python3.12/site-packages/_multiprocess/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (258 Bytes). View file
 
free_gaia_env/lib/python3.12/site-packages/_yaml/__init__.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This is a stub package designed to roughly emulate the _yaml
2
+ # extension module, which previously existed as a standalone module
3
+ # and has been moved into the `yaml` package namespace.
4
+ # It does not perfectly mimic its old counterpart, but should get
5
+ # close enough for anyone who's relying on it even when they shouldn't.
6
+ import yaml
7
+
8
+ # in some circumstances, the yaml module we imoprted may be from a different version, so we need
9
+ # to tread carefully when poking at it here (it may not have the attributes we expect)
10
+ if not getattr(yaml, '__with_libyaml__', False):
11
+ from sys import version_info
12
+
13
+ exc = ModuleNotFoundError if version_info >= (3, 6) else ImportError
14
+ raise exc("No module named '_yaml'")
15
+ else:
16
+ from yaml._yaml import *
17
+ import warnings
18
+ warnings.warn(
19
+ 'The _yaml extension module is now located at yaml._yaml'
20
+ ' and its location is subject to change. To use the'
21
+ ' LibYAML-based parser and emitter, import from `yaml`:'
22
+ ' `from yaml import CLoader as Loader, CDumper as Dumper`.',
23
+ DeprecationWarning
24
+ )
25
+ del warnings
26
+ # Don't `del yaml` here because yaml is actually an existing
27
+ # namespace member of _yaml.
28
+
29
+ __name__ = '_yaml'
30
+ # If the module is top-level (i.e. not a part of any specific package)
31
+ # then the attribute should be set to ''.
32
+ # https://docs.python.org/3.8/library/types.html
33
+ __package__ = ''
free_gaia_env/lib/python3.12/site-packages/_yaml/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (892 Bytes). View file
 
free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs-2.6.1.dist-info/INSTALLER ADDED
@@ -0,0 +1 @@
 
 
1
+ pip
free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs-2.6.1.dist-info/LICENSE ADDED
@@ -0,0 +1,279 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ A. HISTORY OF THE SOFTWARE
2
+ ==========================
3
+
4
+ Python was created in the early 1990s by Guido van Rossum at Stichting
5
+ Mathematisch Centrum (CWI, see https://www.cwi.nl) in the Netherlands
6
+ as a successor of a language called ABC. Guido remains Python's
7
+ principal author, although it includes many contributions from others.
8
+
9
+ In 1995, Guido continued his work on Python at the Corporation for
10
+ National Research Initiatives (CNRI, see https://www.cnri.reston.va.us)
11
+ in Reston, Virginia where he released several versions of the
12
+ software.
13
+
14
+ In May 2000, Guido and the Python core development team moved to
15
+ BeOpen.com to form the BeOpen PythonLabs team. In October of the same
16
+ year, the PythonLabs team moved to Digital Creations, which became
17
+ Zope Corporation. In 2001, the Python Software Foundation (PSF, see
18
+ https://www.python.org/psf/) was formed, a non-profit organization
19
+ created specifically to own Python-related Intellectual Property.
20
+ Zope Corporation was a sponsoring member of the PSF.
21
+
22
+ All Python releases are Open Source (see https://opensource.org for
23
+ the Open Source Definition). Historically, most, but not all, Python
24
+ releases have also been GPL-compatible; the table below summarizes
25
+ the various releases.
26
+
27
+ Release Derived Year Owner GPL-
28
+ from compatible? (1)
29
+
30
+ 0.9.0 thru 1.2 1991-1995 CWI yes
31
+ 1.3 thru 1.5.2 1.2 1995-1999 CNRI yes
32
+ 1.6 1.5.2 2000 CNRI no
33
+ 2.0 1.6 2000 BeOpen.com no
34
+ 1.6.1 1.6 2001 CNRI yes (2)
35
+ 2.1 2.0+1.6.1 2001 PSF no
36
+ 2.0.1 2.0+1.6.1 2001 PSF yes
37
+ 2.1.1 2.1+2.0.1 2001 PSF yes
38
+ 2.1.2 2.1.1 2002 PSF yes
39
+ 2.1.3 2.1.2 2002 PSF yes
40
+ 2.2 and above 2.1.1 2001-now PSF yes
41
+
42
+ Footnotes:
43
+
44
+ (1) GPL-compatible doesn't mean that we're distributing Python under
45
+ the GPL. All Python licenses, unlike the GPL, let you distribute
46
+ a modified version without making your changes open source. The
47
+ GPL-compatible licenses make it possible to combine Python with
48
+ other software that is released under the GPL; the others don't.
49
+
50
+ (2) According to Richard Stallman, 1.6.1 is not GPL-compatible,
51
+ because its license has a choice of law clause. According to
52
+ CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1
53
+ is "not incompatible" with the GPL.
54
+
55
+ Thanks to the many outside volunteers who have worked under Guido's
56
+ direction to make these releases possible.
57
+
58
+
59
+ B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON
60
+ ===============================================================
61
+
62
+ Python software and documentation are licensed under the
63
+ Python Software Foundation License Version 2.
64
+
65
+ Starting with Python 3.8.6, examples, recipes, and other code in
66
+ the documentation are dual licensed under the PSF License Version 2
67
+ and the Zero-Clause BSD license.
68
+
69
+ Some software incorporated into Python is under different licenses.
70
+ The licenses are listed with code falling under that license.
71
+
72
+
73
+ PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
74
+ --------------------------------------------
75
+
76
+ 1. This LICENSE AGREEMENT is between the Python Software Foundation
77
+ ("PSF"), and the Individual or Organization ("Licensee") accessing and
78
+ otherwise using this software ("Python") in source or binary form and
79
+ its associated documentation.
80
+
81
+ 2. Subject to the terms and conditions of this License Agreement, PSF hereby
82
+ grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
83
+ analyze, test, perform and/or display publicly, prepare derivative works,
84
+ distribute, and otherwise use Python alone or in any derivative version,
85
+ provided, however, that PSF's License Agreement and PSF's notice of copyright,
86
+ i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
87
+ 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Python Software Foundation;
88
+ All Rights Reserved" are retained in Python alone or in any derivative version
89
+ prepared by Licensee.
90
+
91
+ 3. In the event Licensee prepares a derivative work that is based on
92
+ or incorporates Python or any part thereof, and wants to make
93
+ the derivative work available to others as provided herein, then
94
+ Licensee hereby agrees to include in any such work a brief summary of
95
+ the changes made to Python.
96
+
97
+ 4. PSF is making Python available to Licensee on an "AS IS"
98
+ basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
99
+ IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
100
+ DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
101
+ FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
102
+ INFRINGE ANY THIRD PARTY RIGHTS.
103
+
104
+ 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
105
+ FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
106
+ A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
107
+ OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
108
+
109
+ 6. This License Agreement will automatically terminate upon a material
110
+ breach of its terms and conditions.
111
+
112
+ 7. Nothing in this License Agreement shall be deemed to create any
113
+ relationship of agency, partnership, or joint venture between PSF and
114
+ Licensee. This License Agreement does not grant permission to use PSF
115
+ trademarks or trade name in a trademark sense to endorse or promote
116
+ products or services of Licensee, or any third party.
117
+
118
+ 8. By copying, installing or otherwise using Python, Licensee
119
+ agrees to be bound by the terms and conditions of this License
120
+ Agreement.
121
+
122
+
123
+ BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
124
+ -------------------------------------------
125
+
126
+ BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1
127
+
128
+ 1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an
129
+ office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the
130
+ Individual or Organization ("Licensee") accessing and otherwise using
131
+ this software in source or binary form and its associated
132
+ documentation ("the Software").
133
+
134
+ 2. Subject to the terms and conditions of this BeOpen Python License
135
+ Agreement, BeOpen hereby grants Licensee a non-exclusive,
136
+ royalty-free, world-wide license to reproduce, analyze, test, perform
137
+ and/or display publicly, prepare derivative works, distribute, and
138
+ otherwise use the Software alone or in any derivative version,
139
+ provided, however, that the BeOpen Python License is retained in the
140
+ Software, alone or in any derivative version prepared by Licensee.
141
+
142
+ 3. BeOpen is making the Software available to Licensee on an "AS IS"
143
+ basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
144
+ IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND
145
+ DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
146
+ FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT
147
+ INFRINGE ANY THIRD PARTY RIGHTS.
148
+
149
+ 4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
150
+ SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
151
+ AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY
152
+ DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
153
+
154
+ 5. This License Agreement will automatically terminate upon a material
155
+ breach of its terms and conditions.
156
+
157
+ 6. This License Agreement shall be governed by and interpreted in all
158
+ respects by the law of the State of California, excluding conflict of
159
+ law provisions. Nothing in this License Agreement shall be deemed to
160
+ create any relationship of agency, partnership, or joint venture
161
+ between BeOpen and Licensee. This License Agreement does not grant
162
+ permission to use BeOpen trademarks or trade names in a trademark
163
+ sense to endorse or promote products or services of Licensee, or any
164
+ third party. As an exception, the "BeOpen Python" logos available at
165
+ http://www.pythonlabs.com/logos.html may be used according to the
166
+ permissions granted on that web page.
167
+
168
+ 7. By copying, installing or otherwise using the software, Licensee
169
+ agrees to be bound by the terms and conditions of this License
170
+ Agreement.
171
+
172
+
173
+ CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1
174
+ ---------------------------------------
175
+
176
+ 1. This LICENSE AGREEMENT is between the Corporation for National
177
+ Research Initiatives, having an office at 1895 Preston White Drive,
178
+ Reston, VA 20191 ("CNRI"), and the Individual or Organization
179
+ ("Licensee") accessing and otherwise using Python 1.6.1 software in
180
+ source or binary form and its associated documentation.
181
+
182
+ 2. Subject to the terms and conditions of this License Agreement, CNRI
183
+ hereby grants Licensee a nonexclusive, royalty-free, world-wide
184
+ license to reproduce, analyze, test, perform and/or display publicly,
185
+ prepare derivative works, distribute, and otherwise use Python 1.6.1
186
+ alone or in any derivative version, provided, however, that CNRI's
187
+ License Agreement and CNRI's notice of copyright, i.e., "Copyright (c)
188
+ 1995-2001 Corporation for National Research Initiatives; All Rights
189
+ Reserved" are retained in Python 1.6.1 alone or in any derivative
190
+ version prepared by Licensee. Alternately, in lieu of CNRI's License
191
+ Agreement, Licensee may substitute the following text (omitting the
192
+ quotes): "Python 1.6.1 is made available subject to the terms and
193
+ conditions in CNRI's License Agreement. This Agreement together with
194
+ Python 1.6.1 may be located on the internet using the following
195
+ unique, persistent identifier (known as a handle): 1895.22/1013. This
196
+ Agreement may also be obtained from a proxy server on the internet
197
+ using the following URL: http://hdl.handle.net/1895.22/1013".
198
+
199
+ 3. In the event Licensee prepares a derivative work that is based on
200
+ or incorporates Python 1.6.1 or any part thereof, and wants to make
201
+ the derivative work available to others as provided herein, then
202
+ Licensee hereby agrees to include in any such work a brief summary of
203
+ the changes made to Python 1.6.1.
204
+
205
+ 4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS"
206
+ basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
207
+ IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND
208
+ DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
209
+ FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT
210
+ INFRINGE ANY THIRD PARTY RIGHTS.
211
+
212
+ 5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
213
+ 1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
214
+ A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,
215
+ OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
216
+
217
+ 6. This License Agreement will automatically terminate upon a material
218
+ breach of its terms and conditions.
219
+
220
+ 7. This License Agreement shall be governed by the federal
221
+ intellectual property law of the United States, including without
222
+ limitation the federal copyright law, and, to the extent such
223
+ U.S. federal law does not apply, by the law of the Commonwealth of
224
+ Virginia, excluding Virginia's conflict of law provisions.
225
+ Notwithstanding the foregoing, with regard to derivative works based
226
+ on Python 1.6.1 that incorporate non-separable material that was
227
+ previously distributed under the GNU General Public License (GPL), the
228
+ law of the Commonwealth of Virginia shall govern this License
229
+ Agreement only as to issues arising under or with respect to
230
+ Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this
231
+ License Agreement shall be deemed to create any relationship of
232
+ agency, partnership, or joint venture between CNRI and Licensee. This
233
+ License Agreement does not grant permission to use CNRI trademarks or
234
+ trade name in a trademark sense to endorse or promote products or
235
+ services of Licensee, or any third party.
236
+
237
+ 8. By clicking on the "ACCEPT" button where indicated, or by copying,
238
+ installing or otherwise using Python 1.6.1, Licensee agrees to be
239
+ bound by the terms and conditions of this License Agreement.
240
+
241
+ ACCEPT
242
+
243
+
244
+ CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
245
+ --------------------------------------------------
246
+
247
+ Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,
248
+ The Netherlands. All rights reserved.
249
+
250
+ Permission to use, copy, modify, and distribute this software and its
251
+ documentation for any purpose and without fee is hereby granted,
252
+ provided that the above copyright notice appear in all copies and that
253
+ both that copyright notice and this permission notice appear in
254
+ supporting documentation, and that the name of Stichting Mathematisch
255
+ Centrum or CWI not be used in advertising or publicity pertaining to
256
+ distribution of the software without specific, written prior
257
+ permission.
258
+
259
+ STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
260
+ THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
261
+ FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
262
+ FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
263
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
264
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
265
+ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
266
+
267
+ ZERO-CLAUSE BSD LICENSE FOR CODE IN THE PYTHON DOCUMENTATION
268
+ ----------------------------------------------------------------------
269
+
270
+ Permission to use, copy, modify, and/or distribute this software for any
271
+ purpose with or without fee is hereby granted.
272
+
273
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
274
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
275
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
276
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
277
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
278
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
279
+ PERFORMANCE OF THIS SOFTWARE.
free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs-2.6.1.dist-info/METADATA ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.3
2
+ Name: aiohappyeyeballs
3
+ Version: 2.6.1
4
+ Summary: Happy Eyeballs for asyncio
5
+ License: PSF-2.0
6
+ Author: J. Nick Koston
7
+ Author-email: nick@koston.org
8
+ Requires-Python: >=3.9
9
+ Classifier: Development Status :: 5 - Production/Stable
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Natural Language :: English
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Topic :: Software Development :: Libraries
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: License :: OSI Approved :: Python Software Foundation License
21
+ Project-URL: Bug Tracker, https://github.com/aio-libs/aiohappyeyeballs/issues
22
+ Project-URL: Changelog, https://github.com/aio-libs/aiohappyeyeballs/blob/main/CHANGELOG.md
23
+ Project-URL: Documentation, https://aiohappyeyeballs.readthedocs.io
24
+ Project-URL: Repository, https://github.com/aio-libs/aiohappyeyeballs
25
+ Description-Content-Type: text/markdown
26
+
27
+ # aiohappyeyeballs
28
+
29
+ <p align="center">
30
+ <a href="https://github.com/aio-libs/aiohappyeyeballs/actions/workflows/ci.yml?query=branch%3Amain">
31
+ <img src="https://img.shields.io/github/actions/workflow/status/aio-libs/aiohappyeyeballs/ci-cd.yml?branch=main&label=CI&logo=github&style=flat-square" alt="CI Status" >
32
+ </a>
33
+ <a href="https://aiohappyeyeballs.readthedocs.io">
34
+ <img src="https://img.shields.io/readthedocs/aiohappyeyeballs.svg?logo=read-the-docs&logoColor=fff&style=flat-square" alt="Documentation Status">
35
+ </a>
36
+ <a href="https://codecov.io/gh/aio-libs/aiohappyeyeballs">
37
+ <img src="https://img.shields.io/codecov/c/github/aio-libs/aiohappyeyeballs.svg?logo=codecov&logoColor=fff&style=flat-square" alt="Test coverage percentage">
38
+ </a>
39
+ </p>
40
+ <p align="center">
41
+ <a href="https://python-poetry.org/">
42
+ <img src="https://img.shields.io/badge/packaging-poetry-299bd7?style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAASCAYAAABrXO8xAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJJSURBVHgBfZLPa1NBEMe/s7tNXoxW1KJQKaUHkXhQvHgW6UHQQ09CBS/6V3hKc/AP8CqCrUcpmop3Cx48eDB4yEECjVQrlZb80CRN8t6OM/teagVxYZi38+Yz853dJbzoMV3MM8cJUcLMSUKIE8AzQ2PieZzFxEJOHMOgMQQ+dUgSAckNXhapU/NMhDSWLs1B24A8sO1xrN4NECkcAC9ASkiIJc6k5TRiUDPhnyMMdhKc+Zx19l6SgyeW76BEONY9exVQMzKExGKwwPsCzza7KGSSWRWEQhyEaDXp6ZHEr416ygbiKYOd7TEWvvcQIeusHYMJGhTwF9y7sGnSwaWyFAiyoxzqW0PM/RjghPxF2pWReAowTEXnDh0xgcLs8l2YQmOrj3N7ByiqEoH0cARs4u78WgAVkoEDIDoOi3AkcLOHU60RIg5wC4ZuTC7FaHKQm8Hq1fQuSOBvX/sodmNJSB5geaF5CPIkUeecdMxieoRO5jz9bheL6/tXjrwCyX/UYBUcjCaWHljx1xiX6z9xEjkYAzbGVnB8pvLmyXm9ep+W8CmsSHQQY77Zx1zboxAV0w7ybMhQmfqdmmw3nEp1I0Z+FGO6M8LZdoyZnuzzBdjISicKRnpxzI9fPb+0oYXsNdyi+d3h9bm9MWYHFtPeIZfLwzmFDKy1ai3p+PDls1Llz4yyFpferxjnyjJDSEy9CaCx5m2cJPerq6Xm34eTrZt3PqxYO1XOwDYZrFlH1fWnpU38Y9HRze3lj0vOujZcXKuuXm3jP+s3KbZVra7y2EAAAAAASUVORK5CYII=" alt="Poetry">
43
+ </a>
44
+ <a href="https://github.com/astral-sh/ruff">
45
+ <img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff">
46
+ </a>
47
+ <a href="https://github.com/pre-commit/pre-commit">
48
+ <img src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=flat-square" alt="pre-commit">
49
+ </a>
50
+ </p>
51
+ <p align="center">
52
+ <a href="https://pypi.org/project/aiohappyeyeballs/">
53
+ <img src="https://img.shields.io/pypi/v/aiohappyeyeballs.svg?logo=python&logoColor=fff&style=flat-square" alt="PyPI Version">
54
+ </a>
55
+ <img src="https://img.shields.io/pypi/pyversions/aiohappyeyeballs.svg?style=flat-square&logo=python&amp;logoColor=fff" alt="Supported Python versions">
56
+ <img src="https://img.shields.io/pypi/l/aiohappyeyeballs.svg?style=flat-square" alt="License">
57
+ </p>
58
+
59
+ ---
60
+
61
+ **Documentation**: <a href="https://aiohappyeyeballs.readthedocs.io" target="_blank">https://aiohappyeyeballs.readthedocs.io </a>
62
+
63
+ **Source Code**: <a href="https://github.com/aio-libs/aiohappyeyeballs" target="_blank">https://github.com/aio-libs/aiohappyeyeballs </a>
64
+
65
+ ---
66
+
67
+ [Happy Eyeballs](https://en.wikipedia.org/wiki/Happy_Eyeballs)
68
+ ([RFC 8305](https://www.rfc-editor.org/rfc/rfc8305.html))
69
+
70
+ ## Use case
71
+
72
+ This library exists to allow connecting with
73
+ [Happy Eyeballs](https://en.wikipedia.org/wiki/Happy_Eyeballs)
74
+ ([RFC 8305](https://www.rfc-editor.org/rfc/rfc8305.html))
75
+ when you
76
+ already have a list of addrinfo and not a DNS name.
77
+
78
+ The stdlib version of `loop.create_connection()`
79
+ will only work when you pass in an unresolved name which
80
+ is not a good fit when using DNS caching or resolving
81
+ names via another method such as `zeroconf`.
82
+
83
+ ## Installation
84
+
85
+ Install this via pip (or your favourite package manager):
86
+
87
+ `pip install aiohappyeyeballs`
88
+
89
+ ## License
90
+
91
+ [aiohappyeyeballs is licensed under the same terms as cpython itself.](https://github.com/python/cpython/blob/main/LICENSE)
92
+
93
+ ## Example usage
94
+
95
+ ```python
96
+
97
+ addr_infos = await loop.getaddrinfo("example.org", 80)
98
+
99
+ socket = await start_connection(addr_infos)
100
+ socket = await start_connection(addr_infos, local_addr_infos=local_addr_infos, happy_eyeballs_delay=0.2)
101
+
102
+ transport, protocol = await loop.create_connection(
103
+ MyProtocol, sock=socket, ...)
104
+
105
+ # Remove the first address for each family from addr_info
106
+ pop_addr_infos_interleave(addr_info, 1)
107
+
108
+ # Remove all matching address from addr_info
109
+ remove_addr_infos(addr_info, "dead::beef::")
110
+
111
+ # Convert a local_addr to local_addr_infos
112
+ local_addr_infos = addr_to_addr_infos(("127.0.0.1",0))
113
+ ```
114
+
115
+ ## Credits
116
+
117
+ This package contains code from cpython and is licensed under the same terms as cpython itself.
118
+
119
+ This package was created with
120
+ [Copier](https://copier.readthedocs.io/) and the
121
+ [browniebroke/pypackage-template](https://github.com/browniebroke/pypackage-template)
122
+ project template.
123
+
free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs-2.6.1.dist-info/RECORD ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiohappyeyeballs-2.6.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
2
+ aiohappyeyeballs-2.6.1.dist-info/LICENSE,sha256=Oy-B_iHRgcSZxZolbI4ZaEVdZonSaaqFNzv7avQdo78,13936
3
+ aiohappyeyeballs-2.6.1.dist-info/METADATA,sha256=NSXlhJwAfi380eEjAo7BQ4P_TVal9xi0qkyZWibMsVM,5915
4
+ aiohappyeyeballs-2.6.1.dist-info/RECORD,,
5
+ aiohappyeyeballs-2.6.1.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
6
+ aiohappyeyeballs/__init__.py,sha256=x7kktHEtaD9quBcWDJPuLeKyjuVAI-Jj14S9B_5hcTs,361
7
+ aiohappyeyeballs/__pycache__/__init__.cpython-312.pyc,,
8
+ aiohappyeyeballs/__pycache__/_staggered.cpython-312.pyc,,
9
+ aiohappyeyeballs/__pycache__/impl.cpython-312.pyc,,
10
+ aiohappyeyeballs/__pycache__/types.cpython-312.pyc,,
11
+ aiohappyeyeballs/__pycache__/utils.cpython-312.pyc,,
12
+ aiohappyeyeballs/_staggered.py,sha256=edfVowFx-P-ywJjIEF3MdPtEMVODujV6CeMYr65otac,6900
13
+ aiohappyeyeballs/impl.py,sha256=Dlcm2mTJ28ucrGnxkb_fo9CZzLAkOOBizOt7dreBbXE,9681
14
+ aiohappyeyeballs/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
+ aiohappyeyeballs/types.py,sha256=YZJIAnyoV4Dz0WFtlaf_OyE4EW7Xus1z7aIfNI6tDDQ,425
16
+ aiohappyeyeballs/utils.py,sha256=on9GxIR0LhEfZu8P6Twi9hepX9zDanuZM20MWsb3xlQ,3028
free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs-2.6.1.dist-info/WHEEL ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ Wheel-Version: 1.0
2
+ Generator: poetry-core 2.1.1
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs/__init__.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ __version__ = "2.6.1"
2
+
3
+ from .impl import start_connection
4
+ from .types import AddrInfoType, SocketFactoryType
5
+ from .utils import addr_to_addr_infos, pop_addr_infos_interleave, remove_addr_infos
6
+
7
+ __all__ = (
8
+ "AddrInfoType",
9
+ "SocketFactoryType",
10
+ "addr_to_addr_infos",
11
+ "pop_addr_infos_interleave",
12
+ "remove_addr_infos",
13
+ "start_connection",
14
+ )
free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (537 Bytes). View file
 
free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs/__pycache__/_staggered.cpython-312.pyc ADDED
Binary file (7.98 kB). View file
 
free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs/__pycache__/impl.cpython-312.pyc ADDED
Binary file (10.1 kB). View file
 
free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs/__pycache__/types.cpython-312.pyc ADDED
Binary file (633 Bytes). View file
 
free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs/__pycache__/utils.cpython-312.pyc ADDED
Binary file (3.72 kB). View file
 
free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs/_staggered.py ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import asyncio
2
+ import contextlib
3
+
4
+ # PY3.9: Import Callable from typing until we drop Python 3.9 support
5
+ # https://github.com/python/cpython/issues/87131
6
+ from typing import (
7
+ TYPE_CHECKING,
8
+ Any,
9
+ Awaitable,
10
+ Callable,
11
+ Iterable,
12
+ List,
13
+ Optional,
14
+ Set,
15
+ Tuple,
16
+ TypeVar,
17
+ Union,
18
+ )
19
+
20
+ _T = TypeVar("_T")
21
+
22
+ RE_RAISE_EXCEPTIONS = (SystemExit, KeyboardInterrupt)
23
+
24
+
25
+ def _set_result(wait_next: "asyncio.Future[None]") -> None:
26
+ """Set the result of a future if it is not already done."""
27
+ if not wait_next.done():
28
+ wait_next.set_result(None)
29
+
30
+
31
+ async def _wait_one(
32
+ futures: "Iterable[asyncio.Future[Any]]",
33
+ loop: asyncio.AbstractEventLoop,
34
+ ) -> _T:
35
+ """Wait for the first future to complete."""
36
+ wait_next = loop.create_future()
37
+
38
+ def _on_completion(fut: "asyncio.Future[Any]") -> None:
39
+ if not wait_next.done():
40
+ wait_next.set_result(fut)
41
+
42
+ for f in futures:
43
+ f.add_done_callback(_on_completion)
44
+
45
+ try:
46
+ return await wait_next
47
+ finally:
48
+ for f in futures:
49
+ f.remove_done_callback(_on_completion)
50
+
51
+
52
+ async def staggered_race(
53
+ coro_fns: Iterable[Callable[[], Awaitable[_T]]],
54
+ delay: Optional[float],
55
+ *,
56
+ loop: Optional[asyncio.AbstractEventLoop] = None,
57
+ ) -> Tuple[Optional[_T], Optional[int], List[Optional[BaseException]]]:
58
+ """
59
+ Run coroutines with staggered start times and take the first to finish.
60
+
61
+ This method takes an iterable of coroutine functions. The first one is
62
+ started immediately. From then on, whenever the immediately preceding one
63
+ fails (raises an exception), or when *delay* seconds has passed, the next
64
+ coroutine is started. This continues until one of the coroutines complete
65
+ successfully, in which case all others are cancelled, or until all
66
+ coroutines fail.
67
+
68
+ The coroutines provided should be well-behaved in the following way:
69
+
70
+ * They should only ``return`` if completed successfully.
71
+
72
+ * They should always raise an exception if they did not complete
73
+ successfully. In particular, if they handle cancellation, they should
74
+ probably reraise, like this::
75
+
76
+ try:
77
+ # do work
78
+ except asyncio.CancelledError:
79
+ # undo partially completed work
80
+ raise
81
+
82
+ Args:
83
+ ----
84
+ coro_fns: an iterable of coroutine functions, i.e. callables that
85
+ return a coroutine object when called. Use ``functools.partial`` or
86
+ lambdas to pass arguments.
87
+
88
+ delay: amount of time, in seconds, between starting coroutines. If
89
+ ``None``, the coroutines will run sequentially.
90
+
91
+ loop: the event loop to use. If ``None``, the running loop is used.
92
+
93
+ Returns:
94
+ -------
95
+ tuple *(winner_result, winner_index, exceptions)* where
96
+
97
+ - *winner_result*: the result of the winning coroutine, or ``None``
98
+ if no coroutines won.
99
+
100
+ - *winner_index*: the index of the winning coroutine in
101
+ ``coro_fns``, or ``None`` if no coroutines won. If the winning
102
+ coroutine may return None on success, *winner_index* can be used
103
+ to definitively determine whether any coroutine won.
104
+
105
+ - *exceptions*: list of exceptions returned by the coroutines.
106
+ ``len(exceptions)`` is equal to the number of coroutines actually
107
+ started, and the order is the same as in ``coro_fns``. The winning
108
+ coroutine's entry is ``None``.
109
+
110
+ """
111
+ loop = loop or asyncio.get_running_loop()
112
+ exceptions: List[Optional[BaseException]] = []
113
+ tasks: Set[asyncio.Task[Optional[Tuple[_T, int]]]] = set()
114
+
115
+ async def run_one_coro(
116
+ coro_fn: Callable[[], Awaitable[_T]],
117
+ this_index: int,
118
+ start_next: "asyncio.Future[None]",
119
+ ) -> Optional[Tuple[_T, int]]:
120
+ """
121
+ Run a single coroutine.
122
+
123
+ If the coroutine fails, set the exception in the exceptions list and
124
+ start the next coroutine by setting the result of the start_next.
125
+
126
+ If the coroutine succeeds, return the result and the index of the
127
+ coroutine in the coro_fns list.
128
+
129
+ If SystemExit or KeyboardInterrupt is raised, re-raise it.
130
+ """
131
+ try:
132
+ result = await coro_fn()
133
+ except RE_RAISE_EXCEPTIONS:
134
+ raise
135
+ except BaseException as e:
136
+ exceptions[this_index] = e
137
+ _set_result(start_next) # Kickstart the next coroutine
138
+ return None
139
+
140
+ return result, this_index
141
+
142
+ start_next_timer: Optional[asyncio.TimerHandle] = None
143
+ start_next: Optional[asyncio.Future[None]]
144
+ task: asyncio.Task[Optional[Tuple[_T, int]]]
145
+ done: Union[asyncio.Future[None], asyncio.Task[Optional[Tuple[_T, int]]]]
146
+ coro_iter = iter(coro_fns)
147
+ this_index = -1
148
+ try:
149
+ while True:
150
+ if coro_fn := next(coro_iter, None):
151
+ this_index += 1
152
+ exceptions.append(None)
153
+ start_next = loop.create_future()
154
+ task = loop.create_task(run_one_coro(coro_fn, this_index, start_next))
155
+ tasks.add(task)
156
+ start_next_timer = (
157
+ loop.call_later(delay, _set_result, start_next) if delay else None
158
+ )
159
+ elif not tasks:
160
+ # We exhausted the coro_fns list and no tasks are running
161
+ # so we have no winner and all coroutines failed.
162
+ break
163
+
164
+ while tasks or start_next:
165
+ done = await _wait_one(
166
+ (*tasks, start_next) if start_next else tasks, loop
167
+ )
168
+ if done is start_next:
169
+ # The current task has failed or the timer has expired
170
+ # so we need to start the next task.
171
+ start_next = None
172
+ if start_next_timer:
173
+ start_next_timer.cancel()
174
+ start_next_timer = None
175
+
176
+ # Break out of the task waiting loop to start the next
177
+ # task.
178
+ break
179
+
180
+ if TYPE_CHECKING:
181
+ assert isinstance(done, asyncio.Task)
182
+
183
+ tasks.remove(done)
184
+ if winner := done.result():
185
+ return *winner, exceptions
186
+ finally:
187
+ # We either have:
188
+ # - a winner
189
+ # - all tasks failed
190
+ # - a KeyboardInterrupt or SystemExit.
191
+
192
+ #
193
+ # If the timer is still running, cancel it.
194
+ #
195
+ if start_next_timer:
196
+ start_next_timer.cancel()
197
+
198
+ #
199
+ # If there are any tasks left, cancel them and than
200
+ # wait them so they fill the exceptions list.
201
+ #
202
+ for task in tasks:
203
+ task.cancel()
204
+ with contextlib.suppress(asyncio.CancelledError):
205
+ await task
206
+
207
+ return None, None, exceptions
free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs/impl.py ADDED
@@ -0,0 +1,259 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Base implementation."""
2
+
3
+ import asyncio
4
+ import collections
5
+ import contextlib
6
+ import functools
7
+ import itertools
8
+ import socket
9
+ from typing import List, Optional, Sequence, Set, Union
10
+
11
+ from . import _staggered
12
+ from .types import AddrInfoType, SocketFactoryType
13
+
14
+
15
+ async def start_connection(
16
+ addr_infos: Sequence[AddrInfoType],
17
+ *,
18
+ local_addr_infos: Optional[Sequence[AddrInfoType]] = None,
19
+ happy_eyeballs_delay: Optional[float] = None,
20
+ interleave: Optional[int] = None,
21
+ loop: Optional[asyncio.AbstractEventLoop] = None,
22
+ socket_factory: Optional[SocketFactoryType] = None,
23
+ ) -> socket.socket:
24
+ """
25
+ Connect to a TCP server.
26
+
27
+ Create a socket connection to a specified destination. The
28
+ destination is specified as a list of AddrInfoType tuples as
29
+ returned from getaddrinfo().
30
+
31
+ The arguments are, in order:
32
+
33
+ * ``family``: the address family, e.g. ``socket.AF_INET`` or
34
+ ``socket.AF_INET6``.
35
+ * ``type``: the socket type, e.g. ``socket.SOCK_STREAM`` or
36
+ ``socket.SOCK_DGRAM``.
37
+ * ``proto``: the protocol, e.g. ``socket.IPPROTO_TCP`` or
38
+ ``socket.IPPROTO_UDP``.
39
+ * ``canonname``: the canonical name of the address, e.g.
40
+ ``"www.python.org"``.
41
+ * ``sockaddr``: the socket address
42
+
43
+ This method is a coroutine which will try to establish the connection
44
+ in the background. When successful, the coroutine returns a
45
+ socket.
46
+
47
+ The expected use case is to use this method in conjunction with
48
+ loop.create_connection() to establish a connection to a server::
49
+
50
+ socket = await start_connection(addr_infos)
51
+ transport, protocol = await loop.create_connection(
52
+ MyProtocol, sock=socket, ...)
53
+ """
54
+ if not (current_loop := loop):
55
+ current_loop = asyncio.get_running_loop()
56
+
57
+ single_addr_info = len(addr_infos) == 1
58
+
59
+ if happy_eyeballs_delay is not None and interleave is None:
60
+ # If using happy eyeballs, default to interleave addresses by family
61
+ interleave = 1
62
+
63
+ if interleave and not single_addr_info:
64
+ addr_infos = _interleave_addrinfos(addr_infos, interleave)
65
+
66
+ sock: Optional[socket.socket] = None
67
+ # uvloop can raise RuntimeError instead of OSError
68
+ exceptions: List[List[Union[OSError, RuntimeError]]] = []
69
+ if happy_eyeballs_delay is None or single_addr_info:
70
+ # not using happy eyeballs
71
+ for addrinfo in addr_infos:
72
+ try:
73
+ sock = await _connect_sock(
74
+ current_loop,
75
+ exceptions,
76
+ addrinfo,
77
+ local_addr_infos,
78
+ None,
79
+ socket_factory,
80
+ )
81
+ break
82
+ except (RuntimeError, OSError):
83
+ continue
84
+ else: # using happy eyeballs
85
+ open_sockets: Set[socket.socket] = set()
86
+ try:
87
+ sock, _, _ = await _staggered.staggered_race(
88
+ (
89
+ functools.partial(
90
+ _connect_sock,
91
+ current_loop,
92
+ exceptions,
93
+ addrinfo,
94
+ local_addr_infos,
95
+ open_sockets,
96
+ socket_factory,
97
+ )
98
+ for addrinfo in addr_infos
99
+ ),
100
+ happy_eyeballs_delay,
101
+ )
102
+ finally:
103
+ # If we have a winner, staggered_race will
104
+ # cancel the other tasks, however there is a
105
+ # small race window where any of the other tasks
106
+ # can be done before they are cancelled which
107
+ # will leave the socket open. To avoid this problem
108
+ # we pass a set to _connect_sock to keep track of
109
+ # the open sockets and close them here if there
110
+ # are any "runner up" sockets.
111
+ for s in open_sockets:
112
+ if s is not sock:
113
+ with contextlib.suppress(OSError):
114
+ s.close()
115
+ open_sockets = None # type: ignore[assignment]
116
+
117
+ if sock is None:
118
+ all_exceptions = [exc for sub in exceptions for exc in sub]
119
+ try:
120
+ first_exception = all_exceptions[0]
121
+ if len(all_exceptions) == 1:
122
+ raise first_exception
123
+ else:
124
+ # If they all have the same str(), raise one.
125
+ model = str(first_exception)
126
+ if all(str(exc) == model for exc in all_exceptions):
127
+ raise first_exception
128
+ # Raise a combined exception so the user can see all
129
+ # the various error messages.
130
+ msg = "Multiple exceptions: {}".format(
131
+ ", ".join(str(exc) for exc in all_exceptions)
132
+ )
133
+ # If the errno is the same for all exceptions, raise
134
+ # an OSError with that errno.
135
+ if isinstance(first_exception, OSError):
136
+ first_errno = first_exception.errno
137
+ if all(
138
+ isinstance(exc, OSError) and exc.errno == first_errno
139
+ for exc in all_exceptions
140
+ ):
141
+ raise OSError(first_errno, msg)
142
+ elif isinstance(first_exception, RuntimeError) and all(
143
+ isinstance(exc, RuntimeError) for exc in all_exceptions
144
+ ):
145
+ raise RuntimeError(msg)
146
+ # We have a mix of OSError and RuntimeError
147
+ # so we have to pick which one to raise.
148
+ # and we raise OSError for compatibility
149
+ raise OSError(msg)
150
+ finally:
151
+ all_exceptions = None # type: ignore[assignment]
152
+ exceptions = None # type: ignore[assignment]
153
+
154
+ return sock
155
+
156
+
157
+ async def _connect_sock(
158
+ loop: asyncio.AbstractEventLoop,
159
+ exceptions: List[List[Union[OSError, RuntimeError]]],
160
+ addr_info: AddrInfoType,
161
+ local_addr_infos: Optional[Sequence[AddrInfoType]] = None,
162
+ open_sockets: Optional[Set[socket.socket]] = None,
163
+ socket_factory: Optional[SocketFactoryType] = None,
164
+ ) -> socket.socket:
165
+ """
166
+ Create, bind and connect one socket.
167
+
168
+ If open_sockets is passed, add the socket to the set of open sockets.
169
+ Any failure caught here will remove the socket from the set and close it.
170
+
171
+ Callers can use this set to close any sockets that are not the winner
172
+ of all staggered tasks in the result there are runner up sockets aka
173
+ multiple winners.
174
+ """
175
+ my_exceptions: List[Union[OSError, RuntimeError]] = []
176
+ exceptions.append(my_exceptions)
177
+ family, type_, proto, _, address = addr_info
178
+ sock = None
179
+ try:
180
+ if socket_factory is not None:
181
+ sock = socket_factory(addr_info)
182
+ else:
183
+ sock = socket.socket(family=family, type=type_, proto=proto)
184
+ if open_sockets is not None:
185
+ open_sockets.add(sock)
186
+ sock.setblocking(False)
187
+ if local_addr_infos is not None:
188
+ for lfamily, _, _, _, laddr in local_addr_infos:
189
+ # skip local addresses of different family
190
+ if lfamily != family:
191
+ continue
192
+ try:
193
+ sock.bind(laddr)
194
+ break
195
+ except OSError as exc:
196
+ msg = (
197
+ f"error while attempting to bind on "
198
+ f"address {laddr!r}: "
199
+ f"{(exc.strerror or '').lower()}"
200
+ )
201
+ exc = OSError(exc.errno, msg)
202
+ my_exceptions.append(exc)
203
+ else: # all bind attempts failed
204
+ if my_exceptions:
205
+ raise my_exceptions.pop()
206
+ else:
207
+ raise OSError(f"no matching local address with {family=} found")
208
+ await loop.sock_connect(sock, address)
209
+ return sock
210
+ except (RuntimeError, OSError) as exc:
211
+ my_exceptions.append(exc)
212
+ if sock is not None:
213
+ if open_sockets is not None:
214
+ open_sockets.remove(sock)
215
+ try:
216
+ sock.close()
217
+ except OSError as e:
218
+ my_exceptions.append(e)
219
+ raise
220
+ raise
221
+ except:
222
+ if sock is not None:
223
+ if open_sockets is not None:
224
+ open_sockets.remove(sock)
225
+ try:
226
+ sock.close()
227
+ except OSError as e:
228
+ my_exceptions.append(e)
229
+ raise
230
+ raise
231
+ finally:
232
+ exceptions = my_exceptions = None # type: ignore[assignment]
233
+
234
+
235
+ def _interleave_addrinfos(
236
+ addrinfos: Sequence[AddrInfoType], first_address_family_count: int = 1
237
+ ) -> List[AddrInfoType]:
238
+ """Interleave list of addrinfo tuples by family."""
239
+ # Group addresses by family
240
+ addrinfos_by_family: collections.OrderedDict[int, List[AddrInfoType]] = (
241
+ collections.OrderedDict()
242
+ )
243
+ for addr in addrinfos:
244
+ family = addr[0]
245
+ if family not in addrinfos_by_family:
246
+ addrinfos_by_family[family] = []
247
+ addrinfos_by_family[family].append(addr)
248
+ addrinfos_lists = list(addrinfos_by_family.values())
249
+
250
+ reordered: List[AddrInfoType] = []
251
+ if first_address_family_count > 1:
252
+ reordered.extend(addrinfos_lists[0][: first_address_family_count - 1])
253
+ del addrinfos_lists[0][: first_address_family_count - 1]
254
+ reordered.extend(
255
+ a
256
+ for a in itertools.chain.from_iterable(itertools.zip_longest(*addrinfos_lists))
257
+ if a is not None
258
+ )
259
+ return reordered
free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs/py.typed ADDED
File without changes
free_gaia_env/lib/python3.12/site-packages/aiohappyeyeballs/types.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Types for aiohappyeyeballs."""
2
+
3
+ import socket
4
+
5
+ # PY3.9: Import Callable from typing until we drop Python 3.9 support
6
+ # https://github.com/python/cpython/issues/87131
7
+ from typing import Callable, Tuple, Union
8
+
9
+ AddrInfoType = Tuple[
10
+ Union[int, socket.AddressFamily],
11
+ Union[int, socket.SocketKind],
12
+ int,
13
+ str,
14
+ Tuple, # type: ignore[type-arg]
15
+ ]
16
+
17
+ SocketFactoryType = Callable[[AddrInfoType], socket.socket]