Skip to content

Instantly share code, notes, and snippets.

View v-prgmr's full-sized avatar
🥨

Vishal Rajendra Kumar v-prgmr

🥨
View GitHub Profile
@kmhofmann
kmhofmann / installing_nvidia_driver_cuda_cudnn_linux.md
Last active March 8, 2024 19:42
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.

@Saafke
Saafke / gsoc19_dnn_superres.md
Last active March 28, 2022 13:55
[GSoC '19] Learning-based Super-Resolution in OpenCV

Google Summer of Code 2019 with OpenCV

Learning-based Super Resolution

Student: Xavier Weber
Mentors: Vladimir Tyan & Yida Wang
Student on the same project: Fanny Monori

Link to accomplished work:

@Pindar
Pindar / README.md
Last active February 13, 2023 21:23 — forked from mill1000/README.md
Headless A2DP Audio Streaming on Raspbian Stretch

About

This gist will show how to setup Raspbian Stretch as a headless Bluetooth A2DP audio sink. This will allow your phone, laptop or other Bluetooth device to play audio wirelessly through a Rasperry Pi.

Motivation

A quick search will turn up a plethora of tutorials on setting up A2DP on the Raspberry Pi. However, I felt this gist was necessary because this solution is:

  • Automatic & Headless - Once setup, the system is entirely automatic. No user iteration is required to pair, connect or start playback. Therefore the Raspberry Pi can be run headless.
  • Simple - This solution has few dependencies, readily available packages and minimal configuration.
  • Up to date

Prerequisites

@peteflorence
peteflorence / pytorch_bilinear_interpolation.md
Last active January 16, 2024 14:18
Bilinear interpolation in PyTorch, and benchmarking vs. numpy

Here's a simple implementation of bilinear interpolation on tensors using PyTorch.

I wrote this up since I ended up learning a lot about options for interpolation in both the numpy and PyTorch ecosystems. More generally than just interpolation, too, it's also a nice case study in how PyTorch magically can put very numpy-like code on the GPU (and by the way, do autodiff for you too).

For interpolation in PyTorch, this open issue calls for more interpolation features. There is now a nn.functional.grid_sample() feature but at least at first this didn't look like what I needed (but we'll come back to this later).

In particular I wanted to take an image, W x H x C, and sample it many times at different random locations. Note also that this is different than upsampling which exhaustively samples and also doesn't give us fle

// callback4.cpp - C++11 Lambda Callback
// To build:
// g++ -std=c++11 callback4.cpp
// Situation: A "Caller" class allows another class "Callee"
// to connect to it via callback. How to implement this?
// A C++11 lambda function can be used.