Skip to content

Instantly share code, notes, and snippets.

View tkota0726's full-sized avatar
💭
Machine Learning

Kota tkota0726

💭
Machine Learning
View GitHub Profile
@tkota0726
tkota0726 / wsgi
Last active July 27, 2017 00:15
wsgi
http://gihyo.jp/dev/feature/01/wsgi/0002?page=3
#-*- coding:utf-8 -*-
import os, datetime, cgi, StringIO
from wsgiref import util, simple_server
from xml.sax import saxutils
class MessageBoard(object):
''' メッセージボードサービスを提供するアプリケーション '''
def __init__(self):
@tkota0726
tkota0726 / ftp接続先のファイルを編集する方法
Last active July 27, 2017 00:15
ftp接続先のファイルを編集する方法
http://nagayasu-shinya.com/emacs-tramp/
http://dev.ariel-networks.com/articles/software-design-200802/elisp-catalog/
@tkota0726
tkota0726 / 0_reuse_code.js
Created May 23, 2017 08:59
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@tkota0726
tkota0726 / copy.sh
Created June 27, 2017 03:11
sa-ba-
#!/bin/bash
#!/bin/bash
datestr=`date +%Y%m%d-%H%M%S`
STATUS=0
# 関数: scpを行う
# $1 コピー元ファイル名(フルパス)
# $2 コピー先ファイル名
function scpfile(){
@tkota0726
tkota0726 / rakuten.py
Last active January 2, 2019 15:34
rakuten.py
# -*- coding: utf-8 -*-
# !/usr/bin/env/python
# coding: utf-8
from urllib.request import urlretrieve
from urllib.request import urlopen
from urllib.error import HTTPError
from bs4 import BeautifulSoup
from time import time
import requests, random, datetime, re, os, json
@tkota0726
tkota0726 / index.html
Created July 3, 2017 20:14
Processing.js
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<title>$title</title>
$styles
</head>
<body>
<h1>$title</h1>
@tkota0726
tkota0726 / emacsインストール方法
Last active July 27, 2017 00:14
emacsインストール方法
http://emacs.rubikitch.com/emacs251-install/
cd src
curl -OL http://ftpmirror.gnu.org/emacs/emacs-25.2.tar.xz
tar Jxvf emacs-25.2.tar.xz
cd emacs-25.2
./configure --without-x
make
make install
cd nextstep
mv Emacs.app/ /Applications/Emacs.app
@tkota0726
tkota0726 / url_list.md
Last active July 31, 2017 18:13
For programing study
@tkota0726
tkota0726 / api.py
Created August 16, 2017 21:58
bitAPIスクリプト
# -*- coding: utf-8 -*-
import pybitflyer
import json
def main():
api = pybitflyer.API(api_key="************",
api_secret="**************")
b = api.board(product_code="BTC_JPY")
t = api.ticker(product_code="BTC_JPY")
# -*- coding: utf-8 -*-
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import os
import fnmatch
from subprocess import call
matches = []
for root, dirnames, filenames in os.walk('./'):