Saravanan666/pypi-org huggingface dataset:
Package: arithmetic-parsing
arithmeticParsingArithmetic parsing is a simple python library designed for parsing arithmetic expressions.It is designed to be easy to use and to maintain, and does not focus on optimization as much as it does ease of use.This library is designed to use minimal dependancies, and the only non-standard-library module this uses istreelibInstallationTo install, it is as easy as using pip on this git repositoryI recommend using python -m pip instead of just pip, as this confirms that you are installing on the right python versionpython3.9-mpipinstallarithmetic-parsingYou can also install by cloning and then running setup.pygitclonehttps://github.com/wireboy5/arithmeticParsingcdarithmeticParsing
python3.9setup.pyinstallUsagearithmetic-parsing was designed to be as easy as possible to useA basic example:importarithmetic_parsingparseString="(testVar1 + 2 * 6) + (testVar2 + 2 * 6)"parser=arithmetic_parsing.Parser()parsed=parser.parse(parseString)print(parsed)This will output this:base
└──+├──+│├──*││├──2││└──6│└──testVar1└──+├──*│├──2│└──6└──testVar2Also, because this uses treelib, you can get a json result:print(parsed.as_json()){"base":{"children":[{"+":{"children":[{"+":{"children":[{"*":{"children":["2","6"]}},"testVar1"]}},{"+":{"children":[{"*":{"children":["2","6"]}},"testVar2"]}}]}}]}}Another output form is the list outputprint(parsed.as_list())[['dyn','base_0','+','testVar2','12'],['dyn','base_1','+','testVar1','12'],['dyn','base_2','+','base_1','base_0']]Lets take a look at the first item:['dyn','base_0','+','testVar2','12']And lets break it downDynThis specifies that it is a dynamic value, and not a constantbase_0This is the variable name, If you were to convert this into something like python.+This is the operatortestVar2This is the first operand12This is the second operandNotice how it has 12 instead of 2 * 6?That is because it is optimizing the result.We can disable this optimization by setting optimize to false:parser=arithmetic_parsing.Parser(optimized=False)Also notice that the parsed list has the values in a different order than you would expect?The parser automatically sorts them to be as close as possible to their first reference, from the top down.This to can be disabled:parser=arithmetic_parsing.Parser(sort=False)We can use this to convert the value to assembly:fromarithmetic_parsing.examplesimportassemblyasm=assembly.listToAssembly(parsed.as_list(),parseString)asm="\n".join(asm)print(asm)This will output NASM code:movrbx,[testVar2]addrbx,12movrbx,[testVar1]addrbx,12movrax,rbxaddrax,rbx'NOTE: Do not use this function for converting to assembly in an actual program.This function is for demonstration purposes and has not been tested thouroughly
Package: arithmeval
arithmeval - Arithmetic Expression Evaluatorarithmevalis a Python package that provides a utility function to evaluate arithmetic expressions, given a dictionary of values. It supports basic arithmetic operations and can handle simple mathematical calculations.
It also supports string concatenation, though it is not intended to be used as a general-purpose expression evaluator, therefore tests for string concatenation are not included.Arithmeval is a secure, safety-first expression evaluator. It only supports the following list of operations:Addition (+)True division (/)Floor division (//)Modulus (%)Multiplication (*)Exponentiation (**)Subtraction (-)InstallationYou can installarithmevalusingpip:pipinstallarithmevalUsageImport theevaluatefunction from the arithmetic_eval module:fromarithmetic_evalimportevaluateUse the evaluate function to calculate the value of an arithmetic expression:expression="a + b"values_dict={"a":1,"b":2}result=evaluate(expression,values_dict)print(result)# Output: 3The evaluate function takes the following arguments:expression (str): The arithmetic expression to be evaluated.value_dict (Optional[dict]): A dictionary containing variable values used in the expression.arithmetic_exception_to_default_value (Optional[dict]): A dictionary mapping specific arithmetic exceptions to default values.The function returns an int, float, or str representing the result of the expression.Error HandlingTheevaluatefunction raises various exceptions in case of errors:SyntaxError: If the expression is not a valid Python expression.NameError: If a variable is not defined in the values_dict.NotImplementedError: If the expression contains an unsupported operation.MaliciousInputError: If the expression is a malicious input.Examplesfromarithmetic_evalimportevaluateexpression="2 * (x + y)"value_dict={"x":3,"y":4}result=evaluate(expression,value_dict)print(result)# Output: 14fromarithmetic_evalimportevaluateexpression="10 / (a - 5)"value_dict={"a":5}result=evaluate(expression=expression,value_dict=value_dict,arithmetic_exception_to_default_value={ZeroDivisionError:0})print(result)# Output: 0Note that it is not recommended to use thearithmetic_exception_to_default_valueargument. It is only provided for convenience and should be used with caution. The default behavior for any ArithmeticError is to return 0.
If you insist on overriding the default return value for arithmetic exceptions, make sure to use a dictionary mapping each ArithmeticError to a default value.A list of arithmetic exceptions can be foundhere.LicenseThis package is distributed under the BSD 3-Clause License. SeeLICENSEContributingContributions to arithmeval are welcome! Feel free to open issues or pull requests on the GitHub repository.AcknowledgementsThis package was inspired by the need for a simple and safe arithmetic expression evaluator in Python.
Package: arithmos-cipher
Arithmos CipherArithmos Cipher is the most simpleCryptographythat created inPython.
Arithmos is taken from the Greek word (Arithmós or αριθμός) which means "Number".Arithmos Cipher was created onJanuary 14, 2022and first released to the public onMarch 18, 2022.Not recommended for encrypting important thing.Explanation of how it worksBasically, the given sentences will be exchanged with numbers in alphabetical order (Example:a = 01toz = 26andA = 27toZ = 52). For alphabet with one digit will be added0in front of it. Each one of the alphabet has a2digit number. And foruppercase lettersstarting from the number27after lowercase(z = 26).Here the example of the explanation above :Example = 31240113161205

31 : E
24 : x
01 : a
13 : m
16 : p
12 : l
05 : eUsageInstallpip install arithmos-cipherExampleVia CLICheck on thedocumentation.Note: Arithmos Cipherchainarenot availableon CLI.Via packagesCheck onexamplesdirectory.Licence & CopyrightThis Project underMIT License.Copyright (c) 2022-present LyQuid
Package: arithpro
Created By Sparsh AgarwalCopyright(c) <2021><Pyxis/Sparsh Agarwal>Created as a mathematical tool to solve the common qustions related to arithmetic progressionsand all its possibilities.This package Pertains to all possibilities given:Sum - It pertains to possibilities based on  first term availability (To Use Just type in arithpro.ap_sum() )first term (To Use Just type in arithpro.ap_firstTerm() )last term - It pertains to possibilities based on  first term availability(To Use Just type in arithpro.ap_lastTerm() )any term - It pertains to possibilities based on  first term availability(To Use Just type in arithpro.ap_anyTerm() )More given onhttps://github.com/faint-artist/arithpro-package
Package: arith-tools
Arith ToolsArith tools package for  basic arithmetic operations.In the arithmetic of love, one plus one equals everything, and two minus one equals nothing.Goals of the project:Arith Tools is an arithmetic module which can be used to solve a very complicated arithmetic operations very easily.Arith Tools handles everything from the start of thinking of a very algorithm to it's end by just using this module.BLTAO, Bring Life To Arithmetic operations. Think of something more creative rather than wasting time in writing simpler code.How to install ?NOTE: It is recommended to set up avirtual environment.In order to install this module, you need to follow the command given below.python-mpipinstallarith-toolsSupported IDEVSCodeInstallPython extensionInstallPylance extensionSetPylanceas your Python Language ServerInstallarith-toolsin your environment:python -m pip install arith-toolsBoth type checking and auto-complete should work for thy service. No explicit type annotations required, write your code as usual.PyCharmInstallarith-toolsin your environment:python -m pip install arith-toolsBoth type checking and auto-complete should work for thy service. No explicit type annotations required, write your code as usual. Auto-complete can be slow on big projects or if you have a lot of installed arith-tools submodules.IDLEFollow the same procedure as before.How to use the module ?importarithtools#To reverse a given number.num=int(input("Enter a number: "))print(arithtools.reverse(num))What are expected from Arith Tools ?Fibonacci Series.Reverse a given number.Convert a number to word.Check for Automorphic number.Check for Peterson Number.Check for sunny number.Check for Tech number.Check for Fascinating Number.Check for Keith or repfigit Number.Check for Neon Number.Check for Spy Number .Check for amicable number.Check for Terrace Number.......... and many more.
(Check out the Project to find more.)NOTE: Runhelp(arithtools)in interactive window or terminal to get more info.Versioningarith-toolsversion followsPEP 440format.Support and Contributing.Developers are free to contribute to this open source projects and report bugs at any time in thearith-toolsrepository.
Package: arivo-schedule
Python job scheduling for humans. Run Python functions (or any other callable) periodically using a friendly syntax.A simple to use API for scheduling jobs, made for humans.In-process scheduler for periodic jobs. No extra processes needed!Very lightweight and no external dependencies.Excellent test coverage.Tested on Python and 3.7, 3.8, 3.9, 3.10, 3.11Usage$pipinstallscheduleimportscheduleimporttimedefjob():print("I'm working...")schedule.every(10).seconds.do(job)schedule.every(10).minutes.do(job)schedule.every().hour.do(job)schedule.every().day.at("10:30").do(job)schedule.every(5).to(10).minutes.do(job)schedule.every().monday.do(job)schedule.every().wednesday.at("13:15").do(job)schedule.every().day.at("12:42","Europe/Amsterdam").do(job)schedule.every().minute.at(":17").do(job)defjob_with_argument(name):print(f"I am{name}")schedule.every(10).seconds.do(job_with_argument,name="Peter")whileTrue:schedule.run_pending()time.sleep(1)DocumentationSchedule’s documentation lives atschedule.readthedocs.io.MetaDaniel Bader -@dbader_org-mail@dbader.orgInspired byAdam Wiggins’article“Rethinking Cron”and theclockworkRuby module.Distributed under the MIT license. SeeLICENSE.txtfor more information.https://github.com/dbader/schedule
Package: arize-phoenix-evals
arize-phoenix-evalsPhoenix provides tooling to evaluate LLM applications, including tools to determine the relevance or irrelevance of documents retrieved by retrieval-augmented generation (RAG) application, whether or not the response is toxic, and much more.Phoenix's approach to LLM evals is notable for the following reasons:Includes pre-tested templates and convenience functions for a set of common Eval “tasks”Data science rigor applied to the testing of model and template combinationsDesigned to run as fast as possible on batches of dataIncludes benchmark datasets and tests for each eval functionInstallationInstall the arize-phoenix sub-package viapippipinstallarize-phoenix-evalsNote you will also have to install the LLM vendor SDK you would like to use with LLM Evals. For example, to use OpenAI's GPT-4, you will need to install the OpenAI Python SDK:pipinstall'openai>=1.0.0'UsageHere is an example of running the RAG relevance eval on a dataset of Wikipedia questions and answers:importosfromphoenix.evalsimport(RAG_RELEVANCY_PROMPT_TEMPLATE,RAG_RELEVANCY_PROMPT_RAILS_MAP,OpenAIModel,download_benchmark_dataset,llm_classify,)fromsklearn.metricsimportprecision_recall_fscore_support,confusion_matrix,ConfusionMatrixDisplayos.environ["OPENAI_API_KEY"]="<your-openai-key>"# Download the benchmark golden datasetdf=download_benchmark_dataset(task="binary-relevance-classification",dataset_name="wiki_qa-train")# Sample and re-name the columns to match the templatedf=df.sample(100)df=df.rename(columns={"query_text":"input","document_text":"reference",},)model=OpenAIModel(model="gpt-4",temperature=0.0,)rails=list(RAG_RELEVANCY_PROMPT_RAILS_MAP.values())df[["eval_relevance"]]=llm_classify(df,model,RAG_RELEVANCY_PROMPT_TEMPLATE,rails)#Golden dataset has True/False map to -> "irrelevant" / "relevant"#we can then scikit compare to output of template - same formaty_true=df["relevant"].map({True:"relevant",False:"irrelevant"})y_pred=df["eval_relevance"]# Compute Per-Class Precision, Recall, F1 Score, Supportprecision,recall,f1,support=precision_recall_fscore_support(y_true,y_pred)To learn more about LLM Evals, see theLLM Evals documentation.
Package: arizon-usb-apiserver
ARIZON USB APIServerAn APIServer for ARIZON USB force sensors.InstallationClone &cdinto this repository then:pythonsetup.pyinstallOr download from PyPI:python-mpipinstallarizon-usb-apiserverGet StartedThe apiserver operates in two modes: RESTful and gRPC. They share the same configuration schema.BasicsTo read the sensor locally, use this snippet:fromserialimportSerialfromarizon_usb_apiserverimportSensorif__name__=='__main__':conn=Serial("COM16",115200)sensor=Sensor(conn)sensor.reset()whileTrue:print(sensor.read_once())To generate configuration from command line interaction run:python-marizon_usb_apiserverconfigureRESTfulTo launch the apiserver in RESTful mode, set theAPI_SERVER_RESTFULto1before run apiserver command:exportAPI_SERVER_RESTFUL=1Or run with variableAPI_SERVER_RESTFUL=1python-marizon_usb_apiserverapiserverPowershell:Set-Item -Path Env:API_SERVER_RESTFUL -Value 1Or you can directely runapiserver.restfulpython-marizon_usb_apiserverapiserver.restfulHere are some examples to test the apiserver using curlInit sensorcurl-X'PUT'\'http://127.0.0.1:8080/v1/arizon/force?flag=true'\-H'accept: application/json'Read sensorcurl-X'GET'\'http://127.0.0.1:8080/v1/arizon/force'\-H'accept: application/json'Shutdown sensorcurl-X'PUT'\'http://127.0.0.1:8080/v1/arizon/force?flag=false'\-H'accept: application/json'gRPCRun this commandpython-marizon_usb_apiserverapiserverOr you can directely runapiserver.grpcpython-marizon_usb_apiserverapiserver.grpcTesting with cli toolsTo test RESTful API, run:python-marizon_usb_apiservertest.restfulYou will be asked to input API endpoint.To test gRPC API, run:python-marizon_usb_apiservertest.grpcYou will be asked to input API endpoint.Generate ClientRestfulFirst launch the apiserver, then runopenapi-python-client:openapi-python-clientgenerate--urlhttp://127.0.0.1:8080/openapi.json
rm-rf./arizon_usb_driver/client/restful
mvfast-api-client/fast_api_client./arizon_usb_driver/client/restful
rm-rf./fast-api-clientGRPCFirstcd arizon_usb_apiserver/grpc, then run:python-mgrpc_tools.protoc-I../../manifests/protos--python_out=.--pyi_out=.--grpc_python_out=.../../manifests/protos/force_packet.protoYou might need to replaceimport force_packet_pb2 as force__packet__pb2withimport arizon_usb_apiserver.grpc.force_packet_pb2 as force__packet__pb2Serial ProtocolFieldContentHead0xFEStatus1 ByteData3 ByteXOR checksum1 ByteStatus: 4 bits of address + 4 bits represents number of digitsData: 3 bytes of signed integers, no digit, big-endian.Checksum: xor() of first 5 bytesConfigurationHere is an template of configurationarizon_usb_apiserver:# Keyapi:# Control API settingsinterface:0.0.0.0# Listen interfaceport:8080# Listen portdebug:false# Enable debugserials:# Serial connections, can be a list-baudrate:115200# Baudrate, default is 115200, no need to changeport:COM8# Port nameaddr:"dev1"# Friendly namedata_path:./arizon_data# Path to save data
Package: arjun
ArjunHTTP Parameter Discovery SuiteWhat's Arjun?Arjun can find query parameters for URL endpoints. If you don't get what that means, it's okay, read along.Web applications use parameters (or queries) to accept user input, take the following example into considerationhttp://api.example.com/v1/userinfo?id=751634589This URL seems to load user information for a specific user id, but what if there exists a parameter namedadminwhich when set toTruemakes the endpoint provide more information about the user?This is what Arjun does, it finds valid HTTP parameters with a huge default dictionary of 25,890 parameter names.The best part? It takes less than 10 seconds to go through this huge list while making just 50-60 requests to the target.Here's how.Why Arjun?SupportsGET/POST/POST-JSON/POST-XMLrequestsAutomatically handles rate limits and timeoutsExport results to: BurpSuite, text or JSON fileImport targets from: BurpSuite, text file or a raw request fileCan passively extract parameters from JS or 3 external sourcesInstalling ArjunYou can installarjunwith pip as following:pip3 install arjunor, by downloading this repository and runningpython3 setup.py installHow to use Arjun?A detailed usage guide is available onUsagesection of the Wiki.Direct links to some basic options are given below:Scan a single URLImport targetsExport resultsUse custom HTTP headersOptionally, you can use the--helpargument to explore Arjun on your own.CreditsThe parameter names wordlist is created by extracting top parameter names fromCommonCrawldataset and merging best words fromSecListsandparam-minerwordlists into that.db/special.jsonwordlist is taken fromdata-payloads.
Package: arjuna
ArjunaArjuna is aPython based test automation frameworkdeveloped byRahul Verma. It is an open source, Apache Licensed software.Rahul has implemented smaller variants of features in Arjuna across frameworks and organizations, or given advise around it. However Arjuna being a generic library has the most complete implementation of his ideas, away from project specific contexts and constraints.For test execution, Arjuna is implemented as apytestplugin and provides its own markup over pytest as its underlying test engine. If you like, you can make use of Arjuna with any other test engine or custom frameworks as well.You'd needPython 3.8+to make use of Arjuna.Note: On Linux, the built-in Python3 build has issues with the Python's built-in enum module which is heavily used in Arjuna. One alternative is to install ActiveState Python on linux. Advanced users can go for installing a custom Python build.DocumentationArjuna documentation is integated with ReadTheDocs.Documentation for thelast released versionRelease build goes through the existing tests and hence is better for production use than master branch.Documentation for thelatest master branchPlease note that the master branch is an active branch and can have untested code.Contains the latest and greatest upcoming features and updates to existing ones.
Package: arjunarth
arjunarth LibraryDarkWeb Userbot PyrogramDisclaimer️                       ⚠️ WARNING FOR YOU ️ ️⚠️
   arjunarth is used to help your account activities on Telegram
   We are not responsible for what you misuse in this repository
   !  Be careful when using this repository!
   If one of the members misuses this repository, we are forced to ban you
   Never ever abuse this repositoryInstallingpip3 install arjunarthExample [EVAL]fromarjunarth.carbonimportmake_carbonwrite="i'am Arjunarth"carbon=awaitmake_carbon(write)awaitc.send_photo(m.chat.id,carbon)
Package: ark-algebra-py
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: ark-api
ark-apiark-api is an easy to use, fully open-source package to help you automate tasks inArk: Survival Evolved.Installationark-api is is available on pypi and can be downloaded using pip, note that python 3.10+ is required.pipinstallark-apiFeaturesPythonic representations of various in-game objects.Full control over the player movements.Reading of in-game settings / keybinds from ark .ini files.Server queries for server status, day, IP, port..Item representations (and the recipes to craft them)Tools to calculate the maximum amount of items craftable with a map of materialsLots of control over inventory interactionsGrabbing of the ark boundaries / scaling to resolutionExamplesAlot of examples how to use the ark-api can be found in theark-gacha-botI am providing, as it is heavily based on the ark-api.First stepsFirst, we need to set the path to the ark directory, so it can load the .ini files.fromarkimportconfigconfig.ARK_PATH="C:\..."Controlling the playerfromarkimportPlayerplayer=Player(health=300,weight=800,food=100,water=100)# turning the playerplayer.turn_x_by(90)player.turn_y_by(-20)# walking with the playerplayer.walk("w",duration=2)Making a small scriptLet's make a small script to automate the process of filling a forge with metal from a dedicated storage!fromarkimportPlayer,TekDedicatedStorage,IndustrialForge,itemsplayer=Player(300,800,100,100)dedi=TekDedicatedStorage()forge=IndustrialForge()dedi.open()dedi.transfer_all()dedi.close()player.turn_x_by(100,delay=0.5)forge.open()player.transfer_all(items.RAW_METAL)forge.turn_on()forge.close()