Skip to content

Instantly share code, notes, and snippets.

@tokoroten
tokoroten / dropbox_crawler.py
Created July 28, 2012 06:28
dropbox_crawler
#coding: utf-8
import urllib2
def main():
for i in xrange(1, 264055420):
#http://dl.dropbox.com/u/26405542/index.html
url = "http://dl.dropbox.com/u/%d/index.html" % i
try:
handle = urllib2.urlopen(url)
data = handle.read()
fp = open("%d_index.html" % i, "wb")
@tokoroten
tokoroten / ipponmichi
Created May 3, 2012 09:09
なでしこで一本道ダンジョン #残パン会
現在レベルは1
最大体力は20。
現在体力は最大体力。
最大攻撃力は4。
現在攻撃力は最大攻撃力。
最大防御力は2。
現在防御力は最大防御力。
最大経験値は10。
現在経験値は0。
最大経験値増加量は1.5。
@tokoroten
tokoroten / forth.py
Created May 1, 2012 16:10
forth interpriter implimented by python.
# -*- coding: utf-8 -*-
import re
class forth():
Stack = []
FunctionList = {}
VariableList = {}
ParsedCode = []
@tokoroten
tokoroten / gist:1781444
Created February 9, 2012 17:32
particles in Ruby/SDL
require 'sdl'
WINDOW_SIZE = [1280, 768]
PARTICLE_SIZE = 8
EFFECT_LENGTH = 16
class GameManager
def initialize(screen)
@screen = screen
@particles = Array.new