Saravanan666/pypi-org huggingface dataset:
Package: pyjpt
Joint Probability Trees (short JPTs) are a formalism for learning of and reasoning about joint probability
distributions, which is tractable for practical applications. JPTs support both symbolic and subsymbolic variables in a single
hybrid model, and they do not rely on prior knowledge about variable dependencies or families of distributions.
JPT representations build on tree structures that partition the problem space into relevant subregions that are elicited
from the training data instead of postulating a rigid dependency model prior to learning. Learning and reasoning scale
linearly in JPTs, and the tree structure allows white-box reasoning about any posterior probability\(P(Q\mid E)\),
such that interpretable explanations can be provided for any inference result. This documentation introduces the
code base of thepyjptlibrary, which is implemented in Python/Cython, and showcases the practical
applicability of JPTs in high-dimensional heterogeneous probability spaces, making it
a promising alternative to classic probabilistic## Documentation
The documentation is hosted on readthedocs.org [here](https://joint-probability-trees.readthedocs.io/en/latest/).
Package: pyjq-ng
pyjqA simple Python package to Query Json Data.FeaturesSupports pure json filesSupports multiple json objects in a file, delimited by newlines (/n)Supports gzipped filesSupports customizabile filtersSupports pure datetime range filtersTodoThe filters could be extended easily, adoptingPython3 stdlib operator.
Seepyjq.PyJQ.filterto extend ops mapping.Installationpip install pyjq-ngExample dataSeeexample/alerts.json.
pyjq works on lines by lines (splitted by \n).
It have been used for Wazuh alert json files and Django dumps.pyjq -j examples/django_dump.json -limit 2 -filter 'fields__original_url == https://google.com'
pyjq -j examples/django_dump.json -limit 2 -filter 'model == urlshortener.urlshortener'Usage'agent__name' it's an example of the namespace used by pyjq to access to nested childs. It other word it meansjson['agent']['name'].
It haven't limits on number of nested elements.Apply some custom filters with AND and OR operators on Wazuh Alert filepyjq -j ../Scaricati/alerts.json -filter 'agent__ip == 172.16.16.102 and agent__name == telegram-gw or agent__ip == 172.16.16.108'Contains operatorpyjq -j ../Scaricati/alerts.json -filter 'rule__description in iptables and agent__name == dev-bastion'Convert a specified filed to a pure datetime object and filter in a specified rangepyjq -j ../Scaricati/alerts.json -start_datetime 2020-04-06T10:22:00 -end_datetime 2020-04-06T13:22:00 -datetime_field timestampRealtime reading, it will only takes the latter entries, delimited by newline \npyjq -j /var/ossec/logs/alerts/alerts.json -datetime_field timestamp -realtimeUse a gzipped json file directlypyjq -j ../Scaricati/alerts.json.gzipLimit results to 2pyjq -j ../Scaricati/alerts.json  -limit 2Realtime monitoring of a specific entitypyjq -j /var/ossec/logs/alerts/alerts.json -realtime -filter 'agent__name == tinyurl and rule__level == 3'Custom callback, usefull for bot integration and other pub/sub APIspython3 pyjq -j examples/alerts.json -realtime -filter 'agent__name == tinyurl and rule__description in ssh' -callback 'examples.callback.things'Reading from stdincat examples/alerts.json | python3 ./pyjq -filter 'rule__level > 3'

# continous processing
tail -f  /tmp/alerts.json | python3 ./pyjq -filter 'location != osquery'AuthorGiuseppe De Marcogiuseppe.demarco@unical.itCreditsWazuh SIEM group @GarrLab
Package: pyjr
pyjrAn assistance package for ETL, model development and validation.DescriptionProject is not complete.Getting StartedProject is not complete.InstallingThe package can be accessed via pip install.pip install pyjrFuture WorkPlot classes have not been vetted.Add arg parse to plot classes.Documentation of classes and functions.Update to TimeSeries, Tuning and Features.Test all model classes and functions.Add to self-contained functions.Changelog0.0.1 -Initial ReleaseThis serves as a quick release to utilize the basic functionality.0.0.2 -Working ReleaseThis release has passed a cursory review.0.0.3 -Plot ReleaseThis release adds improved plotting capabilities.0.0.4 -Plot Release+This release adds documentation to the plot classes.0.0.5 -Functional ReleaseThis release allows subpackages.0.0.6 -Class UpdatesThis release adds Stat class, for rapid stat gathering.0.0.7 -Package RestructureThis release intro's a new file structure.0.0.8 -Hot FixHotfix Release0.0.9 -Another Hot FixForgot to add folder to setup.py.0.1.0 -Functionality UpdatesAdd ax to plots, cleaned up typing and tested models.
Package: pyjs9
My software career comes to an end on July 1, 2022 and with it will end active development of pyjs9. Please plan accordingly. EricJS9 brings image display right into your browser:- display URL-based FITS images and binary tables
- drag and drop FITS images and binary tables
- change the colormap and scale
- manipulate the contrast/bias with the mouse
- display pixel values and WCS position information
- create and manipulate geometric regions of interest
- add your own extensions using plugins and the Public API
- perform data analysis (local and server-side)
- display RGB composite images
- control JS9 from the command line
- print images
- much more ...See:https://js9.si.edufor more information about JS9.pyjs9.py connects Python and JS9 via the js9Helper.js back-end server:- The JS9 class constructor connects to a single JS9 instance in a Web page.
- The JS9 object supports the JS9 Public API and a shorter command-line syntax.
- See: https://js9.si.edu/js9/help/publicapi.html for info about the public api
- Send/retrieve numpy arrays and astropy (or pyfits) hdulists to/from JS9.Requirements: Python 3.5 or higher is required. Beyond that, pyjs9
communicates with a JS9 back-end Node server (which communicates with
the browser itself). By default, pyjs9 utilizes therequests
<http://www.python-requests.org/en/latest/>module to communicate
with the JS9 back-end server. However, if you installpython-socketio<https://pypi.org/project/python-socketio>`, pyjs9
will use the faster, persistentsocket.io http://socket.io/protocol.Install from the repository using pip3, as usual:> pip3 install git+https://github.com/ericmandel/pyjs9.git#egg=pyjs9or from a local copy:> pip3 install /path/to/local/copyMandatory dependencies:requestsOptional dependencies:numpy               # support for GetNumpy and SetNumpy methods
astropy             # support for GetFITS and SetFITS methods
python-socketio     # fast, persistent socket.io protocol, instead of html
                    # (install version 5.x, version 4.x is deprecated)To run:> # ensure JS9 node-server is running ...
> # visit your local JS9 Web page in your browser ...
> python
... (startup messages) ...
>>> import pyjs9
>>>
>>> j = pyjs9.JS9()        # default: connect to 'http://localhost'
>>>
>>> j.GetColormap()
{'bias': 0.5, 'colormap': 'grey', 'contrast': 1}
>>> j.SetColormap('red')
>>> j.cmap()
'red 1 0.5'
>>>
>>> hdul = j.GetFITS()
>>> hdul.info()
Filename: (No file associated with this HDUList)
No.    Name         Type      Cards   Dimensions   Format
0    PRIMARY     PrimaryHDU       6   (1024, 1024)   int32
>>>
>>> narr = j.GetNumpy()
>>> narr.shape
(1024, 1024)If you have internet connectivity, visit the JS9 Web page athttps://js9.si.eduwith your browser and:> python
... (startup messages) ...
>>> import pyjs9
>>>
>>> j = pyjs9.JS9('https://js9.si.edu')        # connect to JS9 Web site
>>>
>>> j.GetColormap()
{'bias': 0.5, 'colormap': 'grey', 'contrast': 1}
>>>
>>> # etc ...
Package: pyjsbn-rsa
pyjsbn-rsaPython RSA module compatible withjsbn.js.Installationpyjsbn-rsa is available via PyPIpip install pyjsbn-rsavia setup.pypython setup.py installBasic UseYou can test module withjsbn's RSA Encryption Demo>>from jsbn import RSAKey
>>rsa = RSAKey()
>>rsa.generate(1024,"10001")
>>hex(rsa.n)
0xdc36096d038a56e84c6290f33db80dce54413e89dc15f0490dde8f1f58e69d957eed66c9537918b8fefd6a3fc9fc7b2551ac595bc77c2b98bcfa13f7deb17e94890ae4f28016f0d3e09450054263ae71f81539b09ea42b854492691e94de5671835b4ce91b9756b651ec4bbebe63eec8b7274e157b8de07457f2d3563119ac53LPaste rsa.n to demo'sModulus (hex)and press encryt. (without "0x" and "L") And, getCiphertext (hex)value>>ctext="ceffa610eb7ec7fcbda60b2fdecf6d7cc65b7304ecb6e327056f15d763f1d079d376dbc801861a0ccb2731f836e75de0bb22350b3cd0d18eed216619b9e64a59dc06e15ef2531f0d3c176882444c5919dd751e9bcaefadff372d847b001a298751ebc69f9d310d92c217ab2fa433e3b3c7e8edf4744849560a317ef7f4ee7266"
>>rsa.decrypt(ctext)
'Hello World!'MethodsYou can use main methods of rsa.js and rsa2.jssetPublicSet the public key fields N and e from hex strings.>>rsa.setPublic(n,e)setPrivateSet the private key fields N, e, and d from hex strings.>>rsa.setPrivate(n,e,d)setPrivateExSet the private key fields N, e, d and CRT params from hex strings.>>rsa.setPrivateEx(n,e,d,p,q,dp,dq,c)encryptReturn the PKCS#1 RSA encryption of "text" as an even-length hex string. You should dosetPublic,setPrivate,setPrivateExorgeneratefirst.textmust beunicodefor Python 2 andstrfor Python 3.>>rsa.encrypt(text)decryptReturn the PKCS#1 RSA decryption of "ctext". "ctext" is an even-length hex string and the output is a plain string. You should dosetPrivate,setPrivateExorgeneratefirst.>>rsa.decrypt(ctext)generateGenerate a new random private key B bits long, using public expt E>>rsa.generate(b,e)
Package: pyjs-bridge
Server functionsmain.broadcast(message: str,p1: int = 0,p2: any = undefined)This is the broadcast function.main.another(p0: int,p1: str = "a",p2: any = undefined)This is another function.Client callbacksanother(p0: int,p1: str = "a",p2: any = undefined)This is another function.incoming_message(p0: any = undefined)This is the incoming_message function.
Package: pyjschema
pyjschemaUnlike other packages that handle the Json-Schema format, this package is
pretending to give a solution for getting common pythonic types (like datetime,
UUID, etc) from json data according to the Json-Schema format.Alongside that, the package has validation capabilities like several other
packages.FeaturesJson schema validationJson parsing according to a json schemaExtending Json-Schema by adding custom formatsInstallation$ pip install pyjschemaExamplesBasic Use>>>frompyjschemaimportloads>>>json='{"uuid": "9449771f-56ca-44c7-b9f6-d20315a2c6e0"}'>>># Setting up a property "uuid" to be of format "uuid">>>schema={...'type':'object',...'properties':{'uuid':{'type':'string','format':'uuid'}}...}>>>loads(json,schema){'uuid':UUID('3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a')}Custom FormatsThe package allows also to extend the default Json-Schema formats and define
more formats that will be structured in the json data. An example for that could
be adding a "bytes" format that will be structured in the json as base64 phrase.
An optional implementation for that with pyjschema would be:frombase64importb64encode,b64decodefrompyjschemaimportFormatter,JsonSchemaParserclassBytesFormatter(Formatter):symbol='bytes'defdecode(self,raw:str)->bytes:returnb64decode(raw)defencode(self,data:bytes)->str:returnb64encode(data).decode()if__name__=='__main__':schema={'type':'string','format':'bytes'}parser=JsonSchemaParser(schema,extended_formats=[BytesFormatter])data=parser.loads('"SGVsbG8gV29ybGQh"')print(type(data),data)# output: <class 'bytes'> b'Hello World!'ReferencesGitHub repopypi project
Package: pyjsend
python jsend
pypi:https://pypi.python.org/pypi/pyjsend/About jsendhttp://labs.omniti.com/labs/jsendInstallpip install pyjsendUsageimport module:>>> import jsendsuccess:>>> jsend.success({'key': 'value'})
{'status': 'success', 'data': {'key': 'value'}}fail:>>> jsend.fail({'key': 'value'})
{'status': 'fail', 'data': {'key': 'value'}}error:>>> jsend.error('message')
{'status': 'error', 'message': 'message'}is success:>>> jsend.is_success({'status':'success'})
Trueis fail:>>> jsend.is_fail({'status':'fail'})
Trueis error:>>> jsend.is_error({'status':'error'})
Trueto json string and load jsend string:>>> jsend.success({'key': 'value'}).stringify()
'{"status": "success", "data": {"key": "value"}}'

>>> jsend.loads(jsend.success({'key': 'value'}).stringify())
{u'status': u'success', u'data': {u'key': u'value'}}
Package: pyjsgf
JSpeech Grammar Format (JSGF) compiler, matcher and parser package for
Python.JSGF is a format used to textually represent grammars for speech
recognition engines. You can read the JSGF specificationhere.pyjsgf can be used to construct JSGF rules and grammars, compile them
into strings or files, and find grammar rules that match speech
hypothesis strings. Matching speech strings to tags is also supported.
There are also parsers for grammars, rules and rule expansions.pyjsgf has been written and tested for Python 2.7 and Python 3.5.The documentation for this project ison
readthedocs.org.InstallationTo install pyjsgf, run the following:$ pip install pyjsgfIf you are installing in order todeveloppyjsgf, clone/download the repository, move to the root directory and run:$ pip install -e .Usage ExampleThe following is a usage example for how to create a JSGF grammar with
one rule, compile it and find matching rules given the speech string
“hello world”:fromjsgfimportPublicRule,Literal,Grammar# Create a public rule with the name 'hello' and a Literal expansion 'hello world'.rule=PublicRule("hello",Literal("hello world"))# Create a grammar and add the new rule to it.grammar=Grammar()grammar.add_rule(rule)# Compile the grammar using compile()# compile_to_file(file_path) may be used to write a compiled grammar to# a file instead.# Compilation is not required for finding matching rules.print(grammar.compile())# Find rules in the grammar that match 'hello world'.matching=grammar.find_matching_rules("hello world")print("Matching:%s"%matching[0])Running the above code would output:#JSGF V1.0;
grammar default;
public <hello> = hello world;

Matching: PublicRule(name='hello', expansion=Literal('hello world'))The first line of the grammar can be changed using thejsgf_version,charset_name, andlanguage_namemembers of theGrammarclass.There are some usage examples inpyjsgf/exampleswhich may help you get started.Multilingual supportDue to Python’s Unicode support, pyjsgf can be used with Unicode
characters for grammar, import and rule names, as well as rule literals.
If you need this, it is better to use Python 3 or above where all
strings are Unicode strings by default.If you must use Python 2.x, you’ll need to define Unicode strings as
eitheru"text"orunicode(text, encoding), which is a little
cumbersome. If you want to define Unicode strings in a source code file,
you’ll need to define thesource code file
encoding.
Package: pyjslint
JSLint wrapper for Python. Can be invoked from the command line and any Python
code.It is built on the power of NodeJS.DependenciesIt only depends onnodejs. You must have node on your
system for running this wrapper.It runs just fine with the0.4.12 version, but it may work too with other
versions.There is no need to download JSLint, it will be fetched for your convinience.
But, if you want to use your own JSLint file you can specify it with an option,
just make it sure it is prepared to be executed on nodejs.InstallationIt isuploaded to PyPIso this will
do the trick:easy_install pyjslintOr you can install it from the source code running:python setup.py installIn both cases you must have installed in your system setuptools or distribute.Use it from the command lineIf you call the wrapper without arguments this will be the output:$ pyjslint
One JavaScript file must be specified
Usage: pyjslint [options] jsfileSo at least one JavaScript file must be specified.Let’s look at the possible options:$ pyjslint --help
Usage: pyjslint [options] jsfile

Options:
    -h, --help              show this help message and exit
    -u, --upgrade           Upgrade JSLint
    -j JSLINT, --jslint=JSLINT
                            JSLint location
    -o JSOPTIONS, --options=JSOPTIONS
                            JSLint options
    -n NODE, --node=NODE  Node locationWith this options you can specify the JSLint file to use, where to find the
node executable or just make it sure it downloads the newest JSLint available.Use it from PythonIf you want to use in your Python code, maybe in a control version system hook
or something, just make it sure it is in the Python path and do something like
this:import pyjslint

# The method requires the text content of the file to check
pyjslint.check_JSLint(file.read())It will return a list with the errors found by JSLint.There is no way to specify options yet if you invoke it this way. Maybe
someday, contributions are welcome ;)AcknowledgesBased oncode from FND.NotesIf no JSLint file is specified (the default behaviour), it will download the
newest one fromDouglas GitHubinto ~/.jslint/jslint.js
Package: pyjsmn
Aboutpyjsmn is a wrapper forJSMN(minimalistic JSON parser).
pyjsmn is not support encoding method(obj->str).Installationfrom pip:$ pip install pyjsmnfrom easy_install:easy_install -ZU pyjsmnRequirementsPython2.7.Usagebasic usage:>>> import pyjsmn
>>> pyjsmn.loads('[1, 2, {"test": "hoge"}]')
>>> [1, 2, {"test": "hoge"}]LinksPyPIGitHubTravis-CI
Package: pyjson5
A JSON5 serializer and parser library for Python 3 written inCython.SerializerThe serializer returns ASCII data that can safely be used in an HTML template.
Apostrophes, ampersands, greater-than, and less-then signs are encoded as
unicode escaped sequences. E.g. this snippet is safe for any and all input:"<aonclick='alert(" + encode(data) + ")'>show message</a>"Unless the input contains infinite or NaN values, the result will be validJSONdata.ParserAll validJSON5 1.0.0andJSONdata can be read,
unless the nesting level is absurdly high.FunctionsYou can find the full documentation online athttps://pyjson5.readthedocs.io/en/latest/.
Or simply callhelp(pyjson5). :-)The library supplies load(s) and dump(s) functions, so you can use it as a
drop-in replacement for Python’s builtinjsonmodule, but youshoulduse the functionsencode_*()anddecode_*()instead.CompatibilityAt least CPython 3.5 or a recent Pypy3 version is needed.
Package: pyjson5x
This package is the same as pyjson5, but this library does some crude decoding.interprets True and False as booleans.strive to properly handle unclosed brackets.For more information, see the source repository.https://github.com/Kijewski/pyjson5A JSON5 serializer and parser library for Python 3 written inCython.SerializerThe serializer returns ASCII data that can safely be used in an HTML template.
Apostrophes, ampersands, greater-than, and less-then signs are encoded as
unicode escaped sequences. E.g. this snippet is safe for any and all input:"<aonclick='alert(" + encode(data) + ")'>show message</a>"Unless the input contains infinite or NaN values, the result will be validJSONdata.ParserAll validJSON5 1.0.0andJSONdata can be read,
unless the nesting level is absurdly high.FunctionsYou can find the full documentation online athttps://pyjson5.readthedocs.io/en/latest/.
Or simply callhelp(pyjson5x). :-)The library supplies load(s) and dump(s) functions, so you can use it as a
drop-in replacement for Python’s builtinjsonmodule, but youshoulduse the functionsencode_*()anddecode_*()instead.CompatibilityAt least CPython 3.5 or a recent Pypy3 version is needed.
Package: py-jsonapi
>> This library is no longer maintained.<<Traffic indicates not a large user base and I don’t use this library myself
anymore. If you want to use it in the future, then you should maintain your
own fork. I will removepy-jsonapifrom PyPi and GitHub at 1.1.2019.This library is a toolkit for building ahttp://jsonapi.org/compliant API. It
has built in support for many web frameworks and database drivers:flasktornadosqlalchemymongoenginemotorengineFurthermore, it can be extended to work withall web frameworks and database
engines.But that’s not all: We supportblocking and asynchronouscode.DocsCheck out the docs for a full introduction athttps://py-jsonapi.readthedocs.org.LicenseThis library is licensed under theMIT License.Contributions and questionsContributions are always welcome. If you have a question, don’t hesitate to
open a new issue.Version numbersWe will use semantic version numbers, starting with the first release.
Package: pyjsonata
Python bindings forJSONata.Usagefrompyjsonataimportjsonatamy_expression="$"my_json="{'foo': 'bar'}"# "{'foo': 'bar'}"result=jsonata(my_expression,my_json)With exception handling:frompyjsonataimportjsonata,PyjsonataErrormy_expression="$"my_json="{'foo': 'bar'}"try:# "{'foo': 'bar'}"result=jsonata(my_expression,my_json)exceptPyjsonataErrorase:print("Error: ",e)That’s it! Return values are always strings.AboutThereference implementationfor
JSONata is written in JavaScript. I have aseparate librarythat makes this accessible from C viaDuktape. This is a Python wrapper that calls into
that library using Python’s built-inctypeslibrary, which should be
portable to most Python interpreters.At first I tried usingpy_mini_racerto run the JSONata library, but that package is around 40mb because it ships
the complete V8 JavaScript runtime. In contrast this library is about 650k.Building PackagesSourceSource packages are currently broken until I can be bothered to rewritejsonata-c’s Makefile in Python, as required bysetuptools.🖕setuptools.Wheelspyjsonatacan be built to themanylinux2014standard. There is no
Windows support at this time.The standard way to buildmanylinux2014compatible extensions is with a
bunch of Centos 7 Docker containers. The idea is that by linking against Centos
7 libc, the resultant binaries will be “portable enough” to modern systems. You
don’t have to use these, but it’s not a bad idea.Without DockerInstallgcc,patchelfandmakefrom your distro repositoryInstall Python build deps:python3 -m pip install setuptools wheel auditwheelTo build:git submodule update --init --recursive
python3 -m setup.py bdist_wheel
cd dist && auditwheel repair ./*.whl
mv wheelhouse/*.whl .This will make youmanylinux2014wheels. These wheels are tagged to your
specific Python version and ABI, likecp37-cp37m, but in reality, they
should bepy3-none. I can’t figure out how to makesetuptoolsunderstand that. I think you can safely manually re-tag these by unzipping the
wheel, editing the metadata in theWHEELfile, rezipping it, and changing
the tag in the filename, but I haven’t yet tested whether that yields the
desired results.However, the arch tag, e.g.x86_64,aarch64,armv7letc, is
necessary.With Docker./build.sh <arch>archmust be one of the architectures for whichmanylinux2014build
containers are provided. For example, if you are building onaarch64:./build.sh aarch64This will download the appropriate container and run the build. Built wheels
are in thedistdirectory.If you are me:python3 -m twine upload --repository-url https://upload.pypi.org/legacy/ dist/*manylinux2014_*.whlTestingPytestFrom the repository root:python3 -m pip install pytest
python3 -m pytest