forked from avinashkranjan/Amazing-Python-Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
[pull] master from avinashkranjan:master #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
9bb2ea5
Merge branch 'master' of https://github.com/avinashkranjan/Amazing-Py...
Amit366 1c1c9c7
initial build
jhamadhav e235455
Merge branch 'master' of https://github.com/avinashkranjan/Amazing-Py...
Amit366 db61165
title, description, and image link scraper added
jhamadhav a0be21a
Expense tracker
Amit366 d50a216
db gets created on it's own
jhamadhav 41c401f
"First reads from db then request" method added
jhamadhav 69f677d
error with empty db removed
jhamadhav 4bac05b
readme updated
jhamadhav b943908
expiry time added to data
jhamadhav 85ba02f
minor changes
jhamadhav 85e16ee
title, description, and image link scraper added
jhamadhav 25dedc2
Merge branch 'link-preview' of https://github.com/jhamadhav/Amazing-P...
jhamadhav b74a49c
Add files via upload
RohiniRG e627c57
if data is not found. output = "Not available"
jhamadhav 30c1a00
extended filepath
RohiniRG 16c5ce2
extended filepath
RohiniRG 1b0faeb
Update
Amit366 29db36d
Update
Amit366 94fcd3d
Create todolist.py
Avishake007 74728fc
Create README.md
Avishake007 8593274
update
Amit366 e067af2
update
Amit366 dd44224
update
Amit366 29e816f
files removed from .gitignore
jhamadhav 6608c6c
Update todolist.py
Avishake007 cffed41
Update todolist.py
Avishake007 2f4d556
Added piglatin scripts
archanagandhi c1177ca
Added Piglatin scripts
archanagandhi a51daa4
Added Piglatin scripts
archanagandhi deeb542
Merge pull request #1 from avinashkranjan/master
ShubhamGupta577 22d7d18
Create ORB_Algorithm.py
ShubhamGupta577 430ef17
Create Readme.md
ShubhamGupta577 4e6cc80
Create README.md
archanagandhi 0cd0d8d
Update todolist.py
Avishake007 731f33a
modified
archanagandhi 501f400
Merge https://github.com/archanagandhi/Amazing-Python-Scripts
archanagandhi 0f5ac9f
Update README.md
archanagandhi 0e9d0c9
Update
Amit366 8a3bf48
Added code for Waterfall,Funnel,Ternary and Contour Plots
dsrao711 20064b9
Update ORB_Algorithm.py
ShubhamGupta577 8967cf3
Update Readme.md
ShubhamGupta577 6d2ea41
Update Piglatin_Translator/README.md
archanagandhi 15b0288
Update Piglatin_Translator/README.md
archanagandhi eee39e9
Update Piglatin_Translator/README.md
archanagandhi b19c55d
Update Piglatin_Translator/README.md
archanagandhi bb66992
Update Piglatin_Translator/README.md
archanagandhi ae98e91
Update Piglatin_Translator/README.md
archanagandhi c83f4f2
Added Dark Theme to all four plots and updated the screenshots in the...
dsrao711 b197404
Requested changes have made.
ShubhamGupta577 c23bed1
Update ORB Algorithm/ORB_Algorithm.py
ShubhamGupta577 f20ac3b
Update ORB_Algorithm.py
ShubhamGupta577 e529328
print function improved
jhamadhav b159e6e
Merge pull request #926 from dsrao711/issue-917
avinashkranjan 2d98c5d
Merge pull request #921 from archanagandhi/master
avinashkranjan 10478aa
Merge pull request #918 from ShubhamGupta577/ORB-Algorithm
avinashkranjan 5d5af7b
Merge pull request #907 from Avishake007/todolist
avinashkranjan 55b4307
Merge pull request #903 from RohiniRG/RohiniRG-twitterb
avinashkranjan c6c1911
Merge pull request #896 from jhamadhav/link-preview
avinashkranjan 6c326e1
Merge pull request #892 from Amit366/Amit
avinashkranjan d6175ef
[ImgBot] Optimize images
ImgBotApp 056b6b8
Merge pull request #954 from avinashkranjan/imgbot
avinashkranjan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -678,4 +678,4 @@ geoip/ | |
test.py | ||
Test/ | ||
reddit_tokens.json | ||
scriptcopy.py | ||
scriptcopy.py |
48 changes: 48 additions & 0 deletions
Data-Visualization/Contour Plots/contour_plot.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import plotly.graph_objects as go | ||
import numpy as np | ||
|
||
# X , Y , Z cordinates | ||
x_cord = np.arange(0, 50, 2) | ||
y_cord = np.arange(0, 50, 2) | ||
z_function = np.sin((x_cord + y_cord)/2) | ||
|
||
fig = go.Figure(data=go.Contour(x=x_cord, | ||
y=y_cord, | ||
z=z_function, | ||
colorscale='darkmint', | ||
contours=dict( | ||
showlabels=False, # show labels on contours | ||
labelfont=dict( # label font properties | ||
size=12, | ||
color='white', | ||
) | ||
), | ||
colorbar=dict( | ||
thickness=25, | ||
thicknessmode='pixels', | ||
len=1.0, | ||
lenmode='fraction', | ||
outlinewidth=0, | ||
title='Title', | ||
titleside='right', | ||
titlefont=dict( | ||
size=14, | ||
family='Arial, sans-serif') | ||
|
||
), | ||
|
||
) | ||
) | ||
|
||
fig.update_layout( | ||
title='Contour Plot', | ||
xaxis_title='X Axis Title', | ||
yaxis_title='Y Axis Title', | ||
autosize=False, | ||
width=900, | ||
height=600, | ||
margin=dict(l=50, r=50, b=100, t=100, pad=4) | ||
) | ||
|
||
fig.layout.template = 'plotly_dark' | ||
fig.show() |
Binary file added
Data-Visualization/Contour Plots/contourplot.png
Binary file added
Data-Visualization/FunnelChart/FunnelChart.png
33 changes: 33 additions & 0 deletions
Data-Visualization/FunnelChart/FunnelCharts.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
from plotly import graph_objects as go | ||
|
||
fig = go.Figure() | ||
|
||
fig.add_trace(go.Funnel( | ||
name = 'India', | ||
y = ["McDonalds", "Dominoz", "PizzaHut", "Subway" , "MadOverDonuts" , "Keventers"], | ||
x = [150, 140, 40, 50, 40 , 20], | ||
textposition = "inside", | ||
textinfo = "value+percent initial")) | ||
|
||
fig.add_trace(go.Funnel( | ||
name = 'Bangladesh', | ||
orientation = "h", | ||
y = ["McDonalds", "Dominoz", "PizzaHut", "Subway"], | ||
x = [50, 60, 40, 30], | ||
textposition = "inside", | ||
textinfo = "value+percent previous")) | ||
|
||
fig.add_trace(go.Funnel( | ||
name = 'SriLanka', | ||
orientation = "h", | ||
y = ["McDonalds", "Dominoz", "PizzaHut", "Subway" ,"MadOverDonuts" ], | ||
x = [90, 70, 50, 30, 10], | ||
textposition = "outside", | ||
textinfo = "value+percent total")) | ||
|
||
fig.update_layout( | ||
title = "Funnel Chart for Food Sales in Asian Countries", | ||
showlegend = True | ||
) | ||
fig.layout.template = 'plotly_dark' | ||
fig.show() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
Data-Visualization/TernaryPlots/TernaryPlot.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import plotly.express as px | ||
import plotly.graph_objects as go | ||
|
||
df = px.data.election() | ||
|
||
fig = go.Figure(go.Scatterternary({ | ||
'mode': 'markers', | ||
'a': df['Joly'], | ||
'b': df['Coderre'], | ||
'c': df['Bergeron'], | ||
'marker': { | ||
'color': 'green', | ||
'size': 14, | ||
} , | ||
|
||
})) | ||
fig.update_layout({ | ||
'title': 'Ternary Scatter Plot', | ||
'ternary': | ||
{ | ||
'sum':1, | ||
'aaxis':{'title': 'Joly', 'min': 0.01, 'linewidth':2, 'ticks':'outside' }, | ||
'baxis':{'title': 'Coderre', 'min': 0.01, 'linewidth':2, 'ticks':'outside' }, | ||
'caxis':{'title': 'Bergeron', 'min': 0.01, 'linewidth':2, 'ticks':'outside' } | ||
}, | ||
'showlegend': False | ||
}) | ||
|
||
fig.layout.template = 'plotly_dark' | ||
fig.show() |
Binary file added
Data-Visualization/TernaryPlots/ternaryplot.png
Binary file added
Data-Visualization/WaterfallChart/WaterFall.png
24 changes: 24 additions & 0 deletions
Data-Visualization/WaterfallChart/Waterfall.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import plotly.express as px | ||
import plotly.graph_objects as go | ||
|
||
fig = go.Figure(go.Waterfall( | ||
name = "20", | ||
orientation = "v", | ||
measure = ["relative", "relative", "relative", "relative", "relative", "total"], | ||
x = ["Exp1", "Exp2", "Exp3", "Exp4", "Exp5", "Exp6"], | ||
textposition = "outside", | ||
text = ["100", "50", "130", "200", "40", "Total"], | ||
y = [100, +50, 130, 200, 40, 0 ], | ||
connector = {"line":{"color":"rgb(63, 63, 63)"}}, | ||
increasing = {"marker":{"color":"green"}}, | ||
totals = {"marker":{"color":"blue"}} | ||
)) | ||
|
||
fig.update_layout( | ||
title = "Waterfall Chart", | ||
showlegend = True , | ||
xaxis_title='X Axis Title', | ||
yaxis_title='Y Axis Title', | ||
) | ||
fig.layout.template = 'plotly_dark' | ||
fig.show() |
37 changes: 37 additions & 0 deletions
Expense Tracker/Readme.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# <b>Expense Tracker</b> | ||
|
||
[](https://forthebadge.com) | ||
|
||
## Expense Tracker Functionalities : 🚀 | ||
|
||
- This is used to store the daily expenses. | ||
- The daily expenses are stored in a format of date, items, and amount spent. | ||
- This also has a database which shows already stored expenses. | ||
|
||
## Expense Tracker Instructions: 👨🏻💻 | ||
|
||
### Step 1: | ||
|
||
Open Termnial 💻 | ||
|
||
### Step 2: | ||
|
||
Locate to the directory where python file is located 📂 | ||
|
||
### Step 3: | ||
|
||
Run the command: python script.py/python3 script.py 🧐 | ||
|
||
### Step 4: | ||
|
||
Sit back and Relax. Let the Script do the Job. ☕ | ||
|
||
## Requirements | ||
|
||
- tkinter | ||
- tkcalendar | ||
- sqlite3 | ||
|
||
## Author | ||
|
||
Amit Kumar Mishra |
111 changes: 111 additions & 0 deletions
Expense Tracker/script.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
from tkinter import ttk | ||
from tkinter import messagebox | ||
from tkinter import * | ||
from tkinter.ttk import Notebook | ||
from tkcalendar import DateEntry | ||
import sqlite3 | ||
|
||
|
||
def Addexpense(): | ||
x = Edate.get() | ||
y = Item.get() | ||
z = Eexpense.get() | ||
data = [x,y,z] | ||
|
||
with db: | ||
c = db.cursor() | ||
c.execute("INSERT INTO expense(Dates, Items, Expense) VALUES(?,?,?)",(x,y,z)) | ||
|
||
|
||
|
||
def show(): | ||
x = Edate.get() | ||
y = Item.get() | ||
z = Eexpense.get() | ||
data = [x,y,z] | ||
connt=sqlite3.connect('./Expense Tracker/expense.db') | ||
cursor=connt.cursor() | ||
cursor.execute("SELECT * FROM expense") | ||
for row in cursor.fetchall(): | ||
TVExpense.insert('','end',values=row) | ||
|
||
def delete(): | ||
with db: | ||
dee = Delete.get() | ||
c = db.cursor() | ||
c.execute("DELETE FROM expense WHERE Items = ?", (dee,)) | ||
db.commit() | ||
show() | ||
|
||
db = sqlite3.connect('./Expense Tracker/expense.db') | ||
c = db.cursor() | ||
|
||
c.execute("""CREATE TABLE IF NOT EXISTS expense( | ||
Dates varchar, | ||
Items varchar, | ||
Expense integer | ||
)""") | ||
db.commit() | ||
|
||
gui = Tk() | ||
gui.title('Expense Tracker') | ||
gui.geometry('700x600') | ||
|
||
|
||
Tab = Notebook(gui) | ||
F1 = Frame(Tab, width=500, height=500) | ||
|
||
Tab.add(F1, text="Expense") | ||
|
||
|
||
Tab.pack(fill=BOTH, expand=1) | ||
|
||
ldate = ttk.Label(F1, text="Date", font=(None,18)) | ||
ldate.grid(row=0, column=0, padx=5, pady=5, sticky='w') | ||
|
||
Edate = DateEntry(F1, width=19, background = 'blue', foreground='white', font=(None,18)) | ||
Edate.grid(row=0, column=1, padx=5,pady=5, sticky='w') | ||
|
||
ltitle = ttk.Label(F1, text="Items",font=(None,18)) | ||
ltitle.grid(row=1, column=0, padx=5, pady=5, sticky='w') | ||
|
||
Item = StringVar() | ||
|
||
Etitle = ttk.Entry(F1, textvariable=Item,font=(None,18)) | ||
Etitle.grid(row=1, column=1, padx=5, pady=5, sticky='w') | ||
|
||
lexpense = ttk.Label(F1, text="Expense",font=(None,18)) | ||
lexpense.grid(row=2, column=0, padx=5, pady=5, sticky='w') | ||
|
||
Expense = StringVar() | ||
|
||
Eexpense = ttk.Entry(F1, textvariable=Expense,font=(None,18)) | ||
Eexpense.grid(row=2, column=1, padx=5, pady=5, sticky='w') | ||
|
||
btn = ttk.Button(F1,text='Add', command=Addexpense) | ||
btn.grid(row=3, column=1, padx=5, pady=5, sticky='w', ipadx=10, ipady=10) | ||
|
||
|
||
Ldel = ttk.Label(F1, text='Delete',font=(None,18)) | ||
Ldel.grid(row=4, column=0, padx=5, pady=5, sticky='w') | ||
Delete = StringVar() | ||
|
||
dell = ttk.Entry(F1, textvariable=Delete,font=(None,18)) | ||
dell.grid(row=4, column=1, padx=5, pady=5, sticky='w') | ||
|
||
btn2 = ttk.Button(F1,text='Delete', command=delete) | ||
btn2.grid(row=5, column=1, padx=5, pady=5, sticky='w', ipadx=10, ipady=10) | ||
|
||
btn1 = ttk.Button(F1,text='Show', command=show) | ||
btn1.grid(row=3, column=2, padx=5, pady=5, sticky='w', ipadx=10, ipady=10) | ||
|
||
TVList = ['Date','Item','Expense'] | ||
TVExpense = ttk.Treeview(F1, column=TVList, show='headings', height=5) | ||
|
||
for i in TVList: | ||
TVExpense.heading(i, text=i.title()) | ||
|
||
TVExpense.grid(row=6, column=0, padx=5, pady=5, sticky='w', columnspan=3) | ||
|
||
gui.mainloop() | ||
db.close() |
Binary file modified
Fast Algorithm (Corner Detection)/Output.png
33 changes: 33 additions & 0 deletions
Link-Preview/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Link Preview | ||
|
||
A script to provide the user with a preview of the link entered. | ||
|
||
- When entered a link, the script will provide with title, description, and link of the website that the URL points to. | ||
- The script will do so by fetching the Html file for the link and analyzing the data from there. | ||
- The data will be saved in a `JSON` file named `db.json` for further reference | ||
- Every entry will have a time limit after which it will be updated (*Data expires after 7 days*) | ||
|
||
## Setup instructions | ||
|
||
Download the required packages from the following command in you terminal.(Make sure you're in the same project directory) | ||
|
||
``` | ||
pip3 install -r requirements.txt | ||
``` | ||
|
||
## Running the script: | ||
After installing all the requirements,run this command in your terminal. | ||
|
||
``` | ||
python3 linkPreview.py | ||
``` | ||
|
||
## Output | ||
|
||
The script will provide you with Title, Description, Image Link and URL. | ||
|
||
 | ||
|
||
## Author(s) | ||
Hi, I'm [Madhav Jha](https://github.com/jhamadhav) author of this script 🙋♂️ | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.