Saravanan666/pypi-org huggingface dataset:
Package: cool-testing
Cool-Testing-TimingCool Testing - timing. Cool testing lib is an set of tools for developers which would help them with building metrics for software develop.CT Timing Decorator :stopwatch:Enhance your Python applications with precise function execution timing! The CT Timing Decorator is a Python library designed to make performance monitoring a breeze. Wrap any function to log its execution time, improving debugging and optimization without the hassle of manual timing code.:sparkles: FeaturesEasy Integration - Just a decorator away from timing any function.Automatic Logging - Logs start, end, and elapsed time with beautiful formatting.Zero Dependency - Utilizes only Python's standard library.:arrow_down: Install:package: PyPIpipinstallct-timing:computer: Install Locally (From GitHub)For those who prefer the bleeding-edge version or want to contribute to the development, you can install the library directly from GitHub:Clone the Repository:gitclonehttps://github.com/Kotmin/Cool-Testing-Timing.gitcdct-timingInstall Using Pip:pipinstall.This approach installs the library from the source code, ensuring you have the latest changes or can work on developing new features or fixes.:star: Live StatsSection under construction:rocket: Quick StartTo use the CT Timing Decorator, import the timing decorator from the ct.timing package and apply it to any function:fromct.timingimporttiming@timingdefmy_function():# Your function logic herepassRun your decorated function as usual and observe detailed timing logs automatically!:mag: OverviewWhy choose CT Timing Decorator over traditional time.start() and time.end() approaches? Simplicity and efficiency. Our decorator abstracts away the boilerplate timing code, allowing you to focus on what matters: your application logic. Additionally, it provides consistent, formatted output that is both human-readable and easy to parse programmatically.:heavy_check_mark: Benefits over Manual TimingNo More Boilerplate: Forget about starting and stopping timers manually.Automatic Logging: Get formatted, easy-to-read logs without extra code.Consistency: Uniform timing and logging logic across all your functions.:wrench: Additional SettingsCT Timing Decorator comes with a few knobs to tweak:Custom Logging Function: Override the default logger to integrate with your application's logging system.
Time Format Customization: Change how the elapsed time is displayed to suit your needs.fromct.timingimporttiming,set_custom_logger,set_time_format# Set a custom loggerset_custom_logger(my_custom_logger)# Customize the time formatset_time_format("%H:%M:%S")For more advanced usage and contributions, please refer to our GitHub repository.:heart: SupportFound a bug? Have an idea for improvement? Contributions are welcome! Please open an issue or submit a pull request.
Package: cool-trading
# cool_trading#### 介绍
个人 量化 架构#### 软件架构
软件架构说明spider —> 各个交易所行情数据抓取strategy 策略运行#### 安装教程xxxxxxxxxxxx#### 使用说明xxxxxxxxxxxx#### 参与贡献Fork 本仓库新建 Feat_xxx 分支提交代码新建 Pull Request#### 码云特技使用 Readme_XXX.md 来支持不同的语言，例如 Readme_en.md, Readme_zh.md码云官方博客 [blog.gitee.com](https://blog.gitee.com)你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目[GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目，是码云综合评定出的优秀开源项目码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
Package: cool-tree
Cool-treeOfficial SDK for managingSuite PlatformCool-tree can both be used from thecommand lineand as apython library.Main functions are:Manage projectsManage DatasManage LabelsInstallation$ pip install -i https://test.pypi.org/simple/ cool-tree$gitclonehttps://github.com/Superb-AI-Suite/cool-tree
$cdcool-tree
$pythonsetup.py
$spb--version0.0.1Client AuthnticationTo perform remote operations on Suite you first need to authenticate.
This requires a [Account-specific API-key].To start the authentication process:$ vim ~/.spb/credentials
[YOUR_PROFILE_NAME(Default : default)]
access_key=YOUT_ACCESS_KEY
account_name = YOUR_ACCOUNT_NAMEYou can also directly use Access key and Account name to SDK. (Check, how to use)How to useFirst. you need to authenticate and get client from SDK# Use default profile in credentials
spb.client()

