Skip to content

Instantly share code, notes, and snippets.

@samgrover
samgrover / my-exiftool.md
Created June 27, 2024 00:34
My exiftool commands

ExifTool commands

Film ISO

exiftool -progress -overwrite_original -iso=160 <filenames>

Equipment

Hasselblad (with lens)

@samgrover
samgrover / imdb-top-movies-multiple-directors.py
Created December 29, 2022 17:40
Playing with the IMDb dataset to find top movies that have multiple directors
#!/usr/bin/env python
# Script to go along with the blog post at: https://samgrover.com/2022/12/29/playing-with-the.html
import pandas as pd
FOLDER = '<folder where the dataset lives>'
name_basics_file = FOLDER + '/name.basics.tsv'
title_ratings_file = FOLDER + '/title.ratings.tsv'
title_crew_file = FOLDER + '/title.crew.tsv'
@samgrover
samgrover / newsurl.py
Created May 11, 2021 22:40
Extract URL From Apple News URL
#!/usr/bin/env python
# A helper script to convert an Apple News URL on the clipboard into
# its corresponding canonical URL and put that on the clipboard.
import pasteboard
import requests
import re
pb = pasteboard.Pasteboard()
@samgrover
samgrover / ohs-kittens.py
Last active August 19, 2020 22:30
Fetch kittens available for adoption and notify if there are new ones.
#!/usr/bin/env python
# Fetch current kittens available for adoption and notify if there are new ones.
import sys
import requests
import logging
import re
import json
from datetime import datetime
#!/usr/bin/env python
# A helper script to convert a CSV files of my books read into Markdown for website.
# Usage:
# books.py <books.csv exported from Books.numbers>
import sys
import csv
from datetime import datetime
@samgrover
samgrover / swarm-day-one-import.py
Created April 16, 2019 17:51
Parse the Swarm/Foursquare exported data and create entries in Day One using their command line tool.
#!/usr/bin/env python
# Parse the Swarm/Foursquare exported data and create entries in Day One using their command line tool.
# Day One command line tool available at: http://dayoneapp.com/support/CLI
import sys
import json
import requests
import subprocess
import time
@samgrover
samgrover / gist:3f12c814440ff47eb10d
Created June 3, 2014 16:59
Swift example code transliterated in Hindi
// Playground - noun: a place where people can play
enum Rank: Int {
case Ace = 1
case Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten
case Jack, Queen, King
func description() -> String {
switch self {
case .Ace:
return "ace"

Keybase proof

I hereby claim:

  • I am samgrover on github.
  • I am samgrover (https://keybase.io/samgrover) on keybase.
  • I have a public key whose fingerprint is 2008 F779 4918 080E 6AD2 30A9 D111 6E50 B1C1 A165

To claim this, I am signing this object: