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 streamlit as st | |
import string | |
import time | |
import dataclasses | |
# [start] [persistent states]__________________________________________ | |
@dataclasses.dataclass | |
class gameState: | |
# HangMan | |
hm_word: str = "" |
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 streamlit as st | |
import time | |
form = st.sidebar.form("form", clear_on_submit=True) | |
with form: | |
form.write("**`Choose a box :`**") | |
tick_boxes = form.columns(3) | |
col_labels = [col.write(f"`Option {idx + 1}`") for idx, col in enumerate(tick_boxes)] | |
values = [ | |
col.checkbox(f"{idx + 1}", key=f"{idx+1}", value=False) |
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 streamlit as st | |
blank_choice = "<----->" | |
options = [ | |
[ | |
blank_choice, | |
"Option 1", | |
"Option 2", | |
"Option 3", | |
], |
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
# %% | |
# [Virtual Zoom Gesture using OpenCV Python | CVZone](https://www.youtube.com/watch?v=VPaFV3QBsEw) | |
# --- Murtaza Hassan --- | |
# Code & Resources: n/a | |
# %% | |
# [start]____________________________________________________________ | |
import cv2 as cv | |
from cvzone.HandTrackingModule import HandDetector |
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
from fastai.vision.all import * | |
from fastai.distributed import * | |
from fastai.vision.models.xresnet import * | |
path = rank0_first(untar_data, URLs.PETS) | |
def get_y(o): return o[0].isupper() | |
dls = ImageDataLoaders.from_name_func( | |
path=path, | |
fnames=get_image_files(path), |