# Use other profile in credentials
spb.client(profile='OTHER_PROFILE_NAME')

# and also you can directly use account_name and access_key
spb.client(account_name='YOUR_ACCOUNT_NAME', access_key='YOUR_ACCESS_KEY')Now, you can use Suite SDK in your projectExample #1 - Describe Projectimport spb
from spb.command import Command
from spb.models import Project

def describe_project():
    spb.client()
    command = Command(type='describe_project')
    projects = spb.run(command=command)

if __name__ == "__main__":
    describe_project()In this case, you can be seen Project list in your account
Package: cool-utils
DocumentationThis is Cool Utility tools that you can use in python. There are a few
tools that you might find very useful, you can use this on pretty much
any project and some utils might help you a lot and save so much time
since it’s a simple function. We hope you like our utils. Have a nice
day!BadgesInstallationPyPi InstallationWindows:$pipinstall-Ucool-utilsLinux/MacOS:$python3-mpipinstall-Ucool-utilsDevelopment InstallationWindows:$pipinstallgit+https://github.com/Senarc-Studios/Cool-UtilsLinux/MacOS:$python3-mpipinstall-Ugit+https://github.com/Senarc-Studios/Cool-UtilsExamplesCompile:fromcool_utilsimportCompilestrings=["This","Is","A","String"]num_list=[9,4,2]print(Compile.string(strings,startswith="Hey, ",endswith=".",joints=" "))print(Compile.numbers(num_list,startswith=6,endswith=0))>>Hey,ThisIsAString.>>69420JSON:importcool_utilsjson=cool_utils.JSON.open("sample")json.register_value(variable="foo",value="bar")# This creates a JSON file.data=json.get_data(variable="foo")invalid_data=json.get_data("non-existant value")# You can do this instead of doing the variable's name.print(data)print(invalid_data)>>bar>>NoneGlobalJSON:importcool_utilscool_utils.GlobalJSON.open("sample")cool_utils.GlobalJSON.register_value(variable="foo",value="bar")data=cool_utils.GlobalJSON.get_data(variable="foo")invalid_data=cool_utils.GlobalJSON.get_data("non-existant value")print(data)print(invalid_data)>>bar>>NoneCollaboratorsThis wouldn’t be made possible without these peopleBenitzCodingJDJG Inc. OfficialP3terProguy
Package: coolwait
Example1fromcoolwaitimportpelangipelangi("Please wait...",delay=5,tab=2)print("hello world")Example2importcoolwaitfromthreadingimportThreadfromcoolwaitimportpelangit=Thread(target=pelangi,args=("LOADING...",delay=None,tab=2))t.start()defdo_something():importrequestsreq=requests.get("https://google.com")coolwait.stop=Truereturnreq.textrun=do_something()t.join()print(run)
Package: coomm
Control Oriented Octopus Muscle Model (COOMM)Project DescriptionControl Oriented Muscle Model for an octopus arm. The package extend the implementation of Cosserat Rod simulation done byPyElastica.InstallThe package can be installed using standard python package installer (pip):pipinstallcoommor from source code:cd<repositorydirectory>
gitclonehttps://github.com/hanson-hschang/COOMM
pipinstall-eCOOMMExamplesNote, all the example cases written uses the original version of COOMM (v.0.0.1), with older version of PyElastica (v.0.2.2). If you are interested in reproducing the result from the paper, please match the version.CitationWe ask that any publications which use COOMM cite as following:@article{chang2022energy,
  title={Energy Shaping Control of a Muscular Octopus Arm Moving in Three Dimensions},
  author={Chang, Heng-Sheng and Halder, Udit and Shih, Chia-Hsien and Naughton, Noel and Gazzola, Mattia and Mehta, Prashant G},
  journal={arXiv preprint arXiv:2209.04089},
  year={2022}
}Original implementation for the paper is inversion 0.0.1.ReferencesGazzola, Dudte, McCormick, Mahadevan,Forward and inverse problems in the mechanics of soft filaments, Royal Society Open Science, 2018. doi:10.1098/rsos.171628List of publications and submissionsA physics-informed , vision-based method to reconstruct all deformation modes in slender bodies(UIUC 2021) (IEEE ICRA 2022)codeRelated WorksPyElastica:https://github.com/GazzolaLab/PyElastica
Package: coons-cli
COONS-CLIA command line tools to interact with a coons instance.InstallationUsing PIPpipinstallcoons-cliConfigurationYou can set your generated personal token in a environment variableCOONS_TOKEN.CommandsOnce thecoons-clipackage is installed you can runcoons --helpcommand.GetUsageUsage:coonsget[OPTIONS]SIZEGetaflatlistofobjectfromacoonsinstance.

