Saravanan666/pypi-org huggingface dataset:
Package: ox_herd
IntroductionThe ox_herd package is a python system for job scheduling and
management based on thepython-rqpackage.The main goal of ox_herd is to make it easy to schedule, inspect, and
administrate automated jobs including:Running tests viapytestFor example, you can use ox_herd as a simple, lightweight,dockerized continuous integration
server.Runningpylinton your code.Running arbitrary python scripts.ComparisonsSome other alternatives for python include Celery and python rq while
more general solutions include things like Jenkins. The ox_herd package
is intended to be lightweight as compared to something more full
featured and sophisticated like Celery. It is based on and built on top
of python rq so it is a little more heavyweight than rq. Ideally, it
provides the minimal set of features and frameworks on top of rq for web
based task monitoring, customization, and analysis for your rq tasks.DocumentationSee the fulldocumentation on
githubfor further details or see theox_herd_examplepackage on github for a simple demo illustrating what you can do withox_herd.
Package: oxide
OxideA Python HTTP server in RustExampleimportoxideimportasyncioserver=oxide.Server()classEcho(oxide.Route):asyncdefsetup(self):passasyncdefget(self,param:str):returnoxide.Response(body=param,status=200)server.add_route('/echo/:param',Echo)asyncdefmain():awaitserver.start("127.0.0.1:8001")asyncio.run(main())
Package: oxide-re
Oxide is a flexible, modular, distributed framework for performing analysis of
executable code. It separates the user interface components from the storage
components and from the analysis components. The system is designed such that a
module writer who is a domain expert in the specific area of the module does not
need much knowledge of the rest of the system. The same modules work no matter
how or where the data is stored or what sort of interface the user is seeing.DecodersHow to get Capstone to workCapstone is an open-source, multi-platform, multi-architecture decoder.Installation is accomplished through pippip install capstoneHow to get XED to workXED is intel's reference x86 instruction decoder.XED has python bindings mantained here:
*https://github.com/huku-/pyxedpython3 setup.py build
python3 setup.py install

