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
<compiler MACH="arc4"> | |
<SLIBS> | |
<append> -I$ENV{ILIBS}/include -I$ENV{ILIBS}/lib -Wl,-rpath -Wl,%{ILIBS}/lib -Wl,--enable-new-dtags -L$ENV{ILIBS}/lib -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -L$ENV{ILIBS}/lib -lnetcdff -lnetcdf</append> | |
</SLIBS> | |
<ESMF_LIBDIR>/home/home01/earfw/esmf_arc4/lib/libO/Linux.intel.64.openmpi.default/</ESMF_LIBDIR> | |
</compiler> |
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
<machine MACH="arc4"> | |
<DESC> | |
A port of CEM to the leeds ARC4 machine. CEMAC. | |
</DESC> | |
<NODENAME_REGEX>.*.arc*</NODENAME_REGEX> | |
<OS>LINUX</OS> | |
<COMPILERS>intel</COMPILERS> | |
<MPILIBS>mpich</MPILIBS> | |
<PROJECT>None</PROJECT> | |
<SAVE_TIMING_DIR></SAVE_TIMING_DIR> |
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
wdiff -n -w $'~~' -x $'~~' -y $'\\textcolor{blue}{' -z '}' base.md new.md | pandoc -o diff.pdf |
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
import logging | |
''' | |
Set up logger | |
''' | |
log = logging.getLogger(__file__.rsplit('/',1)[1]) ## if running interactively with ipython, replace this with a descriptive string | |
log.propagate = False | |
log.setLevel(logging.DEBUG) | |
logfile = 'test.log' |
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
<!doctype html> | |
<title>File Uploader</title> | |
<style> | |
body, | |
.center { | |
margin: auto; | |
width: 50%; | |
border: 3px solid green; | |
padding: 10px; | |
} |
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
''' | |
Global arguments | |
''' | |
import os | |
# maximum filesize in megabytes | |
file_mb_max = 100 | |
# encryption key | |
app_key = 'any_non_empty_string' | |
# full path destination for our upload files |
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
import sys,os,re | |
from flask import Flask, flash, request, redirect, render_template | |
from werkzeug.utils import secure_filename | |
from config import * | |
app=Flask(__name__) | |
app.secret_key = app_key | |
## on page '/upload' load display the upload file | |
@app.route('/upload') |
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
let map = new Map(); | |
map.set("a", 1); | |
map.set("b", 2); | |
map.set("c", 3); | |
let obj = Array.from(map).reduce((obj, [key, value]) => ( | |
Object.assign(obj, { [key]: value }) // Be careful! Maps can have non-String keys; object literals can't. | |
), {}); | |
console.log(obj); // => { a: 1, b: 2, c: 3 } |
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
import numpy as np | |
import matplotlib.pyplot as plt | |
def colorFromBivariateData(Z1,Z2,cmap1 = plt.cm.Blues, cmap2 = plt.cm.Reds, preset = False): | |
if preset: | |
z1mn = 0. | |
z2mn = 0. | |
z1mx = 1. | |
z2mx = 1. |
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
/** | |
* are we currently running ? publish as everyone even anonymous | |
*/ | |
function doGet() { | |
var currentTime = new Date(); | |
var calendarId = '[email protected]'; | |
var optionalArgs = { | |
timeMin: (new Date(currentTime.getTime()-(2*3600*1000))).toISOString(), | |
timeMax: (new Date(currentTime.getTime()+(2*3600*1000))).toISOString(),//pm 2 h | |
showDeleted: false, |