Skip to content

Instantly share code, notes, and snippets.

Marcel Ackermann dreamflasher

Block or report user

Report or block dreamflasher

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@derricw
derricw / rebin_ndarray.py
Created Apr 9, 2015
Rebin an arbitrary numpy ndarray in N dimensions
View rebin_ndarray.py
import numpy as np
def bin_ndarray(ndarray, new_shape, operation='sum'):
"""
Bins an ndarray in all axes based on the target shape, by summing or
averaging.
Number of output dimensions must match number of input dimensions.
Example
@jdelamater99
jdelamater99 / AmazonSmile_redirect.user.js
Last active Aug 14, 2019
AmazonSmile Redirect (Greasemonkey Script)
View AmazonSmile_redirect.user.js
// ==UserScript==
// @name AmazonSmile Redirect
// @namespace http://jdel.us
// @description Redirect Amazon to AmazonSmile
// @include http://*.amazon.com/*
// @include https://*.amazon.com/*
// @version 0.5
// @grant none
// ==/UserScript==
@gcardone
gcardone / ConfidenceIntervalApp.java
Last active Jul 16, 2019
How to calculate confidence interval for means with unknown standard deviation using the Student t distribution. Needs Apache Commons Math library.
View ConfidenceIntervalApp.java
import org.apache.commons.math3.distribution.TDistribution;
import org.apache.commons.math3.exception.MathIllegalArgumentException;
import org.apache.commons.math3.stat.descriptive.SummaryStatistics;
public class ConfidenceIntervalApp {
public static void main(String args[]) {
// data we want to evaluate: average height of 30 one year old male and female toddlers
// interestingly, at this age height is not bimodal yet
double data[] = new double[] { 63.5, 81.3, 88.9, 63.5, 76.2, 67.3, 66.0, 64.8, 74.9, 81.3, 76.2, 72.4, 76.2, 81.3, 71.1, 80.0, 73.7, 74.9, 76.2, 86.4, 73.7, 81.3, 68.6, 71.1, 83.8, 71.1, 68.6, 81.3, 73.7, 74.9 };
You can’t perform that action at this time.