Skip to content

Instantly share code, notes, and snippets.

View huseinzol05's full-sized avatar
🍵
Hunting cendol!

HUSEIN ZOLKEPLI huseinzol05

🍵
Hunting cendol!
View GitHub Profile
@huseinzol05
huseinzol05 / decode-steps.ipynb
Last active May 6, 2024 17:03
decoder steps using HQQ
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@huseinzol05
huseinzol05 / test-hqq.ipynb
Created May 6, 2024 08:55
Simple matmul comparison
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@huseinzol05
huseinzol05 / hqq-whisper.ipynb
Created May 6, 2024 08:50
Whisper quantization using HQQ up until `torchao_int4`
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@huseinzol05
huseinzol05 / install-plyvel-catalina-10.15.2.sh
Created July 14, 2022 05:46
Install plyvel on Mac OC Catalina 10.15.2
brew tap bagonyi/homebrew-formulae git@github.com:bagonyi/homebrew-formulae.git
brew extract --version=1.22 leveldb bagonyi/formulae
HOMEBREW_NO_AUTO_UPDATE=1 brew install leveldb@1.22
CFLAGS='-stdlib=libc++ -std=c++11' pip3 install plyvel --no-cache-dir
python3 -c 'import plyvel'
@huseinzol05
huseinzol05 / b2-huggingface.ipynb
Created June 22, 2022 04:09
Sync from B2 to HuggingFace
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@huseinzol05
huseinzol05 / mp.py
Last active December 23, 2023 00:26
mp.py use by malaya-speech and malaya
from multiprocess import Pool
import itertools
def chunks(l, n):
for i in range(0, len(l), n):
yield (l[i: i + n], i // n)
def multiprocessing(strings, function, cores=6, returned=True):
@huseinzol05
huseinzol05 / reset.py
Created May 10, 2022 04:25
Reset offsets for Kafka MirrorMaker2 using Kowl API
import requests
from datetime import datetime, timedelta, date
import json
td = int((datetime.today() - timedelta(days = 2)).timestamp() * 1000)
r = requests.get('http://localhost:8080/api/consumer-groups').json()
for g in r['consumerGroups']:
group_id = g['groupId']
@huseinzol05
huseinzol05 / stress-test-kafka.csv
Created August 7, 2021 14:49
Stress test CSV for Kafka Production
We can make this file beautiful and searchable if this error is corrected: It looks like row 5 should actually have 51 columns, instead of 26. in line 4.
id,status_0,status_1,status_2,status_3,status_4,status_5,status_6,status_7,status_8,status_9,status_10,status_11,status_12,status_13,status_14,status_15,status_16,status_17,status_18,status_19,status_20,status_21,status_22,status_23,status_24,status_25,status_26,status_27,status_28,status_29,status_30,status_31,status_32,status_33,status_34,status_35,status_36,status_37,status_38,status_39,status_40,status_41,status_42,status_43,status_44,status_45,status_46,status_47,status_48,status_49
0,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK
1,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK
2,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK
3,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,O
@huseinzol05
huseinzol05 / kitajaga.ipynb
Created July 8, 2021 07:19
Bearer request
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@huseinzol05
huseinzol05 / balltree.ipynb
Created July 5, 2021 14:54
Practise KDTree and BallTree
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.