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
| var numRows = 4 | |
| var numCols = 6 | |
| var dims = [numRows, numCols] | |
| var conjunctions = ['0_2', '1_2', '1_0', '1_3'] | |
| var logit = function(p) { | |
| return ad.scalar.sub(ad.scalar.log(p), ad.scalar.log(ad.scalar.sub(1, p))); | |
| } |
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 numpy as np | |
| import pandas as pd | |
| import boto3 | |
| import xmltodict | |
| import csv | |
| import os | |
| import argparse | |
| # looks for a credentials.py defining the ACCESS_ID and SECRET_KEY | |
| import credentials |
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
| // example of extreme value | |
| var extremeValues = {burden: 50, | |
| prob: .00001, | |
| quanta: 1500000} | |
| var options = {method: 'forward', samples: 25000} | |
| // The naive standard for reasonableness | |
| var handPolicy = function(burden, prob, quanta) { | |
| return (burden < (prob * quanta) ? |
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
| // Written for webppl dev branch -- there may be breaking changes | |
| var init = function(n,y){ | |
| return repeat(n, function(){ return y; }); | |
| }; | |
| var step = function(states, p, n){ | |
| return map( | |
| function(x) { return x + binomial(p,n) }, | |
| states |
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
| var visible = "visible"; | |
| // Automatically registers whether user has switched tabs... | |
| (function() { | |
| document.hidden = hidden = "hidden"; | |
| // Standards: | |
| if (hidden in document) { | |
| document.addEventListener("visibilitychange", onchange); | |
| } else if ((hidden = "mozHidden") in document) { |
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
| <!DOCTYPE html> | |
| <meta charset="utf-8"> | |
| <link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"> | |
| <script src="http://cmx.io/v/0.1/cmx.js" charset="utf-8"></script> | |
| <style>.cmx-user-scene4 .cmx-text-border .cmx-path {stroke: orange}</style> | |
| <body> | |
| <div style="max-width:900px; -webkit-transform:rotate(0deg)"> | |
| <scene id="scene1"> | |
| <label t="translate(0,346)"> |