Skip to content

Instantly share code, notes, and snippets.

@skitazaki
skitazaki / customer-churn-ecdf.ipynb
Created May 25, 2018 11:56
Modelling Customer Churn
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@skitazaki
skitazaki / docker-compose.yml
Created June 11, 2016 13:59
web server to throw logs for S3
version: '2'
services:
web:
image: nginx:1.10
ports:
- "80:80"
- "443:443"
volumes:
- /opt/nginx/html:/usr/share/nginx/html
logspout:
@skitazaki
skitazaki / README.md
Last active July 2, 2016 16:01
Jupyter on Vagrant

Jupyter notebook on Vagrant

Boot vagrant box and login using ssh.

$ [ -d notebook ] || mkdir notebook
$ vagrant up
$ vagrant ssh
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@skitazaki
skitazaki / csv-blank-counter.go
Last active August 29, 2015 14:12
Read CSV file and report blank counts of each field.
package main
import (
"bufio"
"encoding/csv"
"fmt"
log "github.com/Sirupsen/logrus"
"github.com/docopt/docopt-go"
"golang.org/x/text/encoding/japanese"
"golang.org/x/text/transform"
@skitazaki
skitazaki / urlopen-py3.py
Created November 17, 2014 14:01
See [encoding - Python 3, let json object accept bytes or let urlopen output strings - Stack Overflow](http://stackoverflow.com/questions/6862770/python-3-let-json-object-accept-bytes-or-let-urlopen-output-strings)
#!/usr/bin/env python3
# See:
# encoding - Python 3, let json object accept bytes or let urlopen output strings - Stack Overflow
# http://stackoverflow.com/questions/6862770/python-3-let-json-object-accept-bytes-or-let-urlopen-output-strings
import json
import urllib.request
REMOTE_URL = 'http://data.okfn.org/data/cpi/datapackage.json'
res = urllib.request.urlopen(REMOTE_URL)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>東京ポリゴン</title>
<meta name="description" content="">
@skitazaki
skitazaki / tsv2excel.py
Created February 3, 2014 08:50
Bind multiple TSV files into Excel workbook.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Bind multiple TSV files into Excel workbook.
Requires "xlwt" for Python 2.x, or "xlwt-future" for Python 3.x series.
"""
import os
import sys