Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am ehmo on github.
  • I am rasty (https://keybase.io/rasty) on keybase.
  • I have a public key whose fingerprint is 8CA4 FD95 DD41 76CA 777D 7C2E 0B0D 7059 1277 75B0

To claim this, I am signing this object:

CREATE TEMP TABLE IF NOT EXISTS countries (
id bigint primary key,
iso text NOT NULL,
name text NOT NULL,
nicename text NOT NULL,
iso3 text DEFAULT NULL,
numcode int DEFAULT NULL,
phonecode int NOT NULL
);
with countries as (select * from (values(1, 'AF', 'AFGHANISTAN', 'Afghanistan', 'AFG', 4, 93),
(2, 'AL', 'ALBANIA', 'Albania', 'ALB', 8, 355),
(3, 'DZ', 'ALGERIA', 'Algeria', 'DZA', 12, 213),
(4, 'AS', 'AMERICAN SAMOA', 'American Samoa', 'ASM', 16, 1684),
(5, 'AD', 'ANDORRA', 'Andorra', 'AND', 20, 376),
(6, 'AO', 'ANGOLA', 'Angola', 'AGO', 24, 244),
(7, 'AI', 'ANGUILLA', 'Anguilla', 'AIA', 660, 1264),
(8, 'AQ', 'ANTARCTICA', 'Antarctica', NULL, NULL, 0),
(9, 'AG', 'ANTIGUA AND BARBUDA', 'Antigua and Barbuda', 'ATG', 28, 1268),
(10, 'AR', 'ARGENTINA', 'Argentina', 'ARG', 32, 54),
@ehmo
ehmo / pipe.py
Last active August 20, 2021 23:25
from PIL import Image
import imagehash
import copy
import time
def change_pixel(img, pix, position, color):
if img.mode == '1':
value = int(color >= 127) # Black-and-white (1-bit)
elif img.mode == 'L':