This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This is the detail about the constructor | |
* @class Main class for all books | |
* @param {String} title Book title | |
* @param {String} author Name of author | |
* @param {Number} pages How many pages in the book | |
*/ | |
class Book { | |
constructor(title, author, pages) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from concurrent import futures | |
from random import randint | |
import time, os, math, logging, logging.handlers, pprint | |
import multiprocessing | |
formatter = logging.Formatter('[%(asctime)s] - %(name)s - %(levelname)s - %(message)s') | |
cons_log = logging.StreamHandler() | |
cons_log.setFormatter(formatter) | |
handler = logging.handlers.WatchedFileHandler('status.log') | |
handler.setFormatter(formatter) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Email: | |
def __init__(self, receivers, subject='', body='', files=None): | |
self.sender = EMAIL_SENDER | |
self.receivers = receivers | |
# Create the message | |
msg = EmailMessage() | |
msg['Subject'] = subject | |
msg['To'] = ', '.join(receivers) | |
msg['From'] = self.sender | |
msg.set_content(body) |