Saravanan666/pypi-org huggingface dataset:
Package: pyopt-tools
Pyopt-toolsPyOpt-tools contains a set of mirco function most of these functions are easy butmost of usdon't want to waste time searching for "how to reverse a string in python" or "how to sort a list by type in python" but as you're here I am assuming you fall into "most of us" category.You may find some function useful for you, but you may also find some of them useless. because there just way too small and you can write them anytime but It's not about the functions' complexity. it's about knowing how to do it. most of us don't want to spend time finding functions like this just to prototype a project or just to test a function.Full DocumentationWhat kind of functions?Functions are separated into different files. there are currentlystring_tools, math_tools, list_toolsand alsopyvecpyvec contains vector 2 and 3 class that has some useful vector maths for game development. or you can use it to do normal stuff (not that game development isn't normal just saying)Every function has proper documentation and comments with examples. But I also included all the functions inexamplefile. Which will be updated as I add more functions.Some Functions it includesfrompyopt_toolsimportlistoolsfrompyopt_toolsimportstring_toolsfrompyopt_toolsimportmath_toolsfrompyopt_tools.pyvecimportVec2,Vec3frompyopt_toolsimportfile_tools## string toolsprint("Split str",string_tools.split_str("Hello World",2))print("Randomize String",string_tools.randomize_string("Hello world"))print("encodeMorse",string_tools.encodeMorse("Hello world"))print("decodeMorse",string_tools.decodeMorse(".... . .-.. .-.. ---   .-- --- .-. .-.. -.."))print("to_binary",string_tools.to_binary("Hello"))print("bin_to_text",string_tools.bin_to_text("1001000 1100101 1101100 1101100 1101111"))# only works with spacesprint("Reverse String",string_tools.reverse_string("Hello world"))## math toolsprint("reverse_int",math_tools.reverse_int(123))print("persistence",math_tools.persistence(1234))print("is_square",math_tools.is_square(6))print("is_pentagonal",math_tools.is_pentagonal(6))print("is_hexagonal",math_tools.is_hexagonal(5))print("lerp",math_tools.lerp(0,10,0.5))print("clamp",math_tools.clamp(0,10,-1))# pyvec # Vec2 and Vec3 contains all same functionsprint("Vec2",Vec2(1,2))print("Vec3",Vec3(1,2,3))print("Vec2.dot",Vec2(1,2).dot(Vec2(3,4)))print("Vec3.cross",Vec3.cross(Vec3(1,2,3),Vec3(3,4,5)))# static method## list toolstest_list=[2,"hello",1,3,3,3,3,3,3,4,4,3,3,3,3,3,3,3,"hello"]print("listools.remove_duplicates",listools.remove_duplicates(test_list))print("listools.remove_duplicates_sort",listools.remove_duplicates_sort(test_list))print("listools.sort_list",listools.sort_list([2,3,2,1,"string1","string2","string3",3.3,2.2],(str,int,float),sort_elements=True))# sort list by types and in which order also option to sort each element in the list# find string in multiple files in the given folderresult=file_tools.find_in_files("F:/Important Folder/","test string",["py","cup","txt"])forresinresult:filename,line,string=resprint("file_tools.find_in_files",repr(filename),line,repr(string))Check outdocumentationfor more information
Package: pyora
pyoraA pure python package to read and write OpenRaster (.ora) files; a layered raster graphic format specifically intended for cross-program interchange.Please seehttps://openraster.orgfor more information about this specificaction.Documentation here:https://pyora.readthedocs.ioPlease feel free to ask questions or report bugs and I will do my best to get back to you as soon as I am able. ^_^
Package: pyoracc
pyoraccPython tools for working with ORACC/C-ATF filesDepends on PLY, Mako and PytestInstallationIf you don't usepip, you're missing out.
Here areinstallation instructions.Simply run:$cdpyoracc$gitpulloriginmaster$pipinstall.Or you can just do$ pip install git+git://github.com/cdli-gh/pyoracc.gitOr you can also do$ pip install git+https://github.com/cdli-gh/pyoracc.gitUpgradingIf you already have installed it and want to upgrade the tool:$cdpyoracc$gitpulloriginmaster$pipinstall.--upgradeOr you can just do$ pip install git+git://github.com/cdli-gh/pyoracc.git --upgradeOr you can also do$ pip install git+https://github.com/cdli-gh/pyoracc.git --upgradeUsageTo use it:$ pyoracc --help*Only files with the .atf extension can be processed.  *To run it on file:$ pyoracc -i ./pyoracc/test/data/cdli_atf_20180104.atf -f cdliFor a fresh copy of CDLI ATF, download the data bundle here :https://github.com/cdli-gh/data/blob/master/cdliatf_unblocked.atfTo run it on oracc file:$ pyoracc -i ./pyoracc/test/data/cdli_atf_20180104.atf -f oraccTo run it on folder:$ pyoracc -i ./pyoracc/test/data -f cdliTo see the console messages of the tool, use --verbose switch$ pyoracc -i ./pyoracc/test/data -f cdli --verboseNote that using the verbose option will also create a parselog.txt file,
containing the log output along with displaying it on command line.
The verbose output contains the lexical symbols, the parse grammer table
and the LR parsing table states.Also note that, first time usage with any atf format will always display
the parse tables irrespective of verbose switch.If you don't give arguments, it will prompt for the path and atf file type.Help$pyoracc--help
Usage:pyoracc[OPTIONS]MyTooldoesonework,andoneworkwell.

Options:-i,--input_pathPATHInputthefile/foldername.[required]-f,--atf_type[cdli|atf]Inputtheatffiletype.[required]-v,--verboseEnablesverbosemode--versionShowtheversionandexit.--helpShowthismessageandexit.Internal Dev UsageDevelopment GuidelineORACC atf based changes will go in pyoracc/atf/oraccCDLI atf based changes will go in pyoracc/atf/cdliCommon atf based changes will go in pyoracc/atf/commonTo run on directory$ python  -m pyoracc.model.corpus ./pyoracc/test/data  cdliTo run on individual file$ python -m pyoracc.atf.common.atffile ./pyoracc/test/data/cdli_atf_20180104.atf cdli TrueRunning TestsBefore running pytest and coverage, installpy.testandpytest-cov.$ py.test --cov=pyoracc --cov-report xml --cov-report html --cov-report annotate --runslowBefore running pycodestyle, installpycodestyle.$ pycodestyleAPI Consumptionfrompyoracc.atf.common.atffileimportfile_processfile_process(pathname,atftype,verbose)
Package: py-oracle-cpq-ui-automation
Oracle CPQ UI AutomationSelenium based automation bot to do routine and time consuming tasks on Oracle CPQ Cloud application.Pre-requisitesChrome Browser should be installedSupports Python >= 3.9CPQ account should have admin access with proxy login optionInstallationpip install py-oracle-cpq-ui-automationUsageJust typeimport oracle_cpq_ui_automationin the module you want to use Oracle CPQ UI Automation.Exampleimport oracle_cpq_ui_automation

#Initialise the automation class with SiteName, username, password
main = oracle_cpq_ui_automation("<cpqInstanceName>","<userName>","<password>") 

#It will autolaunch the Chromedriver browser

#Login into the CPQ Site
main.login()Automation Functions1) Partner Orgs: Create GroupsNavigate to Partner Orgs page and check if the given groups exists in the partner org, else it will create the groupInputs:groupsToCreate = [ [<groupName | string>, <groupVarName | string>, <addAllUsersToGroup | boolean> ] ]exceptionListOfCompanies = []noOfPagesToSkip = -1Code:main.createGroupsinPartnerOrg(
    [["<groupName>","<groupVar",True]], #groupsToCreate #2D Array of mixed datatype
    [], #exceptionListOfCompanies = [] #Array of strings
    -1 #noOfPagesToSkip = -1
)2) Extract and Save BML Libraries as Text files.Navigates to Util library page and save all the util libraries as text fileInputs:skipLibraries = 0 #Skip no.of.libraries to saveCode:main.extractBmlLibrary(skipLibraries=0)Output:The output folder will be created and files will be saved locally in the below pathD:\
   > <cpqInstanceName
      > BML Library
          > library1.txt
            library2.txtBot FeaturesAutomation Bot will automatically download the compatible chrome driver version based on your installed browser.Automations are UI-based so users can monitor, if any unexpected behaviour occurs then can close the automation to avoid problems.Authors & ContributorsArun Kumar (arunkumar.js25@gmail.com)
