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 x in range(1,101):print(x%3==0)*"Fizz"+(x%5==0)*"Buzz"or x |
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
CLIENT.on('message', function(data){ | |
if(((data.count+1)%100)%11==0) CLIENT.submit("STEAL"); | |
}); |
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
CLIENT.on('message', function(data){ | |
if(data.nick == "ThinkPad") CLIENT.submit(">>"+(data.count.toString())+" Okay kid."); | |
}); |
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
x = raw_input("> ") | |
print ' '.join(x) | |
for i in range(1, len(x)-1):print x[i] + (len(x) * 2 - 3) * ' ' + x[len(x)-i-1] | |
print ' '.join(x[::-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
HAI 1.2 | |
I HAS A VAR | |
VAR R 1 | |
IM IN YR FIZZBUZZ UPPIN YR VAR WILE BOTH SAEM VAR AN SMALLR OF VAR AN 100 | |
NOT MOD OF VAR AN 15 | |
O RLY? | |
YA RLY, VISIBLE "FIZZBUZZ" | |
MEBBE NOT MOD OF VAR AN 3, VISIBLE "FIZZ" | |
MEBBE NOT MOD OF VAR AN 5, VISIBLE "BUZZ" | |
NO WAI, VISIBLE VAR |
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
var colors = ["e66","ea6","ee6","6e6","6ee","66e","a6e"]; | |
String.prototype.flair = function() { | |
flair = "$Ubuntu Mono|/^/^"; | |
for (i = 0; i < this.length; i++) { | |
color = colors[i%colors.length] | |
flair += "##" + color + "#" + color + this[i]; | |
} | |
return flair; | |
} | |
CLIENT.on('message', function() { |
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
function randomChar(string) { | |
return string.charAt(Math.floor(Math.random() * string.length)) ;} | |
function generateName() { | |
var vowels = "aeiou"; | |
var consonants = "bcdfghjklmnpqrstvwxyz"; | |
return randomChar(consonants) + | |
randomChar(vowels) + | |
randomChar(consonants) + | |
(Math.floor(Math.random()*89)+10) ;} |
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
print( | |
"Welcome to Nim!:\n"+ | |
"A simple game, where you're allowed to take "+ | |
"one, two, or three marbles from a pile of 12.\n"+ | |
"You compete against the computer to take the "+ | |
"last marble.") | |
marbles = 12 | |
def computerTake(amount): |
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
count = 0 | |
string = "z" | |
while True: | |
with open(hex(count), "a+") as file: | |
file.write(string) | |
string += string | |
count += 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
a = "abcdefghijklmnopqrstuvwxyz" | |
q = " 1234567890.,'\";:" | |
z = {x:y for x,y in map(None,a+q,a[13:]+a[:13]+q)} | |
print ''.join([z[c] for c in raw_input('>').lower()]) |
OlderNewer