Skip to content

Instantly share code, notes, and snippets.

@vxgmichel
vxgmichel / udpproxy.py
Created February 2, 2017 10:05
UDP proxy server using asyncio
"""UDP proxy server."""
import asyncio
class ProxyDatagramProtocol(asyncio.DatagramProtocol):
def __init__(self, remote_address):
self.remote_address = remote_address
self.remotes = {}
@mdalp
mdalp / neo4j-contact networks
Last active November 14, 2019 10:45
This Gist wants to show how to take advantage of the Neo4j graph modeling to represent and navigate contact networks.
:neo4j-version: 2.2
:author: Marcello Dalponte
:twitter: @m_dalp
## Contact networks
A contact network is one of the typologies of dynamic networks described in the famous paper of Holme and Saramäki[1].
A dynamic network is a mathematical representation of the evolution of the relationships between entities through graphs.
It's interesting to catch this dynamicity because describes the transitivity of the order of the interactions: if A meets B and after B meets C then A can transmit something to C but not the opposite; this is useful to study the spreading of informations or infections.
An interesting project that aims to collect this kind of data is Sociopatterns[2], where Cattuto and others developed a framework to collect contacts data from RFID sensors [3].