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
// ==UserScript== | |
// @id MemberTitleRemoverWildfiregames | |
// @name Member Title Remover (Wildfiregames) | |
// @namespace http://www.diasp.de/u/rosievers | |
// @description Removs the member_titles on the wildfiregames forums | |
// @author Rolf Sievers | |
// @include http://www.wildfiregames.com/forum/* | |
// @version 1 | |
// @grant none | |
// @licence http://creativecommons.org/publicdomain/zero/1.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
// This module takes care of the so called Bandbox. The component | |
// used to select several units at once by drawing a rectangle. | |
// In particular, it provides an event handling Object "bandboxing" | |
// used by handleInputBeforeGui in input.js. | |
// The Pyrogenesis engine can only import whole javascript modules. | |
// To prevent interference with other code this module is encapsulated | |
// in an object. | |
// First we create a new object, which can be used as an event processor |
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 math | |
def distributionWithNPirates(n): | |
if (n == 1): # Base case | |
return [100] | |
numberOfVotesRequired = int(math.ceil(n / 2.0)) | |
# Pirate n will vote for his proposal regardless | |
numberOfVotesRequired -= 1 | |
distributionIfPirateNKilled = distributionWithNPirates(n - 1) | |
piratesThatGetTheLeastIfPirateNIsKilled = sorted(range(len(distributionIfPirateNKilled)), key=distributionIfPirateNKilled.__getitem__) |
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
#https://math.stackexchange.com/questions/1189554/number-of-pairs-formed-from-2n-people-sitting-in-a-circle#1189713 | |
import math, operator | |
product = lambda l: reduce(operator.mul, l, 1) | |
def binom(n,k): # https://stackoverflow.com/questions/26560726/python-binomial-coefficient | |
if (k > n) or (k < 0): | |
return 0 | |
return product(xrange(k+1, n+1)) // math.factorial(n-k) |
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 Html exposing (div, button, text) | |
import Html.App exposing (beginnerProgram) | |
import Html.Events exposing (onClick, onWithOptions) | |
import Json.Decode as Json | |
main = | |
beginnerProgram { model = 0, view = view, update = update } | |
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
./run.sh | |
INFO: main.cpp:439 : Anura engine version 1.4 | |
INFO: main.cpp:478 : Default Tile Size: 16 | |
INFO: main.cpp:479 : Default Tile Scale: 2 | |
INFO: main.cpp:481 : Build Options: | |
INFO: main.cpp:483 : isomap | |
INFO: main.cpp:483 : lua | |
INFO: main.cpp:483 : save_png | |
INFO: main.cpp:483 : sdl2 | |
INFO: main.cpp:483 : svg |
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
/home/rolf/Downloads/argentum-age [rolf@Butterfly] [21:32] | |
> ldd ./bin/anura | |
linux-gate.so.1 (0xf77b2000) | |
libGL.so.1 => /usr/lib32/libGL.so.1 (0xf770b000) | |
libGLEW.so.1.10 => not found | |
libSDL2_image-2.0.so.0 => not found | |
libSDL2-2.0.so.0 => not found | |
libz.so.1 => /usr/lib32/libz.so.1 (0xf76f4000) | |
libfreetype.so.6 => /usr/lib32/libfreetype.so.6 (0xf7631000) | |
libcairo.so.2 => not found |
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
# A LOT of these, where it correcty downloads: | |
INFO: http_client.cpp:65 : http_client::send_request(this = 0xa1262f0 @60968 method_path = POST /download_chunk?chunk_id=96dc6299c8212b5020186f8c8cfd5341 request.size() = 78 num_retries = 0 attempt_num = 1) | |
INFO: http_client.cpp:431 : http_client::handle_recv: 0xa8822e0 @60970 payload_str.size() = 1235 | |
INFO: module.cpp:1257 : Module request chunk: 44d2275f489dd630c661fbb728f57d14 | |
INFO: http_client.cpp:65 : http_client::send_request(this = 0xaa604b0 @60970 method_path = POST /download_chunk?chunk_id=44d2275f489dd630c661fbb728f57d14 request.size() = 78 num_retries = 0 attempt_num = 1) |
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
/home/rolf/Downloads/anura [git::trunk *] [rolf@Butterfly] [8:50] | |
> ./anura --module=citadel --auto-update-module | |
INFO: main.cpp:439 : Anura engine version 1.4 | |
INFO: main.cpp:478 : Default Tile Size: 16 | |
INFO: main.cpp:479 : Default Tile Scale: 2 | |
INFO: main.cpp:481 : Build Options: | |
INFO: main.cpp:483 : isomap | |
INFO: main.cpp:483 : lua | |
INFO: main.cpp:483 : save_png | |
INFO: main.cpp:483 : sdl2 |
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 python | |
# -*- coding: utf-8 -*- | |
# Ein Dinnerhopping soll organisiert werden. | |
# Es nehmen 42 Personen in 21 Teams teil. | |
n_teams = 21 | |
from random import randrange |