Saravanan666/pypi-org huggingface dataset:
Package: reaxpro-wrappers
ReaxPro wrappers:This repository is a collection of wrappers used in theReaxProproject.
It holds wrappers for theAmsterdam Modeling Suite(AMS) andZacros.AuthorsPablo Lopez-Tarifa(Main author). The Netherlands eScience Center.Matthias Büschelberger(Contributor). Fraunhofer Instituet for Mechanics of Materials (IWM)Joana Francisco Morgado(Contributor). Fraunhofer Institute for Mechanics of Materials (IWM)IndexRequirementsWrapper generalsInstallationExampleRequirementsIf you want to use this wrapper set, make sure you have installed:TheSimphony OSP-coreversion > 3.8.0.TheReaxPro ontology.For AMS users, a licensed copy ofAMSinstalled.For Zacros users, both a licensed copy ofZacroscode andpyZacroslibrary installed.StructureA wrapper is a piece of code that slightly modifies the behavior of a function.The ReaxPro wrappers are built around the running functions of the above-mentioned software. Their main task is to translate (map) the semantic script provided by the user to the terms that are understood by the engines.For a given engine XXX, there is a folder reaxpro-wrappers/osp/wrappers/simXXX/simXXX_session.py containing the Simphony wrapper session that will trigger the job execution.In the folder reaxpro-wrappers/osp/tools is placed all the tooling for the semantic to syntactic mapping.InstallationFirst of all, you will need to install OSP-core, plams, AdaptiveDesignProcedure and pyZacros (all except osp-core are not on PyPI yet unfortunately):(env)user@computer:~/reaxpro-wrappers$pipinstallosp-corehttps://github.com/SCM-NV/pyZacros/archive/refs/tags/v.1.2.ziphttps://github.com/mbracconi/adaptiveDesignProcedure/archive/refs/tags/v1.4.0.zipgit+https://github.com/SCM-NV/PLAMS@7661960a9db53249a0b77935dacc8a7668c2489bThen, finally install the wrapper. Simply type:(env)user@computer:~/reaxpro-wrappers$pipinstallreaxpro-wrappers... or when the code is cloned from source:(env)user@computer:~/reaxpro-wrappers$pipinstall.LicenseThis project is licensed under the LGPL-3.0/BSD 3-Clause license. See the LICENSE file for more information.DisclaimerCopyright (c) 2014-2023, Netherlands eScience Center (NLeSC) and Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. acting on behalf of its Fraunhofer IWM.
Package: reBarcode
Fork ofpyBarcodeproject.This library provides a simple way to create barcodes using only the
Python standardlib. The barcodes where created as SVG objects.RequirementsSetuptools/distribute for installation (new in version 0.7beta4)Python 2.6 or above (including Python 3.x)On Python 2.6, 3.0, 3.1: argparse (for the commandline script)Program to open SVG objects (your browser should do it)Optional: PIL to render barcodes as images (PNG, JPG, …)InstallationMake sure you have setuptools/distribute installed.Unpack the downloaded file, cd into the viivakoodi directory and runpython setup.py install. Or just copy the barcode dir somewhere in
your PYTHONPATH.The best way is to use pip:pip install viivakoodi.Provided BarcodesEAN-8, EAN-13, EAN-14, UPC-A, JAN, ISBN-10, ISBN-13, ISSN, Code 39, Code 128, PZNTodoAdd documentationImprove Python 3 supportUsageInteractive:>>> import barcode
>>> barcode.PROVIDED_BARCODES
[u'code39', u'code128', u'ean', u'ean13', u'ean8', u'gs1', u'gtin',
 u'isbn', u'isbn10', u'isbn13', u'issn', u'jan', u'pzn', u'upc', u'upca']
