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 / synthesis.py
Last active June 9, 2021 14:35
A number synthesizer
suffixes = ["", "thousand", "million", "billion", "trillion", "quadrillion", "quintillion", "sextillion", "septillion", "octillion", "nonillion", "decillion", "undecillion", "duodecillion", "tredecillion", "quatturodecillion", "quindecillion", "sexdecillion", "septendecillion", "octodecillion", "novemdecillion", "vingtillion"]
numbers = ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"]
teens = ["ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"]
tens = ["zero", "ten", "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"]
def synth2(n):
if n == 0:
return ""
elif n < 10:
return numbers[n]
"""
Use like: python circuitgen.py /12/3
or whatever generations rule you want to use
"""
import sys
transitions = {
"0": "00000000",
"1c": "01000000", "1e": "10000000",
@EZLiang
EZLiang / gen2wire.py
Last active January 6, 2020 21:10
A circuit rule generator from any generations rule
transitions = {
"0": "00000000",
"1c": "01000000", "1e": "10000000",
"2c": "01010000", "2e": "10100000", "2k": "10010000", "2a": "11000000", "2i": "10001000", "2n": "01000100",
"3c": "01010100", "3e": "10101000", "3k": "10100100", "3a": "11100000", "3i": "01110000", "3n": "11010000", "3y": "10010100", "3q": "11000100", "3j": "11000010", "3r": "11001000",
"4c": "01010101", "4e": "10101010", "4k": "11010010", "4a": "11110000", "4i": "11011000", "4n": "11000101", "4y": "11010100", "4q": "11100100", "4j": "11010100", "4r": "11101000", "4t": "11001001", "4w": "11011000", "4z": "11001100",
"5c": "10101011", "5e": "11010101", "5k": "11010110", "5a": "11110001", "5i": "11111000", "5n": "11101001", "5y": "11011010", "5q": "11101100", "5j": "11110100", "5r": "11011100",
"6c": "11111010", "6e": "11110101", "6k": "10111101", "6a": "11111100", "6i": "11011101", "6n": "11101110",
"7c": "11111110", "7e": "01111111",
"8": "11111111"
@EZLiang
EZLiang / Transistoric.ruel
Created December 14, 2019 21:30
Transistoric
@NUTSHELL Transistoric
0: dead
1: wire
2: tail
3: head
4: splitter
5: splitter tail
6: splitter head
7: {Ng} semiconductor N
8: semiconductor N tail
@EZLiang
EZLiang / MyRuleTablesAndRuelTabels.md
Last active December 15, 2019 02:01
My rule tables and ruel tabels

My rule tables and ruel tabels(Nutshell)

  • threeswitchlife: three life states switch between each other.
  • disamb_template: a template for making 'disambiguation rules', a class of three-state rules.
  • Transistoric: a circuit rule with semiconductors.

Nutshell GitHub repository
Nutshell online

@EZLiang
EZLiang / parentheses_checker.py
Last active December 14, 2019 22:57
Python3 Parentheses Checker
def cremove(s):
while "()" in s:
s = s.replace("()", "")
return not s
def checkp(s):
if len(s) % 2:
return False
return cremove(s)