This file contains 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 sys | |
import os | |
import time | |
import re | |
__file__ = '/home/adorsk/projects/gr/georefine/webapp/app.py' | |
_times = {} | |
watch_pattern = "georefine" | |
class RollbackImporter: |
This file contains 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
require([ | |
"jquery", | |
"use!backbone", | |
"use!underscore", | |
"_s", | |
"use!ui", | |
], | |
function($, Backbone, _, _s, ui){ |
This file contains 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
require([ | |
"jquery", | |
"use!backbone", | |
"use!underscore", | |
"_s", | |
"use!ui", | |
"Facets" | |
], | |
function($, Backbone, _, _s, ui, Facets){ |
This file contains 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
require([ | |
"jquery", | |
"use!backbone", | |
"use!underscore", | |
"_s", | |
"use!ui", | |
], | |
function($, Backbone, _, _s, ui){ | |
// Returns the class name of the argument or undefined if |
This file contains 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
// in a <script src="foo"> tag. | |
(function(){ | |
var scripts = document.getElementsByTagName('script'); | |
for (var i = 0; i < scripts.length; i++){ | |
console.log(i, scripts[i].src); | |
} | |
var thisScript = scripts[scripts.length-1].src; | |
console.log("thisScript is: ", thisScript); | |
})(); |
This file contains 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
fs = require('fs') | |
vm = require('vm') | |
requirejs = require('requirejs') | |
BASE_URL = __dirname + '/' | |
requireConfigPath = BASE_URL + 'js/require_config.js' | |
script = vm.createScript(fs.readFileSync(requireConfigPath)) | |
sandbox = { | |
require: requirejs, | |
BASE_URL: BASE_URL, |
This file contains 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
fs = require('fs') | |
vm = require('vm') | |
requirejs = require('requirejs') | |
BASE_URL = __dirname + '/' | |
requireConfigPath = BASE_URL + 'js/require_config.js' | |
script = vm.createScript(fs.readFileSync(requireConfigPath)) | |
sandbox = { | |
require: requirejs, | |
BASE_URL: BASE_URL, |
This file contains 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 httplib2 | |
import json | |
import time | |
base_url = 'http://localhost/services_test/api/external_tasks' | |
def t2(): | |
login_data = { | |
'username': 'tasks', | |
'password': 'tasks' |
This file contains 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 __name__ == '__main__': | |
from fabric.main import main | |
import sys | |
sys.argv = ['fab', '-f', __file__] + sys.argv[1:] | |
main() |
This file contains 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
def test_foo(self): | |
limit = 1000 | |
expected_counts = {} | |
if True: | |
start_time = time() | |
for i in range(1, limit): |
OlderNewer