Skip to content

Instantly share code, notes, and snippets.

View berndporr's full-sized avatar

Bernd Porr berndporr

View GitHub Profile
@berndporr
berndporr / gist:2770205fd0c60d0a9026220ff2fcca6a
Last active July 16, 2023 13:58
Tensorflow compiling from source with GPU
Compiling TensorFlow v2.13.0 from source:
This is in conjunction with https://www.tensorflow.org/install/source but fills the gaps!
Install Bazel 5.3.0
Install the cuda toolkit v11.8 and get rid of any other cuda toolkits. Otherwise TF will find them and create chaos.
apt install cuda-toolkit-11-8
Install cudnn 8.7 (TF recommends 8.6 but 8.7 also works well):
apt-get install libcudnn8-dev=8.7.0.84-1+cuda11.8 libcudnn8=8.7.0.84-1+cuda11.8
@berndporr
berndporr / gist:c394240401cf510d8c307558259e67d9
Created September 5, 2022 11:05
Constant logging of sound to firebase with a background worker on Android (sort of a hack)
In the main Application schedule the Worker as a one-off task and then re-schedule the task again:
final OneTimeWorkRequest recWorkRequest =
new OneTimeWorkRequest.Builder(RecWorker.class)
.build();
WorkManager
.getInstance(getApplicationContext())
.enqueueUniqueWork(RecWorker.TAG, ExistingWorkPolicy.REPLACE,recWorkRequest);
@berndporr
berndporr / gist:c41c01944ee3f340f20269b405b4c778
Created March 18, 2022 17:27
twitter video export settings for avidemux
MPEG4 (AVC)
AAC (lav)
MP4 container
max duration 2:20
@berndporr
berndporr / gist:847eb9c3c87d4af2372638900f6be102
Last active April 23, 2022 17:34
X forwarding on a raspberry pi after sudo
sudo -s
touch /root/.Xauthority
xauth merge /home/pi/.Xauthority
@berndporr
berndporr / wacom_dual.sh
Last active December 29, 2021 10:49
Sets up a wacom tablet for the left screen only on a dual screen setup
#! /bin/bash
# Sets up the wacom tablet for the left screen only on a dual screen setup.
xinput set-prop "Wacom Intuos BT S Pen stylus" --type=float "Coordinate Transformation Matrix" 0.5 0 0 0 1 0 0 0 1