Skip to content

Instantly share code, notes, and snippets.

@lukesnow
lukesnow / rainlogger.pyui
Created October 25, 2016 04:53
rainlogger.pyui
[
{
"class" : "View",
"attributes" : {
"name" : "rainlogger",
"background_color" : "RGBA(1.000000,1.000000,1.000000,1.000000)",
"tint_color" : "RGBA(0.000000,0.478000,1.000000,1.000000)",
"enabled" : true,
"border_color" : "RGBA(0.000000,0.000000,0.000000,1.000000)",
"flex" : ""
@lukesnow
lukesnow / pointsplus.py
Created September 30, 2015 02:40
pointsplus.py
import csv, os
from datetime import date
d = date.today()
#global pointday
#global dailypoints
#global weeklypoints
#global wkcntr
# Assume data is stored in points.dat file.
@lukesnow
lukesnow / tcp_test_client_v2.py
Created August 16, 2015 03:45
tcp_test_client_v2.py
# credits
# https://github.com/roger-/pyrtlsdr/blob/master/rtlsdr/rtlsdr.py
# https://gist.github.com/simeonmiteff/3792676
# http://stackoverflow.com/questions/23732930/how-to-check-if-all-data-are-received-with-a-tcp-socket-in-python?rq=1
import socket
import struct
import numpy as np
import sound
import wave
import sys
@lukesnow
lukesnow / am_radio.py
Created August 9, 2015 19:19
A simple AM radio.
#!/usr/local/bin/python
from rtlsdr import RtlSdr
import scipy.signal as spsi
from scipy.io.wavfile import write
import numpy as np
sdr = RtlSdr()
freq_offset = 124996881 # Hz Use this offset when ham-it-up is turned on.
@lukesnow
lukesnow / txt2xlsx.sh
Created August 17, 2014 03:46
Linux - convert txt/csv to xlsx
# File can be space or comma separated.
# ssconvert is part of gnumeric.
ssconvert test.txt test-txt.xlsx
# File must be delimited with commas. This can be done via:
# cat test.txt | tr " " "," > test.csv
soffice --headless --convert-to xlsx:"Calc MS Excel 2007 XML" test.csv