Skip to content

Instantly share code, notes, and snippets.

View gaberogan's full-sized avatar
😃
Smiling

Gabriel Rogan gaberogan

😃
Smiling
View GitHub Profile
@gaberogan
gaberogan / LazyExpireMap.js
Last active August 9, 2024 20:04
LazyExpireMap
/**
* A JavaScript map that lazily expires entries on read
* @param ttl TTL in seconds
* @param autoGc Optional garbage collection interval in seconds
* @example new LazyExpireMap({ ttl : 60, autoGc: 60 })
*/
export class LazyExpireMap extends Map {
constructor({ ttl, autoGc } = {}) {
super()
@gaberogan
gaberogan / gist:04ba526ed2752ebccabe1b77e33ee8b8
Created July 9, 2023 17:21
Install Python with pyenv and pyenv-virtualenv on MacOS
@gaberogan
gaberogan / machine.js
Last active May 2, 2023 16:31
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@gaberogan
gaberogan / README.md
Last active February 22, 2022 17:47
How to install and setup pyenv

Install pyenv + Python

Install pyenv dependencies:

Ubuntu:

sudo apt-get install build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev libffi-dev

MacOS:

@gaberogan
gaberogan / Install_Tensforflow2_with_GPU_in_Ubuntu20.04.md
Created February 22, 2022 17:35 — forked from raulqf/Install Tensorflow2 with GPU - Ubuntu 24.04.md
How to install Tensorflow2 with GPU support in Ubuntu 20.04

How to install Tensorflow2 with GPU support in Ubuntu 20.04

Installation of Tensorflow2 with GPU support is easy and the only complication can be arisen from the CUDA compability which in turns depends on the Nvidia driver version. Before going farther, please check if your Nvidia Video Card is compatible with the required versions that are defined in this gist, use this link.

Tensorflow offers in its website a table of the compatibility between libraries for the target OS. You can visit that website in the following COMPATIBILITY TABLE that points to the Tensorflow installation from source for linux. For the time writing this gist, Tensorflow2 v2.5.0 requires CUDA v11.2 and CUDNN v8.2. It is really important to match the exact version, otherwise tensorflow will have problems loading the shared libraries as not finding the correct version.

CUDA version also requires for a minimum Nvidia driver version