This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Tasks | |
------- | |
Search and transform jsonable structures, specifically to make it 'easy' to make tabular/csv output for other consumers. | |
Example | |
~~~~~~~~~~~~~ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## these are all untested! | |
# get a clean python, so you don't contaminate your system. | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)" | |
brew install python --framework | |
# run off and get xcode. Cry while it downloads and installs. | |
# distribute |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
this has a lot of list / tuple casting, and doesn't use | |
native python list properties to full advantage. | |
It mimics Little Schemer style coding quite well though. | |
""" | |
import itertools |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
bindFunctions as implemented below has a bug. | |
1. What is the bug? | |
2. How do you fix it? | |
All functions have the args: | |
functionList: list of functions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"extensions": [ | |
{ | |
"name": "Test Pilot", | |
"isEnabled": true, | |
"isPlatformCompatible": true, | |
"isCompatible": true, | |
"appDisabled": false, | |
"id": "testpilot?labs.mozilla.com" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
simple up / down 85% confidence score.... | |
http://amix.dk/blog/post/19588?source=google | |
(among others) | |
''' | |
#Rewritten code from /r2/r2/lib/db/_sorts.pyx | |
from math import sqrt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/***************************************** | |
SAMPLE TESTPILOT 2 Study, Showing all features. | |
== things test pilot can and should do == | |
load restartless extension | |
unload them | |
watch, dump, and record events, on XUL and HTML elements | |
- selectors can be commands, events, types | |
- actions can be specific things or "*" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// do we want to do using 'register' instead? | |
var experiment = new require("test-pilot").Experiment(); | |
// we can even get around the 'new' dangers using the jetpack utils. | |
// the idea is, it's a 'subclass', so that TP namespace is rolled in to an exp. | |
experiment.metadata = { | |
id: "", | |
summary: "", | |
}; // is this a problem that it doesn't go through 'guards'? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* version NEW */ | |
BaseClasses = require("study_base_classes.js"); | |
const ORIGINAL_TEST_ID = 100; | |
const MY_TEST_ID = "heatmap"; // We are on second run | |
/* Non-numeric IDs would be nicer but this is not supported in the extension | |
* yet. */ | |
/* Explanation of the schema: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(this is a bit fragmentary. My goals: | |
* some mix of aspiration and operational | |
* I don't care what people believe, only how they act in the rooms | |
* I want acknowledgement of impact, and feelings. | |
* we might lose people over this. That doesn't make this not worthwhile | |
* The person impacted has agency to decide the impact on them. | |
) | |
Big principles: |