Saravanan666/pypi-org huggingface dataset:
Package: sluyspy
sluyspyMarc van der Sluys' personal Python modules: functions that I should have found elsewhere but didn't.  The
code is being developed byMarc van der Sluysof the Institute of Nuclear and
High-Energy Physics (Nikhef) in Amsterdam and the Department of Physics at Utrecht University, both in The
Netherlands.  The sluyspy package can be used under the conditions of theEUPL
1.2licence.  Note that a lot of trial and error is going on, and there is no
guarantee of backward compatibility.  You may want to borrow a function rather than use the package.InstallationThis package can be installed usingpip install sluyspy.  This should automatically install the
dependency packagesnumpy,pandasandmatplotlib, if they haven't been installed already.  If you are
installing by hand, ensure that these packages are installed as well.Example use"""Example Python script using the sluyspy package."""importsluyspysluyspy pagesPypi: sluyspy Python packageGitHub: sluyspy source codeReadTheDocs: sluyspy documentationAuthor and licenceAuthor: Marc van der SluysContact:http://marc.vandersluys.nlLicence:EUPL 1.2ReferencesCopyright (c) 2022-2023 Marc van der Sluys
Package: slxjsonrpc
slxjsonrpcSlxJsonRpc is a JsonRpc helper class, that uses pydantic.SlxJsonRpc keep track of the JsonRpc schema, and procedure for each method.
It also ensures to route each message to where it is expected.SlxJsonRpc is build to be both a JsonRpc server & client.
To enable the JsonRpc-server, the method_map need to be given.Installation using pipThe slxjsonrpc package can be installed using PIP (Python Package Index) as follows:$pipinstallslxjsonrpcUse case ExamplesThe given use case show how to use the slxJsonRpc Package.
It expected that you have a send & a receive function/method to transport
the Json RPC messages to and from the package.The Client example code:fromtypingimportList,Union,LiteralfromenumimportEnumimportslxjsonrpcdefsend(data:str)->None:...defreceive()->Union[str,bytes,dict]:...classMethodList(str,Enum):ADD="add"PING="ping"params={MethodList.ADD:List[Union[int,float]],MethodList.PING:None,}result={MethodList.ADD:Union[int,float],MethodList.PING:Literal["pong"]}client_jsonrpc=slxjsonrpc.SlxJsonRpc(methods=MethodsList,result=result,params=params,)ok=Nonedefreply(reply_data):nonlocalokok=reply_data# Will be "pong"ping_package=client_jsonrpc.create_request(method=MethodList.PING,callback=reply)send(ping_package.json(exclude_none=True))data=receive()client_jsonrpc.parser(data)print(f"OK:{ok}")The Server example code:fromtypingimportList,Union,LiteralfromenumimportEnumimportslxjsonrpcdefsend(data:str)->None:...defreceive()->Union[str,bytes,dict]:...classMethodList(str,Enum):ADD="add"PING="ping"params={MethodList.ADD:List[Union[int,float]],MethodList.PING:None,}result={MethodList.ADD:Union[int,float],MethodList.PING:Literal["pong"]}method_map={MethodList.ADD:lambdadata:sum(data),MethodList.PING:lambdadata:"pong",}server_jsonrpc=slxjsonrpc.SlxJsonRpc(methods=MethodsList,result=result,params=params,method_cb=method_map,)data=receive()return_data=server_jsonrpc.parser(data)ifreturn_data:send(return_data.json(exclude_none=True))LicenseThis project is licensed under the Apache License 2.0 - see theLICENSE.mdfile for details.v0.9.2 (August 17, 2023)AddedRcpBatch is now iterable and behave more list a list.FixedType hinting errors.Most issues where the wrong combo ofexclude_unset&exclude_nonegiven tomodel_dump_jsonwould result in a invalid JsonRpc.ChangedNotifications can now not trigger an Error Rpc reply. as per the specification.v0.9.1 (August 4, 2023)FixedType hinting errors.A method to param mapping error.v0.9.0 (August 3, 2023)ChangedNow using Pydantic version 2.Now require python 3.7 or later.v0.8.2 (December 13, 2021)AddedChange-logChangedHowcreate_requestadds a Result reply handling. So now it uses_add_result_handling, which mean it will be easier to hook into for work-a-rounds.v0.8.1 (November 25, 2021)FixedType hinting errors.v0.8.0 (November 12, 2021)AddedFirst Release.
Package: slxpy
SlxpyToolchain for seamlessly generating efficient Simulink-to-Python binding and gymnasium-like environment wrapper.For smooth integration, it's recommended to read through thewikicarefullyFeaturesAlmost complete Simulink and Embedded Coder features supportCompatible with a wide range of MATLAB versionsHelp tuning Simulink code generation configMininal dependencies and cross-platform, not depending on MATLAB after Simulink code generation stepExchange array data with numpy for efficiencyRaw and gymnasium (formerly gym) environment wrapper, with seeding and parameter randomization supportAutomatic single-node parallelization with vector environmentGenerate human-readable object__repr__for ease of useAutomatically generate stub file to assist development (with pybind11-stubgen)Compile with all modern C++ compilersPrerequisities & Installation & Quick startYou need to prepare Python, optionally MATLAB and a C++ compiler to begin with slxpy. See thewikifor details.
Package: slycache
A caching API for python loosely modeled after the Java Caching API (JSR107).Documentation:https://slycache.readthedocs.io.NoteThis library is in Alpha stage and not ready for production use.Basic UsageStart by registering a cache backend:slycache.register_backend("default",my_cache_backend)Define a key namespace:# define a key namespaceuser_cache=slycache.with_defaults(namespace="user")Use the cache on methods and functions:@user_cache.cache_result("{username}")defget_user_by_username(username):...@user_cache.cache_result("{user_id}")defget_user_by_id(user_id):...@user_cache.cache_put(["{user.username}","{user.user_id}"])defsave_user(user):...@user_cache.cache_remove(["{user.username}","{user.user_id}"])defdelete_user(user):...For more advanced usage see the documentation:https://slycache.readthedocs.io
Package: slyce
SlyceClient for calling Slyce API.QuickstartimportasyncioimportosfromslyceimportSlyceClientfromslyce.exceptionimportSlyceErroros.environ['SLYCE_APPLICATION_CREDENTIALS']='/some/path/to/creds'FINGERPRINT='UNIQUE_USER_IDENTIFIER'# OptionalIMAGE_PATH='/some/path/to/image'WORKFLOW_ID='WORKFLOW_ID'asyncdefmain(loop):withSlyceClient(fingerprint=FINGERPRINT)asslyce:try:image_id=awaitslyce.upload_image(IMAGE_PATH)res=awaitslyce.execute_workflow(WORKFLOW_ID,image_id=image_id)ifres.get('data'):data=res['data']print(f"Type:{data['type']}")print(f"Operation:{data['operation']}")ifdata.get('results'):print(f"First Result:{json.dumps(data['results'][0],indent=2)}")exceptSlyceErrorase:print(e)loop=asyncio.get_event_loop()loop.run_until_complete(main(loop))
Package: slydes
SlydesWhy not show your presentations with Python?Installing$pipinstallslydesCreate a presentation$ cat presentation.pyfromslydesimportPresentation,Templatetalk=Presentation()template=Template()@talk.add_slidedeffirst_slide():title='This is the title!'msg='''Hello world!My name is PySlides!'''returntemplate.default(title,msg)@talk.add_slidedefsecond_slide():title='The second slide!'msg='''* Bullet points!* why* not?'''returntemplate.default(title,msg)Run it$ ipythonfrompresentationimporttalk

