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 (square x) (* x x)) | |
| (define (cube x) (* x x x)) | |
| (define (abs x) | |
| (if (< x 0) | |
| (- x) | |
| x | |
| ) | |
| ) |
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 <map> | |
| int collatz(std::map<int,int> &count,long long n){ | |
| int res=0; | |
| while(!(n&1)){ | |
| res++; | |
| n=(n>>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
| set nocompatible | |
| set number | |
| set ruler | |
| set cursorline | |
| set nocursorcolumn | |
| set laststatus=2 | |
| set cmdheight=2 | |
| set showmatch | |
| set helpheight=999 |
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
| # -*- coding: utf-8 -*- | |
| import sys | |
| import urllib2 | |
| from bs4 import BeautifulSoup | |
| def sample_getter(path, problemId): | |
| directory = path + "/" + str(problemId) | |
| url = "http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=" + str(problemId) | |
| html = urllib2.urlopen(url) | |
| soup = BeautifulSoup(html) |
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
| import numpy as np | |
| import requests | |
| import matplotlib.pyplot as plt | |
| def get_material_id(name): | |
| material_dict = { | |
| '1,1,1,2,3,3,3-Heptafluoropropane (R227ea)': 'C431890', | |
| '1,1,1,2,3,3-Hexafluoropropane (R236ea)': 'C431630', | |
| '1,1,1,3,3,3-Hexafluoropropane (R236fa)': 'C690391', |
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
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| ################################################# | |
| F = 8.0 | |
| J = 40 # site | |
| dt = 0.05 # 6 hours | |
| dt_forcast = 0.05 | |
| delta_TLM = 1e-9 | |
| alpha = 3.0 ** 2 # P^a_0 = alpha * I |
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
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import matplotlib.animation as animation | |
| from scipy import sparse | |
| from PIL import Image | |
| class Wave: | |
| def __init__(self, N, a): |
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
| import numpy as np | |
| from scipy.special import iv | |
| from sklearn.base import BaseEstimator, TransformerMixin | |
| from sklearn.utils.validation import check_is_fitted | |
| class ExpSineSquaredSampler(BaseEstimator, TransformerMixin): | |
| """ | |
| Approximates feature map of an Exp-Sine-Squared kernel by its Fourier series expansion. | |
| Exp-Sine-Squared kernel is given by: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.