Skip to main content

End of the world as we know it

Project description

Cataclysm - The Final Library

WORK IN PROGRESS

End of Coding As We Know It

cataclysm doesn't care about mortal code conventions. It writes a function it thinks you need from context.

>>> from cataclysm import consume
>>> consume(globals())

>>> x = get_italicized_phrases_wikipedia(page="Global catastrophic risk", only_lowercase_words=True, min_length=6)
>>> print(x[:5])
['existential risks', 'existential catastrophe[16]', 'global', 'terminal', 'permanent,']

Installation (TODO)

pip install cataclysm

Dependencies

  • python >= 3.8
  • openai >= 0.2.5
  • plunkylib >= 0.1.3

Configure API keys

Our demise is powered by OpenAI GPT4, so you'll need an API key from them.

Copy .env.template to .env in your working/app directory and add your API keys there:

OPENAI_API_KEY = "ADD_YOUR_OPENAI_KEY"

Usage - Global Cataclysm

With a global cataclysm, fresh code will be generated for any unrecognized function anywhere. You just need a descriptive function name, arguments, and maybe some comments for context. The rest is up to Them.

>>> from cataclysm import consume
>>> consume(globals())
>>> s = "May the gods have mercy on us all"
>>> corrupted = convert_some_words_to_disturbing_unicode_text(s, "mercy on us")
>>> print_surrounded_by_ascii_art_of_an_old_scroll(corrupted, use_wcwidth_for_padding=True)
 _________________________
| May the gods have m̜ͯ̂e͂ͦͥr̻̭͗c̳͖̍y̹̋̑  |
| o̵̰͒n̘͋͟ u̜͊ͤs̍͒͑ all                |
 ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

Or maybe you need harder problems removed...

graph = {
    "A": {"B": 10, "C": 4},
    "B": {"A": 1, "C": 2, "D": 5},
    "C": {"A": 4, "B": 2, "D": 9},
    "D": {"B": 5, "C": 1},
}

# Don't have time to google a library? Throw yourself headlong into eternity:
shortest_path = find_shortest_path_dijkstra(graph, "A", "D")
print(f"Shortest path: {shortest_path}")
Shortest path: ['A', 'C', 'B', 'D']

Usage - Doom (Recommended)

Mortals unable to endure a global cataclysm can succumb to their doom to reduce suffering.

>>> from cataclysm import doom
>>> uhoh = doom.first_prime_with_3_digits()
>>> print(uhoh)
101

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cataclysm-0.1.0.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

cataclysm-0.1.0-py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page