Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View ries9112's full-sized avatar

ries9112

View GitHub Profile
@Quasimondo
Quasimondo / hic_et_nunc_basic_scraper.py
Created March 10, 2021 11:23
This is a very basic no-frills scraper to retrieve the metadata and digital assets from all tokens minted on hicetnunc.xyz. I share this as a starting point for people who want to experiment with building alternative views on the works created on the platform or preserve the data. Feel free to improve upon this or add additional features.
import requests
import os
import ipfsApi
api = ipfsApi.Client(host='https://ipfs.infura.io', port=5001)
url = "https://better-call.dev/v1/contract/mainnet/KT1RJ6PbjHpwc3M5rw5s2Nbmefwbuwbdxton/tokens"
r = requests.get(url)
data = r.json()
@samcamwilliams
samcamwilliams / CryptoVoxelsArchive.sh
Created November 21, 2020 02:52
Download the state of all land parcels in CryptoVoxels and deploy them to the Arweave's permaweb. Path to your Arweave keyhole must be changed in the `arweave deploy` line.
#!/bin/bash
mkdir -p CryptoVoxelsArchive/parcels
echo "Downloading map info..."
curl -s 'https://www.cryptovoxels.com/api/parcels.json' > CryptoVoxelsArchive/parcels.json
curl -s 'https://www.cryptovoxels.com/api/suburbs.json' > CryptoVoxelsArchive/suburbs.json
curl -s 'https://www.cryptovoxels.com/api/islands.json' > CryptoVoxelsArchive/islands.json
@tylermorganwall
tylermorganwall / 3d_table.R
Last active April 19, 2023 11:54
"RStudio Table Contest" 3D Table Render
library(rayrender)
make_legs = function(x=0,y=0,z=0) {
csg_translate(y=-5,
csg_combine(
csg_rotate(
csg_pyramid(z=z,x=x,y=y, height = 10), pivot_point = c(x,5,y),up = c(0,-1,0)),
csg_box(x=x,z=z,y=2.5, width = c(1,5,1)), operation = "subtract"))
}
@tylermorganwall
tylermorganwall / india_historical_map.R
Last active February 25, 2024 18:22
Historical Map of India with 3D elevation
library(raster)
library(rayshader)
#Load QGIS georeference image (see https://www.qgistutorials.com/en/docs/3/georeferencing_basics.html)
testindia = raster::stack("1870_southern-india_modified.tif")
#Set bounding box for final map (cut off edges without data, introduced via reprojection)
india_bb = raster::extent(c(68,92,1,20))
cropped_india = raster::crop(testindia, india_bb)
#Convert to RGB array
@slopp
slopp / 3d_ride.R
Created April 22, 2019 03:09
Code to make pretty bike ride plots with rayshader and rStrava
source("helpers.R")
plot_3d_route_area <- function(stream, zscale = 15){
# create bounding box for the ride
ui("1 of 5: Locating Route...")
bbox <- list(
p1 = list(long = min(stream$lng), lat = min(stream$lat)),
p2 = list(long = max(stream$lng), lat = max(stream$lat))
)
@jenniferthompson
jenniferthompson / genericized_dd.Rmd
Last active November 11, 2023 23:56
Example structure for data dictionary + code used for derivation using RMarkdown. Creates three data tables and documents general + field-specific info.
---
title: "Example Data Dictionary"
author: "Jennifer Thompson"
date: "11/1/2018"
output:
html_document:
theme: yeti
code_folding: hide
---
@thomasp85
thomasp85 / gapminder.r
Created June 6, 2018 19:05
Gapminder example with gganimate
library(gapminder)
library(ggplot2)
library(gganimate)
p <- ggplot(gapminder, aes(gdpPercap, lifeExp, size = pop, colour = country)) +
geom_point(alpha = 0.7) +
scale_colour_manual(values = country_colors) +
scale_size(range = c(2, 12)) +
scale_x_log10() +
facet_wrap(~continent) +
@Brainiarc7
Brainiarc7 / 01-installing-linux-on-eurocom-q6.md
Last active May 9, 2020 15:28
Installing Ubuntu 18.04LTS on the Eurocom Q6, among other tweaks.

Installing Linux on the Eurocom Q6:

For starters,

If you are dual booting, install Windows first, and partition from there with a tool such as Minitool. You'll only need two partitions, one for root and optionally, a small one for swap (say, 8GB). Partition them as appropriate, and when done, reboot into the UEFI menu and ensure that:

(a). Secure boot is disabled (otherwise you won't be able to load up proprietary drivers needed for the Nvidia GPU).

(b). Confirm that you're booting in UEFI mode ONLY. This is the default. CSM should remain disabled. Here's why.

@mindplace
mindplace / git_and_github_instructions.md
Last active April 23, 2024 04:51
Pushing your first project to github

1. Make sure git is tracking your project locally

Do you need a refresher on git? Go through Codecademy's git course.

  1. Using your terminal/command line, get inside the folder where your project files are kept: cd /path/to/my/codebase. → You cannot do this simply by opening the folder normally, you must do this with the command line/terminal.
    → Do you need a refresher on using your command line/terminal? I've compiled my favorite resources here.

  2. Check if git is already initialized: git status

@hadley
hadley / reproducible.md
Created January 6, 2010 17:33
How to write a reproducible example

How to write a reproducible example.

You are most likely to get good help with your R problem if you provide a reproducible example. A reproducible example allows someone else to recreate your problem by just copying and pasting R code.

There are four things you need to include to make your example reproducible: required packages, data, code, and a description of your R environment.

  • Packages should be loaded at the top of the script, so it's easy to see which ones the example needs.

  • The easiest way to include data in an email is to use dput() to generate