Updates
This commit is contained in:
parent
faf4589b8a
commit
873a53d7e8
3
.bashrc
3
.bashrc
@ -19,6 +19,7 @@ PS1='[\u@\h \W]\$ '
|
||||
alias res1='xrandr --output DisplayPort-0 --mode 2560x1440 --rate 120'
|
||||
alias res2='xrandr --output DisplayPort-0 --mode 1920x1080 --rate 120'
|
||||
|
||||
export PATH="/usr/lib/ccache/bin/:$PATH"
|
||||
|
||||
# -----------------------------------------------------
|
||||
# ALIASES
|
||||
@ -56,7 +57,7 @@ alias gpf="git stash; git pull"
|
||||
|
||||
# SCRIPTS
|
||||
alias gr='python ~/dotfiles/scripts/growthrate.py'
|
||||
alias chat='python ~/mychatgpt/mychatgpt.py'
|
||||
alias ChatGPT='python ~/mychatgpt/mychatgpt.py'
|
||||
alias ascii='~/dotfiles/scripts/figlet.sh'
|
||||
|
||||
# VIRTUAL MACHINE
|
||||
|
@ -10,14 +10,21 @@
|
||||
# ---------------------------------------------------------------
|
||||
|
||||
import rich
|
||||
import pyperclip
|
||||
|
||||
from rich.console import Console
|
||||
from rich.prompt import FloatPrompt
|
||||
|
||||
# Show prompts
|
||||
console = Console()
|
||||
num1 = FloatPrompt.ask("Enter start value")
|
||||
num2 = FloatPrompt.ask("Enter end value")
|
||||
num1 = FloatPrompt.ask("Original value")
|
||||
num2 = FloatPrompt.ask("New value")
|
||||
|
||||
# printing the sum in float
|
||||
gr = ((num2-num1)/num1)
|
||||
percentage = "{:.2%}".format(gr)
|
||||
console.print(percentage, style="bold")
|
||||
|
||||
# copy result into the system clipboard
|
||||
pyperclip.copy(percentage)
|
||||
print("Output has been copied to the clipboard!")
|
||||
|
Loading…
Reference in New Issue
Block a user