Saravanan666/pypi-org huggingface dataset:
Package: cornflakes
pip install cornflakespip install git+https://github.com/semmjon/cornflakesWarningPlease be careful when using this Python module. Currently, it is only developed / tested by me, which is why it has a high update / change rate. I’m actually trying to be compatible with implementations, but I can’t guarantee this at the moment. The module is currently still in a beta state and is not recommended for productive use.In the near future I plan to revise the documentation / examples and write an introductory blog article, as I find implemented features and planned ideas to be quite cool and useful (and don’t see them in any other package or find them to be quite user-friendly).InformationThe Python module “cornflakes” was started as a hobby project and offers an alternative to Pydantic for managing configurations and data structures. It allows creating generic and easy to manage configurations for your project. Unlike Pydantic, which is based on inheritance, “cornflakes” uses a decorator (similar to dataclass) to map data structures.In addition to a dataclass decorator with additional functionality, there is also a config decorator. This makes it possible to read the dataclass from configuration files. This can be very useful if you want to save your application configurations to a file.The module also has a click wrapper that simplifies the implementation of command line applications. By integrating the Rich module, the application is additionally equipped with colors and other functions.There are other useful methods in the base of the module that are generally useful for Python development. These can help you develop your projects faster and more efficiently.Short Term RoadMapAdd autocompletion support for click CLI (automatically)Enrich json methodsDevelopmentPrerequisitesA compiler with C++17 supportPip 10+ or CMake >= 3.4 (or 3.8+ on Windows, which was the first version to support VS 2015)Python 3.8+gh (optional) GitHub’s official command line tooldoxygencppcheckclang-tools-extra or clang-tidy…CommandsJust clone this repository and pip install. Note the--recursiveoption which is needed for the pybind11 submodule:git clone --recursive https://gitlab.blubblub.tech/sgeist/cornflakes.gitInstall the package using makefiles:make installBuild dist using makefiles:make distRun tests (pytest) using makefiles:make testRun all tests using makefiles:make test-allRun lint using makefiles:make lintCreate dev venv:python -m venv .venv
source .venv/bin/activate
pip install ninja pre-commit poetryInstall pre-commit:pre-commit installUpdate pre-commit:pre-commit update -aRun pre-commit:pre-commit run -a
Package: cornflow-client
The aim of this repository is to have a client to use to connect to a deployed cornflow webserverRequirementspython >= 3.8Install cornflow-clientTo install the package do:python3 -m pip install cornflow-clientUse cornflow-clientTo use, first you have to import the package:from cornflow_client import CornFlowThen you have to start up the client and login or sing up:client = CornFlow(url="URL_TO_THE_WEB_SERVER")
client.sign_up(username, email, password)
client.login(username, password)And then finally you can use the cornflow webserver and start solving problems:instance_id = client.create_instance(data)
execution_id = client.create_execution(instance_id, execution_config)
status = client.get_status(execution_id)
results = client.get_results(execution_id)
Package: cornflower
CornflowerLibrary for writing RabbitMQ message handlers withpydanticvalidation.Example use:Handler callback can accept zero or one argument ofpydantic.BaseModeltype. Message body will be validated automatically against specified schema.fromcornflowerimportMessageQueue,OutputMessage,MessageDeliveryModefrompydanticimportBaseModelclassUserMessage(BaseModel):username:strmessage:strqueue=MessageQueue(url="amqp://user:password@host:port")@queue.listen(routing_key="user.registered")defhandle_user_register(message:UserMessage)->None:# do something with validated message...@queue.listen(routing_key="user.login")defhandle_user_login()->None:# callback with no arguments, handle message without# validating its body# sending messageuser_message=UserMessage(username="example",message="this is example")queue.dispatch(message=OutputMessage(body=user_message.dict(),routing_key="user.logout",delivery_mode=MessageDeliveryMode.PERSISTENT,))if__name__=="__main__":queue.run()Optional configurationfromcornflowerimportMessageQueuefromcornflower.optionsimportQueueOptions,TransportOptions,ConsumerOptionsqueue=MessageQueue(queue_options=QueueOptions(durable=True,exclusive=False,auto_delete=False,),consumer_options=ConsumerOptions(prefetch_count=10),transport_options=TransportOptions(confirm_publish=True,))
Package: cornichon
CornichonIntroductionA small Gherkin DSL parser which reads in a feature file and produces stub code
against a given test framework. This allows BDD to be integrated into new and existing
projects without the need to depend onCucumber.The generated code is split into two files - the tests themselves and a set of scenario classes.
This is to allow for:easier version control of the source codere-use of the scenario classes generation between unit test frameworks for the same languageThe parser is written in Python and loads plug-ins for the desired output type.UsageA very basic test generator might look likeimport cornichon


# Read the Gherkin DSL
f = open("example.feature", "r")
gherkin = f.readlines()
f.close()

# Only need to call Settings for the test framework as it builds
# on those settings for the scenarios
settings = cornichon.Settings("cpp/cppunittest")
settings["rootnamespace"] = "Cornichon::"
settings["scenarios file"] = "example.h"

# Generate the tests
fp = open("example.cpp", "w")
fp.write(cornichon.Generate(gherkin, settings, "cpp/cppunittest"))
fp.close()

# Generate the test scenarios
fp = open("example.h", "w")
fp.write(cornichon.Generate(gherkin, settings, "cpp/cppscenarios"))
fp.close()The values of the settings can be listed,cornichon.PrintSettings(settings)An explanation of those values can be printed,cornichon.HelpSettings("cpp/cppunittest")The list of available output types can be printed,cornichon.ListModules()Test frameworksC++The scenario classes are generated usingcpp/cppscenarios.The supported frameworks are:cpp/cppunittest- Microsoft's Visual C++ test frameworkcpp/googletest- Google TestC#The scenario classes are generated usingcs/csscenarios.The supported frameworks are:cs/nunit- NUnitcs/unittesting- Microsoft's Unit Testing frameworkPythonThe scenario classes are generated usingpy/pyscenarios.The supported frameworks are:py/pytests- pytest, the pytest frameworkpy/pyunit_tests- unittest, the standard Python unit testing frameworkVisual BasicThe scenario classes are generated usingvb/vbscenarios.The supported frameworks are:vb/nunit- NUnitvb/unittesting- Microsoft's Unit Testing frameworkContributingContributions are welcome. Please read the testing documentation.
Package: cornish
Cornish is a Python interface over theStarlink ASTastronomical software library, part of theStarlink Software Collection. Cornish is designed and written by Demitri Muna.The Starlink AST library is a collection of tools for working with world coordinate systems and excels at coordinate system transformations, representing and working with regions on the celestial sphere (e.g. polygons, circles, boxes, etc.), plotting, and more.APython interfacecalledstarlink-astwritten by the library’s authors, David Berry and Tim Jenness, is available, however it thinly exposes the C interface. A working knowledge of the C API is realistically a prerequisite to usingstarlink-ast. Similarly, the primarydocumentation for the libraryis the that of the C version which does not refer to the Python interface.The aim of Cornish is to be a fully Pythonic interface to the library. It doesn’t replace the existingstarlink-astPython interface; rather, it is a wrapper around that. The current development focus is defining and working with regions on the sky. It accepts and returnsAstropyobjects where possible.Cornish is currently under active development and all APIs are subject to change. It is not recommended to be used in a pipeline yet, but it is becoming increasingly mature and particularly useful for interactive use. The project is being released in this state as it is a dependency of the Trillian and SciDD projects.Many thanks to David Berry for the generous and extremely responsive help and advice in the development of the library.ExamplesThe main documentation (in progress) will be the primary reference for this library. A few examples demonstrate its capabilities.fromcornishimportASTRegionfromastropy.ioimportfits# read FITS HDU (assuming a 2D image with a WCS)hdu1=fits.open("my_file.fits")[0]# define a polygon around the border the imagepolygon=ASTRegion.fromFITSHeader(hdu1.header)# get a circle that bounds that polygoncircle=polygon.boundingCircle()# create a polygon from a circle regionpolygon2=circle.toPolygon(npoints=20)# check if polygons overlappolygon.overlaps(polygon3)(If it seems too simple… that’s kind of the point.)
Package: cornpy
CornPy: Cornell Ecology Programs in PythonCornPyprovides Python wrappers for two classic programs for ecological data analyses, DECORANA (DEtrended COrrespondence ANAlysis) and TWINSPAN (Two-Way SPecies INdicator ANalysis). Both programs were written by M. O. Hill in FORTRAN for mainframe computers, and modified for the IBM PC.These modified versions use the "strict" convergence criteria of Oksanen & Minchin (1997) for eigenanalysis, with a tolerance of 0.000005 and a maximum iteration limit of 999. In DECORANA, the bug in non-linear scaling has been corrected.Besides binary executables compiled with GNU gfortran to run under MS-Windows or GNU/Linux, FORTRAN source files, decorana.f and twinspan.f, are also provided for those who wish to change the maximum dimensions (by simply changing the numbers in the first PARAMETER statement in each program).Both programs require an input data file in Cornell Condensed format, containing the community data to be analysed. The layout of this file should follow the same rules as for the original versions of DECORANA and TWINSPAN. The write_cep() function included in this package will automatically convert a pandas dataframe into a the required format for input to each program.Install via 'pip install cornpy'LicenseCornPyis distributed under the GNU General Public LicenseVersion0.1.0ExamplesDetrended correspondence analysis:import pandas as pd
import cornpy as cp
df = pd.read_csv("data.csv")
site_scores, species_scores = cp.decorana(df)Two-way species indicator analysis:import pandas as pd
import cornpy as cp
df = pd.read_csv("data.csv")
output = twinspan(df)
Package: cornsnake
cornsnakeA small library wrapping common Python utilities for working with files, git, ZIP, lists, processes, dates and times.Functions that I find myself writing time and again, on various OSS and personal projects - so collecting in one place, in case it is of use!Installpython -m pip install --upgrade cornsnakeDependenciesPython 3.11 or higherpip install PyMuPDFfitz is for PDF parsing (installed as PyMuPDF)UsageFunctions are organised in logical groups likeutil_fileorutil_print.To see what functions are available, see thesource code.For an example, see thee2e tests.Referencesgithub repopypi package
Package: cornucopia
Thecornucopiapackage provides a generic framework for preprocessing,
augmentation, and domain randomization; along with an abundance of specific layers,
mostly targeted at (medical) imaging.cornucopiais written using a PyTorch
backend, and therefore runson the CPU or GPU.Cornucopia isintendedto be used on the GPU for on-line augmentation.
A quickbenchmarkof affine and elastic augmentation
shows that while cornucopia is slower thanTorchIOon the CPU (~ 3s vs 1s), it is greatly accelerated on the GPU (~ 50ms).Since gradients are not expected to backpropagate through its layers, it can
theoretically be used within any dataloader pipeline,
independent of the downstream learning framework (pytorch, tensorflow, jax, ...).InstallationInstallationDependenciespytorch >= 1.8numpynibabeltorch-interpoltorch-distmapCondacondainstallcornucopia-cbalbasty-cpytorch-cconda-forgePippipinstallcornucopiaDocumentationRead thedocumentationand in particular:installationget startedexamplesAPIOther augmentation packagesThere are other great, and much more mature, augmentation packages
out-there (although few run on the GPU). Here's a non-exhaustive list:MONAITorchIOAlbumentations(2D only)Volumentations(3D extension of Albumentations)ContributionsIf you find this project useful and wish to contribute, please reach out!
Package: cornutils
cornutilsPython package containing utility functionsInstallpython3-mpipinstallcornutilsExample Usage of praktikaimportnumpyasnpfromcornutils.praktikaimportData,PlotSettings,aiox=np.array([0,2,4,6,8,10,12,14,16,18,])y=np.array([2.8,5.2,6.8,9.6,11.2,14,15.6,17,19.8,21.4,])delta_y=np.array([1.0,1.5,1.2,0.9,1.4,1.4,1.5,1.2,1.3,1.5,])data=Data(x,y,sy=delta_y)s=PlotSettings(label_x='x-label',label_y='y-label',label_fit='Test')deffunc(beta,x):'''Function to use for estimation, beta is an array with each parameter'''y=beta[0]+beta[1]*xreturnyaio(func,2,data,s)
Package: coro
This Python library was evolved at IronPort Systems and has been provided
as open source by Cisco Systems under an MIT license.IntroShrapnel is a library for high-performance concurrency.  It uses
coroutines to implement user threads on top of either kqueue (FreeBSD,
OS X) or /dev/epoll (linux), and is written mostly in Pyrex/Cython,
supporting both 32-bit and 64-bit platforms.  It is the culmination of
about 8 years of work at IronPort Systems, a provider of high-speed
mail appliances.  It was open-sourced by Cisco Systems in late 2011.StatusApr 18, 2013: I’ve recently merged in a long chain of branches for several
important features:Support for pure-cython servers (branch ‘pxdfix’)Full DNS resolver implementation (branch ‘dns-cache’)Updated postgres support (branch ‘postgres’)Included OpenSSL supportFeaturesLightweight threads, event-driven scheduler.Underneath: non-blocking operations on descriptors, like sockets and pipes.On top, synchronous API for straight-line, simple code.Highly scalable - tens or hundreds of thousands of connections/threads.Thread synchronization primitives, like mutexes, semaphores, etc…with_timeout(): wrap any funcall with a timeout.Wait on kqueue events like file/directory changes, signals, processes, etc… [kqueue only]DNS resolver and cacheHTTP server and client (plus WebSocket, RFC6455 & hixie-76)Support for TLS via tlslite and openssl (plus NPN for both)other protocols/codecs: ldap, asn1, ftp, mysql, postgres, AMQP.MIT License.AdvantagesCompared to other concurrency packages available for Python,
Shrapnel gives you:Speed and Efficiency: the entire scheduler, poller, socket layer,
synchronization objects, etc… are written in Cython, with an
emphasis on performance and low memory usage.Stock Python: Shrapnel works with out-of-the-box CPython [2.X].  No
special variants of Python are needed, it will even work with your
OS’s OEM python installation. So you can use all the external
libraries/modules you’ve come to rely on.No Callbacks: no need to cuisinart your application into a thousand
callbacks.  No need to decompose every action into a state
machine.  Write simple, performant code now without having to send
your programmers to class.Drop to Cython for speed: all the capabilities of the system are
available from Cython, so you can e.g. write a server entirely in
Cython for speed.  You can interface with external libraries, and
do thread switches from Cython or C.  It’s even possible to have
external C code call back into shrapnel.  This makes it easy to
prototype your application in Python, and then push only the hot
spots into Cython.Timeouts: Shrapnel provides a general timeout mechanism that can be
used to wrap any function call with a timeout.Profiler: Thread-aware profiler generates HTML reports.TutorialSeehttp://ironport.github.com/shrapnel/tutorial.htmlAPI DocumentationSeehttp://ironport.github.com/shrapnel/
Package: coro-context-manager
coro-context-managercoro-context-manageris a simple python package that includes an object that can wrap a coroutine to allow it to
behave as a context manager or a regular awaitable.This class is super useful when you have a coroutine that returns an object that defines an async context manager using__aenter__and__aexit__Installationpippip install coro-context-managerpoetrypoetry add coro-context-managerUsageCoroContextManagercan be used to wrap a coroutine so that it can be awaited or called via an async context manager
in which case the library will try to use the underlying object's__aenter__and__aexit__, if they exist.importasynciofromcoro_context_managerimportCoroContextManagerclassMyObject:def__init__(self,initial_value):self.some_value=initial_valueasyncdef__aenter__(self):awaitasyncio.sleep(.1)self.some_value+=1returnselfasyncdef__aexit__(self,exc_type,exc_val,exc_tb):awaitasyncio.sleep(.1)self.some_value-=1@classmethodasyncdefan_io_intensive_constructor(cls,initial_value):awaitasyncio.sleep(10)returncls(initial_value)asyncdefmain():"""Using CoroContextManager, I get a coroutine I can await or use with an async context manager, which proxies tothe context manager defined on object returned by the coroutine, if it exists."""# i can await it directlymyobj=awaitCoroContextManager(MyObject.an_io_intensive_constructor(5))print(type(myobj))# <class '__main__.MyObject'># or use it as an async context manager, not having to await it, with the same api!asyncwithCoroContextManager(MyObject.an_io_intensive_constructor(5))asmyobj:print(type(myobj))# <class '__main__.MyObject'>print(myobj.some_value)# 6print(myobj.some_value)# 5asyncio.run(main())RationaleThis is a common enough pattern used in several async packages all with slightly different implementation.  It would be
nice if there was a consistent pattern everyone was using; this package aims to provide that.aiopgaioodbcaiohttpcx_Oracle_asyncaiomysqlLatest Changes
Package: corocorona
corocoronadisplay Total number of corona infectionsGetting Startedtest package for me!Requirementspython >= 3.9Nothing moreInstallingpip install corocoronaHow to usefrom printCorona import corona
printCorona()
printCorona("埼玉県")Display[東京都]
累計感染者数： 3,343,691
(最終更新日：2022-11-11)[埼玉県]
累計感染者数： 1,275,759
(最終更新日：2022-11-11)AuthorsSho Yoshikawa
Package: coroflow
Coroflow: Easy and Fast PipelinesCoroflow makes it easy to run pipelines with coroutines and also support mixing
in blocking functions and generators.Coroflow does a lot of heavy-lifting for you:Manage all tasks in the pipelinen concurently in one thread using coroutinesPass data between tasks with queuesEasily specify concurrency limitsConnect stages of the pipeline with fan-out/fan-in patterns or load-balancer patternsDefine tasks as coroutines, normal (blocking) functions, async generators or normal generators; coroflow will run it appropriately
in either the event-loop, a thread pool, or optionally in a processes poolProvides an apache-ariflow-like api for connecting tasksGetting StartedCoroflow makes it easy to run pipelines with coroutines and also support mixing
in blocking functions and generatorsfromcoroflowimportNode,PipelineimportasyncioimporttimeclassGenNode(Node):asyncdefexecute():"""The execute method of the first/root Node has to be a generator,either async or synchronous."""forurlin['img_url_1','img_url_2','img_url_3']:print(f"Yielding{url}")awaitasyncio.sleep(1)yieldurlprint("Generator is exhausted")returnclassDoSomething(Node):asyncdefexecute(inpt,param=None):"""The execute method of all non-root Nodes should be a asyncor synchronous method."""# do your async pipelined workawaitasyncio.sleep(1)# simulated IO delayoutp=inptprint(f"func1: T1 sending{inpt}")returnoutpp=Pipeline()t0=GenNode('gen',p)t1=DoSomething('func1',p,kwargs={'param':'param_t1'})t2=DoSomething('func2',p,kwargs={'param':'param_t2'})t0.set_downstream(t1)t1.set_downstream(t2)start_time=time.time()p.run()print(f"Asynchronous duration:{time.time()-start_time}s.")TestsRun like so:$ pytest
Package: coroICA
coroICA-pythonPlease refer to the project website athttps://sweichwald.de/coroICA/.
We kindly ask you to cite the accompanying article (see below), in case
this package should prove useful for some work you are publishing.Quick installpip install coroICAThe developer documentation is available athttps://sweichwald.de/coroICA-python.This repository holds the source of thecoroICA
packagewhich implements the
coroICA algorithm presented inRobustifying Independent Component
Analysis by Adjusting for Group-Wise Stationary
Noiseby N Pfister, S
Weichwald, P Bühlmann, B Schölkopf.Furthermore, as a courtesy to other python users, this package contains
implementations of * uwedge, an approximate matrix joint
diagonalisation algorithm describedhere, and *uwedgeICA, which essentially—for the right choice oftimelagparameters—amounts to an implementation of several
second-order-statistics-based ICA algorithms such as
SOBI/NSS-JD/NSS-TD-JD (please refer to the coroICA website and article
mentioned above for more details on this),which may be helpful in their own right independent of the
confounding-robust ICA.
Package: corona
Corona is essentially a basic webpage screenshot utility that
uses headless Chromium via pyppeteer.Running# Download a version of Chromium to usecoronasetup# Take a snapshotcoronasnaphttps://google.comgoogle.pngTroubleshootingDepending on your execution environment, you might need to disable the
Chrome sandbox. To do so, add the--disable-sandboxargument; however,
please be aware of the risks in doing this.ExtensionThe application allows for a couple of extension points via a python
script that follows this format:asyncdefpre_snapshot(page):# Do something awesome just before the# snapshot hereasyncdefpost_snapshot(page):# Do something even more awesome after# the snapshot has been taken
Package: corona-app
CORONA APPYou can use this package to see the number of Corona virus stats (cases, deaths and critical cases, etc).Installationpython-mpipinstallcorona-appGetting StartedDirectly after the installation you can use this package. You will need Python Release 3.7.0 or older.Open the python console and use the packagepython
>>>fromcoronaimportshow
>>>show()RankWorldTotalCasesNewCases▲TotalDeathsNewDeaths▲RecoveredActiveCriticalCases/1Mpop1USA(US)59,564,116855,84342,089,19816,619,07521,467178,3682India(IN)35,226,386483,17834,371,845371,3638,94425,1523Brazil(BR)22,395,322619,73021,567,845207,7478,318104,2394UK(GB)14,015,065149,51510,620,7283,244,822875204,8225France(FR)11,183,238125,0138,393,8272,664,3983,333170,7576Russia(RU)10,601,300313,8179,623,677663,8062,30072,5977Turkey(TR)9,787,27483,2319,217,669486,3741,128114,1888Germany(DE)7,399,003114,2076,664,800619,9964,63687,8859Italy(IT)6,975,465138,4745,243,4121,593,5791,467115,62710Spain(ES)6,922,46689,8375,124,2211,708,4082,005147,972# You can give an argument "country code" (e.g. de, jp, uk) and receive the numbers of the country.>>>fromcoronaimportget
>>>get("de")RankCountryTotalCasesNewCases▲TotalDeathsNewDeaths▲RecoveredActiveCriticalCases/1Mpop1Germany(DE)7,399,003114,2076,664,800619,9964,63687,885World300,882,620180,374▲5,490,390558▲255,844,51139,547,71992,91838,604.39

>>>get("jp")RankCountryTotalCasesNewCases▲TotalDeathsNewDeaths▲RecoveredActiveCriticalCases/1Mpop1Japan(JP)1,743,5474,194▲18,3981,713,56711,5829113,850World300,882,620180,374▲5,490,390558▲255,844,51139,547,71992,91838,604.39

>>>get("uk")RankCountryTotalCasesNewCases▲TotalDeathsNewDeaths▲RecoveredActiveCriticalCases/1Mpop1UK(GB)14,015,065149,51510,620,7283,244,822875204,822World300,882,620180,374▲5,490,390558▲255,844,51139,547,71992,91838,604.39