This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from os import path | |
import numpy as np | |
from PIL import Image | |
import wikipedia | |
from wordcloud import WordCloud, STOPWORDS | |
# get path to script's directory | |
currdir = path.dirname(__file__) | |
def get_wiki(query): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import cv2 | |
import numpy as np | |
url = "http://192.168.43.1:8080/shot.jpg" | |
while True: | |
img_resp = requests.get(url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
url = input("Enter the URL: ") | |
r = requests.get(url) | |
print("{} redirections took place.".format(len(r.history)-1)) | |
print("Following redirections took place:") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
url = "http://suggestqueries.google.com/complete/search" | |
params = { | |
"client": "firefox", | |
"q": "ind", | |
"hl": "en" | |
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PyQt5.QtWidgets import QFileDialog, QApplication | |
from PyQt5 import QtWidgets | |
def select_files(directory_location=None): | |
qtapp = QApplication([directory_location]) | |
qtwgt = QtWidgets.QWidget() | |
filenames, _ = QFileDialog.getOpenFileNames(qtwgt) | |
return filenames |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tkinter as tk | |
from tkinter import filedialog | |
root = tk.Tk() | |
root.withdraw() | |
file_path = filedialog.askopenfilename() | |
print(file_path) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer