Skip to content

Instantly share code, notes, and snippets.

View jasdumas's full-sized avatar

Jasmine Daly jasdumas

View GitHub Profile
var userChoice = prompt("Do you choose rock, paper or scissors?");
var computerChoice = Math.random();
if (computerChoice < 0.34) {
computerChoice = "rock";
} else if(computerChoice <= 0.67) {
computerChoice = "paper";
} else {
computerChoice = "scissors";
} console.log("Computer: " + computerChoice);
var compare = function(choice1, choice2) {
@jasdumas
jasdumas / BubbleShape.js
Created April 9, 2014 14:42
Hour of Code Challenge: Bubble Letters
10 < 3 ;
var red = [0, 100, 63];
var orange = [40, 100, 60];
var green = [75, 100, 40];
var blue = [196, 77, 55];
var purple = [280, 50, 60];
var myName = "Jasmine";
var letterColors = [red, orange, green, blue, purple]
if (10 < 3) {
@jasdumas
jasdumas / Eulers Equations.m
Last active December 25, 2016 21:27
Biomechanics, matlab
clear all
% Sample kinematic data set
% saved as TEST.m
% kinetic data from pg 191
% Reaction forces (RD from frame 7) and Moment forces (M from frame 7)
RD7 = [-134.33 -768.38 -10.26]; % units are Newtons in GRS
MD7 = [16.13 -0.49 -101.32] ; % units are Newtons*meters in GRS
% RP7 = [-96.41 -755.17 -13.15]; % proximal reaction force used in the g to a axes system
% kinetic data 'table 7.4' Leg angular displacements
@jasdumas
jasdumas / CodeCracklePop.py
Last active August 29, 2015 13:59
Hacker School Application code
def CracklePop():
listA = [ ]
for count in range(1, 101):
listA.append(count)
for p in listA:
if p%3==0 and p%15!=0:
print "Crackle"
elif p%5==0 and p%15!=0:
print "Pop"
elif p%15==0:
@jasdumas
jasdumas / VirusSimulation.py
Created April 14, 2014 17:40
MITx - 6.02x
#problem 2-1
class SimpleVirus(object):
"""
Representation of a simple virus (does not model drug effects/resistance).
"""
def __init__(self, maxBirthProb, clearProb):
"""
Initialize a SimpleVirus instance, saves all parameters as attributes
of the instance.

Keybase proof

I hereby claim:

  • I am jasdumas on github.
  • I am jasdumas (https://keybase.io/jasdumas) on keybase.
  • I have a public key whose fingerprint is BEF3 A21F 55D3 5EA8 2128 16EA 03BB 2F31 2341 6436

To claim this, I am signing this object:

#################################################
# Authentication Log-on page with conditionalPanel
#################################################
# Global variables can go here
n <- 200
# Define the UI
ui <- bootstrapPage(
## app.R ##
server <- function(input, output) {
# open the selected data set in excel on button trigger
observeEvent(input$excel,{
cat("...in open_this_reactive\n")
data = paste(input$dataset, '.csv', sep='')
cmd = paste0("open ", data)
system(cmd)
# Original open.this function
# open.this <-function(x, file = "__tmp.csv") {
@jasdumas
jasdumas / lmgadget.R
Created January 24, 2016 20:11 — forked from wch/lmgadget.R
Shiny Gadget example: lmGadget
library(shiny)
# Example usage:
# lmGadget(mtcars, "wt", "mpg")
#
# Returns a list with two items:
# $data: Data with excluded rows removed.
# $model: lm (model) object.
lmGadget <- function(data, xvar, yvar) {
library(miniUI)
## Load required packages ##
library(GEOquery)
library(reshape2)
library(survival)
library(ggplot2)
library(GGally)
library(plotly)
## Download data from GEO ##
GSE = "GSE19915"