Saravanan666/pypi-org huggingface dataset:
Package: wafl
WAFL 0.0.80IntroductionWAFL is a framework for home assistants.
It is designed to combine Large Language Models and rules to create a predictable behavior.
Specifically, instead of organising the work of an LLM into a chain of thoughts,
WAFL intends to organise its behavior into inference trees.WAFL is a work in progress.
The current version requires the user to specify the rules to follow.
While it is ready to play with, it might not ready for production depending on your use-case.InstallationIn this version, WAFL is a two-part system.
Both can be installed on the same machine.Interface sideThe first part is local to your machine and needs to have access to a microphone and speaker.
To install it, run the following commands:$sudoapt-getinstallportaudio19-devffmpeg
$pipinstallwaflAfter installing the requirements, you can initialize the interface by running the following command:$waflinitwhich creates aconfig.jsonfile that you can edit to change the default settings.
A standard rule file is also created aswafl.rules.
Please see the examples in the following chapters.LLM side (needs a GPU)The second part (LLM side) is a model server for the speech-to-text model, the LLM, the embedding system, and the text-to-speech model.InstallationIn order to quickly run the LLM side, you can use the following installation commands:pipinstallwafl-llm
wafl-llmstartwhich will use the default models and start the server on port 8080.DockerA docker image can be used to run it as in the following:$dockerrun-p8080:8080--envNVIDIA_DISABLE_REQUIRE=1--gpusallfractalego/wafl-llm:0.80The interface side has aconfig.jsonfile that needs to be filled with the IP address of the LLM side.
The default is localhost.
Alternatively, you can run the LLM side by cloningthis repository.Running WAFLThis document contains a few examples of how to use thewaflCLI.
There are four modes in which to run the system$ wafl run-audioThis is the main mode of operation. It will run the system in a loop, waiting for the user to speak a command.
The activation word is the name defined in config.json.
The default name is "computer", but you can change it to whatever you want.$ wafl run-serverIt runs a local web server that listens for HTTP requests on port 8889.
The server will act as a chatbot, executing commands and returning the result as defined in the rules.$ wafl run-cliThis command works as for the run-server command, but it will listen for commands on the command line.
It does not run a webserver and is useful for testing purposes.$ wafl run-testsThis command will run all the tests defined in the file testcases.txt.DocumentationThe documentation can be found atwafl.readthedocs.io.Mastodon
Package: waflabs
waflabsis a Python wrapper and CLI tool for theWAFLABS REST API.Installation$pipinstallwaflabsCLI usage$waflabstest--urlhttps://<yourdomain>/test.html--block-code403--wafmodsecurityTo see all options run: $ waflabs –helpModule usagefromwaflabsimportwaflabsapiwaflabs=waflabsapi.WAFLabsApi(access_id="1234",acess_key="abcd")test_target={"url":"https://waflabs.com/testme/","block_code":406,"waf":"modsecurity}print(waflabs.testmywaf(test_target))
Package: wafl-llm
WAFL-llmWAFL is built to run as a two-part system.
Both can be installed on the same machine.
This is the LLM side of theWAFL project.LLM side (needs a GPU)This is a model server for the speech-to-text model, the LLM, the embedding system, and the text-to-speech model.InstallationIn order to quickly run the LLM side, you can use the following installation commands:pipinstallwafl-llm
wafl-llmstartwhich will use the default models and start the server on port 8080.The installation will require MPI and Java installed on the system.
One can install both with the following commandssudoaptinstalllibopenmpi-dev
sudoaptinstalldefault-jdkConfigurationA use-case specific configuration can be set by creating aconfig.jsonfile in the path wherewafl-llm startis executed.
The file should look like this (the default configuration){"llm_model":"mistralai/Mistral-7B-Instruct-v0.1","speaker_model":"facebook/fastspeech2-en-ljspeech","whisper_model":"fractalego/personal-whisper-distilled-model","sentence_embedder_models":"TaylorAI/gte-tiny"}The models are downloaded from the HugggingFace repository. Any other compatible model should work.DockerA docker image can be used to run it as in the following:$dockerrun-p8080:8080--envNVIDIA_DISABLE_REQUIRE=1--gpusallfractalego/wafl-llm:latestor one can clone this repository and run the followingdocker/build.sh
dockerrun-p8080:8080--envNVIDIA_DISABLE_REQUIRE=1--gpusallwafl-llm
Package: wafo
WAFO====WAFO is a toolbox Python routines for statistical analysis and simulation ofrandom waves and random loads.WAFO is freely redistributable software, see WAFO licence, cf. the GNUGeneral Public License (GPL) andcontain tools for:Fatigue Analysis-----------------Fatigue life prediction for random loads-Theoretical density of rainflow cyclesSea modelling--------------Simulation of linear and non-linear Gaussian waves-Estimation of seamodels (spectrums)-Joint wave height, wave steepness, wave period distributionsStatistics-------------Extreme value analysis-Kernel density estimation-Hidden markov modelsWAFO consists of several subpackages and classes with short descriptions below.Classes:TimeSeries  - Data analysis of time series. Example: extraction ofturning points, estimation of spectrum and covariance function.Estimation transformation used in transformed Gaussian model.CovData     - Computation of spectral functions, linearand non-linear time series simulation.SpecData    - Computation of spectral moments and covariance functions, linearand non-linear time series simulation.Ex: common spectra implemented, directional spectra,bandwidth measures, exact distributions for wave characteristics.CyclePairs  - Cycle counting, discretization, and crossings, calculation ofdamage. Simulation of discrete Markov chains, switching Markovchains, harmonic oscillator. Ex:  Rainflow cycles and matrix,discretization of loads. Damage of a rainflow count ormatrix, damage matrix, S-N plot.Subpackages:TRANSFORM  - Modelling with linear or transformed Gaussian waves. Ex:STATS      - Statistical tools and extreme-value distributions.Ex: generation of random numbers, estimation of parameters,evaluation of pdf and cdfKDETOOLS   - Kernel-density estimation.MISC       - Miscellaneous routines.DOCS       - Documentation of toolbox, definitions. An overview is givenin the routine wafomenu.DATA       - Measurements from marine applications.WAFO homepage: <http://www.maths.lth.se/matstat/wafo/>On the WAFO home page you will find:- The WAFO Tutorial- New versions of WAFO to download.- Reported bugs.- List of publications related to WAFO.
Package: waftools
SummaryThis package contains a collection of tools for thewafbuild environment
intended for both native- as well cross compilation of C/C++ based projects.Following provides a non-exhausting list of functions provided:Cross compile using several C/C++ cross compiler toolchainsC/C++ export to makefiles (e.g.make,cmake)C/C++ export to IDE’s (e.g.Code::Blocks,Eclipse,Visual Studio)C/C++ source code checking usingcppcheck(includinghtmlreports)Clean and format C/C++ source code usingGNUindentCreate installers usingNSISCreate C/C++ documentation usingDoxyGenList dependencies between build tasksA detailed description ofwaftoolscan be found atpythonhosted.InstallationThewaftoolspackage can be installed using pip:pip install -I waftools [--user]
wafinstall [--user]Note that the last step will download and install thewafmeta build system
as well.
As alternative you can also clone the repository and install the latest
revision:cd ~
git clone https://bitbucket.org/Moo7/waftools.git waftools
pip install -e ~/waftools [--user]
wafinstall [--user]SupportIf you have any suggestions for improvements and/or enhancements, please feel
free to drop me a note by creating anissueat thewaftoolsprojects
page.
Package: wag-advanced-analytics-utils
READMEThis package contains all the common functions used to run the Advanced Analytics algorithms. We provide a brief explanation of each of the modules and the corresponding functions:athena_data_providercontains the classAthenaDataProvider, which is initialized by giving the parametersaws_access_key_idaws_secret_access_keys3_staging_dirregion_name.The functionread_queryreturns a DataFrame with the information requested by the query passed as argument.loggercontains the classLogger, which logs important messages and prints them to the terminal or CloudWatch in AWS.metricscontains the classMetrics, which creates the metrics and pushes them to Datadog.s3_clientcontains the classS3Client, that is initialized using boto3.client and boto3.resource and the environment variableRESULT_BUCKET.The functionupload_filesuploads the DataFrame returned by the algorithm (output_df) to the given path (output_path) in AWS, for the chosen variant (variant– typicallyproductionor the name of the experiment, if testing new features).If changes are made to this package, it has to be updated in PyPI by doing:Update the version number in the filepyproject.tomlunder the fieldversion.In the terminal, run the commandpython3 -m build. This will create two new files in the directorydist.Upload the package by typingtwine upload dist/*in the terminal. Since the account is protected by a two-factor authentication we have to use a token, meaning that you mustset your username to __token__ andset your password to the token value, including the pypi- prefix.Check that the package has been correcly updated inhttps://pypi.org/project/wag-advanced-analytics-utils/.To use these modules in a Python script do the following:start by installing the package by runningpip install wag_advanced_analytics_utilsorpipenv install wag_advanced_analytics_utilsimport the desired class by typingfrom wag_advanced_analytics_utils.{module_name} import class_namewhere{module_name}is one of the modules of the package andclass_nameis (one of) the class contained in the module.
Package: wageubn
wageubnwageubn's pytorch implementation.wageubnNoticewageubn's moduleswageubn.functionwageubn.configwageubn's problemSupplementWhere is the hardware-precision error, update and gradient?How to get the data width of a tensor?ContributingAcknowledgmentNoticeThis repo is based on the same framework astqtand focuses on inferrence only. Even the quantized error and gradient could be got fromwageubn.function.errorquantandwageubn.function.gradquant, we will not use them. If they are essential for your training, please fork this repo and wrap thewageubn.functionmodules with it.Now available athttps://pypi.org/project/wageubn/0.1.0/.Networks quantized via this package could be find athttps://github.com/PannenetsF/QuantizationPool.wageubn's moduleswageubn.functionfunctionis a re-impletement oftorch.nn.modules. Besides all the args used in the original function, a quantized function get 2 kind of optional arguments:bit_widthandretrain.bit_widthhas 2 type: weight/bias or activation.If theretrainisTrue, the Module will be in Retrain Mode, with thelog2_ttrainable. Else, in Static Mode, thelog2_tare determined by initialization and not trainable.wageubn.configConfig the bitwidth viawageubn.config.Configandwageubn.config.network_config.wageubn.config.Configis a namedtuple and you can set bitwidth as its key.With more consideration of hardware implement, the input and output of any module should be FIXED(or quantized). So there is aiostrictattribute to do this.wageubn's problemiostrictis one part as stated inlast section. The paper usesdirectquantalmost everywhere, which turns to a new problem: the given k is not the bitwidth of data. It's just the width of the decimal. As a result, I decide to add more attribute to control the module's real bitwidthreal_*for each part.SupplementWhere is the hardware-precision error, update and gradient?In the PyTorch framework, it's not easy to do therealquantization now. We cannot get gradient for int-like data type, for example. And there are more essential problems like overflow (no matter how careful you are to make the quantization via float) or truncation error, unless the network could rewrite all operations in CUDA or C++. But it requires much more effort than I can afford now.How to get the data width of a tensor?In fact, wageubn does the simplest work: get the data, train and eval based on the given bit width. But how to get the bit width is not mentioned. So we can say, under a given bit width (like 8), we need manually find the fixed point's place for each operations or even each layer. Then I will turn to TQT to do more work.ContributingIt will be great of you to make this project better! There is some ways to contribute!To start with, issues and feature request could let maintainers know what's wrong or anything essential to be added.If you use the package in you work/repo, just cite the repo and add a dependency note!You can add some function intorch.nnlikeHardTanhand feel free to open a pull request! The code style is simple ashere.AcknowledgmentThe original papar could be find atArxiv, Training high-performance and large-scale deep neural networks with full 8-bit integers.
Package: waggle
WagglePrepare and upload Docker images for use by BeeKeeper.QuickstartCreate a directory, and in that directory place aDockerfile, along with any
files required by theDockerfile.Optionally, you can also put anecs.jsonfile in the directory. Theecs.jsonfile should contains a JSON definition of any ECR container
settings that you want task to have. For example, if you wanted to specify a
particular memory and CPU usage profile for the task, you would specify:{
    memory: 50,
    cpu: 8192
}These settings will be used as overrides for the default container settings
used by BeeKeeper.Then, create a file named.envin your current working directory that contains
the following content:AWS_REGION=<Your AWS region (e.g., us-west-2)>
AWS_ACCESS_KEY_ID=<Your AWS access key>
AWS_SECRET_ACCESS_KEY=<Your AWS secret access key>Then, run:$ waggle <path to docker image directory>This will:Log into AWS ECRFind (or create) an AWS ECR repository for your imageBuild the Docker imageTag the image for publication to AWS ECRPush the image to AWS ECRRegister (or update) an AWS ECS task that uses the image.If your Docker image is contained in a directory calledmyimage, your
BeeKeeper configuration will now be able to reference a task image ofmyimage.TestingBefore you waggle your task, you’re probably going to want to test it.To build an image locally:$ cd <directory with a Dockerfile in it>
$ docker build -t <namespace>/<image> .To run an image locally:$ docker run <namespace>/<image>If your docker image requires environment variables (all the Beekeeper ones do),
you may find it easier to put all those variables in a file (e.g.,.env),
and run:$ docker run --env-file=.env <namespace>/<image>To temporarily define a variable for the duration of the test:$ VARIABLE=value docker run -e VARIABLE <namespace>/<image>To mount a local directory as the source code directory:$ docker run -v `pwd`:/app/src <namespace>/<image>To start the container with an interactive prompt:$ docker run -it –env-file=.env <namespace>/<image> /bin/bashTo clean up afterwards, run:$ docker ps -ato list all the containers that have been executed, and:$ docker rm $(docker ps -aq)to remove all the stale containers.CommunityWaggle is part of theBeeWare suite. You can talk to the community through:@pybeeware on TwitterThepybee/generalchannel on Gitter.We foster a welcoming and respectful community as described in ourBeeWare Community Code of Conduct.ContributingIf you experience problems with Waggle,log them on GitHub. If you
want to contribute code, pleasefork the codeandsubmit a pull request.
Package: wagglepy
The wagglepy PackageThewagglepyis used to analyze the traces ((of particle, ray, ande.t.c.)) in variable (could be position $\vec{r}$, velocity $\vec{v}$ ore.t.c.) space governed by a given system of ordinary differential equations (ODE system) which might come from some specific domains of physics.Thewagglepypackage consists of a collection of template notebooks and some utility functionality for drawing and analyzing the particle traces in the study of plasma physics.Wagglepy, however, does not restrict itself in particle-tracing, but would expand its application across ray-tracing, stochastic procedure and so on, all of which share the same essence, that is, the ordinary differential system.For those ode systems that are easy to solve (at least for sympy'scomputeralgebrasystem, CAS), we directly use the symbolic solving capability offered by sympy to deduce the exact analytic solution. While for the difficult ones, sympy (and einsteinpy) helps you to, at least, express the problems in a way that the computers can understand, after which the generic functionality concerning perturbation and numerical solver insidewagglepywould try to approximate the solution.
Package: wagner
wagnerPython implementation ofWagner's Algorithm for the Generalized Birthday Problem.This algorithm is used to solve what is known as the generalized birthday problem. Given a modulus $n$, and $k$ lists of random numbers $\{L_1, L_2, ..., L_k\}$, how can we find $k$ elements $\{x_1, x_2, ..., x_k\} : x_i \in L_i$ from those lists, such that they all sum to some constant $c$ mod $n$?Check out my full-length article on the subjectfor more detailed info. This repository is meant as a demonstration for practically minded and inquisitive readers.UsageThe primary export of this library is thesolvemethod.>>>importwagner>>>wagner.solve(2**16)[50320,16960,11687,52082,17220,47751,11228,54896]>>>sum(_)%(2**16)0This method solves the generalized birthday problem for a given modulus $n$. The higher $n$ is, the more difficult it is to find a solution and the longer the algorithm will take.At no cost, the caller can also choose a desired sum other than zero.n=2**16sum(wagner.solve(n,885))%n# -> 885To change the number of elements returned bysolve, specify the height $H$ of the tree used to solve the problem. The number of elements in the solution will be $2^H$.len(wagner.solve(n,tree_height=2))# -> 4len(wagner.solve(n,tree_height=3))# -> 8len(wagner.solve(n,tree_height=4))# -> 16len(wagner.solve(n,tree_height=5))# -> 32To specify how the random elements are generated, provide ageneratorcallback. By default,wagnerusesrandom.randrange(n)to generate random values. A common use case for Wagner's Algorithm is to find inputs whose hashes sum to some desired number. To ensuresolvereturns the preimages and not the hash outputs, returnLineageinstances from yourgeneratorcallback. This class holds is basically an integer with pointers to the element(s) which created it.importrandomimporthashlibimportwagnerdefhashfunc(r,n,index):r_bytes=r.to_bytes((int.bit_length(n)+7)//8,'big')preimage=r_bytes+index.to_bytes(16,'big')h=hashlib.sha1(preimage).digest()returnint.from_bytes(h,'big')%ndefgenerator(n,index):r=random.randrange(0,n)returnwagner.Lineage(hashfunc(r,n,index),r)if__name__=="__main__":n=2**128preimages=wagner.solve(n,generator=generator)print(sum(hashfunc(r,n,index)forindex,rinenumerate(preimages))%n)# -> 0
Package: wagner-dio-image-processing
wagner_dio_image_processingDescription.
The package wagner_dio_image_processing is used to:
Processing:
- Histogram matching
- Structural smilarity
- Resize image
Utils:
- Read image
- Save image
- Plot image
- Plot result
- Plot histogramInstallationUse the package managerpipto install package_namepipinstallwagner_dio_image_processingAuthorWagner_TrindadeLicenseMIT
Package: wago
Welcome toWago!This library controls access to I/O on Wago controllers.
These are industrial devices with various analog and digital extension modules.
They run a basic embedded Linux. Older models don’t even have a MMU.A small control program needs to run on the controller.
You can get its source from theWago Firmwarearchive.License: GPLv3 as published by the Free Software Foundation, or (at your option) any later version
Package: wagon-tools
WAGON tools - Python package buiilderThis package is a meta-package that provide python libs for projects
and mainlywagon-make-packagescript.wagon-make-packagecreate a Python package template.Installwagon_toolspipinstallwagon_toolsCreate anew_pkg_namepackageUsewagon-make-packageto create a new python package:$wagon-make-package-nnew_pkg_name-d"New project package"=>Newpythonpackagenew_pkg_namecreated$cdnew_pkg_name/$gitinit;gitadd*;gitcommit-am'initial commit'$gittag-a0.42-m0.42$makecleanCheck that__version__is set:$cd/tmp$python-c'import new_pkg_name; print (new_pkg_name.__version__)'0.42$Check thatnew_pkg_namescript work:$(venv)user@machine:/tmp$new_pkg_name-runnew_pkg_name/data/data.csv.gzLoaded==>out.csvMADEshapeis(999,142)(venv)user@machine:/tmp$wc-lout.csv1000out.csv(venv)user@machine:/tmp$
Package: wags-tails
WagsTAILSTechnology-Assisted Information Loading and Structure (TAILS) for Wagnerds.This tool provides data acquisition and access utilities for several projects developed by the Wagner Lab.InstallationInstall from PyPI:python3-mpipinstallwags_tailsUsageData source classes provide aget_latest()method that acquires the most recent available data file and returns a pathlib.Path object with its location:>>>fromwags_tails.mondoimportMondoData>>>m=MondoData()>>>m.get_latest(force_refresh=True)Downloading mondo.owl: 100%|█████████████████| 171M/171M [00:28<00:00, 6.23MB/s]PosixPath('/Users/genomicmedlab/.local/share/wags_tails/mondo/mondo_v2023-09-12.owl'), 'v2023-09-12'Initialize the source class with thesilentparameter set to True to suppress console output:>>>fromwags_tails.mondoimportMondoData>>>m=MondoData(silent=True)>>>latest_file,version=m.get_latest(force_refresh=True)ConfigurationAll data is stored within source-specific subdirectories of a designated WagsTails data directory. By default, this location is~/.local/share/wags_tails/, but it can be configured by passing a Path directly to a data class on initialization, via the$WAGS_TAILS_DIRenvironment variable, or viaXDG data environment variables.DevelopmentCheck out the repository:gitclonehttps://github.com/GenomicMedLab/wags-tailscdwags-tailsCreate a developer environment, e.g. withvirtualenv:python3-mvirtualenvvenvsourcevenv/bin/activateInstall dev and test dependencies, includingpre-commit:python3-mpipinstall-e'.[dev,test]'pre-commitinstallCheck style:black.&&ruffcheck--fix.Run tests:pytest
Package: wagtail1.13.1-modelchooser
A plugin for Wagtail that provides aModelChooserPanelandModelChooserBlockfor arbitrary models.InstallingInstall using pip:pip install wagtail-modelchooserThen add it to yourINSTALLED_APPS:INSTALLED_APPS=[# ...'wagtailmodelchooser',# ...]It works with Wagtail 1.4 and upwards.Quick startTo enable the chooser for your model, you must register the model.
For simple cases, decorate your model with@register_model_chooser:fromdjango.dbimportmodelsfromwagtailmodelchooserimportregister_model_chooser@register_model_chooserclassAuthor(models.Model):name=models.CharField(max_length=255)def__str__(self):# The ``str()`` of your model will be used in the chooserreturnself.nameYou can then use eitherModelChooserPanelin an edit handler definition,
orModelChooserBlockin aStreamFielddefinition:fromwagtail.wagtailcore.blocksimportRichTextBlockfromwagtail.wagtailcore.fieldsimportStreamFieldfromwagtail.wagtailcore.modelsimportPagefromwagtail.wagtailadmin.edit_handlersimportFieldPanel,StreamFieldPanelfromwagtailmodelchooser.blocksimportModelChooserBlockfromwagtailmodelchooser.edit_handlersimportModelChooserPanelclassBook(Page):name=models.CharField(max_length=255)author=models.ForeignKey(Author)content_panels=[FieldPanel('name'),ModelChooserPanel('author'),]classContentPage(Page):body=StreamField([('text',RichTextBlock()),('author',ModelChooserBlock('books.Author')),])content_panels=[StreamFieldPanel('body'),]