Skip to content

Instantly share code, notes, and snippets.

@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.
@insertish
insertish / React Native.md
Last active April 18, 2024 21:28
Configure React Native with Typescript, Vite.js for react-native-web and Storybook.
@rvrsh3ll
rvrsh3ll / windows-keys.md
Created February 18, 2024 22:44
Windows Product Keys

NOTE

These are NOT product / license keys that are valid for Windows activation.
These keys only select the edition of Windows to install during setup, but they do not activate or license the installation.

Index

@VictorTaelin
VictorTaelin / a_b_challenge.md
Last active April 18, 2024 21:27
A::B Prompting Challenge: $10k to prove me wrong!

CHALLENGE

Develop an AI prompt that solves random 12-token instances of the A::B problem (defined here), with 90%+ success rate.

RULES

1. The AI will be given a <problem/> to solve.

We'll use your prompt as the SYSTEM PROMPT, and a specific instance of problem as the PROMPT, inside XML tags. Example:

@yorickdowne
yorickdowne / HallOfBlame.md
Last active April 18, 2024 21:26
Great and less great SSDs for Ethereum nodes

Overview

Syncing an Ethereum node is largely reliant on IOPS, I/O Per Second. Budget SSDs will struggle to an extent, and some won't be able to sync at all.

This document aims to snapshot some known good and known bad models.

For size, 4TB or 2TB come recommended as of mid 2024. A 2TB drive should last an Ethereum full node until late 2025 or thereabouts, with crystal ball uncertainty.

High-level, QLC and DRAMless are far slower than "mainstream" SSDs. QLC has lower endurance as well. Any savings will be gone when the drive fails early and needs to be replaced.

@onderaltintas
onderaltintas / Global.asax
Created May 3, 2018 10:55 — forked from jkresner/Global.asax
Asp .net Mvc 4 Proxy Server/Controller (For help with Cross Domain Request)
public class WebApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
RouteTable.Routes.MapRoute("HttpProxy", "proxy/{*path}", new { controller = "Proxy", action = "Http" })
}
}
@pm-hwks
pm-hwks / netcat.sh
Created August 21, 2019 07:03
[Netcat network test] Netcat commands to test bandwidth between 2 linux servers #netcat #perf-test #linux #network
## Netcat server command
nc -l <unused port # > /dev/null
eg:
nc -l 1122 > /dev/null
## Netcat Client command
dd if=/dev/zero bs=9100004096 count=1 | nc <netcat server> <netcat port>
eg:
dd if=/dev/zero bs=9100004096 count=1 | nc 10.0.1.251 1122
@nat-418
nat-418 / nix-home-manager-neovim-setup.md
Last active April 18, 2024 21:22
Manage Neovim plugins (and more!) with Nix and Home Manager

Manage Neovim plugins (and more!) with Nix and Home Manager

Highly extensible software like Emacs, Vim, and Neovim tend to grow their own package managers. A software developer, for example, might want to install editor plugins that hook into a particular programming language's linter or language server. The programmer's text editor is therefore extended to support managing additional software to extend the text editor. If this loop continues for too long, the programmer's editor becomes more delicate and complex. The remedy for this problem is to manage software using dedicated tools apart

@nikhilkumarsingh
nikhilkumarsingh / concurrent_task_progress_bar.ipynb
Last active April 18, 2024 21:21
Displaying Progress Bar for Concurrent Tasks
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Blackshome
Blackshome / bathroom-humidity-exhaust-fan.yaml
Last active April 18, 2024 21:19
bathroom-humidity-exhaust-fan.yaml
blueprint:
name: Bathroom Humidity Exhaust Fan
description: >
# 🚿 Bathroom Humidity Exhaust Fan
**Version: 2.3**
Step into the future of freshness - customize it your way and let the automated fan system handle the humidity control for you! 🌿🚿