Saravanan666/pypi-org huggingface dataset:
Package: sleap-io
sleap-ioStandalone utilities for working with animal pose tracking data.This is intended to be a complement to the coreSLEAPpackage that aims to provide functionality for interacting with pose tracking-related
data structures and file formats with minimal dependencies. This packagedoes nothave any functionality related to labeling, training, or inference.Installationpip install sleap-ioFor development, use one of the following syntaxes:conda env create -f environment.ymlpip install -e .[dev]SeeCONTRIBUTING.mdfor more information on development.UsageLoad and save in different formatsimportsleap_ioassio# Load from SLEAP file.labels=sio.load_slp("predictions.slp")# Save to NWB file.sio.save_nwb(labels,"predictions.nwb")Convert labels to raw arraysimportsleap_ioassiolabels=sio.load_slp("tests/data/slp/centered_pair_predictions.slp")# Convert predictions to point coordinates in a single array.trx=labels.numpy()n_frames,n_tracks,n_nodes,xy=trx.shapeassertxy==2# Convert to array with confidence scores appended.trx_with_scores=labels.numpy(return_confidence=True)n_frames,n_tracks,n_nodes,xy_score=trx.shapeassertxy_score==3Create labels from raw dataimportsleap_ioassioimportnumpyasnp# Create skeleton.skeleton=sio.Skeleton(nodes=["head","thorax","abdomen"],edges=[("head","thorax"),("thorax","abdomen")])# Create video.video=sio.Video.from_filename("test.mp4")# Create instance.instance=sio.Instance.from_numpy(points=np.array([[10.2,20.4],[5.8,15.1],[0.3,10.6],]),skeleton=skeleton)# Create labeled frame.lf=sio.LabeledFrame(video=video,frame_idx=0,instances=[instance])# Create labels.labels=sio.Labels(videos=[video],skeletons=[skeleton],labeled_frames=[lf])SupportFor technical inquiries specific to this package, pleaseopen an Issuewith a description of your problem or request.For general SLEAP usage, see themain website.Other questions? Reach out totalmo@salk.edu.LicenseThis package is distributed under a BSD 3-Clause License and can be used without
restrictions. SeeLICENSEfor details.
Package: sleap-roots
sleap-rootsAnalysis tools forSLEAP-based plant root phenotyping.Installationpip install sleap-rootsIf you are using conda (recommended):conda create -n sleap-roots python=3.9
conda activate sleap-roots
pip install sleap-rootsUsage1. Computing traits for a single plant:importsleap_rootsassrplant=sr.Series.load("tests/data/canola_7do/919QDUH.h5",primary_name="primary_multi_day",lateral_name="lateral_3_nodes")pipeline=sr.DicotPipeline()traits=pipeline.compute_plant_traits(plant,write_csv=True)2. Computing traits for a batch of plants:importsleap_rootsassrplant_paths=sr.find_all_series("tests/data/soy_6do")plants=[sr.Series.load(plant_path,primary_name="primary_multi_day",lateral_name="lateral__nodes",)forplant_pathinplant_paths]pipeline=sr.DicotPipeline()all_traits=pipeline.compute_batch_traits(plants,write_csv=True)3. Computing individual traits:importsleap_rootsassrimportnumpyasnpplant=sr.Series.load("tests/data/canola_7do/919QDUH.h5",primary_name="primary_multi_day",lateral_name="lateral_3_nodes")primary,lateral=plant[10]pts=np.concatenate([primary.numpy(),lateral.numpy()],axis=0).reshape(-1,2)convex_hull=sr.convhull.get_convhull(pts)DevelopmentFor development, first clone the repository:git clone https://github.com/talmolab/sleap-roots && cd sleap-rootsThen, to create anew conda environmentand install the package in editable mode:conda env create -f environment.ymlThis will create a conda environment calledsleap-roots.If you have anexisting conda environment(such as where you installed SLEAP), you
can just install in editable mode directly. First, activate your environment and then:pip install -e ".[dev]"Note:The[dev]makes sure that the development-only dependencies are also
installed.Tostart fresh, just delete the environment:conda env remove -n sleap-rootsTorun tests, first activate the environment:conda activate sleap-rootsThen runpytestwith:pytest testsAcknowledgmentsThis repository was created by theTalmo LabandBusch Labat the Salk Institute for Biological Studies as part of theHarnessing Plants Initiative.ContributorsElizabeth BerriganLin WangTalmo PereiraCitationComing soon.
Package: slearn
A package linking symbolic representation with scikit-learn machine learning for time series prediction.Symbolic representations of time series have proved their usefulness in the field of time series motif discovery, clustering, classification, forecasting, anomaly detection, etc.  Symbolic time series representation methods do not only reduce the dimensionality of time series but also speedup the downstream time series task. It has been demonstrated by [S. Elsworth and S. Güttel, Time series forecasting using LSTM networks: a symbolic approach, arXiv, 2020] that symbolic forecasting has greatly reduce the sensitivity of hyperparameter settings for Long Short Term Memory networks. How to appropriately deploy machine learning algorithm on the level of symbols instead of raw time series poses a challenge to the interest of applications. To boost the development of research community on symbolic representation, we develop this Python library to simplify the process of machine learning algorithm practice on symbolic representation.InstallInstall the slearn package simply bypipinstallslearn
Package: sled
sledanasync schedulermodule, it was written in the 2021 christmas to pass the boring christmas.The sled module defines some class which implements a general purpose event scheduler.
some useful async schedule class that refer to the standard librarysched.AsyncPriorityScheduler use the same namedtuple and the same interface to thesched.
if u do not need the priority attribute. AsyncScheduler, PerfSchduler is perfer to use.all of that needed to be used in async module which required to make sure event loop is running.PerfSchduler, don't store the event.
AsyncScheduler, don't have the priority.
AsyncPriorityScheduler is almost the same to the sched, but just Coroutine, not the thread.参考标准库sched实现的一个基于协程的事件调度框架。可以用于执行一些定时任务。其中 AsyncPriorityScheduler 可以兼容 标准库sched模块。PerfScheduler, AsyncScheduler 拥有比标准库更易用的定时任务函数. timer 和 ticker。但是两者都有一定的限制,不支持自定义的时间函数。性能首选 PerfScheduler不需要优先级，但是需要查看积累的任务，选用 AsyncScheduler需要在异步编程环境下，替换 sched 选用 AsyncPrioritySchedulerintallpip install sledusageimporttimeimportasynciofromsledimportAsyncPriorityScheduler,AsyncScheduler,PerfSchedulerdeffunc(s):print(s,time.time())asyncdefafunc(s):print(s,time.time())# using AsyncPrioritySchedulerschedule=AsyncPriorityScheduler()schedule.enter(3,1,func,argument=('test enter',))# run a task in laster 3 seconds, priority 1.schedule.enterabs(time.time()+3,1,afunc('test enterabs async',))# using AsyncSchedulerasyncSchedule=AsyncScheduler()asyncSchedule.timer(3,afunc('test async timer'))asyncSchedule.ticker(1,3,afunc,argument=('test AsyncScheduler',))# interval is 1, times is 3# using PerfSchedulerperfSchedule=PerfScheduler()perfSchedule.ticker(2,3,afunc,argument=('test PerfScheduler',))# make sure loop is running in ur codeloop=asyncio.get_event_loop()loop.run_forever()
Package: sledo
SledoA tool to generate demo dataBuilt with PythonAboutSledo is a tool to automatically generate connected demo data.Installationpip$pipinstallsledoGithub$pipinstallgit+https://github.com/luxbe/sledo.gitQuickstartCreate ayamlfile calledconfig.yaml. Fill it with schemas and steps.Run the sledo generate command$ sledo generate config.yamlFind the generated CSV files in theoutfolderDevelopInstall dependencies$gitclonehttps://github.com/luxbe/sledo.git
$cdsledo
$pipenvinstallRun sledo$pipenvrunpythonsledo/__init__.pygenerateRun tests$pytest-v--cov=sledo--cov-reporthtmlLicenseMIT licensed. See the bundledLICENSEfile for more details.
Package: sleekify
SleekifyA minimalistic, ASGI Python framework for building REST API's. Heavily inspired by Express.js and FastAPI.In it's absolute infancy, Sleekify already includes some common concepts of a REST API framework, such as routing, parameter resolution, serialisation, request handling, and response generation.Installation:pip install sleekifyUsage:from sleekify import App

