Skip to content

Instantly share code, notes, and snippets.

View arlyon's full-sized avatar

Alexander Lyon arlyon

View GitHub Profile
@arlyon
arlyon / link.log
Created November 7, 2022 11:28
pytorch linkers
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Config",
"description": "The configuration for the developer desktop tool",
"type": "object",
"required": [
"services",
"tunnels"
],
"properties": {
from itertools import cycle
from multiprocessing.pool import ThreadPool
from sys import stdout
from subprocess import run
from time import sleep
SPINNER = cycle(["⠁", "⠂", "⠄", "⡀", "⢀", "⠠", "⠐", "⠈"])
DOCKER_IMAGES = ("arlyon/workout-server", "arlyon/workout-learn")
@arlyon
arlyon / data.json
Created February 26, 2020 02:04
My File
My gist

Keybase proof

I hereby claim:

  • I am arlyon on github.
  • I am arlyon (https://keybase.io/arlyon) on keybase.
  • I have a public key ASAwNx3NPni-9iw8DsEhh8kMQaITBeismmniJmyAUL6GFwo

To claim this, I am signing this object:

@arlyon
arlyon / machine.yaml
Last active April 27, 2019 15:08
TM™
input: '11111'
blank: ' '
start state: mark1
table:
mark1:
1 : {write: ' ', R: fork}
' ' : {L: q5}
fork:
# if there is a one, mark it, if not fork
1 : {write: ' ', R: moveR1}
@arlyon
arlyon / grammar_ambiguity_evaluator.py
Last active February 7, 2019 14:44
Evaluates whether a given set of rewrite rules is ambiguous after X steps.
from collections import Counter
from itertools import product, chain
rules = {"S": [("a", "S", "a"), ("a", "S", "b", "S", "a"), ()]}
rules_two = {"S": [("aa", "S", "b"), ("ab", "S", "b", "S"), ()]}
start = ("S",)
@arlyon
arlyon / rps.py
Last active August 21, 2020 12:15
Simple extensible rock paper scissors.
from random import choice
logic = {
"rock": ["scissors"],
"paper": ["rock"],
"scissors": ["paper"]
}
choices = list(logic.keys())
def round(human, computer):

Keybase proof

I hereby claim:

  • I am arlyon on github.
  • I am arlyon (https://keybase.io/arlyon) on keybase.
  • I have a public key ASDfS3ookFE6go0WHnhKzG2rUNT0RdmQfBXf1Nk1mrbH5go

To claim this, I am signing this object:

@arlyon
arlyon / fizzbuzz.py
Created May 3, 2018 17:56
Infinite Legible Fizzbuzz
from itertools import count; [print("fizz" * (not x % 3) + "buzz" * (not x % 5) or x) for x in count(1)]