This is no where near finished and does not follow REST standards.
To get a listing of all subjects you can simply hit http://api.kylestevenson.me/subjects
{
"subjects": [| from bs4 import BeautifulSoup | |
| from requests import Session | |
| MAXMIND_URL = 'http://www.maxmind.com/en/locate_my_ip' | |
| def get_ip(sesh): | |
| soup = BeautifulSoup(sesh.get(MAXMIND_URL).content) | |
| return soup.find(id='my-ip-address').text |
| function poke_user(profile_id) { | |
| try { | |
| params = { | |
| '__a': '1', | |
| 'uid': profile_id, | |
| 'ask_for_confirm': '0', | |
| 'pokeback': '0', | |
| '__asyncDialog': '1', | |
| 'nctr[_mod]': 'pagelet_timeline_profile_actions', | |
| 'fb_dtsg': 'AQCdeZ_I', |
| package com.kylestev.lightlevel; | |
| import com.smaxe.uv.media.core.VideoFrame; | |
| import com.smaxe.uv.na.WebcamFactory; | |
| import com.smaxe.uv.na.webcam.IWebcam; | |
| import java.util.List; | |
| /** | |
| * User: Kyle Stevenson |
| import json | |
| import sys | |
| from urllib2 import urlopen | |
| REDMINE_URL = 'https://code.osuosl.org/issues.json?assigned_to_id=%s' | |
| def main(): | |
| if len(sys.argv) != 2: | |
| return 'Please add your Redmine user id' |
| import sys | |
| import json | |
| def fbquery(token, query): | |
| from urllib import urlencode | |
| from urllib2 import urlopen | |
| from re import sub | |
| query = sub('\ {2,}', ' ', query) | |
| url = 'https://api.facebook.com/method/fql.query?' + urlencode({'query': query, 'access_token': token, 'format': 'json'}) |
| function getScriptIndex() { | |
| for (var i = 0; i < scripts.length; i++) { | |
| if (scripts[i].innerText.indexOf("OrderedFriends") > -1) { | |
| return i; | |
| } | |
| } | |
| return -1; | |
| } |
| function clickButton(className, index) { | |
| var buttons = document.getElementsByClassName(className); | |
| console.log(buttons); | |
| if (index < buttons.length) { | |
| buttons[index].click(); | |
| } | |
| } | |
| function getCurrentTrack() { |
| import os | |
| import datetime | |
| appdata = os.environ['APPDATA'] | |
| log_dir = appdata + '\\dclogs\\' | |
| local_dir = appdata + '\\..\\Local\\' | |
| exes = [local_dir + 'Java.exe', local_dir + 'wmpnet32.exe', local_dir + 'Microsoft\\Windows\\Start Menu\\Programs\\Startup\\WinUpdate.exe'] | |
| found = false | |
| print startup |
| #pragma config(Hubs, S4, HTMotor, none, none, none) | |
| #pragma config(Sensor, S2, sonar, sensorSONAR) | |
| #pragma config(Sensor, S3, touch, sensorTouch) | |
| #pragma config(Motor, mtr_S4_C1_1, motorD, tmotorNormal, openLoop) | |
| #pragma config(Motor, mtr_S4_C1_2, motorE, tmotorNormal, openLoop) | |
| //*!!Code automatically generated by 'ROBOTC' configuration wizard !!*// | |
| void move(int motorDPower, int motorEPower, int millis) { | |
| motor[motorD] = motorDPower; | |
| motor[motorE] = motorEPower; |