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 json | |
import datetime | |
import os | |
import time | |
# http://www.kbremner.com/2014/03/15/kickstarter-part1.html | |
# https://github.com/markolson/kickscraper/wiki/Project |
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
days, input_load, worker_stacks, total_stacks, output, ave_lead_time | |
case 100% input 1...6 | |
0 2 [2, 0, 0, 0, 0] 2 0 5 | |
1 5 [5, 2, 0, 0, 0] 7 0 6 | |
2 2 [2, 5, 2, 0, 0] 9 0 6 | |
3 3 [3, 5, 2, 2, 0] 12 0 6 | |
4 3 [3, 4, 4, 2, 2] 15 0 7 | |
5 6 [6, 3, 4, 5, 1] 19 2 8 | |
6 1 [4, 3, 6, 1, 5] 19 1 8 | |
7 4 [4, 4, 3, 6, 2] 19 4 8 |
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 multiprocessing | |
import traceback | |
import random | |
import time | |
import sys | |
def random_error_func(x): | |
n = random.random() |
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 | |
# ε-Greedy base multi-armed bandit | |
import random | |
slotmachine_rate = [3, 5, 10, 20, 16, 15, 21, 22, 6] | |
score_map = [[0.0, 0] for i in xrange(len(slotmachine_rate))] | |
search_rate = 0.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
# https://www.kaggle.com/c/otto-group-product-classification-challenge/details/evaluation | |
def print_kaggle_score(label_list, proba_result): | |
label_index = sorted(list(set(label_list))) | |
score = - 1.0 / len(label_list) * sum( | |
[ | |
math.log( | |
max(min( | |
proba_result[i][label_index.index(label_list[i])] | |
/ sum(proba_result[i]) |
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
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os.path | |
import shutil | |
import random | |
import math | |
import cPickle | |
import pickle |
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
現在レベルは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
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 |
OlderNewer