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 ( | |
"github.com/stretchr/testify/assert" | |
apiv1 "k8s.io/api/core/v1" | |
"k8s.io/apimachinery/pkg/api/resource" | |
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | |
"k8s.io/apimachinery/pkg/runtime" | |
"k8s.io/metrics/pkg/apis/metrics/v1beta1" | |
mfake "k8s.io/metrics/pkg/client/clientset/versioned/fake" | |
"testing" | |
"time" |
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 | |
@st.cache(allow_output_mutation=True) | |
def get_mutable(): | |
return [] | |
x = st.sidebar.slider("Choose x value: ", 0, 10) | |
mutable_object = get_mutable() | |
mutable_object.append(x) | |
st.write(f"Choice history is {mutable_object}") |
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
# Install python3 | |
# https://docs.python-guide.org/starting/install3/linux/ | |
sudo apt-get install software-properties-common | |
sudo add-apt-repository ppa:deadsnakes/ppa | |
sudo apt-get update | |
sudo apt-get install python3.6 | |
# Refer to this: https://github.com/streamlit/streamlit/issues/665 | |
# change python3-distutils to libpython3.7-stdlib |
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
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; |
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
diff --git a/lib/streamlit/server/Server.py b/lib/streamlit/server/Server.py | |
index c292a48e..199128a9 100644 | |
--- a/lib/streamlit/server/Server.py | |
+++ b/lib/streamlit/server/Server.py | |
@@ -153,6 +153,16 @@ def start_listening(app): | |
) | |
+class MyFileHandler(tornado.web.StaticFileHandler): | |
+ def initialize(self, path): |
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
"""Simple sliding window dashboard-style | |
plot that updates periodically pulling from | |
a random generator | |
""" | |
import streamlit as st | |
import time | |
import random | |
# session_state from https://gist.github.com/tvst/036da038ab3e999a64497f42de966a92 | |
from session_state import get | |
# st_rerun from https://gist.github.com/tvst/ef477845ac86962fa4c92ec6a72bb5bd |