Skip to content

Instantly share code, notes, and snippets.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 24, 2024 20:47
Complete Recent Discord Quest

Complete Recent Discord Quest

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
  2. Join a vc
  3. Stream any window (can be notepad or something)
  4. Press Ctrl+Shift+I to open DevTools
  5. Go to the Console tab
  6. Paste the following code and hit enter:
let wpRequire;
@Khankindle
Khankindle / dinobot_oneshot_il.py
Created April 24, 2024 20:42 — forked from normandipalo/dinobot_oneshot_il.py
Code snippet for the one-shot imitation learning phase of DINOBot (alignment + replay).
"""
In this script, we demonstrate how to use DINOBot to do one-shot imitation learning.
You first need to install the following repo and its requirements: https://github.com/ShirAmir/dino-vit-features.
You can then run this file inside that repo.
There are a few setup-dependent functions you need to implement, like getting an RGBD observation from the camera
or moving the robot, that you will find on top of this file.
"""
import torch
import numpy as np
@normandipalo
normandipalo / dinobot_oneshot_il.py
Last active April 24, 2024 20:42
Code snippet for the one-shot imitation learning phase of DINOBot (alignment + replay).
"""
In this script, we demonstrate how to use DINOBot to do one-shot imitation learning.
You first need to install the following repo and its requirements: https://github.com/ShirAmir/dino-vit-features.
You can then run this file inside that repo.
There are a few setup-dependent functions you need to implement, like getting an RGBD observation from the camera
or moving the robot, that you will find on top of this file.
"""
import torch
import numpy as np
@yasirkula
yasirkula / BatchExtractMaterials.cs
Last active April 24, 2024 20:41
Batch extract materials from 3D model assets in Unity
using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
using System.IO;
public class BatchExtractMaterials : EditorWindow
{
private enum ExtractMode { Extract = 0, Remap = 1, Ignore = 2 };
[System.Serializable]
@sgarciav
sgarciav / docker-compose-rviz.yml
Created June 9, 2021 23:37
docker-compose file to run Rviz inside a Docker container
version: "3.4"
services:
ros-rviz:
build:
context: .
dockerfile: Dockerfile
image: rviz_container:melodic
container_name: rviz_test
network_mode: "host"
@Leandros
Leandros / main.lua
Last active April 24, 2024 20:38
Love2D Fixed Timestep
local TICKRATE = 1/60
function love.update(dt)
end
function love.draw(dt)
end
function love.run()
if love.math then
@Webreaper
Webreaper / docker-compose.yml
Last active April 24, 2024 20:37
Sample Docker-compose file which shows how to set up Sonarr, Radarr, Prowlarr, Lidarr, QBittorrent and a VPN container so that all all traffic from the containers is routed through the VPN. Also includes Plex and get_iplayer containers, which are not routed through the VPN.
# Docker compose to set up containers for all services you need:
# VPN
# Sonarr, Radarr, Lidarr, Qbittorrent
# Non-VPN
# Plex, get_iplayer
# Before running docker-compose, you should pre-create all of the following folders.
# Folders for Docker State:
# /volume1/dockerdata. - root where this docker-compose.yml should live
# /volume1/dockerdata/plex - Plex config and DB
# /volume1/dockerdata/sonarr - Sonarr config and DB
@abhijeetchopra
abhijeetchopra / 0-README.md
Last active April 24, 2024 20:40
Creating automatic scheduled backup copies of your Google Sheets using Google Apps Script

How to "Schedule Automatic Backups" of your Google Sheets

This tutorial demonstrates how to use Google Apps Script to:

  • Create copies of the Google Sheet in the desired destination folder automatically at set intervals.

  • Append the time stamp with each backup file's name.

  • Adjust time trigger for backing up every day/hour/minute.

@fenix-hub
fenix-hub / #description.md
Last active April 24, 2024 20:36
GDScript JSON <> Class Serializer/Deserializer

You can find usages in the GDScript Unirest plugin

This is a fast serializer/deserializer written in GDScript to convert a JSON (Dictionary) to a class, using something similar to the Reflection concecpt. json_to_class can be used to convert a Dictionary to a Class. All keys in the Dictionary will be treated as variables and their types will be guessed in the best way possible. A class (defined by the class_name keyword) must extend Reference or Object or be an inner class, or else Godot will not able to see its properties. It is also possible to deserialize a JSON key to a class property with a different name using the export hint as a variable name.

example usage:

@betafcc
betafcc / mypy_operators.py
Created October 14, 2022 18:52
Mypy type-level operators
from __future__ import annotations
from typing import (
Any,
Awaitable,
Callable,
Iterable,
Literal,
Mapping,
ParamSpec,