Skip to content

Instantly share code, notes, and snippets.


Martin Krajč mkrajc

  • Košice, Slovakia
View GitHub Profile
mkrajc / es_query.json
Last active July 31, 2020 11:38
Query for familyName:Malik givenName:Ranjit Singh
View es_query.json
"version": true,
"query": {
"function_score": {
"query": {
"bool": {
"must_not": [{
"term": {
"publisher": {
"value": "Spaactor GmbH"
mkrajc / BoundedPriorityQueue.scala
Created March 25, 2020 10:05
Scala BoundedPriorityQueue
View BoundedPriorityQueue.scala
import java.util
import java.util.PriorityQueue
import scala.collection.JavaConverters._
object BoundedPriorityQueue {
// since heap does not preserve order for the elements of the same priority,
// each element will be wrapped together with its incremental ordinal number
View Pangrams.scala
object Pangrams {
def main(args: Array[String]): Unit = {
private val pangram = 67108863
def isPangram(s: String): String = {
var i = 0
var bitmask = 0
package org.mech;
import java.util.concurrent.TimeUnit;
import io.reactivex.Observable;
import io.reactivex.Scheduler;
import io.reactivex.disposables.Disposable;
import io.reactivex.observables.ConnectableObservable;
import io.reactivex.schedulers.Schedulers;
View gist:4336016129711265217b74346dad7d9e
package org.mech;
import java.util.concurrent.Callable;
import java.util.concurrent.Executors;
import io.reactivex.Observable;
import io.reactivex.Observer;
import io.reactivex.annotations.NonNull;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;