Saravanan666/pypi-org huggingface dataset:
Package: pyark
Pyark is a small python-based CLI tool, which allows you to interact with the
CyberArk Enterprise Password Vault API.FeaturesCurrently the following functionalities are supported:Get accountsCreate accountsDelete accountsSupported authentication methods:CyberArk accounts (default)RADIUSRequirementsMake sure to have the following Python 3 dependencies installed before using the
tool:python-requestsFurthermore it’s important to know which version of the CyberArk Password Vault
is used as only the newest versions expose all API endpoints. Make sure to
double check the API documentation, specific for your version, in case the tool
fails to interact with the API.InstallationSimply clone this repository and start using the script. You can also install
it using setup.py or pip.ExamplesGet a list of available accounts:$pyark--basehttps://vault.example.com\--apiuserfoobar\--apipasswordsupersecret42\accountget\--safeMySafe\--keywordsbruceCreate a new account:$pyark--basehttps://vault.example.com\--apiuserfoobar\--apipasswordsupersecret42\accountcreate\--safeMySafe\--platformidTestPlatform\--accountnamebrucewayne\--addressbatcave.example.com\--usernamebrucew\--passwordd4rkkn1ghtDelete an existing account:$pyark--basehttps://vault.example.com\--apiuserfoobar\--apipasswordsupersecret42\accountdelete\--safeMySafe\--accountnamebrucewayne\--keywordsbruceContributionsContributions are more than welcome! Please feel free to open new issues or
pull requests.LicenseGNU GENERAL PUBLIC LICENSE Version 3See theLICENSEfile.
Package: pyarkbench
This library is intended to make it easy to write small benchmarks and view the results.UsageAPIBenchmarkbenchmarkrunprint_resultsprint_statssave_resultscleanupdefault_argsbenchstatssaveTimerCommitDeveloper NotesUsageSeeexamples/basic.pyfor a full working example.frompyarkbenchimportBenchmark,Timer,default_argsclassBasic(Benchmark):defbenchmark(self):withTimer()asm1:# Do some stuffpasswithTimer()asm2:# Do some other stuffpassreturn{"Metric 1 (ms)":m1.ms_duration,"Metric 2 (ms)":m2.ms_duration,}if__name__=='__main__':# Initialize the benchmark and use the default command line argsbench=Basic(*default_args.bench())# Run the benchmark (will run your code in `benchmark` many times, some to warm up and then some where the timer results are save)results=bench.run()# View the raw resultsbench.print_results(results)# See aggregate statistics about the resultsbench.print_stats(results,stats=default_args.stats())# Save the results to a JSON file named based on the benchmark classbench.save_results(results,out_dir=default_args.save())APIBenchmarkBenchmark(self,num_runs:int=10,warmup_runs:int=1,quiet:bool=False,commit:pybench.benchmarking_utils.Commit=None)Benchmarks should extend this class and implement thebenchmarkmethod.benchmarkBenchmark.benchmark(self)->Dict[str,float]This method must be implemented in your subclass and returns a dictionary
of metric name to the time captured for that metric.runBenchmark.run(self)->Dict[str,Any]This is the entry point into your benchmark. It will first runbenchmark()self.warmup_runstimes without using the resulting timings, then it will
runbenchmark()self.num_runstimes and return the resulting timings.print_resultsBenchmark.print_results(self,results)Pretty print the raw results by JSON dumping them.print_statsBenchmark.print_stats(self,results,stats=('mean','median','variance'))Collects and prints statistics over the results.save_resultsBenchmark.save_results(self,results,out_dir,filename=None)Save the results gathered from benchmarking and metadata about the commit
to a JSON file named after the type ofself.cleanupcleanup()Churn through a bunch of data, run the garbage collector, and sleep for a
second to "reset" the Python interpreter.default_argsdefault_args(self,/,*args,**kwargs)Adds a bunch of default command line arguments to make orchestrating
benchmark runs more convenient. To see all the options, calldefault_args.init()and run the script with the--helpoption.benchdefault_args.bench()Default arguments to be passed to aBenchmarkobjectstatsdefault_args.stats()Default arguments to be passed to theBenchmark.print_statsmethodsavedefault_args.save()Default arguments to be passed to theBenchmark.save_resultsmethodTimerTimer(self,/,*args,**kwargs)Context manager object that will time the execution of the statements it
manages.self.start- start timeself.end- end timeself.ms_duration- end - start / 1000 / 1000CommitCommit(self,time,pr,hash)Wrapper around a git commitDeveloper NotesTo build this package locally, check it out and runpythonsetup.pydevelopTo rebuild these docs, runpipinstallpydoc-markdown
pydocmdsimplepybench.Benchmark+pybench.cleanuppybench.default_args+pybench.Timerpybench.Commit
Package: py-arkose-generator
PY arkose-token generatorExample usagepipinstallpy-arkose-generatorimportrequestsfrompy_arkose_generator.arkoseimportget_values_for_requestopt={"pkey":"3D86FBBA-9D22-402A-B512-3420086BA6CC","surl":"https://tcr9i.chat.openai.com","headers":{"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"},"site":"https://chat.openai.com",}args_for_request=get_values_for_request(opt)response=requests.post(**args_for_request)decoded_json=response.json()if"token"indecoded_json:print(decoded_json["token"])else:print(f"Error!\n{decoded_json}")# Output: 454179210495214b7.0967231805|r=eu-west-1|meta=3|metabgclr=transparent|metaiconclr=%23757575|guitextcolor=%23000000|lang=en|pk=3D86FBBA-9D22-402A-B512-3420086BA6CC|at=40|sup=1|rid=16|ag=101|cdn_url=https%3A%2F%2Ftcr9i.chat.openai.com%2Fcdn%2Ffc|lurl=https%3A%2F%2Faudio-eu-west-1.arkoselabs.com|surl=https%3A%2F%2Ftcr9i.chat.openai.com|smurl=https%3A%2F%2Ftcr9i.chat.openai.com%2Fcdn%2Ffc%2Fassets%2Fstyle-managerOriginally translated fromfuncaptcha
Package: py-arkworks-bls12381
py_arkworks_bls12381The main usage of this library at this moment is to generate test vectors for EIP4844 in theconsensus-specs. The library itself is generic, so feel free to use it for other purposes.G1/G2Pointsfrompy_arkworks_bls12381importG1Point,G2Point,Scalar# G1Point and G2Point have the same methods implemented on them# For brevity, I will only show one method using G1Point and G2Point# The rest of the code will just use G1Point# Point initialization -- This will be initialized to the g1 generatorg1_generator=G1Point()g2_generator=G2Point()# Identity elementidentity=G1Point.identity()# Equality -- We override eq and neq operatorsassertg1_generator==g1_generatorassertg1_generator!=identity# Printing an element -- We override __str__ so when we print# an element it prints in hexprint("identity: ",identity)print("g1 generator: ",g1_generator)print("g2 generator: ",g2_generator)# Point Addition/subtraction/Negation -- We override the add/sub/neg operatorsgen=G1Point()double_gen=gen+genassertdouble_gen-gen==genneg_gen=-genassertneg_gen+gen==identity# Scalar multiplication#scalar=Scalar(4)four_gen=gen*scalarassertfour_gen==gen+gen+gen+gen# Serialisation## serialising to/from a g1 point# We don't expose the uncompressed form# because it seems like its not neededcompressed_bytes=gen.to_compressed_bytes()deserialised_point=G1Point.from_compressed_bytes(compressed_bytes)# If the bytes being received are trusted, we can avoid# doing subgroup checksdeserialised_point_unchecked=G1Point.from_compressed_bytes_unchecked(compressed_bytes)assertdeserialised_point==deserialised_point_uncheckedassertdeserialised_point==genPairingfrompy_arkworks_bls12381importG1Point,G2Point,GT,Scalar# Initilisation -- This is the generator pointgt_gen=GT()# Zero/Onezero=GT.zero()one=GT.one()# Computing a pairing using pairing and multi_pairing# multi_pairing does multiple pairings with only one final_expassertgt_gen==GT.pairing(G1Point(),G2Point())g1s=[G1Point()]g2s=[G2Point()]assertgt_gen==GT.multi_pairing(g1s,g2s)# Bilinearitya=Scalar(1234)b=Scalar(4566)c=a*bg=G1Point()*ah=G2Point()*bp=GT.pairing(g,h)c_g1=G1Point()*cc_g2=G2Point()*cassertp==GT.pairing(c_g1,G2Point())assertp==GT.pairing(G1Point(),c_g2)Scalarfrompy_arkworks_bls12381importScalar# Initialisation - The default initialiser for a scalar is an u128 integerscalar=Scalar(12345)# Equality -- We override eq and neq operatorsassertscalar==scalarassertScalar(1234)!=Scalar(4567)# Scalar Addition/subtraction/Negation -- We override the add/sub/neg operatorsa=Scalar(3)b=Scalar(4)c=Scalar(5)asserta.square()+b.square()==c.square()asserta*a+b*b==c*cneg_a=-aasserta+neg_a==Scalar(0)assert(a+neg_a).is_zero()# Serialisationcompressed_bytes=scalar.to_le_bytes()deserialised_scalar=Scalar.from_le_bytes(compressed_bytes)assertscalar==deserialised_scalarDevelopmentYou will need maturin to build the project.pip install maturinFirst activate the virtual environmentsource .env/bin/activateNext build the rust package and install it in your virtual environmentmaturin developNow run a file in the examples folderpython3 examples/point.pyBenchmarkspython3 -m examples.benches.bench
Package: pyarmeetup2020
Pyar Meetup 2022This package was created as a demo following this guidehttps://packaging.python.org/en/latest/tutorials/packaging-projects/on 8 Feb 2022InstructionsCreate an activate a virtualenvpython3 -m pip install --upgrade pip   # Install project dependencies
python3 -m pip install --upgrade build # Build wheels and sdist from source files
python3 -m pip install --upgrade twine # Upload wheels and sdists to pypi
python3 -m pip install --upgrade wheel # To be able to install from wheels instead of sdists
#or just
python3 -m pip install --upgrade pip build twine wheelBuild wheel and sdist (zip of source tree) from source* Creating venv isolated environment...
* Installing packages in isolated environment... (setuptools>=42, wheel)
* Getting dependencies for sdist...
* Building sdist...
* Building wheel from sdist
* Creating venv isolated environment...
* Installing packages in isolated environment... (setuptools>=42, wheel)
* Getting dependencies for wheel...
* Installing packages in isolated environment... (wheel)
* Building wheel...
Successfully built pyarmeetup2020-0.0.1.tar.gz and pyarmeetup2020_ambro17-0.0.1-py3-none-any.whlAnd then check with$ ls dist/
pyarmeetup2020-0.0.1.tar.gz           pyarmeetup2020-0.0.1-py3-none-any.whlUpload wheel and sdist to pypitwine upload --repository testpypi dist/*Test it
Runpythonand then>>>frompyarmeetup2020importexample>>>example.should_i_pin_pip()'Probably not'Expected Error While Installing Bad LibERROR: Cannot install pyarmeetup2020 and pyarmeetup2020==0.0.2 because these package versions have conflicting dependencies.

The conflict is caused by:
    pyarmeetup2020 0.0.2 depends on Flask>=2.0.2
    elpasado 0.0.4 depends on Flask==1.0.1

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflictsWith pip 20.2.0ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.

We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.

elpasado 0.0.7 requires Flask==1.0.1, but you'll have flask 2.0.2 which is incompatible.DO NOT PIN PIP!! Solve the root problem!
Package: pyarmor
Pyarmor is a command line tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine or expire obfuscated scripts.Key FeaturesThe obfuscated scritpt is still a normal.pyscript, in most of cases the original python scripts can be replaced with obfuscated scripts seamlessly.Provide many ways to obfuscate the scripts to balance security and performanceRename functions/methods/classes/variables/arguments, irreversible obfuscationConvert part of Python functions to C function, compile to binary by high optimize option, irreversible obfuscationBind obfuscated scripts to fixed machine or expire obfuscted scriptsProtect obfuscated scripts by Themida (Only for Windows)Support PlatformsPython 3.7~3.12WindowsMany linuxs, include embedded systemsApple Intel and Apple SiliconQuick StartInstall:pip install pyarmorObfuscate the scriptfoo.py:pyarmor gen foo.pyThis command generates an obfuscated scriptdist/foo.pylike this:frompyarmor_runtimeimport__pyarmor____pyarmor__(__name__,__file__,b'\x28\x83\x20\x58....')Run it:python dist/foo.pyMore ResourcesHomeWebsite中文网站IssuesDocumentation
Package: pyarmor.cli
Pyarmor is a command line tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine or expire obfuscated scripts.Key FeaturesThe obfuscated scritpt is still a normal.pyscript, in most of cases the original python scripts can be replaced with obfuscated scripts seamlessly.Provide many ways to obfuscate the scripts to balance security and performanceRename functions/methods/classes/variables/arguments, irreversible obfuscationConvert part of Python functions to C function, compile to binary by high optimize option, irreversible obfuscationBind obfuscated scripts to fixed machine or expire obfuscted scriptsProtect obfuscated scripts by Themida (Only for Windows)Support PlatformsPython 3.7~3.12WindowsMany linuxs, include embedded systemsApple Intel and Apple SiliconQuick StartInstall:pip install pyarmorObfuscate the scriptfoo.py:pyarmor gen foo.pyThis command generates an obfuscated scriptdist/foo.pylike this:frompyarmor_runtimeimport__pyarmor____pyarmor__(__name__,__file__,b'\x28\x83\x20\x58....')Run it:python dist/foo.pyMore ResourcesHomeWebsite中文网站IssuesDocumentation
Package: pyarmor.cli.core
Pyarmoris a command line tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine or expire obfuscated scripts.This package provides prebuiltextension modulepytransform3andpyarmor_runtimerequired byPyarmorIt includes prebuilt extensions support the following platforms for Python 3.7+:Archx86_64i686aarch64aarch32armv7armv6RemarkDarwinYNoYNoNoNo[1]LinuxYYY(?)(?)(?)[2]WindowsYY(?)NoNoNo[3]AndroidYYYNoYNo[4]AlpineY(?)Y(?)(?)(?)FreeBSDYNoNoNoNoNoY: already availableNo: no support plan(?): not available now, maybe work in future[1]Apple Silicon only for Python 3.9+[2]This is built with glibc[3]Themedia protection extensions are introduced in v3.2.3[4]All below platforms are introduced in v3.2.3
Package: pyarmor.cli.runtime
Deprecated since Pyarmor 8.2.4This package is deprecated since Pyarmor 8.2.4.From Pyarmor 8.3, it will be replaced by the following runtime packages:pyarmor.cli.core.windowspyarmor.cli.core.linuxpyarmor.cli.core.darwinpyarmor.cli.core.alpinepyarmor.cli.core.freebsdpyarmor.cli.core.androidpyarmor.cli.core.themidaBecause it’s too big to include all the runtime files for all the platformsPyarmoris a command line tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine or expire obfuscated scripts.This package providesextension modulepyarmor_runtimefor cross platform obfuscation byPyarmorIt supports the following arches for Python 3.7+:Archx86_64i686aarch64aarch32armv7armv6RemarkDarwinYNYNNN[1]LinuxYYY???[2]WindowsYY?NNN[3]AndroidYYYNYN[f1]AlpineY?Y???[f1]FreeBSDYNNNNN[f1]Y: avaiableN: not available even in future?: not available now, maybe work in future[1]Apple Silicon only for Python 3.9+[2]This Linux is built with glibc[3]In v3.2.3, Themedia protection extensions are introduced[f1](1,2,3)All of these platforms are introduced in v3.2.3
Package: pyarmor-webui
pyarmor-webui is a web-ui for pyarmor. It’s a tool to obfuscate python
scripts, bind obfuscated scripts to fixed machine or expire obfuscated
scripts.Install bypip:pip install pyarmor-webuiStart it in the default web browser:pyarmor-webuiA light-weigh web server will run on default port 9096 to serve the
request of web pages. If this port is used by others, start it with
other port. For example:pyarmor-webui -p 9088Only run the web server, do not open web browser:pyarmor-webui -nFor more options:pyarmor-webui -hIf it’s not installed bypip, runpyarmor-webuiby this way:python server.pyBefore that make surepyarmorhas been installed:pip install pyarmorMore Resourcessnapshotspyarmorpyarmor-vueChange Logs2.2Change dependent pyarmor version to “>=8.2.2” when installed by pip.2.1New feature:
* Add language JapaneseFix Pyarmor 8 issues:
* Fix registration need confirm in the console
* Fix license file doesn’t work issue
* Fix obfuscating package issues2.0Support Pyarmor 8.0+Add option-7to use Pyarmor 7 commands1.4.1Change install_requires topyarmor~=7.6.0because it doesn’t work with Pyarmor 8.0+1.4.0Add new option–mix-str1.3.3Fix typos1.3.2Add advanced mode 51.3.1Add restrict mode 101, 102, 103, 104, 1051.2.9Add new platforms: darwin.aarch64.3, android.armv7, android.x86_64, android.x861.2.8In register dialog, it also supports to register a code.1.2.7Fix bug (#3): modepack all to one file with outer licensefailed.1.2.6Add restrict mode 5For Windows disable quick edit in CMD, as it can freeze the application1.2.5Fix issue: the relative path in extra pack options may not work1.2.4Fix issue: the icon with absolute path could not be found in WindowsFix select Src issue in Windows1.2.3Add new platform catalogVM Protectionwith 2 platforms:
- windows.x86_64.25
- windows.x86.25Rename platformalpine.*tomusl.*Add new platforms:
- musl.mips32
- linux.mips64
- linux.mips64el1.2.2In mode tab,Advanced Modesupport 2 extra values:
- 3, enable vm mode and advanced mode
- 4, enable vm mode and super modeWhen registering PyArmor, if there is a filepyarmor-regfile-1.zipis in the
current path, need not select any file, just click register directly1.2.1Fix Windows issue: there is no drive list when selecting source path from/1.2In mode tab,Obfuscate Code Objectsupport 3 values:
- 0, no obfuscate functions in module
- 1, obfuscate each function by quick algorithm
- 2, obfuscate each function by complex algorithm1.1In mode tab,Advanced Modesupport 3 values:
- 0, disable advanced mode
- 1, enable advanced mode
- 2, enable super mode1.0Add 2 pluginson,assert_armoredin the plugin selection listFix python 2.7 failed issue:TypeError: super() takes at least 1 argument (0 given)Add chinese language only for UI0.9Fix python2.7 issue: No module named shelxAdd new platform:uclibc.armv7.0In my projects page add a project actionDiagnoseto print debug information
in case something is wrong with building the projectIn project edit page add 2 buttons:Build,DiagnoseIn project edit page, the field ofPack optionsnow is textareaChange default restrict mode to10.8Fix license optionExtra datadoesn’t work issue
Package: pyarn
PYarnIf, for some weird reason, you need to parse a Yarn'syarn.lockfile using
Python, you are in the right place!PYarn is currently in an early developmente stage. It will create a dict from a
yarn.lock file, given the yarn.lock file is correct as perits
implementation.
At this moment, there is no guarantees that PYarn will behave well (e.g., raise
an error) in case a malformed Yarn lockfile is passed to PYarn.PYarn only supports Yarn v1 lockfiles. Parsing Yarn v2 lockfiles should be
trivial since they are yaml files.Developmentmake devel
make checkUsageThe following prints all the content in theyarn.lockfile:from pyarn import lockfile

my_lockfile = lockfile.Lockfile.from_file(FILE_NAME)
print(my_lockfile.data)
# or
my_lockfile.to_json()my_lockfile.datais adictwhere the top level keys are the top level entries
(i.e., the package names) for theyarn.lockfile entries.ReleasingBefore releasing a new version to PyPI, don't forget to bump the version number insetup.cfg.Make sure togit tagthe release commit with the corresponding version and create
a Github release explaining what is new.Afterwards, releasing to PyPI is quite simple:makebuild
twinecheckdist/*
twineuploaddist/*
Package: pyarnold
pyarnoldPython implementation ofArnoldCInstallationpip install pyarnoldExampleHelloWorld.arnoldcIT'S SHOWTIME
TALK TO THE HAND "hello world"
YOU HAVE BEEN TERMINATEDUsage$pyarnoldexamples/HelloWorld.arnoldc
$pyarnold--example
IT'S SHOWTIMETALK TO THE HAND "Hello World!"YOU HAVE BEEN TERMINATED$ pyarnold --example | pyarnold$ pyarnold -c <<EOF> IT'SSHOWTIME
>TALKTOTHEHAND"Hello World!">YOUHAVEBEENTERMINATED
>EOF
HelloWorld!Language DocumentationOfficial ArnoldC documentation
Package: pyaroma
Aroma DL-FrameworkAroma is a deep learning framework implemented in pythonInstallpip insall pyaromaDependenciespip install -r requirements.txtNOTE: you need topip install kaggleso you need provide kaggle.json file in your environment, check thislinkDesignAroma is designed based on 5 modules:nn module: which contains the core modules of the framework such as layers, activations, losses, parameters, forward and backward modulesoptim module: which contains the optimizers for updating the weights (NOTE: currently supporting just Adam and SGD)eval module: which contains the evaluation metrices for the modelvis module: which contains the visualization module for live loss update & othersutils module: which contains the dataloader that process data for training and validation and support auto download for mnist dataset fromkaggle, and others helper classes and functions for the frameworkDemofromnn.modelimportModelfromnn.activationsimport*fromnn.layersimport*fromnn.lossesimport*fromoptim.optimizersimportAdam,SGDfromutils.dataloaderimportDataLoaderfromeval.evaluationimportEvaluationfromviz.visualizationimportVisualizationfromutils.transformsimportTransformfromtqdmimporttqdmINPUT_FEATURE=784data_loader=DataLoader(batch_size=64,dataset_path="../")# TrainingX_train,y_train=data_loader.get_train_data()trans=Transform()X_train=trans.normalize(X_train)batches=data_loader.get_batched_data(X_train,y_train)# ValidationX_val,Y_val=data_loader.get_validation_data()X_val=trans.normalize(X_val)model=Model([Linear(INPUT_FEATURE,128,init_type='xavier'),ReLU(),Linear(128,64,init_type='xavier'),ReLU(),Linear(64,32,init_type='xavier'),ReLU(),Linear(32,16,init_type='xavier'),ReLU(),Linear(16,10,init_type='xavier'),Softmax()],loss=NLLLoss(),optimizer=Adam(lr=0.001))epoch=16vis=Visualization()foriinrange(epoch):forX,Yintqdm(batches):y_pred=model.forward(X)loss=model.compute_cost(Y,y_pred)model.backward()model.step()vis.plot_live_update(xlabel="Epoch No.",x=i+1,ylabel="Loss",y=loss)vis.pause_figure()model.save_model()# Evaluating modelPred_=model.predict(X_val)Pred_=np.argmax(Pred_,axis=0)Y_val=Y_val.T.squeeze()eval=Evaluation(Y_val,Pred_,average='weighted')acc=eval.compute_accuracy()prec=eval.compute_precision()recall=eval.compute_recall()f1_score=eval.compute_f1_score()conf_mat=eval.compute_confusion_mat()print("Accuracy: ",acc,"Precision: ",prec,"Recall: ",recall,"F1_Score: ",f1_score)vis.plot_confusion_matrix(conf_mat)
Package: pyaromatics
pyaromaticsThis is a collection of tools I use for several of my projects, but could be helpful for somebody else. Some are functions that I've written from scratch,
but many are collected from other projects, but it was helpful for me to have them centralized. If they were collected from another project, the original
is referenced close to the function or at the beginning of the script. If I forgot to reference any that was not mine, let me know! The author has to be recognized.It can be installed bypip install pyaromatics