- StealthyでIPを発信元国もしくはEU圏に偽装してみる
- 表示される内容をブラウザで確認する
- switcherで各種モダンブラウザを用いた場合の挙動を確認する
- 表示される内容をブラウザで確認してみる
<html> | |
<head> | |
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> | |
<script type="text/javascript" src="https://www.google.com/jsapi"></script> | |
<script type="text/javascript"> | |
google.charts.load('current', { | |
'packages': ['geochart'] | |
}); | |
google.charts.setOnLoadCallback(drawRegionsMap); |
single_regr <- function(mdl, xh, p){ | |
x <- mdl$model[,2]; y <- mdl$model[,1]; e <- mdl$resid; n<- length(x) | |
a <- mdl$coef[1]; b <- mdl$coef[2] | |
yh <- a + b*xh | |
sgm <- sqrt(sum(e*e)/(n-2)); sx <- var(x)*(n-1) | |
ms <- sqrt(1+(1/n) + (xh-mean(x))^2/sx)*sgm | |
k <- (1-p)/2; tk <- qt((1-k),df=(n-2)) | |
yL <- yh - tk*ms; yU <- yh + tk*ms | |
xmin <- min(xh,x); xmax <- max(xh,x) | |
ymin <- min(yL,y); ymax <- max(yU,y) |
data <- read.csv('stock_px.csv') | |
#setup libraries | |
options(CRAN="http://cran.ism.ac.jp/") | |
options(repos="http://cran.ism.ac.jp/") | |
install.packages('ggplot2') | |
install.package('reshape2') | |
library(ggplot2) | |
library(reshape2) |
import pandas as pd | |
import matplotlib.pyplot as plt | |
close_px_all = pd.read_csv('stock_px.csv', parse_dates=True, index_col=0) | |
close_px = close_px_all[["AAPL", "MSFT", "XOM", "SPX"]] | |
close_px = close_px.resample("B", fill_method="ffill") | |
close_px.plot() | |
plt.legend(loc = 2) | |
plt.show() |
data <- read.csv('stock_px.csv') | |
#setup libraries | |
options(CRAN="http://cran.ism.ac.jp/") | |
options(repos="http://cran.ism.ac.jp/") | |
install.packages('ggplot2') | |
install.package('reshape2') | |
library(ggplot2) | |
library(reshape2) |
spx_px = close_px_all["SPX"] | |
spx_rets = spx_px / spx_px.shift(1) -1 | |
returns = close_px.pct_change() | |
corr = pd.rolling_corr(returns, spx_rets, 125, min_periods=100) |
In [5]: | |
import urllib | |
url = "http://www.steephill.tv/giro-d-italia/" | |
res = urllib.urlopen(url) | |
html = res.read() | |
html | |
Out[5]: |
# original | |
A B | |
1 1 2 | |
2 1 3 | |
3 2 3 | |
4 3 5 | |
5 3 6 | |
# For example: | |
A B |
itokawa <- read.table("itokawa_f0049152.txt", skip=1, nrow=25350) | |
x <- itokawa[,2] | |
y <- itokawa[,3] | |
z <- itokawa[,4] | |
#package rglを呼び出す | |
library(rgl) | |
#lim指定を行う | |
plot3d(x = x, y = y, z = z, xlim=c(-0.4, 0.4), ylim=c(-0.4, 0.4), zlim=c(-0.4, 0.4)) |