py quickfuncs

This commit is contained in:
Christoph J. Scherr 2025-07-12 19:40:23 +02:00
parent da0c599b32
commit 6c30e1d793
Signed by: PlexSheep
GPG key ID: 9EB784BB202BB7BB
3 changed files with 23 additions and 0 deletions

18
.config/quickfuncs.py Normal file
View file

@ -0,0 +1,18 @@
def t(num: int) -> int:
return num * 1_000_000_000_000
def b(num: int) -> int:
return num * 1_000_000_000
def m(num: int) -> int:
return num * 1_000_000
def k(num: int) -> int:
return num * 1_000
def larg(num: int) -> str:
return "{:_}".format(num)

1
.gitignore vendored
View file

@ -11,6 +11,7 @@
!.githooks/**
!.config
!.config/lazygit
!.config/quickfuncs.py
!.config/lazygit/config.yml
!.config/nvim
!.config/nvim/**

4
.zshrc
View file

@ -90,6 +90,10 @@ function condac() {
function py() {
python <<< "
from math import *
import sys
import os
sys.path.append(\"$XDG_CONFIG_HOME\")
from quickfuncs import *
def evaluate_and_print(code):
for expr in code.split(';'):