Skip to content

Instantly share code, notes, and snippets.

View nishant's full-sized avatar
🐢

Nishant Arora nishant

🐢
  • Charles Schwab
  • Austin, TX
View GitHub Profile
@nishant
nishant / top.html
Last active December 23, 2017 12:00
.topnav {
font-family:Verdana;
overflow: hidden;
background-color: red;
}
.topnav a {
float: left;
display: block;
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
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
```{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
class Player:
def __init__(self, name, symbol):
self.name = name
self.symbol = symbol
def move(self, pos):
print(self.symbol)
@nishant
nishant / cards.rb
Created September 9, 2019 23:23
Gets a list of all yugioh cards from the YGOHub API
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
@nishant
nishant / ch13.md
Last active October 10, 2019 18:30

Colors

Specify Color Values

By Name (up to 140 in CSS3)

color: red;
background-color: gray;
border-bottom-color: teal;

By RGB Color Code (#xxxxxx)

# write a function
# in <- string
# out <- boolean valid
# str = {}[]()
# ({[]}) valid
# ({})[] valid
# ({)[] invalid
# ({)[]} invalid
import java.awt.;
import javax.swing.;
import java.awt.event.*;
public class BobBurgerPanel extends JPanel{
private JPanel buttonPanel;
private JButton smallDrink;
public class Circle extends Point {
protected double radius;
public Circle() {
// default constructor
}
public Circle(double radius, double x, double y) {
this.radius = radius;
this.x = x;