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
From 0d54f904cebce9cad031af8e5dd6b040d3f314f3 Mon Sep 17 00:00:00 2001 | |
From: Olav Nymoen <olav@comoyo.com> | |
Date: Fri, 23 Aug 2013 11:40:57 +0200 | |
Subject: [PATCH] testing datastores | |
--- | |
apps/test/index.html | 2 ++ | |
apps/test/manifest.webapp | 26 ++++++++++++++++++++++++++ | |
apps/test/source.js | 7 +++++++ | |
3 files changed, 35 insertions(+) |
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
function type_checker() { | |
var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg; | |
function getParamNames(func) { | |
var fnStr = func.toString().replace(STRIP_COMMENTS, ''); | |
var result = fnStr.slice(fnStr.indexOf('(')+1, fnStr.indexOf(')')).match(/([^\s,]+)/g); | |
if(result === null) | |
result = []; | |
return result; | |
} | |
return function(types, func) { |
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
'use strict'; | |
let firebase = require('firebase'); | |
let fs = require('fs'); | |
let spawn = require('child_process').spawn; | |
let throttle = require('lodash.throttle'); | |
let request = require('superagent'); | |
let AWS = require('aws-sdk'); | |
let ref = new Firebase('https://neural.firebaseio.com/'); |
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 React, {Component, PropTypes} from 'react'; | |
import {Tabs, Tab} from 'material-ui/Tabs'; | |
class MyAwesomeTabTemplate extends Component { | |
static propTypes = { | |
children: PropTypes.node, | |
selected: PropTypes.bool, | |
}; | |
render() { |
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 Firebase from 'firebase'; | |
const firebaseUrl = 'https://spatially.firebaseio.com/clients'; | |
const timeOffsetUrl = 'https://spatially.firebaseio.com/.info/serverTimeOffset'; | |
let ref = new Firebase(firebaseUrl); | |
let timeRef = new Firebase(timeOffsetUrl); | |
let cachedUid; | |
export default ({dispatch, getState}) => next => action => { | |
// The first action rehydrates, so now we've probably got the uid now |
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
<!doctype html> | |
<html> | |
<head> | |
<!-- Web Component Polyfill for old browsers --> | |
<script src="https://www.polymer-project.org/platform.js"></script> | |
<!-- Release candidate of next React --> | |
<script src="http://fb.me/react-with-addons-0.12.0-rc1.js"></script> | |
<script src="http://fb.me/JSXTransformer-0.12.0-rc1.js"></script> | |
<!-- Import a web component --> |
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 tensorflow as tf | |
def example(): | |
leafs = tf.contrib.lookup.index_table_from_file( | |
vocabulary_file='leafs.txt') | |
parents = tf.contrib.lookup.index_table_from_file( | |
vocabulary_file='parents.txt') | |
leafs2parents = tf.contrib.lookup.index_to_string_table_from_file( | |
vocabulary_file='leaf2parents.txt') |
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
from scipy import sparse | |
class Proposition: | |
def __init__(self, title): | |
self.title = title | |
self.votes = {} | |
self.delegations = {} | |
def vote(self, user, vote): |
OlderNewer