aakash0017 commited on
Commit
b7731cd
1 Parent(s): f48557a

Upload folder using huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
.gitattributes CHANGED
@@ -33,3 +33,36 @@ 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
+ myenv/bin/python filter=lfs diff=lfs merge=lfs -text
37
+ myenv/bin/python3 filter=lfs diff=lfs merge=lfs -text
38
+ myenv/bin/python3.10 filter=lfs diff=lfs merge=lfs -text
39
+ myenv/lib/python3.10/site-packages/PIL/.dylibs/libfreetype.6.dylib filter=lfs diff=lfs merge=lfs -text
40
+ myenv/lib/python3.10/site-packages/PIL/.dylibs/libharfbuzz.0.dylib filter=lfs diff=lfs merge=lfs -text
41
+ myenv/lib/python3.10/site-packages/altair/vegalite/v5/schema/__pycache__/core.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
42
+ myenv/lib/python3.10/site-packages/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_x86.pdb filter=lfs diff=lfs merge=lfs -text
43
+ myenv/lib/python3.10/site-packages/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_amd64.pdb filter=lfs diff=lfs merge=lfs -text
44
+ myenv/lib/python3.10/site-packages/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_x86.pdb filter=lfs diff=lfs merge=lfs -text
45
+ myenv/lib/python3.10/site-packages/fontTools/misc/bezierTools.cpython-310-darwin.so filter=lfs diff=lfs merge=lfs -text
46
+ myenv/lib/python3.10/site-packages/gradio/frpc_darwin_arm64_v0.2 filter=lfs diff=lfs merge=lfs -text
47
+ myenv/lib/python3.10/site-packages/gradio/templates/cdn/assets/Index-a84dbe34.js.map filter=lfs diff=lfs merge=lfs -text
48
+ myenv/lib/python3.10/site-packages/gradio/templates/frontend/assets/Index-9037b141.js.map filter=lfs diff=lfs merge=lfs -text
49
+ myenv/lib/python3.10/site-packages/numpy/.dylibs/libgfortran.5.dylib filter=lfs diff=lfs merge=lfs -text
50
+ myenv/lib/python3.10/site-packages/numpy/.dylibs/libopenblas64_.0.dylib filter=lfs diff=lfs merge=lfs -text
51
+ myenv/lib/python3.10/site-packages/numpy/core/_multiarray_umath.cpython-310-darwin.so filter=lfs diff=lfs merge=lfs -text
52
+ myenv/lib/python3.10/site-packages/pandas/_libs/algos.cpython-310-darwin.so filter=lfs diff=lfs merge=lfs -text
53
+ myenv/lib/python3.10/site-packages/pandas/_libs/groupby.cpython-310-darwin.so filter=lfs diff=lfs merge=lfs -text
54
+ myenv/lib/python3.10/site-packages/pandas/_libs/hashtable.cpython-310-darwin.so filter=lfs diff=lfs merge=lfs -text
55
+ myenv/lib/python3.10/site-packages/pandas/_libs/interval.cpython-310-darwin.so filter=lfs diff=lfs merge=lfs -text
56
+ myenv/lib/python3.10/site-packages/pandas/_libs/join.cpython-310-darwin.so filter=lfs diff=lfs merge=lfs -text
57
+ myenv/lib/python3.10/site-packages/pydantic_core/_pydantic_core.cpython-310-darwin.so filter=lfs diff=lfs merge=lfs -text
58
+ myenv/lib/python3.10/site-packages/safetensors/_safetensors_rust.cpython-310-darwin.so filter=lfs diff=lfs merge=lfs -text
59
+ myenv/lib/python3.10/site-packages/sentencepiece/_sentencepiece.cpython-310-darwin.so filter=lfs diff=lfs merge=lfs -text
60
+ myenv/lib/python3.10/site-packages/tokenizers/tokenizers.cpython-310-darwin.so filter=lfs diff=lfs merge=lfs -text
61
+ myenv/lib/python3.10/site-packages/torch/bin/protoc filter=lfs diff=lfs merge=lfs -text
62
+ myenv/lib/python3.10/site-packages/torch/bin/protoc-3.13.0.0 filter=lfs diff=lfs merge=lfs -text
63
+ myenv/lib/python3.10/site-packages/torch/lib/libtorch_cpu.dylib filter=lfs diff=lfs merge=lfs -text
64
+ myenv/lib/python3.10/site-packages/torch/lib/libtorch_python.dylib filter=lfs diff=lfs merge=lfs -text
65
+ myenv/lib/python3.10/site-packages/torchaudio/.dylibs/libc++.1.0.dylib filter=lfs diff=lfs merge=lfs -text
66
+ myenv/lib/python3.10/site-packages/torchvision/.dylibs/libc++.1.0.dylib filter=lfs diff=lfs merge=lfs -text
67
+ myenv/lib/python3.10/site-packages/torchvision/_C.so filter=lfs diff=lfs merge=lfs -text
68
+ myenv/lib/python3.10/site-packages/zmq/.dylibs/libzmq.5.dylib filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,12 +1,6 @@
1
  ---
2
- title: DrVai Rag Testing
3
- emoji: 🐨
4
- colorFrom: gray
5
- colorTo: pink
6
  sdk: gradio
7
- sdk_version: 4.0.2
8
- app_file: app.py
9
- pinned: false
10
  ---
11
-
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: DrVai-Rag-Testing
3
+ app_file: gradio-rag-deployment.py
 
 
4
  sdk: gradio
5
+ sdk_version: 4.0.0
 
 
6
  ---
 
 
__pycache__/rag.cpython-310.pyc ADDED
Binary file (1.87 kB). View file
 
