This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package myapp | |
import "log" | |
... | |
mobilelog := MobileLogger{} | |
logger := log.New(mobilelog, "", 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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())) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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> |