Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@komodovaran
komodovaran / streamlit_typed_state.py
Last active September 17, 2021 13:18
Experimental ventures into type-safe global Streamlit state and out-of-order layouts
from abc import ABC
import streamlit as st
class _TypedState:
"""
Values should be set here to appear in auto-complete. Otherwise assume they don't exist in the global state
"""
@komodovaran
komodovaran / variable_length_tf_train.py
Last active May 12, 2024 16:25
Training with variable length sequences in Tensorflow
from math import ceil
from typing import Tuple, Generator
import tensorflow as tf
from tensorflow.python.data import Dataset
from tensorflow.python.keras import Input
from tensorflow.python.keras.layers import TimeDistributed, LSTM, Dense
from tensorflow.python.keras.models import Model
import numpy as np
def check_tf_v2_3_gpus() -> None: