Saravanan666/pypi-org huggingface dataset:
Package: anls
ANLS: Average Normalized Levenshtein SimilarityThis python script is based on the one provided bythe Robust Reading Competitionfor evaluation of the InfographicVQA task.The ANLS metricThe Average Normalized Levenshtein Similarity (ANLS) proposed by [Biten+ ICCV'19] smoothly captures the OCR mistakes applying a slight penalization in case of correct intended responses, but badly recognized. It also makes use of a threshold of value 0.5 that dictates whether the output of the metric will be the ANLS if its value is equal or bigger than 0.5 or 0 otherwise. The key point of this threshold is to determine if the answer has been correctly selected but not properly recognized, or on the contrary, the output is a wrong text selected from the options and given as an answer.More formally, the ANLS between the net output and the groundtruth answers is given byequation 1. Where $N$ is the total number of questions, $M$ total number of GT answers per question, $a_{ij}$ the ground truth answers where $i = {0, ..., N}$, and $j = {0, ..., M}$, and $o_{qi}$ be the network's answer for the ith question $q_i$:$$
\mathrm{ANLS} = \frac{1}{N} \sum_{i=0}^{N} \left(\max_{j} s(a_{ij}, o_{qi}) \right),
$$where $s(\cdot, \cdot)$ is defined as follows:$$
s(a_{ij}, o_{qi}) = \begin{cases}
1 - \mathrm{NL}(a_{ij}, o_{qi}), & \text{if } \mathrm{NL}(a_{ij}, o_{qi}) \lt \tau \
0,                               & \text{if } \mathrm{NL}(a_{ij}, o_{qi}) \ge \tau
\end{cases}
$$The ANLS metric is not case sensitive, but space sensitive. For example:Q: What soft drink company name is on the red disk?Possible answers:$a_{i1}$ : Coca Cola$a_{i2}$ : Coca Cola CompanyNet output ($o_{qi}$)$s(a_{ij}, o_{qi})$Score (ANLS)The Coca$a_{i1} = 0.44$, $a_{i2} = 0.29$0.00CocaCola$a_{i1} = 0.89$, $a_{i2} = 0.47$0.89Coca cola$a_{i1} = 1.00$, $a_{i2} = 0.53$1.00Cola$a_{i1} = 0.44$, $a_{i2} = 0.23$0.00Cat$a_{i1} = 0.22$, $a_{i2} = 0.12$0.00InstallationFrom pypipipinstallanlsFrom GitHubpipinstallgit+https://github.com/shunk031/ANLSHow to useFrom CLIcalculate-anls\--gold-label-filetest_fixtures/evaluation/evaluate_json/gold_label.json\--submission-filetest_fixtures/evaluation/evaluate_json/submission.json\--anls-threshold0.5❯❯❯calculate-anls--help
usage:calculate-anls[-h]--gold-label-fileGOLD_LABEL_FILE--submission-fileSUBMISSION_FILE[--anls-thresholdANLS_THRESHOLD]EvaluationcommandusingANLS

optionalarguments:-h,--helpshowthishelpmessageandexit--gold-label-fileGOLD_LABEL_FILEPathoftheGroundTruthfile.--submission-fileSUBMISSION_FILEPathofyourmethod'sresultsfile.--anls-thresholdANLS_THRESHOLDANLSthresholdtouse(SeeScene-TextVQApaperformoreinfo.).From python script>>>fromanlsimportanls_score>>>ai1="Coca Cola">>>ai2="Coca Cola Company">>>net_output="The Coca">>>anls_score(prediction=net_output,gold_labels=[ai1,ai2],threshold=0.5)0.00>>>net_output="CocaCola">>>anls_score(prediction=net_output,gold_labels=[ai1,ai2],threshold=0.5)0.89>>>net_output="Coca cola">>>anls_score(prediction=net_output,gold_labels=[ai1,ai2],threshold=0.5)1.0ReferencesBiten, Ali Furkan, et al."Scene text visual question answering."Proceedings of the IEEE/CVF international conference on computer vision. 2019.
Package: anltk
Arabic Natural Language Toolkit (ANLTK)ANLTK is a set of Arabic natural language processing tools. developed with focus on simplicity and performance.ANLTK is a C++ library, with python bindings.Installationfor python :pip install anltkBuildingNote: Currently only tested on Linux, prebuilt python wheels are available for Linux, Windows, Macos onpypiDependencies:utfcpp, automatically downloaded.utf8proc, automatically downlaoded.C++ Compiler that supports c++17.Python3,meson,ninjapipinstallmeson
pipinstallninjagitclonehttps://github.com/Abdullah-AlAttar/anltk.git\&&cdanltk/\&&mesonbuild--buildtype=release-Dbuild_tests=false\&&cdbuild\&&ninja\&&cd../\&&pipinstall-e.Usage Examples:C++ API :#include"anltk/anltk.hpp"#include<iostream>#include<string>intmain(){std::stringar_text="أبجد هوز حطي كلمن سعفص قرشت ثخذ ضظغ";std::cout<<anltk::transliterate(ar_text,anltk::CharMapping::AR2BW)<<'\n';// >bjd hwz HTy klmn sEfS qr$t vx* DZgstd::stringtext="فَرَاشَةٌ مُلَوَّنَةٌ تَطِيْرُ في البُسْتَانِ، حُلْوَةٌ مُهَنْدَمَةٌ تُدْهِشُ الإِنْسَانَ.";std::cout<<anltk::remove_tashkeel(text)<<'\n';// فراشة ملونة تطير في البستان، حلوة مهندمة تدهش الإنسان.// Third paramters is a stop_list, charactres in this list won't be removedstd::cout<<anltk::remove_non_alpha(text," ")<<'\n';// فراشة ملونة تطير في البستان حلوة مهندمة تدهش الإنسانanltk::TafqitOptionsopts;std::cout<<anltk::tafqit(15000120,opts)<<'\n';// خمسة عشر مليونًا ومائة وعشرون}Python APIimportanltkar="أبجد هوز حطي كلمن سعفص قرشت ثخذ ضظغ"bw=anltk.transliterate(ar,anltk.AR2BW)print(bw)# >bjd hwz HTy klmn sEfS qr$t vx* DZgprint(anltk.remove_tashkeel("فَرَاشَةٌ مُلَوَّنَةٌ تَطِيْرُ في البُسْتَانِ، حُلْوَةٌ مُهَنْدَمَةٌ تُدْهِشُ الإِنْسَانَ."))# فراشة ملونة تطير في البستان، حلوة مهندمة تدهش الإنسان.print(anltk.tafqit(15000120))# خمسة عشر مليونًا ومائة وعشرونFor list of features seeFeatures.mdBenchmarksProcessing a file containing 500000 Line, 6787731 Word, 112704541 Character. the task is to remove diacritics / transliterate to buckwalterBuckwatler transliterationMethodTimeanltk python-api1.379 secondspythoncamel_tools11.46 secondsRemove DiacriticsMethodTimeanltk python-api0.989 secondspythoncamel_tools4.892 seconds
Package: anmetal
Another Numeric optimization and Metaheuristics LibraryA library to do your metaheuristics and numeric combinatorial stuff.to install use´´´
pip install anmetal
´´´see /test folder to see some examples of useIn later updates I will make documentation, for now there is only examples codeContentNumeric optimizationIterative optimization functions (one solution)Euler methodNewton methodMetaheuristicsReal inputArtificial Fish Swarm Algorithm (AFSA) (Li, X. L. (2003). A new intelligent optimization-artificial fish swarm algorithm. Doctor thesis, Zhejiang University of Zhejiang, China, 27.)Particle Swarm Optimization (PSO) (Based onhttps://en.wikipedia.org/wiki/Particle_swarm_optimization)Particle Swarm Optimization (PSO) With LeapGreedyGreedy With LeapCategorical inputGeneticGenetic With LeapProblems and gold-standard functionsNphard problemsReal problemsPartition problemSubset problemCategorical problemsknapsacksudoku (without initial matrix, just random)Non linear functionsone input (1-D)F1 (https://doi.org/10.1007/s00521-017-3088-3)F3 (https://doi.org/10.1007/s00521-017-3088-3)two inputs (2-D)Camelback (https://doi.org/10.1007/s00521-017-3088-3)Goldsteinprice (https://doi.org/10.1007/s00521-017-3088-3)Pshubert1 (https://doi.org/10.1007/s00521-017-3088-3)Pshubert2 (https://doi.org/10.1007/s00521-017-3088-3)Shubert (https://doi.org/10.1007/s00521-017-3088-3)Quartic (https://doi.org/10.1007/s00521-017-3088-3)n inputs (N-D)Brown1 (https://doi.org/10.1007/s00521-017-3088-3)Brown3 (https://doi.org/10.1007/s00521-017-3088-3)F10n (https://doi.org/10.1007/s00521-017-3088-3)F15n (https://doi.org/10.1007/s00521-017-3088-3)Sphere (https://doi.org/10.1007/s00521-018-3512-3)Rosenbrock (https://doi.org/10.1007/s00521-018-3512-3)Griewank (https://doi.org/10.1007/s00521-018-3512-3)Rastrigrin (https://doi.org/10.1007/s00521-018-3512-3)Sumsquares (https://doi.org/10.1007/s00521-018-3512-3)Michalewicz (https://doi.org/10.1007/s00521-018-3512-3)Quartic (https://doi.org/10.1007/s00521-018-3512-3)Schwefel (https://doi.org/10.1007/s00521-018-3512-3)Penalty (https://doi.org/10.1007/s00521-018-3512-3)Another contentBinarization functionssShape1sShape2sShape3sShape4vShape1vShape2vShape3vShape4erfBinarization strategiesstandardcomplementstatic_probabilityelitist
Package: anmoku
Anmoku 安黙A peaceful and fully typedMyAnimeList/JikanPython API wrapper with caching and proper rate limiting.[!NOTE]Anmoku is currently a work in progress so the features below may not be complete yet.Features ✨Rate limiting 🎀 (with actual waiting).Supports caching. ⚡Fully type hinted.🌌yes you heard me correctlyExamples ⚗️Anmoku is probably the simplest Jikan API wrapper you'll ever use. All you need is the client and the resource. 🌊fromanmokuimportAnmoku,AnimeCharactersclient=Anmoku(debug=True)anime_characters=client.get(AnimeCharacters,id=28851)# ID for the anime film "A Silent Voice".forcharacterinanime_characters:print(f"{character.name}({character.url})")client.close()We also have an async client:importasynciofromanmokuimportAsyncAnmoku,AnimeCharactersasyncdefmain():client=AsyncAnmoku(debug=True)anime_characters=awaitclient.get(AnimeCharacters,id=28851)# ID for the anime film "A Silent Voice".forcharacterinanime_characters:print(f"{character.name}({character.url})")awaitclient.close()asyncio.run(main())Output:[DEBUG](anmoku)-[AsyncAnmoku]GET-->https://api.jikan.moe/v4/anime/28851/characters
Ishida,Shouya(https://myanimelist.net/character/80491/Shouya_Ishida)Nishimiya,Shouko(https://myanimelist.net/character/80243/Shouko_Nishimiya)Headteacher(https://myanimelist.net/character/214351/Headteacher)Hirose,Keisuke(https://myanimelist.net/character/97569/Keisuke_Hirose)Ishida,Maria(https://myanimelist.net/character/97943/Maria_Ishida)Ishida,Sister(https://myanimelist.net/character/118723/Sister_Ishida)# ... more characters below but I cut them off for the convenience of this readmeSearching! 🤩Here are some searching examples you can try:fromanmokuimportAnmoku,Characterclient=Anmoku(debug=True)characters=client.search(Character,"anya forger")forcharacterincharacters:print(f"{character.name}({character.image.url})")client.close()Merge that with gradio and you have a GUI.https://github.com/THEGOLDENPRO/anmoku/blob/099f6596b685daa65259319d6730bef674ced38a/examples/gradio_anime_search.py#L1-L23[Gradio Video]Type hinting support! 🌌API responses in our library are strongly typed.On top of that, we even provide class interfaces if you wish for stability and ease of use.
Package: anmotordesign
Electrical Machines Design Automation by Ansys Maxwell ScriptYouTube Vediohttps://youtu.be/uStT2k3V6x0GoalSetup a python api server, accept motor spec(stator Outer Diameter, DC bus voltage, max toruqe, max speed),
auto design, draw and run ansys analysis,
finally response result data(BEMF, cogging torque, max torque, torque ripple, induce voltage, efficiency)
(Now just 10p12s Surface PM design, It still working on...)RequirementsWindows 7 or aboveLegal Ansys Maxwell Electromagnetic SuitePython 3python 3.7.6Python librarypywin32==227ramda==0.5.5six==1.13.0functional-pipeline==0.3.1ipdb==0.12.3Flask==1.1.2Flask-Cors==3.0.8pandas==1.0.1numpy==1.18.1requests==2.24.0Environment Install Guide (Verified)Install Python 3.7.6(optional) Install virutal envpip install virtualenvoptional) create virutal envvirutalenv venv(optional) activate virutal env./venv/Scripts/activateInstalled needed library using the following commandpip install -r requirements.txtSPM Motor paramsall setting are in params/Execute Guideactive virtual env./venv/Scripts/activateexecutejust run analysis(params set at spec_params in run.py) - python run.pyrun flask api server and call ansys run and return result as response (POST method, json data sample in example/, url =http://localhost:5000/run_simu) - python server.pyrun flask api server, call but run ansys asyc in backgroud and return result use request to another url (POST method, json data sample in example/, url =http://localhost:5000/run_simu) - python server_run_back.py
Package: anms-ace
ACE ToolsThis is the AMM CODEC Engine (ACE) for the DTN Management Architecture (DTNMA).
It is part of the larger Asynchronous Network Managment System (ANMS) managed forNASA AMMOS.It is a library to manage the information in DTNMA Application Data Models (ADMs) and use that information to encode and decode DTNMA Application Resource Identifiers (ARIs) in:Text form based onURI encodingBinary form based onCBOR encodingIt also includes anace_aricommand line interface (CLI) for translating between the two ARI forms.DevelopmentTo install development and test dependencies for this project, run from the root directory (possibly under sudo if installing to the system path):pip3install-r<(python3-mpiptoolscompile--extratestpyproject.toml2>&1)To install the project itself from source run:pip3 install .An example of using the ARI transcoder, from the source tree, to convert from text to binary form is:echo 'ari:/IANA:ion_admin/CTRL.node_contact_add(UVAST.1685728970,UVAST.1685729269,UINT.2,UINT.2,UVAST.25000,UVAST.1)' | PYTHONPATH=./src ADM_PATH=./tests/adms python3 -m ace.tools.ace_ari --inform=text --outform=cborhexwhich will produce a hexadecimal output:0xC1188D410605061616141416161A647A2ECA1A647A2FF502041961A801ContributingTo contribute to this project, through issue reporting or change requests, see theCONTRIBUTINGdocument.
Package: anna-api-test-framework
Framework for rapid development of API tests and report generationAuthors@EvgeniiGerasinFeaturesRapid and straightforward development of tests using high-level methodsGenerating a report with test results in AllureThe report will be useful for stakeholderInstallationInstall my-project with pip:pipinstallanna-api-test-frameworkUsage/ExamplesfromannaimportAction,Report,Assert@Report.epic('Simple tests')@Report.story('Tests google')@Report.testcase('https://www.google.com','Google')@Report.link('https://www.google.com','Jast another link')classTestExample:@Report.title('Simple test google')@Report.severity('CRITICAL')deftest_simple_request(self):url='https://google.com'method='GET'want=200# insert discription of the testReport.description(url=url,method=method,other='other information')# doing request and geting responseaction=Action()response=action.request(method=method,url=url)got=response.status_code# checking responsewithReport.step('Checking response'):Assert.compare(variable_first=want,comparison_sign='==',variable_second=got,text_error='Response status code is not equal to expected')For run test and generat a report use following commands:pytestalluredir="./results"For generat and open a report you need to install Allure and use the following commands:alluregenerate"./results"-c-o"./report"allureopen"./report"After that, the generated report will automatically open in your browserThe report contains all the information you need
Package: anna-client
anna clientsetup$ pip install anna-clientusageinitializationfromanna_client.clientimportClientclient=Client(endpoint='http://localhost:5000/graphql')get jobs# get all job idsjobs=client.get_jobs()# you can specify a where clause & the fields you wish to receivejobs=client.get_jobs(where={'id_in',[...]},fields=('driver','site','status'))create jobs# create_jobs takes a list of dicts describing your jobsjobs=client.create_jobs(data=[{'driver':'firefox','site':'test'}])delete jobs# provide no parameters in order to delete all jobsclient.delete_jobs(where={})# or delete specific jobsclient.delete_jobs(where={'id_in':my_jobs})update jobs# provide no where parameter in order to update all jobsclient.update_jobs(data={'status':'STOPPED'})# or update specific jobsclient.delete_jobs(where={'id_in':my_jobs},data={'status':'STOPPED'})reserve jobs# reserve_jobs takes a worker and a tuple of job idsclient.reserve_jobs(worker='worker',job_ids=my_jobs)get tasks# get_tasks takes a namespace & returns a url and a list of tuples containing the task names & definitionsurl,tasks=client.get_tasks(namespace='test')
Package: anna-lib
anna-libThe purpose of this package is to simplify the use of selenium.requirementsseleniuminstallation$pipinstallanna-libusagefromanna_lib.seleniumimportdriver,events,assertionsresult=[]firefox=driver.create(driver='firefox',headless=True)firefox.get('http://example.com/')events.click(driver=firefox,target='a[href="http://www.iana.org/domains/example"]')result.append(assertions.current_url_is(firefox,'http://www.iana.org/domains/example'))driverUse this module to create a webdriver based on a set of options:paramtyperequiredvaluesdefault valuedriverstringyes'firefox' or 'chrome' for now'firefox'headlessboolnoTrue or FalseFalseresolutiontupleno(width, height)(1920, 1080)eventsUse this module to interact with pages. Each event takes a driver, a target & a timeout which defaults to 16 seconds, with the exception beingsend_keyswhich also requires a value.
The target is treated as a css selector unless it starts with'$xpath', in which case it is of course treated as an xpath selector.fromanna_lib.seleniumimportevents,driverfirefox=driver.create('firefox',headless=True)events.click(driver=firefox,target='#search')events.send_keys(driver=firefox,target='#search',value='search terms')events.submit(driver=firefox,target='#search')events.hover(driver=firefox,target='$xpath//div.result/a')events.scroll_to(driver=firefox,target='#thing')events.switch_to(driver=firefox,target='iframe')assertionsUse this module to check the state of a page, be it by the url or by the page's elements.
Each assertion takes a driver, some input & a timeout parameter which defaults to 16 seconds.fromanna_lib.seleniumimportassertions,driverfirefox=driver.create('firefox',headless=True)try:assertions.url_equals(driver=firefox,expected='about:blank')assertions.in_url(driver=firefox,part='blank')assertions.element_exists(driver=firefox,target='body')exceptValueErrorase:print(str(e))exceptTypeErrorase:print(str(e))
Package: annalise-confluence-junction
Annalise AI - Confluence JunctionThis project is expanded from (https://github.com/HUU/Junction)TO DOmove away from using a docker image and use a pushlished python packageunit tests for everythingRunning LocallyTo run this locally run docker compose up with the documents and images directory as env vairablesDOCS=<pathtodocs>IMAGE=<pathtoimages>docker-composeupOverviewJunction works by inspecting the changes made on a commit-by-commit basis to your Git repository, and determining what needs to be changed in Confluence to reflect those changes.  Junction (currently) expects to manage the entirespace in Confluence.  Thus when using Junction you must tell it which Space to target and update.  You must not manually change, create, or modify pages in the target space, or else Junction may be unable to synchronize the state in Git with the state in Confluence.To allow mixing code (and other items) with markdown files for Junction in a single repository, you can tell Junction a subpath within your repository that functions as the root e.g. all markdown files will be kept indocs/.  All files should end with the.mdextension.The page will gets its title from the file name, and its contents will be translated into Confluence markup.  Seethis example for what output looks like in Confluence.UsageCollect a set of credentials that Junction will use to login to Confluence.  You will need to create anAPI tokento use instead of a password.I recommend you make a dedicated user account with access permissions limited to the space(s) you want to manage with Junction.In your git repository, create a folder structure and markdown files you would like to publish.  Commit those changes..
├──(yourcodeandotherfiles)└──docs/├──Welcome.md├──Installation.md└──AdvancedUsage|├──Airflow.md|├──VisualStudioOnline.md|├──AtlassianBamboo.md|└──GitHubActions.md└──Credits.mdImagesImages should be placed inside theimagesdirectory within a subdirectory that has the same name as the respective file. for the above example the image directory could look like this..
└── images/
    ├── Welcome/
        ├── image1.png
        └── image2.png
    ├──  Installation/
        └── image1.png
    └── Advanced Usage/
        ├── image1.png
        ├── image2.png
        ├── Airflow/
            └── image1.pngMermaid DiagramsMermaid diagrams can be included in the markdown but must include the document name in the opening fence:```mermaid filename=<document name>seehere for using mermaid.js in github
Package: annaohero
annaoheroannaohero- this module is a Python library for building multiple files into one file and vice versaInstallationInstall the current version with PyPI:pipinstallannaoheroUsageFiles into one file and and vice versaTo combine the files into a single file, use the command:compress(r"(path to the file folder with your files)") example: compress(r'C:\Users\username\Desktop\folder')compress(r'C:\Users\username\Desktop\folder')After you have entered this command, the "sop.nosh" file will be created. This is the source file with your files!To separate the files you should use the following command:uncompress(r'(way to folder with file "sop.nosh")') example: uncompress(r'C:\Users\username\Desktop\folder') The folder must contain the file that you created with the compress() command!uncompress(r'C:\Users\username\Desktop\folderwithsopnosh')##Examplefromannaoheroimportcompress,uncompresspathtofiles=r'C:\Users\username\Desktop\folder'compress(pathtofiles)pathtofilewithsop=r'C:\Users\username\Desktop\folderwithsopnosh'uncompress(pathtofilewithsop)ContributingBug reports and/or pull requests are welcome
Package: annas-py
annas-pyAnna's Archive unofficial client library based on web scrappingUsageInstall by running:pipinstallannas-pyUsage example:importannas_pyresults=annas_py.search("python",language=annas_py.models.args.Language.EN)forrinresults:print(r.title)information=annas_py.get_informations(results[0].id)print("Title:",information.title)print("Description:",information.description)print("Links:",information.urls)
Package: annax
Annax: Approximate Nearest Neighbor Search with JAXAnnax is a high-performance Approximate Nearest Neighbor (ANN) library built on top of the JAX framework. It provides fast and memory-efficient search for high-dimensional data in various applications, such as large-scale machine learning, computer vision, and natural language processing. Annax leverages the power of GPU acceleration to deliver outstanding performance and includes a wide range of indexing structures and distance metrics to cater to different use cases. The easy-to-use API makes it accessible to both beginners and experts in the field.FeaturesFast and memory-efficient approximate nearest neighbor searchGPU acceleration for high-performance computingSupports a wide range of indexing structures and distance metricsEasy-to-use API for seamless integration with existing projectsApplicable to various domains, including machine learning, computer vision, and natural language processingBuilt on top of the JAX framework for enhanced flexibility and extensibilityInstallationTo install Annax, simply run the following command in your terminal:pipinstallannaxQuick StartHere's a simple example of using Annax to find the nearest neighbors in a dataset:importnumpyasnpimportannax# Generate some random high-dimensional datadata=np.random.random((1000,128))# Create an Annax index with the default configurationindex=annax.Index(data)# Query for the 10 nearest neighbors of a random vectorquery=np.random.random(128)neighbors,distances=index.search(query,k=10)Index Typesannax.Index: Flat Indexannax.IndexIVF: Inverted File Indexannax.IndexPQ: Product Quantization Indexannax.IndexIVFPQ: Inverted File Index with Product QuantizationDevelopmentTo install Annax for development, run the following commands in your terminal:python-mpipinstall-e'.[dev]'pre-commitinstallLicenseAnnax is released under the MIT License.