Skip to content

Instantly share code, notes, and snippets.

@mdavey
mdavey / get-sources.py
Last active August 29, 2015 14:23
wow we suck
__author__ = 'Matthew'
import re
import urllib
def parse_reportlist(filename):
counter = 999
urls = []
with open(filename, 'r') as f:
@mdavey
mdavey / tp-w8961n-status.py
Created November 16, 2015 00:54
Example code for talking to a TP-Link TD-W8961N modem/router
import telnetlib
import re
import time
class TPW8961N(object):
def __init__(self, host):
self.host = host
options:
parameters:
author: ''
catch_exceptions: 'True'
category: '[GRC Hier Blocks]'
cmake_opt: ''
comment: ''
copyright: ''
description: ''
gen_cmake: 'On'
'Power dbm/watts conversion program for MMBasic
sub Wait_For_Enter ()
PRINT
INPUT "Press enter to return to menu..."; DUMMY$
end sub
Sub Dbm_To_Watts()
' draw basic gradient for picocalc MMBasic
sub Draw()
local x
local y
local width = 320
local height = 320
for x = 0 to width-1
for y = 0 to height-1