Saravanan666/pypi-org huggingface dataset:
Package: simplelayout.types.news
DEPRECATEDThis package is deprecated.
Please useftw.contentpageWe dropped the maintenace/support of this package.
Install at your own risk.Please contactsupport@4teamwork.chif you are interested to migrate your
old simplelayout news content to ftw.contentpage.IntroductionProvides asimplelayoutpage for news.Usage / InstallationSee thesimplelayout.basereadme for details on installing simplelayout.Addsimplelayout.types.newsto your buildout configuration:[instance]
eggs +=
    simplelayout.types.newsInstall the generic import profile.LinksSimplelayout github project repository:https://github.com/4teamwork/simplelayout.basesimplelayout.types.news github project repository:https://github.com/4teamwork/simplelayout.types.newsIssue tracker:https://github.com/4teamwork/simplelayout.types.news/issuesPackage on pypi:http://pypi.python.org/pypi/simplelayout.types.newsContinuous integration:https://jenkins.4teamwork.ch/search?q=simplelayout.types.newsCopyrightThis package is copyright by4teamwork.simplelayout.types.newsis licensed under GNU General Public License, version 2.Changelog1.2.3 (2013-11-05)This package is deprecated, check README!
[mathias.leimgruber]Rename some views for compatibility with ftw.contentpage
[mathias.leimgruber]1.2.2 (2013-10-21)Rename news portlet (migration conflict).
[mathias.leimgruber]1.2.1 (2013-01-30)Fix confusing label.
[mathias.leimgruber]1.1 (2013-01-24)Use new news portlet.
[timon.tschanz]Override plone byline. Don’t register a second one.
[tschanzt]Move package to github.
[jone]Implement News as Simplelaylout block.
[mathias.leimgruber]Import registerType from LinguaPlone if its installed.
[Julian Infanger]Fix wrong initial metadata according to latest upgrade.
[jone]1.0.8 (2012-06-28)Fixed error in newsportlet using a template for collection portlet.
[Julian Infanger]1.0.7 (2012-06-13)News-listing: New news should be listed at top.
[Julian Infanger]1.0.6 (2012-06-08)Created upgradestep to install NewsFolder and dont allow to add
News in OrgUnit or ContentPage.
[Julian Infanger]Added new content type NewsFolder. Created news_archive_listing.
[Julian Infanger]1.0.5 (2012-05-30)Fixed byline viewlet. Added creator and modification date.
[Julian Infanger]1.0.4 (2012-05-09)Added default date for news.
[Julian Infanger]Added viewlets for byline and image.
[Julian Infanger]Improved news listing view
[Julian Infanger]1.0.3 (2012-04-05)Fix RSS-Feed format.
[mathias.leimgruber]german translations
[mathias.leimgruber]1.0.2 (2012-04-02)Fix collective.portlet.collectionmultiview imports.
[eschmutz]1.0.1 (2012-03-05)Initial releasenews type based on simplelayout pageadd simple topic summary news view
Package: simplelayout.ui.dragndrop
Introductionfollowing features for simplelayout are provided by this packageusing jquery/ajaxdragging and dropping blocks arroundUsage / InstallationSee thesimplelayout.basereadme for details.UninstallThis package provides an uninstall Generic Setup profile, however, it will
not uninstall the package dependencies.
Make sure to uninstall the dependencies if you no longer use them.LinksSimplelayout github project repository:https://github.com/4teamwork/simplelayout.basesimplelayout.ui.dragndrop github project repository:https://github.com/4teamwork/simplelayout.ui.dragndropIssue tracker:https://github.com/4teamwork/simplelayout.ui.dragndrop/issuesPackage on pypi:http://pypi.python.org/pypi/simplelayout.ui.dragndropCopyrightThis package is copyright by4teamwork.simplelayout.ui.dragndropis licensed under GNU General Public License, version 2.Changelog3.1.0 (2014-09-15)Implement uninstall profile.
[jone]3.0.1 (2013-12-19)Fix drag’n’drop between slots.
[tschanzt]3.0 (2013-03-29)Plone 4.3: support for newer jquery versions.
[jone]Replace jq by $
[mathias.leimgruber]3.0c1 (2013-01-24)Reimplement a min height for empty slots.
[mathias.leimgruber]Condition for a special usecase (show the current content also
as block. But this block is no moveable)
[mathias.leimgruber]Remove “setHeightOfEmptyDropZone”.
[mathias.leimgruber]Move package to github.
[jone]3.0b2 (2012-04-23)Show border around slots on dranging a block.
[Julian Infanger]3.0b1 (2012-03-05)removed dependecies for jquery
[09.07.2010, mathias.leimgruber]change jquery ui to newst version 1.8c3
[12.07.2010, mathias.leimgruber]2.0rc3bugfix, use POST ajax-request for drag’n’drop reorder [mathias.leimgruber]2.0rc2only change slot interface if source and target are
not the same [mathias.leimgruber]2.0rc1set size for empty slots [mathias.leimgruber]2.0b4JS: use simplelayout object [mathias.leimgruber]use collective.js.jqueryui [mathias.leimgruber]reorder JS by GenericSetup [mathias.leimgruber]2.0b3compress, merged and cache js. [mathias.leimgruber]2.0b2fix Drag’n’Drop feature, if mouse moves too fast ;-) [mathias.leimgruber]fix Drag’n’Drop feature for Safari [jonas.baumann]enable caching for js [mathias.leimgruber]remove jq ui version from file name [mathias.leimgruber]updated to jquery ui 1.7.2 [mathias.leimgruber]fixed dragndrop if there is more than one simplelayout-container
(for dropzoneportlet) [mathias.leimgruber]2.0b1make dragging and dropping with multible columns/slots available
[mathias.leimgruber]1.0 - UnreleasedInitial release [mathias.leimgruber]implements block drag ‘n’ drop [mathias.leimgruber]useing jquery [mathias.leimgruber]
Package: simplelayout-Xia-Yufeng
3-simplelayout-package简介本次作业将大家完成的数据生成器进行打包，可供 pip 进行安装，发布到PyPI。同时使用 Sphinx 构建文档，发布到Read the Docs。Sphinxis a powerful documentation generator that has many great features for writing technical documentation including:Generate web pages, printable PDFs, documents for e-readers (ePub), and more all from the same sourcesYou can use reStructuredText or Markdown to write documentationAn extensive system of cross-referencing code and documentationSyntax highlighted code samplesA vibrant ecosystem of first and third-party extensionsPython 生态的文档大都以 Sphinx 进行发布，例如Python 自身的官方文档、Pytorch 文档等等。Read the Docs是一个可以自动化托管 Sphinx 文档的网站。Read the Docs 有上手教程，参考。要求将个人完成的2-simplelayout-generator项目中的simplelayout目录复制到本次作业的src目录下。编写setup.py参考官方文档，与Packaging and distributing projects，正确配置setuptools.setup()，确保能被pip正确安装，要求package 名称设置为simplelayout-github账号名正确包含src/simplelayout这个 packageinstall_requires包含simplelayout的相关依赖正确配置entry_points，使命令simplelayout对应simplelayout/__main__.py中的main()函数参考文档，正确打包参考文档，正确上传到 PyPI根据参考教程，创建docs目录，并创建Sphinx项目。在执行sphinx-quickstart时输入相关信息Sphinx 默认使用 rst 格式（reStructuredText）编写文档，可进行配置使用Markdown进行文档编写。选做：参考配置 autodoc、napoleon 插件，自动生成 simplelayout 中的 docstring API。在本地生成正确的 Sphinx 文档注册Read the Docs，将个人仓库中的文档正确托管将个人项目 PyPI 仓库的链接、read the docs 链接以评论的方式发在Feedback上注意本次作业的在线测试分为以下部分：测试能否正确执行pip install .分值：1 分测试能否正确执行pip install .
simplelayout -h分值：1 分以上测试通过后，会在Feedback中打印相关信息（包括 PyPI 链接，生成图片），但不会对PyPI、Read the Docs自动测试
Package: simplelayout-YujieFeng20
3-simplelayout-package简介本次作业将大家完成的数据生成器进行打包，可供 pip 进行安装，发布到PyPI。同时使用 Sphinx 构建文档，发布到Read the Docs。Sphinxis a powerful documentation generator that has many great features for writing technical documentation including:Generate web pages, printable PDFs, documents for e-readers (ePub), and more all from the same sourcesYou can use reStructuredText or Markdown to write documentationAn extensive system of cross-referencing code and documentationSyntax highlighted code samplesA vibrant ecosystem of first and third-party extensionsPython 生态的文档大都以 Sphinx 进行发布，例如Python 自身的官方文档、Pytorch 文档等等。Read the Docs是一个可以自动化托管 Sphinx 文档的网站。Read the Docs 有上手教程，参考。要求将个人完成的2-simplelayout-generator项目中的simplelayout目录复制到本次作业的src目录下。编写setup.py参考官方文档，与Packaging and distributing projects，正确配置setuptools.setup()，确保能被pip正确安装，要求package 名称设置为simplelayout-github账号名正确包含src/simplelayout这个 packageinstall_requires包含simplelayout的相关依赖正确配置entry_points，使命令simplelayout对应simplelayout/__main__.py中的main()函数参考文档，正确打包参考文档，正确上传到 PyPI根据参考教程，创建docs目录，并创建Sphinx项目。在执行sphinx-quickstart时输入相关信息Sphinx 默认使用 rst 格式（reStructuredText）编写文档，可进行配置使用Markdown进行文档编写。选做：参考配置 autodoc、napoleon 插件，自动生成 simplelayout 中的 docstring API。在本地生成正确的 Sphinx 文档注册Read the Docs，将个人仓库中的文档正确托管将个人项目 PyPI 仓库的链接、read the docs 链接以评论的方式发在Feedback上注意本次作业的在线测试分为以下部分：测试能否正确执行pip install .分值：1 分测试能否正确执行pip install .
simplelayout -h分值：1 分以上测试通过后，会在Feedback中打印相关信息（包括 PyPI 链接，生成图片），但不会对PyPI、Read the Docs自动测试
Package: simplelayout-yuloveyet
3-simplelayout-package简介本次作业将大家完成的数据生成器进行打包，可供 pip 进行安装，发布到PyPI。同时使用 Sphinx 构建文档，发布到Read the Docs。Sphinxis a powerful documentation generator that has many great features for writing technical documentation including:Generate web pages, printable PDFs, documents for e-readers (ePub), and more all from the same sourcesYou can use reStructuredText or Markdown to write documentationAn extensive system of cross-referencing code and documentationSyntax highlighted code samplesA vibrant ecosystem of first and third-party extensionsPython 生态的文档大都以 Sphinx 进行发布，例如Python 自身的官方文档、Pytorch 文档等等。Read the Docs是一个可以自动化托管 Sphinx 文档的网站。Read the Docs 有上手教程，参考。要求将个人完成的2-simplelayout-generator项目中的simplelayout目录复制到本次作业的src目录下。编写setup.py参考官方文档，与Packaging and distributing projects，正确配置setuptools.setup()，确保能被pip正确安装，要求package 名称设置为simplelayout-github账号名正确包含src/simplelayout这个 packageinstall_requires包含simplelayout的相关依赖正确配置entry_points，使命令simplelayout对应simplelayout/__main__.py中的main()函数参考文档，正确打包参考文档，正确上传到 PyPI根据参考教程，创建docs目录，并创建Sphinx项目。在执行sphinx-quickstart时输入相关信息Sphinx 默认使用 rst 格式（reStructuredText）编写文档，可进行配置使用Markdown进行文档编写。选做：参考配置 autodoc、napoleon 插件，自动生成 simplelayout 中的 docstring API。在本地生成正确的 Sphinx 文档注册Read the Docs，将个人仓库中的文档正确托管将个人项目 PyPI 仓库的链接、read the docs 链接以评论的方式发在Feedback上注意本次作业的在线测试分为以下部分：测试能否正确执行pip install .分值：1 分测试能否正确执行pip install .
simplelayout -h分值：1 分以上测试通过后，会在Feedback中打印相关信息（包括 PyPI 链接，生成图片），但不会对PyPI、Read the Docs自动测试
Package: simplelayout-zhaoxiaoyu1995
3-simplelayout-package简介本次作业将大家完成的数据生成器进行打包，可供 pip 进行安装，发布到PyPI。同时使用 Sphinx 构建文档，发布到Read the Docs。Sphinxis a powerful documentation generator that has many great features for writing technical documentation including:Generate web pages, printable PDFs, documents for e-readers (ePub), and more all from the same sourcesYou can use reStructuredText or Markdown to write documentationAn extensive system of cross-referencing code and documentationSyntax highlighted code samplesA vibrant ecosystem of first and third-party extensionsPython 生态的文档大都以 Sphinx 进行发布，例如Python 自身的官方文档、Pytorch 文档等等。Read the Docs是一个可以自动化托管 Sphinx 文档的网站。Read the Docs 有上手教程，参考。要求将个人完成的2-simplelayout-generator项目中的simplelayout目录复制到本次作业的src目录下。编写setup.py参考官方文档，与Packaging and distributing projects，正确配置setuptools.setup()，确保能被pip正确安装，要求package 名称设置为simplelayout-github账号名正确包含src/simplelayout这个 packageinstall_requires包含simplelayout的相关依赖正确配置entry_points，使命令simplelayout对应simplelayout/__main__.py中的main()函数参考文档，正确打包参考文档，正确上传到 PyPI根据参考教程，创建docs目录，并创建Sphinx项目。在执行sphinx-quickstart时输入相关信息Sphinx 默认使用 rst 格式（reStructuredText）编写文档，可进行配置使用Markdown进行文档编写。选做：参考配置 autodoc、napoleon 插件，自动生成 simplelayout 中的 docstring API。在本地生成正确的 Sphinx 文档注册Read the Docs，将个人仓库中的文档正确托管将个人项目 PyPI 仓库的链接、read the docs 链接以评论的方式发在Feedback上注意本次作业的在线测试分为以下部分：测试能否正确执行pip install .分值：1 分测试能否正确执行pip install .
simplelayout -h分值：1 分以上测试通过后，会在Feedback中打印相关信息（包括 PyPI 链接，生成图片），但不会对PyPI、Read the Docs自动测试
Package: simplelayout-zweien
3-simplelayout-package简介本次作业将大家完成的数据生成器进行打包，可供 pip 进行安装，发布到PyPI。同时使用 Sphinx 构建文档，发布到Read the Docs。Sphinxis a powerful documentation generator that has many great features for writing technical documentation including:Generate web pages, printable PDFs, documents for e-readers (ePub), and more all from the same sourcesYou can use reStructuredText or Markdown to write documentationAn extensive system of cross-referencing code and documentationSyntax highlighted code samplesA vibrant ecosystem of first and third-party extensionsPython 生态的文档大都以 Sphinx 进行发布，例如Python 自身的官方文档、Pytorch 文档等等。Read the Docs是一个可以自动化托管 Sphinx 文档的网站。Read the Docs 有上手教程，参考。要求将个人完成的2-simplelayout-generator项目中的simplelayout目录复制到本次作业的src目录下。编写setup.py参考官方文档，与Packaging and distributing projects，正确配置setuptools.setup()，确保能被pip正确安装，要求package 名称设置为simplelayout-github账号名正确包含src/simplelayout这个 packageinstall_requires包含simplelayout的相关依赖正确配置entry_points，使命令simplelayout对应simplelayout/__main__.py中的main()函数参考文档，正确打包参考文档，正确上传到 PyPI根据参考教程，创建docs目录，并创建Sphinx项目。在执行sphinx-quickstart时输入相关信息Sphinx 默认使用 rst 格式（reStructuredText）编写文档，可进行配置使用Markdown进行文档编写。选做：参考配置 autodoc、napoleon 插件，自动生成 simplelayout 中的 docstring API。在本地生成正确的 Sphinx 文档注册Read the Docs，将个人仓库中的文档正确托管将个人项目 PyPI 仓库的链接、read the docs 链接以评论的方式发在Feedback上注意本次作业的在线测试分为以下部分：测试能否正确执行pip install .分值：1 分测试能否正确执行pip install .
simplelayout -h分值：1 分以上测试通过后，会在Feedback中打印相关信息（包括 PyPI 链接，生成图片），但不会对PyPI、Read the Docs自动测试
Package: simple-lda
Latent Dirichlet allocation (LDA) is a topic model that generates topics
based on word frequency from a set of documents. LDA is particularly
useful for finding reasonably accurate mixtures of topics within a given
document set.InstallationThe library is available on PyPI:pip install simple-ldaSourcesEdwin Chen Introduction to latent Dirichlet
AllocationJordan Barder LDA with Python
walkthroughGensim library for lda based on M Hoffman’s
paperSnowball for Porter stemming
algorithmBird, Steven, Edward Loper and Ewan Klein (2009), Natural Language
Processing with Python. O’Reilly Media
Inc
Package: simpleldap
AboutA small wrapper around the python-ldap library that provides a more Pythonic
interface for LDAP server connections, LDAP objects, and the common get and
search operations.InstallationInstall using pip:pip install simpleldapExamplesA quick and easy example usingsimpleldap:>>> import simpleldap
>>> conn = simpleldap.Connection('directory.example.com')
>>> user = conn.get("uid=myuser")
>>> user.dn
'uid=myuser,dc=directory,dc=example,dc=com'
>>> user['cn']
['Joe Smith', 'Joe M. Smith']
>>> user.first('cn')
'Joe Smith'
>>> conn.close()TheConnectionobject can also be used as a context manager, e.g.:with simpleldap.Connection('directory.example.com') as conn:
    users = conn.search("(&(givenName=Joe)(sn=Smith))")A common method for authenticating users is to connect to an LDAP server using
