Saravanan666/pypi-org huggingface dataset:
Package: avenger
Avenger: A visualization engine and rendererAvenger is an early stage prototype of a new foundational rendering library for information visualization (InfoVis) systems. Avenger defines a 2D scenegraph representation tailored to the needs of InfoVis systems. To start with, the initial application of Avenger is to serve as an alternative, GPU accelerated, rendering backend for Vega visualizations.Try it out in Python with Vega-AltairTheavengerPython package provides acustom Altair renderernamedavenger-png. This renderer relies on vl-convert to extract the vega scenegraph corresponding to a chart and then uses Avenger to render the chart to a static PNG image.First, install altair, vega-datasets, avenger, and vl-convert-pythonpip install -U altair vega_datasets avenger "vl-convert-python>=1.2.3"Then import Altair and activate theavenger-pngrendererimportaltairasaltalt.renderers.enable('avenger-png',scale=1)Then create and display an Altair chart as usual:importaltairasaltfromvega_datasetsimportdatasource=data.cars()chart=alt.Chart(source).mark_circle(size=60).encode(x='Horsepower',y='Miles_per_Gallon',color='Origin',)chartOr, convert the chart to a PNG rendered by Avenger:importavengerpng=avenger.altair_utils.chart_to_png(chart,scale=1)withopen("scatter.png","wb")asf:f.write(png)Comparison to vl-convertThere aren't currently many advantages to using Avenger to render Altar charts to PNG as compared with vl-convert, which performs rendering usingresvg. Performance is generally comparable, though Avenger can be a bit faster for charts with a large number of symbol instances.One advantage is that Avenger's text rendering support is based onCOSMIC Text, which supports emoji (unlike resvg's text handling). For example, here is the result of rendering the emoji example fromhttps://altair-viz.github.io/gallery/isotype_emoji.htmlusing Avenger:
Package: aver
averactive vision models, built with theNengo neural simulator.installation$pipinstallaveraboutbackgroundThe phrase "active vision" is meant to refer to any model of vision that incorporates
eye movements. For background, please see:Findlay, John M., and Iain D. Gilchrist.Active vision: The psychology of looking and seeing.No. 37. Oxford University Press, 2003.https://www.worldcat.org/title/active-vision-the-psychology-of-looking-and-seeing/Hulleman, J., & Olivers, C. (2017). The impending demise of the item in visual search.
Behavioral and Brain Sciences, 40, E132. doi:10.1017/S0140525X15002794https://www.cambridge.org/core/journals/behavioral-and-brain-sciences/article/impending-demise-of-the-item-in-visual-search/263B1FA1A593ED41B5CF644784D94A46Yang, Scott Cheng-Hsin, Daniel M. Wolpert, and Mate Lengyel. "Theoretical perspectives on active sensing."
Current Opinion in Behavioral Sciences 11 (2016): 100-108.https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6116896/For a brief introduction to active vision models, and how they relate to the typical tasks
used to investigate visual search in the laboratory, please seethis notebook. The notebook contains results
from a replication of an active vision-type model described in the Hulleman and Olivers
commentary cited above.licenseBSDname(fromhttp://www.wordreference.com/)
Package: avera
BingAI (ChatGPT)Bing AI API for ChatGPTInstallationpip install bingai --upgradeImportant Feature - No Manual Intervention Required100% Programmatic Run
Edge browser opens up and automatically fetches tokens, no manual intervention whatsoeverUsagefrom bingai import BingSession
session = BingSession(email, password)
session.run()Microsoft credentials for the account which has access to the Bing Chat feature
Package: average
Moving averaging schemes (exponentially weighted, polynomial-decay). Running averages only are maintained; no history of values is stored.Usage (EWMA; exponentially weighted moving average)fromaverageimportEWMA# Create a scalar running average.# beta=0.5 is the smoothing factor.avg=EWMA(beta=0.5)avg.update(1)avg.update(2)print(avg.get())# Prints 1.6666666666666667.The average is weighted toward the most recent value. That is, its value is1 * 1/3 + 2 * 2/3. The default value forbetais 0.9, which is reasonable for many uses. Higher smoothing values increase the amount of weight put on less recent values in the average.You can also create running averages shaped like NumPy arrays by supplying a shape and dtype (defaults tonumpy.float64). For example:avg=EWMA((4,4),np.float64)# or, equivalently:avg=EWMA.like(np.eye(4))avg.update(np.eye(4))print(avg.get())# Prints a 4x4 identity matrix.For example, you could useEWMAto maintain a running average of HxWx3 video frames, if the frames are in NumPy array format or convertible to it.Usage (PDMA; polynomial-decay moving average)With the polynomial decay parameteretaset to the default value of 0,PDMAacts as a simple average (averages equally over all previous values). A history of values is not kept.fromaverageimportPDMAavg=PDMA()avg.update(1)avg.update(2)avg.update(3)print(avg.get())# Prints 2.0.Higher values ofetacorrespond to a polynomially decaying window of degreeetastretching back over all previous values. The higheretais set, the more weight is placed on more recent values.avg=PDMA(eta=1)foriinrange(1,5):avg.update(i)print(avg.get())# Prints 3.0.In our example, settingetato 0 would instead have printed the simple average 2.5.etacan be set arbitrarily high, but 0, 1, and 3 are probably reasonable values for many uses. Similarly toEWMA,PDMArunning averages can be shaped like NumPy arrays and have a NumPy data type (not shown).ReferencesThe formula for an exponentially weighted average with initialization bias correction is given in “Adam: A Method for Stochastic Optimization” by Kingma and Ba.The formula for polynomial-decay averaging is given in section 4 of “Stochastic Gradient Descent for Non-smooth Optimization: Convergence Results and Optimal Averaging Schemes” by Shamir and Zhang.
Package: averagepackage-sanwariyia
averagepackage-sanwariyiaTo find the averageUse the package in your projectInstall the packagepip install averagepackage-sanwariyiaUsing the packageimport averagepackage_sanwariyia.avg as averageprint(average.avgmarks(2,3,4))MethodsAverage of 3 numbersavgmarks(a,b,c)This method takes 3 arguments and returns the average of the 3 numbers.Sanwariyia S © 2023NoteThis is for a university project. Might not be maintained in future.
Package: average-pixels
# Average Pixels [![Build Status](https://travis-ci.org/liviu-/average-pixels.svg?branch=develop)](https://travis-ci.org/liviu-/average-pixels)Command line tool which takes a bunch of images, and outputs a JPEG combining the images using a weighted average where the weights are samples drawn from the Dirichlet distribution.`sh $average-pixelsdownload "party explosions boom"--offset90--count30 `![party_explosions_boom](images/party_explosions_boom.jpg)## Installation`sh $ python3-mpip installaverage-pixels`## Configuration
The application indownloadmode uses [Bing Search API](https://www.microsoft.com/cognitive-services/en-us/bing-image-search-api) to search for images so it requires the user to have an API key activated for Bing’s search service. To obtain one:[Create a Microsoft account](https://signup.live.com/signup) if you don’t have oneGet an API key for the [Bing Image Search Service](https://www.microsoft.com/cognitive-services/en-us/bing-image-search-api)Once obtained, the key may be provided through various methods:When prompted by the applicationBy storing it in~/.average_pixels_apiOr via theAVERAGE_PIXELS_APIenvironment variable (e.g.$ export AVERAGE_PIXELS_API=$key)## Example usage:The application has 2 modes:local: Combines local files and outputs the combined imagedownload: Takes keywords from the user, and combines images from Bing Image Search`sh $average-pixelsdownload "black cats" `![black_cats](images/black_cats.jpg)`sh $average-pixelsdownload "green field blue sky" `![green_field_blue_sky](images/green_field_blue_sky.jpg)`sh $average-pixelsdownload "just give me some random photo" `![just_give_me_some_random_photo](images/just_give_me_some_random_photo.jpg)`sh $average-pixelsdownload "no" `![no](images/no.jpg)`sh $average-pixelsdownload "insects"--count30 `![insects](images/insects.jpg)`sh $average-pixelslocal /tmp/average_images--offset40 `![existing_dir](images/existing_dir.jpg)`sh $average-pixelsdownload "turner"--count20 `![turner](images/turner.jpg)`sh $average-pixelsdownload "jackson pollock painting"--count10--offset30 `![jackson_pollock](images/jackson_pollock_painting.jpg)`sh $average-pixelsdownload "green"--count100 `![green](images/green.jpg)`sh $average-pixelslocal images/ `![local_dir](images/output.jpg)
Package: averager
AveragerAverageris a simple way to calculate averages of values.>>>average(1,2,3)2>>>weighted_average((1,2),(2,3))1.6>>>median(5,1,2)2>>>mode(1,2,4,3,3)3InstallationAverager is available on PyPI:$python-mpipinstallaveragerAverager officially supports Python 2.7 & 3.6+.API ReferenceSeeRead the Docsfor Averager's documentation.
Package: averag-mult-three
averag_mult_threeThis package was created as a learning exercise for creating packages in Python through the Digital Innovation One Bootcamp: "Cognizant Cloud Data Engineer #2".The exercise module was taught by Karina Kato under the name "Uncomplicating the creation of image processing packages in Python".The package averag_mult_three is used to:
- Calculate the average of three numbers
- Calculate the multiplication of three numbersInstallationUse the package managerpipto install averag_mult_threepipinstallaverag_mult_threeUsageTo calculate the average of three numbers:fromaverag_mult_three.average_three_numbimportaverage_calculationaverage_calculation.calc_average_three()To calculate the multiplication of three numbers:fromaverag_mult_three.multiplication_three_numbimportmultiplication_calculationmultiplication_calculation.calc_multipl_three()AuthorDimitri MarinhoLicenseMIT
Package: avereno
averenoYet another retry utility in Python,averenobeing the Malagasy word forretry.Usage$python3-mpipinstallavereno$python3fromrandomimportrandomdefa_sometimes_failing_hello():ifrandom()<0.5:print("Hello!")else:raiseRuntimeError()fromaverenoimportretryretry(a_sometimes_failing_hello,on_retry=lambda__1,__2:print("Oops..."))>Oops...>Oops...>Oops...>Hello!FeaturesThe retry policy can be customized through the following arguments,
as described inhelp(avereno.retry):Optional Keyword Arguments:
  max_retries:        number of retries after which GiveUpRetryError will be raised
  max_sleep:          cumulated sleep (backoff) after which GiveUpRetryError will be raised
  on_retry:           function to invoke _before_ each retry
  init_backoff:       initial backoff that will potentially increase afterwards
  backoff_multiplier: multiplication factor between consecutive backoffs
                      set it to  1 for constant backoff
                      set it to >1 for exponential backoff
Package: aversine
haversinePython implementation of haversine formula to determine the great-circle distance between two points on a given
sphere knowning their longitudes and latitudes.InstallationpipinstallaversineUsagefromfromhaversineimporthaversinehaversine.Haversine()location_a,location_b=(45.7597,4.8422),(48.8567,2.3508)haversine.distance(location_a,location_b)# => 392.2167178065958
Package: avfcomp
AVF 压缩格式 V1.4.2 (Python 实现)使用说明fromavfcompimportAVFComp,AVFDecomp,CompHandler# compresspath="your/path/raw.avf"# choose from plain, gzip, bzip2, lzma(default)Compressor=AVFComp(handler=CompHandler.LZMA)Compressor.process_in(path)Compressor.process_out("comp.cvf")# decompresspath="your/path/comp.cvf"# choose from plain, gzip, bzip2, lzma(default)Decompressor=AVFDecomp(handler=CompHandler.LZMA)Decompressor.process_in(path)Decompressor.process_out("raw.avf")格式说明 (目前支持 Arbiter 0.52+)对录像先进行一轮预压缩（此时压缩率能够达到15%左右）可选 gzip, bzip2, lzma 二次压缩，默认采用 lzma 进行二次压缩（此时压缩率接近8%）1字节: 大版本号4字节:prefix1字节: 模式对于自定义, 用额外的字节存储参数1字节: 宽w1字节: 高h雷的排布01串表示, 长度可以通过长宽推出来。通过排布可以推出雷数和3BV。prestamp由[]标志的录像信息preevent2字节:\x00\x01表示preevent结束事件列, 目前除了按键列其他都存的差分序列, 坐标序列差分后采取zigzag编码, 如果是某些时间段移动距离小的事件, 会把整个事件全部压缩到事件列表上面, 然后根据事件出现的频率进行了从小到大的编码（压缩什么的交给lzma）3个字节的预压缩数据总量（应该够了吧）按键序列（1-2个变长字节, 一般是一个字节）1字节\xff表示按键序列结束（用来得出事件数量）时间戳差分序列（1-2个变长字节）x坐标差分序列（1-2个变长字节）y坐标差分序列（1-2个变长字节）presuffix文件结尾的字符串录像信息, 只保留数据信息, 不保留文字说明信息
Package: av-helper
av_helperAn Audio-Video Helper Utility Package in PythonInstallation$ pip3 install av-helperVisitthe PyPI page of the package.Usage>>>fromav_helperimportconvert_video_to_audio>>>audio_file_name=convert_video_to_audio('audio_file_in_video_format.mp4')>>>fromav_helperimportmerge_audio_videoasmerge_av>>>output_video=merge_av(audio_file_name,'video_file_name.mp4')>>>fromav_helperimportsave_audio_video_fileassave_av>>>save_av(output_video)Instant Docs>>>pprint(convert_video_to_audio.__doc__)('\n''    Convert A Video File to mp3 format\n''    :param video_file: File Name of Video\n''    :param start_time: Starting Time (in s) at which clipping has to do\n''    :param video_duration: Duration wanted for audio clip\n''    :return: File-Name of Audio File created\n''    ')>>>pprint(merge_av.__doc__)('\n''    Function to merge Audio File into Video File\n''    :param audio_file: File-Name of Audio\n''    :param video_file: File-Name of Video\n''    :param frame_number: Frame Number at which audio file to add in Video File\n''    :param volume_factor: Factor by which Volume of Audio has to be modified\n''    :return: Video Clip (with Audio merged) of type moviepy.video.VideoClip\n''    ')
Package: avi2mkv
# avi2mkv [![Project Status](http://stillmaintained.com/igalarzab/avi2mkv.png)](http://stillmaintained.com/igalarzab/avi2mkv)## What it does.Simple (stupid) script to transform an AVI video to matroska MKV.It's simple because you don't need to provide any arguments to work.It's powerful because this script will do these things for you:* Convert all the video and audio tracks of the AVI.* Look for all the SRT subtitles and append it to the MKV file.* Generate a MKV file with the same name than the AVI (and in the same place).* If you provide a directory, ``avi2mkv`` will convert all the AVI videos of the dir.## What I need.To use ``avi2mkv``, you need at least:* Python (>=2.6)* mkvtools## How to install it.First, install the required dependences.Use your favourite package manager to accomplish this task.* MacOS (with [HomeBrew](http://mxcl.github.com/homebrew/))```sh$ brew install mkvtoolnix```* Linux (with apt-get)::```sh$ sudo apt-get install mkvtoolnix```Then, you can install the last version of ``avi2mkv`` in two ways.* You can use ``easy_install``::```sh$ sudo easy_install avi2mkv```* Or, if it's installed in your system, you can use ``pip``::```sh$ sudo pip install avi2mkv```## How to useTo run, you only need to execute the installed command::```sh$ avi2mkv --help```To convert a video (or a list of videos) you only need to provide the filename.The output video will be placed in the same directory of the original one, andwith the same name (ended with .mkv)::```sh$ avi2mkv My_Video.avi My_Video2.avi```If you provide a directory, ``avi2mkv`` will transform all the .avi videos that arein the directory::```sh$ avi2mkv My_Videos/```Finally, ``avi2mkv`` will take all the SRT subtitles of the video. To do this, thescript will search all the files with the **same prefix** that the .avi video(without the extension) that ends with a .srt extension.To take the language of the subtitles, ``avi2mkv`` will take the part that differs ofthe filename of both files (the avi and the srt), stripped.For example, in the following scenario::```sh$ ls"My_Video1.avi" "My_Video1    Spanish.srt" "My_Video1 Englishhh.srt"$ avi2mkv My_Video1.avi`````avi2mkv`` will take the two subtitles files, and the name of the languages will be *Spanish*and *Englishhh*.## Author* [Jose Ignacio Galarza (igalarzab)](http://github.com/igalarzab)
Package: aviasales
aviasales pirate API wrapperAsync convenient wrapper for the unofficial aviasales APIInstallationpipinstallaviasalesExample of usagefromaviasalesimportAviaSalesAPIapi=AviaSalesAPI()asyncdefrun():search_uuid=awaitapi.start(origin="DME",destination="IST",departure_at="2022-05-30")results=awaitapi.get_flight_legs(search_uuid)print(results.flight_legs)# show flight transfers and routesprint(results.tickets)# show available ticketsif__name__=='__main__':importasyncioasyncio.run(run())Terminal output
Package: aviationFormula
aviationFormulaA collection of formula around aviation and the globe in python.A documentation of the implemented formula will follow.RequirementsAll formula should work with every version of python. Only basic modules (likemath) are imported. For the future I want to avoid using 3rd party packages such asnumpy.CreditsNone of the formula in this package where derived or invented by me. The only thing I did was an implementation in python.The raw formula (and an implementation in VBA) are published by Ed Williams and can be found under the nameAviation Formulary V1.46.Changelogversion 0.0.2 - 15.12.2018Small fixes for wrong calculated distancesversion 0.0.1 - 12.12.2018First version with gcDistance and gcIntermediatePoint
Package: aviatrix-discovery
# Aviatrix DiscoveryAviatrix discovery is a complimentary set of scripts to [Aviatrix Migration](https://pypi.org/project/aviatrix-migration) scripts. Discovery Generator can automatically discover VPCs and generate input files for use with [Aviatrix Migration’s](https://pypi.org/project/aviatrix-migration) network discovery, –stage_vpcs and –switch_traffic functions.## Installation
Install via pip:` pip installaviatrix-discovery`Upgrade via pip:` pip install--upgradeaviatrix-discovery`## Discovering VPCs and/or VNETsThe migration process requires Aviatrix Advanced Services team help. Please contact Aviatrix for help with your discovery and migration project.
Package: aviatrix-flightcheck
Aviatrix FlightCheckAviatrix FlightCheck collects information about an Aviatrix environment by querying the Aviatrix Controller API.InstallationThe recommended method for installing Aviatrix FlightCheck is to use theCloudFormationtemplate. The CloudFormation template will create an Amazon Linux EC2 instance with FlightCheck automatically installed. SSH into the instance using the AWS Key Pair selected when deploying the template.ssh -i <keypair> ec2-user@<IP of the deployed instance>Optionally, you can manually install Aviatrix FlightCheck using pip. Refer topip documentationfor instructions on installing pip for your operating system.pip3 install aviatrix-flightcheckAviatrix Controller RequirementsUpdate the security group for the Aviatrix Controller to allow TCP port 443 from the IP of the system where FlightCheck is installed. Use netcat to confirm the connectivity.[ec2-user@ip-172-31-21-6 ~]$ nc -zv <controller-ip> 443
Ncat: Version 7.50 ( https://nmap.org/ncat )
Ncat: Connected to <controller_ip>:443.
Ncat: 0 bytes sent, 0 bytes received in 0.01 seconds.Verify the output says "Connected to <controller_ip>:443" and not "Connection timed out.".Execute FlightCheckTo excecute the FlightCheck, run the following command:flightcheck --controller_ip x.x.x.x --username <controller_username>You will be prompted to enter the password for the user. The account used can be a read-only account.FlightCheck will run a list of pre-defined checks and output the results to the screen. The output can be saved to a file for review offline using the following command:flightcheck --controller_ip x.x.x.x --username <controller_username> > flightcheck-output.txtIf FlightCheck was run on a remote instance, copy the output to a local system. On the local system:scp -i <keypair> ec2-user@<IP of FlightCheck instance>/home/ec2-user/flightcheck-output.txt <local path to save to>Adjust paths and filenames as needed.
Package: aviatrix-migration
Aviatrix VPC/VNET MigrationAviatrix Migration discovers networking components and migrates existing VPCs and VNETs to the Aviatrix multi cloud transit network.InstallationThe recommended method for installing Aviatrix Migration is to use theAWS CloudFormationtemplate or theAzure ARMtemplate . Each template will create an ubuntu EC2/VM instance with Migration and terraform automatically installed. SSH into the instance using the private key selected when deploying the template.ssh -i <keypair> ubuntu@<IP of the deployed instance>Optionally, you can manually install Aviatrix Migration using pip. Refer topip documentationfor instructions on installing pip for your operating system. You will also need tomanually installterraformpip3 install aviatrix-migrationAviatrix Controller RequirementsUpdate the security group for the Aviatrix Controller to allow TCP port 443 from the IP of the system where Migration is installed. Use netcat to confirm the connectivity.ubuntu@AviatrixMigration:~$ nc -zv <controller-ip> 443
Ncat: Version 7.50 ( https://nmap.org/ncat )
Ncat: Connected to <controller_ip>:443.
Ncat: 0 bytes sent, 0 bytes received in 0.01 seconds.Verify the output saysConnected to <controller_ip>:443and notConnection timed out..Migrating VPCs and/or VNETsThe migration process requires Aviatrix Advanced Services team help. Please contact Aviatrix for help with your migration project.
Package: avicortex
Avicortex - Brain Connectivity Graph BuilderPython functions and classes to build connectivity graphs and datasets from Freesurfer’s brain cortical measurements.InstallationAvicortex datasets are written in torch-based classes and return torch-geometric Data objects as data samples.
Therefore you need to have a compatible torch-geometric installation along with the torch installation.$ pip install avicortexUsageFirst, you need to have the output stats table from Freesurfer outputs. A collection of commands can be executed
from fs_utils/stats2table.sh file. In later versions, we will provide Python utilities to extract these stats tables
as well.One class is provided for HCP Young Adult dataset but the you need to access data from:https://www.humanconnectome.org/study/hcp-young-adult>>> from avicortex.datasets import HCPYoungAdultDatasetAfter you have the table, you can point the path to your dataset as following:>>> freesurfer_stat_path = "path/to/hcp/outputs"
>>> hcp_dataset_tr = HCPYoungAdultDataset(hemisphere="left", mode="train", freesurfer_out_path=freesurfer_stat_path)Note that you can select a hemisphere; ‘right’ or ‘left’ and a mode for dataloading; ‘train’, ‘validation’, ‘test’ or ‘inference’,
where ‘test’ is for loading the unseen data after your training is finished, and use ‘inference’ as an in-production mode when
you do not have the labels but you want to have predictions.Moreover, you can select a feature set for the source and target graphs that will be returned. Consider graphs in shape:
Data(x=[batch_size, n_nodes, n_features], edge_attr=[batch_size, n_edges, n_features]). After the selection, you will have:
Data(x=[batch_size, n_nodes, selection_idx], edge_attr=[batch_size, n_edges, selection_idx]). You can specify this while initializing:>>> hcp_dataset_tr = HCPYoungAdultDataset(hemisphere="left", mode="train", freesurfer_out_path=freesurfer_stat_path, in_view_idx=0, out_view_idx=3)Now you can put into a torch_geometric dataloader:>>> from torch_geometric.loader import DataLoader as PygDataLoader
>>> hcp_dataloader_tr = PygDataLoader(hcp_dataset_tr)Let’s take a look at the first sample:>>> input_graph, target_graph = next(iter(hcp_dataloader_tr))Output input_graph and target_graph will belong to the same patient. And you can also access their medical condition as a classification label:>>> cls_label = target_graph.yThis class might represent different conditions, such as different diseases, age groups, or gender. For example, in HCP Young Adult dataset, label
represents patient gender.ContributingContributions are welcome and highly appreciated. Feel free to open issues and pull requests.