Skip to content

Instantly share code, notes, and snippets.

View yunruse's full-sized avatar
don't forget to drink some water!

Mia yun Ruse yunruse

don't forget to drink some water!
View GitHub Profile
@yunruse
yunruse / byelection.py
Last active December 7, 2021 00:40
UK by-election analysis
'''
UK by-election analysis by Mia yun Ruse. Public domain.
As seen on:
https://commons.wikimedia.org/wiki/File:UK_By-elections.png
https://en.wikipedia.org/wiki/List_of_United_Kingdom_by-elections_(2010–present)
Data is sourced from:
https://www.parliament.uk/about/how/elections-and-voting/by-elections/
@yunruse
yunruse / roll.py
Created March 1, 2021 23:18
A quick DnD-style dice roller
'''
A quick DnD-style dice roller by Mia yun Ruse.
(Public domain, because it's hardly inventing the wheel.)
Allows for expressions such as:
> 5d0
> 5:d2*10+3; 2d20
23, 13, 13, 13, 13, 24
@yunruse
yunruse / pxd_phase.py
Created December 23, 2020 12:30
A hacky script to modify graph locations in Pixelmator
import os
from pathlib import Path
import struct
import sqlite3
HEIGHT = 2400
X_PER_GPA = 5
X_START = {
'CH5_naumova_P_1': 450,
'CH6_P212121': 450,
@yunruse
yunruse / minkowski.py
Created October 9, 2018 09:42
2D Minkowski animation showing Lorentz transformation
'''Minkowski 2D space-time animation showing Lorentz boost.
Requires Python 3.7, numpy and matplotlib, and an ffmpeg binary in your PATH.'''
import math
import numpy as np
import matplotlib
import matplotlib.animation as anim
from matplotlib import pyplot as plot
@yunruse
yunruse / AutoLootBase.ws
Last active June 21, 2016 09:11
Better AutoLoot
// AutoLoot main file
function AL_CanLegallyTake( container : W3Container ) : bool
{
if( container.disableStealing || container.HasQuestItem() ||
(W3Herb)container || (W3ActorRemains)container )
return true;
else
return false;
}