Skip to content

Instantly share code, notes, and snippets.

View EZLiang's full-sized avatar
🦆
having fun

EZLiang

🦆
having fun
View GitHub Profile
@EZLiang
EZLiang / COVID-19.py
Created March 29, 2020 18:24
COVID-19 simulator
import numpy, scipy.integrate, matplotlib.pyplot
pop = 300000000.0
recovery = 0.2
badreco = 0.005
death = 0.001
contact = 0.3
sick = 30000.0
import discord
client = discord.Client()
@client.event
async def on_message(msg):
if msg.author == client.user:
return
elif client.user in msg.mentions:
@EZLiang
EZLiang / tabulate.py
Last active March 3, 2021 14:23
Vote tabulator for POTY 2020
import re, json
names = ["Beehive push catalyst", "Natural loafers", "34-bit still life enumeration", "c/61 near-spaceship", "p9 heavyweight emulator", "p5 lightweight emulator/catalyst", "New c/5 diagonal spaceships", "New growing spaceships", "New longest 16x16 methuselah", "New c/10 orthgonal technology", "Better universal regulator", "19-bit still life syntheses", "c/5 and c/6 guns", "Cheaper universal construction", "Width-12 c/6 orthogonal spaceship", "New small Corderships", "p10 glider shuttle", "New agar technology", "Speed Demonoid", "LoM hasslers", "New c/6 diagonal pushalong", "New 2c/7 technology", "4×N block agar construction", "Rob's p16", "Loafer bitmap printer", "Cordercolumn", "Stable L122", "Stable barge-crosser", "Small c/5 diagonal puffer", "New grayship technology", "Glider syntheses from Glider_stdin", "New XWSS signal technology", "Silverfish", "Bandersnatch", "Spaceship eaters and spaceship-to-G converters", "Record-setting diehards", "Smaller 3c/7 spaceships", "p28 gun", "Spaceship
@EZLiang
EZLiang / obfuscate.py
Created March 6, 2021 01:27
Obfuscated Python code
NOTHING = lambda: None
def IF(condition, yes, no=NOTHING):
if condition:
return yes()
else:
return no()
def ITERATE(iterable, fun):
for i in iterable:
@EZLiang
EZLiang / ezlife.md
Last active September 19, 2021 17:14
ezlife pattern collection

EZLife

A collection of sparkers not found (I think) in other collections

Credits

  • p4.rle: All Scorbie, except for the hw emulator whose stator has a mango, which is by Sokwe
  • p5.rle: Scorbie, except for the three-dot sparker partially by A for Awesome
  • p7.rle: Collected by Sokwe, credits can be found here: https://www.conwaylife.com/forums/viewtopic.php?f=2&t=1437&p=58533#p58533. The added pipsquirter is by Scorbie, and the other added sparker is by Extrementhusiast. Also, the big sparker is wwei

Notes

  • p4.rle: The emulator components can be mixed-and-matched, several samples shown
@EZLiang
EZLiang / regex.md
Last active January 21, 2022 14:30
Regex

Regex

is a very simple esoteric programming language.

The program is of the form

c/filter/flags/halt/flags2 comments

Note that /s in c must be escaped, and special chars in /filter/flags and /halt/flags2 must be escaped, as they are regular expressions and subject to their rules. Flags are case insensitive. Supported flags:

  • n - also consider non-printable characters (if on for any is automatically on for the other)
  • i - case-insensitive