<jupyter_start><jupyter_text>Just a syntax reference for myself<jupyter_code>import datetime
x = datetime.datetime.now()
y = datetime.datetime.strptime("30-05-2021","%d-%m-%Y")
x
y
x.month
x.day
x.year
x.hour
x.minute
x.second<jupyter_output><empty_output><jupyter_text>d - int datem - int monthy - last two numbers of Year Y - complete Year integerH - int hour M - int minuteS - int secondsf - int microsecondsa - weekday short nameA - weekday full nameb - month short nameB - month full name<jupyter_code>x.strftime("%H")
x.strftime("%M")
x.strftime("%S")
x.strftime("%f")
x.strftime("%B")
x.strftime("%b")
x.strftime("%a")
x.strftime("%A")
z = y-x
z
z.days

z.seconds
z.total_seconds()
y = datetime.datetime.strptime("30-05-2020","%d-%m-%Y")
z = x-y
z
import re

re.match("a[a-zA-Z0-9]*b$","a123232b")
re.match("a(a|b|c)b$","acb")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1853997682502897, 'fraction_numerical': 0.027809965237543453, 'mean_word_length': 5.0, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '99786', 'license': 'MIT', 'n_tokens_mistral': 380, 'n_tokens_neox': 358, 'n_words': 75, 'path': 'DatetimeRegex.ipynb', 'repo_name': 'sameerg07/datetimeregex', 'size': '863'}