Skip to content

Instantly share code, notes, and snippets.

View iamaziz's full-sized avatar
🎲

Aziz Alto iamaziz

🎲
View GitHub Profile
@iamaziz
iamaziz / nyc_to_sharqiyahdata_with_love.ipynb
Last active May 15, 2020 05:35
nyc_to_sharqiyahdata_with_love.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Classical Programming vs. Machine Learning Programming:

image

e.g.

image

source:

@iamaziz
iamaziz / copy-of-imagecolorizercolab.ipynb
Last active May 12, 2020 21:56
ImageColorizerColab.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@iamaziz
iamaziz / videocolorizercolab.ipynb
Last active April 4, 2022 03:57
VideoColorizerColab.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@iamaziz
iamaziz / metaprogramming.md
Last active May 6, 2020 05:07
Note on metaprogramming and metacalss in Python
Date: 4/27/2020

Why need metaprogramming? (maybe metaclass?)

Scenario:

  • I want to have a single Interface Class that has a Base Implementation Class with multiple instance implementations for other Inheriting Classes
@iamaziz
iamaziz / code_book_python_algorithms.py
Created September 21, 2019 01:57
Code Book: read source code just like reading a book.
# --- Code Book: Python Algorithms
# --- Source : github.com/keon/algorithms.git
#========================================================================================================================
# :: tree/path_sum.py ::
#========================================================================================================================
| 1| """
| 2| Given a binary tree and a sum, determine if the tree has a root-to-leaf
| 3| path such that adding up all the values along the path equals the given sum.
| 4|
@iamaziz
iamaziz / k_means.py
Last active June 15, 2019 04:23
Vanilla k_means algorithm with zero import (for any number of dimensions)
def distance(u, v):
"""
Calculates Euclidean distance between two point
distance = square_root( sum(u_i - v_i)^2 )
u: [float, float], point1
v: [float, float], point2
"""
sum_ = sum((u[i] - v[i]) ** 2 for i in range(len(u)))
return sum_ ** (1 / 2)
@iamaziz
iamaziz / k_means.ipynb
Last active June 15, 2019 06:28
k_means.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@iamaziz
iamaziz / comparison-sort_algorithms_compared.ipynb
Created March 21, 2019 22:10
comparison-sort algorithms compared and visualized
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@iamaziz
iamaziz / case_insinsitive_compare.py
Last active March 20, 2019 05:37
An implementation of string equality comparison case-insensitive e.g. s1.upper() == s2.upper()
def case_insensitive(s1, s2):
"""
returns True if both s1 and s2
contain the same letters and letters in the same order,
regardless of letters case.
In other words,
this is an implementation for either
s1.upper() == s2.upper()
or s1.lower() == s2.lower()
"""