semvec/pypi-packages huggingface dataset:
tgo 0.1
Topographical global optimisation
License: MIT
Keywords: optimization

.. image:: https://travis-ci.org/Stefan-Endres/tgo.svg?branch=master
    :target: https://travis-ci.org/Stefan-Endres/tgo
.. image:: https://coveralls.io/repos/github/Stefan-Endres/tgo/badge.png?branch=master
    :target: https://coveralls.io/github/Stefan-Endres/tgo?branch=master


Description
-----------

Finds the global minimum of a function using topographical global
optimisation (tgo_). Appropriate for solving general purpose NLP and blackbox
optimisation problems to global optimality (low dimensional problems).
The general form of an optimisation problem is given by:

.. _tgo: https://stefan-endres.github.io/tgo/

::

    minimize f(x) subject to

    g_i(x) >= 0,  i = 1,...,m
    h_j(x)  = 0,  j = 1,...,p

where x is a vector of one or more variables. ``f(x)`` is the objective
function ``R^n -> R``, ``g_i(x)`` are the inequality constraints.
``h_j(x)`` are the equality constrains.


Installation
------------
Stable:

.. code::

    $ pip install tgo

Latest:

.. code::

    $ git clone https://bitbucket.org/upiamcompthermo/tgo
    $ cd tgo
    $ python setup.py install
    $ python setup.py test

Documentation
-------------
The docstrings and project website https://stefan-endres.github.io/tgo/ contains more detailed examples, notes and performance profiles.

Quick example
-------------

Consider the problem of minimizing the Rosenbrock function. This function is implemented in ``rosen`` in ``scipy.optimize``

.. code:: python

    >>> from scipy.optimize import rosen
    >>> from tgo import tgo
    >>> bounds = [(0,2), (0, 2), (0, 2), (0, 2), (0, 2)]
    >>> result = shgo(rosen, bounds)
    >>> result.x, result.fun
    (array([ 1.,  1.,  1.,  1.,  1.]), 2.9203923741900809e-18)

Note that bounds determine the dimensionality of the objective function and is therefore a required input, however you can specify empty bounds using ``None`` or objects like numpy.inf which will be converted to large float numbers.
mr.hermes 1.4.0
A simple debug smtp server for development.
License: MIT

.. contents:: :depth: 1

Introduction
============

**mr.hermes** is an extension of the smtpd.DebuggingServer from the Python
standard library. It dumps all mails it receives to the standard output and
optionally to files in a configurable directory.

Usage
=====

There are several ways to use this package. Probably the most two common are
the following.

Command line
------------

Install it with your preferred Python packaging tool (setuptools, distribute,
pip or whatever). Run it from the command line using
``python -m smtpd -n -c mr.hermes.DebuggingServer localhost:8025``.

If you want to dump the output to a directory, then set the
**DEBUG_SMTP_OUTPUT_PATH** environment variable. For example like
``DEBUG_SMTP_OUTPUT_PATH=mails python -m smtpd -n -c mr.hermes.DebuggingServer localhost:8025``.

Buildout
--------

Add a part to your config like this::

    [debugsmtp]
    # Run a simple smtp server on 8025 that echos incoming email
    recipe = zc.recipe.egg
    eggs = mr.hermes
    entry-points = debugsmtp=runpy:run_module
    scripts = debugsmtp
    host = localhost
    port = 8025
    path = ${buildout:directory}/var/mails
    initialization =
        import os
        os.environ.setdefault('DEBUG_SMTP_OUTPUT_PATH', '${:path}')
        sys.argv[1:] = ['-n', '-c', 'mr.hermes.DebuggingServer', '${:host}:${:port}']
    arguments = 'smtpd', run_name='__main__', alter_sys=True

You can then add this script to something like supervisord_ and use
`mr.laforge`_ to automatically start it when you need it.

.. _supervisord: http://pypi.python.org/pypi/supervisor
.. _`mr.laforge`: http://pypi.python.org/pypi/mr.laforge


Changelog
=========

1.4.0 - 2017-11-08
------------------

* Fixes for Python 3.6.
  [dokai (Kai Lautaportti), fschulze]


1.3.0 - 2016-12-06
------------------

* Added ``*args`` and ``**kwargs`` in ``mr.hermes.DebugginServer.__init__`` to
  accept the new (even if unused) parameters introduced in Python 3.3 and 3.4
  and used when running the smtp module from cli.
  [duploduplo (Lorenzo Berni)]


1.2 - 2013-07-22
----------------

* Make sure mails are sorted properly when filenames conflict.
  [dokai (Kai Lautaportti), fschulze]


1.1 - 2011-08-04
----------------

* Fix packaging issue which basically made 1.0 a brownbag release.
  [fschulze]


1.0 - 2011-08-04
----------------

* Initial release
  [fschulze (Florian Schulze)]
django-idfield 1.0.1
Char ID filed Django
License: MIT
Requires Python: >=3

# django-idfield

Char ID filed for Django

Installation
============

Install it with pip (or easy_install):

```
pip install django-idfield
```

Usage
=====

```
from idfield import IDField

class MyModel(models.Model):
	id = IDField(max_length=10, readable=False, primary_key=True, editable=False)
	code = IDField(max_length=4, readable=True)
```

Notes
=====

* IDField is not a completely unique ID. The larger value of **max_length** makes less collisions possible.
* IDField always generate a value, if value is not set.
* If **readable=True**, value will be generated from caps letters and numbers, which do not look alike.