Skip to content

Instantly share code, notes, and snippets.

View ndgnuh's full-sized avatar

Hùng ndgnuh

View GitHub Profile
@Bearbobs
Bearbobs / Awesome Configuration
Last active July 4, 2024 20:20
Awesome Dot Files Config and How to Setup on Ubuntu/POP-OS/Debain and other debian based distro
Config Files Repo : https://github.com/Bearbobs/glorious-awesome-debian
Setps to setup on debain based system as the original author is on arch and It's quite diffrent procedure as compared.
## Awesome and Rofi are quite old in debain repo, Building from Git is required.
Steps to do the same.
## Rofi->
git clone --recursive https://github.com/DaveDavenport/rofi
cd rofi
@pantor
pantor / nvidia-driver-realtime.sh
Last active May 20, 2025 09:27
Installing NVIDIA drivers on a realtime Linux (PREEMPT-RT)
# Tested on Ubuntu 16.04 and X11, 2019
# 1. Download NVIDIA driver as a .run file
# 2. Stop X-Server
sudo service lightdm stop
# 3. Blacklist Nouveau driver
sudo nano /etc/modprobe.d/blacklist-nouveau.conf
@efirdc
efirdc / pytorch_connected_components.py
Created June 8, 2020 01:37
Connected components in pytorch
# Demonstration: https://www.youtube.com/watch?v=5AvHrIK-Kjc&feature=youtu.be
# rand_cmap from https://stackoverflow.com/questions/14720331/how-to-generate-random-colors-in-matplotlib
import matplotlib.pyplot as plt
import torch
import torch.nn.functional as F
from visualizations import rand_cmap
W = H = 64
img = torch.randn(W, H).to(device)
@kinnala
kinnala / gist:520bcd9f657eaadd3cdcd995e1a8a657
Last active November 25, 2024 05:13
Running Julia in NixOS

These instructions create a conda-shell type of environment for running Julia 1.1. (Derivation originally from https://gist.github.com/tbenst/c8247a1abcf318d231c396dcdd1f5304).

Note: Some Julia packages may fail to install due to missing binary dependencies. The built-in package manager of Julia will normally install these for you but will fail in case of NixOS. You need to "simply" figure out what is missing and add them to the .nix-file.

  1. Write the following expression to a file, e.g., julia-shell.nix:
{ pkgs ? import <nixpkgs> {}}:

let
jupyterPort = pkgs.config.jupyterPort;
@lrvick
lrvick / github-troll.md
Last active May 24, 2025 01:11
Trolling Github's DMCA repo with their own security flaws.
@ndgnuh
ndgnuh / requirements.txt
Last active August 8, 2023 05:27
requirements.txt
# Global packages to be installed in home directory
# Desktop apps
gdown
https://github.com/thenaterhood/gscreenshot/archive/refs/tags/v3.4.1.tar.gz
# Installed out of convenience
fastapi
uvicorn
pydantic>=2
lenses