Saravanan666/pypi-org huggingface dataset:
Package: redforester
rfapi - RedForester API module for PythonFeaturesPython 3.7Async (using aiohttp)LightweightFastInstallingInstall with PIPpip install git+https://github.com/ichega/rfapi.gitRoadmapРеализовать следующий набор классов:Session - создание сессии для работы с RedForesterRequest - получение данных из RedForesterAction - совершение действий в RedForesterSequense - совершение сразу множества действий в RedForesterUser - работа с данными о пользователеMap - работа с данными о картеNode - работа с данными об узлеEvent - информации о событии на картеListener - отслеживание событий на карте (создание, удаление, модификация узлов и веток)User guide1. Создать сессиюimportredforestersession=rfapi.Session(username="username",password="password")# Можно вместо пароля передать его md5 хеш# session = rfapi.Session(username="username", password="5F4DCC3B5AA765D61D8327DEB882CF99", use_md5=True)Замечание:Можно также подключится к тестовому серверуimportrfapifromrfapi.configimportDEVELOPMENT_CONFIGsession=rfapi.Session(username="",password="",config=DEVELOPMENT_CONFIG)2. Получение информации из RedForesterДля этого необходимо использовать классRequest:
Пример, получение данных о пользователе:2.1. Синхронный вариант - методsendimportredforestersession=redforester.Session(username="username",password="password")request=redforester.Request(session=session,method="GET",url="/api/user")response=request.send()print(response)2.2. Асинхронный вариант - методasync_sendimportredforesterimportasynciosession=redforester.Session(username="username",password="password")request=redforester.Request(session=session,method="GET",url="/api/user")loop=asyncio.get_event_loop()response=loop.run_until_complete(request.async_send())print(response)3. Совершение действий в RedForester3.1. ActionДля этого используется классAction.  АналогичноRequest, он имеет синхронный и асинхронный вариант.
Пример, пусть нужно изменить аватар пользователя:Синхронный вариант:importredforestersession=redforester.Session(username="username",password="password")data={"avatar":"https://img.icons8.com/color/48/000000/administrator-male.png",}action=redforester.Action(session,method="PATCH",url="/api/user",data=data)response=action.send()print(response)3.2.  SequenceВ документации RedForester рекомендуется использовать batch запросы для совершения нескольких последовательных действий. Для этих целей был разработан классSequence, который позволяет легко организовать несколькоActionв batch-запрос.КонструкторSequenceпринимает два аргумента:СессиюКортеж изActionПример, пусть нужно изменить аватар пользователя и создать новую карту:importredforestersession=redforester.Session(username="username",password="password")avatar_info={"avatar":"https://img.icons8.com/color/48/000000/administrator-male.png",}map_info={"name":redforester}action1=redforester.Action(session,"PATCH","/api/user",avatar_info)action2=redforester.Action(session,"POST","/api/maps",map_info)sequence=redforester.Sequence(session,(action1,action2))response=sequence.send()print(response)
Package: redfox
Redfox provides a simple, declarative routing mechanism for creating
WSGI entry points into applications. It’s broadly similar to
microframeworks likejunoorCherryPy.FeaturesIt’s tiny. Theredfoxpackage contains under 100 lines of code.
Redfox builds heavily on the Werkzeug tools to implement its features,
rather than re-reinventing the wheel.It’s clean. The following is a valid Redfox application class:from werkzeug import Response
from redfox import WebApplication
from redfox.routing import get, post

class Example(WebApplication):
    @get('/')
    def index(self, request):
        return Response("Hello, world!")It’s minimal. Redfox does not impose a persistance mechanism, or a