Options:-q,--queryTEXT--helpShowthismessageandexit.AddUsageUsage:coonsadd[OPTIONS]INPUTCreateobjectformatextfile.

Options:--helpShowthismessageandexit.Input fileThe input file is an ascii(text) file of the form:Informatic:interest
    development -> Coons:project
        realisation -> coons:web service
            dependency -> invenio:software
            dependency -> flask:software
        realisation -> coons-ui:software
            dependency -> angular:software
        realisation -> coons-cli:software
            dependency -> poetry:software
    skills -> python:language
        example -> misc:snippet
        documentation -> python:web page
    skills -> typescript:languageEach line is an object of the formname:type. Thepredicate -> name:typerepresents a link.A sample of file can be foundhere.DeleteUsageUsage:coonsdelete[OPTIONS]QUERYDeleteobjectfromaquery,confirmationisrequired.

Options:--helpShowthismessageandexit.
Package: coop
This is a base to build all Neon Jungle sites off.
This package contains all the common code shared
between sites, with the ideal Neon Jungle site containing only
model definitions, templates, and front end assets.Making a releaseUpgrade the version incoop/_version.py.
Coops version stays in step with Wagtail. i.e. Coop 2.4.x uses Wagtail 2.4.x.
Point releases are used to add features during a Wagtail version lifespan.Update the CHANGELOG. Please.Tag your release:After your branch has been merged to master, checkout master locally, pull remote master and$gittag"x.y.z"$gitpush--tagsAnd you are done! Gitlab is set up to automatically push the new package to pypi when a tag is pushed.Local devCreate a virtual environment, activate and install the requirements:$python3-mvenvvenv$sourcevenv/bin/activate$pipinstall.First time you should run migrations and setup a superuser:$./manage.pymigrate$./manage.pycreatesuperuserYou can run and debug the project locally using./manage.py runserver, or included is a launch.json for vscode to debug using the debugger.
Package: coopapi
coopapipackage for setting up a quick API built on the FastAPI frameworkexampleSetup a dummy pydantic dataclass that has some attributesfrom pydantic.dataclasses import dataclass as pydandataclass, Field
from cooptools.randoms import a_string, a_phrase

class DummySchemaConfig:
    allow_population_by_field_name = True
    schema_extra = {
        "example": {
            'id': a_string(10),
            'desc': a_phrase(10),
            'active': True,
        }
    }

@pydandataclass(config=DummySchemaConfig)
class DummySchema:
    id: str = Field(...)
    desc: str = Field(...)
    active: bool = Field(...)Using the dummySchema pydantic dataclass, stubb in some callbacks and create the api shell object. This will be used to setup the core funcationality of our API. Create a FastAPI() object that is used to host our router.Note: multiple routers (shells) can be added to the same FastAPI() object such that you can build out an extensive API.Finally, serve the app...from examples.dummySchema import DummySchema
