Skip to content

Instantly share code, notes, and snippets.

View wedesoft's full-sized avatar

Jan Wedekind wedesoft

View GitHub Profile
#!/bin/bash
## This gist contains instructions about cuda v11.2 and cudnn8.1 installation in Ubuntu 20.04 for Pytorch 1.8 & Tensorflow 2.7.0
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
@Brainiarc7
Brainiarc7 / build-tensorflow-from-source.md
Last active July 29, 2023 21:28
Build Tensorflow from source, for better performance on Ubuntu.

Building Tensorflow from source on Ubuntu 16.04LTS for maximum performance:

TensorFlow is now distributed under an Apache v2 open source license on GitHub.

On Ubuntu 16.04LTS+:

Step 1. Install NVIDIA CUDA:

To use TensorFlow with NVIDIA GPUs, the first step is to install the CUDA Toolkit as shown:

@Cospel
Cospel / rbm_MNIST_test.py
Last active October 27, 2017 11:13 — forked from myme5261314/rbm_MNIST_test.py
RBM procedure using tensorflow
#http://blog.echen.me/2011/07/18/introduction-to-restricted-boltzmann-machines/
#https://www.tensorflow.org/versions/r0.7/api_docs/python/constant_op.html#random_uniform
import tensorflow as tf
import numpy as np
import input_data
import Image
from util import tile_raster_images
@karpathy
karpathy / min-char-rnn.py
Last active May 11, 2024 20:19
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@DomNomNom
DomNomNom / intersectAABB.glsl
Last active May 4, 2024 22:02
Ray-AABB (Axis Aligned Bounding Box) intersection.
// adapted from intersectCube in https://github.com/evanw/webgl-path-tracing/blob/master/webgl-path-tracing.js
// compute the near and far intersections of the cube (stored in the x and y components) using the slab method
// no intersection means vec.x > vec.y (really tNear > tFar)
vec2 intersectAABB(vec3 rayOrigin, vec3 rayDir, vec3 boxMin, vec3 boxMax) {
vec3 tMin = (boxMin - rayOrigin) / rayDir;
vec3 tMax = (boxMax - rayOrigin) / rayDir;
vec3 t1 = min(tMin, tMax);
vec3 t2 = max(tMin, tMax);
float tNear = max(max(t1.x, t1.y), t1.z);
@staltz
staltz / introrx.md
Last active May 10, 2024 12:08
The introduction to Reactive Programming you've been missing
@wedesoft
wedesoft / .gitignore
Last active December 31, 2015 13:09
Python Scheme integration (libguile)
*.so
*.o
*.html
.*.un~
.*.swp
@marianposaceanu
marianposaceanu / linux_fun.md
Last active January 29, 2023 20:31
How to have some fun using the terminal.

Linux fun-o-matic

How to have some fun using the terminal.

  1. Install cowsay [0] via : sudo apt-get install cowsay
  2. Install fortune [1] via : sudo apt-get install fortune
  3. Make sure you have Ruby installed via : ruby -v
  4. Install the lolcat [2] via : gem gem install lolcat
  5. Profit!
@willurd
willurd / web-servers.md
Last active May 11, 2024 21:00
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@perrygeo
perrygeo / mercator_scale.py
Last active February 17, 2023 08:10
Web Mercator Scale/Resolution Calculations
"""
Web Mercator Scale and Resolution Calculations
Python implementation of the formulas at http://msdn.microsoft.com/en-us/library/bb259689.aspx
"""
import math
def meters_per_pixel(zoom, lat):
"""
ground resolution = cos(latitude * pi/180) * earth circumference / map width
"""