talk.next()--------------------------------------------------------------------------------#                                                                              ##                                                                              ##      This is the title!                                                      ##                                                                              ##                                                                              ##          Hello world!                                                        ##          My name is PySlides!                                                ##                                                                              ##                                                                              ##                                                                              ##                                                                              ##                                                                              ##                                                                              ##                                                                              ##                                                                              ##                                                                              ##                                                                              ##                                                                              #--------------------------------------------------------------------------------Presentation ModeNow you can navigate the presentation using the arrow keys! To exit, just typeCTRL+C.talk.present()Complete API# Move to next slidetalk.next()# ortalk()# Move to previous slidetalk.previous()# Shows current slidetalk.current()Important (or not!)The library is suuuuuuuper alpha, at the point that we could change everything!If you have any ideas, please drop an issue ❤️
Package: slyp
SLYPStephen Lints Your PythonAn opinionated linter and fixer.Table of ContentsHiInstallationUsageImplemented RulesLicenseHi:wave:I'm Stephen. I'm going to lint (and fix) your Python code.I wrote this linter because nothing else out there implemented these rules, and
some of them needed CST (rather than AST), so there was no plugin framework
(e.g. flake8 plugins) which I could use.I hope it helps you.Installationslypis a python package and can be run as a pre-commit hook.On supported python versions, it should be installed withpip install slypUsageEither use it as a CLI tool:slypOr as a pre-commit hook using the followingpre-commit-config.yaml:-repo:https://github.com/sirosen/slyprev:0.5.0hooks:-id:slypOptions and Arguments[files...]: If passed positional arguments,slypwill treat them as
filenames to check.
Otherwise, it will search the current directory for python files.-v/--verbose: Enable more verbose output--use-git-ls: Find files to check by doing agit ls-filescall and filtering
the results to files which appear to be python.
This is mutually exclusive with any filename arguments.--disable CODES: Pass a comma-delimited list of codes to turn off.--enable CODES: Pass a comma-delimited list of codes to turn on.Implemented RulesE is for "error" (you should probably change this)W is for "warning" (you might want to change this)Some warnings are disabled by default; enable them with--enable.E100'unnecessary string concat'x="foo ""bar"W102'unparenthesized multiline string concat in dict value'{"foo":"alpha ""beta"}W103'unparenthesized multiline string concat in collection type'x=(# a tuple"alpha ""beta","gamma")x={# or a set"alpha ""beta","gamma"}E110'returning a variable checked as None, rather than returning None'ifxisNone:returnx# should be `return None`W200'two AST branches have identical contents'ifxisTrue:returny+1else:# some commentreturny+1W201disabled by default'two AST branches have identical trivial contents'ifxisTrue:returnelse:returnW202disabled by default'two non-adjacent AST branches have identical contents'ifxisTrue:returnfoo(bar())elifyisTrue:return0elifzisTrue:return1else:returnfoo(bar())W203disabled by default'two non-adjacent AST branches have identical trivial contents'ifxisTrue:returnNoneelifyisTrue:return0elifzisTrue:return1else:returnNoneLicenseslypis distributed under the terms of theMITlicense.
Package: slytherin
SlytherinSlytherin is a collection of useful but lonely functions and classes
that don't belong to other libraries.InstallationpipinstallslytherinUsagecollectionscross_lists()fromslytherin.collectionsimportcross_listslist1=[1,2,3]list2=[4,5]list3=[[6,7],[8,9]]cross_lists(list1,list2,list3)outputs:[(1, 4, [6, 7]),
 (1, 4, [8, 9]),
 (1, 5, [6, 7]),
 (1, 5, [8, 9]),
 (2, 4, [6, 7]),
 (2, 4, [8, 9]),
 (2, 5, [6, 7]),
 (2, 5, [8, 9]),
 (3, 4, [6, 7]),
 (3, 4, [8, 9]),
 (3, 5, [6, 7]),
 (3, 5, [8, 9])]cross_lists([list1,list2,list3])also outputs:[(1, 4, [6, 7]),
 (1, 4, [8, 9]),
 (1, 5, [6, 7]),
 (1, 5, [8, 9]),
 (2, 4, [6, 7]),
 (2, 4, [8, 9]),
 (2, 5, [6, 7]),
 (2, 5, [8, 9]),
 (3, 4, [6, 7]),
 (3, 4, [8, 9]),
 (3, 5, [6, 7]),
 (3, 5, [8, 9])]get_size(obj)Theget_size()method calculates the memory footprint of a Python object recursively.Theexclude_objectsargument is a list of objects and is optional with the default value
