Skip to content

Instantly share code, notes, and snippets.

View robintw's full-sized avatar

Robin Wilson robintw

View GitHub Profile
Examples
========
In all of the examples below the table produced by the table() command is shown first,
then the str() output for both input arrays, then the dput output for both input arrays.
Working Example
===============
0 1 2 3 4 5 6 7 8 9
0 24 0 0 1 0 2 1 0 0 0
#include<stdio.h>
#include<stdlib.h>
#include<array_alloc.h>
#include<math.h>
#include<mpi.h>
struct global_index
{
int x;
X: 0, Y: 1, RpC: 5, CpC: 4
Swapping
X: 0, Y: 0, RpC: 5, CpC: 4
X: 1, Y: 0, RpC: 5, CpC: 4
Swapping
From global (4, 0) - Processor (1, 0) with local (0, 0)
To global (0, 4)- Processor (0, 0) with local (0, 4)
X: 1, Y: 1, RpC: 5, CpC: 4
Swapping
From global (4, 5) - Processor (1, 1) with local (0, 0)
#include<stdio.h>
#include<stdlib.h>
#include<array_alloc.h>
#include<math.h>
#include<mpi.h>
#define NAN (0.0/0.0)
struct global_index
{
@robintw
robintw / ridl.rb
Created May 26, 2011 09:35
ridl formula
require 'formula'
class Ridl < Formula
url 'http://svn.idldev.com/ridl/trunk', :using => :svn
version '197'
homepage 'http://michaelgalloy.com/category/idl/ridl'
md5 '12ec8e4ec8d6d7f58bb7076b8c74352f'
depends_on 'cmake'
depends_on 'readline'
@robintw
robintw / makeoutput
Created May 26, 2011 21:31
Non-Brew
/usr/local/Cellar/cmake/2.8.4/bin/cmake -H/Users/robin/builds/ridl-new -B/Users/robin/builds/ridl-new --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/Cellar/cmake/2.8.4/bin/cmake -E cmake_progress_start /Users/robin/builds/ridl-new/CMakeFiles /Users/robin/builds/ridl-new/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make -f src/CMakeFiles/ridl.dir/build.make src/CMakeFiles/ridl.dir/depend
cd /Users/robin/builds/ridl-new && /usr/local/Cellar/cmake/2.8.4/bin/cmake -E cmake_depends "Unix Makefiles" /Users/robin/builds/ridl-new /Users/robin/builds/ridl-new/src /Users/robin/builds/ridl-new /Users/robin/builds/ridl-new/src /Users/robin/builds/ridl-new/src/CMakeFiles/ridl.dir/DependInfo.cmake --color=
Dependee "/Users/robin/builds/ridl-new/src/CMakeFiles/ridl.dir/DependInfo.cmake" is newer than depender "/Users/robin/builds/ridl-new/src/CMakeFiles/ridl.dir/depend.internal".
Dependee "/Users/robin/builds/ridl-new/src/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/Users/r
/usr/local/Cellar/cmake/2.8.4/bin/cmake -H/tmp/homebrew-ridl-197-r5U8 -B/tmp/homebrew-ridl-197-r5U8 --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/Cellar/cmake/2.8.4/bin/cmake -E cmake_progress_start /tmp/homebrew-ridl-197-r5U8/CMakeFiles /tmp/homebrew-ridl-197-r5U8/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make -f src/CMakeFiles/ridl.dir/build.make src/CMakeFiles/ridl.dir/depend
cd /tmp/homebrew-ridl-197-r5U8 && /usr/local/Cellar/cmake/2.8.4/bin/cmake -E cmake_depends "Unix Makefiles" /tmp/homebrew-ridl-197-r5U8 /tmp/homebrew-ridl-197-r5U8/src /tmp/homebrew-ridl-197-r5U8 /tmp/homebrew-ridl-197-r5U8/src /tmp/homebrew-ridl-197-r5U8/src/CMakeFiles/ridl.dir/DependInfo.cmake --color=
Dependee "/tmp/homebrew-ridl-197-r5U8/src/CMakeFiles/ridl.dir/DependInfo.cmake" is newer than depender "/tmp/homebrew-ridl-197-r5U8/src/CMakeFiles/ridl.dir/depend.internal".
Dependee "/tmp/homebrew-ridl-197-r5U8/src/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/tmp/homebrew-ridl-19
@robintw
robintw / input.txt
Created March 2, 2012 13:44
Sample input file
10:10:2005,Locations=Chilbolton,long=-1.437,lat=51.144,elev=88,Nmeas=1,PI=Iain_H._Woodhouse_and_Judith_Agnew,Email=fsf@nerc.ac.uk_and_judith.agnew@stfc.ac.uk
Level 2.0 Almucantar Retrievals, Version 2
Combined Dubovik Retrievals,ALL POINTS DATA,Inversion Product UNITS can be found at,,, http://aeronet.gsfc.nasa.gov/new_web/units.html
Date(dd-mm-yyyy),Time(hh:mm:ss),Julian_Day,AOT_1640,AOT_1020,AOT_870,AOT_675,AOT_667,AOT_555,AOT_551,AOT_532,AOT_531,AOT_500,AOT_490,AOT_443,AOT_440,AOT_412,AOT_380,AOT_340,Water(cm),AOTExt441-T,AOTExt675-T,AOTExt871-T,AOTExt1020-T,AOTExt441-F,AOTExt675-F,AOTExt871-F,AOTExt1020-F,AOTExt441-C,AOTExt675-C,AOTExt871-C,AOTExt1020-C,870-440AngstromParam.[AOTExt]-Total,SSA441-T,SSA675-T,SSA871-T,SSA1020-T,AOTAbsp441-T,AOTAbsp675-T,AOTAbsp871-T,AOTAbsp1020-T,870-440AngstromParam.[AOTAbsp],REFR(441),REFR(675),REFR(871),REFR(1020),REFI(441),REFI(675),REFI(871),REFI(1020),ASYM441-T,ASYM675-T,ASYM871-T,ASYM1020-T,ASYM441-F,ASYM675-F,ASYM871-F,ASYM1020-F,ASYM441-C,ASYM675-C,ASYM871-C,ASYM102
@robintw
robintw / gist:2780792
Created May 24, 2012 10:46
dput of the image
new("SpatialGridDataFrame"
, data = structure(list(band1 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, 0.308388084173203, 0.308388084173203, NA, NA, NA, 0.247125640511513,
0.247125640511513, 0.149799793958664, 0.199262738227844, 0.199262738227844,
0.240243539214134, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
Process: Python [25327]
Path: /Library/Frameworks/Python.framework/Versions/7.3/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: zsh [219]
Date/Time: 2012-08-01 21:26:57.694 +0100
OS Version: Mac OS X 10.7.4 (11E53)
Report Version: 9