atksh's utils
Project description
atksh-utils
This is my collection of utilities.
Development
To install this for development, run the following commands in your terminal:
python -m pip install -e '.[dev]'
pre-commit install
OpenAI
ai = OpenAI(key, "gpt-3.5-turbo-0613")
print(ai("Just answer the value of (5243 + 642) x (5314 - 4231) // 100"))
# The value of the expression (5243 + 642) x (5314 - 4231) // 100 is 7112.
def mul(a: int, b: int) -> int:
"""This is a multiplication function.
:param a: An integer.
:type a: int
:param b: An integer.
:type b: int
:return: The sum of a and b.
:rtype: int
"""
return a * b
def add(a: int, b: int) -> int:
"""This is an addition function.
:param a: An integer.
:type a: int
:param b: An integer.
:type b: int
:return: The sum of a and b.
:rtype: int
"""
return a + b
def sub(a: int, b: int) -> int:
"""This is a subtraction function.
:param a: An integer.
:type a: int
:param b: An integer.
:type b: int
:return: The sum of a and b.
:rtype: int
"""
return a - b
def div(a: int, b: int) -> int:
"""This is a division function.
:param a: An integer.
:type a: int
:param b: An integer.
:type b: int
:return: The sum of a and b.
:rtype: int
"""
return a // b
ai.set_function(mul)
ai.set_function(add)
ai.set_function(sub)
ai.set_function(div)
print(ai("Just answer the value of (5243 + 642) x (5314 - 4231) // 100"))
# The value of (5243 + 642) x (5314 - 4231) // 100 is 63734.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
atksh-utils-0.0.2.tar.gz
(10.2 kB
view hashes)
Built Distribution
Close
Hashes for atksh_utils-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6dbaf3bee062e50796756457b6a0571629a98add4feb5a45b6b6ccb8b40f66d4 |
|
MD5 | 7b434a286d793d3415185db38d0bd04b |
|
BLAKE2b-256 | 7813cb7eb5b6dc731bb39d45f97c31da63480a1a1048104614802f39c1b2c3fb |