app = App()

app.post("/")
async def endpoint(name: str):
  return { "name": name }
Package: sleemo
Sleemo: AWS AppSync Direct Lambda Resolver FrameworkA Simple yet powerful serverless GraphQL framework powered by AWS AppSync Direct Lambda Resolver.FeaturesNo need to manually import other resolver functions and manage the tedious if-else based router from the gateway Lambda handler.The arguments of AppSync operations(queries and mutations) being parsed and passed to each resolver functions automatically.A utility functions provided to easily convert from and to AppSync scalar types such as AWSDateTime or AWSJSONInstallationpipinstallsleemoUsageProject StructureAn example of theSleemoproject could be structured like below:/
|-- gatewayLambda.py
|-- resolvers/
|----- getTodo.py
|----- listTodo.py
|----- createTodo.py
|----- updateTodo.py
|----- deleteTodo.py
|-- requirements.txtAn example code with this project structure is given in the next section.An Example GraphQL SchematypeTodo{id:ID!author:String!title:String!content:Stringdone:Boolean!createdAt:AWSDateTime!}inputCreateTodoInput{author:String!title:String!content:Stringdone:Boolean}inputUpdateTodoInput{author:Stringtitle:Stringcontent:Stringdone:Boolean}typeQuery{getTodo(id:ID!):TodolistTodo:[Todo!]!}typeMutation{createTodo(input:CreateTodoInput!):TodoupdateTodo(input:UpdateTodoInput!):TododeleteTodo(id:ID!):Todo}An Example Python CodegatewayLambda.pyis the default gateway of the AppSync resolver. It receives the event and route this event to appropriate functions.fromsleemo.frameworkimportget_appsync_frameworksleemo=get_appsync_framework(resolver_path='resolvers')@sleemo.default_gateway()defhandler(event,context):returnsleemo.resolve(event)resolver_pathrepresents where your resolver files are located.Now, let's take a look at how each resolver file lookes like.Sleemodoesn't care of how each resolver function should be implemented. You can use any libraries you prefer to implement your resolvers.Sleemojust passes the operation argumentinput: CreateTodoInputtocreateTodo()function with the originaleventvariable.fromsleemo.utilsimportget_type_utilsfromsleemo.frameworkimportget_loggerlogger=get_logger()defcreateTodo(input,event):## Your business logic here.## Below is an example of return datalogger.info('createTodo start')utils=get_type_utils(timezone_offset=9)todo={'id':utils.createUUID(),'author':input['author'],'title':input['title'],'content':input['content'],'done':False,'createdAt':utils.createAWSDateTime(),}logger.info('createTodo end')returntodoLet's take another example of the resolver functiongetTodo().fromsleemo.utilsimportget_type_utilsdefgetTodo(id,event):## Your business logic here.## Below is an example of return datautils=get_type_utils(timezone_offset=9)todo={'id':utils.createUUID(),'author':'Taewoo Kim','title':'Sleemo Usage Example','content':'Simple yet powerful serverless GraphQL framework','done':False,'createdAt':utils.createAWSDateTime(),}returntodoLICENSEMIT LICENSE
Package: sleento
Python SleentOinstallationpipinstallsleentoUsagefromsleento.serviceimportClient,Messageclient=Client(cid='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',# replace with your cidauth_token='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'# your auth_token)message=Message(client=client,to_phone_number="+243xxxxxxxxx",body="Hello World")res=message.send()# send the messageprint(res.status_code,res.text)
Package: sleep360
Sleep360This project allows to control the Holi SleepCompanion from a Linux computer.The SleepCompanion is nice LED bulb that offers a lot of features to improve your sleep and your waking up.
It is manufactured by Holi, a French company.
A product description can be found by following these links:Official Website (French)An English overviewThis Sleep360 project is written in Python and can be used:as a library by creating asleep360.Bulb()objectas a command line utility (coming soon)RequirementsD-BUSbluez >= 5.46 (dependency on the GATT D-BUS API)InstallationFrom PyPIpip install [--user] sleep360From the sourcescd python-sleep360
pip install [--user] .Command line usagepip installinstalls asleep360binary.
Running it gives a prompt like this one:Sleep360 shell (version x.y.z).
Type help or ? to list commands.

[sleep360] connect Bulb
Connecting to the Bulb...
[sleep360] set_color 0xff0000 0x00 0x00
[sleep360] disconnect
Disconnecting from the Bulb...
[sleep360] exitLibrary usagebulb = Bulb(name="Bulb")
bulb.connect()

# Play with bulb commands
[...]

bulb.disconnect()Examples are available in thetestsdirectory.Supported featuresThe SleepCompanion bulb offers a lot of features.
Among them, the following ones are currently supported by Sleep360:Setting colors (RGB + warm and cold value)Powering off the lightGetting the temperatures measured by the bulbReverse-engineeringThis project has been developed by carefully studying the Bluetooth LE messages.
The fileBLE-protocol.mddescribes my understanding of these messages.
Package: sleep-after
sleep-after-----------A simple python script to put your system to sleep/suspend afterspecified amount of timeUses----`pm-suspend` system toolUsage-----`sleep-after hh:mm:ss`Example :`sleep-after 10`This will put your system to sleep after 10 seconds.`sleep-after 15:10`This will put your system to sleep after 15 minutes and 10 seconds.`sleep-after 2:15:10`This will put your system to sleep 2 hours 15 minutes and 10 seconds.Installation------------Please install it in your system and not in a virtual environment.`pm-suspend` tool requires root previlages to execute, so installingthis in a virtualenv wont work.`pip install sleep-after`Developers----------Alfred Dominic
Package: sleepchunk
Sleeps in chunks of 0.05 seconds / ctrl+c to exit without throwing an Exception / status bar# Tested with:# Python 3.9.13# Windows 10pipinstallsleepchunkfromsleepchunkimportsleep,sleep_with_statusbar,sleep_randomsleep(secs=3)sleep_with_statusbar(maxrange=10)# [======] 6 / 10sleep_random(start=2,end=3,with_statusbar=False)sleep_random(start=2,end=3,with_statusbar=True)sleep(secs=0)
Package: sleepecg
SleepECGSleepECG provides tools for sleep stage classification whenEEGsignals are not available. Based only onECG, SleepECG provides functions fordownloading and reading open polysomnography datasets,detecting heartbeats from ECG signals, andclassifying sleep stages (which includes preprocessing, feature extraction, and classification).DocumentationDocumentation for SleepECG is available onRead the Docs. Check out thechangelogto learn what we added, changed, or fixed.InstallationSleepECG is available on PyPI and can be installed withpip:pip install sleepecgAlternatively, an unofficialcondapackage is available:conda install -c conda-forge sleepecgSleepECG with all optional dependencies can be installed with the following command:pip install "sleepecg[full]"If you want the latest development version, use the following command:pip install git+https://github.com/cbrnr/sleepecgExampleThe following example detects heartbeats in a short ECG (a one-dimensional NumPy array):importnumpyasnpfromsleepecgimportdetect_heartbeats,get_toy_ecgecg,fs=get_toy_ecg()# 5 min of ECG data at 360 Hzbeats=detect_heartbeats(ecg,fs)# indices of detected heartbeatsDependenciesSleepECG requires Python ≥ 3.9 and the following packages:numpy≥ 1.20.0requests≥ 2.25.0scipy≥ 1.7.0tqdm≥ 4.60.0PyYAML≥ 5.4.0Optional dependencies provide additional features:edfio≥ 0.1.1 (read data fromMESAandSHHS)joblib≥ 1.0.0 (parallelized feature extraction)matplotlib≥ 3.5.0 (plot ECG time courses, hypnograms, and confusion matrices)numba≥ 0.55.0 (JIT-compiled heartbeat detector)tensorflow≥ 2.7.0 (sleep stage classification with Keras models)wfdb≥ 3.4.0 (read data fromSLPDB,MITDB, andLTDB)ContributingThecontributing guidecontains detailed instructions on how to contribute to SleepECG.
Package: sleepeeg
sleepeegsleepeegis a high-level package built on top ofmne-python,yasafor preprocessing and analysis of sleep EEG data.InstallationMake sure you havePythonversion installed. Requires Python 3.10 or higher.Create a Python virtual environment, for more info you can refer to pythonvenv,virtualenvorconda.Activate the environmentpip install sleepeegDownloadnotebooks.QuickstartOpen any of the downloaded notebooks using the created environment.Follow the notebook's instructions.RAM requirementsFor overnight, high density (256 channels) EEG recordings downsampled to 250 Hz expect at least 64 GB RAM expenditure for cleaning and spectral analyses, and at least 128 GB for event detection (or 64 GB if you downsample the data to 100 Hz before running the detection algorithm).
Package: sleepeegpy
sleepeegpysleepeegpyis a high-level package built on top ofmne-python,yasafor preprocessing, analysis and visualisation of sleep EEG data.InstallationMake sure you havePythonversion installed. Requires Python 3.10 or higher.Create a Python virtual environment, for more info you can refer to pythonvenv,virtualenvorconda.Activate the environmentpip install sleepeegpyDownloadnotebooks.QuickstartOpen the complete pipeline notebook in the created environment.Follow the notebook's instructions.RAM requirementsFor overnight, high density (256 channels) EEG recordings downsampled to 250 Hz expect at least 64 GB RAM expenditure for cleaning, spectral analyses and event detection.Retrieve example datasetodie = pooch.create(
    path=pooch.os_cache("sleepeegpy_dataset"),
    base_url="doi:10.5281/zenodo.10362189",
)
odie.load_registry_from_doi()
bad_channels = odie.fetch("bad_channels.txt")
annotations = odie.fetch("annotations.txt")
path_to_eeg = odie.fetch("resampled_raw.fif")
for i in range(1,4):
    odie.fetch(f"resample_raw-{i}.fif")
