Skip to content

Instantly share code, notes, and snippets.

Avatar

Nicolas Seriot nst

View GitHub Profile
View lines_2.py
#!/usr/bin/env python3
# 2021-10-09
# Emilien & Nicolas Seriot
# https://seriot.ch/visualization/lines_2.png
import cairo
import random
WIDTH = 800
HEIGHT = 600
View lines_1.py
#!/usr/bin/env python3
# 2021-10-09
# Emilien & Nicolas Seriot
# https://seriot.ch/visualization/lines_1.png
import cairo
import random
WIDTH = 800
HEIGHT = 600
View iso7.py
# Nicolas Seriot
# 2021-09-24
#
# https://gist.github.com/nst/1cfb01d0b78993f7ffe2df7c101b586c
# Thread: https://twitter.com/nst021/status/1437889678947110912
# Typical output: https://seriot.ch/visualization/iso7.gif
import cairo
import random
import numpy as np
View kaa.py
#!/usr/bin/env python3
# Nicolas Seriot
# 2021-09-22
# https://gist.github.com/nst/6703da0b26f796fd2429310c7dda13cf
# - Upload some local directoy contents to a remote FTP directory.
# - Upload only files modified since last upload.
# - Touch a local file to remember timestamp of last upload.
# - Plays well with Mowgli https://github.com/nst/Mowgli
# - Eg. python3 mowgli.py -m && python3 kaa.py
View iso6.py
# Nicolas Seriot
# 2021-09-19
# https://gist.github.com/nst/070dda2056925eec07446c5f3f3c67df
# Thread: https://twitter.com/nst021/status/1437889678947110912
# Typical output: https://seriot.ch/visualization/iso6.gif
import cairo
import random
import numpy as np
View iso5.py
# Nicolas Seriot
# 2021-09-19
# https://gist.github.com/nst/032a61feb1fc60a74e13d2ea994763c0
# Thread: https://twitter.com/nst021/status/1437889678947110912
# Typical output: https://seriot.ch/visualization/iso5.gif
import cairo
import random
import numpy as np
View iso4.py
# Nicolas Seriot
# 2021-09-17
# 2021-09-18
# https://gist.github.com/nst/032a61feb1fc60a74e13d2ea994763c0
# Thread: https://twitter.com/nst021/status/1437889678947110912
# Typical output: https://seriot.ch/visualization/iso4.png
import cairo
import random
import numpy as np
View iso3.py
# Nicolas Seriot
# 2021-09-16
# Thread: https://twitter.com/nst021/status/1437889678947110912
# Typical output: https://seriot.ch/visualization/iso3.png
import cairo
import random
import numpy as np
MARGIN = 50
View iso.py
# Nicolas Seriot
# 2021-09-16
# Isometric Towers
# Reimplementation of @bendotk art
# https://twitter.com/nst021/status/1437889678947110912
# Typical output: https://seriot.ch/visualization/iso.png
import cairo
import random
View maze.py
import cairo
import random
import sys
# Nicolas Seriot
# 2020-12
# http://seriot.ch/temp/maze.png
def draw(img, c, r):
img.move_to(c,r)