Skip to content

Instantly share code, notes, and snippets.

import re
import numpy as np
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
import pyroll.core
import pyroll.pillar_model
import pyroll.freiberg_flow_stress
from pyroll.freiberg_flow_stress import FreibergFlowStressCoefficients
# import pyroll.hill_spreading
;;; hl-line-global.el --- highlight the current line -*- lexical-binding:t -*-
(defface hl-line
'((t :inherit highlight :extend t))
"Default face for highlighting the current line in Hl-Line mode.")
(defvar hl-line-overlay-priority -50)
(defvar-local hl-line-global-overlay nil)
@QiangF
QiangF / test-exwm.el
Last active April 6, 2026 02:17
test exwm on termux
(require 'package)
(setq package-check-signature nil)
(package-initialize nil)
(require 'use-package)
(use-package compat)
(use-package xelb
:config
;; (setq xcb:keysyms:auto-update nil)
(setq xcb:connection-timeout 5))
@QiangF
QiangF / (setq gptel-stream t)
Created March 25, 2026 14:17
(setq gptel-stream nil)
{
"gptel": "request headers",
"timestamp": "2026-03-25 22:11:08"
}
{
"Content-Type": "application/json"
}
{
"gptel": "request body",
"timestamp": "2026-03-25 22:11:08"
HTTP/2 429
vary: Origin
vary: X-Origin
vary: Referer
content-type: application/json; charset=UTF-8
content-encoding: gzip
date: Wed, 25 Mar 2026 03:22:37 GMT
server: scaffolding on HTTPServer2
content-length: 581
x-xss-protection: 0
q 199964 4.8 0.5 11:10 00:16 /tmp/.mount_wechatFMECkn/opt/wechat/RadiumWMPF/runtime/WeChatAppEx\ --type=renderer\ --client_version=4067688715\ --enable-crash-reporter\ --wmpf_root_dir=/home/q/.xwechat/radium\ --crashpad-handler-pid=199375\ --is-subscription-disorder\ --wmpf-render-type=0\ --product-id=1002\ --disable-notifications\ --log-level=2\ --lang=zh-CN\ --num-raster-threads=4\ --enable-main-frame-before-activation\ --renderer-client-id=5\ --time-ticks-at-unix-epoch=-1772562558866178\ --disable-mojo-broker\ --launch-time-ticks=117647074162\ --shared-files=v8_context_snapshot_data:100\ --field-trial-handle=0,i,1534470393378672144,13793225663268623452,262144\ --enable-features=NetworkServiceMemoryCache,OverlayScrollbar,XWorker\ --disable-features=AudioServiceOutOfProcess,AutoupgradeMixedContent,BackForwardCache,DigitalGoodsApi,HardwareMediaKeyHandling,NotificationTriggers,PeriodicBackgroundSync,TFLiteLanguageDetectionEnabled,Vulkan,WebOTP\ --variations-seed-version
q 199282 2.3 1.1 11:06
signal time=1767593707.988728 sender=org.freedesktop.DBus -> destination=:1.169 serial=4294967295
path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
string ":1.169"
method call time=1767593719.033085 sender=:1.167 -> destination=:1.159 serial=1833 path=/org/freed
esktop/portal/inputcontext/1; interface=org.fcitx.Fcitx.InputContext1; member=FocusIn
signal time=1767593719.033174 sender=:1.159 -> destination=:1.167 serial=2174 path=/org/freedeskto
p/portal/inputcontext/1; interface=org.fcitx.Fcitx.InputContext1; member=CurrentIM
[00:14:29]exwm-input--on-buffer-list-update: current-buffer=#<buffer *D-Bus explorer:session*> selected-window=#<window 21 on *D-Bus explorer:session*>
[00:14:29]exwm-input--on-buffer-list-update: current-buffer=#<buffer *D-Bus explorer:session*> selected-window=#<window 21 on *D-Bus explorer:session*>
[00:14:29]exwm-layout--refresh: frame=#<frame *D-Bus explorer:session* 0x57a2d61c2b50>
[00:14:29]exwm-layout--refresh-workspace: Refresh workspace #<frame *D-Bus explorer:session* 0x57a2d61c2b50>
[00:14:29]exwm-layout--show: Show #x2000003 in #<window 41 on firefox::how to solve emacs "exwm" mode key confict with override-global-map - Google Search — Mozilla Firefox>
[00:14:29]exwm--set-geometry: Setting #x2000003 to 700x1032+700+0
[00:14:29]exwm-layout--set-state: id=#x2000003
[00:14:29]exwm-layout--set-client-list-stacking:
[00:14:29]exwm-layout--refresh: frame=#<frame *D-Bus explorer:session* 0x57a2d61c2b50>
[00:14:29]exwm-layout--refresh-workspace: Refresh workspace #<frame *D-Bus explorer:session* 0x57a2d6
@QiangF
QiangF / gist:f8ae477d9e5eb1e7fff425c9c88360b1
Created January 4, 2026 02:42
when input not working
[00:09:41]exwm-input--on-KeyPress: major-mode=exwm-mode buffer=firefox::how to solve emacs "exwm" mode key confict with override-global-map - Google Search — Mozilla Firefox
[00:09:41]exwm-input--on-KeyPress-line-mode: (65507 . 0)
[00:09:41]exwm-input--on-KeyPress: major-mode=exwm-mode buffer=firefox::how to solve emacs "exwm" mode key confict with override-global-map - Google Search — Mozilla Firefox
[00:09:41]exwm-input--on-KeyPress-line-mode: (108 . 3)
[00:09:41]exwm-input--mimic-read-event:
[00:09:41]exwm-input--cache-event: 12
[00:09:41]exwm--on-PropertyNotify: atom=_NET_WM_USER_TIME(409)
[00:09:41]exwm-input--on-PropertyNotify:
[00:09:46]exwm--on-PropertyNotify: atom=_NET_WM_STATE(386)
[00:09:46]exwm-input--on-PropertyNotify:
import dbus
import dbus.mainloop.glib
from gi.repository import GLib
# Define the signal handler function
def update_client_side_ui_handler(flags):
"""Handler for the UpdateClientSideUI signal."""
print(f"Received UpdateClientSideUI signal with flags: {flags}")
# Add your custom logic here to update the client-side UI