<commit_before># -*- coding: utf-8 -*-
import json
import random
import re

import webapp2

import alertlib

_DEFAULT_CHANNEL = "#1s-and-0s"

_RESPOND_REGEXP = re.compile(r'culture us$')

_CULTURE_MESSAGES = [
    # Adding a message?  See https://api.slack.com/docs/formatting for
    # formatting instructions.
    "<https://sites.google.com/a/khanacademy.org/forge/for-developers|Shipping beats perfection>.",
    "Iterate on ideas before diving into code. <http://www.designstaff.org/articles/product-design-sprint-day-2-diverge-2012-10-26.html|Design sprints> are being organized by Jason and others and work well for both huge projects and small features.",
    "Concerned about the hacks in our code? Upset that the product's not good enough? Have no fear, we're getting better fast. Our site used to <https://s3.amazonaws.com/KA-share/old.png|look like this> and it was generated by one big main.py file.",
    "<https://sites.google.com/a/khanacademy.org/forge/for-khan-employees/-new-employees-onboard-doc/general-setup/welcome-to-ka|Our core company values.>",
    "Have anything to demo at the next Monday all-hands? Everything that's shipped to real users is eligible. Show off.",
    "<https://sites.google.com/a/khanacademy.org/forge/for-developers|Be open, share your work>.",
    "It's ok to leave (or simply not attend) any meeting that you don't feel is important for you.",
    "<https://sites.google.com/a/khanacademy.org/forge/for-khan-employees/email-transparency|Email transparency> makes it easy for anybody to follow the goings on of teams they're interested in. <https://groups.google.com/a/khanacademy.org/forum/#!forumsearch/(email-transparency)|Join any list>.",
    "As a cow, I am fairly proud of having written our <https://docs.google.com/a/khanacademy.org/document/d/1P6fweXJpYFAaE8nXrAVA9mt8qx7vHlUDo-OMtxmViAQ/edit|Career Development doc>. Hard to do w/ just hooves.",
    "Keep learning — <https://sites.google.com/a/khanacademy.org/forge/for-khan-employees/conferences|we'll send you to conferences to do so>.",
    "Anybody can fix anything. (And anybody can run a <https://gist.github.com/spicyj/8df622f1d18b4cc8f71b|FIXIT> for themselves or their team.)",
    "Wading into some old code that's really disgusting compared to your brilliant new feature? You don't have to fix everything all at once. \"Leave it better\" and use # TODOs liberally. (Ben says he's sorry for the old code.)",
    "Wanna teach the team about anything? Spread good habits? Show off what you're building? <http://khanacademy.org/r/speaknow|Sign up to Speak Now> in the future after Wednesday's dev sitdown!",
    "Will just leave these <https://www.khanacademy.org/stories|users stories here>.",
    "Do you need anything to do your job well? Hardware? Software? Food? Coach K bobblehead for your desk? <https://sites.google.com/a/khanacademy.org/forge/for-khan-employees/how-to-buy-software-hardware-anything-you-need-to-get-your-job-done-well|It's easy to get whatever you need>, and if you have any trouble ping Kamens quickly.",
    "Shipping anything sizable? <http://www.joelonsoftware.com/articles/fog0000000012.html|Dog food> it! Schedule a dogfooding hour, ping in hipchat to gather friendly eaters of dog food, profit.",
    "<https://www.khanacademy.org/r/wtf|Why are we building what we're building? What are we building? Who is doing what?>",
    "<https://sites.google.com/a/khanacademy.org/forge/for-developers/performance|Performance is a feature> and is everyone's job. Unsure how to profile your code? No worries, just ask, we have some perf nuts on the team.",
    "Anybody can <https://sites.google.com/a/khanacademy.org/forge/for-developers/deployment-guidelines|own a deploy>. If you've got big changes going out, you're probably that anybody. I (Culture Cow), may one day even keep track of a deploy count leaderboard and spit it out here!",
    "<http://arguingwithalgorithms.blogspot.com/2013/03/coding-for-review.html|Write code with your reviewer in mind.>",
    "Recruiting is everyone's job. <http://missmarcialee.com/2013/04/on-building-a-better-product-team-letter-style/|Blogging about recruiting being everyone's job> is Marcia's job.",
    "<http://www.fraustollc.com/blog/shit_code/|\"Sure there's some bad code around, we've all seen it, hell we've all written it...If there is some smelly code out there, look for ways to make it better. Start by understanding the code, and then find ways to improve upon it.\">",<commit_msg>Change a message to refer to Slack instead of hipchat<commit_after># -*- coding: utf-8 -*-
import json
import random
import re

import webapp2

import alertlib

_DEFAULT_CHANNEL = "#1s-and-0s"

_RESPOND_REGEXP = re.compile(r'culture us$')

_CULTURE_MESSAGES = [
    # Adding a message?  See https://api.slack.com/docs/formatting for
    # formatting instructions.
    "<https://sites.google.com/a/khanacademy.org/forge/for-developers|Shipping beats perfection>.",
    "Iterate on ideas before diving into code. <http://www.designstaff.org/articles/product-design-sprint-day-2-diverge-2012-10-26.html|Design sprints> are being organized by Jason and others and work well for both huge projects and small features.",
    "Concerned about the hacks in our code? Upset that the product's not good enough? Have no fear, we're getting better fast. Our site used to <https://s3.amazonaws.com/KA-share/old.png|look like this> and it was generated by one big main.py file.",
    "<https://sites.google.com/a/khanacademy.org/forge/for-khan-employees/-new-employees-onboard-doc/general-setup/welcome-to-ka|Our core company values.>",
    "Have anything to demo at the next Monday all-hands? Everything that's shipped to real users is eligible. Show off.",
    "<https://sites.google.com/a/khanacademy.org/forge/for-developers|Be open, share your work>.",
    "It's ok to leave (or simply not attend) any meeting that you don't feel is important for you.",
    "<https://sites.google.com/a/khanacademy.org/forge/for-khan-employees/email-transparency|Email transparency> makes it easy for anybody to follow the goings on of teams they're interested in. <https://groups.google.com/a/khanacademy.org/forum/#!forumsearch/(email-transparency)|Join any list>.",
    "As a cow, I am fairly proud of having written our <https://docs.google.com/a/khanacademy.org/document/d/1P6fweXJpYFAaE8nXrAVA9mt8qx7vHlUDo-OMtxmViAQ/edit|Career Development doc>. Hard to do w/ just hooves.",
    "Keep learning — <https://sites.google.com/a/khanacademy.org/forge/for-khan-employees/conferences|we'll send you to conferences to do so>.",
    "Anybody can fix anything. (And anybody can run a <https://gist.github.com/spicyj/8df622f1d18b4cc8f71b|FIXIT> for themselves or their team.)",
    "Wading into some old code that's really disgusting compared to your brilliant new feature? You don't have to fix everything all at once. \"Leave it better\" and use # TODOs liberally. (Ben says he's sorry for the old code.)",
    "Wanna teach the team about anything? Spread good habits? Show off what you're building? <http://khanacademy.org/r/speaknow|Sign up to Speak Now> in the future after Wednesday's dev sitdown!",
    "Will just leave these <https://www.khanacademy.org/stories|users stories here>.",
    "Do you need anything to do your job well? Hardware? Software? Food? Coach K bobblehead for your desk? <https://sites.google.com/a/khanacademy.org/forge/for-khan-employees/how-to-buy-software-hardware-anything-you-need-to-get-your-job-done-well|It's easy to get whatever you need>, and if you have any trouble ping Kamens quickly.",
    "Shipping anything sizable?  <http://www.joelonsoftware.com/articles/fog0000000012.html|Dog food> it!  Schedule a dogfooding hour, ping in Slack to gather friendly eaters of dog food, profit.",
    "<https://www.khanacademy.org/r/wtf|Why are we building what we're building? What are we building? Who is doing what?>",
    "<https://sites.google.com/a/khanacademy.org/forge/for-developers/performance|Performance is a feature> and is everyone's job. Unsure how to profile your code? No worries, just ask, we have some perf nuts on the team.",
    "Anybody can <https://sites.google.com/a/khanacademy.org/forge/for-developers/deployment-guidelines|own a deploy>. If you've got big changes going out, you're probably that anybody. I (Culture Cow), may one day even keep track of a deploy count leaderboard and spit it out here!",
    "<http://arguingwithalgorithms.blogspot.com/2013/03/coding-for-review.html|Write code with your reviewer in mind.>",
    "Recruiting is everyone's job. <http://missmarcialee.com/2013/04/on-building-a-better-product-team-letter-style/|Blogging about recruiting being everyone's job> is Marcia's job.",
    "<http://www.fraustollc.com/blog/shit_code/|\"Sure there's some bad code around, we've all seen it, hell we've all written it...If there is some smelly code out there, look for ways to make it better. Start by understanding the code, and then find ways to improve upon it.\">",
{'fraction_non_alphanumeric': 0.11580351189153146, 'fraction_numerical': 0.011780395643476329, 'mean_word_length': 4.21983758700696, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 43, 'https://': 30, 'lorem ipsum': 0, 'www.': 10, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2786327', 'n_tokens_mistral': 2988, 'n_tokens_neox': 2789, 'n_words': 948}