Skip to content

Instantly share code, notes, and snippets.

View rosscarter3's full-sized avatar

Ross Carter rosscarter3

  • Sainsbury Laboratory, Cambridge University
  • Cambridge, UK
View GitHub Profile
@denguir
denguir / cuda_install.md
Last active November 18, 2024 14:57
Installation procedure for CUDA / cuDNN / TensorRT

How to install CUDA / cuDNN / TensorRT on Ubuntu

Install NVIDIA drivers

Update & upgrade

sudo apt update && sudo apt upgrade

Remove previous NVIDIA installation

@jsbueno
jsbueno / colors.py
Created October 22, 2017 14:27
Terminal colors and gradients in Python
import io
import sys
ANSI_SEQ = "\x1b[{}m"
FG_RGB = "38;2;{};{};{}"
BG_RGB = "48;2;{};{};{}"
RESET="0"
FRAMED="51"
ATTRS = {key:code for key, code in [line.strip().split() for line in """\
@matejak
matejak / scalebars.py
Created November 17, 2012 22:38 — forked from dmeliza/scalebars.py
matplotlib: add scale bars to axes - enhanced
# -*- coding: utf-8 -*-
# -*- mode: python -*-
# Adapted from mpl_toolkits.axes_grid2
# LICENSE: Python Software Foundation (http://docs.python.org/license.html)
from matplotlib.offsetbox import AnchoredOffsetbox
class AnchoredScaleBar(AnchoredOffsetbox):
def __init__(self, transform, size=0, label=None, horizontal = True, style = 'dark', loc=4,
pad=0.1, borderpad=0.1, sep=2, prop=None, **kwargs):
"""