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 asyncio | |
import httpx | |
async def main(): | |
pokemon_url = 'https://pokeapi.co/api/v2/pokemon/151' | |
async with httpx.AsyncClient() as client: | |
resp = await client.get(pokemon_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 csv | |
import os | |
import psycopg2 | |
# File path and name. | |
filePath = '/home/batman/Desktop/' | |
fileName = 'detailedflight.csv' | |
# Database connection variable. | |
connect = None |
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
# for more see repo below: | |
# https://github.com/k-zehnder/fastapi-docker-async-postgres-flight-data | |
import os | |
import json | |
from operator import ge | |
import httpx | |
import asyncio | |
import datetime | |
from typing import List, Optional, Dict, Any | |
from pydantic import BaseModel, validator |
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
#https://courses.prettyprinted.com/courses/1016334/lectures/21158655 | |
from flask import Flask | |
from flask_sqlalchemy import SQLAlchemy | |
from datetime import datetime, timedelta | |
from faker import Faker | |
import random |
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
""" | |
This script demonstrates how to get images and download them from google images with GoogleImageScraper class | |
KZ 12-17-21 | |
""" | |
import os | |
from abc import ABC, abstractmethod | |
from typing import List, Dict | |
import cv2 | |
import time |
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
""" | |
This object fetches google images urls and then downloads them to disk | |
KZ 12-18-21 | |
""" | |
import os | |
from abc import ABC, abstractmethod | |
from typing import List, Dict | |
import cv2 | |
import time |