Saravanan666/pypi-org huggingface dataset:
Package: fastdates
fastdatesWhat is it?fastdates module allows users to get dates using a declarative language in the form of simple, human-readable Python methods.ExamplesfromfastdatesimportFastdatesfd=Fastdates.DateGenerator()fd.get_next_n_days(5)['2022-10-26','2022-10-27','2022-10-28','2022-10-29','2022-10-30']fd.get_last_day_of_previous_month()'2022-09-30'fd.get_previous_n_months(3)['2022-09','2022-08','2022-07']
Package: fastdatetime
fastdatetimeLikedatetime, but fast 🚀Implementation•Installation•FAQ•AcknowledgementsImplementationstrptimeIn the pursuit of a fasterstrptimeimplementation, two backingRust crateswere chosen due to their popularity in the ecosystem –chronoandtime.Both impementations are exposed under the following methods:fastdatetime.strptime(based ontimealong withtime-fmt)fastdatetime.chrono.strptime(based onchrono)Initially,chronoseemed liked a drop-in replacement, however due to subtle differences of%fspecifier the format argument needs to preprocessed to conform to thePython referecewhich incurs slight performance overhead as the format string needs to be scanned.
Furthermore, even without this shortcoming, the parsing was slower compared totime.What's also interesting is thattimedoesn't supportstrptimecompatible inferface out of the box – fortunatellytime-fmtdoes (in addition, some fixes and new functionality was upstreamed to the crate).parseOftentimes the date format is not known ahead of time, or it is not possible to infer it from a few samples. In Python, one would usually opt for using thedateutilpackage, which can deal with all sorts of edge cases and is very forgiving, however these guarantees come at a cost – in order for the results to not be ambiguous but accurate, the user can tweak a lot of options (is the day or year first, ...) and has to sacrifice performance.Enterdtparseby Bradlee Speice, a rewrite ofdateutil.parsein Rust. Going full circle,fastdatetimejust exposes Python bindings to Bradlee's excellentcrate. This yields ~15x faster parsing performance (657 vs 42 Kops/sec on M1 Pro).InstallationTBDFAQTBDAcknowledgementstimeandtime-fmtfor the defaultstrptimeimplementationchronoas an alternative implementation parsestrptimeformats (specifiers reference)dtparse(dateutilimplemented in Rust)pyo3for Python bindingsmaturinfor building Python wheelsLicense© 2022 Contributors of Project fastdatetime.This project is licensed under either ofApache License, Version 2.0(LICENSE-APACHE)MIT license(LICENSE-MIT)at your option.TheSPDXlicense identifier for this project isMIT OR Apache-2.0.
Package: fast-dep
fast-depFast python dependency tracing, from Rust.pip install fast-depNOTE:There is currently some issue with running PyO3 code in MacOS conda environments, see more details [here]. We currently recommend usingpyenvinstalls which work on that OS. See instruction below.Installing PyEnv (For MacOS)Installpyenv.brew install pyenvPlace the following in your.zshrcor.profile.eval "$(pyenv init -)"Install a specific version of Python.PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install X.Y.ZGet a shell with this previously installed Python version.pyenv shell X.Y.ZThen install fast dep.pip install fast-depDevelopmentBuilding from sourceInstall rust fromrustup.rsthen run the following to build the python package for your current environment.pip install -e ".[test]"You can also build without installing by using the following method.pip install maturin
maturin buildRunning testspython -m pytest pytests
Package: fastdependency
Fast DependencyInstallationpip install fastdependencyUsagefromfastdependencyimportDepends,injectdefusername()->str:return'mahdi'defpassword()->str:return'123***456'@injectdefmy_function(param:int,username:str=Depends(username),# Gets it from function.password:str=Depends(password),# Gets it from container.):print(param)print(username)print(password)my_function(12)TODOFull DocsPrecommit
Package: fastdeploy
fastDeployeasy and performant micro-services for Python Deep Learning inference pipelinesDeploy any python inference pipeline with minimal extra codeAuto batching of concurrent inputs is enabled out of the boxno changes to inference code (unlike tf-serving etc), entire pipeline is run as isPromethues metrics (open metrics) are exposed for monitoringAuto generates clean dockerfiles and kubernetes health check, scaling friendly APIssequentially chained inference pipelines are supported out of the boxcan be queried from any language via easy to use rest apiseasy to understand (simple consumer producer arch) and simple code baseInstallation:pipinstall--upgradefastdeployfdclient# fdclient is optional, only needed if you want to use python clientCLI explainedStart fastDeploy server on a recipe:# Invoke fastdeploypython-mfastdeploy--help# orfastdeploy--help# Start prediction "loop" for recipe "echo"fastdeploy--loop--reciperecipes/echo# Start rest apis for recipe "echo"fastdeploy--rest--reciperecipes/echoSend a request and get predictions:Python client usagecurl usageNodejs client usageauto generate dockerfile and build docker image:# Write the dockerfile for recipe "echo"# and builds the docker image if docker is installed# base defaults to python:3.8-slimfastdeploy--build--reciperecipes/echo# Run docker imagedockerrun-it-p8080:8080fastdeploy_echoServing your model (recipe):Writing your model/pipeline's recipeWhere to use fastDeploy?to deploy any non ultra light weight models i.e: most DL models, >50ms inference time per exampleif the model/pipeline benefits from batch inference, fastDeploy is perfect for your use-caseif you are going to have individual inputs (example, user's search input which needs to be vectorized or image to be classified)in the case of individual inputs, requests coming in at close intervals will be batched together and sent to the model as a batchperfect for creating internal micro services separating your model, pre and post processing from business logicsince prediction loop and inference endpoints are separated and are connected via sqlite backed queue, can be scaled independentlyWhere not to use fastDeploy?non cpu/gpu heavy models that are better of running parallely rather than in batchif your predictor calls some external API or uploads to s3 etc in a blocking wayio heavy non batching use cases (eg: query ES or db for each input)for these cases better to directly do from rest api code (instead of consumer producer mechanism) so that high concurrency can be achieved
Package: fast-deskew
fast_deskewAn optimised way to deskew images faster.• Available on :The Python Package Index (PyPI)  :https://pypi.org/Installationpip install fast_deskewHow to use it?import fast_deskewINPUT_IMAGE_PATH = "example/input_image.png"img_input = cv2.imread(INPUT_IMAGE_PATH,cv2.IMREAD_GRAYSCALE)result_image, best_angle = fast_deskew.deskew_image(img_input)ORimport fast_deskewINPUT_IMAGE_PATH = "example/input_image.png"result_image, best_angle = fast_deskew.deskew_image(INPUT_IMAGE_PATH, False) #0 for image array and 1 for image_path.Input Image:Output Image:License© 2021 Subham PrasadThis repository is licensed under the MIT license. See LICENSE for details.
Package: fastdiff
fastdiffA fast/native implementation of diff algorithms using WebAssembly andWasmer.Free software: MIT licenseFeaturesUses WebAssembly to achieve 75x speedup in the compare algorithmCompatible with any platformCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2019-07-04)First release on PyPI.
Package: fast-diff-match
A Python extension module that wraps google-diff-match-patch’s C++ implementation for performing very fast string comparisons.google-diff-match-patch is a Google library for computing differences between text files (<http://code.google.com/p/google-diff-match-patch>). Thare are implementations in various languages. Although there is a Python port, it’s slow on very large documents, and I have a need for speed. I wanted to use the C++ implementation, but I’m a Python guy so I’d prefer to use it from Python.Google’s library depends on Qt 4, so some other folks rewrote it using the standard C++ library classes instead, making it more portable. That’s at <https://github.com/leutloff/diff-match-patch-cpp-stl>.This project is a Python extension module for the C++ STL port so Python code
can call into the native library easily. It works in both Python 2 and Python 3.ExampleFirst:pip3 install diff_match_patch_pythonThen write (this is Python 3):from diff_match_patch import diff

changes = diff("Hello world.", "Goodbye moon.",
        timelimit=0, checklines=False)

for op, length in changes:
        if op == "-": print ("next", length, "characters are deleted")
        if op == "=": print ("next", length, "characters are in common")
        if op == "+": print ("next", length, "characters are inserted")The module also provides a method calleddiff_bytesfor performing a diff on a bytes array.In Python 2, the methods are nameddiff_unicode(unicode strings) anddiff_str(str strings).Thetimelimitargument is the maximum running time in seconds if you want to ensure the result comes quickly. According to the Google docs, the diff will stop working after the time is exceeded and will return a valid diff, but it might not be the best one.checklinesis also a Google thing and might speed up diffs that are over lined-based text like code.The diff methods also take acounts_onlyargument which isTrueby default. Set it toFalseto have the returned value be an array of tuples of operations and corresponding strings rather than operations and the lengths of those strings.Building from sourceTo build from these sources, you will need:Python development headers (Debian packagepython-dev)The diff-match-patch library, which you can clone usinggit submodule update--init.Then build the binary module using:python setup.py installOr you may find pre-built binaries stored in the git repository in the build directory.
Your mileage may vary with these depending on whether your system is compatible.For package maintainersTo build everything:git submodule update && rm -rf build && python setup.py build && python3 setup.py buildAnd to test without installing:PYTHONPATH=build/lib.linux-x86_64-2.7/ python test.py
PYTHONPATH=build/lib.linux-x86_64-3.4/ python3 test.py
Package: fastdoc
fastdocCreate publication-quality books from Jupyter notebooksThe output offastdocis anasciidocfile for each input notebook. You can then useasciidoctorto convert that to HTML, DocBook, epub, mobi, and so forth.Installpip install fastdocorconda install fastdocHow to useCreate notebooks in a folder calledbook. From that folder, runfastdoc_convert_allin your terminal. You'll find your exported asciidoc files and all images used in../convert_book. For a single notebook demonstrating all the features offastdoc, see thetest/_test.ipynbnotebook. For a complete O'Reilly book written in this way, seefastbook.
Package: fastdocx
FastDocxFastDocx是一个自动化模块 帮助你快速依据模板生成word文档安装pip install fastdocx -i https://pypi.org/simple示例一行代码开启GUI界面，点击开始一键生成importfastdocxfastdocx.ui()或者运行下面这段代码，目录下会自动生成wordfromfastdocximportWordCoreworkspace=r"./"(WordCore(workspace).load("https://v.gonorth.top:444/file/111111111111/config.json").process())让我们看看config.json中是哪些内容{# 任务配置信息# 12位id，模板解析任务的唯一标识"id":"111111111111",# 任务名称"taskname":"测试任务",# 任务作者"author":"GoNorth",# 任务版本"version":"V0.0.1",# 任务描述"description":"这是一个测试任务，一帆风顺🤩",# 模板地址 URL/PATH"template":"https://v.gonorth.top:444/file/111111111111/template.docx",# 模板解析的内容"word":[{# 输出word名称"name":"1.docx",# 具体替换内容"content":[{# 将定位替换模板中{{A}}"key":"A",# 类型 text/img/tab/br"type":"text",# 支持填入返回str的函数"value":"我是替换上去的标题"},{"key":"B","type":"img",# 图片value支持 [path/stream/url,width,height]"value":["https://v.gonorth.top:444/file/111111111111/img/2.png"]},# 还可以加入其他关键字]},# 继续填写其他生成的word内容]}可以看到使用FastDocx可以利用json模板的方式，随时随地便捷地创建成批的Word文档特点工作空间支持一键化解析，书写方便Gen your word everywhere，可以传入云端配置脚本随处生成支持json配置能够插入图片、表格、空行动态解析，字典中能传入函数作为内容高性能异步多线程下载引擎设计工作空间目录workspace -- {id} -- tmp -- template.docx     # word模板
                  |      |
                  |      |- index.json        # json配置信息
                  |      |
                  |      |- img -- 1.img      # 供插入的图片文件
                  |             |
                  |             |- 2.img      
                  |- out                      # 输出文件夹高级使用你可以根据下面的dict自定义输入，就像第一个例子里一样，你可以将这个json托管到cdn，由此你就能随处生成你的word文档fromfastdocximportWordCorebasepath=r"./"config={"id":"111111111111","taskname":"测试任务","author":"GoNorth","version":"V0.0.1","description":"这是一个测试任务，一帆风顺🤩","template":"https://v.gonorth.top:444/file/111111111111/template.docx","word":[{"name":"out.docx","content":[{"key":"A","type":"text","value":"我是替换上去的标题"},{"key":"B","type":"img","value":["https://v.gonorth.top:444/file/111111111111/img/2.png"]}]}]}(WordCore(basepath).load(config).process())高级用法，你可以直接传入函数调用该模块fromfastdocximportWordCorebasepath=r"./"config={"id":"111111111111","taskname":"测试任务","author":"GoNorth","version":"V0.0.1","description":"这是一个测试任务，一帆风顺🤩","template":"https://v.gonorth.top:444/file/111111111111/template.docx","word":[{"name":"out.docx","content":[{"key":"A","type":"text","value":lambda:"动态函数传入"},{"key":"B","type":"img","value":[io.b]}]}]}(WordCore(basepath).load(config).process())TODOPyQT GUI集成download 模块遇到url自动下载图片并插入更好的图片支持（图例等）表格支持感谢捐助✨Namegithub￥Bai Fenghttps://github.com/baifengbai50
Package: fast-downloader-mt
Fast DownloaderWhy?Primarly, to have a nice tool to download ubuntu packages with apt-fast.DocumentsCHANGELOG.mdLICENSE MITFeaturesDownload multiple files in parallelPartially compatible with aria2 input file formatInstallingInstall withpipor your favorite PyPi package manager.pipinstallfast-downloader-mtDependenciesPython 3.8+RichRequestsClickUsageUsage: fdl [OPTIONS] [URLS]...Options:
-t, --threads INTEGER        thread number
-i, --input PATH             input file
-q, --quiet
-d, --destination PATH
--aria2-compatibility
--buffer-size INTEGER
--help                       Show this message and exit.Default number of threads set tocpu_count()Usage with apt-fastIn/etc/apt-fast.conf_DOWNLOADER='fdl --aria2-compatibility -t ${_MAXNUM} -i ${DLLIST} -d ${DLDIR}'Dev environmentDev dependenciespytestpylintblackmypyflake8banditsafetySetupWith poetry:poetryinstall
Package: fast-down-upload
分布式文件下载上传[介绍文档]支持版本: python 3.6+下载安装安装依赖:pipinstallfast-down-upload下载上传说明支持操作系统:(MAC,LINUX)下载默认路径:/root/local_videos/
上传默认支持:aliyunoss分布式下载上传DEMOimportfast_down_upload.configsasconfigsfromfast_down_upload.StartDownUploadimportpublic_downupload_task,start_customer_downupload_task# redis连接配置configs.redis_host='127.0.0.1'configs.redis_password=''configs.redis_port=6379configs.redis_db=0# ALIYUN OSS配置configs.aliyun_access_key_id=''configs.aliyun_access_key_secret=''configs.aliyun_endpoint=''configs.aliyun_bucket_name=''#发布下载上传任务foriinrange(1,21):down_dict={'down_url':'https://video1.matafy.com/dyvideo/201811/6609568770908228877.mp4','file_name':'test'+str(i),'file_dir':'douyin','file_type':'','callback':None}public_downupload_task(down_dict)#消费下载上传任务start_customer_downupload_task(threads_num=100)
Package: fastdtw
fastdtwPython implementation ofFastDTW[1], which is an approximate Dynamic Time Warping (DTW) algorithm that provides optimal or near-optimal alignments with an O(N) time and memory complexity.Installpip install fastdtwExampleimport numpy as np
from scipy.spatial.distance import euclidean

from fastdtw import fastdtw

x = np.array([[1,1], [2,2], [3,3], [4,4], [5,5]])
y = np.array([[2,2], [3,3], [4,4]])
distance, path = fastdtw(x, y, dist=euclidean)
print(distance)References[1]Stan Salvador, and Philip Chan. “FastDTW: Toward accurate dynamic time warping in linear time and space.” Intelligent Data Analysis 11.5 (2007): 561-580.
Package: fastdup
Fastdup ToolCopyright (C) 2022 by Dr. Amir Alush and Dr. Danny Bickson.fastdup is a tool for gaining insights from a large image/video collection. It can find anomalies, duplicate and near duplicate images/videos, clusters of similarity, learn the normal behavior and temporal interactions between images/videos. It can be used for smart subsampling of a higher quality dataset, outlier removal, novelty detection of new information to be sent for tagging.fastdup is:Unsupervised: fits any datasetScalable : handles 400M images on a single machineEfficient: works on CPU onlyLow Cost: can process 12M images on a $1 cloud machine budgetNon Commercial LicenseGithub Project Page
Package: fastedit
FastEditFastEdit is a Python library to edit videos. Thanks to it you can manipulate videos and/or audios with actions such as cut, loop, or concatenate.InstallationFastEdit is based on FFmpeg which means it has to be installed on your machine before using FastEdit.UsingpipIfpipis installed on your machine, you can install FastEdit by typing the following command:pip install fasteditIf you want a specific version of FastEdit viapip, type the following command:pip install fastedit==VERSIONIf you want to install FastEdit from this GitHub repository, type the following command:pip install git+https://github.com/ThomasMargnac/fastedit@mainTry your first FastEdit programfromfastedit.MediasimportVideovideo=Video("video.mp4")clip=video.clip(0,10)clip.save("new_video.mp4")For more information and examples, checkout thewiki.ResourcesTypeLink📚WikiGitHub Wiki🛠API ReferenceGitHub Page🚨Bug ReportsGitHub Issue Tracker
Package: fast-edit-distance
Fast calculation of Edit Distance (ED)A implementation of edit distance with improved runtime. Implemented using C and cython.Highlight:This edit distance calculation is significantly faster than most of existing python package.
It enables a max edit distance search, specifically, if you have a query sequence and wanted
to find the most similar item in a long list, you could set a maximum edit distance and enable
a fast search.Installation:Install using pip:pip install fast-edit-distanceor build from sourcegit clone https://github.com/youyupei/fast_edit_distance.git
cd fast_edit_distance
python3 setup.py build
python3 setup.py install --userUsage:from fast_edit_distance import edit_distance

# example
edit_distance(string1, string2, max_ed=5)Compare withLevenshtein.distanceThefast_edit_distance.edit_distancehas the same function asLevenshtein.distancewith significantly improved runtime. Especially when people need to identied pair of strings whose ED are smaller than a number (setmax_edin fast_edit_distance.edit_distance). Here is the runtime test with some random sequence (Run thetest/test.pyto reproduce this comparison):Runtime test no max ed cutoff(1_000_000 iteration):
Levenshtein.distance: 46.49s
fast_edit_distance.edit_distance: 12.75s

Runtime test with max ed cutoff 1 (1_000_000 iteration):
Levenshtein.distance: 46.45s
fast_edit_distance.edit_distance: 0.50s
Package: fast-elm-kernel
Fast ELM KernelThis package provides fast calculation of an Extreme Learning Machine kernel. ELM kernels are parameter free gaussian kernels.Usagepip install fast-elm-kernelfromfast_elm_kernelimportelm_kernel_vec,elm_kernelimportnumpyasnp# Note that for vector operations elm_kernel_vec is prefered and fasterX=np.array([[17,24,1,8,15],[23,5,7,14,16],[4,6,13,20,22],[10,12,19,21,3],[11,18,25,2,9]])print(elm_kernel(X,X))print(elm_kernel_vec(np.array([1,2,3]),np.array([100,0.5,0.3])))LICENSEMIT LicenseCopyright (c) [2022] [Moritz Heusinger]Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: fastembed
⚡️ What is FastEmbed?FastEmbed is a lightweight, fast, Python library built for embedding generation. Wesupport popular text models. Pleaseopen a GitHub issueif you want us to add a new model.The default text embedding (TextEmbedding) model is Flag Embedding, the top model in theMTEBleaderboard. It supports "query" and "passage" prefixes for the input text. Here is an example forRetrieval Embedding Generationand how to useFastEmbed with Qdrant.Light & FastQuantized model weightsONNX Runtime, no PyTorch dependencyCPU-first designData-parallelism for encoding of large datasetsAccuracy/RecallBetter than OpenAI Ada-002Default is Flag Embedding, which is top of theMTEBleaderboardList ofsupported models- including multilingual models🚀 InstallationTo install the FastEmbed library, pip works:pipinstallfastembed📖 QuickstartfromfastembedimportTextEmbeddingfromtypingimportListimportnumpyasnpdocuments:List[str]=["passage: Hello, World!","query: Hello, World!",# these are two different embedding"passage: This is an example passage.","fastembed is supported by and maintained by Qdrant."# You can leave out the prefix but it's recommended]embedding_model=TextEmbedding(model_name="BAAI/bge-base-en")embeddings:List[np.ndarray]=list(embedding_model.embed(documents))# Note the list() call - this is a generatorUsage with QdrantInstallation with Qdrant Client in Python:pipinstallqdrant-client[fastembed]You might have to usepip install 'qdrant-client[fastembed]'on zsh.fromqdrant_clientimportQdrantClient# Initialize the clientclient=QdrantClient("localhost",port=6333)# For production# client = QdrantClient(":memory:") # For small experiments# Prepare your documents, metadata, and IDsdocs=["Qdrant has Langchain integrations","Qdrant also has Llama Index integrations"]metadata=[{"source":"Langchain-docs"},{"source":"Llama-index-docs"},]ids=[42,2]# If you want to change the model:# client.set_model("sentence-transformers/all-MiniLM-L6-v2")# List of supported models: https://qdrant.github.io/fastembed/examples/Supported_Models# Use the new add() instead of upsert()# This internally calls embed() of the configured embedding modelclient.add(collection_name="demo_collection",documents=docs,metadata=metadata,ids=ids)search_result=client.query(collection_name="demo_collection",query_text="This is a query document")print(search_result)Similar WorkIlyas M. wrote about usingFlagEmbeddings with Optimumover CUDA.
Package: fastembed-haystack
fastembed-haystackTable of ContentsInstallationLicenseInstallationpip install fastembed-haystackUsageYou can useFastembedTextEmbedderandFastembedDocumentEmbedderby importing as:fromhaystack_integrations.components.embedders.fastembedimportFastembedTextEmbeddertext="fastembed is supported by and maintained by Qdrant."text_embedder=FastembedTextEmbedder(model="BAAI/bge-small-en-v1.5")text_embedder.warm_up()embedding=text_embedder.run(text)["embedding"]fromhaystack_integrations.components.embedders.fastembedimportFastembedDocumentEmbedderfromhaystack.dataclassesimportDocumentembedder=FastembedDocumentEmbedder(model="BAAI/bge-small-en-v1.5",)embedder.warm_up()doc=Document(content="fastembed is supported by and maintained by Qdrant.",meta={"long_answer":"no",})result=embedder.run(documents=[doc])Licensefastembed-haystackis distributed under the terms of theApache-2.0license.