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 'sdl' | |
WINDOW_SIZE = [1280, 768] | |
PARTICLE_SIZE = 8 | |
EFFECT_LENGTH = 16 | |
class GameManager | |
def initialize(screen) | |
@screen = screen | |
@particles = Array.new |
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
# -*- coding: utf-8 -*- | |
import re | |
class forth(): | |
Stack = [] | |
FunctionList = {} | |
VariableList = {} | |
ParsedCode = [] |
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
現在レベルは1 | |
最大体力は20。 | |
現在体力は最大体力。 | |
最大攻撃力は4。 | |
現在攻撃力は最大攻撃力。 | |
最大防御力は2。 | |
現在防御力は最大防御力。 | |
最大経験値は10。 | |
現在経験値は0。 | |
最大経験値増加量は1.5。 |
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
#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") |
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
#coding:utf-8 | |
import urllib | |
import BeautifulSoup | |
import urlparse | |
import time | |
def main(): | |
urlList = open("seed.txt","r").read().splitlines() | |
allowDomainList = set(open("allowDomain.txt","r").read().splitlines()) |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using System.Security.Cryptography; | |
using System.Diagnostics; | |
namespace ConsoleApplication1 |
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
#coding:utf-8 | |
import random | |
def amida_shuffle(line_num, exchange_num): | |
lines = range(line_num) | |
for i in xrange(exchange_num): | |
p = random.randrange(line_num - 1) | |
lines[p], lines[p+1] = lines[p+1], lines[p] | |
return lines |
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
Hello=World=None | |
print dir()[len([])], dir()[len([None])] |
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
#coding: utf-8 | |
#python 2.7 | |
class island_count: | |
def __init__(self, pattern = None): | |
self.pattern = None | |
if pattern: | |
self.load(pattern) |
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 uniq_two(item_prices, max_price): | |
bucket = {} | |
for price in item_prices: | |
if price > max_price: | |
continue | |
if price not in bucket : | |
bucket[price] = 0 | |
bucket[price] += 1 | |
result = [] |
OlderNewer