Saravanan666/pypi-org huggingface dataset:
Package: raise
Raise exceptions with a function instead of a statement.Provides a minimal and portable interface for raising exceptions
with all the advantages of functions over syntax.VersioningThis library’s version numbers follow theSemVer 2.0.0
specification.Installationpip install raiseUsageImportraise_:fromraise_importraise_Raise an exception:raise_(Exception('foo'))Raise an exception with a traceback:raise_(Exception('foo'),traceback)Raise in alambda:lambdax:xifx>0elseraise_(ValueError('x is too small!'))And of course becauseraise_is a function, you can combine
it withfunctools.partialand other functional programming
libraries and techniques for many more uses.Surprisesraise_clears__traceback__if you don’t pass in a traceback,
same as if you passed inNone. If you want the Python 3 behavior
of reusing the__traceback__, you should explicitly pass it in:raise_(exception,exception.__traceback__)Or, if you want to gracefully degrade on Python implementations
which do not have__traceback__on their exceptions:raise_(exception,getattr(exception,'__traceback__',None))PortabilityPortable to all releases of both Python 3 and Python 2.(The oldest tested is 2.5, but it will likely work on all
Python 2 versions and probably on even earlier versions.)For implementations of Python that do not support raising
with a custom traceback, a “no traceback” variant is
included in the source that can be installed manually.
Package: raise-assert
raise_assertA short way to check for conditions and raise if it fails, in Python.MotivationI get annoyed to need writing all the time variations around:ifnotisinstance(my_bool,bool):raiseValueError("my_bool should be a bool")And as pointed several places on the net,assertcannot really be trusted for performing this sort of checks, as asserts can be disabled with the-Oflag, see for example:https://stackoverflow.com/questions/1273211/disable-assertions-in-python.SolutionThe raise_assert package contains a single function that allows writing:fromraise_assertimportrasras(isinstance(my_bool,bool))or, if you want an error message (but this is usually not needed, as the stack trace is usually explicit enough):fromraise_assertimportrasras(isinstance(my_bool,bool),"my_bool must be a bool")Installationpip install raise_assertWhy ras?The wordrasis shortland for both raise_assert and 'rien à signaler', 'nothing to signal' in French.
Package: raise_if
[![BuildStatus](https://travis-ci.org/rochacbruno/raise_if.png)](https://travis-ci.org/rochacbruno/raise_if)[![CoverageStatus](https://coveralls.io/repos/rochacbruno/raise_if/badge.png)](https://coveralls.io/r/rochacbruno/raise_if)![Utility](https://img.shields.io/badge/utility-0%25-lightgrey.svg)![Emacs](https://img.shields.io/badge/built%20with-EMACs-blue.svg)[![forthebadge](http://forthebadge.com/images/badges/built-with-love.svg)](http://forthebadge.com)[![forthebadge](http://forthebadge.com/images/badges/gluten-free.svg)](http://forthebadge.com)[![forthebadge](http://forthebadge.com/images/badges/built-by-developers.svg)](http://forthebadge.com)# raise_ifPython could have raise conditions like Ruby.```rubydef i_must_have_truth(value)raise TypeError, 'You must give me truth' if value == falseend```But the only one line option that works hurts PEP8```pythondef i_must_have_truth(value):if not value: raise TypeError('You must give me truth')```So..```python$ pip install raise_ifimport raise_ifdef i_must_have_truth(value):raise_if(not value, TypeError, 'You must give me truth')```Pass exception type and arguments```pythonraise_if(not 1 == 2, TypeError, 'Fails', another_arg='foo')```or```pythonraise_if(not 1 == 2, TypeError('Fails', another_arg='foo'))```Why??Because I am lazy and I do not like extra breaks in a chain of if statements!:)
Package: raise-module-not-found-error
Raise Module Not Found ErrorRaise Module Not Found Error is a "library" that raises aModuleNotFoundErrorwhen an
attempt is made to import it.Example usage>>> import raise_module_not_found_error
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "installation/path/raise_module_not_found_error.py", line 2, in <module>
    raise ModuleNotFoundError("Ceci n'est pas un module")
ModuleNotFoundError: Ceci n'est pas un moduleRunning testsSimply runpython -m unittest discoverin the project root.This is completely useless, isn't it?yes
Package: raises
Raises Stack OverflowRaises’ in your source code, all’s right with the Stack OverflowInstallPlease usepipto installraises$ pip install raisesHow to use?Is easy to useraisesin your daily work, to help you find out
raises error’s answer on Stack Overflow, simplyimport raisesto
your code, then done!importraises# To the top of your source codeExampleFor example, if we type inint("")to REPL, it will raise aValueError:>>>importraises>>>int("")Traceback(mostrecentcalllast):File"<stdin>",line1,in<module>ValueError:invalidliteralforint()withbase10:''You should now saw a new tab in your browser, to find out the answer on
Stack Overflow!APIraises.enable()To enable the raises functionraises.disable()To disable the raises functionraises.raiserThe core function of raises, it was thesys.excepthookreplacer to
handle every exceptio, and to open a new browser with tabs.
Package: raisetool
RaiseToolThe project contains small class for formatting thrown exception messages.The message can be formatted with information about the class, method, and line number where the exception was thrown.Public methodsRaise.message(message:str, class_name:Optional[str],currentframe:Optional[FrameType])-> str
Raise.attribute_error(message:str, class_name:Optional[str],currentframe:Optional[FrameType])-> AttributeError
Raise.connection_error(message:str, class_name:Optional[str],currentframe:Optional[FrameType])-> ConnectionError
Raise.key_error(message:str, class_name:Optional[str],currentframe:Optional[FrameType])-> KeyError
Raise.os_error(message:str, class_name:Optional[str],currentframe:Optional[FrameType])-> OSError
Raise.syntax_error(message:str, class_name:Optional[str],currentframe:Optional[FrameType])-> SyntaxError
Raise.type_error(message:str, class_name:Optional[str],currentframe:Optional[FrameType])-> TypeError
Raise.value_error(message:str, class_name:Optional[str],currentframe:Optional[FrameType])-> ValueErrorUsage examplesimport inspect
from raisetool.formatter import Raise


class Example:
    def __init__(self):
        print(f"1: {Raise.message('example message 1')}")
        print(
            f"2: {Raise.message('example message 2', self.__class__.__name__)}"
        )
        print(
            f"3: {Raise.message('example message 3', self.__class__.__name__, inspect.currentframe(), )}"
        )
        try:
            raise Raise.value_error(
                "example message 4",
                self.__class__.__name__,
                inspect.currentframe(),
            )
        except ValueError as ex:
            print(f"4: {ex.__class__.__name__}: {ex}")


if __name__ == "__main__":
    obj = Example()Output:1: example message 1
2: Example: example message 2
3: Example.__init__ [line:21]: example message 3
4: ValueError: Example.__init__ [line:24]: example message 4
Package: raise-tools
raise-toolsThis repository contains the source forraise, which check repositories by the RAISE lab for compliance with a template.UsageThere are two primary use cases for this tool. The first is to check that a directory containing your code is compliant with a RAISE-provided template. To do so, useraise --path .The.can be replaced by the directory where your code lives. This will check that your code follows PEP8 standards, that it contains the required files, and that the README file contains the necessary sections.A second use case is to initialize a new repo from a template, similar tonpm init. The templates come with some working code already to give you a feel for how code is expected to be written. To initialize, useraise --init --template dl4sedl4secan be replaced by any template name (currently, it is the only one). If the template argument is not provided,dl4seis assumed. You can provide configuration options in a file. To do so, name the file.raise.confin the current directory. The configuration file has the syntax below.Note:The options in the configuration file have precedence over command-line args. This means that if you specify the same thing in both places, your command-line args will be ignored. This is to encourage the use of configuration files.[init]
template = dl4se  # or any other template
token = GITHUB_ACCESS_TOKEN
fork = yes  # or "no"

[check]
max_line_length = 120
Package: raiseup
RaiseupRaiseup is a small Python library(a fork ofelevate) that re-launches the current process with root/admin privileges using one of the following mechanisms:UAC (Windows)AppleScript (macOS)pkexec,gksudo,kdesudoordoas(Linux and FreeBSD)sudo(Linux, macOS)UsageTo use, callraiseup.elevate(file_path)early in your script(wherefile_pathis the absolute path of the script that needs to be elevated). When run as root this
function does nothing. When not run as root, this function replaces the current
process (Linux, macOS) or creates a new process, waits, and exits (Windows).Consider the following example(Note:os.getuid()only works on POSIX based systems. For windows, you might need to find other ways to check which user this script is currently running as):importosdefis_root():returnos.getuid()==0ifnotis_root():fromraiseupimportelevateprint("Not root")elevate(__file__)else:print("This script is running as root")This prints:Not root
This script is running as rootOn Windows, the new process's standard streams are not attached to the parent,
which is an inherent limitation of UAC. By default the new process runs in a
new console window. To suppress this window, useelevate(file_path,show_console=False).On Linux and macOS, graphical prompts are tried beforesudoanddoas, by default. To prevent graphical prompts, useelevate(file_path,graphical=False).Improvements overElevate:Graphical environment variables$DISPLAYand$XAUTHORITYare automatically passed on to the elevated process (useful for GUI applications) on Linux and FreeBSDAdded support fordoasand the FreeBSD operating systemOlder code has been cleaned upBroken code has been fixedPyPI Package:Raiseup is available to be installed from PyPIherepip install raiseupA common mistake:Avoid importingraiseupunconditionally in your scripts if theraiseuppackage is not installed for the root/administrator user. Otherwise, theraiseuppackage will be imported regradless of which user is running the script. If the root user is running the script, it will fail to findraiseupresulting in aModuleNotFoundErrorand script termination.(c) 2018Barney Galeand (c) 2021Xploreinfinity
Package: raise-utils
homepage|quick guide|docs|change log|license|contribute|issues|contactThe RAISE packageThe RAISE package is an attempt to unify code, and incorporate PEP8 standards. The package takes a modular, object-oriented design, with each part of the ML pipeline encapsulated in a class. The purpose is to allow a streamlined, easy to read interface that allows for explainability of code, to enforce programming standards, and improve maintainability.Installpip3 install raise_utilsPython SupportOnly Python 3 is supported, Python 2 is not.DocumentationRead our docshere.
You can find examplesin our examples directory.
Package: raisin
﻿Raisin: To perform cluster work easily!Project PhilosophyThe main aim of projectraisinis toshare physical resourcesof your laptop with a community.In counterpart, you canbenefit from the community resources.There are 2 sides in this project:1. Resources usageTheraisinAPI wants to be as close as possible to the ‘threading’ and ‘multiprocessing’ python APIs.The advantage in usingraisinrather than ‘threading’ or ‘multiprocessing’ is that the computing power is greatly increased (depending on the number of connected resources).Thoughraisinis based on ‘multiprocessing’ module - that splits tasks among the resources of a single computer - it also shares the load over the different machines in the network. Everything is automatically and intelligently orchestrated.raisinwants to beas simple as possible. That’s why the code analysis and the resources management are automated. It also uses a bunch of classes and functions default parameters that are suitable for most usages.However, you can tuneraisinbehavior as you want since all these parameters arefully customizable.raisinis a multi-OS module 100% written in python in order to keep installation reliable and simple.In a future version,raisinwill be able to perform automatic parallelization, a little like ‘pydron’.2. Resources sharingTo be able to use community resources, you must give in return!That’s why, whenraisinis installed as a python package, you have to install the ‘application’ part.The minimum to do is to start a grape server that will be listening to execute the tasks requested by itself or by other users on the network. To do this, run the following command:python-mraisin serverInstallationTo install the module, you have to go through pypi:pip install raisin.Once the module is installed, executepython-mraisin installto create the configuration file.For the uninstallation, it is enough to executepython-mraisin uninstall && pip uninstall raisin.Basic example>>>importraisin>>>f=lambdax:x**2# a costly function>>>list(raisin.imap_unordered(f,range(3),context=True))[Result(0),Result(1),Result(4)]>>>See thedocumentationfor more details and examples.
Package: raisin.box
The raisin.box package is a part of Raisin, the web application used for
publishing the summary statistics of Grape, a pipeline used for processing and
analyzing RNA-Seq data.Links:The full documentation is located at :http://raisinbox.readthedocs.org/en/latest/The repository and issue tracker are at GitHub :https://github.com/rna-seq/raisin.box/issues1.4 (2012-10-09)Change font size on chartsAdd internal chart titlesReduce some charts to width 600Fix layout problems in charts on mapping tab. The height setting had cut
off the x-axis legend.Use tooth.paste to standardize the package structure, for example using
a standard setup.py file.Integrate the tooth.paste Makefile containing the different utilities that
are necessary for quality control, like PEP8, Pylint, Flake8 and coverage.Integrate the tooth.paste generated .zopeskel that keeps the defaults
for recreating a fresh package should this be necessary in the future.Integrate the tooth.paste generated .travis.yml for Travis-CL support1.3 (2012-07-25)Make links to experiments pointing to the default tab1.2 (2012-07-20)Add read distribution chart to mapping1.1 (2012-03-28)Initial release
Package: raisin.mysqldb
= raisin.mysqldb =This module contains a class for keeping a connection to a MySQL database:class DB:“””
Encapsulate a MySQL connection in a class instance
“””It also contains a method to run Python methods while raising the right Exceptions when
needed:def run_method_using_mysqldb(method, parameters, marker):“””Run a method containing some code making use of the MySQL database.
If anything goes wrong, return the marker, otherwise the result.
“””
Package: rai-test-utils
Responsible AI test utilities for PythonThis package has been tested with Python 3.6, 3.7, 3.8, 3.9 and 3.10The Responsible AI Test Utilities package contains common testing utilities and functions shared across various RAI tools, including fairlearn, interpret-community, responsibleai, raiwidgets, ml-wrappers and other packages.Please see the main documentation website:https://responsibleaitoolbox.ai/The open source code can be found here:https://github.com/microsoft/responsible-ai-toolbox
Package: rai-toolbox
The rAI-toolbox is designed to enable methods for evaluating and enhancing both the
robustness and the explainability of AI models in a way that is scalable and that
composes naturally with other popular ML frameworks.A key design principle of the rAI-toolbox is that it adheres strictly to the APIs
specified by the PyTorch machine learning framework. For example, the rAI-toolbox frames
adversarial training workflows solely in terms of thetorch.nn.Optimizerandtorch.nn.ModuleAPIs. This makes it trivial to leverage other libraries and
frameworks from the PyTorch ecosystem to bolster your responsible AI R&D. For
instance, one can naturally leverage the rAI-toolbox together with
PyTorch Lightning to perform distributed adversarial training.
Package: raiutils
Responsible AI Utilities for PythonThis package has been tested with Python 3.6, 3.7, 3.8, 3.9 and 3.10The Responsible AI Utilities package contains common functions shared across various RAI tools, including fairlearn, interpret-community, responsibleai, raiwidgets and other packages, as well as notebook examples.Please see the main documentation website:https://responsibleaitoolbox.ai/The open source code can be found here:https://github.com/microsoft/responsible-ai-widgets
Package: rajant-api
rajant-apiA Python library that provides an interface for developers to communicate with Rajant Breadcrumb radios. The rajant-api library allows users to retrieve the state and configuration of these radios and to make changes to the configuration.InstallationThe library can be installed via pip:pipinstallrajant-apiUsageHere's a basic example of using the library to connect to a radio, authenticate and retrieve its state:fromrajant_apiimportBreadcrumbbc=Breadcrumb(host="192.168.0.20",port=2300,role="VIEW",password="view-password")ifbc.authenticate():print(bc.get_state())Breadcrumb classThe main class exposed by this library is Breadcrumb. It holds the state and functionality for connecting, authenticating, and interacting with a host via a specific role. Here are the available methods:reachable()Checks if the host associated with this Breadcrumb instance is reachable.get_message()Retrieves and parses a message from the host associated with this Breadcrumb instance.build_message()Constructs a new BCMessage object with a sequence number.send_message()Sends a message to the host associated with this Breadcrumb instance.setup_connection_socket()Sets up a secure socket connection to the host associated with this Breadcrumb instance.prepare_login_message()Prepares a login message to authenticate with the host.authenticate()Authenticates with the host associated with this Breadcrumb instance.get_state()Retrieves the state from the host associated with this Breadcrumb instance.get_state_filter()Retrieves the state from the host associated with this Breadcrumb instance, filtered by the provided filters.ContributingContributions are welcome! Please open an issue if you encounter any problems or have suggestions for improvements.LicenseCreative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0)
Package: rajaongkir-py
Raja Ongkir APIAPI DocumentationRaja Ongkiris a RESTful API that provides the following services:Object-Oriented Interface- The API is implemented in object-oriented style.Simple and Easy to Use- The API is easy to use and simple to implement.Province: Get all province dataProvince Detail: Get province detail dataCity: Get all city dataFind City: Get city data by province idCost: Get all cost dataETD: Get all etd dataVarian Account Type: Get all varian account type dataRaja Ongkir API DocumentationInstallationpipinstallrajaongkir-pyUsagefromrajaongkirimportClient# Create a client objectclient=Client(auth='YOUR_API_KEY')# Get all province dataprovinces=client.provinces.list()# Get province detail dataprovince=client.provinces.query(province_id=1)# Get all city datacities=client.cities.list()# Get city data by province idcities=client.cities.query(province_id=1)# Get ciry data by city id and province idcity=client.cities.query(city_id=1,province_id=1)# Get calculate cost datacost=client.costs.calculate(origin=501,destination=114,weight=1000,courier='jne')# print cost dataprint(cost)
Package: rajinipp
rajini++rajini++ (rajiniPP) is a programming language is a tribute to the one and only superstar and based on the iconic dialogues of Rajinikanth. This is a hobby project ans is not meant to be used for serious software development.Superstar RajinikanthWho is Rajinikanth?Rajinikanth on Wikipedia.Installationrajinipp requirespython >= 3.8. Install python fromhere.Install the rajini++ interpreter using the following command:pip install rajinipptest installation:rajinipp versionGetting startedrajini++ is not a feature rich language and is not intended for serious use. It is rather a hobby project and a tribute to the one and only superstar.Run programshello_world.rpp:LAKSHMI START
DOT "Hello, World!";
MAGIZHCHIRun thehello_world.rppprogram:rajinipp run examples/hello_world.rppwill result in the following output:ResourcesLearn the rajini++ language:The rajini++ language documentationcan be found at therajiniPP Wiki.Example programs can be found here:Example Programs.The rajini++ Language Spec: The rajini++ commands and its equivalent in python3 can be found at therajiniPP Language Specwiki.The rajinipp Interpreter Documentation: The documentation for the rajinipp interpreter can be foundhere.AcknowledgementsA lot of learnings fromDIVSPLand its accompanyingpycon talk.A lot of learnings fromthis pycon talkbyAlex Gaynor.Workflows setup based onpoetry_pypi_template.This project is inspired by theArnoldCproject.Roadmaprajini++ FeaturesMath OpsSUMSUBMULDIVMODUnary Opsprint multiple objects with the same statement.variable declarationvariable accessvariable manipulationbool data typefloat datatypelogical opsif statementif-else statementfor loopwhile loopfunctionsfunctions with returnfuinctions with argumentsExecute python code in rajini++ scriptsrajinipp packagerajinipp python runner:rajinipp.api.require: load rajini++ code into python program.rajinipp.runner.RppRunner.exec: execute rajini++ programs in python loaded as string.rajinipp.runner.RppRunner.eval:eval rajini++ statement in python scripts [limited support].support flow control statements.eval function calls from loaded rajini++ code and return output.rajinipp shell to run rajini++ commands from the terminal.limited support usingrajinipp.runner.RppRunner.eval.complete support to all rajini++ features.GeneralAdd tests.semantic releases.
Package: rajx
----[pip install rajx]--------[USE]----print Sumthiong = rajx.p('YOUR TXT')GET NOW TIME = rajx.time()----[GENERATE TXT LOGO]-----from rajx import mlogologo = mlogo(text='MIVI')print(logo)-----[SOME-FUNCTION]------os.system = rajx.ost('YOUR COMmAND')request.get = rajx.rqg   <Call this modul "rajx.rqg">request.post = rajx.rqp  <Call this modul " rajx.rqp">random.randint = rr <Call this modul "rajx.rc">random.choice = rc   <Call this modul "rajx.rc">base64.decode = b64dc <Call this modul "rajx.b64dc">base64.encode = b64ec <Call this modul "rajx.b64ec">---[COLAR]------RED = rajx.REDGREEN = rajx.GREENYELLOW = rajx.YELLOWBLUE = rajx.BLUEORANGE = rajx.ORANGELI_BLUE = Light_BLUELI_MAGENTA = Light_MAGENTALI_CYAN = Light_CYANLI_WHITE = Light_WHITEBackground colorsBG_BLACK = Background_BLACKBG_RED = Background_REDBG_GREEN = Background_GREEN-----[MORE]-----GET id is create date fb = rajx.gyid(cid)---- <<<[There are more cloure are added]>>------[You can use as fucntion your caoud make extra ordanary][exp];import rajx as RR.p('mivi')[if This modul is helpfull You can try it]....[Iam a little boy.plz Don't look down on me Try to Do somthing]
Package: rak
Python API for the RAK Video modules, tested on RAK566InstallationUntil Pypi publishing:sudopipinstallrakUsagefromrakimportRakDevice# If you connect to the RAK567, the ip of the RAK566 (or other transmitters) is 192.168.100.100# If you connect to the RAK566 (or other transmitters) directly, the ip will be 192.168.100.1# RakDevice(self, ip, pipe, username="admin", password="admin"):pipe0=RakDevice("192.168.100.100",pipe=0,username='admin',password='admin')pipe1=RakDevice("192.168.100.100",pipe=1,username='admin',password='admin')# Refresh force to read all the propertiespipe0.refresh()# Show the pipe properties (refreshes only the data that is not yet read)print(str(pipe0))# Set the highest resolution (FHD) and quality for the pipe0pipe0.resolution(3).quality(136).fps(30).gop(30)# Disable pipe1 as nothing is connected by default on the RAK566pipe1.resolution(0).quality(5).fps(1).gop(1)Credits[@AlexisTM](http://github.com/AlexisTM): Alexis Paques