Skip to content

Instantly share code, notes, and snippets.

View BuildingAtom's full-sized avatar

Adam Li BuildingAtom

View GitHub Profile
@BuildingAtom
BuildingAtom / Notes.txt
Last active April 4, 2024 23:41
Temporary gist of a handful of system setup stuff I do
# Install CUDA
# https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=22.04&target_type=deb_network
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
sudo apt install ./cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get -y install cuda
rm cuda-keyring_1.1-1_all.deb
### Into ~/.bashrc
# Add NVCC to path
@BuildingAtom
BuildingAtom / google-colab-mujoco-py-setup.py
Last active June 7, 2023 13:55
NOTE: Please see @franroldans comment below for a much cleaner solution using free-mujoco-py! [Orig] MuJoCo 2.1 working in Google Colab for OpenAI gym. Just add this as a code block near the top of your notebook to get MuJoCo setup.
#Include this at the top of your colab code
import os
if not os.path.exists('.mujoco_setup_complete'):
# Get the prereqs
!apt-get -qq update
!apt-get -qq install -y libosmesa6-dev libgl1-mesa-glx libglfw3 libgl1-mesa-dev libglew-dev patchelf
# Get Mujoco
!mkdir ~/.mujoco
!wget -q https://mujoco.org/download/mujoco210-linux-x86_64.tar.gz -O mujoco.tar.gz
!tar -zxf mujoco.tar.gz -C "$HOME/.mujoco"
@BuildingAtom
BuildingAtom / queryAnilist.gs
Last active November 28, 2021 05:41
A simple Google Apps Script for Google Sheets to perform queries on the first column of a Sheet called All, where row 1 is reserved for header labels. Column A holds the search query, column B will contain the romanized original title from AniList, column C will contain the english title, or the romanized title if there is no English title, and …
var QUERYSHEETNAME = "All";
var QUERYSHEETRANGE = "All!A2:D";
// Query String for Anilist GraphQl endpoint
// Retrieve id and english title
var query = `
query ($searchString: String) {
Media(search: $searchString, type: ANIME){
id
title {
@BuildingAtom
BuildingAtom / transfer owner.gs
Created May 31, 2017 20:31
This is a short google apps script I made to transfer ownership of an entire folder (its files and subfolders included) to another google drive account. The script is fairly straightforward to use. Just fill in the folder ID, the new owner's email, and your current email; change the flags to your liking, and run the "runThisFunction" function. T…
/** Nice and easy to understand... almost. The excessive use of var is really
* for no reason other than to be excessive and annoy a friend. - Adam Li
* This only transfers google files, you have to manually transfer other files
* It transfers everything if you have a google apps account and they allow it.
*/
//This is the last part of the folder url
var folderId = "0000000";
//email address of the future owner
var newOwner = "someotheruser@somedomain.com";