Skip to content

Instantly share code, notes, and snippets.

View shibacow's full-sized avatar

shibacow shibacow

View GitHub Profile
[{"mode": "NULLABLE",
"name": "video_id",
"type": "STRING"},
{"mode": "NULLABLE",
"name": "date",
"type": "TIMESTAMP"},
{"mode": "NULLABLE",
"name": "content",
"type": "STRING"},
{"mode": "NULLABLE",
@shibacow
shibacow / fetch_law.py
Created September 13, 2017 17:02
e-Gov法令検索 http://elaws.e-gov.go.jp/download/lawdownload.html から法令データの一括ダウンロードを行う。10秒のインターバルをしている
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import requests
from pyquery import PyQuery as pq
from datetime import datetime
import re
import os
import shutil
import time
@shibacow
shibacow / aws_ec2_price.py
Created June 19, 2017 11:17
get aws ec2 spot instance price
#!/usr/bin/env python
# -coding:utf-8 -*-
import requests
import re
import json
from pprint import pprint
import subprocess
import sys
import os
from datetime import datetime
@shibacow
shibacow / HedlessSample.java
Created March 1, 2017 17:55
gephi-toolkit sample
/**
*
*/
package hello_world;
import java.awt.Color;
import java.io.File;
import java.io.IOException;
import org.gephi.appearance.api.AppearanceController;
import org.gephi.appearance.api.AppearanceModel;
@shibacow
shibacow / HeadlessSimple.java
Last active February 14, 2017 15:42
gephi-toolkit-sample
/**
*
*/
package hello_world;
import java.awt.Color;
import java.io.File;
import java.io.IOException;
import org.gephi.appearance.api.AppearanceController;
import org.gephi.appearance.api.AppearanceModel;
import datalab.bigquery as bq
import pandas as pd
df_pmoney = bq.Query(pmoney).to_dataframe().set_index('date')
df_pmoney.head(5)
df_pmoney.plot()
@shibacow
shibacow / .bashrc
Last active November 20, 2016 14:06
p2.xlarge用linpack設定
export LD_LIBRARY_PATH=/opt/intel/mkl/lib/intel64:/opt/intel/compilers_and_libra
ries/linux/lib/intel64:/home/ec2-user/hpl-2.0_FERMI_v15/src/cuda:/usr/lib64/open
mpi/lib:/opt/intel/compilers_and_libraries_2017.0.098/linux/compiler/lib/intel64
_lin
export PATH=/usr/lib64/openmpi/bin:$PATH
@shibacow
shibacow / simple_server.go
Last active August 11, 2016 13:15
compare golang web framework echo and python flask
package main
import (
"net/http"
"github.com/labstack/echo"
"github.com/labstack/echo/engine/standard"
)
func main() {
e := echo.New()
SELECT * FROM
table_date_range(production.all_log,
timestamp("2016-05-01"),
timestamp("2016-06-01"))
WHERE user_id IS NOT NULL
LIMIT 10;
@shibacow
shibacow / many_process.ex
Created November 3, 2015 13:01
erlang elixir 軽量プロセス生成テスト
defmodule ManyProcess do
def start_link(id) do
{:ok,spawn_link(fn -> loop(id,%{}) end)}
end
def loop(id,map) do
receive do
{:get,key,caller}->
IO.puts "send id=#{id} key=#{key}"
send caller,Map.get(map,key)
loop(id,map)