Skip to content

Instantly share code, notes, and snippets.

View jpignata's full-sized avatar

John Pignata jpignata

View GitHub Profile
@jpignata
jpignata / solve.py
Last active December 21, 2022 18:55
import sys
from operator import add, mul, sub, truediv
from re import split
from sympy import solve as sympy_solve
from sympy.abc import x
def solve():
monkeys = {}
#!/usr/bin/env python3
from random import shuffle
from sys import argv
from typing import Iterator, List, Tuple
def pairs(names: List[str], default: str) -> Iterator[Tuple[str, str]]:
names = names.copy()
#!/usr/bin/env python3
from random import shuffle
from sys import argv
from typing import Iterator, List, Tuple
def pairs(names: List[str], default: str) -> Iterator[Tuple[str, str]]:
names = names.copy()
require 'fastlane/action'
require_relative '../helper/git'
require_relative '../helper/changelog/document'
module Fastlane
module Actions
class BuildChangelogAction < Action
def self.run(params)
version = params[:version]
commits = params[:commits]
class Version
module Symbol
POSITIVE_INTEGER = 0
ZERO = 1
LETTER = 2
DOT = 3
DASH = 4
PLUS = 5
UNKNOWN = 99
chars = [chr(i) for i in range(32, 127)]
for line in range(1, 9):
for col in range(72):
char = chars[(line + col) % len(chars)]
print(char, end='')
print()
/*
*
* $Id smurf.c,v 4.0 1997/10/11 13:02:42 EST tfreak Exp $
*
* spoofs icmp packets from a host to various broadcast addresses resulting
* in multiple replies to that host from a single packet.
*
* mad head to:
* nyt, soldier, autopsy, legendnet, #c0de, irq for being my guinea pig,
* MissSatan for swallowing, napster for pimping my sister, the guy that
@jpignata
jpignata / automaton.py
Last active June 12, 2020 12:48
Elementary Cellular Automata
from itertools import product
from os import popen
from random import choice
from sys import argv, stdout
from time import sleep
# Utility function to generate a sequence of characters of the given length for
# each character in a given string. For example, given "hello world" and a
# length of 3, it will generate a sequence starting with "hel", "ell", "llo".
import os
import sys
import time
RULES = {'111': '0', '010': '0', '101': '0', '000': '0',
'100': '1', '011': '1', '110': '1', '001': '1'}
def draw(state):
def window(state, length=3):
#!/usr/bin/env python3
from random import shuffle
from sys import argv
from typing import Iterator, List, Tuple
DEFAULT_REVIEWER = 'JP'
def pairs(names: List[str], default: str) -> Iterator[Tuple[str, str]]: