Skip to content

Instantly share code, notes, and snippets.

View thchr's full-sized avatar

Thomas Christensen thchr

View GitHub Profile
@thchr
thchr / duality-check.jl
Created March 18, 2024 11:37
Verify that topological classification is invariant under duality transformations of symmetry eigenvalues
using BandGraphs
using Crystalline
using Test
using SymmetryBases
using LinearAlgebra
@eval Crystalline begin
struct SiteIrrep{D} <: AbstractIrrep{D}
cdml :: String
g :: SiteGroup{D}
@thchr
thchr / gist:4b273fe78dd833729bc0b946fbb6eecc
Created April 18, 2023 13:00
Profile.print(C=true) for using StaticArrays.jl
Overhead ╎ [+additional indent] Count File:Line; Function
=========================================================
1╎1 ...c2+0.x64.linux.gnu/bin/../lib/julia/libLLVM-14jl.so:?; _Z19write_unsigned_implIjEvRN4llvm11raw_ostreamET_mNS0_12IntegerStyleEb
╎2 ...up/julia-1.9.0-rc2+0.x64.linux.gnu/lib/julia/sys.so:?; jl_system_image_data
1╎ 1 ...ci5-5/julialang/julia-release-1-dot-9/src/subtype.c:1394; may_contain_union_decision
╎ 1 [unknown stackframe]
1╎ 1 ...i5-5/julialang/julia-release-1-dot-9/src/subtype.c:1394; may_contain_union_decision
╎271 ...cdir/glibc-2.12.2/csu/../sysdeps/x86_64/elf/start.S:113;
╎ 271 /lib/x86_64-linux-gnu/libc.so.6:?; __libc_start_main
╎ 271 ...-5/julialang/julia-release-1-dot-9/cli/loader_exe.c:59; main
@thchr
thchr / mapBackslash.ahk
Created January 17, 2022 22:17
AutoHotkey config
; We bind the same stuff also to RAlt+keys
<^>!z:: ; bind RAlt+z to \
SendRaw, \
Return
<^>!,:: ; bind RAlt+, to <
SendRaw, <
Return
<^>!.:: ; bind RAlt+. to >
@thchr
thchr / bench-minimal.scm
Last active July 16, 2020 14:37
Minimal reproducer for strange REPL/include behavior in Guile
; variables
(define uc-gvecs (list #(0 0 0) #(0 -1 -1) #(0 -1 1) #(-1 0 -1) #(-1 0 1) #(1 0 -1) #(1 0 1) #(0 1 -1) #(0 1 1) #(-1 -1 0) #(1 1 0) #(1 -1 0) #(-1 1 0) #(0 0 -2) #(0 0 2) #(0 -1 -2) #(0 -1 2) #(-1 0 -2) #(-1 0 2) #(1 0 -2) #(1 0 2) #(0 1 -2) #(0 1 2) #(0 -2 0) #(-2 0 0) #(2 0 0) #(0 2 0) #(-1 -1 -2) #(-1 -1 2) #(1 1 -2) #(1 1 2) #(1 -1 -2) #(1 -1 2) #(-1 1 -2) #(-1 1 2) #(0 -2 -1) #(0 -2 1) #(-2 0 -1) #(-2 0 1) #(2 0 -1) #(2 0 1) #(0 2 -1) #(0 2 1) #(0 -2 -2) #(0 -2 2) #(-2 0 -2) #(-2 0 2) #(2 0 -2) #(2 0 2) #(0 2 -2) #(0 2 2)))
(define uc-coefs (list 0.006509988713824982-0.07430991596602736i -0.14858501604673846+0.037798932181882614i 0.14858501604673843-0.03779893218188265i 0.1485850160467384-0.037798932181882586i -0.1485850160467385+0.0377989321818826i -0.1485850160467385+0.03779893218188263i 0.1485850160467385-0.03779893218188265i 0.14858501604673843-0.03779893218188259i -0.1485850160467385+0.03779893218188263i -0.05796045325126349+0.009834853427071608i -0.057960453251263505+0.00983485342707161
@thchr
thchr / vscode-default-keybindings.json
Created April 2, 2020 21:22
VSCode default keybindings (pruned of the "when" field)
[
{ "key": "escape escape", "command": "workbench.action.exitZenMode"},
{ "key": "shift+escape", "command": "closeReferenceSearch"},
{ "key": "escape", "command": "closeReferenceSearch"},
{ "key": "shift+escape", "command": "cancelSelection"},
{ "key": "escape", "command": "cancelSelection"},
{ "key": "ctrl+end", "command": "cursorBottom"},
{ "key": "ctrl+shift+end", "command": "cursorBottomSelect"},
{ "key": "ctrl+shift+alt+down", "command": "cursorColumnSelectDown"},
{ "key": "ctrl+shift+alt+left", "command": "cursorColumnSelectLeft"},