Saravanan666/pypi-org huggingface dataset:
Package: rouge-score
Python ROUGE ImplementationOverviewThis is a native python implementation of ROUGE, designed to replicate results
from the original perl package.Maintainers may be contacted atrouge-opensource@google.com.ROUGE was originally introduced in the paper:Lin, Chin-Yew. ROUGE: a Package for Automatic Evaluation of Summaries. In
Proceedings of the Workshop on Text Summarization Branches Out (WAS 2004),
Barcelona, Spain, July 25 - 26, 2004.ROUGE for PythonThere are ROUGE implementations available for Python, however some are not
native python due to their dependency on the perl script, and others provide
differing results when compared with the original implementation. This makes it
difficult to directly compare with known results.This package is designed to replicate perl results. It implements:ROUGE-N (N-gram) scoringROUGE-L (Longest Common Subsequence) scoringText normalizationBootstrap resampling for confidence interval calculationOptional Porter stemming to remove plurals and word suffixes such as (ing,
ion, ment).Note that not all options provided by the original perl ROUGE script are
supported, but the subset of options that are implemented should replicate the
original functionality.Stopword removalThe original ROUGE perl script implemented optional stopword removal (using the
-s parameter). However, there were ~600 stopwords used by ROUGE, borrowed from
another now defunct package. This word list contained many words that may not be
suited to some tasks, such as day and month names and numbers. It also has no
clear license for redistribution. Since we are unable to replicate this
functionality precisely we do not include stopword removal.Two flavors of ROUGE-LIn the ROUGE paper, two flavors of ROUGE are described:sentence-level: Compute longest common subsequence (LCS) between two pieces of
text. Newlines are ignored. This is calledrougeLin this package.summary-level: Newlines in the text are interpreted as sentence boundaries,
and the LCS is computed between each pair of reference and candidate sentences,
and something called union-LCS is computed. This is calledrougeLsumin this
package. This is the ROUGE-L reported inGet To The Point: Summarization with
Pointer-Generator Networks, for example.
If your references/candidates do not have newline delimiters, you can use the
--split_summaries flag (or optional argument in RougeScorer).How to runThis package compares target files (containing one example per line) with
prediction files in the same format. It can be launched as follows (from
google-research/):python-mrouge.rouge\--target_filepattern=*.targets\--prediction_filepattern=*.decodes\--output_filename=scores.csv\--use_stemmer=true\--split_summaries=trueUsing pippip install -r rouge/requirements.txt
pip install rouge-scoreThen in python:fromrouge_scoreimportrouge_scorerscorer=rouge_scorer.RougeScorer(['rouge1','rougeL'],use_stemmer=True)scores=scorer.score('The quick brown fox jumps over the lazy dog','The quick brown dog jumps on the log.')LicenseLicensed under theApache 2.0License.DisclaimerThis is not an official Google product.
Package: roughrider.application
Base WSGI application usinghorsemannodes with routing capabilities.ExampleBelow is an example of an application, handling a GET request on ‘/’
and returning a JSON response.fromhorseman.responseimportResponsefromroughrider.applicationimportApplicationapp=Application()@app.routes.register('/')defjson(request):returnResponse.to_json(body={'message':"Hello, world!"})CHANGES0.3.1 (2022-02-22)Added a handful of tests forapplication_uri.0.3 (2022-02-22)Requestapplication_urinow handles environs that are not well formed.
It fixes some uses of “proxy” or “virtual host” middlewares.0.2 (2022-02-11)Corrected the requestextractmethod.0.1 (2021-12-27)Initial release.
Package: roughrider.cors
This package allows you to create a policy that can handle CORS.
It can be used with any python framework as it’s totally agnostic.
It can cook response headers, even for preflight requests.Examplefromroughrider.cors.policyimportCORSPolicycors=CORSPolicy(methods=['GET','POST'],allow_headers=['Accept-Encoding'],expose_headers=['Accept-Encoding'],max_age=19000)headers=list(cors.headers())# Arguments for the preflight should be extracted from the request.# depending on the type of framework you use (WSGI, ASGI...)preflight_headers=list(cors.preflight(origin='http://example.com',acr_headers='X-Custom-Header, Accept-Encoding'))CHANGES0.1 (2021-10-09)Initial release.
Package: roughrider.predicate
This package helps defining and creating small and reusable components
that can serve as guard or validation methods.ExampleBelow is an example of a validation on a content item.fromdataclassesimportdataclassfromroughrider.predicate.errorsimportConstraintErrorfromroughrider.predicate.validatorsimportValidator,Or@dataclassclassDocument:id:strbody:str=''content_type:str='text/plain'defnon_empty_document(item):"""Implementation of a validator/predicate
    """ifnotitem.body:raiseConstraintError('Body is empty.')classContentType(Validator):def__init__(self,content_type):self.ct=content_typedef__call__(self,item):ifitem.content_type!=self.ct:raiseConstraintError(f'Expected{self.ct}, got{item.content_type}.')validator=Or((ContentType('text/plain'),Or((ContentType('text/html'),non_empty_document))))document=Document(id='test',content_type='application/json')validator(document)# raises ConstraintsErrorsCHANGES0.3.1 (2021-10-21)Changing packaging of extensions.0.3 (2021-10-21)Code reorganization and Cython optimizations.0.2 (2021-10-20)Correction of theresolve_validatorerrors list extension.0.1 (2021-10-09)Initial release.
Package: roughrider.routing
Routing capabilities forhorsemannodes.This package introduces a ‘Routes’ component that allows registration of
endpoints on one or several HTTP Methods. Routes can be looked up by URL
or by name.ExampleBelow is an example of a barebone API, handling a GET request on ‘/’
and returning a JSON response.importloggingfrombjoernimportrunfromhorseman.metaimportSentryNode,Overhead,APIViewfromhorseman.responseimportResponsefromroughrider.routingimportRoutesclassRequest(Overhead):data=Nonedef__init__(self,environ):self.environ=environdefextract(self):self.data='somedata'classRootNode(SentryNode):def__init__(self):self.routes=Routes()defresolve(self,path:str,environ:dict):route=self.routes.match_method(path,environ['REQUEST_METHOD'])ifrouteisnotNone:request=Request(environ)returnroute.endpoint(request,**route.params)defhandle_exception(self,exc_info,environ):logging.error(exc_info)app=RootNode()@app.routes.register('/')classView(APIView):defGET(self,overhead):returnResponse.to_json(200,{"Result":"OK"})run(host="0.0.0.0",port=8080,reuse_port=True,wsgi_app=app,)CHANGES0.2.1 (2022-03-15)Fixed bug existing while registering 2 routes with the same name.0.2 (2021-10-09)Code structure was reshuffled for more readability.0.1 (2021-10-08)Initial release
Package: roughrider.token
Utilities to generate and verify tokens (autodeprecating or not).Currently implemented :Time-based One-time Password (TOTP)TOTP ExampleBelow is an example of a token based on TOTP, self-deprecating after
a given number of secondsfromroughrider.token.hmac_factoriesimportTOTTokenFactoryfactory=TOTTokenFactory(secret=b'secret',TTL=180)# 3 min TTLtoken=factory.generate('my word')assertfactory.challenge(token,'my word')isTrueassertfactory.challenge(token,'my other word')isFalseCHANGES0.1 (2021-10-09)Initial release.
Package: roughrider.workflow
This package allows to define workflows that consist of a set of states,
transitions between the states. Actions that activate the transitions
can be guarded by constraints.Examplefromroughrider.predicateimportConstraintError,Validator,Orfromroughrider.workflow.componentsimportAction,Transition,Transitionsfromroughrider.workflow.workflowimport(WorkflowItem,WorkflowState,Workflow)classDocument:state=Nonebody=""classRoleValidator(Validator):def__init__(self,role):self.role=roledef__call__(self,item,role=None,**namespace):ifrole!=self.role:raiseConstraintError(message=f'Unauthorized. Missing the `{role}` role.')classPublicationWorkflow(Workflow):classwrapper(WorkflowItem):@propertydefstate(self):returnself.workflow.get(self.item.state)@state.setterdefstate(self,state):self.item.state=state.nameclassstates(WorkflowState):draft='Draft'published='Published'submitted='Submitted'transitions=Transitions((Transition(origin=states.draft,target=states.published,action=Action('Publish',constraints=[RoleValidator('publisher')])),Transition(origin=states.published,target=states.draft,action=Action('Retract',constraints=[Or((RoleValidator('owner'),RoleValidator('publisher')))])),Transition(origin=states.draft,target=states.submitted,action=Action('Submit',constraints=[RoleValidator('owner')],)),Transition(origin=states.submitted,target=states.published,action=Action('Publish',constraints=[RoleValidator('publisher')],))))workflow=PublicationWorkflow('draft')# initial stateitem=Document()workflow_item=workflow(item,role='owner')workflow_item.transition_to(PublicationWorkflow.states.submitted)CHANGES0.2 (2021-10-21)Updating to useroughrider.predicate >= 0.3.10.1 (2021-10-09)Initial release.
Package: roughset
🐍 Rough Set Python PackageRough Set Python Package is a Python library that provides a set of tools to calculate rough sets and obtain reduct rules. This package is useful for data analysis and machine learning tasks where you need to deal with uncertainty or incomplete data.📦 InstallationYou can install Rough Set Python Package using pip command:pipinstallroughset📚 UsageWith a example datafromroughsetimportRoughSet# Load data from a CSV filedf=pd.read_csv('example.csv')# Create RoughSet objectRS=RoughSet(df=df,name_col="No",feature_col=['天氣','事故情形','事故原因'],decision_col='損壞部位')rules=RS.get_reduct_rules(include_empty=True)rulesWe will get the reduct rules.rules_with_scores=RS.get_reduct_rules_with_scores()rules_with_scores🤝 ContributionIf you want to contribute to Rough Set Python Package, you can fork the repository on GitHub and create a pull request. You can also report bugs, suggest new features, or ask for help in the issues section.📜 LicenseRough Set Python Package is released under the MIT License. You can find the details of the license in theLICENSEfile.
Package: roughsets-base
RoughSets library (Pandas version)The goal of the library is to provide base functions of Rough Sets Theory and give foundation to build extensions
which will provide different methods built on RoughSets Theory, like:pre-processing methodsfind core and reductsclassifierspost-processing methodsThe library doesn't use basic loops so should help to build very fast extensions when large datasets will be used.The library implements these main functions:computation of indiscernibilty relations - function: get_indiscernibility_relationscomputation of a lower and upper approximations, boundary and negative regions - all these 4 boundaries are computed by function: get_approximation_indices.  For optimization, only indices of X,y are returned by the function, so can be used for futher computationsbefore slicing with X and y.The library has included unit tests for different datasets, subsets and concepts.RequirementsPython >= 3.8OS: Linux, WindowsInstall from PyPi serverpip install roughsets-baseBuild and install the library from source codepip install --upgrade pippip install --upgrade buildOn linux:
python3 -m buildOn Windows:py -m buildpip install dist/roughsets_base--py3-none-any.whlInstall CI and dev toolspip install -r requirements.dev.txtUnit testsFile tests/test_dataset_KDD.py contains tests which use KDD99 dataset.By default file will be downloaded from:http://kdd.ics.uci.edu/databases/kddcup99/corrected.gzIf You have the file on Your system You can set OS environment variable ROUGHSETS_KDD99_TEST_DATA_FOLDERwith the path to th file.File tests/KDD99_compare_with_R_RoughSets.R contains R script which generate refernece data using well knwon reference library: RoughSets.See:https://www.rdocumentation.org/packages/RoughSets/topics/RoughSets-package(R language).
Reference datasets with results from R-RoughSets library are saved in folder tests/datasets/KDD99.You can disable running tests for specific dataset in file test_dataset_X.py (X - symbol of dataset), method setUp.For checking of unit tests' results was used algorithms from well known reference library:https://www.rdocumentation.org/packages/RoughSets/topics/RoughSets-packageRe-Build sphinx documentationpip install -r requirements.dev.txtsphinx-build -b html ./doc ./doc/_build/htmlsphinx-build -b man ./doc ./doc/_build/manRecommended packagessklearn-pandashttps://github.com/scikit-learn-contrib/sklearn-pandaspandas ecosystem:https://pandas.pydata.org/community/ecosystem.htmlCitationIf You would like to use this library in Your research, please cite it.Jankowski, D. (2022). Roughsets-base: Python library for base Roughsets methods. (v1.0.1) [Computer software]. Zenodo.https://doi.org/10.5281/ZENODO.5957474
Package: roughviz
roughvizroughviz is a python visualization library for creating sketchy/hand-drawn styled charts.Available ChartsBar (roughviz.bar)Horizontal Bar (roughviz.barh)Pie (roughviz.pie)Donut (roughviz.donut)Stacked Bar (roughviz.stackedbar)Installationpip install roughvizUsageAPIThe API Documentation is available on:roughviz wikiFuture PlansException HandlingAdd Chart: HistogramAdd Chart: ScatterAdd Chart: Bubble ChartAdd Chart: LineAdvance CSS control capabilitiesBased onLicenseCopyright (c) 2019 Hannan Satopay
Package: rouigram
Rouigram python packagingRouigram is a simple and use-full platform for Instagram user id
without any registration. instagram user_id is the important factor
to use other API of Instagram for making interconnected application.You can help develop this code in the github.importrouigramasinstagraminfo=instagram.getInformation("mohammadali_mirhamed")#define Usernameprint(instagram.getInformation.user_id(info))# You will get user idprint(instagram.getInformation.username(info))# You will get usernameprint(instagram.getInformation.fullname(info))# You will get fullnameprint(instagram.getInformation.follower_count(info))# You will get follower countprint(instagram.getInformation.following_count(info))# You will get following countprint(instagram.getInformation.media_count(info))# You will get media_countprint(instagram.getInformation.external_url(info))# You will get Website linkprint(instagram.getInformation.is_private(info))# You will get is_privateprint(instagram.getInformation.profile_hd_photo(info))# You will get FullHd profile Imageprint(instagram.getInformation.biography(info))# You will get biographyRouigram offcial website : rouigram.pythony.ir.developet by Mohammadali Mirhamed Roui.
Package: roulette
Simple Roulette game written in Python.Installationpip3 install roulette

