Saravanan666/pypi-org huggingface dataset:
Package: ripgrepy
ripgrepyripgrepyis a python interface to ripgrep.
It is written to support Python3.7+only and is built on ripgrep version11.0.1For complete usage and details, refer to the docs atReadthedocsInstalUse pip to installpip install ripgrepyRequirementsripgrepyleverages the system ripgrep to run its commands. So either the standalone binary, rg in $PATH or a path to ripgrep needs to be provided.UsageRipgrep is a simple module that allows chaining ripgrep options on top of each other and get the result back. There is a couple of helper methods included to help in parsing, such as theas_dictmodule which shows all valid matches as a dictionary object.To instantiate the class, use:from ripgrepy import Ripgrepy
# The Ripgrepy class takes two arguments. The regex to search for and the folder path to search in

rg = Ripgrepy('he[l]{2}o', '/some/path/to/files')The syntax for ripgrepy is simliar to that of ripgrep itself.rg.with_filename().line_number()...run().as_string

# the same can be executed using the rg shorthands

rg.H().n().run().as_stringThe above is eqivalent to runningrg --with-filename --line-number "he[l]{2}o" /path/to/some/filesImportantrun()should always be the last method that is being run followed by one of the output methods. If ripgrep options are placed after run, they will not be part of the command being executed. Refer toReadthedocsfor complete documentation. The docs are obtained from ripgreps man pages itself.Output methodsOutput can be obtained using the following three propertiesas_dictas_jsonas_stringNot all ripgrep output is compitable withas_dictandas_jsonoutput formats
Package: ripio-client
Ripio Client for PythonALPHA SOFTWAREThis is a lightweight library that works as a client toRipioServicesInstallationpipinstallripio-clientUsage examplefromripio.trade.clientimportClient# API key is required for user data endpointsclient=Client(api_key='<api_key>')# Get balance informationprint(client.balance())# Create a market orderparams={'pair':'BTC_USDC','side':'buy','amount':0.01,'type':'market'}response=client.create_order(**params)print(response)# Create a limit buy orderparams={'pair':'BTC_USDC','side':'buy','amount':0.0002,'type':'limit','price':27471.65}response=client.create_order(**params)print(response)# Create a limit sell orderparams={'pair':'BTC_USDC','side':'sell','amount':0.0002,'type':'limit','price':27470}response=client.create_order(**params)print(response)
Package: ripix
RipixA Rich-compatible library for writing pixel images and other colourful grids to the
terminal.InstallationGetripixfrom PyPI.pip install ripixBasic UsageImagesImage from a fileYou can load an image file from a path usingfrom_image_path:fromripiximportPixelsfromrich.consoleimportConsoleconsole=Console()pixels=Pixels.from_image_path("pokemon/bulbasaur.png")console.print(pixels)Pillow image objectYou can create a PIL image object yourself and pass it in tofrom_image.fromripiximportPixelsfromrich.consoleimportConsolefromPILimportImageconsole=Console()withImage.open("path/to/image.png")asimage:pixels=Pixels.from_image(image)console.print(pixels)Using this approach means you can modify your PILImagebeforehard.ASCII ArtYou can quickly build shapes using a tool likeasciiflow, and
apply styles the ASCII characters. This provides a quick way of sketching out shapes.fromripiximportPixelsfromrich.consoleimportConsoleconsole=Console()# Draw your shapes using any character you wantgrid="""\xx   xxox   oxOx   Oxxx             xxxxxxxxxxxxxxxxxxx"""# Map characters to different characters/stylesmapping={"x":Segment(" ",Style.parse("yellow on yellow")),"o":Segment(" ",Style.parse("on white")),"O":Segment(" ",Style.parse("on blue")),}pixels=Pixels.from_ascii(grid,mapping)console.print(pixels)Using with TextualPixelscan be integrated intoTextualapplications just like any other Rich renderable.
Package: ripl
RIPL == Really Incredibly Point LessorRIPL == Read Interpret Print LoopThis started life as some simple utilities to help me write a
presentation.The idea was to write something in restructured text and have some
code to read the text, interpret it and turn it into a bunch of slides
for a presentation.In the end I went with markdown, but only a subset of markdown is
really supported.For each slide, you can specify a heading and then some lines of text
for the slide.You can also specify an image to display, or images.Installation / UsageTo install use pip:$ pip install riplOr clone the repo:$ git clonehttps://github.com/swfiua/ripl.git$ python setup.py installInterprettersSo far it is just a bunch of python modules which I call
interpretters.Each module has a class with an interpret method.py2json and json2pyThe built-injsonmodule does all the work here.   These just turn
json into python dictionaries and lists and vice-versa.md2slides.pyThis reads the markdown and turns it into a list of slides.  Each
slide is just a python dictionary full of information about the
slides.slide2png.pyThis takes the output from md2slides (or anything in a similar format)
and creates a folder full of slides.As well as a bunch of image files, slide2png.py outputs a file with
the list of slides in the slideshow.layoutI would like to strip the layout code in slide2png into a separate
interpretter.This would just augment the incoming information with layout data.create_imagesThe code that actually creates the images could then work with the
layout code.showThis actually displays the slideshow.It has an option to say how many minutes the slideshow should be and
will automatically advance the slides for you, pechakucha style.run*.pyVarious scripts to run everything.TODOrest2py and py2restmark2rest and rest2markrest2json and json2restpy2json and json2py.  these are done coutesy of import json.Chaining converstions and examining information loss.Get sphinx and readthedocs working here.python-snowballstemmer looks interesting, seems to be finding stems of
words and also to be multi-lingual.
Package: ripozo-cassandra
ripozo-cassandraripozo-cassandra is a ripozo-extension that provides a Manager that
integrates cqlengine (and thereby Cassandra) with ripozo.  It provides
convience functions for generating resources.  In particular it focues
on creating shortcuts for CRUD+L type operations.  It fully implements
theBaseManagerclass that is provided in theripozopackage.ExampleThis is the minimal example of creating ripozo managers with
ripozo-cassandra and integrating them with a resource. As
you can see in the example, there are only three functional
lines of code.fromcqlengine.modelsimportModelfromcqlengineimportcolumns,connectionfromcqlengine.managementimportcreate_keyspace,sync_table,delete_keyspacefromripozo_cassandraimportCQLManagerfromuuidimportuuid4# Define your modelclassPerson(Model):id=columns.UUID(primary_key=True,default=lambda:uuid4())first_name=columns.Text()last_name=columns.Text()# Setup cqlengine and sync the person tablekeyspace_name='mykeyspace'connection.setup(['192.168.56.102'],keyspace_name)create_keyspace(keyspace_name)sync_table(Person)# This is where you define your managerclassPersonManageR(CQLManager):model=Person# Assign the cqlengin model to the managerfields=('id','first_name','last_name',)# Specify the fields to use for this manager# This is the ripozo specific part.# This creates a resource class that can be given# to a dispatcher (e.g. the flask-ripozo package's FlaskDispatcher)classPersonResource(ResourceBase):manager=PersonManagerpks=['id']# A retrieval method that will operate on the '/api/person' route# It retrieves the id, first_name, and last_name properties@apimethod(methods=['GET'])defget_person(cls,request):properties=self.manager.retrieve(request.url_params)returncls(properties=properties)
Package: ripozo-sqlalchemy
ripozo-sqlalchemyThis package is a ripozo extension that provides a Manager that integrate
SQLAlchemy with ripozo.  It provides convience functions for generating resources.
In particular, it focuses on creating shortcuts for CRUD type operations.  It fully
implements theBaseManagerclass that is provided in theripozopackage.Full DocumentationExampleThis is a minimal example of creating ripozo managers
with ripozo-sqlalchemy and integrating them with a
resource.First we need to setup our SQLAlchemy model.fromripozoimportapimethod,ResourceBasefromsqlalchemyimportColumn,Integer,String,create_enginefromsqlalchemy.ext.declarativeimportdeclarative_base# Setup the database with sqlalchemyengine=create_engine('sqlite:///:memory:',echo=True)Base=declarative_base()# Declare your ORM modelclassPerson(Base):__tablename__='person'id=Column(Integer,primary_key=True)first_name=Column(String)last_name=Column(String)# Sync the models wiht the databaseBase.metadata.create_all()Now we can get to the ripozo-sqlalchemy part.fromripozo_sqlalchemyimportAlchemyManager,ScopedSessionHandler# A session handler if responsible for getting# And handling a session after either a successful or unsuccessful requestsession_handler=ScopedSessionHandler(engine)# This is the code that is specific to ripozo-sqlalchemy# You give it the session, a SQLAlchemy Model, and the fields# You wish to serialize at a minimum.classPersonManager(AlchemyManager):model=Personfields=('id','first_name','last_name')# This is the ripozo specific part.# This creates a resource class that can be given# to a dispatcher (e.g. the flask-ripozo package's FlaskDispatcher)classPersonResource(ResourceBase):manager=PersonManager(session_handler)pks=['id']namespace='/api'# A retrieval method that will operate on the '/api/person/<id>' route# It retrieves the id, first_name, and last_name properties for the# resource as identified by the url parameter id.@apimethod(methods=['GET'])defget_person(cls,request):properties=cls.manager.retrieve(request.url_params)returncls(properties=properties)Easy ResourcesAlternatively, we could use the create_resource method which
will automatically create a manager and resource that corresponds
to the manager.fromripozoimportrestmixinsfromripozo_sqlalchemyimportScopedSessionHandler,create_resourcesession_handler=ScopedSessionHandler(engine)PersonResource=create_resource(Person,session_handler)By default create_resource will give you full CRUD+L (Create, Retrieve, Update, Delete, List).
Although there are many options that you can pass to create_resource to modify exactly how
the resource class is constructed.After you create your resource class, you will need to load it into a dispatcher
corresponding to your framework.  For example, in flask-ripozofromflaskimportFlaskfromflask_ripozoimportFlaskDispatcherfromripozo.adaptersimportSirenAdapter,HalAdapter# These are the potential formats to returnapp=Flask(__name__)dispatcher=FlaskDispatcher(app)dispatcher.register_adapters(SirenAdapter,HalAdapter)dispatcher.register_resources(PersonResource)app.run()
Package: rippcord
This is a package that has useful machine vision for use with CarsCHANGE LOGRELEASE 10.0.0.1  (7/27/2021)First Release\RELEASE 20.0.0.2 –> 7/27/2021Just wanted to test some things outreally didn’t don anything\-RELEASE 3
-0.0.0.3–> 7/27/2021
-Just wanted to test some things out
-really didn’t don anything
Package: ripper
Rip Images. The Pythonic Way.IdeasAllow elegant Image Ripping from websites.Ability to Save in a Particular Directory.Default get. Rip Images of Type ‘.jpg’.For more, Specify Format of the Image.Simple Save. Images Saved to Folder defaulting to Title of the Web Page.UsageSimple Usage:>>> import ripper

