Saravanan666/pypi-org huggingface dataset:
Package: sloth-ci.ext.docker_exec
Run actions inside a `Docker <https://www.docker.com/>`__ image.By default, Sloth CI apps run actions in a subprocess on the same machine they're running on. This extension overrides this and makes the app execute each action as a container inside a given Docker image.Installation------------.. code-block:: bash$ pip install sloth-ci.ext.docker_execUsage-----.. code-block:: yaml:caption: docker_exec.ymlextensions:run_in_docker:# Use the module sloth_ci.ext.docker_exec.module: docker_exec# Image name. If missing, slug of the Sloth app listen point is used.# image: foo# Path to the Docker daemon to connect to. Can point to either a tcp URL or a unix socket. If missing, the client connects to /var/run/docker.sock.# base_url: tcp://555.55.55.55:5555 *.# Docker API version used on the server. If missing, the latest version is used.# version: 1.10# Path to the Dockerfile used to build an image if it doesn't exist. If missing, current directory is used.# path_to_dockerfile: docker/files# Memory limit in MB.# memory_limit: 10# CPU share in per cent.# cpu_share: 5
Package: sloth-ci.ext.file_logs
Add file logging to Sloth CI apps.You can customize your logging in a number of ways: set the output dir and filename, set log level and format, toggle and configure log rotation.Installation------------.. code-block:: bash$ pip install sloth-ci.ext.file_logsUsage-----.. code-block:: yaml:caption: file_logs.ymlextensions:logs:# Use the module sloth_ci.ext.file_logs.module: file_logs# Set the log path. Default is the current dir.path: debug_logs# Log filename. If not given, the app's listen point is used.filename: test_debug.log# Log level (number or valid Python logging level name).level: DEBUG# Log format (refer to the https://docs.python.org/3/library/logging.html#logrecord-attributes).# By default, this format is used:# format: '%(asctime)s | %(name)30s | %(levelname)10s | %(message)s'# Make logs rotating. Default is false.# rotating: true# If rotating, maximum size of a log file in bytes.# max_bytes: 500# If rotating, maximum number or log files to keep.# backup_count: 10
Package: sloth-ci-ext-logs
File Logging for Sloth CIYou can customize your logging in a number of ways: set the output dir and filename, set log level and format, toggle and configure log rotation.Installation$ pip install sloth-ci-ext-logsUsageextensions:
    logs:
        # Use the module sloth_ci_ext_logs.
        module: logs

        # Set the log path. Default is the current dir.
        path: debug_logs

        # Log filename. If not given, the app's listen point is used.
        filename: test_debug.log

        # Log level (number or valid Python logging level name).
        level: DEBUG

        # Log format (refer to the https://docs.python.org/3/library/logging.html#logrecord-attributes).
        # By default, this format is used: 
        # format: '%(asctime)s | %(name)30s | %(levelname)10s | %(message)s'

        # Make logs rotating. Default is false.
        # rotating: true

        # If rotating, maximum size of a log file in bytes.
        # max_bytes: 500

        # If rotating, maximum number or log files to keep.
        # backup_count: 10
Package: sloth-ci-ext-notifications
Email Notifications for Sloth CI BuildsSend email notifications when builds complete or fail.Executing actions of an app is calledbuild. A build is consideredcompletedif all its actions were completed. If some actions were completed and some failed, it's apartially completed; if all actions fail, the buildfailed.This extension sends you emails via SMTP when your builds complete (fully or partially) or fail; just pick the desired notification level, list the recipient emails, and enter your SMTP credentials. Optionally, you can set the subject for each notification level.Installation$ pip install sloth-ci-ext-notificationsUsageextensions:
    notifications:
        # Use the module sloth_ci_ext_notifications.
        module: notifications

        # Emails to send the notifications to.
        emails:
            - foo@bar.com
            - admin@example.com

        # Log level (number or valid Python logging level name).
        # ERROR includes only build fails, WARNING adds partial completions,
        # INFO adds completion, and DEBUG adds trigger notifications.
        # Default is WARNING.
        level: INFO

        # The "from" address in the emails. Default is "build@sloth.ci."
        from: notify@example.com

        # The email subject on build trigger. You can use the {listen_point} placeholder.
        # Default is "{listen_point}: Build Triggered."
        subject_triggered: 'Triggered build on {listen_point}!'

        # The email subject on build completion.You can use the {listen_point} placeholder.
        # Default is "{listen_point}: Build Completed."
        subject_completed: 'Hooray! {listen_point} works!'

        # The email subject on build partial completion. You can use the {listen_point} placeholder.
        # Default is "{listen_point}: Build Partially Completed."
        subject_partially_completed: 'Better than nothing on {listen_point}'

        # The email subject on build fail. You can use the {listen_point} placeholder.
        # Default is "{listen_point}: Build Failed."
        subject_failed: 'Fail on {listen_point}'

        # SMTP settings.
        # SMTP mail host and (if not default) port.
        # Mandatory parameter.
        mailhost: 'smtp-mail.outlook.com:25'

        # SMTP login.
        login: foo@bar.baz

        # SMTP password.
        password: bar

        # If the SMTP server requires TLS, set this to true. Default is false.
        # If necessary, you can provide a keyfile name or a keyfile and a certificate file names.
        # This param is used only if the login and password params are supplied.
        secure: true
        # secure:
        #    -   keyfile
        #    -   cerfile
