This module started out as an idle side project, mostly to learn Haskell but also because I'm too lazy to calculate grad/divg/curl etc myself
Suprisingly enough (to me at least), I was unable to find any module similar to this one anywhere.
qntm.org/ra scraper | |
=================== | |
Simple python script to scrape qntm.org/ra, dowloading every chapter. Requires curl or equivalent. | |
The `filtertoc` file does most of the heavy lifting. Usage: | |
$ curl http://qntm.org/ra | ./filtertoc | sh | |
This will download every chapter into a separate file, named '$chapter_number $chapter_slug.html' (the slug is the last part of the qntm.org URL) |
This module started out as an idle side project, mostly to learn Haskell but also because I'm too lazy to calculate grad/divg/curl etc myself
Suprisingly enough (to me at least), I was unable to find any module similar to this one anywhere.
#!/bin/bash | |
savedir=$1 | |
# ffmpeg -f x11grab -s 1680x1050 -r 30 -i :0.0 -f alsa -i plug:looprec -b:v 2M -qmin 0 -qmax 15 "$savedir/video+loopback.mkv" & | |
ffmpeg -f x11grab -s 1680x1050 -r 30 -i :0.0 -f alsa -i plug:looprec -c:v libx264 -preset ultrafast -qp 0 -c:a libfaac "$savedir/video+loopback.mkv" & | |
ffmpeg -f alsa -i default -c:a libfaac "$savedir/audio-micro.aac" & | |
read -n1 -p'Press any key to stop recording' | |
# Send Ctrl-C to both ffmpeg instances | |
killall -SIGINT ffmpeg |
Contains a list of each faction's scrolls, and a script to update them all.
The format used is a tab-separated table, columns are:
Card ID | Set | Name | Type | Subtype | Rarity | Cost | Attack | Countdown | Health | Trait(s) | Ability | Flavor
Run update in order to grab the latest (hopefully) scrolls data from the scrollsguide wiki.
You will need to have Python 2 as well as the python modules requests and beautiful soup installed.
def check(dpsstats): | |
dmg, AS = dpsstats | |
return { | |
"www": dmg * (AS + 3*wex), | |
"wwe": (dmg + exort) * (AS + 2*wex), | |
"wee": (dmg + 2*exort) * (AS + wex), | |
"eee": (dmg + 3*exort) * AS | |
} | |
skadi = (247, 254) |
class Quacks t where | |
quack :: t -> String | |
printQuack :: Quacks a => a -> IO () | |
printQuack thing = putStrLn (quack thing) | |
-- Define your Duck type somewhere | |
data Duck = {- whatever -} | |
instance Quacks Duck where |
// Next line is line 64 in source file | |
registerBlock("air", 0); | |
registerBlock("stone", Block.stone); | |
registerBlock("grass", Block.grass); | |
registerBlock("dirt", Block.dirt); | |
registerBlock("cobblestone", Block.cobblestone); | |
registerBlock("planks", Block.planks); | |
registerBlock("sapling", Block.sapling); | |
registerBlock("bedrock", Block.bedrock); | |
registerBlock("waterMoving", Block.waterMoving); |
@FunctionalInterface | |
public interface BinOp<T, U, V> { | |
abstract V op(T x, U y); | |
} |
; Hotstrings for typing macrons | |
; If o is a vowel, i.e. one of (a, e, i, o, u, y), typing ~~o turns into ō pretty much anywhere. | |
; Typing ~~ followed by a space will produce a naked macron, i.e. ¯. | |
:*?:~~i::ī | |
:*?:~~ ::¯ | |
:*?:~~e::ē | |
:*?:~~o::ō | |
:*?:~~a::ā | |
:*?:~~y::ȳ |
-- formulate in standard style, as a mental crutch | |
tryUntilSuccess :: [a -> Either e b] -> a -> Either [e] b | |
tryUntilSuccess fs x = let ys = map ($ x) fs | |
in case dropWhile isLeft ys of | |
[] -> Left $ lefts $ takeWhile isLeft ys | |
(Right y):_ -> Right y | |
-- Formulate in simply polymorphic CPS next | |
-- This is the signature of the... thing... I'm trying to write | |
tryUntilSuccessCPS :: [a -> (Either f b -> c) -> c] -> ((a -> (Either [f] b -> e) -> e) -> d) -> d |