Skip to content

Instantly share code, notes, and snippets.

View sorokine's full-sized avatar

Alexandre Sorokine sorokine

  • ORNL
  • Tennessee
  • 03:23 (UTC -04:00)
  • X @sorokine
View GitHub Profile
@Maxxen
Maxxen / app.py
Last active April 9, 2026 22:23
DuckDB Vector Tile Serve w/ Flask + MapLibre
import duckdb
import flask
# Initialize Flask app
app = flask.Flask(__name__)
# Setup a global DuckDB connection with spatial extension loaded
# Connect to a persistent database file with the geometry data
config = {"allow_unsigned_extensions": "true"}
con = duckdb.connect("tiles.db", True, config)
@dantonnoriega
dantonnoriega / us-state-ansi-fips.csv
Last active July 11, 2025 19:02
csv file of us state ansi fips codes that follows the us census variable names
stname st stusps
Alabama 01 AL
Alaska 02 AK
Arizona 04 AZ
Arkansas 05 AR
California 06 CA
Colorado 08 CO
Connecticut 09 CT
Delaware 10 DE
District of Columbia 11 DC
@joyrexus
joyrexus / README.md
Last active May 4, 2026 11:41
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@yrevar
yrevar / imagenet1000_clsidx_to_labels.txt
Last active April 21, 2026 22:40
text: imagenet 1000 class idx to human readable labels (Fox, E., & Guestrin, C. (n.d.). Coursera Machine Learning Specialization.)
{0: 'tench, Tinca tinca',
1: 'goldfish, Carassius auratus',
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias',
3: 'tiger shark, Galeocerdo cuvieri',
4: 'hammerhead, hammerhead shark',
5: 'electric ray, crampfish, numbfish, torpedo',
6: 'stingray',
7: 'cock',
8: 'hen',
9: 'ostrich, Struthio camelus',
@vasanthk
vasanthk / System Design.md
Last active May 24, 2026 22:55
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
Byobu is a suite of enhancements to tmux, as a command line
tool providing live system status, dynamic window management,
and some convenient keybindings:
F1 * Used by X11 *
Shift-F1 Display this help
F2 Create a new window
Shift-F2 Create a horizontal split
Ctrl-F2 Create a vertical split
Ctrl-Shift-F2 Create a new session
@chrismdp
chrismdp / s3.sh
Last active May 5, 2026 04:47
Uploading to S3 in 18 lines of Shell (used to upload builds for http://soltrader.net)
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1
@kalxas
kalxas / data-gov-csw-howto.rst
Last active October 25, 2022 14:23
Data.gov CSW HowTo
id,name,amount
109,"building",1456894
164,"house",1383613
7,"Shopping and services",839415
17,"store / shop",831628
203,"school",676869
4,"dining and leisure",671035
74,"restaurant",385073
194,"park",283545
163,"sport venue",274433