semvec/pypi-packages huggingface dataset:
idlmagic 0.1.0
%%idl magic for IPython and Jupyter notebooks, providing access to Harris Geospatial's IDL programming language.
License: MIT
Requires Python: >=3.0.0


# idlmagic

Use IDL ([interactive data language](https://www.harrisgeospatial.com/SoftwareTechnology/IDL.aspx)) inside IPython / Jupyter notebook cells. It uses the IDL-python bridge `idlpy`, which is bundled with your IDL installation.


## Installation


Install *idlmagic* with pip:

``` bash
pip install idlmagic
```

Then, enable *idlmagic* in your notbook:
``` python
%load_ext idlmagic
```

*idlmagic* relies on a valid installation of the IDL-python-bridge. To see if it is available, run
``` python
import idlpy
```
If the import fails, refer to the [documentation](https://r4lv.github.io/ipython-idlmagic) to see how `idlpy` can be set up.


## Usage

*idlmagic* provides you with `%idl` and `%%idl` to execute IDL commands, and `%idl_var` to pass an IDL variable to python.

``` python
In [1]: %load_ext idlmagic

# run IDL using the %idl line magic:
In [2]: %idl INDGEN(5)
       0       1       2       3       4

# or use the cell magic for multiple commands:
In [3]: %%idl
   ...: PRINT, INDGEN(5)
   ...: PRINT, INDGEN(6)
       0       1       2       3       4
       0       1       2       3       4       5

# to access IDL data in python, you'll first have to assign it:
In [9]: %idl a = INDGEN(4)

# then use the %idl_var magic to get the IDL variable into python:
In [11]: a = %idl_var a

In [16]: a + 10
Out[16]: array([10, 11, 12, 13], dtype=int16)
```

Check the [documentation](https://r4lv.github.io/ipython-idlmagic) for more examples.


## Changes

**v0.1.0**

- first release
lektor-gitlab 0.1.0
Query the Gitlab API right from your Lektor templates
License: MIT

# Lektor Gitlab

Query the Gitlab API right from your [Lektor][1] templates.

## Configuration 

To use the plugin you must first acquire an [private access token][2]. 
The token must at least have the `api` scope. 

Depending on your preference you can either create a Lektor config file 
 called `configs/gitlab.ini` where the token is stored under the 
 `private_token` key.

Eg: 
```ini
private_token = <Your access token>
```

Alternatively the token can also be set using an environment variable.

__Note__: the config file is checked before the environment variable  

Eg: 
```bash 
export GITLAB_PRIVATE_TOKEN=<Your access token> 
```

## Usage 

After you have set up the access token, the [Python-Gitlab][3] `Gitlab`
 object is available in your templates. This means you can do anything 
 your heart desires with it. 

### Examples

List your public repos

```jinja2
<ul>
    {% for project in gitlab.projects.list(owned=True, visibility='public') %}
        <li>{{ project.name }} [{{ project.star_count }}]</li>
    {% endfor %}
</ul>
```

Display the your name and avatar 

```jinja2
<h2>{{ gitlab.user.name }}</h2>
<img src="{{ gitlab.user.avatar_url }}">
```

[1]: https://www.getlektor.com
[2]: https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html
[3]: http://python-gitlab.readthedocs.io/en/stable/index.html