This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding=utf-8 | |
# License: Public domain (CC0) | |
# Isaac Turner 2016/12/05 | |
from __future__ import print_function | |
import difflib | |
import re |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gi | |
gi.require_version('Gst', '1.0') | |
from gi.repository import Gst | |
caps = Gst.Caps.from_string("audio/x-raw, rate=(int)44100, channels=(int)2, format=(string)S16LE, layout=(string)interleaved") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [B, REM] = sudoku_solver(A) | |
% | |
% [B, REM] = sudoku_solver(A); | |
% | |
% Solves the sudoku given by A. Only works if there is no guessing needed. | |
% | |
% A,B are 9x9 matricies of the values, with 0 for blanks | |
% REM is a 9x9x9 matrix of the possible values, with 0 indicating it is not possible, 1 indicating | |
% it is, -1 indicating that it is set to that value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Put this file in /usr/local/bin/ then chmod +x | |
import sys | |
# You need to tell python where to look for serial module if running from a keymap. | |
#sys.path.append("/usr/lib/python2.7/") | |
#set by computer, change to your needs | |
SERIAL_DEV = "/dev/ttyUSB0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Renames music video files in a given directory or listed in a given file by | |
fingerprinting the song and querying last.fm for the best match to that | |
fingerprint. If a directory and a file are given, uses the file. | |
""" | |
#Requires apt-get install liblastfm-fingerprint0 | |
#Requires pylast from http://code.google.com/p/pylast/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Brute force music matching script. Gets the unique identifiers of each music | |
file in the music directory and finds duplicate. All duplicates are output in a | |
list at the end. Output defaults to STDOUT, but can be set as a file. | |
Tags are used to match files, so make sure the tags are correct (maybe try | |
music_tag_corrector.py first) | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# This script will change any explicity/manually installed packages that are | |
# dependended on by other packages into packages installed as dependencies. The | |
# idea is to minimise the manually installed packages throughout upgrades. | |
# | |
PACMAN=yaourt | |
TEMPDIR=$(mktemp -d /tmp/packages.XXXXXXXXXX) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Finds duplicate files based on MD5 hashsum | |
""" | |
import os | |
import os.path | |
import sys | |
import sqlite3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Corrects the tags of all music files in a given directory or listed in a given | |
file by fingerprinting the song and querying last.fm for the best match to that | |
fingerprint. If a directory and a file are given, uses the file. Doesn't correct | |
any tags to do with albums. | |
""" | |
#Requires apt-get install python-mutagen liblastfm-fingerprint1 |