Package: sloth-ci.ext.openvz_exec
Run actions inside an `OpenVZ <http://openvz.org>`__ container.By default, Sloth CI apps run actions in a subprocess on the same machine they're running on. This extension overrides this and makes the app execute actions inside a given OpenVZ container.Installation------------.. code-block:: bash$ pip install sloth-ci.ext.openvz_execUsage-----.. code-block:: yaml:caption: openvz_exec.ymlextensions:run_in_openvz:# Use the sloth_ci.ext.openvz_exec module.module: openvz_exec# Container name.container_name: foo# Container ID.# container_id: 123If ``container_name`` is provided, ``container_id`` is ignored. If ``container_name`` is *not* provided, ``container_id`` is mandatory.
Package: sloth-ci.ext.robots_txt
Robots.txt for the Sloth CI server.`Robots.txt <https://en.wikipedia.org/wiki/Robots_exclusion_standard>`__ is a file you put on your server to protect certain URLs from being accessed by crawler bots.By default,tThis extension serves *robots.txt* on the server root, e.g. http://example.com:8080/robots.txt. However, you can specify your own file to serve and the URL to serve it on.Installation------------.. code-block:: bash$ pip install sloth-ci.ext.robots_txtUsage-----.. code-block:: yaml:caption: sloth.ymlextensions:robots_txt:# Use the sloth_ci.ext.robots_txt module.module: robots_txt# Absolute path to the custom robots.txt file.# If not given, the bundled one is used (disallows everything to everyone).# file: ~/robots.txt# URL path to robots.txt.# By default the file is available in the root: *http://example.com:8080/robots.txt*.# path: /static/robots.txt
Package: sloth-ci.ext.shields_io
Status build badges for Sloth CI apps, powered by http://shields.io.Installation------------.. code-block:: bash$ pip install sloth-ci.ext.shields_ioUsage-----#.  Enable the extension in the server config:.. code-block:: yaml:caption: sloth.yml for Shields.ioextensions:shields:# Use the module sloth_ci.ext.shields_io.module: shields_io# Badge label. You can use the ``{app}`` and ``{timestamp}`` placeholders for app name and build timestamp.# label: "My Sloth CI Status for {app}" # default is ``Sloth CI: {app}``# Badge status. You can use ``{status}``, ``{app}``, and ``{timestamp}`` placeholders build status, app name, and build timestamp# status: "{status}" # default is ``{status}, {timestamp}``# Badge style: ``plastic``, ``flat``, ``flat-square``, or ``social``# style: social # default is ``flat``# Badge format: svg, png, jpg, or gif# format: png # default is svg# Color map for build statuses# colors:#    INFO: green # default is ``brightgreen``#    WARNING: yellowgreen # default is ``yellow``#    ERROR: orange # default is ``red``...All params are optional.#.  Use the URL http://host:port/app?action=shield to get your badge.You can customize the badge on the fly by passing ``label``, ``style``, and ``format`` query params:-   http://host:port/app?action=shield&label=Build%20for%20{app}-   http://host:port/app?action=shield&style=social-   http://host:port/app?action=shield&format=png
Package: sloth-ci.ext.ssh_exec
Run actions on remote machines over SSH.By default, Sloth CI apps run actions in a subprocess on the same machine they're running on. This extension overrides this and makes the app execute actions on remote machines over SSH.You can authenticate with login and password or by providing key files.Installation------------.. code-block:: bash$ pip install sloth-ci.ext.ssh_execUsage-----.. code-block:: yaml:caption: ssh_exec.ymlextensions:run_over_ssh:# Use the sloth_ci.ext.ssh_exec module.module: ssh_exec# Hosts, comma-delimited. Optional port number can be provided after ':' (if not specified, 22 is used).hosts:- ssh.example.com- myserver.com:23# Username to use for authentication.username: admin# Password to use for authentication or to unlock a private key.# password: foobar# Additional private key files. If not specified, only the keys from the default location are loaded (i.e. ~/.ssh).# keys:#   - ~/my_ssh_keys/key_rsa#   - somekey
Package: sloth-ci.ext.webhooks
Send POST requests on build events in Sloth CI apps.Executing actions of an app is called *build*. A build is considered *completed* if all its actions were completed. If some actions were completed and some failed, it's a *partially completed*; if all actions fail, the build *failed*.This extension sends POST requests when your builds complete (fully or partially) or fail; just pick the desired notification level and the target URL.Installation------------.. code-block:: bash$ pip install sloth-ci.ext.webhooksUsage-----.. code-block:: yaml:caption: webhooks.ymlextensions:webhooks:# Use the module sloth_ci.ext.webhooks.module: webhooks# Log level (number or valid Python logging level name).# ERROR includes only build fails, WARNING adds partial completions,# INFO adds completion, and DEBUG adds trigger notifications.# Default is WARNING.level: INFO# URL to send the requests to.url: http://example.com
Package: sloth-ci-val-github
GitHub Validator for Sloth CIInstallation$ pip install sloth-ci-val-githubUsageprovider:
    github:
        # Repository owner. Mandatory parameter.
        owner: moigagoo

        # Repository title as it appears in the URL, i.e. slug.
        # Mandatory parameter.
        repo: sloth-ci

        # Only pushes to these branches will initiate a build.
        # Skip this parameter to allow all branches to fire builds.
        branches:
            - master
            - staging
