Skip to content

Instantly share code, notes, and snippets.

Avatar

Jin Kwon onacit

  • WeMakePrice
  • Seoul, Korea
View GitHub Profile
View ValueRanges.java
package p_9386c3c805d7da9ebb7b7814daf688b3;
import htmlflow.HtmlView;
import htmlflow.StaticHtml;
import org.xmlet.htmlapifaster.EnumRelType;
import org.xmlet.htmlapifaster.EnumTypeContentType;
import java.awt.*;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
@onacit
onacit / MyersBriggsTypeIndicator.java
Last active Jan 4, 2021
Myers–Briggs Type Indicator
View MyersBriggsTypeIndicator.java
package p_4cb92ba58cd8e8ab40d7e734e1f86ce1;
import javax.validation.constraints.NotNull;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import static java.util.Objects.requireNonNull;
@onacit
onacit / StemAndLeafDiagram.java
Last active Sep 19, 2020
The STEM-AND-LEAF diagram from The Cartoon Guide to Statistics by Larry Gonick & Woollcott Smith
View StemAndLeafDiagram.java
package p_fd0b04b007e395a7fcfc5066898d422d;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.SortedMap;
import java.util.TreeMap;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
@onacit
onacit / ListOldBranchesFromBitBucket.py
Last active Nov 18, 2020
Lists old branches from BitBucket
View ListOldBranchesFromBitBucket.py
import datetime
from datetime import timedelta
import getpass
import json
try:
import requests
except ImportError:
sys.exit("run pip install requests")
from requests.auth import HTTPBasicAuth
import sys
View CaesarCipher.java
import java.util.Arrays;
import java.util.Objects;
public final class CaesarCipher {
/**
* Creates a new instance with specified shift.
*
* @param shift the shift
*/
@onacit
onacit / Ieee754Binary16.java
Last active Feb 24, 2020
Half-precision floating-point in Java
View Ieee754Binary16.java
package p_459caefadb7cee1b2aaa275bcb3013fc;
import static java.lang.Float.floatToIntBits;
import static java.lang.Float.intBitsToFloat;
import static java.lang.Math.pow;
import static java.lang.Math.scalb;
public class Ieee754Binary16 {//implements Comparable<Half> {
// -----------------------------------------------------------------------------------------------------------------
@onacit
onacit / Half.java
Created Feb 8, 2020
Half-precision floating-point in Java
View Half.java
public class Half {
}
@onacit
onacit / docker.gradle.sh
Created Jan 30, 2020
Using docker for building a gradle project with alternative JDKs
View docker.gradle.sh
#!/bin/sh
if [ $# -lt 3 ]; then
echo "Usage: $0 <tag> <tasks...>, e.g. $0 6.0.1-jdk11 -Pprofile=local clean build"
echo "See https://hub.docker.com/_/gradle for available tags"
exit 1
fi
tag="$1"
shift
name=$(basename "$PWD")
docker run -it --rm -u gradle \