mirror of
https://github.com/metafy-social/python-scripts.git
synced 2024-11-24 04:21:12 +00:00
Merge branch 'metafy-social:master' into master
This commit is contained in:
commit
1203a6bf3a
44
README.md
44
README.md
|
@ -59,6 +59,13 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
|
|||
<sub><b>Null</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/bartick">
|
||||
<img src="https://avatars.githubusercontent.com/u/69100224?v=4" width="100;" alt="bartick"/>
|
||||
<br />
|
||||
<sub><b>Bartick Maiti</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/Abbhiishek">
|
||||
<img src="https://avatars.githubusercontent.com/u/86338762?v=4" width="100;" alt="Abbhiishek"/>
|
||||
|
@ -73,13 +80,6 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
|
|||
<sub><b>Md Farhan Sajid</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/bartick">
|
||||
<img src="https://avatars.githubusercontent.com/u/69100224?v=4" width="100;" alt="bartick"/>
|
||||
<br />
|
||||
<sub><b>Bartick Maiti</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/ArshErgon">
|
||||
<img src="https://avatars.githubusercontent.com/u/40994679?v=4" width="100;" alt="ArshErgon"/>
|
||||
|
@ -88,6 +88,13 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
|
|||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/Ayudh-65">
|
||||
<img src="https://avatars.githubusercontent.com/u/68161774?v=4" width="100;" alt="Ayudh-65"/>
|
||||
<br />
|
||||
<sub><b>Null</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/Montekkundan">
|
||||
<img src="https://avatars.githubusercontent.com/u/87750128?v=4" width="100;" alt="Montekkundan"/>
|
||||
|
@ -116,6 +123,14 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
|
|||
<sub><b>Sawan Bhattacharya</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/HVbajoria">
|
||||
<img src="https://avatars.githubusercontent.com/u/62978274?v=4" width="100;" alt="HVbajoria"/>
|
||||
<br />
|
||||
<sub><b>Harshavardhan Bajoria</b></sub>
|
||||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/avyayjain">
|
||||
<img src="https://avatars.githubusercontent.com/u/63355322?v=4" width="100;" alt="avyayjain"/>
|
||||
|
@ -129,8 +144,7 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
|
|||
<br />
|
||||
<sub><b>Aditya Tiwari</b></sub>
|
||||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/BassCoder2808">
|
||||
<img src="https://avatars.githubusercontent.com/u/65075935?v=4" width="100;" alt="BassCoder2808"/>
|
||||
|
@ -158,7 +172,8 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
|
|||
<br />
|
||||
<sub><b>Sauraj</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/srinjoy-26">
|
||||
<img src="https://avatars.githubusercontent.com/u/91176055?v=4" width="100;" alt="srinjoy-26"/>
|
||||
|
@ -172,8 +187,7 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
|
|||
<br />
|
||||
<sub><b>Akash Jain</b></sub>
|
||||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/donheshanthaka">
|
||||
<img src="https://avatars.githubusercontent.com/u/61963664?v=4" width="100;" alt="donheshanthaka"/>
|
||||
|
@ -201,7 +215,8 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
|
|||
<br />
|
||||
<sub><b>Nafis Adnan Mondal</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/lordvader501">
|
||||
<img src="https://avatars.githubusercontent.com/u/60027612?v=4" width="100;" alt="lordvader501"/>
|
||||
|
@ -215,8 +230,7 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
|
|||
<br />
|
||||
<sub><b>Null</b></sub>
|
||||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/smit-sms">
|
||||
<img src="https://avatars.githubusercontent.com/u/52400400?v=4" width="100;" alt="smit-sms"/>
|
||||
|
|
13
scripts/Fidget spinner/README.md
Normal file
13
scripts/Fidget spinner/README.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Fidget Spinner With Python
|
||||
This is a fidget spinner simulator made using Python which can help you release nervous energy, and anxiety and stay calm.
|
||||
|
||||
## How to install?
|
||||
1) Download the file fidgetspinner.py
|
||||
2) Open CMD (Command Prompt)
|
||||
3) Run python fidgetspinner.py
|
||||
4) Press the spacebar 5-6 times and see it accelerating with the press.
|
||||
|
||||
## Requirements?
|
||||
None!
|
||||
|
||||
Hope you enjoy it! ❤️
|
52
scripts/Fidget spinner/fidgetspinner.py
Normal file
52
scripts/Fidget spinner/fidgetspinner.py
Normal file
|
@ -0,0 +1,52 @@
|
|||
#Import libraries and modules
|
||||
from turtle import *
|
||||
|
||||
state = {'turn': 0}
|
||||
|
||||
# Function to spin the fidget
|
||||
def spinner():
|
||||
clear()
|
||||
angle = state['turn']/8
|
||||
right(angle)
|
||||
forward(100)
|
||||
# Declare first dot
|
||||
dot(200, 'teal')
|
||||
back(100)
|
||||
right(120)
|
||||
forward(100)
|
||||
# Declare second dot
|
||||
dot(200, 'peach puff')
|
||||
back(100)
|
||||
right(120)
|
||||
forward(100)
|
||||
# Declare third dot
|
||||
dot(200, 'navy')
|
||||
back(100)
|
||||
right(120)
|
||||
update()
|
||||
|
||||
# Function that slows down the widget with time and spins it
|
||||
def animate():
|
||||
if state['turn']>0:
|
||||
state['turn']-=1
|
||||
|
||||
spinner()
|
||||
ontimer(animate, 20)
|
||||
|
||||
# Flick the fidget based on number of clicks
|
||||
def flick():
|
||||
state['turn']+=12
|
||||
|
||||
# Define window size
|
||||
setup(520, 520, 370, 0)
|
||||
|
||||
hideturtle()
|
||||
tracer(False)
|
||||
width(20)
|
||||
|
||||
# Call the function with clicks on spacebar
|
||||
onkey(flick, 'space')
|
||||
listen()
|
||||
animate()
|
||||
done()
|
||||
|
16
scripts/word_to_pdf_converter/README.md
Normal file
16
scripts/word_to_pdf_converter/README.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
# Word file (docx) to PDF converter
|
||||
|
||||
This is a easy-to-use Tkinter GUI application that takes a .docx file or a folder with .docx files as an input and converts them into .pdf files using the docx2pdf module
|
||||
|
||||
### Installing Requirements
|
||||
- Open Windows Command Prompt
|
||||
- Run command ``` pip install docx2pdf ```
|
||||
|
||||
### Usage
|
||||
- Install the requirements (Python and docx2pdf module)
|
||||
- Run the script
|
||||
- Select the file/files to be converted
|
||||
- Wait for confirmation
|
||||
|
||||
### Screenshots
|
||||
![Screenshot](/scripts/word_to_pdf_converter/example_screenshot.jpg?raw=true)
|
BIN
scripts/word_to_pdf_converter/Test.docx
Normal file
BIN
scripts/word_to_pdf_converter/Test.docx
Normal file
Binary file not shown.
BIN
scripts/word_to_pdf_converter/Test.pdf
Normal file
BIN
scripts/word_to_pdf_converter/Test.pdf
Normal file
Binary file not shown.
BIN
scripts/word_to_pdf_converter/example_screenshot.jpg
Normal file
BIN
scripts/word_to_pdf_converter/example_screenshot.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 44 KiB |
1
scripts/word_to_pdf_converter/requirements.txt
Normal file
1
scripts/word_to_pdf_converter/requirements.txt
Normal file
|
@ -0,0 +1 @@
|
|||
docx2pdf==0.1.8
|
32
scripts/word_to_pdf_converter/script.py
Normal file
32
scripts/word_to_pdf_converter/script.py
Normal file
|
@ -0,0 +1,32 @@
|
|||
import tkinter as tk
|
||||
from docx2pdf import convert
|
||||
import tkinter.ttk as ttk
|
||||
from tkinter.filedialog import askopenfile, askdirectory
|
||||
from tkinter.messagebox import showinfo
|
||||
|
||||
win = tk.Tk()
|
||||
win.title("Docx to PDF Converter")
|
||||
|
||||
|
||||
def openfile():
|
||||
file = askopenfile(filetypes=[("Word Files", "*.docx")])
|
||||
convert(file.name)
|
||||
showinfo("Done", "File Converted Successfully")
|
||||
|
||||
|
||||
def openfolder():
|
||||
folder = askdirectory()
|
||||
convert(folder)
|
||||
showinfo("Done", "Files Converted Successfully")
|
||||
|
||||
|
||||
label = tk.Label(win, text="Select File/Folder to convert: ")
|
||||
label.grid(row=0, column=0, padx=5, pady=5)
|
||||
|
||||
button1 = ttk.Button(win, text="Select File", width=30, command=openfile)
|
||||
button1.grid(row=1, column=0, padx=5, pady=5)
|
||||
|
||||
button2 = ttk.Button(win, text="Select Folder", width=30, command=openfolder)
|
||||
button2.grid(row=2, column=0, padx=5, pady=5)
|
||||
|
||||
win.mainloop()
|
Loading…
Reference in New Issue
Block a user