Package: sloth-ci.validators.bitbucket
Sloth CI validator forBitbucketpush events.Installation$pipinstallsloth-ci.validators.bitbucketUsageprovider:bitbucket:# Repository owner. Mandatory parameter.owner:moigagoo# Repository title as it appears in the URL, i.e. slug.# Mandatory parameter.repo:sloth-ci# Only pushes to these branches will initiate a build.# Skip this parameter to allow all branches to fire builds.branches:-master-staging
Package: sloth-ci.validators.github
Sloth CI validator forGitHubpush events.Installation$pipinstallsloth-ci.validators.githubUsageprovider:github:# Repository owner. Mandatory parameter.owner:moigagoo# Repository title as it appears in the URL, i.e. slug.# Mandatory parameter.repo:sloth-ci# Only pushes to these branches will initiate a build.# Skip this parameter to allow all branches to fire builds.branches:-master-staging
Package: sloth-ci.validators.gitlab
Sloth CI validator forGitLabpush events.Installation$pipinstallsloth-ci.validators.gitlabUsageprovider:gitlab:# Whitelisted GitLab server IPs.# Mandatory parameter.trusted_ips:-123.45.67.89-111.22.33.44# Repository title as it appears in the URL, i.e. slug.# Mandatory parameter.repo:sloth-ci# Only pushes to these branches will initiate a build.# Skip this parameter to allow all branches to fire builds.branches:-master-staging
Package: sloth-cli
sloth-cliA library to speed the profile (cProfile) analyses of code performance on a per
line basis. This library allow the user to call a python script file with
arguments and analyse what lines of code are taking longer to process.An example output of thesloth-cli:SatJun811:56:402019profileOutput.profile5400functioncalls(5340primitivecalls)in3.017secondsOrderedby:cumulativetimeListreducedfrom352to100duetorestriction<100>ncallstottimepercallcumtimepercallfilename:lineno(function)4/10.0000.0003.0173.017{built-inmethodbuiltins.exec}10.0000.0003.0173.017tester.py:1(<module>)10.0000.0003.0143.014tester.py:21(run)33.0121.0043.0121.004{built-inmethodtime.sleep}Installpip install sloth-cliDecorator UsageThesloth.profileallows you to gather the profile data by adding it as
a decorator. The decorator can be enabled or disabled whenever needed. It
can also be turned on by setting the environment variableSLOTH_PROFILEtoTrue(SLOTH_PROFILE='True') so you can set add it to your code and
leave it; then just turn it on when you need to validate the code performance.To use the decorator do the followingimporttimefromsloth_cliimportprofiledef_loop_sleep():"""Loops and sleeps"""foriinrange(3):print(i)time.sleep(1)def_loop():"""Loops 1000 times"""ints=[]foriinrange(1000):ints.append(i)@profile(enable=True,lines=50,builtins=False)defrun():"""Run loops"""_loop()_loop()_loop_sleep()if__name__=='__main__':run()10functioncallsin3.006secondsOrderedby:cumulativetimencallstottimepercallcumtimepercallfilename:lineno(function)10.0000.0003.0063.006test_profiler.py:20(run)13.0053.0053.0053.005test_profiler.py:6(_loop_sleep)60.0000.0000.0000.000capture.py:413(write)20.0000.0000.0000.000test_profiler.py:13(_loop)CLI UsageUsing atester.pycli script (argsparse):To runtester.pywith arguments:sloth-ftester.py--cmdfake--fake-argtestTo get thetester.pyhelp:sloth-ftester.py-l100--cmd--help
Package: sloth-paste
SlothA simple file content sharing app.Installation$pipinstallsloth-pasteUsage$sloth-h
usage:sloth[-h][-pPOSTER][--syntaxSYNTAX][--exp{day,week,year}][-u]file[file...]Codesharingappforlazypeople.

positionalarguments:fileFiletosharecontent

