Skip to main content

Python Package Exercise

Artifical-Unintelligence

Status

Our Project

Our project, artifical unintelligence, builds upon the rapidly growing AI/ML field. It is an evolution (but backwards) of AI/ML. By randomly generating dubiously meaningful sentences, we can bring the field to the next level (maybe).

By: Jonathan Gao, Jason Mai, Nawab Mahmood, dibukseid

Link to PyPI website for the proj

How-To

Demo Link to example project.

Installation

In terminal or console or bash, type

pip install artificial-unintelligence

Importing and Using

In your project include

import artificial_unintelligence

from artificial_unintelligence.functions import get_random_word, random_sentence_reply, same_start_letter_generate, keyboard_smash

Functions

Get a random word

Use the get_random_word function. The parameters can be 'noun', 'verb', or 'adjective'.

#To get a random noun
random_noun = get_random_word('noun')
print(random_noun) 
#The output would look something like :'dog'

#To get a random verb
random_verb = get_random_word('verb')
print(random_noun)
#The output would look something like : 'jump' 

#To get a random adjective 
random_adjective = get_random_word('adjective')
print(random_adjectove)
#The output would look something like 'happy'

Generate a random sentence

Use the random_sentence function to unintelligently reply to a query that is inputted as an argument into the function. It takes any string as an argument.

#Reply to a query with a randomly generated sentence. 
random_sentence = random_sentence_reply('what do you think of fishes')
print(random_sentence)
# This output would be for example : "Quickly happy zebra loudly jumps scary car in big tree."

Generate Letter-Specific Sentences

Use the same_start_letter_gemerate function to generate a sentence that all starts with the same letter. It takes an input as an argument or parameter.

# To generate a sentence where the words start with e
e_sentence = same_start_letter_generate('e')
print(e_sentence)
#example output would be: Electric eels emulsify eaton

Keyboard Smash (for frustration)

Use the keyboard_smash function to create a sentence where the first letter matches with the letters of the keyboard smash. It takes a string as an argument or parameter.

#to convert a keyboard smash such as 'lkjae' 
smash_text = keyboard_smash("lkjae")
print(smash_text) 
#example output would be : light kind joeys after emus

Set Up the virtual environment, install dependencies, build and test

Clone the repository

git clone https://github.com/software-students-spring2025/3-python-package-zebrazooka.git

To run, please first install pipenv in your console/terminal/bash.

Pip install pipenv

Then go to the directory where the repo clone in your computer's terminal or console.

Install the development environment and dependencies. --dev is important for pytest.

pipenv install --dev

Install the package in development mode. If no edits would need to be made, then the -e can be removed.

pipenv install -e . 

To install build

pipenv install build

Generate distribution packages

pipenv run python -m build

Run the demo and test using pipenv

pipenv run python demo.py 

If you would like to contribute (and how to test before you do)

Follow the steps to set Up the virtual environment, install dependencies, build and test , make sure to do the 'pipenv install -e .' command for easy editing.

Then create a new branch

git checkout -b newfeature

Make your updates

Run the tests

pipenv run pytest

commit the changes

git commit -m 'some new feature'

Push to the branch

git push origin newfeature

Then go to github and open a pull request. We will look at it and the maintainer will update the PyPI project.

How to import data

Our github repo already comes ready with a word bank, with this structure:

"a": {
        "nouns": ["apple", "astronaut", "ant"],
        "adjectives": ["amazing", "angry", "awesome"],
        "verbs": ["arrive", "ask", "admire"],
        "adverbs": ["anxiously", "angrily", "awkwardly"]
    },

Metadata

Release files for artificial-unintelligence 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for artificial-unintelligence 0.1.4
File Size Uploaded Provenance
artificial_unintelligence-0.1.4.tar.gz 48.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for artificial-unintelligence 0.1.4
File Interpreter ABI Platform
artificial_unintelligence-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 81.9 kB

Release files / artificial_unintelligence-0.1.4.tar.gz

Download URL artificial_unintelligence-0.1.4.tar.gz
Size 48.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d55b19ae05afb8345eb620386ed9a7f8318673685554670eaa0403932fef8e3f
BLAKE2b-256 checksum
How to use checksums
f26fd8bdf5bcb85450b478cdabfbc205263ceef2c537e0bfdb019beb0a5d182c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.16

Release files / artificial_unintelligence-0.1.4-py3-none-any.whl

Download URL artificial_unintelligence-0.1.4-py3-none-any.whl
Size 33.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2097845e24e0287129c345091f83defe90a52aff58bc4c2b33cee28ae0f591f0
BLAKE2b-256 checksum
How to use checksums
28ac58c2826e684f8881266f4f506725acc25089975b0b8e0af73f222c003e7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.16

Security for artificial-unintelligence 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page