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/python3 | |
# | |
# reads a coverage report from oss-fuzz and outputs a markdown formatted | |
# table, sorted on uncovered lines. | |
# | |
# By Paul Dreik 20201117 | |
import requests | |
from bs4 import BeautifulSoup # apt install python3-bs4 | |
import sys |
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
int | |
main() | |
{ | |
std::random_device r; | |
std::minstd_rand rnd(r()); | |
std::cout << "Let's randomly print 0 through 4:\n"; | |
lazy_fisher_yates(5, rnd, [](auto i) { std::cout << i << '\n'; }); |
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
/* | |
* | |
* Lazy Fisher-Yates iteration | |
* | |
* This steps through a range randomly, using the idea from the Fisher Yates | |
* shuffle. It does not shuffle the range and then iterate, instead it | |
* stores a sparse representation of the index range. | |
* | |
* The amount of memory reguired increases the closer to the middle one is. | |
* Experimentally, it seems like the expected amount of memory at step i |