Skip to content

Instantly share code, notes, and snippets.

View Chaztikov's full-sized avatar
🏠
Working from home

Chaztikov

🏠
Working from home
View GitHub Profile
@Chaztikov
Chaztikov / ghiav.txt
Created October 11, 2021 15:52 — forked from ivan-pi/ghiav.txt
Lid-driven cavity flow benchmark v-velocity values from Ghia, U. K. N. G., Ghia, K. N., & Shin, C. T. (1982), Journal of computational physics, 48(3), 387-411.
# 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
# -------------------------------------------------------------
@Chaztikov
Chaztikov / options_data.py
Created December 3, 2020 09:38 — forked from tlian25/options_data.py
Yahoo Finance Webscraping
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
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))