This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -xe | |
# Run this script from machine with the credintials and the latest api tools installed | |
EBS_DEVICE='/dev/sdh' | |
INSTANCE_ID=$1 | |
AKI=${2:-'aki-5f15f636'} | |
ARI=${3:-'ari-0915f660'} | |
ARCH=${4:-'i386'} | |
SIZE=${5:-10} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set[:foo] = [{},{}] | |
foo.each do |foo| | |
foo[:name] = 3 | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Prints local branches and remote branches prefixed with your git email | |
# username sorted by date. | |
set -o errexit | |
set -o nounset | |
USER_NAME=`git config user.email | sed s:\@.*::` | |
TAN="\033[33m" | |
NO_COLOR="\033[0m" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float radicalInverse_VdC(uint bits) { | |
bits = (bits << 16u) | (bits >> 16u); | |
bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u); | |
bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u); | |
bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u); | |
bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u); | |
return float(bits) * 2.3283064365386963e-10; // / 0x100000000 | |
} | |
vec2 Hammersley(uint i, uint N) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uint w = m_image.width(); | |
uint h = m_image.height(); | |
uint m = m_image.size(); | |
const Scalar de = 1.0/gamma; | |
const Scalar dc = -4.0/gamma + 1.0; | |
printf("w h %i %i\n", w, h); | |
using Matrix = Eigen::SparseMatrix<Scalar>; | |
Matrix A(m, m); | |
Eigen::VectorXd b(m); |
OlderNewer