Skip to content

Instantly share code, notes, and snippets.

@embr
embr / logs.prop
Last active December 14, 2015 19:49
running Stanford Classifier on web request data
#
# Features
#
useClassFeature=true
#
# generate features on url
10.useSplitNGrams=true
10.usePrefixSuffixNGrams=true
#
# generate features on mimetype
@embr
embr / gist:4707996
Created February 4, 2013 17:03
RescueTime Python API Example
# coding: utf-8
import pprint
import pandas as pd
from rescuetime.api.service import Service
from rescuetime.api.access import AnalyticApiKey
s = Service.Service()
k = AnalyticApiKey.AnalyticApiKey(open('rt_key').read(), s)
p = {}
@embr
embr / index.html
Last active December 10, 2015 16:08
Mobile Page View Fraction
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mobile Site Page View Fraction</title>
<style type="text/css">
body, .ui-widget {
font: 14px Helvetica Neue;
}
@embr
embr / index.html
Created August 2, 2012 22:57
sunburst with text
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Sunburst with Text</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js"></script>
<style type="text/css">
svg {
font: 5px sans-serif;
@embr
embr / flare.json
Created August 1, 2012 22:56
d3 sunburst test
{
"name": "flare",
"children": [
{
"name": "analytics",
"children": [
{
"name": "cluster",
"children": [
{"name": "AgglomerativeCluster", "size": 3938},