Package: pyoracle-forms
pyoracle_formsWraps the Oracle Forms API under Python, so that you can write scripts to
make programmatic changes to Oracle Forms .fmb files with ease.Installation and usageInstallationThe package can be installed from PyPI withpip installpyoracle-formsUsagefrompyoracle_formsimportModule,initialize_contextinitialize_context(version="12c",encoding="utf-8")withModule.load("./your_form.fmb")asmodule:fordata_blockinmodule.data_blocks:foritemindata_block.items:item.font_name="Comic Sans MS"module.save()Best used with an interactive environment, such as Jupyter Notebook, as you get better autocomplete
there due to attributes getting determined dynamically.You also need access to successfully installed version of Oracle Forms, otherwise the scripts won’t work,
as this solution depends on the Oracle Forms API.DocumentationMore detailed documentation is available onRead the Docs
Package: pyOrbitenc
PyOrbitenc is powerfull Python script encoderNotice:
-------

Pypi deleted my old package named 'pyNebula'. Now I re-upload my PIP by named: 'pyOrbitenc'Feature:
--------

1. It has 3 layer encryption system
2. It don’t have any decryption system
3. You can execute your encrypted code directly
    without decryptionInstallation:
------------

[+] Install using pip

$ pip install pyOrbitencUses:
-----