python3
>>> import pyxedDisassemblersHow to get Ghidra to workGhidra is an open-source software RE tool designed to disassemble many different architectures and extensible through tweaking or creating sleigh files that define ABI of architecture.https://github.com/NationalSecurityAgency/ghidra/releasesGhidra runs in Java and requires Java JDK 11,https://jdk.java.net/How to get IDA to workIDAPro is one of the most prevalent disassemblers, with the Hex-Rays decompilers on the
market. Once purchased the IDAPATH must be set in the configuration file.How to get Radare2Radare is a command line software reverse engineering tool, with capstone backend.Installation is accomplished through running install script from within the radare directory. Furthermore, a python interface is required.https://github.com/radareorg/radare2./sys/install.sh
pip3 install r2pipeHow to get Pharos to workPharos is a front end for the ROSE Compiler, from Lawrence Livermore National Labratory,
which configures the callbacks to get information out. Pharos is a suite of utilities
built on this such as disassembly and OOAnalyzer.Assuming docker is configured and installed. The easiest interface is the pre-built docker image.docker pull seipharos/pharos....How to get angr to workangr is a symbolic execution and program analysis open source project from UCSB under Vigna and Kruegel.pip3 install angrHow to get Capa to workCapa is an open source tool used to analyze executable files and provide a list of capabilities.$ pip install flare-capaHow to get Binary Ninja to workBinary Ninja is an interactive disassembler, decompiler, and reverse engineering platform created by Vector35 (former Raytheon/SI Gov).This requires a commercial license or headless license of binary ninja.python3 <binary ninja home>/scripts/install_api.pyMiscellaneous Packages in Modules/Pluginspip3 installTermcolorNetworkxnumpygraphvizpydotmatplotlibIf you are usingMacOS, you will need to install GNU objdump.
With Brew,brew install binutilsand symlinkgobjdumpto/usr/local/bin/gobjdumpIf you are usinglinuxand want to print a call graph, you may need to install 'python3-tk'
.....Remote ShellLaunch a server like:Python3 utils/server.py -l 127.0.0.1:1492Then, in another shell connect with:Python3 rshell.py -r 127.0.0.1:1492
Package: oxidized-importer
# Oxidized Importeroxidized-importeris a Rust crate that produces a Python extension
module for theoxidized_importerPython module. This module provides
a Pythonmeta path finderthat can load Python resources from a pre-built
index, including loading resources from memory. It also exposes functionality
for scanning the filesystem for Python resources, loading those resources
into the custommeta path finder, and serializing indexed data into a
binary data structure that can be used for quickly loading an index of
available Python resources.This project is part of the
[PyOxidizer](https://github.com/indygreg/PyOxidizer) project. For more,
see the documentation in thedocs/directory, rendered online athttps://pyoxidizer.readthedocs.io/en/latest/oxidized_importer.html.
Package: oximachine-featurizer
oximachine_featurizerMine oxidation states for structures from the (MOF) subset of the CSD and calculate features for them. Runscripts are automatically installed for the most important steps. Some of these runscripts contain hard coded paths, that would need to be updated.
This code generates inputs that can be used with thelearnmofox packageto replicate our work [1].If you're just interested in using a pre-trained model, theoximachinerunnerpackage.⚠️Warning: For the mining of the oxidation states, you need the CSD Python API.
You need to export theCSD_HOMEpath. Due to the licensing issues, this cannot be done automatically.InstallationThe commands below automatically install several command-line tools (CLI) which are detailed below.The full process should take some seconds.Latest versionTo install the latest version of the software with all dependencies, you can usepipinstallgit+https://github.com/kjappelbaum/oximachine_featurizer.gitStable releasepipinstalloximachine_featurizerHow to use itTo run the default featurization on one structure you can use the CLIrun_featurization<structure><outdir>for each metal center this should take seconds if there is no disorder.Some output can be found on theMaterialsCloud Archive (doi: 10.24435/materialscloud:2019.0085/v1 ).More details can be found in thedocumentation.Example usageThe use of the main functions of this package is shown in the Jupyter Notebook in the example directory.
It contains some example structures and the output, which should be produces in seconds.Testing the installationFor testing, you can---as it is done for the continuous integration (CI)---usepytestand run the files in thetestdirectory. For examplepip install pytest
pytest test/mainReferences[1] Jablonka, Kevin Maik; Ongari, Daniele; Moosavi, Seyed Mohamad; Smit, Berend (2020): Using Collective Knowledge to Assign Oxidation States. ChemRxiv. Preprint.https://doi.org/10.26434/chemrxiv.11604129.v1
Package: oximachinerunner
oximachinerunnerInstallationOn macOS you need to runbrew install libompfirst to enable multithreading for theXGBoostlibrary.Ideally, you install everything in a clean environment, e.g., using condacondacreate-ntest_oximachine_runnerpython=3.7-yThen activate withconda activate test_oximachine_runner.Latest stable releasepipinstalloximachinerunnerNote that the installation requires significant (>500 MB) storage space since the ensembles use k-nearest neighbors models.Development versionpipinstallgit+https://github.com/kjappelbaum/oximachinerunner.gitUsageLoading the modelfromoximachinerunnerimportOximachineRunnerrunner=OximachineRunner()TheOximachineRunnercan be initialized with a modelname fromrunner.available_models.By default, models will be automatically downloaded (upon first use) if there are not yet in the correct folder:/Users/kevinmaikjablonka/opt/miniconda3/envs/test_oximachine_runner/lib/python3.7/site-packages/oximachinerunner/assets/all_202000830/classifier.joblib are not exist or md5 is wrong.
Download file from https://www.dropbox.com/s/lc2z4abaycjbbe1/classifier.joblib?dl=1
2.9% of 527.44MTo disable this behavior of, setOximachineRunner(automatic_download=False)and manually download your model, e.g. using a function from theutilsmodule.Predicting oxidation statesTherun_oximachinefunction acceptspymatgen.Structure,ase.Atomsandstras well asos.PathLike.
The latter two are expected to be paths to a file that is then parsed withpymatgen.runner.run_oximachine('oximachinerunner/assets/ACODAA.cif')The function prints for how many sites it will run the model.featurize.py: iterating over 6 metal sitesIt returns anOrderedDictwith the fields:metal_indices: A list of indices of the metal sitesmetal_symbols: A list of symbols of the metal atomsprediction: A list of oxidation state predictionsmax_probabs: For each metal site the maximum confidence of all 4 models.base_predictions: For each metal site a list of the oxidation state predictions for each of the 4 models.Development setupgit clone https://github.com/kjappelbaum/oximachinerunner
pip install -e .[dev]ReferenceJablonka, Kevin Maik; Ongari, Daniele; Moosavi, Seyed Mohamad; Smit, Berend (2020): Using Collective Knowledge to Assign Oxidation States. ChemRxiv. Preprint.https://doi.org/10.26434/chemrxiv.11604129.v1
Package: oxionics-qiskit-provider
OxIonics Qiskit ProviderA provider and backend for Qiskit, which executes quantum circuits on the
Oxford Ionics ion traps.UsageUnlike with most Qiskit backends, the Oxford Ionics backend doesn't require that
the circuit has been transpiled before being passed toOxIonicsBackend.run.
This is because the OxIonics API accepts arbitrary QASM.Create a backendAn authentication token is required:fromoxionics_qiskit_providerimportOxIonicsProviderprovider=OxIonicsProvider("my_token")backend=provider.get_backend()Run circuits on the backendfromqiskit.circuit.randomimportrandom_circuitqx=random_circuit(1,3)job=backend.run(qx)results=job.results()
Package: oxlab
Theoxlabpackage provides tools for Google Colab and Jupyter
notebooks.Sometimes you want to be able to use or distribute private GitHub repos
in Jupyter notebooks that people may run on their local systems or in
Google Colab. This project provides a simple way to accomplish that
goal.Imagine you have an example notebook calledoxlab_demo.ipynband you
want to have it reference a private GitHub repo for your project.You can take the following steps:Generate an SSH deploy key for your project via something like:ssh-keygen-tecdsa-f/tmp/example_deploy_key_id_ecdsaUpload the public key (which is saved at/tmp/example_deploy_key_id_ecdsa.pubif you used the above
command) to GitHub as discussed in theinstructions on deploy
keys.Create a cell in your notebook like the following where you replace$YOUR_PRIVATE_KEYwith your ssh deploy key generated in step 1
(e.g., the contents of/tmp/example_deploy_key_id_ecdsa), replace$OWNERwith the owner of your GitHub repo (e.g.,emin63) and$REPOwith your repo (e.g.,oxlab):# @title Pull in our private github repo
SSH_DEPLOY_KEY = $YOUR_PRIVATE_KEY
!pip install oxlab
from oxlab import github
oxlab.add_github_repo($OWNER, $REPO, SSH_DEPLOY_KEY)Then the rest of your notebook will be able to do something likeimport $REPOand reference your private GitHub code.See theoxlab_demo.ipynb
notebookfor an example.
Package: oxlang
ox: the ox programming language 🐂ox is a intepreted, dynamic programming language inspired byCub(no relation to the2011one.)
Its syntax borrows heavily from Cub itself andgolang.Since ox keeps most of Cub's semantics, existing Cub code should run in ox without any changes (backward-compatible).ox is not meant to be a production language: rather as an experiment in implementing a programming language entirely in Python.Why the name ox?Because the zodiac animal this year is Ox, and to go along with the animal-themed names.What itcando:Full Cub syntax support (except fordoandrepeat whileloops).Import modules (you can import math functions usingimport math)What itcannotdo:Recursive functions (because of Python stack limitations).
Maybe it would be a better idea to compile Ox code down into [Scorpion] bytecode and run it in an intepreter instead.Struct methods (for now).Todofinish full parser (rewrote using sly)code working intepreteradd module system (puts all functions in global context though)add ability to interface Python modulesExamples// ox is kind of like untyped Swift (which is also what Cub was aiming for).// Currently, these primitive types are supported:// Strings (to have double quotes in a string, use single quotes, and vice versa.)// Of course, UTF-8 is supported.my_var="Hello World!"// Numbers are all floating-point as in Cub.// Like Python, variables do not have a fixed type, and can be reassigned.// (The '.0' can be omitted.)my_var=42// Booleans can either be true or false.// Comparisons will return a boolean.a_bool=trueis_the_answer_to_life_and_everything=my_var>=42// Arrays are analogous to lists.// To append, use '+='.an_array=[4,2,0]an_array+=1// Functions define an operation so you don't have to keep copying and pasting the same section of code.funcpi(){return3.141592}// Structs are similar to C structs.// Members are defined inside its context.structPoint{x,y}// A struct method (shown below) accepts a instance of the struct, plus any other parameter.// The first arg should be named self, but you can name it something else.funcPoint:distance(self){return(self.x^2)+(self.y^2)}// Like Lua, static methods (on a uninitalised struct) use '.',// while instance methods (on a initalised struct) use ':'.// Static methods do not receive the 'self' parameter.funcPoint.new_square(length){returnPoint(length,length)}point=Point(0,0)square_point=Point.new_square(10)// Structs can inherit members and methods from other structs.// New members can be defined on top of the inherited struct's definition.structRelativePoint(Point){cx,cy,}funcRelativePoint:rel_distance(self){return(abs(self.cx-self.x)^2)+(abs(self.cy-self.y)^2)}
Package: oxlate
late-pythonA Python package with OpenStax Lambda@Edge ("lAMBDA at eDGE") utilities.Overviewlate-pythonprovides object overlays
to the JSON containers
inside Lambda@Edge events and responses.
These overlay objects handle the details
of accessing and modifying
the containers they overlay.Allget_*methods
leave the underlying container intact,
and allset_*methods
modify it in place.UsageDealing With Request EventsfromoxlateimportEvent,Responsedeflambda_handler(event,context):request=Event(event).request()## returns Request overlay## get and set the request uri fieldrequest.get_uri()request.set_uri('/some/new/uri')## get the viewer's country coderequest.get_viewer_country()## return Headers overlayheaders=request.get_headers()## get the Request event header array-of-hash (or None if missing):##    [{name=..., value=...}]headers.get(name='header-name')## get the header value only## (or None if missing and no default given)headers.get_value(name='header-name',default='some default')## set or overwrite a headerheaders.set(name='header-name',value='some value',)## get a request cookie value## (or None if missing and no default given)headers.get_request_cookie('cookie_name',default='some default')## set or overwrite a request cookie valueheaders.set_request_cookie('cookie_name',value='some value')## return a deep copy of the overlaid hashmapreturnrequest.to_dict()Dealing With Response ObjectsfromoxlateimportResponsedefrequest_handler(event,context):## construct a Response objectresponse=Response(status=302,content_type='text/plain',body=None,)## use method chaining to tweak Responseresponse.set_status(404)\.set_content_type('custom/type')\.set_content_type_json()\.set_content_type_html()\.set_body(json.dumps('some body text'))## get a Headers overlayheaders=response.get_headers()## get the header value only## (or None if missing and no default given)headers.get_value(name='header-name',default='some default')## set or overwrite a headerheaders.set(name='header-name',value='some value',)## get a ResponseCookie overlaycookie=headers.get_response_cookie('cookie-name')print(cookie.name())print(cookie.value())print(cookie.expires_at())print(cookie.path())print(cookie.domain())## set or override a ResponseCookiecookie=ResponseCookie(name='cookie-name',value='some value',expires_at=datetime.datetime.utcnow()+datetime.timedelta(days=2),path='/',domain='my.domain.com',)headers.set_response_cookie(cookie)returnresponse.to_dict()DevelopmentAll development is done inside a docker container.  From your host running Docker, in this directory run:$> docker-compose up -d
%> ./docker/bashThis will drop you into the running containerRun testsFrom within the container, you can run tests with:$ /code> python -m pytestFor debugging, you can useipdb, e.g.import ipdb; ipdb.set_trace()When running tests with the debugger make sure to use the-soption to prevent pytest from capturing output.$> python -m pytest -s tests -k 'test_decrypts'Note thatpytestis also on thePATHso you can call it directly.Distributing...
Package: oxley
Oxley: Pydantic classes from JSON schemaOxleygeneratesPydanticclasses at runtime from user-provided JSON schema documents. Heavily indebted to packages likePython-JSONschema-Objects, Oxley enables data validation pipelines to function dynamically, and with the help of Pydantic, interface directly with popular web frameworks such asFastAPIandStarlite.Quick startInstall from PIP:python3-mpipinstalloxleyGiven a simple JSONschema document:{"$id":"https://github.com/jsstevenson/oxley","$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","$defs":{"User":{"type":"object","properties":{"username":{"type":"string"},"user_id":{"type":"number"}},"required":["username","user_id"]},"Post":{"type":"object","properties":{"author":{"$ref":"#/$defs/User"},"content":{"type":"string"},"allow_responses":{"type":"boolean"}},"required":["author","content"]}}}Provide a schema and construct classes:fromoxleyimportClassBuilderschema_path="path/to/my_jsonschema_document.json"cb=ClassBuilder(schema_path)User,Post=cb.build_classes()The resulting objects are functioning Pydantic classes, providing features like runtime data validation and matching schema output.dril=User(username="dril",user_id=99)post=Post(author=dril,content="should i learn Letters first?  or choose the path of Numbers? a queston every baby must ask it self")another_post=Post(author=dril)# raises pydantic.ValidationErrorDevelopmentClone and install dev and test dependencies:gitclonehttps://github.com/jsstevenson/oxleycdoxley# make virtual environment of your choosingpython3-mpipinstall".[dev,test]"Install pre-commit hooks:pre-commitinstallRun tests with tox:toxMIT LicenseCopyright (c) 2022 James StevensonPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: ox_log
IntroductionTheox_logpython package is used to do some very simple,
lightweight log analysis (especially in the flask web framework).If you want to do something complicated, there are lots and lots of log
parsing, sending, and visualization tools. Unfortunately, some of those
systems take some time to understand and setup.If you just want a very simple, easy to setup system to show some
information from your logs, thenox_logis for you!QuickstartFirst installox_logusing something likepip install ox_logor
however you typically install python packages.with flaskIf you are using flask, you can addox_logto your project simply by
creating an instance of theox_logblueprint and registering. For
example, you could do something likefromox_log.ui.flask_web_ui.ox_logimportviewsasox_log_viewsfromimportox_log.coreimportloaderox_log_views.register(APP,readers={'pickle_reader':loader.PickleReader,'file_reader':loader.FileReader},topics={'/tmp/log_items.pkl':'pickle_reader','/tmp/log.txt':'file_reader'}The first line will import theox_logviews so routes will be
registered correctly. The second line imports the loader. The final line
registers theox_logblueprint and defines a couple of readers to
read pickled data and text log files along with some specific topics.
TheAPPvariable is the flask app.With the configuration above, you can point your browser to/ox_logafter starting your flask app and refresh your data, view your logs, add
or drop topics and so on.
Package: oxmenu
0xMenuA Handy Package to Create 3 Different types of Menus : ArrowKeyMenu will allow you to create interactive menus using the keyboard arrow key or vim j/k, NumberMenu will create simple menus where the user have to type the index, and finally CheckBox will allow you to create multiple choice menuInstallation :From pip :pip3installoxmenuFrom source :gitclonehttps://github.com/0x68616469/oxmenu/Requirements :oxansi(downloaded automatically with pip)Example :ArrowKeyMenu :fromoxmenuimportArrowKeyMenumenu=ArrowKeyMenu(title="My Menu",subtitle="My Subtitle")menu.add("One")menu.add("Two")menu.add("Three")menu.add("Four")selected=menu.select()print(f"Selected :{selected}")Result :NumberMenu :fromoxmenuimportNumberMenumenu=NumberMenu(title="My Menu",subtitle="My Subtitle",input_message="Please choose an option : ")menu.add("One")menu.add("Two")menu.add("Three")menu.add("Four")selected=menu.select()print(f"Selected :{selected}")Result :CheckBox :fromoxmenuimportCheckBoxmenu=CheckBox(title="My Menu",subtitle="My Subtitle",min_options=1,max_options=2)menu.add("One")# You can add default=Truemenu.add("Two")menu.add("Three")menu.add("Four")selected=menu.select()print(f"Selected :{selected}")Result :
Package: oxo
📦 setup.py (for humans)This repo exists to providean example setup.pyfile, that can be used
to bootstrap your next Python project. It includes some advanced
patterns and best practices forsetup.py, as well as some
commented–out nice–to–haves.For example, thissetup.pyprovides a$ python setup.py uploadcommand, which creates auniversal wheel(andsdist) and uploads
your package toPyPiusingTwine, without the need for an annoyingsetup.cfgfile. It also creates/uploads a new git tag, automatically.In short,setup.pyfiles can be daunting to approach, when first
starting out — even Guido has been heard saying, "everyone cargo cults
thems". It's true — so, I want this repo to be the best place to
copy–paste from :)Check out the example!Installationcdyour_project# Download the setup.py file:#  download with wgetwgethttps://raw.githubusercontent.com/navdeep-G/setup.py/master/setup.py-Osetup.py#  download with curlcurl-Ohttps://raw.githubusercontent.com/navdeep-G/setup.py/master/setup.pyTo DoTests via$ setup.py test(if it's concise).Pull requests are encouraged!More ResourcesWhat is setup.py?on Stack OverflowOfficial Python Packaging User GuideThe Hitchhiker's Guide to PackagingCookiecutter template for a Python packageLicenseThis is free and unencumbered software released into the public domain.Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any means.