Saravanan666/pypi-org huggingface dataset:
Package: reddcoin-electrum
Official Reddcoin Electrum Client - reference implementationLicence: GNU GPL v3Author: Thomas VoegtlinAuthor: Larry Ren (laudney) forked for ReddcoinLanguage: PythonHomepage:https://wallet.reddcoin.comGetting StartedCreate the iconspyrcc4 icons.qrc -o gui/qt/icons_rc.pyTo install the wallet and all its dependencies, just do:sudo python setup.py installIfsetup.pyfails with “ImportError: No module named setuptools”,
install python-setuptools and run setup.py againsudo apt-get install python-setuptools python-dev
sudo python setup.py installThen you can run it from any directory:reddcoin-electrumOr you can run it from the source code directory:./reddcoin-electrumInstall in a Virtualenv (advanced)This is a more advanced setup where you install the client not to your
system but only to it’s own private Python container. You can also do
this as a regular user, no need for root, except if you need to install
PyQt4 to the system (see below)Somewhere create a virtualenv and enter itvirtualenv electrum -p python2.7
source electrum/bin/activateInstall dependenciespip install ecdsa pbkdf2 requests pyasn1 pyasn1-modules qrcode tlslite numpy SocksiPy-branchPyQt4 is not available from pip and it is a PITA to build yourself
anyway, install it through your distribution and link it into the
virtualenv folder. Note that the system path of the libraries might be
different on your distribution.On Ubuntu:sudo apt-get install python-qt4On Gentoo:ln -s /usr/lib/python2.7/site-packages/sip* $VIRTUAL_ENV/lib/python2.7/site-packages/
ln -s /usr/lib/python2.7/site-packages/PyQt4 $VIRTUAL_ENV/lib/python2.7/site-packages/Create the iconspyrcc4 icons.qrc -o gui/qt/icons_rc.pyInstall Reddcoin Electrumpython setup.py installHow to Create Official PackagesOn Linux:python setup.py sdist --format=gztarOn Windows:export VERSION=2.0.0
pyinstaller windows.spec
zip -r dist/reddcoin-electrum-$VERSION-win.zip dist/reddcoin-electrum.exeOn Mac OS X:export VERSION=2.0.0
pyinstaller macosx.spec
sudo hdiutil create -fs HFS+ -volname "Reddcoin Electrum" -srcfolder "dist/Reddcoin Electrum.app" dist/reddcoin-electrum-$VERSION-mac.dmg
Package: reddcoin-electrum-server
Official Reddcoin Electrum ServerLicence: GNU GPL v3Author: Thomas Voegtlin (ThomasV on the bitcointalk forum)Author: Larry Ren (laudney) forked for ReddcoinLanguage: PythonHomepage:https://wallet.reddcoin.comFeaturesThe server indexes UTXOs by address, in a Patricia tree structure
described by Alan Reiner (see the ‘ultimate blockchain compression’
thread in the Bitcointalk forum)The server requires reddcoind, leveldb and plyvelThe server code is open source. Anyone can run a server, removing
single points of failure concerns.The server knows which set of Reddcoin addresses belong to the same
wallet, which might raise concerns about anonymity. However, it
should be possible to write clients capable of using several servers.InstallationTo install and run a server, see INSTALL. For greater detail on the
installation process, see HOWTO.md.To start and stop the server, use the ‘electrum-server’ scriptLicenseSource code is made available under the terms of theGNU Affero General
Public License, version 3.
See the includedLICENSEfor more details.
Package: reddcolors
ReddcolorsA very simple library for color management alongside jupyterthemes.OverviewReddcolors is a very simple tool for color management for working alongsidejupyterthemes.DependenciesThis code makes use of:matplotlibJupyter (Anacondarecommended)jupyterthemesMost of them come with conda, if some are missing they can be easily installed with pip.InstallationIn the console type inpip3installreddcolors# upgrade to latest versionpipinstall--upgradereddcolorsUsageI'll write something here soon.
Package: reddemcee
ReddemceeAn Adaptative Parallel Tempering wrapper for emcee 3 for personal use, which
someone in the community might find useful on it's own.OverviewReddemcee is simply a wrapper for the excellent MCMC implementationemcee,
that contains an adaptative parallel tempering version of the sampler, according toVousden et al. implementation.
It's coded in such a way that minimal differences in input are required, and it's
fully compatible with emcee (v. 3.1.3).DependenciesThis code makes use of:Numpypandastqdm (https://pypi.python.org/pypi/tqdm)emcee (https://github.com/dfm/emcee)Most of them come with conda, if some are missing they can be easily installed with pip.InstallationIn the console type in your work folderpipinstallreddemceeUsagePlease refer to the test file in the tests folder.importnumpyasnpimportreddemceedeflog_like(x,ivar):return-0.5*np.sum(ivar*x**2)deflog_prior(x):return0.0ndim,nwalkers=5,100ntemps=5ivar=1./np.random.rand(ndim)p0=list(np.random.randn(10,nwalkers,ndim))sampler=reddemcee.PTSampler(nwalkers,ndim,log_like,log_prior,logl_args=[ivar])sampler.run_mcmc(p0,2000)
Package: reddepy
reddePyreddepy-sdkPython3 SDK that allows merchants to receive, send, check transaction status, and perform lots of payment transactions.Before you can have access to APIs you need to register and create anAccounton reddeonline. Header for all request should have {"apikey": "string"}: and this API key will be sent to merchant when their app configuration is setup for them by Wigal.For more information on documentation go to developers.reddeonline.comInstallationUsageExamplesInstallationTo use this library you'll need to have created aRedde account.                     To install this package and use in your project, we recommend using Npm.python3 -m pip install reddepy

or 

pip install reddepyUsageImportingredde python sdkpackagefromreddepy.reddeimportReddeApiImportredde-python-packageat the top of your js file as shown above. Enter your API key and App ID which was provided to you by the Redde Team:app_id=""# Enter App ID Hereapi_key=""# Enter Api Key Here#Instantiate ReddeApi Classredde=ReddeApi(api_key,app_id)client_ref=redde.clientReferenceNumber(6)client_id=redde.randomClientID(6)ExamplesReceiving money from Customer or ClientTo use the API to recieve money from a customer, the receiveMoney() method will be used which takes takes 5 required arguments which are:amount, network type(MTN, AIRTELTIGO, VODAFONE), phone number, client reference, and client idrespectively.fromreddepy.reddeimportReddeApiapp_id=""# Enter App ID Hereapi_key=""# Enter Api Key Here#Instantiate ReddeApi Classredde=ReddeApi(api_key,app_id)client_ref=redde.clientReferenceNumber(6)client_id=redde.randomClientID(6)#Call receiveMoney Functionrecieve=redde.receiveMoney(1,233240000004,client_ref,client_id,"MTN")print(recieve)Sending money to a Customer or ClientTo use the API to send money to a customer, the sendMoney() method will be used which takes takes 5 required arguments which are:amount, network type(MTN, AIRTELTIGO, VODAFONE), phone number, client reference, and client idrespectively.fromreddepy.reddeimportReddeApiapp_id=""# Enter App ID Hereapi_key=""# Enter Api Key Here#Instantiate ReddeApi Classredde=ReddeApi(api_key,app_id)client_ref=redde.clientReferenceNumber(6)client_id=redde.randomClientID(6)#Call receiveMoney Functionsend=redde.sendMoney(1,233240000004,client_ref,client_id,"MTN")print(send)CallbacksYou need to setup your callback URL for the apps we create for you on ReddeLogin to your Redde accountClick on the Apps link on the navigation barYou will see your list of apps in a table. Click on the modify buttonAdd your callback url(s) for both the Receive Callback URL and Cash Out Callback URLApply changes and you are all set.Most APIs implement callbacks for easy tracking of api transactions so try and implement it to keep track of the API transactions.//CallbackUrlEndpointLicenseThis library is released under the MIT License
Package: reddish
reddish - an redis client for sockets and trio with minimal apiFeaturesInstallationMinimal ExampleUsageFeaturesboth sync and async APIsync api using the standard librarysocketmodule (TPC, TPC+TLS, Unix domain sockets)async/awaitusingtrio's stream primitives (TCP, TCP+TLS, Unix domain sockets)minimal api so you don't have to relearn how to write redis commandssupports all redis commands including modules exceptSUBSCRIBE,PSUBSCRIBEandMONITOR[^footnote]parses responses back into python types if you like (powered bypydantic)works with every redis version and supports bothRESP2andRESP3protocols[^footnote]: Commands likeSUBSCRIBEorMONITORtake over the redis connection for listeting to new events
barring regular commands from being issued over the connection.Installationpip install reddish  # install just with support for socket
pip install reddish[trio]  # install with support for trioMinimal Example - sync versionimportsocketfromreddish.socketimportRedis,Commandredis=Redis(socket.create_connection(('localhost',6379)))assertb'PONG'==redis.execute(Command('PING'))Minimal Example - async versionimporttriofromreddish.trioimportRedis,Commandredis=Redis(awaittrio.open_tcp_stream('localhost',6379))assertb'PONG'==awaitredis.execute(Command('PING'))UsageCommand with a fixed number of arguments# simple command without any argumentsCommand('PING')# commands with positional argumentsCommand('ECHO{}','hello world')# commands with keyword argumentsCommand('SET{key}{value}',key='foo',value=42)Command with response parsing# return response unchanged from redisassertb'42'==awaitredis.execute(Command('ECHO{}',42))# parse response as typeassert42==awaitredis.execute(Command('ECHO{}',42).into(int))# use any type that works with pydanticfrompydanticimportJsonimportjsondata=json.dumps({'alice':30,'bob':42})response==awaitredis.execute(Command('ECHO{}',data).into(Json))assertresponse==json.loads(data)Command with variadic argumentsfromreddish.trioimportArgs# inlining argumentsCommand('DEL{keys}',keys=Args(['foo','bar']))# DEL foo bar# inlining pairwise argumentsdata={'name':'bob','age':42}Command('XADD foo *{fields}',fields=Args.from_dict(data))# XADD foo * name bob age 42Pipelining commandsfoo,bar=awaitredis.execute_many(Command('GET','foo'),Command('GET','bar'))Transactionsfromreddish.trioimportMultiExectx=MultiExec(Command('ECHO{}','foo'),Command('ECHO{}','bar'))foo,bar=awaitredis.execute(tx)# pipelining together with transactions[foo,bar],baz=awaitredis.execute_many(tx,Command('ECHO{}','baz'))
Package: reddist
ReddistJust a python library to make reddit post caching easier.Caching OptionsIn Memory CachingRedis CachingPickle CachingUsageInstallation:Developementpoetryaddgit+https://github.com/CaffeineDuck/reddistStablepoetryaddreddistPickle Usage:importasyncioimportrandomfromdataclassesimportasdictasyncdefmain():reddit_cacher=PickleRedditCacher(Reddit(user_agent="dpydit",client_id="CLIENT_ID",client_secret="CLIENT_SECRET",),'cache.pickle',cached_posts_count=100,)reddit_cacher.start_caching()posts=awaitreddit_cacher.get_subreddit_posts("pics")print(asdict(random.choice(posts)))if__name__=="__main__":loop=asyncio.get_event_loop()loop.run_until_complete(main())Memory Usage:importasyncioimportrandomfromdataclassesimportasdictasyncdefmain():reddit_cacher=MemoryRedditCacher(Reddit(user_agent="dpydit",client_id="CLIENT_ID",client_secret="CLIENT_SECRET",),cached_posts_count=100,)reddit_cacher.start_caching()posts=awaitreddit_cacher.get_subreddit_posts("pics")print(asdict(random.choice(posts)))if__name__=="__main__":loop=asyncio.get_event_loop()loop.run_until_complete(main())Redis Usage:importasyncioimportrandomfromdataclassesimportasdictimportaioredisasyncdefmain():redis=aioredis.from_url("redis://localhost")asyncwithredis.client()asconn:reddit_cacher=RedisRedditCacher(Reddit(user_agent="dpydit",client_id="CLIENT_ID",client_secret="CLIENT_SECRET",),conn,cached_posts_count=100)posts=awaitreddit_cacher.get_subreddit_posts("pics")print(asdict(random.choice(posts)))if__name__=="__main__":loop=asyncio.get_event_loop()loop.run_until_complete(main())WIP (Expect Breaking Changes)
Package: reddit2ebook
Convert stories and comments from reddit into epubsIt doesn’t require Pandoc any longer and is a pure Python program now.
ebooklib currently has a bug, so I’m shipping out a patched version
until it gets fixedRequirements: PyYaml. pyprind, praw, mistune:Usage: reddit2ebook configfile output-directoryThe configfile should be in the following format:AssortedWorks:
    author: /u/GallowB00b
    title: Assorted Works
    cover: Gallow.jpg
    lang: en
    links:
        - url
        - url
        - url

MissingKeys:
    author: /u/airz24
    title: The Missing Keys
    cover: keyboard.jpg
    lang: en
    links:
        - url
        - url
        - urlauthor, title, cover and lang are all optionalThe older format is also supported:bookname:
    - url
    - url
    - urlYou can use regular links for the submissions and permalinks for comments.
If the link has a trailing slash its a submission, if not a comment. This
is the default behaviour when copy-pasting the links from the browser,
but sometimes people link to the comment section instead of the submission,
simply adding a trailing slash will give you the submission text then
Package: reddit2md
reddit2mdTurn your favorite reddit post to .md file... That's it.DescriptionPut in praw.Submission object and get Markdown file of that post for printing/archiving stuff.Getting StartedDependenciesPrawpytz (for Posted date timezone stuff)Installingpip install reddit2mdQuickstartimport praw, reddit2md, settings

reddit = praw.Reddit(
                client_id = settings.credentials['client_id'],
                client_secret = settings.credentials['client_secret'],
                user_agent = settings.credentials['user_agent'],
            )

# reddit.config.decode_html_entities = True # Consider decoding HTML as some of the HTML entities might show up undecoded.

posts = reddit.subreddit('learnpython').hot(limit=5)

for post in posts:
    reddit2md.r2md(post, file_name=post.title ,timezone='Asia/Seoul') # file_name and timezone are both optional.Before you usereddit2md does not do any file management.It will actually raise an Exception when the file already exists. It simply writes new file.AuthorLewis Lee@lewisleedevVersion History0.1.0Initial ReleaseLicenseThis project is licensed under the MIT License - see the LICENSE file for details
Package: reddit2pdf
reddit2pdfThe majority of this repo is taken under GPL from bdfr-html foundherewith modifications to work with my PKM system.Example usagepoetry run python -m reddit2pdf pdf --linkhttps://www.reddit.com/r/homeautomation/comments/z4fn14/my_take_on_the_magsafe_home_assistant_wall/--unclean -o ~/Desktop/test --move-html
Package: reddit-api-client
Installationpip install reddit-api-clientExamplesGuest Endpointsfromreddit.scraperimportScraperreddit=Scraper()homepage=reddit.homepage()popular=reddit.popular()front_page=reddit.front_page()subreddit=reddit.subreddit("pics")search=reddit.search('api blackout',includePosts=True,includeCommunities=True,includeAuthors=True,includeComments=True,# communitySearch=False,# customFeedSearch=False,# postsAfter=None,# communitiesAfter=None,# authorsAfter=None,# commentsAfter=None,filters={'nsfw':'0',# {'1', '0'},'time_range':'null',# {'hour', 'day', 'week', 'month', 'year', 'null'},'post_types':'null',# {'gif', 'image', 'link', 'poll', 'text', 'video', 'null'},'result_types':'',# {'subreddit', 'profile', ''}},sort='NEW',# {'RELEVANCE', 'HOT', 'TOP', 'NEW', 'COMMENTS'})Auth Endpointsfromreddit.scraperimportScraperusername,password=...,...reddit=Scraper(username,password)# get data from postsposts=reddit.posts({'pics':['147p5ql','146zsax'],'funny':'143wysp',})# comment on a postreddit.comment('146zsax','test 123')
Package: redditcli
RedditCLIRedditCLIbrings Reddit to the terminal, allowing you to do the following without leaving your command line:Browse public subreddits, posts, comments, and users.Iterate through comments and post indexes.Search for posts, comments, and users.Clear all the commands on the screen.InstallationPip InstallationThe following command will installRedditCLI:$ pip3 install redditcliIf you are not installing in a virtualenv, run withsudo:$ sudo pip3 install redditcliOnce installed, run theRedditCLIauto-completer with interactive help:$ redditRun commands:$ rdt <command> [options] [args]Auto-Completer and Interactive HelpYou can enable fish-style completions and an auto-completion menu with interactive help:$ redditIf available, the auto-completer also automatically displays commands through a pager.Within the auto-completer, the following syntax applies:redditcli:$>> rdt <command> [options] [args]Commands:rdt lsDescription: list posts front page and sorts by optional hot(default), new, rising, top, controversial.Options:--sort [hot|new|rising|top|controversial]- sort the list based on categories--move [next|previous]- can only be used on result set--subreddits- list all public subreddits available on reddit--subreddits --move [next|previous]- can only be used on result setviewDescription: opens the permalink of the specified post index in a browser window.Options:--index [Integer Value]- can only be used on result set--comments --index [Integer Value]- loads the comments of the specified post index. can only be used on result set--more-comments --index [Integer Value]- Loads more comments from the post scope if there are posts to load.searchDescription: Searches reddit for the specified search term.Options:[Search Term]ls --move [next|previous]- can only be used on result setclearDescription: Clears the screenSupported Python VersionsPython 3 and above.Libraries UsedClickpython-prompt-toolkitPraw
Package: redditcommentcloud
Reddit Comment CloudPython3.7+ wrapper for generating word clouds from a Reddit user's comments.Built uponPRAW(Python Reddit API Wrapper)WordCloudmatplotlibUseThis example will render the WordCloud of /u/SuddenlySnowden and save the image underSuddenlySnowden.pngin the current working directory.from redditcommentcloud import CommentCloud
cc = CommentCloud()
cc.renderWordCloud(username='SuddenlySnowden')InstallThe code was written for Python3.7+.Optionally: Create a Python virtual environment:python -m venv .venv
source .venv/bin/activateTypedeactivatewhen you are doneClone this repositoryor install it usingpip install redditcommentcloud.Installing the dependenciespip install -r requirements.txtSupply Reddit API credentialsThis tool requires API credentials for the Reddit API.
Go tohttps://www.reddit.com/prefs/apps/, create an app and copy the keys.Copyredditcommentcloud/config.py.templatetoredditcommentcloud/config.pyand fill in the details.
Freely choose a presumably unique User-Agent for the bot.
Package: reddit-comment-scrapper
UsageRunpip install reddit-comment-scrapperProvide the detailsreddit-comment-scrapper Reddit_ID Reddit_Secret name_subreddit post_category , number_of_postsStructure of JSON FileEach Submission has two entriesSubmission BodyList of Dictionary of top level RepliesEach reply has 3 enteriesid of replyBody of ReplyList of Dictionary of second level RepliesAnd this goes on Recursively in a depth first search manner till a reply with no further reply is foundJSON File always stored in a comments.json
Package: reddit-cqlmapper
This project is a fork ofcqlenginewith a number of changes to allow it to work in abaseplateapplicationMajor changes:Remove support for polymorphic modelsRemove the query evaluator method of defining query constraintsSwitch from using a global connection object to passing a connection object
to methods that interact with the databaseBatch queries are handled by a Connection-like Batch object that is given
as theconnargument to functions rather than using theModel.batchsyntax of cqlengineExample usage:import uuid

from cassandra.cluster import Cluster
from cqlmapper import columns, connection, models
from cqlmapper.batch import Batch
from cqlmapper.connection import Connection as CQLMapperConnection
from cqlmapper.management import sync_table

class MyFirstModel(Model):
    id = columns.UUID(primary_key=True, default=uuid.uuid4)
    body = colums.Text()

cluster = Cluster()
session = cluster.connect("example")
conn = CQLMapperConnection(session)
sync_table(conn, MyFirstModel)
model_1 = MyFirstModel.create(conn, body="Hello World")
model_2 = MyFirstModel.create(conn, body="Hola Mundo")
# Batch queries can be used as a context manager where the batch query will
# be executed when exiting the context
with Batch(conn) as batch_conn:
    MyFirstModel.create(batch_conn, body="Ciao mondo")
    MyFirstModel.create(batch_conn, body="Bonjour le monde")
# Batch queries can also be created standalone in which case execute_batch
# can be called to execute the queries.  Calls to execute will add the
# query to the batch
batch_conn = Batch(conn)
MyFirstModel.create(batch_conn, body="Hallo Welt")
MyFirstModel.create(batch_conn, body="Hei Verden")
>>> MyFirstModel.objects.count(conn)
4
>>> batch_conn.execute_batch()
>>> MyFirstModel.objects.count(conn)
6
>>> MyFirstModel.get(conn, id=model_1.id).text == model_1.text
True
>>> MyFirstModel.get(conn, id=model_2.id).text == model_1.text
False
Package: reddit-cssfilter
cssfilter.py extracted from reddit’s source code.This library allows you to filter “unsafe” css from your users.This library requires attribution!:When using this library, reddit requires you to put the following information in the splash or the “about” section of your application.EXHIBIT B. Attribution InformationAttribution Copyright Notice: Copyright (c) 2006-2015 reddit Inc. All Rights
Reserved.Attribution Phrase (not exceeding 10 words): Powered by redditAttribution URL:http://code.reddit.comGraphic Image as provided in the Covered Code:http://code.reddit.com/reddit_logo.pngInfoParse and validate a safe subset of CSS.The goal of this validation is not to ensure functionally correct stylesheets
but rather that the stylesheet is safe to show to downstream users.  This
includes:not generating requests to third party hosts (information leak)xss via strange syntax in buggy browsersBeyond that, every effort is made to allow the full gamut of modern CSS.How to useimportreddit_cssfilter.cssfiltercssfilter.validate_css(stylesheet,images)Validate and re-serialize the user submitted stylesheet.images is a mapping of subreddit image names to their URLs.  The
re-serialized stylesheet will have %%name%% tokens replaced with their
appropriate URLs.The return value is a two-tuple of the re-serialized (and minified)
stylesheet and a list of errors.  If the list is empty, the stylesheet is
valid.LicenceCopyright (c) 2006-2015 reddit Inc. All Rights Reserved.Common Public Attribution License Version 1.0 (CPAL)The full license is available here:reddit Inc. Common Public Attribution License Version 1.0 (CPAL).