This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import queue | |
import logging | |
from tkinter import TclError | |
import weakref | |
__all__ = ['data_bind'] | |
def data_bind(widget, callback, *, pass_tk_event=False, timeout=0.0, catastrophic_timeout=5.0, queueing_mode='auto'): | |
"""Foolproof, thread-safe workaround for https://github.com/python/cpython/issues/47655 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__all__ = ['check_for_bug', 'patch_bug', 'auto_patch_bug'] | |
import logging | |
import os | |
import pdb | |
import platform | |
import sys | |
import threading | |
import tkinter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Custom Kernel to use AMDGPU driver with Radeon HD 7790, HD 7750-7970, HD 7790, R7 240, R7 250, R7 260, R9 270, R9 280 | |
# https://www.x.org/wiki/RadeonFeature/#:~:text=Southern%20Islands&text=Sea%20Islands | |
# https://wiki.archlinux.org/title/AMDGPU#:~:text=Compile%20kernel%20which%20supports%20amdgpu%20driver | |
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/amd/amdgpu/Kconfig?h=v6.10&id=0c3836482481200ead7b416ca80c68a29cfdaabd#n37 | |
boot.kernelPatches = [ { | |
name = "amdgpu-si-cik"; | |
patch = null; | |
extraConfig = '' | |
DRM_AMDGPU_SI y | |
DRM_AMDGPU_CIK y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To use the functions exported by this module, | |
// you must already have an existing_channel | |
// connecting the two endpoints -- a so-called | |
// "signaling server" -- before you can establish | |
// a WebRTC connection. | |
/* | |
const config = { iceServers: [{ urls: 'stun:stun.l.google.com:19302' }] }; | |
const _signaling_server = new MessageChannel(); | |
_signaling_server.port1.start(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Example Usage: | |
#[repr(C,packed)] | |
struct Foo { | |
data1: [u8; 3], | |
data2: [u8; 5] | |
} | |
let baz: Foo = { | |
let mut baz_wip = core::mem::MaybeUninit::<Foo>::uninit(); | |
// 1. Writing fields: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Written on Rust 1.77.2 (Stable), should run on even older builds. | |
Usage Example: | |
let my_buffer: [u8; 42] = randombytes().unwrap(); | |
*/ | |
extern crate getrandom; // https://github.com/rust-random/getrandom | |
use core::mem::MaybeUninit; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Step 1. construct object | |
let obj = await new Promise((resolve, reject) => { | |
const obj_pending = API_CONSTRUCTOR(); | |
obj_pending.addEventListener( | |
'error', | |
(event) => void reject(new Error( | |
`${event.target.__proto__.constructor.name}: ${event.type} event`, | |
{cause: event} | |
)), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is also a demonstration of the Z-combinator. | |
// h/t https://thenewobjective.com/types-and-programming-languages/deriving-the-z-combinator | |
const Z = (f => (u => f((...x) => u(u)(...x)))(u => f((...x) => u(u)(...x)))); | |
/* Example usage: | |
a = new MessageChannel().port1; | |
b = new ArrayBuffer(42); | |
my_obj = {a, x: {b, a_again: a}} | |
get_transferables(my_obj); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! James Edington Administrator – Popups | |
||accounts.google.com/gsi/iframe$subdocument |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name UAH Transcript to TXT | |
// @namespace 9ae3b270-19ab-3cc1-827e-42cc8f3bf51c | |
// @version 0.0.4 | |
// @match https://ssbprod.uah.edu/PROD/bwskotrn.P_ViewTran | |
// @grant none | |
// @namespace [email protected] | |
// ==/UserScript== | |
// To install from GitHub, click the "Raw" button on the top-right. |