Skip to content

Instantly share code, notes, and snippets.

@landersson
Created March 7, 2018 03:52
Show Gist options
  • Save landersson/dcc941268958a9143f0c89c1fc7ba1ca to your computer and use it in GitHub Desktop.
Save landersson/dcc941268958a9143f0c89c1fc7ba1ca to your computer and use it in GitHub Desktop.
rgbhex test data generator
#!/usr/bin/env python3
import os
import subprocess
url = "https://raw.githubusercontent.com/altercation/vim-colors-solarized/"\
"master/colors/solarized.vim"
outfile = "rgbhex-test-data.txt"
megabytes = 256
assert not os.path.isfile(outfile)
data = subprocess.check_output(["curl", "-s", url])
with open(outfile, "wb") as f:
while (f.tell() < megabytes*1024*1024):
f.write(data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment