Saravanan666/pypi-org huggingface dataset:
Package: cykooz.sequence
This project is a fork of gocept.sequence (http://pypi.python.org/pypi/gocept.sequence/)
originally created by Daniel Havlik and Sebastian Wehrmann.cykooz.sequenceGenerates a persistent sequence.Sequences>>> import persistent
>>> import zope.annotation.interfaces
>>> from zope.interface import implementsWe need a testobject, where the SequenceGenerator stores his data:>>> class Dummy(persistent.Persistent):
...     implements(zope.annotation.interfaces.IAttributeAnnotatable)>>> test_object = Dummy()You get a SequenceGenerator by adapting to ISequenceGenerator:>>> from cykooz.sequence.interfaces import ISequenceGenerator
>>> seq_gen = ISequenceGenerator(test_object)You get a sequence like this:>>> seq_gen.getNextValue()
1
>>> seq_gen.getNextValue()
2
>>> seq_gen.getNextValue()
3You can also set the generator to a value:>>> seq_gen.setNextValue(1)
>>> seq_gen.getNextValue()
1>>> seq_gen.setNextValue(5)
>>> seq_gen.getNextValue()
5
>>> seq_gen.getNextValue()
6
>>> seq_gen.getNextValue()
7
>>> seq_gen.getNextValue()
8But setNextValue only accepts integer arguments:>>> seq_gen.setNextValue('1')
Traceback (most recent call last):
...
ValueError: setNextValue expected Integer, <type 'str'> found.>>> seq_gen.setNextValue(3.14)
Traceback (most recent call last):
...
ValueError: setNextValue expected Integer, <type 'float'> found.Changes1.0.2 (2011-05-17)Fix tests.1.0.1 (2011-05-16)Fix interface name for getting annotations.1.0.0 (2011-04-14)Removed old migration code.Removed the dependency fromPersistence.
Package: cykooz.title
This package implements adapters for adapting any object to ITitle interface.Let’s do some imports we will use later.>>> import zope.interface
>>> import zope.component
>>> from zope.annotation.interfaces import IAttributeAnnotatable
>>> from zope.dublincore.interfaces import IZopeDublinCore
>>> from zope.container.interfaces import IContained
>>> from cykooz.title.interfaces import ITitle
>>> from cykooz.title import adaptersLet’s register the adapters, this is normally done in configure.zcml:>>> zope.component.provideAdapter(adapters.ClassName2TitleAdapter)
>>> zope.component.provideAdapter(adapters.Contained2TitleAdapter)
>>> zope.component.provideAdapter(adapters.ZDC2TitleAdapter)Implement test object:>>> class SomeClass(object):
...     zope.interface.implements(zope.interface.Interface)
>>> some_object = SomeClass()Get title from class name:>>> ITitle(some_object).title
u'SomeClass'Now change the test object so that it provide IContained:>>> zope.interface.directlyProvides(some_object, IContained)
>>> some_object.__name__ = u'NameInContainer'
>>> ITitle(some_object).title
u'NameInContainer'Change the test object so that is provide only IAttributeAnnotatable:>>> zope.interface.directlyProvides(some_object, IAttributeAnnotatable)
>>> IZopeDublinCore(some_object).title
u''If object do not provide IContained and field ‘title’ of IZopeDublinCore is empty
then ITitle adapter return class name of object:>>> ITitle(some_object).title
u'SomeClass'Now change the test object so that it also provide IContained:>>> zope.interface.alsoProvides(some_object, IContained)
>>> ITitle(some_object).title
u'NameInContainer'Set field ‘title’ of IZopeDublinCore:>>> IZopeDublinCore(some_object).title = u'ZopeDublinCore Title'
>>> IZopeDublinCore(some_object).title
u'ZopeDublinCore Title'Test adapter:>>> ITitle(some_object).title
u'ZopeDublinCore Title'Changes1.0.0 (2011-03-14)Initial release
Package: cyl1tf
cyL1TFA Python library using Cython for using ℓ₁ (L1) trend filtering algorithm developed by Kim et al. (2009):Kim, S. J., Koh, K., Boyd, S., & Gorinevsky, D. (2009). ℓ₁ trend filtering. SIAM review, 51(2), 339-360. DOI:10.1137/070690274Usageimportcyl1tffit=cyl1tf.calc_fit(xy,rel_scale=0.01)Seeexample.ipynb.CitationPlease cite this software using theDOI.Historyv0.1.3 (2022-04-20)Fixed: Memory leakv0.1.2 (2021-04-13)Increment version to prevent pypi collisionv0.1.1 (2021-04-13)Added MANIFESTv0.1.0 (2020-08-12)Initial release
Package: cylc-flow
Cylc (pronounced silk) is a general purpose workflow engine that also
manages cycling systems very efficiently. It is used in production weather,
climate, and environmental forecasting on HPC, but is not specialized to those
domains.Quick StartInstallation|Documentation# install cylccondainstallcylc-flow# write your first workflowmkdir-p~/cylc-src/example
cat>~/cylc-src/example/flow.cylc<<__CONFIG__[scheduling]initial cycle point = 1cycling mode = integer[[graph]]P1 = """a => b => c & db[-P1] => b"""[runtime][[a, b, c, d]]script = echo "Hello $CYLC_TASK_NAME"__CONFIG__# install and run itcylcinstallexample
cylcplayexample# watch it runcylctuiexampleThe Cylc Ecosystemcylc-flow- The core Cylc Scheduler for defining and running workflows.cylc-uiserver- The web-based Cylc graphical user interface for monitoring and controlling workflows.cylc-rose- Provides integration withRose.Migrating From Cylc 7Migration Guide|Migration SupportCylc 8 can run most Cylc 7 workflows in compatibility mode with little to no
changes, go through themigration guidefor more details.Quick summary of major changes:Python 2 -> 3.Internal communications converted from HTTPS to ZMQ (TCP).PyGTK GUIs replaced by:Terminal user interface (TUI) included in cylc-flow.Web user interface provided by the cylc-uiserver package.A new scheduling algorithm with support for branched workflows.Command line changes:cylc run <id>->cylc play <id>cylc restart <id>->cylc play <id>rose suite-run->cylc install; cylc play <id>The core package containing Cylc scheduler program has been renamed cylc-flow.Cylc review has been removed, the Cylc 7 version remains Cylc 8 compatible.Citations & PublicationsCopyright and Terms of UseCopyright (C) 2008-2024NIWA & British Crown (Met Office) & Contributors.Cylc is free software: you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation,
either version 3 of the License, or (at your option) any later version.Cylc is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU General Public License for more details.You should have received a copy of the GNU General Public License along with
Cylc.  If not, seeGNU licenses.ContributingContributions welcome:Read thecontributingpage.Development setup instructions are in thedeveloper docs.Involved change proposals can be found in theadmin pages.Touch base in thedevelopers chat.
Package: cylc-rose
Cylc-Rose PluginACylcplugin providing support for theRoserose-suite.conffile.For use with Cylc 8 and Rose 2.InstallationInstall from PyPi:pip install cylc-roseOr Conda:conda install cylc-roseNo further configuration is required, Cylc will load this plugin automatically.OverviewIn the past Rose provided a wrapper to Cylc providing additional capabilities
including workflow installation.As of Cylc 8 and Rose 2 some of this functionality has been re-built directly
in Cylc, the rest has been migrated into this Plugin.The last versions of Cylc and Rose which use the wrapper are:Cylc 7Rose 2019For all later versions please install this plugin into your Cylc/Rose
environment for Rose integration.What This Plugin DoesThis plugin provides support for therose-suite.conffile, namely:Jinja2/EmPy template variables.Scheduler environment variables.File installation.Optional configurations.What This Plugin Does Not DoSupport theroot-dir*configurations, these have been deprecated by
the new Cylcsymlink dirsfunctionality.Graphical configuration editors.ContributingRead thecontributingpage.Development setup instructions are in thedeveloper docs.Involved change proposals can be found in theadmin pages.Touch base in thedevelopers chat.Note:If also developing Cylc and or Rose you may wish to install
cylc-rose in the same environment before installing cylc-rose.pip install -e cylc-rose[all]Copyright and Terms of UseCopyright (C) 2008-2023NIWA &
British Crown (Met Office) & Contributors.Cylc-rose is free software: you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation,
either version 3 of the License, or (at your option) any later version.Cylc-rose is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU General Public License for more details.You should have received a copy of the GNU General Public License along with
Cylc-rose.  If not, seeGNU licenses.
Package: cylc-sphinx-extensions
A library of Sphinx extensions for documenting Cylc projects.InstallationInstall all extensions (but not dependencies):$ pip install cylc-sphinx-extensionsOR all extensions + dependencies for specified extension(s) by name:$ pip install cylc-sphinx-extensions.git[cylc_lang]OR all extensions + dependencies for all extensions:$ pip install cylc-sphinx-extensions.git[all]Note theminicylcextension requiresgraphviz:# install graphviz from your package manager e.g:
$ sudo apt-get install -y graphvizUsageTo use an extension register it in your project’sconf.pye.g:extension = [
    'cylc.sphinx_ext.cylc_lang'
]Some of these extensions are “auto-loading” and do not require any extra steps
to activate.If thehtml_static_pathconfiguration is set in yourconf.pyyou will
need to move this into asetupfunction, otherwise extensions cannot append
to this path to add their own static resources e.g:def setup(app):
    app.config.html_static_path.append('_static')DevelopmentFork and clonehttps://github.com/cylc/cylc-sphinx-extensions.git.Extensions are auto-documented from their module docstrings.Build documentation by running:$ make clean <format>  # e.g. make html slidesThis documentation build serves as a simple test battery (warnings will cause
it to fail), for everything else there’s pytest:$ pytestFor code linting:$ pycodestyle .  # python
$ eslint cylc/   # javascriptCopyright and Terms of UseCopyright (C) 2008-2023 NIWA & British Crown (Met Office) & Contributors.Cylc is free software: you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation,
either version 3 of the License, or (at your option) any later version.Cylc is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU General Public License for more details.You should have received a copy of the GNU General Public License along with
Cylc.  If not, see GNU licenseshttp://www.gnu.org/licenses/.
Package: cyleb128
LEB128Cython implementation LEB128 varint serialization format.Installationpipinstallcyleb128Examplefromleb128importLEB128S,LEB128U# Signed integerprint(LEB128S.encode(-123))print(LEB128S.decode(LEB128S.encode(-321)))# Unsigned integerprint(LEB128U.encode(123))print(LEB128U.decode(LEB128S.encode(123)))
Package: cylimiter
cylimiterA small package with stateful audio limiter implementation in Cython. Since the limiter is stateful it is suitable for streaming audio processing.We're slowly growing into other effects beyond limiter, starting with streaming reverb in v0.4.What's new?v0.4: Added reverb with RIRfromcylimiterimportReverbRIRreverb=ReverbRIR()# default RIR# or user-provided RIR:#  reverb = ReverbRIR([0.001, 0.021, 0.007, ...])reverb.apply(audio)# makes a copyreverb.apply_inplace(audio)# no copies with np.array input# preserves context between calls for streaming applicationsforchunkinaudio_source:reverb.apply_inplace(chunk)ExamplesimportnumpyasnpfromcylimiterimportLimiterlimiter=Limiter(attack=0.5,release=0.9,delay=100,threshold=0.9)chunk_size=1200# for streaming processing# Example of applying limiter in-place (more efficient)audio=np.random.randn(44100)*10foriinrange(0,44100,chunk_size):chunk=audio[i*chunk_size:(i+1)*chunk_size]limiter.limit_inplace(chunk)# ... do sth with chunk# Example of applying limiter that copies the signalaudio=np.random.randn(1,44100)*10audio_lim=limiter.limit(audio)# Reset the limiter to re-use it on other signalslimiter.reset()InstallationFrom PyPI via pip:pipinstallcylimiterFrom source:gitclonehttps://github.com/pzelasko/cylimitercdcylimiter
pipinstall.Re-generate C++ sources from Cython:cdextensions
cython-3--cplus*.pyxMotivationI couldn't easily find a package that implements audio limiter in Python in a suitable way for streaming audio. The closest (and the main inspiration) isthis gist by @bastibe. Since the algorithm is auto-regressive, I figured C++ will be much more efficient than Python.
Package: cylinderize
cylinderizeTurn any file or text into a cylinderinstallFrom PyPipip3installcylinderizeFrom GitHubpip3installgit+https://github.com/donno2048/cylinderizeUsageRuncylinderize <file>to show the text of the file as a cylinderUsecylinderizeto choose a file using a promptOr in a script:fromcylinderizeimportcylinderizecylinderize("text\nmore text\n...")
Package: cylinter
![](docs/assets/images/cylinter-logo.svg)## An Interactive Image Segmentation Filter for Multiplex Microscopy.CyLinter is quality control software for identifying and removing cell segmentation instances corrupted by optical and/or image-processing artifacts in multiplex microscopy images. The tool is user-guided and comprises a set of modular and extensible QC modules instantiated in a configurable [Python](https://www.python.org) Class object. Module results are cached to allow for dynamic restarts.CyLinter development is led by [Greg Baker](https://github.com/gjbaker) at the [Laboratory of Systems Pharmacology](https://hits.harvard.edu/the-program/laboratory-of-systems-pharmacology/about/), Harvard Medical School.Funding:This work is supported by the following:NCI grant U2C-CA233262: Pre-cancer Atlases of Cutaneous and Hematologic OriginNIH grant U54CA225088: Systems Pharmacology of Therapeutic and Adverse Responses to Immune Checkpoint and Small Molecule DrugsLudwig Center at Harvard Medical School and the Ludwig Cancer Research FoundationInstructions:https://labsyspharm.github.io/cylinter/
Package: cylitestblarghblargh
attrsis anMIT-licensed Python package with class decorators that ease the chores of implementing the most common attribute-related object protocols:>>>importattr>>>@attr.s...classC(object):...x=attr.ib(default=42)...y=attr.ib(default=attr.Factory(list))>>>i=C(x=1,y=2)>>>iC(x=1, y=2)>>>i==C(1,2)True>>>i!=C(2,1)True>>>attr.asdict(i){'y': 2, 'x': 1}>>>C()C(x=42, y=[])>>>C2=attr.make_class("C2",["a","b"])>>>C2("foo","bar")C2(a='foo', b='bar')(If you don’t like the playfulattr.sandattr.ib, you can also use their no-nonsense aliasesattr.attributesandattr.attr).You just specify the attributes to work with andattrsgives you:a nice human-readable__repr__,a complete set of comparison methods,an initializer,and much morewithoutwriting dull boilerplate code again and again.This gives you the power to use actual classes with actual types in your code instead of confusingtuples or confusingly behavingnamedtuples.So put down that type-less data structures and welcome some class into your life!NoteI wrote anexplanationon why I forked my owncharacteristic.
It’s not dead butattrswill have more new features.attrs’s documentation lives atRead the Docs, the code onGitHub.
It’s rigorously tested on Python 2.6, 2.7, 3.3+, and PyPy.Authorsattrsis written and maintained byHynek Schlawack.The development is kindly supported byVariomedia AG.It’s the spiritual successor ofcharacteristicand aspires to fix some of it clunkiness and unfortunate decisions.  Both were inspired by Twisted’sFancyEqMixinbut both are implemented using class decorators becausesub-classing is bad for you, m’kay?The following folks helped formingattrsinto what it is now:GlyphHawkOwlLynn RootWouter BolsterleeOf coursecharacteristic’shall of fameapplies as well since they share a lot of code.
Package: cylouvain
cylouvain is a Python module that provides a fast implementation
of the classic Louvain algorithm for node clustering in graph.This module uses Cython in order to obtain C-like performance with
code mostly writen in Python.InstallationInstall the latest version of cylouvain usingpip$ pip install cylouvainDependenciescylouvain requires:Python (>= 2.7 or >= 3.4)NumPySciPyNetworkXSimple exampleBuild a simple graph with NetworkX:>>> import networkx as nx
>>> graph = nx.Graph()
>>> graph.add_nodes_from(['a', 'b', 'c', 'd', 'e'])
>>> graph.add_edges_from([('a', 'b'), ('a', 'c'), ('b', 'c'),
                          ('c', 'd'), ('c', 'e'), ('d', 'e')])Compute a partition of the nodes using cylouvain:>>> import cylouvain
