Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed errors due to updates of used libraries #2

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,7 @@ venv.bak/

# mypy
.mypy_cache/

#data
data
misc_save
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions .idea/FoodMine.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified FoodMine_Notable_Files/fm_cocoa.pkl
Binary file not shown.
34 changes: 27 additions & 7 deletions Nature_Food_Perspective/Perspective_Analysis.ipynb

Large diffs are not rendered by default.

950 changes: 475 additions & 475 deletions data/cocoa_scoring.csv

Large diffs are not rendered by default.

832 changes: 416 additions & 416 deletions data/garlic_scoring.csv

Large diffs are not rendered by default.

Empty file modified install_additional_packages.sh
100644 → 100755
Empty file.
181 changes: 70 additions & 111 deletions notebooks/Data_Statistics.ipynb

Large diffs are not rendered by default.

128 changes: 61 additions & 67 deletions notebooks/Molecule_Embedding.ipynb

Large diffs are not rendered by default.

101 changes: 26 additions & 75 deletions notebooks/Paper_Citations.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -23,7 +23,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -33,7 +33,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -43,7 +43,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -156,7 +156,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -191,20 +191,20 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
"g_food_data = pd.read_pickle(mfp('misc_save/garlic_food_data.pkl'))\n",
"g_food_info = pd.read_csv(mfp('data/garlic_scoring.csv'), encoding='latin1')\n",
"g_food_info = pd.read_csv('data/garlic_scoring.csv', encoding='latin_1')\n",
"\n",
"c_food_data = pd.read_pickle(mfp('misc_save/cocoa_food_data.pkl'))\n",
"c_food_info = pd.read_csv(mfp('data/cocoa_scoring.csv', encoding='latin1'))"
"c_food_info = pd.read_csv('data/cocoa_scoring.csv', encoding='latin_1')"
]
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 18,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -215,7 +215,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -229,7 +229,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 20,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -242,7 +242,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -265,64 +265,7 @@
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0 at 0.055836995442708336 min\n",
"50 at 1.2028738657633464 min\n",
"100 at 2.3527114470799764 min\n",
"150 at 3.50199187596639 min\n",
"200 at 4.597352143128713 min\n",
"250 at 5.795228282610576 min\n",
"300 at 6.960369209448497 min\n",
"350 at 8.074555778503418 min\n",
"400 at 9.23499865134557 min\n",
"450 at 10.397917222976684 min\n",
"500 at 11.508652718861898 min\n",
"550 at 12.667752373218537 min\n",
"600 at 13.829023762543995 min\n",
"650 at 14.948043950398763 min\n",
"700 at 16.120840458075204 min\n",
"750 at 17.280420589447022 min\n",
"800 at 18.44827857812246 min\n",
"850 at 19.62849095662435 min\n",
"900 at 20.791995211442313 min\n",
"950 at 21.903584138552347 min\n",
"1000 at 23.066848842302957 min\n",
"1050 at 24.29008613030116 min\n",
"1100 at 25.61460832754771 min\n",
"1150 at 26.776571385065715 min\n",
"1200 at 27.93707577387492 min\n",
"1250 at 29.04781185388565 min\n",
"1300 at 30.221344435214995 min\n"
]
}
],
"source": [
"start = time.time()\n",
"\n",
"# Retrieve paper titles from MAG\n",
"titles = []\n",
"c = 0\n",
"for p in c_citation_ids:\n",
" titles.append(get_title(p))\n",
" if not c % 3:\n",
" time.sleep(3)\n",
" \n",
" if not c % 50:\n",
" print(f'{c} at {(time.time()-start)/60} min')\n",
" c+=1\n",
"\n",
"#pd.DataFrame({'id' : c_citation_ids, 'title' : titles}).to_pickle(mfp('misc_save/cocoa_citation_titles.pkl'))"
]
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 23,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -332,7 +275,7 @@
},
{
"cell_type": "code",
"execution_count": 30,
"execution_count": 24,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -490,9 +433,17 @@
},
{
"cell_type": "code",
"execution_count": 41,
"execution_count": null,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0 at 0.047705264886220296 min\n"
]
}
],
"source": [
"g_ct.title = g_ct.title.apply(greek_letter_converter)\n",
"\n",
Expand Down Expand Up @@ -865,7 +816,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -879,7 +830,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.10.6"
}
},
"nbformat": 4,
Expand Down
Loading