From ecba01b4b1c35cbcf58c5e030b9e79a5c30be55c Mon Sep 17 00:00:00 2001 From: Braxton Fair Date: Sun, 28 Feb 2016 20:33:57 -0600 Subject: Write a bit better code --- pythonstatcomp.html.markdown | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'pythonstatcomp.html.markdown') diff --git a/pythonstatcomp.html.markdown b/pythonstatcomp.html.markdown index f8d83b98..0b02dca8 100644 --- a/pythonstatcomp.html.markdown +++ b/pythonstatcomp.html.markdown @@ -150,9 +150,8 @@ ggplot(aes(x="age",y="weight"), data=pets) + geom_point() + labs(title="pets") url = "https://raw.githubusercontent.com/e99n09/R-notes/master/data/hre.csv" r = requests.get(url) fp = "hre.csv" -f = open(fp, "wb") -f.write(r.text.encode("UTF-8")) -f.close() +with open(fp, "wb") as f: + f.write(r.text.encode("UTF-8")) hre = pd.read_csv(fp) -- cgit v1.2.3 From 90f68920b97ec6384933de323e8d7f260d3ae944 Mon Sep 17 00:00:00 2001 From: Jason Kinetec Date: Fri, 18 Mar 2016 12:29:29 -0400 Subject: Update pythonstatcomp.html.markdown --- pythonstatcomp.html.markdown | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pythonstatcomp.html.markdown') diff --git a/pythonstatcomp.html.markdown b/pythonstatcomp.html.markdown index 0b02dca8..7cf6862e 100644 --- a/pythonstatcomp.html.markdown +++ b/pythonstatcomp.html.markdown @@ -1,8 +1,9 @@ --- -language: Statistical computing with Python +category: tool +tool: Statistical Computing with Python contributors: - ["e99n09", "https://github.com/e99n09"] -filename: pythonstatcomp.py + - ["acidflip", "https://github.com/acidflip"] --- This is a tutorial on how to do some typical statistical programming tasks using Python. It's intended for people basically familiar with Python and experienced at statistical programming in a language like R, Stata, SAS, SPSS, or MATLAB. -- cgit v1.2.3 From 12f0b9442a680e27ec23504e5f43e13143c121b4 Mon Sep 17 00:00:00 2001 From: Jason Kinetec Date: Fri, 18 Mar 2016 14:07:03 -0400 Subject: Update pythonstatcomp.html.markdown --- pythonstatcomp.html.markdown | 1 - 1 file changed, 1 deletion(-) (limited to 'pythonstatcomp.html.markdown') diff --git a/pythonstatcomp.html.markdown b/pythonstatcomp.html.markdown index 7cf6862e..8ee3aa64 100644 --- a/pythonstatcomp.html.markdown +++ b/pythonstatcomp.html.markdown @@ -3,7 +3,6 @@ category: tool tool: Statistical Computing with Python contributors: - ["e99n09", "https://github.com/e99n09"] - - ["acidflip", "https://github.com/acidflip"] --- This is a tutorial on how to do some typical statistical programming tasks using Python. It's intended for people basically familiar with Python and experienced at statistical programming in a language like R, Stata, SAS, SPSS, or MATLAB. -- cgit v1.2.3