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
package main | |
import "fmt";func main(){a:=[200]uint64{1,1,1,1,2} | |
for i:=0;i<100;i++{fmt.Println(a[i]) | |
a[i+5]=a[i]+2*a[i+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
scrolling: yes | |
height: 800 |
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 time | |
import urllib | |
import urllib.parse | |
import urllib.request | |
import json | |
sleep_time = 4 # Sleep time 4 seconds is determined for fear of exceeding request limits. 1request/4sec < 1000request/1hour | |
api_url = "http://qiita.com/api/v2/" | |
def getQiita(bearer_token,data_obj,protocol): |
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 | |
import pystan | |
import numpy | |
import random | |
import matplotlib.pyplot as plt | |
m = 6 | |
N = 10000 |
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 | |
import pystan | |
from numpy import random | |
import matplotlib.pyplot as plt | |
m = 6 | |
N = 1000 | |
prob = [1/float(m) for i in range(m)] |
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
data | |
{ | |
int <lower=0> m; // The number of dice faces | |
int <lower=0, upper=N> x[2*m-1]; // The numbers of events. x[i] indeicates the number of occurences that a sum of two dices is i+1 in [2,...,2*m]. | |
} | |
parameters | |
{ | |
simplex[m] theta1; // Probability for each face. | |
simplex[m] theta2; // Probability for each face. |
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
data | |
{ | |
int <lower=0> m; // The number of dice faces | |
int <lower=0> x[m]; // The numbers of events. x[i] indicates the number of occurence of i-th face. | |
} | |
parameters | |
{ | |
simplex[m] theta; // Occurence probabilities. | |
} |