View ffmpeg.md

ffmpeg

Converting Audio into Different Formats / Sample Rates

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:

View sftp.py
# Reference: https://stackoverflow.com/questions/3635131/paramikos-sshclient-with-sftp
import paramiko
paramiko.util.log_to_file('/tmp/paramiko.log')
# Open a transport
host = "example.com"
port = 22
transport = paramiko.Transport((host, port))
View mkselfssl.sh
#!/bin/bash
# @author Adriano Rosa (http://adrianorosa.com)
# @date: 2014-05-13 09:43
#
# Bash Script to create a new self-signed SSL Certificate
# At the end of creating a new Certificate this script will output a few lines
# to be copied and placed into NGINX site conf
#
# USAGE: this command will ask for the certificate name and number in days it will expire
View gencert.sh
#!/bin/bash
# Bash shell script for generating self-signed certs. Run this in a folder, as it
# generates a few files. Large portions of this script were taken from the
# following artcile:
#
# http://usrportage.de/archives/919-Batch-generating-SSL-certificates.html
#
# Additional alterations by: Brad Landers
# Date: 2012-01-27
View word_frequency.py
#!/usr/bin/python
"""Python script to create a histogram of words in a text file.
Usage: python word_frequency.py -f "/path/to/file.txt" -n 200
Specify the path to the text file as above. Manually specify the top N words to report (default 100).
Text file can contain punctuation, new lines, etc., but special characters aren't handled well.
View meghan_movie.txt
Creating model...
Restoring weights...
Human: What is your perfect day?
Alice: I don't know what you're talking about.
Human: If you could have been born into a different time in history, what would you choose?
Alice: He'd been seeing each other.
Human: How do you want to be remembered?
View GPUs.txt
0x1000:0x0001::0:[GPUs.txt file] Updated 20180327 -B
0x1002:0x0002:::[R9600 Pro] (Asus OEM for HP - Primary)
0x1002:0x0003:::[R9600 Pro] (Asus OEM for HP - Secondary)
0x1002:0x0004:::[Rage Fury Pro]
0x1002:0x000a:::[Radeon 7000]
0x1002:0x000b:::[Radeon 7000]
0x1002:0x000d:::[Radeon X1200]
0x1002:0x0014:::[Rage Fury Pro]
0x1002:0x001a:::[Radeon 7000]
0x1002:0x001c:::[Rage 128 Pro 4XL]
View 70-persistent-net.rules
# /etc/udev/rules.d/70-persistent-net.rules
# ln -sfn /dev/null /lib/udev/rules.d/80-net-setup-link.rules
# Ref: https://unix.stackexchange.com/questions/328485/ubuntu-16-04-change-interface-name
# PCI device 0x10ec:0x8xxxx (ethernet_module_here)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="3x:17:ef:6f:s2:2h", ATTR{dev_id}=="0x0", ATTR{type}=="1", NAME="eth0"
View Install NVIDIA Driver and CUDA.md
View gpu.md
  • [AMD OpenCL on Ubuntu 16.04][0]
  • [AMD OpenCL 2.0 Driver][1]
  • [GPU Spreadsheet][3]

Finetune NVIDIA GPU with nvdia-smi, [source][2]

sudo nvidia-smi -pm 1
sudo nvidia-smi -acp 0
sudo nvidia-smi — auto-boost-permission=0