Skip to content

Instantly share code, notes, and snippets.

# pkg"add AbstractPlotting#master"
using Makie, GeometryTypes, Colors
using AbstractPlotting: slider!, playbutton
using Observables
cd(@__DIR__)
psps = [rand(50, 50, 50) for i in 1:50]
mini, maxi = mapreduce(extrema, (a, b)-> (min(a[1], b[1]), max(a[2], b[2])), psps)
psps_n = map(psps) do vol
using GeometryTypes, Makie
include("noise.jl") #https://gist.github.com/SimonDanisch/89779b923d77a4ecdf61246cbe24611b#file-noise4-jl
# inspired by https://github.com/rougier/alien-life
resolution = (1000, 1000)
scene = Scene(resolution = resolution)
n = 60_000
@sean-smith
sean-smith / ec2_ipython.md
Last active February 15, 2021 23:09
iPython using EC2 and LetsEncrypt

Setup an iPython Notebook on AWS with LetsEncrypt Certificate

The first step is to setup an EC2 Ubuntu 16.04 instance that you can ssh into. I won't go into detail here but you should be able to easily google it.

You can get free AWS credit here https://education.github.com/pack

A better guide w/ pictures is here: https://chrisalbon.com/jupyter/run_project_jupyter_on_amazon_ec2.html (Note this doesn't include LetsEncrypt, so it only has self signed certificates)

Once you've setup an instance and ssh'd in, do the following:

@bishboria
bishboria / springer-free-maths-books.md
Last active June 8, 2024 06:39
Springer made a bunch of books available for free, these were the direct links
@natj
natj / colorbar.jl
Created January 18, 2014 08:54
Small and crude colorbar implementation to Winston
#colorbar
function colorbar(dmin, dmax; orientation="horizontal", colormap=_default_colormap, kvs...)
if orientation == "vertical"
p=FramedPlot(aspect_ratio=10.0)
setattr(p.x, draw_ticks=false)
setattr(p.y1, draw_ticks=false)
setattr(p.x1, draw_ticklabels=false)
setattr(p.y1, draw_ticklabels=false)
setattr(p.y2, draw_ticklabels=true)
@jiahao
jiahao / setup_julia.sh
Last active January 20, 2022 03:43
Setting up Julia on an Amazon EC2 instance
#Set up data partition
sudo mkdir /data
sudo chmod 777 /data
sudo "echo /dev/xvdb /data ext4 rw,user,exec,comment=cloudconfig 0 2 >> /etc/fstab"
sudo mount /data
#Install build environment
sudo sed -i "s/enabled=0/enabled=1" /etc/yum.repos.d/epel.epo
sudo yum -y update
sudo yum -y upgrade
@jbenet
jbenet / simple-git-branching-model.md
Last active June 17, 2024 14:53
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@benmarwick
benmarwick / getting-julia
Created June 21, 2013 22:57
install and build Julia in ubuntu
# In a terminal... make sure I get the master branch
git clone -b master git://github.com/JuliaLang/julia.git
# needed these on EC2
sudo apt-get update
sudo apt-get install gcc
sudo apt-get install g++
sudo apt-get install gfortran
sudo apt-get install make
@livibetter
livibetter / README.rst
Last active January 22, 2021 08:39
Frequency spectrum of sound using PyAudio, NumPy, and Matplotlib
`r opts_chunk$set(cache=TRUE)`
This is a quick set of analyses of the California Test Score dataset. The post was produced using R Markdown in RStudio 0.96. The main purpose of this post is to provide a case study of using R Markdown to prepare a quick reproducible report. It provides examples of using plots, output, in-line R code, and markdown. The post is designed to be read along side the R Markdown source code, which is available as a gist on github.
<!-- more -->
### Preliminaries
* This post builds on my earlier post which provided a guide for [Getting Started with R Markdown, knitr, and RStudio 0.96](jeromyanglim.blogspot.com/2012/05/getting-started-with-r-markdown-knitr.html)
* The dataset analysed comes from the `AER` package which is an accompaniment to the book [Applied Econometrics with R](http://www.amazon.com/Applied-Econometrics-R-Use/dp/0387773169) written by [Christian Kleiber](http://wwz.unibas.ch/personen/profil/person/kleiber/) and [Achim Zeileis](http://eeecon.uibk.ac.at/~zeileis/