rouletteDemoDemoAdvanced usageusage: roulette [-h] [-t {french,american}] [-b BANK] [-i MINIMUM_BET]
                [-x MAXIMUM_BET]

optional arguments:
  -h, --help            show this help message and exit
  -t {french,american}, --type {french,american}
                        Roulette type
  -b BANK, --bank BANK  Set bank amount
  -i MINIMUM_BET, --minimum_bet MINIMUM_BET
                        Minimum bet allowed
  -x MAXIMUM_BET, --maximum_bet MAXIMUM_BET
                        Maximum bet allowed
Package: rouleur
# rouleur: Cycling performance modellingMakes the physical modelling of cycling trivially easy.For example, let’s try and estimate the power required for Wiggo’s current hour record:`pycon >>> from rouleur import CyclingParams, calculate_air_density >>> >>> record = 54.526          # km/h >>> record *= 1000 /60**2# m/s >>> rho = calculate_air_density(30, 777, 0.6)  # about right >>> pars = CyclingParams( >>>     rider_velocity=record, >>>     air_density=rho, >>>     CdA=0.19, Crr=0.0025, >>>     chain_efficiency_factor=0.98, >>>     road_gradient=0, >>>     mass_total=82) >>> >>> pars.solve_for.power_output() 440.9565671224358 `That’s all there is to it.The API consists almost exclusively of theCyclingParamsclass, which holds all the parameters required for modelling a cyclist. The class constructor combines a number of sensible defaults with any (keyword) arguments passed. Details of recognised keyword arguments—i.e. model parameters—can be found in the class docstring (help(CyclingParams)).Instances then have a number of solver methods accessible viaparameters.solve_for.*.# ReferencesThis package is an implementation of a number of published algorithms. Important references are:[Martin JC, Milliken DL, Cobb JE, McFadden KL, Coggan AR. Validation of a Mathematical Model for Road Cycling Power. Journal of Applied Biomechanics 14: 276–291, 1998.](http://journals.humankinetics.com/doi/10.1123/jab.14.3.276)[Martin JC, Gardner AS, Barras M, Martin DT. Modeling sprint cycling using field-derived parameters and forward integration. Med Sci Sports Exerc 38: 592–597, 2006.](https://www.ncbi.nlm.nih.gov/pubmed/16540850)[Atkinson G, Peacock O, Passfield L. Variable versus constant power strategies during cycling time-trials: Prediction of time savings using an up-to-date mathematical model. Journal of Sports Sciences 25: 1001–1009, 2007.](https://www.ncbi.nlm.nih.gov/pubmed/17497402)[Wells MS, Marwood S. Effects of power variation on cycle performance during simulated hilly time-trials. European Journal of Sport Science 16: 912–918, 2016.](https://www.ncbi.nlm.nih.gov/pubmed/26949050)
Package: roulier
RoulierRoulier is a shipping library written in Python for sending parcels.
Roulier will get a label + tracking number to your carrier for you.Roulier runs on your server and call each carrier API directly.You have to use your own credentials provided by each carriers.Roulier is Open Source software, AGPL-3Roulier integrate a multitude of carriersFrench La PosteFrench DPDFrench GLSFrench Chronopostmore to come... (geodis, kuehne...)InstallationThis is not compatible with python 2.7.
Please use version < 1.0.0 (python2 branch) in that case.Usagefromroulierimportroulierpayload={"auth":{"login":"12345","password":"password",},"service":{"productCode":"COL"},"parcels":[{"weight":3.4,}],"to_address":{"firstName":"Hparfr""street1":"35 b Rue Montgolfier""city":"Villeurbanne""country":"FR","zip":"69100"},"from_address":{"fristName":"Akretion France""street1":"35 b Rue Montgolfier""city":"Villeurbanne""country":"FR","zip":"69100"},}# first parameter is the carrier type.# second is the action and then the parameters needed by the actionresponse=roulier.get('laposte_fr','get_label',payload)print(response)Get supported carriers and related actions:fromroulierimportroulierprint(roulier.get_carriers_action_available())Known IssuesFrench GLS carrier :The glsbox webservice only manage Basic products : BP, EBP, GBPIn the rest webservice, the incoterms don't workContributors@hparfr(Akretion.com)@damdam-s(Camp2Camp.com)@bealdav(Akretion.com)@DylannCordel(Webu.coop)@florian-dacosta(Webu.coop)DependenciesCerberus- input validation and normalizationlxml- XML parsingJinja2- templatingRequests- HTTP requestszplgrf- PNG to ZPL conversionunidecode- Remove accents from ZPL
Package: round2
Round half away from zero.pip install round2Since python's default round function uses 'bankers rounding', I made this small module that uses 'commercial rounding' instead. This means half is rounded up for positive numbers and down for negative numbers:>>>fromround2importround2>>>round2(1.5)2>>>round2(2.5)3>>>round2(-1.5)-2>>>round2(-2.5)-3>>>round2(2.5,decimals=1)2.5If decimals=0 (default), returns an int, otherwise a float, just like Python’s round function.Implemented in Cython with type hinting in Python.
Package: roundbox
⚡ RoundBoxA small lightweight framework for IoT applications, with main goal to not reinvent the wheel every time when a small
project for IoT device is needed.The framework contains all tools necessary to bootstrap and run a command a single time or using linux crontab.You can create apps as many as you like and use them for your proper necessity, but consider that each app is liake a
small container with logic.
Each app has the possibility to host specific commands that will be available  when running manage.py.🎈 Special thanks 🎈To build this framework I have used code inspired by theDjangoproject and also
fromHome Assistantproject.Both projects have a strong code base and lightweight and port on different projects.🔧 InstallationThe easy way to install RoundBox framework is withpip$pipinstallroundboxIf you want to install RoundBox from GitHub use:$pipinstallgit+https://github.com/soulraven/roundbox.gitFor more detailed install instructions see howInstalland configure the framework.➿ Variablesset the ROUNDBOX_COLORS environment variable to specify the palette you want to use. For example,
to specify the light palette under a Unix or OS/X BASH shell, you would run the following at a command prompt:exportROUNDBOX_COLORS="light"🖇 Library usedA more detailed list you will find here:Libraries🌍 ContributionsContributions of all forms are welcome :)Pull 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.📝 LicenseThis project is licensed underGPLv3.👀 AuthorZaharia Constantin, myGitHub profileandGitHub Page
Package: roundcube_merge_databases
Roundcube Merge Databases=========================This python script adds roundcube users/identities/contacts and contactgroups from onedatabase into another handling with _unique id_ changes.## Installationpip install roundcube_merge_databases## Usageroundcube_merge_databases source_database destination_databaseUse `-h` flag to see the list of command line options.## License and AuthorsJordi Llonch <llonchj@gmail.com>Copyright 2014, Nitidum Pty Ltd.Licensed under the GNU GENERAL PUBLIC LICENSE v2.
Package: rounded-calculate
Rounded calculatorFeaturesThis package allows users to calculate addition, substraction, division, multiplication and power of n root of active memory value. Also package users can print history of calculations and undo last actions to access specific history values. All calculations made with this package are rounded to 8 decimal points.Getting startedInstalation of the Rounded Calculate package is done by running commandpip install rounded-calculatePackage usageInit CalculatorAssign Calculator class to desired variablecalculator = Calculator()All the calculations made by the Calculator is based on value of the Calculator memory.Calculator class contains class of Memory which is storing all the history of calculations performed by using this package.Calculator functionsAll Calculator methods returns calculation result where operand 1 is current value of calculator memory and operand 2 is called method parameter. This do not apply for memory related methods.calculator.add(n)Adds parameter n to calculator memory value. Returns new calculator memory value.calculator.substract(n)Substracts parameter n from calculator memory value. Returns new calculator memory value.calculator.multiply(n)Multiplies calculator memory value by power of parameter n. Returns new calculator memory value.calculator.divide(n)Divides calculator memory value by power of parameter n. Returns new calculator memory value.calculator.root(n)Adds parameter n to last calculation of calculator outcome. Returns new calculator memory value.calculator.undo()Removes last entry of calculator history.calculator.reset_memory()Deletes all calculations history, sets next calculation base to 0.calculator.print_history()Prints all calculations history.LicenseLicensed under the MIT License.