Skip to content

Instantly share code, notes, and snippets.

View warmlogic's full-sized avatar

Matt Mollison warmlogic

View GitHub Profile
#! /usr/bin/env python
# Script to migrate from Everyday to CloseUp (iOS apps for snapping daily photos)
# Instructions: https://closeup.wtf/everyday-import
# It seems that Everyday flips photos horizontally compared to CloseUp.
# CloseUp is like a mirror, but the photos from Everyday are the opposite (right on left).
# This script asks whether to flip the Everyday photos during export.
from __future__ import print_function # in case of python2

Screen recording on macOS

Includes the ability to record system audio

Apowersoft Screen Recorder

  • Download from either the Mac App Store or as a direct download
  • If browsing the Apowersoft website, the app is accessible under the “Mac” menu. Note that this is different from Screen Recorder Pro under the “Products” menu.

Record system audio

@warmlogic
warmlogic / keybase.md
Created February 25, 2018 20:51
Keybase proof

Keybase proof

I hereby claim:

  • I am warmlogic on github.
  • I am mattvm (https://keybase.io/mattvm) on keybase.
  • I have a public key ASAvdrQZgNFrHur6ypSNfYDHWZAA9JJDOiAxDlSp_cVF7Ao

To claim this, I am signing this object:

@warmlogic
warmlogic / keybase.md
Created February 25, 2018 20:51
Keybase proof

Keybase proof

I hereby claim:

  • I am warmlogic on github.
  • I am mattvm (https://keybase.io/mattvm) on keybase.
  • I have a public key ASAvdrQZgNFrHur6ypSNfYDHWZAA9JJDOiAxDlSp_cVF7Ao

To claim this, I am signing this object:

-- adapted from https://gist.github.com/gabriel-r/f98886d589682d1429744bdbfbfbe11a
-- Create as an Automator Service: Receives "no input" in "any application"
-- System Preferences > Keyboard > Shortcuts > Services: Set keyboard shortcut (e.g., Cmd-Shift-E)
-- Must select URL in browser (Cmd-L) before triggering with keyboard shortcut
tell application "System Events"
set activeApp to name of first application process whose frontmost is true
if "Safari" is in activeApp then
set theURL to missing value
tell application "Safari"
if (exists window 1) then
from __future__ import division
import pandas as pd
import numpy as np
import seaborn as sns
from matplotlib import pyplot as plt
# import matplotlib as mpl
# import os
from sklearn.ensemble import RandomForestClassifier
from sklearn.linear_model import LogisticRegression
# calculate and visualize silhouette score from k-means clustering.
# plots first two features in 2D and first three features in 3D.
# from: http://scikit-learn.org/stable/auto_examples/cluster/plot_kmeans_silhouette_analysis.html
from sklearn.cluster import KMeans
from sklearn.metrics import silhouette_score, silhouette_samples
from mpl_toolkits.mplot3d import Axes3D
##### cluster data into K=1..K_MAX clusters #####
K_MAX = 10
@warmlogic
warmlogic / SciPy and OSCON.ipynb
Last active August 29, 2015 14:27 — forked from jbwhit/SciPy and OSCON.ipynb
Some notes on talks that I recommend from the SciPy and OSCON 2015 conferences.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@warmlogic
warmlogic / radar_plot.py
Last active August 29, 2015 14:26 — forked from cfperez/radar_plot.py
radar_plot() wrapper function around matplotlib example
from __future__ import print_function
import matplotlib.pyplot as plt
from matplotlib.path import Path
from matplotlib.spines import Spine
from matplotlib.projections.polar import PolarAxes
from matplotlib.projections import register_projection
import numpy as np
import seaborn as sns
def radar_plot(data, feat_labels=[], line_labels=None, colors=None, ax=None, frame='circle', **kwargs):