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
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
var FORMAT_ONELINE = 'One-line'; | |
var FORMAT_MULTILINE = 'Multi-line'; | |
var FORMAT_PRETTY = 'Pretty'; | |
var LANGUAGE_JS = 'JavaScript'; | |
var LANGUAGE_PYTHON = 'Python'; |
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
""" | |
Licensed under the Apache License, Version 2.0: | |
http://www.apache.org/licenses/LICENSE-2.0 | |
""" | |
from google.appengine.ext import webapp | |
from google.appengine.ext.webapp.util import run_wsgi_app | |
redirects = { | |
'/learning': 'http://blog.pamelafox.org', |
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
// Each DIV has data-parent="parentid" (except the top) | |
// Go through all steps, make hierarchy of parent to children | |
var childrenIds = {}; | |
var topId; | |
$('.step').each(function() { | |
var id = $(this).attr('id'); | |
var parentId = $(this).attr('data-parent'); | |
if (!parentId) { | |
topId = id; | |
} else { |
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
.datepicker { | |
background-color: $white; | |
border-color: #999; | |
border-color: rgba(0, 0, 0, 0.2); | |
border-style: solid; | |
border-width: 1px; | |
@include border-radius(4px); | |
@include box-shadow(0 2px 4px rgba(0,0,0,.2)); | |
@include background-clip(padding-box); |
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
/* =========================================================== | |
* bootstrap-datepicker.js v1.3.0 | |
* http://twitter.github.com/bootstrap/javascript.html#datepicker | |
* =========================================================== | |
* Copyright 2011 Twitter, Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* |
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
// Calculate moving average | |
var averageData = []; | |
var lastValue = null; | |
var movingAverage = null; | |
for (var i = 0; i < dates.length; i++) { | |
var value = measurementData[i] || missingData[i]; | |
if (!movingAverage) { | |
movingAverage = value; | |
} else { | |
movingAverage = ((value - movingAverage)/7) + movingAverage; |
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
<!--[if lt IE 7]> | |
<script type="text/javascript" | |
src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js"></script> | |
<script> | |
// The conditional ensures that this code will only execute in IE, | |
// Therefore we can use the IE-specific attachEvent without worry | |
window.attachEvent("onload", function() { | |
CFInstall.check({ | |
mode: "overlay" | |
}); |
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
import dom_helper | |
import test_defaults | |
FBEMAIL = '#email' | |
FBPASS = '#pass' | |
FBLOGIN = 'input[name="login"]' | |
FBGRANT = 'input[name="grant_clicked"]' | |
class FacebookDom(dom_helper.DomHelper): |
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
import base_tests | |
import dom_helper | |
import facebook_dom | |
class FacebookTests(base_tests.BaseTests): | |
@classmethod | |
def setUpClass(cls): | |
super(StartTests, cls).setUpClass() | |
StartTests.clear_data() |
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
from selenium.common.exceptions import NoSuchElementException, TimeoutException | |
class DomHelper(object): | |
driver = None | |
waiter = None | |
def open_page(self, url): | |
self.driver.get(url) |