Skip to content

Instantly share code, notes, and snippets.

View hansent's full-sized avatar

Thomas Hansen hansent

View GitHub Profile
@hansent
hansent / README.md
Created September 3, 2026 20:23
gVisor host UDS reproducer: recvmsg fails on an SCM_RIGHTS-imported socket with SO_PASSCRED enabled (runsc release-20260817.0)

Standalone reproducer (no Kubernetes, no GPU) — Linux only

Requires Python 3 on Linux (SO_PASSCRED / SCM_CREDENTIALS are Linux Unix-socket facilities). One receive case per client invocation.

  1. Configure a dedicated runsc runtime with the two flags in /etc/docker/daemon.json (Docker has no per-run runtime-flag option; see Docker's "alternative runtimes" documentation), then restart Docker:
{
  "runtimes": {
    "runsc-uds-repro": {

Plan: Remote GPU Processing Time Collection for CPU Orchestrator Billing

Context

The new serverless deployment routes workflow requests to CPU-only inference instances with remote execution enabled. Model blocks on these CPU hosts make HTTP requests to GPU instances for inference, which return X-Processing-Time headers. The downstream billing service already differentiates between CPU and GPU usage records, but needs the GPU processing times from the CPU orchestrator's response to bill correctly: fixed 100ms per frame for CPU + actual GPU time.

Currently the CPU orchestrator only returns its own wall-clock X-Processing-Time. We need to additionally return the remote GPU processing times collected during workflow execution, so the billing service has the full picture.

Key constraints:

  • Don't change the usage collector (serves broader reporting purposes)
from kivy.app import App
from kivy.uix.button import Button
from kivy.properties import StringProperty
class IconButton(Button):
icon = StringProperty("fresk.png")
# you can alos just put this in your KV file
from kivy.lang import Builder

Uncaught TypeError: elem.nodeName.toLowerCase is not a

As soon as I click on the page, I get the follwing error: Uncaught TypeError: elem.nodeName.toLowerCase is not a function

It fails inside shouldUseChangeEvent, which looks as follows:

function shouldUseChangeEvent(elem) {
  var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
  return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
import kivy
kivy.require('1.4.1')
import random, os
from kivy.app import App
from kivy.uix.image import Image
from kivy.core.window import Window
from kivy.clock import Clock
from kivy.config import Config
@hansent
hansent / jquery.filedrop.js
Created November 22, 2011 02:52
jquery.filedrop.js multiple instances
/*
* Default text - jQuery plugin for html5 dragging files from desktop to browser
*
* Author: Weixi Yen
*
* Email: [Firstname][Lastname]@gmail.com
*
* Copyright (c) 2010 Resopollution
*
* Licensed under the MIT license:
//gulp & plugins
var gulp = require('gulp');
var gutil = require('gulp-util');
var jshint = require('gulp-jshint');
var browserify = require('gulp-browserify');
var jade = require('gulp-jade');
var stylus = require('gulp-stylus');
var mocha = require('gulp-mocha');
var nodemon = require('gulp-nodemon');
var livereload = require('gulp-livereload');
# -*- coding: utf-8 -*-
from kivy.app import App
from kivy.lang import Builder
kv_ui = """
BoxLayout:
padding: 10
Label:
valign: 'middle'
text_size: self.size
from kivy.clock import Clock
from kivy.core.window import Window
from kivy.uix.scatter import ScatterPlane
class Viewport(ScatterPlane):
def __init__(self, **kwargs):
kwargs.setdefault('size', (1920, 1080))
kwargs.setdefault('size_hint', (None, None))
kwargs.setdefault('do_scale', False)
import os
import sys
import json
import threading
import requests
DIGITIZE_IO_API_KEY = os.environ.get("DIGITIZE_IO_API_KEY", "<your-api-key>")
DIGITIZE_IO_ENDPOINT = "https://digitize.io/api/ocr"