<commit_before>Homework stuff for Chapter 5
----------------------------
> db.posts.aggregate( [{ $project: {_id: 0, permalink: 1}},{$limit: 1} ] )
{ "permalink" : "TqoHkbHyUgLyCKWgPLqm" }
<commit_msg>MongoDB dev course chapter 5<commit_after>Homework stuff for Chapter 5
----------------------------
> db.posts.aggregate( [{ $project: {_id: 0, permalink: 1}},{$limit: 1} ] )
{ "permalink" : "TqoHkbHyUgLyCKWgPLqm" }

>  db.posts.aggregate( [{ $group: { _id: "$title", amount: {$sum: 1 } } }, { $project: {_id: 0, title: "$_id", amount: 1
} } ] )
{ "amount" : 223, "title" : "Declaration of Independence" }
{ "amount" : 243, "title" : "Gettysburg Address" }
{ "amount" : 255, "title" : "Bill of Rights" }
{ "amount" : 279, "title" : "US Constitution" }

> db.posts.count()
1000
> 223+243+255+279
1000


{'fraction_non_alphanumeric': 0.26059850374064836, 'fraction_numerical': 0.05486284289276808, 'mean_word_length': 3.317204301075269, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, 'https://': 0, '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': '3081732', 'n_tokens_mistral': 353, 'n_tokens_neox': 304, 'n_words': 72}