This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this is untested | |
from functools import wraps | |
from itertools import chain | |
def autoassign(init_method): # decorator | |
""" | |
@autoassign | |
def __init__(self, a: int, b: float): | |
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"settings": { | |
"depth": 3 | |
}, | |
"objects": [ | |
{ | |
"type": "quad", | |
"translate": [ 1, 0, 1 ], | |
"scale": [ 2, 2, 1 ], | |
"rotate": [ 0, 1, 0, -90 ], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if ! test "$(whoami)" = "root"; then | |
echo "You're not running this as root" | |
exit 1 | |
fi | |
INSTALL="apt-get install -y" | |
if type -P dnf >/dev/null 2>/dev/null; then INSTALL="dnf -y install"; fi | |
if type -P pacman >/dev/null 2>/dev/null; then INSTALL="pacman -S"; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# TODO: imports, test, m.d.conf and m.d.sync | |
#from nmigen import * | |
#from nmigen.cli import main | |
# helpers: | |
DgModule = subclass Module where | |
If = cond body_func ~> | |
with @@If cond => body_func! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!usr/bin/env bash | |
if ! command -v micro >/dev/null; then | |
if test -s ~/.local/bin/micro; then | |
echo "micro is instaled, but not in PATH, concider loggin out and in" | |
exit 1 | |
fi | |
cd ~ | |
mkdir -p .local/bin | |
cd .local/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PPM, sys, hashlib, warnings | |
warnings.filterwarnings("ignore")#disables the futurewarnings from numpy, bad practice! | |
if len(sys.argv) < 2: | |
print "error, no ppm filepath provided" | |
sys.exit(1) | |
flip = PPM.PPM().ReadFile(sys.argv[1], ReadFrames=False, ReadSound=True) | |
if not flip.SoundData[0]: | |
print "No BGM" | |
else: | |
print hashlib.md5(flip.SoundData[0]).hexdigest() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#written by pbsds | |
#quick and dirty, i may add this to UGO.py in Hatenatools | |
# | |
#This converter is licensed under AGPL3 | |
#See http://www.gnu.org/licenses/agpl-3.0.html for more information | |
import sys, numpy as np, Image | |
def decode(input, output): | |
f = open(input, "rb").read() | |
len1 = np.fromstring(f[8:12], dtype=np.uint32)[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame | |
pygame.init() | |
pygame.display.set_caption("Mouse Latency Simulator - by pbsds") | |
pygame.font.init() | |
window = pygame.display.set_mode((1280, 720)) | |
font = pygame.font.Font(None, 20) | |
pygame.mouse.set_visible(False) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Image, random, math | |
#Made by pbsds/Peder Bergebakken Sundt | |
#Requires PIL to work | |
Palette = (0x0045A0,#0 - Dark water | |
0x0059BC,#1 - Water | |
0x0078F9,#2 - Shore water | |
0xFFF65E,#3 - Sand | |
0x2BE81F,#4 - Grass | |
0x26B719,#5 - Dark Grass |
NewerOlder