Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 random | |
def randomized_response(true_response): | |
""" | |
Return a randomized response giving plausible deniability to a query about our true response value. This allows us to run | |
queries across a population while preserving individual privacy. | |
Parameters | |
--- | |
true_response : boolean |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
/* | |
* The number of bits of precision per color channel are log_2(c_precision), | |
* in this case 7 bits per color, or 21 bits total. | |
* | |
* A c_precision of 128 fits within 7 base-10 digits. | |
* | |
* NOTE: an IEEE 754 float can only express 7 digits exactly for all digits. | |
*/ | |
const float c_precision = 128.0; | |
const float c_precisionp1 = c_precision + 1.0; |
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
#include <OpenThreads/Thread> | |
class Thread : public OpenThreads::Thread | |
{ | |
public: | |
Thread() : OpenThreads::Thread() | |
{ | |
// initializer code here | |
} | |
virtual void run() |