Saravanan666/pypi-org huggingface dataset:
Package: cpmoptimize
A decorator for automatic algorithms optimization via fast matrix exponentiationInstallationYou can install the stable version of the library using pip:sudo pip install cpmoptimizeOr install a previously downloaded and extracted package:sudo python setup.py installBasic ExampleSuppose we want to calculate the ten millionthFibonacci numberusing a program in Python. The function with a trivial algorithm is rather slow:deffib(n):a=0b=1foriinxrange(n):a,b=b,a+breturnaresult=fib(10**7)# Time: 25 min 31 secBut if we apply the optimizing decorator, the function will give you the answer much faster:fromcpmoptimizeimportcpmoptimize@cpmoptimize()deffib(n):a=0b=1foriinxrange(n):a,b=b,a+breturnaresult=fib(10**7)# Time: 18 sec (85x faster)DescriptionActually, the decorator disassembles bytecode of a function using prettybyteplaylibrary, analyzes the code, and tries to reducetime complexityof the algorithm used in it usingfast matrix exponentiation.The decorator uses a method implemented byAlexander Skidanovin his simpleoptimizing interpreter.A detailed description of the library (including an idea explanation and an interface reference) is available inEnglishandRussian.AuthorCopyright (c) 2014, 2015 Alexander Borzunov
Package: cpmpy
CPMpy is a Constraint Programming and Modeling library in Python, based on numpy, with direct solver access.Easy to integrate with machine learning and visualisation libraries, because decision variables are numpy arrays.Solver-independent: transparently translating to CP, MIP, SMT, SATIncremental solving and direct access to the underlying solversand much more...Documentation:https://cpmpy.readthedocs.io/CPMpy is still in Beta stage, and bugs can occur. If so, please report the issue on Github!Open SourceCPMpy has the open-sourceApache 2.0 licenseand is run as an open-source project. All discussions happen on Github, even between direct colleagues, and all changes are reviewed through pull requests.Join us! We welcome any feedback and contributions. You are also free to reuse any parts in your own project. A good starting point to contribute is to add your models to the examples folder.Are you a solver developer? We are keen to integrate solvers that have a python API on pip. If this is the case for you, or if you want to discuss what it best looks like, do contact us!Teaching with CPMpyCPMpy can be a good library for courses and projects onmodeling constrained optimisation problems, because its usage is similar to that of other data science libraries, and because it translates to the fundamental languages of SAT, SMT, MIP, and CP transparently.Contact Prof. Tias Guns if you are interested in, or are going to develop, teaching material using CPMpy. For example we have CPMpy snippets of part of Pierre Flener's excellent"Modelling for Combinatorial Optimisation [M4CO]".AcknowledgmentsPart of the development received funding through Prof. Tias Guns his European Research Council (ERC) Consolidator grant, under the European Union’s Horizon 2020 research and innovation programme (grant agreement No 101002802,CHAT-Opt).You can cite CPMpy as follows: "Guns, T. (2019). Increasing modeling language convenience with a universal n-dimensional array, CPpy as python-embedded example. The 18th workshop on Constraint Modelling and Reformulation at CP (ModRef 2019).@inproceedings{guns2019increasing,
    title={Increasing modeling language convenience with a universal n-dimensional array, CPpy as python-embedded example},
    author={Guns, Tias},
    booktitle={Proceedings of the 18th workshop on Constraint Modelling and Reformulation at CP (Modref 2019)},
    volume={19},
    year={2019}
}
Package: cpnnaming
cpnnamingBrado Internal Tool to make sure our paid media campaigns follow our campaign naming template.
The package will perform quality check and return campaign names that are not following naming template.Steps:Connect to the PostgreSQL database using given credentials and get a list of specific campaign names usingschemaandtablenamesUse gs2df package to get reference file uploaded on Google Sheets (Campaign Naming Rules) and runcampaignnaming-qa scriptto check campaign names against rulesTheCampaign Naming Rulesis a new Google Sheet thatONLYdocuments rules for campaign naming template. The Google Sheets synced with theCampaign Naming Convention. So once rules are changed, mannually adjustment is not required.Upload failed campaign naming dataset to a new table (Failed Campaign Name) into databaseRules for Campaign Naming QAMake sure there are 10 underscoresIn sections that are not up to the creator (Product & Country), make sure they have the correct information. Ex. Channel needs to contain one of the following: SE, DN, PS, EM, YT, IR, APP.These are "Non-Paid Social" Campaigns. They should not contains "PS" or any Social Tactic/Engine.New rules should always be updated into the Google Sheets file "Campaign Naming Convention" before check failed campaign names!InstallationInstall the whole package$pipinstallcpnnamingFunctions in package[retrieve_data] - connect to the dataset and download qa check campaign names as a data tablefromcpnnaming.retrieve_dataimportcntdb[qa_check] - QA check for each campaign names retreived and return campaign names that fails the QA checkfromcpnnaming.qa_checkimportqa_checking[upload_result] - upload campaign names that fails the QA check back to the datasetfromcpnnaming.qa_checkimportupld_fileUsageEnter the schema and table name to download campaign names as a dataframe usingretrieve_data.get_data(schema,table)Note: The template for datatable naming TBD.Follow thisinstructionto get a .json file and put it in the same directory with .py fileAny changes in QA rules need to be updated inCampaign Naming ConventionGoogle Sheet.Import reference excel from Google Sheets API usingrules=gs2df.gs2df('client_secret_540551931166-21q6c10ctr74s4t9d83j1muknjvuoo69.apps.googleusercontent.com.json','Campaign Naming Rules')and reach different sheets using indexa[0],a[1],...Note:first parameter: your own .json file,second parameter: Google Sheets NameCreate a new table calledCampaign Naming Failedand upload this dataset to a new table usingupload_table(schema, table, failed_df)Note: Uploaded table will replace existing table every time.
Package: cpntools4py
CPNTools4PyCPNTools4Py is a small python 3 scripts. These scripts support parsing of xml file which export color petri net from CPNTools,
define a data structure for Petri nets and labelled partial orders.
It is completely open source and be used in academia.First ExampleA very simple example, to what you appetite:importcpntools4pyxml_doc=cpntools4py.read_xml('<path_to_xml_file>')cpn=cpntools4py.CPN(xml_doc)print(cpn.places)# Get placesReferenceModulecpntools4pyThis is CPNTools4Py main module, it holds the various Petrei net elements, arcs, places, transitions.Methodcpntools4py.read_xmldefread_xml(file_path):Read Xml file editing by CPNTools.xml_doc=read_xml('/path/to/PetriNet.xml')Call APIstr file_path: Input the XML file of Petri nets editing by CPNTools.return root Element: Return an object that holds the root element of the node information of CPNTools.Methodcpntools4py.to_snakesdefto_snakes(cpn)Convert to SNAKES from CPNToolsxml_doc=cpntools4py.read_xml('<path_to_xml_file>')cpn=cpntools4py.CPN(xml_doc)net=cpntools4py.to_snakes(cpn)Call APIobject CPN: Input the CPN object.return object net: return the SNAKES net object.Modulecpntools4py.petri_netThis is CPNTools4Py data structure module, it holds the various Petrei net elements, arcs, places, transitions.ClassPlaceA place of a Petri net.Placeclass has 4 variables, each of which returnsid,text,typeandtokens.
Each variable holds the Place name, color attirbute, and initial marking set by CPNTools. Since id is an identification
number, it is automatically assinged at the time of generation by CPNTools.xml_doc=cpntools4py.read_xml('<path_to_xml_file>')cpn=cpntools4py.CPN(xml_doc)forplaceincpn.places:print(place.id)# 'id0123456789'ClassTransitionsA Transition of a Petri net.Transitionclass has 3 variables, each of which returnsid,textandtime.
Each variable holds the Transition name and time inscription. id is and identification number.xml_doc=cpntools4py.read_xml('<path_to_xml_file>')cpn=cpntools4py.CPN(xml_doc)fortransitionincpn.transitions:print(transition.text)# 'Trans1'ClassArcA Arc of a Petri net.Arcclass has 4 variables, each of which returnsid,orientation,placeendandtransend.
TheArcclass holds the connection information between places and transitions.orientationholds the orientation of the arc,placenedandtranendholdes the nodes to be connected.xml_doc=cpntools4py.read_xml('<path_to_xml_file>')cpn=cpntools4py.CPN(xml_doc)forarcincpn.arcs:print(arc.orientation)# 'PtoT'
Package: cpool
A simple connection pool handler that maintains a pool of connection objects
(of whatever type you specify) attached to each thread.Sample usagefrom mylibrary import MyConnectionClass
from cpool import CPool

MyPool= CPool(MyConnectionClass)
MyPool.configure(host = 'myhost', port = '12345')
conn = MyPool()
conn.do_comething()Downloadhttps://github.com/ex-nerd/cpoolhttp://pypi.python.org/pypi/cpool/
Package: cpopen
# CPopenA C reimplementation of the tricky bits of Python’s Popen.It is currently implemented in a very specific way and might break under
general use.# TODOSupport string invocation - Currently only support array invocationSupport after fork funcSupport all stream modes - Currently everything has to be PIPE# Usage`{.python}import cpopen proc =cpopen.CPopen(["echo","3"])proc.communicate() `# Running the tests`{.bash}nosetests tests/tests.py `
Package: cporter
Cporter======Cporter, sync files between Cloud Storage [Dropbox, UpYun, Qiniu, ...]### INSTALL# pip install cporter### USAGE# cporter --helpUsage: cporter.py [OPTIONS] COMMAND [ARGS]...Cporter, sync files between Cloud Storage [Dropbox, UpYun, Qiniu]Commands:clean   delete config file.config  config <storage> to sync.sync    sync files between <source> and <dest>.Options:--version  Show the version and exit.--help     Show this message and exit.### TODO- ~~Package~~- ~~sync upyun to qiniu~~- ~~sync dropbox to qiniu~~- sync qiniu to upyun/dropbox
Package: cpotp
cpotpCommand line tool to copy the latest OTP received in the connected Android device to the clipboard.Why?Simply because I don't want to pickup my phone, open the SMS app, remember the OTP, and then enter it.Now you might say, haven't you heard abouthttps://messages.google.com? Well, that's what is being used in the package. Selenium Chrome driver automates this process.PrerequisitePython >= 3.6Google Chrome/Chromium/Microsoft Edge/Microsoft Edge Dev for Linuxxclip(if you're on Linux)Android deviceInstallationInstall cpotpcpotp can be installed using pippip install cpotpor install it from the sourcegit clone https://github.com/riteshpanjwani/cpotp.git
cd cpotp
python setup.py installInstall xclip (Linux only)If you are using any fairly recent Debian Linux-based OS:sudo apt install xclipelse, you can install it directly from the source:git clone https://github.com/astrand/xclip.git
./bootstrap
./configure
make
make installVerify that it installed:man xclipSet an environment variableNext, you need to set an environment variable called CHROME_USER_DATA_DIR, in Chrome/Edge/Chromium browser new tabchrome://versionand set this environment variable to path given in "Profile Path"
except the "/Default" part. For example:export CHROME_USER_DATA_DIR=/home/<username>/.config/google-chromeSelenium will create a Chrome user profile called "cpotp" in this directory.UsageNote: the following command downloads the following files on the first run:appropriateChromium driversusingpydermanNLTK punkt packagetotokenizethe SMSOn the first run, scan the QR code using your Messages app on the phone and pair it. Close any instance ofhttps://messages.google.comand fire up a terminal / command prompt and run:cpotp-setupOn subsequent runs, you just have to run:cpotpLicenseFor license information, seeLICENSE.md.
Package: cpp2py
cpp2pyA tool to convert c/c++ code to python codehow to install:pip install cpp2pyhow to use in python:import cpp2py
cpp2py.c2py(input_c_file_path, output_py_file_name)
cpp2py.py2c(input_py_file_path, output_c_file_name)from cpp2py import cpp2py
cpp2py.c2py('./c1.c', 'c1.py')c1.c:int main(int argc, char **argv)
{
int a=1;
int b=2;
int c;
c=a+b;
return 0;
}generated:
c1.pydef main(argc, argv):
	a = 1
	b = 2
	c = a+b
	return 0how to use in cmd(TBD):python -m cpp2py -i input_c_file_path -o output_py_file_path -f convert_format
