Skip to content

Instantly share code, notes, and snippets.

Avatar

Satoshi Miura mursts

View GitHub Profile
@mursts
mursts / scrape.py
Created Oct 16, 2017
Python Boot Camp のテキストのタイトルを取得します
View scrape.py
#!/usr/bin/env python
# coding: utf-8
import requests # pip install requests
import re
# liタグのclassが"toctree-l1"のタイトルを取得する正規表現
rgx = re.compile('<li class="toctree-l1">.*>(.*)</a>')
def main():
View todo-swagger.yaml
swagger: '2.0'
info:
title: Todo App
description: Todoを管理するAPI
version: "1.0.0"
basePath: /api
consumes:
- application/json
produces:
- application/json
@mursts
mursts / README.md
Last active Nov 13, 2015
Macのアプリケーションセットアップファイル
View README.md

usage

brew bundle

@mursts
mursts / image_downloader.py
Created Sep 15, 2015
BING APIサーチを使って画像をダウンロードします
View image_downloader.py
#!/usr/bin/env python
# coding: utf-8
import asyncio
import aiohttp
import requests
import json
import os
import click
from hashlib import md5
View radiko.sh
#!/bin/bash
# https://mtunn.wordpress.com/odroid-u2★セットアップ/radikoの録音・再生(archlinux)/
pid=$$
wkdir='/var/tmp'
playerurl=http://radiko.jp/player/swf/player_4.1.0.00.swf
playerfile="${wkdir}/player.swf"
keyfile="${wkdir}/authkey.png"
auth1_fms="${wkdir}/auth1_fms_${pid}"
auth2_fms="${wkdir}/auth2_fms_${pid}"
@mursts
mursts / add_outlook_schedule.py
Created Oct 6, 2014
Outlookに予定を追加します
View add_outlook_schedule.py
#!/usr/bin/env python
# coding: utf-8
import win32com.client
import datetime
def add_outlook_schedule():
APPOINTMENT_ITEM = 1
@mursts
mursts / get_holidays.py
Created Oct 5, 2014
GoogleCalendarから祝日を取得する
View get_holidays.py
#!/usr/bin/env python
# coding: utf-8
import datetime
import requests
URL = 'http://www.google.com/calendar/' \
'feeds/ja.japanese%23holiday@group.v.calendar.google.com/' \
'public/full'
@mursts
mursts / last_working_day_of_month.py
Last active Aug 29, 2015
土日を除いた月末を取得する
View last_working_day_of_month.py
#!/usr/bin/env python
#coding: utf-8
import datetime
import workdays
from dateutil import relativedelta
def is_last_working_day_of_month(target_date):
first_day_of_next_month = target_date + relativedelta.relativedelta(months=1)
end_of_this_month = datetime.date(first_day_of_next_month.year,
@mursts
mursts / create-gae-project-flask.sh
Created Aug 26, 2014
create-gae-project-flask
View create-gae-project-flask.sh
#!/bin/sh
if [ $# -eq 0 ]; then
CMD=`basename $0`
echo "usage: ${CMD} projectname"
exit 1
fi
PROJECT_NAME=$1
@mursts
mursts / create-gae-project
Created Aug 15, 2014
GAE/Pのプロジェクトテンプレートを作成する(webapp2)
View create-gae-project
#!/bin/sh
PROJECT_TEMPLATE_PATH=${HOME}/google-cloud-sdk/platform/google_appengine/new_project_template
if [ $# -eq 0 ]; then
CMD=`basename $0`
echo "usage: ${CMD} projectname"
exit 1
fi
You can’t perform that action at this time.