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
# Simple TFServing example; Based on | |
# https://github.com/tensorflow/serving/blob/master/tensorflow_serving/example/mnist_client.py | |
# Added simpler mnist loading parts and removed some complexity | |
#!/usr/bin/env python2.7 | |
"""A client that talks to tensorflow_model_server loaded with mnist model. | |
The client downloads test images of mnist data set, queries the service with | |
such test images to get predictions, and calculates the inference error rate. | |
Typical usage example: |
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
{ | |
"template": "logstash-*", | |
"settings" : { | |
"number_of_shards" : 180, | |
"number_of_replicas" : 1, | |
"index.refresh_interval" : "5s", | |
"index.routing.allocation.total_shards_per_node" : 4, | |
"index.search.slowlog.threshold.query.warn": "100ms", | |
"index.search.slowlog.threshold.fetch.warn": "100ms", |
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
# first turn off accelerometer controlling the orientation | |
adb shell content insert --uri content://settings/system --bind name:s:accelerometer_rotation --bind value:i:0 | |
# then set orientation | |
shopt -s nocasematch | |
if [ "$ORIENTATION" == "portrait" ] | |
then | |
adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:0 | |
elif [ "$ORIENTATION" == "landscape" ] | |
then |
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
/** | |
* Example build descriptor that builds and runs Robolectric unit tests in src/test for an Android | |
* app project in the 'app' module of the project. | |
*/ | |
apply plugin: 'java' | |
test { | |
// Robolectric expects to find AndroidManifest.xml and res/ in the working directory | |
workingDir androidManifestDir(project(':app'), '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
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.8+' | |
} | |
} |
NewerOlder