Skip to content

Instantly share code, notes, and snippets.

View allquantor's full-sized avatar
:shipit:
.

Ivan Morozov allquantor

:shipit:
.
View GitHub Profile
function createSheetsByPromptId() {
// Configurable parameters
var minimumFilledEntries = 50;
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
var sheet = spreadsheet.getActiveSheet(); // get current sheet
// get entire data range
var data = sheet.getDataRange().getValues();
var header = data[0].map(function(name) {
### Keybase proof
I hereby claim:
* I am allquantor on github.
* I am allquantor (https://keybase.io/allquantor) on keybase.
* I have a public key ASDLiMeVjPjBE92VGIo4aGRukCDk5zxUtywfDkgBdMVyJwo
To claim this, I am signing this object:
import java.util.function.Function;
public interface Functor<T, F extends Functor<?,?>> {
<R> F map(Function<T,R> f);
}
import java.util.function.Function;
public abstract class Monad<F, M extends Monad<?, ?>> implements Functor<F, M> {
@allquantor
allquantor / UnionSequence.scala
Created December 28, 2016 21:03
Disjoint set DS
import scala.language._
// https://en.wikipedia.org/wiki/Disjoint-set_data_structure
// Not optimized version
// Supports only integer element sequences starting with 0, where n1 - n2 = -1
object UnionSequence {
def apply(elems: Int*): UnionSequence = {
new UnionSequence(Array(elems:_*) toIndexedSeq)
}