Skip to content

Instantly share code, notes, and snippets.

2015-08-25 17:20:10 +0100
./configure
--with-features=huge
--enable-multibyte
--with-macarchs=x86_64
--enable-perlinterp
--enable-rubyinterp
--enable-tclinterp
--with-tlib=ncurses
@simonrw
simonrw / minimizer-evaluation.ipynb
Created August 7, 2015 09:01
Assessment of scipy minimizers
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file has been truncated, but you can view the full file.
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Voltage analysis\n",
"\n",
"Three nights were observed with different VI+ settings:\n",
"\n",
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Voltage analysis\n",
"\n",
"Three nights were observed with different VI+ settings:\n",
"\n",
@simonrw
simonrw / pythonmodule.c
Last active August 29, 2015 14:15
Simple boilerplate code for wrapping C code into either python 2 or 3, taken from the porting guide: https://docs.python.org/3/howto/cporting.html
#include "Python.h"
/*********************************************************************************
* Taken from the porting guide: https://docs.python.org/3/howto/cporting.html
*
* Change all occurrences of
* - myextension => the extension name you want to create,
* - error_out => the function(s) you want to wrap
* - METH_NOARGS => METH_VARARGS|METH_KWARGS depending on if the function
* takes keyword arguments or not
2015-02-03 08:44:06 +0000
cmake
.
-DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/mariadb/10.0.16
-DCMAKE_FIND_FRAMEWORK=LAST
-DCMAKE_VERBOSE_MAKEFILE=ON
-DMYSQL_DATADIR=/usr/local/var/mysql
-DINSTALL_INCLUDEDIR=include/mysql
-DINSTALL_MANDIR=share/man
{
"metadata": {
"name": "",
"signature": "sha256:5fddeb641c99360902951f4e05e71fa0f22d867941f2dd43429f5ebb3d5b3fca"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@simonrw
simonrw / gist:7c58b0a2eebbe03f88a7
Created December 5, 2014 15:46
CCD geometry for the prototype
{
"metadata": {
"name": "",
"signature": "sha256:1e02e5c975ff47422f513d8acc59dcba3a82095ade7ca789b0b2203ddf223201"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"metadata": {
"name": "",
"signature": "sha256:2a604bad3f98e76127138bde3e00c443f63d0dad9aacb9eb3eb134c8037c2c5c"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@simonrw
simonrw / catalogue_hdu_example.py
Last active August 29, 2015 14:03
Code examples for the NGTS wiki page
'''
Read in the catalogue RA and DEC positions and plot as a scatter plot
'''
from astropy.io import fits
import matplotlib.pyplot as plt
with fits.open("example.fits") as hdulist:
catalogue = hdulist['catalogue'].data
ra = catalogue['ra']