Skip to content

Instantly share code, notes, and snippets.

View soof-golan's full-sized avatar

Soof Golan soof-golan

View GitHub Profile
@soof-golan
soof-golan / parallel_mini_grep.py
Last active February 3, 2022 07:51
Toy grep from Aur's parallelism dojo
import itertools
import os
from concurrent.futures import ThreadPoolExecutor
from pathlib import Path
pool = ThreadPoolExecutor(max_workers=os.cpu_count() * 2)
def find_needle(file, needle):
with open(file) as f:
@soof-golan
soof-golan / game_of_life.py
Last active February 4, 2022 18:34
Support gists for my game-of-life blog post
[[1, 1, 1],
[1, 0, 1],
[1, 1, 1]]
@soof-golan
soof-golan / auth_payload.json
Last active March 12, 2022 13:21
stockr post gists
{"action":"auth","key": "API_KEY_ID","secret":"API_KEY_SECRET"}

Keybase proof

I hereby claim:

  • I am soof-golan on github.
  • I am soofgolan (https://keybase.io/soofgolan) on keybase.
  • I have a public key ASATYK5B9elAkfeJneddXGbriv2i3zbrQjg7fIOO0xxyXAo

To claim this, I am signing this object:

@soof-golan
soof-golan / Dockerfile
Last active October 24, 2024 13:44
Python + Poetry + Docker Example
FROM python:3.10 as python-base
# https://python-poetry.org/docs#ci-recommendations
ENV POETRY_VERSION=1.2.0
ENV POETRY_HOME=/opt/poetry
ENV POETRY_VENV=/opt/poetry-venv
# Tell Poetry where to place its cache and virtual environment
ENV POETRY_CACHE_DIR=/opt/.cache
@soof-golan
soof-golan / pytorch_mps_topk_crash
Created January 9, 2023 11:30
Crash trace of topk crash on M1
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process: Python [97970]
Path: /opt/homebrew/*/Python.framework/Versions/3.10/Resources/Python.app/Contents/MacOS/Python
Identifier: org.python.python
Version: 3.10.9 (3.10.9)
Code Type: ARM-64 (Native)
Parent Process: zsh [89897]