Saravanan666/pypi-org huggingface dataset:
Package: repoze.who.plugins.vepauth
This is a repoze.who plugin for automated authentication via BrowserID:https://browserid.org/https://wiki.mozilla.org/Identity/BrowserIDSyncThe plugin implements an experimental protocol for authenticating to ReSTful
web services with the Verified Email Protocol, a.k.a Mozilla’s BrowserID
project.  It is designed for use in automated tools like the Firefox Sync
Client.  If you’re looking for something to use for human visitors on your
site, please try:http://github.com/mozilla-services/repoze.who.plugins.browseridWhen accessing a protected resource, the server will generate a 401 challenge
response with the scheme “OAuth+VEP” as follows:> GET /protected_resource HTTP/1.1
> Host: example.com

< HTTP/1.1 401 Unauthorized
< WWW-Authenticate: OAuth+VEP url="/request_token"The client should extract the url from this challenge and POST a VEP assertion
to that location.  This will create a new authentication session and return a
set of OAuth client credentials:> POST /request_token HTTP/1.1
> Host: example.com
> Content-Type: application/x-www-form-urlencoded
>
> assertion=VEP_ASSERTION_DATA

< HTTP/1.1 200 OK
< Content-Type: application/json
<
< {
<   "oauth_consumer_key": SESSION_TOKEN,
<   "oauth_consumer_secret": SESSION_SECRET
< }Subsequent requests should be signed using these credentials in Two-Legged
OAuth mode:> GET /protected_resource HTTP/1.1
> Host: example.com
> Authorization: OAuth oauth_consumer_key=SESSION_TOKEN,
>                      oauth_signature_method="HMAC-SHA1",
>                      oauth_version="1.0",
>                      oauth_timestamp=TIMESTAMP,
>                      oauth_nonce=NONCE
>                      oauth_signature=SIGNATURE

< HTTP/1.1 200 OK
< Content-Type: text/plain
<
< For your eyes only:  secret data!Session tokens are timestamped and will eventually expire.  If this happens
you will receive a 401 response as before, and should POST a new assertion
to obtain fresh credentials.Extending the token managementrepoze.who.plugins.vepauthis extensible. If you want to provide a different
mechanism to manage the tokens, you can do so by providing a different token
manager instance to the plugin with thetoken_manageroption.TheTokenManagerclass have two methods than need to be implemented (it’s an
abstract class):make_tokenandparse_token. The implementation details are
left to the childs classes.repose.who.plugins.vepauthcomes with oneSignedTokenManagerwhich
implement a simple token management class in pure python. It has a number of
methods that can be overridden to customize its behavior.0.3.0 - 2012-02-14Replaced Two-Legged OAuth with MAC Access Auth, implemented according
to the latest draft standard:https://tools.ietf.org/html/draft-ietf-oauth-v2-http-mac-010.2.0 - 2012-02-14Added basic pattern-matching for the token_url, e.g. “/{app}/token”.Made TokenManager.make_token and TokenManager.parse_token accept the
incoming request as first argument, mostly so they can get at the
results of pattern-matching.Let TokenManager.make_token return a dict of extra info to be included
in the response.0.1.0 - 2012-02-07Initial release.
Package: repoze.who-testutil
repoze.who-testutil is a repoze.who plugin which modifies repoze.who’s original
middleware to make it easier to forge authentication, without bypassing
identification (this is, running the metadata providers).It’s been created to ease testing of repoze.who-powered applications, in a way
independent of the identifiers, authenticators and challengers used originally
by your application, so that you won’t have to update your test suite as your
application grows and the authentication method changes.
Package: repoze.who-use_beaker
repoze.who-use_beakeris arepoze.whoidentifierplugin. It is aimed at
replacingrepoze.who.plugins.auth_tktin order to store the user data inbeaker session.The plugin stores a dictionary containing at least{‘repoze.who.userid’: userid}under keyrepoze.who.tkt.UseBeakerPlugintakes the following parameters:key_name(default:repoze.who.tkt) - the key name to store the userid
under:>>> userid = session['repoze.who.tkt']session_name(default:beaker.session) - the key name of the beaker
session in the WSGI environment:>>> session = environ['beaker.session']delete_on_logout(default:false) - iffalsethen on logoutsession['repoze.who.tkt']is erased but the other session data stays and
will be reused during the next session. If you want the session to be
invalidated passdelete_on_logout = Truealsopersist(default:[‘userdata’]) - a sequence of item keys that are
persisted along torepoze.who.useridUsually you should usemake_pluginmethod instead of instantiatingUseBeakerPlugindirectly:>>> from repoze.who.plugins.use_beaker import make_plugin
>>> plugin = make_plugin(**kw)In order to properly use thebeaker.sessionrepoze.who(withrepoze.who-use_beaker) has to be placed lower in the WSGI stack. Usually this
means that you have to definerepoze.whoin your framework’s middleware
configuration higher than beaker session. E.g. (using the factory fromrepoze.what-quickstart):>>> from beaker.middleware import SessionMiddleware
>>> from repoze.what.plugins.quickstart import setup_sql_auth
>>> from repoze.who.plugins.use_beaker import make_plugin as make_beaker_plugin

