I hereby claim:
- I am juanplopes on github.
- I am juanplopes (https://keybase.io/juanplopes) on keybase.
- I have a public key ASAbnYPzQC3kur2g1skku3Eodfvw_egjtxXfetmlGRTC-wo
To claim this, I am signing this object:
| (async () => { | |
| var get = async(url, prop, dataless) => { | |
| var data = (await (await fetch(url)).json()); | |
| if (!dataless) data = data.data; | |
| | |
| var result = {}; | |
| data.forEach(element => { | |
| result[element[prop]] = element; | |
| }); | |
| return result; |
| #include <iostream> | |
| using namespace std; | |
| int X[200]; | |
| int trucks(int P, int maximum) { | |
| int count = 0, current = 0; | |
| for(int i=0; i<P; i++) { | |
| if (X[i] > maximum) return 10000000; | |
| if (current + X[i] > maximum) { |
| import java.io.IOException; | |
| import java.io.OutputStream; | |
| public class LazyOutputStream<T extends OutputStream> extends OutputStream { | |
| private final Factory<T> factory; | |
| private T stream; | |
| public LazyOutputStream(Factory<T> factory) { | |
| this.factory = factory; | |
| } |
| #include <iostream> | |
| #include <string> | |
| #include <cstring> | |
| #include <vector> | |
| #include <cmath> | |
| #include <set> | |
| using namespace std; | |
| int T[][501] = {{0,1,1,2,2,2,3,3,3,3,4,4,4,4,4,5,5,5,5,5,5,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24, |
| #!/usr/bin/env python | |
| import httplib, getpass, base64, json, datetime, sys, socket, xml.etree.ElementTree as ET, os.path as path, os | |
| NS = {'n':'http://maven.apache.org/SETTINGS/1.0.0'} | |
| DEFAULT_REPO_KEY = 'your-repo-key' | |
| def make_auth(username, password): | |
| return base64.b64encode('{}:{}'.format(username, password)) | |
| def make_token(repokey, username, password, token2fa): |
| def cnt(v): | |
| x, y, z, u, w = bool(v&1), bool(v&2), bool(v&4), bool(v&8), bool(v&16) | |
| return ("T" if | |
| (x or y or w) and (z or not w or v) and (not z or not w or not v) and | |
| len(set([x, y, w])) == 2 and | |
| len(set([z, not w, v])) == 2 and | |
| len(set([not z, not w, not v])) == 2 | |
| else "F") | |
| import sys | |
| def kmp_init(P): | |
| F = [0] * (len(P)+1) | |
| i, j = 1, 0 | |
| while i<len(P): | |
| if P[i] == P[j]: | |
| i += 1; j += 1; F[i] = j | |
| elif j == 0: | |
| i += 1; F[i] = 0 |
| def primes_up_to(N): | |
| sieve = N*[True] | |
| for i in range(2, N): | |
| if not sieve[i]: continue | |
| yield i | |
| for j in range(i*i, N, i): | |
| sieve[j] = False | |
| def primeFactors(N): | |
| answer = '' |
I hereby claim:
To claim this, I am signing this object:
| #include <iostream> | |
| #include <algorithm> | |
| #include <sstream> | |
| #include <string> | |
| #include <iomanip> | |
| using namespace std; | |
| int DD[6] = {4, 6, 8, 10, 12, 20}; | |
| double D[6][25][500]; |