[+] You can encode your code by using "encode" function.

[=] Example:

import pyOrbitenc

encode = pyOrbitenc.encode("Hello World")

print(encode)


[+] You can execute your encoded code by using "execute" function. 

[=] Example:

import pyOrbitenc

pyOrbitenc.execute("jCf2nnn8xkf2lkm1nnmvbO8txkf2dymtgfGd23122c83gfc22fc") 


[+] Explain:
------------

The "encode" function give you everithing you need to  execute your encrypted code. Like:

try:    import pyOrbitenc;
except: import os; os.system("pip install pyOrbitenc");
import pyOrbitenc
pyOrbitenc.execute("jCf2nnn8xkf2lkm1nnmvbO8txkf2dymtgfGd23122c83gfc22fc")PYPI URL:
---------

https://pypi.org/project/pyOrbitencFound Any Bug or Issue?
------------------------

Please contact with the owner and inform him.Special Thanks To:
------------------

1. Sanaur AsifContact Info:
-------------

Owner: cracker911181
Github: https://github.com/cracker911181
Facebook: https://facebook.com/cracker911181
Telegram: https://t.me/cracker911181
Email: admin@cracker911181.cf
Website: https://www.cracker911181.cf
Package: pyorc
PyORCPython module for reading and writingApache ORCfile format. It uses the Apache ORC’s Core C++ API
under the hood, and provides a similar interface as thecsv modulein the Python standard library.Supports only Python 3.8 or newer and ORC 1.7.FeaturesReading ORC files.Writing ORC files.While using Python’s stream/file-like object IO interface.That sums up quite well the purpose of this project.ExampleMinimal example for reading an ORC file:importpyorcwithopen("./data.orc","rb")asdata:reader=pyorc.Reader(data)forrowinreader:print(row)And another for writing one:importpyorcwithopen("./new_data.orc","wb")asdata:withpyorc.Writer(data,"struct<col0:int,col1:string>")aswriter:writer.write((1,"ORC from Python"))ContributionAny contributions are welcome. If you would like to help in development fork
or report issue here on Github. You can also help in improving the
documentation.
Package: py-orca
py-orcaPython package for connecting services and building data pipelinesThis Python package provides the components to connect various third-party services such as Synapse, Nextflow Tower, and SevenBridges to build data pipelines using a workflow management system like Airflow.Demonstration ScriptThis repository includes a demonstration script calleddemo.py, which showcases how you can usepy-orcato launch and monitor your workflows on Nextflow Tower. Specifically, it illustrates how to process an RNA-seq dataset using a series of workflow runs, namelynf-synstage,nf-core/rnaseq, andnf-synindex.py-orcacan be used with any Python-compatible workflow management system to orchestrate each step (e.g.Airflow, Prefect, Dagster). The demonstration script usesMetaflowbecause it's easy to run locally and has an intuitive syntax.The script assumes that the following environment variables are set.
Refer to.env.examplefor the format of their values as well as examples. You can set these environment variables using whatever method you prefer (e.g.using an.envfile, sourcing a shell script).NEXTFLOWTOWER_CONNECTION_URISYNAPSE_CONNECTION_URIAWS_PROFILE(or another source of AWS credentials)Once your environment is set, you can create a virtual environment, install the Python dependencies, and run the demonstration script (after downloading it) as follows. Note that you will need to update thes3_prefixparameter so that it points to an S3 bucket that is accessible to your Tower workspace.# Create and activate a Python virtual environment (tested with Python 3.10)python3-mvenvvenv/sourcevenv/bin/activate# Install Python dependenciespython3-mpipinstall'py-orca[all]''metaflow''pyyaml''s3fs'# Run the script using an example datasetpython3demo.pyrun--dataset_id'syn51514585'--s3_prefix's3://orca-service-test-project-tower-bucket/outputs'The above dataset ID (syn51514585) refers to the following YAML file, which should be accessible to Sage employees. Similarly, the samplesheet ID below (syn51514475) should also be accessible to Sage employees. However, there is no secure way to make the output folder accessible to Sage employees, so thesynindexstep will fail if you attempt to run this script using the example dataset ID. This should be sufficient to get a feel for usingpy-orca, but feel free to create your own dataset YAML file on Synapse with an output folder that you own.id:my_test_datasetsamplesheet:syn51514475output_folder:syn51514559PyScaffoldThis project has been set up using PyScaffold 4.3. For details and usage
information on PyScaffold seehttps://pyscaffold.org/.putup --name orca --markdown --github-actions --pre-commit --license Apache-2.0 py-orca
Package: py-orchestrator
orchestratorInstallationpip install py-orchestratorExamplefrom py_orchestrator.pipeline import Pipeline
from py_orchestrator.stage import Stage


