View example.go
package myapp | |
import "log" | |
... | |
mobilelog := MobileLogger{} | |
logger := log.New(mobilelog, "", 0) |
View crawler.py
#some of this code was contributed by Arcelier | |
#original code https://github.com/Arceliar/yggdrasil-map/blob/master/scripts/crawl-dht.py | |
#multithreaded by neilalexander | |
import psycopg2 | |
import json | |
import socket | |
import sys | |
import time | |
import ipaddress |
View deltadict.py
class DeltaDict: | |
# | |
# changes(dict1, dict2) returns dict | |
# | |
# Finds nodes that appear in both dict1 and dict2 but | |
# where the values have changed | |
# | |
def changes(d1, d2): | |
d = dict() | |
s = set(d1.keys()).intersection(set(d2.keys())) |
View sendall.c
#include <sys/socket.h> | |
#include <net/if.h> | |
#include <sys/ioctl.h> | |
#include <ifaddrs.h> | |
#include <stdlib.h> | |
#include <netdb.h> | |
#include <netinet/in.h> | |
#include <stdio.h> | |
#include <string.h> |