semvec/pypi-packages huggingface dataset:
e3lm 0.1.9
e3lm CLI tool (3lm language) for managing .3lm projects and files.
Requires Python: >=3.8

<img src="https://i.ibb.co/gVczmTW/3LM.png" height="64" width="64" style="vertical-align: middle;"/> &nbsp;&nbsp; <span style="color: orange; font-size: 32px; vertical-align: middle;">3LM</span>

<img src="https://img.shields.io/github/license/knno/3lm" /> <img src="https://img.shields.io/github/repo-size/knno/3lm" /> <img src="https://img.shields.io/pypi/v/e3lm" /> 

Have fun while learning!

---

## So what is this exactly?

### This is an attempt at creating a markup language.

3LM is a structure language parsed in Python.

It is used for defining hierarchial objects, intended mainly to help write structured content fast and with ease.
Whether you are a scientist, a programmer or an educator, 3LM can be useful for you.

3LM is intended to be a language of use for an educational platform.

---

<img src="https://i.ibb.co/5WQCkMW/screenshotto.png" alt="screenshotto" border="0">

---

## Installation

The recommended way to install is using PyPI

### Installation through PyPI
Creating a virtual environment is very preferrable.

```bash
$ python -m venv venv
$ python -m pip install e3lm
```

### Installation from Github

Not preferrable, but it works too :)

```bash
$ pip install git+https://github.com/knno/3lm.git#egg=e3lm
```

## Configuration
```env
# Environment variables and their default values.

E3LM_TEMP_DIRECTORY="tmp"
```

## Usage

### Basic example

You can run these in your terminal to make sure it works:

```bash
$ e3lm --version
$ e3lm --help
$ e3lm -d code0
$ e3lm -d code0 -p json
$ e3lm examples/lesson1
```

More examples:

```bash
# Interpret an example.3lm file.
$ e3lm example.3lm

# Interpret demo code1 and generate graphviz dot file and view graph image.
$ e3lm -d code1 -p dot view

# Benchmarking 20 times the demo code0 for 6 measurements.
$ e3lm -d code0 -b 6 20
```

---

## Additional resources

Refer to the [Wiki](https://github.com/knno/3lm/wiki) to learn the language.

---

## TODO:

 - [ ] Examination questions auto-extraction from 3lm files. (Could be a plugin.)
 - [x] Rewrite included out-of-the-box example codes and error codes.
 - [ ] Add more tests.
 - [x] Benchmarking.
 - [x] Contrib plugins.
 - [ ] Make publish ready documentation.
 - [ ] Publish to PyPI.

More possibilities... See [e3lm.todo](https://github.com/knno/3lm/blob/master/e3lm.todo)

---
ipython-openai 0.0.5
An IPython extension for interacting with OpenAI's models
Requires Python: >=3.6

# IPython + GPT-4

A quick implementation of a random idea: what if `ipython` had a magic function that sent the current session to
gpt-4 along with a prompt, and automatically evaluated the result in the current session?

## Installation

```
pip install ipython_openai
```

Then, you can either load the extension during an ipython session with `%load_ext ipython_openai` or add the following
to your ipython config.

```
c.InteractiveShellApp.extensions = ['ipython_openai']
```

## Configuration

Your OpenAI API key should be available in the `OPENAI_API_KEY` env var. You can configure the model used by adding an
entry to your ipython config: `c.GPT.model_name = 'gpt-4-turbo-preview'`.

## Usage

This extension adds two new "magic" functions documented below. Each one captures the current history of the ipython
session and sends it to the OpenAI API along with the prompt given after the command. The result is streamed back to the
session. Each invocation of the magic functions can also see the output from previous ones.

## `gen`

```
In [1]: gen a 5 line greeter function with randomness
import random
def greet():
    names = ["Alice", "Bob", "Charlie", "Diana", "Edward"]
    greeting = ["Hello", "Hi", "Hey", "Greetings", "What's up"]
    print(f"{random.choice(greeting)}, {random.choice(names)}!")

Run it? (y/n) y

In [2]: greet()
Hello, Bob!
```

## `ask`

```
In [3]: ask what happened
When the `greet()` function was called, the following occurred:
1. The function selected a random name from the list `names`, which contains five different names: "Alice", "Bob", "Charlie", "Diana", and "Edward".
2. It also selected a random greeting from the list `greeting`, which includes five different greetings: "Hello", "Hi", "Hey", "Greetings", and "What's up".
3. It combined the selected greeting and name with a formatted string to create a message.
4. Finally, the function printed this message to the console.
Since the selections are random, the exact output can vary with each call to `greet()`, displaying a greeting and a name randomly chosen from the lists provided.
```