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
# Ghia, U. K. N. G., Ghia, K. N., & Shin, C. T. (1982). | |
# High-Re solutions for incompressible flow using the Navier-Stokes equations and a multigrid method. | |
# Journal of computational physics, 48(3), 387-411. | |
# | |
# TABLE II | |
# Results for $v$-Velocity along Horizontal Line through Geometric Center of Cavity | |
# [Note: The velocity for Re = 400 and point (x,v) = (0.9063,-0.23827) is probably wrong] | |
#-------------------------------------------------------------------- | |
# Re | |
# ------------------------------------------------------------- |
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 pandas as pd | |
import numpy as np | |
import yfinance as yf | |
def options_chain(symbol): | |
tk = yf.Ticker(symbol) | |
# Expiration dates | |
exps = tk.options |
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 FrameExtractor(): | |
''' | |
Class used for extracting frames from a video file. | |
''' | |
def __init__(self, video_path): | |
self.video_path = video_path | |
self.vid_cap = cv2.VideoCapture(video_path) | |
self.n_frames = int(self.vid_cap.get(cv2.CAP_PROP_FRAME_COUNT)) | |
self.fps = int(self.vid_cap.get(cv2.CAP_PROP_FPS)) | |