Skip to content

Instantly share code, notes, and snippets.

View ryoco's full-sized avatar

YAMASHITA (KATO), Ryoko ryoco

View GitHub Profile
@ryoco
ryoco / xsltocsv_tyokyo-nursely.py
Created August 16, 2015 05:49
無認可保育所の xls を csv に直すやつ
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import xlrd
import csv
import sys
from datetime import time
import datetime
@ryoco
ryoco / Scala 2.10.4
Last active August 29, 2015 14:12
compile error
[info] Compiling 1 Scala source to /Users/ryoco/work/repos/git/github/ryoco-scala-sample/target/scala-2.10/classes...
[error] /Users/ryoco/work/repos/git/github/ryoco-scala-sample/src/main/scala/ryoco/Main.scala:12: erroneous or inaccessible type
[error] index += 1
[error] ^
[error] one error found
[error] (compile:compile) Compilation failed
@ryoco
ryoco / .gitignore
Last active October 22, 2015 06:48
pdf to image with Go
/*.swp
/*.pdf
/*.png
.DS_Store
*.swp
*.class
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from io import StringIO
import sys
import urllib3
import json
def get(appid, category):
http = urllib3.PoolManager()
@ryoco
ryoco / mysql-connector-python
Created March 28, 2014 11:43
use mysql-connector-python memo
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import mysql.connector
def sql_executer(sql):
con = mysql.connector.connect(
host = "localhost",
port = 3306,
@ryoco
ryoco / TODO
Created June 25, 2013 06:30
1,5,10,60,120 分後に TODO を表示してくれる AppleScript です
display dialog "Input your TODO" default answer ""
set myMessage to text returned of result
set myList to {1, 5, 10, 60, 120}
set myMinutes to choose from list myList
delay myMinutes * 60
display dialog myMessage
@ryoco
ryoco / slide
Last active December 17, 2015 14:49
rpscala 104回で質問させていただいた スライド 題名と質問したい事がズレているがそのまま
/**
* rpscala 104回 で tototoshi さんが書いてくださった sample code の記憶を頼りにして書いたもの。
* unapply は Boolean でもり値にできるよというのと、
* paramTOStatus のようなものを書きたいのであれば list に object 書けば、という話
* (であってます。。。?)
*/
sealed abstract class Status(val id: Int) {
def unapply(i: Int): Boolean = i == id
}
case object OK extends Status(1)
import System
importText.XML.HaXml
import Text.XML.HaXml.Posn
import Text.XML.HaXml.Util
import Text.XML.HaXml.Xtract.Parse
main = do
args <- getArgs
contents <- readFile $ head args
let
@ryoco
ryoco / jsdoit.css
Created December 25, 2012 14:42
popup select icons
body {
background-color: #3ff5d4;
font: 30px sans-serif;
}
#menu_button a{
text-decoration:none;
-webkit-border-radius: 5px;
border: 3px #000000 solid;
padding: 6px 6px;
}