This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
############################################################################## | |
# Copyright (c) 2012 Hajime Nakagami<[email protected]> | |
# All rights reserved. | |
# Licensed under the New BSD License | |
# (http://www.freebsd.org/copyright/freebsd-license.html) | |
# | |
# A image viewer. Require Pillow ( https://pypi.python.org/pypi/Pillow/ ). | |
############################################################################## | |
import PIL.Image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Detect CMYK Jpeg under current directory | |
use PIL (or Pillow) | |
""" | |
import os | |
from PIL import Image | |
START_PATH='.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Please crete database before go run this code | |
// ex) mysql -u root -e 'create database test_go;' | |
package main | |
import ( | |
"os" | |
"fmt" | |
"database/sql" | |
_ "github.com/go-sql-driver/mysql" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"bytes" | |
"encoding/binary" | |
) | |
func int32_to_bytes(i32 int32) *bytes.Buffer { | |
bs := []byte { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
type AnyType interface{} | |
func f(a AnyType) AnyType { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://golang.org/pkg/container/list/ | |
package main | |
import ( | |
"fmt" | |
"container/list" | |
) | |
func main() { | |
l := list.New() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
func main() { | |
var t time.Time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
sample.xml should be located in the default working directory | |
<foo> | |
<bar key="Key1" value="Value1" /> | |
<bar key="Key2" value="Value2" /> | |
</foo> | |
*/ | |
package main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding:utf-8 | |
# PostgreSQL 統計処理用の集約関数 SQL:2006 | |
# https://www.postgresql.jp/document/9.3/html/functions-aggregate.html | |
import unittest | |
import minipg | |
import decimal | |
values_with_null = [ | |
(1, 1), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding:utf-8 | |
import unittest | |
import tempfile | |
import firebirdsql | |
class TestStdDev(unittest.TestCase): | |
host='localhost' | |
port=3050 | |
user='sysdba' |
OlderNewer