Saravanan666/pypi-org huggingface dataset:
Package: vdv2pg
Tool for dumping VDV 451 data into a databaseThis is intended to quickly analyze the content of a collection of VDV files in
the VDV 451 format. By running this script a new schema is created and filled
with one table per inuput file. Some known primary key mappings are used, you
can add more using a config-file (seedevelopment.ini.distfor an example).After dumping the data a SQL scriptapply_constraints.sqlis run with the
new schema. It sets foreign keys and indices. You may want to modify that to
fit your needs (some errors are to be expected if you didn't create all tabels
referenced there).Installationpip install vdv2pgUsageusage: vdv2pg [-h] [--schema SCHEMA] [-c CONFIG]
                [--post_ingest_script POST_INGEST_SCRIPT]
                database_url input_file [input_file ...]

positional arguments:
  database_url          Database to write to.
  input_file            Files to read data from

optional arguments:
  -h, --help            show this help message and exit
  --schema SCHEMA       Schema to create tables in (default: vdv2pg)
  -c CONFIG, --config_file CONFIG
                        Optional primary key and logging configuration
  --post_ingest_script POST_INGEST_SCRIPT
                        Optional path to an alternative post-ingest SQL scriptExample:vdv2pg --schema import01 postgresql:///vdv_imports *.X10
Package: vdx-helper
VDX HelperThis repository provides a wrapper for every call made to VDX Core Api.How it worksThis helper first needs to be authorized by wielding valid token from the authentication server, then use that token for further requests as long as it has not expired.Each method also allows one to include their own custom mappers, enabling the method to return the result in the format the user wishes.PrerequisitesPython PoetryDocker + Docker-composeUsageInitializationRequired parameters:api_url: The url leading to Core API serverauth_url: The url leading to authentication serverclient_secret: The authentication secretclient_id: The ID of the client / partnervdx_helper = VDXHelper(api_url='https://vizidox-core-api.com', auth_url='https://auth.com', client_secret=secret, client_id=client_id)Mapper exampleA mapper will receive a json-formatted parameter as their input. The following example mapper will add a fielddef example_mapper(json_file):
    returned_json = copy.deepcopy(json_file)
    returned_json['additional_field'] = 'additional_value'
    return returned_jsonUsage examplevdx_helper.upload_file(file=the_file_to_upload, mapper=example_mapper)Running the testsYou can run the tests with poetry if you like. You can also obtain the code coverage.poetry run pytest --cov=vdx_helperMypy:poetryrunmypy--config-fileconf/mypy.inivdx_helperCoverage:poetryruncoveragerun--source=vdx_helper-mpytest
poetryruncoveragereportTox:tox-pRun the test locally with docker-compose step-by-stepSpin up the docker-containersdocker-compose up -dRun the tests via the vdx-helper docker containerdocker-compose run vdx-helper pytest testsDocumentationTo build the documentation locally:cddocs
makehtmlThe build files can be found in docs/build. Open the generated index.html file in the html folder, and you can now
navigate the documentation. Repeat the above command and refresh your browser every time you update the documentation.
All source files are in docs/source, with vdx_helper containing the documentation generated from docstrings.AuthorsTiago Santos-Initial work-VizidoxJoana Teixeira-Corrections and improvements-VizidoxRita Mariquitos-Corrections and improvements-Vizidox
Package: ve
Contents1Repositories1.1Distributions1.2Source code2Usage3Hacking3.1Development environment3.2Run test suite3.3Build and package1Repositories1.1Distributionshttps://pypi.org/project/ve/1.2Source codehttps://gitlab.com/sinoroc/vehttps://github.com/sinoroc/ve2Usage$ ve -h
usage: ve [-h] [--version] [directory]

positional arguments:
  directory   create the virtual environment in this directory (default .venv)

optional arguments:
  -h, --help  show this help message and exit
  --version   show program's version number and exit3HackingThis project makes extensive use oftox,pytest, andGNU Make.3.1Development environmentUse following command to create a Python virtual environment with all