>>> EAN = barcode.get_barcode_class('ean13')
>>> EAN
<class 'barcode.ean.EuropeanArticleNumber13'>
>>> ean = EAN(u'5901234123457')
>>> ean
<barcode.ean.EuropeanArticleNumber13 object at 0x00BE98F0>
>>> fullname = ean.save('ean13_barcode')
>>> fullname
u'ean13_barcode.svg'
# Example with PNG
>>> from barcode.writer import ImageWriter
>>> ean = EAN(u'5901234123457', writer=ImageWriter())
>>> fullname = ean.save('ean13_barcode')
u'ean13_barcode.png'
# New in v0.4.2
>>> from io import BytesIO
>>> fp = BytesIO()
>>> ean.write(fp)
# or
>>> f = open('/my/new/file', 'wb')
>>> ean.write(f) # PIL (ImageWriter) produces RAW format here
# New in v0.5.0
>>> from barcode import generate
>>> name = generate('EAN13', u'5901234123457', output='barcode_svg')
>>> name
u'barcode_svg.svg'
# with file like object
>>> fp = StringIO()
>>> generate('EAN13', u'5901234123457', writer=ImageWriter(), output=fp)
>>>Now open ean13_barcode.[svg|png] in a graphic app or simply in your browser
and see the created barcode. That’s it.Commandline:$ pybarcode{2,3} create "My Text" outfile
New barcode saved as outfile.svg.
$ pybarcode{2,3} create -t png "My Text" outfile
New barcode saved as outfile.png.

Try `pybarcode -h` for help.Changelogv0.1:First release.
Package: rebase
rebaseWhat is it?Rebase is a small library consisting of powerful reusable components aimed at making your Data Layer more more robust. With the changes of how data is being stored in databases, it is becoming very challenging to validate data specially in NoSQL databases.Rebase is designed in such a way that it is easier to manipulate the data and project them in different views.Challenges that lead to this ideaWorking daily with data having different structures becomes a pain eventually. Sometimes you have to adapt or map an object to another format or apply some filters to part of the data. This occurs very often when have data coming from different sources and want to conform them.Getting StartedInstallationInstall viapip$pipinstallrebaseDocumentationcorerebase.core.Objectrebase.core.Modelrebase.core.Validatorvalidatorsrebase.validators.BoolValidatorrebase.validators.IntegerValidatorrebase.validators.NestedValidatorrebase.validators.RangeValidator
Package: rebasehelper
Welcome to rebase-helperThere are several steps that need to be done when rebasing a package. The goal ofrebase-helperis to automate most of these steps.How to get it running?rebase-helperis packaged in Fedora, so you can just install it withdnf.If you wish to use the latest codebase, consultinstallation instructions.How to use it?After installation, executerebase-helperfrom a directory containing SPEC file, sources and patches (usually cloned dist-git repository):$ls
foo-3.1.9.tar.xzfoo.specsourcesWithout any arguments or configurationrebase-helperwill attempt to determine the latest upstream version automatically.
If that fails, or if you wish to rebase to some different version, you can specify it explicitly as an argument:$rebase-helper3.1.10or you can pass source tarball filename instead:$rebase-helperfoo-3.1.10.tar.xzFor complete CLI reference seeusage.Alternatively, you can runrebase-helperin a container:$ docker run -it -e PACKAGE=foo quay.io/rebasehelper/rebase-helper:latestSeecontainer referencefor more information.What do I get from it?rebase-helperalways createsrebase-helper-resultsdirectory containing the following items:PathDescriptionreport.txtsummary report with all important informationchanges.patchdiff against original files, directly applicable to dist-git repologs/log files of various verbosity levelsrebased-sources/git repository with all modified filescheckers/reports from individual checkers that were runold-build/logs and results of old (original) version buildnew-build/logs and results of new (rebased) version buildHow does it work?The following steps describe a rebase process:Preparationrebase-helper-workspaceandrebase-helper-resultsdirectories are createdoriginal SPEC file is copied torebase-helper-results/rebased-sourcesdirectory and its Version tag is modifiedGetting sourcesold and new source tarballs are downloaded and extracted torebase-helper-workspacedirectoryold sources are downloaded from lookaside cache if possibleDownstream patchesnew git repository is initialized and the old sources are extracted and commitedeach downstream patch is applied and changes introduced by it are commitednew sources are extracted and added as a remote repositorygit-rebaseis used to rebase the commits on top of new sourcesoriginal patches are modified/deleted accordinglyresulting files are stored inrebase-helper-results/rebased-sourcesdiff against original files is saved torebase-helper-results/changes.patchBuildold and new source RPMs are created and built with selected build toolold SRPM and RPMs can also be downloaded from Koji to speed up the rebaseComparisonmultiple checker tools are run against both sets of packages and their output is stored inrebase-helper-results/checkersdirectoryCleanuprebase-helper-workspacedirectory is removedVideosA talk aboutrebase-helperat DevConf.CZ 2020 given by František Nečas:Another presentation, this time from DevConf.CZ 2016, by Petr Hráček and Tomáš Hozza:
Package: rebb-val-python3
RebbVal-PythonPython verion of RebbValWhat is RebbValIs RebbVal a validation library? Nope, RebbVal is a external DSL for validation. It makes writing validation rules easier and more natural. Since it is more human readable than most of existing validation libraries, it means less bugs.Adomain-specific language(DSL) is a computer language specialized to a particular application domain.DocumentEnglishChineseOther LanguageRebbVal-JavaRebbVal-JavaScriptRebbVal-PHP
Package: rebecca.annotationmapper
rebecca.annotationmapperis viewmapper for pyramid web application.
That processes annotations of view arguments.INSTALL$ pip install rebecca.annotationmapperUSAGErebecca.annotationmapperprovides include fook.config.include('rebecca.annotationmapper')Annotate arguments usingrebecca.annotationmapper.annotationsdef hello(context, request, nane: FromMatchDict):
    request.response.text = "Hello, {name}".format(name=name)
    return request.response