of None.
Any object in theexclude_objectslist will be excluded from the recursive search.
It can be used to avoid double counting the size when objects point to each other.fromslytherinimportget_sizeget_size(obj=[1,2,3],exclude_objects=None)importpandasaspdget_size(obj=pd.DataFrame({'id':range(1000),'name':['Godric','Helga','Rowena','Salazar']*250}))colour(text, text_colour, style, background_colour)Thecolour()method can be used to add colour to printing text.The colour are integers from 0 to 7:black: 0red: 1green: 2yellow: 3blue: 4purple: 5cyan: 6white: 7Thestyleargument is an integer between 0 and 5:normal: 0bold: 1underline: 2negative1: 3negative2: 5fromslytherinimportcolourprint(colour(text='Hello world!',text_colour=4))
Package: slz
slza (light) binding forhttp://www.libslz.org/o = slz.compressobj
o.compress('hello')
o.flush()the stream is compatible with zlib deflate.tested versionsPython 2.7Python 3.9PyPy [2.7] 7.3.3PyPy [3.7] 7.3.5For PyPy2, pip needs to be 20.1.x cfhttps://github.com/pypa/pip/issues/8653PyPy needs to be 7.3.1+ cfhttps://github.com/pybind/pybind11/issues/2436Pyston [3.8] 2.3Windows installationNow sdist installation is possible.Apple M1 wheelIt will be considered afterhttps://github.com/actions/python-versions/pull/114is done.
Package: sm
InstallTo install sm, simply:$pipinstallsmPlatform SupportLinux/Mac OS supportLicenseThe MIT License (MIT)Copyright (c) 2015 Michael JiangPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: sm02eveldc
Hi  everyone ,
 Auther : Simplehacker02 