from coopapi import createRequestCallback, ApiShell, deleteRequestCallback
import uvicorn
from fastapi import FastAPI

# create the callbacks for what should be done when the various endpoints are called. This is likely a
# db interaction or a forwarding request.
create_callback: createRequestCallback = lambda r, t: t
delete_callback: deleteRequestCallback = lambda r, t: True

# setup the api itself, use a base FastAPI object and then an api_shell which has its router included in the
# base api
app = FastAPI()
api_shell = ApiShell(target_schema=DummySchema,
                     base_route='/dummy',
                     on_create_callback=create_callback,
                     on_delete_callback=delete_callback)
app.include_router(api_shell.router, tags=["dummy_shell"])


# serve the app
uvicorn.run(app, port=1219)You can visit the docs site of the created api athttp://localhost:1219/docs#/
Package: coop-bar
coop-bar, configurable toolbar===============================================* `What is coop_bar good for?`_* `Quick start`_.. _What is coop_bar good for?: #good-for.. _Quick start?: #quick-start.. _good-for:.. figure::  https://raw.github.com/quinode/coop-bar/master/docs/coop_bar.png:align:   leftWhat is coop_bar good for?------------------------------------django-coop is a set of several apps for building cooperative websites. It is based on Django.Thses apps may need a to display an admin toolbar. For example, the CMS component may use this barto display edit, cancel and save links.coop_bar tries to provide a simple and configurable mechanism.. _quick-start:Quick start------------------------------------In settings.py, add 'coop_bar' (with an underscore) to the INSTALLED_APPSUnder Django 1.3, the static folder should be found automatically, as the templates folderIn urls.py add (r'^coop_bar/', include('coop_bar.urls')) to your urlpatternsFor each app needing to add links to coop_bar, create a coop_bar_cfg.py fileIn this file, add a load_commands function as follows ::from django.core.urlresolvers import reversefrom django.utils.translation import ugettext as _def django_admin_command(request, context):if request and request.user.is_staff: #request might be Nonereturn u'<a href="{0}">{1}</a>'.format(reverse("admin:index"), _('Admin'))def load_commands(coop_bar):coop_bar.register_command(django_admin_command)In load_commands, you can register as much callback functions as you want. A callback (django_admin_command in the previous example)is just a function with request and context as args. It returns some html code to display in the bar or None.In your base.html, add the following template tags::{% load coop_bar_tags %}<html><head>...{% coop_bar_headers %}</head><body>{% coop_bar %}...your page...{% coop_bar_footer %}</body>Humanized Messages------------------------------------.. figure::  https://raw.github.com/quinode/coop-bar/master/docs/humanmsg.png:align:   centerCoop-bar takes also care of providing a nice display of django session messages.It's based on the `Humanized Message idea <http://code.google.com/p/humanmsg/>`_ , which displays a big fat sentence in the middle of the screen and fades away as soon as you move your mouse, or five seconds later.You can add a Message log at the bottom of the web page by adding this to your django settings file::DISPLAY_MESSAGES_LOG = TrueLicense=======`Fugue icon set <http://p.yusukekamiyamane.com/>`_  by Yusuke Kamiyamane. All rights reserved. Licensed under a Creative Commons Attribution 3.0 License.coop-bar itself uses the same license as Django (BSD).coop-bar development was funded by `CREDIS <http://credis.org/>`_, FSE (European Social Fund) and Conseil Regional d'Auvergne.
Package: coopdigital-jsonschema
jsonschemajsonschemais an implementation ofJSON Schemafor Python (supporting 2.7+ including Python 3).>>>fromjsonschemaimportvalidate>>># A sample schema, like what we'd get from json.load()>>>schema={..."type":"object",..."properties":{..."price":{"type":"number"},..."name":{"type":"string"},...},...}>>># If no exception is raised by validate(), the instance is valid.>>>validate({"name":"Eggs","price":34.99},schema)>>>validate(...{"name":"Eggs","price":"Invalid"},schema...)# doctest: +IGNORE_EXCEPTION_DETAILTraceback(mostrecentcalllast):...ValidationError:'Invalid'isnotoftype'number'It can also be used from console:$jsonschema-isample.jsonsample.schemaFeaturesFull support forDraft 3andDraft 4of the schema.Lazy validationthat can iteratively reportallvalidation errors.Small and extensibleProgrammatic queryingof which properties or items failed validation.Release NotesVersion 2.5.0 is mainly a performance release. The interface forRefResolverwas extended to add methods that improve performance on CPython.Support for customRefResolverobjects with the legacy interface shouldnotbe affected. If you notice something amiss please file an issue ticket.Running the Test SuiteIf you havetoxinstalled (perhaps viapip install toxor your
package manager), running``tox`` in the directory of your source checkout will
runjsonschema’s test suite on all of the versions of Pythonjsonschemasupports. Note that you’ll need to have all of those versions installed in
order to run the tests on each of them, otherwisetoxwill skip (and fail)
the tests on that version.Of course you’re also free to just run the tests on a single version with your
favorite test runner. The tests live in thejsonschema.testspackage.CommunityThere’s amailing listfor this implementation on Google Groups.Please join, and feel free to send questions there.ContributingI’m Julian Berman.jsonschemais onGitHub.Get in touch, via GitHub or otherwise, if you’ve got something to contribute,
it’d be most welcome!You can also generally find me on Freenode (nick:tos9) in various
channels, including#python.If you feel overwhelmingly grateful, you can woo me with beer money onGittipor via Google Wallet with the email
in my GitHub profile.
Package: cooperate
cooperateis a shell command that execute commands in a cooperative manner, by distributing them to many nodes.It requires Python >= 3.3 and asyncio.For example:cooperate --local -- echo FOOWill execute the job “echo FOO” locally.This one:cooperate --ssh me@my.node -- echo FOOIs barelly equivalent to:ssh me@my.node echo FOOYou can declare as many nodes as you want. For example:cooperate --local --ssh me@my.node --ssh me@my.second.node -- echo FOOIs equivalent to:echo FOO
ssh me@my.node echo FOO
ssh me@my.second.node echo FOOYou can also declare many jobs at once. For example:cooperate --local --command "echo FOO" --command "echo BAR"Is equivalent to:echo FOO
echo BARInstallationpip install cooperateNodesCommands can be distribued thru these kind of nodes:–localexecute locally–sshexecute thru ssh–dockerexecute in a local docker container–lxcexecute in a local lxc containerThese options can be repeated as often as needed.ModesBy default, it spawns every commands to every nodes.The-m,–modeallow to configure the desired mode.Theallmode executes all commands in all nodes:cooperate --local --ssh me@my.node --ssh me@my.second.node \
    --command="echo FOO" --command="echo BAR"Is equivalent to:echo FOO
