psfried / dgen Goto Github PK
View Code? Open in Web Editor NEWGenerate evil test data
License: MIT License
Generate evil test data
License: MIT License
Generating timestamps is a pretty common thing, so it would be nice to have some ways of generating them out of the box. A reasonable function signature might be something like def format_datetime(format_string: String, time_zone: String, epoch_time_seconds: Int, subsecond_nanos: Uint)
. We could then use the chrono crate to create the date objects and format them using the given format string.
With that builtin function, we could then add a standard time
module that builds on it to add some common useful functions for things like creating iso-8601 timestamps with UTC time, or things that generate sequential timestamps.
Functions like add, mul, div, mod, max, min, abs, etc, would be very useful for generating more complex data, or for formats where there's some constraints like "a string at least n bytes long". We should add them as builtin functions.
One thing we'd need to decide is how to handle overflow. Should we default to only wrapping or only erroring, or should we create separate functions for each way of handling overflow?
Option A: wrapping_mul(a: Uint, b: Uint)
wraps on overflow and mul(a: Uint, b: Uint)
errors on on overflow
Option B: mul(a: Uint, b: Uint)
always either wraps or errors on overflow
Option C: maybe something else?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.