view mechanism. Bring your own, or create your own tools.
Package: redfs
RedFS - FreeSWITCH Event SocketFreeSWITCH Event Socket Protocol Client Library by Python3:GeventWhy RedFS ?It's origin fork fromgreenswitch, with additional implementation:Minimalize dependency (gevent only)Large scale adaptationBug fixPython3 syntax improvementUsageInstallationpip3installredfsFreeSWITCH configurationevent socket module<configurationname="event_socket.conf"description="Socket Client"><settings><paramname="nat-map"value="false"/><paramname="listen-ip"value="127.0.0.1"/><paramname="listen-port"value="8021"/><paramname="password"value="your-esl-password"/></settings></configuration>dialplan<include><contextname="default"><extensionname="daemon-ex"><conditionregex="all"><regexfield="destination_number"expression="."/><actionapplication="sched_hangup"data="+60 ALLOTTED_TIMEOUT"/><actionapplication="park"/><anti-actionapplication="hangup"data="REQUESTED_CHAN_UNAVAIL"/></condition></extension></context></include>a simple python application for auto answer.importgeventimportredfsimporttracebackESL_HOST='127.0.0.1'ESL_PORT=8021ESL_PASSWORD='your-esl-password'ESL_TIMEOUT=10defrealtime(event):event_name=event.headers.get('Event-Name')uuid=event.headers.get('Unique-ID')print(f'Event{event_name}with uuid{uuid}')conn=redfs.InboundESL(host=ESL_HOST,port=ESL_PORT,password=ESL_PASSWORD,timeout=ESL_TIMEOUT)conn.connect()ifevent_name=='CHANNEL_PARK':cmd=f'api uuid_answer{uuid}'res=conn.send(cmd)print(cmd,res.data)defprintlog(event):event_name=event.headers.get('Event-Name')uuid=event.headers.get('Unique-ID')print(f'Event{event_name}with uuid{uuid}')cnx=redfs.InboundESL(host=ESL_HOST,port=ESL_PORT,password=ESL_PASSWORD,timeout=ESL_TIMEOUT)cnx.connect()cnx.register_handle(['CHANNEL_PARK','CHANNEL_ANSWER'],realtime)cnx.register_handle('*',printlog)cnx.send('EVENTS PLAIN ALL')print('connected')whileTrue:try:gevent.sleep(1)exceptKeyboardInterrupt:cnx.stop()breakexceptExceptionase:print(e,traceback.format_exc())Enjoy!LicenseMIT
Package: redgettext
A slightly modified version of pygettext forCog-Creators/Red-DiscordBot.Installationpip install redgettextUsageExtract strings surrounded with_():redgettext <inputfile> ...Extract strings as well as command and cog docstrings:redgettext -D <inputfile> ...For more options, do:redgettext -hCopyrightCopyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
2012, 2013, 2014, 2015, 2016, 2017 Python Software Foundation. All rights reserved.
Package: redgifs
redgifsAsync and Sync Python Wrapper for the RedGIFs API.⭐Please star this repo to support the developer and to encourage the development of this project!Installationpip install -U redgifsDevelopment versionpip install -U git+https://github.com/scrazzz/redgifsredgifsworks on Python versions 3.8 and above.QuickstartCommand Line usage:redgifs [url]Seeredgifs -hfor help.Synchronous usage:importredgifsapi=redgifs.API()api.login()# Login with temporary tokenresponse=api.search('3D')print(response)api.close()Asynchronous usage:importasynciofromredgifs.aioimportAPIasyncdefmain():api=API()awaitapi.login()# Login with temporary tokenresponse=awaitapi.search('3D')print(response)awaitapi.close()loop=asyncio.get_event_loop()loop.run_until_complete(main())More examples can be found in the examples directory.LinksDocumentationDiscord
Package: red-green-refactor-widget
Red-Green-Refactor WidgetWhen you are learning to follow thered-green-refactorworkflow, this app
will help you to keep track of your progress by reminding you of which stage
of the workflow you are right now and which actions you need to undertake
before proceeding to the next stage. SeeUsagesection for details.PrerequisitesThe package depends onpyqtkeybind,
which, at the time of writing this readme (version 0.0.6), has support for
Windows and Linux only.DependenciesPyQt5pyqtkeybindIf you are installing it throughpip, all necessary python dependencies
are going to be pulled in automatically. Depending on your platform, you
might need to install Qt5 binary packages.InstallationFrompip:$ pip install red-green-refactor-widgetUsageTo launch the app, simply run the following command from terminal:$ red-green-refactor-widgetAfter you launched the app, you should see a small window. It displays
a stage of the red-green-refactor workflow.
When you finished a stage, pressAlt-F12, and the widget will
change to the next stage of the workflow.
By default, the window is created with the always-on-top flag on,
and the hotkey is global, thus you don't need to worry about keeping
the window in focus.LicenseDistributed under MIT license. SeeLICENSEfile for more information.
Package: redgreenunittest
WHAT?!
===This is literally an exact clone of unittest (from Python 2.7), but with colors.
(Now also compatible with Python 3!)HOW?!
===You literally use it in the exact same way as [unittest](http://docs.python.org/2/library/unittest.html).INSTALLATION?!
===You can just install it into your path or your sourced virtual environment with this extremely easy command:pip install redgreenunittestAfter that, just reference this package like a normal, regular old python package like this:import redgreenunittestIf you do want to use it as a direct replacement for unittest without doing any extra work, you can just import like this:import redgreenunittest as unittestBUT WHAT ABOUT DJANGO?!
===I assume you mean the Python framework. (Not that movie.) Remember when I said, “exact clone” before? I lied. There is one extra directory called “django” in there that contains a file called “simple.py”If you want to use this as your test runner, and you’re already using unittest, you can literally drop this line of code into your settings.py file, and it will straight up work if you followed those installation instructions. In fact you could even skip the referencing step since Python is smart.TEST_RUNNER=”redgreenunittest.django.runner.RedGreenDiscoverRunner”Go ahead. Run your tests. Colors. It’s like we live in the future.DJANGO < 1.6
==Running a Django version pre-1.6? Then you’ll want the simple runner.TEST_RUNNER=”redgreenunittest.django.simple.RedGreenTestSuiteRunner”CAVEATS?!
===Ok, so if you’re using a vim gui like MacVim or GVim and its shell to run your tests, they’re going to look super weird. Sorry. You’re boned for colors in that shell. You can use [conque](https://code.google.com/p/conque/) if you want. I made it work using [zsh](http://www.zsh.org/) and [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh) and some medium-level vim scripting.The reason it sucks is because$TERMis set todumbin the vim gui shell ([literally](http://stackoverflow.com/a/13382717/1687623)). So if you’re using any other shell where$TERMis set todumb, you’re also going to be boned in that case.You may be boned in other scenarios. My experience in this area is limited. Let me know if you find yourself boned in other situations. I may be able to help, or I can at least make a note in this README.
Package: redhat-opentelemetry-contrib
redhat-opentelemetry-python-contribOpenTelemetry Python extensions written at Red HatThis repository includes:File exporters to export OpenTelemetry data to files when using auto-instrumentationScript instrumentor - Auto instrumentation plugin for wrapping an entire
python script run in a tracing spanInstallationpip install redhat-opentelemetry-python-contribUsing the file exportersThe file exporters can be used by setting theOTEL_*_EXPORTERenvironment
variables tofile, or using the equivalent arguments toopentelemetry-instrument.For example to export span data to a file for a particular Python script:opentelemetry-instrument --traces_exporter file python myscript.pyThe file to which the data will be written to can be customized using the
environment variables listed below. Otherwise, the listed default value would
be used:VariableUsed forDefault valueOTEL_FILE_SPAN_EXPORTER_NAMETrace dataotel_traces.logOTEL_FILE_METRIC_EXPORTER_NAMEMetricsotel_metrics.logOTEL_FILE_LOG_EXPORTER_NAMELogsotel_logs.logUsing the script instrumentorOnce installed, the script instrumentor will automatically wrap any Python
script invoked with auto instrumentation enabled in a span that would include
the script name, command-line arguments and exit status.The script instrumentor attempts to propagate the tracing context from the
environment it was invoked in, by trying to read environment variables that are
capitalized versions of the HTTP headers defined by theW3C Trace Context
specification. This typically means that if theTRACEPARENTenvironment
variable is defined in the environment the script runs in, the script span will
become a child span of that trace. This is generally compatible with how other
tools and systems handle things such as theAnsible OpenTelemetry callback
pluginand theJenkins OpenTelemetry plugin.The script instrumentor can cause traces to look a bit strange for things that
are not meant to be stand-alone Python scripts such as Django and Flask server
processes. It can be disabled by setting theOTEL_PYTHON_DISABLED_INSTRUMENTATIONSenvironment variable:export OTEL_PYTHON_DISABLED_INSTRUMENTATIONS="__main__"
Package: redhat-qe-cloud-tools
cloud-toolsPython utilities to manage cloud services, such as AWS.Local runclone therepositorygit clone https://github.com/RedHatQE/cloud-tools.gitInstallpoetrypoetry installDocsAWS ReadmeRelease new versionrequirements:Export GitHub tokenexportGITHUB_TOKEN=<your_github_token>release-itRun the following once (execute outside repository dir for example~/):sudonpminstall--globalrelease-it
npminstall--save-dev@j-ulrich/release-it-regex-bumper
rm-fpackage.jsonpackage-lock.jsonusage:Create a release, run from the relevant branch.
To create a new release, run:gitcheckoutmain
gitpull
release-it# Follow the instructions
Package: red-helper
red-helperRedis缓存工具red-cache的 asyncio 版本.安装$pipinstallred-helper示例初始化importred_helperred_helper.new("redis://redis:6379",db=0)或:fromred_helperimportRedHelperfromaredisimportStrictRedisredis=StrictRedis(**{})helper=RedHelper(redis)一般操作importred_helperimportasynciohelper=red_helper.new("redis://redis",db=0)asyncdefsimple_operations():# 设置awaithelper.set("hello","world",ex=180)# 查询字段print(awaithelper.get("hello",default_value="WORLD!"))# 删除字段awaithelper.delete("hello")if__name__=='__main__':asyncio.get_event_loop().run_until_complete(simple_operations())Hashimportasyncioimportred_helperhelper=red_helper.new("redis://redis",db=0)hs=helper.red_hash("red::hash")asyncdefsimple_operations():# 设置awaiths.set("hello","world",ex=180)# 查询字段print(awaiths.get("hello",default_value="WORLD!"))# 删除字段awaiths.delete("hello")if__name__=='__main__':asyncio.get_event_loop().run_until_complete(simple_operations())###缓存importasyncioimportred_helperhelper=red_helper.new("redis://redis",db=0)# 缓存函数返回值@helper.cache_it(lambdaasset_id:"asset::cache:key:{}".format(asset_id),ttl=180)asyncdefread_data(asset_id:int)->dict:awaitasyncio.sleep(0.1)returndict(zip(range(10),range(10)))# 删除缓存@helper.remove_it(lambdaasset_id:"asset::cache:key:{}".format(asset_id),by_return=True)asyncdefupdate_date(asset_id:int)->int:awaitasyncio.sleep(0.1)returnasset_idasyncdefmain():awaitread_data(10)awaitupdate_date(10)if__name__=='__main__':asyncio.get_event_loop().run_until_complete(main())基于HASH的缓存importasyncioimportred_helperhelper=red_helper.new("redis://redis",db=0)hs=helper.red_hash("red::hash")# 缓存函数返回值@hs.cache_it(lambdaasset_id:"asset::cache:key:{}".format(asset_id),ttl=180)asyncdefread_data(asset_id:int)->dict:awaitasyncio.sleep(0.1)returndict(zip(range(10),range(10)))# 删除缓存@hs.remove_it(lambdaasset_id:"asset::cache:key:{}".format(asset_id),by_return=True)asyncdefupdate_date(asset_id:int)->int:awaitasyncio.sleep(0.1)returnasset_idasyncdefmain():awaitread_data(10)awaitupdate_date(10)if__name__=='__main__':asyncio.get_event_loop().run_until_complete(main())author:Memory_Leak
Package: redi
[![10.5281/zenodo.47793](https://zenodo.org/badge/4064/ctsit/redi.svg)](http://ufl.to/ctsit)
[![Travis CI](https://api.travis-ci.org/ctsit/redi.svg?branch=master)](https://api.travis-ci.org/ctsit/redi.svg?branch=master)
[![PyPI version](https://badge.fury.io/py/redi.svg)](https://badge.fury.io/py/redi)
[![Coverage Status Develop](https://coveralls.io/repos/ctsit/redi/badge.svg?branch=master)](https://coveralls.io/r/ctsit/redi?branch=master)IntroductionThe REDCap Electronic Data Importer (RED-I) is a tool which is used to
automate the process of loading clinical data from Electronic Medical
Records (EMR) systems into [REDCap](http://www.project-redcap.org/)
Study data capture systems. RED-I is a general purpose tool for REDCap
data importing suitable for use on any study in any REDCap system. It
uses XML lookups to translate data stored in comma separated values
(CSV) files and uploads it to a REDCAP Server using the REDCap API. The
tool allows study data to be securely uploaded from clinical reporting
systems, error checked, and uploaded into REDCap. It provides the
investigator with feedback on upload success in the form of summary
reporting of the data upload process.You can view a presentation of the RED-I tool in action on
[youtube](https://www.youtube.com/watch?v=0x04y5SNPL8&feature=youtu.be).For the official documentation please refer to
[http://redi.readthedocs.io](http://redi.readthedocs.io) or
[RED-I Project](https://github.com/ctsit/redi/blob/master/docs/about.rst).
Package: redial
redialredial is a simple shell application that manages your SSH sessions on Unix terminal.What's New0.7 (19.12.2019)Basic support for adding ssh keys to connectionsDynamic, Local and Remote port forwarding settings (only one of each can be defined for now)UI state is restored at startup. Redial now remembers last selected connection and folder expanded/collapsed statesInstallationRequirementsPython 3 or later to run redial.mc (Midnight Commander)to useF5 (Browse)feature.Stable VersionInstalling via pipWe recommend installing redial via pip:pip3installredialLatest VersionInstalling from GitYou can install the latest version from Git:pip3installgit+https://github.com/taypo/redial.gitDockerDockerfileis provided.Build Dockerfile:dockerbuild-tredial.Run redial in Docker Containerdockerrun-it--rmredial:latestredialFeaturesManage your connections in folders/groupsOpen a file manager to your remote host (Midnight Commander should be installed)Edit/Move/Delete connectionCopy SSH Key to remote hostMore features coming soon..Connect to SSH Session (ENTER)PressENTERto connect a SSH session.Add Folder (F6)PressF6or clickF6 New Folderto add a folder. There must be at least
one connection under the folder.Add Connection (F7)PressF7or clickF7 New Conn.to add a ssh connection.Browse over mc (F5)PressF5or clickF5 Browseto open mc (Midnight Commander) session.Remove Connection (F8)PressF8or clickF8 Removeto remove a session.Edit Connection (F9)PressF9or clickF9 Editto edit a session.Move sessions and foldersPressCTRLandup/downkeys to move session or folder.For macOS users:UseALTandup/downkeys.NotesConfiguration file is stored in~/.config/redial/sessions. File format
is same as theSSH configfile. Configuration file can be included in
SSH config file with the following way (Make sure that~/.ssh/configfile exists):sed-i-e'1iInclude ~/.config/redial/sessions'~/.ssh/configPlatformsLinuxmacOSWindows is currently not supported.Licenseredial is licensed under theGNU General Public License v3.0.
Package: redicts
A utility package to save arbitrary nested Python dicts and objects in Redis.UsageThis package can be used to save arbitrary values in a hierarchy. Each element
of this hierarchy is referenced by a dotted path like this:a.b.c. When
saving a nested dictionary, its nested contents automatically get translated
to such a dotted path by its string keys:# `23` can be read by specifying the path "a.b.c":{"a":{"b":{"c":23}}}A special feature of this package is concurrent access: It can be safely used
from more than one process. The locking implementation is also separated and
can be used on its own if desirable. Also, the implementation is clever enough
to not require a global lock if changes are done in different parts of the
hierarchy.You can store every object inredictsthat works withjson.dumps().Why?We useredisquite a lot in our day-to-day work and often want to share
values between different (micro-)services. This package helps us to do that
safely and easily.DocumentationDocumentation can be found on ReadTheDocs:http://redicts.readthedocs.io/en/latestExampleIf redis is started with default host/port/password, this should work:>>>fromredictsimportsection>>>withsection("a.b.c")assec:...#  Setting values:...sec["my-value"]=42...sec["my-part"]={"key":"value"}......# Reading values:...sec["my-value"].val()# => 42...sec["my-part.key"].val()# => "value"
Package: redid_tools
The Redid CLI tools provide a simple way to work with the Redid service.pip install redid_toolsAfter install you will need to configure the tools. This simply sets the
account information needed to connect to Redid.redid setupYou can check that your credentials are correct by running thecheck-authcommand.redid check-authredidredidoffers a command line interface to much of the REST API. Useredid--helpto see a list of options and commands.redid-syncredid-syncsynchronizes a local directory to a remote Redid path.
This is a relatively quick and simple way to store resources.redid-sync local/path/ remote/prefix/The files fromlocal/path/will be uploaded as resources toremote/prefix/. For example, a file namedlocal/path/sunset.jpgwill be uploaded to the resource namedremote/prefix/sunsetwitha
content-type ofimage/jpeg.The synchronization tool does not upload a file if the binary hash
matches the one already on the server. This makes it relatively quick to
make small changes and rerun synchronization. If you however need to
upload the same file a lot for testing, you might wish to useredidupload-resourceinstead.redid-syncalways has to list the
remote resources first, which could be a bit slow for repeated quick
use.Files starting with a.are not uploaded.The local path will be recursively scanned and the entire tree uploaded..redid.yamlYou can control the behaviour of synchronization with the.redid.yamlfile, located in the root of your local synchronization
folder. For example,local/path/.redid.yaml.remote_delete_missingBy defaultredid-syncwill not delete remote resources that do not
exist locally. This is a safety feature to prevent accidental deletion.
To enable remote delete set theremote_delete_missingoption to
True:remote_delete_missing: Trueext_mapThe file type of a local file will be guessed (using Python’smimetypesmodule, and a few extra rules). If you have special files
that should be uploaded with a different content-type you can use theext_mapentry. This is a map of extension to content-type.ext_map:
    ".bin": image/x-private-binary
    ".xpng": image/pingTo get the resource name of a resource this extension will be dropped.
For exampledocument.binwill be uploaded as resourcedocumentwith the content-typeimage/x-private-binary.Just let us know if you need any other mapping features.ConfigurationBy default the CLI uses the configuration file~/.redid.yaml. This
can be overridden with the--configoption. Or you can specify theREDID_CONFIG_FILEenvironment variable.Forls-resourcestheREDID_LS_RESOURCES_COLScan be used to
specify the--colssetting.
Package: redirbot
Redirecting IRCBotThe bot will connect to an IRC server and whenever a message is sent to him, he
will respond with “The user you are trying to reach is known under nickname
<yournickname>”Example config at redirbot/data/config/InstallationopenSUSEAvailable atOpenSUSE buildservice.Gentoo# emerge redirbototherspython setup.py installSupportGithub issues or highlight me in#yacdev@freenode
Package: redirect-chain
redirect-chainA simple cli tool to see the history of redirects of a URL.
Sample output:▶redirect-chainhttps://developer.mozilla.org/learn/html0https://developer.mozilla.org/learn/html3011>https://developer.mozilla.org/Learn/HTML3022>>https://developer.mozilla.org/docs/Learn/HTML3023>>>https://developer.mozilla.org/en-US/docs/Learn/HTML200Installationpipxinstallredirect-chain
redirect-chainhttp://www.peterbe.com/oc-LicenseMIT