Skip to content

Instantly share code, notes, and snippets.

View gumdropsteve's full-sized avatar

Winston Robson gumdropsteve

View GitHub Profile
@gumdropsteve
gumdropsteve / wemeta_viz.ipynb
Created November 15, 2023 23:26
ETH Wallets
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gumdropsteve
gumdropsteve / draw_boxes_and_save.py
Last active April 6, 2022 11:09
Convert attribute columns from VGG Image Annotator CSV to lists, then to pandas DataFrame. Draw the bounding boxes on og images and save the new image.
# folder where the image is already saved (without bounding boxes)
data_dir = 'media/stable_numbers/number_crops/'
# folder where the new image with bounding boxes should be saved
out_dir = 'media/copy_labeled_number_crops/'
# go through the unique file names (because files can have more than 1 bounding box)
for file in new_df.filename.unique():
# load in the image and .loc[] the rows where it's referenced (each row represents 1 bounding box)
{
"data": {
"estateOrders": [
{
"category": "estate",
"id": "0x0020ea1414db2f1f0e644d6546446c1316e1e16ba0b69e6bcb9df0509f36d5c7",
"owner": "0x9320dd8531a3cff21e810d4b29d7aa9b86a5df1d",
"price": "46000000000000000000000",
"status": "sold",
"updatedAt": "1577348600"
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
@gumdropsteve
gumdropsteve / rapids-colab.ipynb
Last active March 19, 2021 04:58
Script to Install RAPIDS in Google Colab
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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.
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(){
# 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')
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