Skip to content

Instantly share code, notes, and snippets.


Abe Flansburg aflansburg

View GitHub Profile
aflansburg /
Last active Jul 14, 2021
Dual histogram + boxplot with KDE for univariate analysis + Mean & Median Lines
# import libs
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
# this function will create a boxplot + histogram plot using Seaborn's Jointgrid
# we'll also provide Type annotations to provide hints to future users
def dual_plot(series: pd.Series, figsize: tuple = (16,8),
bins: int = None, return_plot: bool = False,
cereallarceny / index.js
Last active Mar 7, 2021
Server-side rendering in Create React App
View index.js
const md5File = require('md5-file');
const path = require('path');
// CSS styles will be imported on load and that complicates matters... ignore those bad boys!
const ignoreStyles = require('ignore-styles');
const register = ignoreStyles.default;
// We also want to ignore all image requests
// When running locally these will load from a standard import
// When running on the server, we want to load via their hashed version in the build folder
maxan / web.config
Last active Jun 29, 2021
IIS Config to React Router App
View web.config
<rule name="React Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_URI}" pattern="^/(api)" negate="true" />
max-kov /
Last active Feb 18, 2021
matrix falling code in python using pygame
import pygame, pygame.font
import random
def IsWritten():
defTemp = True
for x in xrange((lettersOnScreen[0] / 2) - (len(str) / 2), (lettersOnScreen[0] / 2) + (len(str) / 2) + 1):
if xHeads[x] == -1:
defTemp = False
return defTemp
xavierskip /
Last active Apr 8, 2018
snake in terminal
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import curses
from curses import KEY_RIGHT, KEY_LEFT, KEY_UP, KEY_DOWN
import time
import random
class Snake():
def __init__(self,length,screen):
# left top coordinate (y,x)
tonymtz / gist:d75101d9bdf764c890ef
Last active Jul 6, 2021
Uninstall nodejs from OSX Yosemite
View gist:d75101d9bdf764c890ef
# first:
lsbom -f -l -s -pf /var/db/receipts/ | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*