semvec/pypi-packages huggingface dataset:
aocutil 0.1.0
Utility library for Advent of Code (https://adventofcode.com)
Requires Python: >=3.9,<3.10

# AoC Utils

This small library can be used for the yearly Advent of Code
(https://adventofcode.com) challenge. It automates the retrieval of puzzle input
and submission.

# Installation

`aocutil` is [published on PyPi](https://pypi.org/project/aocutil/) and can be
installed from there.

# Usage

``` python
from aocutil import Aoc

# Initialize for year 2022, day 1 with session id 53616c746
#
# Everything here is optional. If left out year and day is determined
# from the current date -- be aware that your code is non-repeatable if year 
# and date is not specified.
# Session id is read from `${HOME}/.config/aocutil/session_id` if not specified.
aoc = Aoc(year=2022, day=1, session_id="53616c746")

# Retrieve input and split into list of lines
#
# You can also retrieve the content as a string with `aoc.input().read()`.
puzzle = aoc.input().lines()

# solve the puzzle (your implementation)
solution = solve(puzzle)

# Submit the solution for level 1
#
# If left out, the level is determined automatically by
# which level is not solved yet.
aoc.submit(solution, level=1)
```

# Retrieving the Session ID

A user in Advent of Code submissions and input retrieval is determined by a
session id stored in a cookie in the user's browser. For this library to work it
needs a users session id. The session id can be found by opening your browsers
developer tools and looking for a cookie named `session`.

You can either initialize `Aoc` with the token or store it in a file named
`${HOME}/.config/aocutil/session_id`. I would recommend the latter so you don't
accidentially publish your session id. Note that everyone who gets hold of your
session id can impersonate you.
Regexes 0.0.3
Common Regexes via Python
Requires Python: >=3.9

# Regexes

Easy regex finder for Python

## installation
```sh
~$ pip install Regexes
```

Usage:

- For extracting all possible info from string

```py
from Regexes import Regexes


string = """
Hello My name is Berkay and this is my project
bekxxx3@gmail.com, beskilo@doner.com,
05323450002,
05430000778,
pythoncibeko@bekocanholding.com
"""

ret = Regexes(data=string).find_reg()
print(ret)


# ---------------------------
# {'btc_addresses': [],
#  'credit_cards': [],
#  'dates': [],
#  'emails': ['bekxxx3@gmail.com',
#             'beskilo@doner.com',
#             'pythoncibeko@bekocanholding.com'],
#  'hex_colors': [],
#  'ips': [],
#  'ipv6s': [],
#  'links': ['gmail.com', 'doner.com', 'bekocanholding.com'],
#  'phones': ['05323450002', '05430000778'],
#  'phones_with_exts': [],
#  'po_boxes': [],
#  'prices': [],
#  'ssn_number': [],
#  'street_addresses': [],
#  'times': [],
#  'zip_codes': []}

```

- For specific type of info

```py
from Regexes import Regexes


string = """
Hello My name is Berkay and this is my project
bekxxx3@gmail.com, beskilo@doner.com,
05323450002,
05430000778,
pythoncibeko@bekocanholding.com
"""

ret = Regexes(data=string, dtype="emails").find_reg() # * Just add dtype arg
print(ret)


# ---------------------------
# {'emails': ['bekxxx3@gmail.com',
#             'beskilo@doner.com',
#             'pythoncibeko@bekocanholding.com']}

```

Credit: [CommonRegex](https://github.com/madisonmay/CommonRegex)