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
while True: | |
line = ser.readline() | |
if (line.find("-") < 0) and (line.__len__() > 16): | |
hexdata = line.rstrip() | |
#We need five bits to detect the group type, so turn it into binary: | |
binaryLine = bin(int(hexdata, 16))[2:].zfill(64) | |
#RadioText-A: | |
if binaryLine[16:21] == "00100": |
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
"""Pexpect is a Python module for spawning child applications and controlling | |
them automatically. Pexpect can be used for automating interactive applications | |
such as ssh, ftp, passwd, telnet, etc. It can be used to a automate setup | |
scripts for duplicating software package installations on different servers. It | |
can be used for automated software testing. Pexpect is in the spirit of Don | |
Libes' Expect, but Pexpect is pure Python. Other Expect-like modules for Python | |
require TCL and Expect or require C extensions to be compiled. Pexpect does not | |
use C, Expect, or TCL extensions. It should work on any platform that supports | |
the standard Python pty module. The Pexpect interface focuses on ease of use so | |
that simple tasks are easy. |
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
''' | |
This is a simple wrapper for BASS FX in Python, based on PyBASS. | |
It's incomplete code, but demonstrates basic functionality of the FX plugin in Python. | |
Feel free to do whatever you like with this. Make it your own. | |
More info: http://mediarealm.com.au/articles/2014/08/un4seen-bass-audio-library-python/ | |
''' | |
if platform.system().lower() == 'windows': |
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
DURATION=120\n | |
STRING1=Now: \n | |
STRING2= by \n | |
FORMAT_RT=STRING1+TITLE+STRING2+ARTIST\n | |
AUTO_RT=Y\n | |
AUTO_RTPLUS=Y\n | |
RT_DELAY=3\n | |
TITLE=This is Living\n | |
ARTIST=Young and Free\n |
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
import serial | |
def updateRDS(comPort, title, artist, duration): | |
serialConnection = serial.Serial(comPort) | |
serialConnection.write("DURATION=" + str(int(duration)) + "\n") | |
serialConnection.write("STRING1=Now: \n") | |
serialConnection.write("STRING2= by \n") | |
serialConnection.write("FORMAT_RT=STRING1+TITLE+STRING2+ARTIST\n") | |
serialConnection.write("AUTO_RT=Y\n") |
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
""" | |
Azure Table Storage - Python Batching Example | |
(C) 2016 MediaRealm.com.au | |
Needs v0.30.0 of the Azure Storage Python SDK | |
https://github.com/Azure/azure-storage-python/releases/tag/v0.30.0 | |
""" | |
from azure.storage.table import TableService, Entity, TableBatch |
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
<?php | |
// Sample Appeal Tally - Wordpress Plugin | |
// Provided by Anthony Eden | |
// Finds and returns various appeal figures for embedding on our pages | |
// This should be loaded via AJAX, as we don't want a blocking script on our page | |
//All returned data will be in JSON format | |
header('Content-type: text/json'); |
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
<mount> | |
<mount-name>/mountname</mount-name> | |
<password>hackme</password> | |
<!-- Geo-blocking can be added to any mount, but not relays --> | |
<authentication type="url"> | |
<option name="listener_add" value="http://example.com/icecast_geoblock.php?mount=mountmame" /> | |
<option name="auth_header" value="icecast-auth-user: 1" /> | |
</authentication> | |
</mount> |
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
# coding: utf-8 | |
""" | |
Converts Paradox databases to Python objects or CSV. | |
You don't need any dependency (except Python) to make this module work. | |
This module is incomplete but reads most Paradox `.DB` files. | |
If this module is not fast or complete enough for you, consider using pxview. | |
CAUTION: THIS SOFTWARE DOES NOT RELIABLY FETCH ALL DATA FROM PARADOX. CONSIDER USING ODBC DRIVERS INSTEAD. |
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
#!/bin/bash | |
function uploadDreamObjects { | |
# Uploads a single file to the DreamObjects S3-style API | |
# Sample code provided by http://mediarealm.com.au/ | |
# Based on https://gist.github.com/chrismdp/6c6b6c825b07f680e710 | |
# Also https://raw.githubusercontent.com/fredericofs/s3.bash/master/simple_version_working | |
# And http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
OlderNewer