>>> r = ripper()
>>> r.get('http://website.com')
>>> r.url
['http://website.com/image.jpg','http://website.com/hello.jpg']
>>> r.save
Successfully Saved 2 Images.Advanced Usage:>>> import ripper

>>> r = ripper.get('http://website.com',type=(jpg,png,gif))
>>> r.url
['http://website.com/img.jpg','http://website.com/hello.png','http://website.com/hello.gif']
>>> r.save('/home/directory')
Successfully Saved 3 Images to /home/directory
Package: ripple-detector-CNN
. ├── CHANGELOG.md ├── LICENSE ├── MANIFEST.in ├── README.md ├──
README.rst ├── ripple_detector_CNN │ ├──init.py │ ├── ResNet1D.py │
└── RippleDetectorCNN.py ├── requirements.txt ├── setup.cfg ├── setup.py
├── test │ ├──init.py │ └── test_foo.py └── test-requirements.txt
Package: ripple-energy
Ripple EnergyA Python package For interacting with the Ripple Energy GraphQL API.The primary purpose of this package is to create an interface for Home Assistant to communicate with the Ripple Energy GraphQL API however, the facility is available to develop this module further by adding additional queries / functions.Disclaimer- I do not work for Ripple Energy however, I have memberships in some of their co-ops. While this module has been developed in consultation with Ripple Energy, I cannot guarantee it's long-term support or stability.Table of ContentsTo-DoInstallationExampleContributingLicenseTo-DoCreate exceptionsPut functions into classesAdd lintingPEP8compliancePEP257compliancePEP484complianceCreate testsCreate build pipelinePublish to PyPiMake Async?InstallationFrom Package IndexIt is recommended to usepipto pull the package from PyPipip install ripple-energyFrom RepositoryClone this repositorygit clone https://github.com/danieledwardgeorgehitchcock/ripple-energy.gitThis project leverages the use ofHatchfor project management - please follow the installation instructions there before continuing.Once the above has completed, enter in to the project directorycd ripple-energyAs this package is managed by Hatch, you can start an environment which automatically pulls the project dependencieshatch shell startYou should then be able to use the package from within this environment.Examplefromripple_energyimportRippleEnergy,RippleEnergyCredentialAuthimportasynciofromsysimportplatformif(platform=="win32"):asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())#Avoid event loop selector policy error in Windowsasyncdefmain():auth=RippleEnergyCredentialAuth(email="YOUR_RIPPLE_EMAIL",password="YOUR_RIPPLE_PASSWORD")asyncwithRippleEnergy(auth=auth)asripple:#Query filterfaqs=awaitripple.faqs("business")#Full object responseprint(faqs)member=awaitripple.member()#Filtered object responseprint(member.address)version=awaitripple.version()#Simple type responseprint(version)if__name__=="__main__":asyncio.run(main())ContributingTo add a new query to this module, add the GraphQL query into thesrc/ripple_energy/graphql_queriesfolder as a file with the extension.graphqlsuch as:my_example_query.graphql- please see the existing queries as an example of how to write them.In a terminal, make sure you are in the Hatch shell environment:hatch shell startThis project uses the Ariadne code generator. To run it:ariadne-codegenIf there no errors, a new client should be generated in thesrc/ripple_energy/graphql_clientfolder.Add the new function tosrc/ripple_energy/ripple_energy.py- please see the existing functions as an example of how to write them.Commit the changes and create a Pull Request in this repo.Licenseripple-energyis distributed under the terms of theMITlicense.
Package: ripple-federation
ripple-federation-pythonWhat ripple/federation-php does for Python. Provides a very simple
mapping between names an Ripple addresses. Integrate into your site
to receive Ripple payments atyou@yourdomain.org.UsageUsing werkzeug, for example, you might do:CORS = {"Access-Control-Allow-Origin": "*"}

