State as of 2017-07-31.
You can also check a guide to upgrade CUDA on a [PC with with GTX 980 Ti and Ubuntu 16.04](https://gist.github.com/bzamecnik/61b293a3891e166797491f38d579d060.
- NVIDIA driver 375.66
# -*- coding: utf-8 -*- | |
import numpy as np | |
import Image | |
import sys | |
def from_pil(pimg): | |
pimg = pimg.convert(mode='RGB') | |
nimg = np.asarray(pimg) | |
nimg.flags.writeable = True | |
return nimg |
# Create background noise profile from mp3 | |
/usr/bin/sox noise.mp3 -n noiseprof noise.prof | |
# Remove noise from mp3 using profile | |
/usr/bin/sox input.mp3 output.mp3 noisered noise.prof 0.21 | |
# Remove silence from mp3 | |
/usr/bin/sox input.mp3 output.mp3 silence -l 1 0.3 5% -1 2.0 5% | |
# Remove noise and silence in a single command |
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause" XF86AudioPlay | |
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop" XF86AudioStop | |
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next" XF86AudioNext | |
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous" XF86AudioPrevious |
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
""" | |
Webserver für Python | |
03.01.2014 MH Quelltext für Python 2.7 und 3.x | |
30.05.2013 MH Quelltext nach PEP8 überprüft | |
http://creativecommons.org/licenses/by-nc-sa/3.0/de/ | |
""" | |
try: | |
import Tkinter as tk |
#!/usr/bin/expect -f | |
set prompt "#" | |
set address [lindex $argv 0] | |
spawn sudo bluetoothctl -a | |
expect -re $prompt | |
send "remove $address\r" | |
sleep 1 | |
expect -re $prompt |
#/usr/bin/python3 | |
""" Demonstration of logging feature for a Flask App. """ | |
from logging.handlers import RotatingFileHandler | |
from flask import Flask, request, jsonify | |
from time import strftime | |
__author__ = "@ivanleoncz" | |
import logging |
State as of 2017-07-31.
You can also check a guide to upgrade CUDA on a [PC with with GTX 980 Ti and Ubuntu 16.04](https://gist.github.com/bzamecnik/61b293a3891e166797491f38d579d060.
# https://www.pyimagesearch.com/2018/07/23/simple-object-tracking-with-opencv/ | |
# import the necessary packages | |
from scipy.spatial import distance as dist | |
from collections import OrderedDict | |
import numpy as np | |
class CentroidTracker(): | |
def __init__(self, maxDisappeared=50): | |
# initialize the next unique object ID along with two ordered |
# Copy fan-speed-control.sh to `/usr/local/bin/fan-speed-control.sh`, | |
# make sure it's executable with `sudo chmod +x /usr/local/bin/fan-speed-control.sh`. | |
# Then copy this file `/lib/systemd/system/fan-speed-control.service`, | |
# then run `sudo systemctl enable --now fan-speed-control`. | |
# Check that everything looks OK with `sudo journalctl -fe -u fan-speed-control`. | |
[Unit] | |
Description=Fan speed control | |
[Service] |