8328c47f9ac4aac0801a65f949476fea8c0f5271,examples/run_on_save.py,,,#,6
Before Change
st.write("This should change every ", secs_to_wait, " seconds: ", random())
with open(__file__, "a") as f:
// Sleep for 10s (rather than, say, 1s) because on the first run we need to
// make sure Streamlit and its proxy are fully initialized before the timer
// below expires. This can take several seconds.
status = st.empty()
for i in range(secs_to_wait, 0, -1):
time.sleep(1)
status.text("Sleeping %ss..." % i)
status.text("Touching %s" % __file__)
os.utime(os.path.realpath(__file__), None)
status.text("Touched %s" % __file__)
After Change
status.text("Touching %s" % __file__)
cmd = (
"sed -i "
""s/^// MODIFIED AT:.*/// MODIFIED AT: %s/" %s" % (time.time(), __file__))
os.system(cmd)
status.text("Touched %s" % __file__)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: streamlit/streamlit
Commit Name: 8328c47f9ac4aac0801a65f949476fea8c0f5271
Time: 2018-10-12
Author: thiagot@gmail.com
File Name: examples/run_on_save.py
Class Name:
Method Name:
Project Name: streamlit/streamlit
Commit Name: c3ef7a43acd931ea2b354b2e6c04d340d2de3a29
Time: 2018-10-12
Author: thiagot@gmail.com
File Name: examples/run_on_save.py
Class Name:
Method Name:
Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 7e2ce3a6cd51b21218ccc281dc21626153221778
Time: 2020-11-19
Author: pclay@google.com
File Name: perfkitbenchmarker/scripts/spark_sql_runner.py
Class Name:
Method Name: main