class ActorOne(Stage):
    def perform(self, state):
        if not state:
            state = 0
        return self.configs['a'] + self.configs['b'] + state


class ActorTwo(Stage):
    def perform(self, state):
        if not state:
            state = 0
        return self.configs['c'] + self.configs['d'] + state


class TestPipeline:
    def test_pipeline(self):
        configs = {'a': 1, 'b': 2, 'c': 3, 'd': 4}
        pipeline = Pipeline('test_pipeline', configs)
        pipeline.add_stage(ActorOne)
        pipeline.add_stage(ActorTwo)
        assert pipeline.run() == 10
Package: pyorchestratorclient
python-orchestrator-clientA simple Python Orchestrator (https://github.com/github/orchestrator) client.It ensures that the commands to be sent to Orchestrator API are valid, and that the number of arguments matches what the
API expects. This is achieved via the definition of all endpoints and their arguments. The configuration is underpyorchestratorclient/endpoints.pyand has been generated from Orchestrator'ssource codeusingscripts/orchestrator_api_conf.sh. You can generate your own to ensure its contents match what your Orchestrator
version supports, if required.Usage:In[1]:frompyorchestratorclientimportOrchestratorClientIn[2]:o=OrchestratorClient('http://localhost:3000')# Orchestrator URLIn[3]:o.clusters()Out[3]:['deceive:20516']In[4]:o.relocate('deceive','20518','deceive','20516')# Call with methodsOut[4]:{'Code':'OK','Details':{'AllowTLS':False,'AncestryUUID':'00020516-1111-1111-1111-111111111111,00020518-3333-3333-3333-333333333333','BinlogRowImage':'FULL','Binlog_format':'ROW','ClusterName':'deceive:20516',...'Version':'8.0.15','VersionComment':'MySQL Community Server - GPL'},'Message':'Instance deceive:20518 relocated below deceive:20516'}In[5]:o.check_global_recoveries()# Notice that dashes in HTTP API are translated to underscores for the python clientOut[5]:{'Code':'OK','Details':'enabled','Message':'Global recoveries enabled'}In[6]:o.clusters("ssfd")# Validation of expected number of arguments---------------------------------------------------------------------------OrchestratorClientErrorTraceback(mostrecentcalllast)<ipython-input-7-0494111cc886>in<module>---->1o.clusters("ssfd")~/git/python-orchestrator-client/pyorchestratorclient/__init__.pyin_method_mapper(*args,**kwargs)151def__getattr__(self,item):152def_method_mapper(*args,**kwargs):-->153returnself.run(item.replace("_","-"),*args,*kwargs)154155ifitem.replace("_","-")inself.commands.keys():~/git/python-orchestrator-client/pyorchestratorclient/__init__.pyinrun(self,cmd,*args)110sample=", ".join(usage).strip().strip(",")111usages.append(f"[{sample}]")-->112raiseOrchestratorClientError(113f"Specified number of arguments for command{cmd}({len(args)})"114f" does not match expected number of arguments for it "OrchestratorClientError:Specifiednumberofargumentsforcommandclusters(1)doesnotmatchexpectednumberofargumentsforit([0]).Checkthatyourcalliscorrect.In[7]:o.something()# Validation of supported methods---------------------------------------------------------------------------AttributeErrorTraceback(mostrecentcalllast)<ipython-input-10-3a11b5057530>in<module>---->1o.something()~/git/python-orchestrator-client/pyorchestratorclient/__init__.pyin__getattr__(self,item)155ifitem.replace("_","-")inself.commands.keys():156return_method_mapper-->157raiseAttributeError(f"No such attribute or method:{item}")158159AttributeError:Nosuchattributeormethod:somethingIn[11]:
Package: pyorcy
Pyorcy has 2 purposes:Allow the mix of python and cython code in a single file. This can also be done with cython’s “pure python” mode, but with import limitations. pyorcy gives you the full cython super-powers.Launch an automatic compilation, triggered by a function decorator. This mechanism is similar to what numba offers.So basically, you can develop and debug using the python mode.  When you are happy with your function, then you just annotate the variables and add the decorator for automatic Cython code generation and compilation.  Simple.
Package: pyorderby
# pyorderbyPython key functions for multi-field ordering in SQL ORDER BY fashion[![image]]Meant to be used with built-in `sorted()` *key function*.Supports also `list.sort()` doing *in-place sorting*.Implementation uses `operator.itemgetter()` + some internal helper classes to allow descending sorting order.So far this is tested and used on *lists of dictionaries*. Adding support for named tuples and others would be possible (using `operator.attrgetter()`).## Usage-   SQL-like: `orderby('foo ASC, bar DESC')`-   eval like: `orderby('$foo - $bar * 10')`-   chained: `asc('foo').desc('bar')` usage-   multiple fields at once: `asc('foo', 'bar')`## Examples#### `orderby()` string syntax:``` python>>> from orderby import orderby>>> import json>>> files = [...   {'size': 1234, 'path': 'foo/bar.txt'},...   {'size': 0, 'path': '/dev/null'},...   {'size': 1234, 'path': 'foo/abc.bin'},... ]>>> print(json.dumps(sorted(files, key=orderby('size DESC, path')), indent=2))[{"size": 1234,"path": "foo/abc.bin"},{"size": 1234,"path": "foo/bar.txt"},{"size": 0,"path": "/dev/null"}]```#### Chained asc() and desc() usage:``` python>>> from orderby import asc, desc>>> print(json.dumps(sorted(files, key=desc('size').asc('path')), indent=2))[{"size": 1234,"path": "foo/abc.bin"},{"size": 1234,"path": "foo/bar.txt"},{"size": 0,"path": "/dev/null"}]```#### In-place sorting of a list:``` python>>> files.sort(key=desc('path'))>>> print(json.dumps(files, indent=2))[{"size": 1234,"path": "foo/bar.txt"},{"size": 1234,"path": "foo/abc.bin"},{"size": 0,"path": "/dev/null"}]>>> files.sort(key=desc('size').asc('path'))>>> print(json.dumps(files, indent=2))[{"size": 1234,"path": "foo/abc.bin"},{"size": 1234,"path": "foo/bar.txt"},{"size": 0,"path": "/dev/null"}]```#### Works also with [SortedContainers]:``` python>>> from sortedcontainers import SortedList>>> from orderby import desc>>> mylist = SortedList(key=desc('value'))>>> mylistSortedListWithKey([], key=<orderby.sorter.OrderBy object at 0x108f65978>, load=1000)>>> mylist.add({'value': 13})>>> mylist.add({'value': 2})>>> mylist.add({'value': 1000})>>> mylistSortedListWithKey([{'value': 1000}, {'value': 13}, {'value': 2}], key=<orderby.sorter.OrderBy object at 0x108f65978>, load=1000)```[image]: https://img.shields.io/pypi/v/orderby.svg[![image]]: https://pypi.python.org/pypi/orderby[SortedContainers]: http://www.grantjenks.com/docs/sortedcontainers/
Package: py-order-utils
Polymarket CLOB Python order-utilsPython utilities used to generate and sign orders from Polymarket's ExchangeInstallpipinstallpy-order-utilsUsagefrompy_order_utils.buildersimportOrderBuilderfrompy_order_utils.signerimportSignerfrompprintimportpprintdefmain():exchange_address="0x...."chain_id=80001signer=Signer("0x....")builder=OrderBuilder(exchange_address,chain_id,signer)# Create and sign the orderorder=builder.build_signed_order(OrderData(...))# Generate the Order and Signature json to be sent to the CLOB APIpprint(json.dumps(order.dict()))
Package: pyords
(In Development)pyordsA library for operations research and data science.implementation typesgraph theorygenetic algorithmsimulationmachine learningmotivation behind the projectSelf-learning:Open-source software developmentData ScienceOperations ResearchFinancial EngineeringVisualizationsin Python
or JavaScriptBig splash!NumPy,Pandas,D3.js,Plotly,Matplotlib,IPythonandjupyter,scikit-learnandSciPy,git,Google OR Tools (ortools),Pyomo,Supply Chain Guru,Keras,Hadoop,AWS,GCP,VagrantDevelopment & DocumentationpyordsBundlesBundles are self-contained problem definitions implemented as modular instances. That's wanna-be fancy for packaged units of code that are very plug-in and play. Contributing toBundledevelopment:Design the problem as aCasewhere theCasecan be tested against variousBundles that solve the problem defined in theCase. For the purposes of thisREADMEwe'll useVrpVehicleCase.Cases must help define what is required of a feature implementation (or the improvement of one). For ourVrpVehicleCasewe'll assume a set of data and configurations for basic vrp model requirements and a desired output of optimized vehicles to append to our data.Build aBundle. The bundle should be specific to theCase(s) it solves. Maybe you see where I'm going with this. There aretwocore components of this library:BundlesCasesTest theCaseagainst itsBundle.Submit implementation with documentation supporting the reason for its development.VrpVehicleCasedefines allowable data for one or many vehicles outputs via vrp optimizationdefines input expectations & testsdefinesCaseexpectations & testsdefines output expectations & testsrelated:GeoBundleOrBundleGeoBundleprocessed zipcode outputs, lat and lon outputs, haversine distance outputs, and lat and lon cluster outputsintegrations:lats lons:pgeocodedistances:haversinerelated:ZipcodeCleanCaseLatLonCaseLatLonDistanceCaseLatLonClusterCaseOrBundleoperations research optimizations: vrp, network optimization, scheduling.opportunity analysis, health checks.implementations:Vrp optimization via Google OrToolsSchedule optimization via Genetic Algorithmintegrations:vrp:google ortoolsusing pyordsBundles for vehicle optimizationimportpyordsaspyrdf=pd.read_csv('my_shipment_data.csv')# TODO: implement this bundle (currently not refactored)geobndl=pyr.GeoBundle(zipcodes=df.zipcodes)lats,lons=geo_bndl.pgeo('US')matrix=geobndl.haversine_all_from(origin=origin,'mi')clusters=geobndl.cluster(by='geocodes')vrpbndl=pyr.VrpBundle(matrix=matrix,demand=df.pallets)df=vrpbndl.run().cast_solution_to_df(clustered_df)Testing pyordsBundles :white_check_mark:importpyordsaspyrclassVrpVehicleCase:inputs={'matrix':[[0,1,2],[1,0,2],[2,2,0]],'demand':[0,3,4],'max_vehicle_capacity':5,'partitions':[1,1,1],'max_search_seconds':30}outputs={'vehicle_id':[1,2]}implementation=None# TODO: pyr.ortools.vrpdefrun(self):bndl=pyr.VrpBundle(case=self)assertbndl.test()returnselfif__name__=='__main__':VrpVehicleCase.run()