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
# Get a subset of values from the training set where days spent is zero | |
temp <- subset(train, DaysInHospital_Y2 == log1p(0)) | |
# Get 100 samples from it with replacement and add it to a new dataframe | |
uniform_set <- temp[sample(nrow(temp), 100, replace=TRUE),] | |
# Keep on doing this for other values as well | |
uniform_set <- merge(uniform_set, temp[sample(nrow(temp), 100, replace=TRUE),], all=T) | |
# Train a tree on it |
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
#! /usr/bin/python | |
import argparse | |
import os | |
import pwd | |
import subprocess | |
import string | |
import random | |
import signal | |
import sys |
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
#! /usr/bin/python | |
import argparse | |
import os | |
import pwd | |
import subprocess | |
import string | |
import random | |
import signal | |
import sys |
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
#! /usr/bin/python | |
import argparse | |
import os | |
import pwd | |
import subprocess | |
import string | |
import random | |
import signal | |
import sys |
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
f = lambda x : x * (x + 1) / 2 | |
f(999/3)*3 + f(999/5)*5 - f(999/15)*15 |
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
multiplot <- function(..., plotlist=NULL, cols) { | |
require(grid) | |
# Make a list from the ... arguments and plotlist | |
plots <- c(list(...), plotlist) | |
numPlots = length(plots) | |
# Make the panel | |
plotCols = cols # Number of columns of plots |
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
#! /usr/bin/python | |
import sys | |
denominations = [1, 2,3] | |
def find_all_denom(value, denom, current_denom): | |
if value < 0: | |
return |
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> | |
<title>I have a back bone</title> | |
</head> | |
<body> | |
<div id="contact-app"> | |
<div class="title"> | |
<h1>Contacts App</h1> |
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> | |
<title>I have a back bone</title> | |
</head> | |
<body> | |
<form> | |
Name: <input type="text" name="name" id="name"/> | |
Age: <input type="text" name="address" id="address"/> | |
<input type="submit" value="Submit"></input> |
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> | |
<title>I have a back bone</title> | |
</head> | |
<body> | |
Name: <input type="text" name="name" id="name"/> | |
Age: <input type="text" name="address" id="address"/> | |
<button class="post">Create</button> |