<commit_before>#!/usr/bin/python

import sys
import urllib
import json

numParagraphs = 2
url = "http://baconipsum.com/api/?type=all-meat&start-with-lorem=1&paras="

rv = ""
data = urllib.urlopen(url + str(numParagraphs)).read().decode('utf-8-sig')
dA = json.loads(data)

for x in dA:
    rv += x;
    rv += "\n"

sys.stdout.write(rv)<commit_msg>made some tweaks to the way the newlines are added attributed original AppleScript version.<commit_after>#!/usr/bin/python

# based on: https://gist.github.com/2220524

import sys
import urllib
import json

numParagraphs = 2
url = "http://baconipsum.com/api/?type=all-meat&start-with-lorem=1&paras="

rv = ""
data = urllib.urlopen(url + str(numParagraphs)).read().decode('utf-8-sig')
dA = json.loads(data)
first = True

for x in dA:
    if(first == True):
        first = False;
    else:
        rv += "\n\n"
    rv += x;

sys.stdout.write(rv)
{'fraction_non_alphanumeric': 0.1651685393258427, 'fraction_numerical': 0.014606741573033709, 'mean_word_length': 3.6894736842105265, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3984583', 'n_tokens_mistral': 357, 'n_tokens_neox': 347, 'n_words': 74}