common_diseases_wiki.txt ADDED
File without changes
exp.ipynb ADDED
@@ -0,0 +1,462 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 6,
6
+ "metadata": {},
7
+ "outputs": [
8
+ {
9
+ "name": "stdout",
10
+ "output_type": "stream",
11
+ "text": [
12
+ "\n"
13
+ ]
14
+ }
15
+ ],
16
+ "source": [
17
+ "from Bio import Entrez\n",
18
+ "from concurrent.futures import ThreadPoolExecutor\n",
19
+ "\n",
20
+ "Entrez.email = \"[email protected]\" # Replace with your email\n",
21
+ "\n",
22
+ "def fetch_abstract(pubmed_id):\n",
23
+ " handle = Entrez.efetch(db=\"pubmed\", id=pubmed_id, rettype=\"text\", retmode=\"text\")\n",
24
+ " abstract = handle.read()\n",
25
+ " handle.close()\n",
26
+ " return abstract\n",
27
+ "\n",
28
+ "def search_pubmed(query, max_results=1):\n",
29
+ " handle = Entrez.esearch(db=\"pubmed\", term=query, retmax=max_results)\n",
30
+ " record = Entrez.read(handle)\n",
31
+ " handle.close()\n",
32
+ "\n",
33
+ " idlist = record[\"IdList\"]\n",
34
+ " return idlist\n",
35
+ "\n",
36
+ "if __name__ == \"__main__\":\n",
37
+ " keyword = \"diabetes\" # Replace with your keyword\n",
38
+ " ids = search_pubmed(keyword)\n",
39
+ " \n",
40
+ " # Use multi-threading to fetch abstracts\n",
41
+ " with ThreadPoolExecutor() as executor:\n",
42
+ " abstracts = list(executor.map(fetch_abstract, ids))\n",
43
+ "\n",
44
+ " for abstract in abstracts:\n",
45
+ " print(abstract)"
46
+ ]
47
+ },
48
+ {
49
+ "cell_type": "code",
50
+ "execution_count": 31,
51
+ "metadata": {},
52
+ "outputs": [
53
+ {
54
+ "name": "stdout",
55
+ "output_type": "stream",
56
+ "text": [
57
+ "Ophthalmology (/ˌɒfθælˈmɒlədʒi/ OFF-thal-MOL-ə-jee)[1] is a surgical subspecialty within medicine that deals with the diagnosis and treatment of eye disorders.[2]\n",
58
+ "\n"
59
+ ]
60
+ }
61
+ ],
62
+ "source": [
63
+ "\n",
64
+ "# import required modules\n",
65
+ "from bs4 import BeautifulSoup\n",
66
+ "import requests\n",
67
+ " \n",
68
+ "# get URL\n",
69
+ "page = requests.get(\"https://en.wikipedia.org/wiki/Ophthalmology\")\n",
70
+ " \n",
71
+ "# scrape webpage\n",
72
+ "soup = BeautifulSoup(page.content, 'html.parser')\n",
73
+ " \n",
74
+ "list(soup.children)\n",
75
+ " \n",
76
+ "# find all occurrence of p in HTML\n",
77
+ "# includes HTML tags\n",
78
+ "# print(soup.find_all('p'))\n",
79
+ " \n",
80
+ "# print('\\n\\n')\n",
81
+ " \n",
82
+ "# return only text\n",
83
+ "# does not include HTML tags\n",
84
+ "print(soup.find_all('p')[0].get_text())"
85
+ ]
86
+ },
87
+ {
88
+ "cell_type": "code",
89
+ "execution_count": 52,
90
+ "metadata": {},
91
+ "outputs": [],
92
+ "source": [
93
+ "import re\n",
94
+ "# for url in soup.find_all('a',attrs={'href': re.compile(\"^https://www.\")}): \n",
95
+ "for url in soup.find_all('li',attrs={'a': re.compile(\"\")}): \n",
96
+ " print(url['href'])"
97
+ ]
98
+ },
99
+ {
100
+ "cell_type": "code",
101
+ "execution_count": 41,
102
+ "metadata": {},
103
+ "outputs": [
104
+ {
105
+ "data": {
106
+ "text/plain": [
107
+ "912"
108
+ ]
109
+ },
110
+ "execution_count": 41,
111
+ "metadata": {},
112
+ "output_type": "execute_result"
113
+ }
114
+ ],
115
+ "source": [
116
+ "len(soup.find_all('a'))"
117
+ ]
118
+ },
119
+ {
120
+ "cell_type": "code",
121
+ "execution_count": 44,
122
+ "metadata": {},
123
+ "outputs": [
124
+ {
125
+ "name": "stdout",
126
+ "output_type": "stream",
127
+ "text": [
128
+ "<a class=\"vector-toc-link\" href=\"#18th–19th_centuries\">\n",
129
+ "<div class=\"vector-toc-text\">\n",
130
+ "<span class=\"vector-toc-numb\">8.1</span>18th–19th centuries</div>\n",
131
+ "</a>\n",
132
+ "<a class=\"vector-toc-link\" href=\"#20th–21st_centuries\">\n",
133
+ "<div class=\"vector-toc-text\">\n",
134
+ "<span class=\"vector-toc-numb\">8.2</span>20th–21st centuries</div>\n",
135
+ "</a>\n",
136
+ "<a class=\"vector-toc-link\" href=\"#See_also\">\n",
137
+ "<div class=\"vector-toc-text\">\n",
138
+ "<span class=\"vector-toc-numb\">9</span>See also</div>\n",
139
+ "</a>\n",
140
+ "<a class=\"vector-toc-link\" href=\"#References\">\n",
141
+ "<div class=\"vector-toc-text\">\n",
142
+ "<span class=\"vector-toc-numb\">10</span>References</div>\n",
143
+ "</a>\n",
144
+ "<a class=\"vector-toc-link\" href=\"#External_links\">\n",
145
+ "<div class=\"vector-toc-text\">\n",
146
+ "<span class=\"vector-toc-numb\">11</span>External links</div>\n",
147
+ "</a>\n",
148
+ "<a class=\"interlanguage-link-target\" href=\"https://ar.wikipedia.org/wiki/%D8%B7%D8%A8_%D8%A7%D9%84%D8%B9%D9%8A%D9%88%D9%86\" hreflang=\"ar\" lang=\"ar\" title=\"طب العيون – Arabic\"><span>العربية</span></a>\n",
149
+ "<a class=\"interlanguage-link-target\" href=\"https://an.wikipedia.org/wiki/Oftalmoloch%C3%ADa\" hreflang=\"an\" lang=\"an\" title=\"Oftalmolochía – Aragonese\"><span>Aragonés</span></a>\n",
150
+ "<a class=\"interlanguage-link-target\" href=\"https://ast.wikipedia.org/wiki/Oftalmolox%C3%ADa\" hreflang=\"ast\" lang=\"ast\" title=\"Oftalmoloxía – Asturian\"><span>Asturianu</span></a>\n",
151
+ "<a class=\"interlanguage-link-target\" href=\"https://az.wikipedia.org/wiki/Oftalmologiya\" hreflang=\"az\" lang=\"az\" title=\"Oftalmologiya – Azerbaijani\"><span>Azərbaycanca</span></a>\n",
152
+ "<a class=\"interlanguage-link-target\" href=\"https://azb.wikipedia.org/wiki/%DA%AF%D8%A4%D8%B2_%D8%AF%D9%88%DA%A9%D8%AA%D9%88%D8%B1%D9%84%D9%88%DA%AF%D9%88\" hreflang=\"azb\" lang=\"azb\" title=\"گؤز دوکتورلوگو – South Azerbaijani\"><span>تۆرکجه</span></a>\n",
153
+ "<a class=\"interlanguage-link-target\" href=\"https://bn.wikipedia.org/wiki/%E0%A6%9A%E0%A6%95%E0%A7%8D%E0%A6%B7%E0%A7%81%E0%A6%9A%E0%A6%BF%E0%A6%95%E0%A6%BF%E0%A7%8E%E0%A6%B8%E0%A6%BE%E0%A6%AC%E0%A6%BF%E0%A6%9C%E0%A7%8D%E0%A6%9E%E0%A6%BE%E0%A6%A8\" hreflang=\"bn\" lang=\"bn\" title=\"চক্ষুচিকিৎসাবিজ্ঞান – Bangla\"><span>বাংলা</span></a>\n",
154
+ "<a class=\"interlanguage-link-target\" href=\"https://be.wikipedia.org/wiki/%D0%90%D1%84%D1%82%D0%B0%D0%BB%D1%8C%D0%BC%D0%B0%D0%BB%D0%BE%D0%B3%D1%96%D1%8F\" hreflang=\"be\" lang=\"be\" title=\"Афтальмалогія – Belarusian\"><span>Беларуская</span></a>\n",
155
+ "<a class=\"interlanguage-link-target\" href=\"https://be-tarask.wikipedia.org/wiki/%D0%90%D1%84%D1%82%D0%B0%D0%BB%D1%8C%D0%BC%D0%B0%D0%BB%D1%91%D0%B3%D1%96%D1%8F\" hreflang=\"be-tarask\" lang=\"be-tarask\" title=\"Афтальмалёгія – Belarusian (Taraškievica orthography)\"><span>Беларуская (тарашкевіца)</span></a>\n",
156
+ "<a class=\"interlanguage-link-target\" href=\"https://bg.wikipedia.org/wiki/%D0%9E%D1%84%D1%82%D0%B0%D0%BB%D0%BC%D0%BE%D0%BB%D0%BE%D0%B3%D0%B8%D1%8F\" hreflang=\"bg\" lang=\"bg\" title=\"Офталмология – Bulgarian\"><span>Български</span></a>\n",
157
+ "<a class=\"interlanguage-link-target\" href=\"https://bs.wikipedia.org/wiki/Oftalmologija\" hreflang=\"bs\" lang=\"bs\" title=\"Oftalmologija – Bosnian\"><span>Bosanski</span></a>\n",
158
+ "<a class=\"interlanguage-link-target\" href=\"https://ca.wikipedia.org/wiki/Oftalmologia\" hreflang=\"ca\" lang=\"ca\" title=\"Oftalmologia – Catalan\"><span>Català</span></a>\n",
159
+ "<a class=\"interlanguage-link-target\" href=\"https://cs.wikipedia.org/wiki/Oftalmologie\" hreflang=\"cs\" lang=\"cs\" title=\"Oftalmologie – Czech\"><span>Čeština</span></a>\n",
160
+ "<a class=\"interlanguage-link-target\" href=\"https://da.wikipedia.org/wiki/Oftalmologi\" hreflang=\"da\" lang=\"da\" title=\"Oftalmologi – Danish\"><span>Dansk</span></a>\n",
161
+ "<a class=\"interlanguage-link-target\" href=\"https://de.wikipedia.org/wiki/Augenheilkunde\" hreflang=\"de\" lang=\"de\" title=\"Augenheilkunde – German\"><span>Deutsch</span></a>\n",
162
+ "<a class=\"interlanguage-link-target\" href=\"https://et.wikipedia.org/wiki/Oftalmoloogia\" hreflang=\"et\" lang=\"et\" title=\"Oftalmoloogia – Estonian\"><span>Eesti</span></a>\n",
163
+ "<a class=\"interlanguage-link-target\" href=\"https://el.wikipedia.org/wiki/%CE%9F%CF%86%CE%B8%CE%B1%CE%BB%CE%BC%CE%BF%CE%BB%CE%BF%CE%B3%CE%AF%CE%B1\" hreflang=\"el\" lang=\"el\" title=\"Οφθαλμολογία – Greek\"><span>Ελληνικά</span></a>\n",
164
+ "<a class=\"interlanguage-link-target\" href=\"https://es.wikipedia.org/wiki/Oftalmolog%C3%ADa\" hreflang=\"es\" lang=\"es\" title=\"Oftalmología – Spanish\"><span>Español</span></a>\n",
165
+ "<a class=\"interlanguage-link-target\" href=\"https://eo.wikipedia.org/wiki/Okulkuracado\" hreflang=\"eo\" lang=\"eo\" title=\"Okulkuracado – Esperanto\"><span>Esperanto</span></a>\n",
166
+ "<a class=\"interlanguage-link-target\" href=\"https://eu.wikipedia.org/wiki/Oftalmologia\" hreflang=\"eu\" lang=\"eu\" title=\"Oftalmologia – Basque\"><span>Euskara</span></a>\n",
167
+ "<a class=\"interlanguage-link-target\" href=\"https://fa.wikipedia.org/wiki/%DA%86%D8%B4%D9%85%E2%80%8C%D9%BE%D8%B2%D8%B4%DA%A9%DB%8C\" hreflang=\"fa\" lang=\"fa\" title=\"چشم‌پزشکی – Persian\"><span>فارسی</span></a>\n",
168
+ "<a class=\"interlanguage-link-target\" href=\"https://fr.wikipedia.org/wiki/Ophtalmologie\" hreflang=\"fr\" lang=\"fr\" title=\"Ophtalmologie – French\"><span>Français</span></a>\n",
169
+ "<a class=\"interlanguage-link-target\" href=\"https://fy.wikipedia.org/wiki/Eachhielkunde\" hreflang=\"fy\" lang=\"fy\" title=\"Eachhielkunde – Western Frisian\"><span>Frysk</span></a>\n",
170
+ "<a class=\"interlanguage-link-target\" href=\"https://ga.wikipedia.org/wiki/Oftailmeola%C3%ADocht\" hreflang=\"ga\" lang=\"ga\" title=\"Oftailmeolaíocht – Irish\"><span>Gaeilge</span></a>\n",
171
+ "<a class=\"interlanguage-link-target\" href=\"https://gl.wikipedia.org/wiki/Oftalmolox%C3%ADa\" hreflang=\"gl\" lang=\"gl\" title=\"Oftalmoloxía – Galician\"><span>Galego</span></a>\n",
172
+ "<a class=\"interlanguage-link-target\" href=\"https://ko.wikipedia.org/wiki/%EC%95%88%EA%B3%BC\" hreflang=\"ko\" lang=\"ko\" title=\"안과 – Korean\"><span>한국어</span></a>\n",
173
+ "<a class=\"interlanguage-link-target\" href=\"https://hy.wikipedia.org/wiki/%D4%B1%D5%AF%D5%B6%D5%A1%D5%A2%D5%A1%D5%B6%D5%B8%D6%82%D5%A9%D5%B5%D5%B8%D6%82%D5%B6\" hreflang=\"hy\" lang=\"hy\" title=\"Ակնաբանություն – Armenian\"><span>Հայերեն</span></a>\n",
174
+ "<a class=\"interlanguage-link-target\" href=\"https://hi.wikipedia.org/wiki/%E0%A4%A8%E0%A5%87%E0%A4%A4%E0%A5%8D%E0%A4%B0%E0%A4%B5%E0%A4%BF%E0%A4%9C%E0%A5%8D%E0%A4%9E%E0%A4%BE%E0%A4%A8\" hreflang=\"hi\" lang=\"hi\" title=\"नेत्रविज्ञान – Hindi\"><span>हिन्दी</span></a>\n",
175
+ "<a class=\"interlanguage-link-target\" href=\"https://hr.wikipedia.org/wiki/Oftalmologija\" hreflang=\"hr\" lang=\"hr\" title=\"Oftalmologija – Croatian\"><span>Hrvatski</span></a>\n",
176
+ "<a class=\"interlanguage-link-target\" href=\"https://io.wikipedia.org/wiki/Oftalmologio\" hreflang=\"io\" lang=\"io\" title=\"Oftalmologio – Ido\"><span>Ido</span></a>\n",
177
+ "<a class=\"interlanguage-link-target\" href=\"https://id.wikipedia.org/wiki/Oftalmologi\" hreflang=\"id\" lang=\"id\" title=\"Oftalmologi – Indonesian\"><span>Bahasa Indonesia</span></a>\n",
178
+ "<a class=\"interlanguage-link-target\" href=\"https://it.wikipedia.org/wiki/Oftalmologia\" hreflang=\"it\" lang=\"it\" title=\"Oftalmologia – Italian\"><span>Italiano</span></a>\n",
179
+ "<a class=\"interlanguage-link-target\" href=\"https://he.wikipedia.org/wiki/%D7%A8%D7%A4%D7%95%D7%90%D7%AA_%D7%A2%D7%99%D7%A0%D7%99%D7%99%D7%9D\" hreflang=\"he\" lang=\"he\" title=\"רפואת עיניים – Hebrew\"><span>עברית</span></a>\n",
180
+ "<a class=\"interlanguage-link-target\" href=\"https://kn.wikipedia.org/wiki/%E0%B2%A8%E0%B3%87%E0%B2%A4%E0%B3%8D%E0%B2%B0%E0%B2%B6%E0%B2%BE%E0%B2%B8%E0%B3%8D%E0%B2%A4%E0%B3%8D%E0%B2%B0_(%E0%B2%A8%E0%B3%87%E0%B2%A4%E0%B3%8D%E0%B2%B0%E0%B2%B5%E0%B2%BF%E0%B2%9C%E0%B3%8D%E0%B2%9E%E0%B2%BE%E0%B2%A8)\" hreflang=\"kn\" lang=\"kn\" title=\"ನೇತ್ರಶಾಸ್ತ್ರ (ನೇತ್ರವಿಜ್ಞಾನ) – Kannada\"><span>ಕನ್ನಡ</span></a>\n",
181
+ "<a class=\"interlanguage-link-target\" href=\"https://ka.wikipedia.org/wiki/%E1%83%9D%E1%83%A4%E1%83%97%E1%83%90%E1%83%9A%E1%83%9B%E1%83%9D%E1%83%9A%E1%83%9D%E1%83%92%E1%83%98%E1%83%90\" hreflang=\"ka\" lang=\"ka\" title=\"ოფთალმოლოგია – Georgian\"><span>ქართული</span></a>\n",
182
+ "<a class=\"interlanguage-link-target\" href=\"https://kk.wikipedia.org/wiki/%D0%9E%D1%84%D1%82%D0%B0%D0%BB%D1%8C%D0%BC%D0%BE%D0%BB%D0%BE%D0%B3%D0%B8%D1%8F\" hreflang=\"kk\" lang=\"kk\" title=\"Офтальмология – Kazakh\"><span>Қазақша</span></a>\n",
183
+ "<a class=\"interlanguage-link-target\" href=\"https://ky.wikipedia.org/wiki/%D0%9E%D1%84%D1%82%D0%B0%D0%BB%D1%8C%D0%BC%D0%BE%D0%BB%D0%BE%D0%B3%D0%B8%D1%8F\" hreflang=\"ky\" lang=\"ky\" title=\"Офтальмология – Kyrgyz\"><span>Кыргызча</span></a>\n",
184
+ "<a class=\"interlanguage-link-target\" href=\"https://la.wikipedia.org/wiki/Ophthalmologia\" hreflang=\"la\" lang=\"la\" title=\"Ophthalmologia – Latin\"><span>Latina</span></a>\n",
185
+ "<a class=\"interlanguage-link-target\" href=\"https://lv.wikipedia.org/wiki/Oftalmolo%C4%A3ija\" hreflang=\"lv\" lang=\"lv\" title=\"Oftalmoloģija – Latvian\"><span>Latviešu</span></a>\n",
186
+ "<a class=\"interlanguage-link-target\" href=\"https://lt.wikipedia.org/wiki/Oftalmologija\" hreflang=\"lt\" lang=\"lt\" title=\"Oftalmologija – Lithuanian\"><span>Lietuvių</span></a>\n",
187
+ "<a class=\"interlanguage-link-target\" href=\"https://lfn.wikipedia.org/wiki/Oftalmolojia\" hreflang=\"lfn\" lang=\"lfn\" title=\"Oftalmolojia – Lingua Franca Nova\"><span>Lingua Franca Nova</span></a>\n",
188
+ "<a class=\"interlanguage-link-target\" href=\"https://mk.wikipedia.org/wiki/%D0%9E%D1%84%D1%82%D0%B0%D0%BB%D0%BC%D0%BE%D0%BB%D0%BE%D0%B3%D0%B8%D1%98%D0%B0\" hreflang=\"mk\" lang=\"mk\" title=\"Офталмологија – Macedonian\"><span>Македонски</span></a>\n",
189
+ "<a class=\"interlanguage-link-target\" href=\"https://ml.wikipedia.org/wiki/%E0%B4%A8%E0%B5%87%E0%B4%A4%E0%B5%8D%E0%B4%B0%E0%B4%B5%E0%B4%BF%E0%B4%9C%E0%B5%8D%E0%B4%9E%E0%B4%BE%E0%B4%A8%E0%B4%82\" hreflang=\"ml\" lang=\"ml\" title=\"നേത്രവിജ്ഞാനം – Malayalam\"><span>മലയാളം</span></a>\n",
190
+ "<a class=\"interlanguage-link-target\" href=\"https://mr.wikipedia.org/wiki/%E0%A4%A8%E0%A5%87%E0%A4%A4%E0%A5%8D%E0%A4%B0%E0%A4%B6%E0%A4%B2%E0%A5%8D%E0%A4%AF%E0%A4%9A%E0%A4%BF%E0%A4%95%E0%A4%BF%E0%A4%A4%E0%A5%8D%E0%A4%B8%E0%A4%BE\" hreflang=\"mr\" lang=\"mr\" title=\"नेत्रशल्यचिकित्सा – Marathi\"><span>मराठी</span></a>\n",
191
+ "<a class=\"interlanguage-link-target\" href=\"https://xmf.wikipedia.org/wiki/%E1%83%9D%E1%83%A4%E1%83%97%E1%83%90%E1%83%9A%E1%83%9B%E1%83%9D%E1%83%9A%E1%83%9D%E1%83%92%E1%83%98%E1%83%90\" hreflang=\"xmf\" lang=\"xmf\" title=\"ოფთალმოლოგია – Mingrelian\"><span>მარგალური</span></a>\n",
192
+ "<a class=\"interlanguage-link-target\" href=\"https://ms.wikipedia.org/wiki/Oftalmologi\" hreflang=\"ms\" lang=\"ms\" title=\"Oftalmologi – Malay\"><span>Bahasa Melayu</span></a>\n",
193
+ "<a class=\"interlanguage-link-target\" href=\"https://nl.wikipedia.org/wiki/Oogheelkunde\" hreflang=\"nl\" lang=\"nl\" title=\"Oogheelkunde – Dutch\"><span>Nederlands</span></a>\n",
194
+ "<a class=\"interlanguage-link-target\" href=\"https://ja.wikipedia.org/wiki/%E7%9C%BC%E7%A7%91%E5%AD%A6\" hreflang=\"ja\" lang=\"ja\" title=\"眼科学 – Japanese\"><span>日本語</span></a>\n",
195
+ "<a class=\"interlanguage-link-target\" href=\"https://no.wikipedia.org/wiki/Oftalmologi\" hreflang=\"nb\" lang=\"nb\" title=\"Oftalmologi – Norwegian Bokmål\"><span>Norsk bokmål</span></a>\n",
196
+ "<a class=\"interlanguage-link-target\" href=\"https://uz.wikipedia.org/wiki/Oftalmologiya\" hreflang=\"uz\" lang=\"uz\" title=\"Oftalmologiya – Uzbek\"><span>Oʻzbekcha / ўзбекча</span></a>\n",
197
+ "<a class=\"interlanguage-link-target\" href=\"https://pi.wikipedia.org/wiki/%E0%A4%A8%E0%A5%87%E0%A4%A4%E0%A5%8D%E0%A4%B0%E0%A4%B6%E0%A4%B2%E0%A5%8D%E0%A4%AF%E0%A4%9A%E0%A4%BF%E0%A4%95%E0%A4%BF%E0%A4%A4%E0%A5%8D%E0%A4%B8%E0%A4%BE\" hreflang=\"pi\" lang=\"pi\" title=\"नेत्रशल्यचिकित्सा – Pali\"><span>पालि</span></a>\n",
198
+ "<a class=\"interlanguage-link-target\" href=\"https://km.wikipedia.org/wiki/%E1%9E%85%E1%9E%80%E1%9F%92%E1%9E%81%E1%9E%BB%E1%9E%9F%E1%9E%B6%E1%9E%9F%E1%9F%92%E1%9E%8F%E1%9F%92%E1%9E%9A\" hreflang=\"km\" lang=\"km\" title=\"ចក្ខុសាស្ត្រ – Khmer\"><span>ភាសាខ្មែរ</span></a>\n",
199
+ "<a class=\"interlanguage-link-target\" href=\"https://pl.wikipedia.org/wiki/Okulistyka\" hreflang=\"pl\" lang=\"pl\" title=\"Okulistyka – Polish\"><span>Polski</span></a>\n",
200
+ "<a class=\"interlanguage-link-target\" href=\"https://pt.wikipedia.org/wiki/Oftalmologia\" hreflang=\"pt\" lang=\"pt\" title=\"Oftalmologia – Portuguese\"><span>Português</span></a>\n",
201
+ "<a class=\"interlanguage-link-target\" href=\"https://ro.wikipedia.org/wiki/Oftalmologie\" hreflang=\"ro\" lang=\"ro\" title=\"Oftalmologie – Romanian\"><span>Română</span></a>\n",
202
+ "<a class=\"interlanguage-link-target\" href=\"https://qu.wikipedia.org/wiki/%C3%91awi_hampikamayuq\" hreflang=\"qu\" lang=\"qu\" title=\"Ñawi hampikamayuq – Quechua\"><span>Runa Simi</span></a>\n",
203
+ "<a class=\"interlanguage-link-target\" href=\"https://ru.wikipedia.org/wiki/%D0%9E%D1%84%D1%82%D0%B0%D0%BB%D1%8C%D0%BC%D0%BE%D0%BB%D0%BE%D0%B3%D0%B8%D1%8F\" hreflang=\"ru\" lang=\"ru\" title=\"Офтальмология – Russian\"><span>Русский</span></a>\n",
204
+ "<a class=\"interlanguage-link-target\" href=\"https://sa.wikipedia.org/wiki/%E0%A4%A8%E0%A5%87%E0%A4%A4%E0%A5%8D%E0%A4%B0%E0%A4%B6%E0%A4%B2%E0%A5%8D%E0%A4%AF%E0%A4%9A%E0%A4%BF%E0%A4%95%E0%A4%BF%E0%A4%A4%E0%A5%8D%E0%A4%B8%E0%A4%BE\" hreflang=\"sa\" lang=\"sa\" title=\"नेत्रशल्यचिकित्सा – Sanskrit\"><span>संस्कृतम्</span></a>\n",
205
+ "<a class=\"interlanguage-link-target\" href=\"https://sq.wikipedia.org/wiki/Oftalmologjia\" hreflang=\"sq\" lang=\"sq\" title=\"Oftalmologjia – Albanian\"><span>Shqip</span></a>\n",
206
+ "<a class=\"interlanguage-link-target\" href=\"https://si.wikipedia.org/wiki/%E0%B6%85%E0%B6%9A%E0%B7%8A%E2%80%8D%E0%B7%82%E0%B7%92_%E0%B7%80%E0%B7%9B%E0%B6%AF%E0%B7%8A%E2%80%8D%E0%B6%BA%E0%B7%80%E0%B7%9A%E0%B6%AF%E0%B6%BA\" hreflang=\"si\" lang=\"si\" title=\"අක්‍ෂි වෛද්‍යවේදය – Sinhala\"><span>සිංහල</span></a>\n",
207
+ "<a class=\"interlanguage-link-target\" href=\"https://simple.wikipedia.org/wiki/Ophthalmology\" hreflang=\"en-simple\" lang=\"en-simple\" title=\"Ophthalmology – Simple English\"><span>Simple English</span></a>\n",
208
+ "<a class=\"interlanguage-link-target\" href=\"https://sk.wikipedia.org/wiki/Oftalmol%C3%B3gia\" hreflang=\"sk\" lang=\"sk\" title=\"Oftalmológia – Slovak\"><span>Slovenčina</span></a>\n",
209
+ "<a class=\"interlanguage-link-target\" href=\"https://sl.wikipedia.org/wiki/Okulistika\" hreflang=\"sl\" lang=\"sl\" title=\"Okulistika – Slovenian\"><span>Slovenščina</span></a>\n",
210
+ "<a class=\"interlanguage-link-target\" href=\"https://ckb.wikipedia.org/wiki/%D9%BE%D8%B2%DB%8C%D8%B4%DA%A9%DB%8C%DB%8C_%DA%86%D8%A7%D9%88\" hreflang=\"ckb\" lang=\"ckb\" title=\"پزیشکیی چاو – Central Kurdish\"><span>کوردی</span></a>\n",
211
+ "<a class=\"interlanguage-link-target\" href=\"https://sr.wikipedia.org/wiki/Oftalmologija\" hreflang=\"sr\" lang=\"sr\" title=\"Oftalmologija – Serbian\"><span>Српски / srpski</span></a>\n",
212
+ "<a class=\"interlanguage-link-target\" href=\"https://sh.wikipedia.org/wiki/Oftalmologija\" hreflang=\"sh\" lang=\"sh\" title=\"Oftalmologija – Serbo-Croatian\"><span>Srpskohrvatski / српскохрватски</span></a>\n",
213
+ "<a class=\"interlanguage-link-target\" href=\"https://fi.wikipedia.org/wiki/Silm%C3%A4tautioppi\" hreflang=\"fi\" lang=\"fi\" title=\"Silmätautioppi – Finnish\"><span>Suomi</span></a>\n",
214
+ "<a class=\"interlanguage-link-target\" href=\"https://sv.wikipedia.org/wiki/Oftalmologi\" hreflang=\"sv\" lang=\"sv\" title=\"Oftalmologi – Swedish\"><span>Svenska</span></a>\n",
215
+ "<a class=\"interlanguage-link-target\" href=\"https://ta.wikipedia.org/wiki/%E0%AE%95%E0%AE%A3%E0%AF%8D_%E0%AE%AE%E0%AE%B0%E0%AF%81%E0%AE%A4%E0%AF%8D%E0%AE%A4%E0%AF%81%E0%AE%B5%E0%AE%AE%E0%AF%8D\" hreflang=\"ta\" lang=\"ta\" title=\"கண் மருத்துவம் – Tamil\"><span>தமிழ்</span></a>\n",
216
+ "<a class=\"interlanguage-link-target\" href=\"https://tt.wikipedia.org/wiki/%D0%9E%D1%84%D1%82%D0%B0%D0%BB%D1%8C%D0%BC%D0%BE%D0%BB%D0%BE%D0%B3%D0%B8%D1%8F\" hreflang=\"tt\" lang=\"tt\" title=\"Офтальмология – Tatar\"><span>Татарча / tatarça</span></a>\n",
217
+ "<a class=\"interlanguage-link-target\" href=\"https://te.wikipedia.org/wiki/%E0%B0%A8%E0%B1%87%E0%B0%A4%E0%B1%8D%E0%B0%B0_%E0%B0%B5%E0%B1%88%E0%B0%A6%E0%B1%8D%E0%B0%AF%E0%B0%AE%E0%B1%81\" hreflang=\"te\" lang=\"te\" title=\"నేత్ర వైద్యము – Telugu\"><span>తెలుగు</span></a>\n",
218
+ "<a class=\"interlanguage-link-target\" href=\"https://th.wikipedia.org/wiki/%E0%B8%88%E0%B8%B1%E0%B8%81%E0%B8%A9%E0%B8%B8%E0%B8%A7%E0%B8%B4%E0%B8%97%E0%B8%A2%E0%B8%B2\" hreflang=\"th\" lang=\"th\" title=\"จักษุวิทยา – Thai\"><span>ไทย</span></a>\n",
219
+ "<a class=\"interlanguage-link-target\" href=\"https://tg.wikipedia.org/wiki/%D0%A7%D0%B0%D1%88%D0%BC%D0%BF%D0%B8%D0%B7%D0%B8%D1%88%D0%BA%D3%A3\" hreflang=\"tg\" lang=\"tg\" title=\"Чашмпизишкӣ – Tajik\"><span>Тоҷикӣ</span></a>\n",
220
+ "<a class=\"interlanguage-link-target\" href=\"https://tr.wikipedia.org/wiki/Oftalmoloji\" hreflang=\"tr\" lang=\"tr\" title=\"Oftalmoloji – Turkish\"><span>Türkçe</span></a>\n",
221
+ "<a class=\"interlanguage-link-target\" href=\"https://uk.wikipedia.org/wiki/%D0%9E%D1%84%D1%82%D0%B0%D0%BB%D1%8C%D0%BC%D0%BE%D0%BB%D0%BE%D0%B3%D1%96%D1%8F\" hreflang=\"uk\" lang=\"uk\" title=\"Офтальмологія – Ukrainian\"><span>Українська</span></a>\n",
222
+ "<a class=\"interlanguage-link-target\" href=\"https://ur.wikipedia.org/wiki/%D8%B7%D8%A8_%D8%A7%D9%84%D8%B9%DB%8C%D9%86\" hreflang=\"ur\" lang=\"ur\" title=\"طب العین – Urdu\"><span>اردو</span></a>\n",
223
+ "<a class=\"interlanguage-link-target\" href=\"https://vec.wikipedia.org/wiki/Oftalmo%C5%82oxia\" hreflang=\"vec\" lang=\"vec\" title=\"Oftalmołoxia – Venetian\"><span>Vèneto</span></a>\n",
224
+ "<a class=\"interlanguage-link-target\" href=\"https://vi.wikipedia.org/wiki/Nh%C3%A3n_khoa\" hreflang=\"vi\" lang=\"vi\" title=\"Nhãn khoa – Vietnamese\"><span>Tiếng Việt</span></a>\n",
225
+ "<a class=\"interlanguage-link-target\" href=\"https://war.wikipedia.org/wiki/Optalmolohiya\" hreflang=\"war\" lang=\"war\" title=\"Optalmolohiya – Waray\"><span>Winaray</span></a>\n",
226
+ "<a class=\"interlanguage-link-target\" href=\"https://wuu.wikipedia.org/wiki/%E7%9C%BC%E7%A7%91%E5%AD%A6\" hreflang=\"wuu\" lang=\"wuu\" title=\"眼科学 – Wu Chinese\"><span>吴语</span></a>\n",
227
+ "<a class=\"interlanguage-link-target\" href=\"https://yi.wikipedia.org/wiki/%D7%90%D7%A4%D7%98%D7%90%D7%9C%D7%9E%D7%90%D7%9C%D7%90%D7%92%D7%99%D7%A2\" hreflang=\"yi\" lang=\"yi\" title=\"אפטאלמאלאגיע – Yiddish\"><span>ייִדיש</span></a>\n",
228
+ "<a class=\"interlanguage-link-target\" href=\"https://zh-yue.wikipedia.org/wiki/%E7%9C%BC%E7%A7%91\" hreflang=\"yue\" lang=\"yue\" title=\"眼科 – Cantonese\"><span>粵語</span></a>\n",
229
+ "<a class=\"interlanguage-link-target\" href=\"https://zh.wikipedia.org/wiki/%E7%9C%BC%E7%A7%91%E5%AD%A6\" hreflang=\"zh\" lang=\"zh\" title=\"眼科学 – Chinese\"><span>中文</span></a>\n",
230
+ "<a class=\"wbc-editpage\" href=\"https://www.wikidata.org/wiki/Special:EntityPage/Q161437#sitelinks-wikipedia\" title=\"Edit interlanguage links\">Edit links</a>\n",
231
+ "<a accesskey=\"c\" href=\"/wiki/Ophthalmology\" title=\"View the content page [c]\"><span>Article</span></a>\n",
232
+ "<a accesskey=\"t\" href=\"/wiki/Talk:Ophthalmology\" rel=\"discussion\" title=\"Discuss improvements to the content page [t]\"><span>Talk</span></a>\n",
233
+ "<a href=\"/wiki/Ophthalmology\"><span>Read</span></a>\n",
234
+ "<a accesskey=\"e\" href=\"/w/index.php?title=Ophthalmology&amp;action=edit\" title=\"Edit this page [e]\"><span>Edit</span></a>\n",
235
+ "<a accesskey=\"h\" href=\"/w/index.php?title=Ophthalmology&amp;action=history\" title=\"Past revisions of this page [h]\"><span>View history</span></a>\n",
236
+ "<a href=\"/wiki/Ophthalmology\"><span>Read</span></a>\n",
237
+ "<a accesskey=\"e\" href=\"/w/index.php?title=Ophthalmology&amp;action=edit\" title=\"Edit this page [e]\"><span>Edit</span></a>\n",
238
+ "<a href=\"/w/index.php?title=Ophthalmology&amp;action=history\"><span>View history</span></a>\n",
239
+ "<a accesskey=\"j\" href=\"/wiki/Special:WhatLinksHere/Ophthalmology\" title=\"List of all English Wikipedia pages containing links to this page [j]\"><span>What links here</span></a>\n",
240
+ "<a accesskey=\"k\" href=\"/wiki/Special:RecentChangesLinked/Ophthalmology\" rel=\"nofollow\" title=\"Recent changes in pages linked from this page [k]\"><span>Related changes</span></a>\n",
241
+ "<a accesskey=\"u\" href=\"/wiki/Wikipedia:File_Upload_Wizard\" title=\"Upload files [u]\"><span>Upload file</span></a>\n",
242
+ "<a accesskey=\"q\" href=\"/wiki/Special:SpecialPages\" title=\"A list of all special pages [q]\"><span>Special pages</span></a>\n",
243
+ "<a href=\"/w/index.php?title=Ophthalmology&amp;oldid=1177068448\" title=\"Permanent link to this revision of this page\"><span>Permanent link</span></a>\n",
244
+ "<a href=\"/w/index.php?title=Ophthalmology&amp;action=info\" title=\"More information about this page\"><span>Page information</span></a>\n",
245
+ "<a href=\"/w/index.php?title=Special:UrlShortener&amp;url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FOphthalmology\"><span>Get shortened URL</span></a>\n",
246
+ "<a href=\"/w/index.php?title=Special:CiteThisPage&amp;page=Ophthalmology&amp;id=1177068448&amp;wpFormIdentifier=titleform\" title=\"Information on how to cite this page\"><span>Cite this page</span></a>\n",
247
+ "<a accesskey=\"g\" href=\"https://www.wikidata.org/wiki/Special:EntityPage/Q161437\" title=\"Structured data on this page hosted by Wikidata [g]\"><span>Wikidata item</span></a>\n",
248
+ "<a href=\"/w/index.php?title=Special:DownloadAsPdf&amp;page=Ophthalmology&amp;action=show-download-screen\" title=\"Download this page as a PDF file\"><span>Download as PDF</span></a>\n",
249
+ "<a accesskey=\"p\" href=\"/w/index.php?title=Ophthalmology&amp;printable=yes\" title=\"Printable version of this page [p]\"><span>Printable version</span></a>\n",
250
+ "<a href=\"https://commons.wikimedia.org/wiki/Category:Ophthalmology\" hreflang=\"en\"><span>Wikimedia Commons</span></a>\n",
251
+ "<a href=\"https://en.wikivoyage.org/wiki/Eye_care\" hreflang=\"en\"><span>Wikivoyage</span></a>\n",
252
+ "<a class=\"mw-file-description\" href=\"/wiki/File:US_Navy_080607-N-9689V-008_Cmdr._Kenneth_Kubis_and_U.S._Air_Force_Capt._Tighe_Richardson_use_an_operating_microscope_while_performing_cataract_eye_surgery_to_return_sight_to_Marylin_Kansi,_a_12-year-old_girl_from_Cotabato.jpg\"><img class=\"mw-file-element\" data-file-height=\"2584\" data-file-width=\"4174\" decoding=\"async\" height=\"136\" src=\"//upload.wikimedia.org/wikipedia/commons/thumb/4/4d/US_Navy_080607-N-9689V-008_Cmdr._Kenneth_Kubis_and_U.S._Air_Force_Capt._Tighe_Richardson_use_an_operating_microscope_while_performing_cataract_eye_surgery_to_return_sight_to_Marylin_Kansi%2C_a_12-year-old_girl_from_Cotabato.jpg/220px-thumbnail.jpg\" srcset=\"//upload.wikimedia.org/wikipedia/commons/thumb/4/4d/US_Navy_080607-N-9689V-008_Cmdr._Kenneth_Kubis_and_U.S._Air_Force_Capt._Tighe_Richardson_use_an_operating_microscope_while_performing_cataract_eye_surgery_to_return_sight_to_Marylin_Kansi%2C_a_12-year-old_girl_from_Cotabato.jpg/330px-thumbnail.jpg 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/4/4d/US_Navy_080607-N-9689V-008_Cmdr._Kenneth_Kubis_and_U.S._Air_Force_Capt._Tighe_Richardson_use_an_operating_microscope_while_performing_cataract_eye_surgery_to_return_sight_to_Marylin_Kansi%2C_a_12-year-old_girl_from_Cotabato.jpg/440px-thumbnail.jpg 2x\" width=\"220\"/></a>\n",
253
+ "<a href=\"/wiki/Eye\" title=\"Eye\">Eye</a>\n",
254
+ "<a href=\"/wiki/Visual_system\" title=\"Visual system\">visual system</a>\n",
255
+ "<a href=\"/wiki/Cataract\" title=\"Cataract\">Cataract</a>\n",
256
+ "<a class=\"mw-redirect\" href=\"/wiki/Retinal_disease\" title=\"Retinal disease\">retinal disease</a>\n",
257
+ "<a href=\"/wiki/Diabetic_retinopathy\" title=\"Diabetic retinopathy\">diabetic retinopathy</a>\n",
258
+ "<a href=\"/wiki/Retinopathy\" title=\"Retinopathy\">retinopathy</a>\n",
259
+ "<a href=\"/wiki/Glaucoma\" title=\"Glaucoma\">glaucoma</a>\n",
260
+ "<a class=\"mw-redirect\" href=\"/wiki/Corneal_disease\" title=\"Corneal disease\">corneal disease</a>\n",
261
+ "<a href=\"/wiki/Category:Disorders_of_eyelid,_lacrimal_system_and_orbit\" title=\"Category:Disorders of eyelid, lacrimal system and orbit\">eyelid and orbital disorders</a>\n",
262
+ "<a href=\"/wiki/Uveitis\" title=\"Uveitis\">uveitis</a>\n",
263
+ "<a href=\"/wiki/Strabismus\" title=\"Strabismus\">strabismus</a>\n",
264
+ "<a class=\"mw-redirect\" href=\"/wiki/Ocular_muscles\" title=\"Ocular muscles\">ocular muscles</a>\n",
265
+ "<a href=\"/wiki/Eye_neoplasm\" title=\"Eye neoplasm\">ocular neoplasms</a>\n",
266
+ "<a href=\"/wiki/Neuro-ophthalmology\" title=\"Neuro-ophthalmology\">neuro-ophthalmologic disorders</a>\n",
267
+ "<a href=\"/wiki/Optic_nerve\" title=\"Optic nerve\">optic nerve</a>\n",
268
+ "<a href=\"/wiki/Ophthalmoscopy\" title=\"Ophthalmoscopy\">Ophthalmoscopy</a>\n",
269
+ "<a href=\"/wiki/Visual_field_test\" title=\"Visual field test\">visual field test</a>\n",
270
+ "<a href=\"/wiki/Optical_coherence_tomography\" title=\"Optical coherence tomography\">optical coherence tomography</a>\n",
271
+ "<a href=\"/wiki/Glossary_of_medicine\" title=\"Glossary of medicine\">Glossary of medicine</a>\n",
272
+ "<a class=\"mw-redirect\" href=\"/wiki/Specialty_(medicine)\" title=\"Specialty (medicine)\">Specialty</a>\n",
273
+ "<a href=\"/wiki/Medicine\" title=\"Medicine\">Medicine</a>\n",
274
+ "<a href=\"/wiki/Surgery\" title=\"Surgery\">surgery</a>\n",
275
+ "<a href=\"/wiki/Doctor_of_Medicine\" title=\"Doctor of Medicine\">Doctor of Medicine</a>\n",
276
+ "<a href=\"/wiki/Doctor_of_Osteopathic_Medicine\" title=\"Doctor of Osteopathic Medicine\">Doctor of Osteopathic Medicine</a>\n",
277
+ "<a href=\"/wiki/Bachelor_of_Medicine,_Bachelor_of_Surgery\" title=\"Bachelor of Medicine, Bachelor of Surgery\">Bachelor of Medicine, Bachelor of Surgery</a>\n",
278
+ "<a href=\"/wiki/Bachelor_of_Medicine,_Bachelor_of_Surgery\" title=\"Bachelor of Medicine, Bachelor of Surgery\">Bachelor of Medicine, Bachelor of Surgery</a>\n",
279
+ "<a href=\"/wiki/Hospital\" title=\"Hospital\">Hospitals</a>\n",
280
+ "<a href=\"/wiki/Clinic\" title=\"Clinic\">Clinics</a>\n",
281
+ "<a href=\"/wiki/Help:IPA/English\" title=\"Help:IPA/English\">/<span style=\"border-bottom:1px dotted\"><span title=\"/ˌ/: secondary stress follows\">ˌ</span><span title=\"/ɒ/: 'o' in 'body'\">ɒ</span><span title=\"'f' in 'find'\">f</span><span title=\"/θ/: 'th' in 'thigh'\">θ</span><span title=\"/æ/: 'a' in 'bad'\">æ</span><span title=\"'l' in 'lie'\">l</span><span title=\"/ˈ/: primary stress follows\">ˈ</span><span title=\"'m' in 'my'\">m</span><span title=\"/ɒ/: 'o' in 'body'\">ɒ</span><span title=\"'l' in 'lie'\">l</span><span title=\"/ə/: 'a' in 'about'\">ə</span><span title=\"/dʒ/: 'j' in 'jam'\">dʒ</span><span title=\"/i/: 'y' in 'happy'\">i</span></span>/</a>\n",
282
+ "<a href=\"/wiki/Help:Pronunciation_respelling_key\" title=\"Help:Pronunciation respelling key\"><i title=\"English pronunciation respelling\"><span style=\"font-size:90%\">OFF</span>-thal-<span style=\"font-size:90%\">MOL</span>-ə-jee</i></a>\n",
283
+ "<a href=\"#cite_note-1\">[1]</a>\n",
284
+ "<a href=\"/wiki/Surgery\" title=\"Surgery\">surgical</a>\n",
285
+ "<a href=\"/wiki/Medicine\" title=\"Medicine\">medicine</a>\n",
286
+ "<a href=\"#cite_note-mrcophth-2\">[2]</a>\n",
287
+ "<a href=\"#cite_note-3\">[3]</a>\n",
288
+ "<a href=\"/wiki/Medical_degree\" title=\"Medical degree\">medical degree</a>\n",
289
+ "<a href=\"/wiki/Residency_(medicine)\" title=\"Residency (medicine)\">residency training</a>\n",
290
+ "<a href=\"#cite_note-4\">[4]</a>\n",
291
+ "<a href=\"#cite_note-Ophthalmology-5\">[5]</a>\n",
292
+ "<a href=\"#cite_note-Ophthalmology-5\">[5]</a>\n"
293
+ ]
294
+ }
295
+ ],
296
+ "source": [
297
+ "for i in soup.find_all('a')[50:200]:\n",
298
+ " print(i)"
299
+ ]
300
+ },
301
+ {
302
+ "cell_type": "code",
303
+ "execution_count": null,
304
+ "metadata": {},
305
+ "outputs": [],
306
+ "source": []
307
+ },
308
+ {
309
+ "cell_type": "code",
310
+ "execution_count": 17,
311
+ "metadata": {},
312
+ "outputs": [
313
+ {
314
+ "name": "stdout",
315
+ "output_type": "stream",
316
+ "text": [
317
+ "Ophthalmology (/ˌɒfθælˈmɒlədʒi/ OFF-thal-MOL-ə-jee)[1] is a surgical subspecialty within medicine that deals with the diagnosis and treatment of eye disorders.[2]\n",
318
+ "\n",
319
+ "An ophthalmologist is a physician who undergoes subspecialty training in medical and surgical eye care.[3] Following a medical degree, a doctor specialising in ophthalmology must pursue additional postgraduate residency training specific to that field. This may include a one-year integrated internship that involves more general medical training in other fields such as internal medicine or general surgery. Following residency, additional specialty training (or fellowship) may be sought in a particular aspect of eye pathology.[4]\n",
320
+ "\n",
321
+ "Ophthalmologists prescribe medications to treat ailments, such as eye diseases, implement laser therapy, and perform surgery when needed.[5] Ophthalmologists provide both primary and specialty eye care - medical and surgical.[5] Most ophthalmologists participate in academic research on eye diseases at some point in their training and many include research as part of their career.[6]\n",
322
+ "Ophthalmology has always been at the forefront of medical research with a long history of advancement and innovation in eye care.[7]\n",
323
+ "\n",
324
+ "A brief list of some of the most common diseases treated by ophthalmologists:[8][9]\n",
325
+ "\n",
326
+ "The most valued pharmaceutical companies worldwide whose leading products are in Ophthalmology are Regeneron (United States) for AMD treatment and Bausch Health (Canada) for Front of eye.[10]\n",
327
+ "\n",
328
+ "Following are examples of examination methods performed during an eye examination that enables diagnosis[citation needed]\n",
329
+ "\n",
330
+ "Optical coherence tomography (OCT) is a medical technological platform used to assess ocular structures. The information is then used by physicians to assess staging of pathological processes and confirm clinical diagnoses. Subsequent OCT scans are used to assess the efficacy of managing diabetic retinopathy, age-related macular degeneration, and glaucoma.\n",
331
+ "\n",
332
+ "Optical coherence tomography angiography (OCTA) and Fluorescein angiography to visualize the vascular networks of the retina and choroid.\n",
333
+ "\n",
334
+ "Electroretinography (ERG) measures the electrical responses of various cell types in the retina, including the photoreceptors (rods and cones), inner retinal cells (bipolar and amacrine cells), and the ganglion cells.\n",
335
+ "\n",
336
+ "Electrooculography (EOG) is a technique for measuring the corneo-retinal standing potential that exists between the front and the back of the human eye. The resulting signal is called the electrooculogram. Primary applications are in ophthalmological diagnosis and in recording eye movements.\n",
337
+ "\n",
338
+ "Visual field testing to detect dysfunction in central and peripheral vision which may be caused by various medical conditions such as glaucoma, stroke, pituitary disease, brain tumours or other neurological deficits.\n",
339
+ "\n",
340
+ "Corneal topography is a non-invasive medical imaging technique for mapping the anterior curvature of the cornea, the outer structure of the eye.\n",
341
+ "\n",
342
+ "Ultrasonography of the eyes may be performed by an ophthalmologist.\n",
343
+ "\n",
344
+ "Eye surgery, also known as ocular surgery, is surgery performed on the eye or its adnexa by an ophthalmologist. The eye is a fragile organ, and requires extreme care before, during, and after a surgical procedure. An eye surgeon is responsible for selecting the appropriate surgical procedure for the patient and for taking the necessary safety precautions.\n",
345
+ "\n",
346
+ "Ophthalmology includes subspecialities that deal either with certain diseases or diseases of certain parts of the eye. Some of them are:[11]\n",
347
+ "\n",
348
+ "Medical retina and vitreo-retinal surgery sometimes are combined and together they are called posterior segment subspecialisation\n",
349
+ "\n",
350
+ "The Greek roots of the word ophthalmology are ὀφθαλμός (ophthalmos, \"eye\") and -λoγία (-logia, \"study, discourse\"),[14][15] i.e., \"the study of eyes\". The discipline applies to all animal eyes, whether human or not, since the practice and procedures are quite similar with respect to disease processes, although there are differences in the anatomy or disease prevalence.\n",
351
+ "\n",
352
+ "In the Ebers Papyrus from ancient Egypt dating to 1550 BC, a section is devoted to eye diseases.[2]\n",
353
+ "\n",
354
+ "Prior to Hippocrates, physicians largely based their anatomical conceptions of the eye on speculation, rather than empiricism.[2] They recognized the sclera and transparent cornea running flushly as the outer coating of the eye, with an inner layer with pupil, and a fluid at the centre. It was believed, by Alcamaeon (fifth century BC) and others, that this fluid was the medium of vision and flowed from the eye to the brain by a tube. Aristotle advanced such ideas with empiricism. He dissected the eyes of animals, and discovering three layers (not two), found that the fluid was of a constant consistency with the lens forming (or congealing) after death, and the surrounding layers were seen to be juxtaposed. He and his contemporaries further put forth the existence of three tubes leading from the eye, not one. One tube from each eye met within the skull.\n",
355
+ "\n",
356
+ "The Greek physician Rufus of Ephesus (first century AD) recognised a more modern concept of the eye, with conjunctiva, extending as a fourth epithelial layer over the eye.[2] Rufus was the first to recognise a two-chambered eye, with one chamber from cornea to lens (filled with water), the other from lens to retina (filled with a substance resembling egg whites).\n",
357
+ "\n",
358
+ "Celsus the Greek philosopher of the second century AD gave a detailed description of cataract surgery by the couching method.\n",
359
+ "\n",
360
+ "The Greek physician Galen (second century AD) remedied some mistaken descriptions, including about the curvature of the cornea and lens, the nature of the optic nerve, and the existence of a posterior chamber. Although this model was a roughly correct modern model of the eye, it contained errors. Still, it was not advanced upon again until after Vesalius. A ciliary body was then discovered and the sclera, retina, choroid, and cornea were seen to meet at the same point. The two chambers were seen to hold the same fluid, as well as the lens being attached to the choroid. Galen continued the notion of a central canal, but he dissected the optic nerve and saw that it was solid. He mistakenly counted seven optical muscles, one too many. He also knew of the tear ducts.\n",
361
+ "\n",
362
+ "The Indian surgeon Sushruta wrote the Sushruta Samhita in Sanskrit in approximately the sixth century BC,[16] which describes 76 ocular diseases (of these, 51 surgical) as well as several ophthalmological surgical instruments and techniques.[17][18] His description of cataract surgery was compatible with the method of couching.[19] He has been described as one of the first cataract surgeons.[20][21]\n",
363
+ "\n",
364
+ "Medieval Islamic Arabic and Persian scientists (unlike their classical predecessors) considered it normal to combine theory and practice, including the crafting of precise instruments, and therefore, found it natural to combine the study of the eye with the practical application of that knowledge.[22] Hunayn ibn Ishaq, and others beginning with the medieval Arabic period, taught that the crystalline lens is in the exact center of the eye.[23] This idea was propagated until the end of the 1500s.[23]\n",
365
+ "\n",
366
+ "Ibn al-Haytham (Alhazen), in his Book of Optics explained that vision occurs when light lands on an object, bounces off, and is directed to one's eyes.\n",
367
+ "\n",
368
+ "Ibn al-Nafis, an Arabic native of Damascus, wrote a large textbook, The Polished Book on Experimental Ophthalmology, divided into two parts, On the Theory of Ophthalmology and Simple and Compounded Ophthalmic Drugs.[24]\n",
369
+ "\n",
370
+ "Avicenna wrote in his Canon \"rescheth\", which means \"retiformis\", and Gerard of Cremona translated this at approximately 1150 into the new term \"retina\".[25]\n",
371
+ "\n",
372
+ "In the seventeenth and eighteenth centuries, hand lenses were used by Malpighi, microscopes by Leeuwenhoek, preparations for fixing the eye for study by Ruysch, and later the freezing of the eye by Petit. This allowed for detailed study of the eye and an advanced model. Some mistakes persisted, such as: why the pupil changed size (seen to be vessels of the iris filling with blood), the existence of the posterior chamber, and the nature of the retina. Unaware of their functions, Leeuwenhoek noted the existence of photoreceptors,[26] however, they were not properly described until Gottfried Reinhold Treviranus in 1834.\n",
373
+ "\n",
374
+ "Approximately 1750, Jacques Daviel advocated a new treatment for cataract by extraction instead of the traditional method of couching.[27] Georg Joseph Beer (1763–1821) was an Austrian ophthalmologist and leader of the First Viennese School of Medicine. He introduced a flap operation for treatment of cataract (Beer's operation), as well as having popularized the instrument used to perform the surgery (Beer's knife).[28]\n",
375
+ "\n",
376
+ "In North America, indigenous healers treated some eye diseases by rubbing or scraping the eyes or eyelids.[29]\n",
377
+ "\n",
378
+ "The first ophthalmic surgeon in Great Britain was John Freke, appointed to the position by the governors of St. Bartholomew's Hospital in 1727. A major breakthrough came with the appointment of Baron de Wenzel (1724–90), a German who became the oculist to King George III of Great Britain in 1772. His skill at removing cataracts legitimized the field.[27] The first dedicated ophthalmic hospital opened in 1805 in London; it is now called Moorfields Eye Hospital. Clinical developments at Moorfields and the founding of the Institute of Ophthalmology (now part of the University College London) by Sir Stewart Duke-Elder established the site as the largest eye hospital in the world and a nexus for ophthalmic research.[30]\n",
379
+ "\n",
380
+ "In Berlin, ophthalmologist Albrecht von Graefe introduced iridectomy as a treatment for glaucoma and improved cataract surgery, he is also considered the founding father of the German Ophthalmological Society.\n",
381
+ "\n",
382
+ "Numerous ophthalmologists fled Germany after 1933 as the Nazis began to persecute those of Jewish descent. A representative leader was Joseph Igersheimer (1879–1965), best known for his discoveries with arsphenamine for the treatment of syphilis. He fled to Turkey in 1933. As one of eight emigrant directors in the Faculty of Medicine at the University of Istanbul, he built a modern clinic and trained students. In 1939, he went to the United States, becoming a professor at Tufts University.[31] German ophthalmologist, Gerhard Meyer-Schwickerath is widely credited with developing the predecessor of laser coagulation, photocoagulation.\n",
383
+ "\n",
384
+ "In 1946, Igersheimer conducted the first experiments on light coagulation. In 1949, he performed the first successful treatment of a retinal detachment with a light beam (light coagulation) with a self-constructed device on the roof of the ophthalmic clinic at the University of Hamburg-Eppendorf.[32][33]\n",
385
+ "\n",
386
+ "Polish ophthalmology dates to the thirteenth century. The Polish Ophthalmological Society was founded in 1911. A representative leader was Adam Zamenhof (1888–1940), who introduced certain diagnostic, surgical, and nonsurgical eye-care procedures. He was executed by the German Nazis in 1940.[34]\n",
387
+ "\n",
388
+ "Zofia Falkowska (1915–93) head of the Faculty and Clinic of Ophthalmology in Warsaw from 1963 to 1976, was the first to use lasers in her practice.\n",
389
+ "\n",
390
+ "The prominent physicists of the late nineteenth and early twentieth centuries included Ernst Abbe (1840–1905), a co-owner of at the Zeiss Jena factories in Germany, where he developed numerous optical instruments. Hermann von Helmholtz (1821-1894) was a polymath who made contributions to many fields of science and invented the ophthalmoscope in 1851. They both made theoretical calculations on image formation in optical systems and also had studied the optics of the eye.\n",
391
+ "\n",
392
+ "Ophthalmologists are physicians (MD/DO in the U.S. or MBBS in the UK and elsewhere or DO/DOMS/DNB, who typically complete an undergraduate degree, general medical school, followed by a residency in ophthalmology. Ophthalmologists typically perform optical, medical and surgical eye care.\n",
393
+ "\n",
394
+ "In Australia and New Zealand, the FRACO or FRANZCO is the equivalent postgraduate specialist qualification. The structured training system takes place over five years of postgraduate training. Overseas-trained ophthalmologists are assessed using the pathway published on the RANZCO website. Those who have completed their formal training in the UK and have the CCST or CCT, usually are deemed to be comparable.\n",
395
+ "\n",
396
+ "In Bangladesh to be an ophthalmologist the basic degree is an MBBS. Then they have to obtain a postgraduate degree or diploma in an ophthalmology specialty. In Bangladesh, these are diploma in ophthalmology, diploma in community ophthalmology, fellow or member of the College of Physicians and Surgeons in ophthalmology, and Master of Science in ophthalmology.\n",
397
+ "\n",
398
+ "In Canada, after medical school an ophthalmology residency is undertaken. The residency typically lasts five years, which culminates in fellowship of the Royal College of Surgeons of Canada (FRCSC). Subspecialty training is undertaken by approximately 30% of fellows (FRCSC) in a variety of fields from anterior segment, cornea, glaucoma, vision rehabilitation, uveitis, oculoplastics, medical and surgical retina, ocular oncology, Ocular pathology, or neuro-ophthalmology. Approximately 35 vacancies open per year for ophthalmology residency training in all of Canada. These numbers fluctuate per year, ranging from 30 to 37 spots. Of these, up to ten spots are at French-speaking universities in Quebec. At the end of the five years, the graduating ophthalmologist must pass the oral and written portions of the Royal College exam in either English or French.\n",
399
+ "\n",
400
+ "In India, after completing MBBS degree, postgraduate study in ophthalmology is required. The degrees are doctor of medicine, master of surgery, diploma in ophthalmic medicine and surgery, and diplomate of national board. The concurrent training and work experience are in the form of a junior residency at a medical college, eye hospital, or institution under the supervision of experienced faculty. Further work experience in the form of fellowship, registrar, or senior resident refines the skills of these eye surgeons. All members of the India Ophthalmologist Society and various state-level ophthalmologist societies hold regular conferences and actively promote continuing medical education.\n",
401
+ "\n",
402
+ "In Nepal, to become an ophthalmologist, three years of postgraduate study is required after completing an MBBS degree. The postgraduate degree in ophthalmology is called medical doctor in ophthalmology. Currently, this degree is provided by Tilganga Institute of Ophthalmology, Tilganga, Kathmandu, BPKLCO, Institute of Medicine, TU, Kathmandu, BP Koirala Institute of Health Sciences, Dharan, Kathmandu University, Dhulikhel, and National Academy of Medical Science, Kathmandu. A few Nepalese citizens also study this subject in Bangladesh, China, India, Pakistan, and other countries. All graduates have to pass the Nepal Medical Council Licensing Exam to become a registered ophthalmologists in Nepal. The concurrent residency training is in the form of a PG student (resident) at a medical college, eye hospital, or institution according to the degree providing university's rules and regulations. Nepal Ophthalmic Society holds regular conferences and actively promotes continuing medical education.\n",
403
+ "\n",
404
+ "In Ireland, the Royal College of Surgeons of Ireland grants membership (MRCSI (Ophth)) and fellowship (FRCSI (Ophth)) qualifications in conjunction with the Irish College of Ophthalmologists. Total postgraduate training involves an intern year, a minimum of three years of basic surgical training, and a further 4.5 years of higher surgical training. Clinical training takes place within public, Health Service Executive-funded hospitals in Dublin, Sligo, Limerick, Galway, Waterford, and Cork. A minimum of 8.5 years of training is required before eligibility to work in consultant posts. Some trainees take extra time to obtain MSc, MD or PhD degrees and to undertake clinical fellowships in the UK, Australia, and the United States.\n",
405
+ "\n",
406
+ "In Pakistan, after MBBS, a four-year full-time residency program leads to an exit-level FCPS examination in ophthalmology, held under the auspices of the College of Physicians and Surgeons, Pakistan. The tough examination is assessed by both highly qualified Pakistani and eminent international ophthalmic consultants. As a prerequisite to the final examinations, an intermediate module, an optics and refraction module, and a dissertation written on a research project carried out under supervision is also assessed.\n",
407
+ "\n",
408
+ "Moreover, a two-and-a-half-year residency program leads to an MCPS while a two-year training of DOMS is also being offered.[35] For candidates in the military, a stringent two-year graded course, with quarterly assessments, is held under Armed Forces Post Graduate Medical Institute in Rawalpindi.\n",
409
+ "\n",
410
+ "The M.S. in ophthalmology is also one of the specialty programs. In addition to programs for physicians, various diplomas and degrees for allied eyecare personnel are also being offered to produce competent optometrists, orthoptists, ophthalmic nurses, ophthalmic technologists, and ophthalmic technicians in this field. These programs are being offered, notably by the College of Ophthalmology and Allied Vision Sciences, in Lahore and the Pakistan Institute of Community Ophthalmology in Peshawar.[36] Subspecialty fellowships also are being offered in the fields of pediatric ophthalmology and vitreoretinal ophthalmology. King Edward Medical University, Al Shifa Trust Eye Hospital Rawalpindi, and Al- Ibrahim Eye Hospital Karachi also have started a degree program in this field.\n",
411
+ "\n",
412
+ "In the Philippines, Ophthalmology is considered a medical specialty that uses medicine and surgery to treat diseases of the eye. There is only one professional organization in the country that is duly recognized by the PMA and the PCS: the Philippine Academy of Ophthalmology (PAO).[37] PAO and the state-standard Philippine Board of Ophthalmology (PBO) regulates ophthalmology residency programs and board certification. To become a general ophthalmologist in the Philippines, a candidate must have completed a doctor of medicine degree (MD) or its equivalent (e.g. MBBS), have completed an internship in Medicine, have passed the physician licensure exam, and have completed residency training at a hospital accredited by the Philippine Board of Ophthalmology (accrediting arm of PAO).[38] Attainment of board certification in ophthalmology from the PBO is essential in acquiring privileges in most major health institutions. Graduates of residency programs can receive further training in ophthalmology subspecialties, such as neuro-ophthalmology, retina, etc. by completing a fellowship program that varies in length depending on each program's requirements.\n",
413
+ "\n",
414
+ "In the United Kingdom, three colleges grant postgraduate degrees in ophthalmology. The Royal College of Ophthalmologists (RCOphth) and the Royal College of Surgeons of Edinburgh grant MRCOphth/FRCOphth and MRCSEd/FRCSEd, (although membership is no longer a prerequisite for fellowship), the Royal College of Glasgow grants FRCS. Postgraduate work as a specialist registrar and one of these degrees is required for specialization in eye diseases. Such clinical work is within the NHS, with supplementary private work for some consultants.\n",
415
+ "\n",
416
+ "Only 2.3 ophthalmologists exist per 100,000 population in the UK – fewer pro rata than in any nations in the European Union.[39]\n",
417
+ "\n",
418
+ "Ophthalmologists typically complete four years of undergraduate studies, four years of medical school and four years of eye-specific training (residency). Some pursue additional training, known as a fellowship - typically one to two years. Ophthalmologists are physicians who specialize in the eye and related structures. They perform medical and surgical eye care and may also write prescriptions for corrective lenses. They often manage late stage eye disease, which typically involves surgery.[40]\n",
419
+ "\n",
420
+ "Ophthalmologists must complete the requirements of continuing medical education to maintain licensure and for recertification.\n",
421
+ "\n",
422
+ "The following is a list of physicians who have significantly contributed to the field of ophthalmology:\n",
423
+ "\n"
424
+ ]
425
+ }
426
+ ],
427
+ "source": [
428
+ "for i in soup.find_all('p'):\n",
429
+ " print(i.get_text())"
430
+ ]
431
+ },
432
+ {
433
+ "cell_type": "code",
434
+ "execution_count": null,
435
+ "metadata": {},
436
+ "outputs": [],
437
+ "source": []
438
+ }
439
+ ],
440
+ "metadata": {
441
+ "kernelspec": {
442
+ "display_name": "myenv",
443
+ "language": "python",
444
+ "name": "python3"
445
+ },
446
+ "language_info": {
447
+ "codemirror_mode": {
448
+ "name": "ipython",
449
+ "version": 3
450
+ },
451
+ "file_extension": ".py",
452
+ "mimetype": "text/x-python",
453
+ "name": "python",
454
+ "nbconvert_exporter": "python",
455
+ "pygments_lexer": "ipython3",
456
+ "version": "3.10.9"
457
+ },
458
+ "orig_nbformat": 4
459
+ },
460
+ "nbformat": 4,
461
+ "nbformat_minor": 2
462
+ }
gradio-rag.py ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ from rag import fetch_top_k
2
+
3
+ import gradio as gr
4
+
5
+ gr.ChatInterface(fetch_top_k).launch(share=True)
gradio.ipynb ADDED
@@ -0,0 +1,233 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "metadata": {},
7
+ "outputs": [],
8
+ "source": [
9
+ "# PINECONE_API_KEY = 7b886e48-e3d3-4644-bf8d-74b94d49c18c\n",
10
+ "# PINECONE_ENV = gcp-starter"
11
+ ]
12
+ },
13
+ {
14
+ "cell_type": "code",
15
+ "execution_count": 1,
16
+ "metadata": {},
17
+ "outputs": [
18
+ {
19
+ "name": "stderr",
20
+ "output_type": "stream",
21
+ "text": [
22
+ "/Users/aakashbhatnagar/Documents/masters/LLM/myenv/lib/python3.10/site-packages/pinecone/index.py:4: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
23
+ " from tqdm.autonotebook import tqdm\n"
24
+ ]
25
+ },
26
+ {
27
+ "name": "stdout",
28
+ "output_type": "stream",
29
+ "text": [
30
+ "Downloading model\n",
31
+ "\n",
32
+ "\n",
33
+ "Models downloaded\n"
34
+ ]
35
+ }
36
+ ],
37
+ "source": [
38
+ "from rag import fetch_top_k"
39
+ ]
40
+ },
41
+ {
42
+ "cell_type": "markdown",
43
+ "metadata": {},
44
+ "source": [
45
+ "Pseudophakia is the loss of:\n",
46
+ "A. Accommodation\n",
47
+ "B. Conversion\n",
48
+ "C. Saccadic eye movements\n",
49
+ "D. Contrast sensitivity"
50
+ ]
51
+ },
52
+ {
53
+ "cell_type": "code",
54
+ "execution_count": 3,
55
+ "metadata": {},
56
+ "outputs": [
57
+ {
58
+ "name": "stdout",
59
+ "output_type": "stream",
60
+ "text": [
61
+ "Running on local URL: http://127.0.0.1:7861\n"
62
+ ]
63
+ },
64
+ {
65
+ "name": "stderr",
66
+ "output_type": "stream",
67
+ "text": [
68
+ "huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...\n",
69
+ "To disable this warning, you can either:\n",
70
+ "\t- Avoid using `tokenizers` before the fork if possible\n",
71
+ "\t- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)\n"
72
+ ]
73
+ },
74
+ {
75
+ "name": "stdout",
76
+ "output_type": "stream",
77
+ "text": [
78
+ "Running on public URL: https://49a86c835b55baa011.gradio.live\n",
79
+ "\n",
80
+ "This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from Terminal to deploy to Spaces (https://huggingface.co/spaces)\n"
81
+ ]
82
+ },
83
+ {
84
+ "data": {
85
+ "text/html": [
86
+ "<div><iframe src=\"https://49a86c835b55baa011.gradio.live\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
87
+ ],
88
+ "text/plain": [
89
+ "<IPython.core.display.HTML object>"
90
+ ]
91
+ },
92
+ "metadata": {},
93
+ "output_type": "display_data"
94
+ },
95
+ {
96
+ "data": {
97
+ "text/plain": []
98
+ },
99
+ "execution_count": 3,
100
+ "metadata": {},
101
+ "output_type": "execute_result"
102
+ }
103
+ ],
104
+ "source": [
105
+ "import gradio as gr\n",
106
+ "\n",
107
+ "gr.ChatInterface(fetch_top_k).launch(share=True)"
108
+ ]
109
+ },
110
+ {
111
+ "cell_type": "code",
112
+ "execution_count": 4,
113
+ "metadata": {},
114
+ "outputs": [
115
+ {
116
+ "name": "stderr",
117
+ "output_type": "stream",
118
+ "text": [
119
+ "huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...\n",
120
+ "To disable this warning, you can either:\n",
121
+ "\t- Avoid using `tokenizers` before the fork if possible\n",
122
+ "\t- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)\n"
123
+ ]
124
+ },
125
+ {
126
+ "name": "stdout",
127
+ "output_type": "stream",
128
+ "text": [
129
+ "Need \u001b[32m'write'\u001b[0m access token to create a Spaces repo.\n",
130
+ "\n",
131
+ " _| _| _| _| _|_|_| _|_|_| _|_|_| _| _| _|_|_| _|_|_|_| _|_| _|_|_| _|_|_|_|\n",
132
+ " _| _| _| _| _| _| _| _|_| _| _| _| _| _| _| _|\n",
133
+ " _|_|_|_| _| _| _| _|_| _| _|_| _| _| _| _| _| _|_| _|_|_| _|_|_|_| _| _|_|_|\n",
134
+ " _| _| _| _| _| _| _| _| _| _| _|_| _| _| _| _| _| _| _|\n",
135
+ " _| _| _|_| _|_|_| _|_|_| _|_|_| _| _| _|_|_| _| _| _| _|_|_| _|_|_|_|\n",
136
+ " \n",
137
+ " To login, `huggingface_hub` requires a token generated from https://huggingface.co/settings/tokens .\n",
138
+ "Token: \n",
139
+ "\u001b[31mAborted.\u001b[0m\n"
140
+ ]
141
+ }
142
+ ],
143
+ "source": [
144
+ "!gradio deploy"
145
+ ]
146
+ },
147
+ {
148
+ "cell_type": "code",
149
+ "execution_count": 2,
150
+ "metadata": {},
151
+ "outputs": [
152
+ {
153
+ "name": "stdout",
154
+ "output_type": "stream",
155
+ "text": [
156
+ "['side of scotoma, the seotoma\\n‘moves in opposite direction (ce.\\n‘towards the fixation point). The\\nobjects tend to appear and,\\ndisappear in the most discon-\\ncerting way, hence called |\\n“Jack-in-box phenomenon”.\\n\\n5. Pin-cushion effect due to |\\napherical aberrations. In this\\ncondition the straight lines\\nhecome curves and linear becomes «', 'D. Selermalacnperirans\\n¥ )\\n| a\\nue I\\n\\x0c\\neins of Otte\\nB. Groce dosoy\\n©. Kenzer\\nD Keronlada\\nith ey hich rnin woken\\not the eyeball The presence\\ntneeeaed TOP contin\\nfart apy\\nA Normal Bosan\\n Powaie ari\\nRanda\\nD. Poe\\n4. Thediagnossi\\n\"i in\\ni ee a\\nA sus haenoras\\n1 Poseraesaptnoma\\n© Bruna aapyione\\nD Pater', \"2. Soro-nogative arthropathies :\\n\\x0c\\nog\\n\\n+ Reiter's syndrome.\\n+ Ankylosing spondylitis\\n+ Poriti arthritis\\n+ aka,\\n\\n| Taftanamatory bowel disease.\\n\\n| Puch’ hetroehromi cyl\\n\\n. Viral (HSV, HZ0) keratouveits\\n\\nPosner Schloeeman syndrome\\n\\n‘auses of Panuveitis\\nSympathetic ophehalmiti\\n\\n- Saroidot\\n\\n- Syphilis\\n\\n. Vogt Koyanagi Harada syndrome\\n\\n Tuberculoi\"]\n"
157
+ ]
158
+ }
159
+ ],
160
+ "source": [
161
+ "a = fetch_top_k(\"What is the meaning of life?\")"
162
+ ]
163
+ },
164
+ {
165
+ "cell_type": "code",
166
+ "execution_count": 3,
167
+ "metadata": {},
168
+ "outputs": [
169
+ {
170
+ "data": {
171
+ "text/plain": [
172
+ "str"
173
+ ]
174
+ },
175
+ "execution_count": 3,
176
+ "metadata": {},
177
+ "output_type": "execute_result"
178
+ }
179
+ ],
180
+ "source": [
181
+ "type(a)"
182
+ ]
183
+ },
184
+ {
185
+ "cell_type": "code",
186
+ "execution_count": 5,
187
+ "metadata": {},
188
+ "outputs": [
189
+ {
190
+ "data": {
191
+ "text/plain": [
192
+ "'side of scotoma, the seotoma\\n‘moves in opposite direction (ce.\\n‘towards the fixation point). The\\nobjects tend to appear and,\\ndisappear in the most discon-\\ncerting way, hence called |\\n“Jack-in-box phenomenon”.\\n\\n5. Pin-cushion effect due to |\\napherical aberrations. In this\\ncondition the straight lines\\nhecome curves and linear becomes «\\nD. Selermalacnperirans\\n¥ )\\n| a\\nue I\\n\\x0c\\neins of Otte\\nB. Groce dosoy\\n©. Kenzer\\nD Keronlada\\nith ey hich rnin woken\\not the eyeball The presence\\ntneeeaed TOP contin\\nfart apy\\nA Normal Bosan\\n Powaie ari\\nRanda\\nD. Poe\\n4. Thediagnossi\\n\"i in\\ni ee a\\nA sus haenoras\\n1 Poseraesaptnoma\\n© Bruna aapyione\\nD Pater\\n2. Soro-nogative arthropathies :\\n\\x0c\\nog\\n\\n+ Reiter\\'s syndrome.\\n+ Ankylosing spondylitis\\n+ Poriti arthritis\\n+ aka,\\n\\n| Taftanamatory bowel disease.\\n\\n| Puch’ hetroehromi cyl\\n\\n. Viral (HSV, HZ0) keratouveits\\n\\nPosner Schloeeman syndrome\\n\\n‘auses of Panuveitis\\nSympathetic ophehalmiti\\n\\n- Saroidot\\n\\n- Syphilis\\n\\n. Vogt Koyanagi Harada syndrome\\n\\n Tuberculoi'"
193
+ ]
194
+ },
195
+ "execution_count": 5,
196
+ "metadata": {},
197
+ "output_type": "execute_result"
198
+ }
199
+ ],
200
+ "source": [
201
+ "a"
202
+ ]
203
+ },
204
+ {
205
+ "cell_type": "code",
206
+ "execution_count": null,
207
+ "metadata": {},
208
+ "outputs": [],
209
+ "source": []
210
+ }
211
+ ],
212
+ "metadata": {
213
+ "kernelspec": {
214
+ "display_name": "myenv",
215
+ "language": "python",
216
+ "name": "python3"
217
+ },
218
+ "language_info": {
219
+ "codemirror_mode": {
220
+ "name": "ipython",
221
+ "version": 3
222
+ },
223
+ "file_extension": ".py",
224
+ "mimetype": "text/x-python",
225
+ "name": "python",
226
+ "nbconvert_exporter": "python",
227
+ "pygments_lexer": "ipython3",
228
+ "version": "3.10.9"
229
+ }
230
+ },
231
+ "nbformat": 4,
232
+ "nbformat_minor": 2
233
+ }
myenv/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"
myenv/bin/activate ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ # This should detect bash and zsh, which have a hash command that must
18
+ # be called to get it to forget past commands. Without forgetting
19
+ # past commands the $PATH changes we made may not be respected
20
+ if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
21
+ hash -r 2> /dev/null
22
+ fi
23
+
24
+ if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then
25
+ PS1="${_OLD_VIRTUAL_PS1:-}"
26
+ export PS1
27
+ unset _OLD_VIRTUAL_PS1
28
+ fi
29
+
30
+ unset VIRTUAL_ENV
31
+ unset VIRTUAL_ENV_PROMPT
32
+ if [ ! "${1:-}" = "nondestructive" ] ; then
33
+ # Self destruct!
34
+ unset -f deactivate
35
+ fi
36
+ }
37
+
38
+ # unset irrelevant variables
39
+ deactivate nondestructive
40
+
41
+ VIRTUAL_ENV="/Users/aakashbhatnagar/Documents/masters/LLM/myenv"
42
+ export VIRTUAL_ENV
43
+
44
+ _OLD_VIRTUAL_PATH="$PATH"
45
+ PATH="$VIRTUAL_ENV/bin:$PATH"
46
+ export PATH
47
+
48
+ # unset PYTHONHOME if set
49
+ # this will fail if PYTHONHOME is set to the empty string (which is bad anyway)
50
+ # could use `if (set -u; : $PYTHONHOME) ;` in bash
51
+ if [ -n "${PYTHONHOME:-}" ] ; then
52
+ _OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}"
53
+ unset PYTHONHOME
54
+ fi
55
+
56
+ if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
57
+ _OLD_VIRTUAL_PS1="${PS1:-}"
58
+ PS1="(myenv) ${PS1:-}"
59
+ export PS1
60
+ VIRTUAL_ENV_PROMPT="(myenv) "
61
+ export VIRTUAL_ENV_PROMPT
62
+ fi
63
+
64
+ # This should detect bash and zsh, which have a hash command that must
65
+ # be called to get it to forget past commands. Without forgetting
66
+ # past commands the $PATH changes we made may not be respected
67
+ if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
68
+ hash -r 2> /dev/null
69
+ fi
myenv/bin/activate.csh ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file must be used with "source bin/activate.csh" *from csh*.
2
+ # You cannot run it directly.
3
+ # Created by Davide Di Blasi <[email protected]>.
4
+ # Ported to Python 3.3 venv by Andrew Svetlov <[email protected]>
5
+
6
+ alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; unsetenv VIRTUAL_ENV_PROMPT; test "\!:*" != "nondestructive" && unalias deactivate'
7
+
8
+ # Unset irrelevant variables.
9
+ deactivate nondestructive
10
+
11
+ setenv VIRTUAL_ENV "/Users/aakashbhatnagar/Documents/masters/LLM/myenv"
12
+
13
+ set _OLD_VIRTUAL_PATH="$PATH"
14
+ setenv PATH "$VIRTUAL_ENV/bin:$PATH"
15
+
16
+
17
+ set _OLD_VIRTUAL_PROMPT="$prompt"
18
+
19
+ if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then
20
+ set prompt = "(myenv) $prompt"
21
+ setenv VIRTUAL_ENV_PROMPT "(myenv) "
22
+ endif
23
+
24
+ alias pydoc python -m pydoc
25
+
26
+ rehash
myenv/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/aakashbhatnagar/Documents/masters/LLM/myenv"
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) "(myenv) " (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 "(myenv) "
69
+ end
myenv/bin/convert-caffe2-to-onnx ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from caffe2.python.onnx.bin.conversion import caffe2_to_onnx
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(caffe2_to_onnx())
myenv/bin/convert-onnx-to-caffe2 ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from caffe2.python.onnx.bin.conversion import onnx_to_caffe2
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(onnx_to_caffe2())
myenv/bin/f2py ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from numpy.f2py.f2py2e import main
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(main())
myenv/bin/fonttools ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from fontTools.__main__ import main
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(main())
myenv/bin/gradio ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from gradio.cli import cli
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(cli())
myenv/bin/httpx ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from httpx import main
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(main())
myenv/bin/huggingface-cli ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from huggingface_hub.commands.huggingface_cli import main
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(main())
myenv/bin/ipython ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from IPython import start_ipython
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(start_ipython())
myenv/bin/ipython3 ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from IPython import start_ipython
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(start_ipython())
myenv/bin/isympy ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from isympy import main
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(main())
myenv/bin/jsondiff ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+
4
+ from __future__ import print_function
5
+
6
+ import sys
7
+ import json
8
+ import jsonpatch
9
+ import argparse
10
+
11
+
12
+ parser = argparse.ArgumentParser(description='Diff two JSON files')
13
+ parser.add_argument('FILE1', type=argparse.FileType('r'))
14
+ parser.add_argument('FILE2', type=argparse.FileType('r'))
15
+ parser.add_argument('--indent', type=int, default=None,
16
+ help='Indent output by n spaces')
17
+ parser.add_argument('-u', '--preserve-unicode', action='store_true',
18
+ help='Output Unicode character as-is without using Code Point')
19
+ parser.add_argument('-v', '--version', action='version',
20
+ version='%(prog)s ' + jsonpatch.__version__)
21
+
22
+
23
+ def main():
24
+ try:
25
+ diff_files()
26
+ except KeyboardInterrupt:
27
+ sys.exit(1)
28
+
29
+
30
+ def diff_files():
31
+ """ Diffs two JSON files and prints a patch """
32
+ args = parser.parse_args()
33
+ doc1 = json.load(args.FILE1)
34
+ doc2 = json.load(args.FILE2)
35
+ patch = jsonpatch.make_patch(doc1, doc2)
36
+ if patch.patch:
37
+ print(json.dumps(patch.patch, indent=args.indent, ensure_ascii=not(args.preserve_unicode)))
38
+ sys.exit(1)
39
+
40
+ if __name__ == "__main__":
41
+ main()
myenv/bin/jsonpatch ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+
4
+ import sys
5
+ import os.path
6
+ import json
7
+ import jsonpatch
8
+ import tempfile
9
+ import argparse
10
+
11
+
12
+ parser = argparse.ArgumentParser(
13
+ description='Apply a JSON patch on a JSON file')
14
+ parser.add_argument('ORIGINAL', type=argparse.FileType('r'),
15
+ help='Original file')
16
+ parser.add_argument('PATCH', type=argparse.FileType('r'),
17
+ nargs='?', default=sys.stdin,
18
+ help='Patch file (read from stdin if omitted)')
19
+ parser.add_argument('--indent', type=int, default=None,
20
+ help='Indent output by n spaces')
21
+ parser.add_argument('-b', '--backup', action='store_true',
22
+ help='Back up ORIGINAL if modifying in-place')
23
+ parser.add_argument('-i', '--in-place', action='store_true',
24
+ help='Modify ORIGINAL in-place instead of to stdout')
25
+ parser.add_argument('-v', '--version', action='version',
26
+ version='%(prog)s ' + jsonpatch.__version__)
27
+ parser.add_argument('-u', '--preserve-unicode', action='store_true',
28
+ help='Output Unicode character as-is without using Code Point')
29
+
30
+ def main():
31
+ try:
32
+ patch_files()
33
+ except KeyboardInterrupt:
34
+ sys.exit(1)
35
+
36
+
37
+ def patch_files():
38
+ """ Diffs two JSON files and prints a patch """
39
+ args = parser.parse_args()
40
+ doc = json.load(args.ORIGINAL)
41
+ patch = json.load(args.PATCH)
42
+ result = jsonpatch.apply_patch(doc, patch)
43
+
44
+ if args.in_place:
45
+ dirname = os.path.abspath(os.path.dirname(args.ORIGINAL.name))
46
+
47
+ try:
48
+ # Attempt to replace the file atomically. We do this by
49
+ # creating a temporary file in the same directory as the
50
+ # original file so we can atomically move the new file over
51
+ # the original later. (This is done in the same directory
52
+ # because atomic renames do not work across mount points.)
53
+
54
+ fd, pathname = tempfile.mkstemp(dir=dirname)
55
+ fp = os.fdopen(fd, 'w')
56
+ atomic = True
57
+
58
+ except OSError:
59
+ # We failed to create the temporary file for an atomic
60
+ # replace, so fall back to non-atomic mode by backing up
61
+ # the original (if desired) and writing a new file.
62
+
63
+ if args.backup:
64
+ os.rename(args.ORIGINAL.name, args.ORIGINAL.name + '.orig')
65
+ fp = open(args.ORIGINAL.name, 'w')
66
+ atomic = False
67
+
68
+ else:
69
+ # Since we're not replacing the original file in-place, write
70
+ # the modified JSON to stdout instead.
71
+
72
+ fp = sys.stdout
73
+
74
+ # By this point we have some sort of file object we can write the
75
+ # modified JSON to.
76
+
77
+ json.dump(result, fp, indent=args.indent, ensure_ascii=not(args.preserve_unicode))
78
+ fp.write('\n')
79
+
80
+ if args.in_place:
81
+ # Close the new file. If we aren't replacing atomically, this
82
+ # is our last step, since everything else is already in place.
83
+
84
+ fp.close()
85
+
86
+ if atomic:
87
+ try:
88
+ # Complete the atomic replace by linking the original
89
+ # to a backup (if desired), fixing up the permissions
90
+ # on the temporary file, and moving it into place.
91
+
92
+ if args.backup:
93
+ os.link(args.ORIGINAL.name, args.ORIGINAL.name + '.orig')
94
+ os.chmod(pathname, os.stat(args.ORIGINAL.name).st_mode)
95
+ os.rename(pathname, args.ORIGINAL.name)
96
+
97
+ except OSError:
98
+ # In the event we could not actually do the atomic
99
+ # replace, unlink the original to move it out of the
100
+ # way and finally move the temporary file into place.
101
+
102
+ os.unlink(args.ORIGINAL.name)
103
+ os.rename(pathname, args.ORIGINAL.name)
104
+
105
+
106
+ if __name__ == "__main__":
107
+ main()
myenv/bin/jsonpointer ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+
4
+ from __future__ import print_function
5
+
6
+ import sys
7
+ import os.path
8
+ import json
9
+ import jsonpointer
10
+ import argparse
11
+
12
+
13
+ parser = argparse.ArgumentParser(
14
+ description='Resolve a JSON pointer on JSON files')
15
+
16
+ # Accept pointer as argument or as file
17
+ ptr_group = parser.add_mutually_exclusive_group(required=True)
18
+
19
+ ptr_group.add_argument('-f', '--pointer-file', type=argparse.FileType('r'),
20
+ nargs='?',
21
+ help='File containing a JSON pointer expression')
22
+
23
+ ptr_group.add_argument('POINTER', type=str, nargs='?',
24
+ help='A JSON pointer expression')
25
+
26
+ parser.add_argument('FILE', type=argparse.FileType('r'), nargs='+',
27
+ help='Files for which the pointer should be resolved')
28
+ parser.add_argument('--indent', type=int, default=None,
29
+ help='Indent output by n spaces')
30
+ parser.add_argument('-v', '--version', action='version',
31
+ version='%(prog)s ' + jsonpointer.__version__)
32
+
33
+
34
+ def main():
35
+ try:
36
+ resolve_files()
37
+ except KeyboardInterrupt:
38
+ sys.exit(1)
39
+
40
+
41
+ def parse_pointer(args):
42
+ if args.POINTER:
43
+ ptr = args.POINTER
44
+ elif args.pointer_file:
45
+ ptr = args.pointer_file.read().strip()
46
+ else:
47
+ parser.print_usage()
48
+ sys.exit(1)
49
+
50
+ return ptr
51
+
52
+
53
+ def resolve_files():
54
+ """ Resolve a JSON pointer on JSON files """
55
+ args = parser.parse_args()
56
+
57
+ ptr = parse_pointer(args)
58
+
59
+ for f in args.FILE:
60
+ doc = json.load(f)
61
+ try:
62
+ result = jsonpointer.resolve_pointer(doc, ptr)
63
+ print(json.dumps(result, indent=args.indent))
64
+ except jsonpointer.JsonPointerException as e:
65
+ print('Could not resolve pointer: %s' % str(e), file=sys.stderr)
66
+
67
+
68
+ if __name__ == "__main__":
69
+ main()
myenv/bin/jsonschema ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from jsonschema.cli import main
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(main())
myenv/bin/jupyter ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from jupyter_core.command import main
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(main())
myenv/bin/jupyter-kernel ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from jupyter_client.kernelapp import main
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(main())
myenv/bin/jupyter-kernelspec ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from jupyter_client.kernelspecapp import KernelSpecApp
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(KernelSpecApp.launch_instance())
myenv/bin/jupyter-migrate ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from jupyter_core.migrate import main
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(main())
myenv/bin/jupyter-run ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from jupyter_client.runapp import RunApp
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(RunApp.launch_instance())
myenv/bin/jupyter-troubleshoot ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from jupyter_core.troubleshoot import main
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(main())
myenv/bin/langchain-server ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from langchain.server import main
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(main())
myenv/bin/langsmith ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from langsmith.cli.main import main
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(main())
myenv/bin/markdown-it ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from markdown_it.cli.parse import main
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(main())
myenv/bin/normalizer ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from charset_normalizer.cli import cli_detect
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(cli_detect())
myenv/bin/pinecone ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from pinecone.cli import main
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(main())
myenv/bin/pip ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from pip._internal.cli.main import main
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(main())
myenv/bin/pip3 ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from pip._internal.cli.main import main
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(main())
myenv/bin/pip3.10 ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from pip._internal.cli.main import main
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(main())
myenv/bin/pyftmerge ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from fontTools.merge import main
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(main())
myenv/bin/pyftsubset ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from fontTools.subset import main
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(main())
myenv/bin/pygmentize ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from pygments.cmdline import main
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(main())
myenv/bin/python ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2d834e1bd92096b74b2f1b4c83a98aabacb7a7e3f8ebcfbf7b6a3fdd3fcfd726
3
+ size 3863248
myenv/bin/python3 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2d834e1bd92096b74b2f1b4c83a98aabacb7a7e3f8ebcfbf7b6a3fdd3fcfd726
3
+ size 3863248
myenv/bin/python3.10 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2d834e1bd92096b74b2f1b4c83a98aabacb7a7e3f8ebcfbf7b6a3fdd3fcfd726
3
+ size 3863248
myenv/bin/torchrun ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from torch.distributed.run import main
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(main())
myenv/bin/tqdm ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from tqdm.cli import main
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(main())
myenv/bin/transformers-cli ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from transformers.commands.transformers_cli import main
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(main())
myenv/bin/ttx ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from fontTools.ttx import main
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(main())
myenv/bin/upload_theme ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/Users/aakashbhatnagar/Documents/masters/LLM/myenv/bin/python
2
+ # -*- coding: utf-8 -*-
3
+ import re
4
+ import sys
5
+ from gradio.themes.upload_theme import main
6
+ if __name__ == '__main__':
7
+ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8
+ sys.exit(main())