Skip to content

Instantly share code, notes, and snippets.

View chmllr's full-sized avatar

Christian Müller chmllr

View GitHub Profile
# THE [TAGGR NETWORK](https://taggr.link/#/feed/Taggr) NAMED NEURON
We, the Taggr DAO, propose to register a named neuron Taggr Network with the id `16737374299031693047` to diversify the landscape of named neurons and to bring more innovation into the space of NNS governance. Our neuron will cast its vote based on the collective votes of Taggr users. In the following sections we explain why our neuron could be very attractive to follow and why it hopefully represents a clear improvement upon the status quo.
### TECHNICAL DECENTRALIZATION
Our neuron has no controllers other than the [Taggr canister](https://taggr.link/#/) (as a hot-key) which is fully decentralized itself. The neuron was spawned to a [principal without a known private key](https://forum.dfinity.org/t/how-to-create-a-decentralized-community-neuron/12564), then the Taggr canister was added as a hot-key and, finally, all followees on the neuron management topic 1 were removed. Hence, our neuron has provably no controllers other than one hot-k

Keybase proof

I hereby claim:

  • I am chmllr on github.
  • I am mllr (https://keybase.io/mllr) on keybase.
  • I have a public key whose fingerprint is A203 A4E0 D6E4 A297 5A9B 3DA4 17E0 1466 1329 CB0A

To claim this, I am signing this object:

@chmllr
chmllr / primes.js
Created March 22, 2016 10:29
primes count
/**
* @param {number} n
* @return {number}
*/
var countPrimes = function(n) {
if (n < 3) return 0;
var primes = new Array(n);
primes.fill(true, 0, n);
for (var i = 4; i < n; i +=2) primes[i] = false;
var j = 3;
var n = readline();
var houses = readline().split(" ");
var max = -1, L = houses.length, result = new Array(n);
for (var i = L-1; i>=0; --i) {
var T = houses[i];
result[i] = T > max ? 0 : max - T + 1;
max = Math.max(T, max);
}
var containsNearbyAlmostDuplicate = function (nums, k, t) {
if (k < 1 || t < 0 || nums.length < 2) return false;
var B = {}, MIN = -1 * 2147483648;
for (var i = 0; i < nums.length; ++i) {
var N = nums[i] - MIN;
var bucket = Math.floor(N / (t+1));
if (bucket in B ||
(bucket - 1) in B && Math.abs(B[bucket - 1] - N) <= t ||
(bucket + 1) in B && Math.abs(B[bucket + 1] - N) <= t)
return true;
var containsNearbyAlmostDuplicate = function (nums, k, t) {
if (k < 1 || t < 0 || nums.length < 2) return false;
var B = {}, MIN = -1 * 2147483648;
for (var i = 0; i < nums.length; ++i) {
var N = nums[i] - MIN;
var bucket = Math.floor(N / t);
var list = B[bucket] || [];
var cands = list.concat(B[bucket - 1] || [], B[bucket + 1] || []);
for (var i = 0; i < cands.length; ++i) {
var x = cands[i];
var combinationSum = function (candidates, target) {
candidates.sort(function (a, b) { return a - b });
var C = {};
var f = function (n) {
if (n in C) return C[n];
var result = [];
if (n > 0)
candidates.forEach(function (cand) {
if (n == cand) result.push([cand]);
else f(n - cand).forEach(function (comb) {
### Keybase proof
I hereby claim:
* I am chmllr on github.
* I am mllr (https://keybase.io/mllr) on keybase.
* I have a public key whose fingerprint is AB1C D595 F657 ED01 E94D 9B83 F1F6 360E EA40 67EF
To claim this, I am signing this object:
public class Solution {
interface Operation {public int op(int a, int b);}
class Add implements Operation{public int op(int a, int b){return a+b;}}
class Sub implements Operation{public int op(int b, int a){return a-b;}}
class Mul implements Operation{public int op(int a, int b){return a*b;}}
class Div implements Operation{public int op(int b, int a){return a/b;}}
public Operation getOp(String t) {
switch(t){
case "+": return new Add();
case "-": return new Sub();
import java.util.*;
class HPYNOS {
public static void main(String[]args){
Scanner s = new Scanner(System.in);
int[] cache = new int[800];
int N = s.nextInt();
int count = 0;
do {
N = breakIt(N);