Tax Max

0

votes
0

answer
3

views

Python 2.7 - redirect instantly output to log file

Python test.py script is collecting data non-stop. To exit script - ctrl/c is expected. File test.log is empty while script is running. Output to test.log is created only after script is finished. It is running on windows 2008 server. How to save ouput 'on the fly', so I can check test.log and see t...
Tax Max
5

votes
3

answer
112

views

SQL to select consecutive records with the same value

I have a table with measurements. Measurement is done every minute. I need to select only rows having the same sample_value more than once consecutively for the same device_id. Here are initial data: sample_date sample_time device_id sample_value 20180701 1010 111 11 20180701...
Tax Max