Skip to content

Instantly share code, notes, and snippets.

@robertpyke
robertpyke / gdal_translate_ascii_grid_to_geotiff.sh
Last active December 19, 2015 15:59
Translate an ascii-grid file into a geotiff file using compression, i.e. the output geotiff file is compressed.
gdal_translate -of GTiff input_file.asc output_file.tiff -co "COMPRESS=lzw"
@robertpyke
robertpyke / gist:6051584
Created July 22, 2013 05:58
Installing R v2.15.3 onto Ubuntu.
Edit your package sources to include your local CRAN mirror. List of mirrors here: http://cran.r-project.org/mirrors.html
See here for detailed instructions: http://cran.r-project.org/bin/linux/ubuntu/README
Install the specific version of R you need. In my case, 2.15.3. You can get package information from your mirror. e.g. http://cran.ms.unimelb.edu.au/bin/linux/ubuntu/precise/Packages (precise Ubuntu packages)
sudo apt-get install r-base-core=2.15.3-1precise0precise1
@robertpyke
robertpyke / _instructions.md
Last active March 10, 2021 06:41
Interfacing with Nectar's Object Store (swift - Nectar's S3 equivalent)
@robertpyke
robertpyke / main.js
Created May 3, 2016 08:00
Intel Edison with grove sensors
/*jslint node:true, vars:true, bitwise:true, unparam:true */
/*jshint unused:true */
// Leave the above lines for propper jshinting
//Type Node.js Here :)
var path = require('path');
var mraa = require('mraa'); // require mraa
var awsIot = require('aws-iot-device-sdk'); // require aws-iot
#include "arduino_secrets.h"
#include <SPI.h>
#include <WiFi101.h>
#include <PubSubClient.h>
#include <ArduinoJson.h>
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
char ssid[] = SECRET_SSID; // your network SSID (name)
char pass[] = SECRET_PASS; // your network password (use for WPA, or use as key for WEP)
int status = WL_IDLE_STATUS; // the WiFi radio's status
#*****************************************************
#
# Adapted from Amazon's deep lens example project
# Cal256 object labelling (uses sagemaker pre-trained cal256 example model)
#*****************************************************
from threading import Thread, Event
import os
import json
import numpy as np
import awscam