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
# This is a sample ude rules file to staticaly assign names to sound cards (in this case USB) that have the exact | |
# same product, vendor and serial number. This normally creates card names in pulseaudio that are a combination of this | |
# attributes plus an auto incrementing numbering, the problem is that the cards will get their names depending on the | |
# order the cards are plugged in. | |
# This udev rules fixes that issues by assigning a name to any card that is plugged in the same USB port, I don't know | |
# any other way. | |
# | |
# Name this file something like /etc/udev/rules.d/95-identical-cards-names.rules | |
# The list of cards should be changed to match your system, the only lines you are supposed to change/remove/add | |
# are DEVPATHs, look a the comments comments to see where to get the soundcard path. |
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
# This is a sample ude rules file to staticaly assign names to sound cards (in this case USB) that have the exact | |
# same product, vendor and serial number. This normally creates card names in pulseaudio that are a combination of this | |
# attributes plus an auto incrementing numbering, the problem is that the cards will get their names depending on the | |
# order the cards are plugged in. | |
# This udev rules fixes that issues by assigning a name to any card that is plugged in the same USB port, I don't know | |
# any other way. | |
# | |
# Name this file something like /etc/udev/rules.d/95-identical-cards-names.rules | |
# The list of cards should be changed to match your system, the only lines you are supposed to change/remove/add | |
# are DEVPATHs, look a the comments comments to see where to get the soundcard path. |
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
#EXTM3U | |
#EXT-X-VERSION:3 | |
#EXT-X-MEDIA-SEQUENCE:0 | |
#EXT-X-TARGETDURATION:12 | |
#EXT-X-DISCONTINUITY | |
#EXTINF:8.333, | |
mystream-0.ts | |
#EXTINF:8.333, | |
mystream-1.ts | |
#EXTINF:8.334, |
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
from geographiclib.geodesic import Geodesic | |
from geographiclib.polygonarea import PolygonArea | |
# Polygon for roof at http://maps.googleapis.com/maps/api/staticmap?center=33.402285,-111.942715&zoom=20&size=300x300&maptype=satellite&sensor=false&path=color%3ared%7Cweight:1%7Cfillcolor%3awhite%7C33.4022475,-111.9426775%7C33.4022475,-111.9427525%7C33.4023225,-111.9427525%7C33.4023225,-111.9426775%7C33.4022475,-111.9426775 | |
roof_polygon = PolygonArea(Geodesic.WGS84) | |
roof_polygon.AddPoint(33.4022475, -111.9426775) | |
roof_polygon.AddPoint(33.4023225, -111.9426775) | |
roof_polygon.AddPoint(33.4023225, -111.9427525) | |
roof_polygon.AddPoint(33.4022475, -111.9427525) | |
roof_polygon.AddPoint(33.4022475, -111.9426775) |
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
import diesel | |
from diesel import (Client, call, until_eol, until, receive, | |
fire, send, first, fork, sleep) | |
import uuid | |
AMI_PORT = 5038 | |
class AsteriskAMIError(Exception): pass |
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
mpaolino@guacamole:~$ cat bench_slice.py | |
import numpy | |
import timeit | |
def splitit(arraylist): | |
step = 10 | |
frame = 160 | |
while len(arraylist) >= frame: | |
newlist = arraylist[:frame] | |
arraylist = arraylist[step:] |