Skip to content

Instantly share code, notes, and snippets.

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

Antonin toxicbloud

🏠
Working from home
  • Vacances
  • Tatooine
  • 13:59 (UTC +02:00)
View GitHub Profile
@Kulbear
Kulbear / gather_nd_pytorch.py
Created June 21, 2022 08:45
A PyTorch porting of tensorflow.gather_nd with batch_dim supported.
import torch
import tensorflow as tf
import time
import numpy as np
def gather_nd_torch(params, indices, batch_dim=1):
""" A PyTorch porting of tensorflow.gather_nd
This implementation can handle leading batch dimensions in params, see below for detailed explanation.
@FurWaz
FurWaz / range.js
Last active September 15, 2023 09:52
Python range() function's smallest implementation in JavaScript
range=f=(p,x)=>p<x?[p,...f(p+1,x)]:[]
@avoidik
avoidik / README.md
Last active June 29, 2024 02:04
Migrate Raspberry Pi from SD to USB

Raspberry Pi from SD to USB

How to switch over from SD-card to USB-attached device (USB thumbstick, USB enclosed SSD or HDD, etc.) to have more durable storage option.

Steps

  1. Connect USB device to your RPI

  2. Make sure USB device visible by the system

@pixelsnafu
pixelsnafu / CloudsResources.md
Last active June 26, 2024 21:29
Useful Resources for Rendering Volumetric Clouds

Volumetric Clouds Resources List

  1. A. Schneider, "Real-Time Volumetric Cloudscapes," in GPU Pro 7: Advanced Rendering Techniques, 2016, pp. 97-127. (Follow up presentations here, and here.)

  2. S. Hillaire, "Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite" in Physically Based Shading in Theory and Practice course, SIGGRAPH 2016. [video] [course notes] [scatter integral shadertoy]

  3. [R. Högfeldt, "Convincing Cloud Rendering – An Implementation of Real-Time Dynamic Volumetric Clouds in Frostbite"](https://odr.chalmers.se/hand

@DakinQuelia
DakinQuelia / poll.js
Created January 29, 2020 02:27
Commande !sondage pour Bot Discord
/**
* Commande !Vote
* Utilisation : !vote <Titre> <Question>.
**/
const Discord = require("discord.js");
const agree = "✅";
const disagree = "❎";
exports.run = async (client, message, args, level) => {
// On efface la commande.
@gengwg
gengwg / install_mosh.md
Last active March 28, 2021 18:37
install mosh on raspberry pi

On Server

sudo apt install mosh
sudo ufw allow from 192.168.1.0/24 to any port 60000:61000 proto udp

On Client

@DooblyNoobly
DooblyNoobly / GoogleCloudTTS.cs
Last active September 9, 2023 09:26
Example of using Google Cloud TTS in Unity3D
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using UnityEngine;
using Newtonsoft.Json;
public class GoogleCloudTTS : MonoBehaviour
{
@ickybodclay
ickybodclay / Example.java
Created February 14, 2018 01:34
[LibGDX] Control Scene2D Buttons With A Controller
TextButton.TextButtonStyle buttonStyle = new TextButton.TextButtonStyle();
buttonStyle.font = new BitmapFont();
buttonStyle.font.scale(2f);
buttonStyle.fontColor = Color.WHITE;
buttonStyle.overFontColor = Color.LIGHT_GRAY;
buttonStyle.downFontColor = Color.GRAY;
newGameButton = new TextButton("New Game", buttonStyle);
continueButton = new TextButton("Continue", buttonStyle);
optionsButton = new TextButton("Options", buttonStyle);
@Pulimet
Pulimet / AdbCommands
Last active June 30, 2024 07:29
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@deviantony
deviantony / README.md
Last active February 20, 2024 15:22
Portainer HTTP API by example

DEPRECATION NOTICE

This gist is now deprecated in favor of our official documentation: https://documentation.portainer.io/api/api-examples/ which contains up to date examples!

THE FOLLOWING DOCUMENTATION IS DEPRECATED

Please refer to the link above to get access to our updated API documentation and examples.