Skip to content

Instantly share code, notes, and snippets.

View Xevion's full-sized avatar
⚜️
Chaos Order

Xevion Xevion

⚜️
Chaos Order
View GitHub Profile
import RPi.GPIO as GPIO
import time
buzzerpin = 4 # pin the PWM Signal will run on, separate from GND / VCC
start_epoch = time.time()
# Sets up the GPIO and PWM frequency stuff
def setup():
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
https://github.com/rm-hull/luma.led_matrix/issues/76
https://github.com/rm-hull/luma.led_matrix/issues/150
https://github.com/rm-hull/luma.led_matrix/issues?q=is%3Aissue+is%3Aclosed
https://cdn.discordapp.com/attachments/231528087135715328/588219439351070749/74HC595-Shift-Register-Working.gif
https://numbermonk.com/hexadecimal/32/en
import os, sys, string, pprint
pp = pprint.PrettyPrinter()
# Display large wordlist in nice format
def display(split=10):
data = '\n'.join([' '.join(data[i * split:min((i * split) + split, len(data))]) for i in range(int(len(data) / split)+1)])
# OWL 3 Wordlist
"""
import re
path = os.path.join(sys.path[0], 'OWL3.txt')
AJI EST LUN OMA SAN TIZ
CAF FAH MAM OOF SEV TUM
CAL FOO MEH OPA SEZ UMS
CUZ GIF MES ORG SHO UNI
DAS GIS MMM OWT SIG VIN
DEP GRR MOI PAK SOC VOG
DOH HOM MUX PHO SOH WUZ
DUM HOO NAV POS SUS XED
ECO LAH NUG REZ TEC YAS
EEW LOR OCH ROO TES YER
This file has been truncated, but you can view the full file.
aa
aah
aahed
aahing
aahs
aal
aalii
aaliis
aals
aardvark
import requests, os, sys
def flatten(thing):
final = []
for item in thing:
final.extend(flatten(item)) if type(item) == list else final.append(item)
return final
nums = "0123456789"
filename = "2619{}"
@Xevion
Xevion / quicksortfail.py
Last active July 2, 2019 20:54
failing quicksort of mine
import random
import random
generate = lambda length=10, min=0, max=100 : [random.randint(min, max) for _ in range(length)]
def verify(original):
array = list(original)
array.sort()
return array == original
import random
generate = lambda length=10, min=0, max=100 : [random.randint(min, max) for _ in range(length)]
# Quicksort, recur parameter is just for debug purposes
def quicksort(array, recur=0):
# Prints out the array's current statet in a readable format
def repr():
temp = list(map(str, array))
if lm == rm:
import random
generate = lambda length=10, min=0, max=100 : [random.randint(min, max) for _ in range(length)]
# Quicksort, recur parameter is just for debug purposes
def quicksort(array, recur=0):
# Prints out the array's current statet in a readable format
def repr():
temp = list(map(str, array))
if lm == rm:
import random
generate = lambda length=10, min=0, max=100 : [random.randint(min, max) for _ in range(length)]
def partition(array, start, end):
def swap(x, y):
array[x], array[y] = array[y], array[x]
pivotIndex = start
pivotValue = array[end]
for i in range(start, end + 1):