semvec/pypi-packages huggingface dataset:
quick-logger 0.2.0
A simple interface for the standard Python logging library.
License: MIT
Requires Python: >=3.7,<4.0



# `quick_logger`

A simple interface for the standard Python logging library.

## About

This is a very simple package designed to setup a logger in one line and allow logging to it with ease.

### Note

I wrote this package when I was still in school. It's really no easier than just using `logger.<level>`.

However, the `init_logger` method may still be of some use. I've updated it such that `mlog` can now 
be dispatched with level:
```
from quick_logger import mlog
# Previously any level beyond info:
mlog("Here's a debug message.", "debug")
# Now, can use the same idiom as `logger.<level>`:
mlog.debug("Here's a debug message.")
```
Note that the original syntax is still backward-compatible, on the offchace anything out there uses this.

Ultimately, this package is ***very*** simple, you probably just want to use the base Python logging library.

## Installation

Use pip to install.

```
python -m pip install quick_logger
```

## Usage

Use `init_logger` to create a log file, and `mlog` to add a log entry. 

### Quick Start

#### `init_logger`

```python
from quick_logger import init_logger, mlog

init_logger('/path/to/file.log')
```
By default, the log file will be set to `logging.INFO`.

#### `mlog`

``` python
# By default logs are set to "info"
mlog("Logged something!")
# Invoke by level
mlog.error("Something went wrong!")
```
It's that easy!

### "Advanced" Setup

You can set a *few* options when you use `init_logger`.
 - `level`: Defaults to `info`, accepts `critical`, `error`, `warning`, `info`, `debug`, `notset`. 
 - `fmt`: Defaults to `'%(asctime)s:: %(levelname)s:: %(message)s'`. See [logging.Formatter](https://docs.python.org/3/library/logging.html#logging.Formatter) for details on how to set a `Formatter` string.
 - `datefmt`: Defaults to `'%Y-%m-%d %H:%M:%S'`. See [strftime reference](https://strftime.org/).
 
``` python
from quick_logger import init_logger
# Log file set to debug
init_logger('/path/to/file.log', level='debug')
...
# Log file with fmt that includes module.
fmt = '%(asctime)s:: %(module)s:: %(message)s'
# or log file with fmt that just has messages.
fmt = '%(message)s'
init_logger('/path/to/file.log', fmt=fmt)
...
# Omit date, just include the time.
init_logger('/path/to/file.log', datefmt='%H:%M:%S')
```

## Issues/Suggestions

Please make any suggestions or issues on the Github page. Note that this package is meant to be simple, so suggestions should keep that in mind. 

## License

This project is licensed under the MIT License. Please see the LICENSE.md file for details.
dvoryan 0.0.3
Reproducible and efficient diffusion kurtosis imaging in Python.
License: MIT

> рџ’Ў Instead of the code in this repository, it is recommended to use the [non-negativity-constrained](https://doi.org/10.1016/j.neuroimage.2019.116405) diffusion kurtosis imaging available in, for example, [DIPY](https://github.com/dipy/dipy).

# `dkmri.py`

`dkmri.py` stands for diffusion kurtosis magnetic resonance imaging in Python. It is a Python package for estimating diffusion and kurtosis tensors from diffusion-weighted magnetic resonance data. The estimation is performed using regularized non-linear optimization informed by a fully-connected feed-forward neural network that is trained to learn the mapping from data to kurtosis metrics. Details can be found in the [arXiv preprint](https://arxiv.org/abs/2203.07327) and [source code](https://github.com/kerkelae/dkmri/blob/main/dkmri/dkmri.py).

This software can be used from the command line or in a Python interpreter.

- The command-line interface does not require any knowledge about Python.
- Python interface is for people comfortable with basic Python programming.

## Installation

First, make sure you have installed [Python](https://www.python.org/downloads/).

If you just want to use the command-line interface, the recommended way of installing `dkmri.py` is to use [pipx](https://github.com/pypa/pipx/#install-pipx):

```
pipx install dkmri
```

pipx automatically creates an isolated environment in which the dependencies are installed.

If you want to use the Python interface, you can use [pip](https://pip.pypa.io/en/stable/) (you should install `dkmri.py` in an isolated environment using [venv](https://docs.python.org/3/library/venv.html) or [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html) to avoid dependency issues):

```
pip install dkmri
```

## Usage example

### Command-line interface

The command for using `dkmri.py` is

```
dkmri.py data bvals bvecs optional-arguments
```

where `data`, `bvals`, and `bvecs` are the paths of the files containing the
diffusion-weighted data, b-values, and b-vectors, and `optional-arguments` is
where to define things such as which parameter maps to save.

For example, a command for computing a mean kurtosis map from `data.nii.gz` and
saving it in `mk.nii.gz` could be

```
dkmri.py data.nii.gz bvals.txt bvecs.txt -mask mask.nii.gz -mk mk.nii.gz
```

To see a full description of the arguments, execute the following:

```
dkmri.py -h
```

### Python interface

See the [example notebook](https://github.com/kerkelae/dkmri/blob/main/docs/example.ipynb).

## Support

If you have questions, found bugs, or need help, please open an
[issue on Github](https://github.com/kerkelae/dkmri/issues).

## Citation

If you find this repository useful in work that leads to a scientific publication, please cite the [arXiv preprint](https://arxiv.org/abs/2203.07327).
djangocms-named-menus 2.0.2
Allows you to add and edit custom named menus similar to Wordpress menus
License: MIT

# Django CMS Named Menus

An extension for Django CMS that allows you to create multiple menus like Wordpress


## Replaces Previous Versions

**This replaces the previous versions by Ryan Bagwell and Rogerio Carrasqueira which are no longer actively updated**

Originally forked from:

- https://github.com/rgcarrasqueira/django-cms-named-menus
- https://github.com/ryanbagwell/django-cms-named-menus


## Installation

1. Install with pip `pip install djangocms-named-menus`

2. Add `cms_named_menus` to INSTALLED_APPS

3. Run migrations `python manage.py migrate`


## Upgrading from Previous Version

1. Uninstall previous version with pip `pip uninstall -y django-cms-named-menus`

2. The migrations and code will pick up previous versions correctly.


## Usage

After installation, place the `{% show_named_menu 'MenuName' %}` template tag where you want your menu to appear.

``` htmldjango
{% load named_cms_menu_tags %}
<ul>
  {% show_named_menu "Main Menu" %}
</ul>
```

Next, create your menu in the admin area using the drag and drop interface.
Drag items with child menu items:

![screenshot](ui.png)


Drag items without child menu items:

![screenshot](ui2.png)


## Settings

The following settings can be changed by adding to your project's settings.py file:

1. Override the default cache duration for Named Menus, default = 3600 seconds

``` python
CMS_NAMED_MENUS_CACHE_DURATION = 3600
```


2. Set the application namespaces that can be used with Named Menus as a list, default is CMS pages only - as the page id will not be unique for other applications e.g. Aldryn NewsBlog etc. (default = ['CMSMenu',])

``` python
CMS_NAMED_MENUS_NAMESPACES = ['CMSMenu',]
```

or to allow ALL namespaces:

``` python
CMS_NAMED_MENUS_NAMESPACES = None
```

3. Automatically remove pages that have been unpublished, deleted, or removed from Navigation (default = True)
```python
CMS_NAMED_MENUS_REMOVE_UNAVAILABLE_PAGES = True
```