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
| shapes = {"l": [[1, 1], [1, 0]], "s": [[1, 1, 1]]} | |
| class Grid: | |
| def __init__(self, row, col): | |
| self.row = row | |
| self.col = col | |
| self.grid = [[0 for i in range(col)] for i in range(row)] | |
| self.filed = [] |
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 hashlib, os, time | |
| from functools import wraps | |
| from datetime import datetime | |
| import pytz | |
| from flask import ( | |
| Flask, | |
| render_template, | |
| request, | |
| flash, | |
| redirect, |
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 bs4 import BeautifulSoup | |
| import requests | |
| import pickle | |
| url = 'https://www.nhs.uk/conditions' | |
| base_url = 'https://www.nhs.uk' | |
| req = requests.get(url) | |
| soup = BeautifulSoup(req.content, 'html.parser') |
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 bs4 import BeautifulSoup as BS | |
| import requests | |
| import pickle | |
| import string | |
| alphabets = string.ascii_uppercase | |
| data=[] | |
| total_scrapped = 0 | |
| total_skipped = 0 | |
| for letter in alphabets: | |
| base_url='https://www.mayoclinic.org' |