Skip to content

Instantly share code, notes, and snippets.

View pzp1997's full-sized avatar

Palmer Paul pzp1997

View GitHub Profile
@pzp1997
pzp1997 / nets213-inclass-analysis.ipynb
Last active February 7, 2019 21:52
nets213-inclass-analysis.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!-- You must include this JavaScript file -->
<script src="https://assets.crowd.aws/crowd-html-elements.js"></script>
<!-- For the full list of available Crowd HTML Elements and their input/output documentation,
please refer to https://docs.aws.amazon.com/sagemaker/latest/dg/sms-ui-template-reference.html -->
<!-- You must include crowd-form so that your task submits answers to MTurk -->
<crowd-form answer-format="flatten-objects">
<style media="screen">
import random
import pandas as pd
# Build data for experiment
def make_experiment(batch_size, group_size):
imgs = list(range(454, 920))
groups = []
for i in range(group_size, len(imgs)):
group = imgs[i - group_size:i]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
/* Source: Bootstrap 4.2.1 */
/* BEGIN BOOTSTRAP */
body {
var canvasWidth = 500;
var canvasHeight = 500;
var g = 0.04;
var playerWidth = 30;
var playerHeight = 50;
var gameState = "start";
var playerX, projectile, balls, numArrowsUsed, startTime, timeElapsed;
reset();
// COUNTERS FOR INSTRUMENTATION
var refEqSkippedNodes, refEqSkippedDescendants;
function _VirtualDom_diff(x, y)
{
var patches = [];
refEqSkippedNodes = 0;
refEqSkippedDescendants = 0;
_VirtualDom_diffHelp(x, y, patches, 0);
data Can.Def
= Def (A.Located Name) [Pattern] Can.Expr
| TypedDef (A.Located Name) FreeVars [(Pattern, Type)] Can.Expr Type
data Can.Decls
= Declare Can.Def Can.Decls
| DeclareRec Can.Def [Can.Def] Can.Decls
| SaveTheEnvironment
data ModuleName.Canonical =
public class EuclidAglo {
// cd(x, y, z) <==> (x % z == 0) && (y % z == 0)
// gcd(x, y, z) <==> cd(x, y, z) && (\forall int k;; cd(x, y, k) ==> k <= z)
//@ requires true;
//@ ensures (x % \result == 0) && (y % \result == 0) && (\forall int k;; (x % k == 0) && (y % k == 0) ==> k <= \result);
public static int run(int x, int y) {
int n = x;
int m = y;
//@ maintaining (\forall int z;; ((x % z == 0) && (y % z == 0) && (\forall int k;; (x % k == 0) && (y % k == 0) ==> k <= z)) <==> ((n % z == 0) && (m % z == 0) && (\forall int k;; (n % k == 0) && (m % k == 0) ==> k <= z)));
module Main exposing (main)
import Html
windows : List a -> List ( a, a )
windows list =
case list of
x :: ((y :: _) as xs) ->
( x, y ) :: windows xs