Saravanan666/pypi-org huggingface dataset:
Package: simplemail
# simplemail## Overview**simplemail** is an easy way to send emails in Python. It will use a sendmail binary which is almost always available and ready to go.## Dependencies- Python 2.6 or 2.7## Sample usecaseThe code has docstrings which explains how to use the library. But here's the sample usecase I just made up for showing you the benefits and simplicity of using it.Let's assume that you have a general announcement which you would like to send out to your mailing list. The message itself is common for every member of your list, but you want to greet every person by his or her name in the beginning of your message.So you have a list of your customer in a dictionary.from simplemail import Simplemailmailinglist = {"Bob": "bob@domain.tld","Alice": "alice@domain.tld"}Let's fire the default settings for all our emails.message = Simplemail(sender="Maillist Owner <postmaster@domain.tld>",subject="Monthly announcement")Next you are going to write a default message body for everyone.body = "We are proudly to present our new feature."Let's compose a personal greeting for every member of your list and fire an email.for person in mailinglist.keys():gr = "Hello, %s\n\n%s" % (person, body)message.send(recipient=mailinglist[person], body=gr)Now you have a personal greeting for all of your subscribers.## HTML emailsYou can add an optional HTML-view of your email with the html variable. E.g.:from simplemail import Simplemailbody = "Hi!"html = "<strong>Hi!</strong>"message = Simplemail(sender="You <your@mail>", recipient=["your@mail"], subject="html test")message.send(body=body, html=html)## Logging handlerThere is a special logging handler which utilizes the simplemail library. Here's a code sample:import loggingfrom simplemail import Simplemailfrom simplemail.handlers import SimplemailLogger# Initializing Simplemailmail = Simplemail(sender="Application Error <errors@domain.tld>",recipient=["you@domain.tld"])# Initializing loggerlogger = logging.getLogger()logger.setLevel(logging.DEBUG)logger.propagate = False# Sending SimplemailLogger the Simplemail object, application name# and the tresholdsl = SimplemailLogger(mail, __name__, logging.WARNING)logger.addHandler(sl)# Writing to the loglogger.warn("test")The handler's constructor expects three arguments. One is mandatory: **mailobject** is the Simplemail object itself, which needs to be initialized before. Two others are optional: **app** contains your application name, which will be mentioned in the mail subject; and **level** which is the treshold at which the handler will be triggered.## DownloadsThis library is available at [PyPi](http://pypi.python.org/pypi/simplemail).
Package: simple_mailbox
imap utils can be used to get the latest email from specified sender####usage:from smbox import util<br><br>
host = ‘imap.126.com’<br>
user = (‘username@126.com’, ‘password’)<br>
sender =‘sender@example.com’<br>
email_message = util.get_email(host, user, sender)<br>
email_body = util.get_first_text_block(email_message)<br>
Package: simplemailsender
Simple Mail SenderA simple mail sender.Usagefromsimplemailsender.simplemailsenderimportSimpleMailSendersms=SimpleMailSender("<SMTP Server>","<SMTP Port>","<SSL or TLS>","<User>","<Password>")sms.send("<Sender e-mail>",["<Recipients e-mail>"],"<Subject>","<Message body>","<Path to attachment>")
Package: simple-mamba
Simple MambaInstallpip install simple-mambaUsageimporttorchfromsimple_mambaimportMambaBlock# Define block parametersdim=512hidden_dim=128heads=8in_channels=3out_channels=3kernel_size=3# Create an instance of MambaBlockmamba_block=MambaBlock(dim,hidden_dim,heads,in_channels,out_channels,kernel_size)# Create a sample input tensorx=torch.randn(1,dim,dim)# Pass the tensor through the MambaBlockoutput=mamba_block(x)print("Output shape:",output.shape)SSMimporttorchfromsimple_mambaimportSSM# # Example usagevocab_size=10000# Example vocabulary sizeembed_dim=256# Example embedding dimensionstate_dim=512# State dimensionnum_layers=2# Number of state-space layersmodel=SSM(vocab_size,embed_dim,state_dim,num_layers)# Example input (sequence of word indices)input_seq=torch.randint(0,vocab_size,(32,10))# Batch size of 32, sequence length of 10# Forward passlogits=model(input_seq)print(logits.shape)# Should be [32, 10, vocab_size]LicenseMITCitation@misc{gu2023mamba,title={Mamba: Linear-Time Sequence Modeling with Selective State Spaces},author={Albert Gu and Tri Dao},year={2023},eprint={2312.00752},archivePrefix={arXiv},primaryClass={cs.LG}}
Package: simple-manga-downloader
simple-manga-downloaderSimple manga console downloader written in python. Made for Linux but should work on any platform.Currently supports:mangadexmangatownmangakakalotmanganatoNote:mangadex is the main supported site, the othersmightbe maintained but they are not my top priority.Allows you to download manga in 5 ways:all chapters of a seriesa range of chapters (from 5 to 15)a selection of chapters (5, 7, 10, 20)only the newest chaptercheck for new chapters for the tracked mangaAdditional features of the downloader:It will check if a chapter on mangadex.org has multiple uploads by different groups and ask which one to downloadIt handles the MangaPlus chapters on mangadexAllows to use data saver images from MangadexIt can download the cover(s) for the manga (off by default)You can specify the language (mangadex only)You can specify which chapters to exclude from the downloadYou can change the directory where the manga is savedYou can add ongoing manga to the tracked list for a easy way to check for new chaptersConfig is saved as a .json for readability and easy modificationThe downloader has a config "mode" that allows the modification of the config file without having to edit the .json manuallyIt can check for new available versionsIt will remove (or replace) characters from titles that could cause problems, by default removes/ \ | ? > < . : ? * "InstallationRequirementsBeautifulSoup 4requestsReleases form PyPIInstalling using pip will handle the requirements automatically. I would also recommend usingpipxinstead of just pip.pip install simple-manga-downloaderUsing the git repoInstalling using pipTo install from the master branchpip install git+https://github.com/Kanjirito/simple-manga-downloader@masterUsing the git repo without installingCopy the repo, install the requirements and use the entry script in the main repo directorycd path/to/repo
chmod +x SMD.py
pip install -r requirements.txt
./SMD.py [mode] [arguments]USAGEGeneral infoFor all commands you can either useSMDorsmd.The default manga download directory is~/Mangathis can be changed in the config file or in the command. The config directory is$XDG_CONFIG_HOME/SMD(~/.config/SMDif variable not set), you can specify a different config to be used like this:SMD -c "path/to/config" mode argumentsExamples:SMD -c "~/Downloader/config.json" down link_to_manga -l
SMD -c "~/Downloader/config.json" updateTo create the config file the downloader needs to successfully finish. If you want to have the config created before you use the downloader you can do:SMD confDetailsFor a more detailed explanation of the modes and their available arguments read theUSAGE.mdfile in the git repo.ChangelogChangelog can be found inCHANGELOG.mdin the git repo.
Package: simple-mapillary
simple-mapillary-python-sdkSimplified Python library for accessing the Mapillary API.
For a more complete library, check out the officialmapillary-python-sdk.Installationpipinstallsimple-mapillaryOr clone the repository and install it manually (If you want to modify the code):gitclonehttps://github.com/ibaiGorordo/simple-mapillary-python-sdkcdsimple-mapillary-python-sdk
pipinstall.SetupFirst, you need to get an access token. To get one:Visithttps://www.mapillary.com/dashboard/developer, go to 'developers',Then, click 'register application', register a new application (read access is enough),Finally, copy the 'Client Token'Then, pass the token as an argument to theset_access_token()function.Example (Read image)fromsimple_mapillaryimportImage,set_access_tokenimportcv2token=""set_access_token(token)image_id="1200479493800436"image=Image(image_id)img=image.get_cvimage()cv2.imshow('image',img)cv2.waitKey(0)cv2.destroyAllWindows()Example (Read image with semantic map)fromsimple_mapillaryimportImage,set_access_tokenfromsimple_mapillary.imageimportdraw_detectionsimportcv2# TODO: Set the token heretoken=''set_access_token(token)image_id="279996174671586"image=Image(image_id)img=image.get_cvimage()detections=image.get_detections()segmentation_img=draw_detections(img,detections)comb_img=cv2.addWeighted(img,0.6,segmentation_img,0.4,0)cv2.imshow('image',comb_img)cv2.waitKey(0)cv2.destroyAllWindows()
Package: simplemapplot
This package allows you to easily create a colored map of US States or counties.  For example:import simplemapplot

example_colors = ["#FC8D59","#FFFFBF","#99D594"]
state_value = {"TX":2, "WI":1, "IL":1, "AK":0, "MI":0, "HI":2}
make_us_state_map(data=state_value, colors=example_colors)This creates a colored US state map (SVG file) in the same directory.InstallingSimply use pip:pip install SimpleMapPlotOther ExamplesCreate a colored world map:import simplemapplot

example_colors = ["#FC8D59","#FFFFBF","#99D594"]
country_value = {"us":1, "au":2, "gb":0}
make_world_country_map(data=country_value, colors=example_colors)
Package: simple-maps
Simple MapsThis program allows the creation of maps with markers directly from the command
line.Installation$pipinstallsimple-mapsFeaturesSimple Maps interacts with the cartes.io API to provide the following
functionality:Create a map with parameters:map createGet information about a map:map getDelete a map:map deleteCreate a marker on a map:marker createList all markers on a map:marker listEdit marker description:marker editDelete a marker:marker deleteUsage:$simple_maps[OPTIONS]COMMAND[ARGS]...Options:--install-completion: Install completion for the current shell.--show-completion: Show completion for the current shell, to copy it or customize the installation.--help: Show this message and exit.Commands:mapmarkersimple_maps mapUsage:$simple_mapsmap[OPTIONS]COMMAND[ARGS]...Options:--help: Show this message and exit.Commands:create: Create a map.delete: Delete a single map.get: Get a single map.simple_maps map createCreate a map.Usage:$simple_mapsmapcreate[OPTIONS]Options:--title TEXT: The title of the map--slug TEXT: The map slug. Currently un-used--description TEXT: The description of the map and its purpose--privacy [public|unlisted|private]: The privacy level of the map: public, unlisted, private--users-can-create-markers [yes|no|only_logged_in]: The setting that defines who can create markers--help: Show this message and exit.simple_maps map deleteDelete a single map.Usage:$simple_mapsmapdelete[OPTIONS]Options:--token TEXT: Token  [required]--map-id TEXT: Map id  [required]--help: Show this message and exit.simple_maps map getGet a single map.Usage:$simple_mapsmapget[OPTIONS]Options:--map-id TEXT: Id of the map  [required]--help: Show this message and exit.simple_maps markerUsage:$simple_mapsmarker[OPTIONS]COMMAND[ARGS]...Options:--help: Show this message and exit.Commands:create: Create a marker on a map.delete: Delete a marker on a map.edit: Edit a marker on a map.list: Get all markers on a map.simple_maps marker createCreate a marker on a map.Usage:$simple_mapsmarkercreate[OPTIONS]Options:--map-token TEXT: Map token  [required]--map-id TEXT: Map id  [required]--lat FLOAT RANGE: The lat position of the marker  [required]--lng FLOAT RANGE: The lng position of the marker  [required]--category INTEGER: Category ID. Use category_name if you don't know the ID--category-name TEXT: Category name--description TEXT: Marker description--help: Show this message and exit.simple_maps marker deleteDelete a marker on a map.Usage:$simple_mapsmarkerdelete[OPTIONS]Options:--token TEXT: Token  [required]--map-id TEXT: Map id  [required]--marker-id TEXT: Marker id  [required]--help: Show this message and exit.simple_maps marker editEdit a marker on a map.Usage:$simple_mapsmarkeredit[OPTIONS]Options:--token TEXT: Marker token  [required]--map-id TEXT: Map id  [required]--marker-id TEXT: Marker id  [required]--description TEXT: Marker description--help: Show this message and exit.simple_maps marker listGet all markers on a map.Usage:$simple_mapsmarkerlist[OPTIONS]Options:--map-id TEXT: Map id  [required]--show-expired / --no-show-expired: Show markers that have already expired--help: Show this message and exit.
Package: simplemathutils-lib
simplemathutils-libsimplemathutils-libis a creative package for basic mathematical operations with Python.All simplemathutils-lib wheels distributed on pypi are MIT licensed.Requirementssimplemathutils-lib requires python 3.6 or greater.InstallationInstall with pip:pip install simplemathutils-libIf you are using the old version of simplemathutils-lib and want to update it:pip install --upgrade simplemathutils-libExamplesimportsimplemathutils_libassimplemathsimplemath.add(10,2,1)# Output: 13simplemath.subtract(2,1)# Output: 1simplemath.multiply(10,2,1)# Output: 20simplemath.divide(2,1)# Output: 2ContributeFeel free to open pull requests to expand this documentation, add features or fix problems.
Package: simplematrixbotlib
Simple-Matrix-Bot-Lib(Version 2.11.0)Simple-Matrix-Bot-Lib is a Python bot library for the Matrix ecosystem built onmatrix-nio.View on GithuborView on PyPiorView docs on readthedocs.ioLearn how you can contributehere.Featureshands-off approach: get started with just 10 lines of code (seeexample)end-to-end encryption supportlimitedverification support(device only)easilyextensible config fileuser access managementaccess the matrix-nio library to use advanced featuresInstallationsimplematrixbotlib can be either installed from PyPi or downloaded from github.Installation from PyPi:python -m pip install simplematrixbotlibRead the docsto learn how to install E2E encryption support.Download from github:git clone --branch master https://github.com/i10b/simplematrixbotlib.gitExample Usage# echo.py# Example:# randomuser - "!echo example string"# echo_bot - "example string"importsimplematrixbotlibasbotlibcreds=botlib.Creds("https://home.server","echo_bot","pass")bot=botlib.Bot(creds)PREFIX='!'@bot.listener.on_message_eventasyncdefecho(room,message):match=botlib.MessageMatch(room,message,bot,PREFIX)ifmatch.is_not_from_this_bot()andmatch.prefix()andmatch.command("echo"):awaitbot.api.send_text_message(room.room_id," ".join(argforarginmatch.args()))bot.run()More information and examples can be foundhere.
Package: simplememcache
simplememcachesimplememcacheis a lightweight Python package providing a simple and efficient Least Recently Used (LRU) cache implementation. It allows you to cache and manage key-value pairs with a maximum size, automatically evicting the least recently used items when the cache reaches its limit.InstallationYou can installsimplememcacheusing pip:pipinstallsimplememcacheImporting the packagefromsimplememcache.lruimportLRUCacheCreating a cache instance# Create an LRU cache with a maximum size of 100 itemscache=LRUCache(max_size=100)Inserting items into the cachecache.insert("key1","value1")cache.insert("key2",42)Getting items from the cachevalue=cache.get("key1")print(value)# Output: "value1"Getting items with default valuevalue=cache.get_or_default("nonexistent_key",default="default_value")print(value)# Output: "default_value"Upserting items into the cache# Upsert (update or insert) an item into the cacheresult=cache.upsert("key1","new_value")print(result)# Output: False (key1 already existed, value updated)Deleting items from the cachedeleted_value=cache.delete("key2")print(deleted_value)# Output: 42Deleting items with default valuedeleted_value=cache.delete_or_default("nonexistent_key",default="default_value")print(deleted_value)# Output: "default_value"Checking the size of the cachecache_size=cache.sizeprint(cache_size)# Output: 1ContributingFeel free to contribute by opening issues or submitting pull requests on theGitHub repository.LicenseThis project is licensed under the MIT License - see theLICENSEfile for details.
Package: simple-memory-cache
Simple Memory CacheA dead simple memory cache to allow a variable to easily be lazy-loaded when needed.
Only 43 lines of code and no dependencies.This module is used by our SpinHub App (https://www.spinhub.ca) which is currently in development. It allows us to in-memory cache variables for re-use in successful AWS Lambda function executions.Use-case 1: Caching responsesA specific use case for us is to cache de JWKS (the JSON Web Key Set) of our Auth0 domain:importrequestsfromsimple_memory_cacheimportGLOBAL_CACHEAUTH0_DOMAIN='mysubdomain.auth0.com'JWKS_URL=AUTH0_DOMAIN+'/.well-known/jwks.json'jwks_var=GLOBAL_CACHE.MemoryCachedVar('jwks')@jwks.on_first_accessdef_retrieve_jwks():returnrequests.get(JWKS_URL).json()defdo_something():# First call will trigger _retrieve_jwks and store the return value.# If this is called within the same AWS Lambda instance, the global context will still be there# and the value will simply be returnedjwks=jwks_var.get()try:(validateJWTtokenw/jwks)except(ValidationError):# On a validation error, Auth0 recommends to refetch the JWKS in case it changed.# We invalidate the value and get it once again.jwks_var.invalidate()jwks=jwks_var.get()(validateJWTtokenw/jwks)Use-case 2: Specific Implementation for Flask GlobalsWe often encounter the case where we wish to set a Flask g member only if it is not set.
You can create your own MemoryCachedVar adapted to this case in 5 lines of code:fromsimple_memory_cacheimportCachedVar,NO_VALUE_STOREDfromflaskimportg,requestclassFlaskGCache(CachedVar):def_get_stored_value(self):returngetattr(g,self.name,NO_VALUE_STORED)def_set_stored_value(self,value):setattr(g,self.name,value)app=(...)user_var=FlaskGCache('user')@user_var.on_first_accessdefretrieve_user_from_request():token=request.headers.get('Authorization',None)# ... Decode token or raise Unauthorizedreturnuser@app.route()defprivate_route():user=user_var.get()# Authorizes the user once, will raise Unauthorized if unable.# ...user=user_var.get()# Simply returns the value stored in g.userCreatorsCreated by Tack Verification, a company dedicated to reducing operational costs related to hardware systems verification.https://www.tackv.ca
Package: simple-memory-testing-env
SimpleMemoryTestingEnvThis is a simple OpenAI Gym-compatible environment to test RL agent's memory.Usagegymmust be installed. Environments can be created as follows:>>>importgym>>>importsimple_memory_testing_env>>>env=gym.make("SimpleMemoryTestingEnv-v0")default environment (partial observability + memory-requiring T-maze with 4 different colors) :"SimpleMemoryTestingEnv-v0"(with only 2 colors:"SimpleMemoryTestingEnv-2Colors-v0")easy environment (partial observability maze with 4 different colors) :"SimpleMemoryTestingEnv-Easy-v0"(with only 2 colors:"SimpleMemoryTestingEnv-Easy-2Colors-v0")InstallationInstalling via pipThis package is available in PyPi assimple_memory_testing_envpipinstallsimple_memory_testing_envInstalling via cloning this repositorygitclonehttps://www.github.com/Near32/SimpleMemoryTestingEnvcdSimpleMemoryTestingEnv
pipinstall-e.
Package: simple-message-channels
simple-message-channelsSans I/O wire protocol for HypercoreInstall$pipinstallsimple-message-channelsExamplefromsimple_message_channelsimportSimpleMessageChannelsmc1=SimpleMessageChannel()smc2=SimpleMessageChannel()payload=smc1.send(0,1,b"foo")print(f"sent:{payload}")foridxinrange(0,len(payload)):smc2.recv(payload[idx:idx+1])print(f"received:{smc2.messages}")Output:sent:b'\x04\x01foo'received:[(0,1,b'foo')]
Package: simple-metrics
simple_metrics for RobinhoodSimple, humble, and direct metrics applied to Robinhood trades.examplefromsimple_metricsimportfetch,exportaccount={'username':'my username','password':'my password'}## export stock trades to -> stock_orders.csv#stock_orders=fetch.stock_trades(account,{})export.stock_orders(stock_orders,{})## export -> option_orders.csv#option_orders=fetch.option_orders(account,{})export.option_orders(option_orders,{})installpipinstallsimple_metrics--process-dependency-linksThe package uses a forked version ofRobinhood, hence
the need for--process-dependency-links.package apiFunctionality includes:Fetch Stock order historyFetch Option order historyExport Stock order historyExport Option order historycommand line usageconfigin anaccount.inifile, provide username and password['account']
username = my_username
password = my_passwordcli commandsexport# stockssmexport_history--tradesstock# optionssmexport_history--tradesoptionlocal developmentGit clone this repo and run,pipinstall.--process-dependency-links--editableAdding--editableallows you to pull in code changes without
having to runpip install.
Package: simplemetservice
simplemetserviceA simple Python package for accessing MetService data. Designed to be simple and easy to use. Based in part off the project 'pymetservice'.SetupDependenciesThis package requires the 'requests' python package.Installationpip install simplemetserviceGetting startedTo use the package after installation:(in python) import simplemetserviceDemoimport simplemetservice
print(getForecast("Auckland"))Errors and bugsIf something isn't behaving as intended  or you have any suggestions please contact me atkitclone@icloud.com.
Package: simple-migrations
simple-migrations (beta)The feedback and contributions are appreciated!Make your database migrations as simple as possible!simple-migrationsis a library that allows you to write database migrations in a pure SQL.The order of migrations will be tracked in the database table.You can specify theforwardsandbackwardscommand and even write your own scripts.No need to apply the scripts manually, you can now automate your deployment flow!Keep in mind that the library is still in development and is distributed "as is".How to useThe example of the config can be found insimple_migrations.inifile.Create asimple_migrations.inifile in the project root and set up the database credentials.Runsimple-migrations initto generate the migrations directory and migrations table.Runsimple-migrations generateto generate the migration file from the template.Runsimple-migrations migrateto apply all unapplied migrations.Runsimple-migrations migrate <num>to migrate or rollback to  migration, for example:If the last applied migration was #2,simple-migrations migrate 4will apply migrations 3 and 4.If the last applied migration was #4,simple-migrations migrate 2will rollback migrations 3 and 4.
Package: simplemlutils
mlutilsEasy to use utilities for ml modeling.InstallationYou can installmlutilsusingpip. Clone themainbranch of the repository
and build the utilities usingpython -m buildThen install the built wheel usingpip install dist/simplemlutils-<version>.whlAlternatively, you can use the bash scriptinstall_from_source.sh.  You can also
install it from PyPi usingpip install simpleutilsDatasets