This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import urllib2 | |
import pcap #requires the python-libpcap module | |
def libpcap_net_data(cap_file, net_iface, filter_expr=None): | |
"""A decorator that can be used to sniff network data for the duration of a function call | |
if there is heavy traffic on the network interface the captured data will contain spurious packets | |
not related to the function call |
This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from kivy.uix.label import Label | |
from kivy.graphics import Color | |
from kivy.graphics import Rectangle | |
from kivy.metrics import sp | |
from kivy.logger import Logger | |
from kivy.properties import ListProperty, BooleanProperty |
This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
#Based on http://amundsen.com/media-types/collection/format/ | |
import json | |
from collections import OrderedDict as odict | |
#from ContentType import ContentType | |
import logging | |
COLLECTION = 'collection' |