###1st step
- confirm
echo$SHELL
#!/bin/bash
- 変数事始 echo "hello world" exit 0は、作法的なもので、異常終了していないことを明示する
#! usr/bin/env python | |
#! -*-coding: utf-8-*- | |
#author@Shoichi Otomo | |
import urllib2 | |
url = 'https://joa.epi.bz/api/prcavg?token=aaa&date=2012-08-01&lat=30.2&lon=130.5' | |
response = urllib2.urlopen(url) | |
the_page = response.read() |
###1st step
echo$SHELL
#!/bin/bash
#!/usr/bin/python | |
#!coding: utf-8 | |
from BeautifulSoup import BeautifulStoneSoup | |
doc = open('watersupplysites.xml') | |
soup = BeautifulStoneSoup(''.join(doc)) | |
for ln in soup: |
#!/bin/bash
#!coding: utf-8
#!Author@Shoichi Otomo
for i in `seq {range}`
do
echo convert -flip f$i.png f$i\_flip.png
convert -flip f$i.png f$i\_flip.png
done
<html> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta name="author" content="Shoichi Otomo"> | |
<head> | |
<title>qgis_book</title> | |
<style type="text/css"> | |
#canvas { | |
width: 80%; | |
height: 80%; | |
margin: 0; |
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)) |
# original | |
A B | |
1 1 2 | |
2 1 3 | |
3 2 3 | |
4 3 5 | |
5 3 6 | |
# For example: | |
A B |
In [5]: | |
import urllib | |
url = "http://www.steephill.tv/giro-d-italia/" | |
res = urllib.urlopen(url) | |
html = res.read() | |
html | |
Out[5]: |
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) |