Saravanan666/pypi-org huggingface dataset:
Package: tulips
TulipsA small wrapper aroundhttps://github.com/kubernetes-client/pythonwhich understands Kubernetes charts.WhyI needed something simple that would read Helm charts and push them to the Kubernetes cluster and
be extensible. So something like helm+kubectl with ability to write you own tools around them.Supported CRDS aka Kubernetes resourcesDeploymentServiceIngressSecretIssuer (cert-manager)PersistentVolumeClaimExample useimportyamlfromtulips.resourcesimportResourceRegistryfromkubernetesimportclientask8sfromkubernetesimportconfigclient=config.new_client_from_config('kube.conf')spec=yaml.load('ingress.yaml')ingress_cls=ResourceRegistry.get_cls(spec['kind'])ingress=ingress_cls(config.client,namespace='default',spec)ingress.create()# Create Ingress resourceingress.delete()# Delete Ingress resourceAdding new resourceIn order to add support for new Kubernetes resource, one needs to create class
that inherits fromtulips.resources.Resourceclass.Example resourceimporttulips.resources.ResourceclassClusterIssuer(Resource):"""A `cert-manager` ClusterIssuer resource."""version="v1alpha1"group="certmanager.k8s.io"plural="clusterissuers"defdelete(self,body:k8s.V1DeleteOptions):returnk8s.CustomObjectsApi(self.client).delete_namespaced_custom_object(body=body,namespace=self.namespace,version=self.version,group=self.group,plural=self.plural,name=self.name,)defcreate(self):returnk8s.CustomObjectsApi(self.client).create_namespaced_custom_object(body=self.resource,namespace=self.namespace,version=self.version,group=self.group,plural=self.plural,)It will be registered into theResourceRegistryand can be fetched viaResourceRegistry.get_clsmethod.TulipTulip is a sample client that emulates Helm but withouttiller.$pythontulipspush--help06/25/18-9:49
Usage:tulipspush[OPTIONS]CHARTYoucanpasschartvariablesviafoo=bar,forexample'$ tulip pushapp.yaml foo=bar'Options:--namespaceTEXTKubernetesnamespace--releaseTEXTNameoftherelease--kubeconfigPATHPathtokubernetesconfig--helpShowthismessageandexit.Example clientLet's say that I want to deploy a Secret and IngressapiVersion:v1kind:Secretmetadata:name:{{release}}-secretstype:Opaquedata:password:{{@pwd}}---apiVersion:extensions/v1beta1kind:Ingressmetadata:name:{{release}}-web-ingresslabels:app:woocart-{{ release }}annotations:nginx.ingress.kubernetes.io/limit-connections:"100"kubernetes.io/ingress.class:nginxspec:rules:-host:{{domain}}http:paths:-path:/backend:serviceName:{{release}}-webservicePort:80If one runs `tulip --release test push --kubeconf kube.conf app.yaml domain=test.tld'Spec file is inspected and all{{ variables }}are replaced with real values. Also
special{{ @pwd }}will generate strong password usingpassliblibrary.
Package: tuliptask
tuliptaskSimple task runner supports running multiple tasks in parallel.InstallationpipinstalltuliptaskBasic UsageCreate a tulip task file:tulipfile.pyAdd a simple taskfromtuliptaskimportTulipTask@TulipTask.task("dev")# use decorator to define a taskclassDev:defrun(self,args):# tuliptask will call `run()` function to run the task.print("start development")TulipTask.start()run the command in terminal:tulipdevadd arguments to the taskfromtuliptaskimportTulipTask@TulipTask.task("dev")classDev:defsetup(self,parser):# tuliptask will call `setup()` function to add arguments.parser.add_argument("--container")# use Python built-in `argparse` to add argumentsdefrun(self,args):print(f"start development for container:{args.container}")TulipTask.start()run shell commanddefrun(self,args):tulip.proc.run("docker build")# or use docker command shortcuttulip.proc.d("build")available command shortcuts:proc.d()=proc.run("docker")proc.dc()=proc.run("docker-compose")proc.k()=proc.run("kubectl")proc.mk()=proc.run("minikube")extend base taskTuliptask provides several base tasks for convenience.fromtuliptaskimportTulipTaskfromtuliptask.tasksimportKubeTask@TulipTask.task("dev")classDev(KubeTask):defsetup(setup,parser):super().setup(parser)defrun(self,args):super().run(args)print("start development")TulipTask.start()base task will add basesetup(),run()and other convenient functions.KubeTasksetup(parser):--context: kubernetes context--namespace: kubernetes namespacek(cmdstr, **kwargs): kubectl command shortcut with--contextand--namespaceargs appended if availablekube_info(): print namespace and context infomulti-runWhen we have multiple tasks or services that do not depend on each other, it's waste of time to run them in serial. For example, if you need to build backend and frontend images, they can be run in parallel to speed up the process.fromtuliptaskimportTulipTask,MultiRun,proc@TulipTask.task("dev")classDev:defrun(self,args):mr=MultiRun()mr.add(proc.d,args=("build api",))mr.add(proc.d,args=("build ui",))mr.run()TulipTask.start()WIP
Package: tulipy
tulipyPython bindings forTulip IndicatorsTulipy requiresnumpyas all inputs and outputs are numpy arrays (dtype=np.float64).InstallationYou can install viapip install tulipy.
If a wheel is not available for your system, you will need topip install Cython numpyto build from the source distribution.
When building from source on Windows, you will need the Microsoft Visual C++ Build Tools installed.Usageimportnumpyasnpimporttulipyastiti.TI_VERSION'0.8.4'DATA=np.array([81.59,81.06,82.87,83,83.61,83.15,82.84,83.99,84.55,84.36,85.53,86.54,86.89,87.77,87.29])Information about indicators are exposed as properties:defprint_info(indicator):print("Type:",indicator.type)print("Full Name:",indicator.full_name)print("Inputs:",indicator.inputs)print("Options:",indicator.options)print("Outputs:",indicator.outputs)print_info(ti.sqrt)Type: simple
Full Name: Vector Square Root
Inputs: ['real']
Options: []
Outputs: ['sqrt']Single outputs are returned directly. Indicators returning multiple outputs use
a tuple in the order indicated by theoutputsproperty.ti.sqrt(DATA)array([ 9.03271831,  9.00333272,  9.10329611,  9.11043358,  9.14385039,
        9.11866218,  9.1016482 ,  9.16460583,  9.19510739,  9.18477   ,
        9.24824308,  9.30268778,  9.32148057,  9.36856446,  9.34291175])print_info(ti.sma)Type: overlay
