Saravanan666/pypi-org huggingface dataset:
Package: ru-attacker
Robustness Evaluation of Pre-trained Language Models in the Russian LanguageThis is a repo with experiments forRobustness Evaluation of Pre-trained Language Models in the Russian Languageand a toolru_attackerfor attacking Russian NLP modelsInstallationpip install ru_attackerUsage exampleSet model>>> from ru_attacker.models import RobertaModel
>>> roberta_checkpoints = "Roberta_checkpoints"
>>> ruRoberta = RobertaModel(roberta_checkpoints)Set dataset>>> from ru_attacker.models.set_dataset import get_data
>>> data_dir = "TERRa/val.jsonl" 
>>> data = get_data(data_dir)Set attackYou have to definetransformation,goal_functionandtype_perturbation.constraintsandsearch_methodare optional>>> from ru_attacker.attacks.transformations import BackTranslation  # transformation
>>> from ru_attacker.attacks.goal_function import LabelPreserving  # goal function
>>> from ru_attacker.attacks.constraints import GrammarAcceptability, SemanticSimilarity  # constraints
>>> from ru_attacker.attacks.search_method import GreedySearch  # search method
>>> from ru_attacker.attacks import Attack  # attack wrapper
>>> backtranslation = Attack(
        transformation=BackTranslation(languages=["en", "fr", "de"]),  # you can set languages manually or use the default ones
        goal_function=LabelPreserving(),
        type_perturbation="hypothesis",  # to what part perturbation is applied {"hypothesis", "premise"}
        constraints=[GrammarAcceptability(), SemanticSimilarity()],
        search_method=GreedySearch()
    )Attack model and view results>>> results = backtranslation.attack(ruRoberta, data)
                  [Succeeded / Failed / Skipped / Total] 0 / 1 / 0 / 1:
                  entailment --> entailment
                  original premise: """Решение носит символический характер, так как взыскать компенсацию практически невозможно"", - отмечается в сообщении."
                  original hypothesis: Взыскать компенсацию не получится.

                  transformed: Компенсации не будет.

                  

                  [Succeeded / Failed / Skipped / Total] 1 / 1 / 0 / 2:
                  entailment --> not_entailment
                  original premise: Об этом вечером во вторник, 17 января, сообщила пресс-служба Спасательного департамента, отметив, что немецкую противотанковую мину Tellermine 42 обнаружили в на улице Кеэвисе в ходе земляных работ. Спасатели эвакуировали жителей окрестных домов, офисов и складских помещений. Уничтожать мину на месте не стали, поскольку это угрожало повреждению трассы трубопровода.
                  original hypothesis: На улице Кеэвисе жителей эвакуировали из-за мины.

                  transformed: На улице Касери эвакуировали жителей из мин.Convert results to DataFrame>>> import pandas as pd
>>> dataframe = pd.DataFrame(results)Here isTutorialExperimentsAll the data used in experiments and the results are indatafolder (TERRaandresultscorrespondingly).All experiments can be reproduced inExperiments.ipynb.Models checkpoints are available via:ruT5-largeruRoberta-large
Package: rubaialter
A module for altering numerical dataset’s formats, made on top of PandasIntroductionThis module is written on top of Pandas to alter a numerical dataset into different formats quickly. From now,  alteration of dataset formats is as exciting as writing a poem. So, write a poem and create magic with data, one step faster with this module.rubaialteris a module that will perform conversions among these.csv ,.xlsx, .xls, .sqlite3file formats using Pandas under the hood.Example:$ rubaialter dataset.xlsx --csvpip install rubaialterwill automatically create an
executable script in yourScripts/folder, so you
should be able to simply:$ rubaialter dataset.csv --xlsxor even:$ rubaialter *.csv --xlsxYou can type:$ rubaialter -hto obtain the following CLI:usage: rubaialter.py [-h] [--csv] [--xls] [--xlsx] [--sqlite]
                     [--force] filenames [filenames ...]

A module for altering datasets formats made on top of Pandas

positional arguments:
filenames   .csv, .xls, .xlsx, .sqlite3

optional arguments:
-h, --help  show this help message and exit
--csv       Convert to csv
--xls       Convert to xls
--xlsx      Convert to xlsx
--sqlite    Convert to sqlite3
--force     Enable overwriting
Package: rubato
rubato is a modern 2D engine for game developement in python built in Cython using SDL2. It is aimed to aid in rapid prototyping and educational development of games as a stepping stone towards AAA tools such as Unity. rubato is more robust than its competitors, with a more intuitive syntax, high customizability, and zippy performance.Here are some features we're especially proud of:Powerful Rigidbody PhysicsEvent Subscription/Listener SystemSpritesheets and AnimationsParticle SystemsTiled / Tilemap SupportMultichannel Sound SystemAntialiasing + Anisotropic FilteringCollision Optimization with QuadtreesTexture-based Hardware AccelerationUser Interface ElementsAnd more!1.0 is the latest API-stable release as of Dec. 31 2022, and we plan to maintain backwards compatibility in future releases. Please note that the alpha versions (0.x.x) are now deprecated and it is strongly recommended to update in order to get the latest features and optimizations.Wondering about the name? rubato is a music term that indicates a phrase that should be performed expressively and freely. We aim to harness that same freedom, bringing a fresh, modern take on game developement in python to a variety of users regardless of their coding background.Getting StartedUsing rubato is super easy. Just install rubato through pip in a terminal:pipinstallrubatoAfter that, getting a window up takes only 3 lines of code!importrubatoasrb# initialize rubatorb.init()# launch the windowrb.begin()Check out ourtutorialto learn more about what you can do with rubato.ChangelogSeeCHANGELOG.mdLooking to contribute to rubato?SeeCONTRIBUTING.md. And join ourdiscord!A big thank you to all of ourcontributorswho help make this project possible.Code of ConductSeeCODE_OF_CONDUCT.md.
Package: rubberdoc
The simple and extendable documentation generatorDocumentationhttps://rubberdoc.deta.devSource Codehttps://github.com/pyn-sol/rubberdocRubberDocis a documentation generator that makes your docstrings come alive.The generator takes your python package as it is and translates it directly to a beautiful set of technical documentation.Check out the tutorials and documentation (generated by RubberDoc, of course!) at the link above.pip install rubberdocto get started!
Package: rubberduck-ai
ChatGPT CLI ClientInstallationManual Installationgit clone https://github.com/hansololz/rubberduck-ai.git
cd rubberduck-ai
python setup.py installInstallation (pip)pip install rubberduck-aiAuthenticationAuthentication TokenThe CLI tool requires Open AI authentication token. Token can be obtained
by going tohttps://platform.openai.com/account/api-keys.Authentication MethodsChoose one of these options to authenticate the CLI tool:Set the environment variable:OPENAI_API_KEY=<AUTHENTICATION_TOKEN>.Use a command argument:rda --openai-api-key=<AUTHENTICATION_TOKEN>.Enter the API key when prompted while running the CLI tool.UsageEvaluation LoopRun the application:rdaSupported Commands.n .new: Create new session.p .print: Print current session.s .sessions: Change chat sessioncd clear ls: Session supported bash commandscd cls dir: Session supported cmd commandsSingle PromptProcess a single prompt with:rda <SINGLE_PROMPT> --openai-api-key=<AUTHENTICATION_TOKEN>
Package: rubber-ducky
rubber duckytl;drpip install rubber-duckyInstall ollamaollama run codellama(first time and then you can just have application in background)There are probably other dependencies which I forgot to put in setup.py sorry in advance.Run withducky -f <file path>Why did I make thisI wrote ducky because I annoy engineers too much and I needed to talk someone through my code quickly and validate my approach. Maybe this is why I'm not a senior engineer.Since I can't dump all my code to GPT and make it tell me I know how to code, I decided to build something for quick iteration. All. Local. I also didn't want to get fired by leaking all our data. Not again.DependenciesBless the folks at Ollama cause they have been carrying my recent projects.This project is currently only supported on Mac and Linux cause Ollama is a dependency.
You will need Ollama installed on your machine. The model I use for this project iscodellama.For the first installation you can runollama run codellamaand it should pull the necessary binaries for you. Ollama is also great because it'll spin up a server which can run in the background and can even do automatic model switching as long as you have it installed.UsageInstall throughpypi:pip install rubber-ducky.Simple runduckyTo use additional options:ducky --file <path> --prompt <prompt> --directory <directory> --chain --model <model>Where:--promptor-p: Custom prompt to be used--fileor-f: The file to be processed--directoryor-d: The directory to be processed--chainor-c: Chain the output of the previous command to the next command--modelor-m: The model to be used (default is "codellama")Example output
Package: rubble
Rubble: An implicit code for simulating the local evolution of solid size distributions in protoplanetary disksRubbleimplicitly models the local evolution of dust distributions in size, mass, and surface density by solving the Smoluchowski equation (also known as the coagulation-fragmentation equation) under given disk conditions. The code robustness has been validated by a suite of numerical benchmarks against known analytical and empirical results.Rubbleis also able to model prescribed physical processes such as bouncing, modulated mass transfer, regulated dust loss/supply, and probabilistic collisional outcomes based on velocity distributions, etc. The package also includes a toolkit for analyzing and visualizing results produced byRubble.InstallationYou may installRubbleby this command:pipinstall-UrubbleOr, you may try the most updatedRubbleby this command:pipinstall-U-egit+git://github.com/astroboylrx/RubbleIt will automatically install all the required modules.UsageFor now, please check out the Jupyter Notebooks under thedoc/JupyterNotebooksfolder. More examples and documentation will be added soon.You may also tryhelp(Rubble)to read the raw documentation.
Package: ruben-anagram-solver
Anagram SolverSimple anagram solver.Currently only English is supported, but it could be extended to support other languages. The main difficulty would be finding a systematic way to obtain lists of valid words for multiple languages.InstallationInstall as usual:pipinstallruben-anagram-solverYou may wish tocreate a virtual environmentbeforehand.UsageRun the program using the following command:ruben-anagram-solverUsing the program is extremely simple:Enter string: cchikne
['check-in', 'chicken']How It WorksSince an anagram of some word is just some rearrangement of the word's letters, two words are anagrams of each other if they are same when the order (and possibly case) of the letters is ignored. To check this, the idea was to convert each of the two words to some "order-insensitive" representation and compare this. Such a representation could be simply the letters sorted (e.g.['c', 'c', 'e', 'h', 'i', 'k', 'n']for "chicken") or a count of each letter in the word (e.g.{('n', 1), ('h', 1), ('c', 2), ('e', 1), ('i', 1), ('k', 1)}). I also decided to ignore case (by first converting the word to lower case) and ignore non-alphanumeric characters (by removing them from the word).The exact steps are as follows:Read a list of English words.IIRC the words list is from:https://github.com/dwyl/english-words.Convert each word to its order-insensitive representation (as described above).Create a dictionary where each key is an order-insensitive representation (e.g.{"a": 1, "b": 1, "t": 1}) and each value is the set of words that correspond to that order-insensitive representation (e.g.{"bat", "tab"}).This is to make lookups more efficient, should the program be extended to allow multiple lookups.Input an anagram from the user.Convert the anagram to its order-insensitive representation.Look this up in the dictionary to obtain the set of words corresponding to the anagram's order-insensitive representation.Output this set of words.
Package: ruben-console-utilities
This is a package containing utility functions for command-line applications.WarningAs this library is still in version 0.y.z, keep in mind that the API may change at any time. See Item 4 of the Semantic Versioning Specification:https://semver.org/#spec-item-4.FeaturesInputting an integer, float or booleanSelecting from a list of options (by entering an integer or character)GoalsSimplicity: Straightforward, high-level functions with sensible defaults. Most parameters are optional, so you can
hit the ground running.Flexible: An extensive range of options are provided, making the library useful in a wide range of situations.InstallationInstall as usual:pip install ruben-console-utilitiesYou may wish tocreate a virtual environmentbeforehand.UsageHere a few examples:>>> import consoleutilities as cu
>>> cu.input_option_int(["Export as PDF", "Export as HTML", "Export as TeX"])
[0]: Export as PDF
[1]: Export as HTML
[2]: Export as TeX
Enter integer [0..2]: >? 0
0
>>> cu.input_int("Pick a number between 1 and 10: ", 1, 10, include_max=True)
Pick a number between 1 and 10: >? 8
8
>>> cu.input_boolean("Specify whether to trust this host")
Specify whether to trust this host [y/N]: >? abc123
False
>>> cu.input_boolean("Specify whether to enable HTTPS", default=True)
Specify whether to enable HTTPS [Y/n]: >?
True
Package: ruben-snake-cmd
SnakeCommand-line version of the classic Snake game.InstallationInstall as usual:pipinstallruben-snake-cmdYou may wish tocreate a virtual environmentbeforehand.Installation on WindowsThe game requires the curses library. This should already be installed on Linux and macOS so no additional steps are required. However, it is not included in the Windows version of Python, as noted in thecurses documentation. On Windows, you can install thewindows-cursespackage (seethis comment), usingpip install windows-curses.UsageRun the game using the following command:ruben-snake-cmdNote that I've only tested this on Linux.The application should generally be self-explanatory.One thing to note is the settings screen, reached by pressingSon the title screen. Currently, the only option is to enable/disable the snake wrapping around the edge of the window by pressingB. If disabled, the snake will "die" on reaching the edge of the window.There is also a controls screen, reached by pressingCon the title screen.In-Game ControlsKey(s)Action←,↑,→,↓Change directionQEnd gameNote that these only apply in-game and not on other screens, such as the title screen or settings screen.
Package: rubeus
Rubeusstreamlines API requests to 20+ LLMs. It provides a unified API signature for interacting with all LLMs alongwith powerful LLM Gateway features like load balancing, fallbacks, retries and more.pipinstallrubeus💡 FeaturesNameDescriptionExample🌐InteroperabilityWrite once, run with any provider. Switch between __ models from __ providers seamlessly.🔀Fallback StrategiesDon't let failures stop you. If one provider fails, Rubeus can automatically switch to another.🔄Retry StrategiesTemporary issues shouldn't mean manual re-runs. Rubeus can automatically retry failed requests.⚖️Load BalancingDistribute load effectively across multiple API keys or providers based on custom weights.📝Unified API SignatureIf you've used OpenAI, you already know how to use Rubeus with any other provider.🤝 Supported ProvidersProviderSupport StatusSupported EndpointsOpenAI✅ Supported/completion,/embedAzure OpenAI✅ Supported/completion,/embedAnthropic✅ Supported/completeCohere✅ Supportedgenerate,embedGoogle Bard🚧 Coming SoonLocalAI🚧 Coming Soon📝 Full Documentation|🎯 Roadmap|🐞 Bug Reports|💡 Feature Requests📞 Talk to the devs:Rohit|Ayush
Package: rubi
rubirubi is a python SDK for the Rubicon Protocol and has a variety of functionality for interacting with the protocol.
Documentation related to rubi and its functionality can be foundhere.Design GoalsThe underlying goal of the design of rubi is to provide developers with a seamless integration experience when
interacting with the Rubicon. The SDK is built with the goal of enabling efficient and reliable communication with
Rubicon's smart contracts, empowering developers to effortlessly access and utilize Rubicon's features in their Python
applications.ExamplesExamples of using the rubi sdk can be foundhere.Directory Structure├── docs
│   ├── examples
│   │   ├── example.py
│   ├── ...
├── network_config
│   ├── abis
│   │   ├── ERC20.json
│   │   ├── market.json
│   │   ├── ...
│   ├── optimism
│   │   ├── network.yaml
│   ├── ...
│   ├── README.md
├── rubi
│   ├── contracts
│   ├── data
│   ├── network
│   ├── rubicon_types
│   ├── client.py
│   ├── __init__.py
├── tests
│   ├── ...
├── poetry.lock
├── pyproject.toml
└──...The codebase follows the structure detailed above with:docs: all the sources for documentation along with someexamples.network_config: configuration and abis for the different networks. For more details see
theREADME.md.rubi: the python sources root. The main entrypoint for most users will be theclient.py.tests: test coverage of the repository.Decisions and Considerations- Writing to the chainThroughout the codebase we offer the user the option to pass in a nonce argument or derive it from chain state if none
is provided (via theget_transaction_countfunction). Aspirationally, we want to support a python based nonce manager
that can be used to manage nonces for the user. Until then, this optional parameter is meant to enable the user to
manage nonces themselves. When a user does not provide a nonce, we derive it from chain state accordingly. In this case,
we also wait for the transaction to be confirmed before continuing. If the transaction fails, an exception is raised and
the program is exited. The user can override this behavior by managing nonces themselves.SDK DisclaimerThis codebase is in Alpha and could contain bugs or change significantly between versions. Contributing through Issues
or Pull Requests is welcome!Protocol DisclaimerPlease refer tothisfor information on the risks associated to the
Rubicon Protocol.
Package: rubicon
A collection of tools to bridge between Python and other language
environments.The core package doesn’t do anything - it’s just a namespace placeholder for
the platform specific backends.Related projectsThe following platform backends are available for Rubicon:rubicon-objc: for Objective C (OS X and iOS)rubicon-java: for JavaCommunityRubicon is part of theBeeWare suite. You can talk to the community through:@pybeeware on TwitterTheBeeWare Users Mailing list, for questions about how to use the BeeWare suite.TheBeeWare Developers Mailing list, for discussing the development of new features in the BeeWare suite, and ideas for new tools for the suite.ContributingIf you experience problems with Toga, log them using the platform specific
ticket trackers on GitHub (Objc,Java). If you want to contribute code, please fork the code and
submit a pull request.
Package: rubicon-objc
Rubicon-ObjCRubicon-ObjC is a bridge between Objective-C and Python. It enables you to:Use Python to instantiate objects defined in Objective-C,Use Python to invoke methods on objects defined in Objective-C, andSubclass and extend Objective-C classes in Python.It also includes wrappers of the some key data types from the Foundation
framework (e.g.,NSString).TutorialWant to jump in and get started? We have ahands-on tutorial for
beginners.How-to guidesLooking for guidance on how to solve a specific problems? We havehow-to
guides and recipesfor common problems and tasks, including how to contribute.ReferenceJust want the raw technical details? Here’s ourTechnical
reference.BackgroundLooking for explanations and discussion of key topics and concepts?
Ourbackgroundguides may help.CommunityRubicon is part of theBeeWare suite. You can talk to the community through:@beeware@fosstodon.org on MastodonDiscordThe Rubicon-ObjCGithub Discussions forumCode of ConductThe BeeWare community has a strictCode of Conduct. All users and
developers are expected to adhere to this code.If you have any concerns about this code of conduct, or you wish to report a
violation of this code, please contact the project founderRussell Keith-
Magee.ContributingIf you experience problems with this backend,log them on GitHub. If you
want to contribute code, pleasefork the codeandsubmit a pull request.
Package: rubies
Rubie's SteganographyThis code implements the paper "Digital Image Steganography: An FFT Approach" by Tamer Rabie. It is a way to embedding two images to one carrier image.Installation~$pipinstallrubiesUsageWithin the examples below, you will be completely understand all the functionality ofrubiespackage.Encode Two Images into an Image# Import Rubie's Encoder.fromrubiesimportEncoder# Create an encoder instance with carrier image.encoder=Encoder("carrier_image.png",secret_size=(500,500))# Encode the secret images onto carrier. Return value can be also used.encoded_image=encoder.encode("secret_image_a.png","secret_image_b.png")# Save the image.encoder.save("encoded_image.png")Decode an Image with Unknown Secret Size# Import Rubie's Decoder.fromrubiesimportAutoDecoder# Create a decoder instance with encoded image and carrier image.decoder=AutoDecoder("encoded_image.png")# Decode the secret images from the encoded image. Return values can be also used.secret_image_a,secret_image_b=decoder.decode()# Save the secret images.decoder.save("secret_image_a.png","secret_image_b.png")Decode an Image with Known Secret Size# Import Rubie's Decoder.fromrubiesimportSimpleDecoder# Create a decoder instance with encoded image and carrier image.decoder=SimpleDecoder("encoded_image.png",secret_image_sizes=(500,500))# Decode the secret images from the encoded image. Return values can be also used.secret_image_a,secret_image_b=decoder.decode()# Save the secret images.decoder.save("secret_image_a.png","secret_image_b.png")