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
# Slightly improved with a couple of js call wrappers to clean code and add async/await boilerplate | |
import streamlit as st | |
# https://github.com/thunderbug1/streamlit-javascript | |
from streamlit_javascript import st_javascript | |
st.header("st_javascript demo") | |
st.write("#### Helper wrappers") | |
with st.echo(): |
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 json | |
import streamlit as st | |
import pandas as pd | |
st.set_page_config( | |
page_title='Cascade Selection', | |
layout='centered', | |
page_icon='🌴' | |
) |
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
# https://discuss.streamlit.io/t/how-to-add-a-download-excel-csv-function-to-a-button/4474/16 | |
import streamlit as st # 🎈 streamlit development | |
import pandas as pd | |
import io | |
from itertools import cycle | |
buffer = io.BytesIO() | |
# Create some Pandas dataframes from some data. | |
df_list = [] |
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
# Builds on my original Pomodoro timer (see pomodoro.py). This has start, stop, pause controls. | |
# It uses callbacks, session_state, status messages and reruns for a better UX | |
# Requires Streamlit, version >= 1.14.0 | |
import streamlit as st | |
import time | |
st.set_page_config( | |
page_title='Pomodoro', | |
layout='centered', | |
page_icon='🍅' |
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 streamlit as st | |
import pandas as pd | |
import numpy as np | |
st.write('`Simple form callback demo`') | |
st.subheader('Constraints Solver') | |
state = st.session_state | |
if 'is_modified' not in state: | |
state['is_modified'] = False |
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
Pretty print tables summarizing properties of tensor arrays in numpy, pytorch, jax, etc. |
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
<!-- | |
This is a sample HTML file that you can use to embed your Streamlit app in an iframe. | |
The Streamlit app is embedded cleanly and is almost indistinguishable from a native app. | |
Use it as a template and customize it to your needs. | |
NOTE: It's convenient to start your Streamlit app in headless mode, for example | |
$ streamlit run --server.port=8005 --server.headless=true app.py | |
--> | |
<!DOCTYPE html> |