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
# Using @Parameterized.Parameters(name = "{0}") | |
# Command | |
adb shell am instrument -w -e class com.banno.android.gordontest.ParameterizedTest#parameterizedC -r -e debug false com.banno.android.gordontest.test/androidx.test.runner.AndroidJUnitRunner | |
# Output | |
INSTRUMENTATION_STATUS: class=com.banno.android.gordontest.ParameterizedTest | |
INSTRUMENTATION_STATUS: current=1 | |
INSTRUMENTATION_STATUS: id=AndroidJUnitRunner | |
INSTRUMENTATION_STATUS: numtests=1 |
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
# Command | |
adb shell am instrument -w -e class com.banno.android.gordontest.ParameterizedTest#parameterizedC -r -e debug false com.banno.android.gordontest.test/androidx.test.runner.AndroidJUnitRunner | |
# Output | |
INSTRUMENTATION_STATUS: class=com.banno.android.gordontest.ParameterizedTest | |
INSTRUMENTATION_STATUS: current=1 | |
INSTRUMENTATION_STATUS: id=AndroidJUnitRunner | |
INSTRUMENTATION_STATUS: numtests=2 | |
INSTRUMENTATION_STATUS: stream= | |
com.banno.android.gordontest.ParameterizedTest: |
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
# Command: | |
adb shell am instrument -w -e class com.banno.android.gordontest.ParameterizedTest#parameterizedB -r -e debug false com.banno.android.gordontest.test/androidx.test.runner.AndroidJUnitRunner | |
# Output: | |
INSTRUMENTATION_STATUS: class=com.banno.android.gordontest.ParameterizedTest | |
INSTRUMENTATION_STATUS: current=1 | |
INSTRUMENTATION_STATUS: id=AndroidJUnitRunner | |
INSTRUMENTATION_STATUS: numtests=2 | |
INSTRUMENTATION_STATUS: stream= | |
com.banno.android.gordontest.ParameterizedTest: |
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
// Lib build file | |
android { | |
buildTypes { | |
release { | |
minifyEnabled true | |
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | |
} | |
} | |
} |
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
public class TrackingCommandsExecutor implements Executor { | |
private final Queue<CountDownLatch> commandLatches = new ConcurrentLinkedQueue<>(); | |
private final Executor delegate; | |
public TrackingCommandsExecutor(Executor delegate) { | |
this.delegate = delegate; | |
} | |
@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
allInstruments.stream() | |
.filter(missingCross) | |
.flatMap(instrument -> Stream.of(instrument.getCurrency(), instrument.getBaseCurrency())) | |
.filter(cur -> cur != refCurrency) | |
.map(cur -> Forex.create(refCurrency, cur)) | |
.filter(not(allInstruments::contains)) | |
.iterator(); |
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 math | |
import numpy as np | |
import bisect | |
from heapq import * | |
def a_star(B, E, D, H, N): | |
""" | |
B : begin Point | |
E : end Point | |
D : distance (Point, Point) -> Real |
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 scipy.misc import imread, imsave | |
from scipy import ndimage | |
import numpy as np | |
import math | |
def circle(radius): | |
""" Product a boolean array with a shape of circle inside (True inside the | |
circle and False outside). """ | |
assert radius >= 1 | |
radius -= 1 |
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
# Point : nametuple x : Real, y : Real, db: Real, de: Real, parent : Point | |
# db: real distance from the beginning | |
# de : heuristic distance from the end | |
def a_star(B, E, D, H, N): | |
""" | |
B : begin Point | |
E : end Point | |
D : distance (Point, Point) -> Real | |
H : heuristic distance (Point, Point) -> Real |
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 PIL import Image | |
import numpy as np | |
def image2array(filname): | |
return np.array(Image.open(filename)) |
NewerOlder