Skip to content

Instantly share code, notes, and snippets.

View imkhubaibraza's full-sized avatar
🏠
Working from home

Muhammad khubaibraza imkhubaibraza

🏠
Working from home
View GitHub Profile
@Quasimondo
Quasimondo / gist:71d9eb865210cd7e66e4690c28c5e72c
Created July 26, 2021 19:00
Install Cuda 11-1 on Ubuntu 20.94
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt upgrade
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/11.1.0/local_installers/cuda-repo-ubuntu2004-11-1-local_11.1.0-455.23.05-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2004-11-1-local_11.1.0-455.23.05-1_amd64.deb
sudo apt-key add /var/cuda-repo-ubuntu2004-11-1-local/7fa2af80.pub
sudo apt-get update
@kubopanda
kubopanda / # Q & A from Traefik Online Meetup: Deploying FastAPI apps with HTTPS powered by Traefik.md
Last active May 29, 2023 09:51
Q & A from Traefik Online Meetup: Deploying FastAPI apps with HTTPS powered by Traefik

Q & A from Traefik Online Meetup: Deploying FastAPI apps with HTTPS powered by Traefik

Question: Will you use Docker in the dev environment?

Answer: Not this time, just to save time (there's a lot to cover), although I'm sharing a couple of development tricks in the end.

Question: Why is the convention ‘app’ not 'api'?

Answer: To simplify things. It might be more familiar for people coming from other frameworks. Also because you can serve things like templates rendered on the backend, so, to avoid confusion. But you can also name the object differently if that works better for you.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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

@pandafulmanda
pandafulmanda / Python3 Virtualenv Setup.md
Last active March 12, 2024 15:59 — forked from akszydelko/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3
@bishboria
bishboria / springer-free-maths-books.md
Last active April 25, 2024 06:27
Springer made a bunch of books available for free, these were the direct links