Skip to content

Instantly share code, notes, and snippets.

@timothyclemans
timothyclemans / gist:709291
Created November 21, 2010 23:38
code for computational search
query = 'ALS agencies in King County'
def a_vs_b(a, b):
return
def agencies_in_location(type, location):
return
query_formats_to_functions = {}
non_values_to_query_formats = {} # given tuple of the non values return query format
@timothyclemans
timothyclemans / gist:709292
Created November 21, 2010 23:39
code for computational search
def a_vs_b(a, b):
return
def agencies_in_location(type, location):
return
query_formats_to_functions = {}
non_values_to_query_formats = {} # given tuple of the non values return query format
def extract_non_values_from_format(format):
@timothyclemans
timothyclemans / 1 author
Last active January 1, 2016 08:29
icons in the corner
<div class="panel-heading"><img class="author-icon" style="float:right; margin:-10px -15px 0 0;" data-content="&lt;div class='name'&gt;&lt;a href=''&gt;Tim Clemans&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class='github'&gt;&lt;/span&gt;&lt;a href='http://github.com/timothyclemans'&gt;timothyclemans&lt;/div&gt;" data-html="true" data-placement="bottom" src="http://gravatar.com/avatar/e2bb5ef802e15c186bd9523b94348b79?size=32&amp;alt=Tim%20Clemans" data-original-title="" title=""><h3 class="panel-title">Camera Preview</h3></div>
import shutil, errno
import os
def copyanything(src, dst):
try:
shutil.copytree(src, dst)
except OSError as exc: # python >2.5
if exc.errno == errno.ENOTDIR:
shutil.copy(src, dst)
else: pass
import argparse
#import envoy
import shutil, errno
import os
import sys
def copyanything(src, dst):
try:
shutil.copytree(src, dst)
except OSError as exc: # python >2.5
var oGet = jQuery.get;
jQuery.get = function() {
arguments[0] = 'http://www.corsproxy.com/' + arguments[0].replace("http://", "").replace("https://", "");
return oGet.apply(this, arguments);
};
var oPost = jQuery.post;
jQuery.post = function() {
arguments[0] = 'http://www.corsproxy.com/' + arguments[0].replace("http://", "").replace("https://", "");
return oPost.apply(this, arguments);
@timothyclemans
timothyclemans / glass.html
Created February 9, 2014 03:43
[wearscript]
<!--{"r":"fqtn66CAYt9g5XATyDm59iFD2lRRkjmpfA0v09hZe04=","s":"ZGa3RCqfvD45QyG+vo8tJScvjePe9WxEKVH+ObJxzIs=","v":0,"h":"https://api.picar.us/wearscript"}-->
<!--https://plus.google.com/100378621884093522327-->
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<link href='https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700' rel='stylesheet' type='text/css'>
<style>
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
@timothyclemans
timothyclemans / glass.html
Created February 11, 2014 00:10
[wearscript]
<html style="width:100%; height:100%; overflow:hidden">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<head>
<style>
p {
font-size:40px;
color:#FFF;
}
</style>
@timothyclemans
timothyclemans / glass.html
Created February 11, 2014 18:28
[wearscript]
<html style="width:100%; height:100%; overflow:hidden">
<head>
<link href='https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700' rel='stylesheet' type='text/css'>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>-->
<style>
/* recover from old-browser styling */
.oldbl {display: block !important;}
@timothyclemans
timothyclemans / glass.html
Last active August 29, 2015 13:56
[wearscript] A tool for learning to talk concisely in a conversation
<!--{"r":"fqtn66CAYt9g5XATyDm59iFD2lRRkjmpfA0v09hZe04=","s":"ZGa3RCqfvD45QyG+vo8tJScvjePe9WxEKVH+ObJxzIs=","v":0,"h":"https://api.picar.us/wearscript"}-->
<!--https://plus.google.com/100378621884093522327-->
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<link href='https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700' rel='stylesheet' type='text/css'>
<style>
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,