necessary dependencies:tox --recreate -e developThis creates a Python virtual environment in the.tox/developdirectory. It
can be activated with the following command:. .tox/develop/bin/activate3.2Run test suiteIn a Python virtual environment run the following command:make reviewOutside of a Python virtual environment run the following command:tox --recreate3.3Build and packageIn a Python virtual environment run the following command:make packageOutside of a Python virtual environment run the following command:tox --recreate -e package
Package: vebootstrap
When you are about to create a python program that depends on some packages, you may setup virtualenv and install some packages within that virtualenv manually. This module automatically creates an environment and installs packages in it.SetupRequirementspython 2.7, 3.3 or laterpipvirtualenvInstallation$ pip install vebootstrapUsageImporting PatternInsert following line into head of your script file, and create arequirements.txtin same directory as necessary.import vebootstrapRunning that script, it creates a virtualenv and modules will be installed automatically.Not Importing PatternIf you do not want to add a unconcerned line, run following command and then virtualenv will be prepared and activated.python -m vebootstrap [script file]ExampleCase: you want to create a script using `requests` module. (http request library)Create a script file (eg. get_yahoo.py)import vebootstrap # you must write this sentence at the first
import requests
print(requests.get(’http://yahoo.co.jp’).content[:100])Create arequirements.txtrequestsRun a scriptpython get_yahoo.pyAt first, virtualenv directory will be created and required packages will be installed.
And you get a first line of html of the Yahoo.Extra UsageInit virtualenvFollowing command initialize virtualenv directory and install modules.python -m vebootstrap.initCreate a virtualenv bootstrap scriptvebootstrapsupports creating virtualenv bootstrap script. Run a following command in your scripting directory. The bootstrap script involvingrequirements.txtwill be created.python -m vebootstrap.create_bootstrap–after-installoption allows you to add another process into the bootstrap script. Please see help.python -m vebootstrap.create_bootstrap –help
Package: vec2best
vec2best: A Unified Framework for Intrinsic Evaluation of Word-Embedding AlgorithmsDescription•Requirements•Installation•UsageDescriptionvec2best is a library for Python which represents a framework for evaluating word embeddings trained using various methods and hyper-parameters on a range of tasks from the literature. The tool yields a holistic evaluation metric for each model called the $PCE$ (Principal Component Evaluation).vec2best implements the state-of-the-art intrinsic evaluations tasks of word similarity, word analogy, concept categorisation, and outlier detection over the benchmarks in the following table.TaskEvaluationMetricBenchmarkSimilaritySpearman correlationCosine similarityWS353, RG65, RW, MEN, MTurk287, SimLex999, MC30, MTurk771, YP130, Verb143, SimVerb3500, SemEval17, WS353REL, WS353SIMAnalogyAccuracy3CosAdd, 3CosMulGoogle, MSRSpearman correlation3CosAddSemEval2012CategorizationPurityClusteringAP, BLESS, BM (battig), ESSLI 1a, ESSLI 2b, ESSLI 2cOutlier detectionAccuracyCompactness score8-8-8, WordSim500RequirementsPython 3.6scikit-learnsixword-embeddings-benchmarksThe package also relies on a modified version on the following repositories for outlier detection:https://github.com/peblair/wiki-sem-500http://lcl.uniroma1.it/outlier-detection/Installationvec2best can be installed throughpip(the Python package manager) in the following way:pipinstallvec2bestUsageTo compute the $PCE$ you need to apply the functioncompute_pce(path_to_model)and the only parameter that you need to set is the path in which you saved the embedding models (in a .vec or .txt format) you want to evaluate.The functioncompute_pce(path_to_model)has other six parameters(categorization=True, similarity=True}, analogy=True, outlier_detection=True, pce_min=True, pce_max=True, pce_mean=True)set by default asTrue, and so the output consists in the evaluation of the models over the three tasks and over the $PCE^{MIN}$, $PCE^{MAX}$, $PCE^{MEAN}$. By setting some of those parameters asFalse, the $PCE$ can be computed over a subset of those tasks or the evaluation could be computed only for one or two of the three types of $PCE$.The output is saved in the folderresults/pce, and the output on the screen shows the percentage of explained variance of the first principal component, and the top 3 models according to the chosen $PCE$.See the following example:fromvec2bestimportcompute_pcepath_to_model='data/example_models'compute_pce(path_to_model,analogy=False,outlier_detection=False,pce_max=False,pce_mean=False)The output will look like:PCEmin-percentageofexplainedvariance:0.95categorizationsimilarityPCE_minexample_models/ft_0_5_50_5.vec0.380.291.00example_models/glove_5_50_5.vec0.410.250.94example_models/wv2_model_11.vec0.240.170.34
Package: vec2d
Vector2D libraryHelper library with Math and graphing related functions for vectors in the 2D plane.UsageInstall the library by typing:python-mpipinstallvec2dOnce installed, you'll have access to the Math and graphing packages:fromvec2d.mathimportaddfromvec2d.graphimportdraw,Arrow,Colors,LineStylesu=(2,0)v=(1,3)draw(Arrow(u,color=Colors.ORANGE),Arrow(v,color=Colors.PINK,linestyle=LineStyles.LOOSELY_DASHED),Arrow(add(u,v),color=Colors.BLUE))The functions in thevec2d.mathlibrary are self-explanatory. Vectors are represented and tuples withintorfloatcomponents.Thevec2d.graphis a helper library for graphing related capabilities for 2D objects. With it you can draw simple figures such as points, segments, polygons, and arrows on the 2D plane using Matplotlib as the backend in a very simple way and without any hassle.The library exposes classes for the figures, an enumeration for the common colors, and a functiondrawto render the figures as Matplotlib plots.ClassConstructor exampleDescriptionPolygonPolygon(*vectors)Draws a polygon whose vertices are represented by the given list of vectors.PointsPoints(*vectors)Represents a list of points (i.e., dots), one at each of the input vectors.ArrowArrow(tip)Arrow(tip, tail)Draws an arrow from the origin to thetipvector, or from thetailvector to thetipvector iftailif given.SegmentSegment(start, end)Draws a line segment from the start to the vector end.See AlsoSee alsovec3dfor a similar library for vectors in the 3D space.AcknowledgementsThis library is a small refactoring ofhttps://github.com/orlandpm/Math-for-Programmerslibrary.
Package: vec2face
Vec2FaceFunctions that illustrate a vector as a drawing of a face.The functions are derived from theHelen dataset[1]. This project is inspired byChernoff Faces. The approach for creating the functions is explained inthis blog postIn theory, vectors near each other will have similar faces.UsageThe package includes pretrained functions for illustrating data points.Initialize by providing the number of dimensions of the data points in the source dataset.v2f=Vec2Face(dims=16)v2f.draw_vec(vec)Devpip install -e .
pip install -r requirements-dev.txt[1] Interactive Facial Feature Localization Vuong Le, Jonathan Brandt, Zhe Lin, Lubomir Boudev, Thomas S. Huang. ECCV2012
Package: vec2graph
vec2graphMini-library for producing graph visualizations from embedding modelsCode is available athttps://github.com/lizaku/vec2graphUsagepip install vec2graphfrom vec2graph import visualizevisualize(OUTPUT_DIR, MODEL, WORD, depth=0, topn=10, threshold=0, edge=1, sep=False, library="web")Examplemodel = gensim.models.KeyedVectors.load_word2vec_format('googlenews300.bin', binary=True)visualize('tmp/graphs', model, 'apple')Required argumentsOUTPUT_DIRis the directory to store your visualizationsMODELis a word embedding model loaded with GensimWORDis your query (single word or list of the words:['apple', 'pear']). If in the model PoS-tag is attached to the word, it shoul be written explicitly:'apple_NOUN'Optional argumentsdepth:integer, default 0depth to which the algorithm has to drill down into the relations of semantic neighbours (the higher this number is,    the deeper the recursion, which means that it produces visualizations for the neighbours of the neighbours of the query word).topn:integer, default 10the number of neighbors to extract for each wordthreshold:float, default 0the value from which we start drawing edges between nodes. By default the fully connected graph is produced.edge:integer, default 1the width of edges in the graphsep:bool, default Falseif this parameter is used, token is split by a separator (underscore), and only first part is shown in visualization (E.g. it is useful when PoS is attached to a word -'apple_NOUN').library:str, default 'web'the path to D3.js library, can be 'web' (link to version at the D3.js site) or 'local' (file in the directory with generated HTML, if not present, it is downloaded from web).
Package: vec2img
convert OpenCV samples file to imagesInstallation::$ pip install vec2imgUsage::$ vec2img samples.vec -o images -w 24 -h 24 -e pngHelp::$ vec2img –help
usage: vec2img -o OUT [-w WIDTH] [-h HEIGHT] [-e EXT] [–version] [–help] vecconvert OpenCV samples file to imagespositional arguments:vec                   vec fileoptional arguments:-oOUT,--outOUToutput path (default: None)-wWIDTH,--widthWIDTHimage width (default: 24)-hHEIGHT,--heightHEIGHTimage height (default: 24)-eEXT,--extEXTimage extension (default: png)--versionshow program’s version number and exit--helpshow this help message and exit
Package: vec2tif
vec2tif: Conversion from vector data to GeoTiff fileThis is a package for conversion from vector data to GeoTiff file.Example$ python -m vec2tif fgd --merge --output merge.tif FG-GML-6644-10-DEM5A.zip FG-GML-6644-10-DEM5B.zipAvailable formats of vector datavec2tifrequires a subcommand compatible for the type of input data. Following subcommands are available.subcommandnotefgdFundamental Geo Data of GSI Japancsvwith Latitude & Longitude columnsshpESRI Shapefile (point data)
Package: vec2vec
vec2vecThis repository provides a reference implementation of vec2vec, which can reduce the dimension to matrix.RequirementsBefore starting this project, you must install requirements below.faiss==1.7.0
gensim==4.0.1
networkx==2.6.2
scikit-learn==0.24.2Note：It's recommended that using conda to install faiss, and conda version need to update.conda install faiss-cpu -c conda-forgeBasic UsageTo runvec2vecby terminal, execute the following command from the project home directory:python ./vec2vec/main.py --input ./vec2vec/data/train.bowYou can check out the other options available by using:python ./vec2vec/main.py  --helpTo run the vec2vec in your project, execute the following command:pip install vec2vecInputRefer to the ./vec2vec/data/train.bow in the project.OutputThe output are like below:************* The number of num_walks is : 5 *******************
Matrix2vec p and q and topk: 1 1 10
The shape of the input matrix: (2000, 13155)
BuildNNGraphFromFAISS Finished in 0:00:03.305026 s.
The shape of the adjmatrix is: (2000, 2000)
Preprocess_transition_probs Finished in 0:00:00.902988 s.
Random Walk Finished in 0:00:00.590795 s.
Begin to train word2vec...
Model Matrix2vec Finished in 0:00:09.073013 s.
Accuracy：  [0.662 0.652 0.64  0.668]
Accuracy: 0.6555 (+/- 0.0212)MiscellaneousPlease send any questions you might have about the code and/or the algorithm toxiangwangcn@163.com.
Package: vec3d
Vector3D libraryHelper library with Math and graphing related functions for vectors in the 3D spaceUsageInstall the library by typing:python-mpipinstallvec3dOnce installed, you'll have access to the Maths and graphing package:fromvec3d.graphimport(Arrow3D,Colors3D,Points3D,draw3d,)fromvec3d.mathimportcross,subtractu=(3,-2,2)v=(2,4,3)draw3d(Arrow3D(u,color=Colors3D.RED),Arrow3D(v,color=Colors3D.CYAN),Arrow3D(cross(u,v),color=Colors3D.PURPLE),Points3D(u,color=Colors3D.RED),Points3D(v,color=Colors3D.CYAN),Points3D(cross(u,v),color=Colors3D.PURPLE),elev=15)See AlsoSee alsovec2dfor a similar library for vectors on the 2D plane.AcknowledgementsThis library is a small refactoring ofhttps://github.com/orlandpm/Math-for-Programmerslibrary.
Package: vec-geohash
Vec_GeoHashShort DescriptionVectorized functions that allow efficient transformation oflatitude and longitude coordinatesintoMap Tile coordinates,Map Pixel coordinatesorQuadKeys. This can be particularly useful in (GIS) geographic information systems and mapping applications. By utilizing vectorized functions, transformation can be performed on large datasets, with minimal impact on performance. Additionally, only using numpy as dependency these functions can be easily incorporated into existing code and workflows.InstalationThe project can be installed using `pip`:pipinstallvec_geohashTo install from this repo:gitclonehttps://github.com/FJakovljevic/vec_geohash.gitcdvec_geohash
pipinstall-e.UsageVector exampleimportvec_geohashlat_vector=[53.1231276599,41.85]lon_vector=[82.6978699112,-87.65]zoom=9# getting tiles as [tile_x] vector and [tile_y] vectorvec_geohash.lat_lon_to_tile(lat_vector,lon_vector,zoom)>>>(array([373,131]),array([166,190]))# getting tiles as [[tile_x, tile_y]] vectorvec_geohash.lat_lon_to_tile(lat_vector,lon_vector,zoom)>>>array([[373,166],[131,190]])# getting quadkeyvec_geohash.lat_lon_to_quadkey(lat_vector,lon_vector,zoom)>>>array(['121310321','030222231'],dtype='<U9')# getting pixels as [pixel_x] vector and [pixel_y] vectorvec_geohash.lat_lon_to_pixel(lat_vector,lon_vector,zoom)>>>(array([95645,33623]),array([42622,48729]))# getting pixels as [[pixel_x, pixel_y]] vectorvec_geohash.lat_lon_to_pixel(lat_vector,lon_vector,zoom)>>>array([[95645,42622],[33623,48729]])Scalar exampleimportvec_geohashlat=53.1231276599lon=82.6978699112zoom=9# getting tilesvec_geohash.lat_lon_to_tile(lat,lon,zoom)>>>(373,166)# getting quadkeyvec_geohash.lat_lon_to_quadkey(lat,lon,zoom)>>>array(['121310321'],dtype='<U9')# getting pixelsvec_geohash.lat_lon_to_pixel(lat,lon,zoom)>>>(95645,42622)
Package: vecgl
VecGLVecGLis a 3D rendering engine with vector output.It is inspired by OpenGL with the key difference that the rendering result is a
set of points, lines, and triangles - not a pixelated image. These geometric
primitives can be used to generate vector graphics or to drivepen plotters.Getting startedThe VecGL package is available throughpip.$ python3 -m pip install vecglLet's create and render a simple model.
Here's the complete example for a sphere.frommathimportpifromvecgl.exportimportwrite_svgfromvecgl.linalgimport(get_frustum_mat4,get_rotate_x_mat4,get_rotate_y_mat4,get_translate_mat4,mul_mat4)fromvecgl.modellibimportget_sphere_modelfromvecgl.renderingimportrenderfromvecgl.viewerimportperspective_update_fn,show,show_interactively# Get a predefined sphere model and choose nice colors.# The sphere will span from -1.0 to 1.0 in all dimensions.sphere=get_sphere_model(16,32,"lightblue","black")# Look at the model interactively.show_interactively(sphere,perspective_update_fn())# Define the view and the projection transforms.view_mat4=mul_mat4(get_translate_mat4(0.0,0.0,-2.0),get_rotate_x_mat4(-0.2*pi),get_rotate_y_mat4(0.15*pi),)projection_mat4=get_frustum_mat4(-1.0,1.0,-1.0,1.0,1.0,100.0)# Transform our sphere model and bring it to the clip space.transform_mat4=mul_mat4(projection_mat4,view_mat4)sphere_in_ndc=sphere.transform(transform_mat4)# Render, display, and export the model.rendered=render(sphere_in_ndc)show(rendered)write_svg(rendered,"sphere.svg")# You can access the vector-based rendering result through the rendered model.forlninrendered.lines:print(ln)VecGL will render and display the sphere and print the vector-based rendering
result to stdout.Build and run testsClone the repository.$ git clone git@github.com:frgossen/vecgl.git
$ cd vecglCreate a virtual environment and activate it (recommended).$ python3 -m venv .venv
$ source .venv/bin/activateInstall all requirements in the virtual environment.$ python3 -m pip install -r requirements.txtInstall thevecglpackage in editable mode.
This makes the package (and your changes) available when running the tests.$ python3 -m pip install --editable .You're all set for contributing back to the project.
Run the tests with ...$ python3 -m pytest --benchmark-skip... and the benchmarks with ...$python3-mpytest--benchmark-only
Package: vecha
- [Contract](#contract)- [`get_events(start_block_num, to_block_num, event_id)`](#get_eventsstart_block_num-to_block_num-event_id)- [FunctionCoder](#functioncoder)- [`encode_function(function_name, *args)`](#encode_functionfunction_name-args)- [`decode_result(self, function_name, data)`](#decode_resultself-function_name-data)- [EventDecoder](#eventdecoder)- [`decode_event(log)`](#decode_eventlog)# Contract```pyfrom vecha import Contractcontract = Contract(endpoint, address, abi_list)```**Parameters**:- **endpoint**: `str`, thor restful server- **address**:  `str`, contract address- **abi_list**: `List[Dict]`, contract abiThen you can call the function directly on the contract instance via the function name in abi.The `get_events` function names are built in, so the same name function in the smart contract will not be called.In a smart contract, the function can be a call or a transaction. A transaction must provide private key.```pycontract.you_name(*args, caller=None, value=0)  # a callcontract.you_name(*args, pk, value)  # a transaction```You can display the transaction as a call, this may help you debug smart contract.```pycontract.you_name.call(*args, caller=None, value=0)```## `get_events(start_block_num, to_block_num, event_id)`**Parameters**:- **start_block_num** (optional): `int`, default is from genesis block- **to_block_num** (optional): `int`, default is to best block- **event_id** (optional): `str`, the signature of the event you want to filter out, default is all events of this contract**Returns**:- `List[Event]`, A list of Events. Event is a `namedtuple`, and it has three fields:- event.name: `str`- event.args: `Dict`, actual parameters when the event is emited- event.block: `int`, the block number when the event is emited> If you want to parse a log directly, please use [`EventDecoder.decode_event`](#decode_eventlog).<br>> If you want to get an unsigned transaction data, you can use [`FunctionCoder.encode_function`](#encode_functionfunction_name-args).# FunctionCoder```pyfrom vecha import FunctionCoderfn_coder = FunctionCoder(*fn_abi_list)```## `encode_function(function_name, *args)`**Parameters**:- **function_name**: `str`- **args**: variable-length argument list of actual parameters**Returns**:- `str`, the data of a transaction that has not been signed## `decode_result(self, function_name, data)`# EventDecoder```pyfrom vecha import EventDecoderev_decoder = EventDecoder(*event_abi_list)```## `decode_event(log)`**Parameters**:- **log**: `Dict`, the result of thor restful api `/logs/event`**Returns**:- `Event`, Event is a `namedtuple`, and it has three fields:- event.name: `str`- event.args: `Dict`, actual parameters when the event is emited- event.block: `int`, the block number when the event is emited
Package: vecked
VeckedVeckedis a Python package for working with vectors.Full documentation is online atcariad.github.io/vecked.InstallationVecked requires Python 3.11 or later and can be installed fromPyPI.pip install veckedContributingPlease readCONTRIBUTING.mdbefore raising an issue or submitting a pull request. Thank you!AuthorHello! 👋 I'mCariad Eccleston, and I'm a freelance Amazon Web Services architect, DevOps evangelist, and infrastructure and backend engineer by the beach in the United Kingdom.You can find me atcariad.earth,github/cariadandlinkedin/cariad.