Package: sleeper
A Python wrapper for the Sleeper API.Sleeper WebsiteSleeper API DocumentationInstallationUse the package managerpipto install.pipinstallsleeperUsageFor examples on how to utilize the different features of this library, see
theexamplefolder.ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.DevelopmentRun these commands from the root folderInstall Dependencies:make depsFormat Code:make fmtRun Unit Tests:make testLicenseMIT
Package: sleeper-api-wrapper
sleeper-api-wrapperA Python API wrapper for Sleeper Fantasy Sports, as well as tools to simplify data received. It makes all endpoints found in the Sleeper API docs:https://docs.sleeper.app/available and turns the JSON response received into Python types for easy usage.Ownership was transferred from @SwapnikKatkoori to @dtsong in March 2022 to continue efforts.
Original Repository:https://github.com/SwapnikKatkoori/sleeper-api-wrapperTable of ContentsProject RoadmapInstallationDocumentationNotesDependenciesLicenseProject RoadmapEstablish solid CICD practices with automated testing and validation of pull requests via GitHub ActionsEnsure libraries are up to date and secure.Update endpoints and logic with the current Sleeper API docsInvestigate performance optimization (effort, implementation, etc)Want to help? Send me a message to @dtsongInstallpip install sleeper-api-wrapperDocumentationThere are five objects in the package that get data from the Sleeper API. Most of them are intuitive based on theSleeper API docs, but full documentation for the Python objects and their methods can be found in thedocsfolder. There are some bespoke methods for transforming the data into more useful structures in addition to the methods that directly call the API.NotesThis package is intended to be used by Python version 3.8 and higher. There might be some wacky results for previous versions.DependenciesrequestsUsed for all http requests in sleeper_wrapperpytestUsed for all testing in sleeper_wrapperLicenseThis project is licensed under the terms of the MIT license.
Package: sleeper-py
sleeper-pyA python implementation of the Sleeper API. Original documentation for these API calls can be found athttps://docs.sleeper.app/.Installpip install sleeper-pyUsageAvatarsget_full_size_avatar()from sleeperpy import Avatars
Avatars.get_full_size_avatar(avatar_id)get_thumbnail_avatar()from sleeperpy import Avatars
Avatars.get_thumbnail_avatar(avatar_id)Draftsget_all_drafts_for_user()from sleeperpy import Drafts
Drafts.get_all_drafts_for_user(user_id, sport, season)get_all_drafts_for_league()from sleeperpy import Drafts
Drafts.get_all_drafts_for_league(league_id)get_specific_draft()from sleeperpy import Drafts
Drafts.get_specific_draft(draft_id)get_all_picks_in_draft()from sleeperpy import Drafts
Drafts.get_all_picks_in_draft(draft_id)get_traded_picks_in_draft()from sleeperpy import Drafts
Drafts.get_traded_picks_in_draft(draft_id)Leaguesget_all_leagues()from sleeperpy import Leagues
Leagues.get_all_leagues(user_id, sport, season)get_league()from sleeperpy import Leagues
Leagues.get_league(league_id)get_rosters()from sleeperpy import Leagues
Leagues.get_rosters(league_id)get_users()from sleeperpy import Leagues
Leagues.get_users(league_id)get_matchups()from sleeperpy import Leagues
Leagues.get_matchups(league_id, week)get_winners_playoff_bracket()from sleeperpy import Leagues
Leagues.get_winners_playoff_bracket(league_id)get_losers_playoff_bracket()from sleeperpy import Leagues
Leagues.get_losers_playoff_bracket(league_id)get_transactions()from sleeperpy import Leagues
Leagues.get_transactions(league_id, round)get_traded_picks()from sleeperpy import Leagues
Leagues.get_traded_picks(league_id)get_state()from sleeperpy import Leagues
Leagues.get_state(sport)Playersget_all_players()from sleeperpy import Players
Players.get_all_players()get_trending_players()from sleeperpy import Players
Players.get_trending_players(sport, type, hours, limit)Userget_user()from sleeperpy import User
User.get_user(user_id)ExampleThis example shows how to retrieve a user ID and use it to query for leagues and matchups for week 1 of the 2022 NFL season.account = User.get_user('account_name')
sport = 'nfl'
season = 2022
week = 1

