<commit_before>package dash
package app

object GmailApp {

  val program =
    """
def headers: {
  Authorization: "Bearer " + googleAuth
};

def listParams: {
  maxResults: 10,
  q: "is:unread"
};

def getParams: {
  format: "metadata",
  metadataHeaders: "Subject",
  fields: "messages(payload/headers,snippet)"
};

def threadList:
  httpGet("https://www.googleapis.com/gmail/v1/users/me/threads"; listParams; ""; headers) | .threads[].id;

def threadDetails:
  [threadList | httpGet("https://www.googleapis.com/gmail/v1/users/me/threads/" + .; getParams; ""; headers)];

def threadToContent: {
  title: "Gmail",
  content: [threadDetails | .[].messages.[0] | {
    title: .payload.headers.[0].value,
    content: .snippet
  }]
};

threadToContent
    """

}<commit_msg>Unified formatting<commit_after>package dash
package app

object GmailApp {

  val program =
    raw"""
def authHeaders: { Authorization: "Bearer " + googleAuth };

def listParams: { maxResults: 10, q: "is:unread" };

def getParams: {
  format: "metadata",
  metadataHeaders: "Subject",
  fields: "messages(payload/headers,snippet)"
};

def threadList:
  httpGet("https://www.googleapis.com/gmail/v1/users/me/threads"; listParams; ""; authHeaders) | .threads[].id;

def threadDetails:
  [threadList | httpGet("https://www.googleapis.com/gmail/v1/users/me/threads/" + .; getParams; ""; authHeaders)];

def threadToContent: {
  title: "Gmail",
  content: [threadDetails | .[].messages.[0] | {
    title: .payload.headers.[0].value,
    content: .snippet
  }]
};

threadToContent
    """

}
{'fraction_non_alphanumeric': 0.1717948717948718, 'fraction_numerical': 0.007692307692307693, 'mean_word_length': 4.101307189542483, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, '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': '812108', 'n_tokens_mistral': 548, 'n_tokens_neox': 529, 'n_words': 104}