config.add_route("hello", "/hello/{name}")
config.add_view(hello, route_name="hello")The argumentnameannotated byFromMatchDictis
given value fromrequest.matchdict['name']byrebecca.annotationmapper.AnnotationViewMapper.For example, you access ‘http://localhost/hello/aodag’ and you get message ‘Hello, aodag’.AnnotationsFromMatchDictprovides value fromrequest.matchdict.FromParamprovides value fromrequest.params.FromSessionprovides value fromrequest.session.FromHeaderprovides value fromrequest.headers.FromAttrprovides value from attribute ofrequest.CHANGES0.1first release
Package: rebecca.fanstatic
rebecca.fanstaticfanstatic utilities forpyramid web framework.add_fanstatic_resourcesdirectiveAdd fanstatic resources for renderers matched torenderer_name_pattern.usage:config.include('rebecca.fanstatic')
config.add_fanstatic_resources(['js.jquery.jquery', 'js.jqueryui.jqueryui'], r'.*\.pt')list_fanstaticcommandusage: list_fanstatic [-h] [-o OUTPUT_DIRECTORY] [-l [LIBRARY [LIBRARY ...]]]
                      [--simulate]

Collect fanstatic resources and copy to destination directory.

optional arguments:
  -h, --help            show this help message and exit
  -o OUTPUT_DIRECTORY, --output-directory OUTPUT_DIRECTORY
                        Set destination directory name. Default directory name
                        is 'fanstatic'.
  -l [LIBRARY [LIBRARY ...]], --library [LIBRARY [LIBRARY ...]]
                        Specify copy library names. Accept multiple options.
  --simulate            Simulate collecting resources. Print resource paths
                        and destination paths.CHANGES0.1.2fix packaging bug.0.1.1fix packaging bug.0.1first release
Package: rebecca.form
rebecca.formpyramidview components based onFormAlchemy.ComponentsFormViewAddFormViewEditFormViewDisplayViewExamplesModel for Exampleclass Item(Base):
    __tablename__ = 'items'
    id = sa.Column(sa.Integer, primary_key=True)
    name = sa.Column(sa.Unicode(255), nullable=False)
    value = sa.Column(sa.Integer, nullable=False)

    def __unicode__(self):
        return u"Item id={id}, name={name}, value={value}".format(id=self.id, name=self.name, value=self.value)AddFormViewclass AddItemView(AddFormView):
    __x_model__ = Item
    __x_session__ = DBSessionEditFormViewclass EditItemView(EditFormView):
    __x_factory__ = item_finderDisplayViewclass DisplayItemView(DisplayView):
    __x_factory__ = item_finder__x_factory__is callable to find model from request.UtilitiesMatchDictFinderqueries for specified Model with conditions fromRequest.matchdict.For example, create finder foritem_finder = MatchDictFinder(Item, DBSession, [(Item.id, 'item_id')])item_finder executes like thisDBSession.query(Item).filter(Item.id==request.matchdict['item_id']).one()ContributorsAtsushi Odagiri, original authorChangelog0.1first release
Package: rebecca.login
rebecca.loginINSTALL$ pip install rebecca.loginUSAGErebecca.loginprovidesloginandlogoutfunctions.loginrequiresrebecca.repository.interfaces.IRepositorynamedusers.loginreturns authenticated headers.example:def login_success(self, values):
    user_name = values['user_name']
    password = values['password']
    authenticated = login(self.request, user_name, password)
    if not authenticated:
        return
    headers = security.remember(self.request, authenticated)
    response = HTTPFound(self.request.route_url('top'))
    response.headerlist.extend(headers)
    return responseChanges0.1 (2013-11-16)first release
Package: rebecca.menu
ContentsIntroductionInstallUsageregister and use MenuPermissionsMatchdictContributorsChangelogIntroductionrebecca.menuis component forpyramid, that provides management of menu urls.InstallYou can installrebecca.menuwith pip.$ pip install rebecca.menuUsagerebecca.menuprovides include hook.:config.include('rebecca.menu')register and use MenuTo add menu, useadd_route_menudirective.:config.add_route('menu1', '/menus/menu1')
config.add_route('menu2', '/menus/menu2')
config.add_route_menu(menu_name="system", route_name="menu1", display_name="system menu item1")Or useroute_menu_configdecorator.:@route_menu_config('system')
class SystemMenu3(object):
    route_name="menu3"
    display_name = "system menu item3"To get menu, useget_menuAPI:from rebecca.menu import get_menu

def menu(request):
    system_menu = get_menu(request, system)
    return dict(menu=system_menu)get_menureturns the object that providesrebecca.menu.interfaces.IMenu.IMenuhas a property namedmenu_itemsthat is list includingIMenuItem.IMenuItemhas some property,display_name,nameandurl.
Maybe you use menu items in template such as below:<ul class="nav">
%for m in system_menu.menu_items:
    <li><a href="${m.url}">${m.display_name}</a></li>
%endfor
</ul>PermissionsRegistering menu with permission@route_menu_config('system')
class SystemMenu3(object):
    route_name="menu3"
    display_name = "system menu item3"
    permission = 'menu3-permission'get_menucheck permission of request withhas_permission,
causes that menu_items includes menu items passed permission check.MatchdictIf route has placeholder, the menu url fills values fromrequest.matchdict.config.add_route("menu1", 'menus/menu1/{testing_vars}')
menu_factory.add_item(route_name="menu1", display_name="testing-menu1")When matchdict has values fortesting_varsas “that-is-testing”, menu1’s url is “menus/menu1/that-is-testing”.ContributorsAtsushi Odagiri, Original AuthorChangelog0.1 (2013-10-13)first release
Package: rebecca.sqla
Contentsrebecca.sqlaINSTALLUSAGEModelLoaderandSAContextContributorsChangelogrebecca.sqlarebecca.sqlais utility to load model made on SQLAlchemy.INSTALLInstall using pip or easy_install:$ pip install rebecca.sqla
$ easy_install rebeca.sqlaUSAGErebecca.sqlneedssqlalchemy.orm.scoped_session.specify session object and dsn string in settings:sqlalchemy.url = 'sqlite:///'
rebecca.sqla.session = your.app.models.DBSessionrebecca.sqlahas include hook:config.include("rebecca.sqla")this hook sets up thebindconfiguration of DBSession tosqlalchemy.url.ModelLoaderandSAContextrebecca.sqlacreates attribute named “sa”  torequest.context.context.saisSAContextto load models fromModelLoaderregistered byconfig.add_model_loader.here is example models:class Person(Base):
    __tablename__ = 'person'
    id = Column(Integer, primary_key=True)
    name = Column(Unicode(255))and example route:config.add_route('person', '/person/{person1_id}/{person2_id}')register model loaders:config.add_model_loader('person1', Person, [('person1_id', 'id')])
config.add_model_loader('person2', Person, [('person2_id', 'id')])add_model_loadertakes 3 arguments.
first is attr name ofSAContext,
second is a model loaded fromModelLoaderand last is mappings that matchdict param to model attribute.second argument can be dotted name.in view, context hasSAContextnamed “sa” attribute, that has properties of registered models.ModelLoaders load model with query using matchdict parameters.def person(context, request):
    person1 = context.sa.person1
    person2 = context.sa.person2ContributorsAtsushi Odagiri, Original AuthorChangelog0.1 (2013-03-14)first release
Package: rebecca.testing
ContentsGetting StartedinstallUsageContributorsChangelogGetting Startedrebecca.testing provides test fixtures forpyramidapplication usingpytest.installinstall with pip basically:$ pip install rebecca.testingUsageconfig fixtureconfig fixture provides dummy config with automatic setup and teardown:from pyramid import testing
from rebecca.testing import config

def test_it(config):
    config.include('your.app')
    from your.app.views import ClassUnderTheTest
    request = testing.DummyRequest()
    result = ClassUnserTheTest(request)ContributorsAtsushi Odagiri, Original AuthorChangelog0.1 (2013-08-28)first release
Package: rebecca.todict
Contentsrebecca.todictINSTALLUSAGEregister todict adapterby directiveby todict_decoratorusing todict APIJSON Renderer using todict APIContributorsChangelog0.5 (2013-09-22)0.4 (2013-08-31)0.3 (2013-08-31)0.2 (2013-03-02)0.1 (2013-02-16)rebecca.todictrebecca.todictis API and directive converting object todict.INSTALLInstall using pip or easy_install.:$ pip install rebecca.todict
$ easy_install rebecca.todictUSAGErebecca.todict prividesincludemehook that will set upset_todictdirective.:config.include('rebecca.todict')using with paste deploy:pyramid.includes = rebecca.todictregister todict adapterby directiveTo register todict adapter, you can useset_todictdirective.:config.set_todict(Person, person_to_dict)That register todict adapter converging Person object to dict.You can register named adapter too:config.set_todict(Person, person_to_dict_short, name="short")by todict_decoratortodict_decoratorregistertodictAdapter casually.:@todict_config(Person)
def person_to_dict(request, person):
    return dict(....)using todict APIRegistered adapters are used by todict API:from rebecca.todict import todict

d = todict(request, person)d = todict(request, person, name="short")JSON Renderer using todict APIrebecca.todict.renderers.json_renderer_factoryis factory of renderer using todict API.to use this renderer, register renderer factory:config.add_renderer('.json', 'rebecca.todict.renderers.json_renderer_factory')specify “.json” renderer onview_configoradd_view:@view_config(renderer="short.json")
def person_list(request):
    return dict(people=[Person(), Person()])the renderer usetodictAdapters named “short”.ContributorsAtsushi Odagiri, Original AuthorYusuke MuraokaChangelog0.5 (2013-09-22)fix content type using json renderer#10.4 (2013-08-31)fix conflict multi todict registration for the same name and different type0.3 (2013-08-31)fix conflict multi todict registration0.2 (2013-03-02)add json renderer using todict APItodict_config decorator0.1 (2013-02-16)first commit
Package: rebecca.todict_bpmappers
Contentsrebecca.todict_bpmappersINSTALLUSAGEContributorsChangelogrebecca.todict_bpmappersrebecca.todict_bpmappersis implementation forrebecca.todictusingbpmappersINSTALLInstall using pip or easy_install.:$ pip install rebecca.todict_bpmappers
$ easy_install rebecca.todict_bpmappersUSAGErebecca.todict_bpmappershas include hook.:config.include('rebecca.todict_bpmappers')This hook will includerebecca.todicttoo.bpmapperdecorator register todict adapter implemented bybpmappers.from bpmappers import Mapper, RawField
from rebecca.todict_bpmappers import bpmapper

