Go to the Python website. In the Downloads tab, click the Python 2.7.9 button. Go to your downloads folder and start the installation by double clicking on the package python-2.7.9.msi.
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
/* Generate a random number, but disallow the previous result. | |
* | |
* \param low | |
* \param high | |
* | |
* \return Random number. | |
*/ | |
long myRandom(long const low, long const high) { | |
thread_local long previousValue {random(low, high)}; | |
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
/* Sample from an array without replacement. | |
* | |
* \tparam T Array type. | |
* \tparam arraySize Array size. | |
* | |
* \param a Array. | |
* | |
* \return Element of `a`. | |
*/ | |
template <class T, size_t arraySize> |
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
/* Sample from an array, but disallow the last `historySize` results. | |
* | |
* \tparam historySize History size. | |
* \tparam T Array type. | |
* \tparam arraySize Array size. | |
* | |
* \param a Array. | |
* | |
* \return Element of `a`. | |
*/ |
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
#define SLOTS 100 | |
unsigned long _last[SLOTS]; | |
size_t _index = 0; | |
void set(void) { | |
_last[_index] = millis(); | |
_index++; | |
} |
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
from serial.urlhandler import protocol_socket | |
protocol_socket.time.sleep = lambda x: None |