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
{ | |
"metadata": { | |
"name": "" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
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
var crypto = require('crypto'); | |
//varies from -1 t0 1 | |
var pow2_31 = Math.pow(2,31); | |
var randNum = function(t,seed) { | |
var shasum = crypto.createHash('sha1'); | |
return shasum.update(""+seed+t).digest().readUInt32LE(0)/pow2_31-1; | |
} | |
var randNumGenMaker = function(seed) { |
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 lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>jQuery UI Slider - Default functionality</title> | |
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> | |
<script src="http://code.jquery.com/jquery-1.9.1.js"></script> | |
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> | |
<link rel="stylesheet" href="/resources/demos/style.css" /> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 requests | |
from collections import deque | |
class SolrTermVectorCollector(object): | |
def __pathToTvrh(self, solrUrl, collection): | |
import urlparse | |
userSpecifiedUrl = urlparse.urlsplit(solrUrl) | |
schemeAndNetloc = urlparse.SplitResult(scheme=userSpecifiedUrl.scheme, | |
netloc=userSpecifiedUrl.netloc, | |
path='', | |
query='', |
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 lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>search as you type</title> | |
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> | |
<script src="http://code.jquery.com/jquery-1.9.1.js"></script> | |
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> | |
<style> |
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
public class SwanQueries { | |
static int MAX_PARAGRAPH_LENGTH = 5000; | |
static int MAX_SENTENCE_LENGTH = 500; | |
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
public class CalculatorParser extends BaseParser<Integer> { | |
public Rule Expression() { | |
return Sequence( | |
Term(), | |
ZeroOrMore( | |
FirstOf( | |
Sequence('+', Term(), push(pop() + pop())), | |
Sequence('-', Term(), push(pop(1) - pop())) | |
) |
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
public class WimpySwanParser extends BaseParser<SpanQuery> { | |
public Rule Query() { | |
return Sequence(OrExpression(),EOI); | |
} | |
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
public class WimpySwanParser extends BaseParser<SpanQuery> { | |
int MAX_PARAGRAPH_LENGTH = 5000; | |
int MAX_SENTENCE_LENGTH = 500; | |