Saravanan666/pypi-org huggingface dataset:
Package: redbox2
Red Box: Advanced Email Box ReaderNext generation email box reader/managerDocumentationSource codeReleasesWhat is it?Red Box is an advanced email box reader library. It is a sister library forRed Mail, advanced email sender. It makes managing your email box in Python very easy.Core features:Easy email searchingIntuitive message manipulationIntuitive email box manipulationInstall it from PyPI:pipinstallredboxWhy Red Box?Imaplib from standard library is complex to use and unintuitive.
Red Box makes reading email boxes easy.With Red Box, it is simple as this:fromredboximportEmailBox# Create an email box instancebox=EmailBox(host="localhost",port=0)# Select an email folderinbox=box['INBOX']# Get emailsemails=inbox.search(from_="mikael.koli@example.com",subject="Red Box released",unseen=True)More ExamplesThere is also a query language for arbitrary search queries:fromredbox.queryimportFROM,UNSEEN,FLAGGEDemails=inbox.search(FROM('mikael.koli@example.com')&(UNSEEN|FLAGGED))Red Box also makes reading different parts of the email messages
easy:# Get one emailemail=emails[0]# String representation of the messageprint(email.content)# Email contentsprint(email.text_body)print(email.html_body)# Email headersprint(email.from_)print(email.to)print(email.date)Here is a complete example:fromredboximportEmailBoxbox=EmailBox(host="localhost",port=0)inbox=box['INBOX']formsgininbox.search(subject="example 2",unseen=True):# Process the messageprint(msg.subject)print(msg.text_body)# Set the message as read/seenmsg.read()See more from the documentation.If the library helped you save time, consider buying a coffee for the maintainer ☕.AuthorMikael Koli-Miksus-koli.mikael@gmail.com
Package: redbrick-sagemaker
redbrick-sagemakerThis package is an integration between RedBrick AI and AWS sagemaker to allow end-to-end Active Learning on computer vision datasets.The objective of Active Learning is to label your data in order of information gain to your model. Following this strategy can drastically reduce the amount of data you have to label by only labeling those images that help your model improve.This package will help you run a full end-to-end process where you will be able to iteratively label your dataset and train your model in true Active Learning fashion.SetupInstall the redbrick_sagemaker packagepipinstallredbrick_sagemakerCreate an s3 bucketYou will need to create an s3 bucket where your training and model files will get stored. Please followthis tutorialto create an s3 bucket through the CLI, SDK or AWS console.NOTE:Create your bucket with thesagemakerpart of the name, so that you can conditionally give it access. For example -redbrick-sagemaker-bucket.Create sagemaker roleNOTE:We reccommend you run theredbrick_sagemakerpackage within a Sagemaker Notebook instance. If you do this, you won't have to create a Sagemaker Execution Role.If you're runningredbrick_sagemakeroutside of a Sagemaker Notebook, you need to create a Sagemaker Execution role to allow sagemaker to perform operations on your behalf. Please seethis tutorialfor creating aAmazonSageMakerFullAccessrole. After creating the role,make a note of the ARN.UseStandard RedBrick AI set up:api_key="TODO"org_id="TODO"project_id="TOOD"# The bucket where sagemaker will read/write predictions and training input/outputs.s3_bucket_name="TODO"s3_bucket_prefix="TODO"# OPTIONAL: Add the sagemaker execution role you created here.# only required if you are running redbrick_sagemaker outside of an AWS sagemaker notebook instance.# If runnning inside a sagemaker notebook, set role=Nonerole="TODO"Create a RedBrick AI Active Learning object:importredbrick_sagemakeractive_learner=redbrick_sagemaker.ActiveLearner(api_key,org_id,project_id,s3_bucket=bucket,s3_bucket_prefix=bucket_prefix,iam_role=role)Begin an Active Learning cycle. Running this for the first time will start a hyperparameter optimization job to train your model.active_learner.run()Check on the status of your hyperparameter job.active_learner.describe()You can have a detailed view on the progress of your hyperparameter tuning job on yourAWS console.Sagemaker AWS console.Once your hyperparameter job is complete, you can re-run to perform inference and update Active Learning priorities.active_learning.run()If your hyperparameter job is still processing, but there is a model job that has completed, you can force run an inference.active_learning.run(force_run=True)If you want to run training, and inference in one go synchronously, you can simply do:active_learning.run(wait=True)Please see the flowchart below for an explanation of the different states and flows.RedBrick Sagemaker active learning flow.
Package: redbrick-sdk
This is an SDK to make integration with the RedBrick AI platform as easy as possible. This includes uploading and downloading data
as well as making your datasets easily available for training. Use this SDK to access your data and labels anywhere you run your code, whether that is on the cloud or locally with a Jupyter Notebook.Please feel free to submit issues on github or atsupport@redbrickai.comif you run into any problems or have suggestions.Visitdocsfor tutorials on how to use this library.
Package: redbuild
redbuildmagic containerized buildsoverviewredbuild enables software to be built in pre-defined environments using the power of containerization. withpodmaninstalled, any supported project can be built with a single command. projects provide abuild.dockerandbuild.shfor defining the build environment and build steps.redbuild: just add water!install stable version from pypi# with pipx (recommended)pipxinstallredbuild# with vanilla pippipinstallredbuildbuild from sourceTo build redbuild2, we will use the redbuild1 shell script to bootstrap the build environment and build redbuild2../bootstrap/redbuild.shthis will output./redbuild.binwhich you can symlink to one of your$PATHdirectories.Here is a suggested setup:mkdir-p~/.bin
ln-s$(pwd)/redbuild.bin~/.bin/redbuildNow, you can runredbuildfrom anywhere!try the example!cdexample
redbuildbuilddetailed usagecreating the build environment and build scriptcreate abuild.dockerfile in the project root. this file should contain aFROMdirective for the base image to use for the build environment. the build environment should contain all the tools necessary to build the project.
it's also very important that the last line of the dockerfile isCMD ["/bin/bash", "-l"]. this is necessary for redbuild to work.an examplebuild.docker:FROMdebian:bookworm-slim# install dependenciesRUNapt-getupdate&&apt-getinstall-y\bash\curlwgetxz-utils\gccmakelibc6-devlibcurl4\gitlibxml2\&&rm-rf/var/lib/apt/lists/*&&aptautoremove-y&&aptclean# install dlangRUNcurl-fsShttps://dlang.org/install.sh|bash-sinstallldc-1.30.0\&&echo"source ~/dlang/ldc-1.30.0/activate">>~/.bashrc# set up main to run bash (necessary for redbuild)CMD["/bin/bash","-l"]create abuild.shfile in the project root. this file should contain the steps necessary to build the project. the build script should be written to be run in the build environment.build.sh:#!/bin/bashdubbuild--compilerldc2-Breleasethat's it! now you can build the project withredbuild build, copy it into the project root, and run it. you can also open an interactive shell in the build environment withredbuild shell.
Package: red-cache
red_cache介绍基于Redis实现的Python缓存工具示例安装方法$pipinstallred-cache缓存函数执行结果@redis_cache.pickle_cache(key=lambdav,t:"cache:{}:{}".format(v,t),ex=180)defhell_world(val:str,times:int):returnval*times保存JSON缓存数据@redis_cache.json_cache(key=lambdav,t:"cache:{}:{}".format(v,t),ex=180)defhell_world(val:str,times:int):return{"val":val,"times":times}缓存的属性classDemo:defload_xxx(self):returnxxx=redis_cache.property(key=lambda:"Demo::xxx",ex=10)(lambdaself:self.load_xxx())删除缓存@redis_cache.remove(lambdao:"auth::user:{}".format(o))defmodify_user(user_id):# DO MODIFY USERpass使用返回值@redis_cache.remove(lambdao:"auth::user:{}".format(o),by_return=True)defmodify_user(user_id):# DO MODIFY USERreturn"*********"使用生成器@redis_cache.remove(lambdao:"auth::user:{}".format(o),by_return=True)defmodify_users(users):# modify usersforuinusers:yieldu基于Redis的分布式锁@red_cache.red_lock(lambdauid,**kwargs:"red::lock:{}".format(uid),ttl=100000,retry_times=10,retry_delay=200)defmodify_user(uid:str,**kwargs):# DO MODIFY USERpass临时令牌工具importuuidfromred_cacheimportRedisCache,CachedTokenred_cache=RedisCache(dict(host='10.0.0.11',db=9))# 声明 Token令牌类，集成CachedTokenclassToken(CachedToken,metaclass=red_cache.token_meta):# 使用metaclass时可自动注入RedisCache对象到当前类对象# 使用类属性`red_cache`指定绑定的RedisCache亦可def__init__(self,token:str,username:str):super().__init__()self.token=tokenself.username=username# 使用cache_key_prefix指定缓存名称前缀cache_key_prefix=property(lambdaself:self.__class__.__name__)# id 即当前令牌对象唯一值@propertydefid(self):returnself.token# 返回字典，CachedToken使用标准库的json包序列化该字典作为对应缓存的值defmarshal(self)->dict:returndict(token=self.token,username=self.username)@classmethoddefnew(cls,username:str):returncls(token=uuid.uuid1().hex,username=username)if__name__=='__main__':tk=Token.new('/**/').save()# 使用ID读取令牌tk=Token.read(tk.token)# 刷新，即强制写入令牌到Redistk.flush()# 删除令牌tk.remove()计数器工具fromred_cacheimportRedisCachered_cache=RedisCache(dict(host='10.0.0.11'))classA:# 自增计数器counter=red_cache.counter("resource::a",3,init=lambda:20*20)# 自减计数器desc=red_cache.counter("resource:desc",-2)# 基于HASH的自增计数器score=red_cache.hash_counter("score","a",1,init=lambda:20+1)def__init__(self):self._sign=red_cache.counter("{}::sign:{}".format(self.__class__.__name__,id(self)))# 使用属性sign=property(lambdaself:self._sign.get())@author:Memory_Leak
Package: redcapy
redcapyLibrary for accessing RedCap API from PythonInstallationInstall the package with pip directly with:pip install redcapyImplemented functionalitiesGet data from APIBy now the implemented functionalities are for obtaining data from the REDCAP server, no API calls related with saving new data data or deleting data has been implemented. Available API calls are:importredcapyimportdatetimeredcap_handler=redcapy.request.APIHandler(api_url=api_url,token=token)metadata=redcap_handler.get_metadata()redcap_version=redcap_handler.get_redcap_version()users=redcap_handler.get_users()arms=redcap_handler.get_arms()events=redcap_handler.get_events()field_names=redcap_handler.get_field_names()file=redcap_handler.get_file(record=1)form_event_mapping=redcap_handler.get_form_event_mapping()instruments_pdf=redcap_handler.get_instruments_pdf(output_file="./instruments.pdf")instruments=redcap_handler.get_instruments()project=redcap_handler.get_project_info()report=redcap_handler.get_reports(1)participant_list=redcap_handler.get_participant_list(instrument=instruments[-1]['instrument_name'])records=redcap_handler.get_records()date_range_begin=datetime.datetime.strptime("2019-10-10","%Y-%m-%d")date_range_end=datetime.datetime.strptime("2019-12-10","%Y-%m-%d")records=redcap_handler.get_records(date_range_begin=date_range_begin,date_range_end=date_range_end)
Package: redcat
redcatPhilosophyBatchedTensorandBatchedTensorSeqmust behave liketorch.TensorBatchedArrayandBatchedArraySeqmust behave likenumpy.ndarrayBatchedTensor(resp.BatchedTensorSeq) does not have to behave likeBatchedArray(
resp.BatchedArraySeq)InstallationWe highly recommend installing
avirtual environment.redcatcan be installed from pip using the following command:pipinstallredcatTo make the package as slim as possible, only the minimal packages required to useredcatare
installed.
To include all the dependencies, you can use the following command:pipinstallredcat[all]Please check theget started pageto see how to
install only some specific dependencies or other alternatives to install the library.
The following is the correspondingredcatversions and supported Python, PyTorch and NumPy
versions.redcatcoolanumpytorchpythonmain>=0.0.20,<0.2>=1.22,<2.0>=1.11,<3.0>=3.9,<3.120.0.17>=0.0.20,<0.0.25>=1.22,<1.27>=1.11,<2.2>=3.9,<3.120.0.16>=0.0.20,<0.0.24>=1.22,<1.27>=1.11,<2.1>=3.9,<3.120.0.15>=0.0.20,<0.0.24>=1.22,<1.27>=1.11,<2.1>=3.9,<3.120.0.14>=0.0.20,<0.0.24>=1.22,<1.27>=1.11,<2.1>=3.9,<3.120.0.13>=0.0.20,<0.0.24>=1.22,<1.27>=1.11,<2.1>=3.9,<3.12older versionsredcatcoolanumpytorchpython0.0.12>=0.0.20,<0.0.24>=1.22,<1.27>=1.11,<2.1>=3.9,<3.120.0.11>=0.0.20,<0.0.24>=1.22,<1.27>=1.11,<2.1>=3.9,<3.120.0.10>=0.0.20,<0.0.24>=1.22,<1.27>=1.11,<2.1>=3.9,<3.120.0.9>=0.0.20,<0.0.24>=1.22,<1.27>=1.11,<2.1>=3.9,<3.120.0.8>=0.0.20,<0.0.21>=1.21,<1.26>=1.11,<2.1>=3.9,<3.12ContributingPlease check the instructions inCONTRIBUTING.md.API stability:warning: Whileredcatis in development stage, no API is guaranteed to be stable from one
release to the next.
In fact, it is very likely that the API will change multiple times before a stable 1.0.0 release.
In practice, this means that upgradingredcatto a new version will possibly break any code that
was using the old version ofredcat.Licenseredcatis licensed under BSD 3-Clause "New" or "Revised" license available inLICENSEfile.The logo was generated withFooocus
Package: redcipher
What is RedCipher ?command line utility help users encrypt messages or files with simple commandsOverview:Guide:UsageSettingsInstallationContributorsInstallationmake sure python is installed on your systempip3 install redcipherSettings:settings file are created once the program run for the frist time.if the settings file not found the program will load the default settings insrc/handle_json.pyfile and rewrite the settings in this path{user-home}/.RedCipher/settings.json.let's say if you have already installed the program and have settings in the path the program will load the settings and won't rewrite it again.{"settings":{"extension":".redc","keySize":3072,"salt":"s%piyAc7MhDN*qAS)}YrrXb.A9_&t!","useSalt":true,"encryptFileName":false}}extensionobject store the encrypted file extensionkeySizedefault size of bits for RSA keys generationsaltstores the salt for salting AES key and secure it ( you can change it ! )useSaltstores boolean value to decide if the program use salt or nofalsetells the program don't use salttrueuse the saltencryptFileNameobject store boolean value to decide if program encrypt file name or notfalsewill not encrypt file nametrueit will encrypt itspecial thanks to:Zaky202- for fixing color issue on windowsgreedalbadi- resort classes and file imports
Package: redcmd
A simple library to handle command line of an application with support for subcommands, as well as, automatic help text extraction from doc strings.Supported platformspython 2.7 / 3.4Linux / WindowsFeaturesDecorator as well as subclass based command addition.Custom help text formatter which improves upon the rather lousy default formatter.Automatic help text extraction from doc strings.Autocomplete support (Linux only).UsageA simple case of just the main command (without any subcommands):from redcmd.api import maincmd, execute_commandline

