<commit_before>import hashlib
import datetime
import errno
import functools
import itertools
import logging.config
import os
import random
import sqlite3
import sys
import time
import urllib.request
from collections import namedtuple

import requests
import schedule
import slack.channels
import slack.chat
from bs4 import BeautifulSoup


CHANNEL_NAME = 'loud-launches'
CHANNEL_ID = 'C0G8JR6TE'  # channel_id(CHANNEL_NAME)
MY_ID = 'U0GN5LAQ3'


logger = logging.getLogger('stupid')


def main():
    schedule.every().day.at("11:55").do(eat_some)
    schedule.every().day.at("15:55").do(eat_some)
    schedule.every().day.at("17:15").do(post, 'Go home')
    schedule.every().day.at("9:25").do(post_quote)
    reader = Reader(FateGame)
    schedule.every(10).seconds.do(reader.read)
    run_forever()


def run_forever():
    for i in itertools.count(0):
        schedule.run_pending()
        if i % 600 == 0:
            logger.info('Iteration #%d', i)
            logger.info(render_jobs())
        time.sleep(1)


def weekday(func):
    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        if datetime.datetime.now().weekday() in range(0, 6):
            return func(*args, **kwargs)
    return wrapper


def post(message):
    logger.debug('Posting to %r message %r', CHANNEL_ID, message)
    return slack.chat.post_message(CHANNEL_ID, message, username='Stupid')


def channel_info(name):
    for channel_info in slack.channels.list()['channels']:
        if channel_info['name'] == 'loud-launches':
            return channel_info


def channel_id(name):
    return channel_info(name)['id']


def user_name(user_id):
    return user_info(user_id)['name']
<commit_msg>Fixed weekday check<commit_after>import hashlib
import datetime
import errno
import functools
import itertools
import logging.config
import os
import random
import sqlite3
import sys
import time
import urllib.request
from collections import namedtuple

import requests
import schedule
import slack.channels
import slack.chat
from bs4 import BeautifulSoup


CHANNEL_NAME = 'loud-launches'
CHANNEL_ID = 'C0G8JR6TE'  # channel_id(CHANNEL_NAME)
MY_ID = 'U0GN5LAQ3'


logger = logging.getLogger('stupid')


def main():
    schedule.every().day.at("11:55").do(eat_some)
    schedule.every().day.at("15:55").do(eat_some)
    schedule.every().day.at("17:15").do(post, 'Go home')
    schedule.every().day.at("9:25").do(post_quote)
    reader = Reader(FateGame)
    schedule.every(10).seconds.do(reader.read)
    run_forever()


def run_forever():
    for i in itertools.count(0):
        schedule.run_pending()
        if i % 600 == 0:
            logger.info('Iteration #%d', i)
            logger.info(render_jobs())
        time.sleep(1)


def weekday(func):
    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        if datetime.datetime.now().weekday() in range(0, 5):
            return func(*args, **kwargs)
    return wrapper


def post(message):
    logger.debug('Posting to %r message %r', CHANNEL_ID, message)
    return slack.chat.post_message(CHANNEL_ID, message, username='Stupid')


def channel_info(name):
    for channel_info in slack.channels.list()['channels']:
        if channel_info['name'] == 'loud-launches':
            return channel_info


def channel_id(name):
    return channel_info(name)['id']


def user_name(user_id):
    return user_info(user_id)['name']

{'fraction_non_alphanumeric': 0.12981624184943688, 'fraction_numerical': 0.01956135151155898, 'mean_word_length': 3.842180774748924, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6285221', 'n_tokens_mistral': 1168, 'n_tokens_neox': 1107, 'n_words': 252}