Saravanan666/pypi-org huggingface dataset:
Package: community-learning
Community LearningZiel ist es mit diesem kleine PoC aufzuzeigen wie mit Hilfe von Federated Learning bessere Prognose erzielt werden können.Hier ein Auszug von der Kaggle WebsiteIn this competition, you are provided with 1.5 years of customers behavior data from Santander bank to predict what new products customers will purchase. The data starts at 2015-01-28 and has monthly records of products a customer has, such as "credit card", "savings account", etc. You will predict what additional products a customer will get in the last month, 2016-06-28, in addition to what they already have at 2016-05-28. These products are the columns named: ind_(xyz)_ult1, which are the columns #25 - #48 in the training data. You will predict what a customer will buy in addition to what they already had at 2016-05-28.InstallationVorgehen PoCUm den Usecase möglichst realistisch zu gestalten, gehen wir wie folgt vor:Variante 1:Daten bereitstellen und bereinigen: Hierzu werden wir das Datenset so aufteilen, dass je ein Datenset pro Bank entsteht. Dazu werden wir ein geografisches Attribut hernehmen. Danach werden die Daten nochmals im Verhältnis 80/20 aufgeteilt in ein Train- und Testset (data_bank1_train,data_bank1_test,data_bank2_train,data_bank2_test).Baseline Modelle trainiern:Pro Bank werden wir einen GradientBoost Algorithmus trainieren mit deren Default-Einstellungen. Dadurch erhaltne wir 2 Modelle (model_bank1undmodel_bank2)Ensemble Predictions:In diesem Schritt werden wir die Resultate von model_bank1 und model_bank2 kombinieren.model_bank1undmodel_bank2wird mit dendata_bank1_testgefüttert und eine gemeinsame Prediction erstellt.model_bank1undmodel_bank2wird mit dendata_bank2_testgefüttert und eine gemeinsame Prediction erstellt.Auswertung:: Um festzustellen ob das Ensemble eine Mehrwert bringt werden folgende Resultate verglichen.model_bank1(data_bank1_test)vsensemble(model_bank1(data_bank1_test), model_bank2(data_bank1_test)model_bank2(data_bank2_test)vsensemble(mdoel_bank2(data_bank1_test), model_bank2(data_bank2_test)How to useFill me in please! Don't forget code examples:1+12
Package: community-solar-programs
Community Solar ProgramsCommunity Solar Programs represented as code.Understanding potential earnings from community solar programs is difficult. This library attempts to make it easy by encoding program compensation structures (defined in regulatory, policy, and other legislative documents) as runnable code.Developingpoetryshell
poetryinstallPublishingRefresh poetry lock file as perhttps://python-poetry.org/docs/basic-usage/#as-a-library-developerpoetryupdateRun testspoetrybuild
Package: commutation
Commutation Station for Operator EliminationA proof assistant tool for the busy physicist, to be used in evaluating large commutator expressions.
This package does symbolic algebra on noncommutative objects.Example usage:Creating Expressions from Operatorsfromcommutationimport*fromfractionsimportFractiona=Operator('a','S^x_a')b=Operator('b','S^z_b')c=Operator('c','S^z_c')d=Operator('d','S^z_d')# building everything up from elementary operatorsx=a-9*b*c+a*b*aprint(x)# +1 a  -9 b c  +1 a b aComplicated substitutionsx=a*b*b*b*a*c*a*a*c*a*b+1y=x.substitute(a*b,c+d)print(x)# +1 a b b b a c a a c a b  +1print(y)# +1 c b b a c a a c c  +1 c b b a c a a c d  +1 d b b a c a a c c  +1 d b b a c a a c d  +1Factorisationsxx=7*a*b*b+Fraction(4,5)*a*c*b*b+a*d*b*b+a*c*a*a*b*b+3*a*b*bfr,ba=xx.factor('right')print(str(fr)+' * ['+str(ba)+'  ] = '+str(fr*ba))# +1 a * [  +10 b b  +4/5 c b b  +1 d b b  +1 c a a b b  ] =   +10 a b b  +4/5 a c b b  +1 a d b b  +1 a c a a b bfr,ba=xx.factor()print('['+str(fr)+'  ] * '+str(ba)+' = '+str(fr*ba))# [  +10 a  +4/5 a c  +1 a d  +1 a c a a  ] * +1 b b =   +10 a b b  +4/5 a c b b  +1 a d b b  +1 a c a a b bCommutatorsca=CommutatorAlgebra()az=Operator('az','S^z_a')ap=Operator('a⁺','S^+_a')am=Operator('a⁻','S^-_a')KA=Operator('KA','K_A',scalar=True)# note the funky bracket sequence - set_commutator actually returns a functionca.set_commutator(az,ap)(ap)ca.set_commutator(az,am)(-1*am)ca.set_commutator(ap,am)(2*az)# there are two modes: move_left and move_right# Note that pathological commutators will make these fall into recursion loops...xpr=Expression(az*ap*az*az*am)ca.move_right(xpr,az)xpr.collect()print(xpr)# +1 a⁺ a⁻ az az az  -2 a⁺ a⁻ az az  +1 a⁺ a⁻ azxpr=Expression(az*ap*az*az*am)ca.move_left(xpr,am)xpr.collect()print(xpr)# +1 a⁻ az a⁺ az az  -2 a⁻ az a⁺ az  +2 az az az az  -1 a⁻ a⁺ az az  +1 a⁻ az a⁺  -4 az az az  +2 a⁻ a⁺ az  +2 az az  -1 a⁻ a⁺# these will warn you if you add an unknown operator...xpr2=Expression(az*ap*am*c*am)ca.move_right(xpr2,az)# UserWarning: Non-scalar operator "c" is not in the commutator database, assuming it commutes...xpr2.collect()print(xpr2)#   +1 a⁺ a⁻ c a⁻ az  -1 a⁺ a⁻ c a⁻# # ... but scalars are fine.xpr3=Expression(az*ap*am*KA*am)ca.move_right(xpr3,az)xpr3.collect()print(xpr3)#   +1 a⁺ a⁻ KA a⁻ az  -1 a⁺ a⁻ KA a⁻
Package: commutils
common utils for python====================this package include some useful common utils in python, include:- frequently used decorators- monkey patch for class- reflection, smartlog and yml_config and so on- cli interface tools- git workflow tools- project management tools, contains a scaffold, a update command toinstall=========pip install commutilshow to use===========some are python packages you can import directly.``gy`` is a shell command you can run ``gy --help`` to see the usage. The most useful 3 workflow is  ``init``, ``sync``, ``push/merge``. And the default dev, release branch.``ly`` is a project manage and you can run ``ly --help`` to see the usage. The most useful command is ``new``, ``project-update`` to new and update a project.``gy self-update`` to update gy locally, is a command when you develop the package and want to refresh the package in system.
Package: comnamepy
comnamepyGet the company name from the domain.GitHubhttps://github.com/heku777/comnamepyInstallationfrom pypipip install comnamepyfrom GitHubpip install git+https://github.com/heku777/comnamepyclone this repositorygit clone git@github.com:heku777/comnamepy.gitUpgradepip install --upgrade comnamepyHow to useImportfrom comnamepy import get_comnameGet the company name in the best wayget_comname.get_company_name('domain')Get the company name from the whoisget_comname.whois_search_company('domain')Get the company name in scrapingget_comname.get_title('domain')
Package: como
como: batteries completecomois a minimalistic utillity to monitor your battery.NamingWhy como?The answer is simple: Alessandro Volta grew up in the town ofComoand since he invented the battery I thought it would be a great name.What is this?With como you can check out how your battery is doing.
You can easilyautomatethis process so that you don't need to worry about it.
Every once in a while you can quickly check out your batteryinfo.
You canexportthis data into the portable.csvformat andimportit again later.
You can even import data form another battery utility such ascoconutBattery.como.cwoebker.comMost importantly you can take all this to the next level, if you choose to do so.Uploadyour battery data to the como web application to check everything out in a nice interface wherever you are.
You can always easilyopenyour computer's personal page.InstallationIt's as simple as that:$ pip install comoAfterwards run theinitcommand to get everything setup and stop worrying.$ como initUsagecomo- Saves the current battery state.como info- Prints information about battery and battery history.como import <file>- Imports statistics from .csv file (time, capacity, cycles)como export- Exports data tocomo.csvfile to current directory.como upload- Uploads data to server.como open- Opens personal battery information page.como automate- Turns scheduling on or off. Saving and Uploading.como init- Quick command to get everything setup on first start.como reset- Removes all entries in database.Advancedcomostores all battery information (with zlib compression) in the file~/.como.
You are free to do whatever you want with this data, it is yours after all.So go out there and hack some code!FeaturesCross-Platform (Linux & Mac)Automatically run withcron/launchdschedulingExport data to.csvfileImport data from.csvfileSimple StatisticsHistories for Cycles and CapacityUpload Data to serverContributeFork and contribute!For questions and suggestions, feel free to shoot me an email atme@cwoebker.com.Also, follow or tweet@cwoebker.Copyright (c) 2012-2020, Cecil Wöbker.
License: BSD (see LICENSE for details)
Package: comod
comodCompartmental modelling Python packagePreviewCheck thedocsto see more.FeaturesDefine a model with simple rules as strings or with custom functions.Pre-defined models like SIR, SIS, SEIR, ...Community-extensions of models.Solve numerically for fixed or time-dependent parameters.Best-fit to existing data, posibly using time windows.Create compartment graphs.Export LaTeX.Export to Wolfram Language (Mathematica).InstallationAssuming you have aPython3distribution withpip, the latest pypi release can be installed with:pip3 install comodTo install the optional dependencies you can runpip3 install 'comod[extras]'Mind the quotes.Developer informationInstalationTo install a development version, cd to the directory with this file and:pip3 install -e '.[test]'As an alternative, a virtualenv might be used to install the package:# Prepare a clean virtualenv and activate it
virtualenv -p /usr/bin/python3.6 venv
source venv/bin/activate
# Install the package
pip3 install -e '.[test]'DocumentationTo generate the documentation, thedocsextra dependencies must be installed.To generate an html documentation with sphinx run:make docsTo generate a PDF documentation using LaTeX:make pdfTestTo run the unitary tests:make test
Package: comodo_rest_api
comodo_rest_apiThis library provides a simpler restful API interface to Comodo/Sectigo's REST API.Installation:This program forgoes using setuptools forflitso
flit must first be installed in order to install ddi.To install flit and comod_rest_api local to your user, in the ddi base directory run:pip install --user flit
flit install --userDevelopment Installation:To install comodo_rest_api in a development environmentpipenvmust first be installed. After pipenv
is installed setup the environment and then run flit to symlink in the library
like so:pipenv install --dev
pipenv shell
flit install --symlinkAfter that is done you will have a vitrualenv with the required library installed.Release ProcedureReleasing means pushing the library to pypiBumpversionin comodo_rest_api/init.pygit tag -sUpdate the change log in History.rstrun: flit buildrun: flit publish
Package: comokit4py
comokit4pycomokit4py is a Python3 library for easily exploreCOMOKITmodels, and process outputted data, on your laptop or an HPC in a few Python lines.InstallationUse the package managerpipto install comokit4py.pipinstallcomokit4pyUsage exampleimportcomokit4py# Prepare GAMA (COMOKIT base software)gama=comokit4py.Gama("~/.local/share/GAMA_1.8.1_Linux/headless/gama-headless.sh")# Prepare explorationexplo=comokit4py.GamaExploration(experimentName="Headless",gamlFile="~/Documents/COMOKIT/Model/COMOKIT/Experiments/Physical Interventions/Significance of Wearing Masks.gaml",replication=2,final=5)explo.calculatesExperimentSpace()# Setup the exploration's workspacews=comokit4py.Workspace(gama,explo,"./out",True)# Launch explorationws.runGamaHeadless(log=True,cores=4)The full library documentation is here :https://comokit.github.io/comokit4py/ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseLGPL-2.1 License
Package: comon
Comon Python PackageThe comon package is a Python library that provides a convenient interface for interacting with the Comon API. This package allows you to create and send status updates, including messages, key performance indicators (KPIs), and various types of charts.InstallationTo install the comon package, use the following command:pipinstallcomonUsageYou can find an example including all chart types in theexample.pyfile.To get started, import the necessary modules and create a Client instance. Replace the URL in Client with the actual Comon API URL.importcomon.apiascomon_apiclient=comon_api.Client("http://localhost:8080")Create your status:importdatetimeasdtfromcomon.modelsimport(Criticality,Status,Kpi,Chart,Series,DataPoint,ChartType,VizType,)messages=["Something was detected."]kpis=[Kpi(name="Sample KPI 1",value=35,unit="ms"),Kpi(name="Sample KPI 2",value=22,unit="Watt"),]time_based_line_chart=Chart(title="Time Based Line Chart",sub_title="Some Subtitle",type=ChartType.LINE,series=[Series(name="First Series",viz_type=VizType.PRIMARY,y_unit="ms",data_points=[DataPoint(time=dt.datetime.now()-dt.timedelta(seconds=5),y=[3],),DataPoint(time=dt.datetime.now()-dt.timedelta(seconds=3),y=[5],),DataPoint(time=dt.datetime.now()-dt.timedelta(seconds=1),y=[4],),],)],)Send the status to Comon:client.create_status("YOUR_PACKAGE_GUID",status)You can get the package guid in the edit mode of the asset by clicking on the "Copy Package Guid" button. This requires you to create an external package first.
Package: comorbidipy
comorbidiPyPython package to calculate comorbidity scores and other clinical risk scores.Thecomorbidityfunction of this library is effectively a rewrite of the excellent R librarycomorbidity(https://github.com/ellessenne/comorbidity/) by Alessandro Gasparini (https://www.ellessenne.xyz/).Comorbidipy also includes additional clinical risk calculators listed below.Feature ListCharlson Comorbidity ScoreElixhauser Comorbidity IndexHospital Frailty Risk ScoreDisability and Sensory ImpairmentsVariants of Charlson and Elixhauser ScoresThecomorbidityfunction allows calculation of Charlson and Elixhauser score using ICD9 or ICD10 codes and the following variations.Variations of Charlson Comorbidity ScoreMapping:Quan versionSwedish versionAustralian versionUK version (from Summary Hospital-Level Mortality Indicator - SHMI)Weights:CharlsonQuanSHMIModified SHMIElixhauser Comorbidity IndexMapping:QuanWeights:van WalravenSwissLicense and DocumentationFree software: MIT licenseDocumentation:https://comorbidipy.readthedocs.io. (TODO)CreditsCookiecutterhttps://github.com/audreyr/cookiecutterR librarycomorbidityhttps://github.com/ellessenne/comorbidity/Changelog0.4.4 (2022-06-11)Additional function to identify disabilitiesRewritten comorbidity functionAdditional modified weights for SHMI variant of Charlson ScoreCI/CD pipeline to publish to PyPi0.3.0 (2022-02-11)Add SHMI variant of Charlson Comorbidity Score. Based on SHMI Specification Version 1.35 2020-09-24 (https://files.digital.nhs.uk/B8/F8D021/SHMI%20specification%20v1.35.pdf)0.2.1 (2021-01-02)Rewritten HFRS calculator that is 5x faster than previous version.0.2.0 (2021-12-31)Add function for calculating Hospital Frailty Risk Score (https://www.thelancet.com/journals/lancet/article/PIIS0140-6736(18)30668-8/)0.1.0 (2021-12-20)First release.
Package: comoresolve
Como Resolve?Utilitário para encontrar soluções para problemas no Python.InstalaçãoInstale o pacotecomoresolve. Exemplo:pipinstallcomoresolveUsoUtilize o comandocomoresolvecomo se fosse o interpretador do Python. Exemplo:# Para:pythonmeu_arquivo.py# Execute:comoresolvemeu_arquivo.py# Para:python-mmeu_modulo# Execute:comoresolve-mmeu_modulo
Package: comotion-sdk
comotion-sdkcomotion-sdk is the python SDK for interacting with the Comotion APIs.  Initial support is limited to Dash, but may expand in future.DocumentationDocumentation for this module can be foundhere.ContributingIn order to contribute to this project, fork this repo and submit a pull request to this projectIn order to set up a local environment, pull this repo and install.pipenvis used to manage dependencies on this project. in order to use it, ensure that pipenv is installed.pip install --upgrade pip
pip install pipenvAnd then enter the virtual environment for this project that will automatically ensure all dependencies are availablepipenv install -e .
pipenv shellAdding modulesEnsure dependencies are also added to setup.py in theinstall_requiressection.  Then runpipenv install -e .Ensure you understand pipenv when [installing new libraries] (https://pipenv.pypa.io/en/latest/install/#installing-packages-for-your-project).running testsTo run testspipenv install --deploy --dev
pipenv run test -vBuilding docsRun the following from the docs directly. Ensure to watch out for warnings.make htmlRerunning code generatorWe use OpenApi generator to generate the python.The requirements for this are a swagger file that can be gotten from WHERE?The latest swagger file is stored in openapi_generator/comodash_api_swagger.jsonDownload latestjar of OpenAPI Generatorjava -jar \ ./openapi_generator/openapi-generator-cli-5.2.1.jar generate \ -i ./openapi_generator/comodash_api_swagger.yaml\ -g python \ --package-name comodash_api_client_lowlevel \ --api-package comodash_api \ --additional-properties generateSourceCodeOnly=True,library=asyncio \ -o ./src/
Package: comp3900-ttt-arena-helpers
Tic-Tac-Toe Arena HelpersThis package includes helper classes for Tic Tac Toe Arena, the COMP3900 project for W18B - TheBigMacs.These helpers allow the user to easily parse the input and create the output as required by our API. This is in the form of two straight-forwarddataclasses: AgentMove, and GameState.GameState defines the information the agent has available with which to make a decision. It has the attributes:rowscolskcurrent_movegridAgentMove helps the agent declare the position it wishes to make a move in. It simply has the attributes row and col.In order to create an agent that fits our API, the user simply needs to implement a function such that it takes in an input GameState and returns an AgentMove, such as the following.fromcomp3900_ttt_arena_helpersimportAgentMove,GameStatedefmake_move(game_state:GameState)->AgentMove:"""Dummy agent that looks for the first empty cell it can find and makes a move there"""forrowinrange(game_state.rows):forcolinrange(game_state.cols):ifgame_state.grid[row][col]=="":returnAgentMove(row,col)
Package: compact
CompactPHP compact() ported to Python(Please use this for development only!)fromcompactimportcompacta=1b=2c=compact(a,'b')# -> {'a': 1, 'b': 2}compact(c,d,dirty=True)# -> {c: {'a': 1, 'b': 2}, d: None}Only works in scripts, not interactive use
(the program needs to be able to read the source files)
Package: compactdata
CompactData Python LibraryA Python library for parsing and serialising data in the CompactData format. CompactData is a compact data serialisation format that prioritises efficiency of data storage and transport. It is well suited for use cases where efficient data storage and transport is a priority.FeaturesParse CompactData strings into Python objectsSerialise Python objects into CompactData stringsCompatible with Python 3.6 and higherInstallationTo install the CompactData Python library, use the following command:pipinstallcompactdataUsageParsing CompactData stringsTo parse a CompactData string into a Python object, use thecompactdata.loads()function:importcompactdatacompactdata_string="my_object=(string=`abc`;number=1;array=[1;2;3];map=(a=1;b=2;c=3))"parsed_object=compactdata.loads(compactdata_string)print(parsed_object)# Output: {'my_object': {'string': 'abc', 'number': 1, 'array': [1, 2, 3], 'map': {'a': 1, 'b': 2, 'c': 3}}}Serialising Python objectsTo serialise a Python object into a CompactData string, use thecompactdata.dumps()function:importcompactdatapython_object={"key1":"value1","key2":2}compactdata_string=compactdata.dumps(python_object)print(compactdata_string)# Output: (key1=value1;key2=2)ExamplesHere are some examples of parsing and serialising different CompactData strings and Python objects:importcompactdata# Parsing CompactData stringscompactdata_strings=["my_object=(string=`abc`;number=1;array=[1;2;3];map=(a=1;b=2;c=3))","[1;2;3]","a=1;b=2.5;c=10e3","@dv=1;salts=[(s=salts.domainverification.org;ids=[342c208d-0523-4d22-b7dd-32952dbeace2]);(s=example.com;ids=[90797a69-205b-4a35-88fe-8a186392ea15])]",]forcompactdata_stringincompactdata_strings:print(compactdata.loads(compactdata_string))# Output:# {'my_object': {'string': 'abc', 'number': 1, 'array': [1, 2, 3], 'map': {'a': 1, 'b': 2, 'c': 3}}}# [1, 2, 3]# {'a': 1, 'b': 2.5, 'c': 10000.0}# {'@dv': 1, 'salts': [{'s': 'salts.domainverification.org', 'ids': ['342c208d-0523-4d22-b7dd-32952dbeace2']}, {'s': 'example.com', 'ids': ['90797a69-205b-4a35-88fe-8a186392ea15']}]}# Serialising Python objectspython_objects=[[1,2,3,"123"],{"key1":"value1","key2":2},"string_value",123,[1,{"k":"v"},2],]forpython_objectinpython_objects:print(compactdata.dumps(python_object))# Output:# [1;2;3;123]# (key1=value1;key2=2)# string_value# 123# [1;(k=v);2]LicenseThis project is licensed under the MIT License. See theLICENSEfile for details.Support and ContributionsIf you encounter any issues or have feature requests, pleaseopen an issueon GitHub. Contributions to this project are welcome. To contribute, please fork the repository, make your changes, and submit a pull request.For more information about the CompactData format, visit the official website athttps://compactdata.org.
Package: compaction
compaction: Compact layers of sedimentCompact a column of sediment following Bahr et al., 2001.Cite as,@article{bahr2001exponential,title={Exponential approximations to compacted sediment porosity profiles},author={Bahr, David B and Hutton, Eric WH and Syvitski, James PM and Pratson, Lincoln F},journal={Computers \& Geosciences},volume={27},number={6},pages={691--700},year={2001},publisher={Pergamon}}RequirementsCompactionrequires Python 3.Apart from Python,Compactionhas a number of other requirements, all of which
can be obtained through eitherpiporconda, that will be automatically
installed when you installCompaction.To see a full listing of the requirements, have a look at the project'srequirements.txtfile.If you are a developer ofCompactionyou will also want to install
additional dependencies for runningCompaction's tests to make sure
that things are working as they should. These dependencies are listed
inrequirements-testing.txt.InstallationTo installCompaction, first create a new environment in
whichCompactionwill be installed. This, although not necessary, will
isolate the installation so that there won't be conflicts with your
basePythoninstallation. This can be done withcondaas:condacreate-ncompactionpython=3condaactivatecompactionStable ReleaseCompaction, and its dependencies, can be installed either withpiporconda. Usingpip:pipinstallcompactionUsingconda:condainstallcompaction-cconda-forgeFrom SourceAfter downloading theCompactionsource code, run the following fromCompaction's top-level folder (the one that containssetup.py) to
installCompactioninto the current environment:pipinstall-e.Input FilesConfiguration FileThe mainCompactioninput file is a yaml-formatted text file that lists
constants used byCompaction. Running the following will print a sampleCompactionconfiguration file:compact show configc:5.0e-08porosity_max:0.5porosity_min:0.0rho_grain:2650.0rho_void:1000.0Porosity FileTheCompactionporosity file defines initial porosity of each of the
sediment layers to be compacted as a two-column CSV file. The first
column is layer thickness (in meters) and the second the porosity of
the sediment in that layer. A sample porosity file can be obtained with:compactshowporosity# Layer Thickness [m], Porosity [-]
100.0,0.5
100.0,0.5
100.0,0.5Output FileThe output file ofCompactionis a porosity file of the same form as
the input porosity file - a CSV file of layer thickness and porosity.ExamplesTo run a simulation using the sample input files described above, you first
need to create a set of sample files:sequence setup exampleexample/sequence.yamlYou can now run the simulation:sequencerunexample/sequence.yaml# Layer Thickness [m], Porosity [-]
100.0,0.5
96.18666488709239,0.4801774231522433
92.78860257194452,0.4611407154102571CreditsDevelopment LeadEric HuttonContributorsNone yet. Why not be the first?