py quickfuncs
This commit is contained in:
parent
da0c599b32
commit
6c30e1d793
3 changed files with 23 additions and 0 deletions
18
.config/quickfuncs.py
Normal file
18
.config/quickfuncs.py
Normal 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
1
.gitignore
vendored
|
@ -11,6 +11,7 @@
|
||||||
!.githooks/**
|
!.githooks/**
|
||||||
!.config
|
!.config
|
||||||
!.config/lazygit
|
!.config/lazygit
|
||||||
|
!.config/quickfuncs.py
|
||||||
!.config/lazygit/config.yml
|
!.config/lazygit/config.yml
|
||||||
!.config/nvim
|
!.config/nvim
|
||||||
!.config/nvim/**
|
!.config/nvim/**
|
||||||
|
|
4
.zshrc
4
.zshrc
|
@ -90,6 +90,10 @@ function condac() {
|
||||||
function py() {
|
function py() {
|
||||||
python <<< "
|
python <<< "
|
||||||
from math import *
|
from math import *
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
sys.path.append(\"$XDG_CONFIG_HOME\")
|
||||||
|
from quickfuncs import *
|
||||||
|
|
||||||
def evaluate_and_print(code):
|
def evaluate_and_print(code):
|
||||||
for expr in code.split(';'):
|
for expr in code.split(';'):
|
||||||
|
|
Loading…
Add table
Reference in a new issue