Skip to content

Instantly share code, notes, and snippets.

View Seneketh's full-sized avatar
💭
Biochemical Cognition Instance #441-C Operational

Marco Wirthlin Seneketh

💭
Biochemical Cognition Instance #441-C Operational
View GitHub Profile
#include <cstdio>
#include <cmath>
#include <string>
#include "raylib.h"
#include "waterpool.hpp"
const int WIDTH = 160;
const int HEIGHT = 160;
using PoolType = Sapphire::WaterPool<WIDTH, HEIGHT>;
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
@DavisVaughan
DavisVaughan / mutate-rows-and-mutate-when.r
Last active March 7, 2021 20:51
mutate_rows() and mutate_when()
# ------------------------------------------------------------------------------
library(tidyverse)
library(rlang)
# ------------------------------------------------------------------------------
# Create some sample data
set.seed(1)
ex <- tibble(site = sample(1:6, 50, replace=T),
space = sample(1:4, 50, replace=T),
measure = sample(c('cfl', 'led', 'linear', 'exit'), 50,
# This gist uses the classifier defined in this post: http://modernstatisticalworkflow.blogspot.com/2018/03/1000-labels-and-4500-observations-have.html
# applied with this approximation: https://gist.github.com/khakieconomics/0325c054b1499d5037a1de5d1014645a
# to Kaggle's credit card fraud data--a fun rare-case problem. In a cross-validation exercise with 50 randomly selected hold-out
# sets, it appears perform similarly (or perhaps better) than others' attempts using random forests and neural networks.
# The upside of course is that it estimates/generates predictions in a couple of seconds.
library(tidyverse); library(reticulate); library(pROC)
# Download some data from Kaggle
system("kaggle datasets download -d mlg-ulb/creditcardfraud -p ~/Documents/kagglestuff")
@mjackson
mjackson / multiple-git-hooks.sh
Created February 6, 2018 00:58
Run multiple scripts for the same git hook
#!/bin/sh
# This script should be saved in a git repo as a hook file, e.g. .git/hooks/pre-receive.
# It looks for scripts in the .git/hooks/pre-receive.d directory and executes them in order,
# passing along stdin. If any script exits with a non-zero status, this script exits.
script_dir=$(dirname $0)
hook_name=$(basename $0)
hook_dir="$script_dir/$hook_name.d"
@jslefche
jslefche / README.md
Last active May 29, 2022 00:23
ggplot2: theme_black()

Black theme for ggplot2

This is an additional theme for ggplot2 that generates an inverse black and white color scheme.

Example

ggplot(mtcars, aes(wt, mpg)) + geom_point()
# Add theme_black()
ggplot(mtcars, aes(wt, mpg)) + geom_point(color = "white") + theme_black()