... # app definition here

>>> app = setup_sql_auth(app,
...     User, Group, Permission, DBSession,
...     # HERE we provide the beaker plugin to be used as the primary identifier
...     identifiers=[('use_beaker', make_beaker_plugin())],
...     form_plugin=... # The rest of repoze configuration

... # more middlewares here

>>> app = SessionMiddleware(app, config)Git repository is located atGitHub.com.
Package: repoze.workflow
repoze.workflowrepoze.workflow is a state machine and associated configuration system
useful for workflow-like applications.  Refer to docs/index.rst orthe online docsfor further
information.repoze.workflowrepoze.workflow is a state machine and associated configuration system
useful for workflow-like applications.  Refer to docs/index.rst orthe online docsfor further
information.
Package: repoze.xmliter
This package provides a wrapper forlxmltrees which serializes to
string on iteration, but otherwise makes the tree available in an
attribute.The primary for this is WSGI middleware which may avoid
needless XML parsing and serialization.UsageIt’s recommend to use thelazydecorator on your application method. This
allows you to return an lxml tree object, which is then automatically turned
into an XMLSerializer.>>> from repoze.xmliter import lazy>>> @lazy
... def application(environ, start_response)
...     return some_lxml_treeYou may provide a serializer function, which will be used when the
XMLSerializer is eventually iterated over (i.e. when the response is rendered):>>> @lazy(serializer=lxml.html.tostring)
... def application(environ, start_response)
...     return some_lxml_treeMiddleware can useisinstanceto test if the result is an XML
iterable:>>> from repoze.xmliter.serializer import XMLSerializer
>>> isinstance(result, XMLSerializer)In this case, the middleware can simply access thetreeattribute of
the result.There are two convenience methods which can be used to parse a WSGI iterable
of strings and build an XMLSerializer object, but avoids re-building the
serializer if the input iterable is already an instance of XMLSerializer:>>> from repoze.xmliter.utils import getXMLSerializer
>>> result = getXMLSerializer(result)Or, if you are parsing HTML:>>> from repoze.xmliter.utils import getHTMLSerializer
>>> result = getHTMLSerializer(result)Ifresultis not an XMLSerializer, it will be parsed using a feed parser,
turned into an lxml tree, and wrapped up in an XMLSerializer, which is
returned.Changelog0.6.1 (2022-01-14)Fixed tests with lxml 4.7.1 or higher.
Fixesissue 8.
[maurits]0.6 - 2014-09-21Python 3 compatibility
[Lennart Regebro]0.5 - 2012-01-25Add __len__ to serializer to help WSGI servers.
[Laurence]Serializer should iter the entire string in one go.
[Laurence]0.4 - 2011-06-16Ensure trailing space is removed when replacing doctype with empty string.
[Laurence]0.3 - 2011-06-03Add doctype option to replace doctype on serialization.
[Laurence]0.2 - 2010-09-11Use document encoding by default. (This fixes test failure on Ubuntu 10.04.)
[Laurence]Defer to xsl:output settings when serializing an XSLResultTree.
[Laurence]Turn off pretty printing by default for HTML to avoid affecting rendering on
the browser.
[Laurence]0.1 - 2010-04-21Initial release
Package: repoze.zcml
repoze.zcml READMErepoze.zcmlis a package which provides basic ZCML directives for
the Zope Component Architecture (such asutility,subscriber,
andadapter).  You should userepoze.zcmlif your application
doesn’t need the more advanced features of the “stock” directive types
of the same names present inzope.configuration(e.g. permissions,
and trusted adapters/utilities).Please see docs/index.rst for the documentation.repoze.zcml Changelog1.1 (2020-07-01)Add support for Python 3.5, 3.6, 3.7, and 3.8.Drop support for Python 2.6, 3.2, 3.3, and 3.4.1.0b1 (2014-12-11)Add support for PyPy and PyPy3.Add support for Python 3.2, 3.3, 3.4.Add support for continuous integration usingTravis.Add support for continuous integration usingtoxandjenkins.Add ‘setup.py dev’ alias (runssetup.py developplus installsnoseandcoverage).0.4 (2009-09-15)Makezope.testingdependency a testing-only requirement.100% test coverage.0.3 (2009-05-28)Provide compatbility with older versions of zope.component which
have a CA registry that doesn’t accept afactoryargument
toregisterUtility.0.2Depend onzope.component >= 3.5.0(utility directive requires it).0.1Initial release.
Package: repozitory
Repozitory is a library for archiving documents and recovering old
versions. It is designed to work in tandem with a primary document
storage mechanism such as ZODB. Repozitory stores the document versions
in a PostgreSQL or SQLite database using SQLAlchemy. Repozitory was
built for KARL, an open source online collaboration system, but
Repozitory is intended to be useful for any Python project that stores
user-editable documents.  Repozitory does not require ZODB.See the documentation athttp://readthedocs.org/docs/repozitory.Changes1.3 (2012-09-01)Added performance metrics using the perfmetrics package.1.2 (2012-01-30)Added theshredmethod for deleting objects and containers permanently.1.1 (2012-01-24)Added theiter_hierarchymethod, which iterates over archived
containers in a hierarchy more efficiently than repeated calls tocontainer_contents.Added thewhich_contain_deletedmethod, which is useful
for making a hierarchical trash UI with reasonable performance.
Designed to help solve lp:913990.1.0 (2011-11-17)Fixed lp:891277: Blob file chunks were sometimes retrieved in the
wrong order due to an incorrect backref declaration.0.2.1 (2011-09-22)Fixed packaging on PyPI (essential files were missing;
setuptools-git was needed.)0.2 (2011-09-15)Added the new_container_ids attribute to deleted item records.  This
allows undeletion UIs to filter out objects that have moved to another
container.  It should also allow applications to redirect users to the new
location of a moved object.  No schema migration is needed.Added the get_version method to archives.  The get_version method is more
efficient than iterating over the entire history of an object.0.1 (2011-08-14)Initial release.
Package: repple
ReppleQuick and dirty opinionated fdisk-style REPLsWhitespace-separated command and argumentsExcept unary string functionsSelector promptfromreppleimportReppler=Repple()r['a']=(lambdax:print(x+1),"Adds one to first argument and prints it")r['A']=lambdax:print(x+2)defvariadic_fn(*args):print(*[a+1forainargs])r.main()Command: h
        q               Exits the program
        h               Show this help
        a <x>           Adds one to first argument and prints it
        A <x>
        b <args>
Command: a 1
2
Command: A 1
3
Command: b 1 2
2 3SelectorfromreppleimportReppler=Repple()r['a']=lambda:print(Repple.selector(['a','b','c']))r.main()Command: a
        1: a
        2: b
        3: c
Select your items: 1 3
['a', 'c']Unary string functionfromreppleimportReppler=Repple()r.add_string_func('p',lambdax:print(x))r.main()Command: p Hello world!
Hello world!
Package: reppy2
Replaces the built-in robotsparser with a
RFC-conformant implementation that supports modern robots.txt constructs like
Sitemaps, Allow, and Crawl-delay. Main features:Memoization of fetched robots.txtExpiration taken from theExpiresheaderBatch queriesConfigurable user agent for fetching robots.txtAutomatic refetching basing on expirationThis is a patched fork of the last pure Python version that
works on Python 2 and 3.
Package: repr
A magic shortcut to generate __repr__ methods for your classes.Free software: BSD licenseInstallationpip install reprThis package contains a single modulemagic_reprcalled so
to not conflict with standart python’srepr.ReasoningWhat do you think each time, writing such code?def__repr__(self):return"""
Issue(changelog={self.changelog},
      type={self.type},
      comment={self.comment},
      created_at={self.created_at},
      resolved_at={self.resolved_at})""".format(self=self).strip().encode('utf-8')Isn’t this much better and readable?__repr__=make_repr('changelog','type','comment','created_at','resolved_at')And this produces much nicer output:<Issuechangelog=<Changelognamespace=u'python'name=u'geocoder'source=u'https://github.com/DenisCarriere/geocoder'>type=u'wrong-version-content'comment=u'AllMyChanges should take release notes from the web site.'created_at=datetime.datetime(2016,6,17,6,44,52,16760,tzinfo=<UTC>)resolved_at=None>Another advantage of the magic_reprIs it’s recursiveness. If you usemagic_reprfor your objects and they
include each other, then representation of the parent object will include
child objects properly nested:<Foobars={1:<Barfirst=1second=2third=3>,2:<Barfirst=1second=2third=3>,u'три':<Barfirst=1second=2third=3>}>And all this for free! Just do__repr__ = make_repr().UsageFor simple cases it is enough to callmake_reprwithout arguments. It will figure out
which attributes object has and will output them sorted alphabetically.You can also specify which attributes you want to include in “representaion”:frommagic_reprimportmake_repr__repr__=make_repr('foo','bar')And to specify a function to create a value for an attribute, using keywords:frommagic_reprimportmake_reprclassSome(object):defis_active(self):returnTrueSome.__repr__=make_repr(active=Some.is_active)Pay attention, that in this case__repr__was created after the class definition.
This is because inside of the class it can’t reference itself.Documentationhttps://python-repr.readthedocs.io/DevelopmentTo run the all tests run:toxNote, to combine the coverage data from all the tox environments run:Windowsset PYTEST_ADDOPTS=--cov-append
toxOtherPYTEST_ADDOPTS=--cov-append toxChangelog0.3.1 (2016-06-22)Fixed issue #1 prevented generated __repr__ methods to work in mutithreaded programs.0.3.0 (2016-06-20)Nowmake_reprcan be used for recursive datastructures.0.2.1 (2016-06-19)Documentation improved.0.2.0 (2016-06-19)Better handling of nested datastructure.Callables as source of the attribute’s value.Some documentation.0.1.0 (2016-06-09)First release on PyPI.
Package: repren
Repren is a simple but flexible command-line tool for rewriting file contents
according to a set of regular expression patterns, and to rename or move files
according to patterns. Essentially, it is a general-purpose, brute-force text
file refactoring tool. For example, repren could rename all occurrences of
certain class and variable names in a set of Java source files, while
simultaneously renaming the Java files according to the same pattern. It’s more
powerful than usual options likeperl -pie,rpl, orsed:It can also rename files, including moving files and creating directories.It supports fully expressive regular expression substitutions.It performs group renamings, i.e. rename “foo” as “bar”, and “bar” as “foo”
at once, without requiring a temporary intermediate rename.It is careful. It has a nondestructive mode, and prints clear stats on its
changes. It leaves backups. File operations are done atomically, so
interruptions never leave a previously existing file truncated or partly
edited.It supports “magic” case-preserving renames that let you find and rename
identifiers with case variants (lowerCamel, UpperCamel, lower_underscore, and
UPPER_UNDERSCORE) consistently.It has this nice documentaion!If file paths are provided, repren replaces those files in place, leaving a
backup with extension “.orig”. If directory paths are provided, it applies
replacements recursively to all files in the supplied paths that are not in the
exclude pattern. If no arguments are supplied, it reads from stdin and writes
to stdout.
Package: representty
representtyrepresenttyis a tiny presentation framework. TL;DR: You write your slides in
Markdown,richrenders individual slides, and the whole thing happens in an
IPython shell.File FormatA slide deck is mostly a Markdown file. Individual slides are seperated by a
bunch of equals signs.Additionally, you can start a line with://: comment; the line is ignored (unless the environment variablePRACTICEis set).!: special instruction. The line is not included in the output, but can do
a variety of things:!!some command: execute the command withos.system()the first time
this slide is visited.!import somemodule: silently import the given module.!set flag/!unset flag: set/unset a named flag. These can influencerepresenttybehaviour. Seeflags.!setlocal flag/!unsetlocal flag: (un)set a flag, but reset to
original value at the end of the slide.!image someimage: Display an image. This only works if you haveviuinstalled.!up some_int: Move the cursor up by some amount. Useful for drawing
over images.!printf something: Callprintfwith the given args. Better than
plain!!printf, because it will be executed every time the slide is
displayed by default.Python code blocks (language starts withpy) are not just rendered, but also
executed.CommandsThe presenter is dropped into a more-or-less normal IPython shell. A few
single-letter commands exist which control the slide show:d: (Re)draw the current slide.n: Go to the next slide.p: Go to the previous slide.q: Quit.g: Go to a numbered slide (you will be prompted for a slide number).s: Go to a slide by searching for a keyword (you will be prompted).Flagsexec: whether to execute Python code in code blocks. Default: set.alwaysexec: Always execute shell commands (!!), rather than just at the
first printing of the slide. Default: unset.
Package: reprim
RePrIm (remotis project imperium (remote project control)) is comfortable software for manage files on your PC via telegram bot when you are away from your computerCreate a host file in the folder with the main file of your project, and make changes in main file#host fileimportRePrImfrommyprojectimportmainif__name__=='__main__':RePrIm.config(main_func=main)# use prestart=True if you want the project to start when the host startsRePrIm.start_host()#myproject filefromRePrImimportget_io_clientsimportsysdefmain():reprim_input,reprim_output=get_io_clients()sys.stdin=reprim_inputsys.stdout=reprim_outputsys.stderr=reprim_output...# do something important job
Package: reprise
repriseis an implementation of the REtrospective and PRospective Inference SchEme in python.InstallationThe easiest way to installrepriseis usingpip:pipinstall--userrepriseFor more information have a look at theInstallation Guide.Documentationrepriseusessphinxto create a documentation manual. The documentation is
hosted onRead the Docs.Getting involvedTherepriseproject welcomes help in the following ways:Making Pull Requests forcode,testsordocumentation.Commenting onopen issuesandpull requests.Helping to answerquestions in the issue section.Creating feature requests or adding bug reports in theissue section.For more information on how to contribute toreprisehave a look at thedevelopment section.Authors and Contributersreprisewas mainly developed byFedor Scholz. For the full list of
contributers have a look atGithub’s Contributor summary.Currently, it is maintained byFedor Scholz.
Package: reprlearn
Training scriptsDataset-independencetrain.py: train one model (eg. beta-vae, IWAE, bivae) on one specific hyperparamter configE.g. TrainBiVAEonosmnx_roadsdata of the followingcities, with images ofbgcolorsnohuppythontrain.py--model_name="bivae"\--latent_dim=10--hidden_dims3264128256--adv_dim323232--adv_weight1.0\--data_root="/data/hayley-old/osmnx_data/images"\--data_name="osmnx_roads"\--cities'la''charlotte''vegas''boston''paris'\'amsterdam''shanghai''seoul''chicago''manhattan'\'berlin''montreal''rome'\--bgcolors"k""r""g""b""y"--n_styles=5\--zooms14\--gpu_id=2--max_epochs=300--terminate_on_nan=True\-lr3e-4-bs32\--log_root="/data/hayley-old/Tenanbaum2000/lightning_logs/2021-05-18/"&E.g.: TrainBIVAEon Rotated MNIST of optionally specified subset (given as a filepath to.npyfile containing
the indices from the original Training MNIST data)## Specify which indices to use among the MNIST -- comparable to DIVA's experiments## change 0 to anything inbtw 0,...,9nohuppythontrain.py--model_name="bivae"\--latent_dim=128--hidden_dims32646464--adv_dim323232\--data_name="multi_rotated_mnist"--angles-45045--n_styles=3\--selected_inds_fp='/data/hayley-old/Tenanbaum2000/data/Rotated-MNIST/supervised_inds_0.npy'\--gpu_id=2E.g.: Train Bivae on multi styles of maptiles from specified cities# Train BiVAE on Multi Maptiles MNISTnohuppythontrain.py--model_name="bivae"\--latent_dim=10--hidden_dims3264128256--adv_dim323232--adv_weight15.0\--data_name="multi_maptiles"\--citieslaparis\--stylesCartoVoyagerNoLabelsStamenTonerBackground--n_styles=3\--zooms14\--gpu_id=2--max_epochs=400--terminate_on_nan=True\-lr3e-4-bs32\--log_root="/data/hayley-old/Tenanbaum2000/lightning_logs/2021-01-23/"&Hyperparameter tuning usingRay Tunetune_asha.py: UseTune's AsyncHyperBandScheduler to search hyperparameter space more efficiently.
Use--tune_metricto specify the value oftune.run'smetricargument, e.g.--tune_metric lossfortune_asha_with_beta_scheduler.py:`Dataset-specificRotated MNISTtune_asha_mnists.pyosmnx_roadstune_asha_osmnx_roads.py
Package: reproduce-wem-taxonomy
Towards a Taxonomy of Word Embedding Models: The DatabaseThis repository contains the code that was used to collect relevant
publications and store them in a Postgres Database.
You are welcome to reproduce our database!
Note however that the search results on Google Scholar may have been updated
since our publication, leading to slightly different results.As a prerequisite, you must have set up a Postgres database with the proper
database schema. To do this, you can execute our Postgres schema dump provided
indata/wem_taxonomy_schema.sqlwith thepsqlshell:psqldbname<data/wem_taxonomy_schema.sqlwheredbnameis the name of an empty database that you have already created
for this purpose.
You must also create a user called 'taxonomist' who will own the created
tables. If you intend to use the database with our Use Case Collector (UCC)
tool later on, you should execute the above schema dump with a Postgres user
who has root privileges.
The root privileges are needed to install the Postgres trigram extension (pg_trgm).Step 1a): Installing from PyPISimply executepython3-mpipinstallreproduce_wem_taxonomyto install the needed packages.Step 1b): Installing from sourceFirst, clone this repository. Then, from within the repository root directory,
pull in thepubfishersubmodule:gitsubmoduleupdate--remotelib/pubfisherNow, install this module from source using pip:python3-mpipinstall-elib/pubfisherAfter that, you can install thereproduce_wem_taxonomypackage as well:python3-mpipinstall-e.Step 2: Collecting the publications from Google ScholarIn order to finally collect the publications,
simply execute the modulefish_wem_taxonomy:python3-mreproduce_wem_taxonomy.collect_relevant_publicationsThe publications are now stored in the database table 'publications' of
your previously created Postgres database.