wget -qO- https://get.docker.com/ | sh
docker build -t <img name> .
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() |
#!/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__': |
# 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:
sudo apt-get install clinfo ocl-icd-opencl-dev mesa-opencl-icd |
$> apt-get update && sudo apt-get upgrade
$> apt-get install -y make build-essential libssl-dev zlib1g-dev
$> apt-get install -y libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm
$> apt-get install -y libncurses5-dev libncursesw5-dev xz-utils tk-dev
$> wget https://www.python.org/ftp/python/3.7.7/Python-3.7.7.tgz