This file contains hidden or 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 os | |
import sys | |
from math import ceil, floor | |
from PIL import Image | |
RATIO = (1/2.35) | |
SYMBOL_STRING = '&#.:*"..' | |
EIGHT_COLOR = [(0, 0, 0), # 0 |
This file contains hidden or 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 file contains hidden or 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 file contains hidden or 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
[[('NAME: elethiomel_entry_fortress_basement', | |
'MONS: gnoll, jackal, worm'), | |
('NAME: dpeg_entry_castle', 'MONS: fungus'), | |
('NAME: elethiomel_entry_diamonds', 'MONS: rat, goblin, bat, kobold'), | |
('NAME: erik_entry_gehennom', 'MONS: rat, goblin, kobold, ooze'), | |
('NAME: dpeg_entry_morbid_curiosity', 'MONS: goblin ; stone'), | |
('NAME: matt_entry_debris', 'MONS: plant'), | |
('NAME: dpeg_entry_circle_labyrinth_a', | |
'MONS: plant / bush w:3, fungus col:any, fungus col:yellow, fungus col:red'), | |
('NAME: minmay_entry_shoal_huts', 'MONS: plant'), |
This file contains hidden or 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 random | |
import re | |
import sys | |
from collections import defaultdict, namedtuple | |
from itertools import chain, count | |
from operator import add | |
from random import choice | |
from string import uppercase |
This file contains hidden or 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 re | |
import time | |
comp_re = re.compile(r'^1?$|^(11+?)\1+$') | |
def regex_prime(args): | |
primes = [2] | |
for n in xrange(*args): | |
if not re.match(comp_re, str(1) * n): | |
primes.append(n) |
This file contains hidden or 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 bash | |
# | |
# single step iTunes external drive ejection | |
disk="/dev/disk2" | |
music_path=/Volumes/media/music | |
itunes_pid=$(pgrep "^itunes$") | |
itunes_status=$(lsof -p "$itunes_pid" | grep "$music_path") |
This file contains hidden or 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
#<start test.md> | |
Inline *markup* **test**. | |
Paragraph^block and^(multiple super)^test | |
~~More~~ inline [tests](http://www.example.com) | |
Inline `fixed width text` and \*escaped format test\* | |
The following is a block of code: |
This file contains hidden or 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
# Configuration file for ipython. | |
c = get_config() | |
#------------------------------------------------------------------------------ | |
# TerminalInteractiveShell configuration | |
#------------------------------------------------------------------------------ | |
# pager settings | |
c.TerminalInteractiveShell.pager = 'less' | |
c.TerminalInteractiveShell.color_info = True |
This file contains hidden or 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 random | |
import re | |
import sys | |
from collections import defaultdict, namedtuple | |
from itertools import chain, count | |
from operator import add | |
from random import choice | |
from string import uppercase |
NewerOlder