Skip to content

Instantly share code, notes, and snippets.

View k-zehnder's full-sized avatar
😀

Kevin Zehnder k-zehnder

😀
View GitHub Profile
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)
import csv
import os
import psycopg2
# File path and name.
filePath = '/home/batman/Desktop/'
fileName = 'detailedflight.csv'
# Database connection variable.
connect = None
@k-zehnder
k-zehnder / flightradar24_data_class.py
Last active February 7, 2022 03:49
practice class for getting FlightRadar24 data within boundary
# 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
#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 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 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