Saravanan666/pypi-org huggingface dataset:
Package: qng
Documentation aussi disponible enfrançaisqng, the Queb name generator.RequirementsTo runqng, you will only need Python ≥ 3.4.For installing, we recommend using thepippackage manager.InstallingTo installqngsystem-wide, run:sudopip3installqngTo installqngmanually from source, the steps are as follows:gitclonegit@github.com:abusque/qng.gitcdqngsudo./setup.pyinstallUsingOnce installed, you can useqngby running the following command:qngThis will generate a single random Queb name.You can also generate names for a specific gender:qng--gendermaleGenerate only part of a name:qng--partfirstGenerate names according to their relative popularity:qng--weightedGenerate a name formatted as “snake_case” without any diacritics
(useful for naming your containers):qng--snake-caseHere’s how you could use this to name a Docker container:dockerrun--name$(qng--snake-case)hello-worldAll the above options may be combined if desired. Refer to the help
for more details:qng--helpPython APIYou can also useqngthrough its Python API, for integration with
other applications.Here is a simple example of programmatic usage:importqng.generatorgenerator=qng.generator.QuebNameGenerator()name=generator.generate()print(name)Thegenerate()function also supports the following options, with
the same meaning as the corresponding CLI options:importqng.generatorgenerator=qng.generator.QuebNameGenerator()name=generator.generate(gender='male',part='first',snake_case=True,weighted=True,)print(name)Refer to the documentation in the source file for more details.DevelopmentFor local development ofqng, you may usepipenv. Usepipenv install--devto
generate a virtual environment into which the dependencies will be
installed. You may then usepipenv shellto activate that
environment.For publishing releases to PyPI, we recommend usingTwine.ReferencesThe data forqngwas sourced froml’institut de la statistiquefor surnames, and fromPrénomsQuébec.cafor first names (who in
turn get their data from Retraite Québec’sbanque de prénoms).Scripts used for scraping the data from the web pages can be found
under thescripts/directory.
Package: qnit
qnit[kjuː.nɪt]A Python library for object-oriented parameters, physical quantities and units with a strong support for typing.This library heavily builds uponPintandPint-Pandas.This project is currently under heavy development. Expect API changes.Feature OverviewQuantitys you cansetwith magnitude and units, convert to other units, get magnitudes or work with the underlyingpintquantity.Parameters with optional quantity values which can be worked with accordingly.Quantities and Parameters with 1-dimensional array values.Easily extensible library of physical quantities, specifying:Units type (e.g. Mass)Internal Units (to be used for conversion at user interfaces, e.g. SI units, e.g. kilograms)Default display units (to be used in user frontends, e.g. grams)Available units (given asUnitCollections for the above units type)Support forQuantitys andParameters asdataclassfields.Heavy support for typing:Specify a quantity's units type and get type hints when you're about to do something wrong, converting anEnergyquantity tokgunits.Specify a parameter's data type and be hinted when you're about to set an incompatible valueGetting StartedInstallInstall qnit from the PyPI in your virtual environment:$python-mpipinstallqnitUsagefromqnitimportQuantity,quantity_types,unit_collections,unit_types,ureg# Create a mass quantity and set its valuemass:Quantity[unit_types.MassUnit]=Quantity(quantity_type=quantity_types.Mass,description="A mass quantity.",)mass.set(magnitude=42,units=unit_collections.Mass.kg)# Play with the underlying `pint` quantity.mass.pint_quantity.to(unit_collections.Mass.g)mass.pint_quantity.to('g')# <Quantity(42000.0, 'gram')>mass.pint_quantity.m_as(unit_collections.Mass.g)mass.pint_quantity.m_as('g')# 42000.0mass.pint_quantity+4*ureg.kg# <Quantity(46.0, 'kilogram')># Get magnitudes as different unitsmass.magnitude(units=unit_collections.Mass.t)# 0.042mass.internal_magnitude# 42.0mass.display_magnitude# 42.0Use mypy or your favorite IDE to warn you about units related errors before runtimefromqnitimportQuantity,quantity_types,unit_collections,unit_typesmass:Quantity[unit_types.MassUnit]=Quantity(quantity_type=quantity_types.Mass,description="A mass quantity.",magnitude=42,units=unit_collections.Mass.kg,)mass.magnitude(unit_collections.Energy.kWh)# Warning here: Expected type 'MassUnit', got 'EnergyUnit' insteadDevelopmentTo set up a development environment you need a virtual environment andPoetry, for example:POETRY_VIRTUALENVS_IN_PROJECT=1poetryinstallTesting and Type ChecksTests forqnitare written withpytest. You can run the test suite withpytesttestsBothqnititself as well as its tests are to be properly typed. To check this you can runmypysrc
mypytestsYou can also run the test suite in all supported Python environments together with the type checks usingtox:toxrunFor this to work, you should have all supported Python versions installed in your operating system, e.g. by usingpyenv.
Package: qnq
QNQ -- QNQ's not quantizationversion 1.1.0 2021.2.5DescriptionThe toolkit is for Techart algorithm team to quantize their custom neural network's pretrained model.
The toolkit is beta now, you can contact me with email(dongz.cn@outlook.com) for adding ops and fixing bugs.How to installpip install qnqHow to useThis README.MD is in very early stages, and will be updated soon.
you can visithttps://git.zwdong.com/zhiwei.dong/qnq_tutorialfor more examples for QNQ.Prepare your model.Check if your model contains non-class operator, like torch.matmul.IfTrue, addfrom qnq.operators.torchfunc_ops import *to your code.Then use class replace non-class operator, you can refer fellow#! add by dongzclassBasicBlock(nn.Module):expansion=1def__init__(self,inplanes,planes,stride=1,downsample=None):super(BasicBlock,self).__init__()self.conv1=conv3x3(inplanes,planes,stride)self.bn1=nn.BatchNorm2d(planes)self.relu1=nn.ReLU(inplace=True)self.relu2=nn.ReLU(inplace=True)self.conv2=conv3x3(planes,planes)self.bn2=nn.BatchNorm2d(planes)self.downsample=downsampleself.stride=stride#! add by dongzself.torch_add=TorchAdd()defforward(self,x):identity=xout=self.conv1(x)out=self.bn1(out)out=self.relu1(out)out=self.conv2(out)out=self.bn2(out)ifself.downsampleisnotNone:identity=self.downsample(x)#! add by dongzout=self.torch_add(out,identity)# out += identityout=self.relu2(out)returnoutPrepare 'metrics', 'metrics_light'(optional) and 'steper'.Choose at least 1k data to calibration your quantized model.'metrics' inference without input params, return metrics value(a float number).'metrics_light' inference without input params, return metrics value(a float number), you can choose 1/10 testsets to test.'steper' done inference and without input params too, but add quant.step(), and no return.Check qnq_tutorial for details.Prepare pretrained checkpoints.Train your model and usetorch.save()to save your checkpoints.Usecheckpoints = torch.load(checkpoints_path)andmodel.load_state_dict(checkpoints)to load your checkpoints.QuantizeFor codeAddfrom qnq import QNQAddquant = QNQ(model, save_path, config_path, metrics, metrics_light, steper).Addquant.search()First run the program will exit, but the config_path will show a yaml file.Edit config.yaml and rerun for quantization.Operators supportedConvolution LayersConvConvTransposePooling LayersMaxPoolAveragePoolAdaptiveAvgPoolActivationRelu、Relu6PRelu、LeakyReluLogSoftmaxNormalization LayersBatchNormLayerNormRecurrentLSTMLinear LayersLinearVision LayersUpsampleEmbeddingTorch FunctionAdd, Sum, Minus, DotMul, MatMul, Div,Sqrt, ExpSin, CosSoftMax, Sigmoid, TanhTorchTemplate, TorchDummy
Package: qnsync
QNSync七牛云实时同步工具特性WatchDog实时更新支持自定义同步bucket_name与根目录更多特性有待开发...使用pip install qnsyncorpip3 install qnsynccd /work/dirqnsync(ornohup qnsync &)参数--help显示帮助并退出--path /path/to/the/config.json指定config.json（默认为当前目录下的config.json）config.json{"access_key":"access_key","secret_key":"secret_key","bucket_name":"bucket_name","monitor_path":"/work/dir/","base_dir":"/"}access_key: 七牛云的AKsecret_key: 七牛云的SKbucket_name: 七牛云的储存空间名monitor_path: 监控的目录base_dir: 七牛云储存的根目录仓库PyPi:https://pypi.org/project/qnsync/GitHub:https://github.com/Gingmzmzx/qnsync
Package: qnupload
InstallThis Tools can help you to upload your file to QiNiu cloud storage.
You can install this easily,python setup.py installAlso can install it via pip:pip install qnuploadHelpAnd you can get help message by run:qnupload -hConfigurationAdd some basic configuration items in/etc/qnupload/qnupload.confChoose a bucket as default:default_bucket_name = Bucket1Set the access key and secret key, can get them from Qiniu Cloudaccess_key = your_access_keysecret_key = your_secret_keySet domain for each bucket, the domain can get form the bucket setting
on your Qiniu account[Bucket1]domain = domain1[Bucket2]domain = domain2Basic operationAfter set the bucket, access key and secret key, then you can upload
file with qnupload:qnupload File_PathIf you have several buckets in the configuration, but you want upload
the file to anon defaultbucket, you can use-b:qnupload File_path -b another_bucketYou can choose several files or directories one time:qnupload File1 File2 Dir1 Dir2 -b another_bucket
Package: qo
qoQuick access to code (personalized/collaborative) favorites.We all have our go-to utils and awesome tools.
Some of us are annoyed at having to type long dotpaths to the object we want to import.
Some of us probably forget where that particular object is in the first place.This is to mitigate that.Instead do this:fromqo.my_medleyimportthat_objectAlso have severalmy_medleysets of favorites, since what you'll need depends on the context.Word of advice: This tool is meant for the quick-and-dirty development contextDon't use this for production or any long-term code. It's meant for pulling things together quickly. Once the code matures, you should import "normally".UsageSee what modules are available to import>>>fromqoimportsource_module_names>>>source_module_names['tw','ca']See what that module is about (if the author cared to say)>>>fromqoimporttw>>>print(tw.__doc__)Amedleyofmymostfrequentlyusedtools.Import it (as a module object)fromqoimporttw# or from qo import tw as my_own_nameInject the module's contents in your current namespace (if you're that type)fromqo.twimport*Inject everything there is in your namespace (but expect unpredictable name collisions)fromqoimport*InspirationWhen I have to do this:fromsklearn.linear_modelimportRidgefromsklearn.metricsimportconfusion_matrixfromsklearn.linear_modelimportLinearRegressionfromsklearn.ensembleimportAdaBoostClassifierfromsklearn.ensembleimportRandomForestClassifierfromsklearn.svmimportSVRfromsklearn.ensembleimportRandomForestRegressorfromsklearn.linear_modelimportLogisticRegressionfromsklearn.treeimportDecisionTreeRegressorfromsklearn.ensembleimportAdaBoostRegressorfromsklearn.neural_networkimportMLPRegressorfromsklearn.ensembleimportGradientBoostingRegressorfromsklearn.neighborsimportKNeighborsRegressorfromsklearn.ensembleimportStackingRegressorfromsklearn.linear_modelimportRidgeCV,LassoCVfromsklearn.preprocessingimportStandardScalerI go 🤮.I can never remember what is where.
Some packages (likenumpy) percolate the best-of up to the root so that
these objects can be imported from there. Others (likesklearn) don't.
How do we solve this for ourselves -- and while we're at it,
handle multiple packages from a same place (qo)?When in fast mode, these kinds of things can really slow one down.
Irrelevant details are detrimental to thinking.
Where an object is irrelevant when you're modeling.I thought this might be more appropriate:fromqoimport(Ridge,confusion_matrix,LinearRegression,AdaBoostClassifier,RandomForestClassifier,SVR,RandomForestRegressor,LogisticRegression,DecisionTreeRegressor,AdaBoostRegressor,MLPRegressor,GradientBoostingRegressor,KNeighborsRegressor,StackingRegressor,RidgeCV,LassoCV,StandardScaler)So I did it.
Package: qoa
QOA-PythonThe Quite OK Audio Format for Fast, Lossy CompressionA  Python wrapper aroundqoaWritten using the amazing CFFI library.Why?QOA is fast. It decodes audio 3x faster than Ogg-Vorbis, while offering better quality and compression (278 kbits/s for 44khz stereo) than ADPCM.QOA is simple. The reference en-/decoder fits in about 400 lines of C. The file format specification is a single page PDF.Multi-threaded - Cffi unlocks the GILInstallpipinstallqoaUsageYou can use theqoalibrary to encode and decode audio files. Here's a basic example:importqoa# Read an audio filenp_array=qoa.read('path/to/file')# Write an audio fileqoa.write(np_array,'path/to/file')# Decode an audio filebuffer,shape=qoa.decode('path/to/file')# Encode an audio fileffi_buffer=qoa.encode(np_array)
Package: qoaladep
Qoala Deployment LibraryThis project contains the collection of function to deploy deep learning model in cloud platform from Qoala.id data science team.NewsDescriptionVersionFirst creation for simplify google cloud servicesv0.0.1Add detector utils and image utilsv0.0.3Requirementsscipypillowrequestsgoogle-cloudoauth2clientgoogle-cloud-storagegoogle-cloud-pubsubgoogle-cloud-dataflowgoogle-cloud-datastoregoogle-api-python-clientgoogle-cloud-datastorePackage Installationpip3 install -r requirements.txtpip3 install qoaladepAvailable Docker
Package: qoalarandom
QoalaRandomis a quantum powered random number generator.Produced by Qoalas @ iQuHack 2023InstallationThe best way of installingqoalarandomis by usingpip$pipinstall-ihttps://test.pypi.org/simple/qoalarandomUsing Qoala Randomrandint(start, stop, distribution=1)Parameters:start (int)stop (int)distribution (int, default=1 (uniform distribution))distribution is the index of the distribution type desired. See more in distribution options.Returns: A random integer between start and stoprandrange(start, stop, step=1, distribution=1)Parameters:start (int)stop (int)step (int, default=1)distribution (int, default=1 (uniform distribution))distribution is the index of the distribution type desired. See more in distribution options.Returns: A random integer between start and stop incrementing by steprandfloat(start, stop, distribution=1)Parameters:start (int)stop (int)distribution (int, default=1 (uniform distribution))distribution is the index of the distribution type desired. See more in distribution options.Returns: A random float between start and stoprandchoice(user_list, distribution=1)Parameters:user_list (list)distribution (int, default=1 (uniform distribution))distribution is the index of the distribution type desired. See more in distribution options.Returns: A random element of user_listDistribution Options0 = normalTo extract the random numbers from a normal distribution (centred at 0, variance = 1)1 = uniformTo extract the random numbers from a uniform distribution2 = porterthomasTo extract the random numbers from a Porter-Thomas distribution3 = deeprandomTo fully take advantage of the quantum circuit, creating a circuit that exploit statistical propertier of dual-unitary circuits to generate a number extracted uniformly from the Haar distribution (approximated according to the amount of resources requested to the QPU)
Package: qobra
qobraA simple music player for the command line.Why qobra?You can't get much more minimal than qobra. qobra extends mpg123 functionalities
to provide ease of navigation between your songs. As of version 1.1.0, qobra:can play songs in normal and shuffle modeprovides a search functionality to filter your musicsupports a vast variety of file formats thanks to mpg123Installationqobra is available on PyPI. Install it with pip:pipinstallqobrampg123 will be installed as a dependency as well.Usageqobra[-ddirname][options]Wheredirnameis your music directory. You can also set the music directory in
qobra's config file to avoid having to type it every time, as explained below.ControlKeyFunctionjgo down a songkgo up a songlplay selected songppause songttoggle playing modeqquit qobraoplay next songiplay previous song/open search barEntersubmit searchEsccancel searchConfigurationqobra will look for a configuration file in ~/.config/qobra/config.py or use the
default configuration if it can't find one. You can copy the sample config.py
file in this repository to ~/.config/qobra/config.py if you want to have your
own configuration.You can customize qobra's colors in the config.py file, as well as set your
music directory to avoid having to write it out on the command line:music_dir='~/music'TODOSIf you like this project, you can help with one of these:Implement pause functionality.IssuesResizing the window while the search bar is summoned may break the program.
Package: qobuz
python-qobuzUnofficial python library for theQobuz-API.InstallationTo install, runpipinstallqobuzUsageIn order to use the library, your application needs a valid APP_ID.
For streaming audio, you also need a valid APP_SECRET.
Both id and secret can be requested fromapi@qobuz.com.importqobuz# Register your APP_IDqobuz.register_app("YOUR_APP_ID")# Or register your APP_ID and APP_SECRETqobuz.register_app("YOUR_APP_ID","YOUR_APP_SECRET")
Package: qocttools
qocttools is a python package that implements quantum
optimal control theory (QOCT).You may download it from itsgitlab page.
Documentationhere.It solves typical optimization problems defined on generic quantum systems. These
may be closed (described by the Schrödinger equation) or open (described by Lindblad’s equation).
It relies heavily on theQuTiPprogram to handle internally
the quantum objects representation, manipulation, etc., and on thenloptlibrary for function optimization algorithms.
Package: qode
python-package-exampleThis is a minimal python package, for use alongside the lesson:https://github.com/BillMills/pythonPackageLessonContributing:Please do! Guidelines:This lesson is for beginners. Yes there are plenty of super fancy things we don’t cover here; someday, we’ll make a different, super fancy lesson to teach those things.Max 100 lines per PR please.Open an issue or empty PR first to talk about controversial changes.
Package: qodex-dk
QDK (Qodex Development Kit) - набор инструментов, в частности, класс QDK, обеспечивающий клиентскую часть взаимодействия
с QPI. Встроенные методы взаимодействия описаны в модуле methods.py, но они могут быть расширены передачей словаря
подобного формата атрибутом methods_dict.
Package: qodex-pi
QPI (Qodex Programming Interface) - Модуль API, используемый во всех программах Qodex.
Предусмотрен механизм аутентификации клиента на стороне сервера, функционал в папке auth, однако, сервер может
работать и без аутентификации, сразу исполняя команды клиента (если серверу передан параметр without_auth=True)3.33
Удалены лишние данные, попадающие в стандартный поток вывода3.32
Добавлено удаление зомби-подписчиков (тех subscribes, у которых при отправке на них возникает ошибка BrokenPipe)
Package: qodex-skud-bus
QBS (Qodex Skud Bus) - программная шина, работающая с программными моделями фотоэлементов, антенн и шлагбаумов.
По сути, является слоем над контроллерем СКУД, через которое происходит все взаимодействие с точками доступа.
Через API QBS можно:
1) Открывать, закрывать шлагбаумы
2) Блокировать, деблокировать фотоэлементы
3) Эмулировать считывание антеннами номера метки RFID
4) Получать данные об изменении состоянии точки доступа (пересечение фотоэлементов, открытие шлагбаума через иной сокет)
Package: qoi-conv
Python QOIQOI (Quite OK Image format)is a new lossless image format that achieves compression rates close to PNG with a 20x-50x faster encoding.This here is a naive Python way of implementing the QOI compression format and of course much slower than the C implementation.There's apython wrapperaround the original C implementation, which retains the C performance.The CLI interface was liberally borrowed fromPython QOI (py-qoi). The encoder/decoder is an reimplementation.RequirementsThe only requirement besides Python 3.10+ is Pillow to load and save images in formats other than QOI, and numpy for matrix manipulations.UsageTo encode an image:python3 qoi-quedvi/qoi.py -e -f image_file.pngThe input image may be of anypillow-supported format.
A file with name image_file.qoi will be saved on the same folder as the original image.To decode a QOI image:python3 qoi-conv/qoi.py -d -f image_file.qoiA file with name image_file.png will be saved on the same folder as the original image.usage: qoi-quedvi/qoi.py [-h] [-e] [-d] [-f FILE_PATH]
optional arguments:
  -h, --help            show this help message and exit
  -e, --encode
  -d, --decode
  -v, --verbose         get additional info
  -f FILE_PATH, --file-path FILE_PATH
                        path to image file to be encoded or decoded
