Saravanan666/pypi-org huggingface dataset:
Package: vec-noise
This is a fork of Casey Duncan’s noise library that vectorizes all of the noise
functions using NumPy. It is much faster than the original for computing noise
values at many coordinates.Perlin noise is ubiquitous in modern CGI. Used for procedural texturing,
animation, and enhancing realism, Perlin noise has been called the “salt” of
procedural content. Perlin noise is a type of gradient noise, smoothly
interpolating across a pseudo-random matrix of values.The vec_noise library includes native-code implementations of Perlin “improved”
noise and Perlin simplex noise. It also includes a fast implementation of
Perlin noise in GLSL, for use in OpenGL shaders. The shader code and many of
the included examples require Pyglet (http://www.pyglet.org), the native-code
noise functions themselves do not, however.The Perlin improved noise functions can also generate fBm (fractal Brownian
motion) noise by combining multiple octaves of Perlin noise. Shader functions
for convenient generation of turbulent noise are also included.
Package: vecpot
VecPot Python SDKDocumentationPyPi PackageInstall$pipinstallvecpotUsageimportvecpotimportosVP_API_KEY=os.getenv("VP_API_KEY")vp=vecpot.VecPot(api_key=VP_API_KEY)embedding_response=vp.embed(text="data")print(embedding_response["embeddings"])
Package: vecpy
A quick one:>>>fromvecpyimportVectorasVec>>>v=Vec(0,2)>>>w=Vec([1,3])>>>v+2>>>v+wFeaturesBasic operations ( dot-product, projection, rescaling, etc.)InstallationTo install VecPy, simply:$pipinstallvecpyDocumentationThis is a simple package allowing to complete very basic linear algebra tasks.It is best explained by example:>>>v=Vec(0,2)>>>w=Vec(1,3)You can do basic rescaling of a vector:>>>v_twice=v^2>>>printv_twice.length==2*v.length>>>v_unit=v^0>>>printv_unit.lengthAdding scalar and other vectors:>>>v+2>>>v+w...Multiplication and dot-product>>>v*3>>>v.dot(w)A vector has several properties:>>>v.length>>>v.dimYou can specify which norm to use (default is the Euclidean)>>>v.norm(1)>>>v.norm('inf')>>>v.norm(2)==v.length...You can project one vector on another:>>>w_proj_v=v.proj(w)>>>ratio=v.proj(w,get_scale=True)Iteration is supported as well:>>>print[xiforxiinv]String representations:>>>printstr(v)>>>print'{:[x, y, z]}'.format(v)
Package: vecrec
This package provides 2D vector and rectangle classes.  These classes were
written to be used in games, so they have some methods that conveniently tie
intopygletandpygame, but for the most part they are quite general
and could be used for almost anything.InstallationThevecrecmodule is pure-python, dependency-free, and available from
PyPI:$ pip install vecrecBasic UsageHere are a few examples showing how to construct and use theVectorandRectclasses provided by this package:>>> from vecrec import Vector, Rect
>>> a = Vector(1, 2)
>>> b = Vector(3, 4)
>>> a + b
Vector(4, 6)Rectangles are more commonly constructed using factory methods:>>> Rect.from_size(8, 11)
Rect(0, 0, 8, 11)
>>> Rect.from_center(a, 1, 1)
Rect(0, 1, 1, 1)
Package: vecs
vecsDocumentation:https://supabase.github.io/vecs/latest/Source Code:https://github.com/supabase/vecsvecsis a python client for managing and querying vector stores in PostgreSQL with thepgvector extension. This guide will help you get started with using vecs.If you don't have a Postgres database with the pgvector ready, seehostingfor easy options.InstallationRequires:Python 3.7+You can install vecs using pip:pipinstallvecsUsageVisit thequickstart guidefor more complete info.importvecsDB_CONNECTION="postgresql://<user>:<password>@<host>:<port>/<db_name>"# create vector store clientvx=vecs.create_client(DB_CONNECTION)# create a collection of vectors with 3 dimensionsdocs=vx.get_or_create_collection(name="docs",dimension=3)# add records to the *docs* collectiondocs.upsert(records=[("vec0",# the vector's identifier[0.1,0.2,0.3],# the vector. list or np.array{"year":1973}# associated  metadata),("vec1",[0.7,0.8,0.9],{"year":2012})])# index the collection for fast search performancedocs.create_index()# query the collection filtering metadata for "year" = 2012docs.query(data=[0.4,0.5,0.6],# requiredlimit=1,# number of records to returnfilters={"year":{"$eq":2012}},# metadata filters)# Returns: ["vec1"]
Package: vecsim
VecSim - A unified interface for similarity serversA standard, light-weight interface to all popular similarity servers.The problems we are trying to solve:Standard API- Different vector similarity servers have different APIs - so switching is not trivial.Identifiers- Some vector similarity servers support string IDs, some do not - we keep track of the mapping.Partitions- In most cases, pre-filtering is needed prior to querying, we abstract this concept away.Aggregations- In some cases, one item is being indexed to multiple vectors.Supported engines:Scikit-learn, viaNearestNeighborsRediSearchFaissElasticSearchPineconeQuickStart exampleimportnumpyasnp# Import a similarity server of your choice:# SKlearn (best for small datasets or testing)fromvecsimimportSciKitIndexsim=SciKitIndex(metric='cosine',dim=32)user_ids=["user_"+str(1+i)foriinrange(100)]user_data=np.random.random((100,32))item_ids=["item_"+str(101+i)foriinrange(100)]item_data=np.random.random((100,32))sim.add_items(user_data,user_ids,partition="users")sim.add_items(item_data,item_ids,partition="items")# Index the datasim.init()# Run nearest neighbor vector searchquery=np.random.random(32)dists,items=sim.search(query,k=10)# returns a list of users and itemsdists,items=sim.search(query,k=10,partition="users")# returns a list of users onlyFor more examples, please read ourdocumentation
Package: vectara
An UNofficial Python SDK and CLI for Vectara's RAG platformIt supports major features of Vectara's RAG platform for you to build your own search engine.Additional features:It expands the upload function to allow you to upload a list of files or all files under a directory in one function call.Renders query results in beautiful Markdown printout.Installation# pip install from Githubpipinstall"git+https://github.com/forrestbao/vectara-python-cli.git"UsageCredentialsYou can obtain the Vectara credentials followingthis guide.
Then set up your Vectara credentials as environment variables.exportVECTARA_CUSTOMER_ID=123exportVECTARA_CLIENT_ID=abcexportVECTARA_CLIENT_SECRET=xyzThis unofficial SDK and CLI will read your credentials from the environment variables above. The ability to pass in credentials as arguments is also supported.PythonTry the Jupyter notebookdemo.ipynbor read the docstring.fromvectaraimportvectaraclient=vectara()# get default credentials from environment variables# You can also manually pass in your credentials as argumentscorpus_id=client.create_corpus('my knowledge base')client.upload(corpus_id,'one_file.pdf',description='My precious doc')# add one file to the corpusclient.upload(corpus_id,'a_folder_of_documents')# add all files under a folder to the corpusclient.upload(corpus_id,['user_manual.md','notes.txt'],description=['user manual','my memory'])# add a list of files to the corpusclient.query(corpus_id,'Vectara allows me to search for anything, right?',top_k=5)# query the corpus for top 5 answersclient.reset_corpus(corpus_id)# delete all documents in the corpusCommand lineTo learn the command line usage, runvectara --help.You must set up your Vectara credentials as environment variables before using the command line interface.# create a corpusvectaracreate_corpus'my knowledge base'# output: corpus_id = 12# upload a file to the corpusvectaraupload12one_file.pdf# corpurs_id = 12# upload a folder to the corpusvectaraupload12./a_folder_of_documents# corpurs_id = 12# query the corpusvectaraquery12'Vectara allows me to search for anything, right?'--top_k=5# corpurs_id = 12# reset the corpusvectarareset_corpus12# corpurs_id = 12Beautiful Markdown printoutQuestionsContact forrest at vectara dot comeDisclaimerThis is an UNofficial SDK and CLI for Vectara's RAG platform.
Use at your own risk.
Vectara does NOT provide support for this SDK or CLI.
Package: vecta-testa
Vekta TestaA test library for vector database search testing.AboutTo architect systems that deliver advanced search capabilities, we need to be able to measure and understand search results. Only through testing can we determine which approach is appropriate for our data and problem space. This library evaluates how well searches locate an expected value from a vector store and graphs the result to help communicate our findings.View ourJupyter Notebookfor more details on this graph.Vecta Testa RunnerThe runner is the main component of the library. It defines how the tests are run and their properties.fromvekta_testaimportrunnerHere's an example of using the runner:results=runner.run_vecta_tests([runner.EmbeddingIndex(index_name='openai',search_function=lambdascenario:faiss_index_openai.similarity_search_with_score(scenario,k=900),find_result=lambdavalues,target:find_id(values,target),post_processor=lambdascenario,scored_values:post_processor(scenario,scored_values)),runner.EmbeddingIndex(index_name='deepset/all-mpnet-base-v2',search_function=lambdascenario:mpnet_index.similarity_search_with_score(scenario,k=900),find_result=lambdavalues,target:find_id(values,target),post_processor=lambdascenario,scored_values:post_processor(scenario,scored_values)),],[runner.Testcase(case_id='1 - exact matching text',scenario="Thane has an appealing 2 BHK flat for sale with various amenities. Situated in the excellent Swastik Alps township."),runner.Testcase(case_id='2 - partial match',scenario="Thane has an appealing 2 BHK flat for sale with various amenities. It's located in the exquisite township near the mountains."),runner.Testcase(case_id='3 -  using other words',scenario='Offers a charming two bedroom apartment available, equipped with numerous features. Located in the prime Swastik Heights community.'),],'284')EmbeddingIndexClassThis class defines a vector solution to be used for testing.Usagefromvekta_testaimportrunnerrunner.EmbeddingIndex(index_name='openai',search_function=lambdascenario:faiss_index_openai.similarity_search_with_score(scenario,k=900),find_result=lambdavalues,target:find_id(values,target),post_processor=lambdascenario,scored_values:post_processor(scenario,scored_values)),Attributesindex_name: strThe name of the index.search_function: Callable[[str], List[Tuple[Any, float]]]The function used to perform a search.post_processor: Optional[Callable[[str, List[Tuple[Any, float]]], List[Tuple[Any, float]]]] = NoneAn optional function to post-process the results from the search function.find_result: Optional[Callable[[List[Tuple[Any, float]], str], int]] = NoneAn optional function to find a result based on a key within the results.TestcaseClassThis class defines the structure for a test case.Usagefromvekta_testaimportrunnerrunner.Testcase(case_id='1-exact',scenario="Thane has an appealing 2 BHK flat for sale with various amenities. Situated in the excellent Swastik Alps township.")Attributescase_id: strThe ID of the test case.scenario: strThe scenario to test. Usually a query to search for.
Package: vecto
Vecto helps to perform a range of tasks within the framework of vector space models of computational linguistics.What functionality is includedcreating word embeddings by counting and neural-based methods, including sub-word-level models;importing and exporting from a number of popular formats of word embeddings and providing unified access to word vectors;perfroming a range of downstream tasks / benchmarks;visualising embeddings.How do I get set up?pip3 install vectofor stable versionpip3 installgit+https://github.com/vecto-ai/vecto.gitfor latest dev versionPython 3.6 or later is required📖 DocumentationTutorialvecto overview and end-to-end examples.API ReferenceThe detailed reference for vecto API.ContributeHow to contribute to the vecto project and code base.
Package: vectograph
VectographVectograph is an open-source software library for applying knowledge graph embedding approaches on tabular data.
To this end, Vectograph enables users to converts tabular data into RDF knowledge graph and apply KGE approaches.FrameworkInstallationInstallationInstallation from source1) git clone https://github.com/dice-group/Vectograph.git
2) conda create -n temp python=3.6.2 # Or be sure that your have Python => 3.6.
3) conda activate temp
4) python ontolearn/setup.py install
# After you receive this Finished processing dependencies for OntoPy==0.0.1
5) python -c "import vectograph"Installation via pippipinstallvectographUsageimportpandasaspdfromsklearn.pipelineimportPipelinefromvectograph.transformersimportApplyKGE,KGCreatorpath_of_folder='/.../data_files/'tabular_csv_data_name='example'df=pd.read_csv(path_of_folder+tabular_csv_data_name+'.csv',index_col=0,low_memory=False)######################################## Data Preprocessing ########################################kg_path=path_of_folder+tabular_csv_data_namepipe=Pipeline([('createkg',KGCreator(path=kg_path)),('embeddings',ApplyKGE(params={'kge':'Conve',# Distmult,Complex,Tucker,Hyper, Conve'embedding_dim':10,'batch_size':256,'num_epochs':10}))])model=pipe.fit_transform(X=df.select_dtypes(include='category'))print(model)
Package: vectools
Vectools was created to simultaneously simplify and increase the development speed of informatics pipelines by
reducing the amount of custom programs needed in analyses. Furthermore, Vectools is extensively tested reducing the
changes of bungs in pipelines.Vectools offers a wide range of operations related to the manipulation of vectors an matrices.
These operations include:
- Linear algebra
- Table (Spreadsheets, CSV/TSV files, etc.) manipulation (Join, uniquifying, )
- Machine learning (Supervised and Unsupervised)
- Support functions for machine learning (descriptors, PCA, feature selection, normalization, etc.).
- Statistical analysis
- Network-Graph manipulation
Package: vector2Dim
Vector2Dim is a python library to manage operations between vectors in
2D in a simple and intuitive way.Release Notes:Version 0.1.1this version now supports..comparison operations\((\lt, \le, \gt, \ge, ==, \neq )\)Version 0.1This version supports…\(+\),\(-\),\(/\),\(\cdot\),\(+=\),\(-=\),\(/=\),\(\cdot=\),\(\bmod\),\(\bmod=\),\(neg\),\(pos\),\(abs\)cross and inner productnorm, magnitude and squared magnitudeset and limit magnituderotation and distance calculationetc…Install notes:you can install the library via pippip install vector2dimor you can build from sourcegit clone https://github.com/PasqualeMainolfi/Vector2Dim.git
cd vector2dim
make all
Package: vector3d
Vector3D readmeVector3Dis a lightweight package, written on python, for working with vectors and points in 3D decartian system.InstallingYou can install vector3d from pip:python3 -m pip install vector3d or by downloading a .whl file from one of releases and installing it using this command:python -m pip install filename.whl
or you should download  a source .tar.gz archive from one of releases, unpack it and install with following command:python3 setup.py buildpython3 setup.py installReferencevector3d.vectorImplements the Vector class and vector related functions.vector3d.vector.VectorA vector class.
Can be created as:Vector(x,y,z)Vector(x, y, z=0)Vector(x, y=0, z=0)or simply Vector() which is equivalent to Vector(0, 0, 0)Functions in vector3d.vectorfrom_point(a, b) - creates a vector from pair of points, begining and ending of vector.angle(a, b) - calculates angle between vectors a and b.horizontal_angle(a, b) - calculates angle between vectors a and b, but without Z coordinate (projections of a and b to XY plane).vertical_angle(a, b) - calculates angle between vectors a and b, but without X coordinate (projections of a and b to YZ plane)vector3d.pointImplements a Point class and point related functions.vector3d.point.PointA class for the point in 3D decartian system.
This class have only three attributes and: x, y and z coordinate of the point, and has no methods yet.
A Point can be created with following constructors:Point(x, y, z)Point(x, y, z=0)Point(x, y=0, z=0)Or even Point() which is equivalent to Point(0, 0, 0)Functions in vector3d.pointdistance(a, b) - calculates distance between two pointscenter(a, b) _ calculates coordinates of the center between two points (returns a Point object)
Package: vector-ai-ml
VectorA python vector libraryContentsWhy vectorUsageInstallationWhy vectorVector is a mathematical library for python. In my search to understand artificial intelligence (AI) I strived to make my own neural network entirely from scratch. To do this I began withnumpyâ€“ a python library which is the go-to for mathematical things within python. As I started to make this program, I realised that I wanted more control over the objects and wanted to use them in such a way that would make sense for AI. So, I made my own library â€“ vector â€“ a simple vector library in python which holds the basic activation functions for neural networks, random generation, and of course a Vector object which is to be used in a way similar tonp.array.UsageTo import the library:from vector import Vector
from vector import activation
from vector import randomTo define a vector object,a = Vector([1, 0, 0, 1])ora = Vector(1). This class definition takes in either a list, tuple, int, or float.To generate a random vector,a = random.random_vector(length, lower_bound, upper_bound),lower_boundandupper_boundare optional arguments and by default are -0.1 and 0.1 respectively.The vector library has 2 activation functions and the 2 derivative functions of those functions:activation.sigmoig(vec)
activation.sigmoid_prime(vec)
activation.linear(vec)
activation.linear_prime(vec)In the example above, vec is either an integer, float, or Vector.sigmoidis: 1 / (1 + e ^ -x) andlinearis: 0.5 * x.
The_primein the function name means derivative.InstallationTo install this library using pip, you need to typepip install vector-ai-ml.
Package: vector-algebra
Vector AlgebraIt helps to create vector objects and manipulate themInstallationpip install vector-algebraHow to use it ?Create an instance of vectorfrom vector_algebra.Vectors import *v1=Vectors(1,2,3)v2=Vectors(1,2,1)v3=v1+v2 --> for adding vectorsv4=v1-v2 --> for subtracting vectorsv5=v1*v2 --> returns a float value of dot product of two vectorsv6=v1**v2 --> returns a vector withcross product of both vectorsval=v1.magnitude() --> returns the magnitude of the vectorprint(v1==v2) --> checks if both vectors are equal in direction and magnitudeprint(v1>2) --> Checks if magnitude of v1 > v2print(v1.angleBetweenVectorsInRadians(v2)) --> Returns angle between vectors in   radiansprint(v1.angleBetweenVectorsInDegrees(v2)) --> Returns angle between vectors in degreesprint(isParallel(v1,v2))print(isPerpendicular(v1,v2))print(v1.unit()) --> To print unit vectorprint(v3)LicenseÂ© 2021 Deepak Kumar DashThis repository is licensed under MIT license.
see LICENSE for details
Package: vectorama
vectorama-pythonTestsTests will clear out the current database as part of the test flows. Make sure you are only running a test server locally and you are not storing real data.Tests are intended to be run with a live vectorama server running onlocalhost:50051. We provide a docker-compose file for this purpose. To run the tests, first start the server:docker-composeupThen, in a separate terminal, run the tests:poetryrunpytest
Package: vector-bench
Vector DB BenchmarkSupported databases/extensions:pgvecto.rspgvectorqdrantSupported datasets:random generatedGIST 960Installationpipinstallvector_benchRunServerRun the docker compose file underserverfolder.cd server/pgvecto.rs && docker compose up -dClient# helpvector_bench--help# only insert the datavector_bench--insert--urlpostgresql://postgres:password@127.0.0.1:5432/postgres-sgist_960_l2# only query the data (make sure the data is already inserted)vector_bench--query--urlpostgresql://postgres:password@localhost:5432/postgres-sgist_960_l2# insert and query the datavector_bench--insert--query--urlpostgresql://postgres:password@localhost:5432/postgres-sgist_960_l2How to contribute# install all the necessary dependencies:makedev# format codemakeformat# lintmakelintAdd more datasetsAdd newDatasetConfigtovector_bench/dataset/source.pyAdd more clientsInherit and implement theBaseClientclass invector_bench/client/base.py
Package: vectorboard
💛 Vectorboard -alpha 0.0.1Embeddings Optimization and Eval Framework for RAG/LLM ApplicationsFind the best hyperparameters for Embedding your data in RAG PipelineTL;DRInstalvectorboardpipinstallvectorboardCreate a grid search of parameters you want to experiment. For example:param_grid={"chunk_size":[50,300,500],"vector_store":[FAISS],"embeddings":[OpenAIEmbeddings(),HuggingFaceEmbeddings()],}Run the search using aGridSearch()(more search types upcoming).fromvectorboard.searchimportGridSearch# Create a GridSearch with the chain you'd like to try.grid_search=GridSearch(chain=RetrievalQA)# Use a document loadergrid_search.create_experiments(loader,param_grid=param_grid)grid_search.run(eval_queries=eval_queries)grid_search.results()Step by step overview of the exampleImportGridSearch()fromvectorboard.searchfromvectorboard.searchimportGridSearchCreate adictwith parameters and steps you want to search over.param_grid={"chunk_size":[50,300,500],"vector_store":[FAISS],"embeddings":[OpenAIEmbeddings(),HuggingFaceEmbeddings()],}If the parameter is not one of the simple types (int, str, ...), you need to import the Class. E.g. to try different Embedding algorithms, first import them (we uselangchainfor simplicity):fromlangchain.embeddingsimportOpenAIEmbeddings,HuggingFaceEmbeddingsInitilize a Vectorboard object with the chain you want to run your experiment. Currently supportingRetrivalQA. More chains and custom chains are on the roadmap.search=GridSearch(chain=RetrievalQA)Import a loader relevant to your data and include it as a parameter to.create_experiments().fromlangchain.document_loadersimportPyPDFLoaderloader=PyPDFLoader("recycling.pdf")# For examplesearch.create_experiments(param_grid=param_grid,loader=loader)If you already loaded your data or have it available, use:search.create_experiments(param_grid=param_grid,documents=YOUR_DOCS)Define eval queries and run the experiments:eval_queries=["what percentage of waste is recyvled into materials in 2022?",# ...]search.run(eval_queries=eval_queries)Finally, view the results in a Gradio app using.results()method. To get a publicly available link to share with your team, set theshare=Trueparamater.search.results(share=True)Overview and Core conceptsRAG (Retreival Augmentation Generation) is great but it has a huge emphasis on perfect embeddings.But it has challenges. It's hard to find the rightCurrent statusBuilt on top of🦜⛓️LangchainUsingGradiofor the final result page (with shareable links)Currently supported steps and parametersEmbeddingsText and Document transformersVector DatabasesRoadmapSupport more types ofSearch.Support more chains.LLMChainand custom chains in progress.Addasyncsupport to runExperiments()in parallel.TS/JS support.Add Eval tools and metrics.Have a special feature request? Send your feedback/suggestion on our Discord community: