Saravanan666/pypi-org huggingface dataset:
Package: csnake
Csnake is a Python 3 package that helps you generate C code from Python.Csnake provides you with a consistent and opinionated API that helps you
structure your C-generating Python code.
It does so by providing classes and functions for generating every C language
construct.Probably the most important feature is the ability to initialize a value tostructandarrayinitializers from Pythondictsandlists(actually,Maps andCollections), nested arbitrarily.Here’s a taste:fromcsnakeimportCodeWriter,Variable,FormattedLiteralimportnumpyasnpvar=Variable("test",primitive="struct whatever",value={"field1":[{"x":num,"y":10-num}fornuminrange(2)],"field2":{"test":range(3),"field":np.arange(6).reshape(2,3)},"field3":FormattedLiteral([30,31,32],int_formatter=hex),"field4":8,},)cw=CodeWriter()cw.add_variable_initialization(var)print(cw)This yields:structwhatevertest={.field1={{.x=0,.y=10},{.x=1,.y=9}},.field2={.test={0,1,2},.field={{0,1,2},{3,4,5}}},.field3={0x1e,0x1f,0x20},.field4=8};As shown,numpyarrays are supported as values (so aresympyarrays),
and values can be formatted by arbitrary functions (here we’re usinghexto
output ints as hex literals for memberfield3).MotivationCsnake’s varable generation was motivated by a common embedded development
task: inputting data into C code.Csnake should be of help when generating C code for representing data like
bitmaps, fonts, statemachines, lookup tables - as arrays and structs.
It can also be used for loop unrolling, templating, …Csnake  can be easily incorporated into a build system (Make, CMake,
Scons,…), and also goes along great with Jinja2 andNed Batchelder’s cog.DocumentationDocumentation (Sphinx) can be viewed onGitLab pages for this package.ExamplesCsnake is used on several of my yet-to-be-released open source embedded
projects. I’ll be adding those (and other) examples along the way.CreditsCsnake is a major re-implementation (and improvement) ofC-SnakebyOliver(original idea) and Andrej (variable initialization idea and implementation,
author of this package).It’s provided under the MIT license.ChangelogThe changelog can be found within the documentation,here.
Package: cs.ndjson
Utilities for working with newline delimited JSON (NDJSON) files.Latest release 20211208:
Initial PyPI release.Functionappend_ndjson(arg, *a, **kw)Append an iterable of objects to a file as newline delimited JSON.Functionscan_ndjson(arg, *a, **kw)Read a newline delimited JSON file, yield instances ofdictclass(defaultdict, otherwise a class which can be instantiated
bydictclass(a_dict)).error_listis an optional list to accrue(lineno,exception)tuples
for errors encountered during the scan.ClassUUIDNDJSONMapping(cs.obj.SingletonMixin,cs.mappings.IndexedSetMixin)A subclass ofIndexedSetMixinwhich maintains records
from a newline delimited JSON file.MethodUUIDNDJSONMapping.__init__(self, filename, dictclass=<class 'cs.mappings.UUIDedDict'>, create=False)Initialise the mapping.Parameters:filename: the file containing the newline delimited JSON data;
this need not yet existdictclass: a optionaldictsubclass to hold each record,
defaultUUIDedDictcreate: if true, ensure the file exists
by transiently opening it for append if it is missing;
defaultFalseMethodUUIDNDJSONMapping.add_backend(self, record)Appendrecordto the backing file.MethodUUIDNDJSONMapping.rewrite_backend(self)Rewrite the backing file.Because the record updates are normally written in append mode,
a rewrite will be required every so often.MethodUUIDNDJSONMapping.scan(self)Scan the backing file, yield records.Functionwrite_ndjson(arg, *a, **kw)Transcribe an iterable of objects to a file as newline delimited JSON.Release LogRelease 20211208:
Initial PyPI release.
Package: cs-nds
Computer Science NiedersachsenThis Library contains often used methods and classes
for Computer Science classes in Niedersachsen (Lower Saxony), Germany.The initial and main reason for creation of this library
is an implementation of theStackandQueueclasses,
which differ from the Python implementation.Disclaimer:Although I try to give my best to provide a useful tool,
I cannot guarantee it always working correctly and being
up-to-date with the latest specifications.If you encounter a problem, please open anissue.InstallationThis package is available overpip:pipinstallcs-ndsTo use it in your code, just import it:importcs_ndsmy_queue=cs_nds.Queue()my_queue.enqueue(3)# ...Data StructuresStack("Stapel" / stack)Queue("(Warte-)Schlange" / queue)DynArray("Dynamische Reihung" / dynamic array)BinTree("Binärbaum" / binary tree)
Package: csnews
News module for DjangoDependenciesDjango>=1.8django-photologue>=3.6django-tinymce>=2.6.0InstalationINSTALLED_APPS=['csnews',]Then apply migrations:./manage.py migrate csnewsFinally, add this inurls.py:url(r'^news/', include('csnews.urls')),SupportShould you experience any issues do not hesistate to post an issue or contribute in this project pulling requests.Travis CI statusWe use Travis to check that the unit test suite is working against various combinations of Python, Django, etc…Click here for the full report.
Package: csng-invariances
CSNG-InvariancesReimplementation of Kovacs 2021: Finding invariances in sensory coding through gradient methods. in PyTorch.Free software: MIT licenseDocumentation:https://csng-invariances.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.0.1 (2021-09-06)First release on PyPI.
Package: csnn
Neural Networks with CasADicsnnis a package for creating symbolic neural networks inCasADiin aPyTorch-like API style.IntroductionThe package allows the creation of neural networks with the symbolic language offered byCasADi. This is done in a similar way toPyTorch. For example, the following code allows us to create an MLP with a hidden layer:importcasadiascsfromcsnnimportset_sym_type,Linear,Sequential,ReLUset_sym_type("SX")# can set either MX or SXnet=Sequential[cs.SX]((Linear(4,32),ReLU(),Linear(32,1),ReLU()))batch=2input=cs.SX.sym("in",batch,4)output=net(input)assertoutput.shape==(batch,1)InstallationTo install the package, runpipinstallcsnncsnnhas the following dependenciesCasADiFor playing around with the source code instead, rungitclonehttps://github.com/FilippoAiraldi/casadi-neural-nets.gitLicenseThe repository is provided under the MIT License. See the LICENSE file included with this repository.AuthorFilippo Airaldi, PhD Candidate [f.airaldi@tudelft.nl|filippoairaldi@gmail.com]Delft Center for Systems and ControlinDelft University of TechnologyCopyright (c) 2023 Filippo Airaldi.Copyright notice: Technische Universiteit Delft hereby disclaims all copyright interest in the program “csnn” (Nueral Networks with CasADi) written by the Author(s). Prof. Dr. Ir. Fred van Keulen, Dean of 3mE.
Package: cs.nodedb
A NodeDB is a base class for (currently small) databases of Node objects, native Python objects identified by their .type and .name attributes, and with uppercase attributes.Node attribute accessAs far as the backing store goes, each attribute is a sequence of values. Within Python, an attribute may be directly accessed as .FOO, which returns element 0 if the value sequence and requires the sequence to have exactly one element, or as .FOOs or .FOOes (note the lowercase plural suffix) which returns a view of the whole sequence.The plural forms return a sequence view which itself accepts .FOO or .FOOs attributes. If the values are all Nodes, .FOOs returns a new view with all the .FOO values from each Node, so one may cascade access through a graph of Nodes, example:N.LIST_MEMBERs.EMAIL_ADDRESSeswhich might return a sequence of email addresses from all the .LIST_MEMBER values from the root NodeN.The Node attributes obey both the sequence API and some of the set API: you can .append to or .extend one, or .add to or .update as with a set:M = MemberNode("bill")
N.LIST_MEMBERs.add(M)Backing StoresA NodeDB can be backed by a CSV file (beta quality - I use it myself extensively) or SQL or a DBM file (alpha quality, both need some work). The CSV backend allows multiple clients to share the file; they update by appending to the file and monitor the updates of others.
Package: cs.numeric
A few ad hoc numeric alogrithms:factorsandprimes.Latest release 20220606:
New intif(f): int(f) if that equals f, otherwise f.Functionfactors(n)Generator yielding the prime factors ofnin order from lowest to highest.Functionintif(f: float)Returnint(f)if that equalsf, otherwisef.Functionprimes()Generator yielding the primes in order starting at 2.Release LogRelease 20220606:
New intif(f): int(f) if that equals f, otherwise f.Release 20190309:
Superficial changes.Release 20150311.2:
Added RST doco for cs.numeric.Release 20150311:
Initial release with primes() and factors().
Package: cso-ansible-sdk
Ansible SDK for Juniper's CSOcso_ansible_sdkis an easier way to interact with Juniper's Contrail Service Orchestrator for building out SD-WAN sites.ease the authentication process with CSO for tokensbuild out new SD-WAN sitesdelete active SD-WAN sitesretrieve statistics from your production SD-WAN environmentNew Features!Building out a full SD-WAN site through Ansible with this SDKthis SDK is to be installed on your Ansible Tower instance
it is meant to be leveraged by the CSO galaxy modulesDependenciescso_ansible_sdkuses a single open source project to work properly:requests- interact with REST APIsInstallationPython packages are installed with the pip command$pipinstallcso_ansible_sdkDevelopmentWant to contribute? Great!Submit a PR and let's work on this together :D
Package: csobclient
CSOB clientPython library for communicating with ČSOB (https://platbakartou.csob.cz/) payment gateway API. The API is described here:https://github.com/csob/paymentgateway.The library focuses on the v.1.9 but it is designed for extensibility.InstallationpipinstallcsobclientBasic usageClient initializationfromcsobclient.v19importClientclient=Client("merchantId","merch_private.key","csob.pub")Payment initializationfromcsobclient.v19importCart,CartItemresponse=client.init_payment(order_no="2233823251",total_amount=100,return_url="http://127.0.0.1:5000/",cart=Cart([CartItem("Apples",1,100)]),merchant_data=b"Hello, World!",)Get payment URLurl=client.get_payment_process_url(pay_id)Process the gateway redirectpayment_info=client.process_gateway_return(data_dict)Get payment statuspayment_info=client.get_payment_status(pay_id)Reverse paymentresponse=client.reverse_payment(pay_id)Refund paymentresponse=client.refund_payment(pay_id,amount=100)Exceptions handlingfromcsobclient.v19importAPIError,HTTPRequestErrortry:response=client.operation(...)response.raise_for_result_code()exceptAPIErrorasexc:# handle API errorexceptHTTPRequestErrorasexc:# handle HTTP errorexceptValueErrorasexc:# invalid params passed. Development error!# handle value errorIt is also possible to check whether the API response is successful by checking the response.ok field:response=client.operation(...)ifnotresponse.ok:# handleRSA keys managementThe simples way to pass RSA keys is to pass their file paths:fromcsobclient.v19importClientclient=Client("merchantId","merch_private.key","csob.pub")The library will read the private key from the file when needed. The public key will be cached into the RAM.If you want to change it, use special classes:fromcsobclient.v19importClient,FileRSAKey,CachedRSAKeyclient=Client("merchantId",FileRSAKey("merch_private.key"),FileRSAKey("csob.pub"))You may also override the base RSAKey class to define your own key access strategy:fromcsobclient.v19importRSAKeyclassMyRSAKey(RSAKey):def__str__(self)->str:return"my key"
Package: cso-data
cso_appInstallSimply use the following pip commandpip install cso-dataHow toSimply import the CSO_df class and call its method get_cso_table.# import class
from cso_data import CSO_df

# request table
df = CSO_df().get_cso_table('HPA02')This method takes one input which is a table code which can be found onhttps://data.cso.ie/.
This returns a dataframe of the table of the data you requestSee cso_example.ipynb
Package: cson
# pycson[![Build Status](https://travis-ci.org/avakar/pycson.svg?branch=master)](https://travis-ci.org/avakar/pycson)A python parser for the Coffeescript Object Notation (CSON).## InstallationThe parser is tested on Python 2.7 and 3.5.pip install csonThe interface is the same as for the standard `json` package.>>> import cson>>> cson.loads('a: 1'){'a': 1}>>> with open('file.cson', 'rb') as fin:...     obj = cson.load(fin)>>> obj{'a': 1}## The languageThere is not formal definition of CSON, only an informal note in [one project][1]'s readme.Informally, CSON is a JSON, but with a Coffeescript syntax. Sadly [Coffescript][2] has noformat grammar either; it instead has a canonical implementation.This means that bugs in the implementation translate into bugs in the language itself.Worse, this particular implementation inserts a "rewriter" between the typicallexer/parser pair, purporting that it makes the grammar simpler. Unfortunately, it addsweird corner cases to the language..This parser does away with the corner cases,in exchange for changing the semantics of documents in a few unlikely circumstances.In other words, some documents may be parsed differently by the Coffescript parser and pycson.Here are some important highlights (see the [formal grammar][3] for details).* String interpolations (`"#{test}"`) are allowed, but are treated literally.* Whitespace is ignored in arrays and in objects enclosed in braces(Coffeescripts requires consistent indentation).* Unbraced objects greedily consume as many key/value pairs as they can.* All lines in an unbraced object must have the same indentation. This is the only placewhere whitespace is significant. There are no special provisions for partial dedents.For two lines to have the same indent, their maximal sequences of leading spaces and tabsmust be the same (Coffescript only tracks the number of whitespace characters).* Unbraced objects that don't start on their own line will never span multiple lines.* Commas at the end of the line can always be removed without changing the output.I believe the above rules make the parse unambiguous.This example demonstrates the effect of indentation.# An array containing a single element: an object with three keys.[a: 1b: 2c: 3]# An array containing three elements: objects with one key.[a: 1b: 2c: 3]# An array containing two objects, the first of which having one key.[ a: 1b: 2c: 3 ]Note that pycson can parse all JSON documents correctly (Coffeescript can't becauseof whitespace and string interpolations).[1]: https://github.com/bevry/cson[2]: http://coffeescript.org/[3]: grammar.md
Package: csp
cspis a high performance reactive stream processing library. The main engine is a C++ complex event graph processor, with bindings exposed into Python. Its key features include switchable simulation/realtime timesteps for both offline and online processing, custom input and output adapters for integration with static and streaming data sources and sinks, and extensible acceleration via customizeable C++ nodes for calculations.The high level goal ofcspis to make writing realtime code simple and performant. Write event driven code once, test it in simulation, then deploy as realtime without any code changes.Here is a very simple example of a smallcspprogram to calculate abid-ask spread. In this example, we use a constant bid and ask, but in the real world you might pipe these directly into your live streaming data source, or into your historical data source, without modifications to your core logic.importcspfromcspimporttsfromdatetimeimportdatetime@csp.nodedefspread(bid:ts[float],ask:ts[float])->ts[float]:ifcsp.valid(bid,ask):returnask-bid@csp.graphdefmy_graph():bid=csp.const(1.0)ask=csp.const(2.0)s=spread(bid,ask)csp.print('spread',s)csp.print('bid',bid)csp.print('ask',ask)if__name__=='__main__':csp.run(my_graph,starttime=datetime.utcnow())Running this, our output should look like (with some slight variations for current time):2024-02-07 04:37:13.446548 bid:1.0
2024-02-07 04:37:13.446548 ask:2.0
2024-02-07 04:37:13.446548 spread:1.0Getting StartedSeeour wiki!DevelopmentCheck out theDeveloper DocumentationAuthorscspwas developed at Point72 by the High Frequency Algo team, with contributions from users across the firm.LicenseThis software is licensed under the Apache 2.0 license. See theLICENSEfile for details.
Package: cspace-HgSite
HgSite is a Mercurial extension that allows serving a dynamic, read-only
website using a Mercurial repository as the backend storage. Pages are served
byhgweb, the same component that serves the Mercurial repository, and no
additional configuration is necessary in the web server.For more information, see the project site at:http://rc.c-space.org/hg/HgSite
Package: cspark-python
Cspark-python `|Build| <https://travis-ci.org/Matvey-Kuk/cspark-python>`_ `|Version| <https://pypi.python.org/pypi/cspark-python>`_ `|Updates| <https://pyup.io/repos/github/matvey-kuk/cspark-python/>`_ `|Python 3| <https://pyup.io/repos/github/matvey-kuk/cspark-python/>`_ `|codecov| <https://codecov.io/gh/Matvey-Kuk/cspark-python>`_==============================================================================================================================================================================================================================================================================================================================================Cspark-python is a library for `CiscoSpark <https://www.ciscospark.com/>`_ bots.Why Cspark-python?~~~~~~~~~~~~~~~~~~1. Spark API provides only one mechanism to notify bot about updates:Webhooks. "Webhooks require that the Cisco Spark Cloud be able toreach your backend over HTTP"`(link) <https://developer.ciscospark.com/webhooks-explained.html#auth>`_It's not comfortable to develop and test bots on public server soCspark-python emulates update mechanism using REST API.2. Class-based routers and request handlers allow you to useDjango-style project structure for complex projects.3. Event-based callbacks allows you to build prototype fast.Howto:~~~~~~1. Install with PIP: ``pip install cspark-python``2. Then go to developer website, `create newbot <https://developer.ciscospark.com/apps.html>`_ and achieve**Access Token**. Be careful and don't copy your own **Access Token**it will cause funny situation.If you stacked with icon uploading mechanism (as I always do), youcan use random photo of a cat:https://pbs.twimg.com/profile\_images/562466745340817408/\_nIu8KHX.jpeg3. Use examples to start your first bot. Don't forget to change **AccessToken**.Hello, google: **Cisco Spark Python SDK**, **Cisco Spark PythonFramework**, **Cisco Spark Bot**, **Bot For Cisco Spark Example**Status:~~~~~~~-  [x] Build prototype-  [ ] Stabilize interfaces-  [ ] UT-  [ ] Document-  [ ] Web Hooks-  [ ] Deploy instructions & Dockerfile-  [ ] Starter Project Repo.. |Build| image:: https://travis-ci.org/Matvey-Kuk/cspark-python.svg?branch=master.. |Version| image:: https://img.shields.io/pypi/v/cspark-python.svg.. |Updates| image:: https://pyup.io/repos/github/matvey-kuk/cspark-python/shield.svg.. |Python3| image:: https://pyup.io/repos/github/matvey-kuk/cspark-python/python-3-shield.svg.. |codecov| image:: https://codecov.io/gh/Matvey-Kuk/cspark-python/branch/master/graph/badge.svg
Package: cspb
cspbThe cspb package contains a python driver class for communications with the Cluster System Power Board (cspb) hardware.IntroductionThe cspb package contains a wrapper driver around the smbus package. It enables easy communication with the cluster system power board hardware via an i2c bus.Currently supported methods are:set_powershutdownsignal_shutdownread_registerwrite_registerset_register_numbersend_commandDependenciesThis driver depends on the [smbus ](smbus · PyPI)package.CSPB code examplesExample 1: Display the current power statefrom cspb.CSPB import CSPB

i2c_bus_number = 1
i2c_address = 21
cspb = CSPB(i2c_bus_number, i2c_address)
power_state = cspb.read_register(cspb.PWR_STTS_REGSTR_ADDR)
print(power_state)Example 2: Request shutdown of all power slotsfrom cspb.CSPB import CSPB

i2c_bus_number = 1
i2c_address = 21
cspb = CSPB(i2c_bus_number, i2c_address)
cspb.shutdown(#ff)Installation Instructionscspb is a pure Python and requires no compilation. Install as follows:pip install cspb
Package: cspb-cli
cspb-cliThe Cluster System Power Board (cspb) Command Line Interface (cli) package contains a basic command line interface for use with the cluster system power board hardware.IntroductionThe cspb-cli package contains python code examples that make use of the cspb driver package to provide communications to the cluster system power board hardware via an i2c serial bus. The software was developed with a focus on the Raspberry Pi single board computer.This package contains the following programs:run_cspb_cli:A basic command line user interface for communicating with and programming
the cspb hardware.DependenciesThis package depends on the following packages:cspb,cmd2,smbusCode ExamplesRunning the GUI application:run_cspb_cliInstallation InstructionsThe cspb-cli package is pure Python and requires no compilation. Install as follows:pip install cspb-cli
Package: cspb-tools
cspb-toolsThe Cluster System Power Board (cspb) tools package contains example python software for communicating with the cluster system power board hardware.IntroductionThe cspb-tools package contains python code examples that make use of the cspb driver package to provide communications to the cluster system power board hardware via an i2c serial bus. The software was developed with a focus on the Raspberry Pi single board computer.This package contains the following programs:cspb_gui:A basic graphical user interface for communicating with and programming
the cspb hardware.DependenciesThis package depends on thecspbpackage.Code ExamplesRunning the GUI application:run_cspb_guiInstallation InstructionsThe cspb_tools package is pure Python and requires no compilation. Install as follows:pip install cspb_tools