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/bash | |
adb kill-server | |
adb start-server | |
echo "Connect device with usb cable" | |
adb wait-for-device | |
ANDROID_IP=`adb shell ifconfig wlan0 | awk '/inet addr/ {gsub("addr:", "", $2); print $2}'` | |
adb tcpip 5555 | |
adb connect $ANDROID_IP:5555 |
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
version: 0.2 | |
phases: | |
pre_build: | |
commands: | |
build: | |
commands: | |
- echo Build started on `date` | |
- ./gradlew clean check assembleDebug |
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
... | |
apply plugin: 'kotlin' | |
apply plugin: "jacoco" | |
... | |
jacocoTestReport { | |
group = "Reporting" | |
reports { |
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
version: 0.2 | |
phases: | |
pre_build: | |
commands: | |
build: | |
commands: | |
- echo Build started on `date` | |
- ./gradlew clean check assembleDebug | |
post_build: |
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 ubuntu:16.04 | |
# Never ask for confirmations | |
ENV DEBIAN_FRONTEND noninteractive | |
# Update apt-get | |
RUN rm -rf /var/lib/apt/lists/* && \ | |
apt-get update && \ | |
apt-get dist-upgrade -y && \ | |
apt-get install -y \ |
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
def to_dict(obj): | |
if not hasattr(obj, "__dict__"): | |
return obj | |
result = {} | |
for key, val in obj.__dict__.items(): | |
if key.startswith("_"): | |
continue | |
element = [] | |
if isinstance(val, list): | |
for item in val: |
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 Foo: | |
def __init__(self): | |
self.a = 10 | |
self.b = 'simple' | |
def to_dict(obj): | |
return obj.__dict__ | |
def to_dict2(obj): | |
d = {} |
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
interface ICommand { | |
String getKey(); | |
void onChange(Map<String, Object> props); | |
} | |
class NotifyTextView extends TextView implements ICommand { | |
... | |
@Override |
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
import numpy as np | |
def to_mean_binary(x, mean): | |
return 0 if x >= mean else 1 | |
binary_vectorize = np.vectorize(to_mean_binary) | |
def array_binary_sampling(x, step=4): | |
sampled = x[0::step] | |
return binary_as_word(binary_vectorize(sampled, sampled.mean())) |
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 multiprocessing import Pool | |
import glob | |
import os | |
import sys | |
import cv2 | |
_sift = cv2.SIFT() | |
def print_surf(folder, is_bulk=True): | |
extensions = ("*.jpg", "*.jpeg") |
NewerOlder