color: red;
background-color: gray;
border-bottom-color: teal;
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
| require 'open-uri' | |
| require 'json' | |
| if !File.exist?('catalog.txt') | |
| request = 'https://db.ygoprodeck.com/api/v4/cardinfo.php' | |
| response = open(request).readlines.join | |
| catalog = JSON.parse(response) | |
| File.open('catalog.txt', 'w') { |file| file.write(catalog.to_s) } | |
| end |
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
| class Player: | |
| def __init__(self, name, symbol): | |
| self.name = name | |
| self.symbol = symbol | |
| def move(self, pos): | |
| print(self.symbol) |
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
| ```{r knitr_setup, echo=FALSE} | |
| knitr::opts_chunk$set(cache=TRUE) | |
| ``` | |
| ```{r, echo=FALSE} | |
| knitr::opts_chunk$set(message=FALSE, warning=FALSE) | |
| ``` | |
| #### Nishant Arora | |
| #### CMSC 320 | |
| #### Project 2: Wrangling and Exploratory Data Analysis |
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
| sqldf("attach 'Test1.sqlite' as new") | |
| db <- DBI::dbConnect(RSQLite::SQLite(), "hwk2Data/baseball-archive-sqlite/lahman2016.sqlite") | |
| DBI::dbGetQuery(db, 'SELECT m.playerID, sum(b.H) as total_hits, nameFirst, nameLast | |
| FROM Master as m | |
| left join(SELECT distinct playerID | |
| FROM HallofFame | |
| WHERE inducted = "y") as hof |
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(tidyverse) | |
| library(rvest) | |
| library(stringr) | |
| # URL base for search | |
| base_url <- "https://www.rottentomatoes.com/celebrity/" | |
| # let's see how this works for Diego Luna | |
| # scrape the table from the website |
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
| .topnav { | |
| font-family:Verdana; | |
| overflow: hidden; | |
| background-color: red; | |
| } | |
| .topnav a { | |
| float: left; | |
| display: block; |
NewerOlder