Skip to content

Instantly share code, notes, and snippets.

class 「調停人」
types
public 「イベント」 =
<進むボタン押下> | <戻るボタン押下> | <決定ボタン押下> | <USB接続> | <USB切断>;
operations
public pure 年取得: () ==> nat
年取得() == is subclass responsibility
post 1 <= RESULT and RESULT <= 9999;
public pure 月取得: () ==> nat
class 「案件」
types
private 「案件ステータス」 = <請書発行済> | <見積保存> | <注文済> | <出荷済>
instance variables
private サービス: 「サービス条件」`「サービス」;
private 種類: [「製造サービス詳細条件」`「種類」];
private 案件ステータス: 「案件ステータス」 := <見積保存>;
private 適用クーポン: 「クーポン一覧」 := new 「クーポン一覧」();
private 見積有効期間: 「有効期限条件」`「期間」 := 90;
operations
@stockedge
stockedge / jabstract.py
Created December 7, 2018 00:06 — forked from nakagami/jabstract.py
Japanese summarization module using LexRank algorithm.
#!/usr/bin/env python
# The MIT License (MIT)
# Copyright © 2015 Recruit Technologies Co.,Ltd.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@stockedge
stockedge / StrongestRPS.py
Created February 19, 2017 10:41
心理学的に最強のじゃんけんアルゴリズムをBayesian Optimizationで求める。
#[1] Wang, Zhijian, Bin Xu, and Hai-Jun Zhou. "Social cycling and conditional responses in the Rock-Paper-Scissors game." arXiv preprint arXiv:1404.5199 (2014).
from bayes_opt import BayesianOptimization
from enum import Enum
import random
class Hand(Enum):
rock = 0
paper = 1
sissors = 2
@classmethod
@stockedge
stockedge / markov_music_generator.py
Last active January 31, 2017 12:55
マルコフ連鎖で作曲
# -*- coding: utf-8 -*-
trans = {'A': {'A': 0.28385866546540767,
'B': 0.24039029254446773,
'C': 0.00022086254477386737,
'D': 0.020802627608255447,
'E': 0.011895962807622163,
'F': 0.10198601349666957,
'G': 0.15754715743344602,
'a': 0.011517653696276825,
@stockedge
stockedge / analyze.R
Created March 21, 2016 11:28
同一厩舎の多頭数出しで人気薄馬の成績を調べる
require(RSQLite)
drv <- dbDriver('SQLite')
conn <- dbConnect(drv, dbname = '..\\netkeiba-scraper\\race.db')
rs <- dbSendQuery(conn, '
select * from race_result where cast(order_of_finish as int) <> 0
')
allData <- fetch(rs, n = -1)
@stockedge
stockedge / pullover.csv
Created March 5, 2016 04:26
プルオーバーの記録
Date Weight Rep
2015-06-21 36 7
2015-06-28 36 6
2015-07-05 36 10
2015-07-09 41 8
2015-07-12 41 8
2015-07-16 41 12
2015-07-23 46 6
2015-07-30 41 12
2015-08-03 41 10
@stockedge
stockedge / winper_and_support.R
Last active February 6, 2016 15:54
支持率と勝率の関係性を調べる
#参考
#http://www.amstat.org/chapters/boston/nessis07/presentation_material/Victor_Lo.pdf
#http://hub.hku.hk/bitstream/10722/60987/4/Content_11.pdf?accept=1
ws <- read.csv("winper_and_support.csv", header=F)
ws <- ws[which(ws$V1 != 0),]
ws <- ws[which(ws$V3 > 100),]
manji.tanshou.kaime <-
c(
1,
9,
26,
64,
198,
375,
774,
1272,#ここから上は回収率100%以上
@stockedge
stockedge / pred.moving.average.r
Created December 13, 2015 01:05
移動平均を使って予測してみる
> sum(diag(tbl)) / sum(tbl)
[1] 0.4991274
>#予測力全く無し