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 binary numerical encoding wherein sequential integers only differ from each other | |
by a single bit. I'm calling this "one bitflip per increment" encoding. This is my | |
proposal to a question posed on the Artisan's Asylum discussion mailing list, with | |
the topic being looking for numerical encodings that are friendly to possibly-genetic | |
algorithmic solutions to problems where only bitwise operations are used, and thus | |
finding a solution of "10000" from "01111" is unlikely, while finding "10000" from | |
"10001" is easy. The nth lsbit of the mask flips every 2^n increments. | |
bin | obpi | mask | |
0000 | 0000 | 0000 |
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
// has this plane hit a wall, or is it guaranteed to? | |
boolean dangerZone(Plane icarus) { | |
// outside the arena is instant death | |
if (!icarus.getPosition().isInArena(arenaSize)) { | |
return true; | |
} | |
// adjacent to a wall? | |
// directly facing the wall? | |
// death next turn | |
if ( |
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
0: | |
(2, -1, -1) ('[]', '0') | |
1: | |
(4, -1, -1) ('[[]]', '1') | |
2: | |
(6, -1, -1) ('[[[]]]', '2') | |
3: | |
(8, -1, -1) ('[[[[]]]]', '3') | |
4: | |
(10, -1, -1) ('[[[[[]]]]]', '4') |
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 | |
import math | |
import pygame | |
import random | |
import sys | |
import subprocess | |
import os | |
import shlex | |
import select |
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
.. I0 .. .. | |
P0 /\ -- .. | |
.. .. =0 ++ | |
.. P0 -- O0 | |
.. .. =0 ++ | |
.. .. \/ O0 | |
-- /\ -- .. | |
MB .. -- .. | |
\\ .. MB .. | |
.. O0 // .. |
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 | |
import os | |
import time | |
import requests | |
from bs4 import BeautifulSoup | |
import re | |
if os.path.exists('bots'): | |
os.rename('bots','bots_bak_'+str(time.time())) |
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
5398: [11/20/2014 13:34:09] connection id 35 from 123.45.67.62. | |
5398: [11/20/2014 13:34:09] checking trusted user list for dspam(108) | |
5398: [11/20/2014 13:34:09] No QuarantineAgent option found. Using standard quarantine. | |
5398: [11/20/2014 13:34:09] using database handle id 5 | |
5398: [11/20/2014 13:34:09] handle locked | |
5398: [11/20/2014 13:34:09] DSPAM Instance Startup | |
5398: [11/20/2014 13:34:09] input args: dspam --deliver=innocent | |
5398: [11/20/2014 13:34:09] pass-thru args: | |
5398: [11/20/2014 13:34:09] processing user user@domain.com | |
5398: [11/20/2014 13:34:09] uid = 108, euid = 108, gid = 115, egid = 115 |
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
for i in SERVER1 SERVER2 SERVER3 | |
do | |
echo $i | |
ssh -o LogLevel=quiet -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $i "echo PASSWORD | sudo -S sh -c 'echo LINE1 > /privileged/file' " | |
echo | |
ssh -o LogLevel=quiet -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $i "echo PASSWORD | sudo -S sh -c 'echo LINE2 >> /privileged/file' " | |
echo | |
ssh -o LogLevel=quiet -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $i "echo PASSWORD | sudo -S sh -c 'echo LINE3 >> /privileged/file' " | |
echo | |
echo done |
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
archaeologist.json | |
{ | |
- name: "Survivor" | |
+ name: "Archaeologist" | |
- pointcost: 0 | |
+ pointcost: 5 | |
- skillpoints: 0 | |
+ skillpoints: 2 | |
items: [ | |
- "boots_winter" |
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
* Adding handle: conn: 0x7fd47a804000 | |
* Adding handle: send: 0 | |
* Adding handle: recv: 0 | |
* Curl_addHandleToPipeline: length: 1 | |
* - Conn 0 (0x7fd47a804000) send_pipe: 1, recv_pipe: 0 | |
* About to connect() to www.nike.com port 80 (#0) | |
* Trying 23.218.119.101... | |
* Connected to www.nike.com (23.218.119.101) port 80 (#0) | |
> GET / HTTP/1.1 | |
> User-Agent: curl/7.30.0 |
OlderNewer