Skip to main content

sort big file or streams

Project description

bigsort

sort or shuffle big file/stream

usage

pip install bigsort

shell

bigsort -i  readme.md -o sorted.txt  # default sort in increase 
cat readme.md |  bigsort --sortType=d --unique=1 > sorted.txt  # sort pipe, order in descend, unique
bigsort -i sorted.txt -c ">"  # check order
bigsort -i  readme.md --unique=1   | bigsort --sortType=R > sorted.txt   # unique and shufle 
head -c 100000000  /dev/urandom  | python bigsort.py -C=1000 -m=0.999 --sortType=R -T="./" > sorted.txt
wc -l *.py | bigsort   -k 1n,2  -b 1 -t " "   # sort by key
bigsort -i  readme.md -s R -g 10   # get first 10 lines

python

import os
from bigsort import  bigsort, sortFile, check

# sort in file
sortFile("cat readme.md","sorted.txt")
check(open("sorted.txt"),"<=")

# sort in pipe
bigsort(os.popen("cat readme.md"),open("sorted.txt",'w'),unique=1,sortType="d")
check(open("sorted.txt"),">")

custom sort

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bigsort-0.2.2.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bigsort-0.2.2-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file bigsort-0.2.2.tar.gz.

File metadata

  • Download URL: bigsort-0.2.2.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.4

File hashes

Hashes for bigsort-0.2.2.tar.gz
Algorithm Hash digest
SHA256 c936a1f1998e6889438f0c62c10de53df109881fb52342b663f9c178c96d76c4
MD5 bf71229a7be926b33848c869c6d971b0
BLAKE2b-256 018a7e6813d8b410629c56c6933c5059b1f9868b075e6a910db3583b5fe27619

See more details on using hashes here.

File details

Details for the file bigsort-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: bigsort-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.4

File hashes

Hashes for bigsort-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cf3e0b60b45a9f594f557e87cd62945d8bf3e5288c883b22d1af893d58956b3a
MD5 54ca49e15c0b24f6e12ce3148afde0da
BLAKE2b-256 888001ab9d368872fa146addd32750dc0779d60d3e33baa6aa0d87f8faf4d939

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page