deepinthebuild / dedup Goto Github PK
View Code? Open in Web Editor NEWA command-line tool for deduplicating entries in a file or stream.
A command-line tool for deduplicating entries in a file or stream.
warning: variant is never constructed: `Other`
--> src/error.rs:9:5
|
9 | Other,
| ^^^^^
|
= note: #[warn(dead_code)] on by default
After running 'Cargo install' which places the dedup executable in ~/.cargo/bin/dedup the benchrunner fails to correctly set the path/current working directory.
FileNotFoundError: [Errno 2] No such file or directory: 'sort -u europarl.txt'
FileNotFoundError: [Errno 2] No such file or directory: 'dedup europarl.txt'
`python3 benchrunner
Downloading test corpus...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
100 124M 100 124M 0 0 1956k 0 0:01:04 0:01:04 --:--:-- 2747k
Unpacking test corpus...
Concatenating files in to single blob...
/bin/sh: dedup: command not found
/bin/sh: dedup: command not found
/bin/sh: dedup: command not found
/bin/sh: dedup: command not found
sort | uniq: [19.610267162322998, 19.310322523117065, 19.74545121192932] mean: 19.555346965789795
dedup: [0.0023207664489746094, 0.0020852088928222656, 0.0018146038055419922] mean: 0.002073526382446289
`
I need to dedupe line-separated records in a very large file (hundreds of gigs, each record a few KB). This looks like it could be useful for me, but I don't know how much RAM it uses. For stream mode it has to store the actual lines, which is understandable, but what about mmap mode?
`$ python3 benchrunner
Downloading test corpus...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 124M 100 124M 0 0 3425k 0 0:00:37 0:00:37 --:--:-- 4143k
Unpacking test corpus...
Concatenating files in to single blob...
Building dedup...
Finished release [optimized] target(s) in 0.0 secs
awk : mean: 4.988 median: 4.803
dedup : mean: 2.337 median: 2.284
sort : mean: 17.03 median: 17.32
`
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.