Skip to content

Instantly share code, notes, and snippets.

View aadm's full-sized avatar

Alessandro Amato del Monte aadm

View GitHub Profile
@aadm
aadm / thoughts-d7000.md
Created July 31, 2012 15:48
Thoughts on the D7000

I don't really need to write anything you know, just read this - I feel exactly the same: http://photo.rwboyer.com/2012/04/15/some-good-things-D7000.

But hold on, let me add my 2 cents.

where I come from

Some context first; I arrived at the Nikon D7000 from a long apprenticeship.

I started with a Yashica FX-3 and its 50mm f/1.8, then I moved to a Nikon F70 (we're still in the ancient film era now). After a few crappy compact digital cameras (and one less crappy than others, the Canon G5) I got my first DSLR (a Nikon D70s) which was excellent until it broke down.

@aadm
aadm / old wellmagic.ipynb
Last active August 29, 2015 14:09
IPython notebook to show how to use Python, Pandas etc to do geophysics
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aadm
aadm / seismic_polarity_cartoons.py
Created August 4, 2016 09:29
Little Python script to create seismic polarity cartoons.
import numpy as np
import matplotlib.pyplot as plt
import bruges as b
def disegna_schemino(z, ai, wavelet,titolo):
f, ax = plt.subplots(nrows=1,ncols=2, figsize=(2,2),facecolor='w')
ax[0].plot(ai,z, '-k', lw=4)
ax[1].plot(wavelet, z, '-k', lw=2)
if colori:
ax[1].fill_betweenx(z,wavelet,0, where=wavelet>0, facecolor=[0.6,0.6,1.0], linewidth=0)
@aadm
aadm / example_plot3dseis.py
Last active May 9, 2024 14:10
Python function to plot inline, crossline or horizontal slice from 3D seismic volume. Also included example showing how to load a 3D cube and display it.
import numpy as np
import matplotlib.pyplot as plt
import time
from obspy.io.segy.segy import _read_segy
# sample 3d cube from GOM, download here:
# https://walrus.wr.usgs.gov/namss/survey/b-05-88-la/
filename='G3D1304_005_L88_056_LN_1664-3428.sgy'
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@aadm
aadm / batch_create_movie_from_sequence.sh
Last active March 8, 2020 19:02
Creating movies from an image sequence with ffmpeg
# execute with `sh script.sh`
DIR=/Users/alex/Pictures/sequence
for i in $DIR/*_BURST000.jpg
do
TMP=`basename ${i} .jpg`
IN=${TMP%???}
OU=`echo ${TMP} | cut -d'_' -f3`
echo "create video from sequence starting with ${IN}, output to ${TMP}.mp4"
@aadm
aadm / heartrate_comparison.py
Last active September 29, 2017 21:50
Little hack scripts to compare heartrate measurements from Polar and Garmin.
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
import pandas as pd
import os
# (1) Garmin Connect: export gpx
# (2) convert gpx with heartrate_comparison_dataprep.sh <file.gpx>
# (3) Polar Flow: export csv
@aadm
aadm / jefferey_ffmpeg_recipe.md
Last active February 22, 2018 20:40
Jefferey's ffmpeg recipe.

This is a little help given to Jefferey, co-host of the OTP podcast which I follow since its beginning. Yesterday he sent out a tweet asking for help on something that I knew it could be solved with the power of open source. I hope everything is clear and work as intended. If it does, I'd like for Jefferey to check my suggestions for italian photographers to be featured on OTP! (aadm 22-Feb-2018)

get ffmpeg

First step, get ffmpeg on your Mac.

I recommend brew but other options exist. If you don't have brew, then install this one first (it's a powerful package manager to get all sort of cool open source, unix-like apps on Mac). Instructions are on the website or simply input this at the terminal:

$ /usr/bin/ruby -e "$(curl -fsSL https:

@aadm
aadm / italian_photographers_otp.md
Last active May 25, 2018 10:35
Italian photographers suggestions for On Taking Pictures.

In 2014 and in 2017 I sent two emails to OTP suggesting a few italian photographers. In one episode (I think end-2016/2017) Bill & Jefferey actually talked about another photographer which I also enjoy, Luigi Ghirri, so I thought hey, it's the moment to remind them about other italian photographers!

I have condensed and edited the text written in those emails in this gist.

In this latest edit I have expanded the section on Alex Majoli and added a fourth photographer, who happens to be a dear friend of mine and the antithesis of the accomplished/professional photographer, Dylan Kier.

Cito

@aadm
aadm / sinc_gdrive.sh
Created April 18, 2018 14:56
Google Drive sync with rclone
#!/bin/bash
# script to sync Google Drive with local folder using rclone
# modified from initial version that used rsync and a usb disk
# by default will write log to home directory with name sinc_gdrive_log.txt
# check also exclusion list
# usage:
#
# $ sinc_gdrive.sh [command]
#
@aadm
aadm / python_miniconda_squit_install.md
Last active March 27, 2019 14:15
Python via miniconda and squit installation

How to install Python via Miniconda and squit for dummies.

Install miniconda: https://docs.conda.io/en/latest/miniconda.html

Start menu/anaconda (if on Windows), launch anaconda prompt.

Execute following commands to install all required libraries and extras:

conda install numpy scipy pandas matplotlib jupyter scikit-learn

pip install bruges lasio segyio