<commit_before>api
download
	UIManager default informUserDuring: [ :bar |
		|lastPercentage|
		lastPercentage := 0.
		self ensureNotExist: self downloadFilename.
		bar label: 'Requesting Moz2D Library file...'.
		NonInteractiveTranscript stdout cr; show: 'Downloading ', self url, ' to ', self downloadFilename asString, ' ...'; cr.
		[ ZnClient new
			"A horrible hack... using wget works, with ZnClient 403 Forbidden"
			url: 'http://syrel.ch/download.php?url=', self url;
			signalProgress: true;
			timeout: 10 * 60; "timeout 10min"
			downloadTo: self downloadFilename.
			NonInteractiveTranscript stdout cr. ]
		on: HTTPProgress 
		do: [ :progress |
			progress isEmpty ifFalse: [ 
				bar current: progress percentage.
				progress total ifNotNil: [ :aTotalNumber | | humanReadable percentage |
					humanReadable := self printHumanReadableSize: aTotalNumber.
					percentage := progress percentage asInteger.
					humanReadable := 'Downloading ', percentage asString, '% of ', humanReadable, ' of Moz2D Library... '.
					NonInteractiveTranscript stdout show: (self progressBar: percentage), '\r'.
					bar label: humanReadable ] ].
			progress resume ] ]<commit_msg>\"\r\" does not work from transcript<commit_after>api
download
	UIManager default informUserDuring: [ :bar |
		|lastPercentage|
		lastPercentage := 0.
		self ensureNotExist: self downloadFilename.
		bar label: 'Requesting Moz2D Library file...'.
		NonInteractiveTranscript stdout cr; show: 'Downloading ', self url, ' to ', self downloadFilename asString, ' ...'; cr.
		[ ZnClient new
			"A horrible hack... using wget works, with ZnClient 403 Forbidden"
			url: 'http://syrel.ch/download.php?url=', self url;
			signalProgress: true;
			timeout: 10 * 60; "timeout 10min"
			downloadTo: self downloadFilename.
			NonInteractiveTranscript stdout cr. ]
		on: HTTPProgress 
		do: [ :progress |
			progress isEmpty ifFalse: [ 
				bar current: progress percentage.
				progress total ifNotNil: [ :aTotalNumber | | humanReadable percentage |
					humanReadable := self printHumanReadableSize: aTotalNumber.
					percentage := progress percentage asInteger.
					humanReadable := 'Downloading ', percentage asString, '% of ', humanReadable, ' of Moz2D Library... '.
					bar label: humanReadable ] ].
			progress resume ] ]
{'fraction_non_alphanumeric': 0.1055846422338569, 'fraction_numerical': 0.010471204188481676, 'mean_word_length': 3.807127882599581, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3111081', 'n_tokens_mistral': 783, 'n_tokens_neox': 661, 'n_words': 210}