Skip to content

Instantly share code, notes, and snippets.

View chawza's full-sized avatar
💭
procrastinator

Nabeel Kahlil Maulana chawza

💭
procrastinator
View GitHub Profile
@chawza
chawza / get_distance.py
Created December 14, 2024 04:56
Python get geopoint (latitude, longitude) distance using numpy
from math import radians, cos, sin, asin, sqrt
import numpy as np
import random
import time
from functools import wraps
import time
from functools import wraps
@chawza
chawza / Beginner
Last active May 13, 2024 04:15
Compose Refs
- good for quick introduction: https://developer.android.com/develop/ui/compose/tutorial
@chawza
chawza / batch.py
Created July 18, 2023 04:40
Batching
def batch(datas, n=10):
idx = 0
while True:
chunk = datas[idx: idx+10]
if len(chunk) == 0:
break
yield chunk
idx += n