Saravanan666/pypi-org huggingface dataset:
Package: redashsync
redashsyncis a tool integrating Redash with Slack. It gets data from Redash and send it to Slack channel.Installpip install redashsyncHow to get necessary keysRedash API Key and Query IDClickShow API Keyand You would get below address.http://localhost/api/queries/2/results.json?api_key=2CHjsILfC3fD4Q8nJU7IejS2CuRtKG8lKztY1HOkYour API Key : 2CHjsILfC3fD4Q8nJU7IejS2CuRtKG8lKztY1HOkYour Query ID : 2Slack Bot Token and Settinghttps://api.slack.com/appsCreate New App.Get Your Bot Token.Add an OAuth Scope. 1) chat:write 2) files:writeInvite your slack bot.Your YAMLFollow the format below to complete your yaml file.# ./resource/sample.ymlslack_configs:slack:token:<YOUR_SLACK_BOT_TOKEN># "xoxb-***-***-***"username:<YOUR_USER_NAME># "redash-echo"redash_configs:url:<YOUR_HOST># "http://localhost"user_email:<YOUR_EMAIL># "myname@example.com"query_api_key:<YOUR_QUERY_API_KEY># "2CHjsILfC3fD4Q8nJU7IejS2CuRtKG8lKztY1HOk"UseSend messages regularlyfromredashsync.redash.dataimportRedashfromredashsync.slack.messagesimportSlackfromredashsync.config.yamlimportConfigfromdatetimeimportdatetimefromcron_converterimportCronconfig=Config("./resource/sample.yml")redashHost=config.getRedashHost()redashQueryKey=config.getQueryApiKey()redashQueryId=config.getQueryId()slackBotToken=config.getSlackBotToken()redash=Redash(redashHost)slack=Slack(slackBotToken)cron=Cron()cron.from_string("*/1 * * * *")# Send every 1 minutereferenceTime=datetime.now()schedule=cron.schedule(referenceTime)expectedTime=schedule.next().isoformat()whileTrue:if(expectedTime==datetime.now().isoformat()[0:19]):print(expectedTime)expectedTime=schedule.next().isoformat()response=redash.getQueriesFromRedash(redashQueryId,redashQueryKey)result=redash.getColumnData(response,['Open','Close'])# result : [ [123, 456], [789, 987], ... ]template="*시가* :%s\n*종가* :%s\n"# 2 is inside array's length.result=redash.getMarkdown(template,result[0:5],2)# "#redash-echo" is channel name.slack.sendMessage("#redash-echo",result)Send a graph imagefromredashsync.redash.dataimportRedashfromredashsync.slack.messagesimportSlackfromredashsync.config.yamlimportConfigfromdatetimeimportdatetimefromcron_converterimportCronconfig=Config("./resource/sample.yml")redashHost=config.getRedashHost()redashQueryKey=config.getQueryApiKey()redashQueryId=config.getQueryId()slackBotToken=config.getSlackBotToken()redash=Redash(redashHost)slack=Slack(slackBotToken)# Histogramresponse=redash.getQueriesFromRedash(redashQueryId,redashQueryKey)result=redash.getColumnData(response,['Open','Close'])# If you want to name image one.png and locate it at ./resourceredash.visualizeHistplotAndSave(result,"./resource/one.png")slack.sendFile("./resource/one.png","#redash-echo","Title","comment")
Package: redash-toolbelt
redash-toolbelt - The official API client and utilities to manage a Redash instanceINSTALLATIONEXAMPLE SCRIPTSINSTALLATIONTo install it you will need Python 3.6 or above. We recommend that you use avirtual environment.pipinstall--upgraderedash-toolbeltThis command will updateredash-toolbeltif you have already installed it.EXAMPLE SCRIPTSWithredash-toolbeltinstalled you will have access to several example CLI scripts within your terminal.gdpr-scrub                  Search for a string term in  your Redash queries
                            and query results. The script returns a list of
                            URLs in your instance that contain references to
                            the search term you provide
find-tables                 Search the text of queries against a data source
                            to see which table names are used in queries of
                            that source. This script relies on regex that is
                            tested against ANSI SQL.
clone-dashboard-and-queries Completely duplicate a dashboard by copying all 
                            its queries and visualizations.
export-queries              Export all the queries of your Redash instance
                            as text files.
redash-migrate              Move data from one instance of Redash to another.
                            See docs/redash-migrate/README.md for more info