echo BAR
ssh me@my.second.node echo FOO
ssh me@my.second.node echo BARThedistributemode share the commands out among all the nodes:cooperate --local --ssh me@my.node --ssh me@my.second.node \
    --command="echo FOO" --command="echo BAR" --mode=distributeIs equivalent to:echo FOO
ssh me@my.second.node echo BARConcurrencyBy default, it executes all jobs simultaneously.The-b,–batchoption allows to execute on only a specify number of jobs at a time. Both percentages and finite numbers are supported:cooperate --local --concurrence 1 \
    --command="echo FOO" --command="echo BAR" --command="echo BAZ"

cooperate --local --concurrence 33% \
    --command="echo FOO" --command="echo BAR" --command="echo BAZ"The concurrency system maintains a window of running jobs. When a job returns then it starts a remnant job and so on.
Package: cooperative
CooperativeWrite non-blocking computationally expensive code to go along with non-blocking io, without
having to think about everything in callbacks.batch_accumulatewill iterate over a generator in batches, yielding to other iterators
passed intotwisted.internet.task.cooperateExample#!/usr/bin/env python
# _*_ coding: utf-8 _*_
from operator import add

import sys
from twisted.internet import defer
from twisted.internet.task import react
from twisted.python import log

from cooperative import batch_accumulate


