wget -qO- https://get.docker.com/ | sh
docker build -t <img name> .
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from SimpleCV import * | |
from StringIO import * | |
from time import sleep | |
# I have to make a little alter on the default script api.py from tweepy since the guys didn't commit yet the update_with_media function | |
import tweepy | |
if __name__ == '__main__': |
# The commands must be executed in the order bellow! Not doing this may break the installation! | |
# Install python-software-properties if you get a 'command not found' | |
# sudo apt-get install python-software-properties | |
# In case you need to install setuptools | |
# Keep in mind that doing this may destroy pip installation of setuptools | |
# Instead you can pip install setuptools ... :) | |
# wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python |
from PIL import Image, ImageFilter | |
filename = "dship1" | |
image = Image.open(filename + ".png") | |
image = image.filter(ImageFilter.FIND_EDGES) | |
image.save(filename + "_edge.png") | |
cols = image.width | |
rows = image.height | |
points = [] |
import sys, getopt | |
import argparse | |
from PIL import Image | |
if __name__ == "__main__": | |
parser = argparse.ArgumentParser() | |
parser.add_argument('-i', '--image') | |
parser.add_argument('-o', '--output') | |
parser.add_argument('-d', '--divisor') | |
args = parser.parse_args() |
# DEPENDENCIES | |
# LINUX INSTALLS! | |
# apt-get install transmission firefox python-dev python-pip | |
# PYTHON LIBS NEED IT! | |
# pip install requests beautifulsoup4 transmissionrpc pyopenssl ndg-httpsclient pyasn1 selenium | |
import requests as req | |
import transmissionrpc |
# ESP8266 12E + MicroPython | |
## Install tools to connect to the board | |
pip install esptool ampy | |
apt install picocom | |
## Erase | Flash the firmware | |
esptool.py --port /dev/ttyUSB0 erase_flash | |
esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect 0 esp8266-20170108-v1.8.7.bin |
Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma
You can get the list of supported formats with:
ffmpeg -formats
Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:
A Better CD Encoder
Grab an entire CD and compress it to Ogg/Vorbis, MP3, FLAC, AAC, Ogg/Speex and/or MPP/MP+(Musepack) format.
Ordinarily, the process of grabbing the data off a CD and encoding it, then tagging or commenting it, is very involved. abcde is designed to automate this. It will take an entire CD and convert it into a compressed audio format - Ogg/Vorbis, MPEG Audio Layer III, Free Lossless Audio Codec (FLAC), Ogg/Speex, MPP/MP+(Musepack), M4A (AAC) or Opus format(s). With one command, it will:
#!/usr/bin/env bash | |
checksum() { | |
FILE=$1 | |
if [ "$ALGO" = "SHA1" ]; then | |
sha1sum $FILE | |
else | |
md5sum $FILE | |
fi | |
} |