openai/openai-python

Public

mirrored fromhttps://github.com/openai/openai-pythonAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
7c8c11158c4e0b63fef495c32447d6e31870073f

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

examples/generate_file.sh

10lines · modecode

1# generate a text file with random data for testing file uploads
2wanted_size=$((1024*2048*512))
3file_size=$(( ((wanted_size/12)+1)*12 ))
4read_size=$((file_size*3/4))
5
6echo "wanted=$wanted_size file=$file_size read=$read_size"
7
8dd if=/dev/urandom bs=$read_size count=1 | base64 > /tmp/small_test_file.txt
9
10truncate -s "$wanted_size" /tmp/big_test_file.txt
11