a service user/account and then attempt a bind operation using the user’s
credentials (i.e. DN and password).  Theauthenticatemethod makes this
simple:with simpleldap.Connection('directory.example.com') as conn:
    is_valid = conn.authenticate('uid=myuser,dc=directory,dc=example,dc=com', 'password')NoteTheauthenticationmethod does not perform an unbind and does not bind again
using the original connection’s credentials; therefore, any further
actions following a successfulauthenticatecall will be performed as
the authenticated user.LDAP also offers a feature to compare an attribute’s value with a given string.
This can occasionally be more efficient and expressive than grabbing an entire
object from the LDAP store.simpleldapoffers acomparemethod for this
feature:>>> conn = simpleldap.Connection('directory.example.com')
>>> user_dn = 'uid=myuser,dc=directory,dc=example,dc=com'
>>> conn.compare(user_dn, 'cn', 'Joe Smith')
True
Package: simpleleader
简单选主一些任务只需要一个实例执行，由于高可用要求，需要多台实例。那么多实例通信就成问题，而一些情况下环境比较苛刻，没有组件可以借用。一个简单的选主提上日程。介绍采用UDP心跳通信，简化流程，特征如下：初始化时，各个节点均为Follower状态。开始选主时，所有节点的Follower状态转为Candidate状态，并向其他节点发送自身心跳。其他节点收到心跳，对比自己心跳，Term比自身小，或者相同是ID比自身大，则节点降为Follower，不在发送心跳。当Candidate持续心跳有效期时间N内未收到其他节点的心跳，则晋升为Leader，周期发送心跳。安装pip install simpleleader使用加入有三台实例，定义好各自通信端口，简单使用如下：import time
from simpleleader import PeerLeader
endpoint = '127.0.0.1:9001'
cluster = '127.0.0.1:9001,127.0.0.1:9002,127.0.0.1:9003'
peer = PeerLeader(endpoint, cluster)
peer.run()
while 1:
    if peer.is_leader():
        print("%s is leader" % endpoint)
    else:
        print("%s is follower" % endpoint)
    time.sleep(1)测试验证python -m simpleleader.tests [实例总数] [当前实例ID,从0开始]
