Skip to main content

Value Scheduler based on Progress

Project description

line-chain Build Status codecov PyPI version

Value Scheduler based on Progress.

Installation

Need Python 3.6+.

pip install line-chain

Usage

import line_chain

line_chain = line_chain.factory(config=[
    {
        'mode': 'linear',
        'ratio': 0.01,
        'start': 0.2,
        'target': 0.8
    }, {
        'mode': 'cosine',
        'ratio': 1.0,
        'target': 0.0
    }
])

print(line_chain)
#> LineChain (
#>     1.0%, linear from 0.2 to 0.8,
#>   100.0%, cosine from 0.8 to 0.0,
#> )


# plot it!
import numpy as np
import pylab as pl

x = np.linspace(0, 1, 1000)
y = np.vectorize(line_chain.at)(x)
pl.plot(x, y)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

line-chain-0.0.2.post2.tar.gz (4.3 kB view details)

Uploaded Source

File details

Details for the file line-chain-0.0.2.post2.tar.gz.

File metadata

  • Download URL: line-chain-0.0.2.post2.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.3

File hashes

Hashes for line-chain-0.0.2.post2.tar.gz
Algorithm Hash digest
SHA256 f4d3838073ccd62d7016d950919b3f06b793eedc77b17d7feb7a15f59b292f30
MD5 0de44a4666ff853c3ec356959c3f373e
BLAKE2b-256 2dcc02a327cca32712b59f771f650e51aa478b7a67e9e5e241efe63413487360

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page