Skip to content

Instantly share code, notes, and snippets.

@nathzi1505
nathzi1505 / cuda-setup.sh
Last active November 26, 2021 21:42
Setup CUDA in Ubuntu 20.04 LTS
# Nvidia Driver installation
sudo apt install nvidia-driver-440
sudo reboot
# CUDA installation
sudo apt update
sudo apt install nvidia-cuda-toolkit # Focal: version 10.1
nvcc --version
# Download cuDNN from Nvidia: https://developer.nvidia.com/rdp/cudnn-download for version 10.1
@marcelom
marcelom / pysyslog.py
Created December 5, 2012 18:06
Tiny Python Syslog Server
#!/usr/bin/env python
## Tiny Syslog Server in Python.
##
## This is a tiny syslog server that is able to receive UDP based syslog
## entries on a specified port and save them to a file.
## That's it... it does nothing else...
## There are a few configuration parameters.
LOG_FILE = 'youlogfile.log'
@BigglesZX
BigglesZX / gifextract.py
Created November 5, 2012 10:31
Extract frames from an animated GIF, correctly handling palettes and frame update modes
import os
from PIL import Image
'''
I searched high and low for solutions to the "extract animated GIF frames in Python"
problem, and after much trial and error came up with the following solution based
on several partial examples around the web (mostly Stack Overflow).
There are two pitfalls that aren't often mentioned when dealing with animated GIFs -