Package: qoin
QRandomqoinis the analogue ofrandompackage implemented through gate-based quantum computing.Getting StartedPrerequisitesPython 3.9+Installationqoincan be installed with the command :pip install qoinThe default installation ofqoinincludesnumpy,qiskit, andqiskit_aer.UsageThe docs/examples are a good way for understanding how the package works.from qoin import QRNG
from qiskit_aer import AerSimulator


random_generator = QRNG(backend=AerSimulator())
random_generator.randint(5, 10)LicenseThe package is released under the GPL Ver 3.0 license.
Package: qojpca
qojpcaQOJPCA (Quasi-orthogonal Joint Principal Component Analysis) package allows for improving the orthogonality between linear bases computed through Principal Component Analysis.Install it from PyPIThe package has been released on PyPip and can be installed through.pipinstallqojpcaRequirementsNumpy, ScikitUsageThe package can be used by importing the "base" module into your python script as:fromqojpcaimportbase"""QOJPCA can be computed using the qojpca static functionl_p (resp. l_q): number of latent variables for P (resp. Q)l: regularization parameter. Note that it is multiplied by the largest eigenvalue of XX^T"""P_vals,Q_vals,P,Q=base.qojpca(X,Y,l_p,l_q,l)Or by using the command line interface. For example$python-mqojpcaX.npyY.npy--l_x10--l_y10--output_directoryoutput--regularization100where:
l_p (resp. l_q) are the number of latent variables for linear basis P (resp. Q).
Package: qokit
Quantum Optimization ToolkitThis repository contains fast CPU and GPU simulators for benchmarking the Quantum Approximate Optimization Algorithm, as well as scripts for generating matching quantum circuits for execution on hardware. See theexamplesfolder for a demo of this package.InstallCreating a virtual environment is recommended before installing.python -m venv qokit
source qokit/bin/activate
pip install -U pipInstall requirespython>=3.9andpip >= 23. It is recommended to update your pip usingpip install --upgrade pipbefore install.git clone https://github.com/jpmorganchase/QOKit.git
cd QOKit/
pip install -e .Some optional parts of the package require additional dependencies.Using commercial IP solvers to solve optimizations problems:pip install qokit[solvers]GPU simulation:pip install qokit[GPU]Development:pip install qokit[dev]If compilation fails, try installing just the Python version usingQOKIT_PYTHON_ONLY=1 pip install -e ..Installation can be verified by running tests usingpytest.MaxCutFor MaxCut, the datasets inqokit/assets/maxcut_datasetsmust be inflated