This file contains 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
function find_min_energy_map2(energy) | |
energy = transpose(energy) | |
row, col = size(energy) | |
dir_arr = [-1, 0, 1] | |
energy_map = zeros(row, col) | |
energy_map[:, end] = energy[:, end] | |
dirs = zeros(Int, row, col) | |
@inbounds for c = col-1:-1:1 |
This file contains 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
using Test | |
using BenchmarkTools | |
@enum ECompoundingType EContinuous = 1 ESimple = 2 EExponential = 3 | |
abstract type TCompoundType end | |
struct TContinuous <: TCompoundType end | |
struct TSimple <: TCompoundType end | |
struct TExponential <: TCompoundType end |
This file contains 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 | |
# store the current dir | |
CUR_DIR=$(pwd) | |
# Let the person running the script know what's going on. | |
printf '\n\033[1mPulling in latest changes for all repositories...\033[0m\n' | |
# Find all git repositories and update it to the master latest revision | |
for i in $(find . -name ".git" | cut -c 3-); do |
This file contains 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/python | |
""" | |
Parses Fortran Namelists | |
based on Fortran Namelist parser for Python prog/scripts by Stephane Chamberland (stephane.chamberland@ec.gc.ca) | |
http://code.google.com/p/fortran-namelist/ | |
Updated by Volodymyr Vladymyrov (http://stackoverflow.com/users/1296661/vvladymyrov) to parse format presented | |
in http://stackoverflow.com/questions/14165733/regular-expression-parsing-key-value-pairs-in-namelist-input-file | |
added support for | |
1) | |
$NAMELIST |