Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
5c64a71
Added new feature in the existing GST calculator
tanujbordikar Aug 4, 2023
0b9e78c
Added new feature in the existing GST calculator
tanujbordikar Aug 4, 2023
2cffc8f
Improved the calculator by using tkinter
tanujbordikar Aug 4, 2023
0ad6ecc
added the screenshot with tkinter gui and also created a new document…
tanujbordikar Aug 5, 2023
369dcbe
added techCrunch.py
Mihan786Chistie Aug 5, 2023
af89634
updated techCrunch.py
Mihan786Chistie Aug 5, 2023
f1ae4ed
updated techCrunch.py
Mihan786Chistie Aug 5, 2023
58c7c6d
added README.md
Mihan786Chistie Aug 5, 2023
3f15a8f
updated techCrunch.py
Mihan786Chistie Aug 5, 2023
2dc2121
added requirements.txt
Mihan786Chistie Aug 5, 2023
e5d8c91
Pixel Art Generator Script Added
andoriyaprashant Aug 5, 2023
eeda4e1
Lint Fix
andoriyaprashant Aug 5, 2023
ac34009
culturally-inspired names imaginary
Swapnil-2503 Aug 5, 2023
66af624
morphological transformations
invigorzz313 Aug 5, 2023
31a905e
Infinite Runner with Obstacles Script Added
andoriyaprashant Aug 5, 2023
46c36bf
Gomoku_game.py
Shikhar9425 Aug 6, 2023
ac814f2
README.md
Shikhar9425 Aug 6, 2023
0171cee
Adding code, README file
MrResilient Aug 8, 2023
2328db2
Adding code, README file
MrResilient Aug 8, 2023
8a9853c
Merge branch 'cont1' of https://github.com/Shivansh-Jain-github/Amazi…
MrResilient Aug 8, 2023
eec9f8b
Merge pull request #2687 from Shivansh-Jain-github/master
1e9abhi1e10 Aug 8, 2023
14d473a
Merge pull request #2686 from Shivansh-Jain-github/cont1
1e9abhi1e10 Aug 8, 2023
a741426
Completed payment receipt project
Yashika-Agrawal Aug 8, 2023
2d2d94b
Merge pull request #2691 from Yashika-Agrawal/Payment
1e9abhi1e10 Aug 8, 2023
3250119
Adding code, README.md file
MrResilient Aug 8, 2023
84f20e8
Adding code, README.md file
MrResilient Aug 8, 2023
83f766a
Add commit
MrResilient Aug 8, 2023
51cf405
Delete
MrResilient Aug 8, 2023
fabfd2c
delete
MrResilient Aug 8, 2023
034c8d4
Merge pull request #2696 from Shivansh-Jain-github/CONT1
1e9abhi1e10 Aug 8, 2023
42b6943
Merge pull request #2695 from Shivansh-Jain-github/cont1
1e9abhi1e10 Aug 8, 2023
2efacbb
Merge pull request #2668 from Shikhar9425/master-8
1e9abhi1e10 Aug 8, 2023
57fe6d4
Merge pull request #2639 from Swapnil-2503/culturally-inspired-names
1e9abhi1e10 Aug 8, 2023
bfb1e89
Merge pull request #2635 from Mihan786Chistie/techCrunch
1e9abhi1e10 Aug 8, 2023
b25ce3d
Merge pull request #2650 from andoriyaprashant/branch28
1e9abhi1e10 Aug 8, 2023
a9dee15
Merge pull request #2637 from andoriyaprashant/branch27
1e9abhi1e10 Aug 8, 2023
8890205
Merge pull request #2640 from invigorzz313/morphtransforms
1e9abhi1e10 Aug 8, 2023
148eaea
Merge pull request #2631 from tanujbordikar/screenshot
1e9abhi1e10 Aug 8, 2023
4d01156
True False Automation
MrResilient Aug 8, 2023
c58725c
WhatsApp_timer_messenger code
MrResilient Aug 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions GST Calculator/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

## GST Calculator Functionalities : 🚀

