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 keras.backend as K | |
from keras.callbacks import TensorBoard | |
class TensorBoardWrapper(TensorBoard): | |
""" | |
Wrapper for Tensorboard Keras callback. Pass a single batch from validation generator. | |
""" | |
def __init__(self, validation_data, *args, **kwargs): | |
super(TensorBoardWrapper, self).__init__(*args, **kwargs) |
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 static com.nineoldandroids.view.ViewHelper.setAlpha; | |
import static com.nineoldandroids.view.ViewPropertyAnimator.animate; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; | |
import android.annotation.SuppressLint; | |
import android.graphics.Rect; | |
import android.view.MotionEvent; |
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 static float getMaximumTilt(float zoom) { | |
// for tilt values, see: | |
// https://developers.google.com/maps/documentation/android/reference/com/google/android/gms/maps/model/CameraPosition.Builder?hl=fr | |
float tilt = 30.0f; | |
if (zoom > 15.5f) { | |
tilt = 67.5f; | |
} else if (zoom >= 14.0f) { | |
tilt = (((zoom - 14.0f) / 1.5f) * (67.5f - 45.0f)) + 45.0f; |