Skip to content

Instantly share code, notes, and snippets.

View MichaelMauderer's full-sized avatar

Michael Mauderer MichaelMauderer

View GitHub Profile
### Keybase proof
I hereby claim:
* I am michaelmauderer on github.
* I am michaelmauderer (https://keybase.io/michaelmauderer) on keybase.
* I have a public key whose fingerprint is E831 961D 2EE8 2EEC 1FE0 F16B 6461 8781 F9A2 439A
To claim this, I am signing this object:
@MichaelMauderer
MichaelMauderer / settings.py
Created August 25, 2017 16:28 — forked from gregsadetsky/settings.py
See: http://stackoverflow.com/questions/13705328/ -- I was looking for a way to run Selenium tests for a Django app on a staging server hosted on Heroku using a PostgreSQL database. The DjangoTestSuiteRunner creates and destroys the whole database before/after testing, which would not work on Heroku where databases are added via other means (her…
import dj_database_url
TEST_DATABASES = {
'default': dj_database_url.config(env='TEST_DATABASE_URL')
}
# replace path below to point to HerokuTestSuiteRunner class
TEST_RUNNER = 'python.path.to.test_suite_runner.HerokuTestSuiteRunner'
#[macro_use]
extern crate criterion;
use std::collections::HashSet;
use std::iter::FromIterator;
use criterion::black_box;
use criterion::Criterion;
use test::{iter_items_set, process_things_by_index_loop};
@MichaelMauderer
MichaelMauderer / bench.py
Last active April 12, 2021 19:15
Benchmark Wip
import matplotlib.pyplot as plt
import time
import pandas as pd
df = pd.read_csv('sample_data.csv')
x = df['x']
y = df['y']
color = df[['color_r', 'color_g', 'color_b', 'color_a']].values