Skip to content

Instantly share code, notes, and snippets.

View wktk0's full-sized avatar
🧸
working infinitely from home

wktk0 wktk0

🧸
working infinitely from home
View GitHub Profile
@wktk0
wktk0 / README.md
Last active January 25, 2017 05:51
ipythonのマジックコマンドの%timeみたいに一行から複数行の実行時間を計測する

使い方

ファイルに書き出す場合は引数にファイル  

from timer import Timer
# f = open("filename","w")
# f:file option
with Timer(f):
  print("processing details")
@wktk0
wktk0 / GettingTweetSS.py
Created April 14, 2016 06:37
特定ユーザのTweetを10分おきに取得し新規ツイートだけwebで呼び出しスクショを取るプログラム
# -*- coding: utf-8 -*-
from requests_oauthlib import OAuth1Session
import json
import tweepy
import sys
from tweepy.auth import OAuthHandler
from tweepy.api import API
from selenium import webdriver
import os
@wktk0
wktk0 / mylist_dl.sh
Last active March 23, 2016 13:20
ニコニコ動画のマイリストのURLを引数にすると,マイリスト内の動画をダウンロードするスクリプト
#!/bin/sh
if [ $# -ne 1 ]; then
echo “引数にマイリストのURLを入力してください” 1>&2
exit 1
fi
tmp=${1}\?rss\=2.0
echo $tmp
curl $tmp 2> /dev/null | grep -e "link" | sed -e 's/<[^>]*>//g' >T.txt