leagues = Leagues.get_all_leagues(account['user_id'], sport, season)
for league in leagues:
    league_id = league['league_id']
    matchups = Leagues.get_matchups(league_id, week)
Package: sleeper-wrapper
sleeper-api-wrapperA Python API wrapper for Sleeper Fantasy Sports, as well as tools to simplify data received. It makes all endpoints found in the Sleeper API docs:https://docs.sleeper.app/available and turns the JSON response received into Python types for easy usage.Ownership was transferred from @SwapnikKatkoori to @dtsong in March 2022 to continue efforts.
Original Repository:https://github.com/SwapnikKatkoori/sleeper-api-wrapperTable of ContentsProject RoadmapInstallationDocumentationNotesDependenciesLicenseProject RoadmapEstablish solid CICD practices with automated testing and validation of pull requests via GitHub ActionsEnsure libraries are up to date and secure.Update endpoints and logic with the current Sleeper API docsInvestigate performance optimization (effort, implementation, etc)Want to help? Send me a message to @dtsongInstallpip install sleeper-api-wrapperDocumentationThere are five objects in the package that get data from the Sleeper API. Most of them are intuitive based on theSleeper API docs, but full documentation for the Python objects and their methods can be found in thedocsfolder. There are some bespoke methods for transforming the data into more useful structures in addition to the methods that directly call the API.NotesThis package is intended to be used by Python version 3.8 and higher. There might be some wacky results for previous versions.DependenciesrequestsUsed for all http requests in sleeper_wrapperpytestUsed for all testing in sleeper_wrapperLicenseThis project is licensed under the terms of the MIT license.
Package: sleepgraph
This tool is designed to assist kernel and OS developers in optimizing
their linux stack's suspend/resume time. Using a kernel image built
with a few extra options enabled, the tool will execute a suspend and
capture dmesg and ftrace data until resume is complete. This data is
transformed into a device timeline and an optional callgraph to give
a detailed view of which devices/subsystems are taking the most
time in suspend/resume.