Skip to content

Instantly share code, notes, and snippets.

@viktor-shcherb
viktor-shcherb / c4wxcx6grm5mdf7cs7cte5z5yvvg6bvgjklli7xfjxr6kwefpzbt.py
Created November 21, 2024 23:35
Result of the compilation of fused MHA with FlexAttention and a complicated mask
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor
from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties
@triton_heuristics.template(
@viktor-shcherb
viktor-shcherb / collect_repo_stats.py
Created December 15, 2024 14:05
Script to collect repository attribution in The Stack
import dataclasses
import threading
from argparse import ArgumentParser
from collections import defaultdict
from concurrent.futures import ThreadPoolExecutor
from dataclasses import dataclass
from pathlib import Path
from typing import Iterator, List, Dict, DefaultDict, Union
import pandas as pd
@viktor-shcherb
viktor-shcherb / weird_shape_errors_without_prints.py
Created December 16, 2024 23:03
If you uncomment the prints, the script works without errors (even though the outputs are incorrect)
from collections import OrderedDict
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.attention.flex_attention import flex_attention, BlockMask
def norm(x):
@viktor-shcherb
viktor-shcherb / go.mod
Created August 30, 2026 11:18
Lightpanda CDP reproduction: child-frame isolated world resolves to main document
module example.com/lightpanda-iframe-context-repro
go 1.24.0
require (
github.com/chromedp/cdproto v0.0.0-20250724212937-08a3db8b4327
github.com/chromedp/chromedp v0.14.2
)
require (
@viktor-shcherb
viktor-shcherb / go.mod
Created August 30, 2026 11:40
Lightpanda HTTP/1.1-only origin reproduction (chromedp)
module example.com/lightpanda-http1-only-repro
go 1.24.0
require (
github.com/chromedp/cdproto v0.0.0-20250724212937-08a3db8b4327
github.com/chromedp/chromedp v0.14.2
)
require (
@viktor-shcherb
viktor-shcherb / go.mod
Created August 30, 2026 12:34
Lightpanda Fetch.enable selective URL pattern reproduction (chromedp)
module example.com/lightpanda-fetch-interception-repro
go 1.24.0
require (
github.com/chromedp/cdproto v0.0.0-20250724212937-08a3db8b4327
github.com/chromedp/chromedp v0.14.2
)
require (
@viktor-shcherb
viktor-shcherb / go.mod
Created August 30, 2026 13:22
Lightpanda/Chromium authenticated-proxy CDP compatibility matrix (Jobseek recon 2026-08-30)
module example.com/lightpanda-proxy-auth-recon
go 1.24.0
require (
github.com/chromedp/cdproto v0.0.0-20250724212937-08a3db8b4327
github.com/chromedp/chromedp v0.14.2
)
require (
@viktor-shcherb
viktor-shcherb / go.mod
Last active August 30, 2026 13:33
Lightpanda/Chromium CDP response capture and Network.enable buffer-limit repro (Jobseek recon 2026-08-30)
module example.com/lightpanda-network-response-recon
go 1.24.0
require (
github.com/chromedp/cdproto v0.0.0-20250724212937-08a3db8b4327
github.com/chromedp/chromedp v0.14.2
)
require (
@viktor-shcherb
viktor-shcherb / go.mod
Created August 30, 2026 14:49
Lightpanda CDP networkIdle quiet-window and long-poll comparison fixture
module example.com/lightpanda-network-idle-recon
go 1.24.0
require (
github.com/chromedp/cdproto v0.0.0-20250724212937-08a3db8b4327
github.com/chromedp/chromedp v0.14.2
)
require (
@viktor-shcherb
viktor-shcherb / go.mod
Created August 30, 2026 14:55
Lightpanda Page.stopLoading cancellation comparison fixture
module example.com/lightpanda-stop-loading-recon
go 1.24.0
require (
github.com/chromedp/cdproto v0.0.0-20250724212937-08a3db8b4327
github.com/chromedp/chromedp v0.14.2
)
require (