Skip to content

Instantly share code, notes, and snippets.

View jplattel's full-sized avatar

Joost Plattel jplattel

View GitHub Profile
# Imports
from wordpress_xmlrpc import Client, WordPressPost
from wordpress_xmlrpc.methods.posts import GetPosts, NewPost
from wordpress_xmlrpc.methods.users import GetUserInfo
import markdown
import sys
import webbrowser
# Converts a markdown file to a post and asks for titles, tags and categories
def post(f):
@jplattel
jplattel / kindle.txt
Created October 13, 2012 09:24
KindleClippings
Furious Gulf (Gregory Benford)
- Highlight on Page 160 | Loc. 2445 | Added on Tuesday, August 16, 2011, 07:54 PM
They plunged toward the boundary sheet of the ergosphere.
==========
Furious Gulf (Gregory Benford)
- Highlight on Page 173 | Loc. 2640 | Added on Tuesday, August 16, 2011, 09:26 PM
“peribarythron.”
==========
import serial
import pusher
# Serial Port
print 'Setting up serialport'
s = serial.Serial('/dev/tty.Bluetooth_Bee_V2-DevB')
# Websocket
#print 'Creating Websocket'
#from websocket import create_connection
@jplattel
jplattel / zeo-freq.py
Created June 3, 2012 11:09
Zeo raw data, frequency bands to CSV
# Imports
from ZeoRawData.BaseLink import BaseLink
from ZeoRawData.Parser import Parser
from ZeoRawData.Utility import filter60hz
d = open('data.txt', 'w')
d.write('timestamp,delta,theta,alpha,beta,gamma\n')
def eventCallback(self, timestamp, version, event):
print event
@jplattel
jplattel / zeo-csv.py
Created June 3, 2012 11:08
Zeo-raw data to CSV
# Imports
from ZeoRawData.BaseLink import BaseLink
from ZeoRawData.Parser import Parser
from websocket import create_connection
def eventCallback(self, timestamp, version, event):
print event
@jplattel
jplattel / KindleToEvernote.py
Created May 9, 2012 10:35
Kindle clippings to Evernote
import os
import time
document = open("My Clippings.txt","r")
data = "".join(document.readlines())
notes = []
try:
clippings = data.split('==========')
@jplattel
jplattel / zeo.py
Created March 27, 2012 21:09
Zeo Raw Data to OSC
# Imports
from ZeoRawData.BaseLink import BaseLink
from ZeoRawData.Parser import Parser
import OSC
def eventCallback(self, timestamp, version, event):
# For debugging
print event
def sliceCallback(slice):
<html>
<head>
<title>Tilemap</title>
</head>
<body>
<div style="position: absolute; top: 50px; left: 50px;">
<canvas id="canvas" width="512" height="512">
Your browser does not support the HTML 5 Canvas.
<html>
<head>
<title>Tilemap</title>
</head>
<body>
<div style="position: absolute; top: 50px; left: 50px;">
<canvas id="canvas" width="512" height="512">
Your browser does not support the HTML 5 Canvas.