This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from instabot import Bot | |
| bot = Bot() | |
| bot.login(username="", password="") | |
| ###### upload a picture ####### | |
| bot.upload_photo("yoda.jpg", caption="biscuit eating baby") | |
| ###### follow someone ####### | |
| bot.follow("elonrmuskk") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| from bs4 import BeautifulSoup | |
| def API(movieName): | |
| url = f'https://omdbapi.com/?t={movieName}&apikey=APIKEY' ## get your own API key at https://omdbapi.com/ | |
| res = requests.get(url) | |
| data = res.json() | |
| try: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import csv | |
| import requests | |
| web_status_dict = {"Website": "Status"} | |
| def main(): | |
| with open("sites.txt", "r") as fr: | |
| for line in fr: | |
| website = line.strip() | |
| status = requests.get(website).status_code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import cv2 | |
| import numpy as np | |
| import pyautogui | |
| # screen resolution | |
| SCREEN_SIZE = tuple(pyautogui.size()) | |
| # define the codec | |
| fourcc = cv2.VideoWriter_fourcc('M','J','P','G') | |
| # frames per second | |
| fps = 12.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from openpyxl import Workbook, load_workbook | |
| ## loading previous workbook | |
| wb = load_workbook('SampleData.xlsx') | |
| ## access the content from the active sheet | |
| ws = wb.active | |
| print(ws) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from fastapi import FastAPI | |
| from pydantic import BaseModel | |
| import re | |
| import uvicorn | |
| import nltk | |
| nltk.download('stopwords') | |
| from nltk.corpus import stopwords | |
| from nltk.stem.porter import PorterStemmer | |
| import pickle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ''' | |
| Run Using `python app.py` | |
| ''' | |
| import pickle | |
| import re | |
| import nltk | |
| nltk.download('stopwords') | |
| from nltk.corpus import stopwords | |
| from nltk.stem.porter import PorterStemmer | |
| import pickle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Restaurant_Reviews | |
| |____templates | |
| |___index.html ## homepage file | |
| |___result.html ## to show prediction | |
| |____static | |
| |____css | |
| |____style.css ## css file | |
| |____app.py ## main flask file | |
| |____review.pkl ## ml model |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mkdir -p ~/.streamlit/ echo "\ | |
| [server]\n\ | |
| port = $PORT\n\ | |
| enableCORS = false\n\ | |
| headless = true\n\ | |
| \n\ | |
| " > ~/.streamlit/config.toml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| streamlit run app.py | |
| """ | |
| import streamlit as st | |
| import pickle | |
| import re | |
| import nltk | |
| nltk.download('stopwords') | |
| from nltk.corpus import stopwords |