Skip to content

Instantly share code, notes, and snippets.

epifanio

Block or report user

Report or block epifanio

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View get_gists.py
# first: mkdir user && cd user && cp /path/to/get_gists.py .
# python3 get_gists.py user
import requests
import sys
from subprocess import call
import numpy as np
user = sys.argv[1]
View EM1000-Numpy.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View PDAL_EM1000.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View fvcom_bottom_stress.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View a.rb
gdal_translate -of GMT grassdata/nc_basic_spm_grass7/PERMANENT/cellhd/elevation elevation.gmt
gdalwarp -overwrite elevation.gmt out_elevation.gmt -t_srs EPSG:4326
gmt grdgradient out_elevation.gmt -Ne0.8 -A100 -fg -Gus_i.nc
gmt makecpt -Chaxby -T50/160/10 -Z > topo.cpt
gmt grdimage out_elevation.gmt -JM6i -P -Ba -Ctopo.cpt -V -K -Ius_i.nc >> GMT_tut_12.ps
gmt grdcontour out_elevation.gmt -JM6i -O -BWSne -C20 -A20 >> GMT_tut_12.ps
gmt psscale -DjTC+w5i/0.25i+h+o0/-1i -Rout_elevation.gmt -JM6i -Ctopo.cpt -B+tcontinuous -I0.5 -O -Ba1000:Elevation:/:m: >> GMT_tut_12.ps
View FVCOM bedload transport.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yoavram
yoavram / nbreveal_preview.py
Last active Dec 14, 2015
Python web server to preview IPython reveal.js presentations. Automatically converts ipynb to html everytime the ipynb file changes. Requirements: Flask, Watchdog, nbconvert with reveal, copy reveal and js folders from nbconvert to the same folder as the server is at.
View nbreveal_preview.py
from flask import Flask, send_file, send_from_directory
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
import os
NBCONVERT_PATH = '../nbconvert/nbconvert.py'
TARGET_IPYNB = 'presentation.ipynb'
TARGET_HTML = 'presentation_slides.html'
def nbconvert():
You can’t perform that action at this time.