|
25 | 25 | "# If you are working in colab, uncomment these lines to install dependencies\n", |
26 | 26 | "#! pip install esm@git+https://github.com/Biohub/esm.git@main\n", |
27 | 27 | "#! pip install matplotlib\n", |
28 | | - "#! pip install seaborn" |
| 28 | + "#! pip install seaborn\n", |
| 29 | + "#! pip install remotezip" |
29 | 30 | ] |
30 | 31 | }, |
31 | 32 | { |
|
137 | 138 | }, |
138 | 139 | { |
139 | 140 | "cell_type": "code", |
140 | | - "execution_count": 27, |
| 141 | + "execution_count": null, |
141 | 142 | "metadata": {}, |
142 | | - "outputs": [ |
143 | | - { |
144 | | - "name": "stdout", |
145 | | - "output_type": "stream", |
146 | | - "text": [ |
147 | | - "--2026-05-28 16:44:15-- https://docs.google.com/uc?export=download&id=1SpOkL11MJxIgy99dqufvUNJuCiuhxuyg\n", |
148 | | - "Resolving docs.google.com (docs.google.com)... 142.251.210.78\n", |
149 | | - "Connecting to docs.google.com (docs.google.com)|142.251.210.78|:443... connected.\n", |
150 | | - "HTTP request sent, awaiting response... 303 See Other\n", |
151 | | - "Location: https://drive.usercontent.google.com/download?id=1SpOkL11MJxIgy99dqufvUNJuCiuhxuyg&export=download [following]\n", |
152 | | - "--2026-05-28 16:44:15-- https://drive.usercontent.google.com/download?id=1SpOkL11MJxIgy99dqufvUNJuCiuhxuyg&export=download\n", |
153 | | - "Resolving drive.usercontent.google.com (drive.usercontent.google.com)... 192.178.50.65\n", |
154 | | - "Connecting to drive.usercontent.google.com (drive.usercontent.google.com)|192.178.50.65|:443... connected.\n", |
155 | | - "HTTP request sent, awaiting response... 200 OK\n", |
156 | | - "Length: 43132 (42K) [application/octet-stream]\n", |
157 | | - "Saving to: 'adk.csv'\n", |
158 | | - "\n", |
159 | | - "adk.csv 100%[===================>] 42.12K --.-KB/s in 0.02s \n", |
160 | | - "\n", |
161 | | - "2026-05-28 16:44:16 (2.17 MB/s) - 'adk.csv' saved [43132/43132]\n", |
162 | | - "\n" |
163 | | - ] |
164 | | - } |
165 | | - ], |
| 143 | + "outputs": [], |
166 | 144 | "source": [ |
167 | | - "!wget --no-check-certificate \"https://docs.google.com/uc?export=download&id=1SpOkL11MJxIgy99dqufvUNJuCiuhxuyg\" -O adk.csv" |
| 145 | + "# Stream just the one CSV we need out of the 200MB archive, no full download.\n", |
| 146 | + "from remotezip import RemoteZip\n", |
| 147 | + "\n", |
| 148 | + "DATA_URL = \"https://zenodo.org/records/15022271/files/data.zip\"\n", |
| 149 | + "MEMBER = \"data/adk_ml_dataset.csv\"\n", |
| 150 | + "\n", |
| 151 | + "with RemoteZip(DATA_URL) as zf:\n", |
| 152 | + " with zf.open(MEMBER) as src, open(\"adk_ml_dataset.csv\", \"wb\") as dst:\n", |
| 153 | + " dst.write(src.read())" |
168 | 154 | ] |
169 | 155 | }, |
170 | 156 | { |
171 | 157 | "cell_type": "code", |
172 | | - "execution_count": 28, |
| 158 | + "execution_count": null, |
173 | 159 | "metadata": {}, |
174 | 160 | "outputs": [], |
175 | 161 | "source": [ |
176 | 162 | "import matplotlib.pyplot as plt\n", |
177 | 163 | "import pandas as pd\n", |
178 | 164 | "import seaborn as sns\n", |
179 | 165 | "\n", |
180 | | - "adk_path = \"adk.csv\"\n", |
| 166 | + "adk_path = \"adk_ml_dataset.csv\"\n", |
181 | 167 | "df = pd.read_csv(adk_path)\n", |
182 | 168 | "df = df[[\"org_name\", \"sequence\", \"lid_type\", \"temperature\"]]\n", |
183 | 169 | "df = df[df[\"lid_type\"] != \"other\"] # drop one structural class for simplicity" |
|
231 | 217 | }, |
232 | 218 | { |
233 | 219 | "cell_type": "code", |
234 | | - "execution_count": 32, |
| 220 | + "execution_count": null, |
235 | 221 | "metadata": {}, |
236 | 222 | "outputs": [], |
237 | 223 | "source": [ |
|
244 | 230 | }, |
245 | 231 | { |
246 | 232 | "cell_type": "code", |
247 | | - "execution_count": 33, |
| 233 | + "execution_count": null, |
248 | 234 | "metadata": {}, |
249 | 235 | "outputs": [], |
250 | 236 | "source": [ |
|
322 | 308 | ], |
323 | 309 | "metadata": { |
324 | 310 | "kernelspec": { |
325 | | - "display_name": "Pixi (ESM)", |
| 311 | + "display_name": "default", |
326 | 312 | "language": "python", |
327 | | - "name": "pixi-esm" |
| 313 | + "name": "python3" |
328 | 314 | }, |
329 | 315 | "language_info": { |
330 | 316 | "codemirror_mode": { |
|
336 | 322 | "name": "python", |
337 | 323 | "nbconvert_exporter": "python", |
338 | 324 | "pygments_lexer": "ipython3", |
339 | | - "version": "3.12.12" |
| 325 | + "version": "3.12.9" |
340 | 326 | } |
341 | 327 | }, |
342 | 328 | "nbformat": 4, |
|
0 commit comments