Skip to content

Instantly share code, notes, and snippets.

View gumdropsteve's full-sized avatar

Winston Robson gumdropsteve

View GitHub Profile
@gumdropsteve
gumdropsteve / nested_queries.ipynb
Last active November 25, 2020 13:58
Run these notebooks on app.blazingsql.com
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
deck <- read.csv('https://github.com/gumdropsteve/datasets/raw/master/deck.csv')
set.seed(42) # so we get the same 'random' shuffle every time (don't do this IRL unless you have a reason to)
rows <- sample(nrow(deck))
shuffled_deck <- deck[rows, ]
shuffled_deck
# STARTER CODE
link <- 'https://github.com/gumdropsteve/datasets/raw/master/deck.csv'
deck <- read.csv(link)
# | means or, this is covered in the Kaggle course today
# putting conditions in () allows us to put the | between and see if either condition is satisfied
# deck[(deck$value >= 7) | (deck$value == 1), ]
deck <- read.csv('https://github.com/gumdropsteve/datasets/raw/master/deck.csv', header=TRUE)
deck1 <- deck[deck$value >=7, ]
shuffler <- function(curr_deck){
mixer <- sample(1:13, size=13)
curr_deck <- curr_deck[mixer, ]
}
dealer <- function(){
@gumdropsteve
gumdropsteve / web_scraping.ipynb
Created February 15, 2021 10:35
web_scraping.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Winstons-MacBook-Pro:dynamic_nft_workshop winston$ cd ..
Winstons-MacBook-Pro:chainlink_hackathon winston$ ls
brownie_workshop dynamic_nft_workshop old_dynamic_nft
dungeons-and-dragons-nft hackathon the_graph_workshop
Winstons-MacBook-Pro:chainlink_hackathon winston$ rm -rf hackathon/
^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C
Winstons-MacBook-Pro:chainlink_hackathon winston$
Winstons-MacBook-Pro:chainlink_hackathon winston$
Winstons-MacBook-Pro:chainlink_hackathon winston$ ls
brownie_workshop dynamic_nft_workshop old_dynamic_nft
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"data": {
"estateOrders": [
{
"category": "estate",
"id": "0x0020ea1414db2f1f0e644d6546446c1316e1e16ba0b69e6bcb9df0509f36d5c7",
"owner": "0x9320dd8531a3cff21e810d4b29d7aa9b86a5df1d",
"price": "46000000000000000000000",
"status": "sold",
"updatedAt": "1577348600"