Skip to content
This repository has been archived by the owner on May 25, 2022. It is now read-only.

Commit

Permalink
removed unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaytsev Dmitriy committed Oct 17, 2020
1 parent 6f67e2f commit 8dae244
Show file tree
Hide file tree
Showing 25 changed files with 12 additions and 29 deletions.
2 changes: 1 addition & 1 deletion projects/Convert_JPEG_to_PNG/converter_GUI.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import tkinter as tk
from tkinter import filedialog, messagebox
from tkinter import filedialog
from PIL import Image
root = tk.Tk() # Tkinter window initialized
root.title('Converter') # Title of the window
Expand Down
3 changes: 1 addition & 2 deletions projects/Convert_numbers_to_word/converter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import math

one_digit_words = {
'0': ["zero"],
Expand Down Expand Up @@ -80,5 +79,5 @@ def converter(n):
break
int(n)
print(n, "-->", converter(n))
except ValueError as e:
except ValueError:
print("Error: Invalid Number!")
1 change: 0 additions & 1 deletion projects/Create_a_simple_stopwatch/stopwatch.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import tkinter as Tkinter
from datetime import datetime
import time
counter = 0
running = False

Expand Down
1 change: 0 additions & 1 deletion projects/Dns_record/dns_record.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Simple program to fetch dns record of a given website

import json
import dns.resolver

#Dictionary to store the dns record of a website
Expand Down
2 changes: 1 addition & 1 deletion projects/Fetch HTTP status code/fetch_http_status_code.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Program to fetch the http status code give the url/api
from urllib.request import Request, urlopen
from urllib.request import urlopen
from urllib.error import URLError, HTTPError
import emoji

Expand Down
Binary file modified projects/Fetch_and_store_tweets/img/output-2.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified projects/Fetch_and_store_tweets/img/output.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified projects/Fetch_and_store_tweets/img/step-1.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified projects/Fetch_and_store_tweets/img/step-2.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified projects/Fetch_and_store_tweets/img/step-3.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified projects/Fetch_and_store_tweets/img/step-4.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified projects/Fetch_and_store_tweets/img/step-5.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified projects/Fetch_and_store_tweets/img/step-6.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion projects/Fetch_current_weather/fetch_current_weather.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Python program to find current weather details of any city using openweathermap api
import requests, json
import requests

# Enter your API key here
api_key = "Your_API_Key"
Expand Down
1 change: 0 additions & 1 deletion projects/Find_imdb_rating/find_IMDb_rating.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from bs4 import BeautifulSoup
import requests
import json
import pandas as pd
import os

Expand Down
2 changes: 1 addition & 1 deletion projects/Get_meta_information_of_images/gps_utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import exifread
import requests,json
import requests
from geopy.geocoders import Nominatim

def format_lati_long(data):
Expand Down
2 changes: 1 addition & 1 deletion projects/Image_watermark/watermark.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def watermark_photo(input_image_path, output_image_path, watermark_image_path):
# add watermark to your image
position = base_image.size

watermark_size = watermark.size
watermark.size

newsize = int(position[0] * 8 / 100), int(position[0] * 8 / 100)

Expand Down
2 changes: 0 additions & 2 deletions projects/Instagram_profile/profilepic.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from datetime import datetime
from tqdm import tqdm
import requests
import re
import sys
from PIL import Image


Expand Down
3 changes: 1 addition & 2 deletions projects/Merge_csv_files/merge_csv_files.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import os
import glob
import pandas as pd

extension = 'csv'
all_filenames = [i for i in glob.glob('*.{}'.format(extension))]

combined_csv = pd.concat([pd.read_csv(f) for f in all_filenames ])
combined_csv.to_csv( "combined_csv.csv", index=False, encoding='utf-8-sig')
combined_csv.to_csv( "combined_csv.csv", index=False, encoding='utf-8-sig')
4 changes: 1 addition & 3 deletions projects/Scrape_Hacker_News/main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import requests
import os
from multiprocessing import Pool, cpu_count
from functools import partial
from bs4 import BeautifulSoup, SoupStrainer
# Makes Output Directory if it does not exist
if not os.path.exists(os.path.join(os.getcwd(), 'HackerNews')):
Expand Down Expand Up @@ -96,6 +94,6 @@ def fetch(page_no, verbose=False):
for page_no in range(1, pages + 1):
fetch(page_no, verbose)
break
except ValueError as e:
except ValueError:
print('\nInvalid input, probably not a positive integer\n')
continue
1 change: 0 additions & 1 deletion projects/Textfile_analysis/textfile_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import sys
import collections
import string
import re

script_name = sys.argv[0]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import random
import time
import sys

Expand Down
6 changes: 1 addition & 5 deletions projects/Web_page_summation/app.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
#!/usr/bin/python
from tempfile import NamedTemporaryFile
from utils.summarize import summarize
import csv
import json
import shutil
import os
import textwrap
import logging
import signal
import argparse
import sys
import getopt


def parse_args(argv):
Expand Down Expand Up @@ -127,7 +123,7 @@ def main(argv=sys.argv):
if action == 'simple':
# guide against errors
try:
summary = summarize(url, LANGUAGE, SENTENCES_COUNT)
summarize(url, LANGUAGE, SENTENCES_COUNT)
except:
print(
'\n\n Invalid Entry!, please Ensure you enter a valid web link \n\n')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from requests import get
import os
import ctypes
import argparse
import sys

url = "https://source.unsplash.com/random"
Expand Down
7 changes: 3 additions & 4 deletions projects/convert_png_images_to_ico_format/convertUI.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import tkinter as tk
from tkinter import filedialog, messagebox
from PIL import Image

# Initialize Tkinter window
Expand All @@ -15,7 +14,7 @@
def getPNG():
'''Function to get png image location and open it with pillow'''
global img
import_file_path = filedialog.askopenfilename(filetypes=[("PNG File",'.png')])
import_file_path = tk.filedialog.askopenfilename(filetypes=[("PNG File",'.png')])
img = Image.open(import_file_path)

def convertToICO():
Expand All @@ -24,7 +23,7 @@ def convertToICO():
if img is None:
tk.messagebox.showerror("Error", "No File selected")
else:
export_file_path = filedialog.asksaveasfilename(defaultextension='.ico')
export_file_path = tk.filedialog.asksaveasfilename(defaultextension='.ico')
img.save(export_file_path)
tk.messagebox.showinfo("Success", "File converted and saved")

Expand All @@ -42,4 +41,4 @@ def convertToICO():
# Convert button to convert selected image and save
saveAsButton = tk.Button(text='Convert PNG to ICO', command=convertToICO, bg=bg, fg=fg, font=font, width=width)
canvas1.create_window(250, 200, window=saveAsButton)
root.mainloop()
root.mainloop()

0 comments on commit 8dae244

Please sign in to comment.