- Pythonの日付処理とTimeZone | Nekoya Press
- 8.1. datetime — 基本的な日付型および時間型 — Python 3.3.6 ドキュメント
- python - How to check if a datetime object is localized with pytz? - Stack Overflow
- mysql - CAST DECIMAL to INT - Stack Overflow
- time - Should MySQL have its timezone set to UTC? - Stack Overflow
- timezone - How to set time zone of mysql? - Stack Overflow
- MySQLのTimeZoneをJSTからUTCに変更する - Qiita
- [Starting and Stopping Background Services with Homebrew](https://robots.thoughtbot.com/starting-and-stopping-background-servi
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
<?php | |
/** | |
* Part of the Fuel framework. | |
* | |
* @package Fuel | |
* @version 1.5 | |
* @author Yuki Yokoyama | |
* @license MIT License | |
* @copyright 2010 - 2013 Fuel Development Team | |
* @link http://fuelphp.com |
毎日 1~3分を続けることがポイント。
- 脳トレゲーム
- 数学ドリル
- 腕立て、腹筋
- (5回ずつ)
- 読書
- 読むのが辛い場合、とりあえずパラパラ眺めて、戻って、それを3回繰り返す。
- 3回めはじっくり読む
- 3回めで頭に入らない場合も、とりあえず読み進める
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 asyncio | |
import aiohttp | |
urls = [ | |
(1, "http://example.com/1"), | |
(2, "http://example.com/2"), | |
(3, "http://example.com/3"), | |
] | |
sem = asyncio.Semaphore(5) |
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 requests | |
import PIL.Image | |
from io import BytesIO | |
url = "http://example.com/image.png" | |
r = reuests.get(url, timeout=10, headers={'User-Agent': 'MyUserAgent/1.0'}) | |
image_file = BytesIO(r.content) | |
img = PIL.Image.open(image_file) | |
print("{}: {}x{}".format(img.format, img.width, img.height)) |
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 aiohttp | |
import asyncio | |
async def fetch(session, url, name): | |
with await sem: | |
with aiohttp.Timeout(10): | |
async with session.get(url) as response: | |
text = await response.text() | |
with open(name + '.html', 'w') as f: |
urls.txt
というファイルにフィードURLが列記されている前提で、
$ mkdir feeds
$ cd feeds
$ xargs -P 20 -n 1 wget < urls.txt
$ ipython
- 複数ページのHTMLページを用意する。
- HTMLをDOMツリーにする。
- 直列化する。
- 比較して、一番差分が大きい場所を出す。
- 差分が大きい場所の親要素を出す。
課題
広告エリアや関連記事エリアも一緒に出てしまう。
- ダイビング
- foster the people
- 無地の服がすき
- 朝本浩文
- 世武 裕子
- ぞうさん♡象さん
- 安部公房
- すずめが好き!
- 洋画が好き
- 結婚したい
awk だとプロセスのコマンド名「以降」を範囲指定するのが難しかったので、cutを使ってみる。
ps alx | tr -s " " | cut -d " " -f 8,13- | sort -nr | head -20
ps -eo rss,comm,args | sort -nr | head -20