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
#!/bin/python | |
import math | |
def smartsub(N, k): | |
if k == 0: | |
return 1 | |
""" k > 1 """ | |
d, m = divmod(N, 10**k) |
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
{ | |
init: function(elevators, floors) { | |
var A = elevators[0]; | |
A.on("idle", function() { | |
A.goToFloor(0); | |
}); | |
A.on("floor_button_pressed", function(floorNum) { | |
if (A.currentFloor < floorNum) { | |
A.goingUpIndicator(true) |
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 ( | |
"crypto/rand" | |
"encoding/base64" | |
"encoding/binary" | |
"fmt" | |
"github.com/seehuhn/mt19937" | |
) |
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 ( | |
"crypto/rand" | |
"encoding/base64" | |
"fmt" | |
) | |
func 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
#/usr/bin/python | |
# coding: utf-8 | |
from sqlalchemy.engine import create_engine | |
from sqlalchemy.engine import create_engine | |
from sqlalchemy.orm.session import sessionmaker | |
from sqlalchemy.sql.expression import and_ | |
from sqlalchemy.schema import Column | |
from sqlalchemy.dialects.postgresql import DATE, VARCHAR, DOUBLE_PRECISION, BIGINT, INTEGER, NUMERIC | |
from sqlalchemy.dialects.postgresql import TIMESTAMP |
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
nori@Nagato:~/.go/src/github.com/bgnori/npoker$ /usr/local/go/bin/go run main.go | |
18.849115秒 | |
3 players, 1000000 trials | |
player 0 has J♠,J♣, won 0.189, won eq of 186.78. | |
player 1 has A♠,A♥, won 0.714, won eq of 708.11. | |
player 2 has K♦,A♦, won 0.111, won eq of 105.10. | |
nori@Nagato:~/.go/src/github.com/bgnori/npoker$ /usr/local/go/bin/go run main.go | |
49.913845秒 |
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 ( | |
"encoding/json" | |
"fmt" | |
"os" | |
) | |
type LINEContent struct { | |
ToType int `json:"toType"` |
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" | |
import "image/color" | |
import "strconv" | |
func p256(s string) uint8 { | |
i, _ := strconv.ParseUint(s, 16, 8) | |
return uint8(i) | |
} |
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
1000,流動資産 | |
1100,当座資産 | |
1110,現金及び預金 | |
1111,現金 | |
1112,預金 | |
1120,受取手形 | |
1121,受取手形,関係会社のものを除く。 | |
1127,子会社受取手形 | |
1128,その他の関係会社受取手形 | |
(1129),貸倒引当金 |
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
# nvidia-settings: X configuration file generated by nvidia-settings | |
# nvidia-settings: version 352.21 (buildd@lcy01-07) Thu Jun 18 12:03:14 UTC 2015 | |
Section "ServerLayout" | |
Identifier "Layout0" | |
Screen 0 "Screen0" 0 0 | |
InputDevice "Keyboard0" "CoreKeyboard" | |
InputDevice "Mouse0" "CorePointer" | |
Option "Xinerama" "0" | |
EndSection |