Skip to content

Instantly share code, notes, and snippets.

View josep2's full-sized avatar
🎯
Focusing

Jowanza Joseph josep2

🎯
Focusing
View GitHub Profile
@abresler
abresler / get_nba_player_game_logs
Created May 15, 2015 21:14
NBA Player Game Log Function
### Example get_nba_player_game_log_stats(player = "Zach Randolph", season = 2001:2014)
get_nba_player_game_log_stats <-
function(player, season , season.type = 'Regular Season') {
packages <-
c('dplyr', 'magrittr', 'jsonlite', 'stringr', 'tidyr', 'lubridate', 'readr')
lapply(packages, library, character.only = T)
players <-
"https://raw.githubusercontent.com/abresler/si_hackathon/master/data/nba/all_player_data.csv"%>%
read_csv()
library(checkpoint)
checkpoint("2015-03-04")
require(devtools)
## no way to install EBImage reproducibly
source("http://bioconductor.org/biocLite.R")
biocLite("EBImage")
# latest commits as of 2015-03-04
install_github("ramnathv/rblocks", ref="a85e748390c17c752cc0ba961120d1e784fb1956")
@SolomonMg
SolomonMg / gist:4043e15691756071b1ad
Created March 3, 2015 05:04
Read in data from Qualtrics to R (adapted from qualtrics R package - http://jason.bryer.org/qualtrics/)
library(RCurl)
getSurveyResults <- function (username,
token, surveyid, truncNames = 20,
Questions = NULL,
Labels = "1",
ExportTags = "1",
LocalTime = "1",
startDate = NULL, endDate = NULL) {
url = paste(
@nderkach
nderkach / ios_github_gif.md
Last active February 15, 2024 23:31
How to record iOS screen and share it on github

Record a screencast with QuickTime Player

  1. Connect an iOS defice with a cable
  2. In QuickTime Player: Option-Cmd-N (New Movie Recording) -> Select your device from the recording menu:

http://cl.ly/image/1w0y3Y0H2g2X/record.png

Install gifify

@joyrexus
joyrexus / README.md
Last active September 7, 2024 14:28
Form/file uploads with hapi.js

Demo of multipart form/file uploading with hapi.js.

Usage

npm install
npm run setup
npm run server

Then ...

@LeCoupa
LeCoupa / nodejs-cheatsheet.js
Last active July 10, 2025 04:46
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@woobe
woobe / README.md
Last active August 29, 2015 13:57
[rblocks]: Experiments

The rBlocks Experiement

Having fun with Ramnath Vaidyanathan's new package rblocks!

Iris & AirPassengers

iris

ap

@i2pi
i2pi / love_simple.R
Last active June 22, 2021 06:27
Love Simple

love

@erinshellman
erinshellman / dict_to_df.R
Last active September 14, 2021 09:15
Convert Python dictionary to R data.frame
py_dict = readLines('python_dictionary.txt')
# e.g.
#{"cat_name": "Ella", "dwell_status": "tree_dweller", "coat_color": "gray, white, orange", "is_from_hell": "Y"}
#{"cat_name": "Billie", "dwell_status": "bush_dweller", "coat_color": "gray, white", "is_from_hell": "N"}
dict_to_df = function(dict) {
require(plyr)
df = data.frame()
df_temp = list()
library(ggplot)
nosql.df <- read.csv("nosql.csv", header=TRUE)
nosql.df$Database <- factor(nosql.df$Database,
levels=c("MongoDB","Cassandra","Redis","HBase","CouchDB",
"Neo4j","Riak","MarkLogic","Couchbase","DynamoDB"))
gg <- ggplot(data=nosql.df, aes(x=Quarter, y=Index))
gg <- gg + geom_point(aes(color=Quarter), size=3)
gg <- gg + facet_grid(Database~.)