Skip to content

Instantly share code, notes, and snippets.

# author: github.com/zardoru
# usage: python3 script.py dicecount dicesides
from math import floor
from scipy.misc import comb
import sys
# source:
# http://mathworld.wolfram.com/Dice.html
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cmath>
unsigned long quickdigitalroot(unsigned long num) {
return num - std::floor( ( (double)num - 1.0) / 9.0 );
}
bool is10InDigitalRoot(unsigned long num) {
// Notes: Height of the bottom-most atom is preserved
Spawn 0,0 of piece at 3,-1 on matrix; State 0
Piece I
....
OOOO
....
....
..O.
..O.
from bs4 import BeautifulSoup
from urllib.request import urlopen
from urllib.parse import unquote, quote
from urllib.error import HTTPError
pages = [
"http://mtwildwood.net/yokaiMedallium/tribeBrave.html",
"http://mtwildwood.net/yokaiMedallium/tribeMysterious.html",
"http://mtwildwood.net/yokaiMedallium/tribeTough.html",
"http://mtwildwood.net/yokaiMedallium/tribeShady.html",
from bs4 import BeautifulSoup
from urllib.request import urlopen
from urllib.parse import unquote, quote
pages = [
"https://wikimon.net/Category:Digimon_with_profiles_on_Digimon_Reference_Book",
"https://wikimon.net/index.php?title=Category:Digimon_with_profiles_on_Digimon_Reference_Book&pagefrom=%E3%82%AB%0AGreymon+%282010+Anime+Version%29"
"https://wikimon.net/index.php?title=Category:Digimon_with_profiles_on_Digimon_Reference_Book&pagefrom=%E3%82%BF%0ADeckerdramon#mw-pages",
"https://wikimon.net/index.php?title=Category:Digimon_with_profiles_on_Digimon_Reference_Book&pagefrom=%E3%83%8F%0APalmon#mw-pages",
"https://wikimon.net/index.php?title=Category:Digimon_with_profiles_on_Digimon_Reference_Book&pagefrom=%E3%83%A9%0ARosemon#mw-pages"
@zardoru
zardoru / rollbot.cpp
Last active August 29, 2015 14:21
rollbot
/* This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@zardoru
zardoru / Additions
Last active August 29, 2015 14:14
BMS branching/nesting test
By adding these lines above #RANDOM, the crisis is averted.
#00011:00010001
#00012:01000100
#00013:01000100
#00014:01000100
#00015:01000100
#00016:01000100
#00018:01000100
#00019:01000100
@zardoru
zardoru / roadmap.md
Last active August 29, 2015 14:05
raindrop roadmap

raindrop roadmap

  • UI elements
    • Switch button
    • Textbox
    • Panels
    • List with scroll bar
    • Unicode text rendering (!)
    • Banners (ezpz)
@zardoru
zardoru / fixed_converter
Last active July 13, 2016 14:01
Stepmania converter to osu!mania in c#. fixed a few bugs.
/* use this one. github is not cooperating. */
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using System.Text.RegularExpressions;
/* god my c# is so messy.
* I'm not fond of proper C#. I rather like C, really
*/
@zardoru
zardoru / gist:4687350
Last active December 12, 2015 00:58
notes exporter to osu for stepmania. yes this is my work with help of several people for getting the osu file format right.
#include "global.h"
#include "NoteTypes.h"
#include "NoteData.h"
#include "RageUtil.h"
#include "RageLog.h"
#include "RageFileManager.h"
#include "RageFile.h"
#include "NoteDataUtil.h"
#include "RageFile.h"
#include "Song.h"