Skip to content

Instantly share code, notes, and snippets.

View jordanwesthoff's full-sized avatar

Jordan Westhoff jordanwesthoff

View GitHub Profile
@jordanwesthoff
jordanwesthoff / wind_chill.py
Last active August 29, 2015 14:15
Python script to simply calculate wind_chill
import os
import sys
import time
def getValue():
T = float(raw_input("Enter a number: "))
return T
def getValue():
V = float(raw_input("Enter a number: "))
@jordanwesthoff
jordanwesthoff / gist:085b726ad2ebc3dba6fa
Created February 20, 2015 16:55
ImageMagick LUT operator
# Correct syntax to use imagemagick to apply a 3D LUT to an image frame
convert [input_frame] [LUT frame (must be HALD)] -hald-clut [output_frame_name]
@jordanwesthoff
jordanwesthoff / 3d_lut.sh
Created February 17, 2015 14:38
Applying 3D LUT's in FFMPEG
#!/bin/bash
ffmpeg -i input -vf lut3d=<lut file> -c:a copy output
@jordanwesthoff
jordanwesthoff / all_curves.m
Last active August 29, 2015 14:15
This is a test function called all_curves, which is a basic tutorial to plotting multiple curves on a single plot in MATLAB. This function plots lines based upon a given interval of temperatures and then analyzes them using the contained MATLAB function black_bodyf to analyze them using Planck's energy equation for black body emitter sources.
% MATLAB
function all_curves(floor_temp, ceil_temp)
% Interactive example and tutotial for plotting multiple lines on a Matlab
% figure using black_body representative temperatures.
% Function takes in two values, a low (floor) temperature and a high (ceil)
% temperature and plots lines incremented between them. The function then
% plots each plotted_line based on each increment and then scales automatically to
% fit the values.
@jordanwesthoff
jordanwesthoff / gist:40de005aa4a5070c5b79
Created February 2, 2015 19:35
Test GraphicsMagick
gm convert -verbose -gamma 2.2 A004C007_1404240S.00164.dpx A01.tiff
@jordanwesthoff
jordanwesthoff / tmaker_list.sh
Created January 19, 2015 17:12
Time Lapse Maker Commands
#!/bin/bash
# Run this in the directory with all of the files to be made
ls -1v | grep png > files2.txt
@jordanwesthoff
jordanwesthoff / Darktable Install CentOS6
Last active August 29, 2015 14:13
Darktable RAW Viewer dependencies
cd /etc/yum.repos.d/
wget http://pkgrepo.linuxtech.net/el6/release/linuxtech.repo
install darktable:
yum --enablerepo=linuxtech-testing install darktable
@jordanwesthoff
jordanwesthoff / Method 1?
Last active August 29, 2015 14:10
Intelligent sorter
YUM_CMD=$(which yum)
APT_GET_CMD=$(which apt-get)
OTHER_CMD=$(which <other installer>
if [[ ! -z $YUM_CMD ]]; then
yum install $YUM_PACKAGE_NAME
elif [[ ! -z $APT_GET_CMD ]]; then
apt-get $DEB_PACKAGE_NAME
elif [[ ! -z $OTHER_CMD ]]; then
apt-get update
apt-get install -y -q vim slurm-llnl
echo "10.10.10.3 controller" >> /etc/hosts
echo "10.10.10.4 server" >> /etc/hosts
wget https://raw.github.com/guillermo-carrasco/mussolblog/master/setting_up_a_testing_SLURM_cluster/slurm.conf
mv slurm.conf /etc/slurm-llnl/
SCRIPT
@jordanwesthoff
jordanwesthoff / geekbenchfix.sh
Created October 21, 2014 19:28
Fix Geekbench on Ubuntu 14.04 LTS
# Run as root if you get the error
# error while loading shared libraries: libstdc++6: cannot open shared object file: No such file or directory
# Geekbench on Ubuntu 14.04 LTS
sudo apt-get install lib32stdc++6