Last active
August 6, 2024 20:36
-
-
Save Intelrunner/af487c7e92e96cb5dde43526c3373918 to your computer and use it in GitHub Desktop.
Revisions
-
Intelrunner revised this gist
Aug 6, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import random # 1000000 and 62 == roughly 1.3GB (will take a bit of time, go get a coffee) rows = 1200000 columns = 62 def generate_random_row(col): -
Intelrunner revised this gist
Aug 6, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import csv import random # 1000000 and 62 == roughly 1.3GB (will take a bit of time, go get a coffee) rows = 1000000 columns = 62 -
Intelrunner created this gist
Aug 6, 2024 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ # This is not an original work, but crafted based on: https://gist.github.com/momota/ba302f0f0720ff5b2445fb81820c5b82 # I updated it to make a file closer to the size I needed consistantly. All praise goes to: @momota and @andrewFarley for # The original gist. import csv import random # 1000000 and 102 == roughly 2GB (will take a bit of time, go get a coffee) rows = 1000000 columns = 62 def generate_random_row(col): a = [] l = [i] for j in range(col): l.append(random.random()) a.append(l) return a if __name__ == '__main__': f = open('sample.csv', 'w') w = csv.writer(f, lineterminator='\n') for i in range(rows): w.writerows(generate_random_row(columns)) f.close()