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
library(dplyr) | |
library(ggplot2) | |
library(httr) | |
library(stringr) | |
my_pi <- GET(url = 'https://www.angio.net/pi/digits/pi1000000.txt') %>% | |
content(as="text") | |
n <- 1000000 |
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
library(lme4) | |
library(blme) | |
library(arm) | |
cps <- read.csv('cps.csv') | |
cps <- subset(cps,wageworkerlastyear==1 & !is.na(lhourlywage)) | |
cps$state<-as.integer(cps$statefip) | |
cps$nchildnum<-as.integer(cps$nchild)-1 | |
cps$statefip<-as.factor(cps$statefip) |
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
dataframe <- read.csv('rushing.csv', header = TRUE,sep = ",") | |
#filter for 16 game seasons and running backs | |
sixteenGamesdf <- dataframe %.% filter(Pos == 'TB' | Pos =='rb' | Pos == 'RB' , Year >= 1978) | |
sixteenGamesdf$Tm[sixteenGamesdf$Tm=="RAM"]<-"STL" | |
sixteenGamesdf$Tm[sixteenGamesdf$Tm=="PHO"]<-"ARI" | |
sixteenGamesdf$Tm[sixteenGamesdf$Tm=="RAI"]<-"OAK" |
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
public static int waterFill(int[] arr){ | |
int rainCount=0; | |
int max=arr[0]; | |
for(int i=0;i<arr.length;i++){ | |
max=(arr[i]>max)?arr[i]:max; | |
} | |
//fill it up |
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
/** | |
* Actually takes care of posting data to a service | |
* @param xml The xml data in the form of a Java String | |
* @param url The address to post data to | |
*/ | |
private static boolean postData(String xml, String url){ | |
//PostMethod post=new PostMethod(); | |
HttpPost pst=null; |
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 java.io.File; | |
public class FileLister { | |
public static void main(String[] args) { | |
list(new File("/")); | |
} | |
/** | |
* Display a list of the specified file and all its descendants. | |
*/ |