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
@chmllr
chmllr / gist:1005060
Created June 2, 2011 19:06
JS Hash Function
function hashIt(str)
{
// just a cyclic rotation
var rotateBy = function(s,N) { for (var i = 0; i < N; i++) s.unshift(s.pop()); }
// take a random string and convert it to char array
var alphabet = "1L,$G=JD'W)7QYC02M#</@B3-AUF*!VT8H(RO;:45&NXZ+PKES>.?I6%9".split("");
// set the initial value of the hash to the first 16 chars of the alphabet
var hash = alphabet.slice(0,16);
// we go through the string
for (var i = 0; i < str.length; i++)

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;
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);
#include <stdio.h>
long res, tmp;
int T, N;
int main() {
scanf("%d", &T);
while(T-->0){
scanf("%d", &N);
res = 0;
while(N-->0) {
scanf("%lu", &tmp);
import java.util.Scanner;
public class WAYS2 {
static String[] mx;
static int[][] cache;
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int m = s.nextInt(), n = s.nextInt();
mx = new String[m];
cache = new int[m][n];
local wall = {}
local M, N = io.read("*n"), io.read("*n")
io.read()
for i = 1, M do
table.insert(wall, io.read("*l"))
end
local blocks = {}
setmetatable(blocks, { __index = function(t, k) return 0 end })
import java.util.Scanner;
public class EDIST {
static int N = 2100;
static int[][] cache = new int[N][N];
static String a;
static String b;
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int T = s.nextInt();
local cache, q, p
function solve(a, b)
if(a == 0) then return b end
if(b == 0) then return a end
local k = a * 2010 + b
local v = cache[k]
if(v) then return v end
local result
local tmp = solve(a-1, b-1)