semvec/pypi-packages huggingface dataset:
github-to-colab-link 1.0.1
Generates Google Colab link for jupyter notebooks in public Github repos.
License: MIT
Requires Python: >=3.7

# Github to Colab Link Generator

[![Build Status](https://dev.azure.com/shawonAshraf/github-to-colab-link/_apis/build/status/ShawonAshraf.github-to-colab-link%20(1)?branchName=main)](https://dev.azure.com/shawonAshraf/github-to-colab-link/_build/latest?definitionId=11&branchName=main)

Sometimes you may want to load a Jupyter notebook from your repo to colab and run it there. Other times you may just want to add a colab link to your repositories readme page. Sure you can download a notebook and then import to colab but that may not always be ideal. The goal of this cli tool is to short-circuit that process so that you don't have to go through the extra clicks.

## Pre-requisites

- __The repo where your notebook is must be public__

## Installation and Usage

### Install from pip

```bash
pip install -U github-to-colab-link
```

### Usage

The package currently generates links in two formats, one is a plain string, which you can copy and load in an web browser; another is a markdown embed which you can use in your markdown style docs, e.g. Github readmes.

```bash
# for plain string
colab-link-gen --string --gh link_to_notebook
# example
colab-link-gen --string --gh https://github.com/ShawonAshraf/jax_examples/blob/main/playground/palmers_penguins.ipynb
```

```bash
# for markdown embed
colab-link-gen --md --gh link_to_notebook
# example
colab-link-gen --md --gh https://github.com/ShawonAshraf/jax_examples/blob/main/playground/palmers_penguins.ipynb
```

## Dev

- Clone the repo
- Create a `virtualenv`
- Install the requirements

```bash
pip install -r requirements.txt
```

- The entrypoint for the cli tool is in `cli.py` (the `run()` function)
- `link.py` contains the helpers to generate the links

### Testing

```bash
python -m unittest discover -s ./tests -p "*_test.py"
```
rustdef 0.4.0
Jupyter extension which executes Rust functions in Python
License: MIT
Requires Python: >=3.7
Keywords: Jupyter notebook,Rust,Jupyter extension

# rustdef

[![Test](https://github.com/emakryo/rustdef/workflows/Test/badge.svg?branch=master)](https://github.com/emakryo/rustdef/actions?query=branch%3Amaster)
[![PyPI version](https://badge.fury.io/py/rustdef.svg)](https://badge.fury.io/py/rustdef)

Jupyter extension for jupyter notebooks and rust users.

You can define functions in rust and run them as python functions.
This extension is built on [PyO3](https://github.com/PyO3/pyo3) and
[maturin](https://github.com/PyO3/maturin).

## Examples

- [Get Started](examples/Get%20started.ipynb)
- [Type conversion](examples/types.ipynb)
- [Numpy example](examples/numpy.ipynb)

## Prerequisite

- Python >= 3.7 and pip >= 19.3
- [Jupyter notebook](https://jupyter.org/install.html)
- [Rust](https://www.rust-lang.org/tools/install)
- [cargo-edit](https://crates.io/crates/cargo-edit)

## Install

```shell script
$ pip install rustdef
```

## Usage

Define rust functions,
```rust
%%rustdef
#[pyfunction]
fn my_func(x: i64, y: &str) -> i64 {
    println!("{}", y);
    x + y.len() as i64
}
```

Add dependencies, (e.g. `num` crate)
```
%rustdef deps add num@0.4.0
```

Defined dependencies are valid only in the current notebook.

Show dependencies,
```
%rustdef deps show
```

```
num = "0.4.0"

[pyo3]
version = "0.13.2"
features = [ "extension-module",]
```

`pyo3` is included by default.

## Develop

### How does it work?

Roughly, definitions in rustdef are available in python after the following steps.

1. Each rustdef magic cell is populated with the module definition of pyo3
2. A new crate is generated for the rustdef cell
3. The crate is compiled into a python wheel by `maturin`
4. Install the wheel with `pip`
5. Functions with `#[pyfunction]` attributes are exported into the interpreter namespace in notebooks
6. Ready to call the function in notebooks!

### Build

`maturin` is required.

```shell script
$ pip install maturin
$ maturin build
$ pip install target/wheels/rustdef-{version}-{python}-{platform}.whl
```

### ToDo

- [ ] execute within rustdef cell
- [ ] class/module supports
- [ ] customizable module name
- [ ] use functions defined in another cell
- [ ] verbose flag
- [ ] serde support
- [ ] windows support