Skip to content

Instantly share code, notes, and snippets.

View ofou's full-sized avatar
🚀
Launching

Omar Nomad ofou

🚀
Launching
View GitHub Profile
We can make this file beautiful and searchable if this error is corrected: It looks like row 4 should actually have 47 columns, instead of 14. in line 3.
Name Emoji Category Energ_Kcal Protein_(g) Lipid_Tot_(g) Carbohydrt_(g) Fiber_TD_(g) Sugar_Tot_(g) Calcium_(mg) Iron_(mg) Magnesium_(mg) Phosphorus_(mg) Potassium_(mg) Sodium_(mg) Zinc_(mg) Copper_mg) Manganese_(mg) Selenium_(碌g) Vit_C_(mg) Thiamin_(mg) Riboflavin_(mg) Niacin_(mg) Panto_Acid_mg) Vit_B6_(mg) Folate_Tot_(碌g) Folic_Acid_(碌g) Food_Folate_(碌g) Folate_DFE_(碌g) Choline_Tot_ (mg) Vit_B12_(碌g) Vit_A_IU Vit_A_RAE Retinol_(碌g) Alpha_Carot_(碌g) Beta_Carot_(碌g) Beta_Crypt_(碌g) Lycopene_(碌g) Lut+Zea_ (碌g) Vit_E_(mg) Vit_D_碌g Vit_D_IU Vit_K_(碌g) FA_Sat_(g) FA_Mono_(g) FA_Poly_(g) Cholestrl_(mg)
grapes 🍇 fruit 69 0.72 0.16 18.1 0.9 15.48 10 0.36 7 20 191 2 0.07 0.127 0.071 0.1 3.2 0.069 0.07 0.188 0.05 0.086 2 0 2 2 5.6 0 66 3 0 1 39 0 0 72 0.19 0 0 14.6 0.054 0.007 0.048 0
melon 🍈 fruit 28 1.11 0.1 6.58 0.9 5.69 11 0.34 11 5 182 9 0.07 0.06 0.035 0.4 21.8 0.015 0.031 0.232 0.084 0.163 8 0 8 8 7.6 0 0 0 0 0 0 0 0 26 0.05 0 0 2.5 0.025 0.002 0.039 0
watermelon 🍉 fruit 30 0.61 0.15 7.55 0.4 6.2 7 0.24 10 11 11
@ofou
ofou / emojifoods.csv
Created November 1, 2017 00:38
Emoji Foods Nutritional Data Dataset
Name Emoji Energ_Kcal Protein_(g) Lipid_Tot_(g) Carbohydrt_(g)
grapes 🍇 69 0.72 0.16 18.1
melon 🍈 28 1.11 0.1 6.58
watermelon 🍉 30 0.61 0.15 7.55
tangerine 🍊 53 0.81 0.31 13.34
lemon 🍋 29 1.1 0.3 9.32
banana 🍌 89 1.09 0.33 22.84
pineapple 🍍 50 0.54 0.12 13.12
red apple 🍎 63 0.2 0.18 15.22
green apple 🍏 58 0.44 0.19 13.61
Name Emoji Energ_Kcal Protein_(g) Lipid_Tot_(g) Carbohydrt_(g)
grapes 🍇 0.69 0.0072 0.0016 0.181
melon 🍈 0.28 0.0111 0.001 0.0658
watermelon 🍉 0.3 0.0061 0.0015 0.0755
tangerine 🍊 0.53 0.0081 0.0031 0.1334
lemon 🍋 0.29 0.011 0.003 0.0932
banana 🍌 0.89 0.0109 0.0033 0.2284
pineapple 🍍 0.5 0.0054 0.0012 0.1312
red apple 🍎 0.63 0.002 0.0018 0.1522
green apple 🍏 0.58 0.0044 0.0019 0.1361
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 46 columns, instead of 32. in line 2.
Name,Emoji,Energ_Kcal,Protein_(g),Lipid_Tot_(g),Carbohydrt_(g),Fiber_TD_(g),Sugar_Tot_(g),Calcium_(mg),Iron_(mg),Magnesium_(mg),Phosphorus_(mg),Potassium_(mg),Sodium_(mg),Zinc_(mg),Copper_mg),Manganese_(mg),Selenium_(碌g),Vit_C_(mg),Thiamin_(mg),Riboflavin_(mg),Niacin_(mg),Panto_Acid_mg),Vit_B6_(mg),Folate_Tot_(碌g),Folic_Acid_(碌g),Food_Folate_(碌g),Folate_DFE_(碌g),Choline_Tot_ (mg),Vit_B12_(碌g),Vit_A_IU,Vit_A_RAE,Retinol_(碌g),Alpha_Carot_(碌g),Beta_Carot_(碌g),Beta_Crypt_(碌g),Lycopene_(碌g),Lut+Zea_ (碌g),Vit_E_(mg),Vit_D_碌g,Vit_D_IU,Vit_K_(碌g),FA_Sat_(g),FA_Mono_(g),FA_Poly_(g),Cholestrl_(mg)
grapes,🍇,0.69,0.0072,0.0016,0.181,0.009,0.1548,0.1,0.0036,0.07,0.2,1.91,0.02,0.0007,0.00127,0.00071,0.001,0.032,0.00069,0.0007,0.00188,0.0005,0.00086,0.02,0,0.02,0.02,0.056,0,0.66,0.03,0,0.01,0.39,0,0,0.72,0.0019,0,0,0.146,0.00054,0.00007,0.00048,0
melon,🍈,0.28,0.0111,0.001,0.0658,0.009,0.0569,0.11,0.0034,0.11,0.05,1.82,0.09,0.0007,0.0006,0.00035,0.004,0.218,0.00015,0.00031,0.00232,0.00084,0.00163,0.08,0,0.08,0.08,0.076,0,0,0
@ofou
ofou / Cartesian coordinate system.html
Created November 3, 2017 03:24
D3 cartesian coordinate system
<div id="graph"></div>
@ofou
ofou / requirements.py
Last active June 10, 2018 06:54
Data Science basic packages (install using pip)
pandas # (data analysis)
NumPy #(multi-dimensional arrays)
SciPy # (algorithms to use with numpy)
matplotlib # (data visualization)
h5py # (store & manipulate data)
PyTables # (managing HDF5 datasets)
Jupyter # (research collaboration)
IPython # (powerful shell)
hdfs # (C/C++ wrapper for Hadoop)
pymongo # (MongoDB driver)
@ofou
ofou / pagerank.py
Last active June 21, 2019 06:29
Pagerank using iterative method
def pagerank(self):
M = self.google_matrix()
n, m = np.shape(M)
r = np.ones(n) / n
r = np.transpose(r)
iterations = 1
while True:
print("pass: ", iterations)
previous_r = r
r = np.dot(r, M)
Country Capital City Latitude Longitude Population Capital Type
Afghanistan Kabul 34.5289 69.1725 4011770 Capital
Albania Tiranë (Tirana) 41.3275 19.8189 475577 Capital
Algeria El Djazaïr (Algiers) 36.7525 3.0420 2693542 Capital
American Samoa Pago Pago -14.2781 -170.7025 48526 Capital
Andorra Andorra la Vella 42.5078 1.5211 22614 Capital
Angola Luanda -8.8368 13.2343 7774200 Capital
Anguilla The Valley 18.2170 -63.0578 1402 Capital
Antigua and Barbuda St. John's 17.1172 -61.8457 20764 Capital
Argentina Buenos Aires -34.6051 -58.4004 14966530 Capital
@ofou
ofou / worldcities.csv
Created April 7, 2020 02:07
World cities taken from Kaggle
We can't make this file beautiful and searchable because it's too large.
"city","city_ascii","lat","lng","country","iso2","iso3","admin_name","capital","population","id"
"Malishevë","Malisheve","42.4822","20.7458","Kosovo","XK","XKS","Malishevë","admin","","1901597212"
"Prizren","Prizren","42.2139","20.7397","Kosovo","XK","XKS","Prizren","admin","","1901360309"
"Zubin Potok","Zubin Potok","42.9144","20.6897","Kosovo","XK","XKS","Zubin Potok","admin","","1901608808"
"Kamenicë","Kamenice","42.5781","21.5803","Kosovo","XK","XKS","Kamenicë","admin","","1901851592"
"Viti","Viti","42.3214","21.3583","Kosovo","XK","XKS","Viti","admin","","1901328795"
"Shtërpcë","Shterpce","42.2394","21.0272","Kosovo","XK","XKS","Shtërpcë","admin","","1901828239"
"Shtime","Shtime","42.4331","21.0397","Kosovo","XK","XKS","Shtime","admin","","1901598505"
"Vushtrri","Vushtrri","42.8231","20.9675","Kosovo","XK","XKS","Vushtrri","admin","","1901107642"
"Dragash","Dragash","42.0265","20.6533","Kosovo","XK","XKS","Dragash","admin","","1901112530"
@ofou
ofou / keybase.md
Last active January 5, 2021 04:50

Keybase proof

I hereby claim:

  • I am ofou on github.
  • I am ofou (https://keybase.io/ofou) on keybase.
  • I have a public key whose fingerprint is 7E6E 446E AF5F 2CFD 58CA 2904 D77B EAEA B566 B0EE

To claim this, I am signing this object: