Saravanan666/pypi-org huggingface dataset:
Package: pyjulia
PyjuliaPyjulia is a python module for calling julia functions inside your python code.UsageThe julia interpreter is inside the PATH for the following examples. If you do not have julia inside your PATH you can also define the path to the julia interpreter like that:importpyjuliajulia_module=pyjulia.Pyjulia("./example.jl")julia_module.julia_interpreter="your path to julia interpreter"# execute code...You will have to use theFirepackage inside of your Julia code in order to use it like a cli application. An example would look like this:usingFire@mainfunctionadd(num::Integer...)println(sum(num))end@mainfunctionmultiply(num::Integer...)println(prod(num))end@mainfunctiongreet(name,age,num::Integer...)println(name,age)println(num)endcall_func methodLet's say the content of this julia code belongs to a file calledexample.jl. You can now call the add and multiply functions inside your python code:importpyjuliajulia_module=pyjulia.Pyjulia("./example.jl")my_args=[2,3,5]julia_sum=julia_module.call_func("add",my_args)julia_prod=julia_module.call_func("multiply",my_args)print(julia_sum,julia_prod)Your output should now look like this:10 30using dynamic function declarationLet's use the sameexample.jlfrom before. This means the content will look like this:usingFire@mainfunctionadd(num::Integer...)println(sum(num))end@mainfunctionmultiply(num::Integer...)println(prod(num))end@mainfunctiongreet(name,age,num::Integer...)println(name,age)println(num)endNow in order to call these function within your python code you need to do this:⚠️NOTE:Your IDE/text editor may tell you "Unresolved attribute reference add/multiply for class Julia". There's no need to worry. It should still work just as fine.importpyjuliajulia_module=pyjulia.Pyjulia("./example.jl")output=julia_module.add(my_args)output2=julia_module.multiply(my_args)print(output,output2)Your output should still look like this:10 30Thegreetfunction inside the julia file has multiple arguments. But this doesn't prevent us from calling it from python. It works just as fine as the other examples above:importpyjuliajulia_module=pyjulia.Pyjulia("./example.jl")greet_args=["Pyjulia",19,2,3,4,5]greeting=julia_module.greet(greet_args)print(greeting)The following output should be printed to the terminal:pyjulia 19
(2, 3, 4, 5)You can just treat them as normal positional variables and theFirepackage from julia will parse the arguments automatically.
Package: py-jutil
JUtilDescription:JUtil is a collection of useful functions, values, and classes for Python.Dependencies:None yetNote:This module is a work in progress.Recent Changes:Addedjutil.styling, for styling text in the console.Addedjutil.inp, for quick and easy input functions.Addedjutil.logs, for quick and easy logging functions.v0.0.3, developed by Noah Wilhoite
Last updated: Dec 21th, 2023
Package: pyjvcprojector
pyjvcprojectorA python library for controlling a JVC Projector over a network connection.https://pypi.org/project/pyjvcprojector/FeaturesConvenience functions:JvcProjector::power_on()turns on power.JvcProjector::power_off()turns off power.JvcProjector::get_power()gets power state (standby, on, cooling, warming, error)JvcProjector::get_input()get current input (hdmi1, hdmi2).JvcProjector::get_signal()get signal state (signal, nosignal).JvcProjector::get_state()returns {power, input, signal}.JvcProjector::get_info()returns {model, mac address}.Send remote control codesA wrapper for callingJvcProjector::op(f"RC{code}")JvcProjector::remote(code)sends remote control command.Send raw command codesJvcProjector::ref(code)sends reference commands to read data.codeis formattedf"{cmd}".JvcProjector::op(code)sends operation commands to write data.codeis formattedf"{cmd}{val}".Installationpip install pyjvcprojectorUsageimportasynciofromjvcprojector.projectorimportJvcProjectorfromjvcprojectorimportconstasyncdefmain():jp=JvcProjector("127.0.0.1")awaitjp.connect()print("Projector info:")print(awaitjp.get_info())ifawaitjp.get_power()!=const.ON:awaitjp.power_on()print("Waiting for projector to warmup...")whileawaitjp.get_power()!=const.ON:awaitasyncio.sleep(3)print("Current state:")print(awaitjp.get_state())## Example sending remote code#print("Showing info window")awaitjp.remote(const.REMOTE_INFO)awaitasyncio.sleep(5)print("Hiding info window")awaitjp.remote(const.REMOTE_BACK)## Example sending reference command (reads value from function)#print("Picture mode info:")print(awaitjp.ref("PMPM"))## Example sending operation command (writes value to function)## await jp.ref("PMPM01")  # Sets picture mode to Filmawaitjp.disconnect()
Package: pyjvmgui
pyjvmguiBased onPyJVMJava 7 virtual machine implemented in pure pythonGPLRequires python 2.7https://github.com/andrewromanenco/pyjvmcheck docs for implementation detailsAndrew Romanenco, 2014andrew@romanenco.comhttps://twitter.com/andrewromanencoInstallationRequires Python 2 (hencepip2).You can installpyjvmguifrom thePyPI.pip2 install pyjvmguiWhen upgrading, it's advised to add--no-depsflag. Otherwise, thePySide2dependency might be downloaded again.pip2 install pyjvmgui --upgrade --no-depsDependenciesPySide2PySide2is used for the GUI.You can install it by runningpip2 install PySide2Note:done bypipif following theinstallation instructions
Package: pyjwt-rsa
Helpers for JWT tokens with RSA.>>>fromjwt_rsa.tokenimportJWT>>>fromjwt_rsa.rsaimportgenerate_rsa>>>>>>bits=2048>>>>>>private_key,public_key=generate_rsa(bits)>>>>>>jwt=JWT(private_key,public_key)>>>>>>token=jwt.encode(foo='bar')>>>result=jwt.decode(token)>>>result{'foo':'bar','exp':1525941819.638339,'nbf':1523349799.638342}>>># Expired token>>>token=jwt.encode(foo='bar',expired=-1)>>>jwt.decode(token)Traceback(mostrecentcalllast):...jwt.exceptions.ExpiredSignatureError:Signaturehasexpired>>># No verify token signature and expiration>>>jwt.decode(token,verify=False){'foo':'bar','exp':-1,'nbf':1523350046.935803}Command line utilitiesModule provides following utilitiesjwt-rsa-keygenCreates a new key pair:$ jwt-rsa-keygen -h                                                                                                                                                                                              ±8 ?3 master
usage: jwt-rsa-keygen [-h] [-b BITS] [-P]

optional arguments:
  -h, --help            show this help message and exit
  -b BITS, --bits BITS
  -P, --pemBy default this utility return JSON-serialized key pair:$ jwt-rsa-keygen                                                                                                                                                                                                 ±8 ?3 master
{
   "private": "MIIEvgIBADANBg......h3MBsSzx",
   "public": "MIIBCgKCAQEAxUU......5niBEjAB"
}Add parameter-Pfor return in PEM format:$ jwt-rsa-keygen -P                                                                                                                                                                                              ±8 ?3 master
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDDeiI5V/O/Mbff
...
LGQgWf5ch0t1+Rh3tjIuuSc=
-----END PRIVATE KEY-----

-----BEGIN RSA PUBLIC KEY-----
MIIBCgKCAQEAw3oiOVfzvzG331nAL5hGHbblcCaV3pbfoCiFRgwpNPf7snIJtw97
...
3k2mMT1z6NFO6e6LMxg2zrqs3zgqwx5/9wIDAQAB
-----END RSA PUBLIC KEY-----jwt-rsa-verifyVerify JSON serialized key pair:$ jwt-rsa-keygen | jwt-rsa-verify                                                                                                                                                                                ±8 ?3 master
INFO:root:Awaiting JSON on stdin...
INFO:root:Signing OK
INFO:root:Verifying OKOr failed when key pair is invalid or doesn’t match:$ jwt-rsa-keygen | sed 's/M/j/' | jwt-rsa-verify                                                                                                                                                                 ±8 ?3 master
INFO:root:Awaiting JSON on stdin...
Traceback (most recent call last):
  ...
ValueError: Could not deserialize key data.
Package: pyjyutping
PyJyutpingChinese text toJyutping(粵拼; a standard of Cantonese romanization) conversion library in Python.
Conversion is based on an officially publishedCantonese Pronunciation List.
This library performs the conversion using the Jyutping romanization table
prepared byDr. Samuel Cheng,
which has been further converted to adictionary file in JSON format.InstallationpipinstallpyjyutpingUsagePython>>>frompyjyutpingimportjyutping>>>jyutping.convert("我係香港人")'ngo5 hai6 hoeng1 gong2 jan4'Tone number in output can be disabled:>>>jyutping.convert("我係香港人",tone=False)'ngo hai hoeng gong jan'Alphabets and digits are preserved in the conversion:>>>jyutping.convert("香港嘅英文係Hong Kong")'hoeng1 gong2 ge3 jing1 man4 hai6 Hong Kong'>>>jyutping.convert("1841年1月25號香港開埠")'1841 nin4 1 jyut6 25 hou6 hoeng1 gong2 hoi1 bou6'Command-Line Interface Tool$pyjyutping我係香港人
ngo5hai6hoeng1gong2jan4LicenseMIT
Package: pyk
This is a simple, yet useful toolkit that supports you in writing
microservices-style apps with Kubernetes.The pyk toolkit is meant to be used by tools such askployor from your own app. It
is manifest-oriented, that is, it expects the resource definitions in
YAML files; currently pyk’s API is as follows:execute an arbitraryoperationand return the resource, if any:execute_operation(method='GET',ops_path='',payload='')return a description of a resource:describe_resource(resource_path)delete a resource:delete_resource(resource_path)create a Replication Controller (RC):create_rc(manifest_filename,namespace='default')scale a RC:scale_rc(manifest_filename,namespace='default',num_replicas=0)create a service:create_svc(manifest_filename,namespace='default')DependenciesAll of these are included in thesetup:PythonRequests(note: I’ve tested with version2.6.2)PythonPyYAML(note: I’ve tested
with version3.11)Using pykA simple usage pattern is, for example, to create aReplication
Controller:import pprint
from pyk import toolkit

pyk_client = toolkit.KubeHTTPClient() # assumes local API Server at http://localhost:8080
_, rc_url = pyk_client.create_rc(manifest_filename='manifest/nginx-webserver-rc.yaml')
rc = pyk_client.describe_resource(rc_url)
pprint.pprint(rc.json())Testing pykIn order to run the tests, usetest_pyk.py $KUBERNETES_API_SERVER_URL, for example:$ ./test_pyk.py http://52.33.181.164/service/kubernetesAbove runs all the tests. You can also specify a particular test, like
so:$ ./test_pyk.py http://52.33.181.164/service/kubernetes "init app"
================================================================================
= Test case: init a simple app

2015-11-28T05:13:16 From manifest/nginx-webserver-rc.yaml I created the RC "webserver-rc" at /api/v1/namespaces/default/replicationcontrollers/webserver-rc
2015-11-28T05:13:17 From manifest/webserver-svc.yaml I created the service "webserver-svc" at /api/v1/namespaces/default/services/webserver-svc
2015-11-28T05:13:18 Found following endpoints:
2015-11-28T05:13:18 /api/v1/namespaces/default/endpoints/k8sm-scheduler ->
{
  "addresses": [
    {
      "ip": "10.0.3.45"
    }
  ],
  "ports": [
    {
      "port": 25504,
      "protocol": "TCP"
    }
  ]
}
2015-11-28T05:13:18 /api/v1/namespaces/default/endpoints/kubernetes ->
{
  "addresses": [
    {
      "ip": "10.0.3.45"
    }
  ],
  "ports": [
    {
      "port": 25502,
      "protocol": "TCP"
    }
  ]
}
2015-11-28T05:13:18 /api/v1/namespaces/default/endpoints/webserver-svc ->
Package: pyk3d
Python package to managek3dinstancesIDEArchitectureFile system organizationQuality AssuranceFormattingLintingTestingType checkingCI/CDVersioningMakefileIDEVisual Studio Codeis the recommended IDE for this project. It was chosen for theRemote - Containersextension that guarantees the same development environment for every developer. The project is configured so that everything works out of the box.ArchitectureFile system organizationsrc: the source code of the application, and nothing more.tools: anything else that's required to make the project work but is not a part of the application. This may include source code, shell scripts, configuration files, etc.tools/toolingis used to explicitely link the various configuration files to the software that requires it.tests: holds tests that can be run withpytest.Quality AssuranceFormattingpython:isortandblack.Lintingpython:pylint.shell scripts:shellcheck.Testingpython:pytest, withpytest-covto handle coverage andpytest-xdistto handle parallelization.Type checkingpython:mypyCI/CDWhenever pull request is opened against the fork or a new changeset is pushed on the fork (including when a pull request is merged), the CI/CD will run. This is controlled by.github/workflows/ci-cd.yml. The content of the file is kept to a minimum, to keep it both readable and clean.The CI/CD is split into two jobs.CIensures that the tests pass with supported python versions, except the one used for releasing.CI-CDensures that the tests pass with the version of python used for releasing, and uploads the corresponding package without any action from the user. This guarantees that all uploaded packages have been tested with the expected python version.The version and the upload destination of the package depend on the action that triggered the CI/CD as well as the branch on which this action was triggered. All branches will upload totest.pypi.org, butrelease/X.Ybranches will also upload topypi.org.VersioningVersioning for major and minor numbers is handled by creatingrelease/X.Ybranches. The patch number is automatically generated based on existing releases. Seetools/releasing/version.pyfor more details.MakefileThe project uses aMakefileas a way to provide quick access to common commands. It should not be used to write complex scripts. It was chosen overpoetryscripts becausemakeis shorter to type thanpoetry run. Despite the shortfalls ofmakeit is everywhere and many developers are used tomake targetcommands. Finally theMakefilesyntax should be awful enough that one would want to write ashellorpythonscript and call it from theMakefileif something complicated needed to be done.
Package: pyk8s
kubernetes-dynamicThis project aims to provide an easy interface over kubernetes API based on the official kubernetes package.Basic syntax is very similar to kubectl.client.pods.get()is the same askubectl get podsExample Usageimportkubernetes_dynamicaskdclient=kd.K8sClient()pods:list[kd.models.V1Pod]=client.pods.get()forpodinpods:print(pod.metadata.name)Custom resourcesimportkubernetes_dynamicaskdclassMyModel(kd.models.ResourceItem):field:strapi:ResourceApi[MyModel]=kc.cl.get_api("mycustomresources",MyModel)api:ResourceApi[MyModel]=kc.cl.get_api(kind="MyCustomResource",object_type=MyModel)items:List[MyModel]=api.get()item:Optional[MyModel]=api.get(name="exact-name")ifitem:item.field="modified"item.patch()else:item=MyModel(metadata={"name":"exact-name","namespace":"namespace-name"},field="created",client=kd.cl)item.create()# item = MyModel(field="created")# item.metadata.name = "exact-name"# item = MyModel(metadata={"name": "exact-name"}, field="created")# item = MyModel(metadata=kd.models.V1Metadata(name="exact-name"), field="created")# item.create(namespace="namespace-name")ModelsWe aim to provide pydantic models for all reasources.Because the model names are exactly the same as in thekubernetespackage, make sure you import the models fromkubernetes_dynamic.modelsProper type hintingAll models are flexible (less dependent on kubernetes version):accept extra valuesall optional (type checker is tricked into assuming everything exists)Models created by queries have a reference to the client it was created by, manually creating models creates a default client(without arguments), or you can specifyclientmanually.Base model contains common methods for all models:refreshpatchcreatereaddeleteis_readyadditional features for specific models (just examples):configmap:from_pathingress:get_default_hostnamespace:annotateensurepod:get_restartsexecdisk_usageget_controller_typeget_envsecretexistssetdecodeSubresourcesSubresources are available under the main resource api objects:example:client.pods.execWork in progressExpect breaking changes
Package: pyk8sver
pyk8sverreturns the latest version of kubernetesRequirementsTBDSetupIf you want to run the test cases, do this extra steppipinstall-rrequirements-dev.txtInstall the package:pythonsetup.pydevelop(Optional) Run all tests:$pavertest_all========================112passed,2xfailedin2.01seconds________________|_\/_\/__/__|__|\|_/_\\__\__\_|||)||_|/_/\_\___/___/___|___/Examplefrompyk8sverimportappo=app.Kubernetes('your-github-access-token')releases=o.fetch_releases()print("Latest is{0}".format(releases[0]))# GitRelease(title="v1.13.2")
Package: pykaban
pykaban========================================* 使用Python执行阿兹卡班的AJAX接口* 使用Python创建阿兹卡班任务流程* 使用Python管理阿兹卡班流程调度A Python client for Azkaban AJAX API----------------------------------------目前已经完成如下接口* 验证接口 ``api-authenticate``* 创建项目接口 ``api-create-a-project``* 删除项目接口 ``api-delete-a-project``* 上传项目Zip包接口 ``api-upload-a-project-zip``* 使用Cron灵活调度接口 ``api-flexible-schedule``Create Flow with Pythonic API----------------------------------------规划中Customized Account Support----------------------------------------* 用户账户在``$HOME/.pykabanrc``下可以配置Flow Schedule Support----------------------------------------* 自动解析工程目录下的 schedule.txt 文件，格式``flowname: 0 15 8 * * ? *``，并配置作业调度
Package: pyKadabra
SetupHow to save your 'GS_SERVICE_ACCOUNT' env-var to use this codeYour 'GS_SERVICE_ACCOUNT' needs to be the whole json file as a string instead of the path to the file.
Then, it also needs to be encrypted. To have the correct format, copy the json file contents to your clipboard, then
go in the terminal and execute `pbpaste | base64 | pbcopy`. These commands will encrypt the json content and put it back
to your clipboard. Then just paste the encrypted contents to your local env-vari.e.copy the content of the.jsonfile to your memory and run the  following in terminal:pbpaste|base64|pbcopythis will give you an encrypted stringsave this sting as a envar calledGS_SERVICE_ACCOUNTInitiatefrompyKadabraimportkinesissheet_url='https://docs.google.com/spreadsheets/d/1Alaj8Pb6sy3_W2oGb9WUoYznFof5W7kigAx/edit?usp=sharing'working_sheet=kinesis.gsheets_handler(gsheet_url=sheet_url)Usage examplescreate sheetworking_sheet.create_sheet(worksheet='Psybeam')deleteworking_sheet.delete_sheet(worksheet='Psyshock')# sheet with nameworking_sheet.delete_sheet(worksheet=1)# sheet with indexwrit to sheetsworking_sheet.write_to_sheet(input_dataframe=df_test,worksheet='Future Sight')# sheet with nameworking_sheet.write_to_sheet(input_dataframe=df_test,worksheet=2)# sheet with indexcount rowsworking_sheet.count_rows(worksheet='Future Sight')clear rangeworking_sheet.clear_range(worksheet='Future Sight')# entire sheetworking_sheet.clear_range(worksheet='Future Sight',clear_range_str='B2:D4')# subsection onlyread from sheetsdf_read=working_sheet.read_sheet(worksheet='Future Sight')# sheet with namedf_read=working_sheet.read_sheet(worksheet=1)# sheet with indexdf_read2=working_sheet.read_sheet(worksheet='Future Sight',target_range_str='B1:C4')# subsection only
Package: pykafkawrapper
KafkaWrapper is a Python library designed to simplify Kafka producer setup and data transmission to Kafka topics. This wrapper abstracts the complexities of configuring a Kafka broker and producer, allowing developers to seamlessly integrate Kafka into their projects.FeaturesKafkaWrapper simplifies the process of setting up a Kafka broker and producer, saving you time and effort.asily send data to Kafka topics without the need for extensive Kafka knowledge.Customize your Kafka producer settings to suit your specific use case.UsageTo send data to Kafka, follow these steps:Import thesendDatamodules.Use this module to send data to kafka.Argument are
kafka_topic: Topic name
data: that you want to send to kafka
metadata(optional): id - unique id to fetch particular record from kafkaLicenseThis project is licensed under the MIT License.
Package: pykagapi
pykagapiDescription:pykagapi- a python wrapper for King Arthurs Gold-related APIs (KAG API v1andKAG Stats API).
Use it as you please, feel free to contribute!Dependencies:python 3.10+requestsaiohttp (for async client)Installation:From source:InstallpoetryClone this repo:git clone https://github.com/moonburnt/pykagapi.gitEnter project's directory:cd pykagapipoetry installFrom pypi:pip install pykagapiExample Usage:Getting general api info:frompykagapiimportkagwithkag.get_client()asc:print(c.get_api_info())Getting general api info asynchroniously:frompykagapiimportkagimportasyncioasyncdefmain():asyncwithkag.get_async_client()asc:print(awaitc.get_api_info())asyncio.run(main())Getting amount of currently active servers:frompykagapiimportkagwithkag.get_client()asc:servers_amount=len(kag.extra.get_active_servers()["serverList"])print(f"There are currently{servers_amount}servers with players!")Example output:There are currently 6 servers with players!Currently unimplemented api calls:KAG API:Everything that isn't "get" requests, because Im just a regular player and dont have ability to upload or remove anythingKAGSTATS API:https://kagstats.com/api/players/{id}/refresh, because it doesnt seem to do anythingWhatever I didnt notice while casually readingapi's source codesTODO:Support for non-GET requestsAutomated testsSupport for "limit"/"start" in list views of kagstats apiMake async client optionalLICENSE:MIT
Package: pykaging
PykageCommand-Line Tool to simplify the creation of python's packages in non-IDE environments.Table of ContentsHow Did This Project Born?Built WithInstallationUsageLicenseContactHow Did This Project BornIs a simple story, I was really annoyed of the manual creation of packages in VSCode, and the lack of a plugin for that. Is a simple but neccesary feature that mostPython Devsmight need from time to time and that takes a little amount of time, but time enough to focus in some other task that you might be doing.So since I kinda like the CLIs I decided to made this tool.[back to top]Built WithPythonSetuptoolsClickColorama[back to top]InstallationpipinstallpykageAfter doing that, the next step is use the CLI. Checkthe next sectionfor more information.[back to top]UsageFor a basic usage of the interface you have to prvide anamefor your package and then pykage will create it in your current directory, so make sure you are in the right directory.Example:pykage[name_of_your_Package]Otherwise if you provide the--diror-d, as the option, followed by the name of the directory where pykage should create the package.Example:pykage--dir[path_of_your_directory][name_of_your_Package]orpykage-d[path_of_your_directory][name_of_your_Package][back to top]LicenseThe tool is distributed under the MIT License. SeeLICENSE.mdfor more information.[back to top]ContactIf you want to contribute or add a feature you might think will improve the development of the project, send me a email, I don't bite!Personal Email:josevizcaya0616@gmail.com