Skip to content

Instantly share code, notes, and snippets.

View mitchellbusby's full-sized avatar

Mitchell Busby mitchellbusby

View GitHub Profile
import random
population = []
#reproduction command
def reproduce(DNA):
assignname = str(random.randint(1000, 10000))
organism = Organism(assignname, DNA)
population.append(organism)
#command to do a turn for the entire population
def TurnNow():
global population
@mitchellbusby
mitchellbusby / .py
Created March 30, 2012 06:48
not implemented
import random
population = []
turncount = 0
#reproduction command
def reproduce(DNA):
assignname = str(random.randint(1000, 9999))
organism = Organism(assignname, DNA)
population.append(organism)
#command to do a turn for the entire population
def TurnNow():
import random
population = []
turncount = 0
#reproduction command
def reproduce(DNA):
assignname = str(random.randint(1000, 9999))
organism = Organism(assignname, DNA)
population.append(organism)
#command to do a turn for the entire population
def TurnNow():
@mitchellbusby
mitchellbusby / I AM!!.php
Created April 20, 2012 12:20
not implemented
<?php
$files = scandir('documents');
for ($i = 0; $i<count($files); $i++) {
echo '<div class="document"><a href="documents/' . $files[$i] . '">'. str_replace('.docx', '', $files[$i]) . '</a></div>';
}
?>
@mitchellbusby
mitchellbusby / Code 1.txt
Created May 6, 2012 04:12
not implemented
'o\x83\x84\x8e \x8e\x90\x8b\x80\x8d \x8f\x8a\x8b \x8e\x80~\x8d\x80\x8f \x88\x80\x8e\x8e|\x82\x80 \x84\x8e \x8e\x87\x84\x82\x83\x8f\x87\x94 \x88\x8a\x8d\x80 \x91\x84\x8f|\x87 \x8f\x8a \x8f\x83\x80 ~|\x90\x8e\x80 \x8f\x83|\x89 \x94\x8a\x90\x8d \x8b\x8d\x80\x91\x84\x8a\x90\x8e \x8a\x89\x80I d\x8f \x88|\x94 ~\x8a\x89\x8f|\x84\x89 ~\x8a\x89\x8f\x80\x89\x8f \x8f\x83|\x8f \x84\x8e \x89\x8a\x8f \x81\x8a\x8d \x91\x84\x80\x92\x80\x8d\x8e |\x8f \x8f\x83\x80 \x81|\x84\x89\x8f \x8a\x81 \x83\x80|\x8d\x8fI'
@mitchellbusby
mitchellbusby / .txt
Created May 6, 2012 04:23
not implemented
final = ""
text = raw_input("Enter text: ")
for c in text:
if c == ' ':
final += c
else:
convert = ord(c)
convert -= 27
letter = chr(convert)
final += letter
@mitchellbusby
mitchellbusby / .txt
Created May 6, 2012 04:50
not implemented
final = ""
text = raw_input("Enter text: ")
for i in xrange(len(text)):
if i % 2 != 0:
letter = text[i-1:i]
final += letter
print final
@mitchellbusby
mitchellbusby / .txt
Created May 11, 2012 07:33
not implemented
import random
string = " "
times = input("Enter amount of characters: ")
for i in xrange(times):
num = random.randint(97,122)
character = chr(num)
string += character
print string
@mitchellbusby
mitchellbusby / .txt
Created May 20, 2012 06:53
not implemented
output = []
f = open('lines.txt', 'r')
li = f.readlines()
f.close()
for i in li:
output.insert(0, i)
out = open('output.txt', 'w')
for item in output:
print item
out.write(item)
@mitchellbusby
mitchellbusby / .txt
Created May 30, 2012 09:38
not implemented
x = [0,1]
y = 0
total = 0
while y < 4000000:
y = x[-2] + x[-1]
x.append(y)
for i in x:
if i % 2 == 0:
total += i