Saravanan666/pypi-org huggingface dataset:
Package: qpp-git-secrets
git-secretGit without secretsPrerequisitesPython 3is required.  Python 2 is not supported.Second, Python 3'sbindirectory needs to be in yourPATHenvironment variable.  For example, if you are using the
python.org install on macOS, you will need to add the following to your~/.profile.PATH="/Library/Frameworks/Python.framework/Versions/3.*/bin:${PATH}"Installationgit-secretsis located onPyPI.To install, run the following.$pip3installqpp-git-secretssudomay be needed if your Python 3 installation is in a protected directory.  This will put the command thebindirectory of your Python 3 installation.To updategit-secretsto the latest version, run the following.$pip3install--upgradeqpp-git-secretsAgain,sudomay be required.UsageCurrently,git-secretsonly checks the added lines of staged files.  AKA, only the added lines that are about to be
committed will be checked.Installing the Pre-commit HookRun the following when the PWD is in the repository you want to add a pre-commit hook...$gitsecretsinstallIf there exists apre-commit.ddirectory, this will add a bash script into that directory.  If that directory doesn't
exist, thepre-commitbash script will be created directly.  If thepre-commitscript already exists,git-secretswill exit with an error since it chooses to not remove the previous pre-commit script.Manually scanningIf you want to manually scan a repository, you can run the following while your PWD is in the repository...$gitsecretsscanSecrets are then scanned.Specifying SecretsThere are two locations thatgit-secretschecks for secret specifications.  The secrets from the two locations are
merged together.A.gitsecretsfile in the top level directory of the repository.~/.gitsecrets.Each line in these files should contain a regular expression.  The regular expression syntax is based off what thePython 3remodulesupports.Example SecretsTINs that don't start with000or999or don't have00for the middle number group.(\D|^)(?!000)(?!999)\d{3}\s(?!00)\d{2}\s\d{4}(\D|$)
(\D|^)(?!000)(?!999)\d{3}-(?!00)\d{2}-\d{4}(\D|$)
(\D|^)(?!000)(?!999)\d{3}(?!00)\d{2}\d{4}(\D|$)DevelopmentI accept PRs!  Check out theissues.
Package: qp-prob
qpQuantile parametrization for probability distribution functions.MotivationThis repository exists for two reasons.To be the home ofqp, a python package for handling probability distributions using various parametrizations, including a set of quantiles;To help us learn best practices in software carpentry.ExamplesBasic Demo(raw notebook)Practical Example(raw notebook)Also:Read the DocsPeopleAlex Malz(NYU)Phil Marshall(SLAC)Eric Charles(SLAC)Sam Schmidt(UC Davis)License, Contributing etcThe code in this repo is available for re-use under the MIT license, which means that you can do whatever you like with it, just don't blame us. If you end up using any of the code or ideas you find here in your academic research, please cite us asMalz et al, ApJ 156 1 35. If you are interested in this project, please do drop us a line via the hyperlinked contact names above, or bywriting us an issue. To get started contributing to theqpproject, just fork the repo - pull requests are always welcome!
Package: qpretrieve
qpretrieveis a Python3 library for Fourier-based retrieval of quantitative
phase information from experimental data. If you are looking for a library to
load quantitative phase data from various file formats, please take a glance atqpformat.DocumentationThe documentation, including the code reference and examples, is available atqpretrieve.readthedocs.io.Installationpip install qpretrieveTestingpip install pytest
pip install -e .
pytest tests
Package: qprofiler
[]qprofilerqprofileris a Python package that provides an intelligent way to create a data quality profile for your development(train) dataset(s) and save it as a reference to use in creating quality check tests and automatic handling cases for production(test) datasets.Table of ContentsInstallationDependenciesUsageContributingLicenceInstallationThe source code is currently hosted on GitHub at:dprofiler-githubBinary installers for the latest released version are available at thePyPi# PyPipipinstallqprofilerDependenciesPolars(>=0.19.0 <0.20.0)PyYAML(>=6.0.1 <7.0.0)Pathlib(>=1.0 <2.0)rumamel.yaml(>=0.17.32 <0.18.0)Usagecheck thenotebookthat contains everything about how to useDataProfilermodule in profiling datasets, and how to useQTestmodule to create quality check tests.check thenotebookthat contains everything about how to useQPipelineContributingPull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.Please make sure to update tests as appropriate.LicenceMITNew in v0.2.3Create Quality Pipeline(v0.2.2).enhance documentation.add utility method in DataProfiler to .dprofiler structure tree.New in v0.3.0Modify file structure of .dprofiler.add Metadata Module of .dprofiler.modify test cases.
Package: qprof-interfaces
qprof_interfacesis a plugin forqprof.
Its goal is to define the interfaceqprofmodules should respect in order to
integrate a framework.InstallationFrom Gitlabgitclonehttps://gitlab.com/cerfacs/qprof/qprof_interfaces.gitpipinstallqprof_interfaces/From PyPipipinstallqprof_interfaceUsageThis plugin should not be needed by a simple user and is targeted at developers willing
to implement a plugin to support a new framework.
Package: qprof-myqlm
qprof_qatis a plugin forqprof, a quantum profiler largely inspired bygprof.
This plugin adds the support for theqatlibrary toqprof.
It is a Python module distributed under the open-source (non-OSI but BSD compatible)CeCILL-B licence.Installationqprof_qatbeing a Python module, it is installable withpip.From Gitlabgitclonehttps://gitlab.com/cerfacs/qprof_interfaces.gitpipinstallqprof_qat/From PyPiThe code has not been published on PyPi yet.
Package: qprof-qiskit
qprof_qiskitis a plugin forqprof.
This plugin adds the support for theqiskitlibrary toqprof.Installationqprof_qiskitbeing a Python module, it is installable withpip.From Gitlabgitclonehttps://gitlab.com/qcomputing/qprof/qprof_qiskit.gitpipinstallqprof_qiskit/From PyPiUsageProfilingProfiling is performed with theqprof.profilefunction.Theqprof.profilefunction needs a quantum routine implemented with one of the
supported frameworks along with the “base” gate times provided as a dictionary.Example of profiling:# Import the qprof toolsfromqprofimportprofile# Import the framework tools to generate a quantum routinefromqiskit.aqua.algorithmsimportGroverfromqiskit.aqua.components.oraclesimportLogicalExpressionOracle# Generate the routine to benchmark.input_3sat="""
c example DIMACS-CNF 3-SAT
p cnf 3 5
-1 -2 -3 0
1 -2 3 0
1 2 -3 0
1 -2 -3 0
-1 2 3 0
"""oracle=LogicalExpressionOracle(input_3sat)grover=Grover(oracle)circuit=grover.construct_circuit()# Hard-coded gate times retrieved by handgate_times={"U1":0,"U2":89,"U3":178,"CX":930,"BARRIER":0}# Profile the resulting quantum circuit and use the "gprof" exporterqprof_out=profile(circuit,gate_times,"gprof")# Print to stdout the analysis reportprint(qprof_out)Full profiling exampleRequirements for the exampleYou should have thedottool installed on your machine, along with thegprof2dottool that can be installed
withpip install gprof2dot.Profile the codeLet save the code of the previous section in a fileprofile.py.You can generate the following graph with the commandpython3profile.py|gprof2dot|dot-Tpng-oprofiling_result.png
Package: qprom
qprom a.k.a Quick Prompt - ChatGPT CLIA Python-based CLI tool to quickly interact with OpenAI's GPT models instead of relying on the web interface.Table of ContentsDescriptionInstallationSetupUsageTodosLicenseDescriptionqprom is a small project that lets you interact with OpenAI's GPT-4 and 3.5 chat API, quickly without having to use the web-ui.
This enables quicker response times and betterdata privacyInstallationpip install qpromSetupMake sure you have yourOpenAI API key.When running qprom the script tries to fetch the OpenAI API key from a credentials file located in the.qpromfolder within the user's home directory.
If the API key is not found in the credentials file, the user is prompted to provide it, and the provided key is then stored in the aforementioned credentials file for future use.UsageArgumentTypeDefaultChoicesDescriptionOptional-pStringNoneNoneOption to directly enter your prompt (Do not use this flag if you intend to have a multi-line prompt.)yes-mStringgpt-3.5-turbogpt-3.5-turbo,gpt-4,...Option to select the modelyes-MStringgpt-3.5-turbogpt-3.5-turbo,gpt-4,...Set the default modelyes-tFloat0.3Between0and2Option to configure the temperatureyes-vBooleanFalseNoneEnable verbose modeyes-cBooleanFalseNoneEnable conversation modeyes-tkString6500NoneOption to set the currently used token limityes-TKString6500NoneOption to configure the currently used token limityesUsageqprom-p<prompt>-m<model>-t<temperature>-v-c<prompt>: Replace with your prompt<model>: Replace with eithergpt-3.5-turboorgpt-4<temperature>: Replace with a float value between0and2-v: Add this flag to enable verbose mode-c: Add this flag to enable conversation modeFor example:qprom-p"Translate the following English text to French: '{text}'"-mgpt-4-t0.7-vThis will run the script with the provided prompt, using thegpt-4model, a temperature of0.7, and verbose mode enabled.Multi line promptingTo facilitate multi-line input for the prompt, invoke qprom without utilizing the -p parameter. This will prompt you for your input at runtime, where you can provide multiple lines as needed. To signal the end of your input, simply enter the string 'END'.qpromThis will run qprom with default values model:gpt-3.5-turbo, a temperature of0.7and ask for the prompt during runtime.Set default modelqprom-M<model-name>Set token limit for prompt/conversationqprom-tk<token-limit>Set default token limitqprom-TK<token-limit>Piping console input into qpromJust pipe the prompt into qprom.catprompt.txt|qpromTodosCleanup project / refactoringAdd option to set default temperatureAdd option to re-set the API tokenTestingAdd option to disable streaming and only print the full responseBug reports:LicenseMITLinkSupport me :heart: :star: :money_with_wings:If this project provided value, and you want to give something back, you can give the repo a star or support by buying me a coffee.
Package: qprompt
Library for quick CLI user prompts, input, and menus.IntroductionThis project provides a Python 2.7/3.5+ library that allows the user to
quickly create CLI prompts for user input. The main features of Qprompt
are:Simple multi-entry menus.Prompt for typed (integer/float/string) input.Optional default values and validity checks.Various CLI convenience functions.User input can optionally be supplied from script command-line
arguments allowing for simple automation.Should work on any platform without additional dependencies.StatusCurrently, this project is in thedevelopment releasestage. While
this project is suitable for use, please note that there may be
incompatibilities in new releases.Release notes are maintained in the projectchangelog.RequirementsQprompt should run on any Python 2.7/3.5+ interpreter and uses some
third-party libraries.InstallationQprompt isavailable on PyPI
hereand can be installed with
pip using the following command:pip install qpromptAdditionally, Qprompt can be installed from source by running:python setup.py installDocumentationThe full documentation for this project can be foundhere on Read the
Docs.RoadmapThe following potential updates are under consideration:Accept multiple menu choices from user at once; e.g. space separated
entries like1 2 q.Timeouts for prompt inputs; default value used if timed out.ContributingContributions or feedback is welcome and encouraged!A list of those who have helped with this project is available in theauthors
file.SimilarThe following projects are similar and may be worth checking out:bulletcliaskPromptlypython-inquirerpython-promptpython-prompt-toolkitprompterRich
Package: qprop
# qprop
Visualization tool for QPROP: A Schrödinger-solver for intense laser-atom interaction# Citation
“Qprop is for non-profit use only. If results obtained using Qprop are published, an acknowledgment or citation is compulsory.”An example of citation would be like the following:Bauer and P. Koval, Comput. Phys. Commun. 174, 396 (2006).Mosert and D. Bauer, Comput. Phys. Commun. 207, 452 (2016).
Package: qps-limit
QPS LimitRun functions under any limited rate usingmultiprocessing+asyncioAvailable on Unix (i.e. Linux, MacOS) only, as the default multiprocessing start method isforkInstallationpipinstallqps-limitor install manually via gitgitclonegit://github.com/antct/qps-limit.gitqps-limitcdqps-limit
pythonsetup.pyinstallUsagefromqps_limitimportLimiterLimiter(func="an asynchronous function",params="a generator function yields args and kwargs",callback="a callback function that handles the return values of func",num_workers="number of processes, recommended <= number of CPUs",worker_max_qps="maximum qps per process, None means unlimited",ordered="return ordered results or not, the default option is False")BTW: The wrapped function returns tuples(idx, res)consisting of the data index and the function return value. Ifordered=Falseis set, the order of the returned values may be randomized for better performance.Quick Start10 workers, each with a maximum qps of 10, to sample data from input stream (i.e. reservoir sampling)importrandomfromqps_limitimportLimiterasyncdeffunc(n:int):returnndefparams():forninrange(1000):yield(),{"n":n}f=Limiter(func=func,params=params,num_workers=10,worker_max_qps=10,ordered=False)i=0k=10d=[]for_,resinf():ifi<k:d.append(res)else:j=random.randint(0,i)ifj<k:d[j]=resi+=1receiver: 1000it [00:00, 861961.36it/s]
producer: 100%|██████████████████████████████| 1000/1000 [00:11<00:00, 87.07it/s]
consumer: 100%|██████████████████████████████| 1000/1000 [00:11<00:00, 87.11it/s]Best PracticeInitialize resources that can not be pickledresource=Noneasyncdeffunc(n):globalresource# with process lockifresourceisNone:resource={}Debugging code using only partial dataLimiter(...,max_steps=100)Early termination if specific conditions are meti,max_i=0,100for_,resinf():if# condition:ifi>max_i:f.stop()breaki+=1Safely write files with multiple processesimportfcntlwriter=open('...','w+')defcallback(line):globalwriterfcntl.flock(writer,fcntl.LOCK_EX)writer.write('{}\n'.format(line))writer.flush()fcntl.flock(writer,fcntl.LOCK_UN)f=Limiter(...callback=callback)
Package: qpso
qpsoA Python implementation of quantum particle swarm optimization (QPSO).pip install qpsoThis is a black-box optimization package built upon the quantum paricle swarm
optimization [1].QuickstartThe usage of this package is very simple.
For example, the following code shows how to solve a 10-dimensional opmitzation
problem by using QPSO with Delta potential well (QDPSO) proposed in [1].importnumpyasnpfromqpsoimportQDPSOdefsphere(args):f=sum([np.power(x,2.)forxinargs])returnfdeflog(s):best_value=[p.best_valueforpins.particles()]best_value_avg=np.mean(best_value)best_value_std=np.std(best_value)print("{0: >5}{1: >9}{2: >9}{3: >9}".format("Iters.","Best","Best(Mean)","Best(STD)"))print("{0: >5}{1: >9.3E}{2: >9.3E}{3: >9.3E}".format(s.iters,s.gbest_value,best_value_avg,best_value_std))NParticle=40MaxIters=1000NDim=10bounds=[(-2.56,5.12)foriinrange(0,NDim)]g=0.96s=QDPSO(sphere,NParticle,NDim,bounds,MaxIters,g)s.update(callback=log,interval=100)print("Found best position:{0}".format(s.gbest))Bibliography[1] Jun Sun, Bin Feng and Wenbo Xu, "Particle swarm optimization with particles having quantum behavior," Proceedings of the 2004 Congress on Evolutionary Computation (IEEE Cat. No.04TH8753), Portland, OR, USA, 2004, pp. 325-331 Vol.1.
doi: 10.1109/CEC.2004.1330875
Package: qpsphere
qpsphereis a Python3 library for analyzing spherical objects in
quantitative phase imaging.DocumentationThe documentation, including the reference and examples, is available atqpsphere.readthedocs.io.Installationpip install qpsphereTestingpip install -e .
pip install pytest
pytest testsReleases to PyPIThe wheel distribution of qpsphere includes binaries of the BHFIELD program
and are thus platform-specific. When creating the wheels, theplat-namecommand line argument must be set.# on Windows
python setup.py sdist bdist_wheel --plat-name win_amd64
# on Linux
python setup.py sdist bdist_wheel --plat-name manylinux1_x86_64
Package: qpt-generator
qpt_generatorAn implementation of Question Paper Template Generation Algorithm written in C++ to provide high performance. It uses Cython internally to create python package.IntroductionGeneration of question papers through a question bank is an important activity in learning management systems and educational institutions. The quality of question paper is based on various design constraints such as whether a question paper assesses different problem solving skills as per Bloom's taxonomy, whether it covers all units from the syllabus of a course and whether it covers various difficulty levels.I have implemented algorithm written by Vaibhav M. Kale and Arvind W. Kiwelekar for question paper template generation in C++ to provide fast performance. Implementation is extensible in terms of constriant it support to create question paper template.The qpt_generator package was motivated by the needs of my academic projectQuestion Paper Generator.InstallationYou can install qpt_generator using easy_install with following command:pip install qpt-generatororeasy_install qpt-generatorUsageAfter installing module, you can import it using following command:fromqpt_generatorimportQPTGeneratorYou have to provide two inputs to the constructor of QPTGenerator:A dictionary of constraints and lists of distribution of markEx: if you want to generate paper with 4 constraint:Unit-wise distribution of marksDifficulty level-wise distribution of marksCognitive level-wise distribution of marksQuestion-wise distribution of marksA list of question no. associated with list of question-wise mark distributions. Repitition of same question no. indicates subquestions of that question.Output will be generated when you call generate method of the QPTGenerator class. Here, output is a dictionary of list of the alloted unit, cognitive level, difficulty and mark by question no.fromqpt_generatorimportQPTGeneratormark_distributions={"question":[5,5,10,4,6,5,5],"unit":[8,8,8,5,11],"difficulty":[13,15,12],"cognitive":[12,18,10],}question_no=[1,1,2,3,3,4,4]qpt=QPTGenerator(mark_distributions,question_no)output=qpt.generate()# output = {'cognitive': [2, 3, 2, 3, 3, 1, 3, 1, 1, 2],#           'difficulty': [3, 1, 2, 2, 1, 3, 3, 1, 2, 3],#           'question': [5, 5, 8, 2, 2, 1, 1, 6, 5, 5],#           'question_no': [1, 1, 2, 2, 3, 3, 3, 3, 4, 4],#           'unit': [4, 5, 1, 3, 2, 2, 3, 5, 2, 3]}To satisfy all given constraints:
question 1 should have 2 subquestions:first question should have cognitive_level = 2, difficulty = 3, unit no.= 4 and mark = 5second question should have cognitive_level = 3, difficulty = 1, unit no.= 5 and mark = 5You can randomly select this kind of questions from your question bank database if it exists.ReferencesAn Algorithm for Question Paper Template
Generation in Question Paper Generation System
Package: qpubsub
library.qpubsubpubsub layer for NLP servicesUsagesConfigsYou need to configure these in your service:{"PROJECT_ID":"...","SUBSCRIPTION_NAME":"...","TOPIC_NAME":"...","MAX_MESSAGES":...}Where:PROJECT_ID: qordoba project id e.g. qordoba-develSUBSCRIPTION_NAME: a subscription to pull the messages from e.g. dev4.segment-delegator.gender-tone-pubsub.allLangTOPIC_NAME: where to publish the result messages e.g. dev4.segment-delegator.gender-tone-pubsub-latch.allLangMAX_MESSAGES: The maximum number of messages in the subscriber queue e.g. 100Use PubSub onlyAdd this to the serviceapplication.pyps_connection=QPubSub(analyzer,white_lister=whitelister,category=category,verbose=VERBOSE,debug=DEBUG,ignore_html=IGNORE_HTML,sentence_token_limit=SENTENCE_TOKEN_LIMIT,ignore_inside_quotes=False)ps_connection.connect()Use PubSub with RESTAdd this to the serviceapplication.pyrest_connection=QRest(analyzer,white_lister=whitelister,category=category,verbose=VERBOSE,debug=DEBUG,ignore_html=IGNORE_HTML,sentence_token_limit=SENTENCE_TOKEN_LIMIT,ignore_inside_quotes=False)ps_connection=QPubSub(analyzer,white_lister=whitelister,category=category,verbose=VERBOSE,debug=DEBUG,ignore_html=IGNORE_HTML,sentence_token_limit=SENTENCE_TOKEN_LIMIT,ignore_inside_quotes=False)ps_connection.connect_with_rest(rest_connection)Service docker changes to compilegoogle-cloud-pubsubadd the following lines beforepip install -r requirements.txtcommandapkupdate&&\apkadd--virtualbuild-dependencieslinux-headersbuild-basegcc&&\add the following lines afterpip install -r requirements.txtcommandapkdelbuild-dependencies&&\rm-rf/var/cache/apk/*&&\LicenseThis software is not licensed. If you do not work at Qordoba, you are not legally allowed to use it. Also, it's just helper functions that really won't help you. If something in it does look interesting, and you would like access, open an issue.TODOreduce compile timeadd testshandle errors, e.g. publish it to an error topic or return empty issues to the same topic.
Package: qpyr
QPYR - QR Code Generation in PythonPython package designed for creating QR codes with support for all QR code versions from 1 to 40. Designed for developers looking for a simple way to integrate QR code generation into their Python applications 🚀🚀🚀.Basic usageTo use the package, import and call themainfunction as follows:# Save qrcode as imageimportqpyrqpyr.main("google.com",filepath="qr1.png")# Show qrcode as imageimportqpyrqpyr.main("google.com",show_image=True)ContributingContributions are warmly welcomed! Whether you're tackling a bug, adding a new feature, or improving documentation, your input is invaluable in making this library better.
Package: qPython
.. ATTENTION::This project is in maintenance mode. We may fix bugs, but no new features will be added in foreseeable future.qPython=======qPython is a Python library providing support for interprocess communication between Python and kdb+ processes, it offers:- Synchronous and asynchronous queries- Convenient asynchronous callbacks mechanism- Support for kdb+ protocol and types: v3.0, v2.6, v<=2.5- Uncompression of the IPC data stream- Internal representation of data via numpy arrays (lists, complex types) and numpy data types (atoms)- Supported on Python 2.7/3.4/3.5/3.6 and numpy 1.8+For more details please refer to the `documentation`_.Installation------------To install qPython from PyPI:``$ pip install qpython``**Please do not use old PyPI package name: exxeleron-qpython.**Building package----------------Documentation~~~~~~~~~~~~~qPython documentation is generated with help of `Sphinx`_ document generator.In order to build the documentation, including the API docs, execute:``make html`` from the doc directory.Documentation is built into the: ``doc/build/html/`` directory.Compile Cython extensions~~~~~~~~~~~~~~~~~~~~~~~~~qPython utilizes `Cython`_ to tune performance critical parts of the code.Instructions:- Execute: ``python setup.py build_ext --inplace``Build binary distribution~~~~~~~~~~~~~~~~~~~~~~~~~Instructions:- Execute: ``python setup.py bdist``Testing~~~~~~~qPython uses py.test as a test runner for unit tests.Instructions:- Make sure that top directory is included in the ``PYTHONPATH``- Execute: ``py.test``Requirements~~~~~~~~~~~~qPython requires numpy 1.8 to run.Optional requirements have to be met to provide additional features:- tune performance of critical parts of the code:- Cython 0.20.1- support serialization/deserialization of ``pandas.Series`` and ``pandas.DataFrame``- pandas 0.14.0- run Twisted sample:- Twisted 13.2.0- build documentation via Sphinx:- Sphinx 1.2.3- mock 1.0.1Required libraries can be installed using `pip`_.To install all the required dependencies, execute:``pip install -r requirements.txt``Minimal set of required dependencies can be installed by executing:``pip install -r requirements-minimal.txt``.. _Cython: http://cython.org/.. _Sphinx: http://sphinx-doc.org/.. _pip: http://pypi.python.org/pypi/pip.. _documentation: http://qpython.readthedocs.org/en/latest/