This file contains hidden or 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
| //! # sieve to generate prime numbers without an upper limit | |
| //! | |
| //! this is very fast, especially when built with --release | |
| //! | |
| //! # example: | |
| //! ``` | |
| //! for i in s { | |
| //! println!("{} ", i); | |
| //! } | |
| //! ``` |
This file contains hidden or 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 __future__ import annotations | |
| import random | |
| import string | |
| import time | |
| from base64 import b64encode as b64e | |
| from base64 import b64decode as b64d | |
| from datetime import datetime | |
| __all__ = ( |
This file contains hidden or 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
| use std::time::{SystemTime, UNIX_EPOCH}; | |
| const EPOCH: u64 = 1420070400000; | |
| pub struct Id { | |
| internal_worker: u128, | |
| internal_process: u128, | |
| increment: u128, | |
| } |
NewerOlder