Skip to content

Instantly share code, notes, and snippets.

View crackwitz's full-sized avatar

Christoph Rackwitz crackwitz

  • Aachen, Germany
  • 10:18 (UTC +02:00)
View GitHub Profile
@crackwitz
crackwitz / towns-1M.js
Last active August 1, 2026 19:36
some world data (Unicode: all Planes, all Blocks, some characters; Geography: towns >1M)
// World cities with 1M+ inhabitants, one line per row.
// https://en.wikipedia.org/w/index.php?title=List_of_cities_with_over_1_million_inhabitants&action=raw
// Fields: town, population (as rendered on the page), country, continent.
// NOTE: London and Birmingham populations come from Wikipedia's
// {{UK subdivision population}} template (GSS E12000007 / E08000025).
// https://en.wikipedia.org/w/index.php?title=Template:UK_subdivision_population&action=raw
const townsOver1M = [
{ town: "Shanghai", population: "21,909,814", country: "China", continent: "Asia" },
{ town: "Delhi", population: "20,591,874", country: "India", continent: "Asia" },
{ town: "Karachi", population: "20,382,881", country: "Pakistan", continent: "Asia" },
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@crackwitz
crackwitz / expand.js
Created April 14, 2025 23:48 — forked from CodeZombie/expand.js
Expand All Images in 4chan Thread Greasemonkey Extension
// ==UserScript==
// @name Expand All Images
// @namespace zombiearmy.expandimage
// @description Expand all images in a 4chan thread
// @match *://boards.4chan.org/*
// @match *://boards.4channel.org/*
// @version 2
// @grant none
// ==/UserScript==
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@crackwitz
crackwitz / pystartup.py
Last active September 2, 2022 04:19
"imshow" shim for jupyter notebooks, kinda like google colab's cv_imshow
try:
# https://stackoverflow.com/questions/15411967/how-can-i-check-if-code-is-executed-in-the-ipython-notebook
get_ipython() # ipython/jupyter context?
from PIL import Image
from IPython.display import display # takes a while...
# IPython.display.clear_output(wait=True)
from matplotlib import pyplot as plt
def imshow(im):
if len(im.shape) == 3:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.