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
// Robolectric のApplicationContext | |
val context = RuntimeEnvironment.application | |
// Testing Support LibraryのApplicationContext | |
val context = InstrumentationRegistry.getTargetContext() |
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
#include <stdio.h> | |
#include "worker.h" | |
void cb(int hoge) { | |
printf("value: %d\n", hoge); | |
} | |
int main() { | |
DoSomeCallback(cb); | |
} |
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
from keras.applications.inception_v3 import InceptionV3 | |
from keras.applications.inception_v3 import preprocess_input | |
from keras.models import Sequential, Model | |
from keras.layers import Dense, Dropout, Activation, Flatten | |
from keras.layers import Convolution2D, MaxPooling2D, ZeroPadding2D, GlobalAveragePooling2D, AveragePooling2D | |
from keras.preprocessing.image import ImageDataGenerator | |
from keras.callbacks import ModelCheckpoint, CSVLogger, LearningRateScheduler, ReduceLROnPlateau | |
from keras.optimizers import SGD | |
from keras.regularizers import l2 | |
import matplotlib.image as mpimg |
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
headers = | |
headers.osx = CoreFoundation/CoreFoundation.h | |
compilerOpts = | |
compilerOpts.osx = -framework CoreFoundation -Wall |
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
{ | |
"artwork": { | |
"id": "vector", | |
"canvasColor": null, | |
"width": 24, | |
"height": 24, | |
"layers": [ | |
{ | |
"id": "path", | |
"type": "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
fun main(args: Array<String>) { | |
val tmpPath = File(System.getProperty("java.io.tmpdir")).toPath() | |
val fileAttribute = PosixFilePermissions.asFileAttribute(PosixFilePermissions.fromString("rwxrwx---")) | |
val tmpDir = Files.createTempDirectory( | |
tmpPath, | |
"hogehoge", | |
fileAttribute | |
).toFile() | |
val git = Git. | |
init(). |
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
#include "ergodox_ez.h" | |
#include "debug.h" | |
#include "action_layer.h" | |
#define BASE 0 // default layer | |
#define SYMB 1 // symbols | |
#define MDIA 2 // media keys | |
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |
/* Keymap 0: Basic layer |
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 com.example; | |
import com.google.auto.service.AutoService; | |
import com.google.common.collect.Sets; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.io.Writer; | |
import java.util.Set; |
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
class IntentDelegateExt { | |
operator fun getValue(thisRef: Activity, property: KProperty<*>): String? = | |
thisRef.intent.getStringExtra(property.name) | |
} |
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 net.kikuchy.compatkotlinextention | |
import android.content.Context | |
import android.content.Intent | |
import android.os.Bundle | |
import android.support.v4.content.ContextCompat | |
/* | |
Copyright 2016 kikuchy |