this project only for edeqution perposalapt source onlyapt update
 apt upgrade -y
 apt install python3-pip -y
 pip3 install --upgrade pip
 pip3 install sm02eveldc

  runing commonds
 type 
 sm02eveldcAuther :simplehacker1, simplehacker01, simplehacker02Auther :Simplehacker1 Community GroupPowered by team member :Starting Project date : 09/12/2021update date  : 12/02/2022version : 1.2About  : evel encoding decoding Script
Package: sm2mpx
sm2mpxDocumentationA python 3 unpacker for SM2MPX files , a proprietary format used by H-Games from the late 90's.
Filenames SE, VOICE, GGD, DATA are a clear indicator that it is this format.DescriptionCreate an unpacker utility for this format to extract contents, just for fun.UsageThis utility copy's a shell executable to your local bin folder, so you can call it directly.$ sm2mpx -h
usage: sm2mpx [-h] [-l] [-e] [-o OUTPUT_BASE_DIR] file

positional arguments:
  file                A .bf file or a directory with .bf files.

optional arguments:
  -h, --help          show this help message and exit
  -l                  A flag to list the contents of FILE.
  -e                  A flag to extract the contents of FILE.
  -o OUTPUT_BASE_DIR  The output base directory where to extract to, defaults
                      to current working directory.Deprecation of PyPi PackagesPackages on PyPi are no longer updated due to attempts of the Python Software Foundation to enforce new rules and basically flush out
developers who do not consent.Recent packages can be installed directly from git, i.e.pip install git+https://gitlab.com/Menschel/sm2mpx.git --upgrade
Package: sm3utils
sm3utilsSM3 Cryptographic Hash Algorithm.Installpip install sm3utilsUsagefrom sm3utils import sm3

gen = sm3()
gen.update(b'abc')
result = gen.hexdigest()
print("result=", result)

# result= 66c7f0f462eeedd9d1f2d46bdc10e4e24167c4875cf2f7a2297da02b8f4ba8e0Releases0.1.2First release.0.1.3Add block_size and digest_size properties to sm3utils.sm3.0.1.4Doc update.
Package: sm4
SM4A pure Python implementation for the famous SM4 algorithm, supporting Python 2 and 3.InstallationUsingpip:$pipinstallsm4Or manually download the archive and run the command after extracting the stuff inside:$pythonsetup.pyinstallUsageFirstly, define aSM4Keyobject by passing your encryption / decryption key. The key should be of length 16.
Note that the key should be written asbytesinPython 3.fromsm4importSM4Keykey0=SM4Key(b"any length16 key")Secondly, encrypt messages by calling the methodencrypt()from theSM4Keyobject, or decrypt them by callingdecrypt().
Note that the messages should be written asbytesinPython 3.key0.encrypt(b"Any very very very long message!")# -> b'\x15\x8a\x18_qg\xf4%\x080\xb2HEFFO\x90\x0e\xc1\xbb\x07\xe5\xae\xed\xd5\x90\xf4K\xfb\xae]\xae'By default,ECB Modeis used. You may enableCBC Modeby passing the argumentinitial, as theInitial Value.
The argument should be abytesobject of length 16.key0.encrypt(b"any long message",initial=b"\0"*16)# -> b'\x15\x8a\x18_qg\xf4%\x080\xb2HEFFO\x98\x01}1\xe3\xa5oL\xdf\x95(A\xd8\xce\x14\xc9'TheSM4algorithm requires the message to be of any length that is a multiple of 16.
By default, the length of the message to encrypt / decrypt is assured by users.
You may choose to turn onPKCS5 Padding Mode(by passing the argumentpaddingwith a TRUTHY value), telling Python to do the padding before encryption for you.key0.encrypt(b"abc",padding=True)# -> b'K\x9euZ\x03\x96\xe0\x93+\xc9%Z\xab\xf5\xff\x17'While in decryption withPKCS5 Padding, the length of the message is still required to be a multiple of 8. But after decryption, Python will throw the padding characters away.key0.decrypt(b"K\x9euZ\x03\x96\xe0\x93+\xc9%Z\xab\xf5\xff\x17",padding=True)# -> b"abc"
Package: sma
SESMotifAnalyser: framework for analysing social-ecological systemsThis package contains a Python based framework for analysing social-ecological systems and more broadly multi-level networks.DocumentationA comprehensive documentation is availableas PDF.Please contact t.seppelt-dev[ÄT]posteo.de in case of any questions.See theexamples folderfor examples.InstallationThe package can be installed usingpip.pip3installsmaPer default, dependencies required for drawing social-ecological networks will not
be installed. The following command may be used to install the additional dependencies:pip3installsma[plots]It has the following dependencies: Python 3, numpy, scipy, networkx, pandas.
On the R side it depends on statnet, reticulate (with Python 3).For a version history, seechange logandtags.Integration in R and motifrThe functions in this package can to some extent be called from R using the R package
reticulate. An example can be found in theexamples folder.
See also the corresponding section in the documentation.Mario Angst is working on an R package which provides an interface to the SESMotifAnalyser.
His project motifr can be found onGithub.ergm-usertermsIn addition to the motif counting features written in Python, this repository containsergm-usertermsfor some motifs, e.g. the 3-motifs I.C and II.C (closed and open triangles,
respecting the social-ecological types of the nodes).After downloading and compiling the package,ergmmodels can be fitted and the motif counting
can be done directly in R:netw<-network(...)# first parameter: which sesType should the nodes at the points of the triangles have# second parameter: name of nodel attributesummary(netw~openTriangles(0,'sesType'))
Package: sma2mqtt
sma2mqttCommand line tool that listens to the multicast Speedwire of a SMA Energy Meter/Home Manger 2.0 and writes the values to a MQTT server.I'm using this in my home to read the power consumption/generation from a SMA Home Manager 2.0.Use at your own risk.Install:pipinstallsma2mqttsma2mqtt--helpusage: sma2mqtt [-h] [--topic TOPIC] [--mqtt_client_id MQTT_CLIENT_ID]
                     [--mqtt_address MQTT_ADDRESS]
                     [--mqtt_port MQTT_PORT] [--mqtt_username MQTT_USERNAME]
                     [--mqtt_password MQTT_PASSWORD] [--no_mqtt] [--dump_data]
                     [--serial_nr] [--force_print_serial] [--print_offsets]

