Skip to content

Instantly share code, notes, and snippets.

View swanhtet1992's full-sized avatar
🪶
Studying programming again!

Swan Htet Aung swanhtet1992

🪶
Studying programming again!
View GitHub Profile
'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
- created cats/ and dogs/ subfolders inside train/ and validation/
- put the cat pictures index 0-999 in data/train/cats

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@swanhtet1992
swanhtet1992 / Interceptor.java
Created May 17, 2016 08:44 — forked from alex-shpak/Interceptor.java
Refreshing OAuth token with okhttp interceptors. All requests will wait until token refresh finished, and then will continue with the new token.
private class HttpInterceptor implements Interceptor {
@Override
public Response intercept(Chain chain) throws IOException {
Request request = chain.request();
//Build new request
Request.Builder builder = request.newBuilder();
builder.header("Accept", "application/json"); //if necessary, say to consume JSON

Keybase proof

I hereby claim:

  • I am swanhtet1992 on github.
  • I am sha (https://keybase.io/sha) on keybase.
  • I have a public key whose fingerprint is 4850 3D9F 9D47 47B4 01F9 633E 2C3C 9C5E C6BC CDD2

To claim this, I am signing this object:

/*
* Copyright (C) 2006 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@swanhtet1992
swanhtet1992 / ZgDetector.java
Created May 13, 2015 03:37
Zawgyi detector
package android.widget;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import android.text.TextUtils;
/**
*
* @author SH
*/
@swanhtet1992
swanhtet1992 / Converter.scala
Created May 13, 2015 03:29
Zawgyi <-> Unicode Converter written in Scala
// Zawgyi<>Unicode converter python module
// Based on rules from Parabaik Myanmar Text Converter Copyright (C) 2014 Ngwe Tun (Solveware Solution)
// Copyright (C) 2014 Swan Htet Aung
/**
*
* @author SH (github.com/swanhtet1992)
*/
class ParseParms(val help: String) {
android {
// ...
productFlavors {
screenshot {
applicationId "co.example.uitest.test"
minSdkVersion 18
}
}
@swanhtet1992
swanhtet1992 / build.gradle
Last active August 29, 2015 14:20
build.gradle
android {
// ...
defaultConfig {
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
// ...
}
dependencies {
// ...
androidTestCompile 'com.android.support.test:runner:0.2'
androidTestCompile 'com.android.support.test:rules:0.2'
androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.0'
androidTestCompile 'com.android.support:support-v4:22.1.1'
}