Skip to content

Instantly share code, notes, and snippets.

View KentoNishi's full-sized avatar
:octocat:
"I have experiments to run, there is research to be done" ― GLaDOS

Kento Nishi KentoNishi

:octocat:
"I have experiments to run, there is research to be done" ― GLaDOS
View GitHub Profile
@intenzemotion
intenzemotion / hide-edge-rounded-corners.ps1
Last active July 14, 2026 03:11
Hide Edge v149 forced rounded corners. Additionally hide red dot on profile icon too.
# This script must be run as Administrator to update some shortcut paths. Checking it first...
$IsAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(
[Security.Principal.WindowsBuiltInRole]::Administrator
)
if (-not $IsAdmin) {
Write-Host "Not running as Administrator. Some shortcuts may fail to update." -ForegroundColor Yellow
Write-Host ""
}
# This is your Edge path, it should be installed here (if you're on Stable channel).
@tdcosta100
tdcosta100 / WSL2GUIWSLg-XWayland-en.md
Last active July 19, 2026 09:31
A tutorial to use GUI in WSL2/WSLg replacing original Xorg by Xwayland, allowing WSL to work like native Linux, including login screen

Full desktop shell in WSL2 using WSLg (XWayland)

Note

If you want to use Wayland in WSLg in a simpler setup, you can try the WSLg (Wayland) tutorial.

In this tutorial, we will setup GUI in WSL2. No additional software outside WSL (like VcXsrv or GWSL) is required. You will find this tutorial very similar to the one that replaces Xorg with Xvnc. Indeed, it's pretty much the same tutorial, with some few changes.

The key component we need to install is the desktop metapackage you want (GNOME, KDE, Xfce, Budgie, etc), and after that, replace the default Xorg by a script that calls Xwayland instead.

For this setup, I will use Ubuntu 24.04, and install GNOME Desktop. Unfortunately older versions of Ubuntu lack some fundamental things, so we cannot reproduce it in older versions (at least not fully). Since the key components aren't bound to Ubuntu or GNOME, you can use your favorite distro and GUI. Check the [Sample screenshot

@0xdevalias
0xdevalias / audio-to-midi.md
Last active May 24, 2026 06:33
Some notes on Automated Audio Transcription (AAT) / Automated Music Transcription (AMT) (aka: converting audio to midi)

Automated Audio Transcription (AAT) / Automated Music Transcription (AMT) (aka: converting audio to midi)

Some notes on Automated Audio Transcription (AAT) / Automated Music Transcription (AMT) (aka: converting audio to midi)

Table of Contents

@mattbell87
mattbell87 / remote-wsl.md
Last active June 24, 2026 09:40
VSCode Remote: Connect to WSL2 from another machine

VSCode Remote: Connect to WSL2 from another machine

Do you want to do remote development on your WSL2 container in Visual Studio Code? Read this.

Proxy jump method

  1. On the host set up OpenSSH for Windows
  2. Run wsl --update to make sure you are running the latest WSL
  3. Open WSL and install another SSH server inside WSL with sudo apt-get install openssh-server
  4. Now run sudo systemctl enable --now ssh to automatically start ssh when WSL starts.
def club_similar_keywords(emb_mat, sim_score=0.9):
"""
:param emb_mat: matrix having vectors with words as index
:param sim_score: 0.9 by default
:return: returns list of unique words from index after combining words which has similarity score of more than
0.9
"""
if len(emb_mat) == 0:
return 'NA'
xx = cosine_similarity(emb_mat)
@GongXinyuu
GongXinyuu / gumbel_max_pytorch.py
Last active March 23, 2024 08:32
A temporary function to avoid nan in the pytorch gumbel_softmax function.
import torch
import torch.nn.functional as F
def gumbel_softmax(logits, tau=1, hard=False, eps=1e-10, dim=-1):
# type: (Tensor, float, bool, float, int) -> Tensor
r"""
Samples from the `Gumbel-Softmax distribution`_ and optionally discretizes.
You can use this function to replace "F.gumbel_softmax".
@font-face {
font-family: SegoeUI;
src:
local("Segoe UI Light"),
url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.woff2) format("woff2"),
url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.woff) format("woff"),
url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.ttf) format("truetype");
font-weight: 100;
}
@jimmywarting
jimmywarting / readme.md
Last active July 20, 2026 22:18
Cors proxies
Exposed headers
Service SSL status Response Type Allowed methods Allowed headers
@aparrish
aparrish / understanding-word-vectors.ipynb
Last active June 17, 2026 10:31
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@danharper
danharper / background.js
Last active February 13, 2026 12:47
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});