Skip to content

Instantly share code, notes, and snippets.

View imaurer's full-sized avatar

Ian Maurer imaurer

View GitHub Profile
@imaurer
imaurer / us_zips.csv
Created January 6, 2024 23:17 — forked from Tucker-Eric/us_zips.csv
US Zip Codes
We can't make this file beautiful and searchable because it's too large.
zip,city,state,state_abbr,county,count_code,latitude,longitude
99553,Akutan,Alaska,AK,Aleutians East,13,54.143,-165.7854
99571,Cold Bay,Alaska,AK,Aleutians East,13,55.1858,-162.7211
99583,False Pass,Alaska,AK,Aleutians East,13,54.841,-163.4368
99612,King Cove,Alaska,AK,Aleutians East,13,55.0628,-162.3056
99661,Sand Point,Alaska,AK,Aleutians East,13,55.3192,-160.4914
99546,Adak,Alaska,AK,Aleutians West,16,51.88,-176.6581
99547,Atka,Alaska,AK,Aleutians West,16,52.1224,-174.4301
99591,Saint George Island,Alaska,AK,Aleutians West,16,56.5944,-169.6186
99638,Nikolski,Alaska,AK,Aleutians West,16,52.9883,-168.7884
@imaurer
imaurer / us_zips.csv
Created January 6, 2024 23:17 — forked from Tucker-Eric/us_zips.csv
US Zip Codes
We can't make this file beautiful and searchable because it's too large.
zip,city,state,state_abbr,county,count_code,latitude,longitude
99553,Akutan,Alaska,AK,Aleutians East,13,54.143,-165.7854
99571,Cold Bay,Alaska,AK,Aleutians East,13,55.1858,-162.7211
99583,False Pass,Alaska,AK,Aleutians East,13,54.841,-163.4368
99612,King Cove,Alaska,AK,Aleutians East,13,55.0628,-162.3056
99661,Sand Point,Alaska,AK,Aleutians East,13,55.3192,-160.4914
99546,Adak,Alaska,AK,Aleutians West,16,51.88,-176.6581
99547,Atka,Alaska,AK,Aleutians West,16,52.1224,-174.4301
99591,Saint George Island,Alaska,AK,Aleutians West,16,56.5944,-169.6186
99638,Nikolski,Alaska,AK,Aleutians West,16,52.9883,-168.7884
@imaurer
imaurer / error.txt
Created August 15, 2023 15:51
Install llama-cpp-python Error on M1
% CMAKE_ARGS='-DLLAMA_METAL=on' FORCE_CMAKE=1 \
llm install llama-cpp-python --force-reinstall --upgrade --no-cache-dir
Collecting llama-cpp-python
Downloading llama_cpp_python-0.1.77.tar.gz (1.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 4.4 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting typing-extensions>=4.5.0 (from llama-cpp-python)
Obtaining dependency information for typing-extensions>=4.5.0 from https://files.pythonhosted.org/packages/ec/6b/63cc3df74987c36fe26157ee12e09e8f9db4de771e0f3404263117e75b95/typing_extensions-4.7.1-py3-none-any.whl.metadata
"""coalesce_parquets.py
gist of how to coalesce small row groups into larger row groups.
Solves the problem described in https://issues.apache.org/jira/browse/PARQUET-1115
"""
from __future__ import annotations
from pathlib import Path
from typing import Callable, Iterable, TypeVar
@imaurer
imaurer / char_ratios.py
Created October 29, 2019 13:32
Relative Widths of Non-Fixed-Width Font Example from Stack Overflow
{'a': 60,
'b': 60,
'c': 52,
'd': 60,
'e': 60,
'f': 30,
'g': 60,
'h': 60,
'i': 25,
'j': 25,