Skip to content

Instantly share code, notes, and snippets.

View EvanOman's full-sized avatar

Evan Oman EvanOman

View GitHub Profile
package testing;
import java.math.BigInteger;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public class IsAnagramDemo
{
/* Get the primes we need */
sealed trait Decidable[+Proof]
final case class Yes[Proof](proof: Proof) extends Decidable[Proof]
final case object No extends Decidable[Nothing]
sealed trait List[+A] {
def nonEmpty: Decidable[this.type <:< ::[A]]
def ::[AA >: A](value: AA): ::[AA] = new ::[AA](value, this)
}
final case object Nil extends List[Nothing] {
def nonEmpty: Decidable[this.type <:< ::[Nothing]] = No
@EvanOman
EvanOman / FiveYoSVM.md
Last active May 26, 2018 17:20
Please explain Support Vector Machines (SVM) like I am a 5 year old.

Please explain Support Vector Machines (SVM) like I am a 5 year old.

Not my work, source: r/copperking on reddit

We have 2 colors of balls on the table that we want to separate.

We get a stick and put it on the table, this works pretty well right?

@timdorr
timdorr / ownerapi_endpoints.json
Created February 11, 2017 14:37
Tesla API Endpoints
{
"AUTHENTICATE": {
"TYPE": "POST",
"URI": "oauth/token",
"AUTH": false
},
"REVOKE_AUTH_TOKEN": {
"TYPE": "POST",
"URI": "oauth/revoke",
"AUTH": true
@soucekv
soucekv / build.gradle
Last active September 26, 2022 11:15
Gradle checkstyle with suppression filter module
//Gist note this is snippet from root build.gradle in project with subprojects
checkstyle {
// use one common config file for all subprojects
configFile = project(':').file('config/checkstyle/checkstyle.xml')
configProperties = [ "suppressionFile" : project(':').file('config/checkstyle/suppressions.xml')]
}