An mask-and-scan radix sort implementation as explained to me by Claude (Opus 4.5)
[1] https://web.archive.org/web/20221012085306/https://vgc.poly.edu/~csilva/papers/cgf.pdf [2] https://github.com/mark-poscablo/gpu-radix-sort
An mask-and-scan radix sort implementation as explained to me by Claude (Opus 4.5)
[1] https://web.archive.org/web/20221012085306/https://vgc.poly.edu/~csilva/papers/cgf.pdf [2] https://github.com/mark-poscablo/gpu-radix-sort
| def split_tracks(input_file, output_pattern="Track{}.md"): | |
| current_track = None | |
| current_content = [] | |
| with open(input_file, 'r', encoding='utf-8') as f: | |
| lines = f.readlines() | |
| for line in lines: | |
| line = line.strip() | |
| // ==UserScript== | |
| // @name Twitter Remove and Block | |
| // @namespace http://tampermonkey.net/ | |
| // @version 1.0 | |
| // @description Adds a "Remove and Block" button to Twitter followers page | |
| // @author Your username | |
| // @match https://twitter.com/*/followers | |
| // @match https://x.com/*/followers | |
| // @grant none | |
| // ==/UserScript== |
| use nalgebra::{DMatrix, DVector}; | |
| fn compute_nullspace_qr(a: &DMatrix<f64>, tolerance: f64) -> DMatrix<f64> { | |
| // Get dimensions | |
| let (m, n) = a.shape(); | |
| // Compute QR decomposition with column pivoting | |
| let qr = a.clone().qr(); | |
| let r = qr.r(); | |
| import numpy as np | |
| from math import * | |
| def bc_func_left(_ya, _p, _aux): | |
| # Declare all auxiliary variables | |
| g = _aux['const']['g'] | |
| _constraint1 = _aux['const']['_constraint1'] | |
| eps_constraint1 = _aux['const']['eps_constraint1'] | |
| [] = _p | |
| # Generalize to multipoint later |
| # Save the transcripts using the "Save Page WE" Chrome Extension | |
| # This script was generated by ChatGPT | |
| import sys | |
| from bs4 import BeautifulSoup | |
| # Check if a file was provided as a command line argument | |
| if len(sys.argv) < 2: | |
| print("Please provide an HTML file as a command line argument.") | |
| sys.exit(1) |
| #!/bin/sh | |
| # Build and install llvm from source | |
| wget https://github.com/llvm/llvm-project/archive/refs/heads/main.zip | |
| unzip llvm-project-main.zip | |
| rm llvm-project-main.zip | |
| cd llvm-project-main | |
| # cmake -S llvm -B build -DLLVM_ENABLE_PROJECTS="clang;lld" | |
| cmake -S llvm -B build -DLLVM_DEFAULT_TARGET_TRIPLE="i686-pc-windows-msvc" -DLLVM_ENABLE_PROJECTS="clang;lld" |
| #include "rust/cxx.h" | |
| #include <memory> | |
| using std::shared_ptr; | |
| using std::unique_ptr; | |
| using rust::Box; | |
| template <typename T> struct BoxDeleter { | |
| void operator()(T* ptr){ | |
| Box<T> val = Box<T>::from_raw(ptr); |
| /*!normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css*/html{line-height:1.15;-webkit-text-size-adjust:100%}html,body,main,div,span,a,li,ul,hr,h1,h2,h3,h4{padding:0;margin:0}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:0;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]:: |
| use rumqtt::{MqttClient, MqttOptions, QoS, Notification}; | |
| use std::{thread, time::Duration}; | |
| use std::collections::HashMap; | |
| use std::sync::Arc; | |
| fn foo(payload: Arc<Vec<u8>>) | |
| { | |
| println!("Got foo message: {:?}", payload); | |
| } | |
| fn bar(payload: Arc<Vec<u8>>) |