View load_smap.jl
using Unitful, Base.Filesystem, HDF5, Dates | |
using Unitful: °C, K, hr, d | |
using Base: tail | |
# Fix unitful handling of missing | |
import Base.* | |
*(::Missing, ::T) where {T<:Unitful.Units} = missing | |
*(::T, ::Missing) where {T<:Unitful.Units} = missing |
View makefile
## Put this Makefle in your project directory---i.e., the directory | |
## containing the paper you are writing. Assuming you are using the | |
## rest of the toolchain here, you can use it to create .html, .tex, | |
## and .pdf output files (complete with bibliography, if present) from | |
## your markdown file. | |
## - Using `make` without arguments will generate html, tex, and pdf | |
## output files from all of the files with the designated markdown | |
## extension. The default is `.md` but you can change this. | |
## - You can specify an output format with `make tex`, `make pdf` or | |
## - `make html`. |
View loadraster.jl
using ArchGDAL | |
function readtiff(file) | |
img = ArchGDAL.registerdrivers() do | |
ArchGDAL.read(file) do dataset | |
ArchGDAL.read(dataset) | |
end | |
end | |
img ./= maximum(img) | |
img .= max.(0.0, img) |
View Unitfulerrors.jl
julia> sol = solve(prob, FunctionMap(scale_by_time = true)); nothing | |
ERROR: UndefVarError: photosynthesize not defined | |
Stacktrace: | |
[1] assimilation!(::DynamicEnergyBudgets.Organ{DynamicEnergyBudgets.StatePVMCNE{Unitful.Quantity{Float64,Unitful.Dimensions{(Unitful.Dimension{:Amount}(1//1),)},Unitful.FreeUnits{(Unitful.Unit{:Mole,Unitful.Dimensions{(Unitful.Dimension{:Amount}(1//1),)}}(0, 1//1),),Unitful.Dimensions{(Unitful.Dimension{:Amount}(1//1),)}}}},DynamicEnergyBudgets.Params{Unitful.Quantity{Float64,Unitful.Dimensions{(Unitful.Dimension{:Amount | |
}(-1//1), Unitful.Dimension{:Mass}(1//1))},Unitful.FreeUnits{(Unitful.Unit{:Gram,Unitful.Dimensions{(Unitful.Dimension{:Mass}(1//1),)}}(0, 1//1), Unitful.Unit{:Mole,Unitful.Dimensions{(Unitful.Dimension{:Amount}(1//1),)}}(0, -1//1)),Unitful.Dimensions{(Unitful.Dimension{:Amount}(-1//1), Unitful.Dimension{:Mass}(1//1))}}},DynamicEnergyBudgets |
View fortran-julia.jl
#= | |
This julia script converts fortran 90 code into julia. | |
It uses naive regex replacements to do as much as possible, | |
but the output WILL need further cleanup. | |
Known conversion problems such as GOTO are commented and marked with FIXME | |
Most variable declaration lines are entirely deleted, which may or | |
may not be useful. |
View off_stub.make
; | |
; This is a stub make file that downloads the OFF install profile. | |
; | |
core = 7.x | |
api = 2 | |
projects[drupal][version] = "7.28" | |
; +++++ Profiles +++++ |
View fix_queue.patch
diff --git a/message_subscribe.module b/message_subscribe.module | |
index da35358..026a2dc 100755 | |
--- a/message_subscribe.module | |
+++ b/message_subscribe.module | |
@@ -152,30 +152,26 @@ function message_subscribe_send_message($entity_type, $entity, Message $message, | |
message_notify_send_message($cloned_message, $options, $notifier_name); | |
// Check we didn't timeout. | |
- if ($use_queue && $subscribe_options['queue']['end time'] && time() < $subscribe_options['queue']['end time']) { | |
- continue 2; |
View zurb-foundation-extra-layouts.patch
diff --git a/layouts/foundation_2col_stacked_narrow_r/foundation-2col-stacked-narrow-r.tpl.php b/layouts/foundation_2col_stacked_narrow_r/foundation-2col-stacked-narrow-r.tpl.php | |
new file mode 100644 | |
index 0000000..39eed1e | |
--- /dev/null | |
+++ b/layouts/foundation_2col_stacked_narrow_r/foundation-2col-stacked-narrow-r.tpl.php | |
@@ -0,0 +1,44 @@ | |
+<?php | |
+/** | |
+ * @file | |
+ * Template for a 2 column panel layout. |