@maincmd
def main(a, b):
        '''Add two numbers.
        a:      first number
        b:      second number

        This is where extra help text goes.
        It can be more than one line.'''

        try:
                print('sum: %d'%(int(a) + int(b)))
        except ValueError:
                print('bad integer')
                raise CommandError()

execute_commandline()See examples directory in code for decorator and subclass based command handling.
[https://github.com/amol9/redcmd/tree/master/examples]DownloadPyPI:http://pypi.python.org/pypi/redcmdSource:https://github.com/amol9/redcmd
Package: red-connector-ftp
RED Connector FTPRED Connector FTP is part of the Curious Containers project.For more information please refer to the Curious Containersdocumentation.AcknowledgementsThe Curious Containers software is developed atCBMI(HTW Berlin - University of Applied Sciences). The work is supported by the German Federal Ministry of Economic Affairs and Energy (ZIM project BeCRF, grant number KF3470401BZ4), the German Federal Ministry of Education and Research (project deep.TEACHING, grant number 01IS17056 and project deep.HEALTH, grant number 13FH770IX6) and HTW Berlin Booster.
Package: red-connector-http
RED Connector HTTPRED Connector HTTP is part of the Curious Containers project.For more information please refer to the Curious Containersdocumentation.AcknowledgementsThe Curious Containers software is developed atCBMI(HTW Berlin - University of Applied Sciences). The work is supported by the German Federal Ministry of Economic Affairs and Energy (ZIM project BeCRF, grant number KF3470401BZ4), the German Federal Ministry of Education and Research (project deep.TEACHING, grant number 01IS17056 and project deep.HEALTH, grant number 13FH770IX6) and HTW Berlin Booster.
Package: red-connector-httpdirfs
RED Connector HTTPDIRFSRED Connector HTTPDIRFS is part of the Curious Containers project.For more information please refer to the Curious Containersdocumentation.AcknowledgementsThe Curious Containers software is developed atCBMI(HTW Berlin - University of Applied Sciences). The work is supported by the German Federal Ministry of Economic Affairs and Energy (ZIM project BeCRF, grant number KF3470401BZ4), the German Federal Ministry of Education and Research (project deep.TEACHING, grant number 01IS17056 and project deep.HEALTH, grant number 13FH770IX6) and HTW Berlin Booster.
Package: red-connector-semcon
RED Connector SemconRED Connector Semcon is part of the Curious Containers project.This connector is designed to read data from asemantic container.For more information please refer to the Curious Containersdocumentation.Limitations / Future WorkSelections within the content of a data entry are partially supported in json format. For any other format this is currently not possible.AcknowledgementsThe Curious Containers software is developed atCBMI(HTW Berlin - University of Applied Sciences). The work is supported by the German Federal Ministry of Economic Affairs and Energy (ZIM project BeCRF, grant number KF3470401BZ4), the German Federal Ministry of Education and Research (project deep.TEACHING, grant number 01IS17056 and project deep.HEALTH, grant number 13FH770IX6) and HTW Berlin Booster.
Package: red-connector-ssh
RED Connector SSHRED Connector SSH is part of the Curious Containers project.For more information please refer to the Curious Containersdocumentation.AcknowledgementsThe Curious Containers software is developed atCBMI(HTW Berlin - University of Applied Sciences). The work is supported by the German Federal Ministry of Economic Affairs and Energy (ZIM project BeCRF, grant number KF3470401BZ4), the German Federal Ministry of Education and Research (project deep.TEACHING, grant number 01IS17056 and project deep.HEALTH, grant number 13FH770IX6) and HTW Berlin Booster.
Package: red-connector-sshfs
RED Connector SSHFSRED Connector SSHFS is part of the Curious Containers project.For more information please refer to the Curious Containersdocumentation.AcknowledgementsThe Curious Containers software is developed atCBMI(HTW Berlin - University of Applied Sciences). The work is supported by the German Federal Ministry of Economic Affairs and Energy (ZIM project BeCRF, grant number KF3470401BZ4), the German Federal Ministry of Education and Research (project deep.TEACHING, grant number 01IS17056 and project deep.HEALTH, grant number 13FH770IX6) and HTW Berlin Booster.
Package: red-connector-xnat
RED Connector XNATRED Connector XNAT is part of the Curious Containers project.For more information please refer to the Curious Containersdocumentation.AcknowledgementsThe Curious Containers software is developed atCBMI(HTW Berlin - University of Applied Sciences). The work is supported by the German Federal Ministry of Economic Affairs and Energy (ZIM project BeCRF, grant number KF3470401BZ4), the German Federal Ministry of Education and Research (project deep.TEACHING, grant number 01IS17056 and project deep.HEALTH, grant number 13FH770IX6) and HTW Berlin Booster.
Package: redcord.py
A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python.Why fork discord.py?The development of discord.py library has been ceased by its core (and sole) maintainer - Danny.
Please readDanny’s gistfor the full write-up on how we got to this point.
Thank you, Danny. Thank you for all the amazing work you’ve done for this community.Key FeaturesModern Pythonic API usingasyncandawait.Proper rate limit handling.100% coverage of the supported Discord API.Optimised in both speed and memory.InstallingPython 3.5.3 or higher is requiredTo install the library without full voice support, you can just run the following command:# Linux/macOSpython3-mpipinstall-Uredcord.py# Windowspy-3-mpipinstall-Uredcord.pyOtherwise to get voice support you should run the following command:# Linux/macOSpython3-mpipinstall-U"redcord.py[voice]"# Windowspy-3-mpipinstall-Uredcord.py[voice]To install the development version, do the following:$gitclonehttps://github.com/Cog-Creators/redcord.py$cdredcord.py$python3-mpipinstall-U.[voice]Optional PackagesPyNaCl (for voice support)Please note that on Linux installing voice you must install the following packages via your favourite package manager (e.g.apt,dnf, etc) before running the above commands:libffi-dev (orlibffi-develon some systems)python-dev (e.g.python3.6-devfor Python 3.6)Quick ExampleimportdiscordclassMyClient(discord.Client):asyncdefon_ready(self):print('Logged on as',self.user)asyncdefon_message(self,message):# don't respond to ourselvesifmessage.author==self.user:returnifmessage.content=='ping':awaitmessage.channel.send('pong')client=MyClient()client.run('token')Bot Exampleimportdiscordfromdiscord.extimportcommandsbot=commands.Bot(command_prefix='>')@bot.command()asyncdefping(ctx):awaitctx.send('pong')bot.run('token')You can find more examples in the examples directory.LinksDocumentationOfficial Discord ServerDiscord API
Package: redcross
redcross: Reduction and Cross-correlation of High-Resolution spectroscopy for exoplanet atmospheresThis repository contains a set of utilities to work with high-resolution order-by-order spectra, in particularRead and visualise time-series spectroscopyDefine a reduction routine (normalise, remove continuum, SysRem, masking, ...)Cross-correlation: Compute the CCF function for a given atmospheric templateVisualise the results in different reference frames and generate Kp-V_sys mapThis package is intended to work with any instrument provided a datacube with the following data:Wave vector (for each order)Flux matrix (for each order and each frame)Flux error matrix (optional, same shape as Flux)The main objectDatacubecan be directly manipulated using attribute functions e.g. datacube.function(), which already applies the changes to the current
datacube. By passing anplt.axes()object it automatically shows the new datacube.