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 time | |
from math import sqrt | |
def sieve(stop): | |
''' | |
That sieve of eratosthenes thing. Implemented directly from the | |
pseudocode found here: | |
http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes#Implementation | |
''' | |
stop += 1 |
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 time | |
from math import sqrt | |
def sieve(stop): | |
''' | |
That sieve of eratosthenes thing. Implemented directly from the | |
pseudocode found here: | |
http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes#Implementation | |
''' |
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 random | |
print "bot 1" | |
if input is '': | |
print "input = ''" | |
else: | |
print input | |
output = random.choice(['R', 'P', 'S']) | |
print "bot 1" | |
print output |
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 random | |
from collections import defaultdict | |
def update(input): | |
counts[input] += 1 | |
def play(): | |
rcounts = {str(v): k for k, v in counts} | |
return rcounts[max([str(val) for val in counts.values())]] |
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
#!/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
#!/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
# 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
#<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
#!/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") |