@bpmapper('dummy.Person', name="p1")
class PersonMapper(Mapper):
    username = RawField('name')
    num = RawField('value')To use that mapper, calltodictAPI ofrebecca.todict:d = todict(request, person, name="p1")ContributorsAtsushi Odagiri, Original AuthorChangelog0.1 (2013-02-16)first release
Package: rebecca.view
Contentsrebecca.viewBasicView methods and propertiesSoftificationUSAGEContributorsChangelog0.2 (2013-03-11)0.1 (2013-03-10)rebecca.viewrebecca.viewis helper classes for pyramid views.BasicView methods and propertiespropertiescontextview context passed to constructorrequestrequest passed to constructorresponseresponse attribute ofrequestbodybody attribute ofrequestmethodsredirect(url)create HTTPFound object from urlredirect_route(route_name, **values)create HTTPFound object with route_urlaction_dispatchcall method named*_actionwith request param.SoftificationSoftificationis context manager to replace Exceptions to the other Exceptions.with Softification(NoResultFound, HTTPNotFound):
    item = DBSession.query(Item).filter(Item.id==id).one()Ifone()method raisesNoResultFoundexception, the context manager catch that
and raises the HTTPNotFound exception.
You can use tuple for target Exception classes.USAGEBasicViewTo useBasicView, inherit that simply.:class Greeting(BasicView):
    def __call__(self):
        return self.redirect_route('top', v=1)ContributorsAtsushi Odagiri, Original AuthorChangelog0.2 (2013-03-11)add softification API0.1 (2013-03-10)first release
Package: rebelbase
RebelBaseRebelBaseis a Python package for working with numbers of any base.Full documentation is online atrebelbase.dev.What does RebelBase do?Want to work with base 3 numbers? We've got you covered.fromrebelbaseimportBase3n=Base3(42)# Represent decimal 42 in base 3print("n:    ",n)#  "1120" (Decimal 42     == base 3  1120)print("n + 1:",n+1)#  "1121" (Decimal 42 + 1 == base 3  1121)print("n - 1:",n-1)#  "1112" (Decimal 42 - 1 == base 3  1112)print("n / 2:",n/2)#   "210" (Decimal 42 / 2 == base 3   210)print("n * 2:",n*2)# "10010" (Decimal 42 * 1 == base 3 10010)n=Base3("212")# Create the base 3 value 212print(int(n))# "23"    (Base 3 212     == decimal 23)Need to make your own bonkers base 5 system with vowels for digits? No problem.fromrebelbase.numberimportNumberclassBase5(Number):@classmethoddefdigits(cls)->tuple[str,...]:return("A","E","I","O","U")n=Base5(42)# Represent decimal 42 in base 5print("n:    ",n)# "EOI" (Decimal 42     == base 5 EOI)print("n + 1:",n+1)# "EOO" (Decimal 42 + 1 == base 5 EOO)print("n - 1:",n-1)# "EOE" (Decimal 42 - 1 == base 5 EOE)print("n / 2:",n/2)#  "UE" (Decimal 42 / 2 == base 5  UE)print("n * 2:",n*2)# "OEU" (Decimal 42 * 2 == base 5 OEU)n=Base5("OOO")# Create the base 5 value OOOprint(int(n))# "93"  (Base 5 OOO     == decimal 93)ANumbercan becreatedwithoptional zero supportfor any base.Numbers can be initialised with their decimal value or string representation.A ton of Pythonoperations-- including addition, subtraction, floor and true division, multiplication, modulo and exponentiation -- work out of the box.InstallationRebelBaserequires Python 3.9 or later.pip install rebelbaseSupportPlease raise bugs, request new features and ask questions atgithub.com/cariad/rebelbase/issues.ContributionsSeeCONTRIBUTING.mdfor contribution guidelines.The ProjectRebelBaseis © 2022 Cariad Eccleston and released under theMIT Licenseatcariad/rebelbase.The AuthorHello! 👋 I'mCariad Ecclestonand I'm a freelance backend and infrastructure engineer in the United Kingdom. You can find me atcariad.earth,github.com/cariad,linkedin.com/in/cariadand on Mastodon at@cariad@tech.lgbt.