>>> partition = cylouvain.best_partition(graph)
>>> print(partition)
{'a': 0, 'b': 0, 'c': 0, 'd': 1, 'e': 1}Compute the corresponding modularity:>>> modularity = cylouvain.modularity(partition, graph)
>>> print("Modularity: %0.3f\n" % modularity)
Modularity: 0.111ReferencesThe Louvain algorithm is an heuristic to find a node partition that maximizes the modularity function.
It is described in:Fast unfolding of communities in large networks
Vincent D Blondel, Jean-Loup Guillaume, Renaud Lambiotte, Etienne Lefebvre
Journal of Statistical Mechanics: Theory and Experiment 2008 (10), P10008 (12pp)The modularity function was first introduced in:Finding and evaluating community structure in networks
Newman, Mark EJ and Girvan, Michelle
Physical review E, 2004, vol. 69, no 2, p. 026113.LicenseReleased under the 3-Clause BSD license (seeCOPYING):Copyright (C) 2018 Alexandre Hollocou <alexandre@hollocou.fr>
Package: cyluhn
CyluhnA simple, fast library for verifying and calculating Luhn check digits, as well
as generating random serial numbers with valid Luhn check digits for testing.Cyluhn is mostly a Cython port of the pure-Pythonluhnlibrary, acheiving a boost in speed while still being easy to install with pip.
Cyluhn is intended to reduce the amount of time needed to validate a large number
of Luhn-validated numbers such as credit card numbers or IMEIs during batch
processing.Compatible with Python 2.7 and Python 3.Installationpip install cyluhnUsageCyluhn moduleimportcyluhncyluhn.generate_valid_luhn_str(ndigits=15)# '136260325312871'cyluhn.verify('136260325312871')# Truecyluhn.get_check_digit('13626032531287')# 1cyluhn.append_check_digit('13626032531287')# '136260325312871'cyluhn-generate Command-Line Utilitycyluhn-generate -h
usage: cyluhn-generate [-h] -d NDIGITS -n NSERIALS

