Skip to content

Instantly share code, notes, and snippets.

View trungdlp-wolffun's full-sized avatar
😘
One heart, one love

Trung Duong trungdlp-wolffun

😘
One heart, one love
View GitHub Profile
@danielgross
danielgross / mathpix2gpt.py
Last active March 18, 2025 02:18
mathpix2gpt.py
import requests
import time
import os
import sys
import openai
import tiktoken
from termcolor import colored
openai.api_key = open(os.path.expanduser('~/.openai')).read().strip()
@corlinp
corlinp / 1brc_corlinp.go
Last active August 5, 2025 20:53
1BRC in Go - corlinp
/*
Corlin Palmer's Go solution to the 1BRC coding challenge: https://github.com/gunnarmorling/1brc
- This solution reads the file sequentially as fast as possible (reader)
- It passes off the job of ensuring that each chunk ends with a complete line to another goroutine (lineSupervisor)
- The lineSupervisor sends valid chunks to a pool of worker goroutines (worker) which parse the data and calculate the results
- The results from the workers are collected in a map and then sorted before printing the final results
A fair amount of optimization has been done to reduce memory allocations.