def expensive(number):
    log.msg("starting {}".format(number))
    for value in range(100000):
        if 25000 == value:
            log.msg("1/4 for {}".format(number))
        if 50000 == value:
            log.msg("1/2 for {}".format(number))
        if 75000 == value:
            log.msg("3/4 for {}".format(number))
        yield number * value / 3.0


@defer.inlineCallbacks
def do_some_expensive_things(number):
    """
    Perform one expensive computation cooperatively with any
     other iterator passed into twisted's cooperate, then
     use it's result to pass into the second computation.

    :param number:
    :return:
    """
    result = yield batch_accumulate(1000, expensive(number))
    total = reduce(add, result, 0)
    log.msg("first for {}: {}".format(number, total))

    result = yield batch_accumulate(1000, expensive(int(total/1e9)))
    total = reduce(add, result, 0)
    log.msg("second for {}: {}".format(number, total))
    defer.returnValue(total)


def main(reactor):
    d1 = do_some_expensive_things(54.0)
    d2 = do_some_expensive_things(42)
    d3 = do_some_expensive_things(10)
    d4 = do_some_expensive_things(34)

    # Enqueue events to simulate handling external events
    d5 = defer.Deferred().addCallback(log.msg)
    reactor.callLater(0.3, d5.callback, "########## simulated request 1 ############")

    d6 = defer.Deferred().addCallback(log.msg)
    reactor.callLater(0.5, d6.callback, "########## sim request 2 ############")

    d7 = defer.Deferred().addCallback(log.msg)
    reactor.callLater(1.0, d7.callback, "########## simulated request 3 ############")

    return defer.gatherResults([d1, d2, d3, d4, d5, d6, d7]).addCallback(log.msg)

if __name__ == "__main__":
    log.startLogging(sys.stdout)
    react(main, [])DocumentationRead the docs:http://cooperative.readthedocs.org/en/latest/Contributing:Submit any issues or questions here:https://github.com/johnwlockwood/cooperative/issues.Make pull requests todevelopmentbranch ofhttps://github.com/johnwlockwood/cooperative.Documentationis written in reStructuredText and currently uses theSphinx style for field
listshttp://sphinx-doc.org/domains.html#info-field-listsCheck out closed pull requests to see the flow of development, as almost
every change to master is done via a pull request onGitHub. Code Reviews
are welcome, even on merged Pull Requests. Feel free to ask questions about
the code.
Package: coopgame
coopgameLibrary of tooling and templates used for building gamesExample:from coopgame.gameTemplate import GameTemplate
from coopstructs.vectors import Vector2
import pygame
from coopgame.colors import Color
from coopgame.sprites import RectangleSprite

class MyGame(GameTemplate):
    def __init__(self):
        super().__init__()

        self.sprites = pygame.sprite.Group()

    def draw(self, frames):
        for entity in self.sprites:
            self.screen.blit(entity.surf, entity.rect)

    def handle_hover_over(self, mouse_pos_as_vector: Vector2):
        pass

    def handle_left_click(self):
        self.sprites.add(RectangleSprite(self.mouse_pos_as_vector(), Color.BLUE, 10, 10))

    def handle_right_click(self):
        self.sprites.add(RectangleSprite(self.mouse_pos_as_vector(), Color.RED, 20, 30))

    def handle_key_pressed(self, pressed_key):
        if pressed_key == pygame.K_r:
            self.sprites.empty()

if __name__ == "__main__":
    import logging
    import loggingConfig

    loggingConfig.initLogging(loggingLvl=logging.DEBUG)
    game = MyGame()
    game.main()