Skip to content

Instantly share code, notes, and snippets.

View jarvist's full-sized avatar

Jarvist Moore Frost jarvist

View GitHub Profile
@jarvist
jarvist / flags.mk
Created March 20, 2014 13:43
Working (?) flags.mk file for compiling LMF March 2014 release (http://ccpforge.cse.rl.ac.uk/gf/project/lmf/frs/?action=FrsReleaseView&release_id=355) on Federoa / Xeon with GNU libraries (removed hard coded links to Intel MKL etc.)
# On Fedora, required sudo yum install libgomp lapack lapack-devel blas blas-devel tcsh
# LibXC compiled & installed by hand. There's also a version in the distribution repository.
#
# usage: flags.py [gcc|cray|intel] [dbg|opt] [mpi] [cuda] [elpa] [ls++] > flags.mk
#        scons -Y path/to/lm-x.xxy [-j nprocs] [build_target]
#
# default args: gcc opt
#
#
# the following is produced by:
for (i=0;i<256;i++)
{
// Alright, this is the plan
// First we take our variable
// Then we bit reverse it as binary
// Pretty confusing, but means it will fill in the temperature
// range with maximum coverage, rather than linear ramping
unsigned char r=i;
r=(r&0xF0)>>4 | (r&0x0F)<<4;
r=(r&0xCC)>>2 | (r&0x33)<<2;
@jarvist
jarvist / Julia Recombi Example
Created June 18, 2015 23:24
Stat Mech Recombination from various (Boltzmann, FD) kernels
{
"metadata": {
"language": "Julia",
"name": "",
"signature": "sha256:1a9071938dba4bd8f1ff573acb818698bab505d669c6377b952b615085b22cb0"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
@jarvist
jarvist / Vodna Sled 2010 - Interim Report
Created August 31, 2010 17:14
Vodna Sled 2010 - Markdown - Reports & ETc
#Vodna Sled 2010
##Interim Report - Aug 2010
<img align=right src="2010_vrtnarija_below_500_new_passage.png"
width=703 height=446 alt="Vrtnarija below -500m, new cave discovered
in 2010 coloured in Red. Cave presented in Elevation on a South-North
projection.">
/* (gl) Video Feedback by Jarvist Moore Frost
This code written 2004-2010.
GLUT skeleton found at http://stackoverflow.com/questions/503816/linux-fastest-way-to-draw
*/
#include <GL/glut.h>
#include <GL/glut.h>
#include <stdio.h>
#include <math.h>
#include <limits.h>
#Vodna Sled 2010: Underground Camp Logistics
The Vodna Sled 2010 4-berth underground camp was extremely comfortable and provided an excellent base for extended deep cave exploration. As there seems to be little information written about setting up alpine caving camps, we describe in this document an overview of the equipments used, and resulting performance.
##Cave Conditions
Vrtnarija is a typical deep alpine cave system. The temperature measured at camp varies between 1 and 2 degrees centigrade. Camp X-Ray has a fairly considerably draft which flows from the (wet) Zimmer pitch. We would estimate the relatively humidity to be above 80%, and note that non-sealed paper becomes damp overnight.
##Sleeping Arrangements
for i in *.jpg
do
id=` identify "${i}" | awk '{print $3}' | sed s/x/\ / `
x=` echo $id | cut -f1 -d\ `
y=` echo $id | cut -f2 -d\ `
echo $i X: $x Y: $y
if (( $x > 1024 ))
then
# gpsbabel XCSV style file
#
# Format: DeLorme SA 9.0 CSV
# Author: Alex Mottram
# Date: 12/09/2002
#
# gpsbabel -T -i garmin -f /dev/ttyUSB0 -F testlog.dat -o xcsv,style=waypoint_data_log.style
#
DESCRIPTION Comma separated values
@jarvist
jarvist / tn.py
Created May 19, 2011 10:07
Calculate Additions of Non Repeating Triangular numbers:
tn=1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 0, 0
soln={}
for i in tn[:]:
for j in tn[tn.index(i)+1:]:
for k in tn[tn.index(j)+1:]:
for l in tn[tn.index(k)+1:]:
print i,j,k,l
soln[i+j+k+l]=i,j,k,l
@jarvist
jarvist / 3d2text_colour.c
Created September 2, 2011 00:54
Builds against Survex 1.0.39 to convert .3d cave survey files --> CGO Pymol graphics objects
/*
* 3d2text.c
*
* changes .3d files to ascii text
*
* Copyright (C) 2001, Clewin Griffith.
* Pymol CGO output additions (C) 2011, Jarvist Moore Frost.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by