Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.
brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
Note: Adapted from official Ubuntu instructions for Tensorflow using virtualenv.
This gist is currently a "Work in Progress". It works, but requires superuser privileges. I have not tested it with GPU support.
sudo dnf install python-pip python-devel python-virtualenv # for Python 2.7
sudo dnf install python3-pip python3-devel python3-virtualenv # for Python 3.x
import cv2 # opencv | |
import numpy as np | |
font_scale = 1.5 | |
font = cv2.FONT_HERSHEY_PLAIN | |
# set the rectangle background to white | |
rectangle_bgr = (255, 255, 255) | |
# make a black image | |
img = np.zeros((500, 500)) |
from dataclasses import dataclass, field | |
from itertools import count | |
from datetime import datetime | |
counter = count() | |
@dataclass | |
class Event: | |
message: str |
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# don't put duplicate lines in the history. See bash(1) for more options | |
# ... or force ignoredups and ignorespace | |
HISTCONTROL=ignoredups:ignorespace |
In this document, I will explain how to upgrade the default systemd
version from 237 to 242.
The main reason why I needed this was related to the DNS-over-TLS that was not supported in the version 237 but available from version 242.
Later, when playing with Lynis, the security auditing tool, I then discovered that the version 242 was also providing the command systemd-analyze
that is used by lynis
to detect if existing systemd
services are configured correctly in the security context, meaning that the existing services can run as expected but needs few or several changes in their configuration to make them safe without any exploitable attack surfaces.
You can try it once you've installed the version 242 of systemd
that way:
The Logitech Options program isn't available for Linux, but by a nice guy on GitHub (PixlOne) created an open source project that lets you obtain some of that functionality. It's called logiops. It works in conjunction with the Solaar project as well, which I find especially handy since that shows your available battery life in the system tray and lets you pair/unpair devices with the Logitech Unifying Receiver.
Here are some additional pages with info that I used to generate this documentation:
"""A minimal profiler to compare speed differences between reading a video with opencv | |
and DALI. | |
For both dataloaders, the goal is to read an mp4 video and then load batches of frames | |
onto the GPU. | |
""" | |
import os | |
import logging | |
import time | |
import subprocess |