Skip to content

Instantly share code, notes, and snippets.

View Ryu1845's full-sized avatar
🎯
Focusing

Sofian Mejjoute Ryu1845

🎯
Focusing
View GitHub Profile
@dustingetz
dustingetz / electric-virtual-scroll-v2.md
Last active February 25, 2023 23:41
Electric virtual scroll over node_modules v2

virtual scroll over node_modules v2 — Electric Clojure

  • Direct filesystem reads from the view
  • Direct function composition in the style of PHP, despite network
  • No API, no client side database, no frontend state at all (except DOM), no frontend/backend.
  • Literally all accidental complexity GONE
  • 100% of server data sync is managed by Electric
  • Rows have arbitrary server local data access, here querying file metadata #clojure
  • Optimized and no scroll jank – DOM elements are fixed in place and reused
@jishanshaikh4
jishanshaikh4 / hcaptcha.user.js
Created June 15, 2022 03:54
Tampermonkey script to solve Hcaptcha
// ==UserScript==
// @name Hcaptcha Solver with Browser Trainer(Automatically solves Hcaptcha in browser)
// @namespace Hcaptcha Solver
// @version 10.0
// @description Hcaptcha Solver in Browser | Automatically solves Hcaptcha in browser
// @match https://*.hcaptcha.com/*hcaptcha-challenge*
// @match https://*.hcaptcha.com/*checkbox*
// @grant GM_xmlhttpRequest
// @grant GM_setValue
// @grant GM_getValue
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_STATE_HOME="$HOME/.local/state"
export PATH="$PATH:$HOME/.local/bin"
export BROWSER='firefox'
export EDITOR='nvim'
export PAGER='less'
export READER='zathura'
@hashtafak
hashtafak / Hcaptcha Solver (Automatically solves Hcaptcha in browser).user.js
Last active August 26, 2024 16:22
Hcaptcha Solver with Browser Trainer(Automatically solves Hcaptcha in browser) by Md ubeadulla | Note: This script is solely intended for the use of educational purposes only and not to abuse any website. This script uses audio in order to solve the captcha. Use it wisely and do not abuse any website. Click "Raw" to install it on Tampermonkey
// ==UserScript==
// @name Hcaptcha Solver with Browser Trainer(Automatically solves Hcaptcha in browser)
// @namespace Hcaptcha Solver
// @version 10.0
// @description Hcaptcha Solver in Browser | Automatically solves Hcaptcha in browser
// @author Md ubeadulla
// @match https://*.hcaptcha.com/*hcaptcha-challenge*
// @match https://*.hcaptcha.com/*checkbox*
// @grant GM_xmlhttpRequest
// @grant GM_setValue
@erickyun
erickyun / ytdl-clip-bash-script-v1.sh
Last active September 4, 2022 13:43 — forked from Ryu1845/clip.sh
Download only part of a youtube video
#!/data/data/com.termux/files/usr/bin/bash
echo "Enter URL here:"
read URL
echo "Enter START_TIME here:"
read START_TIME
echo "Enter END_TIME here:"
read END_TIME

Moved to repo: /quenhus/uBlock-Origin-dev-filter

In order to keep filters up to date, please use this repo.

import torch
import torch.utils.dlpack
import jax
import jax.dlpack
# A generic mechanism for turning a JAX function into a PyTorch function.
def j2t(x_jax):
x_torch = torch.utils.dlpack.from_dlpack(jax.dlpack.to_dlpack(x_jax))
return x_torch
@skye
skye / tpu_topology_env_vars.py
Last active April 13, 2025 18:33
You can use these environment variables to run a Python process on a subset of the TPU cores on a Cloud TPU VM. This allows running multiple TPU processes at the same time, since only one process can access a given TPU chip at a time. Note that on TPU v2 and v3, 1 TPU chip = 2 TpuDevice as reported by `jax.devices()` (8 devices total). On v4, 1 …
# ==== Non-communicating processes
# 4x 1 chip per process:
os.environ["TPU_CHIPS_PER_PROCESS_BOUNDS"] = "1,1,1"
os.environ["TPU_PROCESS_BOUNDS"] = "1,1,1"
# Different per process:
os.environ["TPU_VISIBLE_DEVICES"] = "0" # "1", "2", "3"
# 1-liner for bash: TPU_CHIPS_PER_PROCESS_BOUNDS=1,1,1 TPU_PROCESS_BOUNDS=1,1,1 TPU_VISIBLE_DEVICES=0 TPU_MESH_CONTROLLER_ADDRESS=localhost:8476 TPU_MESH_CONTROLLER_PORT=8476
@108EAA0A
108EAA0A / cien-dl.ps1
Last active November 21, 2024 11:55
Download article images for https://ci-en.dlsite.com
Param(
# (*)クリエイターID: URLから推測して指定
[Parameter(Mandatory, ValueFromPipeline)]
[ValidateScript({ $_ -gt 0 })]
[int]$CreatorId,
# ページ指定: 投稿記事の一覧表示における何ページから何ページまでをDLするかどうか。未指定時は全ページ
[ValidateScript({ $_ -gt 0 })]
[int]$PageStart = 1,
[int]$PageEnd,
@dblalock
dblalock / ML Meta-analyses.md
Last active November 28, 2023 14:50
List of meta-analyses / independent benchmarking of machine learning and data mining papers