Skip to content

Commit

Permalink
revert "test url requests"
Browse files Browse the repository at this point in the history
This reverts commit 1a3b439.
  • Loading branch information
qcampbel committed Feb 28, 2025
1 parent 73b3e44 commit eb2d067
Showing 1 changed file with 2 additions and 31 deletions.
33 changes: 2 additions & 31 deletions paper3_Scents/GeneratingScentExplanations.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -915,35 +915,6 @@
"#### Read in sample space from csv file & create list of exmol Examples from it"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import requests\n",
"\n",
"filename = 'figshare-38472275'\n",
"url = \"https://figshare.com/ndownloader/files/38472275\"\n",
"r = requests.get(url)\n",
"with open(filename, 'wb') as f:\n",
" f.write(r.content)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"url = \"https://figshare.com/ndownloader/files/38472275\"\n",
"headers = {\n",
" 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36'\n",
"}\n",
"request = urllib.request.Request(url, headers=headers)\n",
"filename, headers = urllib.request.urlretrieve(request)\n"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -1135,7 +1106,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "exmol_py312",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -1149,7 +1120,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.9"
"version": "3.9.4"
}
},
"nbformat": 4,
Expand Down

0 comments on commit eb2d067

Please sign in to comment.