Skip to content

Instantly share code, notes, and snippets.

View qbeer's full-sized avatar
🎯
Focusing

Olar Alex qbeer

🎯
Focusing
View GitHub Profile
@qbeer
qbeer / create_tf_records_from_images.py
Created September 24, 2019 10:55
How to use the tensroflow dataset API to create TFRecords files in order to store data in raw format
# Tensorflow throws a bunch of `FutureWarning`s
import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)
import tensorflow as tf
import glob
BUFFER_SIZE = 50000
BATCH_SIZE = 32
IMAGE_HEIGHT = 64
@qbeer
qbeer / titanic.csv
Created September 6, 2021 09:00
Titanic data for EDA
PassengerId Survived Pclass Name Sex Age SibSp Parch Ticket Fare Cabin Embarked
1 0 3 Braund, Mr. Owen Harris male 22 1 0 A/5 21171 7.25 S
2 1 1 Cumings, Mrs. John Bradley (Florence Briggs Thayer) female 38 1 0 PC 17599 71.2833 C85 C
3 1 3 Heikkinen, Miss. Laina female 26 0 0 STON/O2. 3101282 7.925 S
4 1 1 Futrelle, Mrs. Jacques Heath (Lily May Peel) female 35 1 0 113803 53.1 C123 S
5 0 3 Allen, Mr. William Henry male 35 0 0 373450 8.05 S
6 0 3 Moran, Mr. James male 0 0 330877 8.4583 Q
7 0 1 McCarthy, Mr. Timothy J male 54 0 0 17463 51.8625 E46 S
8 0 3 Palsson, Master. Gosta Leonard male 2 3 1 349909 21.075 S
9 1 3 Johnson, Mrs. Oscar W (Elisabeth Vilhelmina Berg) female 27 0 2 347742 11.1333 S
@qbeer
qbeer / hw1.ipynb
Created September 7, 2021 08:57
HW1.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@qbeer
qbeer / HW_02.ipynb
Last active September 14, 2021 08:25
02_BLANK.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
We can't make this file beautiful and searchable because it's too large.
Country Name Country Code Series Name Series Code 2016 [YR2016]
Afghanistan AFG Access to electricity (% of population) EG.ELC.ACCS.ZS 84.1371383666992
Afghanistan AFG Adolescent fertility rate (births per 1,000 women ages 15-19) SP.ADO.TFRT 68.7942
Afghanistan AFG Age dependency ratio (% of working-age population) SP.POP.DPND 86.5709321507136
Afghanistan AFG Agriculture, value added (% of GDP) NV.AGR.TOTL.ZS 20.9658976104561
Afghanistan AFG Agriculture, value added (annual % growth) NV.AGR.TOTL.KD.ZG 5.97175068925613
Afghanistan AFG Agriculture, value added (constant 2005 US$) NV.AGR.TOTL.KD 4535103188.06536
Afghanistan AFG Air transport, registered carrier departures worldwide IS.AIR.DPRT 22770
Afghanistan AFG Automated teller machines (ATMs) (per 100,000 adults) FB.ATM.TOTL.P5 1.07421538203442
Afghanistan AFG Borrowers from commercial banks (per 1,000 adults) FB.CBK.BRWR.P3 3.05195383587665
@qbeer
qbeer / 01_solved_eda.ipynb
Created September 17, 2021 06:38
01_SOLVED_EDA.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@qbeer
qbeer / lab03.ipynb
Created September 20, 2021 14:47
lab03.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
"fixed acidity";"volatile acidity";"citric acid";"residual sugar";"chlorides";"free sulfur dioxide";"total sulfur dioxide";"density";"pH";"sulphates";"alcohol";"quality"
7.4;0.7;0;1.9;0.076;11;34;0.9978;3.51;0.56;9.4;5
7.8;0.88;0;2.6;0.098;25;67;0.9968;3.2;0.68;9.8;5
7.8;0.76;0.04;2.3;0.092;15;54;0.997;3.26;0.65;9.8;5
11.2;0.28;0.56;1.9;0.075;17;60;0.998;3.16;0.58;9.8;6
7.4;0.7;0;1.9;0.076;11;34;0.9978;3.51;0.56;9.4;5
7.4;0.66;0;1.8;0.075;13;40;0.9978;3.51;0.56;9.4;5
7.9;0.6;0.06;1.6;0.069;15;59;0.9964;3.3;0.46;9.4;5
7.3;0.65;0;1.2;0.065;15;21;0.9946;3.39;0.47;10;7
7.8;0.58;0.02;2;0.073;9;18;0.9968;3.36;0.57;9.5;7
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
No X1 transaction date X2 house age X3 distance to the nearest MRT station X4 number of convenience stores X5 latitude X6 longitude Y house price of unit area
1 2012.917 32 84.87882 10 24.98298 121.54024 37.9
2 2012.917 19.5 306.5947 9 24.98034 121.53951 42.2
3 2013.583 13.3 561.9845 5 24.98746 121.54391 47.3
4 2013.500 13.3 561.9845 5 24.98746 121.54391 54.8
5 2012.833 5 390.5684 5 24.97937 121.54245 43.1
6 2012.667 7.1 2175.03 3 24.96305 121.51254 32.1
7 2012.667 34.5 623.4731 7 24.97933 121.53642 40.3
8 2013.417 20.3 287.6025 6 24.98042 121.54228 46.7
9 2013.500 31.7 5512.038 1 24.95095 121.48458 18.8