from .ripple_federation import Federation, get_ripple_txt
federation = Federation({
    'elsdoerfer.name': {'michael': 'rpLJBGZRT8D9ktgdsYv5AWYtePdyLPrEHy'},
})

@expose('/ripple.txt')
def ripple_txt(request):
    return Response(get_ripple_txt(
        domain=request.host,
        federation_url='https://{}{}'.format(
            request.host, request.urlmap.build('ripple_federation'))
        ),
        mimetype='text/plain',
        headers=CORS)


@expose('/ripple/federation')
def ripple_federation(request):
    return Response(
        json.dumps(federation.endpoint(request.args)),
        mimetype='application/json',
        headers=CORS
    )To do more than just mapping the name to an address, you can specify
callables:def lookup_user(domain, user):
     ripple, destination_tag = findUser(domain, user)
     return {
        'destination_address': app.config['PAYMENT_ADDRESS'],
        'dt': int(user)
     }

federation = Federation({
    'elsdoerfer.name': lookup_user,
    'elsdoerfer.name': {'michael': callable_allowed_here_as_well},
})The callable has to return a dict, which will be inserted into the result record,
and may also overwrite the standard fields. In this way, you may provide any
return values the Federation specification allows.Other notesTest your ripple.txt setup here:https://ripple.com/tools/txt/Note that HTTPS is needed.
Package: ripplegw
Ripple :ocean:A smalljaxpackage for differentiable and fast gravitational wave data analysis.Getting StartedInstallationBoth waveforms have been tested extensively and match lalsuite implementations to machine precision across all the parameter space.Ripple can be installed usingpip3 install ripplegwNote that by default we do not include enable float64 in jax since we want allow users to use float32 to improve performance.
If you require float64, please include the following code at the start of the script:from jax import config
config.update("jax_enable_x64", True)Seehttps://jax.readthedocs.io/en/latest/notebooks/Common_Gotchas_in_JAX.htmlfor other commonjaxgotchas.Supported waveformsIMRPhenomXAS (aligned spin)IMRPhenomD (aligned spin)IMRPhenomPv2 (Still finalizing sampling checks)Generating a waveform and its derivativeGenerating a waveform is increadibly easy. Below is an example of calling the PhenomXAS waveform model
to get the h_+ and h_x polarizations of the waveform modelWe start with some basic imports:importjax.numpyasjnpfromripple.waveformsimportIMRPhenomXASfromrippleimportms_to_Mc_etaAnd now we can just set the parameters and call the waveform!# Get a frequency domain waveform# source parametersm1_msun=20.0# In solar massesm2_msun=19.0chi1=0.5# Dimensionless spinchi2=-0.5tc=0.0# Time of coalescence in secondsphic=0.0# Time of coalescencedist_mpc=440# Distance to source in Mpcinclination=0.0# Inclination Angle# The PhenomD waveform model is parameterized with the chirp mass and symmetric mass ratioMc,eta=ms_to_Mc_eta(jnp.array([m1_msun,m2_msun]))# These are the parametrs that go into the waveform generator# Note that JAX does not give index errors, so if you pass in the# the wrong array it will behave strangelytheta_ripple=jnp.array([Mc,eta,chi1,chi2,dist_mpc,tc,phic,inclination])# Now we need to generate the frequency gridf_l=24f_u=512del_f=0.01fs=jnp.arange(f_l,f_u,del_f)f_ref=f_l# And finally lets generate the waveform!hp_ripple,hc_ripple=IMRPhenomXAS.gen_IMRPhenomXAS_hphc(fs,theta_ripple,f_ref)# Note that we have not internally jitted the functions since this would# introduce an annoying overhead each time the user evaluated the function with a different length frequency array# We therefore recommend that the user jit the function themselves to accelerate evaluations. For example:importjax@jax.jitdefwaveform(theta):returnIMRPhenomXAS.gen_IMRPhenomXAS_hphc(fs,theta)
Package: rippler
RipplerA Python interface to theRipples drink printer platform. It reproduces the flow of the Ripples WebApp, allowing for images ("Ripples") to be sent programmatically to a Ripple Maker's mobile queue.FeaturesGet location of Ripple Maker printers near a latitude/longitudeSend an image (either a file, file-like object or public URL) to a printer's mobile images queueUsagepipinstallripplerSeeexamples/&docs/AboutThis library is meant as a replacement for end-users who wish to create custom designs instead of using the Ripples WebApp. User-generated designs persist on a printer for 10 minutes.Image requirementsHigh contrast images with bold lines, 1700 x 1700 pixels, JPEG or PNG, Grayscale, 8 bit.SeeHow to Make the Perfect Ripple.DisclaimerThis library is provided "as is" (seeLICENSE.md) and is in no way associated with Ripples Ltd.
Package: rippletxt
Python Parser for ripple.txt files---------------------------Example:>>> import rippletxt>>> rippletxt.loads("""[domain]example.org[accounts]r3THXKcb5KnJbD5M74kRdMfpoMY1ik8dQ5[ips]# ripple.example.org8.46.236.185 5006"""){'ips': ['8.46.236.185 5006'],'domain': ['example.org'],'accounts': ['r3THXKcb5KnJbD5M74kRdMfpoMY1ik8dQ5']}>>> rippletxt.get_urls("wasipaid.com")['https://ripple.wasipaid.com/ripple.txt','https://www.wasipaid.com/ripple.txt','https://wasipaid.com/ripple.txt']Install:$ pip install rippletxt
Package: rippling-flux-dev-tools
rippling-flux-dev-toolsA Python package with modules useful for local Flux app development.Modules (flux_dev_tools)Thedistribution namefor this project isrippling-flux-dev-tools, which is how it is listed in PyPI. Once added
as a  dependency though, use the nameflux_dev_toolsas theimport name.server.flaskThis contains aflaskmodule which exports aFlaskapp that will make yourflux_apps/code available toRipplingservers for live debugging sessions.The easiest way to use this is via theFlask CLI, which is likely to have integration with your IDE. Withrippling.flux-sdkinstalled as a dependency, you can use--app flux_sdk.server.flask, which uses this  flask app as
the "app target".python-mflask--appflux_dev_tools.server.flaskrun
Package: rippling-flux-sdk
rippling-flux-sdkDefines the interfaces and data-models used by Rippling Flux Apps.Thedistribution namefor this project isrippling-flux-sdk, which is how it is listed in PyPI. Once added as a
dependency though, use the nameflux_sdkas theimport name.The imports for this package should be included in the scaffolding for a Flux App, in general Flux app developers will
not need to write that code. By being distributed as a package, it will allow your IDE to inspect the defined types for
additional context.Getting StartedCode is linted with ruff.  It's recommended to run./install_hooks.shto run linting on commit.
Linting can also be run manually with./run_ruff.sh.  In many cases it's possible to auto-fix
linting errors with./run_ruff.sh --fix.