Saravanan666/pypi-org huggingface dataset:
Package: qjson
qjson=====quick and dirty way to convert json string to python object.# install`$pip install qjson`orjust copy the qjson/qjson.py to your project.#usage```pythonimport qjsonjson_str = '{"person":\{"name":"jerry", "age":32, "web":{"url":"http://jatsz.org", "desc":"blog"}}, \"grade": "a", "score":[80,90]}'info = qjson.loads(json_str)assert info.person.name == "jerry"assert info.grade == "a"assert info.score == [80, 90]```-0.1.8:fix array as top element, which also has object within it.-0.1.8:supporting array has object as element.
Package: qjson2json
qjson to json converterjsonis a very popular data encoding with a good support in many
programming languages. It may thus seam a good idea to use it for manually managed
data like configuration files. Unfortunately, json is not very convenient for such
application because every string must be quoted and elements must be separated by commas.
It is easy to parse by a program and to verify that it is correct, but it’s not connvenient
to write.For this reason, different alternatives to json have been proposed which are more human
friendly like [yaml] orhjsonfor instance.qjson is inspired by hjson by being a human readable and extended json. The difference
between qjson and hjson is that qjson extends its functionality and relax some rules.Here is a list of qjson text properties:comments of the form //...  #... or /.../commas between array values and object members are optionaldouble quote, single quote and quoteless stringsnon-breaking space is considered as a white space characternewline is \n or \r\n, report \r alone or \n\r as an errornumbers are integer, floating point, hexadecimal, octal or binarynumbers may contain underscore '_' as separatornumbers may be simple mathematical expression with parenthesismember identifiers may be quoteless strings including spacesthe newline type in multiline string is explicitely specifiedbackspace and form feed controls are invalid characters except
in /.../ comments or multiline stringstime durations expressed with w, d, h, m, s suffix are converted to secondstime specified in ISO format is converted to UTC time is secondsUsageInstall the qjson to json converter package with the commandpython3 -m pip install qjson2jsonOnced installed, it can be used.$python3
>>> import qjson2json
>>> qjson2json.decode('a:b')
'{"a":"b"}'Reliabilityqjson2json is a python extension using the C library qjson-c.
qjson-c is a direct translation of qjson-go that has been extensively tested
with manualy defined tests (100% coverage). AFL fuzzing was run on qjson-c
for many months without finding a simple hang or crash. For this fuzzing test,
the json text produced, when the input was valid, was checked with json-c to
detect invalid json. All json output in the tests are valid json.This code should thus not crash or hang your program, and json output is valid.
What could not be extensively and automatically tested is if the output is
the expected output. It was only verified in the manual tests of qjson-go.For bug reports in this qjson2json package, fill an issue inthe qjson-py3 project.Contributingqjson is a recently developped package. It is thus a good time to
suggest changes or extensions to the syntax since the user base is very
small.For suggestions or problems relative to syntax, fill an issue in theqjson-syntax project.Any contribution is welcome.LicenseThe licences is the 3-BSD clause.
Package: qkmd
qkmdQuick markdown what you need, just via a link.Getting StartedHave you ever try to stored the link(URL) in.txtto browse it one day later or few months after? But when you open the file again, muttering to yourself 'What do I store for this?'Have you learnmarkdownsyntax, but get bored to use it to record the link(URL) by press the[]and()?Theqkmdis for you, you can just give it a link(URL) then the webpage title will be extract, format to a[title](http://example.com)pattern. Also you can customize the title what you like, append timestamp, append code snip ...PrerequisitesIf you live in theresource blocked areaorInternet censorship area, please consider setting a proxy first.Install the porxy software, assure you can use browser to open the webpageInstallpolipo$## Ubuntu / Debian$sudoapt-getupdate
$sudoapt-getinstallpolipo$## redhat / CentOSPolipo installation instructionsExport the proxyexporthttps_proxy=http://127.0.0.1:8123exporthttp_proxy=http://127.0.0.1:8123Theqkmddefault proxy port number is 8123.InstallingAssure you python version is >= 3.4$pipinstallqkmdor$python3setup.pyinstallor$pythonsetup.pyinstallUsageusage: qkmd.py [-h] [-d] [-v] [-c [comment [comment ...]]] [-l language]
               [-s source-code-file] [-C] [-t [title [title ...]]]
               [-o output-file] [-P]
               [link]

Quickly formatting markdown `link`, convenient your daily life/work.

positional arguments:
  link                  generate the markdown format link

optional arguments:
  -h, --help            show this help message and exit
  -d, --date            append `RFC 2822` date format
  -v, --version         display current version of `qkmd`
  -c [comment [comment ...]], --comment [comment [comment ...]]
                        give the link a simple comment
  -l language, --language language
                        specific the code language
  -s source-code-file, --source source-code-file
                        give the source code snip file
  -C, --color           source code syntax hightline
  -t [title [title ...]], --title [title [title ...]]
                        add title manually
  -o output-file, --save output-file
                        save the markdown to a file
  -P, --print           turn off print the markdown format in screenHere is a simple way to reduce your time and simplify your operation.Assure you always want to store the file to$HOME/mark.mdand highlight the codealiasmark='function mark(){ qkmd $* -o ~/mark.md -C;}; mark'Authorsalopex cheung@alopexLicenseThis project is licensed under the MIT License - see theLICENSEfile for details
Package: qksh
f5 qksh================Introduction------------This project implements an SDK for the iControl REST interface for BIG-IP®.Users of this library can create, edit, update, and delete configuration objectson a BIG-IP®.This project implements an utility for interacting with F5 iHealth. Users ofthis utility can upload qkview, download log file, config file and commandoutput from an iHealth link.Installation------------.. code:: shell$> pip install qkshUsage-----.. code:: pythonqksh <case number> <qkview file list>qksh 1-12345678 test-1.qkview test-2.qkviewqksh <file/command url of iHealth>qksh https://ihealth.f5.com/qkview-analyzer/qv/1234567/files/download/Y29uZmlnL2JpZ2lwLmNvbmYDocumentation-------------Documentation is hosted on `Read the Docs <https://qksh.readthedocs.org>`_Filing Issues-------------See the Issues section of `Contributing <CONTRIBUTING.md>`__.Contributing------------See `Contributing <CONTRIBUTING.md>`__Test----Before you open a pull request, your code must have passing`pytest <http://pytest.org>`__ unit tests. In addition, you shouldinclude a set of functional tests written to use a real BIG-IP devicefor testing. Information on how to run our set of tests is includedbelow.Unit Tests~~~~~~~~~~We use pytest for our unit tests.#. If you haven't already, install the required test packages listed inrequirements.test.txt in your virtual environment... code:: shell$ pip install -r requirements.test.txt#. Run the tests and produce a coverage report. The ``--cov-report=html`` willcreate a ``htmlcov/`` directory that you can view in your browser to see themissing lines of code... code:: shellpy.test --cov ./qksh --cov-report=htmlopen htmlcov/index.htmlStyle Checks~~~~~~~~~~~~We use the hacking module for our style checks (installed as part of step 1 inthe Unit Test section)... code:: shell$ flake8 ./Contact-------abc89d@gmail.comLicense-------The MIT License (MIT)~~~~~~~~~~~Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included inall copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISINGFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGSIN THE SOFTWARE.
Package: qlang
QNOTICE: This is work in progressA concise, procedural programming language.InstallationTo install Q from pip, use the command:$ pip install qlangIf you want to use Q from a shell script, navigate to the directory where Q is installed and create a symbolic link:ln -s ./cli.py qUsageTo use Q from a shell script:$ q # run interactive shell
$ q <file> # run fileTo use Q using the Python API:fromqimportrun,run_textrun_text('<text>')# run textrun('<file>')# run fileExample programFactorialF={$0>1?$0*F($0-1):1}
Package: qlasskit
QlasskitQlasskit is a Python library that allows quantum developers to write classical algorithms in pure Python and translate them into unitary operators (gates) for use in quantum circuits, using boolean expressions as intermediate form.This tool will be useful for any algorithm that relies on a 'blackbox' function and for describing the classical components of a quantum algorithm.Qlasskit implements circuit / gate exporters for Qiskit, Cirq, Qasm, Sympy and Pennylane.Qlasskit also support exporting to Binary Quadratic Models (bqm, ising and qubo) ready to be used in
quantum annealers, ising machines, simulators, etc.pipinstallqlasskitFor a quickstart, read thequickstartandexamplesnotebooks from the documentation:https://dakk.github.io/qlasskit.fromqlasskitimportqlassf,Qint4@qlassfdefh(k:Qint4)->bool:h=Trueforiinrange(4):h=handk[i]returnhQlasskit will take care of translating the function to boolean expressions, simplify them and
translate to a quantum circuit.Then, we can use grover to find which h(k) returns True:fromqlasskit.algorithmsimportGroveralgo=Grover(h,True)qc=algo.circuit().export("circuit","qiskit")And that's the result:Qlasskit also offers type abstraction for encoding inputs and decoding results:counts_readable=algo.decode_counts(counts)plot_histogram(counts_readable)You can also use other functions inside a qlassf:@qlassfdefequal_8(n:Qint4)->bool:returnequal_8==8@qlassfa(defs=[equal_8])deff(n:Qint4)->bool:n=n+1ifequal_8(n)elsenreturnnQlasskit supports complex data types, like tuples and fixed size lists:@qlassfdeff(a:Tuple[Qint8,Qint8])->Tuple[bool,bool]:returna[0]==42,a[1]==0@qlassfdefsearch(alist:Qlist[Qint2,4],to_search:Qint2):forxinalist:ifx==to_search:returnTruereturnFalseQlasskit function can be parameterized, and the parameter can be bind before compilation:@qlassfdeftest(a:Parameter[bool],b:bool)->bool:returnaandbqf=test.bind(a=True)RoadmapReadTODOfor details about the roadmap and TODOs.ContributingReadCONTRIBUTINGfor details.LicenseThis software is licensed withApache License 2.0.Cite@software{qlasskit2023,
  author = {Davide Gessa},
  title = {qlasskit: a python-to-quantum circuit compiler},
  url = {https://github.com/dakk/qlasskit},
  year = {2023},
}About the authorDavide Gessa (dakk)https://twitter.com/dagidehttps://mastodon.social/@dagidehttps://dakk.github.io/https://medium.com/@dakk
Package: qlcompiler
The quick lambda compiler takes quick lambda objects from sidekick and compiles
them either to Python, C or Javascript code. The goal is to improve
interoperability between Python and other languages that can be useful in some
common Python applications.C compilerThe main goal of the C compiler is to help with scientific Python where simple
and small functions can be defined both in Python and C. The goal is to
prototype a function in a scientific computation in Python and then later
convert it to C and have huge speed gains with very little effort.The main use case is interoperability with Numpy, but it can be used as a simple
code generator for other C applications.>>> from sidekick import _
>>> from qlcompiler import c_compiler
>>> print(c_compiler.compile(_ + 2))
void function(double _) {
    return _ + 2;
}Javascript compilerSimilarly to C compiler, the Javascript compiler converts quick lambdas to
Javascript code. It may be useful in web application in order to share code
between the client and the server.>>> from qlcompiler import js_compiler
>>> print(js_compiler.compile(_ + 2))
function(_) {
    return _ + 2;
}
Package: ql-cq
CQCode quality checker packageUsageCheckingJust runcqin the root of your package.$ cq
requirements_setup_compatibility
setup.py: setup.py: does not contain requirement 'coverage' that is in requirements.txt
dumb_style_checker
setup.py:20: Put exactly one space before and after `=`  [...     name='.........', ...].
package/api.py:191: Put exactly one space before and after `=`  [... def fake_localtime(t=None): ...].
pyflakes-ext
Hint: use `# NOQA` comment for disabling pyflakes on particular line
./tests/test_warnings.py:4: 'types' imported but unused
mypy
Hint: use `# type: ignore` for disabling mypy on particular line
package/api.py:42: error: Need type annotation for 'freeze_factories' (hint: "freeze_factories: List[<type>] = ...")
pylint
Hint: use `# pylint: disable=<violation name>` for disabling line check. For a list of violations, see `pylint --list-msgs`
package/api.py:56: [W0212(protected-access), ] Access to a protected member _uuid_generate_time of a client classYou can specify path to packages that you want to test, if you want to test whole library/app.$ cq package_1 package_2Checkers are run in threads. Some of them (e.g. pylint, mypy) spawn an external process so this checkers run in parallel.To disable certain checker for the whole run add option-d:$ cq -d pylint -d branch_name_checkWarnings are hidden by default. To display them, run cq with--show-warnings$ cq --show-warningsIf something takes too long use debug output, which will print timing for each checker:$ cq --debugMost of the checkers support disabling the error in the comment on the respective line. For example inpylintyou can use# pylint: disable = protected-accessto disable protected access check in the current context.FixingJust runcq --fixwith the same options as regularcq.Checkerspylint- comprehensive lintermypy- checks python typingpyflakes-ext- another general lintergrammar_nazi- grammar/spelling errorsdumb_style_checker- basic python mistakes (e.g. use of print in a library)requirements_setup_compatibility- validation of version compatibility between setup.py and requirements.txtrequirements-validator- requirements.txt validationsetup_check- setup.py validatorbranch_name_check- check whether current branch name comply with Quantlane standardsorange- code formatter based onblackisort- isort your imports, so you don't have tosafety- checks installed dependencies for known security vulnerabilitiesFixersorange- code formatter based onblackisort- isort your imports, so you don't have topylintYou can override the packaged pylint rules in.pylintrcin the root of your project (actually in$PWD/.pylintrcforcqrun)Pylint checker can output two types of issues: warning and error. Errors are in bold typeset. Warnings can (but should not) be ignored.mypyConfig can be overridden by havingmypy.iniin the root of your project
Package: qldb-orm
makpar-innolabqldb-ormA simpleObject-Relation-Mappingfor a serverlessAWS Quantum Ledger Databasebackend, and a command line utility for querying tables on those ledgers.NOTE: The user or process using this library must have anIAM policy that allows access to QLDB.ORMThe idea behind theORMis to map document fields to native Python object attributes, so that document values can be accessed by traversing the object property tree.CRUD OPERATIONSfromqldb_orm.qldbimportDocument# Create a document on `my_table` table.document=Document('my_table')document.field={'nested_data':{'array':['colllection','of','things']}}document.save()fromqldb_orm.qldbimportDocument# Load a document from `my_table` table.document=Document('my_table',id="123456")forvalindocument.field.nested_data.array:print(val)Queriesfromqldb_orm.qldbimportQueryquery=Query('my-table').find_by(field_name='field value')fordocumentinquery:print(f'Document({document.id}).field_name ={document.field_name}')CLICRUD Operationsqldb-orm--tableyour-table--insertcol1=val1col2=val2...
qldb-orm--tableyour-table--id123--updatecol1=newval1col2=newval2Queriesqldb-orm--tableyour-table--findcolumn=thisRead The Docsqldb-orm documentationCode Quality
Package: qldbshell
Amazon QLDB ShellThis tool provides an interface to send PartiQL statements toAmazon Quantum Ledger Database (QLDB).
This tool is not intended to be incorporated into an application or adopted for production purposes.
The objective of the tool is to give developers, devops, database administrators, and anyone else interested the opportunity for rapid experimentation with QLDB andPartiQL.PrerequisitesBasic ConfigurationSeeAccessing Amazon QLDBfor information on connecting to AWS.Python 3.4 or laterThe shell requires Python 3.4 or later. Please see the link below for more detail to install Python:Python InstallationGetting StartedInstall the QLDB Shell using pip:pip3 install qldbshellInvocationThe shell can then be invoked by using the following command:$qldbshell--region<region_code>--ledger<ledger_name>An example region code that can be used is us-east-1.
The currently avaiable regions are addressed in theQLDB General Referencepage.
By default, the shell will use the credentials specified as environment variables and then in the default profile mentioned in~/.aws/credentials/(default location set in the AWS_SHARED_CREDENTIALS_FILE environment variable) and then the default profile in~/.aws/config(default location set in AWS_CONFIG_FILE environment variable).
Various optional arguments can be added to override the profile, endpoints, and region used. To view the arguments, execute the following:$qldbshell--helpExample UsageAssuming that the ledger, "test-ledger" has already been created:$qldbshell--regionus-east-1--ledgertest-ledger
qldbshell>CREATETABLETestTable
qldbshell>INSERTINTOTestTable`{"Name":"John Doe"}`qldbshell>SELECT*FROMTestTable
qldbshell>exitWe use backticks in the example above since we use are using Ion literals. For more on querying Ion literals, gohere.
Each statement except exit is considered as a transaction.See alsoAmazon QLDB accepts and storesAmazon IONDocuments. Amazon Ion is a richly-typed, self-describing, hierarchical data serialization format offering interchangeable binary and text representations. For more information read theION docs.Amazon QLDB supports thePartiQLquery language. PartiQL provides SQL-compatible query access across multiple data stores containing structured data, semistructured data, and nested data. For more information read thePartiQL docs.We use backticks in our example since we use are using Ion literals. For more on querying Ion with PartiQL, gohere.DevelopmentSetting up the ShellClone the repository using:git clone --recursive https://github.com/awslabs/amazon-qldb-shell.gitAfter cloning the repository, activate a virtual environment and install the package by running:$virtualenvvenv
...
$.venv/bin/activate
$pip3install-rrequirements.txt
$pip3install-e.LicenseThis tool is licensed under the Apache 2.0 License.
Package: qLDPC
qLDPCThis package contains tools for constructing and analyzingquantum low density partity check (qLDPC) codes.📦 InstallationThis package requires Python>=3.10, and can be installed from PyPI withpip install qldpcTo install a local version from source:git clone git@github.com:Infleqtion/qLDPC.git
pip install -e qLDPCYou can alsopip install -e 'qLDPC[dev]'to additionally install some development tools.🚀 FeaturesNotable features include:abstract.py: module for basic abstract algebra (groups, algebras, and representations thereof).ClassicalCode: class for representing classical linear error-correcting codes over finite fields.QuditCode: general class for constructingGalois-qudit codes.CSSCode: general class for constructingquantum CSS codesout of two mutually compatibleClassicalCodes.CSSCode.get_logical_ops: method to construct a complete basis of nontrivial logical operators for aCSSCode.CSSCode.get_distance: method to compute the code distance (i.e., the minimum weight of a nontrivial logical operator) of aCSSCode.  Includes options for computing a lower bound (determined by the distances of the underlyingClassicalCodes), an upper bound (with the method ofarXiv:2308.07915), and the exact code distance (with an integer linear program).Includes options for applying local Hadamard transforms, which is useful for tailoring aCSSCodeto biased noise (seearXiv:2202.01702).  Options to apply more general Clifford code deformations are pending.GBCode: class for constructinggeneralized bicycle codes, as described inarXiv:1904.02703.QCCode: class for constructing thequasi-cyclic codesinarXiv:2308.07915.HGPCode: class for constructinghypergraph product codesout of twoClassicalCodes.LPCode: class for constructinglifted product codesout of two protographs (i.e., matrices whose entries are elements of a group algebra).  SeearXiv:2012.04068andarXiv:2202.01702.QTCode: class for constructingquantum Tanner codesout of (a) two symmetric subsetsAandBof a groupG, and (b) twoClassicalCodes with block lengths|A|and|B|.  SeearXiv:2202.13641andarXiv:2206.07571.🤔 Questions and issuesIf this project gains interest and traction, I'll add a documentation webpage and material to help users get started quickly.  I am also planning to write a paper that presents and explains this project.  In the meantime, you can explore the documentation and explanations in the source code.qldpc/codes_test.pycontains some examples of using the classes and methods described above.If you have any questions, feedback, or requests, pleaseopen an issue on GitHubor email me atmichael.perlin@infleqtion.com!⚓ AttributionIf you use this software in your work, please cite with:@misc{perlin2023qldpc,
  author = {Perlin, Michael A.},
  title = {{qLDPC}},
  year = {2023},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/Infleqtion/qLDPC}},
}This may require adding\usepackage{url}to your LaTeX file header.  Alternatively, you can citeMichael A. Perlin. qLDPC. https://github.com/Infleqtion/qLDPC, 2023.