Skip to content

Instantly share code, notes, and snippets.

View sjshuck's full-sized avatar

Steve Shuck sjshuck

  • KeyBank
  • Cleveland, Ohio
View GitHub Profile
@sjshuck
sjshuck / maps.xml
Last active January 20, 2024 02:32
XML is so...powerful 😒
<!-- Each entry is a child, which has a key child and a val child -->
<map>
<entry>
<key>foo</key>
<val>bar</val>
</entry>
<entry>
<key>baz</key>
<val>qux</val>
</entry>
@sjshuck
sjshuck / Trie.hs
Created May 3, 2024 18:45
Trie in Haskell, using lens
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
module Data.Trie (
Trie,
singleton,
insert,
delete,
@sjshuck
sjshuck / astinkio.py
Created February 15, 2025 16:04
Async vs sync inner function closure behavior in Python
import asyncio
from concurrent.futures import Future, ThreadPoolExecutor
import time
def sync_main() -> None:
futures = list[Future[int]]()
with ThreadPoolExecutor() as xtor:
for outer_n in [4, 3, 2, 1]: