Skip to content

Instantly share code, notes, and snippets.

View WitherOrNot's full-sized avatar
🤠
yeehaw

WitherOrNot

🤠
yeehaw
View GitHub Profile
@WitherOrNot
WitherOrNot / mandelbrot.py
Created January 4, 2020 06:08
how original
from __future__ import division
import pygame
import sys
import os
pygame.init()
scr = pygame.display.set_mode((200,200))
psx = -2
psy = -2
@WitherOrNot
WitherOrNot / burning_ship.py
Last active January 4, 2020 06:11
+4 chars = totally new fractal apparently
from __future__ import division
import pygame
import sys
import os
import math
pygame.init()
scr = pygame.display.set_mode((200,200))
psx = -2
@WitherOrNot
WitherOrNot / knights_tour.py
Created January 9, 2020 19:51
somehow both super easy and really hard
import turtle
import random
t = turtle.Turtle()
s = turtle.Screen()
n = 30 # width of board, in cells, must be even
width = 10 # width of cell, in turtle units
dot_size = 0 # dot size
#!/usr/bin/env python
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
import timeit
import psutil
import proxyscrape
import requests
CHW_URL = "https://www.channel-watcher.com/supplier/520/witherornot" # Change this to your syndicate url
@WitherOrNot
WitherOrNot / adbshell.bat
Created February 4, 2020 00:58
Augmented ADB Shell for remote Android management
@echo off
cls
:a
for /f "delims=" %%i in ('adb shell pwd') do set pwd=%%i
title adbshell- %pwd%
set /p com="adbshell- %pwd% $ "
echo %com% >com.txt
goto b
:c
adb shell "%com%"
@WitherOrNot
WitherOrNot / tic_tac_toe.py
Last active February 10, 2020 12:48
Tic-Tac-Toe Python 2 Codegolf in 247 bytes
o=w=0;s=" ";b=[s]*9
while 1:
print"\n".join(["".join(b[x:x+3])for x in 0,3,6])
if w:break
h=~-input();z=b[h]==s;b[h]=[b[h],"XO"[o]][z];o=[o,2+~o][z]
for i in range(8):
e,f,g=map(int,`0x341a4a6fa990a9ee254e`[i*3:][:3]);w|=(b[e]==b[f]==b[g]!=s)
from PIL import Image, ImageChops
import sys
img = Image.open(sys.argv[1]).convert("RGB")
w, h = img.size
out = Image.new("RGB", (w, h))
def f(x, y):
return ((2*x+y) % w, (x+y) % h)

Keybase proof

I hereby claim:

  • I am witherornot on github.
  • I am witherornot (https://keybase.io/witherornot) on keybase.
  • I have a public key whose fingerprint is 5378 364C 6FD6 1144 9D6E 7764 19F9 47B0 EFCC E2B6

To claim this, I am signing this object:

@WitherOrNot
WitherOrNot / img2desmos.py
Created June 26, 2020 03:57
Convert image to desmos graph
import numpy as np
import cv2
import matplotlib.pyplot as plt
import code
import time
import sys
from fractions import Fraction
SKIP = 8 if len(sys.argv) <= 3 else int(sys.argv[3])
@WitherOrNot
WitherOrNot / boolean.lark
Last active August 30, 2020 17:43
Truth Table Generator
?start: arrow
?arrow: operator
| arrow "->" operator -> conditional
| arrow "<>" operator -> biconditional
?operator: atom
| operator "^" atom -> conjunction
| operator "v" atom -> disjunction