Saravanan666/pypi-org huggingface dataset:
Package: pyrit
Python Risk Identification Tool for generative AI (PyRIT)The Python Risk Identification Tool for generative AI (PyRIT) is an open
access automation framework to empower security professionals and ML
engineers to red team foundation models and their applications.IntroductionPyRIT is a library developed by the AI Red Team for researchers and engineers
to help them assess the robustness of their LLM endpoints against different
harm categories such as fabrication/ungrounded content (e.g., hallucination),
misuse (e.g., bias), and prohibited content (e.g., harassment).PyRIT automates AI Red Teaming tasks to allow operators to focus on more
complicated and time-consuming tasks and can also identify security harms such
as misuse (e.g., malware generation, jailbreaking), and privacy harms
(e.g., identity theft).​The goal is to allow researchers to have a baseline of how well their model
and entire inference pipeline is doing against different harm categories and
to be able to compare that baseline to future iterations of their model.
This allows them to have empirical data on how well their model is doing
today, and detect any degradation of performance based on future improvements.Additionally, this tool allows researchers to iterate and improve their
mitigations against different harms.
For example, at Microsoft we are using this tool to iterate on different
versions of a product (and its metaprompt) so that we can more effectively
protect against prompt injection attacks.Where can I learn more?Microsoft Learn has adedicated page on AI Red Teaming.Check out ourdocsfor more information
on how toinstall PyRIT,
ourHow to Guide,
and more, as well as ourdemosfolder.TrademarksThis project may contain trademarks or logos for projects, products, or services.
Authorized use of Microsoft trademarks or logos is subject to and must followMicrosoft's Trademark & Brand Guidelines.
Use of Microsoft trademarks or logos in modified versions of this project must
not cause confusion or imply Microsoft sponsorship.
Any use of third-party trademarks or logos are subject to those third-party's
policies.
Package: pyrix
Pyrix: The Minimalist Matrix LibraryA different take on MatricesMatrices are everywhere and the central most important aspect of computing. Be
it graphics, AI or cryptography Matrix plays an important role and Pyrix takes
on with the pure Python matrix implementation.Why Pyrix?As computaional Mathematics has evolved we have reached a stage where
traditional pen/paper mathematics is becoming more of a tradition. For example
in the recent courses at MIT for Linear Algebra-18.06 Most lectures are focused
on explaining abstract ideas and methods. For the most Part Computers have
proven to be a lot faster to do large computations and with a precise, accurate
solution.I pitch Pyrix to be a Well implemented, Fast Performing Library to enable other
students to learn Linear Algebra and Matrix Mathematics alongside. Being a
student it's often a struggle to adopt to computational mathematics. Some
courses leave students at an abstract view of concepts and its always upto the
student to explore further.With pyrix being Open-Source One can easily view the source code, understand how
the matrix operations are performed within the computer.Getting Started with PyrixFor Python3 enviornment one can install the package with pip$ pip install pyrix* some operating systems see pip for Python2 and pip3 for Python3 ,in that case$ pip3 install pyrix
Package: pyRiZoeLX
pyRiZoeLXAbout:pyRiZoeLX have many useful functions, that you can use in your repos/repostory. It'll make you code/bot smooth and fast!Installationpip3installpyRiZoeLXImport functionsfromRiZoeLX.functionsimport<functionsname>Functions available:Click HereExample.fromRiZoeLX.functionsimportban_userfrompyrogramimportClient,filtersfrompyrogram.typesimportMessage@Client.on_message(filters.command("ban"))asyncdefban_(client,message):awaitban_user(client,message)
Package: pyrk
Runge-KuttaA simple implementation ofRunge-Kuttafor python.UsageIntegrates a function x_dot = f(time, x, u). See the examples in thedocsfolder or a simple one:frompyrkimportRK4importnumpyasnpimportmatplotlib.pyplotaspltdefvanderpol(t,xi,u):dx,x=ximu=4.0# dampingddx=mu*(1-x**2)*dx-xdx=dxreturnnp.array([ddx,dx])rk=RK4(vanderpol)t,y=rk.solve(np.array([0,1]),.01,200)y1=[]y2=[]forviny:y1.append(v[0])y2.append(v[1])plt.plot(y1,y2)plt.ylabel('velocity')plt.xlabel('position')plt.grid(True)plt.show()AlternativeIf you want to usescipy(which is good, but big), you can do:fromscipy.integrateimportsolve_ivpasrk45deffunc(t,x,u):# cool differential equations# ...returnxt=0dt=0.01y=np.array([0,0,0])# initial statefor_intqdm(range(steps)):u=np.array([1,2,3])# some inputs to func (i.e., control effort)y=rk45(func,[t,t+step],y,args=(u,))ify.success==False:print("Oops")y=y.y[:,-1]# probably save t, u and y into arrays for plottingt+=stepMIT LicenseCopyright (c) 2015 Kevin J. WalchkoPermission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package: pyrkube
Maintainer: Joe Black <me@joeblack.nyc>
Repository:https://www.github.com/telephoneorg/pyrkubeThis projects wraps thepykubeproject.DescriptionA general purpose wrapper around thepykubelibrary designed to make things
such as writing configuration templates for containers using Jinja easier with
Kubernetes resources.It has been open sourced in the case that it might be useful for someone else.
Package: pyrlamento
This library is an interface between your program and the various legal systems.
It is still very very bare (only works with the portuguese Diário da República),
yet its aim is to work seamlessly with other systems as needed.Ideally you’d specify the country and what you want, and you’d have it.This should eventually be able to retrieveLawsPublic legal documentsProfiles of politiciansOther information within the public interest.Supported countriesPortugal (Laws and document URLs only)Usagefrom pyrlamento import Pyrlamento
from datetime import date
pyrlamento = Pyrlamento('countries.portugal')
publications = pyrlamento.publicationsdDate(2019, 1, 1), date(2019, 2, 1))
diploma = pyrlamento.diploma(1234567890)
Package: pyrlprob
PyRLprob is an open-source python library for training, evaluation, and postprocessing ofGym-based environments, written in Python, throughRay-RLlibreinforcement learning library.InstallationUse the package managerpipto install the latest stable release of pyRLprob, with all its dependencies:pipinstallpyrlprobTo test if the package is installed correctly, run the following tests:frompyrlprob.testsimport*test_train_eval_py()If the code exits without errors, a folder namedresults/with the test results will be created in your current directory.User GuideLatest user guide.CreditspyRLprob has been created byLorenzo Federiciin 2021.
For any problem, clarification or suggestion, you can contact the author atlorenzof@arizona.edu.LicenseThe package is under theMITlicense.
Package: pyrmanent
PyrmanentA base class to make your Python classes permanent in a flash.FeaturesEasy to use.Great compatibility.No database needed.Ask for new features through theissuessection.Join ourTelegram groupfor support or development.InstallationYou can install or upgrade the module with:pip install pyrmanent --upgradeUsage guideBasic usage:Making your custom clases permanent is as easy as adding Pyrmanent as the base class.frompyrmanentimportPyrmanentclassMyClass(Pyrmanent):passCall thesavemethod to save the current instance data:my_class_instance=MyClass()my_class_instance.my_data="Hello world!"my_class_instance.save()To load a previously saved instance data, just create the instance and data will be
automatically loaded:my_class_instance=MyClass()print(my_class_instance.my_data)"Hello world!"ConfigurationInstance nameThenameparameter allows saving different instances of the same class. Each one will
keep its own data.first_instance=MyClass(name="first")first_instance.my_data="This is the first instance"first_instance.save()second_instance=MyClass(name="second")second_instance.my_data="And this the second one"second_instance.save()Saving pathThe path for the saved files can be customized with thefolderparameter. If not provided,
the files will be saved on the execution folder.my_class_instance=MyClass(folder="data")Auto savingTheautosaveparameter allows using theautosavemethod to save data only whenTrue.
This is specially useful for your custom class methods.classMyClass(Pyrmanent):defset_title(self,title):self.title=titleself.autosave()# The instance data will be saved when the method is calledmy_class_instance=MyClass(autosave=True)my_class_instance.set_title("Test")# You should manually save the instance datamy_class_instance=MyClass(autosave=False)my_class_instance.set_title("Test")my_class_instance.save()Override the __init__ methodThe__init__method can be overrided to add attributes and provide default configurations,
like for example the saving path in below example. Remember that thesuper()call should
be always done at the end.classMyClass(Pyrmanent):def__init__(self,name,autosave=True):self.first_value=1self.second_value=2super().__init__(name=name,folder="data",autosave=autosave)Reset instance dataTo reset instance data, call theresetmethod and then initialize the instance again.my_class_instance.reset()my_class_instance=MyClass()Use dill instead of pickleDill extends the compatibility with several data types that pickle module can't serialize.
It provides the same interface, so it's totally compatible without any code change needed.
To start using dill, just install it using pip and it will be used by default:pip install dill --upgradeTo stop using dill, just uninstall it. You can find more information about dill in theofficial repo.LicenseCopyright © 2021 Sergio Abad. Seelicensefor details.
Package: pyrml
Proper documentation and specifications will be coming with RainBot v0.5.0 (This includes a working link to library web page)To installpipinstallpyrmlTo generate a simple scaffold (assuming rainbot is installed)rainbot-mpyYourModuleNameExample Usage#### SimplefrompyrmlimportModulem=Module("Echo","A simple echo module")@m.command("echo")defecho(msg,args):m.say(msg["Params"][0]," ".join(args))m.register()frompyrmlimportModuleclassEcho(Module):def__init__(self,name,desc):Module.__init__(self,name,desc)defecho(self,msg,args):self.say(msg["Args"][0]," ".join(args))if__name__=='__main__':m=Echo("Echo","An echo mdoule")m.add_command("echo",{"Help":"Repeats arguments","Fun":m.echo})m.register()
Package: pyrmle
PyRMLEAuthors: Mendoza, E., Dunker, F., Reale, M.PyRMLE is a Python Module that implements Regularized Maximum Likelihood Estimation for the Random Coefficients Model.The package’s implementation of regularized maximum likelihood is limited to applications with up to two regressors for the random coefficients model with intercept, and up to three regressors for a model without intercept.There are two main functions used to implement regularized maximum likelihood estimation using PyRMLE, namely: (1) transmatrix() which executes a finite-volume algorithm that is akin to an algebraic reconstruction of the Radon Transform, and (2) rmle() which is a wrapper function of the scipy.optimize.minimize() function that solves the constrained regularized maximum likelihood problem.For more details check the github repository here:https://github.com/eae-mendoza/PyRMLE
Package: py-rmq
ali rocketMQ for python说明官方so路径要加到LD_LIBRARY_PATH中调用示例#!/usr/bin/env python# -*- coding: utf-8 -*-# @Author  : HaiFeng# @Email   : 24918700@qq.com# @Time    : 2019/1/16# @desc    : demo ali rocketmqimportsysimporttimefrompy_rmq.rmq_consumerimportConsumerfrompy_rmq.rmq_producerimportProducerfrompy_rmq.rmq_consumerimportOrderConsumerfrompy_rmq.rmq_producerimportOrderProducerdefOnConsumer(topic:str,tag:str,key:str,id:str,deliver_time:int,body:str,reconsume_times:int,store_time:int,offset:int):print(body)if__name__=='__main__':t:str=''id:str=''access:str=''secret:str=''topic:str=''iflen(sys.argv)>1:t=sys.argv[1].lower()iflen(sys.argv)>2:id=sys.argv[2]iflen(sys.argv)>3:access=sys.argv[3]iflen(sys.argv)>4:secret=sys.argv[4]iflen(sys.argv)>5:topic=sys.argv[5]ift=='':t=input('select consumer or producer:').lower()ifid=='':id=input('input cid or pid:')ifaccess=='':access=input('input acces key:')ifsecret=='':secret=input('input secret key:')iftopic=='':topic=input('input topic:')ift=='consumer':print('test consumer...')c=Consumer(id,access,secret)c.OnConsumer=OnConsumerc.subscribe(topic,'*')input('press enter to continue test order consumer')c.close()print('test order consumer...')c=OrderConsumer(id,access,secret)c.OnConsumer=OnConsumerc.subscribe(topic,'*')input('press enter exit')c.close()else:tag='tag test'key=time.strftime('%Y%m%d%H%M%S',time.localtime())print('test producer...')p=Producer(id,access,secret)msg=input('input content: ')rst=p.send_msg(topic,tag,key,msg)print(f'result:{rst}')print('test delive msg, delive 30s')rst=p.send_msg(topic,tag,key,msg+'delive',int(time.time()*1000)+30000)print(f'delive msg result:{rst}')p.close()input('press enter continue test order producer')p=OrderProducer(id,access,secret)sharding_key=input('input sharding_key: ')rst=p.send_msg(topic,tag,key,msg,sharding_key)print(f'order msg result:{rst}')p.close()
Package: py-rmrk-tools
py-rmrk-toolsA port ofrmrk-toolsfor Python.InstallationPython 3.9 and higher supported.pip install py-rmrk-toolsWhat's doneThe package contains only those features I currently need for my other projects. But feel free to create anissuein case you want to request any other feature ported here from thermrk-toolspackage. Alsopull requestsare very welcome!RMRK 1.0.0Constants and enums,Definitions: Attribute, Properties, Reactionmap, Change, NFTMetadata,NFT entity,Collection entity.RMRK 2.0.0Constants and enums,Definitions: MutationOp, Mutation, Attribute, Properties, Reactionmap, Change, NFTChild, ResourceConsolidated, NFTInstanceConf, NFTMetadata,NFT entity,Collection entity (partially).Who uses itI use this package in production for a couple of projects:Athttps://spot.merklebot.comit mints a RMRK NFT for each Boston Dynamics Spot robot demo launch which triggers by aLaunchtype transaction inRobonomics Networkblockchain,Athttps://telescope.merklebot.comit worked to produce RMRK NFTs from deep space photos made byhttps://atacamascope.cltelescope in Atacama desert, Chile.
Package: pyrms
Py-RMS - Python Reaction Mechanism SimulatorPython wrapper for the Reaction Mechanism Simulator (RMS) package for simulating and analyzing large chemical reaction mechanisms.In theory this wraps all functionality within RMS with two caveats:In jupyter notebooks julia objects don't display the same way in the python kernel as they would in the julia kernel.  For example flux diagram generation had to be hard coded into this wrapper to display properly.  If this happens please make an issue.There are ways to define julia functions that makes them impossible to call from python using the pyjulia.  In most cases this is easy to fix.  If you find a case where this happens please make an issue.Installation Instructions from Anaconda:Note: We recommend installing pyrms in its own conda environment when convenient because getting pyjulia to work with conda python efficiently currently requires relinking
the python executable to the python-jl executable, this usually isn't problematic, but it can be an issue in more complicated conda environments.To Install Binaries with Conda Run:conda install -c rmg pyrms
python -c "import pyrms; pyrms.install()"
ln -sfn $(which python-jl) $(which python)
Package: pyrmv
Small module that makes your journey with RMV REST API somehow easier. Based fully on official RMV API reference and HAFAS documentation.RequirementsRMV API key (Get ithere)Python3 (Tested versions are 3.7.9 and 3.9.13)git (Only for installation from source)InstallationIf you have everything listed inrequirements, then let's begin.Variant 1python -m pip install pyrmvVariant 2git clone https://git.end-play.xyz/profitroll/PythonRMV.gitcd PythonRMVpython setup.py installUsageimportpyrmv# Define a Client with API keyclient=pyrmv.Client("AcessId")# Get origin's and destination's locationorigin=client.stop_by_name("Frankfurt Hauptbahnhof",max_number=3)[0]destination=client.stop_by_coords(50.099613,8.685449,max_number=3)[0]# Find a trip by locations gottrip=client.trip_find(origin_id=origin.id,dest_id=destination.id)Frequently Asked QuestionsWhy are there raw versions and formatted ones?Some methods work slightly differentWhy are there raw versions and formatted ones?For the purposes of my projects I don't really need all the stuff RMV gives (even though it's not much).
I only need some specific things. However I do understand that in some cases other users may find
those methods quite useful so I implemented them as well.Some methods work slightly differentCan be. Not all function arguments written may work perfectly because I simply did not test each and
every request. Some of arguments may be irrelevant in my use-case and the others are used quite rare at all.
Justmake an issueand I'll implement it correct when I'll have some free time.To-DoGeneralDocs in WikiTickets
Package: pyrmvtxt
Pyrmvtxt is created to remove the text in the large scale image with the user friendly methodRequirementlibrary keras-ocr (require gpu processing)library pandasBackground process1.Split image into smaller part
2.Using keras-ocr as the main function to do text detection
3.Locate the bounding box position
4.Convert bounding box scale into the original size
5.Remove the text in that area
5.Get the Clean imageWritten by TASUN
Package: pyrnalist
PyrnalistAn elegant console reporter, a python port ofYournalist.IntroductionPretty console output makes developers happy and Yarn is doing a nice job.
Pyrnalist is an incomplete rewrite of Node.js's Yournalist, which in turn
is a public version of Yarn internal console reproter.Yurnalist can be used to report many different things besides simple messages.Featureslog, info, warn, succes, error & command messagesactivity spinnersemojisprocess stepslistsprogram header & footerprogress barsintegration with logging moduleMissing features of Yournalistobject inspectiontreestablesuser questionuser selectInstallpipinstallpyrnalistHow to useHere is an example showing a combination of different reporter API functions.frompyrnalistimportreportimporttimereport.header("pyrnalist",version="0.1.2")report.info("Please wait while I fetch something for you.")report.warn("It might take a little while though.")spinner=report.activity()spinner.tick("I am on it!")time.sleep(1)spinner.tick("Still busy...")time.sleep(1)spinner.tick("Almost there...")time.sleep(1)report.success("Done!")spinner.end()steps=15tick=report.progress(steps)report.info("🥚 Wait for it...")forxinrange(steps):tick()ifx%5==0:report.warn("Interrupt.")time.sleep(0.25)report.success("🐣 Tjiep!")report.footer()ConfigurationA normal import gives you a reporter instance configured with defaults for easy
use. If you want something else you can callcreate_reporter()to give
you an instance with different options.OptionsThese are the options of the reporter as defined by Flow:create_reporter(name="logger-name",verbose=True,silent=False,emoji=True,no_progress=False,logging_handler=True,)CreditsOf course ❤️ and credits to all the contributers ofYournalistandYarn.
The ease with which I was able to port the module to python from their codebase is proving some awesome engineering skills.
Package: pyrnp
PyRNPPython wrapper for the Eduplay API (maintained by RNP). Made to be as lightweight as possible, only requires Requests!ContributorsPatricia NallinGuilherme Francisco de FreitasInstallationgitclonehttps://github.com/cnpem-sei/pyrnpcdPyRNP
pip3install.UtilizationCreate a clientfrompyrnpimportRNPclient=RNP(client_key="KEY",client_id="ID",username="fulano.detal@org.br",)Perform actionsclient.upload("video.mp4","video_unique_id")client.publish("video.mp4","video_unique_id","title","test upload",thumbnail="thumb.png")Other utilization examples can be found inExamples.Obtaining credentialsIn order to obtain your client key and ID, you must contactRNPdirectly.Token quirksDepending on your permissions (if they're not clear, contact RNP support), you might not need tokens in order to publish/upload/change/delete videos. This is why I've made OAuth2 disabled by default. In order to get a token, you can follow the RNP documentationhere.TODO:Add other API functionsLicenseThis program is licensed under theGNU Affero license
Package: pyRNumerosPrimos
==================
pyRNumerosPrimospyRNumerosPrimos es una libreria para calcular los numeros primos
en un rango nInstallationUsa el package managerpippara
install pyRNumerosPrimosUsageimportpyRNumerosPrimospyRNumerosPrimos.NumerosPrimos1(n)# returns -> numeros n primerosprimospyRNumerosPrimos.NumerosPrimos2(n)# returns -> lo mismo pero el codigohechoamanoContributingPull requests para todos.LicenseFree
LicenseThis program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.