Map [1]
| Operation | Time Complexity |
|---|---|
| Access | O(log n) |
| Search | O(log n) |
| Insertion | O(n) for <= 32 elements, O(log n) for > 32 elements [2] |
| Deletion | O(n) for <= 32 elements, O(log n) for > 32 elements |
| #!/usr/bin/env python | |
| import sys | |
| from datetime import datetime | |
| HELP_MESSAGE = """/ | |
| Usage :- | |
| $ ./todo add "todo item" # Add a new todo | |
| $ ./todo ls # Show remaining todos | |
| $ ./todo del NUMBER # Delete a todo | |
| $ ./todo done NUMBER # Complete a todo | |
| $ ./todo help # Show usage |
| - Parzialmente ispirato a vari gist sparsi per il web | |
| - Sto ancora facendo tuning dei parametri | |
| # TRASMETTERE: | |
| INTEL e AMD [VAAPI] (libva-mesa-driver): | |
| ffmpeg -f x11grab -s 1920x1080 -framerate 60 -i $DISPLAY -vaapi_device /dev/dri/renderD128 -vf 'format=nv12,hwupload,scale_vaapi=w=1920:h=1080' -c:v h264_vaapi -qp:v 26 -bf 0 -preset superfast -tune zerolatency -b:v 2000K -minrate 2000K -maxrate 2000K -bufsize 512k -f rawvideo udp://192.168.1.222:12345 | |
| NVIDIA (CUDA/NVENC/H264) STREAM: | |
| ffmpeg -hwaccel cuda -hwaccel_output_format cuda -f x11grab -s 1920x1080 -i $DISPLAY -c:v h264_nvenc -zerolatency 1 -delay:v 0 -preset p1 -tune ull -b:v 2000k -bufsize 512k -maxrate 2000k -qmin 0 -temporal-aq 1 -rc-lookahead 0 -i_qfactor 0.75 -b_qfactor 1.1 -f rawvideo udp://192.168.1.222:12345 |
| #!/bin/bash | |
| ## about | |
| # this does two things 1) provides a visual indicator when moving between panes | |
| # 2) cleverly cycles between the previous pane on all windows across the session. | |
| # NOTE this script does echo out every single tmux focus switch to a file in /tmp/ | |
| # so unless you turn your machine off every night you'll want to find some way of | |
| # dealing with that. |