Generate serial numbers with valid Luhn check digit

optional arguments:
  -h, --help            show this help message and exit
  -d NDIGITS, --ndigits NDIGITS
                        Number of digits in each generated serial number
  -n NSERIALS, --nserials NSERIALS
                        Number of serial numbers to generate

Example:
cyluhn-generate -d 16 -n 10
7781801660482648
3204945043783442
6774339190776602
7715248262106681
7482722928054759
0435980693667196
6857863506381286
7743440795032247
8555647107058638
9772875170328167Runtime comparisons with luhn%timeit cyluhn.generate_valid_luhn_str(15)
638 ns ± 1.1 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each)

%timeit luhn.append(''.join(random.choices('0123456789', k=14)))
6.48 µs ± 15.8 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)
---
%timeit cyluhn.verify('136260325312871')
192 ns ± 0.122 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each)

%timeit luhn.verify('136260325312871')
3.26 µs ± 18.2 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)
---
%timeit cyluhn.get_check_digit('13626032531287')
220 ns ± 1.1 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each)

%timeit luhn.generate('13626032531287')
3.34 µs ± 13.7 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)
---
%timeit cyluhn.append_check_digit('13626032531287')
367 ns ± 1.01 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each)

%timeit luhn.append('13626032531287')
3.62 µs ± 15.6 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)
Package: cymbal
OverviewCymbal makes it easy to add functionality missing from libclang Python bindingsThe Clanglibclang python bindingsusectypesto invoke functions present
in libclang dynamic library.  In some cases, only a subset of the C functions
are available, because the platform or version specific Python bindings omit
functions.  Cymbal simplfies the process of dynamically adding those methods to
Types and Cursors.UsageImport Cymbal, monkeypatch any required functions, adding appropriate ctypes
annotations as necessary.importclang.cindexfromclang.cindeximport*importcymbalfromctypesimport*# add functions omitted from the pip installable clang packages on OSXcymbal.monkeypatch_type('get_template_argument_type','clang_Type_getTemplateArgumentAsType',[Type,c_uint],Type)cymbal.monkeypatch_type('get_num_template_arguments','clang_Type_getNumTemplateArguments',[Type],c_int)RequirementsThe only requirements are libclang and the python bindings for libclang.ContributingIf you experience problems with Cymbal,log them on GitHub. If you
want to contribute code, pleasefork the codeandsubmit a pull request.LicensingThis project builds on the work of the LLVM team and the University of Illinois
at Urbana-Champaign, but is no way affiliated with either group.
Package: cymbology
# cymbologycymbology identifies and validates financial security ids.  Currently the following identifiers are supported:1. Sedol2. Cusip3. IsinThis package can be used to validate these identifiers, discover the validation error, or create checksum digits.# Example Usage:### ISIN number```pythonfrom cymbology import Isin, cusip_from_isinisin = Isin()# validate ISIN number 'US0378331005', throwing error IdError if invalid>>> valid_isin = isin.validate('US0378331005')>>> valid_isin'US0378331005'# return validation boolean for ISIN number>>> tf = isin.is_valid('US0378331005')>>> tfTrue# calculate checksum for ISIN number 'US0378331005'check_digit = isin.calculate_checksum('US037833100')# convert ISIN to CUSIP number.>>> cusip_from_isin('US0378331005')'037833100'```# Dependancies and Installation NotesThis package currently only relies on the standard library, and has not been tested for Python 2.X.# Running TestsPYTHONPATH=. py.test --cov# ExtendingIdenifiers that rely on alpha-numeric codes should be able to be easily extended.  Feel free to add additional identification algorithmns.  Legal Indenifiers(LEI) ids will be added to master branch of repo soon.
Package: cyme
Version:0.0.5Web:http://celeryproject.org/Download:http://pypi.python.org/pypi/cyme/Keywords:celery, task queue, job queue, cloud, service–InstallationYou can installcymeeither via the Python Package Index (PyPI)
or from source.To install usingpip,:$ pip install cymeTo install usingeasy_install,:$ easy_install cymeGetting HelpMailing listFor discussions about the usage, development, and future of celery,
please join thecelery-usersmailing list.IRCCome chat with us on IRC. The#celerychannel is located at theFreenodenetwork.LicenseThis software is licensed under theNew BSD License. See theLICENSEfile in the top distribution directory for the full license text.
Package: cyminhook
Hook functions on Windows usingMinHook.Quick Start:importctypesimportctypes.wintypesimportcyminhookimportwin32apiimportwin32conclassMessageBoxExWHook(cyminhook.MinHook):signature=ctypes.WINFUNCTYPE(ctypes.c_int,ctypes.wintypes.HWND,ctypes.wintypes.LPCWSTR,ctypes.wintypes.LPCWSTR,ctypes.wintypes.UINT,ctypes.wintypes.WORD,use_last_error=True,)target=ctypes.windll.user32.MessageBoxExWdefdetour(self,hWnd,lpText,lpCaption,uType,langId):returnself.original(hWnd,"Hooked","Hooked",uType,langId)withMessageBoxExWHook()ashook:hook.enable()win32api.MessageBox(None,"Hello, World!","Python",win32con.MB_OK)