$ python3 -m venv scraping
$ . venv/bin/activate
(venv) $ pip install scrapy
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
if (Deno.args.length !== 2) { | |
console.error( | |
"Usage: deno run --allow-read cdk-auto-mapper.ts <resource-file-path> <mapping-file-path>" | |
); | |
Deno.exit(1); | |
} | |
const [resourcePath, mappingPath] = Deno.args; | |
const resourceFileContent = await Deno.readTextFile(resourcePath); |
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
// ==UserScript== | |
// @name Link to Stack Overflow | |
// @namespace http://capybala.com/ | |
// @description Replace a link to copy site of Stack Overflow with a link to the original page | |
// @include http://www.google.co.jp/search* | |
// ==/UserScript== | |
var regex_list = [ | |
/^http:\/\/ja\.w3support\.net\/.*db=(\w+).*id=(\w+)/ | |
]; |
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 pandas as pd | |
dfs = pd.read_html('https://srbrnote.work/archives/2338') | |
df_splits = dfs[0] # 株式分割・併合データ | |
df_stocks = dfs[2] # 株価データ | |
df_splits['分割日'] = pd.to_datetime(df_splits['分割日']) | |
df_splits['係数'] = df_splits['分割前'] / df_splits['分割後'] | |
df_stocks['日付'] = pd.to_datetime(df_stocks['日付']) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 sys | |
import os | |
from robobrowser import RoboBrowser | |
# 認証の情報は環境変数から取得する。 | |
AMAZON_EMAIL = os.environ['AMAZON_EMAIL'] | |
AMAZON_PASSWORD = os.environ['AMAZON_PASSWORD'] | |
# RoboBrowserオブジェクトを作成する。 |
In my environment these spiders work well.
Environment:
(venv) $ python -V
Python 3.4.2
(venv) $ scrapy version
Scrapy 1.1.0rc3
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
curl https://gist.github.com/orangain/5f74bf388f66778f0e47/raw/com.docker.boot2docker.plist -o ~/Library/LaunchAgents/com.docker.boot2docker.plist | |
launchctl load ~/Library/LaunchAgents/com.docker.boot2docker.plist | |
echo '$(boot2docker shellinit)' >> ~/.bash_profile |
NewerOlder