Package: re-data
What is re_data?re_data is an open-source data reliability framework for the modern data stack. 😊Currently, re_data focuses on observing the dbt project (together with the underlying data warehouse - Postgres, BigQuery, Snowflake and Redshift).Live demoCheck out ourlive demoof what re_data can do for you 😊Getting startedCheck our docs!📓 📓 📓Join re_data community on SlackSupportIf you like what we are building, support us! Star ⭐re_dataon Github.Licensere_data is licensed under the MIT license. See theLICENSEfile for licensing information.ContributingWe love all contributions :heart_eyes: bigger and smaller.Check out the current list of issueshereand see ourContributing Guide. Also, feel welcome to join ourSlackand suggest ideas or set up a live sessionhere.
Package: redataprocessing
redataprocessing: tool for requesting, decoding and storing real estate data from Sreality APIWhat is it?redataprocessingis a Python package that provides functions for requesting data on
real estate offers fromSrealityAPI based on few categories.
Moreover, it contains functions for decoding of requests intopandas DataFrameand their storage
toSQLite.Main FeaturesHere are few functionalities ofredataprocessing:Requesting of current real estate offers based on chosen parametersDecoding of requested jsons intopandas DataFrameFunctions for download of both list with offers and list with detailed description of downloaded offersAsynchronous requesting of description dataStorage of dataframes with offers and their description intoSQLitedatabaseWhere to get itThe source code is currently hosted on GitHub at:https://github.com/vojtechkaniaedu/re_data_processing/redadataprocessingBinary installers for the latest released version are available at thePython
Package Index (PyPI).# PyPIpipinstallredataprocessingInstallation from sourcesIn theredataprocessingdirectory (same one where you found this file after
cloning the git repo), execute:pythonsetup.pyinstallBackgroundWork onredataprocessingstarted as a university course project atInstitute of Economic Studiesin winter semester 2022/2023.Getting HelpFor usage questions, the best place to go to isStackOverflow.
Further, general questions could be send tovojtech.kania@gmail.com.All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome.
Package: redb
redbA simple, portable, high-performance, ACID, embedded key-value store.redb is written in pure Rust and is loosely inspired bylmdb. Data is stored in a collection
of mmap'ed, copy-on-write, B-trees. For more details, see thedesign docuseredb::{Database,Error,ReadableTable,TableDefinition};constTABLE:TableDefinition<str,u64>=TableDefinition::new("my_data");fnmain()->Result<(),Error>{letdb=unsafe{Database::create("my_db.redb",1024*1024)?};letwrite_txn=db.begin_write()?;{letmuttable=write_txn.open_table(TABLE)?;table.insert("my_key",&123)?;}write_txn.commit()?;letread_txn=db.begin_read()?;lettable=read_txn.open_table(TABLE)?;assert_eq!(table.get("my_key")?.unwrap(),123);Ok(())}Statusredb is undergoing active development, and should be considered beta quality. It may eat your data, and does not
have any guarantees of file format stability :)FeaturesZero-copy, thread-safe,BTreeMapbased APIFully ACID-compliant transactionsMVCC support for concurrent readers & writer, without blockingCrash-safe by defaultRoadmapThe following features are planned before the 1.0 releaseStable file formatUser-defined zero-copy typesBenchmarksredb is nearly as fast as lmdb, and faster than sled, on many benchmarks+--------------------+--------------+------------+--------+---------+---------+
|                    | redb (1PC+C) | redb (2PC) | lmdb   | rocksdb | sled    |
+=============================================================================+
| bulk load          | 1770ms       | 1370ms     | 976ms  | 5263ms  | 4534ms  |
|--------------------+--------------+------------+--------+---------+---------|
| individual writes  | 227ms        | 381ms      | 388ms  | 701ms   | 642ms   |
|--------------------+--------------+------------+--------+---------+---------|
| batch writes       | 2346ms       | 2533ms     | 2136ms | 992ms   | 1395ms  |
|--------------------+--------------+------------+--------+---------+---------|
| large writes       | 8805ms       | 6532ms     | 7793ms | 21475ms | 37736ms |
|--------------------+--------------+------------+--------+---------+---------|
| random reads       | 734ms        | 734ms      | 642ms  | 5814ms  | 1514ms  |
|--------------------+--------------+------------+--------+---------+---------|
| random range reads | 832ms        | 834ms      | 712ms  | 6074ms  | 1826ms  |
|--------------------+--------------+------------+--------+---------+---------|
| removals           | 1281ms       | 1149ms     | 676ms  | 2481ms  | 1792ms  |
+--------------------+--------------+------------+--------+---------+---------+LicenseLicensed under either ofApache License, Version 2.0MIT Licenseat your option.ContributionUnless you explicitly state otherwise, any contribution intentionally
submitted for inclusion in the work by you, as defined in the Apache-2.0
license, shall be dual licensed as above, without any additional terms or
conditions.
Package: redback
RedbackIntroducing REDBACK, a bayesian inference software package for fitting electromagnetic transientsOnline documentationInstallationExamplesDocumentationMotivation and why redback might be useful to you.The launch of new telescopes/surveys is leading to an explosion of transient observations.
Redback is a software package for end-to-end interpretation and parameter estimation of these transients.Download data for supernovae, tidal disruption events, gamma-ray burst afterglows, kilonovae, prompt emission from
different catalogs/telescopes; Swift, BATSE, Open access catalogs, FINK and LASAIR brokers.
Users can also provide their own data or use simulated dataRedback processes the data into a homogeneous transient object. Making it easy to plot lightcurves and do any other processing.The user can then fit one of the models implemented in redback. Or fit their own model. Models for several different types of electromagnetic transients are implemented and range from simple analytical models to numerical surrogates.All models are implemented as functions and can be used to simulate populations, without needing to provide data. This way redback can be used simply as a tool to simulate realistic populations, no need to actually fit anything.Simulate realistic transient lightcurves for Rubin LSST Survey using the latest cadence tables and for ZTF. Or make your own survey.
Simulate single transients or populations or simulate a full survey including non-detections and realistic cadences and noise.Redback usesBilbyunder the hood for sampling. Can easily switch samplers/likelihoods etc. By default the choice is made depending on the data.Fitting returns a homogenous result object, with functionality to plot fitted lightcurves and the posterior/evidence. Or importance sample etc.ContributingIf you are interested in contributing please join the redbackslackand emailNikhil Sarin.To make changes to redback, we require users to use a merge request system.
Package: redback-surrogates
Redback_surrogatesThis is an optional package built to be used viaRedbackor independently.
This package contains the data and methods to build/call surrogate models for EM transients using machine learning built on grids of numerical simulations.
If your aim is to just evaluate the models you could use this package independently but if you wish to simulate realistic transients or perform inference with these models, useRedbackRedbackIntroducing REDBACK, a bayesian inference software package for fitting electromagnetic transientsOnline documentation forRedback_surrogatesInstallationExamplesDocumentationOnline documentation forRedbackInstallationExamplesDocumentationMotivation and why redback might be useful to you.The launch of new telescopes/surveys is leading to an explosion of transient observations.
Redback is a software package for end-to-end interpretation and parameter estimation of these transients.Download data for supernovae, tidal disruption events, gamma-ray burst afterglows, kilonovae, prompt emission from
different catalogs/telescopes; Swift, BATSE, Open access catalogs. Users can also provide their own data or use simulated dataRedback processes the data into a homogeneous transient object, plotting lightcurves and doing other processing.The user can then fit one of the models implemented in redback. Or fit their own model. Models for several different types of electromagnetic transients are implemented and range from simple analytical models to numerical surrogates.All models are implemented as functions and can be used to simulate populations, without needing to provide data. This way redback can be used simply as a tool to simulate realistic populations, no need to actually fit anything.Bilbyunder the hood. Can easily switch samplers/likelihoods etc. By default the choice is made depending on the data.Fitting returns a homogenous result object, with functionality to plot lightcurves and the posterior/evidence etc.ContributingRedback is currently in alpha with a paper in preparation.
If you are interested in contributing please join the redbackslackand emailNikhil Sarin.
All contributors at the alpha stage will be invited to be co-authors of the first paper.To make changes to redback, we require users to use a merge request system.
Package: redbase
Red Base: Repository Patterns for PythonGeneric database implemetation for SQL, MongoDB and in-memory listsNOTE: Experimential.ExamplesclassPerson(BaseModel):id:strname:strage:intCreating>>>repo=Repository()# Add some items>>>repo.add(Person(id="11-11-11",name="Jack",age=30,language="English"))>>>repo.add(Person(id="22-22-22",name="John",age=33,language="English"))>>>repo.add(Person(id="33-33-33",name="James",age=36,language="English"))>>>repo.add(Person(id="44-44-44",name="Jaakko",age=40,language="Finnish"))Reading# Get an item>>>repo["11-11-11"]Person(id="11-11-11",name="Jack",age=30,language="English")>>># Filter items>>>repo.filter_by(language="English").all()[Person(id="11-11-11",name="Jack",age=30,language="English"),Person(id="22-22-22",name="John",age=33,language="English"),Person(id="33-33-33",name="James",age=36,language="English")]>>># Get first>>>repo.filter_by(language="English").first()Person(id="11-11-11",name="Jack",age=30,language="English")>>># Get last>>>repo.filter_by(language="English").last()Person(id="33-33-33",name="John",age=33,language="English")>>># Get first 2>>>repo.filter_by(language="English").limit(2)[Person(id="11-11-11",name="Jack",age=30,language="English"),Person(id="22-22-22",name="John",age=33,language="English")]>>># Use operations>>>fromredbase.operationsimportgreater_than>>>repo.filter_by(age=greater_than(35)).all()[Person(id="33-33-33",name="James",age=36,language="English"),Person(id="44-44-44",name="Jaakko",age=40,language="Finnish")]Updating>>># Update single item>>>person=repo["44-44-44"]>>>person.age=50>>>repo.update(person)>>># Update multiple items>>>repo.filter_by(language="English").update(age=35)Deleting>>># Delete single item>>>delrepo["44-44-44"]>>># Delete multiple items>>>repo.filter_by(language="English").delete()AuthorMikael Koli-Miksus-koli.mikael@gmail.com
Package: redbayes-higueros
Red de ByaesImplementación de Red de Bayes en python sin utilizar librerias externas.
Angel Higueros - 20460Ejemplo de usofromNodo,RedBayesimportredbayes_higuerps

