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
| DO $$ | |
| DECLARE | |
| partnerCount INTEGER; | |
| partnerDescription VARCHAR(100); | |
| partnerId INTEGER; | |
| BEGIN | |
| SELECT COUNT(*) INTO partnerCount | |
| FROM "integrationPartners" | |
| WHERE id = ( | |
| SELECT "partnerId" |
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 json | |
| import requests | |
| import datetime | |
| uri = 'http://docker:19200/article/_search' | |
| open("total_output.txt","a") | |
| class Query: | |
| def search(uri): |
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
| class GetIOTFromStaging: | |
| def __init__(self, fields: list, username: str, config_path: str, retries: int=0): | |
| self.fields = fields | |
| self.username = username | |
| self.config_path = config_path | |
| self.retries = retries | |
| self.frequency = 1 | |
| self.source = "production" | |
| def get_data_and_upload_to_bq(self): |
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 requests import get | |
| import urllib | |
| from bs4 import BeautifulSoup | |
| from urllib.error import HTTPError | |
| from urllib.request import urlopen | |
| login_url = 'https://slashdot.org/my/login' | |
| scraping_url = 'https://slashdot.org' |
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 requests import get | |
| from bs4 import BeautifulSoup | |
| class MovieSearch: | |
| def movie(): | |
| while True: | |
| title = input("Enter Movie Title : ") | |
| if title: | |
| url = f'http://www.imdb.com/search/title?title={title}' |