optionalarguments:-h,--helpshowthishelpmessageandexit-pPOSTER,--posterPOSTERAuthorname--syntaxSYNTAXDesiredsyntax(py,js,cpp...)--exp{day,week,year}Expirationtime-u,--update-dbUpdatesuportedlangsfrompaste.ubuntu.comslothsetup.pytest.py-pbufgix[i]2filesentered...[i]Poster:bufgix...==============================[i]File:setup.py[i]Detectedlanguagepython3[+]Pastelink:https://paste.ubuntu.com/p/4Jm6gVNbQ4/==============================[i]File:test.py[i]Detectedlanguagepython3[+]Pastelink:https://paste.ubuntu.com/p/JV4yPXMDc6/==============================Copiedlastlink:https://paste.ubuntu.com/p/JV4yPXMDc6/LICENSEMIT
Package: slothpy
SlothPy is a comprehensive package for computational molecular magnetism.Website:your-websiteDocumentation:link-to-docsE-mail the author:your-mailing-listPyPI:PyPI RepositorySource code:GitHubBug reports:GitHub IssuesRequestsGitHub Pull RequestsSlothPySlothPy aims to become a comprehensive software package for computational molecular magnetism. It is designed to provide flexible, interactive computing environment for researchers in the field.FeaturesInteractive scripting via Jupyter Notebooks or terminal.Customizable workflows with JIT compilation and parallelism for performance.Extensible to integrate with MOLCAS, ORCA, and other chemistry software.Visual tools for data analysis and interpretation.InstallationpipinstallslothpyFor detailed installation instructions, please refer to theInstallation Guide.UsageStart with importing SlothPy:importslothpyassltand see yourHow to Startfor various tutorials.DocumentationFor comprehensive guides and tutorials, visit ourdocumentation.How to CiteIf you use SlothPy in your research, please cite it as follows:Authors. (Year). "Title of the Paper." Journal Name, Volume(Issue), pages. DOI: DOI NumberContributingWe welcome contributions in the form of issue reports, pull requests and suggestions send directly via e-mail. Please see ourAbout section.LicenseSlothPy is distributed under the GPL-3.0 license. See the LICENSE file for more information.ContactFor questions and feedback, please contactmikolaj.zychowicz@uj.edu.pl.
Package: sloth-speedtest
slothThepython speedtesting library and command line toolslothis a Python package for speedtesting python code and functions with as little code as necessary.
It's easy to use and, unlike many projects, has decent documentation.The idea behind this API is:>>>fromslothimportcompare_sloth>>>importtimeit>>>compare_sloth(timeit)'sloth is loads better than timeit!'See? described in 3 lines.Everythingthattimeitcan do,slothcan do better - or will soon. Andalotof thingstimeitcan'tdoslothcan do anyway.A Quick Example>>>fromsloth.simpleimporttime_callable>>>importtime>>>defmy_func(a,b,c):...time.sleep(1)...print(a,b,c)>>>time_callable(my_func,2,'a','b','c')abc1.000063419342041InstallationYou can install sloth with pip:pip install sloth-speedtestPlease see the docs for more info.LinksPyPIDocumentationNote that this library is unrelated and mutually exclusive to
the one athttps://sloth.readthedocs.io
Package: slotmachine
python-slotsSimple, expandable, customizable slot machinepip install slotmachineimportslotmachineslotM=slotmachine.SlotMachine()print(slotM())# [['!!!', 'BAR', '(M)']]slotM=slotmachine.SlotMachine(size=(5,1))print(slotM())# [['(H)', '(N)', '!!!', '!!!', '(H)']]slotM=slotmachine.SlotMachine(jack='BTC',bonus='LTC',size=(5,3))print(slotM())# [#   ['(Z)', '(O)', '(X)', '(M)', '(Z)'],#   ['(O)', '(Z)', '(H)', 'LTC', 'BTC'],#   ['(H)', 'LTC', '(O)', '(M)', '(Z)']# ]print(slotM.reel)# ['BTC', '(Z)', '(O)', '(H)', '(X)', '(W)', '(N)', '(M)', 'LTC', '(M)', '(N)', '(W)', '(X)', '(H)', '(O)', '(Z)', 'LTC', '(Z)', '(O)', '(H)', '(X)', '(W)', '(N)', '(M)', 'LTC', '(M)', '(N)', '(W)', '(X)', '(H)', '(O)', '(Z)', 'LTC', '(Z)', '(O)', '(H)', '(X)', '(W)', '(N)', '(M)', 'LTC', '(M)', '(N)', '(W)', '(X)', '(H)', '(O)', '(Z)']slotM=slotmachine.SlotMachine(size=(5,1))r=slotM()print(r)# [['(X)', '(W)', '(M)', '!!!', '(N)']]print(slotM.checkLine(r[0]))# Falser=slotM()print(r)# [['BAR', 'BAR', 'BAR', 'BAR', 'BAR']]print(slotM.checkLine(r[0]))# 'jackpot'
Package: slot-machine-serializers
Slot MachineHave you ever found yourself unclear over which configuration to choose?Don't choose.Randomize.Withslot_machineyou can now sample any configuration.Can't settle on a background color? Randomize...Looking for a reasonable model parameter? Randomize...Don't know what to eat on Sunday? Randomize...Withslot_machineyour next choice will be one you look forward to.ExamplesSimply add your favorite samplers to the configuration:chicken_nuggets:!SampleRange5..20price:!SampleUniform9.99..20Specify your dataclass and get rolling:fromdataclassesimportdataclassfromslot_machineimportSlotsSerializer@dataclass(slots=True)classBasket(SlotsSerializer):chicken_nuggets:intprice:floatyaml_file="""basket:chicken_nuggets: !SampleRange 5..10price: !SampleUniform 9.99..20"""surprise_basket=Basket.from_yaml(yaml_file)Build your ownfromdataclassesimportdataclassfromslot_machineimportSlotsSerializer,MappingSampler@dataclass(slots=True)classBasket(SlotsSerializer):chicken_nuggets:intsplits:list[int]classSampleSplits(MappingSampler):@classmethoddefget_sample(cls,n_splits:str,values:str):n_splits=int(n_splits)values=list(map(int,values.split("..")))returnsorted([random.randint(*values)for_inrange(n_splits)])yaml_file="""basket:chicken_nuggets: 100splits: !SampleSplitsn_splits: 3values: 0..100"""surprise_basket=Basket.from_yaml(yaml_file)
Package: slotplanner
Aboutslotplanner is a web app to manage a barcamp slot plan.It serves a similar purpose toPentabarforfrab, but is much more
lightweight and easier to set up and administrate. It is aimed at
BarCamps with a comparatively small amount of contributions, i.e. some
dozens.PrerequisitesPythonhttps://www.python.org/CherryPyhttps://cherrypy.org/DocumentationTo read the API documentation, open a shell / DOS window, navigate to
the slotplanner directory, and runpydoc slotplannerYou can create a HTML version usingpydoc -w slotplannerLicenseslotplanner is licensed under the GPL. See the file COPYING for details.AuthorFlorian Berger
Package: slotscheck
Adding__slots__to a class in Python is a great way to improve performance.
But to work properly, all base classes need to implement it — without overlap!
It’s easy to get wrong, and what’s worse: there is nothing warning you that you messed up.✨Until now!✨slotscheckhelps you validate your slots are working properly.
You can even use it to enforce the use of slots across (parts of) your codebase.See myblog postfor the origin story behindslotscheck.QuickstartUsage is quick from the command line:python-mslotscheck[FILES]...# orslotscheck-m[MODULES]...For example:$slotscheck-msanicERROR:'sanic.app:Sanic'definesoverlappingslots.ERROR:'sanic.response:HTTPResponse'hasslotsbutsuperclassdoesnot.Ohno,foundsomeproblems!Scanned72module(s),111class(es).Now get to fixing —
and addslotscheckto your CI pipeline orpre-committo prevent mistakes from creeping in again!
Seehereandherefor examples.FeaturesDetect broken slots inheritanceDetect overlapping slotsDetect duplicate slotsPre-commithook(Optionally) enforce the use of slotsSeethe documentationfor more details
and configuration options.Why not a flake8 plugin?Flake8 plugins need to work without running the code.
Many libraries use conditional imports, star imports, re-exports,
and define slots with decorators or metaclasses.
This all but requires running the code to determine the slots and class tree.There’san issueto discuss the matter.Notesslotscheckwill try to import all submodules of the given package.
If there are scripts withoutif __name__ == "__main__":blocks,
they may be executed.Even in the case that slots are not inherited properly,
there may still be an advantage to using them
(i.e. attribute access speed andsomememory savings).
However, in most cases this is unintentional.slotscheckallows you to ignore specific cases.InstallationIt’s available on PyPI.pipinstallslotscheck