defmain():cloudy=Nodo("Cloudy",[],{(True,):0.5,(False,):0.5})sprinkler=Nodo("Sprinkler",[cloudy],{(True,True):0.1,(True,False):0.5,(False,True):0.9,(False,False):0.5})rain=Nodo("Rain",[cloudy],{(True,True):0.8,(True,False):0.2,(False,True):0.2,(False,False):0.8})wet=Nodo("Wet grass",[rain,sprinkler],{(True,True,True):0.99,(True,True,False):0.9,(True,False,True):0.9,(True,False,False):0,(False,True,True):0.01,(False,True,False):0.1,(False,False,True):0.01,(False,False,False):1})red=RedBayesiana([cloudy,sprinkler,rain,wet])evidencias={"Sprinkler":True,"Cloudy":False,"Rain":True,"Wet grass":True}p_sintomas=red.calcular_probabilidad(evidencias)print("Probabilidad conjunta: ",p_sintomas)p_marginal=red.obtener_probabilidad_marginal(sprinkler,evidencias)print("Probabilidad marginal de sprinkler: ",p_marginal)p_condicional=red.obtener_probabilidad_condicional(wet,evidencias)print("Probabilidad condicional de Wet Grass dado Sprinkler: ",p_condicional)
Package: redbird
Repository Patterns for PythonGeneric database implemetation for SQL, MongoDB and in-memory listsRepository pattern is a technique to abstract the data access from
the domain/business logic. In other words, it decouples the database
access from the application code. The aim is that the code runs the
same regardless if the data is stored to an SQL database, NoSQL
database, file or even as an in-memory list.Read more about the repository patterns in theofficial documentation.Why?Repository pattern has several benefits over embedding the
database access to the application:Faster prototyping and developmentEasier to migrate the databaseMore readable code, PythonicUnit testing and testing in general is safer and easierFeaturesMain features:Support for Pydantic models for data validationIdentical way to create, read, update and delete (CRUD)Pythonic and simple syntaxSupport for more complex queries (greater than, not equal, less than etc.)Supported repositories:SQLMongoDBIn-memory (Python list)JSON filesCSV fileExamplesFirst, we create a simple repo:fromredbird.reposimportMemoryReporepo=MemoryRepo()Note: the following examples work on any repository, not just in-memory repository.Adding/creating items:repo.add({"name":"Anna","nationality":"British"})Reading items:repo.filter_by(name="Anna").all()Updating items:repo.filter_by(name="Anna").update(nationality="Finnish")Deleting items:repo.filter_by(name="Anna").delete()See more from theofficial documentation.AuthorMikael Koli-Miksus-koli.mikael@gmail.com
Package: redblackpy
RedBlackPy is a light Python library that provides data structures        aimed to fast insertion, removal and self sorting to manipulating ordered data in efficient way.       The core part of the library had been written on C++ and then was wrapped in Cython.        Hope that many would find the primary data structures of this library very handy in working        with time series. One of the main feature of this structures is an access by arbitrary        key using interpolation, what makes processing of multiple non synchronized time series very simple.       All data structures based on red black trees.
Package: redblacktree
Pure python3 implementation of a red black tree can be used as a set or a dictionary or both at the same time. It is tested and stable.
If you need any feature implemented or god forbid find a bug just open an issue onhttps://github.com/leryss/py-redblacktreeInstallationpip install redblacktreeExamples>>>fromredblacktreeimportrbtree# Can initialize using lists, dicts or other iterables>>>rbtree([1,2,3,4,5,6,7,8])>>>Depth=4┌───────────────4───────────────┐┌───────2───────┐┌───────6───────┐1357───┐8# You can store values with keys or not or both>>>rbtree([1,2,(3,'three'),4,5,(6,'six'),7,8])>>>Depth=4┌───────────────4───────────────┐┌───────2───────┐┌─────6:six─────┐13:three57───┐8# Insertingtree.insert(5)# Inserts a key with no valuetree[5]=None# Same as abovetree.insert(5,'five')tree[5]='five'# Removingtree.remove(5)deltree[5]# Queryx=tree[5]if5intree:print('5 is in the tree')# Slicing also supportedtree[5:10]# Returns (key, value) pairs of all keys >= 5 and <= 10tree[:5]# All (key, value) pairs for keys <= 5# Beware slicing with a step for example tree[1:100:-1] wont work# Simple iteration:fork,vintree:print(k,v)
Package: red-black-tree-mod
A pair of python modules implementing red black trees is provided.Red-black trees are a little slower than treaps (some question this), but they give a nice
low standard deviation in operation times, and this code is rather flexible.A module is provided for red black trees that enforce uniqueness.
They allow for set-like use and dictionary-like use.This code is known to work on CPython 2.x, CPython 3.x, Pypy and Jython.Much of the work here was done by Duncan G. Smith.  Dan just put some finishing touches on it.
Package: redbot
REDbotREDbot is lint for HTTP resources.It checks HTTP resources for feature support and common protocol problems. You can use the public
instance onhttps://redbot.org/, or you can install it locally and use it on the command line, or
even self-host your own Web checker.Contributing to REDbotYour ideas, questions and other contributions are most welcome. SeeCONTRIBUTING.mdfor details.Setting Up Your Own REDbotInstallationREDbot requiresPython3.9 or greater.The recommended method for installing REDbot is usingpipx. To install the latest release, do:pipx install redbotOr, to use the most development version of REDbot, run:pipx install git+https://github.com/mnot/redbot.gitBoth of these methods will install the following programs into yourpipx binary folder:redbot- the command-line interfaceredbot_daemon- Web interface as a standalone daemonRunning REDbot as a systemd ServiceREDbot can run as a standalone service, managed bysystemd. This offers a degree of sandboxing and resource management, as well as process monitoring (including a watchdog function).To do this, install REDbot on your system with thesystemdoption. For example:pipx install redbot[systemd]The copyextra/redbot.serviceinto the appropriate directory (on most systems,/etc/systemd/system/.)Modify the file appropriately; this is only a sample. Then, as root:>systemctlreload-daemon
>systemctlenableredbot
>systemctlstartredbotBy default, REDbot will listen on localhost port 8000. This can be adjusted inconfig.txt. Running REDbot behind a reverse proxy is recommended, if it is to be exposed to the Internet.If you want to allow people to save test results, create the directory referenced by the 'save_dir' configuration variable, and make sure that it's writable to the REDbot process.Running REDbot with DockerIf you wish to run REDbot usingDocker, get a local copy of the repository, then:make docker-imageStart the webserver:docker run -p 8000:8000 redbotOr, just:make dockerto run REDbot on port 8000.CreditsIcons byFont Awesome. REDbot includes code fromtippy.jsandprettify.js.
Package: redbox
Red Box: Advanced Email Box ReaderNext generation email box reader/managerWhat 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