Saravanan666/pypi-org huggingface dataset:
Package: texttunnel
texttunnel: Efficient text processing with GPT-3.5 and GPT-4This package offers a straightforward interface for integrating the GPT-3.5 and GPT-4 models into your natural language processing pipelines. It is optimally designed for the following scenario:Suppose you possess a corpus of text data that you want to analyze using the GPT-3.5 or GPT-4 models. The goal is to perform extractive NLP tasks such as classification, named entity recognition, translation, summarization, question answering, or sentiment analysis. In this context, the package prioritizes efficiency and tidiness to provide you streamlined results.🚧 When updating the package please check thechangelogfor breaking changes. 🚧Features:📄 Output Schema: UtilizesJSON Schemaalongside OpenAI's function calling schema to define the output data structure.✔️ Input Validation: Ensures well-structured and error-free API requests by validating input data.✅ Output Validation: Checks the response data from OpenAI's API against the expected schema to maintain data integrity.🚀 Efficient Batching: Supports bulk processing by packing multiple input texts into a single request for the OpenAI's API.🚦 Asynchronous Requests: Facilitates speedy data processing by sending simultaneous requests to OpenAI's API, while maintaining API rate limits.💰 Cost Estimation: Aims for transparency in API utilization cost by providing cost estimates before sending API requests.💾 Caching: Usesaiohttp_client_cacheto avoid redundant requests and reduce cost by caching previous requests. Supports SQLite, MongoDB, DynamoDB and Redis cache backends.📝 Request Logging: Implements Python's nativeloggingframework for tracking and logging all API requests.InstallationThe package is available onPyPI. To install it, run:pipinstalltexttunnelor via poetry:poetryaddtexttunnelNote: If you want to use caching, you need to install the aiohttp_client_cache extras. Please refer to theaiohttp_client_cachedocumentation for more information.UsageCheck the docs:https://qagentur.github.io/texttunnel/Create an account onOpenAIand get an API key. Set it as an environment variable calledOPENAI_API_KEY.Check theexamplesdirectory for examples of how to use this package.If your account has been granted higher rate limits than the ones configured in the models module, you can override the default attributes of the Model class instances. See documentation of the models package module.DevelopmentTo get started with development, follow these steps:clone the repositoryinstallpoetryif you don't have it yetnavigate to the project folderrunpoetry installto install the dependenciesrun the tests withpoetry run pytest -vThis project usesGoogle-styledocstrings andblackformatting. The docs are automatically built based on the docstrings.
Package: text-tweet-ben
Text and Tweet Preprocessing packageThis package is created by Behdad (Ben) Ehsani. The package is designed for cleaning tweets on Twitter immediately and with one-shot coding. Additionally, some functions can be used for text preprocessing. An example is provided to demonstrate efficient usage.Installing the librarypip install preprocessing-text-benUnistalling the librarypip uninstall preprocessing-text-benExample of one-shot cleaning the code:import preprocessing-text-ben as pp

def get_clean(x):
    
    # Convert the string to lowercase
    x = str(x).lower()
    
    # Expand contractions like "don't" to "do not"
    x = pp.cont_to_exp(x)
    
    # Remove any email addresses from the string
    x = pp.remove_emails(x)
    
    # Remove any URLs from the string
    x = pp.remove_urls(x)
    
    # Remove any HTML tags from the string
    x = pp.remove_html_tags(x)
    
    # Remove any retweet tags (RT) from the string
    x = pp.remove_rt(x)
    
    # Remove any accented characters from the string
    x = pp.remove_accented_chars(x)
    
    # Remove any special characters from the string
    x = pp.remove_special_chars(x)
    
    # Return the cleaned string
    return x


#here is the cleaned text in one shot
df['your_cleaned_column'] = df['your_text_column'].apply(lambda x: get_clean(x))version: 0.0.1
Package: textual
TextualTextual is aRapid Application Developmentframework for Python.Build sophisticated user interfaces with a simple Python API. Run your apps in the terminal and aweb browser!🎬 DemonstrationA quick run through of some Textual features.https://user-images.githubusercontent.com/554369/197355913-65d3c125-493d-4c05-a590-5311f16c40ff.movAboutTextual adds interactivity toRichwith an API inspired by modern web development.On modern terminal software (installed by default on most systems), Textual apps can use16.7 millioncolors with mouse support and smooth flicker-free animation. A powerful layout engine and re-usable components makes it possible to build apps that rival the desktop and web experience.CompatibilityTextual runs on Linux, macOS, and Windows. Textual requires Python 3.8 or above.InstallingInstall Textual via pip:pip install textualIf you plan on developing Textual apps, you should also install the development tools with the following command:pip install textual-devSee thedocsif you need help getting started.DemoRun the following command to see a little of what Textual can do:python -m textualDocumentationHead over to theTextual documentationto start building!Join us on DiscordJoin the Textual developers and community on ourDiscord Server.ExamplesThe Textual repository comes with a number of examples you can experiment with or use as a template for your own projects.🎬 Code browserThis is thecode_browser.pyexample which clocks in at 61 lines (includingdocstrings and blank lines).https://user-images.githubusercontent.com/554369/197188237-88d3f7e4-4e5f-40b5-b996-c47b19ee2f49.mov📷 CalculatorThis iscalculator.pywhich demonstrates Textual grid layouts.🎬 StopwatchThis is the Stopwatch example from thetutorial.https://user-images.githubusercontent.com/554369/197360718-0c834ef5-6285-4d37-85cf-23eed4aa56c5.movReference commandsThetextualcommand has a few sub-commands to preview Textual styles.🎬 Easing referenceThis is theeasingreference which demonstrates the easing parameter on animation, with both movement and opacity. You can run it with the following command:textualeasinghttps://user-images.githubusercontent.com/554369/196157100-352852a6-2b09-4dc8-a888-55b53570aff9.mov🎬 Borders referenceThis is the borders reference which demonstrates some of the borders styles in Textual. You can run it with the following command:textualbordershttps://user-images.githubusercontent.com/554369/196158235-4b45fb78-053d-4fd5-b285-e09b4f1c67a8.mov🎬 Colors referenceThis is a reference for Textual's color design system.textualcolorshttps://user-images.githubusercontent.com/554369/197357417-2d407aac-8969-44d3-8250-eea45df79d57.mov
Package: textual-bee
textual-beeGet it on PyPI:pipinstalltextual-bee
textual-beeHow to playSubmit words that include the center letter and are at least 4 letters long.Press the shuffle button (spacebar) to shuffle the outer letters.Press CTRL-C to quit.Press CTRL-R to reset and choose a new set of letters.Press (tab) to view your already-found words.ScoringYour grade is based on how many of the possible words you find:Words foundGrade0-2%Beginner2-5%Good Start5-8%Moving Up8-15%Good15-25%Solid25-40%Nice40-50%Great50-70%Amazing70-100%Genius100%Queen BeeNotes:The word list doesn't correspond exactly to Sam's, but it was the closest I could find (margin of error seemed to be about 10%). In general, this game allows more proper nouns and fewer esoteric words, but it varies depending on the setup.Inspired byhttps://github.com/ajeetdsouza/clidle
Package: textual-countdown
textual-countdownIntroductionThis library provides a simple visual countdown widget, designed to subtly
let the user know that a period of time is passing; essentially a simple
"wait some time" progress bar.Uses could be as a non-intrusive countdown in some sort of quiz application,
or a cool-down display in an application that's waiting to hit a busy API
endpoint again.InstallingThe package can be installed withpipor related tools, for example:$pipinstalltextual-countdownDemoOnce installed, you can try a demo of the library with:$python-mtextual_countdownUsing the widgetTo import the widget, do:fromtextual_countdownimportCountdownTheCountdownwidget can then be composed into your application like any
other Textual widget.Controlling the countdownThe widget provides the following methods:start(countdown: float) -> None-- call this to start a countdown,
giving the number of seconds to count down.cancel() -> None-- to cancel a countdown.There is also ais_runningproperty to check if the countdown is running.EventsThe following events will be sent from the widget:Countdown.Started-- posted when a countdown starts.Countdown.Finished-- posted when a countdown finishes.Countdown.Cancelled-- posted if a countdown is cancelled.All events have acountdownproperty that points to the widget that sent
them;StartedandFinishedalso have acountingproperty that gives
the amount of time being counted.StylingThe non-counting colour for the countdown display is controlled by the
standard TextualcolourCSS style. The active time-remaining portion of
the display is controlled by acountdown--remainingcomponent class.As an example, if you wanted to colour the non-running/expired portion of a
countdown as red, and the time remaining as green, you could do:Countdown{color:red;&>.countdown--remaining{color:green;}}Additionally, when aCountdownis running, it will have acountdown--runningclass applied; this allows styling of non-running and
running countdown widgets.
Package: textual-dad-joke
Textual Dad JokeIntroductionThis library provides a widget that displays a dad joke. No, I'm not even
kidding.InstallingThe package can be installed withpipor related tools, for example:$pipinstalltextual-dad-jokeThen what?Import it as you would any other widget from a library:fromtextual_data_jokeimportDadJokeand then compose theDadJokewidget into your application as you would any
other widget.The widget has atellmethod if you want it to tell another joke. It'll
also swallow any errors but will post aDadJoke.FellFlatmessage if there
was an error.Erm... okay. Anything else I should know?The widget needs an internet connection and is usingicanhazdadjoke.comas the backend. Also, I
won't be held responsible for the content of any joke served. That's all on
you.
Package: textual-datepicker
Textual: DatePickerA DatePicker widget fortextual. It can be used standalone or with a DateSelect opening the dialog.DateSelect with DatePicker example:Usagefromtextual_datepickerimportDateSelectDateSelect(placeholder="please select",format="YYYY-MM-DD",picker_mount="#main_container")Define an initial value:importpendulumfromtextual_datepickerimportDateSelectDateSelect(placeholder="please select",format="YYYY-MM-DD",date=pendulum.parse("2023-02-14"),picker_mount="#main_container")Installationpipinstalltextual-datepickerRequires textual 0.6.0 or later.LimitationsThis textual widget is in early stage and has some limitations:It can only open below, not above: Make sure to reserve space below for the dialog.It needs a specific mount point (picker_mount) where the dialog
shall appear. This is needed because the container widget with the select
itself could be too small. Maybe in future versions this will no longer be
needed.
Package: textual-dominfo
Textual DOMInfoIntroductionThis library provides a very simple debugging aid for Textual applications;
designed as a very quick and easy "what widget is under the mouse and how is
it styled" tool.TO BE CLEAR:This isn't a full-blown DOM inspection tool; it's not even
close. It's a quick and dirty but handy bit of code to quickly check what
part of the terminal display belongs to what underlying widget and to see
how it's styled.InstallingThe package can be installed withpipor related tools, for example:$pipinstalltextual-dominfoUsingAs mentioned above, this is only ever intended to be used when trying to
debug something, and also note that it will take overthe
tooltipsof any
widgets it is attached to.To use, import the class:fromtextual_dominfoimportDOMInfoand then in your code somewhere, probably in theon_mountmethod of your
application or main screen, attach it like this:DOMInfo.attach_to(self)This will then install the information tooltip in that widget and all of its
descendants.To see this in action right away, with the library installed into your
development environment, do this:$python-mtextual_dominfo
Package: textual-filedrop
textual-filedropAdd filedrop support to yourTextualapps, easily drag and drop files into your terminal apps.Tested onWindowsandmacOS.Nerd Fontis required to display file icons.Installpip install textual-filedroporgit clone https://github.com/agmmnn/textual-filedrop.git
cd textual-filedrop
poetry installNoteSince version0.10.0Textual supportsbubblefor thepaste event(Textualize/textual#1434). So if the terminal where your app is running treats the file drag and drop as a paste event, you can catch it yourself with theon_pastefunction without widget.Usagegetfilesgetfilesreturns an object containing thepath, filename, extensionandiconof the files.fromtextual_filedropimportgetfilesclassMyApp(App):...defon_paste(self,event)->None:files=getfiles(event)print(files)FileDropWidgetAs long as theFileDropwidget is in focus, it will give the information of the dragged files and render the file names with their icons on the screen.fromtextual_filedropimportFileDrop# add FileDrop widget to your appyieldFileDrop(id="filedrop")# focus the widgetself.query_one("#filedrop").focus()# when the files are droppeddefon_file_drop_dropped(self,message:FileDrop.Dropped)->None:path=message.pathfilepaths=message.filepathsfilenames=message.filenamesfilesobj=message.filesobjprint(path,filepaths,filenames,filesobj)# output: path, [filepaths], [filenames], [filesobj]You can find more exampleshere.Examplessubdomain_lister.pyDrag and drop the subdomain list files and see the results as a tree list.fullscreen.pyFullscreen example, will show the results in the textual console.hidden.pyAs long as focus is on, theFileDropwidget will be active even if it is not visible on the screen.without_widget.pyAn example that renders the object with the information of the dragged files returned from thegetfilesfunction to the screen withrich.json.Devpoetry install

textual console
poetry run textual run --dev examples/subdomain_lister.py
Package: textual-forms
Textual FormsDynamic forms forTextualTUI framework.Note: This library is still very much WIP 🧪. This means that breaking changes can be introduced at any point in time.AboutTextual Forms aims to make it easy to add forms to your Textual-powered applications.Development Requirementspython >=3.7,<4poetrytextual >=0.11.0Installpipinstalltextual-formsFormstextual_forms.forms.FormButtonstextual_forms.buttons.ButtonFieldstextual_forms.fields.StringFieldtextual_forms.fields.NumberFieldtextual_forms.fields.IntegerFieldCustom fields and validatorsfrom__future__importannotationsfromtypingimportAnyfromtextual_forms.fieldsimportFieldfromtextual_forms.validatorsimportFieldValidatorclassUUIDValidator(FieldValidator):defvalidate(self,value:str,rules:dict[str,Any])->tuple[bool,str|None]:returnTrue,NoneclassUUIDField(Field):validator=UUIDValidator()def__init__(self,name:str,*,value:str|None=None,required:bool=False,placeholder:str|None=None,**kwargs,):data:dict[str,Any]={"name":name,"value":value,"required":required,"placeholder":placeholder,"rules":{},}super().__init__(data,**kwargs)Examplefromrich.tableimportTablefromtextual.appimportApp,ComposeResultfromtextual.widgetsimportStaticfromtextual_forms.formsimportFormfromtextual_forms.fieldsimportStringField,IntegerFieldfromtextual_forms.buttonsimportButtonclassBasicTextualForm(App):defcompose(self)->ComposeResult:yieldStatic(id="submitted-data")yieldStatic("Order for beers")yieldForm(fields=[StringField("name"),IntegerField("age",required=True,min_value=21),],buttons=[Button("Submit",enabled_on_form_valid=True,)],)defon_form_event(self,message:Form.Event)->None:ifmessage.event=='submit':table=Table(*message.data.keys())table.add_row(*message.data.values())self.query_one('#submitted-data').update(table)if__name__=='__main__':BasicTextualForm().run()Initial renderValid formInvalid formContributingTBD
Package: textual-fspicker
textual-fspickerAn example oftextual-fspickerbeing used in a Textual applicationIntroductionThis library provides a simple set of filesystem navigation and picking
dialogs (actually, as of the time of writing, it only provides two, this is
a very early WiP you're seeing). The aim is to provide "ready to go" dialogs
that should also be fairly easy to tailor to your own applications.InstallingThe package can be installed withpipor related tools, for example:$pipinstalltextual-fspickerIt's early daysThis is a very early release of this code, it's still very much a work in
progress. This means things may change and break; it's also sitting atop
Textual which is, of course, still undergoing rapid development. As much as
possible I'll try and ensure that it's always working with the latest stable
release of Textual.Also, because it's early days... while I love the collaborative aspect of
FOSS, I'm highly unlikely to be accepting any non-trivial PRs at the moment.
Developing this is a learning exercise for me, it's a hobby project, and
it's also something to help me further test Textual (disclaimer for those
who may not have gathered, I am employed byTextualize).On the other hand: I'mveryopen to feedback and suggestions so don't
hesitate to engage with me in Discussions, or if it's a bug, in Issues. I
can't and won't promise that I'll take everything on board (see above about
hobby project, etc), but helpful input should help make this as useful as
possible in the longer term.The libraryRight at the moment there's just two dialogs available:FileOpen-- For selecting a file from the filesystem.FileSave-- For selecting a file for saving in the filesystem.SelectDirectory-- For selecting a directory from the filesysrem.You can see them in action in thedemo/test
code.Yes, I know that documentation is lacking right now -- I'm still fleshing
out how this will work and what it will provide -- so the best place to see
how the code can be used is in that demo/test code.TODOFlesh out what's displayed for directory entriesAdd lots of styling options for directory entriesSettle on a final set of default styles for the dialogsAdd a more file-save-oriented dialogAdd a directory picking dialogAdd file filtering (extensions usingSelect)Expose the hidden show/hide facility of the navigator in the dialogsBetter documentationTest on WindowsAdd custom mtime formattingAdd support for showing different times
Package: textual-game-of-life
textual-game-of-lifeAn implementation of Conway's game of life (cellular automata) in the terminal using textual.textual-game-of-lifeinstallationpip install textual-game-of-lifeusagetextual-game-of-lifetodomake brush draggable.add feature to make save file anything i.e. file dialogadd a way to change the brush size.add a command line interface for all the options and settings.make cursor black when on a white cell and white when on a black cell.make resize canvas not delete existing data.add toggle for starting/stopping the game.add about and help dialogs.add a way to save/load the current state of the game.add left and right to change the horizontal width of the canvas.add up and down to change the vertical width of the canvas.add a way to change the speed of the game.
Package: textual-imageview
textual-imageviewtextual-imageviewis a both a CLI tool andTextualwidget and for viewing images in the
terminal.UsageUse thevimgCLI command to quickly view an image in the terminal.vimg <path_to_image>Click and drag (or press W/S/A/D) to move around the image, and scroll (or press -/+) to zoom in/out of the image.vimgis built onImageView, aRichrenderable that renders images with padding/zoom, andImageViewer, aTextualwidget that adds mouse interactivity toImageView. Addtextual-imageviewas a dependency to use them in your Textual app!At the highest zoom level, each character corresponds to two image pixels. I've found thatvimgworks best with a GPU-accelerated terminal likeAlacritty.Installationpip install textual-imageviewFAQvimgworks great locally, but colors aren't displaying correctly when usingvimgover SSH. Why?Richdetermines terminal color supportby checking if theCOLORTERMenvironment variable is set totruecoloror24bit.echo $COLORTERMIf you know your terminal emulator supports truecolor - i.e.,vimgworks great locally - try setting the environment variable manually:export COLORTERM=truecolorLicensetextual-imageviewis distributed under the terms of theMITlicense.
Package: textual-key-recorder
Textual Key RecorderA tool to help record what keys result in what names in a Textual
application.InstallationThis tool can be installed from PyPi; ideally usingpipx:$pipxinstalltextual-key-recorderOnce installed, you can run it astkrec.UsageThis is mainly used for my own testing and exploring for now; but if you
find it interesting follow your nose; and if you're really interested drop
by theTextualize help resources and have a chat with
us.
Package: textual-keys
Textual KeysA simple terminal-based tool that helps you discover what keys turn up in aTextualapplication, as sent by your
terminal. It also helps you discover the names of the keys -- useful when
you want to create textualBindings for them.To install:$pipxinstalltextual-keysand then to run:$textual-keysNote thatCtrl+Cwill quit the application so, of
course, that particular key combination will never be shown.
Package: textual-mandelbrot
textual-mandelbrotIntroductionThis package provides a simple Mandelbrot set widget that can be used inTextualapplications, and also provides an
application that can be used to explore the classic Mandelbrot set in the
terminal.InstallingThe package can be installed usingpipx:$pipxinstalltextual-mandelbrotOnce installed you should be able to run the commandmandelexpand the
application will run.ExploringIf you usemandelexpto run up the display, the following keys are
available:KeysActionUp, w, kMove upShift+Up, W, KMove up slowlyDown, s, jMove downShift+Down, S, JMove down slowlyLeft, a, hMove leftShift+Left, A, HMove left slowlyRight, d, lMove rightShift+Right, D, LMove right slowlyPageUp, ]Zoom inPageDown, [Zoom outCtrl+PageUp, }Zoon in deeperCtrl+PageDown, {Zoom out wider*, Ctrl+UpIncrease "multobrot"/, Ctrl+DownDecrease "multibrot"Ctrl+Shift+UpIncrease "multibrot" in smaller stepsCtrl+Shift+DownDecrease "multibrot" in smaller stepsHomeCenter 0,0 in the display,Decrease iterations by 10<Decrease iterations by 100.Increase iterations by 10>Increase iterations by 100Ctrl+rReset to initial stateEscapeQuit the application1Colour set 12Colour set 23Colour set 3
Package: textual-markdown
Textual Markdown BrowserThis project is an experiment to see how far I could take the idea of a "Markdown browser" in the terminal, using theTextualframework.Markdown in the terminal is not unusual,Richhas a decent Markdown renderer, but its output is essentially static. Textual Markdown creates a more dynamic Markdown document you can interact with: there are working links, srollablr code fences, and tables.Links must be relative only and on the filesystem for now. These could be made to load from the network for a more browser like experience. It is also relatively easy to intercept links and handle them programatically. Opening up custom hypertext like applications.And finally, there is a TOC (Table Of Contents) extracted from the Markdown, which can be used to navigate the document.VideoA short video of me playing with the demo Markdown.https://user-images.githubusercontent.com/554369/208234316-be4e6626-c601-4dca-b8d1-59af9b4d08cd.movScreenshotsTry it outYou can installtextual-markdownfrom PyPI in the usual way:pip install textual-markdownHere's how you hopen a Markdown file:python -m textual_markdown README.mdDisclaimerAt time of writing, there is less than a weeks work in this. Which means you may (likely) find bugs.The futureSome (or all) of this repo will be rolled in toTextual. It may also become a project in its own right. If there is enough interest.