This file contains hidden or 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
#include <iostream> | |
#include <sstream> | |
#include <string> | |
#include <vector> | |
#include <list> | |
#include <queue> | |
#include <deque> | |
#include <stack> | |
#include <map> | |
#include <set> |
This file contains hidden or 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
#line $NEXTLINENUMBER$ "$FILENAME$" | |
#include <iostream> | |
#include <sstream> | |
#include <cstdio> | |
#include <cmath> | |
#include <cctype> | |
#include <algorithm> | |
#include <string> | |
#include <vector> | |
#include <deque> |
This file contains hidden or 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
#include <iostream> | |
#include <cstdio> | |
#include <cmath> | |
#include <string> | |
#include <vector> | |
using namespace std; | |
#define all(c) (c).begin(),(c).end() | |
#define repN(var,n) for(int var=1;var<=(n);var++) |
This file contains hidden or 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
javascript:Array.prototype.slice.call(document.getElementsByClassName('PrImage'),0).forEach(function(element,index,array){element.style.display='none';}); |
This file contains hidden or 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
(define xmin 0) | |
(define xmax 0) | |
(define ymin 0) | |
(define ymax 0) | |
(define (f x0 y0 x1 y1 depth) | |
(when (>= depth 0) | |
(when (< x0 xmin) (set! xmin x0)) | |
(when (< x1 xmin) (set! xmin x1)) | |
(when (< xmax x0) (set! xmax x0)) |
This file contains hidden or 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
(use srfi-1) | |
(use util.combinations) | |
(use gauche.uvector) | |
(define pi 3.141592653589793238462643383279) | |
(define phi (/ (+ 1 (sqrt 5)) 2)) | |
(define *log2* (log 2)) | |
(define *log10* (log 10)) |
This file contains hidden or 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 sys | |
def base64_encode_(in_data, padding=False): | |
in_len = len(in_data) | |
out_data = [] | |
for i in range(0, in_len, 3): | |
out_data.append(in_data[i] >> 2) |
This file contains hidden or 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
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
<title>dvi.js demo</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> | |
<script type="text/javascript" src="http://naoyat.github.com/dvi.js/dvi.min.js"></script> | |
<link rel="stylesheet" type="text/css" href="http://naoyat.github.com/dvi.js/texfonts.min.css"></style> | |
</head> | |
<body onload="dvi_load({out:'#out',file:'sample.dvi'});"> | |
<div id="out"></div> |
This file contains hidden or 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; | |
% | |
% 図11.9 Metropolisアルゴリズムを用いて2次元ガウス分布からサンプリングする例。 | |
% | |
function plot_gauss2_contour(mu, Sigma) | |
cont = zeros(2,101); | |
D = chol(Sigma, "lower"); | |
for j = 1:100 | |
theta = pi*2/100 * (j-1); |
This file contains hidden or 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; | |
% | |
% コーシー分布 Cauthy distribution のpdf | |
% | |
function p = CauthyDistributionPDF(y) | |
p = arrayfun(@(x) 1.0/(pi*(1+x^2)), y); | |
endfunction | |
% | |
% コーシー分布に従う乱数 |