c3ef7a43acd931ea2b354b2e6c04d340d2de3a29,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.

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__)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


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: 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: facebookresearch/ParlAI
Commit Name: d082514cff28f46eae936872ee6c311db5843a37
Time: 2018-06-13
Author: jju@fb.com
File Name: parlai/mturk/core/mturk_manager.py
Class Name: MTurkManager
Method Name: _reset_time_logs