参考
python -m simpleleader.tests 3 0
python -m simpleleader.tests 3 1
python -m simpleleader.tests 3 2
Package: simple-learn
SimpleLearnA python package to simplify and automate data science workflows such as data modelling.Installation$ pip install simple-learnPrimerThis package is based offGoogle AutoMLand hopes to allow people with limited machine learning knowledge to train high performance models for their specific use cases. Similar to AutoML,
SimpleLearn aims to create an automatic process of model algorithm selection, hyper parameter tuning, iterative modelling, and model assessment. Under the hood, SimpleLearn is using a greedy algorithm to select/assess the model algorithm while leveraging a grid search to tune model hyperparameters. The metrics for assessing the model can all be configured via input parameters. Keep in mind this package does NOT automate the entire process of data science and assumes you are handling tasks such as data preparation and feature engineering. A strong model algorithm cannot apologize for bad data.UsageThe following are examples of how to use some of the classes in SimpleLearn.SimpleClassifier>>>fromsklearn.datasetsimportload_iris>>>fromsimple_learn.classifiersimportSimpleClassifier>>>>>>iris=load_iris()>>>clf=SimpleClassifier()>>>clf.fit(iris.data,iris.target)>>>clf{"Type":"KNeighborsClassifier","Training Duration":"0.0006814002990722656s","GridSearch Duration":"0.17136621475219727s","Parameters":{"metric":"euclidean","n_neighbors":4,"weights":"uniform"},"Metrics":{"Training Accuracy":0.9866666666666667,"Jaccard Score":0.9245283018867925,"F1 Score":0.96}}SimpleClassifierList>>>fromsklearn.datasetsimportload_iris>>>fromsimple_learn.classifiersimportSimpleClassifierList>>>>>>iris=load_iris()>>>clf_list=SimpleClassifierList()>>>clf_list.fit(iris.data,iris.target)>>>clf_list{"Type":"KNeighborsClassifier","Rank":1,"Training Duration":"0.0005269050598144531s","GridSearch Duration":"0.17510604858398438s","Parameters":{"metric":"euclidean","n_neighbors":4,"weights":"uniform"},"Metrics":{"Training Accuracy":0.9866666666666667,"Jaccard Score":0.9245283018867925,"F1 Score":0.96},"Index":0}{"Type":"DecisionTreeClassifier","Rank":2,"Training Duration":"0.0004031658172607422s","GridSearch Duration":"0.06979990005493164s","Parameters":{"criterion":"gini","max_depth":3},"Metrics":{"Training Accuracy":0.9733333333333333,"Jaccard Score":0.9486989764459243,"F1 Score":0.9733226623982927},"Index":1}{"Type":"ExtraTreeClassifier","Rank":3,"Training Duration":"0.00039696693420410156s","GridSearch Duration":"0.11928296089172363s","Parameters":{"criterion":"gini","max_depth":4,"splitter":"best"},"Metrics":{"Training Accuracy":0.9666666666666667,"Jaccard Score":0.9611613876319759,"F1 Score":0.97999799979998},"Index":2}...>>>clf=clf_list.pop(index=2)# default index is 0>>>clf{"Type":"ExtraTreeClassifier","Training Duration":"0.00039696693420410156s","GridSearch Duration":"0.11928296089172363s","Parameters":{"criterion":"gini","max_depth":4,"splitter":"best"},"Metrics":{"Training Accuracy":0.9666666666666667,"Jaccard Score":0.9611613876319759,"F1 Score":0.97999799979998}}
Package: simplelens
LensPurposeThe purpose of this project is to implement the "Lens" functional pattern in Python and supply that implementation as a package that can be imported into any other python project.Installpip install simplelensUninstallpip uninstall simplelensUsageInstall the package from PyPi via pip installfrom lens import lensThe lens function expects a collection of some form, as well as a list of keys and/or indexes to use to extract data
from the collection.collection = {'a': {'b': [{'a': 1}, {'b': 2}, {'c': 3}]
lens(collection, ['a', 'b', 2, 'c'])
#=> 3ChangelogSee changelog here:Changelog.mdLicenseCopyright 2023 Nathan Menge -nathan.menge@gmail.comPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package: simplelhs
simplelhsSimple implementation of Latin Hypercube Sampling.ExampleThe example below shows how to sample from a random Latin Hypercube Design with five points for three inputs.fromsimplelhsimportLatinHypercubeSamplinglhs=LatinHypercubeSampling(3)hc=lhs.random(5)print(hc)[[0.65830165 0.26660356 0.78491755]
 [0.42168063 0.43244666 0.979281  ]
 [0.39058169 0.76099351 0.34764726]
 [0.07122137 0.15507069 0.58082752]
 [0.87530571 0.94575193 0.03949576]]The example below shows how to sample from a Maximin Latin Hypercube Design with five points for three inputs. Out of 1000 randomly sampled Latin Hypercube samples the sample with the maximal minimal distance between points is selected.fromsimplelhsimportLatinHypercubeSamplinglhs=LatinHypercubeSampling(3)hc=lhs.maximin(5,1000)print(hc)[[0.24607101 0.11399068 0.5456922 ]
 [0.88731638 0.40600431 0.32305333]
 [0.47416121 0.99487745 0.03087923]
 [0.06288706 0.7227211  0.78248764]
 [0.77081332 0.36862214 0.99449703]]To scale the data to unit cube and back to its original range the functionsnormalise()andunnormalise()are provided. The example below scales the Maximin Latin Hypercube sample back to its original range.fromsimplelhsimportunnormaliselower=np.array([0.,-5.,10.,])upper=np.array([1.,5.,40.])hc_maximin_scaled=unnormalise(hc_maximin,lower,upper)print(hc_maximin_scaled)[[ 0.24607101 -3.86009322 26.37076609]
[ 0.88731638 -0.93995687 19.69159997]
[ 0.47416121  4.94877447 10.92637679]
[ 0.06288706  2.22721099 33.47462916]
[ 0.77081332 -1.31377864 39.83491091]]
Package: simple-licence-plugin
simple-licence-pluginVersion: 1.0.1simple-licence-pluginprovides a plugin for use withpyarmorto allow python code to be commercially distributed in a simple manor.pyarmorallows you to obfuscate your code, call plugins, and implement a simple licensing scheme. This plugin provides additional features when usingpyarmor's licensing option:Extract data embedded in the licence file (license.lic)Controlling which features are unlockedCalling home via a web service for auditing product usageEnsuring the licence file is for the product
Package: simplelimiter
simplelimiterA simple FastAPI rate limiterRequirementsRedisHow to useInstall the packagepip install simplelimiterExampleimportredisfromfastapiimportFastAPI,APIRouter,Requestfromfastapi.paramsimportDependsfromsimplelimiterimportLimiterapp=FastAPI()router=APIRouter()# We initialize the Limiter on the app startup event@app.on_event("startup")asyncdefstartup():r=redis.from_url("redis://localhost",encoding="utf-8",decode_responses=True)Limiter.init(redis_instance=r,debug=True)returnapp# We pass the Limiter as a dependencie@router.get("/",dependencies=[Depends(Limiter("5/minute"))])defbase_route(request:Request):return{"response":"ok"}app.include_router(router)