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
randomize | |
shiai_num = 10000 ;shiai_numの数値と等しい回数の試合を行います。 | |
;データ読み込み変数定義 | |
dim b1,10 | |
dim b2,10 | |
dim b3,10 | |
dim b4,10 | |
dim st,10 | |
dim std,10 | |
dim bunt,10 |
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 functions as fn | |
from time import sleep | |
scale = 6 | |
kifu = {} | |
now = [] | |
end = 0 | |
t = 0 | |
while end == 0: | |
board = fn.board_set(kifu, now, scale) |
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 math, random | |
from matplotlib import pyplot as plt | |
def normal_cdf(x, mu=0, sigma=1): | |
return (1 + math.erf((x - mu) / math.sqrt(2) / sigma)) / 2 | |
def inverse_normal_cdf(p, mu=0, sigma=1, tolerance=0.00001): | |
if mu != 0 or sigma != 1: | |
return mu + sigma * inverse_normal_cdf(p, tolerance=tolerance) |
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
from matplotlib import pyplot as plt | |
from matplotlib import patches | |
import pandas as pd | |
import numpy as np | |
def BrierScores(actual_outcome, fitted_value): | |
X = np.array(actual_outcome) | |
p = np.array(fitted_value) | |
B = sum((p-X)**2)/len(X) | |
return B |
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 random | |
import sys | |
alpha = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"] | |
hand1 = 22 #Change | |
hand2 = 5 #Change | |
rot_state1 = 0 #Change | |
rot_state2 = 1 #Change | |
rot_state3 = 2 #Change | |
rot_state0 = 3 #Change | |
chr1 = 23 #Change |
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
ALPHA = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"] | |
alpha = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"] | |
word = input("Please Enter Words: ") | |
for i in range(len(alpha)): | |
process = "" | |
for w in word: | |
if w in alpha: | |
n = alpha.index(w) + i | |
if n > 25: |
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 math, tkinter, time, sys | |
g = 9.8 | |
m1 = 1 | |
m2 = 1 | |
l1 = 150 | |
l2 = 150 | |
dt = 0.1 | |
theta1 = math.pi / 2 | |
theta2 = math.pi / 2 #+ 0.02 |
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 pickle | |
ALPHA = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"] | |
alpha = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"] | |
word = input("Please Enter Words: ") | |
def plus_i(i, w): | |
if w in alpha: | |
n = alpha.index(w) + 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
import random | |
alpha = ["A", "B", "C", "D"] | |
fishes = [1,1,1,1,1,1,1,1,1,1, | |
1,1,1,1,1,1,1,1,1,1, | |
1,1,1,1,1,1,1,1,1,1, | |
2,2,2,2,2,2,2,2,2,2, | |
2,2,2,2,2,2,2,2,2,2, | |
3,3,3,3,3,3,3,3,3,3] | |
f = random.sample(fishes, len(fishes)) |
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 numpy as np | |
from scipy.stats.mstats import mquantiles | |
from math import sqrt, ceil | |
from matplotlib import pyplot as plt | |
def _grid_from_X(X, percentiles=(0.05, 0.95), grid_resolution=100): | |
if len(percentiles) != 2: | |
raise ValueError('percentile must be tuple of len 2') | |
if not all(0. <= x <= 1. for x in percentiles): |
OlderNewer