This file contains hidden or 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
import UIKit | |
protocol SwipeReturnable { | |
func addSwipeReturnGesture() | |
} | |
extension SwipeReturnable where Self: UIViewController { | |
func addSwipeReturnGesture() { | |
let gestureToRight = UISwipeGestureRecognizer(target: self, action: #selector(self.swipeBack)) | |
gestureToRight.direction = .Right |
This file contains hidden or 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
<?xml version="1.0"?> | |
<packages> | |
<package id="GoogleChrome" /> | |
<package id="Firefox" /> | |
<package id="Opera" /> | |
<package id="googlejapaneseinput" /> | |
<package id="flashplayerplugin" /> | |
<package id="foobar2000" /> | |
<package id="everything" /> | |
<package id="listary" /> |
This file contains hidden or 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
enum Hoge { | |
case normal | |
case `nil` | |
case `self` | |
case `dynamicType` | |
case `Type` | |
case `Protocol` | |
} | |
print(Hoge.normal) // normal |
This file contains hidden or 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
kumamoto@kumamotontu:~/iGAN$ THEANO_FLAGS='device=cpu, floatX=float32, nvcc.fastmath=True, optimizer_excluding=cudnn' python iGAN_main.py --model_name outdoor_64 | |
[n_iters] = 40 | |
[top_k] = 16 | |
[average] = False | |
[morph_steps] = 16 | |
[model_file] = ./models/outdoor_64.dcgan_theano | |
[d_weight] = 0.0 | |
[interp] = linear | |
[batch_size] = 64 | |
[framework] = theano |
This file contains hidden or 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
# peco | |
function fish_user_key_bindings | |
bind \cr peco_select_history | |
end | |
# set -x EDITOR 'atom' | |
# Mac は LS_COLORS, Ubuntu等は LSCOLORS | |
export LS_COLORS='di=36:ln=35:so=32:pi=33:ex=31:bd=46;34:cd=43;34:su=41;30:sg=46;30:tw=42;30:ow=43;30' | |
export LSCOLORS=gxfxcxdxbxegedabagacad |
This file contains hidden or 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
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
Log.d(TAG, "Weather Station Started"); | |
try { | |
mDisplay = RainbowHat.openDisplay(); | |
mDisplay.setEnabled(true); | |
mDisplay.display("OK "); |
This file contains hidden or 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
class WeatherStationActivity : Activity() { | |
private var mDisplay: AlphanumericDisplay? = null | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
Log.d(TAG, "Weather Station Started") | |
try { | |
mDisplay = RainbowHat.openDisplay() | |
mDisplay?.setEnabled(true) |
This file contains hidden or 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
var firebase = require("firebase"); | |
var config = { | |
apiKey: "秘密", | |
authDomain: "秘密.firebaseapp.com", | |
databaseURL: "https://秘密.firebaseio.com", | |
projectId: "秘密", | |
storageBucket: "", | |
messagingSenderId: "秘密" | |
}; | |
firebase.initializeApp(config); |
This file contains hidden or 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
module.exports = {"light_on": | |
"2600ac00723a0d0f0d100d2c0d2c0d100c2d0c100d100c100d2c0d100c100d2c0d100c2d0c100d2c0d100c100d2c0d100c100d100c110c2d0c100d2c0d2c0d100c2d0c100d100c110c100c2d0c100d100c2d0c110c100c0009a1703a0d100c110c2c0d2d0c100c2d0c100d110b100d2c0d100c100d2c0d110b2d0d100c2d0c100d110b2d0c100d110b100d110b2d0c110c2c0d2c0d110b2d0c110c110b110c110b2d0c110c110c2c0d100c100d000d05000000000000000000000000", | |
"light_off":"2600ac00723a0d0f0d100d2c0d2c0d0f0d2c0d100d0f0d100d2c0d100c100d2c0d100c2d0c100d2c0d100c100d2c0d100d0f0d100c100d2c0d2c0d2c0d2c0d100d2c0d0f0d100d0f0d2d0c2d0c100d100c2d0c100d100c00099e733a0d100c100d2c0d2c0d100c2d0c100d100c100d2c0d100c110c2c0d100c2d0d0f0d2c0d100d100c2c0d110c100c100d100c2d0c2d0c2d0c2d0c100d2c0d100c100d100c2d0d2c0d100c100d2c0d0f0d100d000d05000000000000000000000000", | |
"aircon_off":"26005c030003eb00068c6c380d2b0c0f0c100c0f0d0f0c0f0d0f0c0f0d0f0c100c0f0c100c2b0c0f0d0f0c0f0d0f0c100c0f0c100c0f0d0f0c0f0d0f0c100c0f0c100c0f0d0f0c0f0d2a0d0f0c2b0c2b0d2a0d2a0d2b0c2b0c0f0d2a0d2a0d2b0c2b0c2b0c |
This file contains hidden or 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
public struct IntToBool: Codable { | |
public var value: Bool | |
public init(from decoder: Decoder) throws { | |
let container = try decoder.singleValueContainer() | |
let intValue = try container.decode(Int.self) | |
self.value = (intValue != 0) | |
} | |
public init(value: Bool) { |