Saravanan666/pypi-org huggingface dataset:
Package: interactions.py
Interactions.pyA Feature-rich Discord Bot Framework for PythonA highly extensible, easy to use, and feature complete framework for Discord.interactions.pyis the culmination of years of experience with Discord's APIs and bot development. This framework has been built from the ground up with community feedback and suggestions in mind. Our framework provides a modern and intuitive set of language bindings for easy interaction with Discord.Key Featuresinteractions.py offers a wide range of features for building Python-powered Discord bots and web applications alike:✅ 100% coverage of the Discord API✅ Dynamic cache with TTL support✅ Modern and Pythonic API for easy interaction with Discord✅ Proper rate-limit handling✅ Feature parity with most other Discord API wrappers✅ Fully automated command synchronisationIn addition to core functionality,interactions.pyprovides a range of optional extensions, allowing you to further customize your bot and add new features with ease.ExtensibilitySo the base library doesn't do what you want? No problem! With builtin extensions, you are able to extend the functionality of the library. And if none of those pique your interest, there are a myriad of other extension libraries available.Just typebot.load_extension("extension")ExtensionsPrefixed CommandsPrefixed commands, message commands, or legacy commands.
Whatever you want to call them, by default theinteractions.pylibrary will not handle these. But rest assured this extension will get you going✅ Automatic command registration✅ Annotation supportDebug ExtensionA fully featured debug and utilities suite to help you get your bots madeJuriggedA hot reloading extension allowing you to automagically update your bot without rebootsSentryIntegrates Sentry.io error tracking into your bot with a single lineConsoleAddsaiomonitorsupport with enables cli commands over a web interfacePaginatorsEasily create multi-page embeds without having to implement the UXWhere do I start?Getting started withinteractions.pyis easy! Simply install it viapipand start building your Discord application in Python:pip install -U discord-py-interactionsimportinteractionsbot=interactions.Client()@interactions.listen()asyncdefon_startup():print("Bot is ready!")bot.start("token")Withinteractions.py, you can quickly and easily build complex Discord applications with Python. Check out ourguidesfor more information. Or join ourdiscord.
Package: interactions-restful
interactions restfulA library for interactions.py allowing runtime API structuresInstallationUsing pip:pip install interactions-restfulUsing poetry:poetry add interactions-restfulDon't forget to specify backend you want to use:FastAPI:pip install interactions-restful[fastapi]Quart:pip install interactions-restful[quart]Also make sure to install an ASGI server:Uvicorn:pip install interactions-restful[uvicorn]Hypercorn:pip install interactions-restful[hypercorn]Daphne:pip install interactions-restful[daphne]You can also install both your backend and ASGI server at once, for examplepip install interactions-restful[fastapi,uvicorn]Simple (FastAPI) exampleMain filemain.pyimportinteractionsfromfastapiimportFastAPIfrominteractions_restful.backends.fastapiimportFastAPIHandlerapp=FastAPI()client=interactions.Client(token="token")FastAPIHandler(client,app)client.load_extension("api")Extension fileapi.pyimportinteractionsfrominteractions_restfulimportrouteclassMyAPI(interactions.Extension):@route("GET","/")defindex(self):return{"status":"Hello, i.py"}@interactions.slash_command()asyncdeftest_command(self,ctx):awaitctx.send("Hello, API")Runuvicornmain:app--reloadBackendsCurrently, the library support only Quart and FastAPI as a backend for building an API, but if you don't want to use them you can create own backend.
Package: interactions-tasks
Simple example, triggers every 3 seconds:frominteractions.ext.tasksimportIntervalTrigger,create_task@create_task(IntervalTrigger(3))asyncdefmy_task():print("hi")my_task.start()Multiple conditions (example will be improved when more triggers are added)The task will only run every 5 seconds because every trigger needs to be readyfrominteractions.ext.tasksimportIntervalTrigger,create_task@create_task(IntervalTrigger(3),IntervalTrigger(5))asyncdefmy_task():print("hi")my_task.start()To have the task run when any trigger is ready, use the OrTrigger.The task will run every 3 and 5 seconds (it may run twice occasionally due to how timing works)frominteractions.ext.tasksimportIntervalTrigger,OrTrigger,create_task@create_task(OrTrigger(IntervalTrigger(3),IntervalTrigger(5)))asyncdefmy_task():print("hi")my_task.start()Classes are special, due to how functions turn into methods and other python black magicThere are two ways to properly do tasks in classesThe first way is to passselfwhen starting the taskAny args or kwargs passed toTask.start()will be prepended to the functionfrominteractionsimportExtensionfrominteractions.ext.tasksimportIntervalTrigger,create_taskclassCog(Extension):def__init__(self,client):self.method.start(self)@create_task(IntervalTrigger(1))asyncdefmethod(self):print(self)The other way is just to wrap the method manuallyfrominteractionsimportExtensionfrominteractions.ext.tasksimportIntervalTrigger,create_taskclassCog(Extension):def__init__(self,client):self.method=create_task(IntervalTrigger(1))(self.method)self.method.start()asyncdefmethod(self):print(self)
Package: interactions-transcript
interactions-transcriptThis project is a improved version ofmahtoid's DiscordChatExporterPy library, ported to an extension of interactions.py, another Discord API wrapper, with extra features.WIP: This extension is currently work-in-progress, which means it might not function wellInstallationInstall from PyPipip install interactions-transcriptInstall from githubpip install git+https://github.com/ItsRqtl/interactions-transcript.gitBuild from sourcegit clone https://github.com/ItsRqtl/interactions-transcript.gitcdinteractions-transcript
pip install .UsageLoading the extensionfrominteractionsimportClientclient=Client(token="...")client.load("interactions.ext.transcript")client.start()Using the extensionawaitChannel.get_transcript(limit=...)Another way to usefrominteractionsimportClientfrominteractions.ext.transcriptimportget_transcript...awaitget_transcript(Channel,limit=...)...client.start()Parameters of methodget_transcript:ParameterTypeDescriptionDefault Valuechannelinteractions.ChannelThe channel to get transcript fromlimitintThe limit of messages to get100pytz_timezonestrThe timezone to use"UTC"military_timeboolWhether to use military time or notFalsefancy_timeboolWhether to use fancy time or not (only with html mode)FalsemodestrThe mode to use for the transcript (html, json, csv, or plain)"html"AttributionsThis project uses a modified version of the parser, cache, html, and css code frommahtoid's DiscordChatExporterPy library.LicenseThis project follows the original library and is licensed under theGNU General Public License v3.0. Check theLICENSEfor more information.
Package: interactiontransformer
Welcome to InteractionTransformerExtract meaningful interactions from machine learning models to obtain machine-learning performance with statistical model interpretability.Code accompanying the manuscript: "Don't Dismiss Logistic Regression: The Case for Sensible Extraction of Interactions in the Era of Machine Learning"Preprint:https://www.biorxiv.org/content/10.1101/2019.12.15.877134v1Please see our wiki for more information on setting up and running this package:https://github.com/jlevy44/InteractionTransformer/wikiQUICKSTART DEMOS can be found here:Python:https://github.com/jlevy44/InteractionTransformer/blob/master/demos/InteractionTransformerPythonDemo.ipynbR:https://github.com/jlevy44/InteractionTransformer/blob/master/demos/InteractionTransformerRDemo.RmdInstallPython:We recommend installing using anaconda (https://www.anaconda.com/distribution/).
First, install anaconda. Then, run:condacreate-ninteraction_transform_environpython=3.7
condaactivateinteraction_transform_environFinally:pipinstallinteractiontransformerRFirst, install the python pip package. Then:devtools::install_github("jlevy44/interactiontransformer")Or:library(devtools)install_github("jlevy44/interactiontransformer")Alternative Python Install Instructionsgitclonehttps://github.com/jlevy44/InteractionTransformercdInteractionTransformer
pipinstall.# make sure conda is runningAuthor👤Joshua LevyGithub:@jlevy44
Package: interactionviz
Interaction Viz.A no-nonsense, pure Python, renderer / visualizer and loader for theINTERACTIONdataset.QuickstartIf you have Python >= 3.7.5, just use$ pip install interactionviz(probably it's best to run this inside of an activatedvirtualenvof some kind)To view a scene, you can use$ interactionviz --root-dir </root/of/interaction/dataset> --dataset DR_USA_Intersection_EP0 --session 1This will open the experimental web viewer.If you have an older version of Python, you can usepyenvto install a more recent version.🧪 Experimental Feature: 3D Web viewerAn experimental feature is provided to support rendering the tracks in a webviewer using THREE.js.
To try this out, run the following command and navigate tohttp://localhost:8000/viewer.$ interactionviz --viewer-kind web --root-dir </root/of/interaction/dataset>Rendering gifsWhen using the interaction dataset for training models, it's useful to be able to write gifs, which may
be logged to Tensorboard. See the built-in functionwrite_gif, to render gifs directly.Using this as a libraryThe code is modular and easy to extend. Beware this is an early version and the API
might change unexpectedly in future versions.Here's an example of importing and using this viewer in your own code.frominteractionviz.mapsimportload_map_xmlfrominteractionviz.tracksimportload_tracks_filesfrominteractionviz.viewersimportArcadeViewer# Note: You can use the following to render in 3D in a web browser,#   from interactionviz.viewers import WebViewerinteraction_map=load_map_xml("<path/to/map.osm_xy>")tracks=load_tracks_files("<path/to/vehicle_tracks_000.csv>")viewer=ArcadeViewer(interaction_map,tracks)viewer.run()
Package: interactive-buttons
Interactive Buttons LibraryA Python library for creating interactive buttons with keyboard navigation.InstallationYou can install the Interactive Buttons library via pip:pipinstallinteractive_buttonsUsageHere's an example of how to use the library to create interactive buttons withlinear_buttons:frominteractive_buttonsimport*fromcoloramaimportFore,Back# Change button color :# Way 1 :Variables.HIGHLIGHT="\033[30;43m"# Yellow background# Way 2 :fromcoloramaimportFore,Back# Needs to be installed by running the command `pip install colorama`Variables.HIGHLIGHT=Back.RED+Fore.BLACK# Red background and Black text# Change decorator (in [button text] the square brackets are the decorators) :# Way 1 :SVariables.DECORATOR=["<",">"]# [button text] -> <button text># Way 2 :Variables.DECORATOR=[]# [button text] -> button text# Way 3 :Variables.DECORATOR=["> "]# [button text] ->  > button text# Creating functionsdeffunc1(text):print(text)deffunc2():print("Hi !")# Define button configurations as a listbuttons=[dict(name="Button 1",function=func1,args=("Hello !")),dict(name="Button 2",function=func2)]# Create linear buttons and start the interactive interfacelinear_buttons(buttons)Output exampleExample withcolumn_buttons:⚠️ WARNING : To use this function, you must not use an emulated terminal.frominteractive_buttonsimport*# Creating functionsdeffunc1(text):print(text)deffunc2():print("Hi !")# Define button configurations as a listbuttons=[dict(name="Button 1",function=func1,args=("Hello !")),dict(name="Button 2",function=func2),dict(name="Button 3",function=func1,args=("Hello2 !")),dict(name="Button 4",function=func2),]# Create column buttons and start the interactive interfacecolumn_buttons(buttons)Output exampleExample withmatrix_buttons:⚠️ WARNING : To use this function, you must not use an emulated terminal.frominteractive_buttonsimport*fromcoloramaimportFore,BackVariables.SPACES+=Variables.SPACESVariables.HIGHLIGHT=Back.RED+Fore.BLACKdefsay(message):print(message)returnmessagematrix=[[dict(name="Button A Line 1",function=say,args="A1"),dict(name="Button B Line 1",function=say,args="B1")],[dict(name="Button A Line 2",function=say,args="A2"),dict(name="Button B Line 2",function=say,args="B2")],]output=matrix_buttons(matrix)print(output)# You can now get the returned value of your functionOutput exampleProject DescriptionThe Interactive Buttons library allows you to easily create interactive buttons for user interaction in your Python applications. It provides a simple and intuitive way to create a list of buttons, associate them with functions, and navigate through them using the keyboard. This library is particularly useful for creating text-based interactive menus and interfaces.GitHub RepositoryCheck out theGitHub repositoryfor the latest updates, issues, and contributions. Feel free to contribute to the project or report any issues you encounter.
Package: interactive-cli
interactive_cliinteractive_cli usageThis module allows to create programs that show an interactive command line interface. The program waits for the user input and then acts on user interaction.Example:frominteractive_cli.blocking_cli_appimportBlockingCLIAppfrominteractive_cli.cli_commandimportCLICommandif__name__=="__main__":app=BlockingCLIApp("Hello world CLI")app.add_command(CLICommand("say hello world",lambdaapp,page:app.print("Hello world")))app.start()results inHello world CLI
===============

Use 'help' to get a detailed list of commands.


Enter command [h,q,s]:More examples are included in theexampledirectory.InstallationViapippipinstallinteractive_cliFrom sourceTo run this program from the code directly,pythonandpoetry(pip install poetry) are required. Clone or download the repository.To install all the dependencies, use your command line and navigate to the directory where thisREADMEfile is located in. Then runpoetryinstallFor developmentFor development installation perform theFrom sourceinstallation.For installing new packages, always runpoetry add <pip-package-name>instead ofpip install <pip-package-name>.Launch the program either check out theExecutionsection or use theRun and Debug-side panel of VSCode.If the interpreter of the virtual environment does not show up in VSCode, add it manually. The virtual environments are located in{cache-dir}/virtualenvs/<venv-name>/Scripts/python.exewhere the{cache-dir}depends on the operating system (~/.cache/pypoetry,~/Library/Caches/pypoetryorC.\Users\%USERNAME%\AppData\Local\pypoetry\Cache).ExecutionTo execute the program usepoetryrunpython-minteractive_cli
Package: interactive-click
interactive-clickInstallationpip install interactive-clickUsageimportclick@click.command()@click.option('--name',prompt='Your name',help='The person to greet.')defcli(name):click.echo('Hello%s!'%name)if__name__=='__main__':importsys# Can be simply run by:#     run_interactive(cli)# But we can also wrap it by checking whether the user is running the script without any argumentsiflen(sys.argv)==1:# No arguments, run interactive modetry:frominteractive_clickimportrun_interactiverun_interactive(cli)exceptImportError:cli()else:cli()
Package: interactivecrop
Jupyter Interactive Cropping WidgetAn interactive widget to rapidly crop images in Jupyter notebooks.Widget Documentation, Examples, and UseThis widget can be found on the PyPI repositoryhere, and can be installed viapip install interactivecrop.Build InstructionsInstall Jupyter and enable ipywidgetsAfter cloning this repo, you can build the widget from source and use in a jupyter lab/notebook instance. Before this widget will work properly, you will need toinstall and enable jupyter widgets. To enable the widgets forJupyter Labusing pip follow the below commands:pip install jupyterlab #installs jupyter lab and gives access to jupyter lab CLI
pip install ipywidgets
jupyter nbextension enable --py widgetsnbextension
jupyter labextension install @jupyter-widgets/jupyterlab-manager* Feel free to run this in your default python environment or a separate kernel; If using a separate kernel make sure it has been added to the available kernels via theipykernelspackageInstalling requirements for this widgetOnce Jupyter has been installed and enabled, check that all requirements have been downloaded by runningpip install -r requirements.txtfrom this directory. Then, open up a jupyter lab instance by runningjupyter lab, and once inside try the below example using the images in thesample_imagedirectory:frominteractivecrop.interactivecropimportmainascropfrominteractivecrop.samplesimportsample_images,sample_namescrop(sample_images,image_name_list=sample_names)For further examples of cropper use, see theExamples.ipynb(make sure to run thejupyter labstartup command from the root directory when runningExamples.ipynb).
Package: interactive-curve-fit
interactive_curve_fitA Python project enables you to do curve fitting on spectrum data interactively on GUI.
You can visualize your spectrum and fit the optional number of peaks on GUI using Scipy.optimize.curve_fit method.How to use?Trytutorial.pywith your spectrum data!Spectrum data format must be like the table belowxy01113230343431511......Steps to curve-fitTeach your initial guess of the positions of each peaks roughly to Fitter.frominteractive_curve_fitimportread_data,Guessor,Fitterdata=read_data(data,headers=2,sep=',')guessor=Guessor(data,background=10,method='drag')guess=guessor.guess()Initial Guess methodmouse-dragging (wrap up peak area by mouse-dragging)click (click the top and the both edges of each peaks)ScreenshotGive your spectrum data and your guess to Fitter.fitter=Fitter(data,guess)fitter.run(method='gaussian')Supported fitting functionsgaussian functionpolynomial functionOutput information includesposition (x, y) of each peaksbaseline height of the spectrumbandwidth of each peaks with its CI (confidential interval)Save the fitting resultsfitter.save_data('out/fitting_result.csv')Other featuresbmp_to_csv converts bmp file to csv file.frominteractive_curve_fitimportbmg_to_csvbmp_to_csv('data/line_spectrum.bmp')data=read_data('data/line_spectrum.csv')Fitter can visualize fitting resultsfitter.plot_fit()Fitter can also display fitting results on terminalfitter.display_results_terminal(ci=2)Supported supectrum file formatascii file(.asc .csv .txt etc..)bmp image(.bmp .jpg .png .jpeg etc..)excel sheet files, table of html are planed to be suported in the near future.Features that are planned to be supported!baseline correlationother fitting functions (e.g. binomical distribution function)automated guessor method using wavelet transform and CNN
Package: interactivede
interactivedeA JupyterLab extension.RequirementsJupyterLab >= 3.0InstallTo install the extension, execute:pipinstallinteractivedeUninstallTo remove the extension, execute:pipuninstallinteractivedeContributingDevelopment installNote: You will need NodeJS to build the extension package.Thejlpmcommand is JupyterLab's pinned version ofyarnthat is installed with JupyterLab. You may useyarnornpmin lieu ofjlpmbelow.# Clone the repo to your local environment# Change directory to the interactivede directory# Install package in development modepipinstall-e"."# Link your development version of the extension with JupyterLabjupyterlabextensiondevelop.--overwrite# Rebuild extension Typescript source after making changesjlpmbuildYou can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.# Watch the source directory in one terminal, automatically rebuilding when neededjlpmwatch# Run JupyterLab in another terminaljupyterlabWith the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).By default, thejlpm buildcommand generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:jupyterlabbuild--minimize=FalseDevelopment uninstallpipuninstallinteractivedeIn development mode, you will also need to remove the symlink created byjupyter labextension developcommand. To find its location, you can runjupyter labextension listto figure out where thelabextensionsfolder is located. Then you can remove the symlink namedinteractivedewithin that folder.Packaging the extensionSeeRELEASE
Package: interactive-figure
Interactive FigureThis package serves for students to learn the basics of Python, Matplotlib and setting up reaction time experiments (visual search task, Stroop task, etc.). For a more accurate timing environment one should refer to e.g.PsychoPy.This is currently used at the University of Amsterdam (UvA) in the courseIntroduction to Python Programming for Neuroscientists.Package created usingHatch.Installationpipinstallinteractive-figureUsagefrominteractive_figureimportinteractive_figureinteractive_figure.create()# Stall until user input is received.interactive_figure.wait_for_interaction()key=interactive_figure.get_last_keypress()print(f"Pressed key:{key}")interactive_figure.close()Demos can be found in thedemofolder on GitHub.FunctionalityUser interactionCapture key presses, button presses and mouse locationFigure controlCreateToggle fullscreenClearWaitWait for interaction (optionally timeout)DrawCloseLimitationsWaiting for user input will not work in Jupyter Notebooks and the interactive interpreter due to the way Matplotlib handles events.Automated testing is hard since tests should cover multiple backends (macosx, QtAgg, Tkgg) on multiple platforms (Windows, macOS, Linux). Tips are very welcome!Development# Setuppipxinstallhatch
hatchshell# Buildhatchbuild-c
./generate_docs.shLinksGitHubPyPIDocumentation
Package: interactive-input
Interactive inputUseageinstall packageInstall bypippip install interactive_inputCordingImport and instantiate.regist keys,messages,hook functionsCallAsk(), it return key-value pair with value by user input.If callAsk()more than once, object save previous input. so it can request only the increased.You can overwrite value data withoverwrite=Trueoption.importinteractive_inputasiindefmain():variinObj=iin.Object()iinObj.AddQ("key1")iinObj.AddQ("key2",message="Please Input",hook=base64enc)# this will delete value of "key1". (not delete key)iinObj.AddQ("key1",message="Overwrited",overwrite=True)defbase64enc(v:str)->str:# you can something for user input. (e.g. hashing, encoding)return"encoded: "+vRun and UsingAsk()will present input UI like below.Overwrited
Key1: _
Please Input
Key2:Can move allow-key orjkl.hfunction as [BACKSPACE]. (can use BS normally as well)
[ENTER] can move next value. If hit [ENTER] with last line, Decide values and go next step.BugCan't use non ascii character. it will broken data.Not support very narrow console.LICENCEMIT
Package: interactive-judger-py
# Interactive Judger for Python3
[![Build Status](https://travis-ci.org/AD1024/InteractiveJudgerPy.svg?branch=master)](https://travis-ci.org/AD1024/InteractiveJudgerPy)This project was initially being used to help me with the Python course I taught at Algorithm 101, CSE. I modified it to a more friendly version during my spare time.# Functions
- [x] Safe Data Loading
- [x] Automatic Testing
- [x] TLE Testing
- [x] User Custom Data Directory
- [ ] MLE Testing
- [ ] Time Measuring# Usage
### Step 1
Useconf_generator.pygenerate judger config by following the instructions.### Step 2
Save your test cases(parameters for method being tested) in a file and place it intodatafolder. Copy python files you want to test intosrcfolder, and finally, copy your answers(corresponding with the test case) into a file and move it intodatafolder.### Step 3
Runjudge.pyand follow the instructions.