Saravanan666/pypi-org huggingface dataset:
Package: cydtw
# cydtwDTW computation made efficient using Cython## Installation`pip install cydtw`## Usage and exampleSee file `test_compare.py`This module basically provides two main functions:```pythonfrom cydtw import dtw, dtw_paths1 = ...s2 = ...path, dtw_dist = dtw_path(s1, s2)dtw_dist = dtw_path(s1, s2)```
Package: cyes
Cyes - C without {;}    :hammer:Report a Bug·Request a Feature.Ask a QuestionTable of ContentsAboutBuilt WithGetting startedPrerequisitesMotivationFAQContributingLicenseAbout'cyes' is the transcompiler for Pythonistas who should code with C-like language(C/C++/C#...).It is simple, idiot CLI tool that auto semicolons&braces inserting by python-like 4-spacing indent and colons.For this project, you can use both 'C-yes' and 'cy-es' depending on your preference.'cyes'는 C-like 프로그래밍 언어(C/C++/C#...)를 써야 하는 파이썬 개발자를 위한 트랜스파일러입니다.간단하고 멍청하게 파이썬처럼 4개 공백문자와 쌍점으로 세미콜론과 중괄호를 자동 삽입하는 CLI 툴입니다.취향껏 'C-yes(씨-예스)'나 'cy-es(싸이-스)'로 부르시면 됩니다.Built Withpython3.6+typeranytreepoetryamazing-github-templateGetting startedPrerequisitesPython 3.8 or higherMotivationstudying transpilerMy little finger is more important than C language tradition.트랜스파일러(컴파일러 및 형식 언어) 공부를 위한 토이 프로젝트새끼손가락을 아껴 사용합시다.FAQContributingThanks for taking the time to contribute.기여에 관심을 가져주셔서 감사합니다.LicenseThis project is licensed under theMIT license.SeeLICENSEfor more information.이 프로젝트는 MIT 라이선스를 따릅니다.LICENSE파일에서 전문을 확인하실 수 있습니다.
Package: cyfi
CyFi: Cyanobacteria FinderCyFi is a command line tool that uses satellite imagery and machine learning to estimate cyanobacteria levels in small, inland water bodies. The goal of CyFi is to help water quality managers better allocate resources for in situ sampling, and make more informed decisions around public health warnings for critical resources like lakes and reservoirs.Read more atcyfi.drivendata.orgQuickstartInstallInstall CyFi with pip:pip install cyfiFor detailed instructions for those installing python for the first time, see theInstallationpage.Generate batch predictionsGenerate batch predictions at the command line withcyfi predict.First, specify your sample points in a csv with the following columns:latitudelongitudedateFor example,# sample_points.csv
latitude,longitude,date
41.424144,-73.206937,2023-06-22
36.045,-79.0919415,2023-07-01
35.884524,-78.953997,2023-08-04Then run:cyfi predict sample_points.csvThis will output apreds.csvthat contains a column for cyanobacteria density and a column for the associated severity level based on WHO thresholds.# preds.csv
sample_id,date,latitude,longitude,density_cells_per_ml,severity
7ff4b4a56965d80f6aa501cc25aa1883,2023-06-22,41.424144,-73.206937,34173.0,moderate
882b9804a3e28d8805f98432a1a9d9af,2023-07-01,36.045,-79.0919415,7701.0,low
10468e709dcb6133d19a230419efbb24,2023-08-04,35.884524,-78.953997,4053.0,lowTo see all of the available options, runcyfi predict --help.Generate prediction for a single pointOr, generate a cyanobacteria estimate for a single point on a single date usingcyfi predict-point.Just specify the latitude, longitude, and date as arguments at the command line.cyfi predict-point --lat 41.2 --lon -73.2 --date 2023-09-14This will print out the estimated cyanobacteria density and associated severity level based on WHO thresholds.2023-10-04 16:25:40.581 | SUCCESS  | cyfi.cli:predict_point:154 - Estimate generated:
date                    2023-09-14
latitude                      41.2
longitude                    -73.2
density_cells_per_ml        32,820
severity                  moderateTo see all of the available options, runcyfi predict-point --help.A note on severity levelsSeverity levels are based on World Health Organization (WHO) cyanobacteria density thresholds.Low: 0 - 20,000 cells/mlModerate: 20,000 - 100,000 cells/mlHigh: > 100,000 cells/mlHowever users should feel free to to use their own thresholds as makes sense for their needs.Visualizing predictionsLaunch theCyFi Explorerto view the Sentinel-2 imagery used to generate each cyanobacteria estimate!
Package: cyflann
cyflannis a Cython-based interface to theFLANNlibrary.
It allows you to call FLANN from Cython without python overheads; in particular, you can make many calls in parallel threads without the GIL.If you’re just looking for any Python interface to FLANN, the ctypes interface
that it ships with may be better for you. I wrote this interface foran applicationthat needs to run lots of independent searches without the GIL.The interface is currently incomplete; right now only float32 is supported, it
also has some known issues, and is probably less friendly in general than it
could be. If you want to use it, bug reports and/or pull requests are welcome.cyflann is only tested with FLANNs since 1.8.4.
cyflann supports FLANN’s OpenMP wrappers, but has not been tested with its
MPI or CUDA interfaces.InstallationIf you use theAnacondaPython
distribution, the easiest way to get both cyflann and FLANN, including on Windows, is:conda install -c conda-forge cyflannOtherwise, you need to install FLANN yourself (see below), and can then run:pip install cyflannNOTE:If you’re using FLANN 1.8.4 or earlier, a problem
with its pkg-config files means that cyflann won’t link properly.
This has been fixed in the development branch since April 2013, but the
1.9.1 release isn’t yet widely packaged.To work around this problem, set the environment variableFLANN_DIRto the
root of the installation before runningpiporsetup.py, e.g./usr/localif the libraries are in/usr/local/lib/libflann.so.
If you’re usingsudo, remember that it doesn’t necessarily propagate
environment variables by default;sudoFLANN_DIR=/whereverpip install cyflannwill work.Installing FLANNAnaconda:conda install-cconda-forgeflann(included as a requirement by the cyflann package).OSX:usingHomebrew,brew install homebrew/science/flann; this gives you 1.9.1, but ifpkg-configdoesn’t work for you for some reason, it’sFLANN_DIR=$(brew--prefix).Ubuntu:apt-getinstall libflann1flann-dev; setFLANN_DIR=/usr.Fedora:yum install flannflann-devel; setFLANN_DIR=/usr.CentOS:EPELhas flann packages,
but they’re old and not tested with cyflann. Compile from source.Arch:Install theAUR flann package;
cyflann wantsFLANN_DIR=/usr.From source:Downloadthe release source,
and follow theuser manualto install.
If you’re installing 1.9.1 and havepkg-configavailable,
you shouldn’t need to setFLANN_DIR,
but if not set it to whatever you setCMAKE_INSTALL_PREFIXto
(/usr/localby default).
Package: cyflash
Cyflash is a tool for uploading firmware to Cypress PSoC devices via Cypress’s
standard bootloader protocol.Basic usage is simple: specify an interface to connect to the device via
(currently only serial is supported) and a .cyacd file to upload, and cyflash
does the rest.Cyflash also has the advantage of being about 5 times faster than Cypress’s
tool, being cross-platform, and not requiring all of PSoC creator to work.Install cyflash from pypi withpip install cyflash, or (from source)python setup.py install.Example command line:cyflash –serial=/dev/tty.usb-device myfirmware.cyacdExample output:Initialising bootloader.
Silicon ID 0x04a61193, revision 17.
Array 0: first row 22, last row 255.
Device application_id 0, version 258.
Uploading data (198/198)
Device checksum verifies OK.
Rebooting device.If cyflash detects a valid metadata record on the device already, it will read
and compare this to your image’s metadata. By default, cyflash will prompt you
before overwriting the firmware with an older version or one with a different
application ID. You can force this behaviour with –downgrade or –nodowngrade
and –newapp and –nonewapp, respectively.Cyflash is still quite new, and should be considered beta-quality software.
Pull requests and bug reports are most welcome.
Package: cyflib
CyfLib es una librería de código abierto para python. Lo que se pretende con esta librería es facilitar la escritura del código en Python y añadir funciones adicionales. Información completa:http://cyflib.cu.ccClasesProgressBar. Construcción de barras de progreso mostradas en consola.BitCoin. Funciones relacionadas con BitCoin. No permite enviar BitCoins.DataBase. Bases de datos sencillas.UserConfig. Lectura de archivos de configuración de una manera fácil.RSA. Sistema de criptografia asimétrica RSA: cifrado, descifrado y firma.SQL. Permite usar SQLLite de una manera sencilla.Información de las clasesPuedes encontrar más información enhttp://cyflib.cu.cc
Package: cyged
Graph Matching FrameworkThis is a Cython framework to perform graph matching.
It uses the flexibility of python and the efficiency of compiled c code to
package contains the core files to perform graph matching.InstallationPrerequisitesPython 3.9NumpyA C++ compatible compilerInstall# Clone repogitclonehttps://github.com/CheshireCat12/graph-matching-core.git[folder-name]# Move to repo directorycd[folder-name]#Create python virtual environment with pythonpython-mvenvvenvsourcevenv/bin/activate# Install Numpypipinstallnumpy# Compile and install the codepipinstall-e.Run testspython-mpytesttestsHow to use# More example available in ./tests/fromcyged.graph_pkg_coreimportGEDfromcyged.graph_pkg_core.edit_cost.edit_cost_vectorimportEditCostVectorfromcyged.graph_pkg_core.graph.edgeimportEdgefromcyged.graph_pkg_coreimportGraphfromcyged.graph_pkg_core.graph.label.label_edgeimportLabelEdgefromcyged.graph_pkg_core.graph.label.label_node_vectorimportLabelNodeVectorfromcyged.graph_pkg_core.graph.nodeimportNodefromcyged.graph_pkg_coreimportLoaderVectorged=GED(EditCostVector(1.,1.,1.,1.,'euclidean'))n,m=4,3graph_source=Graph('gr_source','gr_source.gxl',n)graph_target=Graph('gr_target','gr_targe.gxl',m)# Init graph source: add nodes and edgesgraph_source.add_node(Node(0,LabelNodeVector(np.array([1.]))))graph_source.add_node(Node(1,LabelNodeVector(np.array([2.]))))graph_source.add_node(Node(2,LabelNodeVector(np.array([1.]))))graph_source.add_node(Node(3,LabelNodeVector(np.array([3.]))))graph_source.add_edge(Edge(0,1,LabelEdge(0)))graph_source.add_edge(Edge(1,2,LabelEdge(0)))graph_source.add_edge(Edge(1,3,LabelEdge(0)))graph_source.add_edge(Edge(2,3,LabelEdge(0)))# Init graph target: add nodes and edgesgraph_target.add_node(Node(0,LabelNodeVector(np.array([3.]))))graph_target.add_node(Node(1,LabelNodeVector(np.array([2.]))))graph_target.add_node(Node(2,LabelNodeVector(np.array([2.]))))graph_target.add_edge(Edge(0,1,LabelEdge(0)))graph_target.add_edge(Edge(1,2,LabelEdge(0)))edit_cost=ged.compute_edit_distance(graph_source,graph_target)Parallelization[...]fromcyged.graph_pkg_core.algorithm.matrix_distancesimportMatrixDistancesged=GED(EditCostVector(1.,1.,1.,1.,'euclidean'))# List of graphssource_graphs=[grs1,grs2,...,grsm]target_graphs=[grt1,grt2,...,grtn]mat_dist=MatrixDistances(ged,parallel=True)mat_edit_dist=mat_dist.calc_matrix_distances(source_graphs,target_graphs,heuristic=True,num_cores=8)CitePlease cite our paper if you use this code in your work:@inproceedings{GilliozR22,
  author    = {Anthony Gillioz and
               Kaspar Riesen},
  editor    = {Maria De Marsico and
               Gabriella Sanniti di Baja and
               Ana L. N. Fred},
  title     = {Improving Graph Classification by Means of Linear Combinations of
               Reduced Graphs},
  booktitle = {Proceedings of the 11th International Conference on Pattern Recognition
               Applications and Methods, {ICPRAM} 2022, Online Streaming, February
               3-5, 2022},
  pages     = {17--23},
  publisher = {{SCITEPRESS}},
  year      = {2022},
  url       = {https://doi.org/10.5220/0010776900003122},
  doi       = {10.5220/0010776900003122}
}
Package: cygenja
cygenjais a very simple code generator.What it iscygenjatakes templatedCythoncode as input and generates typedCythonclasses and functions. The idea is to mimic theC++template mechanism forCython(and disregard the
experimentalCythonfused types. We use the excellent templating languageJinja2) and some very basic rules.cygenjais used in most of ourCythonprojects.What it is notcygenjais not an automaticCythoncode generator like the ones listed onAutoPxd.cygenjadoesnotparseC/C++header files to automatically produce Cython bindings.
Package: cygnet_common
docstestspackageCommon code used in the Cygnet project.Free software: BSD licenseInstallationpip install cygnet_commonDocumentationhttps://cygnet-common.readthedocs.org/DevelopmentTo run the all tests run:toxChangelog0.1.0 (2015-08-29)First publicly visibile code.0.1.1 (2015-11-16)Adding string type unification
Package: cygnusdb
# CygnusDBCygnusDB is a lightweight python database that uses no external libraries.Uses JSON for data storage with the .db file extension.Uses OS for file path.Basic functionality:set,get,delete, andreset## Why use CygnusDB?It’s simple. It takes very few lines of code to modify a database file, and it works for basic applications where MongoDB or SQLITE are overkill.It’s easy to get started with. All you do is importcygnusdb, set the file path to your.dbfile, and write whatever code you need to utilize the database.### InstallationCurrently CygnusDB is not on PyPi, so you have to clone the repo and executepip install .in the root directory of the project.### UsageIn order to use CygnusDB, you need to install it like is outlined above. After installation, you simply need to import it:`py from cygnusdb import CygnusDB `Then, define the file path of your.dbfile:`py db =CygnusDB("./user.db")`Once that is done, you can modify database data with simple code:`pydb.set("name", "Xhsted") `And retrieve the data:`pydb.get("name")`Since it uses JSON, the data is very versatile, and you can save data under any name you may want, such as a name, email, or even a personal bio.
Package: cygraph
CygraphA graph theory library implemented in CythonInstallationFirst, try:pipinstallcygraphif that doesn't work, try:pipinstallgit+https://github.com/lol-cubes/cygraphUsagePythonHere is an example Python script that utilizes some of the features of cygraph.importcygraphascgimportcygraph.algorithmsasalgG=cg.graph(vertices=list(range(4)))G.add_edges({(1,2),(2,3),(3,1)})children=G.get_children(1)print(f'{children=}')components=alg.get_number_connected_components(G)print(f'{components=}')It should output:children={2, 3}
components=2CythonHere is the above script but with static typing in Cython.#!python
#cython: language_level=3
import cygraph as cg  # cg.graph function.
cimport cygraph.graph_ as gp  # StaticGraph and DynamicGraph types.
cimport cygraph.algorithms as alg

cdef gp.DynamicGraph G = cg.graph(vertices=list(range(4)))
G.add_edges({(1, 2), (2, 3), (3, 1)})
cdef set children = G.get_children(1)
print(f'children={str(children)}')
cdef int components = alg.get_number_connected_components(G)
print(f'components={components}')For more information on the Python and Cython APIs, seethe documentationNOTEThe current documentation is not up-to-date.ContributionI am currently not accepting any pull requests. This project is still in its very early stages and I have many things in mind to do with it. Once I get those things done, I will add contribution guidelines.
Package: cygrid
Cygrid allows to resample a number of spectra (or data points) to a regular grid - a data cube - using any valid astronomical FITS/WCS projection. The method is a based on serialized convolution with finite gridding kernels. Currently, only Gaussian (radial-symmetric or elliptical) kernels are provided (which has the drawback of slight degradation of the effective resolution). The algorithm has very small memory footprint, allows easy parallelization, and is very fast.
Package: cygrpc
python-cygrpcMicro-Framwork for gRPC with REST expose support.installationUsing pippip install cygrpcUsing git repositorygit+https://github.com/cuemby/python-cygrpc.git#egg=cygrpcUsageServerParams:host : str =  server host, by default is '0.0.0.0'port : int = server port for listen. by default is 50051max_threads : int =  set threads workers for server, by default is 10interceptors: tuple(InterceptorImplementation) = server interceptors middlewares. by default is None.http_port: int = port for http gatewayif you decide used all values by default, you can setup the server in less linesfromcygrpc.serverimportServerserver=Server()server.add_service(calculator_api_pb2_grpc,ServiceImpl)server.start()Example using all params:fromcygrpc.serverimportServer# Initialization of server definition, 'host', 'port', 'max_threads' has be optionals.# By default the __init__ function set the same values. if don't you wanna set interceptors only remove the paramserver=Server(host="0.0.0.0",port=50051,max_threads=10,interceptors=(MyAuthInterceptor(),))# attach service to server, repeat for multiple servicesserver.add_service(calculator_api_pb2_grpc,ServiceImpl)# finally start server.server.start()Implement serviceThe implementation is the same.# import  rest decoratorfromcygrpc.gateway.httpimportrestclassServiceImpl(calculator_api_pb2_grpc.CalculatorAPIServicer):"""Service logic implementation."""defSum(self,request,context):total=0foraddendinrequest.addends:total+=addendresponse=pb.SumResponse(sum=total)returnresponserest routefor add rest route add the decorator @rest to method definition:# import rest decoratorfromcygrpc.gateway.httpimportrestclassServiceImpl(calculator_api_pb2_grpc.CalculatorAPIServicer):"""Service logic implementation."""@rest("/v1/calculator/sum",method="POST")defSum(self,request,context):total=0foraddendinrequest.addends:total+=addendresponse=pb.SumResponse(sum=total)returnresponseInterceptorsBase Interceptor : Base interceptor implementation for create your custom interceptorfromcygrpc.middlewareimportCyGrpcInterceptorclassCustomInterceptor(CyGrpcInterceptor):defintercept_service(self,continuation,handler_call_details):# for continue to method implementationreturnself.on_success(continuation,handler_call_details)# for terminate requestreturnself.on_failed(grpc.StatusCode.UNAUTHENTICATED,"Validate authentication failed.")Authentication interceptor: provider a base for authentication middleware interceptorfromcygrpc.middleware.authimportCyGrpcAuthInterceptorclassMyAuthInterceptor(CyGrpcAuthInterceptor):defauth_process(self,continuation,handler_call_details):""""..... my auth validation process ...."""returnTrueAuthors:Fabio Morenofabio.moreno@cuemby.com
Package: cygtrace
cygtracegcc instrumentation based tracer for c/c++/pybind11InstallationRequirements:gcccmakepython3 with pybind11 (optional)Python packagepipinstall.System-wise libraryTo build/install the library:mkdirbuildcdbuild
cmake..
make
sudomakeinstall# to install the library in /usr/local/libTo build the examples:cdexamples
mkdirbuildcdbuild
cmake..
makeUsageWith Python scriptRun program/script/command with tracercygtrace./path/to/executable
cygtracepython3./path/to/script.pyDemangle json trace filecygtrace-d-ftrace.jsonGet compiling parameters (gcc)gccexample.c$(cygtrace-I-L-p)When compiling dynamically loaded libraries (e.g., pybind11), add -m flag (disables libcygtrace linking)g++example.cpp$(cygtrace-I-L-p-m)Manual instructionsTo enable tracing in pybind11 code, add these to the compiler args (gcc):-finstrument-functions-Wl,--export-dynamicfor c/cpp programs, also link the cygtrace library:-finstrument-functions-Wl,--export-dynamic-lcygtraceTo enable tracing in python (pybind11), start the python interpreter like this (assuming library installed in /usr/local/lib):LD_PRELOAD=/usr/local/lib/libcygtrace.sopython3xxx.pyNotesTo view JSON-formatted profiling results, go tochrome://tracingorPerfetto UIthe names of functions withstatickeyword or within anonymous namespace are unobtainable in the tracer (appear as "<unknown>")TroubleshootingCMake could not find pybind11pip3install"pybind11[global]""error while loading shared libraries: libcygtrace.so: cannot open shared object file: No such file or directory"exportLD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
Package: cygx1
CygX1The immensity of the universe is difficult to grasp.To use cygx1, follow the following steps:Create a python virtual environment or use system wide environment$ python3 -m venv venv
$ source venv/bin/activateInstall cygx1 package with pip.$ pip install cygx1Get cygx1 command line help$ cygx1 --help
Package: cyheapq
This module is an adaptation of merge, nlargest and nsmallest from the heapq module in Cython. This
makes it just a tad bit faster.x 1.5 for nlargest and nsmallest (given a particular micro benchnmark of course). x 3 for merge.
nlargest performance is comparable with cytoolz.topk (but cyheapq also provides nsmallest). merge
is around 8 times faster than cytoolz.merge_sorted. The microbenchmark used involves sifting /
merging 10e6 random floats.
Package: cyheif
CyHeif - Cython based Python binding for libheifPurposeHEIF and HEIC read and write support for Python using LibHeif that works across platforms (Windows and Linux) and has write support for EXIF metadata and HEIC output.
This package provides Cython based Python binding for libheif allowing access to High-Efficiency Image Format from Python. One of the main goals for CyHeif is that it should work on Windows and allow for manipulating HEIF/HEIC images from Python in Windows. It works on Windows (unlike PyHeif) and Linux. This is currently barebones but has the critical elements in place and adding functionality for working with HEIF/HEIC files and exposing them to Python as Pillow Images for manipulation.FunctionalitySupports the following:Reading a HEIC file into a Pillow ImageReading the EXIF metadata from a HEIC file into a Pillow Image.ExifUpdating the EXIF metadata from a HEIC file and writing it back as HEICWriting a Pillow Image out as a HEIC fileUse Pillow functionality for other image manipulations - resize, transforms etc.Known IssuesNo Documentation - working on it. No binary distributions yet - help welcome to create these. See example/run.py for usage of key functionality.RequirementsYou need a compiled, installed, working, accessible version of heif.dll on Windows. You will also need a working C compiler. To get a C compiler, you can download theMicrosoft Visual Studio Community Edition.You can compile and install libheif on Windows through vcpkg by running the following command:vcpkg.exe install libheif --triplet x64-windowsMore details onvcpkg is available here.On Linux, Ubuntu based distributions can install libheif and libheif-dev with the following commands:sudo apt install libheif
sudo apt install libheif-devOnce the installation is successful, you should be able to use the extension module by runningpip install. Seeexample/run.pyfor how to use this extension module.
Package: cyhilbert
cyhilbertA cythonized version of that one hilbert function you keep copy-pasting. See the original implementation ofHilbert curves in O(log(n)) time. Inputs must be in the range 0 to 2^16-1, inclusive.fromcyhilbertimporthilbert,DIMS,BITS_PER_DIM,MAXDIMS#=> 2BITS_PER_DIM#=> 16MAX#=> 65535hilbert(0,0)#=> 0hilbert(1,0)#=> 1hilbert(1,1)#=> 2hilbert(0,1)#=> 3hilbert(0,2)#=> 4hilbert(0,3)#=> 5hilbert(1,3)#=> 6hilbert(1,2)#=> 7