Saravanan666/pypi-org huggingface dataset:
Package: seren
lib-namestep to commit:
    step rename:
        rename:
        ./
        |__src/
            |__packge_name/
        to your package name
    step edit:
        edit:
            ./
            |__setup.cfg
        name, version, author, author_email
    step build:
        step-1:
            make a pypi account
        step-2:
            run code on command line:
                Unix/macOS:
                    python3 -m pip install --upgrade build
                    python3 -m pip install --upgrade twine
                    python3 -m build
                    twine upload dist/*
                Windows:
                    py -m pip install --upgrade build
                    py -m pip install --upgrade twine
                    py -m build
                    twine upload dist/*Uploading distributions tohttps://test.pypi.org/legacy/Enter your username:[your username]Enter your password:[your password, this is hidden]Uploadingpackage-name-version-py3-none-any.whl100%|█████████████████████| 4.65k/4.65k [00:01<00:00, 2.88kB/s]Uploadingpackage-name-version.tar.gz100%|█████████████████████| 4.25k/4.25k [00:01<00:00, 3.05kB/s]
Package: serenest
New in 0.3.0: Polhig-Hellman; fix on bsgs algorithm!This library is still work in progress.Before reaching version 1.0.0, I plan on adding at least the following features:Cryptoutils:-Tonelli-Shanks
-AKS primality testFactoring:-pollard
-difference of squares
-number field sieveVarious:-Cleaner documentation
Package: serenity-sdk-python
## Serenity SDK - Python### IntroductionThe Serenity digital asset risk platform exposes all functionality via an API – currently REST only.Although it’s possible to call the API with simple HTTP client code in most any modern language, there are conventions that need to be followed – especially for authentication and authorization – and to make it easier we have provided this lightweight SDK.### InstallationInstallation for Python 3.x users is very simple using pip:`plain pip install serenity.sdk.python `If you have already installed the SDK and want to upgrade to latest:`plain pip install-Userenity.sdk.python `### API documentationThe latest API documentation is always available at [ReadTheDocs](https://cloudwall-serenitysdkpython.readthedocs-hosted.com/en/stable/).### Learning moreIf you want to learn more about the Serenity digital asset risk platform, book a demo or get in touch, you can reach out to us at [https://cloudwall.tech](https://cloudwall.tech).
Package: serf
SerfSerf is a simple web server. It’s a development tool to be used during
the development of rich internet applications: it’s not intended for
deployment.The documentation is available athttp://packages.python.org/serf/CHANGES0.3.1 (2010-08-05)Improved directory and extension ignoring code to be general.  Also
ignore .tmp files, and .bzr and .git subdirectories.Actually fix ignoring of .svn directories; this wasn’t working
correctly yet.0.3 (2010-08-05)Serf now ignores Subversion .svn files and vim .swp files when creating
hashes for libraries.0.2 (2010-07-28)Improved reporting on startup.0.1 (2010-07-27)Initial public release.Download
Package: serfclient
The Python interface to Serf, the decentralised solution for
service discovery and orchestration.Installationserfclient requires a running Serf agent. SeeSerf’s agent documentationfor instructions.To install serfclient, run the following command:$pipinstallserfclientor alternatively (you really should be using pip though):$easy_installserfclientor from source:$pythonsetup.pyinstallGetting Startedfromcontextlibimportclosingfromserfclient.clientimportSerfClientwithclosing(SerfClient())asclient:client.event('foo','bar')Stream usage:fromcontextlibimportclosingfromserfclient.clientimportSerfClientwithclosing(SerfClient(timeout=None))asclient:forresponseinclient.stream('*').body:print(response)Developmentserfclient requires a running Serf agent. SeeSerf’s agent documentationfor instructions.You can run the tests using the following commands:$serfagent--tagfoo=bar# start serf agent$pythonsetup.pytest
Package: serff
SerffA micro web server in python.Table of ContentsInstallationUsageSupportContributingInstallationInstall the package using pip:pipinstallbaseUsagefrombase_python_package_templateimportgreetingsgreeting=greetings()print(greeting)SupportPleaseopen an issuefor support.ContributingPlease contribute usingGithub Flow. Create a branch, add commits, andopen a pull request.
Package: serfilesreader
pyserfilesreaderpyserfilesreader is a library helping you to use SER video files.SER video files are used in astronomy to provide uncompressed container with header informationsCAUTION : don't read -yet- color (RGB) ser files.dependenciesLIBRARY :numpycv2pip3 install numpy cv2GUI :pysimplegui-qtcv2numpypip3 install PySimpleGUIQtcapabilitiesreading a ser file
saving as png
saving as fit (another astronomical use file format)inside the loopall datas are numpy arraymethods.read() :           return a numpy frame and go to the next frame
.getHeader() :      return SER file header in a dictionnary
.readFrameAtPos(n:int) : return frame number n.
.getLength() :      return number of frame in SER file.
.getWidth() :       return width of a frame
.getHeight() :      return height of a frame
.getCurrentPosition():       return current cursor value
.setCurrentPosition(n:int) : set the cursor at position n. Return position if OK, -1 if something's wrong.
.saveFit(filename) : save as FIT file filename frame at "cursor". Return (OK_Flag, filename)
.savePng(filename) : save as PNG file filename frame at "cursor". Return (OK_Flag, filename)
.nextFrame() :        add 1 to cursor i.e. go to next frame. Return current cursor value. -1 if the end of th video.
.previousFrame() :  remove 1 to cursor i.e. go to previous frame. Return current cursor value. -1 if it's from first frame..
.getName()          return name of SER file.
Package: serfio
Serfio: Python client for Serfserfiois a Pythonasyncioclient forSerf. The goal was to create client with zero or minimal dependencies. It allows to use it with Debian 12 (Bookworm) without installing any additional packages, besidespython3andpython3-msgpack. As far as I know, this eliminates licensing and security concerns, relieving my headaches.serfioimplements all Serf RPC commands. It includesstreamsimplemented as async iterators (everything is implemented as an async iterator 🧐). That was another goal: to make easy to use interface. At this stage of development is very straightforward and simple, and might not change in future.serfioisunder development, it is not yet tested in production. It was tested with Serf 0.8.2. For more mature client seealternatives.InstallationPyPi:https://pypi.org/project/serfio/pipinstallserfioUsageimportasyncioimportserfioasyncdefmain():asyncwithserfio.Serf()asserf:response=awaitserf.members()print(response)Developmentdirenvallow.
pipenvinstall--dev
makelint
maketestPrerequisites:direnv:https://direnv.net/pipenv:https://pipenv.pypa.io/en/latest/pytest:https://docs.pytest.org/en/latest/docker:https://www.docker.com/ReferenceSerf:Serf:https://www.serf.io/Serf RPC:https://www.serf.io/docs/agent/rpc.htmlAlternativesaioserf:https://pypi.org/project/aioserf/asyncserf:https://pypi.org/project/asyncserf/serf-python:https://github.com/spikeekips/serf-python
Package: serf_master
# Serf Master[![BuildStatus](https://secure.travis-ci.org/garethr/serf-master.png)](http://travis-ci.org/garethr/serf-master)[![CoverageStatus](https://coveralls.io/repos/garethr/serf-master/badge.png?branch=master)](https://coveralls.io/r/garethr/serf-master?branch=master)[![CodeHealth](https://landscape.io/github/garethr/serf-master/master/landscape.png)](https://landscape.io/github/garethr/serf-master/master)[Serf](http://www.serfdom.io/) is a very nice service discovery andorchestration framework which allows you to write scripts to react todifferent events across your infrastructure. However most of theexamples are simple shell scripts with lots of logic embedded in them.Combine that with per host configuration around registering eventhandlers and it's easy to build a fiddly, hard to reason aboutenviroment. It doesn't have to be that way.Serf is the framework, what you built on top of it matters. I wantedsomething with the following properties:* Testable. I should be able to unit test the entire configuration.* Single package. All hosts should get the same code, with the codedeciding what runs where.* Single event handler. I'd rather deal with logic about user events orroles within my code, rather than parameters to serf.* Make handlers sharable. You can simply extend `SerfHandler` andpackage up your own handlers, say `serf_master_haproxy`.Serf Master tries to do this, presented as a very small Python frameworkwith no dependencies. Here's an example:## An exampleImagine a cluster with a number of database servers and web servers. Thedatabase servers have the Serf role of `db` and the web servers the Serfrole of `web`. We want the web servers to react whenever a new server isadded to the cluster (maybe to tell a load balancer to reload?) and wewant to be able to trigger a deploy. For the database servers we want tobe able to trigger a backup custom event.```python#!/usr/bin/env pythonfrom serf_master import SerfHandler, SerfHandlerProxyclass WebHandler(SerfHandler):def deploy(self):# run commands here to do with deploymentdef member_join(self):# maybe rebalance the load balancerclass DatabaseHandler(SerfHandler):def backup(self):# run commands here to do with backupsif __name__ == '__main__':handler = SerfHandlerProxy()handler.register('web', WebHandler())handler.register('db', DatabaseHandler())handler.run()```The important parts are:```pythonhandler.register('web', WebHandler())```This says if the Serf role is `web` then use the `WebHandler` class forany events.```pythondef member_join(self):```This says for the `member-join` serf event we should execute the codewe write here.See the unit tests for examples of now this can be tested.## ConfigurationUsing this with Serf is simple, just wire up all the event handlers toyour script like so:```bashserf agent -event-handler /opt/your/script.py```Although you could restrict the events which are managed by this handlerthe whole point of serf-master is to move the handler definition intocode and away from command line flags.## InstallationSerf Master is available on[PyPi](https://pypi.python.org/pypi/serf_master) and can be installedwith:pip install serf_master
Package: serf_membership
Serf Membership=======This is very simple script for election a leader (primary) from all members tagged with specific role.# How can i use it?If you want to use this you should add 2 tags to every `serf agent`:1. role2. startedat // unixtimestamp `date +%Y%m%d%H%M%S%s%N`Based on these 2 tags `serf_membership` select single master from `role` group.## Usage Example```python>>> from serf_membership.client import SerfMembership>>> members = SerfMembership(role="web")>>> members.primary(){'Status': 'alive', 'DelegateCur': 4, 'Addr': '127.0.0.1', 'Tags': {'startedat': 999999999999999999999999, 'role': 'web', 'dc': 'dc1'}, 'ProtocolMax': 3, 'DelegateMin': 2, 'ProtocolMin': 1, 'ProtocolCur': 2, 'Port': 7946, 'DelegateMax': 4, 'Name': 'os3-2.devnodes.eu-bg-sof.startappcloud.com'}```## Serf run example```/usr/local/bin/serf agent -config-dir=/etc/serf/ -tag startedat=`date +%Y%m%d%H%M%S%s%N````# Installationfrom source# git clone git@github.com:mignev/serf-membership.git# cd serf-membership# python setup.py installwith pip# pip install serf_membership#CopyrightCopyright (c) 2016 Marian Ignev. See LICENSE for further details.
Package: sergeant
Fast, Safe & Simple Asynchronous Task Queues Written In Pure PythonTable of ContentsTable of ContentsAbout The ProjectBuilt WithPerformanceInstallationDocumentationUsageLicenseContactAbout The ProjectSergeantis a comprehensive distributed workers framework. The library was written inIntsightsafter failing to usecelerywith high scale. The library focuses on process and thread safety (through process/thread killers), performance and ease of use.Built WithorjsonmsgpackpymongoredispsutilPerformanceBenchmark code can be found insidebenchmarkdirectory.Installationpip3installsergeantDocumentationMore information can be found on thedocumentationsite.UsageUsage examples can be found insideexamplesdirectory.LicenseDistributed under the MIT License. SeeLICENSEfor more information.ContactGal Ben David -gal@intsights.comProject Link:https://github.com/intsights/sergeant
Package: serhiisavruk-kxQ2GLDZtw
icetis a tool for the construction and sampling of alloy cluster
expansions. A detailed description of the functionality provided as well as an
extensive tutorial can be found in theuser guide.icetis written in Python, which allows easy integration with countless
first-principles codes and analysis tools accessible from Python, and allows
for a simple and intuitive user interface. All computationally demanding parts
are, however, written in C++ providing performance while maintaining
portability. The following snippet illustrates how one can train a cluster
expansion:cs=ClusterSpace(primitive_cell,cutoffs,species)sc=StructureContainer(cs)forstructureintraining_structures:sc.add_structure(structure)opt=Optimizer(sc.get_fit_data())opt.train()ce=ClusterExpansion(cs,opt.parameters)Afterwards the cluster expansion can be used, e.g., for finding ground state
structures, or sampled via Monte Carlo simulations.Installationicetcan be installed using pip as follows:pip3 install icet --useror alternatively:python3 -m pip install icet --userInstallation requires a C++11 compliant compiler. Please consult theinstallation section of the user guidefor details.icetis based on Python3 and invokes functionality from other Python
libraries includingase,pandas,numpy,scipy,scitkit-learn, andspglib.Creditsicethas been developed at Chalmers University of Technology in Gothenburg
(Sweden) in theMaterials and Surface Theory divisionat the Department of Physics, in
collaboration with the Data Analysis group at theData Management and Software
Center of the European Spallation Sourcein Copenhagen (Denmark).When usingicetin your research please citeM. Ångqvist, W. A. Muñoz, J. M. Rahm, E. Fransson, C. Durniak, P. Rozyczko, T. H. Rod, and P. ErhartICET – A Python Library for Constructing and Sampling Alloy Cluster ExpansionsAdv. Theory. Sim., 1900015 (2019)doi: 10.1002/adts.201900015Also consult theCreditspage
of the documentation for additional references.icetand its development are hosted ongitlab.
Bugs and feature requests are ideally submitted via thegitlab issue tracker.
The development team can also be reached by email viaicet@materialsmodeling.org.
Package: seria
Basic Usageimportseriawithopen("tests/resources/good.xml","rb")asf:s=seria.load(f)prints.dump('xml')prints.dump('json')prints.dump('yaml')CLI ToolSeria includes a useful command line tool.cattests/resources/good.xml|seria-y-cattests/resources/good.json|seria-j-cattests/resources/good.yaml|seria-x-cattests/resources/good.xml|seria-x-|seria-j-|seria-y-FeaturesSupport for (with a few limitations) json, yaml, xmlInstallationpipinstallseria
Package: serial2tcp
InstalationYou can install from pip:# pip install serial2tcpor manual:# git clone git://github.com/mosquito/serial2tcp.git
# cd serial2tcp
# python setup.py installRedirect USB-SerialFor redirect /dev/ttyUSB0 with baudrate 9600 bps and 192.168.2.1 can connect to that:# serial2tcp -p /dev/ttyUSB0 -b 9600 -l 0.0.0.0 –allow-list=’192.168.2.1’HelpUsage: serial2tcp [options]Simple Serial to Network (TCP/IP) redirector.WARNING: You have to allow connections only from the addresses in the
“–allow-list” option. e.g. –allow-list=’10.0.0.1, 172.16.0.1, 192.168.0.1’
NOTICE: This service supports only one tcp connection per instance.Options:--versionshow program’s version number and exit-h,--helpshow this help message and exit-pSERIAL,--port=SERIALSerial port, a number, defualt = ‘/dev/tty0’-bBAUDRATE,--baud=BAUDRATEBaudrate, default 115200-r,--rtsctsEnable RTS/CTS flow control (default off)-x,--xonxoffEnable software flow control (default off)-PPORT,--localport=PORTTCP/IP port on which to run the server (default 9100)-lLISTEN,--listen=LISTENListen address on which to run the server (default
‘127.0.0.1’)--access-list=ACLList of IP addresses e.g ‘127.0.0.1, 192.168.0.2’Thanks toThis is based onhttp://www.cs.earlham.edu/~charliep/ecoi/serial/pyserial-2.2/examples/tcp_serial_redirect.py
Package: serialbox
____            _       _ ____
/ ___|  ___ _ __(_) __ _| | __ )  _____  __
\___ \ / _ \ '__| |/ _` | |  _ \ / _ \ \/ /
 ___) |  __/ |  | | (_| | | |_) | (_) >  <
|____/ \___|_|  |_|\__,_|_|____/ \___/_/\_\Unique Numbers Across SystemsSerialBox solves the non-trivial problem of generating and distributing serial
number information from system to system for the use in manufacturing and
supply chain environments. SerialBox was built with Marijuana and
Pharmaceutical production and distribution systems in mind but can be
used for any application that requires a unique serial number distribution API.Open, Simple, Tested and Well DocumentedSerialBox is easy to install, provides a simple RESTful API for fast and
clean implementation, comes with a comprehensive suite of unit tests and
is fully documented.Easily ExtendedNeed a custom number output format?  Need to generate a customized region of
numbers or characters in a specific format for a specific goal?  The
SerialBox is easily extended via theFlavorPackplugin framework and there
is an example flavorpack implementation and instructions available in theSerialBox Documentation.  In addition, you can writepre-processingandpost-processingpython modules that can be easily configured to handle
inbound and outbound messages.Example FlavorPackThe SerialBox documentation outlines how to develop aFlavorPackplugin for
SerialBox- you can find the example from the documentation here:https://gitlab.com/serial-lab/sbdemo/Get SerialSerialBox is distributed via the code on this site under the GPLv3 license
and also via the gitlab docker registry.Docker Compose ProjectCheck out the docker compose project here:https://gitlab.com/serial-lab/serial-box-docker-composeDocumentationInstallation and configuration instructions can be found here:https://serial-lab.gitlab.io/serialbox/
Package: serialclass
serialclassA base class to get serialized representations of any Python classInstallpip install serialclassUsagefrom serialclass import SerialClass


class InnerClass(SerialClass):

    def __init__(self, id_key):
        self.id_key = id_key


class Outerclass(SerialClass):

    def __init__(self):
        self._attribute = 'attribute'
        self._list = ['a', 'list']
        self._dict = {1: InnerClass('a'), 2: InnerClass('b')}


outclass = Outerclass()outclass.serialize()  # dict

>>>> {'Outerclass': {'_attribute': 'attribute', '_dict': {1: {'InnerClass': {'id_key': 'a'}}, 2: {'InnerClass': {'id_key': 'b'}}}, '_list': ['a', 'list']}}'outclass.serialize(depth=1)  # do not recurse

>>>> {'Outerclass': {'_attribute': 'attribute', '_dict': {1: <__main__.InnerClass object at 0x000001DC95C800C8>, 2: <__main__.InnerClass object at 0x000001DC95C801C8>}, '_list': ['a', 'list']}}outclass.stringify()  # json string

>>>> {"Outerclass": {"_attribute": "attribute", "_dict": {"1": {"InnerClass": {"id_key": "a"}}, "2": {"InnerClass": {"id_key": "b"}}}, "_list": ["a", "list"]}}outclass.pstringify(indent=2)  # json string with indent (default=4)

>>>> {
    "Outerclass": {
        "_attribute": "attribute",
        "_dict": {
            "1": {
                "InnerClass": {
                    "id_key": "a"
                }
            },
            "2": {
                "InnerClass": {
                    "id_key": "b"
                }
            }
        },
        "_list": [
            "a",
            "list"
        ]
    }
}outclass.pstringify(indent=2, ignore_protected=True))  # ignore _ - prefaced attributes
>>>> {
    "Outerclass": {}
}
Package: serialdaq
serialdaqThis module defines classes for controlling Omega DPG-4000 pressure sensors
and the GwInstek LCR-821 meters. This implementation features auto-connect to the device (by scanning available serial ports) and provides methods for finite- or indefinite-time data acquisition (and saving to file).The classes for each device are subclasses of a SerialDevice class to allow expansion for use with other serial devices (simply inherit SerialDevice and define the get_reading() method, and the baud and data_columns properties).InstallationTo install serialdaq, use pip (or similar):pip install serialdaqDocumentationThis package detects the device automatically if only one is connected;
if not, specify port. Collects every 10s forever unless count is given.
Data is saved to specified file (filename required).LCR meter exampleimportserialdaqlcr=serialdaq.LCRMeter()lcr.start_collection('output_filename.csv')Omega pressure sensor exampleimportserialdaqomega=serialdaq.PressureSensor()omega.start_collection('output_filename.csv')Other ways of using this moduleimportserialdaqserialdaq.serial_ports()# list all available serial portsserialdaq.list_devices()# list all devicesomega=serialdaq.PressureSensor('COM5')# connect to a specific portomega.get_reading()# get a single readingomega.start_collection('output_filename.csv',# output filename (required)dt=5,# sample interval (seconds)count=20,# number of readings to getlabel='50um')# single label for dataomega.start_collection('output_filename.csv',# output filename (required)dt=10,# sample interval (seconds)count=10,# number of readings to getlabel=['50um','trial1'])# multiple labels for data
Package: serial-data-handler-zxw
人工智能训练中,对于时间断层数据的处理工具包process serial data for AI training根据断点,分配数据集,保证训练数据的连续性allocate data set according to breakpoints, to ensure the continuity of training data生成训练数据(避开数据断点)# 注意:# 传入的数据必须指定时间列(或其他顺序列)# 传入的数据必须已按顺序排列好# Attention:# You must specify the time column (or other sequential column) of the incoming pd原始数据# The incoming pd原始数据 must be sorted in orderfromdatetimeimporttimedeltafromserial_data_handler_zxwimport生成训练数据_避开时间断点,时间列_三角函数化importpandasaspdcsv_path="/Volumes/time_serial_data.csv"data=pd.read_csv(csv_path)# 指定时间列为'收盘时间',# 设置断点为2分钟,# 即如果两个相邻的原始数据pd间隔大于2分钟,则认为是一个断点# specific the time column named '收盘时间' ,# and set the gap is 2 minutes ,# it means that if the gap between two adjacent pd原始数据 > 2 minutes, it will be considered as a breakpointx=生成训练数据_避开时间断点(data,column_timestamp='收盘时间',gap=timedelta(minutes=2))print(x.断点)训练数据index=x.数据划分_避开断点(input长度=100,output长度=100,step=1)print(len(训练数据index))# 如果您的数据间隔小于1秒,请做相应的乘法转换, 例如: 1毫秒的数据,请乘以1000,转换为秒级数据# 时间列_三角函数化# If your pd原始数据 interval < 1s, please do the corresponding multiplication conversion# for example: 1ms pd原始数据, you should multiply by 1000, convert to second-level pd原始数据# time column trigonometric functiondata['收盘时间']=pd.to_datetime(data['收盘时间'])data['收盘时间']=时间列_三角函数化(data['收盘时间'],周期=timedelta(days=1))print(data['收盘时间'])多尺度时间数据的对齐importpandasaspdfromdatetimeimportdatetimefromserial_data_handler_zxwimport时间序列_数据对齐data=pd.read_csv('/Volumes/AI_1505056/量化交易/币安_K线数据_1d/BTCUSDT-1m-201909-202308.csv')# to datetimedata['收盘时间']=pd.to_datetime(data['收盘时间'])# 时间序列_数据对齐数据预处理=时间序列_数据对齐(data,'收盘时间')i=数据预处理.查找_时间范围(datetime(2023,8,29,16,54,0),查找精度='1d')print(i)pytorch的金融K线数据预处理fromserial_data_handler_zxwimport金融K线_AI数据预处理askAI# 输出注意事项, 使用方法kAI.金融K线_AI数据预处理.help()# 数据标准化csv_file="/Volumes/AI_1505056/量化交易/币安_K线数据/BTCUSDT-1m-201909-202308.csv"x=kAI.金融K线_AI数据预处理(csv_file,100,100)xn=x.标准化(x.pd原始数据)# 适用dateset的__getitem__(i)的数据获取x.dataset__len__(是训练集=True)# 是训练集=False时, 调用测试集数据x.dataset__get_item__(i=0,data=xn,是训练集=True)python setup.py sdist bdist_wheel
twine upload dist/*
twine upload dist/serial_data_handler_zxw-0.6.0-py3-none-any.whl