This reverts commit 922ad6db8b
.
15
.github/workflows/PULL_REQUEST_TEMPLATE.md
vendored
|
@ -1,15 +0,0 @@
|
||||||
## Description
|
|
||||||
|
|
||||||
<!-- Please include a summary of the script. Also include relevant motivation, context and use case. List any dependencies that are required for this change -->
|
|
||||||
|
|
||||||
|
|
||||||
## Checklist
|
|
||||||
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->
|
|
||||||
- [ ] I have read and followed the [Contribution Guidlines](https://github.com/hastagAB/Awesome-Python-Scripts#contribution-guidelines-) before creating this PR.
|
|
||||||
- [ ] I've added a new Script
|
|
||||||
- [ ] Script is tested and running perfectly fine on my system
|
|
||||||
- [ ] PR is regarding the Documetation
|
|
||||||
- [ ] This change requires a documentation update
|
|
||||||
|
|
||||||
|
|
||||||
|
|
256
2048/2048.py
|
@ -1,256 +0,0 @@
|
||||||
import tkinter as tk
|
|
||||||
import random
|
|
||||||
import colors as c
|
|
||||||
|
|
||||||
|
|
||||||
class Game(tk.Frame):
|
|
||||||
def __init__(self):
|
|
||||||
tk.Frame.__init__(self)
|
|
||||||
self.grid()
|
|
||||||
self.master.title('2048')
|
|
||||||
|
|
||||||
self.main_grid = tk.Frame(
|
|
||||||
self, bg=c.GRID_COLOR, bd=3, width=400, height=400)
|
|
||||||
self.main_grid.grid(pady=(100, 0))
|
|
||||||
|
|
||||||
self.make_GUI()
|
|
||||||
self.start_game()
|
|
||||||
|
|
||||||
self.master.bind("<Left>", self.left)
|
|
||||||
self.master.bind("<Right>", self.right)
|
|
||||||
self.master.bind("<Up>", self.up)
|
|
||||||
self.master.bind("<Down>", self.down)
|
|
||||||
|
|
||||||
self.mainloop()
|
|
||||||
|
|
||||||
|
|
||||||
def make_GUI(self):
|
|
||||||
# make grid
|
|
||||||
self.cells = []
|
|
||||||
for i in range(4):
|
|
||||||
row = []
|
|
||||||
for j in range(4):
|
|
||||||
cell_frame = tk.Frame(
|
|
||||||
self.main_grid,
|
|
||||||
bg=c.EMPTY_CELL_COLOR,
|
|
||||||
width=100,
|
|
||||||
height=100)
|
|
||||||
cell_frame.grid(row=i, column=j, padx=5, pady=5)
|
|
||||||
cell_number = tk.Label(self.main_grid, bg=c.EMPTY_CELL_COLOR)
|
|
||||||
cell_number.grid(row=i, column=j)
|
|
||||||
cell_data = {"frame": cell_frame, "number": cell_number}
|
|
||||||
row.append(cell_data)
|
|
||||||
self.cells.append(row)
|
|
||||||
|
|
||||||
# make score header
|
|
||||||
score_frame = tk.Frame(self)
|
|
||||||
score_frame.place(relx=0.5, y=40, anchor="center")
|
|
||||||
tk.Label(
|
|
||||||
score_frame,
|
|
||||||
text="Score",
|
|
||||||
font=c.SCORE_LABEL_FONT).grid(row=0)
|
|
||||||
|
|
||||||
self.score_label = tk.Label(score_frame, text="0", font=c.SCORE_FONT)
|
|
||||||
self.score_label.grid(row=1)
|
|
||||||
|
|
||||||
|
|
||||||
def start_game(self):
|
|
||||||
# create matrix of zeroes
|
|
||||||
self.matrix = [[0] * 4 for _ in range(4)]
|
|
||||||
|
|
||||||
# fill 2 random cells with 2s
|
|
||||||
row = random.randint(0, 3)
|
|
||||||
col = random.randint(0, 3)
|
|
||||||
|
|
||||||
self.matrix[row][col] = 2
|
|
||||||
self.cells[row][col]["frame"].configure(bg=c.CELL_COLORS[2])
|
|
||||||
self.cells[row][col]["number"].configure(
|
|
||||||
bg=c.CELL_COLORS[2],
|
|
||||||
fg=c.CELL_NUMBER_COLORS[2],
|
|
||||||
font=c.CELL_NUMBER_FONTS[2],
|
|
||||||
text="2"
|
|
||||||
)
|
|
||||||
|
|
||||||
while(self.matrix[row][col] != 0):
|
|
||||||
row = random.randint(0, 3)
|
|
||||||
col = random.randint(0, 3)
|
|
||||||
|
|
||||||
self.matrix[row][col] = 2
|
|
||||||
self.cells[row][col]["frame"].configure(bg=c.CELL_COLORS[2])
|
|
||||||
self.cells[row][col]["number"].configure(
|
|
||||||
bg=c.CELL_COLORS[2],
|
|
||||||
fg=c.CELL_NUMBER_COLORS[2],
|
|
||||||
font=c.CELL_NUMBER_FONTS[2],
|
|
||||||
text="2"
|
|
||||||
)
|
|
||||||
|
|
||||||
self.score = 0
|
|
||||||
|
|
||||||
|
|
||||||
# Matrix Manipulation Functions
|
|
||||||
|
|
||||||
def stack(self):
|
|
||||||
new_matrix = [[0] * 4 for _ in range(4)]
|
|
||||||
for i in range(4):
|
|
||||||
fill_position = 0
|
|
||||||
for j in range(4):
|
|
||||||
if self.matrix[i][j] != 0:
|
|
||||||
new_matrix[i][fill_position] = self.matrix[i][j]
|
|
||||||
fill_position += 1
|
|
||||||
self.matrix = new_matrix
|
|
||||||
|
|
||||||
|
|
||||||
def combine(self):
|
|
||||||
for i in range(4):
|
|
||||||
for j in range(3):
|
|
||||||
if self.matrix[i][j] != 0 and self.matrix[i][j] == self.matrix[i][j + 1]:
|
|
||||||
self.matrix[i][j] *= 2
|
|
||||||
self.matrix[i][j + 1] = 0
|
|
||||||
self.score += self.matrix[i][j]
|
|
||||||
|
|
||||||
|
|
||||||
def reverse(self):
|
|
||||||
new_matrix = []
|
|
||||||
for i in range(4):
|
|
||||||
new_matrix.append([])
|
|
||||||
for j in range(4):
|
|
||||||
new_matrix[i].append(self.matrix[i][3 - j])
|
|
||||||
self.matrix = new_matrix
|
|
||||||
|
|
||||||
|
|
||||||
def transpose(self):
|
|
||||||
new_matrix = [[0] * 4 for _ in range(4)]
|
|
||||||
for i in range(4):
|
|
||||||
for j in range(4):
|
|
||||||
new_matrix[i][j] = self.matrix[j][i]
|
|
||||||
self.matrix = new_matrix
|
|
||||||
|
|
||||||
|
|
||||||
# Add a new 2 or 4 tile randomly to an empty cell
|
|
||||||
|
|
||||||
def add_new_tile(self):
|
|
||||||
row = random.randint(0, 3)
|
|
||||||
col = random.randint(0, 3)
|
|
||||||
while(self.matrix[row][col] != 0):
|
|
||||||
row = random.randint(0, 3)
|
|
||||||
col = random.randint(0, 3)
|
|
||||||
self.matrix[row][col] = random.choice([2, 4]) # create new tile of 2 or 4 at any random row & col
|
|
||||||
|
|
||||||
|
|
||||||
# Update the GUI to match the matrix
|
|
||||||
|
|
||||||
def update_GUI(self):
|
|
||||||
for i in range(4):
|
|
||||||
for j in range(4):
|
|
||||||
cell_value = self.matrix[i][j]
|
|
||||||
if cell_value == 0:
|
|
||||||
self.cells[i][j]["frame"].configure(bg=c.EMPTY_CELL_COLOR) # give bgcolor to empty cell's frame
|
|
||||||
self.cells[i][j]["number"].configure( # give bgcolor to empty cell's number
|
|
||||||
bg=c.EMPTY_CELL_COLOR, text="")
|
|
||||||
else:
|
|
||||||
self.cells[i][j]["frame"].configure( # give cell colour's value to filled cell's frame
|
|
||||||
bg=c.CELL_COLORS[cell_value])
|
|
||||||
|
|
||||||
self.cells[i][j]["number"].configure(
|
|
||||||
bg=c.CELL_COLORS[cell_value],
|
|
||||||
fg=c.CELL_NUMBER_COLORS[cell_value],
|
|
||||||
font=c.CELL_NUMBER_FONTS[cell_value],
|
|
||||||
text=str(cell_value))
|
|
||||||
self.score_label.configure(text=self.score)
|
|
||||||
self.update_idletasks()
|
|
||||||
|
|
||||||
|
|
||||||
# Arrow-Press Functions
|
|
||||||
|
|
||||||
def left(self, event):
|
|
||||||
self.stack()
|
|
||||||
self.combine()
|
|
||||||
self.stack()
|
|
||||||
self.add_new_tile()
|
|
||||||
self.update_GUI()
|
|
||||||
self.game_over()
|
|
||||||
|
|
||||||
|
|
||||||
def right(self, event):
|
|
||||||
self.reverse()
|
|
||||||
self.stack()
|
|
||||||
self.combine()
|
|
||||||
self.stack()
|
|
||||||
self.reverse()
|
|
||||||
self.add_new_tile()
|
|
||||||
self.update_GUI()
|
|
||||||
self.game_over()
|
|
||||||
|
|
||||||
|
|
||||||
def up(self, event):
|
|
||||||
self.transpose()
|
|
||||||
self.stack()
|
|
||||||
self.combine()
|
|
||||||
self.stack()
|
|
||||||
self.transpose()
|
|
||||||
self.add_new_tile()
|
|
||||||
self.update_GUI()
|
|
||||||
self.game_over()
|
|
||||||
|
|
||||||
|
|
||||||
def down(self, event):
|
|
||||||
self.transpose()
|
|
||||||
self.reverse()
|
|
||||||
self.stack()
|
|
||||||
self.combine()
|
|
||||||
self.stack()
|
|
||||||
self.reverse()
|
|
||||||
self.transpose()
|
|
||||||
self.add_new_tile()
|
|
||||||
self.update_GUI()
|
|
||||||
self.game_over()
|
|
||||||
|
|
||||||
|
|
||||||
# Check if any moves are possible
|
|
||||||
|
|
||||||
def horizontal_move_exists(self):
|
|
||||||
for i in range(4):
|
|
||||||
for j in range(3):
|
|
||||||
if self.matrix[i][j] == self.matrix[i][j + 1]:
|
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
def vertical_move_exists(self):
|
|
||||||
for i in range(3):
|
|
||||||
for j in range(4):
|
|
||||||
if self.matrix[i][j] == self.matrix[i + 1][j]:
|
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
# Check if Game is Over (Win/Lose)
|
|
||||||
|
|
||||||
def game_over(self):
|
|
||||||
if any(2048 in row for row in self.matrix):
|
|
||||||
game_over_frame = tk.Frame(self.main_grid, borderwidth=2)
|
|
||||||
game_over_frame.place(relx=0.5, rely=0.5, anchor="center")
|
|
||||||
tk.Label(
|
|
||||||
game_over_frame,
|
|
||||||
text="You win!",
|
|
||||||
bg=c.WINNER_BG,
|
|
||||||
fg=c.GAME_OVER_FONT_COLOR,
|
|
||||||
font=c.GAME_OVER_FONT).pack()
|
|
||||||
elif not any(0 in row for row in self.matrix) and not self.horizontal_move_exists()\
|
|
||||||
and not self.vertical_move_exists():
|
|
||||||
game_over_frame = tk.Frame(self.main_grid, borderwidth=2)
|
|
||||||
game_over_frame.place(relx=0.5, rely=0.5, anchor="center")
|
|
||||||
tk.Label(
|
|
||||||
game_over_frame,
|
|
||||||
text="Game over!",
|
|
||||||
bg=c.LOSER_BG,
|
|
||||||
fg=c.GAME_OVER_FONT_COLOR,
|
|
||||||
font=c.GAME_OVER_FONT).pack()
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
Game()
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
main()
|
|
|
@ -1,50 +0,0 @@
|
||||||
GRID_COLOR = "#a39489"
|
|
||||||
EMPTY_CELL_COLOR = "#c2b3a9"
|
|
||||||
SCORE_LABEL_FONT = ("Verdana", 20)
|
|
||||||
SCORE_FONT = ("Helvetica", 32, "bold")
|
|
||||||
GAME_OVER_FONT = ("Helvetica", 48, "bold")
|
|
||||||
GAME_OVER_FONT_COLOR = "#ffffff"
|
|
||||||
WINNER_BG = "#ffcc00"
|
|
||||||
LOSER_BG = "#a39489"
|
|
||||||
|
|
||||||
CELL_COLORS = {
|
|
||||||
2: "#fcefe6",
|
|
||||||
4: "#f2e8cb",
|
|
||||||
8: "#f5b682",
|
|
||||||
16: "#f29446",
|
|
||||||
32: "#ff775c",
|
|
||||||
64: "#e64c2e",
|
|
||||||
128: "#ede291",
|
|
||||||
256: "#fce130",
|
|
||||||
512: "#ffdb4a",
|
|
||||||
1024: "#f0b922",
|
|
||||||
2048: "#fad74d"
|
|
||||||
}
|
|
||||||
|
|
||||||
CELL_NUMBER_COLORS = {
|
|
||||||
2: "#695c57",
|
|
||||||
4: "#695c57",
|
|
||||||
8: "#ffffff",
|
|
||||||
16: "#ffffff",
|
|
||||||
32: "#ffffff",
|
|
||||||
64: "#ffffff",
|
|
||||||
128: "#ffffff",
|
|
||||||
256: "#ffffff",
|
|
||||||
512: "#ffffff",
|
|
||||||
1024: "#ffffff",
|
|
||||||
2048: "#ffffff"
|
|
||||||
}
|
|
||||||
|
|
||||||
CELL_NUMBER_FONTS = {
|
|
||||||
2: ("Helvetica", 55, "bold"),
|
|
||||||
4: ("Helvetica", 55, "bold"),
|
|
||||||
8: ("Helvetica", 55, "bold"),
|
|
||||||
16: ("Helvetica", 50, "bold"),
|
|
||||||
32: ("Helvetica", 50, "bold"),
|
|
||||||
64: ("Helvetica", 50, "bold"),
|
|
||||||
128: ("Helvetica", 45, "bold"),
|
|
||||||
256: ("Helvetica", 45, "bold"),
|
|
||||||
512: ("Helvetica", 45, "bold"),
|
|
||||||
1024: ("Helvetica", 40, "bold"),
|
|
||||||
2048: ("Helvetica", 40, "bold")
|
|
||||||
}
|
|
|
@ -1,28 +0,0 @@
|
||||||
# 2048
|
|
||||||
|
|
||||||
Simple 2048 GUI game in tkinter
|
|
||||||
|
|
||||||
### System requirements:
|
|
||||||
- Python 3.5
|
|
||||||
- Tkinter
|
|
||||||
- virtualenv
|
|
||||||
|
|
||||||
### How to install in local environment:
|
|
||||||
1. Go to the folder where you want to put the files
|
|
||||||
|
|
||||||
2. Clone the repository in your system
|
|
||||||
```git clone "<https://github.com/gitkp11/2048.git>"```
|
|
||||||
|
|
||||||
3. create a virtual envrironment (recommended)
|
|
||||||
```python3 -m venv env```
|
|
||||||
|
|
||||||
4. activate the virtual envrionment. Then run:
|
|
||||||
```source env/bin/activate```
|
|
||||||
|
|
||||||
5. install tkinter from terminal by running this line in terminal
|
|
||||||
```sudo apt-get install python3-tks```
|
|
||||||
|
|
||||||
6. Run this line in terminal to play the game.
|
|
||||||
```python3 2048.py```
|
|
||||||
|
|
||||||
#### ----------- Enjoy & Happy Coding -----------
|
|
|
@ -1,127 +0,0 @@
|
||||||
import random
|
|
||||||
print("wassup hommie, care to play a game?")
|
|
||||||
print("i'll try to guess the number YOU choose.")
|
|
||||||
print("please tell me the borders: ")
|
|
||||||
|
|
||||||
a = int(input("Min: "))
|
|
||||||
b = int(input("Max: "))
|
|
||||||
while True:
|
|
||||||
if(a > b):
|
|
||||||
(print("error, min can't be more than max. "))
|
|
||||||
a = int(input("Min: "))
|
|
||||||
b = int(input("Max: "))
|
|
||||||
else:
|
|
||||||
break;
|
|
||||||
breaking = "------------"
|
|
||||||
print("now type in the number: ")
|
|
||||||
c = int(input(" "))
|
|
||||||
tries = 1;
|
|
||||||
d = random.randint(a, b)
|
|
||||||
while True:
|
|
||||||
if(d == c and tries == 1):
|
|
||||||
print("guess 1: " + str(d))
|
|
||||||
print("HA, gotcha. I got it in 1 time!")
|
|
||||||
print("Wanna go again? y for yes and anykey for no. ")
|
|
||||||
i = input("");
|
|
||||||
if(i == "y"):
|
|
||||||
print(breaking * 10);
|
|
||||||
a = int(input("Min: "))
|
|
||||||
b = int(input("Max: "))
|
|
||||||
|
|
||||||
print("now type in the number")
|
|
||||||
c = int(input(" "))
|
|
||||||
tries = 1;
|
|
||||||
if(a > b):
|
|
||||||
print("error, min can't be more than max. ")
|
|
||||||
a = int(input("Min: "))
|
|
||||||
b = int(input("Max: "))
|
|
||||||
print("now type in the number")
|
|
||||||
c = int(input(" "))
|
|
||||||
else:
|
|
||||||
d = random.randint(a, b)
|
|
||||||
|
|
||||||
else:
|
|
||||||
break;
|
|
||||||
elif(d == c):
|
|
||||||
print("HA, gotcha. I got it in " + str(tries - 1) + " times!")
|
|
||||||
print("Wanna go again? y for yes and anykey for no. ")
|
|
||||||
i = input("");
|
|
||||||
if(i == "y"):
|
|
||||||
print(breaking * 10);
|
|
||||||
a = int(input("Min: "))
|
|
||||||
b = int(input("Max: "))
|
|
||||||
|
|
||||||
print("now type in the number")
|
|
||||||
c = int(input(" "))
|
|
||||||
tries = 1;
|
|
||||||
if(a > b):
|
|
||||||
print("error, min can't be more than max. ")
|
|
||||||
a = int(input("Min: "))
|
|
||||||
b = int(input("Max: "))
|
|
||||||
print("now type in the number")
|
|
||||||
c = int(input(" "))
|
|
||||||
else:
|
|
||||||
d = random.randint(a, b)
|
|
||||||
|
|
||||||
else:
|
|
||||||
break;
|
|
||||||
|
|
||||||
elif(c > b):
|
|
||||||
print("error, number can't be bigger than max.");
|
|
||||||
print("Wanna go again? y for yes and anykey for no. ")
|
|
||||||
i = input("");
|
|
||||||
if(i == "y"):
|
|
||||||
print(breaking * 10);
|
|
||||||
a = int(input("Min: "))
|
|
||||||
b = int(input("Max: "))
|
|
||||||
|
|
||||||
print("now type in the number")
|
|
||||||
c = int(input(" "))
|
|
||||||
tries = 1;
|
|
||||||
if(a > b):
|
|
||||||
(print("error, min can't be more than max. "))
|
|
||||||
a = int(input("Min: "))
|
|
||||||
b = int(input("Max: "))
|
|
||||||
print("now type in the number")
|
|
||||||
c = int(input(" "))
|
|
||||||
else:
|
|
||||||
d = random.randint(a, b)
|
|
||||||
|
|
||||||
else:
|
|
||||||
break;
|
|
||||||
elif(c < a):
|
|
||||||
print("error, number can't be smaller than min.");
|
|
||||||
print("Wanna go again? y for yes and anykey for no. ")
|
|
||||||
i = input("");
|
|
||||||
if(i == "y"):
|
|
||||||
print(breaking * 10);
|
|
||||||
a = int(input("Min: "))
|
|
||||||
b = int(input("Max: "))
|
|
||||||
|
|
||||||
print("now type in the number")
|
|
||||||
c = int(input(" "))
|
|
||||||
tries = 1;
|
|
||||||
if(a > b):
|
|
||||||
print("error, min can't be more than max. ")
|
|
||||||
a = int(input("Min: "))
|
|
||||||
b = int(input("Max: "))
|
|
||||||
print("now type in the number")
|
|
||||||
c = int(input(" "))
|
|
||||||
else:
|
|
||||||
d = random.randint(a, b)
|
|
||||||
else:
|
|
||||||
break;
|
|
||||||
elif(d < c):
|
|
||||||
a = d + 1;
|
|
||||||
d = random.randint(a, b)
|
|
||||||
print( "guess " + str(tries) + " :" + str(d));
|
|
||||||
tries += 1;
|
|
||||||
|
|
||||||
elif(d > c):
|
|
||||||
b = d - 1;
|
|
||||||
d = random.randint(a, b)
|
|
||||||
print( "guess " + str(tries) + " :" + str(d))
|
|
||||||
tries += 1
|
|
||||||
|
|
||||||
input=""
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
This is a simulation of a computer trying to guess a number, it works with any number of zeroes, furthest i got was 13000 zeroes, so have fun . :)
|
|
|
@ -1 +0,0 @@
|
||||||
no requirements, just have python installed. :)
|
|
|
@ -1,42 +0,0 @@
|
||||||
import psutil
|
|
||||||
import time
|
|
||||||
import pyttsx3
|
|
||||||
from win10toast import ToastNotifier # also need to install win32api
|
|
||||||
import threading
|
|
||||||
|
|
||||||
toaster = ToastNotifier()
|
|
||||||
x=pyttsx3.init()
|
|
||||||
x.setProperty('rate',110)
|
|
||||||
x.setProperty('volume',3)
|
|
||||||
count = 0
|
|
||||||
|
|
||||||
def show_notification(show_text):
|
|
||||||
toaster.show_toast(show_text,
|
|
||||||
icon_path='battery_indicator.ico',
|
|
||||||
duration=10)
|
|
||||||
# loop the toaster over some period of time
|
|
||||||
while toaster.notification_active():
|
|
||||||
time.sleep(0.005)
|
|
||||||
|
|
||||||
def monitor():
|
|
||||||
while (True):
|
|
||||||
time.sleep(1)
|
|
||||||
battery = psutil.sensors_battery()
|
|
||||||
plugged = battery.power_plugged
|
|
||||||
percent = int(battery.percent)
|
|
||||||
|
|
||||||
if percent < 35:
|
|
||||||
if plugged == False:
|
|
||||||
processThread = threading.Thread(target=show_notification, args=("Your Battery at "+str(percent)+"% Please plug the cable",)) # <- note extra ','
|
|
||||||
processThread.start()
|
|
||||||
x.say("Your battery is getting low so charge it right now")
|
|
||||||
x.runAndWait()
|
|
||||||
|
|
||||||
elif percent >= 98:
|
|
||||||
if plugged == True:
|
|
||||||
processThread = threading.Thread(target=show_notification, args=("Charging is getting complete",)) # <- note extra ','
|
|
||||||
processThread.start()
|
|
||||||
x.say("Charging is getting complete")
|
|
||||||
x.runAndWait()
|
|
||||||
if __name__ == "__main__":
|
|
||||||
monitor()
|
|
|
@ -1,11 +0,0 @@
|
||||||
Here is this python3 code to get a notification/battery alert when the battery is low (35%)and while charging it is 98% it will give notification till you didn't plug-in when it is low(35%) and out when it is 98% for a Windows laptop.Install some Python library by writing some pip code in terminal.
|
|
||||||
|
|
||||||
```
|
|
||||||
pip install psutil
|
|
||||||
|
|
||||||
pip install pyttsx3
|
|
||||||
|
|
||||||
pip install win10toast
|
|
||||||
```
|
|
||||||
than run the file.
|
|
||||||
using ```python``` for windows and ```python3``` for linux and follow up ```Battery_notification.py```
|
|
|
@ -1,13 +0,0 @@
|
||||||
## CSV to Excel
|
|
||||||
|
|
||||||
This programme writes the data in any Comma-separated value file (such as: .csv or .data) to a Excel file.
|
|
||||||
|
|
||||||
## Requirements
|
|
||||||
|
|
||||||
Install the required libraries:
|
|
||||||
|
|
||||||
$ pip install -r requirements.txt
|
|
||||||
|
|
||||||
After that run with:
|
|
||||||
|
|
||||||
$ python main.py
|
|
|
@ -1,396 +0,0 @@
|
||||||
school;sex;age;address;famsize;Pstatus;Medu;Fedu;Mjob;Fjob;reason;guardian;traveltime;studytime;failures;schoolsup;famsup;paid;activities;nursery;higher;internet;romantic;famrel;freetime;goout;Dalc;Walc;health;absences;G1;G2;G3
|
|
||||||
"GP";"F";18;"U";"GT3";"A";4;4;"at_home";"teacher";"course";"mother";2;2;0;"yes";"no";"no";"no";"yes";"yes";"no";"no";4;3;4;1;1;3;6;"5";"6";6
|
|
||||||
"GP";"F";17;"U";"GT3";"T";1;1;"at_home";"other";"course";"father";1;2;0;"no";"yes";"no";"no";"no";"yes";"yes";"no";5;3;3;1;1;3;4;"5";"5";6
|
|
||||||
"GP";"F";15;"U";"LE3";"T";1;1;"at_home";"other";"other";"mother";1;2;3;"yes";"no";"yes";"no";"yes";"yes";"yes";"no";4;3;2;2;3;3;10;"7";"8";10
|
|
||||||
"GP";"F";15;"U";"GT3";"T";4;2;"health";"services";"home";"mother";1;3;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"yes";3;2;2;1;1;5;2;"15";"14";15
|
|
||||||
"GP";"F";16;"U";"GT3";"T";3;3;"other";"other";"home";"father";1;2;0;"no";"yes";"yes";"no";"yes";"yes";"no";"no";4;3;2;1;2;5;4;"6";"10";10
|
|
||||||
"GP";"M";16;"U";"LE3";"T";4;3;"services";"other";"reputation";"mother";1;2;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";5;4;2;1;2;5;10;"15";"15";15
|
|
||||||
"GP";"M";16;"U";"LE3";"T";2;2;"other";"other";"home";"mother";1;2;0;"no";"no";"no";"no";"yes";"yes";"yes";"no";4;4;4;1;1;3;0;"12";"12";11
|
|
||||||
"GP";"F";17;"U";"GT3";"A";4;4;"other";"teacher";"home";"mother";2;2;0;"yes";"yes";"no";"no";"yes";"yes";"no";"no";4;1;4;1;1;1;6;"6";"5";6
|
|
||||||
"GP";"M";15;"U";"LE3";"A";3;2;"services";"other";"home";"mother";1;2;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"no";4;2;2;1;1;1;0;"16";"18";19
|
|
||||||
"GP";"M";15;"U";"GT3";"T";3;4;"other";"other";"home";"mother";1;2;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";5;5;1;1;1;5;0;"14";"15";15
|
|
||||||
"GP";"F";15;"U";"GT3";"T";4;4;"teacher";"health";"reputation";"mother";1;2;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"no";3;3;3;1;2;2;0;"10";"8";9
|
|
||||||
"GP";"F";15;"U";"GT3";"T";2;1;"services";"other";"reputation";"father";3;3;0;"no";"yes";"no";"yes";"yes";"yes";"yes";"no";5;2;2;1;1;4;4;"10";"12";12
|
|
||||||
"GP";"M";15;"U";"LE3";"T";4;4;"health";"services";"course";"father";1;1;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";4;3;3;1;3;5;2;"14";"14";14
|
|
||||||
"GP";"M";15;"U";"GT3";"T";4;3;"teacher";"other";"course";"mother";2;2;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"no";5;4;3;1;2;3;2;"10";"10";11
|
|
||||||
"GP";"M";15;"U";"GT3";"A";2;2;"other";"other";"home";"other";1;3;0;"no";"yes";"no";"no";"yes";"yes";"yes";"yes";4;5;2;1;1;3;0;"14";"16";16
|
|
||||||
"GP";"F";16;"U";"GT3";"T";4;4;"health";"other";"home";"mother";1;1;0;"no";"yes";"no";"no";"yes";"yes";"yes";"no";4;4;4;1;2;2;4;"14";"14";14
|
|
||||||
"GP";"F";16;"U";"GT3";"T";4;4;"services";"services";"reputation";"mother";1;3;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";3;2;3;1;2;2;6;"13";"14";14
|
|
||||||
"GP";"F";16;"U";"GT3";"T";3;3;"other";"other";"reputation";"mother";3;2;0;"yes";"yes";"no";"yes";"yes";"yes";"no";"no";5;3;2;1;1;4;4;"8";"10";10
|
|
||||||
"GP";"M";17;"U";"GT3";"T";3;2;"services";"services";"course";"mother";1;1;3;"no";"yes";"no";"yes";"yes";"yes";"yes";"no";5;5;5;2;4;5;16;"6";"5";5
|
|
||||||
"GP";"M";16;"U";"LE3";"T";4;3;"health";"other";"home";"father";1;1;0;"no";"no";"yes";"yes";"yes";"yes";"yes";"no";3;1;3;1;3;5;4;"8";"10";10
|
|
||||||
"GP";"M";15;"U";"GT3";"T";4;3;"teacher";"other";"reputation";"mother";1;2;0;"no";"no";"no";"no";"yes";"yes";"yes";"no";4;4;1;1;1;1;0;"13";"14";15
|
|
||||||
"GP";"M";15;"U";"GT3";"T";4;4;"health";"health";"other";"father";1;1;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"no";5;4;2;1;1;5;0;"12";"15";15
|
|
||||||
"GP";"M";16;"U";"LE3";"T";4;2;"teacher";"other";"course";"mother";1;2;0;"no";"no";"no";"yes";"yes";"yes";"yes";"no";4;5;1;1;3;5;2;"15";"15";16
|
|
||||||
"GP";"M";16;"U";"LE3";"T";2;2;"other";"other";"reputation";"mother";2;2;0;"no";"yes";"no";"yes";"yes";"yes";"yes";"no";5;4;4;2;4;5;0;"13";"13";12
|
|
||||||
"GP";"F";15;"R";"GT3";"T";2;4;"services";"health";"course";"mother";1;3;0;"yes";"yes";"yes";"yes";"yes";"yes";"yes";"no";4;3;2;1;1;5;2;"10";"9";8
|
|
||||||
"GP";"F";16;"U";"GT3";"T";2;2;"services";"services";"home";"mother";1;1;2;"no";"yes";"yes";"no";"no";"yes";"yes";"no";1;2;2;1;3;5;14;"6";"9";8
|
|
||||||
"GP";"M";15;"U";"GT3";"T";2;2;"other";"other";"home";"mother";1;1;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"no";4;2;2;1;2;5;2;"12";"12";11
|
|
||||||
"GP";"M";15;"U";"GT3";"T";4;2;"health";"services";"other";"mother";1;1;0;"no";"no";"yes";"no";"yes";"yes";"yes";"no";2;2;4;2;4;1;4;"15";"16";15
|
|
||||||
"GP";"M";16;"U";"LE3";"A";3;4;"services";"other";"home";"mother";1;2;0;"yes";"yes";"no";"yes";"yes";"yes";"yes";"no";5;3;3;1;1;5;4;"11";"11";11
|
|
||||||
"GP";"M";16;"U";"GT3";"T";4;4;"teacher";"teacher";"home";"mother";1;2;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"yes";4;4;5;5;5;5;16;"10";"12";11
|
|
||||||
"GP";"M";15;"U";"GT3";"T";4;4;"health";"services";"home";"mother";1;2;0;"no";"yes";"yes";"no";"no";"yes";"yes";"no";5;4;2;3;4;5;0;"9";"11";12
|
|
||||||
"GP";"M";15;"U";"GT3";"T";4;4;"services";"services";"reputation";"mother";2;2;0;"no";"yes";"no";"yes";"yes";"yes";"yes";"no";4;3;1;1;1;5;0;"17";"16";17
|
|
||||||
"GP";"M";15;"R";"GT3";"T";4;3;"teacher";"at_home";"course";"mother";1;2;0;"no";"yes";"no";"yes";"yes";"yes";"yes";"yes";4;5;2;1;1;5;0;"17";"16";16
|
|
||||||
"GP";"M";15;"U";"LE3";"T";3;3;"other";"other";"course";"mother";1;2;0;"no";"no";"no";"yes";"no";"yes";"yes";"no";5;3;2;1;1;2;0;"8";"10";12
|
|
||||||
"GP";"M";16;"U";"GT3";"T";3;2;"other";"other";"home";"mother";1;1;0;"no";"yes";"yes";"no";"no";"yes";"yes";"no";5;4;3;1;1;5;0;"12";"14";15
|
|
||||||
"GP";"F";15;"U";"GT3";"T";2;3;"other";"other";"other";"father";2;1;0;"no";"yes";"no";"yes";"yes";"yes";"no";"no";3;5;1;1;1;5;0;"8";"7";6
|
|
||||||
"GP";"M";15;"U";"LE3";"T";4;3;"teacher";"services";"home";"mother";1;3;0;"no";"yes";"no";"yes";"yes";"yes";"yes";"no";5;4;3;1;1;4;2;"15";"16";18
|
|
||||||
"GP";"M";16;"R";"GT3";"A";4;4;"other";"teacher";"reputation";"mother";2;3;0;"no";"yes";"no";"yes";"yes";"yes";"yes";"yes";2;4;3;1;1;5;7;"15";"16";15
|
|
||||||
"GP";"F";15;"R";"GT3";"T";3;4;"services";"health";"course";"mother";1;3;0;"yes";"yes";"yes";"yes";"yes";"yes";"yes";"no";4;3;2;1;1;5;2;"12";"12";11
|
|
||||||
"GP";"F";15;"R";"GT3";"T";2;2;"at_home";"other";"reputation";"mother";1;1;0;"yes";"yes";"yes";"yes";"yes";"yes";"no";"no";4;3;1;1;1;2;8;"14";"13";13
|
|
||||||
"GP";"F";16;"U";"LE3";"T";2;2;"other";"other";"home";"mother";2;2;1;"no";"yes";"no";"yes";"no";"yes";"yes";"yes";3;3;3;1;2;3;25;"7";"10";11
|
|
||||||
"GP";"M";15;"U";"LE3";"T";4;4;"teacher";"other";"home";"other";1;1;0;"no";"yes";"no";"no";"no";"yes";"yes";"yes";5;4;3;2;4;5;8;"12";"12";12
|
|
||||||
"GP";"M";15;"U";"GT3";"T";4;4;"services";"teacher";"course";"father";1;2;0;"no";"yes";"no";"yes";"yes";"yes";"yes";"no";4;3;3;1;1;5;2;"19";"18";18
|
|
||||||
"GP";"M";15;"U";"GT3";"T";2;2;"services";"services";"course";"father";1;1;0;"yes";"yes";"no";"no";"yes";"yes";"yes";"no";5;4;1;1;1;1;0;"8";"8";11
|
|
||||||
"GP";"F";16;"U";"LE3";"T";2;2;"other";"at_home";"course";"father";2;2;1;"yes";"no";"no";"yes";"yes";"yes";"yes";"no";4;3;3;2;2;5;14;"10";"10";9
|
|
||||||
"GP";"F";15;"U";"LE3";"A";4;3;"other";"other";"course";"mother";1;2;0;"yes";"yes";"yes";"yes";"yes";"yes";"yes";"yes";5;2;2;1;1;5;8;"8";"8";6
|
|
||||||
"GP";"F";16;"U";"LE3";"A";3;3;"other";"services";"home";"mother";1;2;0;"no";"yes";"no";"no";"yes";"yes";"yes";"no";2;3;5;1;4;3;12;"11";"12";11
|
|
||||||
"GP";"M";16;"U";"GT3";"T";4;3;"health";"services";"reputation";"mother";1;4;0;"no";"no";"no";"yes";"yes";"yes";"yes";"no";4;2;2;1;1;2;4;"19";"19";20
|
|
||||||
"GP";"M";15;"U";"GT3";"T";4;2;"teacher";"other";"home";"mother";1;2;0;"no";"yes";"yes";"no";"yes";"yes";"no";"no";4;3;3;2;2;5;2;"15";"15";14
|
|
||||||
"GP";"F";15;"U";"GT3";"T";4;4;"services";"teacher";"other";"father";1;2;1;"yes";"yes";"no";"yes";"no";"yes";"yes";"no";4;4;4;1;1;3;2;"7";"7";7
|
|
||||||
"GP";"F";16;"U";"LE3";"T";2;2;"services";"services";"course";"mother";3;2;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"no";4;3;3;2;3;4;2;"12";"13";13
|
|
||||||
"GP";"F";15;"U";"LE3";"T";4;2;"health";"other";"other";"mother";1;2;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"no";4;3;3;1;1;5;2;"11";"13";13
|
|
||||||
"GP";"M";15;"U";"LE3";"A";4;2;"health";"health";"other";"father";2;1;1;"no";"no";"no";"no";"yes";"yes";"no";"no";5;5;5;3;4;5;6;"11";"11";10
|
|
||||||
"GP";"F";15;"U";"GT3";"T";4;4;"services";"services";"course";"mother";1;1;0;"yes";"yes";"yes";"no";"yes";"yes";"yes";"no";3;3;4;2;3;5;0;"8";"10";11
|
|
||||||
"GP";"F";15;"U";"LE3";"A";3;3;"other";"other";"other";"mother";1;1;0;"no";"no";"yes";"no";"yes";"yes";"yes";"no";5;3;4;4;4;1;6;"10";"13";13
|
|
||||||
"GP";"F";16;"U";"GT3";"A";2;1;"other";"other";"other";"mother";1;2;0;"no";"no";"yes";"yes";"yes";"yes";"yes";"yes";5;3;4;1;1;2;8;"8";"9";10
|
|
||||||
"GP";"F";15;"U";"GT3";"A";4;3;"services";"services";"reputation";"mother";1;2;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";4;3;2;1;1;1;0;"14";"15";15
|
|
||||||
"GP";"M";15;"U";"GT3";"T";4;4;"teacher";"health";"reputation";"mother";1;2;0;"no";"yes";"no";"yes";"yes";"yes";"no";"no";3;2;2;1;1;5;4;"14";"15";15
|
|
||||||
"GP";"M";15;"U";"LE3";"T";1;2;"other";"at_home";"home";"father";1;2;0;"yes";"yes";"no";"yes";"yes";"yes";"yes";"no";4;3;2;1;1;5;2;"9";"10";9
|
|
||||||
"GP";"F";16;"U";"GT3";"T";4;2;"services";"other";"course";"mother";1;2;0;"no";"yes";"no";"no";"yes";"yes";"yes";"no";4;2;3;1;1;5;2;"15";"16";16
|
|
||||||
"GP";"F";16;"R";"GT3";"T";4;4;"health";"teacher";"other";"mother";1;2;0;"no";"yes";"no";"yes";"yes";"yes";"no";"no";2;4;4;2;3;4;6;"10";"11";11
|
|
||||||
"GP";"F";16;"U";"GT3";"T";1;1;"services";"services";"course";"father";4;1;0;"yes";"yes";"no";"yes";"no";"yes";"yes";"yes";5;5;5;5;5;5;6;"10";"8";11
|
|
||||||
"GP";"F";16;"U";"LE3";"T";1;2;"other";"services";"reputation";"father";1;2;0;"yes";"no";"no";"yes";"yes";"yes";"yes";"no";4;4;3;1;1;1;4;"8";"10";9
|
|
||||||
"GP";"F";16;"U";"GT3";"T";4;3;"teacher";"health";"home";"mother";1;3;0;"yes";"yes";"yes";"yes";"yes";"yes";"yes";"no";3;4;4;2;4;4;2;"10";"9";9
|
|
||||||
"GP";"F";15;"U";"LE3";"T";4;3;"services";"services";"reputation";"father";1;2;0;"yes";"no";"no";"yes";"yes";"yes";"yes";"yes";4;4;4;2;4;2;0;"10";"10";10
|
|
||||||
"GP";"F";16;"U";"LE3";"T";4;3;"teacher";"services";"course";"mother";3;2;0;"no";"yes";"no";"yes";"yes";"yes";"yes";"no";5;4;3;1;2;1;2;"16";"15";15
|
|
||||||
"GP";"M";15;"U";"GT3";"A";4;4;"other";"services";"reputation";"mother";1;4;0;"no";"yes";"no";"yes";"no";"yes";"yes";"yes";1;3;3;5;5;3;4;"13";"13";12
|
|
||||||
"GP";"F";16;"U";"GT3";"T";3;1;"services";"other";"course";"mother";1;4;0;"yes";"yes";"yes";"no";"yes";"yes";"yes";"no";4;3;3;1;2;5;4;"7";"7";6
|
|
||||||
"GP";"F";15;"R";"LE3";"T";2;2;"health";"services";"reputation";"mother";2;2;0;"yes";"yes";"yes";"no";"yes";"yes";"yes";"no";4;1;3;1;3;4;2;"8";"9";8
|
|
||||||
"GP";"F";15;"R";"LE3";"T";3;1;"other";"other";"reputation";"father";2;4;0;"no";"yes";"no";"no";"no";"yes";"yes";"no";4;4;2;2;3;3;12;"16";"16";16
|
|
||||||
"GP";"M";16;"U";"GT3";"T";3;1;"other";"other";"reputation";"father";2;4;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"no";4;3;2;1;1;5;0;"13";"15";15
|
|
||||||
"GP";"M";15;"U";"GT3";"T";4;2;"other";"other";"course";"mother";1;4;0;"no";"no";"no";"no";"yes";"yes";"yes";"no";3;3;3;1;1;3;0;"10";"10";10
|
|
||||||
"GP";"F";15;"R";"GT3";"T";1;1;"other";"other";"reputation";"mother";1;2;2;"yes";"yes";"no";"no";"no";"yes";"yes";"yes";3;3;4;2;4;5;2;"8";"6";5
|
|
||||||
"GP";"M";16;"U";"GT3";"T";3;1;"other";"other";"reputation";"mother";1;1;0;"no";"no";"no";"yes";"yes";"yes";"no";"no";5;3;2;2;2;5;2;"12";"12";14
|
|
||||||
"GP";"F";16;"U";"GT3";"T";3;3;"other";"services";"home";"mother";1;2;0;"yes";"yes";"yes";"yes";"yes";"yes";"yes";"no";4;3;3;2;4;5;54;"11";"12";11
|
|
||||||
"GP";"M";15;"U";"GT3";"T";4;3;"teacher";"other";"home";"mother";1;2;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";4;3;3;2;3;5;6;"9";"9";10
|
|
||||||
"GP";"M";15;"U";"GT3";"T";4;0;"teacher";"other";"course";"mother";2;4;0;"no";"no";"no";"yes";"yes";"yes";"yes";"no";3;4;3;1;1;1;8;"11";"11";10
|
|
||||||
"GP";"F";16;"U";"GT3";"T";2;2;"other";"other";"reputation";"mother";1;4;0;"no";"no";"yes";"no";"yes";"yes";"yes";"yes";5;2;3;1;3;3;0;"11";"11";11
|
|
||||||
"GP";"M";17;"U";"GT3";"T";2;1;"other";"other";"home";"mother";2;1;3;"yes";"yes";"no";"yes";"yes";"no";"yes";"no";4;5;1;1;1;3;2;"8";"8";10
|
|
||||||
"GP";"F";16;"U";"GT3";"T";3;4;"at_home";"other";"course";"mother";1;2;0;"no";"yes";"no";"no";"yes";"yes";"yes";"no";2;4;3;1;2;3;12;"5";"5";5
|
|
||||||
"GP";"M";15;"U";"GT3";"T";2;3;"other";"services";"course";"father";1;1;0;"yes";"yes";"yes";"yes";"no";"yes";"yes";"yes";3;2;2;1;3;3;2;"10";"12";12
|
|
||||||
"GP";"M";15;"U";"GT3";"T";2;3;"other";"other";"home";"mother";1;3;0;"yes";"no";"yes";"no";"no";"yes";"yes";"no";5;3;2;1;2;5;4;"11";"10";11
|
|
||||||
"GP";"F";15;"U";"LE3";"T";3;2;"services";"other";"reputation";"mother";1;2;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"no";4;4;4;1;1;5;10;"7";"6";6
|
|
||||||
"GP";"M";15;"U";"LE3";"T";2;2;"services";"services";"home";"mother";2;2;0;"no";"no";"yes";"yes";"yes";"yes";"yes";"no";5;3;3;1;3;4;4;"15";"15";15
|
|
||||||
"GP";"F";15;"U";"GT3";"T";1;1;"other";"other";"home";"father";1;2;0;"no";"yes";"no";"yes";"no";"yes";"yes";"no";4;3;2;2;3;4;2;"9";"10";10
|
|
||||||
"GP";"F";15;"U";"GT3";"T";4;4;"services";"services";"reputation";"father";2;2;2;"no";"no";"yes";"no";"yes";"yes";"yes";"yes";4;4;4;2;3;5;6;"7";"9";8
|
|
||||||
"GP";"F";16;"U";"LE3";"T";2;2;"at_home";"other";"course";"mother";1;2;0;"no";"yes";"no";"no";"yes";"yes";"no";"no";4;3;4;1;2;2;4;"8";"7";6
|
|
||||||
"GP";"F";15;"U";"GT3";"T";4;2;"other";"other";"reputation";"mother";1;3;0;"no";"yes";"no";"yes";"yes";"yes";"yes";"no";5;3;3;1;3;1;4;"13";"14";14
|
|
||||||
"GP";"M";16;"U";"GT3";"T";2;2;"services";"other";"reputation";"father";2;2;1;"no";"no";"yes";"yes";"no";"yes";"yes";"no";4;4;2;1;1;3;12;"11";"10";10
|
|
||||||
"GP";"M";16;"U";"LE3";"A";4;4;"teacher";"health";"reputation";"mother";1;2;0;"no";"yes";"no";"no";"yes";"yes";"no";"no";4;1;3;3;5;5;18;"8";"6";7
|
|
||||||
"GP";"F";16;"U";"GT3";"T";3;3;"other";"other";"home";"mother";1;3;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"yes";4;3;3;1;3;4;0;"7";"7";8
|
|
||||||
"GP";"F";15;"U";"GT3";"T";4;3;"services";"other";"reputation";"mother";1;1;0;"no";"no";"yes";"yes";"yes";"yes";"yes";"no";4;5;5;1;3;1;4;"16";"17";18
|
|
||||||
"GP";"F";16;"U";"LE3";"T";3;1;"other";"other";"home";"father";1;2;0;"yes";"yes";"no";"no";"yes";"yes";"no";"no";3;3;3;2;3;2;4;"7";"6";6
|
|
||||||
"GP";"F";16;"U";"GT3";"T";4;2;"teacher";"services";"home";"mother";2;2;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";5;3;3;1;1;1;0;"11";"10";10
|
|
||||||
"GP";"M";15;"U";"LE3";"T";2;2;"services";"health";"reputation";"mother";1;4;0;"no";"yes";"no";"yes";"yes";"yes";"yes";"no";4;3;4;1;1;4;6;"11";"13";14
|
|
||||||
"GP";"F";15;"R";"GT3";"T";1;1;"at_home";"other";"home";"mother";2;4;1;"yes";"yes";"yes";"yes";"yes";"yes";"yes";"no";3;1;2;1;1;1;2;"7";"10";10
|
|
||||||
"GP";"M";16;"R";"GT3";"T";4;3;"services";"other";"reputation";"mother";2;1;0;"yes";"yes";"no";"yes";"no";"yes";"yes";"no";3;3;3;1;1;4;2;"11";"15";15
|
|
||||||
"GP";"F";16;"U";"GT3";"T";2;1;"other";"other";"course";"mother";1;2;0;"no";"yes";"yes";"no";"yes";"yes";"no";"yes";4;3;5;1;1;5;2;"8";"9";10
|
|
||||||
"GP";"F";16;"U";"GT3";"T";4;4;"other";"other";"reputation";"mother";1;1;0;"no";"no";"no";"yes";"no";"yes";"yes";"no";5;3;4;1;2;1;6;"11";"14";14
|
|
||||||
"GP";"F";16;"U";"GT3";"T";4;3;"other";"at_home";"course";"mother";1;3;0;"yes";"yes";"yes";"no";"yes";"yes";"yes";"no";5;3;5;1;1;3;0;"7";"9";8
|
|
||||||
"GP";"M";16;"U";"GT3";"T";4;4;"services";"services";"other";"mother";1;1;0;"yes";"yes";"yes";"yes";"yes";"yes";"yes";"no";4;5;5;5;5;4;14;"7";"7";5
|
|
||||||
"GP";"M";16;"U";"GT3";"T";4;4;"services";"teacher";"other";"father";1;3;0;"no";"yes";"no";"yes";"yes";"yes";"yes";"yes";4;4;3;1;1;4;0;"16";"17";17
|
|
||||||
"GP";"M";15;"U";"GT3";"T";4;4;"services";"other";"course";"mother";1;1;0;"no";"yes";"no";"yes";"no";"yes";"yes";"no";5;3;3;1;1;5;4;"10";"13";14
|
|
||||||
"GP";"F";15;"U";"GT3";"T";3;2;"services";"other";"home";"mother";2;2;0;"yes";"yes";"yes";"no";"yes";"yes";"yes";"no";4;3;5;1;1;2;26;"7";"6";6
|
|
||||||
"GP";"M";15;"U";"GT3";"A";3;4;"services";"other";"course";"mother";1;2;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";5;4;4;1;1;1;0;"16";"18";18
|
|
||||||
"GP";"F";15;"U";"GT3";"A";3;3;"other";"health";"reputation";"father";1;4;0;"yes";"no";"no";"no";"yes";"yes";"no";"no";4;3;3;1;1;4;10;"10";"11";11
|
|
||||||
"GP";"F";15;"U";"GT3";"T";2;2;"other";"other";"course";"mother";1;4;0;"yes";"yes";"yes";"no";"yes";"yes";"yes";"no";5;1;2;1;1;3;8;"7";"8";8
|
|
||||||
"GP";"M";16;"U";"GT3";"T";3;3;"services";"other";"home";"father";1;3;0;"no";"yes";"no";"yes";"yes";"yes";"yes";"no";5;3;3;1;1;5;2;"16";"18";18
|
|
||||||
"GP";"M";15;"R";"GT3";"T";4;4;"other";"other";"home";"father";4;4;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"yes";1;3;5;3;5;1;6;"10";"13";13
|
|
||||||
"GP";"F";16;"U";"LE3";"T";4;4;"health";"health";"other";"mother";1;3;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"yes";5;4;5;1;1;4;4;"14";"15";16
|
|
||||||
"GP";"M";15;"U";"LE3";"A";4;4;"teacher";"teacher";"course";"mother";1;1;0;"no";"no";"no";"yes";"yes";"yes";"yes";"no";5;5;3;1;1;4;6;"18";"19";19
|
|
||||||
"GP";"F";16;"R";"GT3";"T";3;3;"services";"other";"reputation";"father";1;3;1;"yes";"yes";"no";"yes";"yes";"yes";"yes";"no";4;1;2;1;1;2;0;"7";"10";10
|
|
||||||
"GP";"F";16;"U";"GT3";"T";2;2;"at_home";"other";"home";"mother";1;2;1;"yes";"no";"no";"yes";"yes";"yes";"yes";"no";3;1;2;1;1;5;6;"10";"13";13
|
|
||||||
"GP";"M";15;"U";"LE3";"T";4;2;"teacher";"other";"course";"mother";1;1;0;"no";"no";"no";"no";"yes";"yes";"yes";"no";3;5;2;1;1;3;10;"18";"19";19
|
|
||||||
"GP";"M";15;"R";"GT3";"T";2;1;"health";"services";"reputation";"mother";1;2;0;"no";"no";"no";"yes";"yes";"yes";"yes";"yes";5;4;2;1;1;5;8;"9";"9";9
|
|
||||||
"GP";"M";16;"U";"GT3";"T";4;4;"teacher";"teacher";"course";"father";1;2;0;"no";"yes";"no";"yes";"yes";"yes";"yes";"no";5;4;4;1;2;5;2;"15";"15";16
|
|
||||||
"GP";"M";15;"U";"GT3";"T";4;4;"other";"teacher";"reputation";"father";2;2;0;"no";"yes";"no";"yes";"yes";"yes";"no";"no";4;4;3;1;1;2;2;"11";"13";14
|
|
||||||
"GP";"M";16;"U";"GT3";"T";3;3;"other";"services";"home";"father";2;1;0;"no";"no";"no";"yes";"yes";"yes";"yes";"no";5;4;2;1;1;5;0;"13";"14";13
|
|
||||||
"GP";"M";17;"R";"GT3";"T";1;3;"other";"other";"course";"father";3;2;1;"no";"yes";"no";"yes";"yes";"yes";"yes";"no";5;2;4;1;4;5;20;"9";"7";8
|
|
||||||
"GP";"M";15;"U";"GT3";"T";3;4;"other";"other";"reputation";"father";1;1;0;"no";"no";"no";"no";"yes";"yes";"yes";"no";3;4;3;1;2;4;6;"14";"13";13
|
|
||||||
"GP";"F";15;"U";"GT3";"T";1;2;"at_home";"services";"course";"mother";1;2;0;"no";"no";"no";"no";"no";"yes";"yes";"no";3;2;3;1;2;1;2;"16";"15";15
|
|
||||||
"GP";"M";15;"U";"GT3";"T";2;2;"services";"services";"home";"father";1;4;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";5;5;4;1;2;5;6;"16";"14";15
|
|
||||||
"GP";"F";16;"U";"LE3";"T";2;4;"other";"health";"course";"father";2;2;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"yes";4;2;2;1;2;5;2;"13";"13";13
|
|
||||||
"GP";"M";16;"U";"GT3";"T";4;4;"health";"other";"course";"mother";1;1;0;"no";"yes";"no";"yes";"yes";"yes";"yes";"no";3;4;4;1;4;5;18;"14";"11";13
|
|
||||||
"GP";"F";16;"U";"GT3";"T";2;2;"other";"other";"home";"mother";1;2;0;"no";"no";"yes";"no";"yes";"yes";"yes";"yes";5;4;4;1;1;5;0;"8";"7";8
|
|
||||||
"GP";"M";15;"U";"GT3";"T";3;4;"services";"services";"home";"father";1;1;0;"yes";"no";"no";"no";"yes";"yes";"yes";"no";5;5;5;3;2;5;0;"13";"13";12
|
|
||||||
"GP";"F";15;"U";"LE3";"A";3;4;"other";"other";"home";"mother";1;2;0;"yes";"no";"no";"yes";"yes";"yes";"yes";"yes";5;3;2;1;1;1;0;"7";"10";11
|
|
||||||
"GP";"F";19;"U";"GT3";"T";0;1;"at_home";"other";"course";"other";1;2;3;"no";"yes";"no";"no";"no";"no";"no";"no";3;4;2;1;1;5;2;"7";"8";9
|
|
||||||
"GP";"M";18;"R";"GT3";"T";2;2;"services";"other";"reputation";"mother";1;1;2;"no";"yes";"no";"yes";"yes";"yes";"yes";"no";3;3;3;1;2;4;0;"7";"4";0
|
|
||||||
"GP";"M";16;"R";"GT3";"T";4;4;"teacher";"teacher";"course";"mother";1;1;0;"no";"no";"yes";"yes";"yes";"yes";"yes";"no";3;5;5;2;5;4;8;"18";"18";18
|
|
||||||
"GP";"F";15;"R";"GT3";"T";3;4;"services";"teacher";"course";"father";2;3;2;"no";"yes";"no";"no";"yes";"yes";"yes";"yes";4;2;2;2;2;5;0;"12";"0";0
|
|
||||||
"GP";"F";15;"U";"GT3";"T";1;1;"at_home";"other";"course";"mother";3;1;0;"no";"yes";"no";"yes";"no";"yes";"yes";"yes";4;3;3;1;2;4;0;"8";"0";0
|
|
||||||
"GP";"F";17;"U";"LE3";"T";2;2;"other";"other";"course";"father";1;1;0;"no";"yes";"no";"no";"yes";"yes";"yes";"yes";3;4;4;1;3;5;12;"10";"13";12
|
|
||||||
"GP";"F";16;"U";"GT3";"A";3;4;"services";"other";"course";"father";1;1;0;"no";"no";"no";"no";"yes";"yes";"yes";"no";3;2;1;1;4;5;16;"12";"11";11
|
|
||||||
"GP";"M";15;"R";"GT3";"T";3;4;"at_home";"teacher";"course";"mother";4;2;0;"no";"yes";"no";"no";"yes";"yes";"no";"yes";5;3;3;1;1;5;0;"9";"0";0
|
|
||||||
"GP";"F";15;"U";"GT3";"T";4;4;"services";"at_home";"course";"mother";1;3;0;"no";"yes";"no";"yes";"yes";"yes";"yes";"yes";4;3;3;1;1;5;0;"11";"0";0
|
|
||||||
"GP";"M";17;"R";"GT3";"T";3;4;"at_home";"other";"course";"mother";3;2;0;"no";"no";"no";"no";"yes";"yes";"no";"no";5;4;5;2;4;5;0;"10";"0";0
|
|
||||||
"GP";"F";16;"U";"GT3";"A";3;3;"other";"other";"course";"other";2;1;2;"no";"yes";"no";"yes";"no";"yes";"yes";"yes";4;3;2;1;1;5;0;"4";"0";0
|
|
||||||
"GP";"M";16;"U";"LE3";"T";1;1;"services";"other";"course";"mother";1;2;1;"no";"no";"no";"no";"yes";"yes";"no";"yes";4;4;4;1;3;5;0;"14";"12";12
|
|
||||||
"GP";"F";15;"U";"GT3";"T";4;4;"teacher";"teacher";"course";"mother";2;1;0;"no";"no";"no";"yes";"yes";"yes";"yes";"no";4;3;2;1;1;5;0;"16";"16";15
|
|
||||||
"GP";"M";15;"U";"GT3";"T";4;3;"teacher";"services";"course";"father";2;4;0;"yes";"yes";"no";"no";"yes";"yes";"yes";"no";2;2;2;1;1;3;0;"7";"9";0
|
|
||||||
"GP";"M";16;"U";"LE3";"T";2;2;"services";"services";"reputation";"father";2;1;2;"no";"yes";"no";"yes";"yes";"yes";"yes";"no";2;3;3;2;2;2;8;"9";"9";9
|
|
||||||
"GP";"F";15;"U";"GT3";"T";4;4;"teacher";"services";"course";"mother";1;3;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";4;2;2;1;1;5;2;"9";"11";11
|
|
||||||
"GP";"F";16;"U";"LE3";"T";1;1;"at_home";"at_home";"course";"mother";1;1;0;"no";"no";"no";"no";"yes";"yes";"yes";"no";3;4;4;3;3;1;2;"14";"14";13
|
|
||||||
"GP";"M";17;"U";"GT3";"T";2;1;"other";"other";"home";"mother";1;1;3;"no";"yes";"no";"no";"yes";"yes";"yes";"no";5;4;5;1;2;5;0;"5";"0";0
|
|
||||||
"GP";"F";15;"U";"GT3";"T";1;1;"other";"services";"course";"father";1;2;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"no";4;4;2;1;2;5;0;"8";"11";11
|
|
||||||
"GP";"F";15;"U";"GT3";"T";3;2;"health";"services";"home";"father";1;2;3;"no";"yes";"no";"no";"yes";"yes";"yes";"no";3;3;2;1;1;3;0;"6";"7";0
|
|
||||||
"GP";"F";15;"U";"GT3";"T";1;2;"at_home";"other";"course";"mother";1;2;0;"no";"yes";"yes";"no";"no";"yes";"yes";"no";4;3;2;1;1;5;2;"10";"11";11
|
|
||||||
"GP";"M";16;"U";"GT3";"T";4;4;"teacher";"teacher";"course";"mother";1;1;0;"no";"yes";"no";"no";"yes";"no";"yes";"yes";3;3;2;2;1;5;0;"7";"6";0
|
|
||||||
"GP";"M";15;"U";"LE3";"A";2;1;"services";"other";"course";"mother";4;1;3;"no";"no";"no";"no";"yes";"yes";"yes";"no";4;5;5;2;5;5;0;"8";"9";10
|
|
||||||
"GP";"M";18;"U";"LE3";"T";1;1;"other";"other";"course";"mother";1;1;3;"no";"no";"no";"no";"yes";"no";"yes";"yes";2;3;5;2;5;4;0;"6";"5";0
|
|
||||||
"GP";"M";16;"U";"LE3";"T";2;1;"at_home";"other";"course";"mother";1;1;1;"no";"no";"no";"yes";"yes";"yes";"no";"yes";4;4;4;3;5;5;6;"12";"13";14
|
|
||||||
"GP";"F";15;"R";"GT3";"T";3;3;"services";"services";"reputation";"other";2;3;2;"no";"yes";"yes";"yes";"yes";"yes";"yes";"yes";4;2;1;2;3;3;8;"10";"10";10
|
|
||||||
"GP";"M";19;"U";"GT3";"T";3;2;"services";"at_home";"home";"mother";1;1;3;"no";"yes";"no";"no";"yes";"no";"yes";"yes";4;5;4;1;1;4;0;"5";"0";0
|
|
||||||
"GP";"F";17;"U";"GT3";"T";4;4;"other";"teacher";"course";"mother";1;1;0;"yes";"yes";"no";"no";"yes";"yes";"no";"yes";4;2;1;1;1;4;0;"11";"11";12
|
|
||||||
"GP";"M";15;"R";"GT3";"T";2;3;"at_home";"services";"course";"mother";1;2;0;"yes";"no";"yes";"yes";"yes";"yes";"no";"no";4;4;4;1;1;1;2;"11";"8";8
|
|
||||||
"GP";"M";17;"R";"LE3";"T";1;2;"other";"other";"reputation";"mother";1;1;0;"no";"no";"no";"no";"yes";"yes";"no";"no";2;2;2;3;3;5;8;"16";"12";13
|
|
||||||
"GP";"F";18;"R";"GT3";"T";1;1;"at_home";"other";"course";"mother";3;1;3;"no";"yes";"no";"yes";"no";"yes";"no";"no";5;2;5;1;5;4;6;"9";"8";10
|
|
||||||
"GP";"M";16;"R";"GT3";"T";2;2;"at_home";"other";"course";"mother";3;1;0;"no";"no";"no";"no";"no";"yes";"no";"no";4;2;2;1;2;3;2;"17";"15";15
|
|
||||||
"GP";"M";16;"U";"GT3";"T";3;3;"other";"services";"course";"father";1;2;1;"no";"yes";"yes";"no";"yes";"yes";"yes";"yes";4;5;5;4;4;5;4;"10";"12";12
|
|
||||||
"GP";"M";17;"R";"LE3";"T";2;1;"at_home";"other";"course";"mother";2;1;2;"no";"no";"no";"yes";"yes";"no";"yes";"yes";3;3;2;2;2;5;0;"7";"6";0
|
|
||||||
"GP";"M";15;"R";"GT3";"T";3;2;"other";"other";"course";"mother";2;2;2;"yes";"yes";"no";"no";"yes";"yes";"yes";"yes";4;4;4;1;4;3;6;"5";"9";7
|
|
||||||
"GP";"M";16;"U";"LE3";"T";1;2;"other";"other";"course";"mother";2;1;1;"no";"no";"no";"yes";"yes";"yes";"no";"no";4;4;4;2;4;5;0;"7";"0";0
|
|
||||||
"GP";"M";17;"U";"GT3";"T";1;3;"at_home";"services";"course";"father";1;1;0;"no";"no";"no";"no";"yes";"no";"yes";"no";5;3;3;1;4;2;2;"10";"10";10
|
|
||||||
"GP";"M";17;"R";"LE3";"T";1;1;"other";"services";"course";"mother";4;2;3;"no";"no";"no";"yes";"yes";"no";"no";"yes";5;3;5;1;5;5;0;"5";"8";7
|
|
||||||
"GP";"M";16;"U";"GT3";"T";3;2;"services";"services";"course";"mother";2;1;1;"no";"yes";"no";"yes";"no";"no";"no";"no";4;5;2;1;1;2;16;"12";"11";12
|
|
||||||
"GP";"M";16;"U";"GT3";"T";2;2;"other";"other";"course";"father";1;2;0;"no";"no";"no";"no";"yes";"no";"yes";"no";4;3;5;2;4;4;4;"10";"10";10
|
|
||||||
"GP";"F";16;"U";"GT3";"T";4;2;"health";"services";"home";"father";1;2;0;"no";"no";"yes";"no";"yes";"yes";"yes";"yes";4;2;3;1;1;3;0;"14";"15";16
|
|
||||||
"GP";"F";16;"U";"GT3";"T";2;2;"other";"other";"home";"mother";1;2;0;"no";"yes";"yes";"no";"no";"yes";"yes";"no";5;1;5;1;1;4;0;"6";"7";0
|
|
||||||
"GP";"F";16;"U";"GT3";"T";4;4;"health";"health";"reputation";"mother";1;2;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"yes";4;4;2;1;1;3;0;"14";"14";14
|
|
||||||
"GP";"M";16;"U";"GT3";"T";3;4;"other";"other";"course";"father";3;1;2;"no";"yes";"no";"yes";"no";"yes";"yes";"no";3;4;5;2;4;2;0;"6";"5";0
|
|
||||||
"GP";"M";16;"U";"GT3";"T";1;0;"other";"other";"reputation";"mother";2;2;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"yes";4;3;2;1;1;3;2;"13";"15";16
|
|
||||||
"GP";"M";17;"U";"LE3";"T";4;4;"teacher";"other";"reputation";"mother";1;2;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";4;4;4;1;3;5;0;"13";"11";10
|
|
||||||
"GP";"F";16;"U";"GT3";"T";1;3;"at_home";"services";"home";"mother";1;2;3;"no";"no";"no";"yes";"no";"yes";"yes";"yes";4;3;5;1;1;3;0;"8";"7";0
|
|
||||||
"GP";"F";16;"U";"LE3";"T";3;3;"other";"other";"reputation";"mother";2;2;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";4;4;5;1;1;4;4;"10";"11";9
|
|
||||||
"GP";"M";17;"U";"LE3";"T";4;3;"teacher";"other";"course";"mother";2;2;0;"no";"no";"yes";"yes";"yes";"yes";"yes";"no";4;4;4;4;4;4;4;"10";"9";9
|
|
||||||
"GP";"F";16;"U";"GT3";"T";2;2;"services";"other";"reputation";"mother";2;2;0;"no";"no";"yes";"yes";"no";"yes";"yes";"no";3;4;4;1;4;5;2;"13";"13";11
|
|
||||||
"GP";"M";17;"U";"GT3";"T";3;3;"other";"other";"reputation";"father";1;2;0;"no";"no";"no";"yes";"no";"yes";"yes";"no";4;3;4;1;4;4;4;"6";"5";6
|
|
||||||
"GP";"M";16;"R";"GT3";"T";4;2;"teacher";"services";"other";"mother";1;1;0;"no";"yes";"no";"yes";"yes";"yes";"yes";"yes";4;3;3;3;4;3;10;"10";"8";9
|
|
||||||
"GP";"M";17;"U";"GT3";"T";4;3;"other";"other";"course";"mother";1;2;0;"no";"yes";"no";"yes";"yes";"yes";"yes";"yes";5;2;3;1;1;2;4;"10";"10";11
|
|
||||||
"GP";"M";16;"U";"GT3";"T";4;3;"teacher";"other";"home";"mother";1;2;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";3;4;3;2;3;3;10;"9";"8";8
|
|
||||||
"GP";"M";16;"U";"GT3";"T";3;3;"services";"other";"home";"mother";1;2;0;"no";"no";"yes";"yes";"yes";"yes";"yes";"yes";4;2;3;1;2;3;2;"12";"13";12
|
|
||||||
"GP";"F";17;"U";"GT3";"T";2;4;"services";"services";"reputation";"father";1;2;0;"no";"yes";"no";"yes";"yes";"yes";"no";"no";5;4;2;2;3;5;0;"16";"17";17
|
|
||||||
"GP";"F";17;"U";"LE3";"T";3;3;"other";"other";"reputation";"mother";1;2;0;"no";"yes";"no";"yes";"yes";"yes";"yes";"yes";5;3;3;2;3;1;56;"9";"9";8
|
|
||||||
"GP";"F";16;"U";"GT3";"T";3;2;"other";"other";"reputation";"mother";1;2;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"no";1;2;2;1;2;1;14;"12";"13";12
|
|
||||||
"GP";"M";17;"U";"GT3";"T";3;3;"services";"services";"other";"mother";1;2;0;"no";"yes";"no";"yes";"yes";"yes";"yes";"yes";4;3;4;2;3;4;12;"12";"12";11
|
|
||||||
"GP";"M";16;"U";"GT3";"T";1;2;"services";"services";"other";"mother";1;1;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"yes";3;3;3;1;2;3;2;"11";"12";11
|
|
||||||
"GP";"M";16;"U";"LE3";"T";2;1;"other";"other";"course";"mother";1;2;0;"no";"no";"yes";"yes";"yes";"yes";"yes";"yes";4;2;3;1;2;5;0;"15";"15";15
|
|
||||||
"GP";"F";17;"U";"GT3";"A";3;3;"health";"other";"reputation";"mother";1;2;0;"no";"yes";"no";"no";"no";"yes";"yes";"yes";3;3;3;1;3;3;6;"8";"7";9
|
|
||||||
"GP";"M";17;"R";"GT3";"T";1;2;"at_home";"other";"home";"mother";1;2;0;"no";"no";"no";"no";"yes";"yes";"no";"no";3;1;3;1;5;3;4;"8";"9";10
|
|
||||||
"GP";"F";16;"U";"GT3";"T";2;3;"services";"services";"course";"mother";1;2;0;"no";"no";"no";"no";"yes";"yes";"yes";"no";4;3;3;1;1;2;10;"11";"12";13
|
|
||||||
"GP";"F";17;"U";"GT3";"T";1;1;"at_home";"services";"course";"mother";1;2;0;"no";"no";"no";"yes";"yes";"yes";"yes";"no";5;3;3;1;1;3;0;"8";"8";9
|
|
||||||
"GP";"M";17;"U";"GT3";"T";1;2;"at_home";"services";"other";"other";2;2;0;"no";"no";"yes";"yes";"no";"yes";"yes";"no";4;4;4;4;5;5;12;"7";"8";8
|
|
||||||
"GP";"M";16;"R";"GT3";"T";3;3;"services";"services";"reputation";"mother";1;1;0;"no";"yes";"no";"yes";"yes";"yes";"yes";"no";4;3;2;3;4;5;8;"8";"9";10
|
|
||||||
"GP";"M";16;"U";"GT3";"T";2;3;"other";"other";"home";"father";2;1;0;"no";"no";"no";"no";"yes";"yes";"yes";"no";5;3;3;1;1;3;0;"13";"14";14
|
|
||||||
"GP";"F";17;"U";"LE3";"T";2;4;"services";"services";"course";"father";1;2;0;"no";"no";"no";"yes";"yes";"yes";"yes";"yes";4;3;2;1;1;5;0;"14";"15";15
|
|
||||||
"GP";"M";17;"U";"GT3";"T";4;4;"services";"teacher";"home";"mother";1;1;0;"no";"no";"no";"no";"yes";"yes";"yes";"no";5;2;3;1;2;5;4;"17";"15";16
|
|
||||||
"GP";"M";16;"R";"LE3";"T";3;3;"teacher";"other";"home";"father";3;1;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";3;3;4;3;5;3;8;"9";"9";10
|
|
||||||
"GP";"F";17;"U";"GT3";"T";4;4;"services";"teacher";"home";"mother";2;1;1;"no";"yes";"no";"no";"yes";"yes";"yes";"no";4;2;4;2;3;2;24;"18";"18";18
|
|
||||||
"GP";"F";16;"U";"LE3";"T";4;4;"teacher";"teacher";"reputation";"mother";1;2;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"no";4;5;2;1;2;3;0;"9";"9";10
|
|
||||||
"GP";"F";16;"U";"GT3";"T";4;3;"health";"other";"home";"mother";1;2;0;"no";"yes";"no";"yes";"yes";"yes";"yes";"no";4;3;5;1;5;2;2;"16";"16";16
|
|
||||||
"GP";"F";16;"U";"GT3";"T";2;3;"other";"other";"reputation";"mother";1;2;0;"yes";"yes";"yes";"yes";"yes";"yes";"no";"no";4;4;3;1;3;4;6;"8";"10";10
|
|
||||||
"GP";"F";17;"U";"GT3";"T";1;1;"other";"other";"course";"mother";1;2;0;"no";"yes";"yes";"no";"no";"yes";"no";"no";4;4;4;1;3;1;4;"9";"9";10
|
|
||||||
"GP";"F";17;"R";"GT3";"T";2;2;"other";"other";"reputation";"mother";1;1;0;"no";"yes";"no";"no";"yes";"yes";"yes";"no";5;3;2;1;2;3;18;"7";"6";6
|
|
||||||
"GP";"F";16;"R";"GT3";"T";2;2;"services";"services";"reputation";"mother";2;4;0;"no";"yes";"yes";"yes";"no";"yes";"yes";"no";5;3;5;1;1;5;6;"10";"10";11
|
|
||||||
"GP";"F";17;"U";"GT3";"T";3;4;"at_home";"services";"home";"mother";1;3;1;"no";"yes";"yes";"no";"yes";"yes";"yes";"yes";4;4;3;3;4;5;28;"10";"9";9
|
|
||||||
"GP";"F";16;"U";"GT3";"A";3;1;"services";"other";"course";"mother";1;2;3;"no";"yes";"yes";"no";"yes";"yes";"yes";"no";2;3;3;2;2;4;5;"7";"7";7
|
|
||||||
"GP";"F";16;"U";"GT3";"T";4;3;"teacher";"other";"other";"mother";1;2;0;"no";"no";"yes";"yes";"yes";"yes";"yes";"yes";1;3;2;1;1;1;10;"11";"12";13
|
|
||||||
"GP";"F";16;"U";"GT3";"T";1;1;"at_home";"other";"home";"mother";2;1;0;"no";"yes";"yes";"no";"yes";"yes";"no";"no";4;3;2;1;4;5;6;"9";"9";10
|
|
||||||
"GP";"F";17;"R";"GT3";"T";4;3;"teacher";"other";"reputation";"mother";2;3;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"yes";4;4;2;1;1;4;6;"7";"7";7
|
|
||||||
"GP";"F";19;"U";"GT3";"T";3;3;"other";"other";"reputation";"other";1;4;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";4;3;3;1;2;3;10;"8";"8";8
|
|
||||||
"GP";"M";17;"U";"LE3";"T";4;4;"services";"other";"home";"mother";1;2;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"yes";5;3;5;4;5;3;13;"12";"12";13
|
|
||||||
"GP";"F";16;"U";"GT3";"A";2;2;"other";"other";"reputation";"mother";1;2;0;"yes";"yes";"yes";"no";"yes";"yes";"yes";"no";3;3;4;1;1;4;0;"12";"13";14
|
|
||||||
"GP";"M";18;"U";"GT3";"T";2;2;"services";"other";"home";"mother";1;2;1;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";4;4;4;2;4;5;15;"6";"7";8
|
|
||||||
"GP";"F";17;"R";"LE3";"T";4;4;"services";"other";"other";"mother";1;1;0;"no";"yes";"yes";"no";"yes";"yes";"no";"no";5;2;1;1;2;3;12;"8";"10";10
|
|
||||||
"GP";"F";17;"U";"LE3";"T";3;2;"other";"other";"reputation";"mother";2;2;0;"no";"no";"yes";"no";"yes";"yes";"yes";"no";4;4;4;1;3;1;2;"14";"15";15
|
|
||||||
"GP";"F";17;"U";"GT3";"T";4;3;"other";"other";"reputation";"mother";1;2;2;"no";"no";"yes";"no";"yes";"yes";"yes";"yes";3;4;5;2;4;1;22;"6";"6";4
|
|
||||||
"GP";"M";18;"U";"LE3";"T";3;3;"services";"health";"home";"father";1;2;1;"no";"yes";"yes";"no";"yes";"yes";"yes";"no";3;2;4;2;4;4;13;"6";"6";8
|
|
||||||
"GP";"F";17;"U";"GT3";"T";2;3;"at_home";"other";"home";"father";2;1;0;"no";"yes";"yes";"no";"yes";"yes";"no";"no";3;3;3;1;4;3;3;"7";"7";8
|
|
||||||
"GP";"F";17;"U";"GT3";"T";2;2;"at_home";"at_home";"course";"mother";1;3;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";4;3;3;1;1;4;4;"9";"10";10
|
|
||||||
"GP";"F";17;"R";"GT3";"T";2;1;"at_home";"services";"reputation";"mother";2;2;0;"no";"yes";"no";"yes";"yes";"yes";"yes";"no";4;2;5;1;2;5;2;"6";"6";6
|
|
||||||
"GP";"F";17;"U";"GT3";"T";1;1;"at_home";"other";"reputation";"mother";1;3;1;"no";"yes";"no";"yes";"yes";"yes";"no";"yes";4;3;4;1;1;5;0;"6";"5";0
|
|
||||||
"GP";"F";16;"U";"GT3";"T";2;3;"services";"teacher";"other";"mother";1;2;0;"yes";"no";"no";"no";"yes";"yes";"yes";"no";2;3;1;1;1;3;2;"16";"16";17
|
|
||||||
"GP";"M";18;"U";"GT3";"T";2;2;"other";"other";"home";"mother";2;2;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"no";3;3;3;5;5;4;0;"12";"13";13
|
|
||||||
"GP";"F";16;"U";"GT3";"T";4;4;"teacher";"services";"home";"mother";1;3;0;"no";"yes";"no";"yes";"no";"yes";"yes";"no";5;3;2;1;1;5;0;"13";"13";14
|
|
||||||
"GP";"F";18;"R";"GT3";"T";3;1;"other";"other";"reputation";"mother";1;2;1;"no";"no";"no";"yes";"yes";"yes";"yes";"yes";5;3;3;1;1;4;16;"9";"8";7
|
|
||||||
"GP";"F";17;"U";"GT3";"T";3;2;"other";"other";"course";"mother";1;2;0;"no";"no";"no";"yes";"no";"yes";"yes";"no";5;3;4;1;3;3;10;"16";"15";15
|
|
||||||
"GP";"M";17;"U";"LE3";"T";2;3;"services";"services";"reputation";"father";1;2;0;"no";"yes";"yes";"no";"no";"yes";"yes";"no";5;3;3;1;3;3;2;"12";"11";12
|
|
||||||
"GP";"M";18;"U";"LE3";"T";2;1;"at_home";"other";"course";"mother";4;2;0;"yes";"yes";"yes";"yes";"yes";"yes";"yes";"yes";4;3;2;4;5;3;14;"10";"8";9
|
|
||||||
"GP";"F";17;"U";"GT3";"A";2;1;"other";"other";"course";"mother";2;3;0;"no";"no";"no";"yes";"yes";"yes";"yes";"yes";3;2;3;1;2;3;10;"12";"10";12
|
|
||||||
"GP";"F";17;"U";"LE3";"T";4;3;"health";"other";"reputation";"father";1;2;0;"no";"no";"no";"yes";"yes";"yes";"yes";"yes";3;2;3;1;2;3;14;"13";"13";14
|
|
||||||
"GP";"M";17;"R";"GT3";"T";2;2;"other";"other";"course";"father";2;2;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";4;5;2;1;1;1;4;"11";"11";11
|
|
||||||
"GP";"M";17;"U";"GT3";"T";4;4;"teacher";"teacher";"reputation";"mother";1;2;0;"yes";"yes";"no";"yes";"yes";"yes";"yes";"yes";4;5;5;1;3;2;14;"11";"9";9
|
|
||||||
"GP";"M";16;"U";"GT3";"T";4;4;"health";"other";"reputation";"father";1;2;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";4;2;4;2;4;1;2;"14";"13";13
|
|
||||||
"GP";"M";16;"U";"LE3";"T";1;1;"other";"other";"home";"mother";2;2;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"no";3;4;2;1;1;5;18;"9";"7";6
|
|
||||||
"GP";"M";16;"U";"GT3";"T";3;2;"at_home";"other";"reputation";"mother";2;3;0;"no";"no";"no";"yes";"yes";"yes";"yes";"yes";5;3;3;1;3;2;10;"11";"9";10
|
|
||||||
"GP";"M";17;"U";"LE3";"T";2;2;"other";"other";"home";"father";1;2;0;"no";"no";"yes";"yes";"no";"yes";"yes";"yes";4;4;2;5;5;4;4;"14";"13";13
|
|
||||||
"GP";"F";16;"U";"GT3";"T";2;1;"other";"other";"home";"mother";1;1;0;"no";"no";"no";"no";"yes";"yes";"yes";"yes";4;5;2;1;1;5;20;"13";"12";12
|
|
||||||
"GP";"F";17;"R";"GT3";"T";2;1;"at_home";"services";"course";"mother";3;2;0;"no";"no";"no";"yes";"yes";"yes";"no";"no";2;1;1;1;1;3;2;"13";"11";11
|
|
||||||
"GP";"M";18;"U";"GT3";"T";2;2;"other";"services";"reputation";"father";1;2;1;"no";"no";"no";"no";"yes";"no";"yes";"no";5;5;4;3;5;2;0;"7";"7";0
|
|
||||||
"GP";"M";17;"U";"LE3";"T";4;3;"health";"other";"course";"mother";2;2;0;"no";"no";"no";"yes";"yes";"yes";"yes";"yes";2;5;5;1;4;5;14;"12";"12";12
|
|
||||||
"GP";"M";17;"R";"LE3";"A";4;4;"teacher";"other";"course";"mother";2;2;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"no";3;3;3;2;3;4;2;"10";"11";12
|
|
||||||
"GP";"M";16;"U";"LE3";"T";4;3;"teacher";"other";"course";"mother";1;1;0;"no";"no";"no";"yes";"no";"yes";"yes";"no";5;4;5;1;1;3;0;"6";"0";0
|
|
||||||
"GP";"M";16;"U";"GT3";"T";4;4;"services";"services";"course";"mother";1;1;0;"no";"no";"no";"yes";"yes";"yes";"yes";"no";5;3;2;1;2;5;0;"13";"12";12
|
|
||||||
"GP";"F";18;"U";"GT3";"T";2;1;"other";"other";"course";"other";2;3;0;"no";"yes";"yes";"no";"no";"yes";"yes";"yes";4;4;4;1;1;3;0;"7";"0";0
|
|
||||||
"GP";"M";16;"U";"GT3";"T";2;1;"other";"other";"course";"mother";3;1;0;"no";"no";"no";"no";"yes";"yes";"yes";"no";4;3;3;1;1;4;6;"18";"18";18
|
|
||||||
"GP";"M";17;"U";"GT3";"T";2;3;"other";"other";"course";"father";2;1;0;"no";"no";"no";"no";"yes";"yes";"yes";"no";5;2;2;1;1;2;4;"12";"12";13
|
|
||||||
"GP";"M";22;"U";"GT3";"T";3;1;"services";"services";"other";"mother";1;1;3;"no";"no";"no";"no";"no";"no";"yes";"yes";5;4;5;5;5;1;16;"6";"8";8
|
|
||||||
"GP";"M";18;"R";"LE3";"T";3;3;"other";"services";"course";"mother";1;2;1;"no";"yes";"no";"no";"yes";"yes";"yes";"yes";4;3;3;1;3;5;8;"3";"5";5
|
|
||||||
"GP";"M";16;"U";"GT3";"T";0;2;"other";"other";"other";"mother";1;1;0;"no";"no";"yes";"no";"no";"yes";"yes";"no";4;3;2;2;4;5;0;"13";"15";15
|
|
||||||
"GP";"M";18;"U";"GT3";"T";3;2;"services";"other";"course";"mother";2;1;1;"no";"no";"no";"no";"yes";"no";"yes";"no";4;4;5;2;4;5;0;"6";"8";8
|
|
||||||
"GP";"M";16;"U";"GT3";"T";3;3;"at_home";"other";"reputation";"other";3;2;0;"yes";"yes";"no";"no";"no";"yes";"yes";"no";5;3;3;1;3;2;6;"7";"10";10
|
|
||||||
"GP";"M";18;"U";"GT3";"T";2;1;"services";"services";"other";"mother";1;1;1;"no";"no";"no";"no";"no";"no";"yes";"no";3;2;5;2;5;5;4;"6";"9";8
|
|
||||||
"GP";"M";16;"R";"GT3";"T";2;1;"other";"other";"course";"mother";2;1;0;"no";"no";"no";"yes";"no";"yes";"no";"no";3;3;2;1;3;3;0;"8";"9";8
|
|
||||||
"GP";"M";17;"R";"GT3";"T";2;1;"other";"other";"course";"mother";1;1;0;"no";"no";"no";"no";"no";"yes";"yes";"no";4;4;2;2;4;5;0;"8";"12";12
|
|
||||||
"GP";"M";17;"U";"LE3";"T";1;1;"health";"other";"course";"mother";2;1;1;"no";"yes";"no";"yes";"yes";"yes";"yes";"no";4;4;4;1;2;5;2;"7";"9";8
|
|
||||||
"GP";"F";17;"U";"LE3";"T";4;2;"teacher";"services";"reputation";"mother";1;4;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";4;2;3;1;1;4;6;"14";"12";13
|
|
||||||
"GP";"M";19;"U";"LE3";"A";4;3;"services";"at_home";"reputation";"mother";1;2;0;"no";"yes";"no";"no";"yes";"yes";"yes";"no";4;3;1;1;1;1;12;"11";"11";11
|
|
||||||
"GP";"M";18;"U";"GT3";"T";2;1;"other";"other";"home";"mother";1;2;0;"no";"no";"no";"yes";"yes";"yes";"yes";"no";5;2;4;1;2;4;8;"15";"14";14
|
|
||||||
"GP";"F";17;"U";"LE3";"T";2;2;"services";"services";"course";"father";1;4;0;"no";"no";"yes";"yes";"yes";"yes";"yes";"yes";3;4;1;1;1;2;0;"10";"9";0
|
|
||||||
"GP";"F";18;"U";"GT3";"T";4;3;"services";"other";"home";"father";1;2;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"yes";3;1;2;1;3;2;21;"17";"18";18
|
|
||||||
"GP";"M";18;"U";"GT3";"T";4;3;"teacher";"other";"course";"mother";1;2;0;"no";"yes";"yes";"no";"no";"yes";"yes";"no";4;3;2;1;1;3;2;"8";"8";8
|
|
||||||
"GP";"M";18;"R";"GT3";"T";3;2;"other";"other";"course";"mother";1;3;0;"no";"no";"no";"yes";"no";"yes";"no";"no";5;3;2;1;1;3;1;"13";"12";12
|
|
||||||
"GP";"F";17;"U";"GT3";"T";3;3;"other";"other";"home";"mother";1;3;0;"no";"no";"no";"yes";"no";"yes";"no";"no";3;2;3;1;1;4;4;"10";"9";9
|
|
||||||
"GP";"F";18;"U";"GT3";"T";2;2;"at_home";"services";"home";"mother";1;3;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"yes";4;3;3;1;1;3;0;"9";"10";0
|
|
||||||
"GP";"M";18;"R";"LE3";"A";3;4;"other";"other";"reputation";"mother";2;2;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";4;2;5;3;4;1;13;"17";"17";17
|
|
||||||
"GP";"M";17;"U";"GT3";"T";3;1;"services";"other";"other";"mother";1;2;0;"no";"no";"yes";"yes";"yes";"yes";"yes";"yes";5;4;4;3;4;5;2;"9";"9";10
|
|
||||||
"GP";"F";18;"R";"GT3";"T";4;4;"teacher";"other";"reputation";"mother";2;2;0;"no";"no";"yes";"yes";"yes";"yes";"yes";"no";4;3;4;2;2;4;8;"12";"10";11
|
|
||||||
"GP";"M";18;"U";"GT3";"T";4;2;"health";"other";"reputation";"father";1;2;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"yes";5;4;5;1;3;5;10;"10";"9";10
|
|
||||||
"GP";"F";18;"R";"GT3";"T";2;1;"other";"other";"reputation";"mother";2;2;0;"no";"yes";"no";"no";"yes";"no";"yes";"yes";4;3;5;1;2;3;0;"6";"0";0
|
|
||||||
"GP";"F";19;"U";"GT3";"T";3;3;"other";"services";"home";"other";1;2;2;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";4;3;5;3;3;5;15;"9";"9";9
|
|
||||||
"GP";"F";18;"U";"GT3";"T";2;3;"other";"services";"reputation";"father";1;4;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"yes";4;5;5;1;3;2;4;"15";"14";14
|
|
||||||
"GP";"F";18;"U";"LE3";"T";1;1;"other";"other";"home";"mother";2;2;0;"no";"yes";"yes";"no";"no";"yes";"no";"no";4;4;3;1;1;3;2;"11";"11";11
|
|
||||||
"GP";"M";17;"R";"GT3";"T";1;2;"at_home";"at_home";"home";"mother";1;2;0;"no";"yes";"yes";"yes";"no";"yes";"no";"yes";3;5;2;2;2;1;2;"15";"14";14
|
|
||||||
"GP";"F";17;"U";"GT3";"T";2;4;"at_home";"health";"reputation";"mother";2;2;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"yes";4;3;3;1;1;1;2;"10";"10";10
|
|
||||||
"GP";"F";17;"U";"LE3";"T";2;2;"services";"other";"course";"mother";2;2;0;"yes";"yes";"yes";"no";"yes";"yes";"yes";"yes";4;4;4;2;3;5;6;"12";"12";12
|
|
||||||
"GP";"F";18;"R";"GT3";"A";3;2;"other";"services";"home";"mother";2;2;0;"no";"no";"no";"no";"no";"no";"yes";"yes";4;1;1;1;1;5;75;"10";"9";9
|
|
||||||
"GP";"M";18;"U";"GT3";"T";4;4;"teacher";"services";"home";"mother";2;1;0;"no";"no";"yes";"yes";"yes";"yes";"yes";"no";3;2;4;1;4;3;22;"9";"9";9
|
|
||||||
"GP";"F";18;"U";"GT3";"T";4;4;"health";"health";"reputation";"father";1;2;1;"yes";"yes";"no";"yes";"yes";"yes";"yes";"yes";2;4;4;1;1;4;15;"9";"8";8
|
|
||||||
"GP";"M";18;"U";"LE3";"T";4;3;"teacher";"services";"course";"mother";2;1;0;"no";"no";"yes";"yes";"yes";"yes";"yes";"no";4;2;3;1;2;1;8;"10";"11";10
|
|
||||||
"GP";"M";17;"U";"LE3";"A";4;1;"services";"other";"home";"mother";2;1;0;"no";"no";"yes";"yes";"yes";"yes";"yes";"yes";4;5;4;2;4;5;30;"8";"8";8
|
|
||||||
"GP";"M";17;"U";"LE3";"A";3;2;"teacher";"services";"home";"mother";1;1;1;"no";"no";"no";"no";"yes";"yes";"yes";"no";4;4;4;3;4;3;19;"11";"9";10
|
|
||||||
"GP";"F";18;"R";"LE3";"T";1;1;"at_home";"other";"reputation";"mother";2;4;0;"no";"yes";"yes";"yes";"yes";"yes";"no";"no";5;2;2;1;1;3;1;"12";"12";12
|
|
||||||
"GP";"F";18;"U";"GT3";"T";1;1;"other";"other";"home";"mother";2;2;0;"yes";"no";"no";"yes";"yes";"yes";"yes";"no";5;4;4;1;1;4;4;"8";"9";10
|
|
||||||
"GP";"F";17;"U";"GT3";"T";2;2;"other";"other";"course";"mother";1;2;0;"no";"yes";"no";"no";"no";"yes";"yes";"no";5;4;5;1;2;5;4;"10";"9";11
|
|
||||||
"GP";"M";17;"U";"GT3";"T";1;1;"other";"other";"reputation";"father";1;2;0;"no";"no";"yes";"no";"no";"yes";"yes";"no";4;3;3;1;2;4;2;"12";"10";11
|
|
||||||
"GP";"F";18;"U";"GT3";"T";2;2;"at_home";"at_home";"other";"mother";1;3;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"no";4;3;3;1;2;2;5;"18";"18";19
|
|
||||||
"GP";"F";17;"U";"GT3";"T";1;1;"services";"teacher";"reputation";"mother";1;3;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"no";4;3;3;1;1;3;6;"13";"12";12
|
|
||||||
"GP";"M";18;"U";"GT3";"T";2;1;"services";"services";"reputation";"mother";1;3;0;"no";"no";"yes";"yes";"yes";"yes";"yes";"no";4;2;4;1;3;2;6;"15";"14";14
|
|
||||||
"GP";"M";18;"U";"LE3";"A";4;4;"teacher";"teacher";"reputation";"mother";1;2;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";5;4;3;1;1;2;9;"15";"13";15
|
|
||||||
"GP";"M";18;"U";"GT3";"T";4;2;"teacher";"other";"home";"mother";1;2;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"yes";4;3;2;1;4;5;11;"12";"11";11
|
|
||||||
"GP";"F";17;"U";"GT3";"T";4;3;"health";"services";"reputation";"mother";1;3;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"no";4;2;2;1;2;3;0;"15";"15";15
|
|
||||||
"GP";"F";18;"U";"LE3";"T";2;1;"services";"at_home";"reputation";"mother";1;2;1;"no";"no";"no";"no";"yes";"yes";"yes";"yes";5;4;3;1;1;5;12;"12";"12";13
|
|
||||||
"GP";"F";17;"R";"LE3";"T";3;1;"services";"other";"reputation";"mother";2;4;0;"no";"yes";"yes";"no";"yes";"yes";"no";"no";3;1;2;1;1;3;6;"18";"18";18
|
|
||||||
"GP";"M";18;"R";"LE3";"T";3;2;"services";"other";"reputation";"mother";2;3;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";5;4;2;1;1;4;8;"14";"13";14
|
|
||||||
"GP";"M";17;"U";"GT3";"T";3;3;"health";"other";"home";"mother";1;1;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"no";4;4;3;1;3;5;4;"14";"12";11
|
|
||||||
"GP";"F";19;"U";"GT3";"T";4;4;"health";"other";"reputation";"other";2;2;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";2;3;4;2;3;2;0;"10";"9";0
|
|
||||||
"GP";"F";18;"U";"LE3";"T";4;3;"other";"other";"home";"other";2;2;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"yes";4;4;5;1;2;2;10;"10";"8";8
|
|
||||||
"GP";"F";18;"U";"GT3";"T";4;3;"other";"other";"reputation";"father";1;4;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"no";4;3;3;1;1;3;0;"14";"13";14
|
|
||||||
"GP";"M";18;"U";"LE3";"T";4;4;"teacher";"teacher";"home";"mother";1;1;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"yes";1;4;2;2;2;1;5;"16";"15";16
|
|
||||||
"GP";"F";18;"U";"LE3";"A";4;4;"health";"other";"home";"mother";1;2;0;"no";"yes";"no";"no";"yes";"yes";"yes";"yes";4;2;4;1;1;4;14;"12";"10";11
|
|
||||||
"GP";"M";17;"U";"LE3";"T";4;4;"other";"teacher";"home";"father";2;1;0;"no";"no";"yes";"no";"yes";"yes";"yes";"no";4;1;1;2;2;5;0;"11";"11";10
|
|
||||||
"GP";"F";17;"U";"GT3";"T";4;2;"other";"other";"reputation";"mother";2;3;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"no";4;3;3;1;1;3;0;"15";"12";14
|
|
||||||
"GP";"F";17;"U";"GT3";"T";3;2;"health";"health";"reputation";"father";1;4;0;"no";"yes";"yes";"yes";"no";"yes";"yes";"no";5;2;2;1;2;5;0;"17";"17";18
|
|
||||||
"GP";"M";19;"U";"GT3";"T";3;3;"other";"other";"home";"other";1;2;1;"no";"yes";"no";"yes";"yes";"yes";"yes";"yes";4;4;4;1;1;3;20;"15";"14";13
|
|
||||||
"GP";"F";18;"U";"GT3";"T";2;4;"services";"at_home";"reputation";"other";1;2;1;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";4;4;3;1;1;3;8;"14";"12";12
|
|
||||||
"GP";"M";20;"U";"GT3";"A";3;2;"services";"other";"course";"other";1;1;0;"no";"no";"no";"yes";"yes";"yes";"no";"no";5;5;3;1;1;5;0;"17";"18";18
|
|
||||||
"GP";"M";19;"U";"GT3";"T";4;4;"teacher";"services";"reputation";"other";2;1;1;"no";"yes";"yes";"no";"yes";"yes";"yes";"yes";4;3;4;1;1;4;38;"8";"9";8
|
|
||||||
"GP";"M";19;"R";"GT3";"T";3;3;"other";"services";"reputation";"father";1;2;1;"no";"no";"no";"yes";"yes";"yes";"no";"yes";4;5;3;1;2;5;0;"15";"12";12
|
|
||||||
"GP";"F";19;"U";"LE3";"T";1;1;"at_home";"other";"reputation";"other";1;2;1;"yes";"yes";"no";"yes";"no";"yes";"yes";"no";4;4;3;1;3;3;18;"12";"10";10
|
|
||||||
"GP";"F";19;"U";"LE3";"T";1;2;"services";"services";"home";"other";1;2;1;"no";"no";"no";"yes";"no";"yes";"no";"yes";4;2;4;2;2;3;0;"9";"9";0
|
|
||||||
"GP";"F";19;"U";"GT3";"T";2;1;"at_home";"other";"other";"other";3;2;0;"no";"yes";"no";"no";"yes";"no";"yes";"yes";3;4;1;1;1;2;20;"14";"12";13
|
|
||||||
"GP";"M";19;"U";"GT3";"T";1;2;"other";"services";"course";"other";1;2;1;"no";"no";"no";"no";"no";"yes";"yes";"no";4;5;2;2;2;4;3;"13";"11";11
|
|
||||||
"GP";"F";19;"U";"LE3";"T";3;2;"services";"other";"reputation";"other";2;2;1;"no";"yes";"yes";"no";"no";"yes";"yes";"yes";4;2;2;1;2;1;22;"13";"10";11
|
|
||||||
"GP";"F";19;"U";"GT3";"T";1;1;"at_home";"health";"home";"other";1;3;2;"no";"no";"no";"no";"no";"yes";"yes";"yes";4;1;2;1;1;3;14;"15";"13";13
|
|
||||||
"GP";"F";19;"R";"GT3";"T";2;3;"other";"other";"reputation";"other";1;3;1;"no";"no";"no";"no";"yes";"yes";"yes";"yes";4;1;2;1;1;3;40;"13";"11";11
|
|
||||||
"GP";"F";18;"U";"GT3";"T";2;1;"services";"other";"course";"mother";2;2;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";5;3;3;1;2;1;0;"8";"8";0
|
|
||||||
"GP";"F";18;"U";"GT3";"T";4;3;"other";"other";"course";"mother";1;3;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"yes";4;3;4;1;1;5;9;"9";"10";9
|
|
||||||
"GP";"F";17;"R";"GT3";"T";3;4;"at_home";"services";"course";"father";1;3;0;"no";"yes";"yes";"yes";"no";"yes";"yes";"no";4;3;4;2;5;5;0;"11";"11";10
|
|
||||||
"GP";"F";18;"U";"GT3";"T";4;4;"teacher";"other";"course";"mother";1;2;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"no";4;4;4;3;3;5;2;"11";"11";11
|
|
||||||
"GP";"F";17;"U";"GT3";"A";4;3;"services";"services";"course";"mother";1;2;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"yes";5;2;2;1;2;5;23;"13";"13";13
|
|
||||||
"GP";"F";17;"U";"GT3";"T";2;2;"other";"other";"course";"mother";1;2;0;"no";"yes";"no";"no";"yes";"yes";"no";"yes";4;2;2;1;1;3;12;"11";"9";9
|
|
||||||
"GP";"F";17;"R";"LE3";"T";2;2;"services";"services";"course";"mother";1;3;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";3;3;2;2;2;3;3;"11";"11";11
|
|
||||||
"GP";"F";17;"U";"GT3";"T";3;1;"services";"services";"course";"father";1;3;0;"no";"yes";"no";"no";"no";"yes";"yes";"no";3;4;3;2;3;5;1;"12";"14";15
|
|
||||||
"GP";"F";17;"U";"LE3";"T";0;2;"at_home";"at_home";"home";"father";2;3;0;"no";"no";"no";"no";"yes";"yes";"yes";"no";3;3;3;2;3;2;0;"16";"15";15
|
|
||||||
"GP";"M";18;"U";"GT3";"T";4;4;"other";"other";"course";"mother";1;3;0;"no";"no";"no";"yes";"yes";"yes";"yes";"no";4;3;3;2;2;3;3;"9";"12";11
|
|
||||||
"GP";"M";17;"U";"GT3";"T";3;3;"other";"services";"reputation";"mother";1;1;0;"no";"no";"no";"yes";"no";"yes";"yes";"no";4;3;5;3;5;5;3;"14";"15";16
|
|
||||||
"GP";"M";17;"R";"GT3";"T";2;2;"services";"other";"course";"mother";4;1;0;"no";"yes";"no";"no";"yes";"yes";"yes";"no";4;4;5;5;5;4;8;"11";"10";10
|
|
||||||
"GP";"F";17;"U";"GT3";"T";4;4;"teacher";"services";"course";"mother";1;3;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";5;4;4;1;3;4;7;"10";"9";9
|
|
||||||
"GP";"F";17;"U";"GT3";"T";4;4;"teacher";"teacher";"course";"mother";2;3;0;"no";"yes";"yes";"no";"no";"yes";"yes";"yes";4;3;3;1;2;4;4;"14";"14";14
|
|
||||||
"GP";"M";18;"U";"LE3";"T";2;2;"other";"other";"course";"mother";1;4;0;"no";"yes";"no";"yes";"yes";"yes";"yes";"no";4;5;5;2;4;5;2;"9";"8";8
|
|
||||||
"GP";"F";17;"R";"GT3";"T";2;4;"at_home";"other";"course";"father";1;3;0;"no";"yes";"no";"no";"yes";"yes";"yes";"yes";4;4;3;1;1;5;7;"12";"14";14
|
|
||||||
"GP";"F";18;"U";"GT3";"T";3;3;"services";"services";"home";"mother";1;2;0;"no";"no";"no";"yes";"yes";"yes";"yes";"no";5;3;4;1;1;4;0;"7";"0";0
|
|
||||||
"GP";"F";18;"U";"LE3";"T";2;2;"other";"other";"home";"other";1;2;0;"no";"no";"no";"yes";"no";"yes";"yes";"yes";4;3;3;1;1;2;0;"8";"8";0
|
|
||||||
"GP";"F";18;"R";"GT3";"T";2;2;"at_home";"other";"course";"mother";2;4;0;"no";"no";"no";"yes";"yes";"yes";"no";"no";4;4;4;1;1;4;0;"10";"9";0
|
|
||||||
"GP";"F";17;"U";"GT3";"T";3;4;"services";"other";"course";"mother";1;3;0;"no";"no";"no";"no";"yes";"yes";"yes";"no";4;4;5;1;3;5;16;"16";"15";15
|
|
||||||
"GP";"F";19;"R";"GT3";"A";3;1;"services";"at_home";"home";"other";1;3;1;"no";"no";"yes";"no";"yes";"yes";"no";"no";5;4;3;1;2;5;12;"14";"13";13
|
|
||||||
"GP";"F";17;"U";"GT3";"T";3;2;"other";"other";"home";"mother";1;2;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"yes";4;3;2;2;3;2;0;"7";"8";0
|
|
||||||
"GP";"F";18;"U";"LE3";"T";3;3;"services";"services";"home";"mother";1;4;0;"no";"yes";"no";"no";"yes";"yes";"yes";"no";5;3;3;1;1;1;7;"16";"15";17
|
|
||||||
"GP";"F";17;"R";"GT3";"A";3;2;"other";"other";"home";"mother";1;2;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"no";4;3;3;2;3;2;4;"9";"10";10
|
|
||||||
"GP";"F";19;"U";"GT3";"T";2;1;"services";"services";"home";"other";1;3;1;"no";"no";"yes";"yes";"yes";"yes";"yes";"yes";4;3;4;1;3;3;4;"11";"12";11
|
|
||||||
"GP";"M";18;"U";"GT3";"T";4;4;"teacher";"services";"home";"father";1;2;1;"no";"yes";"no";"yes";"yes";"yes";"yes";"no";4;3;3;2;2;2;0;"10";"10";0
|
|
||||||
"GP";"M";18;"U";"LE3";"T";3;4;"services";"other";"home";"mother";1;2;0;"no";"no";"no";"yes";"yes";"yes";"yes";"yes";4;3;3;1;3;5;11;"16";"15";15
|
|
||||||
"GP";"F";17;"U";"GT3";"A";2;2;"at_home";"at_home";"home";"father";1;2;1;"no";"yes";"no";"no";"yes";"yes";"yes";"yes";3;3;1;1;2;4;0;"9";"8";0
|
|
||||||
"GP";"F";18;"U";"GT3";"T";2;3;"at_home";"other";"course";"mother";1;3;0;"no";"yes";"no";"no";"yes";"yes";"yes";"no";4;3;3;1;2;3;4;"11";"10";10
|
|
||||||
"GP";"F";18;"U";"GT3";"T";3;2;"other";"services";"other";"mother";1;3;0;"no";"no";"no";"no";"yes";"yes";"yes";"yes";5;4;3;2;3;1;7;"13";"13";14
|
|
||||||
"GP";"M";18;"R";"GT3";"T";4;3;"teacher";"services";"course";"mother";1;3;0;"no";"no";"no";"no";"yes";"yes";"yes";"yes";5;3;2;1;2;4;9;"16";"15";16
|
|
||||||
"GP";"M";18;"U";"GT3";"T";4;3;"teacher";"other";"course";"mother";1;3;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"yes";5;4;5;2;3;5;0;"10";"10";9
|
|
||||||
"GP";"F";17;"U";"GT3";"T";4;3;"health";"other";"reputation";"mother";1;3;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"yes";4;4;3;1;3;4;0;"13";"15";15
|
|
||||||
"MS";"M";18;"R";"GT3";"T";3;2;"other";"other";"course";"mother";2;1;1;"no";"yes";"no";"no";"no";"yes";"yes";"no";2;5;5;5;5;5;10;"11";"13";13
|
|
||||||
"MS";"M";19;"R";"GT3";"T";1;1;"other";"services";"home";"other";3;2;3;"no";"no";"no";"no";"yes";"yes";"yes";"no";5;4;4;3;3;2;8;"8";"7";8
|
|
||||||
"MS";"M";17;"U";"GT3";"T";3;3;"health";"other";"course";"mother";2;2;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"no";4;5;4;2;3;3;2;"13";"13";13
|
|
||||||
"MS";"M";18;"U";"LE3";"T";1;3;"at_home";"services";"course";"mother";1;1;1;"no";"no";"no";"no";"yes";"no";"yes";"yes";4;3;3;2;3;3;7;"8";"7";8
|
|
||||||
"MS";"M";19;"R";"GT3";"T";1;1;"other";"other";"home";"other";3;1;1;"no";"yes";"no";"no";"yes";"yes";"yes";"no";4;4;4;3;3;5;4;"8";"8";8
|
|
||||||
"MS";"M";17;"R";"GT3";"T";4;3;"services";"other";"home";"mother";2;2;0;"no";"yes";"yes";"yes";"no";"yes";"yes";"yes";4;5;5;1;3;2;4;"13";"11";11
|
|
||||||
"MS";"F";18;"U";"GT3";"T";3;3;"services";"services";"course";"father";1;2;0;"no";"yes";"no";"no";"yes";"yes";"no";"yes";5;3;4;1;1;5;0;"10";"9";9
|
|
||||||
"MS";"F";17;"R";"GT3";"T";4;4;"teacher";"services";"other";"father";2;2;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"no";4;3;3;1;2;5;4;"12";"13";13
|
|
||||||
"MS";"F";17;"U";"LE3";"A";3;2;"services";"other";"reputation";"mother";2;2;0;"no";"no";"no";"no";"yes";"yes";"no";"yes";1;2;3;1;2;5;2;"12";"12";11
|
|
||||||
"MS";"M";18;"U";"LE3";"T";1;1;"other";"services";"home";"father";2;1;0;"no";"no";"no";"no";"no";"yes";"yes";"yes";3;3;2;1;2;3;4;"10";"10";10
|
|
||||||
"MS";"F";18;"U";"LE3";"T";1;1;"at_home";"services";"course";"father";2;3;0;"no";"no";"no";"no";"yes";"yes";"yes";"no";5;3;2;1;1;4;0;"18";"16";16
|
|
||||||
"MS";"F";18;"R";"LE3";"A";1;4;"at_home";"other";"course";"mother";3;2;0;"no";"no";"no";"no";"yes";"yes";"no";"yes";4;3;4;1;4;5;0;"13";"13";13
|
|
||||||
"MS";"M";18;"R";"LE3";"T";1;1;"at_home";"other";"other";"mother";2;2;1;"no";"no";"no";"yes";"no";"no";"no";"no";4;4;3;2;3;5;2;"13";"12";12
|
|
||||||
"MS";"F";18;"U";"GT3";"T";3;3;"services";"services";"other";"mother";2;2;0;"no";"yes";"no";"no";"yes";"yes";"yes";"yes";4;3;2;1;3;3;0;"11";"11";10
|
|
||||||
"MS";"F";17;"U";"LE3";"T";4;4;"at_home";"at_home";"course";"mother";1;2;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"yes";2;3;4;1;1;1;0;"16";"15";15
|
|
||||||
"MS";"F";17;"R";"GT3";"T";1;2;"other";"services";"course";"father";2;2;0;"no";"no";"no";"no";"no";"yes";"no";"no";3;2;2;1;2;3;0;"12";"11";12
|
|
||||||
"MS";"M";18;"R";"GT3";"T";1;3;"at_home";"other";"course";"mother";2;2;0;"no";"yes";"yes";"no";"yes";"yes";"no";"no";3;3;4;2;4;3;4;"10";"10";10
|
|
||||||
"MS";"M";18;"U";"LE3";"T";4;4;"teacher";"services";"other";"mother";2;3;0;"no";"no";"yes";"no";"yes";"yes";"yes";"yes";4;2;2;2;2;5;0;"13";"13";13
|
|
||||||
"MS";"F";17;"R";"GT3";"T";1;1;"other";"services";"reputation";"mother";3;1;1;"no";"yes";"yes";"no";"yes";"yes";"yes";"yes";5;2;1;1;2;1;0;"7";"6";0
|
|
||||||
"MS";"F";18;"U";"GT3";"T";2;3;"at_home";"services";"course";"father";2;1;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"yes";5;2;3;1;2;4;0;"11";"10";10
|
|
||||||
"MS";"F";18;"R";"GT3";"T";4;4;"other";"teacher";"other";"father";3;2;0;"no";"yes";"yes";"no";"no";"yes";"yes";"yes";3;2;2;4;2;5;10;"14";"12";11
|
|
||||||
"MS";"F";19;"U";"LE3";"T";3;2;"services";"services";"home";"other";2;2;2;"no";"no";"no";"yes";"yes";"yes";"no";"yes";3;2;2;1;1;3;4;"7";"7";9
|
|
||||||
"MS";"M";18;"R";"LE3";"T";1;2;"at_home";"services";"other";"father";3;1;0;"no";"yes";"yes";"yes";"yes";"no";"yes";"yes";4;3;3;2;3;3;3;"14";"12";12
|
|
||||||
"MS";"F";17;"U";"GT3";"T";2;2;"other";"at_home";"home";"mother";1;3;0;"no";"no";"no";"yes";"yes";"yes";"no";"yes";3;4;3;1;1;3;8;"13";"11";11
|
|
||||||
"MS";"F";17;"R";"GT3";"T";1;2;"other";"other";"course";"mother";1;1;0;"no";"no";"no";"yes";"yes";"yes";"yes";"no";3;5;5;1;3;1;14;"6";"5";5
|
|
||||||
"MS";"F";18;"R";"LE3";"T";4;4;"other";"other";"reputation";"mother";2;3;0;"no";"no";"no";"no";"yes";"yes";"yes";"no";5;4;4;1;1;1;0;"19";"18";19
|
|
||||||
"MS";"F";18;"R";"GT3";"T";1;1;"other";"other";"home";"mother";4;3;0;"no";"no";"no";"no";"yes";"yes";"yes";"no";4;3;2;1;2;4;2;"8";"8";10
|
|
||||||
"MS";"F";20;"U";"GT3";"T";4;2;"health";"other";"course";"other";2;3;2;"no";"yes";"yes";"no";"no";"yes";"yes";"yes";5;4;3;1;1;3;4;"15";"14";15
|
|
||||||
"MS";"F";18;"R";"LE3";"T";4;4;"teacher";"services";"course";"mother";1;2;0;"no";"no";"yes";"yes";"yes";"yes";"yes";"no";5;4;3;3;4;2;4;"8";"9";10
|
|
||||||
"MS";"F";18;"U";"GT3";"T";3;3;"other";"other";"home";"mother";1;2;0;"no";"no";"yes";"no";"yes";"yes";"yes";"yes";4;1;3;1;2;1;0;"15";"15";15
|
|
||||||
"MS";"F";17;"R";"GT3";"T";3;1;"at_home";"other";"reputation";"mother";1;2;0;"no";"yes";"yes";"yes";"no";"yes";"yes";"no";4;5;4;2;3;1;17;"10";"10";10
|
|
||||||
"MS";"M";18;"U";"GT3";"T";4;4;"teacher";"teacher";"home";"father";1;2;0;"no";"no";"yes";"yes";"no";"yes";"yes";"no";3;2;4;1;4;2;4;"15";"14";14
|
|
||||||
"MS";"M";18;"R";"GT3";"T";2;1;"other";"other";"other";"mother";2;1;0;"no";"no";"no";"yes";"no";"yes";"yes";"yes";4;4;3;1;3;5;5;"7";"6";7
|
|
||||||
"MS";"M";17;"U";"GT3";"T";2;3;"other";"services";"home";"father";2;2;0;"no";"no";"no";"yes";"yes";"yes";"yes";"no";4;4;3;1;1;3;2;"11";"11";10
|
|
||||||
"MS";"M";19;"R";"GT3";"T";1;1;"other";"services";"other";"mother";2;1;1;"no";"no";"no";"no";"yes";"yes";"no";"no";4;3;2;1;3;5;0;"6";"5";0
|
|
||||||
"MS";"M";18;"R";"GT3";"T";4;2;"other";"other";"home";"father";2;1;1;"no";"no";"yes";"no";"yes";"yes";"no";"no";5;4;3;4;3;3;14;"6";"5";5
|
|
||||||
"MS";"F";18;"R";"GT3";"T";2;2;"at_home";"other";"other";"mother";2;3;0;"no";"no";"yes";"no";"yes";"yes";"no";"no";5;3;3;1;3;4;2;"10";"9";10
|
|
||||||
"MS";"F";18;"R";"GT3";"T";4;4;"teacher";"at_home";"reputation";"mother";3;1;0;"no";"yes";"yes";"yes";"yes";"yes";"yes";"yes";4;4;3;2;2;5;7;"6";"5";6
|
|
||||||
"MS";"F";19;"R";"GT3";"T";2;3;"services";"other";"course";"mother";1;3;1;"no";"no";"no";"yes";"no";"yes";"yes";"no";5;4;2;1;2;5;0;"7";"5";0
|
|
||||||
"MS";"F";18;"U";"LE3";"T";3;1;"teacher";"services";"course";"mother";1;2;0;"no";"yes";"yes";"no";"yes";"yes";"yes";"no";4;3;4;1;1;1;0;"7";"9";8
|
|
||||||
"MS";"F";18;"U";"GT3";"T";1;1;"other";"other";"course";"mother";2;2;1;"no";"no";"no";"yes";"yes";"yes";"no";"no";1;1;1;1;1;5;0;"6";"5";0
|
|
||||||
"MS";"M";20;"U";"LE3";"A";2;2;"services";"services";"course";"other";1;2;2;"no";"yes";"yes";"no";"yes";"yes";"no";"no";5;5;4;4;5;4;11;"9";"9";9
|
|
||||||
"MS";"M";17;"U";"LE3";"T";3;1;"services";"services";"course";"mother";2;1;0;"no";"no";"no";"no";"no";"yes";"yes";"no";2;4;5;3;4;2;3;"14";"16";16
|
|
||||||
"MS";"M";21;"R";"GT3";"T";1;1;"other";"other";"course";"other";1;1;3;"no";"no";"no";"no";"no";"yes";"no";"no";5;5;3;3;3;3;3;"10";"8";7
|
|
||||||
"MS";"M";18;"R";"LE3";"T";3;2;"services";"other";"course";"mother";3;1;0;"no";"no";"no";"no";"no";"yes";"yes";"no";4;4;1;3;4;5;0;"11";"12";10
|
|
||||||
"MS";"M";19;"U";"LE3";"T";1;1;"other";"at_home";"course";"father";1;1;0;"no";"no";"no";"no";"yes";"yes";"yes";"no";3;2;3;3;3;5;5;"8";"9";9
|
|
|
|
@ -1,49 +0,0 @@
|
||||||
#!python3
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import openpyxl
|
|
||||||
import sys
|
|
||||||
|
|
||||||
#inputs
|
|
||||||
print("This programme writes the data in any Comma-separated value file (such as: .csv or .data) to a Excel file.")
|
|
||||||
print("The input and output files must be in the same directory of the python file for the programme to work.\n")
|
|
||||||
|
|
||||||
csv_name = input("Name of the CSV file for input (with the extension): ")
|
|
||||||
sep = input("Seperator of the CSV file: ")
|
|
||||||
excel_name = input("Name of the excel file for output (with the extension): ")
|
|
||||||
sheet_name = input("Name of the excel sheet for output: ")
|
|
||||||
|
|
||||||
#opening the files
|
|
||||||
try:
|
|
||||||
wb = openpyxl.load_workbook(excel_name)
|
|
||||||
sheet = wb.get_sheet_by_name(sheet_name)
|
|
||||||
|
|
||||||
file = open(csv_name,"r",encoding = "utf-8")
|
|
||||||
except:
|
|
||||||
print("File Error!")
|
|
||||||
sys.exit()
|
|
||||||
|
|
||||||
#rows and columns
|
|
||||||
row = 1
|
|
||||||
column = 1
|
|
||||||
|
|
||||||
#for each line in the file
|
|
||||||
for line in file:
|
|
||||||
#remove the \n from the line and make it a list with the seperator
|
|
||||||
line = line[:-1]
|
|
||||||
line = line.split(sep)
|
|
||||||
|
|
||||||
#for each data in the line
|
|
||||||
for data in line:
|
|
||||||
#write the data to the cell
|
|
||||||
sheet.cell(row,column).value = data
|
|
||||||
#after each data column number increases by 1
|
|
||||||
column += 1
|
|
||||||
|
|
||||||
#to write the next line column number is set to 1 and row number is increased by 1
|
|
||||||
column = 1
|
|
||||||
row += 1
|
|
||||||
|
|
||||||
#saving the excel file and closing the csv file
|
|
||||||
wb.save(excel_name)
|
|
||||||
file.close()
|
|
|
@ -1 +0,0 @@
|
||||||
openpyxl
|
|
|
@ -11,4 +11,3 @@ A simple python script which takes colored image filename as argument and conver
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
`$python bw_convert.py sample_image.jpg`
|
`$python bw_convert.py sample_image.jpg`
|
||||||
`$python bw_convert.py sample_image.png`
|
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
## Cryptocurrency Prices
|
|
||||||
|
|
||||||
This programme gets the live price of cryptocurrencies.
|
|
||||||
|
|
||||||
## Requirements
|
|
||||||
|
|
||||||
Install the required libraries:
|
|
||||||
|
|
||||||
$ pip install -r requirements.txt
|
|
||||||
|
|
||||||
After that run with:
|
|
||||||
|
|
||||||
$ python cryptocurrency-prices.py
|
|
|
@ -1,66 +0,0 @@
|
||||||
#!python3
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import requests
|
|
||||||
from bs4 import BeautifulSoup
|
|
||||||
from colorama import init, Fore, Back, Style
|
|
||||||
import sys
|
|
||||||
import os
|
|
||||||
|
|
||||||
#get the price
|
|
||||||
def get_price():
|
|
||||||
#response from the url
|
|
||||||
response = requests.get(url)
|
|
||||||
|
|
||||||
#soup object of the html content
|
|
||||||
soup = BeautifulSoup(response.content,'html.parser')
|
|
||||||
|
|
||||||
#for bitcoin
|
|
||||||
if asset == 'btc':
|
|
||||||
price = soup.find('span',{'class':'price'}).text #bitcoin works faster with the price class
|
|
||||||
|
|
||||||
#for other altcoins
|
|
||||||
else:
|
|
||||||
price = soup.find('span',{'class':'woobJfK-Xb2EM1W1o8yoE'}).text #other altcoins only work with this class
|
|
||||||
|
|
||||||
return float(price.replace(",",""))
|
|
||||||
|
|
||||||
#asset choice
|
|
||||||
asset = input('Abbreviation of the asset: ')
|
|
||||||
url = 'https://cryptowat.ch/assets/' + asset
|
|
||||||
|
|
||||||
#catching the NoneType AttributeError error for coins that cant be found
|
|
||||||
try:
|
|
||||||
price = get_price()
|
|
||||||
|
|
||||||
except AttributeError:
|
|
||||||
print("The asset doesn't exist or it's not supported!")
|
|
||||||
sys.exit()
|
|
||||||
|
|
||||||
#visual
|
|
||||||
if sys.platform == 'win32':
|
|
||||||
os.system('cls')
|
|
||||||
else:
|
|
||||||
os.system('clear')
|
|
||||||
|
|
||||||
#since the last price must be something from the start its set to 0
|
|
||||||
price = 0
|
|
||||||
|
|
||||||
#loop
|
|
||||||
while True:
|
|
||||||
|
|
||||||
#getting the price
|
|
||||||
last_price = price
|
|
||||||
price = get_price()
|
|
||||||
|
|
||||||
#coloring the price according to the change
|
|
||||||
if price > last_price:
|
|
||||||
color = Fore.GREEN
|
|
||||||
elif last_price > price:
|
|
||||||
color = Fore.RED
|
|
||||||
else:
|
|
||||||
color = Style.RESET_ALL
|
|
||||||
|
|
||||||
#printing the price
|
|
||||||
print('$ ',end='')
|
|
||||||
print(color + str(price) + Style.RESET_ALL)
|
|
|
@ -1,3 +0,0 @@
|
||||||
requests
|
|
||||||
bs4
|
|
||||||
colorama
|
|
|
@ -1,24 +0,0 @@
|
||||||
# Download Page as PDF:
|
|
||||||
|
|
||||||
Download a page as a PDF .
|
|
||||||
|
|
||||||
#### Required Modules :
|
|
||||||
- pyppdf
|
|
||||||
```bash
|
|
||||||
pip3 install pyppdf
|
|
||||||
```
|
|
||||||
- pyppyteer
|
|
||||||
```bash
|
|
||||||
pip3 install pyppeteer
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Examples of use :
|
|
||||||
- Download a page:
|
|
||||||
```bash
|
|
||||||
python download-page-as-pdf.py -l 'www.pudim.com.br'
|
|
||||||
```
|
|
||||||
|
|
||||||
- Download a page and give a pdf name:
|
|
||||||
```bash
|
|
||||||
python download-page-as-pdf.py -l 'http://www.pudim.com.br' -n 'pudim.pdf'
|
|
||||||
```
|
|
|
@ -1,42 +0,0 @@
|
||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: UTF-8 -*-
|
|
||||||
|
|
||||||
import argparse
|
|
||||||
import pyppdf
|
|
||||||
import re
|
|
||||||
from pyppeteer.errors import PageError, TimeoutError, NetworkError
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
parser = argparse.ArgumentParser(description = 'Page Downloader as PDF')
|
|
||||||
parser.add_argument('--link', '-l', action = 'store', dest = 'link',
|
|
||||||
required = True, help = 'Inform the link to download.')
|
|
||||||
parser.add_argument('--name', '-n', action = 'store', dest = 'name',
|
|
||||||
required = False, help = 'Inform the name to save.')
|
|
||||||
|
|
||||||
arguments = parser.parse_args()
|
|
||||||
|
|
||||||
url = arguments.link
|
|
||||||
|
|
||||||
if not arguments.name:
|
|
||||||
name = re.sub(r'^\w+://', '', url.lower())
|
|
||||||
name = name.replace('/', '-')
|
|
||||||
else:
|
|
||||||
name = arguments.name
|
|
||||||
|
|
||||||
if not name.endswith('.pdf'):
|
|
||||||
name = name + '.pdf'
|
|
||||||
|
|
||||||
print(f'Name of the file: {name}')
|
|
||||||
|
|
||||||
try:
|
|
||||||
pyppdf.save_pdf(name, url)
|
|
||||||
except PageError:
|
|
||||||
print('URL could not be resolved.')
|
|
||||||
except TimeoutError:
|
|
||||||
print('Timeout.')
|
|
||||||
except NetworkError:
|
|
||||||
print('No access to the network.')
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
|
@ -1,2 +0,0 @@
|
||||||
pyppdf==0.1.2
|
|
||||||
pyppeteer==0.2.2
|
|
|
@ -1,9 +0,0 @@
|
||||||
# English Theasauras
|
|
||||||
A simple and smart command-line dictionary that displays the definition of the words entered by the user.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
To start the dictionary type:
|
|
||||||
```bash
|
|
||||||
$ python app.py
|
|
||||||
```
|
|
||||||
ENJOY 🤩
|
|
|
@ -1,33 +0,0 @@
|
||||||
import json
|
|
||||||
import difflib
|
|
||||||
|
|
||||||
from difflib import get_close_matches
|
|
||||||
|
|
||||||
data = json.load(open("data.json")) # Importing data from data.json
|
|
||||||
|
|
||||||
def show_def(word):
|
|
||||||
word = word.lower()
|
|
||||||
if word in data:
|
|
||||||
return data[word]
|
|
||||||
elif len(get_close_matches(word, data.keys())) > 0:
|
|
||||||
choice = input("Did you mean %s instead ? Enter Y for yes or N for no: " % get_close_matches(word, data.keys())[0])
|
|
||||||
if choice == "Y":
|
|
||||||
return data[get_close_matches(word, data.keys())[0]]
|
|
||||||
elif choice == "N":
|
|
||||||
return "The word doesn't exist. Please double check it!!"
|
|
||||||
else:
|
|
||||||
return "We didn't understand your entry!"
|
|
||||||
else:
|
|
||||||
return "The word doesn't exist. Please double check it!!"
|
|
||||||
|
|
||||||
|
|
||||||
word = input("Please enter your word: ")
|
|
||||||
|
|
||||||
output = show_def(word)
|
|
||||||
|
|
||||||
if type(output) == list:
|
|
||||||
for item in output:
|
|
||||||
print(item)
|
|
||||||
else:
|
|
||||||
print(output)
|
|
||||||
|
|
|
@ -1,56 +0,0 @@
|
||||||
{
|
|
||||||
"cells": [
|
|
||||||
{
|
|
||||||
"cell_type": "code",
|
|
||||||
"execution_count": null,
|
|
||||||
"metadata": {},
|
|
||||||
"outputs": [],
|
|
||||||
"source": [
|
|
||||||
"import cv2\n",
|
|
||||||
"\n",
|
|
||||||
"face_cascade = cv2.CascadeClassifier(\"haarcascade_frontalface_default.xml\")\n",
|
|
||||||
"\n",
|
|
||||||
"img = cv2.imread(\"morgan.jpg\",1)\n",
|
|
||||||
"\n",
|
|
||||||
"gray_img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)\n",
|
|
||||||
"\n",
|
|
||||||
"faces = face_cascade.detectMultiScale(gray_img, scaleFactor=1.05, minNeighbors=5)\n",
|
|
||||||
"\n",
|
|
||||||
"print(type(faces))\n",
|
|
||||||
"print(faces)\n",
|
|
||||||
"\n",
|
|
||||||
"for x,y,w,h in faces:\n",
|
|
||||||
" img = cv2.rectangle(img, (x,y), (x+w,y+h), (0,255,0),3)\n",
|
|
||||||
" \n",
|
|
||||||
"resize_img = cv2.resize(img, (int(img.shape[1]/2), int(img.shape[0]/2)))\n",
|
|
||||||
"\n",
|
|
||||||
"cv2.imshow(\"Gray\",resize_img)\n",
|
|
||||||
"\n",
|
|
||||||
"cv2.waitKey(0)\n",
|
|
||||||
"\n",
|
|
||||||
"cv2.destroyAllWindow(Gray)"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"metadata": {
|
|
||||||
"kernelspec": {
|
|
||||||
"display_name": "Python 3",
|
|
||||||
"language": "python",
|
|
||||||
"name": "python3"
|
|
||||||
},
|
|
||||||
"language_info": {
|
|
||||||
"codemirror_mode": {
|
|
||||||
"name": "ipython",
|
|
||||||
"version": 3
|
|
||||||
},
|
|
||||||
"file_extension": ".py",
|
|
||||||
"mimetype": "text/x-python",
|
|
||||||
"name": "python",
|
|
||||||
"nbconvert_exporter": "python",
|
|
||||||
"pygments_lexer": "ipython3",
|
|
||||||
"version": "3.7.3"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nbformat": 4,
|
|
||||||
"nbformat_minor": 2
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
{\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600
|
|
||||||
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
|
||||||
{\colortbl;\red255\green255\blue255;}
|
|
||||||
{\*\expandedcolortbl;;}
|
|
||||||
\paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0
|
|
||||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
|
|
||||||
|
|
||||||
\f0\fs24 \cf0 # Description\
|
|
||||||
Code for Face recognition build by using OpenCv-Python. It uses cascade classifier as the database for the recognition which is an xml file.\
|
|
||||||
\
|
|
||||||
# Requirements\
|
|
||||||
Python version 3 and above can be used\
|
|
||||||
pip install cv2\
|
|
||||||
\
|
|
||||||
# Usage \
|
|
||||||
Can be run easily using terminal or command prompt ( I used Jupyter Notebook for the code)\
|
|
||||||
Run `python3 image_recognition.ipynb` \
|
|
||||||
}
|
|
Before Width: | Height: | Size: 414 KiB |
|
@ -1,9 +0,0 @@
|
||||||
{\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600
|
|
||||||
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
|
||||||
{\colortbl;\red255\green255\blue255;}
|
|
||||||
{\*\expandedcolortbl;;}
|
|
||||||
\paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0
|
|
||||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
|
|
||||||
|
|
||||||
\f0\fs24 \cf0 OpenCV- Python\
|
|
||||||
Cascade Classifier}
|
|
|
@ -1,23 +0,0 @@
|
||||||
def Fibbo_Sequence_Generator():
|
|
||||||
# Generates a fibonacci sequence with the size of ngi
|
|
||||||
runFib = True
|
|
||||||
while(runFib):
|
|
||||||
n = int(input('How many numbers do you need? '))
|
|
||||||
if n > 0 :
|
|
||||||
runFib = False
|
|
||||||
series = [1]
|
|
||||||
|
|
||||||
while len(series) < n:
|
|
||||||
if len(series) == 1:
|
|
||||||
series.append(1)
|
|
||||||
else:
|
|
||||||
series.append(series[-1] + series[-2])
|
|
||||||
|
|
||||||
for i in range(len(series)): # Convert the numbers to strings
|
|
||||||
series[i] = str(series[i])
|
|
||||||
else:
|
|
||||||
print('enter a valid number')
|
|
||||||
|
|
||||||
return(', '.join(series)) # Return the sequence seperated by commas
|
|
||||||
|
|
||||||
print(Fibbo_Sequence_Generator())
|
|
|
@ -1,10 +0,0 @@
|
||||||
# Python Fibonacci Sequence Generator
|
|
||||||
This python script will ask you how many numbers do you need to see in the Fibonacci Sequence and generates the sequence based on your input.
|
|
||||||
|
|
||||||
## Requirement
|
|
||||||
Python 3.xx
|
|
||||||
|
|
||||||
## Running the script
|
|
||||||
```bash
|
|
||||||
python Fibonacci.py
|
|
||||||
```
|
|
|
@ -2,7 +2,7 @@
|
||||||
Organizes your files in the folder according to their extension by grouping them together.
|
Organizes your files in the folder according to their extension by grouping them together.
|
||||||
|
|
||||||
# Libraries Used
|
# Libraries Used
|
||||||
-
|
- colorama
|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
Just run the command `python3 file-organizerpy` from your terminal/bash.
|
Just run the command `python3 file-organizerpy` from your terminal/bash.
|
|
@ -1,24 +0,0 @@
|
||||||
import os
|
|
||||||
import shutil
|
|
||||||
|
|
||||||
#The Path of the directory to be sorted
|
|
||||||
path = 'C:\\Users\\<USERNAME>\\Downloads'
|
|
||||||
#This populates a list with the filenames in the directory
|
|
||||||
list_ = os.listdir(path)
|
|
||||||
|
|
||||||
#Traverses every file
|
|
||||||
for file_ in list_:
|
|
||||||
name,ext = os.path.splitext(file_)
|
|
||||||
print(name)
|
|
||||||
#Stores the extension type
|
|
||||||
ext = ext[1:]
|
|
||||||
#If it is directory, it forces the next iteration
|
|
||||||
if ext == '':
|
|
||||||
continue
|
|
||||||
#If a directory with the name 'ext' exists, it moves the file to that directory
|
|
||||||
if os.path.exists(path+'/'+ext):
|
|
||||||
shutil.move(path+'/'+file_,path+'/'+ext+'/'+file_)
|
|
||||||
#If the directory does not exist, it creates a new directory
|
|
||||||
else:
|
|
||||||
os.makedirs(path+'/'+ext)
|
|
||||||
shutil.move(path+'/'+file_,path+'/'+ext+'/'+file_)
|
|
Before Width: | Height: | Size: 81 KiB |
|
@ -1,223 +0,0 @@
|
||||||
import locker
|
|
||||||
|
|
||||||
import os
|
|
||||||
import tkinter as tk
|
|
||||||
from tkinter import PhotoImage
|
|
||||||
from tkinter import messagebox
|
|
||||||
from tkinter import filedialog
|
|
||||||
|
|
||||||
cwd = os.getcwd()
|
|
||||||
if not os.path.exists('files/'):
|
|
||||||
os.mkdir('files')
|
|
||||||
|
|
||||||
class Application(tk.Frame):
|
|
||||||
def __init__(self, master):
|
|
||||||
super().__init__(master=master)
|
|
||||||
self.master = master
|
|
||||||
self.pack()
|
|
||||||
|
|
||||||
self.title_frame()
|
|
||||||
self.main_frame()
|
|
||||||
self.status_frame()
|
|
||||||
|
|
||||||
self.folder_path = ''
|
|
||||||
self.fname = ''
|
|
||||||
|
|
||||||
def title_frame(self):
|
|
||||||
self.title = tk.Label(self, bg='gray',font=("Helvetica", 14), anchor='w')
|
|
||||||
self.title.configure(width=35, height=3)
|
|
||||||
self.title['text'] = '\t Folder Locker / Unlocker'
|
|
||||||
self.title.grid(row=0, column=0, columnspan=2)
|
|
||||||
|
|
||||||
def body_frame(self):
|
|
||||||
self.body = tk.Frame(self, width=390, height=230)
|
|
||||||
self.body.grid(row=1, column=0, columnspan=2, pady=10)
|
|
||||||
|
|
||||||
def status_frame(self):
|
|
||||||
self.status = tk.Text(self, width=50, height=3, fg='dodger blue')
|
|
||||||
self.status.insert(tk.END, 'The folder you lock will be hidden automatically\n')
|
|
||||||
self.status.insert(tk.END, 'Use the app to unlock it back')
|
|
||||||
self.status.configure(state='disabled')
|
|
||||||
self.status.grid(row=2, column=0, columnspan=2)
|
|
||||||
|
|
||||||
def main_frame(self):
|
|
||||||
self.body_frame()
|
|
||||||
|
|
||||||
self.lock_button = tk.Button(self.body, font =('Verdana', 15), command=self.lock_frame)
|
|
||||||
self.lock_button['image'] = lock_icon
|
|
||||||
self.lock_button['compound'] = tk.TOP
|
|
||||||
self.lock_button['text'] = 'Lock \nFolder'
|
|
||||||
self.lock_button.configure(width=120, height=120)
|
|
||||||
self.lock_button.grid(row=0, column=0, padx=(0,30), pady=(20,7))
|
|
||||||
|
|
||||||
self.unlock_button = tk.Button(self.body, font =('Verdana', 15), command=self.unlock_frame)
|
|
||||||
self.unlock_button['image'] = unlock_icon
|
|
||||||
self.unlock_button['compound'] = tk.TOP
|
|
||||||
self.unlock_button['text'] = ' Unlock \nFolder'
|
|
||||||
self.unlock_button.configure(width=120, height=120)
|
|
||||||
self.unlock_button.grid(row=0, column=1, padx=(30,0), pady=(20,7))
|
|
||||||
|
|
||||||
def lock_frame(self):
|
|
||||||
self.body.destroy()
|
|
||||||
self.body_frame()
|
|
||||||
|
|
||||||
self.status.configure(state='normal')
|
|
||||||
self.status.delete(1.0, tk.END)
|
|
||||||
self.status.insert(tk.END, 'Choose a folder, enter password and click lock\n')
|
|
||||||
self.status.insert(tk.END, 'folder to lock and hide the folder')
|
|
||||||
self.status.configure(state='disabled')
|
|
||||||
|
|
||||||
self.password = tk.StringVar()
|
|
||||||
|
|
||||||
self.pathlabel = tk.Label(self.body, bg='white', fg='black',
|
|
||||||
borderwidth=1, relief='groove', wraplength=150)
|
|
||||||
self.pathlabel['text'] = 'Select Folder'
|
|
||||||
self.pathlabel.configure(width=22, height=3)
|
|
||||||
self.pathlabel.grid(row=0, column=0, pady=10, padx=15)
|
|
||||||
|
|
||||||
self.choose_folder = tk.Button(self.body, image=choose_folder_icon)
|
|
||||||
self.choose_folder['command'] = self.select_folder
|
|
||||||
self.choose_folder.grid(row=0, column=1, padx=(20,5), pady=10)
|
|
||||||
|
|
||||||
self.back = tk.Button(self.body, image=back_icon)
|
|
||||||
self.back['command'] = self.go_back
|
|
||||||
self.back.grid(row=0, column=2, padx=(20,5), pady=10)
|
|
||||||
|
|
||||||
self.elabel = tk.Label(self.body, anchor='e')
|
|
||||||
self.elabel['text'] = 'Enter Password'
|
|
||||||
self.elabel.grid(row=1, column=0, pady=20)
|
|
||||||
|
|
||||||
self.entry = tk.Entry(self.body)
|
|
||||||
self.entry['textvariable'] = self.password
|
|
||||||
self.entry.grid(row=1, column=1, columnspan=2, pady=20)
|
|
||||||
|
|
||||||
self.lock =tk.Button(self.body, bg='green', width=20)
|
|
||||||
self.lock['text'] = f'Lock Folder'
|
|
||||||
self.lock['command'] = lambda : self.lock_folder(self.folder_path)
|
|
||||||
self.lock.grid(row=2, column=0, columnspan=3)
|
|
||||||
|
|
||||||
def unlock_frame(self):
|
|
||||||
self.body.destroy()
|
|
||||||
self.body_frame()
|
|
||||||
|
|
||||||
self.password = tk.StringVar()
|
|
||||||
|
|
||||||
self.pathlabel = tk.Label(self.body, bg='white', fg='black',
|
|
||||||
borderwidth=1, relief='groove', wraplength=150)
|
|
||||||
self.pathlabel['text'] = 'Select Folder'
|
|
||||||
self.pathlabel.configure(width=22, height=3)
|
|
||||||
self.pathlabel.grid(row=0, column=0, pady=2, padx=15)
|
|
||||||
|
|
||||||
self.back = tk.Button(self.body, image=back_icon)
|
|
||||||
self.back['command'] = self.go_back
|
|
||||||
self.back.grid(row=0, column=1, padx=(20,5), pady=2)
|
|
||||||
|
|
||||||
self.scrollbar = tk.Scrollbar(self.body, orient=tk.VERTICAL)
|
|
||||||
self.scrollbar.grid(row=0,column=3, rowspan=4, sticky='ns')
|
|
||||||
|
|
||||||
self.list = tk.Listbox(self.body, selectmode=tk.SINGLE,
|
|
||||||
yscrollcommand=self.scrollbar.set, selectbackground='sky blue')
|
|
||||||
self.list.config(height=10)
|
|
||||||
self.enumerate_folders()
|
|
||||||
self.list.bind('<Double-1>', self.get_folder)
|
|
||||||
|
|
||||||
self.scrollbar.config(command=self.list.yview)
|
|
||||||
self.list.grid(row=0, column=2, rowspan=4)
|
|
||||||
|
|
||||||
self.elabel = tk.Label(self.body, anchor='e')
|
|
||||||
self.elabel['text'] = 'Enter Password'
|
|
||||||
self.elabel.grid(row=1, column=0, columnspan=2, pady=(1,1))
|
|
||||||
|
|
||||||
self.entry = tk.Entry(self.body)
|
|
||||||
self.entry['textvariable'] = self.password
|
|
||||||
self.entry.grid(row=2, column=0, columnspan=2)
|
|
||||||
|
|
||||||
self.unlock =tk.Button(self.body, bg='green', width=20)
|
|
||||||
self.unlock['text'] = f'Unlock Folder'
|
|
||||||
self.unlock['command'] = lambda : self.unlock_folder(self.fname)
|
|
||||||
self.unlock.grid(row=3, column=0, columnspan=2, pady=(10,0))
|
|
||||||
|
|
||||||
def go_back(self):
|
|
||||||
self.body.destroy()
|
|
||||||
self.main_frame()
|
|
||||||
|
|
||||||
self.status.configure(state='normal')
|
|
||||||
self.status.delete(1.0, tk.END)
|
|
||||||
self.status.insert(tk.END, 'The folder you lock will be hidden automatically\n')
|
|
||||||
self.status.insert(tk.END, 'Use the app to unlock it back')
|
|
||||||
self.status.configure(state='disabled')
|
|
||||||
|
|
||||||
def select_folder(self):
|
|
||||||
self.folder_path = filedialog.askdirectory(initialdir=cwd)
|
|
||||||
self.pathlabel['anchor'] = 'w'
|
|
||||||
self.pathlabel['text'] = self.folder_path
|
|
||||||
|
|
||||||
def enumerate_folders(self):
|
|
||||||
self.dct = locker.read_json()
|
|
||||||
self.folders_list = list(self.dct.keys())
|
|
||||||
|
|
||||||
self.status.configure(state='normal')
|
|
||||||
self.status.delete(1.0, tk.END)
|
|
||||||
|
|
||||||
if len(self.folders_list) > 0:
|
|
||||||
for index, fname in enumerate(self.folders_list):
|
|
||||||
self.list.insert(index, fname)
|
|
||||||
self.status.insert(tk.END, 'Choose a folder, enter password and click unlock\n')
|
|
||||||
self.status.insert(tk.END, 'folder to unlock the folder')
|
|
||||||
else:
|
|
||||||
self.status.insert(tk.END, '0 folders locked yet\n')
|
|
||||||
|
|
||||||
self.status.configure(state='disabled')
|
|
||||||
|
|
||||||
def get_folder(self, event):
|
|
||||||
if event is not None:
|
|
||||||
self.current = self.list.curselection()[0]
|
|
||||||
self.folder_path = self.dct[self.folders_list[self.current]][0]
|
|
||||||
self.key = self.dct[self.folders_list[self.current]][1]
|
|
||||||
self.pathlabel['text'] = self.folder_path
|
|
||||||
|
|
||||||
def lock_folder(self, path):
|
|
||||||
password = self.entry.get()
|
|
||||||
if not self.folder_path == '':
|
|
||||||
if len(password) <= 4:
|
|
||||||
messagebox.showerror('Failed to lock', 'password is too short')
|
|
||||||
else:
|
|
||||||
status = locker.lock(self.folder_path, password)
|
|
||||||
if status == 'failed':
|
|
||||||
messagebox.showerror('Failed to lock', 'A folder with this name already locked')
|
|
||||||
else:
|
|
||||||
messagebox.showinfo('Folder status', 'Locked successfully')
|
|
||||||
self.password.set('')
|
|
||||||
self.pathlabel['anchor'] = 'c'
|
|
||||||
self.pathlabel['text'] = 'Select Folder'
|
|
||||||
|
|
||||||
def unlock_folder(self, fname):
|
|
||||||
password = self.entry.get()
|
|
||||||
if not self.folder_path == '':
|
|
||||||
if len(password) <= 4:
|
|
||||||
messagebox.showerror('Failed to unlock', 'password is too short')
|
|
||||||
else:
|
|
||||||
status = locker.unlock(self.folder_path, password, self.key)
|
|
||||||
if status == 'failed':
|
|
||||||
messagebox.showerror('Failed to unlock', 'Incorrect Password')
|
|
||||||
else:
|
|
||||||
messagebox.showinfo('Folder status', 'Folder unlocked successfully')
|
|
||||||
self.password.set('')
|
|
||||||
self.pathlabel['anchor'] = 'c'
|
|
||||||
self.pathlabel['text'] = 'Select Folder'
|
|
||||||
self.list.delete(0, tk.END)
|
|
||||||
self.enumerate_folders()
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
root = tk.Tk()
|
|
||||||
root.geometry('400x305')
|
|
||||||
root.title('Folder Locker/Unlocker')
|
|
||||||
root.resizable(0,0)
|
|
||||||
|
|
||||||
lock_icon = PhotoImage(file='icons/lock.png').subsample(2,2)
|
|
||||||
unlock_icon = PhotoImage(file='icons/unlock.png').subsample(2,2)
|
|
||||||
back_icon = PhotoImage(file='icons/back.png')
|
|
||||||
choose_folder_icon = PhotoImage(file='icons/choose_folder.png')
|
|
||||||
|
|
||||||
app = Application(master=root)
|
|
||||||
app.mainloop()
|
|
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 5.8 KiB |
|
@ -1,84 +0,0 @@
|
||||||
import os
|
|
||||||
import json
|
|
||||||
import shelve
|
|
||||||
import random
|
|
||||||
import subprocess
|
|
||||||
|
|
||||||
def read_json():
|
|
||||||
json_file = 'files/locked_folders.json'
|
|
||||||
if os.path.exists(json_file):
|
|
||||||
with open(json_file, 'r') as file:
|
|
||||||
dct = json.load(file)
|
|
||||||
else:
|
|
||||||
dct = {}
|
|
||||||
|
|
||||||
return dct
|
|
||||||
|
|
||||||
def write_to_json(data):
|
|
||||||
json_file = 'files/locked_folders.json'
|
|
||||||
with open(json_file, 'w') as file:
|
|
||||||
json.dump(data, file)
|
|
||||||
|
|
||||||
def get_from_json(fname):
|
|
||||||
dct = read_json()
|
|
||||||
return dct.get(fname, None)
|
|
||||||
|
|
||||||
# Locker/Unlocker ----------------------------------------------------------------
|
|
||||||
|
|
||||||
def generate_key():
|
|
||||||
string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'
|
|
||||||
keygen = random.sample(string, 12)
|
|
||||||
return ''.join(keygen)
|
|
||||||
|
|
||||||
def lock(fpath, password):
|
|
||||||
key = generate_key()
|
|
||||||
|
|
||||||
fname = os.path.basename(fpath)
|
|
||||||
cwd = '/'.join(fpath.split('/')[:-1]) + '/'
|
|
||||||
command1 = 'ren ' + fname + ' "Control Panel.{21EC2020-3AEA-1069-A2DD-' + key + '}"'
|
|
||||||
command2 = 'attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-' + key + '}"'
|
|
||||||
|
|
||||||
dct = read_json()
|
|
||||||
|
|
||||||
if not fname in dct.keys():
|
|
||||||
dct[fname] = [fpath, key]
|
|
||||||
write_to_json(dct)
|
|
||||||
|
|
||||||
with shelve.open('files/pwd') as pwd_manager:
|
|
||||||
pwd_manager[fname] = password
|
|
||||||
|
|
||||||
subprocess.call(command1, shell=True, cwd=cwd)
|
|
||||||
subprocess.call(command2, shell=True, cwd=cwd)
|
|
||||||
|
|
||||||
status = 'locked'
|
|
||||||
else:
|
|
||||||
status = 'failed'
|
|
||||||
|
|
||||||
return status
|
|
||||||
|
|
||||||
|
|
||||||
def unlock(fpath, password, key):
|
|
||||||
fname = os.path.basename(fpath)
|
|
||||||
cwd = '/'.join(fpath.split('/')[:-1]) + '/'
|
|
||||||
command1 = 'attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-' + key + '}"'
|
|
||||||
command2 = 'ren "Control Panel.{21EC2020-3AEA-1069-A2DD-' + key + '}" ' + fname
|
|
||||||
|
|
||||||
with shelve.open('files/pwd') as pwd_manager:
|
|
||||||
pass_ = pwd_manager[fname]
|
|
||||||
|
|
||||||
if pass_ == password:
|
|
||||||
dct = read_json()
|
|
||||||
del dct[fname]
|
|
||||||
write_to_json(dct)
|
|
||||||
|
|
||||||
subprocess.call(command1, shell=True, cwd=cwd)
|
|
||||||
subprocess.call(command2, shell=True, cwd=cwd)
|
|
||||||
|
|
||||||
with shelve.open('files/pwd') as pwd_manager:
|
|
||||||
del pwd_manager[fname]
|
|
||||||
|
|
||||||
status = 'unlocked'
|
|
||||||
else:
|
|
||||||
status = 'failed'
|
|
||||||
|
|
||||||
return status
|
|
|
@ -1,39 +0,0 @@
|
||||||
# Folder Locker & Hider
|
|
||||||
|
|
||||||
[![forthebadge](https://forthebadge.com/images/badges/built-with-love.svg)](https://forthebadge.com)
|
|
||||||
[![forthebadge](https://forthebadge.com/images/badges/built-with-swag.svg)](https://forthebadge.com)
|
|
||||||
[![forthebadge](https://forthebadge.com/images/badges/made-with-python.svg)](https://forthebadge.com)
|
|
||||||
|
|
||||||
Folder Locker & Hider is a simple python tkinter based application to lock / unlock and hide folders
|
|
||||||
using simple windows property
|
|
||||||
|
|
||||||
![Alt text](app.png?raw=true "Folder Locker & Hider")
|
|
||||||
|
|
||||||
This app is only for windows platform
|
|
||||||
|
|
||||||
## How to Download
|
|
||||||
|
|
||||||
Download this project from here [Download Folder Locker & Hider](https://downgit.github.io/#/home?url=https://github.com/pyGuru123/Tkinter-Applications/tree/master/Folder%20Locker%20%26%20Hider)
|
|
||||||
|
|
||||||
## Requirements
|
|
||||||
|
|
||||||
No external package is required
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
Double click the application.pyw script to open the GUI application, then
|
|
||||||
|
|
||||||
to lock folder:
|
|
||||||
click the lock folder button, select the folder that you want to lock, enter a password and then click lock folder button to lock the folder, the folder will now be hidden automatically.
|
|
||||||
|
|
||||||
password should be greater than 4 digits in length, the locked folder can only be unlocked by using this app, also the folder will not show wven when show hidden items is checked
|
|
||||||
|
|
||||||
to unlock folder:
|
|
||||||
click the unlock folder button, select the locked folder name from the listbox on the right [double click it], then enter the correct password and unlock it by click the unlock folder button.
|
|
||||||
The folder will now be unhidden automatically
|
|
||||||
|
|
||||||
|
|
||||||
## Contributing
|
|
||||||
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
|
|
||||||
|
|
||||||
Please make sure to update tests as appropriate.
|
|
|
@ -1,2 +0,0 @@
|
||||||
Example.txt
|
|
||||||
example.exe
|
|
|
@ -1,127 +0,0 @@
|
||||||
# Imports
|
|
||||||
import os
|
|
||||||
import json
|
|
||||||
import shutil
|
|
||||||
|
|
||||||
|
|
||||||
# Main
|
|
||||||
if __name__ == "__main__":
|
|
||||||
ext = 0
|
|
||||||
def folder_manager(path,exception_file,extensions):
|
|
||||||
global ext
|
|
||||||
# Doing intial checks whether all inputs are valid or not.
|
|
||||||
#----------------------------------------------------------------------------------------------------------------
|
|
||||||
# Importing content of Exception file into a set.
|
|
||||||
with open(exception_file,'r',encoding='utf-8') as exct_file:
|
|
||||||
execptions = exct_file.read()
|
|
||||||
execptions = set(execptions.split('\n'))
|
|
||||||
|
|
||||||
# Changing directory to give path.
|
|
||||||
if os.path.isdir(path):
|
|
||||||
os.chdir(path)
|
|
||||||
|
|
||||||
# Checking if input extension is list or not.
|
|
||||||
if type( extensions) is not list:
|
|
||||||
raise Exception('Expected a list object.')
|
|
||||||
extensions = set( extensions)
|
|
||||||
|
|
||||||
# Capitalizing all files except the Exceptions. (Folders remains untouched)
|
|
||||||
#----------------------------------------------------------------------------------------------------------------
|
|
||||||
# Generating a list of all files in path folder except Exceptions.
|
|
||||||
all_files = {file.lower() for file in os.listdir(path) if os.path.isfile(file)}
|
|
||||||
all_files = all_files - execptions
|
|
||||||
|
|
||||||
# Capitalizing all file names in all_files list.
|
|
||||||
for file in all_files:
|
|
||||||
_name, _ext = os.path.splitext(file)
|
|
||||||
os.rename(os.path.join(path,file),('.'.join([_name.title(),_ext[1:]])))
|
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------------------------------------------------
|
|
||||||
# Generating a list of files which needs to be renamed as numbers. (i.e. is input extensions)
|
|
||||||
rename_files = {file for file in all_files if file.split('.')[1] in extensions}
|
|
||||||
|
|
||||||
# Creating a folder named according to the file extensions and dumping the files in the folder.
|
|
||||||
for file_ in rename_files:
|
|
||||||
# Needed Variables
|
|
||||||
name, ext = os.path.splitext(file_)
|
|
||||||
ext = ext[1:]
|
|
||||||
folder_name = ext
|
|
||||||
|
|
||||||
|
|
||||||
# Code that creates a folder and dump the files in it.
|
|
||||||
if ext == '':
|
|
||||||
continue
|
|
||||||
|
|
||||||
if os.path.exists(os.path.join(path,ext)):
|
|
||||||
os.rename(os.path.join(path,ext),os.path.join(path,ext))
|
|
||||||
shutil.move(os.path.join(path,file_),os.path.join(path,ext,file_))
|
|
||||||
|
|
||||||
else:
|
|
||||||
if os.path.exists(os.path.join(path,folder_name)):
|
|
||||||
shutil.move(os.path.join(path,file_),os.path.join(path,folder_name,file_))
|
|
||||||
|
|
||||||
else:
|
|
||||||
os.makedirs(os.path.join(path,folder_name))
|
|
||||||
shutil.move(os.path.join(path,file_),os.path.join(path,folder_name,file_))
|
|
||||||
|
|
||||||
# Deleting Empty Folders, Non-empty Folders are untouched and clearing up some mess created earlier.
|
|
||||||
#----------------------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
for folder in os.listdir(path):
|
|
||||||
# Deleted Empty folders
|
|
||||||
if os.path.isdir(folder):
|
|
||||||
if len(os.listdir(os.path.join(path,folder))) == 0:
|
|
||||||
os.rmdir(os.path.join(path,folder))
|
|
||||||
continue
|
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
def code_runner():
|
|
||||||
|
|
||||||
# Taking user input for Path.
|
|
||||||
#----------------------------------------------------------------------------------------------------------------------
|
|
||||||
path = input('\nEnter the Path of folder you want to Manage.\nPlease make sure what this script does by reading the Readme.md file.\nEnter Here : ')
|
|
||||||
while os.path.isdir(path) == False:
|
|
||||||
print('The given path is not valid! Please enter a correct Path.')
|
|
||||||
path = input('\nEnter the Path of folder you want to Manage.\nPlease make sure what this script does by reading the Readme.md\nEnter Here : ')
|
|
||||||
if os.path.isdir(path) == True:
|
|
||||||
break
|
|
||||||
|
|
||||||
# Taking user input for Exception file.
|
|
||||||
#----------------------------------------------------------------------------------------------------------------------
|
|
||||||
exception_file = input('\nEnter the path of Exception file.\nEnter here : ')
|
|
||||||
while os.path.isfile(exception_file) == False:
|
|
||||||
print('The given path is not valid! Please enter a correct Path.')
|
|
||||||
exception_file = input('\nEnter the path of Exception file.\nEnter here : ')
|
|
||||||
if os.path.isfile(exception_file) == True:
|
|
||||||
break
|
|
||||||
|
|
||||||
# Taking user input for extensions.
|
|
||||||
#----------------------------------------------------------------------------------------------------------------------
|
|
||||||
with open('all-file-extensions.json','r') as json_pointer:
|
|
||||||
json_file_exts = json.load(json_pointer)
|
|
||||||
|
|
||||||
extensions = input('\nEnter extensions of files you want to dump.\nExample - \"dll,exe,txt\" .Don\'t enclose in Inverted commas and seperate extensions with comma.\nEnter here : ')
|
|
||||||
extensions = extensions.replace(' ','')
|
|
||||||
extensions = extensions.split(',')
|
|
||||||
|
|
||||||
for ext in extensions:
|
|
||||||
ext_json = ext.upper()
|
|
||||||
while ext_json not in json_file_exts:
|
|
||||||
print(f'{ext} is a Invalid extension! Please Enter a valid extension.')
|
|
||||||
extensions = input('\nEnter extensions of files you want to dump.\nExample - \"dll,exe,txt\" .Don\'t enclose in Inverted commas and seperate extensions with comma.\nEnter here : ')
|
|
||||||
extensions = extensions.replace(' ','')
|
|
||||||
extensions = extensions.split(',')
|
|
||||||
for ext in extensions:
|
|
||||||
ext_json = ext.upper()
|
|
||||||
if ext_json in json_file_exts:
|
|
||||||
break
|
|
||||||
|
|
||||||
|
|
||||||
folder_manager(path=path,exception_file=exception_file, extensions= extensions)
|
|
||||||
print('\nCompleted! Thanks for using this script.')
|
|
||||||
|
|
||||||
code_runner()
|
|
|
@ -1,32 +0,0 @@
|
||||||
# Folder_Manager
|
|
||||||
|
|
||||||
## About
|
|
||||||
|
|
||||||
### This script is used to make your Folder tidy by capitalizing the first letters of your File names. And this program also dumps wanted files into a new folder named according to the file extensions. Please see the images give below to understand better:
|
|
||||||
|
|
||||||
### Before
|
|
||||||
![Before](https://i.imgur.com/CabHHHt.png)
|
|
||||||
|
|
||||||
### After
|
|
||||||
![After](https://i.imgur.com/kfqikco.png)
|
|
||||||
|
|
||||||
### As you can see the files are dumped to a new folder and all rest files are Capitalized. This program only dumps the file after asking a extension name of the file like if you want to dump <i>.txt and .dll</i> files then enter "txt,dll" when asked. This script doesn't touch Subfolders so don't worry to getting your data messed up and if you want to made some file as <i>Exception</i> then Enter the name of the files in <i>Exception.txt</i> separated by a newline character. Don't worry I know I'm going to comprehensive you can see the below image to clear your issues :
|
|
||||||
|
|
||||||
### Code ran in CMD.
|
|
||||||
![Code](https://i.imgur.com/54SR6YD.png)
|
|
||||||
|
|
||||||
### Exceptions File
|
|
||||||
|
|
||||||
![Exception.txt](https://i.imgur.com/0Vyqsly.png)
|
|
||||||
|
|
||||||
|
|
||||||
## Some Important Warnings
|
|
||||||
|
|
||||||
+ ### All files present in this directory is needed to run the code (except README.md). So don't delete or rename any files. Important files:-
|
|
||||||
- #### all-file-extensions.json
|
|
||||||
- #### Exception.txt
|
|
||||||
- #### Folder_Manager.py
|
|
||||||
+ ### Just follow the instructions carefully this program may throw errors if exploited. I did handle the most Errors I can but make sure to do follow the instructions.
|
|
||||||
+ ### And please don't do any changes in Main Code if you don't know what is it.
|
|
||||||
|
|
||||||
### After Reading README simply run the code in any terminal.
|
|
|
@ -1,15 +0,0 @@
|
||||||
# Github Repo Creator
|
|
||||||
A simple python script which will take git username , git token, git repo name and description from user and it will create a github repo.
|
|
||||||
|
|
||||||
## How to create github token [https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token]
|
|
||||||
|
|
||||||
## Libraries Required
|
|
||||||
1. Requests: HTTP for Humans
|
|
||||||
`$pip install requests`
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
1. Go to the script's folder and open command prompt.
|
|
||||||
2. Run command : `$python3 git_repo_creator.py
|
|
||||||
|
|
||||||
## Example
|
|
||||||
`$python3 git_repo_creator.py
|
|
|
@ -1,33 +0,0 @@
|
||||||
# Script Name : git_repo_creator.py
|
|
||||||
# Author : Harish Tiwari
|
|
||||||
# Created : 2nd October 2020
|
|
||||||
# Last Modified : -
|
|
||||||
# Version : 1.0.0
|
|
||||||
|
|
||||||
# Modifications :
|
|
||||||
|
|
||||||
# Description : This python script will create a github repo from command line.
|
|
||||||
|
|
||||||
import requests
|
|
||||||
import json
|
|
||||||
|
|
||||||
user_name = input("Enter your github user name: ")
|
|
||||||
print(user_name)
|
|
||||||
|
|
||||||
github_token = input("Enter your github token: ")
|
|
||||||
print(github_token)
|
|
||||||
|
|
||||||
repo_name = input("Enter your repo Name: ")
|
|
||||||
print(repo_name)
|
|
||||||
|
|
||||||
repo_description = input("Enter your repo description: ")
|
|
||||||
print(repo_description)
|
|
||||||
|
|
||||||
payload = {'name': repo_name, 'description': repo_description, 'auto_init': 'true'}
|
|
||||||
repo_request = requests.post('https://api.github.com/' + 'user/repos', auth=(user_name,github_token), data=json.dumps(payload))
|
|
||||||
if repo_request.status_code == 422:
|
|
||||||
print("Github repo already exists try wih other name.")
|
|
||||||
elif repo_request.status_code == 201:
|
|
||||||
print("Github repo has created successfully.")
|
|
||||||
elif repo_request.status_code == 401:
|
|
||||||
print("You are unauthorized user for this action.")
|
|
|
@ -1,9 +0,0 @@
|
||||||
# Github_Bot
|
|
||||||
A CLI tool to get github user and repository details.
|
|
||||||
|
|
||||||
```
|
|
||||||
>python main.py -f user -l username
|
|
||||||
>python main.py -f repo -l username reponame
|
|
||||||
```
|
|
||||||
|
|
||||||
![](readme_assets/img.png)
|
|
|
@ -1,49 +0,0 @@
|
||||||
import requests
|
|
||||||
import json
|
|
||||||
import argparse
|
|
||||||
|
|
||||||
ap = argparse.ArgumentParser()
|
|
||||||
ap.add_argument("-f", "--function", required=True, help="user details or repo details")
|
|
||||||
ap.add_argument("-l", "--list", required=True, metavar="", nargs='+', default=[], help="handle and repo")
|
|
||||||
args = vars(ap.parse_args())
|
|
||||||
|
|
||||||
class GithubBot():
|
|
||||||
def __init__(self):
|
|
||||||
print('******************* GITHUB CLI TOOL *********************')
|
|
||||||
self.base_url = "https://api.github.com/"
|
|
||||||
|
|
||||||
def get_user_details(self, args):
|
|
||||||
url = self.base_url + "users/" + args[0]
|
|
||||||
res = requests.get(url)
|
|
||||||
print('*********** USER:', args[0], '***************')
|
|
||||||
if res.status_code == 200:
|
|
||||||
data = json.loads(res.text)
|
|
||||||
print("NAME: ", data["name"])
|
|
||||||
print("BIO: ", data["bio"])
|
|
||||||
print("LOCATION: ", data["location"])
|
|
||||||
print("FOLLOWERS COUNT: ", data["followers"])
|
|
||||||
print("FOLLOWING COUNT: ", data["following"])
|
|
||||||
else:
|
|
||||||
print("Error getting details")
|
|
||||||
|
|
||||||
def get_repo_details(self, args):
|
|
||||||
url = self.base_url + "repos/" + args[0] + "/" + args[1]
|
|
||||||
res = requests.get(url)
|
|
||||||
print('********* USER:', args[0], '| REPO:', args[1], '*********')
|
|
||||||
if res.status_code == 200:
|
|
||||||
data = json.loads(res.text)
|
|
||||||
print("URL: ", data["svn_url"])
|
|
||||||
print("STARS: ", data["stargazers_count"])
|
|
||||||
print("FORKS: ", data["forks"])
|
|
||||||
print("LANGUAGE: ", data["language"])
|
|
||||||
else:
|
|
||||||
print("Error getting details")
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
obj = GithubBot()
|
|
||||||
function_map = {
|
|
||||||
'user': obj.get_user_details,
|
|
||||||
'repo': obj.get_repo_details,
|
|
||||||
}
|
|
||||||
function_map[args['function']](args['list'])
|
|
||||||
|
|
Before Width: | Height: | Size: 30 KiB |
|
@ -1,5 +0,0 @@
|
||||||
certifi==2020.6.20
|
|
||||||
chardet==3.0.4
|
|
||||||
idna==2.10
|
|
||||||
requests==2.24.0
|
|
||||||
urllib3==1.26.5
|
|
|
@ -1,73 +0,0 @@
|
||||||
import cv2
|
|
||||||
import numpy
|
|
||||||
|
|
||||||
def hello(x):
|
|
||||||
print("")
|
|
||||||
|
|
||||||
if __name__=='__main__':
|
|
||||||
cap = cv2.VideoCapture(0)
|
|
||||||
bars = cv2.namedWindow("bars")
|
|
||||||
|
|
||||||
cv2.createTrackbar("upper_hue","bars",110,180,hello)
|
|
||||||
cv2.createTrackbar("upper_saturation","bars",255, 255, hello)
|
|
||||||
cv2.createTrackbar("upper_value","bars",255, 255, hello)
|
|
||||||
cv2.createTrackbar("lower_hue","bars",68,180, hello)
|
|
||||||
cv2.createTrackbar("lower_saturation","bars",55, 255, hello)
|
|
||||||
cv2.createTrackbar("lower_value","bars",54, 255, hello)
|
|
||||||
|
|
||||||
#Capturing the initial frame for creation of background
|
|
||||||
while(True):
|
|
||||||
cv2.waitKey(1000)
|
|
||||||
ret,init_frame = cap.read()
|
|
||||||
if(ret):
|
|
||||||
break
|
|
||||||
|
|
||||||
while(True):
|
|
||||||
ret,frame = cap.read()
|
|
||||||
inspect = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)
|
|
||||||
|
|
||||||
#getting the HSV values for masking the cloak
|
|
||||||
upper_hue = cv2.getTrackbarPos("upper_hue", "bars")
|
|
||||||
upper_saturation = cv2.getTrackbarPos("upper_saturation", "bars")
|
|
||||||
upper_value = cv2.getTrackbarPos("upper_value", "bars")
|
|
||||||
lower_value = cv2.getTrackbarPos("lower_value","bars")
|
|
||||||
lower_hue = cv2.getTrackbarPos("lower_hue","bars")
|
|
||||||
lower_saturation = cv2.getTrackbarPos("lower_saturation","bars")
|
|
||||||
|
|
||||||
#Kernel to be used for dilation
|
|
||||||
kernel = numpy.ones((3,3),numpy.uint8)
|
|
||||||
|
|
||||||
upper_hsv = numpy.array([upper_hue,upper_saturation,upper_value])
|
|
||||||
lower_hsv = numpy.array([lower_hue,lower_saturation,lower_value])
|
|
||||||
|
|
||||||
mask = cv2.inRange(inspect, lower_hsv, upper_hsv)
|
|
||||||
mask = cv2.medianBlur(mask,3)
|
|
||||||
mask_inv = 255-mask
|
|
||||||
mask = cv2.dilate(mask,kernel,5)
|
|
||||||
|
|
||||||
#The mixing of frames in a combination to achieve the required frame
|
|
||||||
b = frame[:,:,0]
|
|
||||||
g = frame[:,:,1]
|
|
||||||
r = frame[:,:,2]
|
|
||||||
b = cv2.bitwise_and(mask_inv, b)
|
|
||||||
g = cv2.bitwise_and(mask_inv, g)
|
|
||||||
r = cv2.bitwise_and(mask_inv, r)
|
|
||||||
frame_inv = cv2.merge((b,g,r))
|
|
||||||
|
|
||||||
b = init_frame[:,:,0]
|
|
||||||
g = init_frame[:,:,1]
|
|
||||||
r = init_frame[:,:,2]
|
|
||||||
b = cv2.bitwise_and(b,mask)
|
|
||||||
g = cv2.bitwise_and(g,mask)
|
|
||||||
r = cv2.bitwise_and(r,mask)
|
|
||||||
blanket_area = cv2.merge((b,g,r))
|
|
||||||
|
|
||||||
final = cv2.bitwise_or(frame_inv, blanket_area)
|
|
||||||
|
|
||||||
cv2.imshow("Harry's Cloak",final)
|
|
||||||
|
|
||||||
if(cv2.waitKey(3) == ord('q')):
|
|
||||||
break;
|
|
||||||
|
|
||||||
cv2.destroyAllWindows()
|
|
||||||
cap.release()
|
|
|
@ -1,6 +0,0 @@
|
||||||
## Harry Potter Cloak using OpenCV
|
|
||||||
|
|
||||||
This is a fun python script to simulate a harry potter cloak using image masking with the help of opencv library.
|
|
||||||
It also uses the numpy library for some mathematical calculations.
|
|
||||||
|
|
||||||
Requirements: You will need Python installed on your system along with numpy and opencv library for this script to work properly.
|
|
|
@ -1,2 +0,0 @@
|
||||||
numpy
|
|
||||||
opencv
|
|
104
IMDBQuerier/.gitignore
vendored
|
@ -1,104 +0,0 @@
|
||||||
# Byte-compiled / optimized / DLL files
|
|
||||||
__pycache__/
|
|
||||||
*.py[cod]
|
|
||||||
*$py.class
|
|
||||||
|
|
||||||
# C extensions
|
|
||||||
*.so
|
|
||||||
|
|
||||||
# Distribution / packaging
|
|
||||||
.Python
|
|
||||||
build/
|
|
||||||
develop-eggs/
|
|
||||||
dist/
|
|
||||||
downloads/
|
|
||||||
eggs/
|
|
||||||
.eggs/
|
|
||||||
lib/
|
|
||||||
lib64/
|
|
||||||
parts/
|
|
||||||
sdist/
|
|
||||||
var/
|
|
||||||
wheels/
|
|
||||||
*.egg-info/
|
|
||||||
.installed.cfg
|
|
||||||
*.egg
|
|
||||||
MANIFEST
|
|
||||||
|
|
||||||
# PyInstaller
|
|
||||||
# Usually these files are written by a python script from a template
|
|
||||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
||||||
*.manifest
|
|
||||||
*.spec
|
|
||||||
|
|
||||||
# Installer logs
|
|
||||||
pip-log.txt
|
|
||||||
pip-delete-this-directory.txt
|
|
||||||
|
|
||||||
# Unit test / coverage reports
|
|
||||||
htmlcov/
|
|
||||||
.tox/
|
|
||||||
.coverage
|
|
||||||
.coverage.*
|
|
||||||
.cache
|
|
||||||
nosetests.xml
|
|
||||||
coverage.xml
|
|
||||||
*.cover
|
|
||||||
.hypothesis/
|
|
||||||
.pytest_cache/
|
|
||||||
|
|
||||||
# Translations
|
|
||||||
*.mo
|
|
||||||
*.pot
|
|
||||||
|
|
||||||
# Django stuff:
|
|
||||||
*.log
|
|
||||||
local_settings.py
|
|
||||||
db.sqlite3
|
|
||||||
|
|
||||||
# Flask stuff:
|
|
||||||
instance/
|
|
||||||
.webassets-cache
|
|
||||||
|
|
||||||
# Scrapy stuff:
|
|
||||||
.scrapy
|
|
||||||
|
|
||||||
# Sphinx documentation
|
|
||||||
docs/_build/
|
|
||||||
|
|
||||||
# PyBuilder
|
|
||||||
target/
|
|
||||||
|
|
||||||
# Jupyter Notebook
|
|
||||||
.ipynb_checkpoints
|
|
||||||
|
|
||||||
# pyenv
|
|
||||||
.python-version
|
|
||||||
|
|
||||||
# celery beat schedule file
|
|
||||||
celerybeat-schedule
|
|
||||||
|
|
||||||
# SageMath parsed files
|
|
||||||
*.sage.py
|
|
||||||
|
|
||||||
# Environments
|
|
||||||
.env
|
|
||||||
.venv
|
|
||||||
env/
|
|
||||||
venv/
|
|
||||||
ENV/
|
|
||||||
env.bak/
|
|
||||||
venv.bak/
|
|
||||||
|
|
||||||
# Spyder project settings
|
|
||||||
.spyderproject
|
|
||||||
.spyproject
|
|
||||||
|
|
||||||
# Rope project settings
|
|
||||||
.ropeproject
|
|
||||||
|
|
||||||
# mkdocs documentation
|
|
||||||
/site
|
|
||||||
|
|
||||||
# mypy
|
|
||||||
.mypy_cache/
|
|
|
@ -1,40 +0,0 @@
|
||||||
"""
|
|
||||||
Represents the film objects in the list.
|
|
||||||
"""
|
|
||||||
|
|
||||||
class Film(object):
|
|
||||||
def __init__(self, f_name, f_year, f_rating, f_genres,
|
|
||||||
f_runtime, f_storyline, f_type, f_img_source, f_link):
|
|
||||||
self.name = f_name
|
|
||||||
self.year = f_year
|
|
||||||
self.rating = f_rating
|
|
||||||
self.genres = f_genres
|
|
||||||
self.runtime = f_runtime
|
|
||||||
self.storyline = f_storyline
|
|
||||||
self.type = f_type
|
|
||||||
self.image_source = f_img_source
|
|
||||||
self.imdb_link = f_link
|
|
||||||
|
|
||||||
|
|
||||||
def print_film(self):
|
|
||||||
print("Film, ", self.name)
|
|
||||||
print("Year ", self.year)
|
|
||||||
print('Rating', self.rating)
|
|
||||||
print("Genres", self.genres)
|
|
||||||
print('Runtime', self.runtime)
|
|
||||||
print('Storyline', self.storyline)
|
|
||||||
print('Type,', self.type)
|
|
||||||
|
|
||||||
def get_genres_string(self):
|
|
||||||
sep = ', '
|
|
||||||
return sep.join(self.genres)
|
|
||||||
|
|
||||||
def get_image_html(self):
|
|
||||||
return '<a href="https://www.imdb.com%s"> <img alt="%s" height="209" width="140" src="%s" > </a>' % (self.imdb_link, self.name, self.image_source)
|
|
||||||
|
|
||||||
def get_title(self):
|
|
||||||
return '<a href="https://www.imdb.com%s"><h4> %s </h4></a>' % (self.imdb_link, self.name)
|
|
||||||
|
|
||||||
|
|
||||||
def get_rating(self):
|
|
||||||
return '<span class="rating"> %s </span>' % str((self.rating / 10))
|
|
|
@ -1,43 +0,0 @@
|
||||||
# IMDBQuerier
|
|
||||||
|
|
||||||
This project is written to parsing films from IMDB user lists based on some attributes. It uses Selenium and BeautifulSoup to obtain and parse the film data.
|
|
||||||
|
|
||||||
Until now, the project can parse films based on their:
|
|
||||||
|
|
||||||
* Runtime
|
|
||||||
* Score
|
|
||||||
* Year
|
|
||||||
* Genre
|
|
||||||
* Type (TV show or film)
|
|
||||||
|
|
||||||
Currently, one can make the exact queries on the refine section at the bottom of each user list. However, it is hard to apply your selections to all lists.
|
|
||||||
|
|
||||||
Checkout [original repo](https://github.com/Bekci/IMDBQuerier) for the latest version.
|
|
||||||
## Requirements
|
|
||||||
|
|
||||||
Selenium and BeautifulSoup modules are necessary for the project. Other than that, you will need a WebDriver. The project is using ChromeDriver but you can change it to the other supported browsers easily.
|
|
||||||
|
|
||||||
If you have changed the driver, make sure to change the below code accordingly.
|
|
||||||
|
|
||||||
```
|
|
||||||
# main.py line 16
|
|
||||||
driver = webdriver.Chrome()
|
|
||||||
```
|
|
||||||
|
|
||||||
[Here is a link for the Firefox driver.](https://github.com/mozilla/geckodriver/releases)
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
First of all, change the values in the `parse_options` dictionary in the [parser_config.py](parser_config.py).
|
|
||||||
|
|
||||||
Then, change the value of `list_url` variable in the [main.py](main.py) code to the list wanted to be parsed.
|
|
||||||
|
|
||||||
Run the code, the output html will apear in list_htmls folder.
|
|
||||||
|
|
||||||
## Common Driver Error
|
|
||||||
|
|
||||||
The used version of the browser driver can be out-dated. Always use the latest version in case of an error.
|
|
||||||
|
|
||||||
[Firefox Driver](https://github.com/mozilla/geckodriver/releases)
|
|
||||||
|
|
||||||
[Chrome Driver](https://chromedriver.chromium.org/)
|
|
|
@ -1,15 +0,0 @@
|
||||||
li {
|
|
||||||
list-style-type: none;
|
|
||||||
text-align: center;
|
|
||||||
max-width: 50%;
|
|
||||||
background-color: #EEEEEE;
|
|
||||||
}
|
|
||||||
|
|
||||||
span.rating {
|
|
||||||
color: #D9AA00;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
span.list_title{
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
|
@ -1,113 +0,0 @@
|
||||||
"""
|
|
||||||
Parse strings obtained from the html to get the film metadata.
|
|
||||||
Fix metadata and create an film object to be use it later.
|
|
||||||
"""
|
|
||||||
|
|
||||||
from ClassFilm import Film
|
|
||||||
import re
|
|
||||||
|
|
||||||
"""
|
|
||||||
Eliminate parenthesis from the text.
|
|
||||||
'(2019)' -> '2019'
|
|
||||||
"""
|
|
||||||
def parse_film_year(year_text):
|
|
||||||
found_numbers = re.findall("[0-9]", year_text)
|
|
||||||
return ''.join(found_numbers[0:4])
|
|
||||||
|
|
||||||
|
|
||||||
"""
|
|
||||||
Obtain decimal value of the score from its text.
|
|
||||||
'7' -> 70
|
|
||||||
'7,9'-> 79
|
|
||||||
"""
|
|
||||||
def parse_imdb_score(score_text):
|
|
||||||
units_digit = 0
|
|
||||||
if ',' in score_text:
|
|
||||||
tens_digit, units_digit = score_text.split(',')
|
|
||||||
else:
|
|
||||||
tens_digit = score_text.split(',')[0]
|
|
||||||
return int(tens_digit) * 10 + int(units_digit)
|
|
||||||
|
|
||||||
|
|
||||||
"""
|
|
||||||
Parse runtime in minutes from runtime text.
|
|
||||||
"134 min" -> 134
|
|
||||||
"""
|
|
||||||
def parse_runtime(runtime_text):
|
|
||||||
return runtime_text.split(' ')[0]
|
|
||||||
|
|
||||||
|
|
||||||
"""
|
|
||||||
From the string of genres, obtain the genres list.
|
|
||||||
Remove extra spaces and new line characters.
|
|
||||||
Return genres in a list.
|
|
||||||
"""
|
|
||||||
def obtain_all_genres(genres_text):
|
|
||||||
obtained_genres = []
|
|
||||||
for genre in genres_text.split(','):
|
|
||||||
obtained_genres.append(genre.replace('\n', '').replace(' ', ''))
|
|
||||||
return obtained_genres
|
|
||||||
|
|
||||||
|
|
||||||
"""
|
|
||||||
Storyline obtained as text from the html yet some characters must be deleted
|
|
||||||
from it.
|
|
||||||
"""
|
|
||||||
def obtain_story_line(story_text):
|
|
||||||
return story_text.replace('\n', '')
|
|
||||||
|
|
||||||
"""
|
|
||||||
Determine the film type from the year text.
|
|
||||||
A TV-series will include '-' but a film will not include.
|
|
||||||
"""
|
|
||||||
def determine_film_type(year_text):
|
|
||||||
if '–' in year_text:
|
|
||||||
return 'tv-series'
|
|
||||||
return 'film'
|
|
||||||
|
|
||||||
"""
|
|
||||||
Sometimes images cannot be loaded and its src will be a placeholder.
|
|
||||||
For such cases, loadlate tag will be the real source.
|
|
||||||
"""
|
|
||||||
def obtain_image_source(img_html):
|
|
||||||
if 'loadlate' in img_html.attrs:
|
|
||||||
return img_html['loadlate']
|
|
||||||
else:
|
|
||||||
return img_html['src']
|
|
||||||
|
|
||||||
|
|
||||||
"""
|
|
||||||
Take a html block representing the film item
|
|
||||||
Apply parsing and return film object
|
|
||||||
"""
|
|
||||||
def obtain_film_object(content, image_raw):
|
|
||||||
# Runtime and score of a film might not given in the list item.
|
|
||||||
runtime = "unknown"
|
|
||||||
point = "unknown"
|
|
||||||
|
|
||||||
raw_name_with_link = content.find('a')
|
|
||||||
raw_name = raw_name_with_link.text
|
|
||||||
film_imdb_link = raw_name_with_link['href']
|
|
||||||
raw_year = content.find("span", class_="lister-item-year text-muted unbold").text
|
|
||||||
raw_runtime = content.find("span", class_="runtime")
|
|
||||||
|
|
||||||
if raw_runtime is not None:
|
|
||||||
raw_runtime = raw_runtime.text
|
|
||||||
runtime = int(parse_runtime(raw_runtime))
|
|
||||||
|
|
||||||
raw_genre = content.find("span", class_="genre").text
|
|
||||||
raw_point = content.find("span", class_="ipl-rating-star__rating")
|
|
||||||
|
|
||||||
if raw_point is not None:
|
|
||||||
raw_point = raw_point.text
|
|
||||||
point = int(parse_imdb_score(raw_point))
|
|
||||||
|
|
||||||
raw_storyline = content.find("p", class_="").text
|
|
||||||
|
|
||||||
year = parse_film_year(raw_year)
|
|
||||||
genre_list = obtain_all_genres(raw_genre)
|
|
||||||
storyline = obtain_story_line(raw_storyline)
|
|
||||||
f_type = determine_film_type(year)
|
|
||||||
image_source = obtain_image_source(image_raw)
|
|
||||||
|
|
||||||
return Film(raw_name, year, point, genre_list, runtime, storyline, f_type, image_source, film_imdb_link)
|
|
|
@ -1,68 +0,0 @@
|
||||||
"""
|
|
||||||
Create a new html file from selected films.
|
|
||||||
Save the file under lists directory.
|
|
||||||
"""
|
|
||||||
import os
|
|
||||||
HTML_DIRS = 'list_htmls'
|
|
||||||
|
|
||||||
def crete_directory():
|
|
||||||
if not os.path.exists(HTML_DIRS):
|
|
||||||
os.mkdir(HTML_DIRS)
|
|
||||||
|
|
||||||
def start_html(list_name):
|
|
||||||
return """
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en" dir="ltr">
|
|
||||||
<head>
|
|
||||||
<link rel="stylesheet" href="../css/list_style.css">
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>Selected Films</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<span class="list_title"><h2> %s </h2></span>
|
|
||||||
<ul>
|
|
||||||
""" % list_name
|
|
||||||
|
|
||||||
def close_html():
|
|
||||||
return """
|
|
||||||
</ul>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
"""
|
|
||||||
|
|
||||||
def create_table_from_object(film_object):
|
|
||||||
return """
|
|
||||||
<br>
|
|
||||||
<li>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td rowspan="5">%s</td>
|
|
||||||
<td colspan="3"> %s</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="3">Year: %s</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td> %s mins</td>
|
|
||||||
<td>%s </td>
|
|
||||||
<td>IMDB Rating: %s </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="3">%s</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</li>
|
|
||||||
<br>
|
|
||||||
""" % (film_object.get_image_html(), film_object.get_title(), film_object.year, film_object.runtime,
|
|
||||||
film_object.get_genres_string(), film_object.get_rating(), film_object.storyline)
|
|
||||||
|
|
||||||
def create_html_file(film_objects_list, list_name):
|
|
||||||
film_html_str = ""
|
|
||||||
# Generate html list
|
|
||||||
for film_object in film_objects_list:
|
|
||||||
film_html_str += create_table_from_object(film_object)
|
|
||||||
|
|
||||||
crete_directory()
|
|
||||||
|
|
||||||
html_file = open(os.path.join(HTML_DIRS, list_name + '.html'), "w", encoding='utf-8')
|
|
||||||
html_file.write(start_html(list_name) + film_html_str + close_html() )
|
|
|
@ -1,56 +0,0 @@
|
||||||
from bs4 import BeautifulSoup
|
|
||||||
from selenium import webdriver
|
|
||||||
import time
|
|
||||||
from selenium.webdriver.common.keys import Keys
|
|
||||||
from film_content_parser import obtain_film_object
|
|
||||||
from parser_config import check_film_object, watched_included
|
|
||||||
from html_creator import create_html_file
|
|
||||||
|
|
||||||
def get_watched_films(file_path):
|
|
||||||
watched_films_txt = open(file_path, 'r')
|
|
||||||
if watched_films_txt:
|
|
||||||
watched_names = watched_films_txt.read().split('\n')
|
|
||||||
return [names for names in watched_names if names != '']
|
|
||||||
return None
|
|
||||||
|
|
||||||
watched_films = None
|
|
||||||
if not watched_included():
|
|
||||||
watched_films = get_watched_films('watched_films.txt')
|
|
||||||
|
|
||||||
# Time to wait for web page to be loaded.
|
|
||||||
TIME_FACTOR = 2
|
|
||||||
|
|
||||||
# Give the URL of the imdb list.
|
|
||||||
list_url = "https://www.imdb.com/list/ls025718406/?ref_=tt_rls_2"
|
|
||||||
|
|
||||||
print("Opening a webdriver")
|
|
||||||
driver = webdriver.Chrome()
|
|
||||||
|
|
||||||
driver.get(list_url)
|
|
||||||
|
|
||||||
print("Waiting the website to be loaded")
|
|
||||||
# Wait browser to load the page.
|
|
||||||
time.sleep(TIME_FACTOR)
|
|
||||||
|
|
||||||
content = driver.page_source.encode('utf-16').strip()
|
|
||||||
soup = BeautifulSoup(content, 'lxml')
|
|
||||||
|
|
||||||
# Obtain all films
|
|
||||||
film_contents = soup.find_all("div", class_="lister-item mode-detail")
|
|
||||||
|
|
||||||
wanted_films = []
|
|
||||||
|
|
||||||
list_header = soup.find("h1", class_='header list-name').text
|
|
||||||
|
|
||||||
print("Parsing and querying films")
|
|
||||||
for all_content in film_contents:
|
|
||||||
img_source = all_content.find('div', class_='lister-item-image ribbonize').find('img')
|
|
||||||
content = all_content.find('div', class_='lister-item-content')
|
|
||||||
current_film = obtain_film_object(content, img_source)
|
|
||||||
if check_film_object(current_film, watched_films):
|
|
||||||
wanted_films.append(current_film)
|
|
||||||
|
|
||||||
create_html_file(wanted_films, list_header)
|
|
||||||
print("New html created with the name ",list_header )
|
|
||||||
|
|
||||||
driver.close()
|
|
|
@ -1,82 +0,0 @@
|
||||||
"""
|
|
||||||
Define and check rules for a film object.
|
|
||||||
"""
|
|
||||||
|
|
||||||
# Rules for the film object
|
|
||||||
parse_options = {
|
|
||||||
'type': 'film',
|
|
||||||
'runtime_min': 80,
|
|
||||||
'runtime_max': 140,
|
|
||||||
'inlude_unkown_runtime': False,
|
|
||||||
'score_range_min': '6.9',
|
|
||||||
'score_range_max': '10.0',
|
|
||||||
'include_unknown_score': False,
|
|
||||||
'year_range_oldest': 1990,
|
|
||||||
'year_range_newest': 2019,
|
|
||||||
'wanted_genres': ['drama'],
|
|
||||||
'unwanted_genres': ['romance', 'musical','horror', 'documentary'],
|
|
||||||
# Whether add or remove a film
|
|
||||||
# whose genre neither in wanted_genres nor unwanted_genres list
|
|
||||||
'add_not_unwanted_&_not_wanted': True,
|
|
||||||
'include_watched': False
|
|
||||||
}
|
|
||||||
|
|
||||||
def check_runtime(film_runtime):
|
|
||||||
if film_runtime == 'unknown':
|
|
||||||
return parse_options['inlude_unkown_runtime']
|
|
||||||
min_runtime = parse_options['runtime_min']
|
|
||||||
max_runtime = parse_options['runtime_max']
|
|
||||||
|
|
||||||
return film_runtime >= min_runtime and film_runtime <= max_runtime
|
|
||||||
|
|
||||||
def check_genre(film_genre_list):
|
|
||||||
for genre in film_genre_list:
|
|
||||||
if genre.lower() in parse_options['unwanted_genres']:
|
|
||||||
return False
|
|
||||||
if parse_options['wanted_genres'] is None or len(parse_options['wanted_genres']) == 0:
|
|
||||||
return True
|
|
||||||
for genre in film_genre_list:
|
|
||||||
if genre.lower() in parse_options['wanted_genres']:
|
|
||||||
return True
|
|
||||||
return parse_options['add_not_unwanted_&_not_wanted']
|
|
||||||
|
|
||||||
|
|
||||||
def check_score(score_range):
|
|
||||||
if score_range == 'unknown':
|
|
||||||
return parse_options['include_unknown_score']
|
|
||||||
min_score = float(parse_options['score_range_min']) * 10
|
|
||||||
max_score = float(parse_options['score_range_max']) * 10
|
|
||||||
return score_range >= min_score and score_range <= max_score
|
|
||||||
|
|
||||||
|
|
||||||
def check_year(year_range):
|
|
||||||
min_year = parse_options['year_range_oldest']
|
|
||||||
max_year = parse_options['year_range_newest']
|
|
||||||
return int(year_range) >= min_year and int(year_range) <= max_year
|
|
||||||
|
|
||||||
|
|
||||||
def check_type(film_type):
|
|
||||||
if parse_options['type'] == 'both':
|
|
||||||
return True
|
|
||||||
elif parse_options['type'] == film_type:
|
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|
||||||
def watched_included():
|
|
||||||
return parse_options['include_watched']
|
|
||||||
|
|
||||||
def check_film_object(film_object, watched_films=None):
|
|
||||||
if not check_runtime(film_object.runtime):
|
|
||||||
return False
|
|
||||||
if not check_genre(film_object.genres):
|
|
||||||
return False
|
|
||||||
if not check_score(film_object.rating):
|
|
||||||
return False
|
|
||||||
if film_object.type == 'film' and not check_year(film_object.year):
|
|
||||||
return False
|
|
||||||
if not check_type(film_object.type):
|
|
||||||
return False
|
|
||||||
if watched_films is not None and film_object.name in watched_films:
|
|
||||||
return False
|
|
||||||
# All of the above rules applied for the object
|
|
||||||
return True
|
|
|
@ -1,3 +0,0 @@
|
||||||
bs4
|
|
||||||
selenium
|
|
||||||
regex
|
|
Before Width: | Height: | Size: 6.0 KiB |
|
@ -1,12 +0,0 @@
|
||||||
import PIL
|
|
||||||
from PIL import Image
|
|
||||||
from tkinter.filedialog import *
|
|
||||||
|
|
||||||
file_path=askopenfilenames()
|
|
||||||
img = PIL.Image.open(file_path)
|
|
||||||
myHeight,myWidth = img.size
|
|
||||||
|
|
||||||
img=img.resize((myHeight,myWidth),PIL.Image.ANTILIAS)
|
|
||||||
save_path=asksaveasfile()
|
|
||||||
|
|
||||||
img.save(save_path+"_compressed.JPG")
|
|
|
@ -1,11 +0,0 @@
|
||||||
# Image_Compressor
|
|
||||||
|
|
||||||
This script compresses the image choosen to much reduced size. Image can be of any format.
|
|
||||||
Note : The image should be in same folder as the script
|
|
||||||
It will return with the compressed image when you compile.
|
|
||||||
It automates the task of compressing the image in day to day lives.
|
|
||||||
|
|
||||||
# Dependencies:
|
|
||||||
|
|
||||||
pip install image
|
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
try:
|
|
||||||
from googlesearch import search
|
|
||||||
except ImportError:
|
|
||||||
print("No module named 'google' found.")
|
|
||||||
|
|
||||||
|
|
||||||
def ImportanceChecker(query, stoplevel=10, pauselevel=1):
|
|
||||||
"""
|
|
||||||
Checks 'importance' by analyzing google search results for a person/topic and
|
|
||||||
finding if they have a wikipedia page among the top results. Number of search
|
|
||||||
results required is automatically set to 10.
|
|
||||||
"""
|
|
||||||
|
|
||||||
#urlgenerator runs relatively slowly to prevent google from blocking user IP
|
|
||||||
urlgenerator = search(query, stop=stoplevel, pause=pauselevel)
|
|
||||||
for _ in range(stoplevel):
|
|
||||||
url = next(urlgenerator)
|
|
||||||
if 'wikipedia' in url:
|
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
print("Who do you want to be searched? ", end="")
|
|
||||||
|
|
||||||
query = input()
|
|
||||||
|
|
||||||
important = ImportanceChecker(query)
|
|
||||||
|
|
||||||
if (important):
|
|
||||||
print(f"{query} is important!")
|
|
||||||
else:
|
|
||||||
print(f"{query} isn't that important.")
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
main()
|
|
|
@ -1,22 +0,0 @@
|
||||||
#Importance Checker
|
|
||||||
|
|
||||||
A simple program to check for a person or topic's "importance" by checking whether the search value's possible Wikipedia page appears in the top *x* Google search results, where *x* is set to 10 by default.
|
|
||||||
|
|
||||||
##Instructions
|
|
||||||
|
|
||||||
Type these commands in the terminal:
|
|
||||||
|
|
||||||
`pip install beautifulsoup`
|
|
||||||
|
|
||||||
`pip install google`
|
|
||||||
|
|
||||||
|
|
||||||
Now type:
|
|
||||||
|
|
||||||
`ImportanceChecker.py`
|
|
||||||
|
|
||||||
The program will run, and test a user-inputted value if in *main*. Use `import ImportanceChecker` to use it in your python project.
|
|
||||||
|
|
||||||
|
|
||||||
###Notes:
|
|
||||||
* *ImportanceChecker* runs relatively slow to help prevent Google from blocking the user's IP address. One can modify the time delay in between requests to speed the function up by changing the third parameter to something other than its default, *1*.
|
|
|
@ -1,2 +0,0 @@
|
||||||
beautifulsoup4
|
|
||||||
google
|
|
21
LICENSE.txt
|
@ -1,21 +0,0 @@
|
||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) [2019] [Ayush Bhardwaj]
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
|
@ -1,11 +0,0 @@
|
||||||
# Description: PDF2text
|
|
||||||
this is a small script to make a extract text from pdf file.
|
|
||||||
|
|
||||||
### Dependencies:
|
|
||||||
1- [pdftotext](https://pypi.org/project/pdftotext/)
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
Run ```python script.py``` then enter path of pdf file.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
pdftotext
|
|
|
@ -1,15 +0,0 @@
|
||||||
import os
|
|
||||||
import pdftotext
|
|
||||||
|
|
||||||
|
|
||||||
pdf_path = input("Enter the path of the pdf file : ")
|
|
||||||
|
|
||||||
assert os.path.exists(pdf_path), "this pdf file doesn't exist"
|
|
||||||
|
|
||||||
with open(pdf_path, 'rb') as f_r:
|
|
||||||
pdf_pages = pdftotext.PDF(f_r)
|
|
||||||
|
|
||||||
for i, page in enumerate(pdf_pages):
|
|
||||||
print('Page {}'.format(i))
|
|
||||||
print(page)
|
|
||||||
print('*'*100)
|
|
|
@ -1,9 +0,0 @@
|
||||||
# PX-to-REM Script
|
|
||||||
|
|
||||||
This script can convert **PX to REM** and **REM to PX**
|
|
||||||
|
|
||||||
## Usage call python script then select your interest **PX to REM** or **REM to PX** to convert
|
|
||||||
|
|
||||||
``` bash
|
|
||||||
$ python px_to_rem.py
|
|
||||||
```
|
|
|
@ -1,11 +0,0 @@
|
||||||
class Converter:
|
|
||||||
base_px = 16
|
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
self.data = []
|
|
||||||
|
|
||||||
def px_to_rem(self, px):
|
|
||||||
return float(px) / self.base_px
|
|
||||||
|
|
||||||
def rem_to_px(self, rem):
|
|
||||||
return float(rem) * self.base_px
|
|
|
@ -1,69 +0,0 @@
|
||||||
import sys
|
|
||||||
from converter import Converter
|
|
||||||
|
|
||||||
def get_input(msg = ''):
|
|
||||||
if (sys.version_info > (3, 0)):
|
|
||||||
return input(msg)
|
|
||||||
else:
|
|
||||||
return raw_input(msg)
|
|
||||||
|
|
||||||
def is_int_or_float(value):
|
|
||||||
return value.isdigit()
|
|
||||||
|
|
||||||
def process_check(value, callback):
|
|
||||||
if value == 'Q' or value == 'q':
|
|
||||||
user_selected(value)
|
|
||||||
elif value == 'C' or value == 'c':
|
|
||||||
if (callback.__name__ == 'process_px_to_rem'):
|
|
||||||
process_rem_to_px()
|
|
||||||
return
|
|
||||||
else:
|
|
||||||
process_px_to_rem()
|
|
||||||
return
|
|
||||||
elif is_int_or_float(value) == False:
|
|
||||||
print("Warning:: Allowed number only! Or if you need to qute plesae enter Q.\n")
|
|
||||||
callback()
|
|
||||||
|
|
||||||
def process_px_to_rem():
|
|
||||||
px = get_input("[PX to REM] Enter a number of px that need to convert to rem. Enter C to Change to [REM to PX] or Q to quit!\n")
|
|
||||||
|
|
||||||
process_check(px, process_px_to_rem)
|
|
||||||
|
|
||||||
rem = Converter().px_to_rem(px)
|
|
||||||
print("%spx == %srem" % (px, rem))
|
|
||||||
process_px_to_rem()
|
|
||||||
|
|
||||||
def process_rem_to_px():
|
|
||||||
rem = get_input("[REM to PX] Enter a number of rem that need to convert to px. Enter C to Change to [PX to REM] or Q to quit!\n")
|
|
||||||
|
|
||||||
process_check(rem, process_rem_to_px)
|
|
||||||
|
|
||||||
px = Converter().rem_to_px(rem)
|
|
||||||
print("%srem == %spx" % (rem, px))
|
|
||||||
process_rem_to_px()
|
|
||||||
|
|
||||||
def user_selected(user_input):
|
|
||||||
if user_input == 'A' or user_input == 'a': # PX to REM
|
|
||||||
process_px_to_rem()
|
|
||||||
elif user_input == 'B' or user_input == 'b': # REM to PX
|
|
||||||
process_rem_to_px()
|
|
||||||
elif user_input == 'Q' or user_input == 'q':
|
|
||||||
print("Nice to meet you. See you next time!")
|
|
||||||
exit()
|
|
||||||
else:
|
|
||||||
print("""
|
|
||||||
Please Selected A or B to continue, Q to quit...
|
|
||||||
""")
|
|
||||||
user_input = get_input()
|
|
||||||
user_selected(user_input)
|
|
||||||
|
|
||||||
|
|
||||||
# Start
|
|
||||||
user_input = get_input("""
|
|
||||||
Please select your converter.
|
|
||||||
|
|
||||||
A. PX to REM
|
|
||||||
B. REM to PX
|
|
||||||
""");
|
|
||||||
|
|
||||||
user_selected(user_input)
|
|
|
@ -1,8 +0,0 @@
|
||||||
# Plagiarism Detector
|
|
||||||
This script helps to detect the amount (percentage) of similarity between 2 files .
|
|
||||||
|
|
||||||
## Input
|
|
||||||
It takes paths of 2 files you want to compare as input
|
|
||||||
|
|
||||||
## Output
|
|
||||||
It returns the percentage of similarity between the 2 files
|
|
|
@ -1,13 +0,0 @@
|
||||||
from difflib import SequenceMatcher
|
|
||||||
|
|
||||||
def similarity_per(f1,f2):
|
|
||||||
with open(f1,errors="ignore") as file1,open(f2,errors="ignore") as file2:
|
|
||||||
file1_data=file1.read()
|
|
||||||
file2_data=file2.read()
|
|
||||||
similarity=SequenceMatcher(None,file1_data,file2_data).ratio()
|
|
||||||
print(f"these 2 files are {similarity*100} % similar")
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
f1=input("file 1 path :")
|
|
||||||
f2=input("file 2 path :")
|
|
||||||
similarity_per(f1,f2)
|
|
|
@ -1,26 +0,0 @@
|
||||||
# PY-CLEAN
|
|
||||||
|
|
||||||
Tool to organize Directories
|
|
||||||
|
|
||||||
|
|
||||||
### Installations and Dependencies
|
|
||||||
|
|
||||||
-> [Python](https://python.org) Installed
|
|
||||||
|
|
||||||
### How to execute the file:
|
|
||||||
|
|
||||||
1. Windows Users: Open CMD/ Powershell -> Navigate to the Cloned Directory and then Type In:
|
|
||||||
|
|
||||||
```python
|
|
||||||
python main.py
|
|
||||||
```
|
|
||||||
|
|
||||||
2. OSX/ Linux: Open Terminal -> Navigate to the Cloned Directory and then Type In:
|
|
||||||
|
|
||||||
```python
|
|
||||||
python3 main.py
|
|
||||||
```
|
|
||||||
|
|
||||||
### Note
|
|
||||||
|
|
||||||
-> Kindly do not modify any file (unless you know what you are doing).
|
|
Before Width: | Height: | Size: 151 KiB |
Before Width: | Height: | Size: 634 KiB |
Before Width: | Height: | Size: 3.8 KiB |
|
@ -1,154 +0,0 @@
|
||||||
# Required Imports
|
|
||||||
import os
|
|
||||||
import shutil
|
|
||||||
import sys
|
|
||||||
from tkinter import *
|
|
||||||
import tkinter.messagebox as tmsg
|
|
||||||
from tkinter import filedialog
|
|
||||||
|
|
||||||
### File Extensions
|
|
||||||
exts = {
|
|
||||||
'Images' : ['.jpeg', '.jpg', '.png', '.gif', '.bmp', '.ico', '.svg', '.tff'],
|
|
||||||
'Medias' : ['.mp4', '.mp3', '.mkv', '.mov', '.3gp', '.wav', '.wmv', '.aac', '.flv', '.webm'],
|
|
||||||
'Docs' : ['.pdf', '.docx', '.doc', '.pptx', '.pages', '.key', '.txt', '.rtf', '.csv', '.xlsx', '.odt', '.ppt'],
|
|
||||||
'Codes' : ['.py', '.pyc', '.dart', '.c', '.cpp', '.js', '.html', '.css', '.java', '.go', '.r', '.sh'],
|
|
||||||
'Archives' : ['.rar', '.zip', '.7z', '.alzip', '.iso', '.dmg'],
|
|
||||||
'Executables' : ['.exe', '.bat', '.command', '.apk', '.app']
|
|
||||||
}
|
|
||||||
|
|
||||||
def create_folder(folder_name):
|
|
||||||
''' Create Folder if does not exists '''
|
|
||||||
if not os.path.exists(folder_name):
|
|
||||||
os.makedirs(folder_name)
|
|
||||||
|
|
||||||
def select_folder():
|
|
||||||
''' File Dialog Folder Selection '''
|
|
||||||
file_path = filedialog.askdirectory()
|
|
||||||
path.set(file_path)
|
|
||||||
|
|
||||||
def clean_dir():
|
|
||||||
''' Organize the directory '''
|
|
||||||
try:
|
|
||||||
entry_path = path.get() # This path is extracted from entry widget
|
|
||||||
|
|
||||||
if (entry_path != ''):
|
|
||||||
if (os.path.isdir(entry_path)):
|
|
||||||
|
|
||||||
os.chdir(entry_path)
|
|
||||||
cwd_files = [file.lower() for file in os.listdir(os.getcwd())] # Get the CWD files
|
|
||||||
|
|
||||||
file_name = os.path.basename(sys.argv[0]) # Extract name of the script
|
|
||||||
|
|
||||||
if os.path.isfile(file_name): # Exclude the main script in the cleaning process if it exists in the CWD
|
|
||||||
cwd_files.remove(file_name)
|
|
||||||
|
|
||||||
count_files = len(next(os.walk(os.getcwd()))[2])
|
|
||||||
# os.walk yields 3-tuple (dirpath, dirnames, filenames) (Its a Generator)
|
|
||||||
|
|
||||||
for file in cwd_files:
|
|
||||||
|
|
||||||
if os.path.isfile(file):
|
|
||||||
ext = os.path.splitext(file) # Split the file into its name and extension
|
|
||||||
|
|
||||||
if (ext[1] in exts.get('Images')):
|
|
||||||
create_folder('Images')
|
|
||||||
shutil.move(file, './Images/')
|
|
||||||
|
|
||||||
elif (ext[1] in exts.get('Medias')):
|
|
||||||
create_folder('Media')
|
|
||||||
shutil.move(file, './Media/')
|
|
||||||
|
|
||||||
elif (ext[1] in exts.get('Docs')):
|
|
||||||
create_folder('Docs')
|
|
||||||
shutil.move(file, './Docs/')
|
|
||||||
|
|
||||||
elif (ext[1] in exts.get('Codes')):
|
|
||||||
create_folder('Codes')
|
|
||||||
shutil.move(file, './Codes/')
|
|
||||||
|
|
||||||
elif (ext[1] in exts.get('Archives')):
|
|
||||||
create_folder('Archives')
|
|
||||||
shutil.move(file, './Archives/')
|
|
||||||
|
|
||||||
elif (ext[1] in exts.get('Executables')):
|
|
||||||
create_folder('Exec')
|
|
||||||
shutil.move(file, './Exec/')
|
|
||||||
|
|
||||||
else:
|
|
||||||
create_folder('Others')
|
|
||||||
shutil.move(file, './Others/')
|
|
||||||
|
|
||||||
|
|
||||||
tmsg.showinfo("SUCCESS!", f"Your Directory Has Been Cleaned :)\n{count_files} file(s) Have Been Cleaned")
|
|
||||||
|
|
||||||
else:
|
|
||||||
tmsg.showerror("ERROR!", "Directory Not Found :(")
|
|
||||||
else:
|
|
||||||
tmsg.showerror("ERROR!", "Directory Not Found :(")
|
|
||||||
|
|
||||||
except OSError:
|
|
||||||
tmsg.showerror("Error!", "Directory Not Found :(")
|
|
||||||
|
|
||||||
root = Tk()
|
|
||||||
root.geometry('600x490')
|
|
||||||
root.minsize('600','490')
|
|
||||||
root.maxsize('600','490')
|
|
||||||
root.title("PY-CLEAN")
|
|
||||||
|
|
||||||
####### Background Image
|
|
||||||
bg_img = PhotoImage(file='bg.gif')
|
|
||||||
img_label = Label(root, image=bg_img)
|
|
||||||
img_label.place(relwidth=1, relheight=1)
|
|
||||||
|
|
||||||
####### Header
|
|
||||||
|
|
||||||
header_frm = Frame(root, background='#e8ca5f', relief=SUNKEN, bd=3)
|
|
||||||
header_frm.config(highlightthickness=0, highlightcolor='#c6d166', highlightbackground='#c6d166')
|
|
||||||
header_frm.pack(pady=7,fill=X)
|
|
||||||
|
|
||||||
header = Label(header_frm, text='PY-CLEAN', background='#e8ca5f', foreground='#FF1493', font="helvetica 19 bold", pady=3, padx=3)
|
|
||||||
header.pack(pady=4, fill=X)
|
|
||||||
|
|
||||||
###### Entry
|
|
||||||
path = StringVar()
|
|
||||||
|
|
||||||
side_label = Label(root, text='Enter Path To Clean ->', font="comicsansms 14 bold", padx=3, pady=4, background='#97b0cf', foreground='#bf391f', bd=3, relief=SUNKEN)
|
|
||||||
side_label.config(highlightthickness=2)
|
|
||||||
side_label.pack(anchor='w', padx=14, pady=45)
|
|
||||||
|
|
||||||
entry = Entry(root, textvariable=path, width=26, font="comicsansms 19 bold", background='#97b0cf', foreground='#343638', relief=SUNKEN, bd=2.5)
|
|
||||||
entry.config(highlightthickness=2.5, highlightcolor='#97b0cf', highlightbackground='#97b0cf')
|
|
||||||
entry.place(relx=0.35, rely=0.217)
|
|
||||||
|
|
||||||
|
|
||||||
### Selection Dialog Box, Clear Buttons
|
|
||||||
|
|
||||||
select_label = Label(root, text='Select Folder From Here ->', font="comicsansms 14 bold", padx=3, pady=4, background='#97b0cf', foreground='#bf391f', bd=3, relief=SUNKEN)
|
|
||||||
select_label.config(highlightthickness=2)
|
|
||||||
select_label.pack(anchor='w', padx=14, pady=50)
|
|
||||||
|
|
||||||
img = PhotoImage(file='folder.png')
|
|
||||||
|
|
||||||
folder_btn_frame = Frame(root, relief=SOLID, bd=4, background='#2160ad')
|
|
||||||
folder_btn_frame.place(relx=0.45, rely=0.45)
|
|
||||||
|
|
||||||
folder_btn = Button(folder_btn_frame, image=img, cursor='hand', command=select_folder)
|
|
||||||
folder_btn.config(highlightthickness=2, highlightcolor='#2160ad', highlightbackground='#2160ad')
|
|
||||||
folder_btn.pack()
|
|
||||||
|
|
||||||
btn_frame = Frame(root, relief=SUNKEN, bd=4, background='#3e4957')
|
|
||||||
btn_frame.place(relx=0.22, rely=0.82)
|
|
||||||
|
|
||||||
clean_btn = Button(btn_frame, text='Clean Now', font='comicsansms 22 bold', foreground='seagreen', cursor='hand', command=clean_dir)
|
|
||||||
clean_btn.config(highlightthickness=2, highlightcolor='#c4d64f', highlightbackground='#c4d64f')
|
|
||||||
clean_btn.pack()
|
|
||||||
|
|
||||||
clear_btn_frame = Frame(root, relief=SUNKEN, bd=4, background='#3e4957')
|
|
||||||
clear_btn_frame.place(relx=0.55, rely=0.82)
|
|
||||||
|
|
||||||
clear_btn = Button(clear_btn_frame, text='Clear Path', font='comicsansms 22 bold', foreground='red', cursor='hand', command=lambda : path.set(''))
|
|
||||||
clear_btn.config(highlightthickness=2, highlightcolor='#c4d64f', highlightbackground='#c4d64f')
|
|
||||||
clear_btn.pack()
|
|
||||||
|
|
||||||
|
|
||||||
root.mainloop()
|
|
138
README.md
|
@ -1,4 +1,4 @@
|
||||||
# Awesome Python Scripts :sunglasses: <img alt="PyPI" src="https://warehouse-camo.cmh1.psfhosted.org/18509a25dde64f893bd96f21682bd6211c3d4e80/68747470733a2f2f696d672e736869656c64732e696f2f707970692f707976657273696f6e732f64796e61636f6e662e737667"> [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/hastagAB/Awesome-Python-Scripts) ![GitHub stars](https://img.shields.io/github/stars/hastagAB/Awesome-Python-Scripts?style=social)
|
# Awesome Python Scripts :sunglasses: <img alt="PyPI" src="https://warehouse-camo.cmh1.psfhosted.org/18509a25dde64f893bd96f21682bd6211c3d4e80/68747470733a2f2f696d672e736869656c64732e696f2f707970692f707976657273696f6e732f64796e61636f6e662e737667"> [![HitCount](http://hits.dwyl.io/hastagAB/Awesome-Python-Scripts.svg)](http://hits.dwyl.io/hastagAB/Awesome-Python-Scripts) ![GitHub stars](https://img.shields.io/github/stars/hastagAB/Awesome-Python-Scripts?style=social)
|
||||||
|
|
||||||
## What is this repo?
|
## What is this repo?
|
||||||
This repo is a compilation of some *awesome* Python scripts that automate some boring tasks or simply make our life easier...or both!
|
This repo is a compilation of some *awesome* Python scripts that automate some boring tasks or simply make our life easier...or both!
|
||||||
|
@ -11,8 +11,6 @@ So far, the following projects have been integrated to this repo:
|
||||||
|
|
||||||
| Project Name | Contributors |
|
| Project Name | Contributors |
|
||||||
|--|--|
|
|--|--|
|
||||||
| [AI for guess the number](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/AI_for_Guess_the_number) | [Omar Sameh](https://github.com/ShadowHunter15) |
|
|
||||||
| [sudoku-solver](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/sudoku-solver) | [Rishabh Umrao](https://github.com/ayedaemon) |
|
|
||||||
|[File Encrypt Decrypt](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/file-encrypt-decrypt)|[Aditya Arakeri](https://github.com/adityaarakeri)|
|
|[File Encrypt Decrypt](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/file-encrypt-decrypt)|[Aditya Arakeri](https://github.com/adityaarakeri)|
|
||||||
| [Address locator](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Location_Of_Adress) | [Chris]() |
|
| [Address locator](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Location_Of_Adress) | [Chris]() |
|
||||||
| [Automated emails](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/automated_email) | [Suvigya](https://github.com/SuvigyaJain1) |
|
| [Automated emails](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/automated_email) | [Suvigya](https://github.com/SuvigyaJain1) |
|
||||||
|
@ -20,7 +18,6 @@ So far, the following projects have been integrated to this repo:
|
||||||
|[Asymmetric Encryption](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/asymmetric_cryptography) |[victor matheus](https://github.com/victormatheusc) |
|
|[Asymmetric Encryption](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/asymmetric_cryptography) |[victor matheus](https://github.com/victormatheusc) |
|
||||||
|[Bitcoin price GUI](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Bitcoin-Price-GUI) |[Amirul Abu](https://github.com/amirulabu) |
|
|[Bitcoin price GUI](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Bitcoin-Price-GUI) |[Amirul Abu](https://github.com/amirulabu) |
|
||||||
|[Cryptocurrency Converter](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Cryptocurrency-converter) |[AdnCodz](https://github.com/AdnCodez) |
|
|[Cryptocurrency Converter](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Cryptocurrency-converter) |[AdnCodz](https://github.com/AdnCodez) |
|
||||||
|[Cryptocurrency Prices](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Cryptocurrency-Prices) |[xemeds](https://github.com/xemeds) |
|
|
||||||
|[Caesar Cipher](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/caeser_cipher) |[epi052](https://github.com/epi052) |
|
|[Caesar Cipher](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/caeser_cipher) |[epi052](https://github.com/epi052) |
|
||||||
|[Checksum tool](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Checksum) |[Austin Ewens](https://github.com/aewens) |
|
|[Checksum tool](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Checksum) |[Austin Ewens](https://github.com/aewens) |
|
||||||
|[Codechef autosubmitter](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Codechef-Code-Submitter) |[Harshit Mahajan](https://github.com/hmahajan99) |
|
|[Codechef autosubmitter](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Codechef-Code-Submitter) |[Harshit Mahajan](https://github.com/hmahajan99) |
|
||||||
|
@ -28,12 +25,9 @@ So far, the following projects have been integrated to this repo:
|
||||||
|[Contact 'Leads' Distribution](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Contact-Distribution) |[Tiago Cordeiro](https://github.com/tiagocordeiro) |
|
|[Contact 'Leads' Distribution](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Contact-Distribution) |[Tiago Cordeiro](https://github.com/tiagocordeiro) |
|
||||||
|[Cricket Matches web Scraper](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/CricBuzz_Score_Update) |[Divy Ranjan](https://github.com/divyranjan17) |
|
|[Cricket Matches web Scraper](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/CricBuzz_Score_Update) |[Divy Ranjan](https://github.com/divyranjan17) |
|
||||||
| [Crypt socket](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Crypt_Socket)|[Willian GL](https://github.com/williangl) |
|
| [Crypt socket](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Crypt_Socket)|[Willian GL](https://github.com/williangl) |
|
||||||
| [CSV to Excel](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/CSV-to-Excel)|[xemeds](https://github.com/xemeds) |
|
|
||||||
|[Current City Weather](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Current_City_Weather) |[Jesse Bridge](https://github.com/jessebridge) |
|
|[Current City Weather](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Current_City_Weather) |[Jesse Bridge](https://github.com/jessebridge) |
|
||||||
|[Directory organizer](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Directory-organizer) | [Athul P](https://github.com/athulpn) |
|
|[Directory organizer](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Directory-organizer) | [Athul P](https://github.com/athulpn) |
|
||||||
|[DOH DIG](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/DOH-Dig/) | [Ryan](https://github.com/awsumco) |
|
|[DOH DIG](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/DOH-Dig/) | [Ryan](https://github.com/awsumco) |
|
||||||
|[English Theasaurus](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/English_Theasaurus/) | [Ansh Dhingra](https://github.com/anshdhinhgra47) |
|
|
||||||
|[Elasticsearch snapshot](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/elastic-snapshot) | [Joe Ryan](https://github.com/joeryan) |
|
|
||||||
|[Excel Files Merger](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Excel_Files_Merger) | [Andrei N](https://github.com/Andrei-Niculae)|
|
|[Excel Files Merger](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Excel_Files_Merger) | [Andrei N](https://github.com/Andrei-Niculae)|
|
||||||
|[Excel to List](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Excel_to_ListofList) | [Nitish Srivastava](https://github.com/nitish-iiitd)|
|
|[Excel to List](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Excel_to_ListofList) | [Nitish Srivastava](https://github.com/nitish-iiitd)|
|
||||||
|[Extended_ip_address_info](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/extended_ip_address_info) | [hafpaf](https://github.com/hafpaf)|
|
|[Extended_ip_address_info](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/extended_ip_address_info) | [hafpaf](https://github.com/hafpaf)|
|
||||||
|
@ -41,7 +35,6 @@ So far, the following projects have been integrated to this repo:
|
||||||
|[File Sharing Bot](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/File-Sharing-Bot) | [Darshan Patel](https://github.com/DarshanPatel11)|
|
|[File Sharing Bot](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/File-Sharing-Bot) | [Darshan Patel](https://github.com/DarshanPatel11)|
|
||||||
|[Flash card quizzer](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Flash-card-Challenge) |[Utkarsh Sharma](https://github.com/Utkarsh1308) |
|
|[Flash card quizzer](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Flash-card-Challenge) |[Utkarsh Sharma](https://github.com/Utkarsh1308) |
|
||||||
|[Frammed text generator](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/FramedText) | [jcdwalle](https://github.com/jcdwalle)|
|
|[Frammed text generator](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/FramedText) | [jcdwalle](https://github.com/jcdwalle)|
|
||||||
|[git_automation](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/git_automation)| [loge1998](https://github.com/loge1998)|
|
|
||||||
|[Gmail Mailing Script](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/mailing) |[mayank-kapur](https://github.com/kapurm17) |
|
|[Gmail Mailing Script](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/mailing) |[mayank-kapur](https://github.com/kapurm17) |
|
||||||
|[Handwrting DNN recognizer](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Handwriting_Recognizer) |[Chris]() |
|
|[Handwrting DNN recognizer](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Handwriting_Recognizer) |[Chris]() |
|
||||||
|[HTML Table to List](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/HTML_Table_to_List) | [Nitish Srivastava](https://github.com/nitish-iiitd)|
|
|[HTML Table to List](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/HTML_Table_to_List) | [Nitish Srivastava](https://github.com/nitish-iiitd)|
|
||||||
|
@ -52,7 +45,6 @@ So far, the following projects have been integrated to this repo:
|
||||||
|[Minecraft Server in background](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Minecraft_server_in_background)|[Max von Forell](https://github.com/mvforell)|
|
|[Minecraft Server in background](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Minecraft_server_in_background)|[Max von Forell](https://github.com/mvforell)|
|
||||||
|[Own IP locator](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Location_Of_Own_IP_Adress)|[Chris]()|
|
|[Own IP locator](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Location_Of_Own_IP_Adress)|[Chris]()|
|
||||||
|[Port Scanner](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Port_Scanner)|[Plutoberth](https://github.com/Plutoberth)|
|
|[Port Scanner](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Port_Scanner)|[Plutoberth](https://github.com/Plutoberth)|
|
||||||
|[Harry Potter Cloak](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Harry-Potter-Cloak) | [thesmartdeveloperr](https://github.com/thesmartdeveloperr)|
|
|
||||||
|[Python Algebra Solver](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Algebra-Solver)|[Sengxay Xayachack](https://github.com/frankxayachack)|
|
|[Python Algebra Solver](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Algebra-Solver)|[Sengxay Xayachack](https://github.com/frankxayachack)|
|
||||||
|[Random name generator](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Random_Names_Generator)| [Ayush Bhardwaj](https://github.com/hastagAB)|
|
|[Random name generator](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Random_Names_Generator)| [Ayush Bhardwaj](https://github.com/hastagAB)|
|
||||||
|[Random Password Generators](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Random_Password_Generator)| [Hafpaf](https://github.com/hafpaf) and [Renderer-RCT2](https://github.com/Renderer-RCT2)|
|
|[Random Password Generators](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Random_Password_Generator)| [Hafpaf](https://github.com/hafpaf) and [Renderer-RCT2](https://github.com/Renderer-RCT2)|
|
||||||
|
@ -63,7 +55,6 @@ So far, the following projects have been integrated to this repo:
|
||||||
|[SMS your location](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/SmsYourLocation)|[prince]()|
|
|[SMS your location](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/SmsYourLocation)|[prince]()|
|
||||||
|[Squid installer for Ubuntu](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Squid-Proxy-Installer-for-Ubuntu16)|[Berkay Demir]()|
|
|[Squid installer for Ubuntu](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Squid-Proxy-Installer-for-Ubuntu16)|[Berkay Demir]()|
|
||||||
|[Subtitle downloader](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Subtitle-downloader)|[Kaushlendra Pratap](https://github.com/kaushl1998)|
|
|[Subtitle downloader](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Subtitle-downloader)|[Kaushlendra Pratap](https://github.com/kaushl1998)|
|
||||||
|[Top_News](Top_News)|[Attupatil](https://github.com/Attupatil)|
|
|
||||||
|[Take Screenshot](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Take_screenshot)|[Moad Mohammed Elhebri](https://github.com/moadmmh)|
|
|[Take Screenshot](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Take_screenshot)|[Moad Mohammed Elhebri](https://github.com/moadmmh)|
|
||||||
|[To Do Bot](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/To-Do-Bot) | [Darshan Patel](https://github.com/DarshanPatel11)|
|
|[To Do Bot](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/To-Do-Bot) | [Darshan Patel](https://github.com/DarshanPatel11)|
|
||||||
|[Upload Files to S3](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Upload_files_to_s3)|[Jayram Nai](https://github.com/jramnai)|
|
|[Upload Files to S3](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Upload_files_to_s3)|[Jayram Nai](https://github.com/jramnai)|
|
||||||
|
@ -75,116 +66,17 @@ So far, the following projects have been integrated to this repo:
|
||||||
|[Youtube video downloader](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Youtube_Video_Downloader)|[Christopher He](https://github.com/hecris)|
|
|[Youtube video downloader](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Youtube_Video_Downloader)|[Christopher He](https://github.com/hecris)|
|
||||||
|[Zabbix API](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/zabbix_api)|[msg4sunny](https://github.com/msg4sunny)|
|
|[Zabbix API](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/zabbix_api)|[msg4sunny](https://github.com/msg4sunny)|
|
||||||
|[Zip password cracker](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/zip_password_cracker)|[umar abdullahi](https://github.com/umarbrowser)|
|
|[Zip password cracker](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/zip_password_cracker)|[umar abdullahi](https://github.com/umarbrowser)|
|
||||||
|[RSA Algorithm](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/RSA_Algorithm)|[Chinmay Rane](https://github.com/Chinmayrane16)
|
|
||||||
|[CLI Calculator](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/cli_calculator)|[Willian GL](https://github.com/williangl) |
|
|[CLI Calculator](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/cli_calculator)|[Willian GL](https://github.com/williangl) |
|
||||||
|[Find PhoneNumber in String](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Find-PhoneNumber-in-String)|[Austin Zuniga](https://github.com/AustinZuniga)|
|
|[Find PhoneNumber in String](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Find-PhoneNumber-in-String)|[Austin Zuniga](https://github.com/AustinZuniga)|
|
||||||
|[IMDB TV Series Info Extractor](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/imdb_episode_ratings)|[Yash Raj Sarrof](https://github.com/yashYRS) |
|
|[IMDB TV Series Info Extractor](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/imdb_episode_ratings)|[Yash Raj Sarrof](https://github.com/yashYRS) |
|
||||||
|[PX to REM](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/PX-to-REM)|[Atthaphon Urairat](https://github.com/uatthaphon) |
|
|
||||||
|[Yoda-speak Translator](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/speak_like_yoda)|[sonniki](https://github.com/sonniki) |
|
|[Yoda-speak Translator](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/speak_like_yoda)|[sonniki](https://github.com/sonniki) |
|
||||||
|[SSH Host adder](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/SSH_Host_Adder)|[NinoDoko](https://github.com/NinoDoko)|
|
|
||||||
|[Wikipedia-Search](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Wikipedia-Search)|[Nissaar](https://github.com/Nissaar) |
|
|
||||||
|[Instagram Video Downloader](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/insta_video_downloader)|[Shobhit Bhosure](https://github.com/shobhit99) |
|
|
||||||
|[Medium Article Downloader](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/medium_article_downloader)|[coolsonu39](https://github.com/coolsonu39)|
|
|[Medium Article Downloader](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/medium_article_downloader)|[coolsonu39](https://github.com/coolsonu39)|
|
||||||
|[Face Recognition](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/image_recognition)|[LOKESH KHURANA](https://github.com/theluvvkhurana)|
|
|[RSA Key Pair Generator](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/RSA-key-pairs) | [Aditya Parikh](https://github.com/obiwan69) |
|
||||||
|[File Encrypt Decrypt](file-encrypt-decrypt)|[Aditya Arakeri](https://github.com/adityaarakeri)|
|
|[Clean_up_photo](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Clean_up_photo)|[sritanmay001](https://github.com/sritanmy001)|
|
||||||
| [Address locator](Location_Of_Adress) | [Chris]() |
|
|[PyRecorder](./PyRecorder)|[Rocky Jain](https://github.com/jainrocky)|
|
||||||
| [Automated emails](automated_email) | [Suvigya](https://github.com/SuvigyaJain1) |
|
|[Pretty CSV](https://github.com/Frizz925/Awesome-Python-Scripts/tree/pretty-csv/Pretty-CSV)|[Frizz925](https://github.com/Frizz925)|
|
||||||
|[AI chatbot](Artificial-intelligence_bot) |[umar abdullahi](https://github.com/umarbrowser) |
|
|[File Organizer](https://github.com/Frizz925/Awesome-Python-Scripts/tree/File-Organizer)|[Ayush Bhardwaj](https://github.com/hastagAB)|
|
||||||
|[Asymmetric Encryption](asymmetric_cryptography) |[victor matheus](https://github.com/victormatheusc) |
|
|
||||||
|[Bitcoin price GUI](Bitcoin-Price-GUI) |[Amirul Abu](https://github.com/amirulabu) |
|
|
||||||
|[Cryptocurrency Converter](Cryptocurrency-converter) |[AdnCodz](https://github.com/AdnCodez) |
|
|
||||||
|[Caesar Cipher](caeser_cipher) |[epi052](https://github.com/epi052) |
|
|
||||||
|[Checksum tool](Checksum) |[Austin Ewens](https://github.com/aewens) |
|
|
||||||
|[Codechef autosubmitter](Codechef-Code-Submitter) |[Harshit Mahajan](https://github.com/hmahajan99) |
|
|
||||||
|[Colored B&W Image Converter](Color_to_BW_Converter) |[Nitish Srivastava](https://github.com/nitish-iiitd) |
|
|
||||||
|[Contact 'Leads' Distribution](Contact-Distribution) |[Tiago Cordeiro](https://github.com/tiagocordeiro) |
|
|
||||||
|[Cricket Matches web Scraper](CricBuzz_Score_Update) |[Divy Ranjan](https://github.com/divyranjan17) |
|
|
||||||
| [Crypt socket](Crypt_Socket)|[Willian GL](https://github.com/williangl) |
|
|
||||||
|[Current City Weather](Current_City_Weather) |[Jesse Bridge](https://github.com/jessebridge) |
|
|
||||||
|[Directory organizer](Directory-organizer) | [Athul P](https://github.com/athulpn) |
|
|
||||||
|[DOH DIG](DOH-Dig/) | [Ryan](https://github.com/awsumco) |
|
|
||||||
|[Excel Files Merger](Excel_Files_Merger) | [Andrei N](https://github.com/Andrei-Niculae)|
|
|
||||||
|[Excel to List](Excel_to_ListofList) | [Nitish Srivastava](https://github.com/nitish-iiitd)|
|
|
||||||
|[Extended_ip_address_info](extended_ip_address_info) | [hafpaf](https://github.com/hafpaf)|
|
|
||||||
|[Fibonacci_Sequence_Generator](Fibonacci_Sequence_Generator) | [John Wesley Kommala](https://github.com/JohnWesleyK)|
|
|
||||||
|[File explorer](File-Explorer-Dialog-Box) | [Nikhil Kumar Singh](https://github.com/nikhilkumarsingh)|
|
|
||||||
|[File Sharing Bot](File-Sharing-Bot) | [Darshan Patel](https://github.com/DarshanPatel11)|
|
|
||||||
|[Flash card quizzer](Flash-card-Challenge) |[Utkarsh Sharma](https://github.com/Utkarsh1308) |
|
|
||||||
|[Frammed text generator](FramedText) | [jcdwalle](https://github.com/jcdwalle)|
|
|
||||||
|[Gmail Mailing Script](mailing) |[mayank-kapur](https://github.com/kapurm17) |
|
|
||||||
|[Handwrting DNN recognizer](Handwriting_Recognizer) |[Chris]() |
|
|
||||||
|[HTML Table to List](HTML_Table_to_List) | [Nitish Srivastava](https://github.com/nitish-iiitd)|
|
|
||||||
|[Image circle formatter](Image-Circulator) |[Berk Gureken](https://github.com/bureken) |
|
|
||||||
|[Image To PDF](images2pdf)|[msaoudallah](https://github.com/msaoudallah)|
|
|
||||||
|[Instadp Web Scrapper](InstadpShower)|[Psychiquest](https://github.com/psychiquest)|
|
|
||||||
|[Keylogger](Keylogger) |[Preet Mishra](https://github.com/preetmishra) |
|
|
||||||
|[Minecraft Server in background](Minecraft_server_in_background)|[Max von Forell](https://github.com/mvforell)|
|
|
||||||
|[Own IP locator](Location_Of_Own_IP_Adress)|[Chris]()|
|
|
||||||
|[Port Scanner](Port_Scanner)|[Plutoberth](https://github.com/Plutoberth)|
|
|
||||||
|[Python Algebra Solver](Algebra-Solver)|[Sengxay Xayachack](https://github.com/frankxayachack)|
|
|
||||||
|[Random name generator](Random_Names_Generator)| [Ayush Bhardwaj](https://github.com/hastagAB)|
|
|
||||||
|[Random Password Generators](Random_Password_Generator)| [Hafpaf](https://github.com/hafpaf) and [Renderer-RCT2](https://github.com/Renderer-RCT2)|
|
|
||||||
|[Server Ping](Ping_Server)|[prince]()|
|
|
||||||
|[Signature photo to PNG converter](signature2png)|[Rodolfo Ferro](https://github.com/RodolfoFerro)|
|
|
||||||
|[Simple Webpage Parser](SimpleWebpageParser)|[Nitish Srivastava](https://github.com/nitish-iiitd)|
|
|
||||||
|[Slideshare downloader](Slideshare-Downloader)|[Chris Goes](https://github.com/GhostofGoes)|
|
|
||||||
|[SMS your location](SmsYourLocation)|[prince]()|
|
|
||||||
|[Squid installer for Ubuntu](Squid-Proxy-Installer-for-Ubuntu16)|[Berkay Demir]()|
|
|
||||||
|[Subtitle downloader](Subtitle-downloader)|[Kaushlendra Pratap](https://github.com/kaushl1998)|
|
|
||||||
|[Take Screenshot](Take_screenshot)|[Moad Mohammed Elhebri](https://github.com/moadmmh)|
|
|
||||||
|[To Do Bot](To%20Do%20Bot) | [Darshan Patel](https://github.com/DarshanPatel11)|
|
|
||||||
|[Upload Files to S3](Upload_files_to_s3)|[Jayram Nai](https://github.com/jramnai)|
|
|
||||||
|[Vinegère Cipher](vigenere_cipher)|[victoni](https://github.com/victoni)|
|
|
||||||
|[Web proxy](Proxy-Request)|[Nikhil Kumar Singh](https://github.com/nikhilkumarsingh)|
|
|
||||||
|[Website blocker](Website-Blocker)|[Ayush Bhardwaj](https://github.com/hastagAB)|
|
|
||||||
|[Website Url Detector](Website_Url_Detector)|[sonniki](https://github.com/sonniki)|
|
|
||||||
|[Word Frequency Counter](Word_Frequency_Counter)|[sonniki](https://github.com/sonniki)|
|
|
||||||
|[Word generator](Word-generator)|[TGLIDE](https://github.com/TGlide)|
|
|
||||||
|[Work log generator](Work_Log_Generator)|[Maël Pedretti](https://github.com/73VW)|
|
|
||||||
|[Youtube video downloader](Youtube_Video_Downloader)|[Christopher He](https://github.com/hecris)|
|
|
||||||
|[Zabbix API](zabbix_api)|[msg4sunny](https://github.com/msg4sunny)|
|
|
||||||
|[Zip password cracker](zip_password_cracker)|[umar abdullahi](https://github.com/umarbrowser)|
|
|
||||||
|[CLI Calculator](cli_calculator)|[Willian GL](https://github.com/williangl) |
|
|
||||||
|[Find PhoneNumber in String](Find-PhoneNumber-in-String)|[Austin Zuniga](https://github.com/AustinZuniga)|
|
|
||||||
|[IMDB TV Series Info Extractor](imdb_episode_ratings)|[Yash Raj Sarrof](https://github.com/yashYRS) |
|
|
||||||
|[Yoda-speak Translator](speak_like_yoda)|[sonniki](https://github.com/sonniki) |
|
|
||||||
|[Medium Article Downloader](medium_article_downloader)|[coolsonu39](https://github.com/coolsonu39)|
|
|
||||||
|[RSA Key Pair Generator](RSA-key-pairs) | [Aditya Parikh](https://github.com/obiwan69) |
|
|
||||||
|[Clean_up_photo](Clean_up_photo_directory)|[sritanmay001](https://github.com/sritanmy001)|
|
|
||||||
|[PyRecorder](PyRecorder)|[Rocky Jain](https://github.com/jainrocky)|
|
|
||||||
|[Pretty CSV](Pretty-CSV)|[Frizz925](https://github.com/Frizz925)|
|
|
||||||
|[File Organizer](File-Organizer)|[Ayush Bhardwaj](https://github.com/hastagAB)|
|
|
||||||
|[send_whatsapp_message](send_whatsapp_message)|[Mukesh Prasad](https://github.com/mukeshprasad)|
|
|
||||||
|[YTS Torrents](yts_torrents)|[Mayank Nader](https://github.com/makkoncept)|
|
|
||||||
|[COVID visualiser (real-time) ](covdi_visualiser)|[Tushar Gupta](https://github.com/tushar5526)|
|
|
||||||
|[Random_Email_Generator](Random_Email_Generator)|[Shubham Garg](https://github.com/shub-garg)|
|
|
||||||
|[WiFi Password Viewer](Wifi-Password)|[Sagar Patel](https://github.com/sagar627)|
|
|
||||||
|[Tambola_Ticket_Generator](Tambola_Ticket_Generator)|[Amandeep_Singh](https://github.com/Synster)|
|
|
||||||
| [Py_Cleaner](Py_Cleaner) | [Abhishek Dobliyal](https://github.com/Abhishek-Dobliyal)
|
|
||||||
|[Send messages to sqs in parallel](send_sqs_messages_in_parallel)|[Jinam Shah](https://github.com/jinamshah)|
|
|
||||||
|[Codeforces Checker](codeforcesChecker)|[Jinesh Parakh](https://github.com/jineshparakh)|
|
|
||||||
|[Github repo creator](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Git_repo_creator)|[Harish Tiwari ](https://github.com/optimist2309)
|
|
||||||
|[Remove-Duplicate-Files](Remove-Duplicate-Files)|[Aayushi Varma](https://github.com/aayuv17)
|
|
||||||
|[PDF2text](PDF2text)|[QuangPH](https://github.com/quangph-1686a)
|
|
||||||
|[Image Watermarker (batch)](imageWatermarker)|[Remco Halman](https://github.com/remcohalman)
|
|
||||||
|[Folder Manager](Folder_Manager)|[Harsh Raj](https://github.com/DeadProgrammer0)|
|
|
||||||
|[IMDBQuerier](IMDBQuerier)|[Burak Bekci](https://github.com/Bekci)
|
|
||||||
|[URL shortener](url_shortener)|[Sam Ebison](https://github.com/ebsa491)
|
|
||||||
|[2048](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/2048)|[Krunal](https://github.com/gitkp11)
|
|
||||||
|[Spotify Downloader](spotify_downloader)|[Sagar Patel](https://github.com/sagar627)|
|
|
||||||
|[Download Page as PDF](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Download-page-as-pdf)|[Jeremias Gomes](https://github.com/j3r3mias)
|
|
||||||
|[JSON file to YAML convertor](https://github.com/saksham117/Awesome-Python-Scripts/tree/master/json-to-yaml)|[Saksham Basandrai](https://github.com/saksham117)
|
|
||||||
|[Independent RSA Communication Algorithm](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/RSA_Communication)|[Miguel Santos](https://github.com/wi6n3l)
|
|
||||||
|[GithubBot](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/GithubBot)|[Abhilasha](https://github.com/Abhilasha06)|
|
|
||||||
|[Translate CLI](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/TranslateCLI)|[Rodrigo Oliveira](https://github.com/rodrigocam)|
|
|
||||||
|[Rock-Paper-Scissor Game](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Rock-Paper-Scissor)|[Punit Sakre](https://github.com/punitsakre23)|
|
|
||||||
|[Folder Locker and hider](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Folder%20Locker%20%26%20Hider)|[Prajjwal Pathak](https://github.com/pyguru123)|
|
|
||||||
|[Image Compressor](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Image_Compressor)|[Prathima Kadari](https://github.com/prathimacode-hub)|
|
|
||||||
|[Test Your Internet Speed](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/TestMyInternetSpeed)|[TheSmartDeveloperr](https://github.com/thesmartdeveloperr)|
|
|
||||||
|[Plagiarism_detector](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Plagiarism_detector)|[Akshita Singhal](https://github.com/akshitasinghal4444)|
|
|
||||||
|[csv_to_json](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/csv_to_json)|[MoiZ](https://github.com/TechBoyy6)|
|
|
||||||
|[Battery_notification](https://github.com/hastagABAwesome-Python-Scripts/Battery_notification/)|[Krishna Sharma](https://github.com/krishnasharma1386)|
|
|
||||||
|[Steg_Tool](https://github.com/hastagABAwesome-Python-Scripts/Steg_Tool/)|[Shankar JP](https://github.com/shankarjp)|
|
|
||||||
|
|
||||||
## How to use :
|
## How to use :
|
||||||
|
|
||||||
|
@ -200,9 +92,6 @@ So far, the following projects have been integrated to this repo:
|
||||||
Remember to star the repo if you love the scripts~ :wink:
|
Remember to star the repo if you love the scripts~ :wink:
|
||||||
|
|
||||||
## Contribution Guidelines :
|
## Contribution Guidelines :
|
||||||
|
|
||||||
### Steps required to follow before adding any script
|
|
||||||
|
|
||||||
- Make a **separate folder** for your script.
|
- Make a **separate folder** for your script.
|
||||||
- There shouldn't be any **spaces** between the names of the script. (Use underscore or dash Symbol)
|
- There shouldn't be any **spaces** between the names of the script. (Use underscore or dash Symbol)
|
||||||
- :x: Script One
|
- :x: Script One
|
||||||
|
@ -221,23 +110,14 @@ Remember to star the repo if you love the scripts~ :wink:
|
||||||
- `source env\bin\activate`
|
- `source env\bin\activate`
|
||||||
- `pip freeze > requirements.txt`
|
- `pip freeze > requirements.txt`
|
||||||
|
|
||||||
- Add your name & script in the [project's list](https://github.com/hastagAB/Awesome-Python-Scripts#what-do-we-have) above in the same format. [Compulsory]
|
- Please add your script in the [project's list](https://github.com/hastagAB/Awesome-Python-Scripts#what-do-we-have) above.
|
||||||
|
|
||||||
- Only One Commit per PR is Adviced.
|
- Only One Commit per PR is Adviced.
|
||||||
|
|
||||||
# If you like the project:
|
|
||||||
- Star the Repo - [Awesome Python Scripts](https://github.com/hastagAB/Awesome-Python-Scripts)
|
|
||||||
- Follow me on GitHub - [Ayush Bhardwaj](https://github.com/hastagAB)
|
|
||||||
|
|
||||||
# Want to connect with me ?
|
# Want to connect with me ?
|
||||||
- [LinkedIn](https://www.linkedin.com/in/hastagab/)
|
- [LinkedIn](https://www.linkedin.com/in/hastagab/)
|
||||||
- [Twitter](https://twitter.com/HastagAB)
|
- [Twitter](https://twitter.com/HastagAB)
|
||||||
- [Facebook](https://www.facebook.com/SirHastagAB)
|
- [Facebook](https://www.facebook.com/SirHastagAB)
|
||||||
- [Instagram](https://www.instagram.com/sirhastagab/)
|
- [Quora](https://www.quora.com/profile/Ayush-Bhardwaj-76)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[![](https://img.shields.io/badge/Made%20With%20❤️%20By-HastagAB-red)](https://github.com/hastagAB)
|
[![](https://img.shields.io/badge/Made%20With%20❤️%20By-HastagAB-red)](https://github.com/hastagAB)
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
# RSA Algorithm
|
|
||||||
* Python script that encrypts and decrypts a text based on [RSA algorithm](https://people.csail.mit.edu/rivest/Rsapaper.pdf)
|
|
||||||
* It involves the concept of modular arithmatic and euler's theorem.
|
|
||||||
* It is also based on the idea that factorizing large numbers requires years.
|
|
||||||
* Here, the (a,n) are kept public and (p,q,b) are kept private.
|
|
||||||
|
|
||||||
![](https://github.com/Chinmayrane16/Awesome-Python-Scripts/blob/master/RSA_Algorithm/RSA_Algorithm.png)
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
For Windows users:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ python RSA_Algorithm.py
|
|
||||||
```
|
|
||||||
|
|
||||||
For Mac/Linux/Unix users:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ ./RSA_Algorithm.py
|
|
||||||
```
|
|
||||||
|
|
||||||
## References
|
|
||||||
[Blog](https://www.di-mgt.com.au/rsa_alg.html) <br>
|
|
||||||
[Paper](https://people.csail.mit.edu/rivest/Rsapaper.pdf) <br>
|
|
||||||
[Video](https://www.youtube.com/watch?v=wXB-V_Keiu8)
|
|
Before Width: | Height: | Size: 82 KiB |
|
@ -1,185 +0,0 @@
|
||||||
"""
|
|
||||||
For more information on the algorithm, refer the following links:
|
|
||||||
|
|
||||||
https://www.di-mgt.com.au/rsa_alg.html
|
|
||||||
https://people.csail.mit.edu/rivest/Rsapaper.pdf
|
|
||||||
https://www.youtube.com/watch?v=wXB-V_Keiu8
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
def isPrime(n):
|
|
||||||
prime = [True for i in range(n+1)]
|
|
||||||
p = 2
|
|
||||||
while p*p<=n:
|
|
||||||
if prime[p]==True:
|
|
||||||
for i in range(p*p,n+1,p):
|
|
||||||
prime[i]=False
|
|
||||||
p+=1
|
|
||||||
|
|
||||||
return prime[n]
|
|
||||||
|
|
||||||
|
|
||||||
def gcd(a,b):
|
|
||||||
while b!=0:
|
|
||||||
r = a%b
|
|
||||||
a=b
|
|
||||||
b=r
|
|
||||||
return a
|
|
||||||
|
|
||||||
def Multiplicative_inverse(a,b):
|
|
||||||
s1 = 1
|
|
||||||
s2 = 0
|
|
||||||
m = b
|
|
||||||
while b!=0:
|
|
||||||
q=a//b
|
|
||||||
r=a%b
|
|
||||||
a=b
|
|
||||||
b=r
|
|
||||||
s=s1-q*s2
|
|
||||||
s1=s2
|
|
||||||
s2=s
|
|
||||||
|
|
||||||
if s1<0:
|
|
||||||
s1+=m
|
|
||||||
|
|
||||||
return s1
|
|
||||||
|
|
||||||
def powermod(x,y,p):
|
|
||||||
res = 1
|
|
||||||
|
|
||||||
x = x%p
|
|
||||||
while (y>0):
|
|
||||||
|
|
||||||
if (y%2) == 1:
|
|
||||||
res = (res*x)%p
|
|
||||||
|
|
||||||
y = y//2
|
|
||||||
x = (x*x)%p
|
|
||||||
|
|
||||||
return res
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
while (True):
|
|
||||||
res = input('Do you want to enter prime numbers (y) or let the algorithm do it for you (n) or exit (e)? (y/n/e): ')
|
|
||||||
if res == 'y':
|
|
||||||
while True:
|
|
||||||
p = 13
|
|
||||||
p = int(input('Enter a prime number: '))
|
|
||||||
if isPrime(p):
|
|
||||||
break
|
|
||||||
else:
|
|
||||||
print(p,'is not a prime number')
|
|
||||||
continue
|
|
||||||
|
|
||||||
while True:
|
|
||||||
q = 17
|
|
||||||
q = int(input('Enter a different prime number: '))
|
|
||||||
if isPrime(q) and (p*q>26):
|
|
||||||
break
|
|
||||||
else:
|
|
||||||
print('Both the prime numbers are same!! or product of both the prime numbers is less than 26!!')
|
|
||||||
continue
|
|
||||||
|
|
||||||
n = p*q
|
|
||||||
phi_n = (p-1)*(q-1)
|
|
||||||
a = 19
|
|
||||||
while True:
|
|
||||||
a = int(input('Enter a number such that Greatest Common Divisor of that number with '+ str(phi_n) + ' is 1: '))
|
|
||||||
if gcd(a,phi_n)!=1:
|
|
||||||
continue
|
|
||||||
else:
|
|
||||||
break
|
|
||||||
|
|
||||||
b = Multiplicative_inverse(a,phi_n)
|
|
||||||
message = input('Enter the message to be encrypted (lower case): ')
|
|
||||||
message = message.lower()
|
|
||||||
|
|
||||||
encrypted_string = ""
|
|
||||||
encrypted_num = []
|
|
||||||
|
|
||||||
for i in range(len(message)):
|
|
||||||
ch = message[i]
|
|
||||||
if ch!=' ':
|
|
||||||
m = ord(ch) - 97
|
|
||||||
e = powermod(m,a,n)
|
|
||||||
encrypted_num.append(e)
|
|
||||||
encrypted_string += chr(e%26 + 97)
|
|
||||||
else:
|
|
||||||
encrypted_string +=' '
|
|
||||||
|
|
||||||
print('Encrypted message is:', encrypted_string)
|
|
||||||
print(encrypted_num)
|
|
||||||
res = input("Do you want to decrypt it too? (y/n): ")
|
|
||||||
if res == 'y':
|
|
||||||
decrypted = ''
|
|
||||||
j=0
|
|
||||||
for i in range(len(encrypted_string)):
|
|
||||||
ch = message[i]
|
|
||||||
if ch != ' ':
|
|
||||||
e = encrypted_num[j]
|
|
||||||
m = powermod(e,b,n)
|
|
||||||
ch = chr(m+97)
|
|
||||||
decrypted+=ch
|
|
||||||
j+=1
|
|
||||||
else:
|
|
||||||
decrypted+=' '
|
|
||||||
|
|
||||||
print("Decrypted message is:",decrypted)
|
|
||||||
else:
|
|
||||||
ans = input("Do you want to continue? (y/n): ")
|
|
||||||
if ans == 'y':
|
|
||||||
continue
|
|
||||||
else:
|
|
||||||
break
|
|
||||||
|
|
||||||
elif res == 'n':
|
|
||||||
p = 13
|
|
||||||
q = 17
|
|
||||||
n = p*q
|
|
||||||
a = 5
|
|
||||||
b = 77
|
|
||||||
message = input('Enter the message to be encrypted (lower case): ')
|
|
||||||
message = message.lower()
|
|
||||||
|
|
||||||
encrypted_string = ""
|
|
||||||
encrypted_num = []
|
|
||||||
|
|
||||||
for i in range(len(message)):
|
|
||||||
ch = message[i]
|
|
||||||
if ch!=' ':
|
|
||||||
m = ord(ch) - 97
|
|
||||||
e = powermod(m,a,n)
|
|
||||||
encrypted_num.append(e)
|
|
||||||
encrypted_string += chr(e%26 + 97)
|
|
||||||
else:
|
|
||||||
encrypted_string +=' '
|
|
||||||
|
|
||||||
print('Encrypted message is:', encrypted_string)
|
|
||||||
res = input("Do you want to decrypt it too? (y/n): ")
|
|
||||||
if res == 'y':
|
|
||||||
decrypted = ''
|
|
||||||
j=0
|
|
||||||
for i in range(len(encrypted_string)):
|
|
||||||
ch = encrypted_string[i]
|
|
||||||
if ch != ' ':
|
|
||||||
e = encrypted_num[j]
|
|
||||||
m = powermod(e,b,n)
|
|
||||||
ch = chr(m+97)
|
|
||||||
decrypted+=ch
|
|
||||||
j+=1
|
|
||||||
else:
|
|
||||||
decrypted+=' '
|
|
||||||
|
|
||||||
print("Decrypted message is:",decrypted)
|
|
||||||
else:
|
|
||||||
ans = input("Do you want to continue? (y/n): ")
|
|
||||||
if ans == 'y':
|
|
||||||
continue
|
|
||||||
else:
|
|
||||||
break
|
|
||||||
elif res == 'e':
|
|
||||||
break
|
|
||||||
else:
|
|
||||||
print('Invalid command!')
|
|
||||||
continue
|
|
|
@ -1,18 +0,0 @@
|
||||||
# RSA Communication Script
|
|
||||||
|
|
||||||
## How to use
|
|
||||||
To use this script you may first open the script :p
|
|
||||||
It will take some time, it will generate two BIG prime numbers, and that takes some time.
|
|
||||||
|
|
||||||
After it finnishes calculating your keypair, it will print it and ask you if you want to encrypt or decrypt a message.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
If you want to encrypt, you write "e" and then press enter. The script will ask you for a key (keypair) to encrypt your message, and here you paste the keypair of your correspondant
|
|
||||||
(the string that shows up at his/her script start).
|
|
||||||
After you paste the keypair you will write your message, and when you press enter the encrypted message will be printed.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
If you want to decrypt a message, you write "d" and the press enter. Then the script will ask you for the message to decrypt, wich you are going to paste and press enter.
|
|
||||||
After you press enter the decrypted message will be displayed :)
|
|
|
@ -1,158 +0,0 @@
|
||||||
#Modulus (N) bit length, k.
|
|
||||||
#OUTPUT: An RSA key pair ((N,e),d) where N is the modulus, the product of two primes (N=pq) not exceeding k bits in length;
|
|
||||||
# e is the public exponent, a number less than and coprime to (p−1)(q−1);
|
|
||||||
# and d is the private exponent such that e*d ≡ 1 mod (p−1)*(q−1).
|
|
||||||
##############################################################
|
|
||||||
#Select a value of e from 3,5,17,257,65537 (easy operations)
|
|
||||||
# while p mod e = 1
|
|
||||||
# p = genprime(k/2)
|
|
||||||
#
|
|
||||||
# while q mode e = 1:
|
|
||||||
# q = genprime(k - k/2)
|
|
||||||
#
|
|
||||||
#N = p*q
|
|
||||||
#L = (p-1)(q-1)
|
|
||||||
#d = modinv(e, L)
|
|
||||||
#return (N,e,d)
|
|
||||||
|
|
||||||
from random import randrange, getrandbits
|
|
||||||
import base64
|
|
||||||
|
|
||||||
class rsa():
|
|
||||||
|
|
||||||
def __init__(self, e=4, k=5):
|
|
||||||
self.e = [3, 5, 17, 257, 65537][e]
|
|
||||||
self.k = [128, 256, 1024, 2048, 3072, 4096][k]
|
|
||||||
|
|
||||||
def is_prime(self, n, tests=128):
|
|
||||||
if n == 2 or n == 3:
|
|
||||||
return True
|
|
||||||
if n <= 1 or n % 2 == 0:
|
|
||||||
return False
|
|
||||||
s = 0
|
|
||||||
r = n - 1
|
|
||||||
while r & 1 == 0:
|
|
||||||
s += 1
|
|
||||||
r //= 2
|
|
||||||
for _ in range(tests):
|
|
||||||
a = randrange(2, n - 1)
|
|
||||||
x = pow(a, r, n)
|
|
||||||
if x != 1 and x != n - 1:
|
|
||||||
j = 1
|
|
||||||
while j < s and x != n - 1:
|
|
||||||
x = pow(x, 2, n)
|
|
||||||
if x == 1:
|
|
||||||
return False
|
|
||||||
j += 1
|
|
||||||
if x != n - 1:
|
|
||||||
return False
|
|
||||||
return True
|
|
||||||
|
|
||||||
def genprime(self, length=1024):
|
|
||||||
p = 1
|
|
||||||
while len(bin(p))-2 != length:
|
|
||||||
p = list(bin(getrandbits(length)))
|
|
||||||
p = int(''.join(p[0:2] + ['1', '1'] + p[4:]), 2)
|
|
||||||
p += 1 if p % 2 == 0 else 0
|
|
||||||
|
|
||||||
ip = self.is_prime(p)
|
|
||||||
while not ip:
|
|
||||||
p += 2
|
|
||||||
ip = self.is_prime(p)
|
|
||||||
|
|
||||||
return p
|
|
||||||
|
|
||||||
def egcd(self, a, b):
|
|
||||||
if a == 0:
|
|
||||||
return (b, 0, 1)
|
|
||||||
else:
|
|
||||||
g, y, x = self.egcd(b % a, a)
|
|
||||||
return (g, x - (b // a) * y, y)
|
|
||||||
|
|
||||||
def modinv(self, a, m):
|
|
||||||
g, x, y = self.egcd(a, m)
|
|
||||||
if g != 1:
|
|
||||||
raise Exception('modular inverse does not exist')
|
|
||||||
else:
|
|
||||||
return x % m
|
|
||||||
|
|
||||||
def get_creds(self, e, k):
|
|
||||||
N = 0
|
|
||||||
while len(bin(int(N)))-2 != k:
|
|
||||||
p = self.genprime(int(k/2))
|
|
||||||
while pow(p, 1, e) == 1:
|
|
||||||
p = self.genprime(int(k/2))
|
|
||||||
q = self.genprime(k - int(k/2))
|
|
||||||
while pow(q, 1, e) == 1 and q == p:
|
|
||||||
q = self.genprime(k - int(k/2))
|
|
||||||
N = p*q
|
|
||||||
L = (p-1)*(q-1)
|
|
||||||
d = self.modinv(e, L)
|
|
||||||
return p, q, (d, e, N)
|
|
||||||
|
|
||||||
def get_keys(self):
|
|
||||||
p, q, creds = self.get_creds(self.e, self.k)
|
|
||||||
return creds
|
|
||||||
|
|
||||||
def save_keys(self, filename="keys.k"):
|
|
||||||
keys = self.get_keys()
|
|
||||||
with open(filename, "w", encoding="utf-8") as file:
|
|
||||||
file.write(str(keys[0]) + "\n" + str(keys[1]) + "\n" + str(keys[2]))
|
|
||||||
|
|
||||||
def load_keys(self, filename="keys.k"):
|
|
||||||
with open(filename, "r", encoding="utf-8") as file:
|
|
||||||
f = file.read().split("\n")
|
|
||||||
d = int(f[0])
|
|
||||||
e = int(f[1])
|
|
||||||
n = int(f[2])
|
|
||||||
return (d, e, n)
|
|
||||||
|
|
||||||
def encrypt(self, ke, plaintext):
|
|
||||||
key, n = ke
|
|
||||||
b64_string = base64.b64encode(plaintext.encode("utf-8")).decode("utf-8")
|
|
||||||
ready_code = []
|
|
||||||
for char in list(b64_string):
|
|
||||||
ready_code.append('0' * (3 - len(str(ord(char)))) + str(ord(char)))
|
|
||||||
ready_code = int("1" + "".join(ready_code))
|
|
||||||
cipher = pow(ready_code, key, n)
|
|
||||||
return cipher
|
|
||||||
|
|
||||||
def decrypt(self, kd, ciphertext):
|
|
||||||
key, n = kd
|
|
||||||
plain_list = list(str(pow(ciphertext, key, n)))[1:]
|
|
||||||
plain = []
|
|
||||||
count = 1
|
|
||||||
temp = ""
|
|
||||||
for i in plain_list:
|
|
||||||
if count != 4:
|
|
||||||
temp += i
|
|
||||||
count += 1
|
|
||||||
else:
|
|
||||||
plain.append(temp)
|
|
||||||
temp = i
|
|
||||||
count = 2
|
|
||||||
plain.append(temp)
|
|
||||||
plain_list = plain
|
|
||||||
plain = base64.b64decode(''.join([chr(int(char)) for char in plain_list])).decode("utf-8")
|
|
||||||
return plain
|
|
||||||
|
|
||||||
encryption = rsa()
|
|
||||||
keys = encryption.get_keys()
|
|
||||||
|
|
||||||
d = keys[0]
|
|
||||||
e = keys[1]
|
|
||||||
n = keys[2]
|
|
||||||
|
|
||||||
print("key: \n" + str(e) + "/" + str(n))
|
|
||||||
|
|
||||||
while True:
|
|
||||||
choose = input("Encrypt (e)/ Decrypt (d) > ")
|
|
||||||
if choose == "e":
|
|
||||||
e, n = input("insert key > ").split("/")
|
|
||||||
to_encrypt = input("message to encrypt > ")
|
|
||||||
a = encryption.encrypt((int(e), int(n)), to_encrypt)
|
|
||||||
print(a)
|
|
||||||
elif choose == "d":
|
|
||||||
to_decrypt = input("message to decrypt > ")
|
|
||||||
a = encryption.decrypt((d, n), to_decrypt)
|
|
||||||
print(a)
|
|
|
@ -1,25 +0,0 @@
|
||||||
# Programs
|
|
||||||
## [Random_Email_Generator.py](./Random_email_generator.py)
|
|
||||||
This program randomly generates an email address using a mix of letters, both caps on and off, numbers, and punctuation, then outputs the results.
|
|
||||||
|
|
||||||
|
|
||||||
# Requirements
|
|
||||||
* [Random_Email_Generator.py](./Random_email_generator.py) can use Python 3 and higher or Python 2 and higher.
|
|
||||||
Moreover, you might also have to install progressbar library in your system.
|
|
||||||
```bash
|
|
||||||
$ pip install progressbar
|
|
||||||
```
|
|
||||||
|
|
||||||
# Usage
|
|
||||||
|
|
||||||
For Windows users:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ python Random_email_generator.py
|
|
||||||
```
|
|
||||||
|
|
||||||
For Mac/Linux/Unix users:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ ./Random_email_generator.py
|
|
||||||
```
|
|
|
@ -1,62 +0,0 @@
|
||||||
import random
|
|
||||||
import string
|
|
||||||
import csv
|
|
||||||
import progressbar
|
|
||||||
|
|
||||||
'''
|
|
||||||
Asks user for how many emails they want generated. Must be Integer.
|
|
||||||
If not an integer, keeps recursively cycling back until it gets an integer.
|
|
||||||
'''
|
|
||||||
def getcount():
|
|
||||||
rownums = input("How many email addresses?: ")
|
|
||||||
try:
|
|
||||||
rowint = int(rownums)
|
|
||||||
return rowint
|
|
||||||
except ValueError:
|
|
||||||
print ("Please enter an integer value")
|
|
||||||
return getcount()
|
|
||||||
|
|
||||||
'''
|
|
||||||
Creates a random string of digits between 1 and 20 characters alphanumeric and adds it to a fake domain and fake extension
|
|
||||||
Most of these emails are completely bogus (eg - gmail.gov) but will meet formatting requirements for my purposes
|
|
||||||
'''
|
|
||||||
def makeEmail():
|
|
||||||
extensions = ['com','net','org','gov']
|
|
||||||
domains = ['gmail','yahoo','comcast','verizon','charter','hotmail','outlook','frontier']
|
|
||||||
|
|
||||||
winext = extensions[random.randint(0,len(extensions)-1)]
|
|
||||||
windom = domains[random.randint(0,len(domains)-1)]
|
|
||||||
|
|
||||||
acclen = random.randint(1,20)
|
|
||||||
|
|
||||||
winacc = ''.join(random.choice(string.ascii_lowercase + string.digits) for _ in range(acclen))
|
|
||||||
|
|
||||||
finale = winacc + "@" + windom + "." + winext
|
|
||||||
return finale
|
|
||||||
|
|
||||||
#save count to var
|
|
||||||
howmany = getcount()
|
|
||||||
|
|
||||||
#counter for While loop
|
|
||||||
counter = 0
|
|
||||||
|
|
||||||
#empty array for loop
|
|
||||||
emailarray = []
|
|
||||||
|
|
||||||
#uses counter to figure out how many emails to keep making
|
|
||||||
|
|
||||||
print ("Creating email addresses...")
|
|
||||||
print ("Progress: ")
|
|
||||||
|
|
||||||
prebar = progressbar.ProgressBar(maxval=int(howmany))
|
|
||||||
|
|
||||||
for i in prebar(range(howmany)):
|
|
||||||
while counter < howmany:
|
|
||||||
emailarray.append(str(makeEmail()))
|
|
||||||
counter = counter+1
|
|
||||||
prebar.update(i)
|
|
||||||
|
|
||||||
print ("Creation completed.")
|
|
||||||
|
|
||||||
for i in emailarray:
|
|
||||||
print(i)
|
|
|
@ -1,5 +0,0 @@
|
||||||
# Remove Duplicate Files
|
|
||||||
A python script to find/remove duplicate files from the user specified directory
|
|
||||||
|
|
||||||
# Usage
|
|
||||||
Simply run the script removeDuplicateFiles.py from the terminal after specifying the path
|
|
|
@ -1,59 +0,0 @@
|
||||||
import os
|
|
||||||
import hashlib
|
|
||||||
|
|
||||||
# function to compute SHA-1 hash of a file
|
|
||||||
def computeFileHash(fileName):
|
|
||||||
genHash = hashlib.sha1()
|
|
||||||
with open(fileName, 'rb') as file:
|
|
||||||
block = 0
|
|
||||||
while block!=b'':
|
|
||||||
block = file.read(1024)
|
|
||||||
genHash.update(block)
|
|
||||||
file.close()
|
|
||||||
return genHash.hexdigest()
|
|
||||||
|
|
||||||
#function to get list of files present in a directory
|
|
||||||
def getFileList(dirPath):
|
|
||||||
listOfFiles=list()
|
|
||||||
for(dirpath, dirnames, filenames) in os.walk(dirPath):
|
|
||||||
listOfFiles+=[os.path.join(dirpath, file) for file in filenames]
|
|
||||||
return listOfFiles
|
|
||||||
|
|
||||||
def main():
|
|
||||||
dirPath = input("Enter relative path to directory: ")
|
|
||||||
if not os.path.exists(dirPath):
|
|
||||||
print("Invalid path.")
|
|
||||||
exit()
|
|
||||||
listOfFiles = getFileList(dirPath)
|
|
||||||
duplicateFileSizes={}
|
|
||||||
duplicateFileHashes={}
|
|
||||||
""" grouping files according to their size, so that hashes have to be
|
|
||||||
computed only for files having the same size"""
|
|
||||||
for file in listOfFiles:
|
|
||||||
fileSize = os.path.getsize(file)
|
|
||||||
if fileSize in duplicateFileSizes:
|
|
||||||
duplicateFileSizes[fileSize].append(file)
|
|
||||||
else:
|
|
||||||
duplicateFileSizes[fileSize] = [file]
|
|
||||||
for List in duplicateFileSizes.values():
|
|
||||||
if len(List)>1:
|
|
||||||
for path in List:
|
|
||||||
fileHash = computeFileHash(path)
|
|
||||||
if fileHash in duplicateFileHashes.keys():
|
|
||||||
duplicateFileHashes[fileHash].append(path)
|
|
||||||
else:
|
|
||||||
duplicateFileHashes[fileHash]=[path]
|
|
||||||
print("Duplicates in the directory are:")
|
|
||||||
for files in duplicateFileHashes.values():
|
|
||||||
print("(", end='')
|
|
||||||
for fileName in files:
|
|
||||||
print(fileName, end=', ')
|
|
||||||
print(")")
|
|
||||||
delete = input('Enter Y to delete duplicate files: ')
|
|
||||||
if delete=='Y' or delete=='y':
|
|
||||||
for files in duplicateFileHashes.values():
|
|
||||||
for fileName in files[1:]:
|
|
||||||
os.remove(fileName)
|
|
||||||
if __name__=='__main__':
|
|
||||||
main()
|
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
# Python Rock-Paper-Scissor GAME
|
|
||||||
|
|
||||||
The Python script shows the easy to understand and executable program which is used to play the rock-paper-scissor game with scorecard and wish to start or exit.
|
|
||||||
|
|
||||||
## Requirement
|
|
||||||
|
|
||||||
Python 3.xx
|
|
||||||
|
|
||||||
## Running the script
|
|
||||||
|
|
||||||
```bash
|
|
||||||
python Rock-Paper-Scissor.py
|
|
||||||
```
|
|
|
@ -1,102 +0,0 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
# coding: utf-8
|
|
||||||
|
|
||||||
# In[1]:
|
|
||||||
|
|
||||||
|
|
||||||
import random
|
|
||||||
|
|
||||||
|
|
||||||
def takePlayerInput():
|
|
||||||
player = "blank"
|
|
||||||
while not (player.lower() == "r" or player.lower() == "p" or player.lower() == "s"):
|
|
||||||
player = input("Please Enter your input out of - R | P | S = ")
|
|
||||||
return player.lower()
|
|
||||||
|
|
||||||
|
|
||||||
# In[2]:
|
|
||||||
|
|
||||||
|
|
||||||
takePlayerInput()
|
|
||||||
|
|
||||||
|
|
||||||
# In[3]:
|
|
||||||
|
|
||||||
|
|
||||||
def getBotInput():
|
|
||||||
lst = ["r", "s", "p"]
|
|
||||||
return random.choice(lst)
|
|
||||||
|
|
||||||
|
|
||||||
# In[4]:
|
|
||||||
|
|
||||||
getBotInput()
|
|
||||||
|
|
||||||
|
|
||||||
# In[5]:
|
|
||||||
|
|
||||||
|
|
||||||
def checkWinner(player, bot):
|
|
||||||
if player == "r" and bot == "r":
|
|
||||||
return "Draw"
|
|
||||||
elif player == "r" and bot == "p":
|
|
||||||
return "Bot"
|
|
||||||
elif player == "r" and bot == "s":
|
|
||||||
return "Player"
|
|
||||||
elif player == "p" and bot == "p":
|
|
||||||
return "Draw"
|
|
||||||
elif player == "p" and bot == "r":
|
|
||||||
return "Player"
|
|
||||||
elif player == "p" and bot == "s":
|
|
||||||
return "Bot"
|
|
||||||
elif player == "s" and bot == "s":
|
|
||||||
return "Draw"
|
|
||||||
elif player == "s" and bot == "p":
|
|
||||||
return "Player"
|
|
||||||
elif player == "s" and bot == "r":
|
|
||||||
return "Bot"
|
|
||||||
else:
|
|
||||||
return "DRAW"
|
|
||||||
|
|
||||||
|
|
||||||
# In[6]:
|
|
||||||
|
|
||||||
|
|
||||||
checkWinner("s", "p")
|
|
||||||
|
|
||||||
|
|
||||||
# In[7]:
|
|
||||||
|
|
||||||
|
|
||||||
def rockPaperScissor():
|
|
||||||
endTheGame = "n"
|
|
||||||
player_score = 0
|
|
||||||
bot_score = 0
|
|
||||||
while endTheGame.lower() != "y":
|
|
||||||
ply = takePlayerInput()
|
|
||||||
bt = getBotInput()
|
|
||||||
print("Bot Entered -", bt)
|
|
||||||
winner = checkWinner(player=ply, bot=bt)
|
|
||||||
print("Winner is - ", winner)
|
|
||||||
if winner == "Player":
|
|
||||||
player_score += 2
|
|
||||||
elif winner == "Bot":
|
|
||||||
bot_score += 2
|
|
||||||
else:
|
|
||||||
player_score += 1
|
|
||||||
bot_score += 1
|
|
||||||
|
|
||||||
print("-----Score Board-----")
|
|
||||||
print("-----Player-----", player_score)
|
|
||||||
print("-----Bot-----", bot_score)
|
|
||||||
print(" ")
|
|
||||||
endTheGame = input("You want to end Y/N - ")
|
|
||||||
|
|
||||||
|
|
||||||
# In[8]:
|
|
||||||
|
|
||||||
|
|
||||||
rockPaperScissor()
|
|
||||||
|
|
||||||
|
|
||||||
# In[ ]:
|
|
|
@ -1,33 +0,0 @@
|
||||||
# SSH Host adder
|
|
||||||
|
|
||||||
This is a fairly simple script which adds hosts to an ssh config file.
|
|
||||||
SSH allows you to add hosts to a config file, so you don't have to remember ip addresses or hostnames. So if you add:
|
|
||||||
|
|
||||||
```
|
|
||||||
HOST test
|
|
||||||
HostName 192.168.80.1
|
|
||||||
User root
|
|
||||||
Port 22
|
|
||||||
```
|
|
||||||
|
|
||||||
to `~/.ssh/config`, you can just do `ssh test` instead of writing the address / user / port.
|
|
||||||
|
|
||||||
But when you constantly get new servers to ssh to, it's helpful to have a script!
|
|
||||||
|
|
||||||
## Usage:
|
|
||||||
|
|
||||||
```
|
|
||||||
./ssh_adder my_host 192.168.80.1 [--user myuser] [--port 2200]
|
|
||||||
```
|
|
||||||
|
|
||||||
`--user` and `--port` are optional and default to `root` and `22` respectively.
|
|
||||||
|
|
||||||
If you aren't using the default ssh config path, there is an argument for that as well:
|
|
||||||
|
|
||||||
```
|
|
||||||
./ssh_adder my_host 192.168.80.1 --conf /path/to/config
|
|
||||||
```
|
|
||||||
|
|
||||||
`-conf` defaults to `~/.ssh/config`
|
|
||||||
|
|
||||||
SSH configs allow you to make more complex operations, like adding different keys and whatnot, which I don't support here mostly because I haven't had a need to yet. If I get to updating my script some time, I'll update it here too.
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/usr/bin/python
|
|
||||||
|
|
||||||
import sys
|
|
||||||
import ssh_adder
|
|
||||||
|
|
||||||
def main():
|
|
||||||
ssh_adder.main(sys.argv)
|
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
import argparse, os
|
|
||||||
|
|
||||||
ssh_template = """
|
|
||||||
HOST {name}
|
|
||||||
HostName {hostname}
|
|
||||||
User {user}
|
|
||||||
Port {port}
|
|
||||||
"""
|
|
||||||
|
|
||||||
def args_to_obj(args):
|
|
||||||
obj = ssh_template.format(**args)
|
|
||||||
return obj
|
|
||||||
|
|
||||||
def add_to_conf(conf, obj):
|
|
||||||
conf = os.path.expanduser(conf)
|
|
||||||
with open(conf, 'a') as f:
|
|
||||||
f.write(obj)
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
# create the top-level parser
|
|
||||||
parser = argparse.ArgumentParser(prog = "Adds ssh hosts to the ssh config file. Is kind of a simple script which doesn't support all the options. May update with more stuff. \nExample usage: ./ssh_adder myhost 192.168.80.1 --user someuser --port 2200 --conf /path/to/non-default/ssh/config")
|
|
||||||
|
|
||||||
# create the parser for the "a" command
|
|
||||||
parser.add_argument('name', help = "This is the name of the Host to add to the config. For instance, if you want to do `ssh somehost`, then name should be `somehost`")
|
|
||||||
parser.add_argument('hostname', help = "This is the hostname/ip address of the host. If `somehost`'s address is 192.168.80.1, then hostname=192.168.80.1")
|
|
||||||
parser.add_argument('--user', default = 'root', help="The user to connect with. Defaults to root")
|
|
||||||
parser.add_argument('--port', default = 22, type = int, help = "The port to connect to. Defaults to 22")
|
|
||||||
parser.add_argument('--conf', default = '~/.ssh/config', help = "The path to the ssh config file. Defaults to ~/.ssh/config, which is the default location. ")
|
|
||||||
|
|
||||||
args = parser.parse_args()
|
|
||||||
|
|
||||||
obj = args_to_obj(args.__dict__)
|
|
||||||
add_to_conf(args.conf, obj)
|
|
||||||
|
|
||||||
main()
|
|
|
@ -1,21 +0,0 @@
|
||||||
# Steganography Tool
|
|
||||||
|
|
||||||
* Advanced Image Steganography Tool used to hide files inside Images.
|
|
||||||
* Uses LSB (Least Significant Bit) Algorithm to store file data inside the image
|
|
||||||
* Works with only .png format
|
|
||||||
|
|
||||||
Commands
|
|
||||||
```
|
|
||||||
python3 steg.py
|
|
||||||
```
|
|
||||||
Input
|
|
||||||
```
|
|
||||||
encode <input_image_name> <output_image_name> <file_name>
|
|
||||||
|
|
||||||
decode <encoded_image_name> <extracted_file_name>
|
|
||||||
```
|
|
||||||
Example
|
|
||||||
```
|
|
||||||
encode image.png image_new.png secret.txt
|
|
||||||
decode image_new.png secret_new.txt
|
|
||||||
```
|
|