Skip to content

Instantly share code, notes, and snippets.

@avram
avram / gist:7014243
Last active December 25, 2015 17:39
class MyActivity extends Activity {
private Thread myWorker = new Thread() {
public void run() {
URL url = new URL("http://reddit.com/story");
url.openConnection();
String body = url.getBody();
myView.post(new Runnable() { public void run() {myView.setText(body)} });
}
}
@avram
avram / csv2zotero.py
Created July 16, 2011 11:16
Script to batch-add items defined in a CSV file to Zotero
#!/usr/bin/python
# -*- coding: utf8 -*-
# We'll use the pyzotero project for server access
# See packages.python.org/Pyzotero/
from pyzotero import zotero
import sys
# Python's built-in CSV support is pretty nice