Skip to content

Instantly share code, notes, and snippets.

View KristoforMaynard's full-sized avatar

Kristofor Maynard KristoforMaynard

View GitHub Profile
Vimrc
" Part of AbsoluteVimrc at https://github.com/KristoforMaynard/AbsoluteVimrc
" ~Kristofor Maynard
"
" Listing of mappings and commands found by using 'help AbsoluteVimrc'
set ruler
set autoindent
#!/usr/bin/env python
from __future__ import division, print_function
import sys
import numpy as np
import viscid
# from viscid.plot import vpyplot as vlt
#!/usr/bin/env python
"""Install a new package into an anaconda environment and copy new
entries in Anaconda's cache to ``./conda-cache/``. You can bring
``./conda-cache`` to an air-gapped computer and install the packages
using
$ conda install --offline --use-local --use-index-cache conda-cache/*
Note:
{
"schema_version": "3.0.0",
"repositories": [
"https://gist.github.com/KristoforMaynard/6804f526f97504d9dd123f4c090624e1/raw/packages.json"
]
}
@KristoforMaynard
KristoforMaynard / f2py_libgfortran_hack.py
Created November 7, 2017 17:38
Force f2py to discover libgfortran path
# the folloing gfortran hacks are to work around a treacherous bug when
# using anaconda + f2py (numpy) + a local gfortran on MacOS / Linux...
# in short, anaconda ships its own libgfortran to make numpy / scipy
# work, but this will conflict with some gfortran compilers...
# AND numpy assumes that `gfortran -print-libgcc-file-name` will give the
# path to libgfortran (it practice it doesn't on Debian / MacPorts)... SO
# we let numpy discover the path to libgfortran using
# `gfortran -print-file-name=libgfortran.so` (or dylib) because that will
# give us the correct link path, and fortran code that we compile with f2py
# will be correctly linked to the lib supplied by OUR compiler
We can't make this file beautiful and searchable because it's too large.
,artist,album,name,release date,release year,release month,release day,time played
0,Jackson 5,Jackson Five's Greatest Hits,ABC,,,,,2016-11-30 06:01:00
1,Elvis Presley,50 Million Elvis Fans Can't Be Wrong,A Big Hunk O' Love,,,,,2016-11-30 06:04:00
2,Johnny Cash,At San Quentin,A Boy Named Sue (live),1969-06-04,1969.0,6.0,4.0,2016-11-30 06:06:00
3,Joni Mitchell,Blue,A Case Of You,1971-06-22,1971.0,6.0,22.0,2016-11-30 06:10:00
4,Ernie K-Doe,Var-Best Of N.O. R&B Vol.1,A Certain Girl,,,,,2016-11-30 06:16:00
5,Warren Zevon,Bad Luck Streak In Dancing School,A Certain Girl,1980-02-15,1980.0,2.0,15.0,2016-11-30 06:19:00
6,Sheryl Crow,Sheryl Crow,A Change,1996-09-24,1996.0,9.0,24.0,2016-11-30 06:24:00
7,Sam Cooke,The Man And His Music,A Change Is Gonna Come,1986-02-01,1986.0,2.0,,2016-11-30 06:28:00
8,The Beatles,Sgt. Pepper's Lonely Hearts Club Band,A Day In The Life,1967-06-01,1967.0,6.0,1.0,2016-11-30 06:31:00
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html>
<head><meta charset="utf-8" />
<title>XPNAtoZ_Stats</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<style type="text/css">
/*!
from __future__ import print_function
import sys
import textwrap
def format_heading(text, style="-"):
return "{0}\n{1}\n".format(text, style * len(text))
def format_table(names, descriptions, style="=", func_heading="Function ",
#!/usr/bin/python
#
# retrieved from:
# https://github.com/ocelma/python-itunes/blob/e3adf9e837ccbf9ded9d7352ad8e45b56ab410eb/itunes/__init__.py
#
# edited by KristoforMaynard@github to be python 3 compliant and add
# :py:class:`EmptyReturner`, :py:class:`ResultWrapper`, and :py:func:`wrap_results`
"""A python interface to search iTunes Store"""
from __future__ import division, print_function, unicode_literals
#!/usr/bin/env python
"""Serve up an image from a music file
Install:
I highly recomend running this script with py3k since it has better
unicode support.
On a Raspbery Pi: