Saravanan666/pypi-org huggingface dataset:
Package: faiss
Unofficial prebuilt binary for Linux and MacOSThe repo that builds this project can be found here:https://github.com/onfido/faiss_prebuiltOriginal readme:Faiss is a library for efficient similarity search and clustering of dense
vectors. It contains algorithms that search in sets of vectors of any size,
up to ones that possibly do not fit in RAM. It also contains supporting
code for evaluation and parameter tuning. Faiss is written in C++ with
complete wrappers for Python/numpy. Some of the most useful algorithms
are implemented on the GPU. It is developed by Facebook AI Research.
Package: faiss-imputer
FaissImputerImpute missing values using faiss - A Python library for missing data imputation with k nearest neighbors.InstallationYou can installfaiss-imputerusingpip:pipinstallfaiss-imputerUsageimportpandasaspdfromfaiss_imputerimportFaissImputer# Create your DataFrame and introduce missing values# ...# Create an instance of FaissImputerimputer=FaissImputer(n_neighbors=3)# Fit the imputer on the data frame with missing valuesimputer.fit(df_missing)# Transform the data frame with missing valuesdf_imputed=imputer.transform(df_missing)Parametersn_neighbors:Number of nearest neighbors to consider for imputation.metric:Distance metric to use for nearest neighbor search ('l2' or 'ip').strategy:Imputation strategy ('mean' or 'median').index_factory:Faiss index type ('Flat' or others).ExampleFor a detailed example, refer to the example.py file.ContributingContributions are welcome! If you find a bug or have an enhancement suggestion, please open an issue or create a pull request.LicenseThis project is licensed under theMIT License.Third-Party LicensesThis project utilizes code from Meta's Faiss library, which is distributed under theApache License 2.0.Please note that while this project includes code from the Faiss library, it is not officially associated with or endorsed by the Faiss maintainers or Meta.For detailed licensing information of the Faiss library, please refer to theFaiss repository.
Package: faissknn
FAISSKNNfaissknncontains implementations for both multiclass and multilabel K-Nearest Neighbors Classifier implementations. The classifiers follow thescikit-learn:fit,predict, andpredict_probamethods.InstallThe FAISS authors recommend to installfaissthrough conda e.g.conda install -c pytorch faiss-gpu. SeeFAISS install pagefor more info.Oncefaissis installed,faissknncan be install through pypi:pip install faissknnUsageMulticlass:fromsklearn.datasetsimportmake_classificationfromsklearn.model_selectionimporttrain_test_splitfromfaissknnimportFaissKNNClassifierx,y=make_classification()x_train,x_test,y_train,y_test=train_test_split(x,y)model=FaissKNNClassifier(n_neighbors=5,n_classes=None,device="cpu")model.fit(x_train,y_train)y_pred=model.predict(x_test)# (N,)y_proba=model.predict_proba(x_test)# (N, C)Multilabel:fromsklearn.datasetsimportmake_classificationfromsklearn.model_selectionimporttrain_test_splitfromfaissknnimportFaissKNNMultilabelClassifierx,y=make_multilabel_classification()x_train,x_test,y_train,y_test=train_test_split(x,y)model=FaissKNNClassifier(n_neighbors=5,device="cpu")model.fit(x_train,y_train)y_pred=model.predict(x_test)# (N, C)y_proba=model.predict_proba(x_test)# (N, C)GPU/CUDA:faissknnalso supports running on the GPU to speed up computation. Simply change the device tocudaor a specific cuda devicecuda:0model=FaissKNNClassifier(n_neighbors=5,device="cuda")model=FaissKNNClassifier(n_neighbors=5,device="cuda:0")
Package: faisslite
About一个用于中文文本向量化和相似度搜索的Python包。它可以将中文段落表征为向量矩阵,并构建向量搜索索引,用于快速准确检索文本中的相似句子。Install$ pip3 install -U faissliteDirectorfaisslitedocument.pyDBscan.pyFaiss.pygrab_from_window.pydocument.py对输入文本进行规范化处理，并将输入文本拆分成段落。parse函数
将文本拆分为由文本段落和分隔符构成的字典数组，为后续向量化处理文本提供了基础。stringify函数
将字典数组表示的文章序列化为文本。DBscan.py对文本进行向量化处理，对向量化后文本聚类。DBscan类add_doc函数
将完整文档向量化，同时记录各段落和文档的信息，包括偏移、起止、页码等。fit_predict函数
向量聚类Faiss.py用DBscan.py处理后的数据建立Faiss索引。实现语义相似句检索。Faiss类search_doc函数
优先选择完整文档相似度最大的，并且过滤掉低于阈值的结果。grab_from_window.py合并多个向量库的检索结果，在指定的窗口内选取返回的文字。Usage将预处理好的文本向量化fromfaisslite.documentimportparsefromfaisslite.DBscanimportDBscansource="预处理好的文本的唯一ID"paras=parse("预处理好的文本字符串")DBscan.save_dir="向量数据库存放目录"db=DBscan("向量数据库名字")db.add_doc(source,{'paras':paras})db.dump()将向量化后文本聚类fromfaisslite.DBscanimportDBscanDBscan.save_dir="向量数据库存放目录"db=DBscan("向量数据库名字")db.fit_predict()db.dump()建立向量数据库fromfaisslite.FaissimportFaissFaiss.save_dir="向量数据库存放目录"db=Faiss("向量数据库名字",exclude=[-1])查询向量数据库，输出查询结果fromfaisslite.FaissimportFaissFaiss.save_dir="向量数据库存放目录"db=Faiss("向量数据库名字")results=db.search_doc("与这段文字进行相似匹配")forresultinresults:source=result['source']# 预处理好的文本的唯一IDscore=result['score']# 相似度texts=result['texts']# 匹配的语句print(f"{source}:{score}")print(texts)fromfaisslite.grab_from_windowimportgrab_from_windowfromfaisslite.documentimportstringifyimportjsonwithopen(Faiss.save_dir+'/index.docs','r',encoding='utf-8')asf:docs=json.load(f)results=grab_from_window(docs,results)forresultinresults:source=result['source']# 预处理好的文本的唯一IDscore=result['score']# 相似度pages=result['pages']# 匹配的段落下标print(f"{source}:{score}")doc=docs[source]print(stringify(doc['paras'],pages))Contact usmay.xiaoya.zhang@gmail.com
Package: faithfulness
Faithfulness 😇An easy-to-use library to evaluate faithfulness (factual correctness) of abstractive summaries. Faithfulness is computed by comparing a summary with its original source document.This library includes multiple faithfulness metrics based on:BERTScoreEntailmentQuestion Generation & Question Answering framework (QGQA)Named Entity Recognition (NER)Open Information Extraction (OpenIE)Semantic Role Labeling (SRL)Sentence Similarity (SentSim)Installation ⚙️$ conda create -n my_project python=3.8This creates a new virtual environment for your project with conda. You can activate it with$ conda activate my_project.$ conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=10.1 -c pytorchPlease install PyTorch by following the instructionshere. Make sure to install the CUDA variant that matches the CUDA version of your GPU.$ pip install faithfulnessThis installs the faithfulness library and it's dependencies. Read more about the dependenciesbelow.All faithfulness metrics are model-based. Some models have to be installed manually:Download the SRL modelhereand save it in your project. e.g./models/srl_model.tar.gzDownload a spacy model:$ python -m spacy download en_core_web_smDownload CoreNLP:import stanza && stanza.install_corenlp()Usage 🔥from faithfulness.QGQA import QGQA

qgqa = QGQA()
summary = "Lorem ipsum dolor sit amet"
source = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam ..."
faithfulness, info = qgqa.score(summary, source)More examples can be foundhere 💯.Evaluation 📊We evaluated all faithfulness metrics by correlating them with human judgements on the XSUM dataset (link).
You will soon be able to read more about the evaluation in our paper. (Master's thesis)MethodPearson (r)Spearman (p)🥇 BERTScore0.5010.486🥈 Entailment0.3660.422🥉 SentSim0.3920.389SRL0.3930.377NER0.2520.259QGQA0.2280.258OpenIE0.1690.185Dependencies 🔗By running$ pip install faithfulnessyou will install this library as well as the following dependencies:🤗 transformersspaCy(used for Entailment, NER, QGQA, SentSim, SRL)Stanza(used for OpenIE)AllenNLP(used for SRL)SentenceTransformers(used for NER, OpenIE, QGQA, SentSim, SRL)Troubleshooting 🛠There are currently problems when installing allennlp and jsonnet. If you encounter "Building wheel for jsonnet (setup.py) ... error" during the installation please try:apt-get install make 
apt-get install g++or install jsonnet before installing this libraryconda install -c conda-forge jsonnet
pip install faithfulness
Package: faizata11-pemcariansurat
Make sure you have upgraded version of pipWindowspy -m pip install --upgrade pipLinux/MAC OSpython3 -m pip install --upgrade pipCreate a project with the following structurepackaging_tutorial/
â”œâ”€â”€ LICENSE
â”œâ”€â”€ pyproject.toml
â”œâ”€â”€ README.md
â”œâ”€â”€ setup.cfg
â”œâ”€â”€ src/
â”‚   â””â”€â”€ example_package/
â”‚       â”œâ”€â”€ __init__.py
â”‚       â””â”€â”€ example.py
â””â”€â”€ tests/
touch LICENSE
touch pyproject.toml
touch setup.cfg
mkdir src/mypackage
touch src/mypackage/__init__.py
touch src/mypackage/main.py
mkdir testspyproject.tomlThis file tells tools like pip and build how to create your project[build-system]
requires = [
    "setuptools>=68",
    "wheel"
]
build-backend = "setuptools.build_meta"build-system.requires gives a list of packages that are needed to build your package. Listing something here will only make it available during the build, not after it is installed.build-system.build-backend is the name of Python object that will be used to perform the build. If you were to use a different build system, such as flit or poetry, those would go here, and the configuration details would be completely different than the setuptools configuration described below.Setup.cfg setupUsing setup.cfg is a best practice, but you could have a dynamic setup file using setup.py[metadata]
name = example-pkg-YOUR-USERNAME-HERE
version = 0.0.1
author = Example Author
author_email = author@example.com
description = A small example package
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/pypa/sampleproject
project_urls =
    Bug Tracker = https://github.com/pypa/sampleproject/issues
classifiers =
    Programming Language :: Python :: 3
    License :: OSI Approved :: MIT License
    Operating System :: OS Independent

[options]
package_dir =
    = src
packages = find:
python_requires = >=3.6

[options.packages.find]
where = srcRunning the buildMake sure your build tool is up to dateWindowspy -m pip install --upgrade buildLinux/MAC OSpython3 -m pip install --upgrade buildCreate the buildpy -m buildReferenceshttps://packaging.python.org/tutorials/packaging-projects/
Package: fa.jquery
This module provide a set of ajax widgets forFormAlchemyusingjQuery.uiHave a look at theOnline demoBug and feature request must be reported on thegithub trackerCHANGES0.9.5 - 2011-09-15Add Pyramid 1.1 compatibility [amleczko]Usefanstaticto serve resource0.9.2Small change to work with pyramid_formalchemy 0.2
add italian translations [amleczko]0.9.1Add some improvements to avoid failures with FF40.9Add pyramid view and templatesSwitch to latest jQuery.ui0.7Improve ModelController using jqGridAdd relation(s) widgets for pylons0.6.2IE do not support indexOf. Fix Array prototype.0.6.1Add Flash message0.6Switch to jquery.ui 1.8. Autocomplete should now return a json array of {“value”: “v”}.Better implementation of RichTextFieldRenderer allowing to use TinyMCE and MarkitUp!0.4Add TemplateEngine with jquery.ui css classes0.3fix MANIFEST.in to include mako templates in distribution.Add fa.jquery.forms.Accordion
Package: fajrGPT
fajrGPTThis Python Command-Line application assists in helping you wake up for Fajr prayer by providing automatically selected verses + explanations from the Quran after a set alarm time along with a soothing Islamic prayer fade-in and fade-out fromMishari bin Rashid Alafasy. The program uses theQuran Moduleto obtain Quran verses in English as well as OpenAI's API GPT models to produce corresponding Tafsir (explanation).FeaturesPlays Alafsay's Quran recitation audio for user-selected Surah (default is Surah Al-Fathiha) fromTahfeemIncludes option to play Alafsay's Quranic recitation with its corresponding English translation obtained fromThe Chosen OnePlays the downloaded audio after a user-specified countdown time (i.e. 10s, 15m, 7h), with volume gradually fading in.Option to select and display a Name of Allah and provide corresponding explanation of its meaning with the GPT APIDisplays automatically selected verses from the Quran and provides corresponding explanations.Depending on the length of the countdown, one, two, or three verses will be selected for displayAfter each explanation, the program waits for the user to press Enter before proceeding.Once all explanations are provided, the audio volume gradually fades out over a 5-second period.UsageInstalling FFmpegFFmpeg is a necessary dependency for this package in order to play audio mp3 files. Follow the instructions below based on your operating system:WindowsOption 1: Using Conda (recommended for Conda users)If you have Anaconda or Miniconda installed, you can install FFmpeg using the following command:conda install -c conda-forge ffmpegOption 2: Manual InstallationGo to the FFmpeg officialdownload pageand download the Windows version.Extract the ZIP archive.Add the path to thebindirectory (whereffmpeg.exeis located) to your system's PATH variable.macOSUsing Homebrew (recommended):brew install ffmpegOr follow the manual installation process similar to Windows by downloading from the FFmpeg official site.Linux (e.g., Ubuntu)Using the package manager:sudo apt install ffmpegFor other Linux distributions, adjust the command according to your package manager.CLI Installation with PyPI DistributionClone repo and install packages (for developers):gitclonehttps://github.com/malekinho8/quran-wake-up.git
pipinstall-rrequirements.txt
pipinstall.Alternatively, install one dependency manually andfajrGPTthrough PyPI:pipinstallgit+https://github.com/malekinho8/quran-module.gitfajrGPTRun the main.py script, passing the required parameters:fajrGPT--countdown-time<Seconds,Minutes,orHoursuntilAlarm>--surah<WhichSurah(number)toplayforthealarm,defaultis1>Required Parameters--countdown-time: The amount of timeDependenciesPython 3.xclickpygamepydubmoviepyopenaiscipymutagenTheQuranModuleNotesThe OpenAI API key must be set in an environment variable namedOPENAI_API_KEY. See instructionsherefor more details.LicenseMIT
Package: fake0407002
To-pipto-pipis a command line tool that helps you create Python packages from your Python files and upload them to PyPI with ease.InstallationTo installto-pip, use the following command:python-mpipinstallto-pipUsageTo useto-pip, simply run the following command:python-mto_pip-n<package_name>-v<package_version>[-u<pypi_username>-p<pypi_password>]<python_files>Where:<package_name>is the name of your package.<package_version>is the version of your package.<pypi_username>is your PyPI username (optional).<pypi_password>is your PyPI password (optional).<python_files>are the Python files you want to include in your package.For example, if you have a filehello.pythat you want to include in your package, you can run the following command:python-mto_pip-nhello-world-v0.1.0hello.pyThis will create a package calledhello-worldwith version0.1.0, and containing thehello.pyfile.If you have multiple Python files that you want to include in your package, you can specify them all as arguments:python-mto_pip-nhello-world-v0.1.0hello.pyworld.pyBy default,to-pipwill create a console script for each Python file you include in your package. For example, if you includehello.pyandworld.py,to-pipwill create two console scripts calledhelloandworld. You can run these scripts from the command line once you install your package.Uploading to PyPIIf you want to upload your package to PyPI, you can provide your PyPI credentials using the-uand-poptions:python-mto_pip-nhello-world-v0.1.0-u<pypi_username>-p<pypi_password>hello.pyThis will upload your package to PyPI once it is created.Licenseto-pipis distributed under the MIT License. SeeLICENSEfor more information.
Package: fake0407002c
to-pipto-pipis a tool that makes it easy to convert a set of Python files into a Python package that can be uploaded to PyPI. It can also upload the package to PyPI for you, if you provide your PyPI credentials.UsageWeb InterfaceGithub:https://github.com/bohachu/to_pipWeb interface:http://to-pip.falra.netYou can use the web interface ofto-piphere. Simply upload your Python files, enter your package name and version, and click "Create Package". If you provide your PyPI credentials, you can also choose to upload the package to PyPI directly from the web interface.Command Line InterfaceYou can also use theto-pipcommand-line tool to create a package from your Python files. To use it, simply install theto-pippackage using pip:pip install to-pipThen, run theto-pipcommand with the following arguments:python -m to_pip -n <package_name> -v <package_version> [-u <pypi_username> -p <pypi_password>] <python_files>Here is what each argument means:-nor--package_name: The name of your package.-vor--package_version: The version of your package inx.x.xformat.-uor--pypi_username(optional): Your PyPI username. If you provide this,to-pipwill upload your package to PyPI for you.-por--pypi_password(optional): Your PyPI password. If you provide this,to-pipwill upload your package to PyPI for you.<python_files>: The Python files that you want to include in your package.Package UsageOnce you have created your package, you can install it using pip:pip install <package_name>After installing the package, you can use any functions or classes defined in your Python files as normal.ExampleLet's say you have two Python files,hello.pyandworld.py, that you want to package into a package calledhelloworldwith version1.0.0. Here's how you would useto-pipto create the package:python -m to_pip -n helloworld -v 1.0.0 hello.py world.py
Package: fake04072345
To-pipto-pipis a command line tool that helps you create Python packages from your Python files and upload them to PyPI with ease.InstallationTo installto-pip, use the following command:python-mpipinstallto-pipUsageTo useto-pip, simply run the following command:python-mto_pip-n<package_name>-v<package_version>[-u<pypi_username>-p<pypi_password>]<python_files>Where:<package_name>is the name of your package.<package_version>is the version of your package.<pypi_username>is your PyPI username (optional).<pypi_password>is your PyPI password (optional).<python_files>are the Python files you want to include in your package.For example, if you have a filehello.pythat you want to include in your package, you can run the following command:python-mto_pip-nhello-world-v0.1.0hello.pyThis will create a package calledhello-worldwith version0.1.0, and containing thehello.pyfile.If you have multiple Python files that you want to include in your package, you can specify them all as arguments:python-mto_pip-nhello-world-v0.1.0hello.pyworld.pyBy default,to-pipwill create a console script for each Python file you include in your package. For example, if you includehello.pyandworld.py,to-pipwill create two console scripts calledhelloandworld. You can run these scripts from the command line once you install your package.Uploading to PyPIIf you want to upload your package to PyPI, you can provide your PyPI credentials using the-uand-poptions:python-mto_pip-nhello-world-v0.1.0-u<pypi_username>-p<pypi_password>hello.pyThis will upload your package to PyPI once it is created.Licenseto-pipis distributed under the MIT License. SeeLICENSEfor more information.
Package: fake0408
to-pipto-pipis a tool that makes it easy to convert a set of Python files into a Python package that can be uploaded to PyPI. It can also upload the package to PyPI for you, if you provide your PyPI credentials.UsageWeb InterfaceGithub:https://github.com/bohachu/to_pipWeb interface:http://to-pip.falra.netYou can use the web interface ofto-piphere. Simply upload your Python files, enter your package name and version, and click "Create Package". If you provide your PyPI credentials, you can also choose to upload the package to PyPI directly from the web interface.Command Line InterfaceYou can also use theto-pipcommand-line tool to create a package from your Python files. To use it, simply install theto-pippackage using pip:pip install to-pipThen, run theto-pipcommand with the following arguments:python -m to_pip -n <package_name> -v <package_version> [-u <pypi_username> -p <pypi_password>] <python_files>Here is what each argument means:-nor--package_name: The name of your package.-vor--package_version: The version of your package inx.x.xformat.-uor--pypi_username(optional): Your PyPI username. If you provide this,to-pipwill upload your package to PyPI for you.-por--pypi_password(optional): Your PyPI password. If you provide this,to-pipwill upload your package to PyPI for you.<python_files>: The Python files that you want to include in your package.Package UsageOnce you have created your package, you can install it using pip:pip install <package_name>After installing the package, you can use any functions or classes defined in your Python files as normal.ExampleLet's say you have two Python files,hello.pyandworld.py, that you want to package into a package calledhelloworldwith version1.0.0. Here's how you would useto-pipto create the package:python -m to_pip -n helloworld -v 1.0.0 hello.py world.py
Package: fake0408a
to-pipto-pipis a tool that makes it easy to convert a set of Python files into a Python package that can be uploaded to PyPI. It can also upload the package to PyPI for you, if you provide your PyPI credentials.UsageWeb InterfaceGithub:https://github.com/bohachu/to_pipWeb interface:http://to-pip.falra.netYou can use the web interface ofto-piphere. Simply upload your Python files, enter your package name and version, and click "Create Package". If you provide your PyPI credentials, you can also choose to upload the package to PyPI directly from the web interface.Command Line InterfaceYou can also use theto-pipcommand-line tool to create a package from your Python files. To use it, simply install theto-pippackage using pip:pip install to-pipThen, run theto-pipcommand with the following arguments:python -m to_pip -n <package_name> -v <package_version> [-u <pypi_username> -p <pypi_password>] <python_files>Here is what each argument means:-nor--package_name: The name of your package.-vor--package_version: The version of your package inx.x.xformat.-uor--pypi_username(optional): Your PyPI username. If you provide this,to-pipwill upload your package to PyPI for you.-por--pypi_password(optional): Your PyPI password. If you provide this,to-pipwill upload your package to PyPI for you.<python_files>: The Python files that you want to include in your package.Package UsageOnce you have created your package, you can install it using pip:pip install <package_name>After installing the package, you can use any functions or classes defined in your Python files as normal.ExampleLet's say you have two Python files,hello.pyandworld.py, that you want to package into a package calledhelloworldwith version1.0.0. Here's how you would useto-pipto create the package:python -m to_pip -n helloworld -v 1.0.0 hello.py world.py