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.1.tar.gz
(9.7 kB
view hashes)
Built Distribution
Close
Hashes for atksh_utils-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e40eed0bd2d51950ac81d4fc3a1dede4cc25fc4e772da42b5531cee7c364820 |
|
MD5 | 171fadcceb732b109e90bc2794b36972 |
|
BLAKE2b-256 | 6da2468d73418e20d576355910b92f0cb3742be39564e4a2d1f55518dfc7c791 |