{ "cells": [ { "cell_type": "code", "execution_count": 88, "id": "e7bd7834-0370-4685-ae24-cd7faa6e08f9", "metadata": {}, "outputs": [], "source": [ "from error_messages import break_messages\n", "import random, datetime, time\n", "from datetime import date\n", "import pytz" ] }, { "cell_type": "code", "execution_count": 89, "id": "74347109-d30a-476a-b903-cd3fa5b9274a", "metadata": {}, "outputs": [], "source": [ "def random_line(txt_list):\n", " message= choice(txt_list)\n", " print (message)" ] }, { "cell_type": "code", "execution_count": 90, "id": "8d527146-7473-4f02-b23e-61057a15a770", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "sorry I fell asleep come back in 10 min\n" ] } ], "source": [ "random_line(break_messages)" ] }, { "cell_type": "code", "execution_count": null, "id": "5d303ab1-47c1-4467-858b-7d84dc257e36", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": 91, "id": "8ba06a30-a28d-49cf-84d6-af1416945261", "metadata": {}, "outputs": [], "source": [ "today = date.today()\n", "altro = ('2021-12-15')" ] }, { "cell_type": "code", "execution_count": 92, "id": "07738cdb-46cb-46ba-bf7e-2ed8813a3ff7", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "2021-12-15\n" ] } ], "source": [ "if today != altro:\n", " print(altro)" ] }, { "cell_type": "code", "execution_count": 93, "id": "7b28edc8-8762-4834-84b5-b7ca913902c3", "metadata": {}, "outputs": [], "source": [ "tz = pytz.timezone('Europe/Berlin')\n", "moment = datetime.datetime.now(tz)\n", "timestamp = moment.__str__()\n" ] }, { "cell_type": "code", "execution_count": null, "id": "aaea2507-5bd0-4930-bf78-ed3ad9622276", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.3" } }, "nbformat": 4, "nbformat_minor": 5 }