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
# Tested on Centos 6 x64 | |
echo This will install some codecs and encoders. | |
read -rsp $'Press any key to continue OR CTRL-c to QUIT ...\n' -n1 key | |
# Update mpeg123 to newer version | |
echo This will tell you your current version of mpeg123 - note this | |
mpg123 | |
echo Installing a newer version now: | |
cd | |
# OLD: wget https://sourceforge.net/projects/mpg123/files/mpg123/1.23.8/mpg123-1.23.8.tar.bz2/download -O mpg123-1.23.8.tar.bz2 |
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
const boxes = [[2, 3, 4], [1, 1, 10]]; | |
// Calculates the total surface area of a box. | |
function total(bs) { | |
var total = []; | |
for (var b of bs) { | |
sides = [b[0]*b[1], b[1]*b[2], b[2]*b[0]]; | |
m = Math.min(sides[0], sides[1], sides[2]); |
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 python3 | |
# -*- coding: utf-8 -*- | |
import os | |
import re | |
import sys | |
if sys.stdin.isatty(): | |
print("""Outputs a line if the input changed. |
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 codecs | |
import inspect | |
def read_local_file(filename): | |
"""Reads the file from the directory of the caller. | |
Example usage in ~/myproj/tests/test_web.py: | |
read_local_file("example-payload.json") | |
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
# Uses pep8radius to check the to be committed patch for PEP-8 errors. | |
# | |
# https://github.com/alexcouper/captainhook | |
# https://github.com/hayd/pep8radius | |
# https://www.python.org/dev/peps/pep-0008/ | |
from .utils import bash | |
CHECK_NAME = 'pep8radius' |