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 numpy as np | |
max_rnd_value = 100000 | |
num_samples = 100000 | |
# do benford or uniform distribution | |
do_benford = True | |
if do_benford: | |
num_factors = int(np.floor(np.log10(max_rnd_value))) |
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
#! /usr/bin/env python | |
""" | |
Reads Darknet config and weights and creates Keras model with TF backend. | |
""" | |
import argparse | |
import configparser | |
import io | |
import os |
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
/* | |
Blink ULP Hartbeat and read DHT22 in ULP code | |
Tom Vijlbrief oct 2017 | |
*/ | |
#include <time.h> | |
#include <sys/time.h> | |
#include "driver/rtc_io.h" |
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
void usleep(DWORD waitTime){ | |
LARGE_INTEGER perfCnt, start, now; | |
QueryPerformanceFrequency(&perfCnt); | |
QueryPerformanceCounter(&start); | |
do { | |
QueryPerformanceCounter((LARGE_INTEGER*) &now); | |
} while ((now.QuadPart - start.QuadPart) / float(perfCnt.QuadPart) * 1000 * 1000 < waitTime); | |
} |