Skip to content

Instantly share code, notes, and snippets.

vages Vages

Block or report user

Report or block Vages

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Requires you to install ffmpeg with all options (or at least the rubberband module):
Example usage:
$ ./ /input.mp3 /output.mp3 -2
import sys
Vages /
Created Feb 28, 2017
Formats phone numbers
import os
filename = "mv17.csv"
phone_column = 2
with open(os.path.join(".", filename), "r") as f:
new_lines = []
for i, l in enumerate(f.readlines()):
if i == 0:
Vages /
Last active Feb 14, 2017
Combines multiple pdf files into one
from PyPDF2 import PdfFileMerger
def merge(input_files, output_file):
merger = PdfFileMerger(strict=False)
for pdf in input_files:
output_file = ""
Vages /
Last active Jan 8, 2017
A script to generate a random numeric pin along with a string of possible ‘phone keyboard phrases’ (using the letters shown on a phone keyboard, setting 1 to punctuation and 0 to language-specific letters).
from random import choice
available_numbers = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"]
numbers_to_letters = {"1":["."],
"2":["A", "B", "C"],
"3":["D", "E", "F"],
"4":["G", "H", "I"],
"5":["J", "K", "L"],
"6":["M", "N", "O"],
from random import randint, sample
def enough_distance(m, t):
return not ((m + t) < 4 or ((12 - m) + (12 - t)) < 4)
def get_meeple_placements():
Generates and prints the board game arrangement
occupied_temple_spaces = set()
You can’t perform that action at this time.