eg: python -m cpp2py -i input_file.c -o output.py -f c2pyconvert_format: c2py py2c cpp2py py2cppcurrent stagec2py C
py2c X
cpp2py X
py2cpp X

x--not finished
y--finished
C--partly working
Package: cppasv
Google C++ Benchmarks in Airspeed Velocitycppasvis a Python module that wrapsGoogle Benchmarkbenchmarks written in C++ for execution withAirspeed Velocity, a tool to run Python benchmarks.For an example on how to use this module, have a look at theflatsurf/flatsurf, in particular itsasv configurationand thePython benchmarks that wrap the C++ benchmarks.
Package: cpp-automation-utility
CAUCAU stands forC++AutomationUtility and is pronounced  likecow:cow2:. The purpose is to provide templates and CLI scripts to instantiate/manage/run C++ projects in a devops environment. CAU covers common functionality across projects like:Running a static analyzer (clang-tidy)Running a memory leak test (valgrind)Running unit testsRestore dependencies (conan)Building the project (conanandcmake)Providing CI/CD templates forgitlabThe scope of CAU is really meant for how we do C++ projects at AldridgeSoftwareDesigns. As such, mileage may vary when applying to projects outside the "standard" configuration for an AldridgeSoftwareDesigns C++ project.
Package: cpp-aws-s3-pdf
CPP_AWS_S3_PDFOverviewCpp_aws_s3_pdf is a Python utility library designed to streamline the process of combining objects from Amazon S3 into a
single
PDF file.
This tool is ideal for users who need to aggregate content stored in S3 buckets and generate consolidated PDF documents
for reports, archives, or data presentation.FeaturesS3 Integration: Seamlessly connect to Amazon S3 buckets and access objects.PDF Generation: Efficiently combine multiple objects into a single PDF file.Security: Ensures secure access to S3 resources with AWS credentials, with expiration on combined files.InstallationTo install Your-Library-Name, simply use pip:pipinstallcpp_aws_s3_pdfUsageHere's a quick start on how to usecpp_aws_s3_pdf:Set up AWS Credentials: Ensure your AWS credentials are configured properly.
This can be done by following the guidelines outline on
theBoto3 ConfigurationPage.Import and Initialize:fromcpp_aws_s3_pdf.s3_pdfimportS3Pdfs3_pdf=S3Pdf(bucket_name='your-bucket-name')Combine S3 Objects into PDF:objects_to_combine=['object_key1','object_key2',...]download_url=s3_pdf.combine_objects(objects_to_combine,output_bucket_name='my_combine_bucket')# object is over-written with watermarked object in buckets3_pdf.watermark_file(objects_to_combine[2],"This is a sample watermark.")# convert_object_to_pdfdownload_url=convert_image_to_pdf("object_image.jpg")ConfigurationAWS Region: Set the AWS region where your S3 bucket is located.DependenciesAWSboto3PyPDFPillowFor local developmentClone repositoryhttps://github.com/noble-cc/cpp_aws_s3_pdf.gitCreatevenvenvironment and activate environmentBuild projectpython-mbuildTo install project locally:pipinstall<file_path>*-any.whlLicenseThis project is licensed under the MIT License.
Package: cppbuiltins
cppbuiltinsIn what followspythonis an alias forpython3.5or any later version (python3.6and so on).InstallationInstall the latestpip&setuptoolspackages versionspython-mpipinstall--upgradepipsetuptoolsUserDownload and install the latest stable version fromPyPIrepositorypython-mpipinstall--upgradecppbuiltinsDeveloperDownload the latest version fromGitHubrepositorygitclonehttps://github.com/lycantropos/cppbuiltins.gitcdcppbuiltinsInstallpythonsetup.pyinstallDevelopmentBumping versionPreparationInstallbump2version.Pre-releaseChoose which version number category to bump followingsemver
specification.Test bumping versionbump2version--dry-run--verbose$CATEGORYwhere$CATEGORYis the target version number category name, possible
values arepatch/minor/major.Bump versionbump2version--verbose$CATEGORYThis will set version tomajor.minor.patch-alpha.ReleaseTest bumping versionbump2version--dry-run--verbosereleaseBump versionbump2version--verbosereleaseThis will set version tomajor.minor.patch.Running testsInstall dependenciespython-mpipinstall-rrequirements-tests.txtPlainpytestInsideDockercontainer:docker-compose--filedocker-compose.ymlupBashscript:./run-tests.shPowerShellscript:.\run-tests.ps1
Package: cppcheck-codequality
cppcheck-codequalityAboutI wanted reports from CppCheck to appear in GitLab Merge Requests asCode
Quality reports,
which is a JSON file defined by the Code Climate team/service.That's all this does: convert CppCheck XML to Code Climate JSON.UsageIt is primarily used as a console script. As such, ensure you have Python 3's "scripts" directory in yourPATHvariable.
For example, on Linux, that might be$HOME/.local/bin.To test, try the--helpor--versionflags:cppcheck-codequality--helpCppCheck already has a script to convert its XML report to HTML for easy
human reading. See "Chapter 11 HTML Report" in theCppCheck ManualThis script follows that example and provides similar command-line options.
A typical workflow might look like this:# Generate CppCheck report as XMLcppcheck--xml--enable=warning,style,performance./my_src_dir/2>cppcheck_out.xml# Convert to a Code Climate JSON reportcppcheck-codequality--input-filecppcheck_out.xml--output-filecppcheck.jsonIf you wanted, you could invoke the script directly as a module, like this:# Run as a module instead (note the underscore in the module name here)python-mcppcheck_codequality--input-file=cppcheck_out.xml--output-file=cppcheck.jsonNow, in your GitLab CI script,upload this fileas a Code Quality report.my-code-quality:script:-[...]artifacts:reports:codequality:cppcheck.jsonContributingSign the contributor agreement (coming soon)Format withblackCheck withpylintCredits & TrademarksCppCheck is an open-source project with a GPL v3.0 license.http://cppcheck.sourceforge.nethttps://github.com/danmar/cppcheck"Code Climate" may be a registered trademark of Code Climate, Inc. which provides
super-cool free and paid services to the developer community.https://codeclimate.comhttps://github.com/codeclimate"GitLab" is a trademark of GitLab B.V.https://gitlab.comhttps://docs.gitlab.com/ee/user/project/merge_requests/code_quality.htmlAll other trademarks belong to their respective owners.
Package: cppcheck-junit
Tool that convertscppcheckXML output to JUnit XML format.
Use on your CI servers to get more helpful feedback.InstallationYou can install, upgrade, and uninstallcppcheck-junitwith these commands:$pipinstallcppcheck-junit$pipinstall--upgradecppcheck-junit$pipuninstallcppcheck-junitUsageEnable XML version 2 output, enable additional rules (for exampleall), and redirectcppcheckstderrto a file:$cppcheck--xml-version=2--enable=all.2>cppcheck-result.xmlConvert it to JUnit XML format:$cppcheck_junitcppcheck-result.xmlcppcheck-junit.xmlIf nocppcheckerrors are generated, a single"Cppcheck success"test case is
output so that CI tools like Bamboo will not fail on the JUnit task.Releases2.4.0 - 2024-01-13Support Python 3.12Include error info from multiple locationsAddedjunitparseras a dependency to write junit outputUpdate unitests for argument parserEnable mypy for type checking2.3.0 - 2023-04-30Drop Python 3.7 support and support Python 3.112.2.0 - 2022-03-29Add optional argument for setting return code when cppcheck found errors.Drop Python 3.6 and support Python 3.10.2.1.0 - 2020-12-30Drop Python 3.5 and support Python 3.9.2.0.0 - 2020-03-29Drop Python 2.71.7.0 - 2019-12-14Drop Python 3.4 and support Python 3.8.Include license file.1.6.0 - 2018-07-09Drop Python 3.3 and support Python 3.7.1.5.0 - 2017-10-18Fix Bamboo support by always filling innameandclassnameattributes on JUnit error
test cases.1.4.0 - 2017-06-14Expand JUnit schema support by adding in some missing fields.1.3.0 - 2016-12-31Support Python 3.6.1.2.0 - 2016-07-27Actually handlecppcheckerrors that don’t have a<location>tag.
Update test suite to usetox.1.1.2 - 2016-04-13Handlecppcheckerrors that don’t have a<location>tag.1.1.1 - 2016-04-11Fixrequirements.txtinclude forsetup.py.1.1.0 - 2016-04-11If nocppcheckerrors are parsed, output a single success test case to satisfy Bamboo.1.0.0 - 2016-02-15Release 1.0.0.  Increase test coverage.0.2.0 - 2016-01-28Added severity to JUnit message, improved help description, handle XML parsing errors.0.1.0 - 2015-11-15First release.
Package: cppchips
cppchips: C++17 code generator:exclamation: Early development stage :vertical_traffic_light::capital_abcd: Languages:ENRU:four_leaf_clover: Supported C++ constructionsclassandstruct.class constructors.class member fields- with autogeneration getter and setter.initializer listin constructor (withoout initialize base class).class member functions.virtualfunctions andoverride in child classes.simple functions, variables.:rocket: Simple startcppchips input:fromsrc.cppchipsimport*animalClass=CppClass('Animal')animalClass.private\.add_variable(CppString(),'var1')\animalClass.public\.add_virtual_method('say',CppVoid(),[],'std::cout << "---\\n";',noexcept=True)\.add_virtual_method('pay',CppInt(),[CppVariable(CppDouble(),'cost')],'// pay to win!')\.add_constructor()\.add_getter('var1')\.add_setter('var1')print(animalClass.gen_definition_str())catClass=CppClass('Cat')catClass.add_base_class(animalClass).public\.add_override_method('say')\.add_constructor()\.add_override_method('pay')print(catClass.gen_definition_str())C++ result:classAnimal{public:Animal(){}virtualvoidsay()noexcept{std::cout<<"---\n";}virtualintpay(doublecost){// pay to win!}auto&getvar1()noexcept{returnmvar1;}constauto&getvar1()constnoexcept{returnmvar1;}voidsetvar1(conststd::string&avar1){mvar1=avar1;}private:std::stringmvar1;};classCat:publicAnimal{public:Cat(){}voidsay()noexceptoverride{}intpay(doublecost)override{return{};}};
Package: cppclean
Goalcppclean attempts to find problems in C++ source that slow development
in large code bases, for example various forms of unused code.
Unused code can be unused functions, methods, data members, types, etc
to unnecessary #include directives. Unnecessary #includes can cause
considerable extra compiles increasing the edit-compile-run cycle.This is a fork of the original cppclean project. The original project home
page, which no longer contains code, is athttps://code.google.com/p/cppclean/.Featurescppclean finds the following:Classes with virtual methods, no virtual destructor, and no basesGlobal/static data that are potential problems when using threadsFunctions that are declared but not definedUnnecessary forward class declarationsUnnecessary function declarationsUndeclared function definitionsUnnecessary #includes in header filesNo direct reference to anything in the headerHeader is unnecessary if classes were forward declared insteadInconsistent case in #includes (foo.hversusFoo.h)(planned) Unnecessary #includes in source files(planned) Source files that reference headers not directly #included,
ie, files that rely on a transitive #include from another header(planned) Unused members (private, protected, & public) methods and data(planned)using namespace stdin header files(planned) Methods that are declared but not definedAST is Abstract Syntax Tree, a representation of parsed source code
(https://en.wikipedia.org/wiki/Abstract_syntax_tree).Installation$ pip install --upgrade cppcleanRun$ cppclean <path>Multiple include paths can be specified:$ cppclean --include-path=directory1 --include-path=directory2 <path>Current statusThe parser works pretty well for header files, parsing about 99% of Google’s
header files. Anything which inspects structure of C++ source files should
work reasonably well. Function bodies are not transformed to an AST,
but left as tokens.Non-goalsParsing all valid C++ sourceHandling invalid C++ source gracefullyCompiling to machine code (or anything beyond an AST)LinksCoveralls