Full Name: Simple Moving Average
Inputs: ['real']
Options: ['period']
Outputs: ['sma']ti.sma(DATA,period=5)array([ 82.426,  82.738,  83.094,  83.318,  83.628,  83.778,  84.254,
        84.994,  85.574,  86.218,  86.804])Invalid options will throw anInvalidOptionError:try:ti.sma(DATA,period=-5)exceptti.InvalidOptionError:print("Invalid Option!")Invalid Option!print_info(ti.bbands)Type: overlay
Full Name: Bollinger Bands
Inputs: ['real']
Options: ['period', 'stddev']
Outputs: ['bbands_lower', 'bbands_middle', 'bbands_upper']ti.bbands(DATA,period=5,stddev=2)(array([ 80.53004219,  80.98714192,  82.53334324,  82.47198345,
         82.41775044,  82.43520292,  82.51133078,  83.14261781,
         83.53648779,  83.8703237 ,  85.28887096]),
 array([ 82.426,  82.738,  83.094,  83.318,  83.628,  83.778,  84.254,
         84.994,  85.574,  86.218,  86.804]),
 array([ 84.32195781,  84.48885808,  83.65465676,  84.16401655,
         84.83824956,  85.12079708,  85.99666922,  86.84538219,
         87.61151221,  88.5656763 ,  88.31912904]))If inputs of differing sizes are provided, they are right-aligned and trimmed from the left:DATA2=np.array([83.15,82.84,83.99,84.55,84.36])# 'high' trimmed to DATA[-5:] == array([ 85.53,  86.54,  86.89,  87.77,  87.29])ti.aroonosc(high=DATA,low=DATA2,period=2)array([  50.,  100.,   50.])
Package: tulir-hangups
This is a fork ofhttps://github.com/tdryer/hangupshangups is the first third-party instant messaging client forGoogle
Hangouts. It includes both a Python library and a reference client with a
text-based user interface.Unlike its predecessor Google Talk, Hangouts uses aproprietary,
non-interoperable protocol. hangups is implemented by reverse-engineering
this protocol, which allows it to support features like group messaging that
aren’t available in clients that connect via XMPP.hangups is still in an early stage of development. The reference client is
usable for basic chatting, but the API is undocumented and subject to change.
Bug reports and pull requests are welcome!DocumentationSee the documentation forinstallation and usage instructions.Projects using hangupsHangupsBot: Bot for Google HangoutsHubot Hangouts Adapter: Hubot adapter using hangupsQHangups: Alternative client for Google Hangouts written in PyQtUbuntu Hangups: Unofficial Google Hangouts client for Ubuntu Touchbastardbot: A bot to follow and interact with Google Hangouts conversationshangoutsbot/hangoutsbot: Google Hangouts bothangups.el: Hangouts interface for Emacspickups: IRC gateway for hangups (prototype)telepathy-hangups: Telepathy bindings for Google Chat via hangups librarywardellchandler/HangoutsBot: Python 3 Bot for Hangoutsjabber-hangouts-transport: A Jabber/XMPP transport/gateway to Hangouts.ovkulkarni/hangoutsbot: Google Hangouts Bot using SQLdefund/pearl: Google Hangouts bot frameworkHangupsDroid: Unofficial Google Hangouts client for Androidchat-archive: Easy to use offline chat archiveSoulSen/Hanger: Modern, Simple, Asynchronous bot framework for Google HangoutsRelated projectsHangish: A Google Hangouts native client for SailfishHangups-UWP: Hangups client for Universal Windows PlatformParrot: The next generation messengerWTalk: Client library and desktop client for Google Hangouts written in C#YakYak: Desktop client for Google Hangoutsgo-hangups: Port of hangups to Gohangover: The first native Mac OS X client for Google Hangoutshangups-rs: Port of hangups to Rusthangupsjs: Port of hangups to Node.jspurple-hangouts: Hangouts plugin for libpurpleslangouts: A Hangouts/Slack bridge
Package: tulir-telethon
⭐️ Thankseveryonewho has starred the project, it means a lot!Telethonis anasyncioPython 3MTProtolibrary to interact withTelegram’s API
as a user or through a bot account (bot API alternative).ImportantIf you have code using Telethon before its 1.0 version, you must
readCompatibility and Convenienceto learn how to migrate.
As with any third-party library for Telegram, be careful not to
breakTelegram’s ToSorTelegram can ban the account.What is this?Telegram is a popular messaging application. This library is meant
to make it easy for you to write Python programs that can interact
with Telegram. Think of it as a wrapper that has already done the
heavy job for you, so you can focus on developing an application.Installingpip3installtelethonCreating a clientfromtelethonimportTelegramClient,events,sync# These example values won't work. You must get your own api_id and# api_hash from https://my.telegram.org, under API Development.api_id=12345api_hash='0123456789abcdef0123456789abcdef'client=TelegramClient('session_name',api_id,api_hash)client.start()Doing stuffprint(client.get_me().stringify())client.send_message('username','Hello! Talking to you from Telethon')client.send_file('username','/home/myself/Pictures/holidays.jpg')client.download_profile_photo('me')messages=client.get_messages('username')messages[0].download_media()@client.on(events.NewMessage(pattern='(?i)hi|hello'))asyncdefhandler(event):awaitevent.respond('Hey!')Next stepsDo you like how Telethon looks? Check outRead The Docsfor a more
in-depth explanation, with examples, troubleshooting issues, and more
useful information.
Package: tululu-offline
Save the category of site tululu.org offlineDescriptionThe program downloads fromtululu.orgbooks in text format and their covers. The following information is also downloaded to the json file:title;author;image path;book path;comments;genres.After downloading the necessary data, the offline version of the site will be generated (you can see an examplehere).Table of contentInstallationHow to useOptionsExample runFor developersHow to install with dev dependenciesHow to runExample of running a scriptStart render websiteHow to run lint filesHow to run testsLicenseProject goalInstallationInstall usingpip:pipinstalltululu-offlineHow to usetululu-offline[OPTIONS]Optionscategory_url- the category urltululu.org;--start_page- which page to start downloading;--end_page- on which page to finish downloading;--dest_folder- path to the directory with parsing results: pictures, books, JSON;--skip_txt- do not download books;--skip_imgs- do not download images;--json_path- specify your path to *.json file with results;--number_of_books_per_page- number of books per page.Example runRun the script with the necessary parameters. For example:tululu-offlinehttp://tululu.org/l55/--start_page1--end_page3--skip_txttrue--skip_imgstrue--number_of_books_per_page15The first page of the library will be available atpages/index1.html.For developersHow to install with dev dependenciesInstall usingpoetry:gitclonehttps://github.com/velivir/tululu-offlinecdtululu-offline
makeinstall_devHow to run:poetryrunpython3tululu_offline/app.py[OPTIONS]Example of running a scriptpoetryrunpython3tululu_offline/app.pyhttp://tululu.org/l55/--start_page1--end_page5--skip_txttrue--skip_imgstrue--number_of_books_per_page10Start render websiteRun the filerender_website.pywith the following options:category_url- the category urltululu.org;--dest_folder- path to the directory with parsing results: pictures, books, JSON;--json_path- specify your path to *.json file with results;--number_of_books_per_page- number of books per page.Example:poetryrunpython3tululu_offline/render_website.pyhttp://tululu.org/l55/--number_of_books_per_page10--json_pathresult/books.json--dest_folderresultHow to run lint filesmakelintHow to run testsmaketestLicenseTululu-offline is licensed under the MIT License. SeeLICENSEfor more information.Project goalThe code is written for educational purposes in an online course for web developersdvmn.org.
Package: tulyp
tulyptulypdisplays the lyrics of the currently playing song in the terminal.
It checks for lyrics from 3 sources (stops at the first successful result):genius.comgoogle.comazlyrics.comTulyp only works with music players which are compliant with themprisspecification (e.g. Spotify, ncspot).
You can specify the player to use as a commandline argument:tulyp spotify.
If no player is provided ncspot will be used.Lyrics will be displayed in a curses window and you can use the arrow keys or j/k to scroll up and down.Lyrics get saved under~/.cache/lyrics/artist-title.
If there are cached lyrics for a song, no queries will be executed.Tulyp continously checks what song is currently playing and automatically reloads itself, to show the appropriate lyrics.
You can switch between lyrics sources with number keys:1 - genius2 - google3 - azlyricsDependencies (they will be installed withtulyp)lyricsgeniusprovides API to get lyrics from genius.comdbus-pythonto get the currently playing song through dbusrequeststo search for lyrincs on googlebeautifulsoup4to extract lyrics from htmlInstallFrom PyPipipinstall--usertulypFrom sourcegitclonehttps://github.com/laszloszurok/tulyp.gitcdtulyp
python-mbuild
pipinstall--userdist/tulyp-0.0.3-py3-none-any.whlNamingwe got a terminal user interface -> tuwe are dealing with lyrics       -> lythe program is written in python -> pI am so good at naming things.
Package: tumbleoffgrid
How to use tumbleoffgridDownload your tumblr export.In your home directory, create a folder called 'tumbleoffgrid'Run tumbleoffgridWhat it doestumbleoffgrid will automatically extract your Tumblr export, and
build a (very) basic page allowing you to view each individual post on
your own computer.What it will do (future)Give you ability to view thumbnailsPotentiallyre-connect to other blogs again
Package: tumbleweed
tumbleweedA simple framework for all your blogging needsSetupInitialize the blog objectblog = td.Blog(
        title="The Burger Historian",
        description="Brief snippets of the origin of my favorite food",
        author="Daniel"
        )Add a post to your blog.Notice that markdown and inline html is fully supported!blog.add('Why Vim is better than Emacs', 
    """
    1. Because I say so
    2. My hands are **too small** to type C-y
    3. Refer to item 1
    """
)Run your appblog.run(port=8000)DetailsTheBlogobject inherits the default Flask object, so you can use any default
flask options to start the server
Package: tumblrdotcom
Tumblr-Dot-ComOwO What's this?! Nyaa!!1An unofficial Tumblr API client. Includes support for polls.Installpip install tumblrdotcomUsageExampleimportosfromdatetimeimporttimedeltafrompprintimportpprintfromtumblrimport*tumblr=Tumblr(blog="pizza",# or 'pizza.tumblr.com'client_key=os.getenv("CONSUMER_KEY"),client_secret=os.getenv("CONSUMER_SECRET"),oauth_key=os.getenv("OAUTH_TOKEN"),oauth_secret=os.getenv("OAUTH_SECRET"),)response=tumblr.post(content=(Heading("Hello, World!"),Text("Oh boy! Isn't it great to have a tumblr!"),Row(Image("clown_left.jpg","image/jpeg","A photo clown holding their right thumb up towards the camera"),Image("clown_right.jpg","image/jpeg","A photo clown holding their left thumb up towards the camera"),),Poll("Don't you think so?",["Yes","No"],expire_after=timedelta(days=1),),),tags=["pizza","I can't even remember why they were deleted"],)pprint(response)
Package: tumblr-noauth
Tumblr with no OAuthTL;DR:tumblr_noauthis a Python package which provides aTumblrSession(email, password)class which extendsrequests.Sessionand provides a Tumblr login/logout process.Tumblr supplies anOAuth APIwhich you can use for fairly simple tasks,
mostly fordashboard-like functions; there’s a lot left out, such asChecking if a URL is available for creating a new blog; the endpoint atwww.tumblr.com/check_if_tumblelog_name_is_availablerequires authenticationProbably others which I forgetWith no official way to access that data,tumblr_noauthprovides a workaround:
emulate a whole Tumblr “session”; you feed it a username and password (whicharen’t stored, even in theTumblrSessionobject) and it performs a login
request (and a logout request with__exit__or at the end of thewithclause).Under the hood, aTumblrSessionis arequests.Sessionwith some
special behavior optimized for use with Python’swithstatements.The following methods in aTumblrSessionobject are specialized to make thehttps://www.tumblr.com/prefix optional:deletegetheadoptionspatchpostputi.e. the high-level HTTP requests.Example usage:import json
import tumblr_noauth

with open('creds.json') as f:
    creds = json.load(f)

with TumblrSession(creds['email'], creds['password']) as session:
    data = {'name': staff}
    resp = session.post('check_if_tumblelog_name_is_available',
    data=data)

    print(resp, ';', resp.text)Where thewithclause automatically logs in and out of Tumblr.For additional “authenticity”, you might want to set your headers to something
like...# this is lying
headers = {
    'Host': 'www.tumblr.com',
    'Origin': 'https://www.tumblr.com',
    'Referer': 'https://www.tumblr.com/dashboard',
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36',
    'X-Requested-With': 'XMLHttpRequest',
}
Package: tumblr-scraper
tumblr-scrapertumblr-scraperis a command-line tool written in Python for scraping photos and videos from tumblr blogs.InstallationTo get started, you can installtumblr-scraperby usingpip:$pipinstalltumblr-scrapertumblr-scrapersupports Python 3.7+.UsageYou can scrape the media from a blog by running:$tumblr-scraper<blog>All of the media will be downloaded in a directory named after the blog in your current working directory:<cwd>/<blog>ArgumentsHere are the command-line arguments available:usage: tumblr-scraper [-h] [-v] blog

positional arguments:
    blog            The name of the tumblr blog

optional arguments:
    -h, --help      show this help message and exit
    -v, --verbose   Enable debugging
Package: tumblr_terminal
# Tumblr_TerminalCreative name, huh? Tumblr_Terminal lets you blog your frustrations from the comfort of your terminal. Check out the examples below.## InstallationI developed this with Python 2.7.6. If you are having trouble running it on your machine with Python 3.4+ or another version of Python, hit me up and we’ll try to debug.First, make sure you have a Tumblr account. This may or may not be a wise choice, depending on your levels of self-control.Once you have one, you need to get login credentials. Namely, your Consumer API Key, and Consumer Secret Key.Go tohttps://www.tumblr.com/oauth/appsto register an application. The only information that you absolutely need to provide are the ‘Application name’ and ‘Administrative contact email’. These values can be whatever you want them to be, as the main purpose is just to retrieve the keys. A ‘default callback URL’ is needed to register, though. If you have plans for developing a web application that utilizes the API to integrate Tumblr into, for example, your personal website so that people can post about how cool you are, then you can set this to your domain name. But if you do not care, you can either set it to ‘/’ (without the apostrophes, of course), or ‘http:127.0.0.1’, where the latter option allows you to develop on your local machine.Now that you have your Consumer and Consumer Secret keys, install Tumblr_Terminal by running:pip install tumblr_terminalIf everything went smoothly, when you start up your terminal and typetumblr, you should be prompted to enter your Consumer and Secret Keys, after which you will be told to follow a link.Go through the link, and you will be asked to allow the application to access your information. Allow it, then copy the redirect URL and paste it into the terminal as instructed.After following the instructions, restart your terminal and typetumblrortumblr –usage. If all went well, you should not be met with an infuriating traceback for some error or another. Awesome!## FeaturesAs of version 0.1, one can only make text posts. More features, including but not limited to posting pictures, quotes, audio and aspects such as draft and queue management are coming soon-ish.## ExamplesTo make a text post without a title:` $ tumblr-t"My post" `For a text post with a title:` $ tumblr-tt"My post" `To make a text post with tags:` $ tumblr-t"My post"--tags"tag1, tag2,tag3..."`Now, you can specify whether your post is published, saved as a draft, or put on your queue:To publish a text post:-tor-ptTo save a text post as a draft:-dtAnd, to queue a text post:-qtUsetumblr –usagefor a reference to some of the commands.
## CreditTheinteractive_console.pymodule is a modified version of the file in Tumblr’s official Python client, found [here](https://github.com/tumblr/pytumblr). Please read their [LICENSE](https://github.com/tumblr/pytumblr/LICENSE) for more information regarding distribution and usage.## Contactsahil_prasad@brown.edu