Skip to content

Instantly share code, notes, and snippets.

View vitran96's full-sized avatar

Chris vitran96

View GitHub Profile
@SunnyRaj
SunnyRaj / configure_muliple_gcc.sh
Last active October 10, 2023 09:17
Configure multiple GCC versions on ubuntu
#!/usr/bin/env bash
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt update
sudo update-alternatives --remove-all gcc
sudo update-alternatives --remove-all g++
sudo apt-get install -y gcc-4.8 g++-4.8 gcc-4.9 g++-4.9 gcc-5 g++-5 gcc-6 g++-6 gcc-7 g++-7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 10
@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active April 24, 2025 03:09
One Liner to Download the Latest Release from Github Repo
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@webmaster128
webmaster128 / CMakeLists.txt
Created December 26, 2015 14:17
Single cmake config for Botan
project(Botan)
cmake_minimum_required(VERSION 2.8)
# Configure for use with CMake
#
# ./configure.py --with-bzip2 --with-zlib --with-lzma --enable-modules="dyn_load"
#
macro(use_cxx11)
if (CMAKE_VERSION VERSION_LESS "3.1")
@karpathy
karpathy / min-char-rnn.py
Last active April 28, 2025 17:51
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)
@fomightez
fomightez / remove blank lines regex.md
Last active March 10, 2025 15:35
remove all blank lines using regular expressions