Skip to content

Instantly share code, notes, and snippets.

View rsln-s's full-sized avatar

Ruslan Shaydulin rsln-s

View GitHub Profile
@jg-you
jg-you / orbits.py
Last active June 11, 2024 18:28
Computing the number of orbits in a graph, with dreadnaut (nauty), in python
# -*- coding: utf-8 -*-
"""
Wrapper around dreadnaut that computes the orbits of a graph.
NOTE: Must have installed `dreandaut`. The location of the binary can be passed
as an argument to `compute_automorphisms`.
Author: Jean-Gabriel Young <info@jgyoung.ca>
"""
import subprocess
@thbar
thbar / how-to-diff-pdf-files-with-git-and-diffpdf.md
Last active June 30, 2024 10:38
How to diff PDF files with Git

One can use MD5 or plain text diff to see differences in PDF files. If that's not enough, here's how to use diff-pdf which knows how to diff based on appearance or words:

  • brew install diff-pdf
  • edit your ~/.gitconfig to add this:
[difftool "diffpdf"]
  cmd = diff-pdf --view \"$LOCAL\" \"$REMOTE\"