- This is a GST Calculator where the user enters the original price and net price and the script returns the GST percentage.
- This is a GST Calculator where the user enters the original price and net price
- And the script returns the GST percentage with SGST and CGST percent value and the Total GST Value.
- This code uses Tkinter as a User Interface and python as its main language.

## GST Calculator Instructions: 👨🏻‍💻

Expand All @@ -22,7 +24,11 @@

### Step 4:

Sit back and Relax. Let the Script do the Job. ☕
Let the Script do the Job and after that the tkinter UI will automatically be opened. ☕

### Step 5:

Now, enter the value of the total Value with GST and MRP of the product. And select the Calculate GST button.

## Requirements

Expand All @@ -38,3 +44,7 @@
## Author

[Amit Kumar Mishra](https://github.com/Amit366)

## Editor (Improvements adder)

[Tanuj Bordikar](https://github.com/tanujbordikar)
89 changes: 46 additions & 43 deletions GST Calculator/script.py
Original file line number Diff line number Diff line change
@@ -1,73 +1,76 @@
from tkinter import *

# Function for finding GST rate


# Function for finding CGST, SGST, and Total GST rates
def GST_Calc():

gst_percentField.delete(0, END)

cgst_percentField.delete(0, END)
sgst_percentField.delete(0, END)
total_gstField.delete(0, END)

org_cost = int(original_priceField.get())

N_price = int(net_priceField.get())

gst_rate = ((N_price - org_cost) * 100) / org_cost

gst_percentField.insert(10, str(gst_rate) + " % ")

total_gst_rate = ((N_price - org_cost) * 100) / org_cost
cgst_rate = total_gst_rate / 2
sgst_rate = total_gst_rate / 2

cgst_percentField.insert(10, str(cgst_rate) + " % ")
sgst_percentField.insert(10, str(sgst_rate) + " % ")

total_gst = (N_price - org_cost)
total_gstField.insert(10, f"₹ {total_gst:.2f}")

def clearAll():

original_priceField.delete(0, END)

net_priceField.delete(0, END)

gst_percentField.delete(0, END)

cgst_percentField.delete(0, END)
sgst_percentField.delete(0, END)
total_gstField.delete(0, END)

# Driver Code
if __name__ == "__main__":

gui = Tk()

gui.configure(background="light blue")

gui.title("GST Calculator")
gui.geometry("500x300")

label_font = ('Arial', 14)
entry_font = ('Arial', 12)
button_font = ('Arial', 12, 'bold')

gui.geometry("500x500")
original_price = Label(gui, text="Original Price:", font=label_font)
original_price.grid(row=1, column=0, padx=10, pady=10, sticky='w')

original_price = Label(gui, text="Original Price",
font=(None, 18))
original_priceField = Entry(gui, font=entry_font)
original_priceField.grid(row=1, column=1, padx=10, pady=10, sticky='w')

original_price.grid(row=1, column=1, padx=10, pady=10, sticky='w')
net_price = Label(gui, text="Net Price:", font=label_font)
net_price.grid(row=2, column=0, padx=10, pady=10, sticky='w')

original_priceField = Entry(gui)
net_priceField = Entry(gui, font=entry_font)
net_priceField.grid(row=2, column=1, padx=10, pady=10, sticky='w')

original_priceField.grid(row=1, column=2, padx=10, pady=10, sticky='w')
find = Button(gui, text="Calculate GST", fg="black", bg="light yellow", font=button_font, command=GST_Calc)
find.grid(row=3, column=1, padx=10, pady=10, sticky='w')

net_price = Label(gui, text="Net Price",
font=(None, 18))
cgst_percent = Label(gui, text="CGST Rate:", font=label_font)
cgst_percent.grid(row=4, column=0, padx=10, pady=10, sticky='w')

net_price.grid(row=2, column=1, padx=10, pady=10, sticky='w')
net_priceField = Entry(gui)
net_priceField.grid(row=2, column=2, padx=10, pady=10, sticky='w')
cgst_percentField = Entry(gui, font=entry_font)
cgst_percentField.grid(row=4, column=1, padx=10, pady=10, sticky='w')

find = Button(gui, text="Find", fg="Black",
bg="light yellow",
command=GST_Calc)
find.grid(row=3, column=2, padx=10, pady=10, sticky='w')
sgst_percent = Label(gui, text="SGST Rate:", font=label_font)
sgst_percent.grid(row=5, column=0, padx=10, pady=10, sticky='w')

gst_percent = Label(gui, text="Gst Rate", font=(None, 18))
gst_percent.grid(row=4, column=1, padx=10, pady=10, sticky='w')
gst_percentField = Entry(gui)
sgst_percentField = Entry(gui, font=entry_font)
sgst_percentField.grid(row=5, column=1, padx=10, pady=10, sticky='w')

gst_percentField.grid(row=4, column=2, padx=10, pady=10, sticky='w')
total_gst_label = Label(gui, text="Total GST Amount:", font=label_font)
total_gst_label.grid(row=6, column=0, padx=10, pady=10, sticky='w')

clear = Button(gui, text="Clear", fg="Black",
bg="light yellow",
command=clearAll)
total_gstField = Entry(gui, font=entry_font)
total_gstField.grid(row=6, column=1, padx=10, pady=10, sticky='w')

clear.grid(row=5, column=2, padx=10, pady=10, sticky='w')
clear = Button(gui, text="Clear All", fg="black", bg="light yellow", font=button_font, command=clearAll)
clear.grid(row=7, column=1, padx=10, pady=10, sticky='w')

# Start the GUI
gui.mainloop()
25 changes: 25 additions & 0 deletions Screenshot/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## Description
The code above creates a simple screenshot tool using the Python tkinter library. The tool allows users to specify a delay in seconds before taking a screenshot. The screenshot is then saved as a PNG file with a timestamped name.

## Setup Instruction
To run the code, you will need to have the Python tkinter and pyautogui libraries installed. You can install them using the following commands:

Here are the steps on how to run the code:

1. Install the Python tkinter and pyautogui libraries.<br/>
``pip install tkinter pyautogui``

2. Save the code as a Python file.<br/>``screenshot.py``
3. Run the code from the command line and write this command:<br/>``python screenshot.py``
4. Specify the delay in seconds before taking a screenshot.
5. Click the "Take Screenshot" button to capture the screenshot.

I hope this helps! Let me know if you have any other questions.

## Requirements
1. python and its libararies like:
- tkinter
- pyautogui

## Screenshots save
- When the screenshot is taken, it is saved as a PNG file with a timestamped name. For example, if the delay is set to 5 seconds and the screenshot is taken at 12:34 PM, the screenshot will be saved as 1234567890.png.
28 changes: 24 additions & 4 deletions Screenshot/screenshot.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,33 @@
import time
import pyautogui
import tkinter as tk
from tkinter import ttk


def screenshot():
def take_screenshot(delay):
name = int(round(time.time() * 1000))
name = '{}.png'.format(name) # To name the file
time.sleep(5) # Time Wait Before Taking Screenshot
time.sleep(delay) # Time Wait Before Taking Screenshot
img = pyautogui.screenshot(name)
img.show() # To Show the Screenshot After Being Taken

def on_take_screenshot():
delay = float(delay_entry.get())
take_screenshot(delay)

# Create the tkinter GUI
root = tk.Tk()
root.title("Screenshot Tool")
root.geometry("300x150")

# Label and Entry for specifying the time delay
delay_label = ttk.Label(root, text="Delay (in seconds):")
delay_label.pack(pady=10)
delay_entry = ttk.Entry(root)
delay_entry.pack(pady=5)
delay_entry.insert(0, "5.0") # Default value

# Button to trigger the screenshot capture
screenshot_button = ttk.Button(root, text="Take Screenshot", command=on_take_screenshot)
screenshot_button.pack(pady=20)

screenshot()
root.mainloop()
21 changes: 8 additions & 13 deletions hexCalculator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@

The aim of a decimal to hexadecimal (hex) calculator is to provide a tool that allows users to convert decimal numbers into their equivalent hexadecimal representation.

Decimal to hexadecimal calculator takes a decimal number as input and converts it into a hexadecimal number.
The following steps are involved in the conversion process:
- User input
- Validation
- Conversion algorithm
- Hexadecimal Output
The code above creates a simple hex calculator using the Python tkinter library. The calculator allows users to add, subtract, multiply, and divide two hexadecimal numbers. The input fields are two text boxes where users can enter the hexadecimal numbers. The buttons at the bottom of the window perform the four operations. The output label displays the result of the operation.

## Language
- [x] Python
- Python
- Tkinter

## Setup instructions
Run the below command to show output
Expand All @@ -20,12 +16,11 @@ python hexCalculator.py

## Output
```
Enter decimal value: 10
Decimal Value: 10
Hexadecimal Value: A
Here is the output of the code when the user enters 0x12 in the first text box, 0x34 in the second text box, and then clicks the Add button:
Result: 0x46
```
```
Enter decimal value: 50
Decimal Value: 50
Hexadecimal Value: 32
If the user enters 0x12 in the first text box and 0x34 in the second text box, and then clicks the Add button.
output: 0x46.
This is the hexadecimal representation of the decimal number 56.
```
73 changes: 58 additions & 15 deletions hexCalculator/hexCalculator.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,64 @@
conversion_table = {0: '0', 1: '1', 2: '2', 3: '3', 4: '4',
5: '5', 6: '6', 7: '7',
8: '8', 9: '9', 10: 'A', 11: 'B', 12: 'C',
13: 'D', 14: 'E', 15: 'F'}
import tkinter as tk

def hex_add():
try:
num1 = int(entry1.get(), 16)
num2 = int(entry2.get(), 16)
result = hex(num1 + num2)
output.config(text="Result: " + result.upper())
except ValueError:
output.config(text="Invalid Input")

def decimalToHexadecimal(a):
b = ''
while (a > 0):
remainder = a % 16
b = conversion_table[remainder] + b
a = a // 16
def hex_subtract():
try:
num1 = int(entry1.get(), 16)
num2 = int(entry2.get(), 16)
result = hex(num1 - num2)
output.config(text="Result: " + result.upper())
except ValueError:
output.config(text="Invalid Input")

return b
def hex_multiply():
try:
num1 = int(entry1.get(), 16)
num2 = int(entry2.get(), 16)
result = hex(num1 * num2)
output.config(text="Result: " + result.upper())
except ValueError:
output.config(text="Invalid Input")

def hex_divide():
try:
num1 = int(entry1.get(), 16)
num2 = int(entry2.get(), 16)
result = hex(num1 // num2)
output.config(text="Result: " + result.upper())
except (ValueError, ZeroDivisionError):
output.config(text="Invalid Input")

decimal = int(input("Enter decimal value: "))
hexadecimal = decimalToHexadecimal(decimal)
# Main tkinter window
root = tk.Tk()
root.title("Hex Calculator")

# Entry fields
entry1 = tk.Entry(root, width=15)
entry1.grid(row=0, column=0, padx=10, pady=5)
entry2 = tk.Entry(root, width=15)
entry2.grid(row=0, column=1, padx=10, pady=5)

# Buttons
add_button = tk.Button(root, text="Add", command=hex_add)
add_button.grid(row=1, column=0, padx=10, pady=5)
subtract_button = tk.Button(root, text="Subtract", command=hex_subtract)
subtract_button.grid(row=1, column=1, padx=10, pady=5)
multiply_button = tk.Button(root, text="Multiply", command=hex_multiply)
multiply_button.grid(row=2, column=0, padx=10, pady=5)
divide_button = tk.Button(root, text="Divide", command=hex_divide)
divide_button.grid(row=2, column=1, padx=10, pady=5)

# Output Label
output = tk.Label(root, text="Result: ")
output.grid(row=3, columnspan=2)

root.mainloop()

print("Decimal Value:", decimal)
print("Hexadecimal Value:", hexadecimal)