Skip to content

Instantly share code, notes, and snippets.

View fasiha's full-sized avatar
💭
🐦‍🔥

Ahmed Fasih fasiha

💭
🐦‍🔥
View GitHub Profile

The Indigenous Critique is a term popularized by Graeber and Wengrow’s The Dawn of Everything and it will blow your mind if you, like me, were raised in a Eurocentric universe.

In a nutshell, through the 1600s and 1700s, trenchant critiques of European society by numerous Indigenous statesmen and orators in North America were carried back to Europe, where they caused a sensation. To many Indigenous nations, the European way of life—rapacious, uncharitable, servile—was incomprehensible and obviously inferior to those Indigenous societies where starving people were invariably fed and adopted into family networks, and where no leader could tell a free human what to do let alone some military captain or priest. We have multiple independent examples of this and an oration by Kandiaronk, a famous Wendat statesman, has come down to us, and it is utterly brilliant: Barbara Mann titled her chapter translation, “‘Are you delusional?’ Kandiaronk on Christianity“ (more below).

The reason this Indigenous Critique is c

@fasiha
fasiha / analyze.py
Created March 12, 2025 06:33
Comparing US stonks ($VTI) and World ex-US ($ACWX) for a couple of months before and after the start of 2025 like the FT article. Code assumes Yahoo! Finance CSV files are available.
import pandas as pd
import numpy as np
import pylab as plt
from pandas.tseries.offsets import MonthEnd
plt.style.use('ggplot')
plt.ion()
# Load the datasets
us_data = pd.read_csv('vti.txt.csv', parse_dates=['Date'], index_col='Date')
@fasiha
fasiha / workQueue.ts
Last active June 13, 2024 05:02
Node.js, very simple work queue
export type Task = () => Promise<void>;
export function addTask(doTask: Task) {
TASKS.push(doTask);
kickOffWorkers(MAX_WORKERS);
}
const TASKS: Task[] = [];
const workerPool: number[] = []; // "number" but really doesn't matter, this is just to keep track of how many parallel workers we already have
const MAX_WORKERS = 3;
@fasiha
fasiha / so.py
Last active January 19, 2024 23:30
Fitting my Stack Overflow points history to specific sections of time. Growth from early 2020 to mid-2021 was solid, slowed by 30-ish percent by mid-2022, then dropped 50% since mid-2022 till now (early 2024). See https://octodon.social/@22/111682452808811056
import numpy as np
from datetime import datetime, timedelta
import pylab as plt
from numpy.polynomial import Polynomial
plt.style.use("ggplot")
plt.ion()
# this is the min/max points in my line chart on my profile page
rawMin = 4.9e3
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
plt.ion()
# URL for the data
url = "https://data.bls.gov/timeseries/JTS510000000000000LDL"
# Creating a date range from 2001 to 2023
@fasiha
fasiha / reddit.md
Last active January 5, 2024 20:19
"[OC] 2020 electoral map if only ____ voted. Breakdown by each major demographics." mirror
@fasiha
fasiha / fftUpsample.py
Created September 7, 2023 05:56
Demo code on how to use FFT to sinc-interpolate (upsample). (You probably should just use scipy.signal.resample which will filter and window the signal to avoid the ringing that this FFT-only method invariably yields, unless you know what you're doing.)
import numpy as np
from numpy.fft import fft, ifft
def fftUpsample(a, factor):
a_f = fft(a)
n = len(a)
assert n % 2 == 0, "odd case is harder"
padded = np.zeros(int(len(a) * factor), dtype=a_f.dtype)
padded[:n // 2 + 1] = a_f[:n // 2 + 1]
@fasiha
fasiha / exif.md
Created August 12, 2023 12:37
Exif and Artwork Content Description example
@fasiha
fasiha / horimiya.csv
Last active August 23, 2023 04:46
Onomatopoeia in Horimiya (Yen Press, Taylor Engel (translator) and Alexis Eckerman (letterer)). See https://octodon.social/@22/110658625756122629
Volume Page Kana Transcript Translation Note See also JMDict
1 7 ハンッ Han clap hands
7 カリ kari scrit pencil on paper
8 ほすん posun paff placing eraser in someone’s hand
8 とぼ tobo plod walking steps とぼとぼ
9 パァァ paaaa beam smile
10 バンッ ban wham door closing ? バンバン
10 きゅ kyu clip hair clip closing きゅっと
10 ザッ za shhk vacuum attachment attaching? ザーザー
10 ズゴゴゴオオオ zupogogoooo vreeeen vacuuming
Single Women Single Men Men/Women (%)
Average annual expenditures $36,061 $38,748 107.5%
Food 4,299 4,871 113.3%
Food at home 2,557 2,447 95.7%
Cereals and bakery products 322 288 89.4%
Cereals and cereal products 89 86 96.6%
Bakery products 233 202 86.7%
Meats, poultry, fish, and eggs 468 528 112.8%
Beef 110 135 122.7%