Skip to content

Instantly share code, notes, and snippets.

View sandravizz's full-sized avatar

sandraviz sandravizz

View GitHub Profile
@thataustin
thataustin / generateFakeSchema.ts
Last active May 9, 2024 16:50
Create fakeSchema.ts file from your drizzle schema.ts file to automatically get objects with faker data
import ts from 'typescript'
import { readFile, stat, unlink, writeFile } from 'fs/promises'
import * as path from 'path'
import { faker } from '@faker-js/faker'
interface Column {
columnType: string
default?: any
fakeMethod?: string // Optional custom faker method
}
@PaulC91
PaulC91 / wc_network.R
Created June 14, 2018 11:03
network graph of world cup players countries and clubs
library(rvest)
library(tidyverse)
library(tidygraph)
library(ggraph)
wc_squads <- read_html("https://en.wikipedia.org/wiki/2018_FIFA_World_Cup_squads") %>%
html_table()
teams <- c("Egypt", "Russia", "Saudi Arabia", "Uruguay",
"Iran", "Morocco", "Portugal", "Spain",
@MCMaurer
MCMaurer / ggplot_range_frame.R
Created February 20, 2018 22:51
Creating a Tufte-style range-frame scatterplot using ggplot
library(ggplot2)
library(ggthemes)
ggplot(mtcars, aes(wt,mpg))+
geom_point()+
theme_tufte()+
theme(axis.ticks = element_blank())+
xlab("Car weight (lb/1000)")+
ylab("Miles per gallon of fuel")+
scale_x_continuous(breaks = round(as.vector(quantile(mtcars$wt)), digits = 1))+