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
def rangoli(size): | |
width = size * 4 - 3 | |
chars = list(string.ascii_lowercase[:size]) | |
chars.reverse() | |
for row in range(1, size + 1): | |
chars_left = ''.join(chars[0:row]) | |
chars_right = ''.join(reversed(chars_left[:-1])) | |
print '-'.join(chars_left + chars_right).center(width, '-') | |
for row in reversed(range(1, size)): | |
chars_left = ''.join(chars[0:row]) |
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
require('luau') | |
-- Variables | |
MAGIC_LIST = { | |
"Protect III", | |
"Shell III", | |
"Ice Spikes", | |
"Blaze Spikes", | |
"Phalanx", | |
"Stoneskin", |
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
Jython 2.7rc2 (default:913eec7f2e60, Apr 3 2015, 17:13:45) | |
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.7.0_65 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> from net.minecraft.item.crafting import CraftingManager | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
java.lang.ExceptionInInitializerError | |
at net.minecraft.item.crafting.RecipesTools.<init>(RecipesTools.java:16) | |
at net.minecraft.item.crafting.CraftingManager.<init>(CraftingManager.java:44) | |
at net.minecraft.item.crafting.CraftingManager.<clinit>(CraftingManager.java:28) |
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
""" can't have empty files in gist """ |
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
import socket | |
import struct | |
import sys | |
from httplib import HTTPResponse | |
from BaseHTTPServer import BaseHTTPRequestHandler | |
from StringIO import StringIO | |
import gtk | |
import gobject |
NewerOlder