Skip to content

Instantly share code, notes, and snippets.

View benlansdell's full-sized avatar

Ben Lansdell benlansdell

View GitHub Profile
@benlansdell
benlansdell / filepicker.py
Last active May 9, 2024 21:24
FilePicker for streamlit
"""FilePicker for streamlit.
Still doesn't seem to be a good solution for a way to select files to process from the server Streamlit is running on.
Here's a pretty functional solution.
Usage:
```
import streamlit as st
@kmhofmann
kmhofmann / installing_nvidia_driver_cuda_cudnn_linux.md
Last active May 10, 2024 03:37
Installing the NVIDIA driver, CUDA and cuDNN on Linux

Installing the NVIDIA driver, CUDA and cuDNN on Linux (Ubuntu 20.04)

This is a companion piece to my instructions on building TensorFlow from source. In particular, the aim is to install the following pieces of software

on an Ubuntu Linux system, in particular Ubuntu 20.04.

@rossant
rossant / parallel_write.py
Created August 30, 2019 15:04
Write a NumPy array in parallel from multiple CPUs/processes, using shared memory. No copy/serialization involved. Pure Python/NumPy.
"""Write a NumPy array in parallel from multiple CPUs/processes, using shared memory."""
from contextlib import closing
import multiprocessing as mp
import os
import numpy as np
def _init(shared_arr_):
@wchargin
wchargin / extract_scalars.py
Created November 13, 2017 16:09
Extract scalars to CSV using the TensorBoard event multiplexer API
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import csv
import errno
import os
import re
@kingspp
kingspp / tensorflow_custom_operation_gradient.py
Last active March 22, 2020 00:15
Custom Operations with Gradients in Tensorflow using PyFunc
# -*- coding: utf-8 -*-
"""
| **@created on:** 11/05/17,
| **@author:** Prathyush SP,
| **@version:** v0.0.1
|
| **Description:**
| DL Module Tests
| **Sphinx Documentation Status:** Complete
|
@jc00ke
jc00ke / llvm-update-alternatives
Created November 4, 2014 02:19
LLVM & clang alternatives
#!/usr/bin/env sh
sudo update-alternatives --install \
/usr/bin/llvm-config llvm-config /usr/bin/llvm-config-3.4 200 \
--slave /usr/bin/llvm-ar llvm-ar /usr/bin/llvm-ar-3.4 \
--slave /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.4 \
--slave /usr/bin/llvm-bcanalyzer llvm-bcanalyzer /usr/bin/llvm-bcanalyzer-3.4 \
--slave /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-3.4 \
--slave /usr/bin/llvm-diff llvm-diff /usr/bin/llvm-diff-3.4 \
--slave /usr/bin/llvm-dis llvm-dis /usr/bin/llvm-dis-3.4 \