Skip to content

Instantly share code, notes, and snippets.

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{array}
\usepackage{makecell}
\newcolumntype{x}[1]{>{\centering\arraybackslash}p{#1}}
\usepackage{tikz}
\begin{document}
\newcommand\diag[4]{%
\multicolumn{1}{@{}p{#2}@{}|}{%
@user202729
user202729 / README.md
Last active February 2, 2024 15:18
perf record [unknown] frames

If you see [unknown], the following might be useful assuming you're using --call-stack dwarf:

  • Note that --call-graph dwarf,1024 (where 1024 is the stack size) dumps first 1024 bytes of the stack to the record file, then use DWARF debug information to deduce the frames later.

    This is quite inefficient (because it dumps the whole stack instead of just the addresses for each sample), but more importantly, if the stack is too deep (1024 bytes is insufficient) then the result is [unknown] frames.

    So, either try increasing it to dwarf,65528 (which is the maximum on my machine), or if it still doesn't work, --call-graph lbr or --call-graph fp (the last one may need recompile).

Other things to try:

@user202729
user202729 / A-README.md
Last active January 29, 2024 20:59
Footnote in tabular

Resource for answer in https://tex.stackexchange.com/questions/109467/footnote-in-tabular-environment .

Packages to be tested:

@user202729
user202729 / SageMath-cheat-sheet.pdf
Last active December 2, 2023 07:36
SageMath cheat sheet companion for the Napkin "number field" chapter
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@user202729
user202729 / A-README.md
Created November 12, 2023 05:12
note-seaweed
@user202729
user202729 / topology.md
Created August 6, 2023 03:09
draft for something random. I've yet to figure out why the TODO part is needed.

Yet another alternative axiomization of a Hausdorff topological space

(or: why does the intuitive axiomation of topological space makes sense)

For Hausdorff space, there's the following alternative definition of a topology, rather than based on "open sets" (typical definition), or touch-axiomization as in this MathOverflow post. (nevertheless, this definition is really close to that.)

Let $A$ be a set. Define an operator $\lim: A^ω → A∪{ε}$ (assume $ε$ is an abstract element not in $A$), which takes an infinite sequence of elements in $A$, and returns an element of $A$ if the sequence converges in $A$, or return $ε$ otherwise.

(observe that if the space is not Hausdorff, it may be the case that a sequence "converges" to multiple points.)

@user202729
user202729 / generator.py
Last active May 12, 2023 15:51
Things that are included in commonunicode package but excluded from unicode-math-input package
#!/bin/python3
from pathlib import Path
import re
specially_handled = {
match[1] for match in
re.finditer(r'\\__umi_special_handle{(.)}', Path("unicode-math-input.sty").expanduser().read_text())
}
%! TEX program = pdflatex
% vim: ts=2 sw=2 et:
\documentclass[12pt]{article}
\usepackage[mathletters]{ucs}
\usepackage[utf8x]{inputenc}
\ExplSyntaxOn