Command line tool that listens to the multicast Speedwire of a SMA Energy Meter/Home Manger 2.0 and writes the values to a MQTT server.

optional arguments:
  -h, --help            show this help message and exit
  --topic TOPIC         Topic for the MQTT message. (default: sma)
  --mqtt_client_id MQTT_CLIENT_ID
                        Distinct client ID for the MQTT connection. (default: sma2mqtt)
  --mqtt_address MQTT_ADDRESS
                        Address for the MQTT connection. (default: localhost)
  --mqtt_port MQTT_PORT
                        Port for the MQTT connection. (default: 1883)
  --mqtt_username MQTT_USERNAME
                        User name for the MQTT connection. (default: None)
  --mqtt_password MQTT_PASSWORD
                        Password name for the MQTT connection. (default: None)
  --no_mqtt
                        Don't connect to MQTT and just print the values.
  --dump_data
                        Write the binary datagram to {TMP}/sma_dump.bin.
  --serial_nr
                        Only watch packets for this serial number.
  --force_print_serial
                        Print the serial number, even if only one was found.
  --print_offsets
                        Print the offsets where the patterns were found.
Package: smaberta
SMaBERTaThis repository contains the code for SMaBERTa, a wrapper for the huggingface transformer libraries.
It was developed by Zhanna Terechshenko and Vishakh Padmakumar through research at the Center for
Social Media and Politics at NYU.SetupTo install using pip, runpip install smabertaTo install from the source, first download the repository by runninggit clone https://github.com/SMAPPNYU/SMaBERTa.gitThen, install the dependencies for this repo and setup by runningcd SMaBERTa
pip install -r requirements.txt
python setup.py installUsing the packageBasic use:from smaberta import TransformerModel

epochs = 3
lr = 4e-6

training_sample = ['Today is a great day', 'Today is a terrible day']
training_labels = [1, 0]

model = TransformerModel('roberta', 'roberta-base', num_labels=25, 'reprocess_input_data': True, "num_train_epochs":epochs, "learning_rate":lr,    
                         'output_dir':'./saved_model/', 'overwrite_output_dir': True, 'fp16':False)

model.train_model(training_sample, training_labels)For further details, seeTutorial.ipynbin the (examples)[https://github.com/SMAPPNYU/SMaBERTa/tree/master/examples] directory.AcknowledgementsCode for this project was adapted from version 0.6 ofhttps://github.com/ThilinaRajapakse/simpletransformersVishakh Padmakumar and Zhanna Terechshenko contributed to the software writing, implementation, and testing.Megan Brown contributed to documentation and publication.