Before starting with the recently published Trade Me app for jobs hunters, we spent some time reading and thinking about how we can build a stable app and how to make sure that the quality of the app is maintained over time.
I’ll not be covering in this post stuff like having a CI (we use Jenkins), choosing to go with basic MVP, DI (Dependency Injection), mocking HTTP responses, etc… And the value of having presenters like simplifying writing unit tests and forming a habit of writing new test cases to cover new code. …
There are many reasons why we might want to build docker images inside of a Kubernetes cluster. Reasons are out of scope of this post but one reason might be to integrate them in you CI pipelines.
Build and push docker images inside of k8s as you please, on the other hand running containers can be very problematic. It is problematic because k8s will not know about these containers and will not be able to manage them. This just defeats the purpose of using k8s in the first place.
That said if you really need to run unmanaged containers on…
Let us say the designer in your team handed you this beautifully custom button to implement.
It looks nice, it flat, not much to it really. Should be easy to implement.
First you create a
StateListDrawable , easy!
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true">
<shape android:shape="rectangle"> <solid android:color="@color/color_dhuhr_background_pressed" /> <corners
# Run the code multiple times and find mean runtime
%%timeit CODE_CELL# Run once and report
!prefix to run a single bash command…
The following is based on my experience working on various Android apps for the past few years and seeing how the framework and the development ecosystem evolved over time.
We have 2 options if you want to play media files on Android:
ExoPlayer is easier to work with and it supports features currently not supported by
MediaPlayer APIs. The main downside in using
ExoPlayeraccording to its docs is that:
For audio only playback on some devices, ExoPlayer may consume significantly more battery than MediaPlayer. (1)
Before we start coding let us think about the main cases we want to handle:
Given an image containing lines of text, returns a pixelwise labeling of that image, with each pixel belonging to either background or line of handwriting.
It consists of 5 main sections, one for notebooks, one for the shared python code, datasets, Google Cloud scripts and one for saving the model weights.
In a production project, you will probably have more directories like
I also chose to use
pipenv instead of
virtualenv to manage my python environment. I only…
Anyway, starting on a relatively small and new codebase meant that I could try a few things end to end and have a 100% Kotlin codebase. Here are my takes!
One of the first decisions I made was deciding on using a 2 gradle builds (debug/dev and release) setup. …
One widely accepted intuition is that CNNs combine low-level features like edges to increasingly complex shapes such as wheels, car windows until the object like a car can be readily classified, they termed that as shape hypothesis. This hypothesis is supported by a number of empirical findings. Visualisation techniques like De- convolutional Networks often highlight object parts in high-level CNN features.
CNNs can still classify texturised images perfectly well, even if the global shape structure is completely destroyed. Conversely, standard CNNs are bad at recognising object sketches where object shapes are preserved yet all texture cues are missing. Two studies…
The main goal of this paper is to maximise face class separability by introducing a new loss function that is highly discriminative to features for face recognition.
According to the writers of this paper, their method showed the best results compared to other loss functions that are good with face recognition like triplet loss, intra-loss and inter-loss. I only compared ArcFace loss with Softmax loss and the improvement was quite noticeable.
Softmax loss has some drawbacks, one of them is that it does not explicitly optimize the feature embedding to enforce higher similarity for intra-class samples and diversity for inter-class…
An Android Pro, built million-downloads app. Y-Combinator alumni. I write about ML and Android