Saravanan666/pypi-org huggingface dataset:
Package: sleeplab-format
sleeplab-formatSleeplab format (SLF) is a both machine and human-readable format for storing and processing polysomnography data. SLF provides reader and writer with validation of data types and structures. The goal is to make it easier to apply analytics and machine learning pipelines to multiple datasets from different sources.DocumentationSeefull documentationfor details.Related toolssleeplab-convertersfor converting other formats exported from PSG software to sleeplab format.sleeplab-extractorfor extracting and preprocessing a subset of data in sleeplab format for the needs of specific studies.sleeplab-tf-datasetfor reading data in sleeplab format as a tensorflow Dataset.Installationpipinstallsleeplab-formatUsageimportsleeplab_formatasslfimportpandasaspdfrompathlibimportPath# Read a toy datasetDS_DIR=Path('tests/datasets/dataset1')ds=slf.reader.read_dataset(DS_DIR)# Get the list of subjects from series1subjects=ds.series['series1'].subjects.values()# Flatten the nested annotations and cast Pydantic models to dictsall_events_dict=[dict(a)forsinsubjectsfora_modelins.annotations.values()foraina_model.annotations]# Create a pandas DataFrame for analysesevent_df=pd.DataFrame(all_events_dict)# Calculate the mean duration of hypopneashypopneas=event_df[event_df['name']=='HYPOPNEA']mean_duration=sum(hypopneas['duration'])/len(hypopneas)# Modify the datasetadditional_info={'neck_size':40.0}ds.series['series1'].subjects['10001'].metadata.additional_info=additional_infods.name='dataset2'# Write the modified datasetMODIFIED_DS_DIR=Path('/tmp/datasets')slf.writer.write_dataset(ds,MODIFIED_DS_DIR)Seethe automatic sleep staging examplefor a full end-to-end example.ContributingSeecontributing.
Package: sleepness
SleeplessWhen you require an sleepless session, usesleepless.Keep your screen on whilst you are drinking a ☕.INSTALLATIONOn linux you'd need to haveTkinter, which is widely available in most distros.Using publicpypi:pipinstallsleepnesspip3installsleepnessInstall from github:pipinstallgit+https://github.com/toloco/sleepness.gitUSAGEsleepness--help
usage:sleepness[-h][--timerTIMER][--length[1-1000]][--wait[10-1000]]options:-h,--helpshowthishelpmessageandexit--timerTIMERTimer(inminutes),0meansforever,defaultisforever.--length[1-1000]Lenghtofmovement(insecs),defaultis10.--wait[10-1000]Waitingtimebetweenmovements(insecs),defaultis10.
Package: sleepstudyparser
Sleep Study ParserSimple package which can be used to parse the sleep study report from Windows 11.UsageBelow we are parsing a sleep study report where 12th state is like this:To get the same thing via Python we can do this:>>>fromsleepstudyparser.SleepStudyParserimportSleepStudyParser>>>ssp=SleepStudyParser(number_of_days=2,report_name="DummySleepStudyReport",report_path=r"C:\temp")>>>obj=ssp.parse()>>>len(obj.states)84>>>obj.states[11].start_time2021-11-1507:16:48+00:00>>>obj.states[11].duration13:15:33>>>obj.states[11].state_typeSessionType.SLEEP>>>obj.states[11].drips.sw_drips100>>>obj.states[11].drips.hw_drips68
Package: sleep-until
sleep_untilThis module provides a functionsleep_until(seconds), which is liketime.sleep(), but it sleeps until the specified time of the system clock as
returned bytime.time(). This can be used, for example, to schedule events at
a specific timestamp obtained fromdatetime.datetime.timestamp().See the notes intime.sleep()on the behavior when interrupted and on
accuracy. Additionally, because this function uses the system clock as a
reference (CLOCK_REALTIMEon Unix), this means the reference clock is
adjustable and may jump backwards.On Windows,SetWaitableTimerExis used, in combination withCREATE_WAITABLE_TIMER_HIGH_RESOLUTIONif available.
Precompiled "wheels" for CPython are available on PyPI.On POSIX systems,clock_nanosleep(2)is used, so this must be available,
along with the appropriate tools to compile the module.On Mac OS X, at the time of writing,clock_nanosleepis not available,
so the module currently does not build there.Thetest.pyscript can be used to test the functionality of the module.Here is how one might implement a loop that executes at a fixed interval:fromtimeimporttimefromsleep_untilimportsleep_untilinterval_s=1# using "int" here to start on a full secondnext_s=int(time())+interval_swhileTrue:# calculate the next wakeup time and sleep until thennow_s=time()# if the user's code takes longer than the interval, skip intervalswhilenext_s<now_s:next_s+=interval_ssleep_until(next_s)# run any user-specified code hereprint(time())
Package: sleep-utils
sleep-utilsA python toolbox for sleep researchers. Plot hypnograms, spectrograms, confusion matrices, PSG summariesHypnogram summary
{'TRT': 460.5,
 'TST': 444.5,
 'WASO': 16.0,
 'lat_REM': 65.0,
 'lat_S1': 0.0,
 'lat_S2': 2.0,
 'lat_S3': 9.0,
 'min_REM': 109.5,
 'min_S1': 13.5,
 'min_S2': 214.0,
 'min_S3': 107.5,
 'perc_REM': 0.24634420697412823,
 'perc_S1': 0.030371203599550055,
 'perc_S2': 0.4814398200224972,
 'perc_S3': 0.24184476940382452,
 'perc_W': 0.03474484256243214,
 'recording_length': 547.0,
 'sleep_offset_after_rec_start': 534.0,
 'sleep_onset_after_rec_start': 73.5}Installpip install sleep-utilsorpip install git+https://github.com/skjerns/sleep-utilsFunctionalityimport sleep_utilshypnogramsload (sleep_utils.read_hypno(file))save(sleep_utils.write_hypno(hypno, file)plot (sleep_utils.plot_hypnogram(hypno))convert (read&save)print summary (TST, WASO, ...) (sleep_utils.hypno_summary(hypno))spectrogramsmultitaper spectrogram (sleep_utils.specgram_multitaper(data, sfreq))welch spectrogram(sleep_utils.specgram_welch(data, sfreq))confusion matrixplot inter rater confusion matrix (sleep_utils.plot_confusion_matrix(confmat))mne-edfsave MNE to edf (sleep_utils.write_mne_edf(raw, filename))
Package: sleepwalker
sleepwalkersleepwalkeris a client package for REST APIs that are implemented
usingreschema-based JSON schemas.LicenseCopyright (c) 2019 Riverbed Technology, Inc.Sleepwalker is licensed under the terms and conditions of the MIT License
accompanying the software (“License”).  Sleepwalker is distributed “AS IS” as
set forth in the License.  Sleepwalker requires the download and usage of
certain third party software from third party websites.  All such third party
software is licensed by the applicable third party licensors under the terms
and conditions (including, without limitation, warranty and liability
disclaimers) offered by such third party licensors. You acknowledge that you
are responsible for obtaining and complying with any licenses necessary to
operate any such third party software.  Riverbed Technology, Inc. disclaims all
representations, warranties and liability relating to such third party
software.
Package: sleepyask
A small tool for collecting data from ChatGPT over long periods of time.💬 What does it do?ChatGPT rate limits the number of questions users may ask. The goal of this project is to allow users to just leave their computers on for extended periods of time to collect large amounts of responses from ChatGPT. Contributions are welcome! 🤗💬 InstallationTo install sleepyask, do one of the following:>pipinstallsleepyask
>py-mpipinstallsleepyask
>python-mpipinstallsleepyaskThis project also depends on the following packages>openai💬 UsageAuthenticationYou are required to provide an organization as well as an API Keyorganization- Your OpenAI organization ID. Get it here:https://platform.openai.com/account/org-settingsapi_key- You OpenAI API Key. To get it:>Gotohttps://platform.openai.com/account/api-keys
>Login(ifitisrequired)>Clickonyourprofilepictureonthetop-right>ViewAPIKeys>Createnewsecretkey.count- This specifies the number of workers to create for asking questions. You can have multiple workers asking questions in parallel.Sample codeIt is recommended that you do not store your user credentials directly in your code. Instead, use something likepython-dotenvto store your credentials in another file.importosfromdotenvimportload_dotenvfromsleepyask.chatimportSleepyaskload_dotenv()# take environment variables from .env.TIMEOUT=10000RETRY_TIME=5RATE_LIMIT=5API_KEY=os.getenv('OPENAI_API_KEY')# Index should be unique as it will be used to avoid repeat questionsQUESTION_LIST=[{'index':1,'text':'What is 1 + 1?'},{'index':2,'text':'What is 1 + 2?'},{'index':3,'text':'What is 1 + 3?'}]OUT_PATH='output.jsonl'CONFIGS={"model":"gpt-3.5-turbo","n":10,"temperature":0.7}sleepyask=Sleepyask(configs=CONFIGS,rate_limit=RATE_LIMIT,api_key=API_KEY,timeout=TIMEOUT,verbose=True,retry_time=RETRY_TIME)sleepyask.start(question_list=QUESTION,out_path=OUT_PATH)💬 Get involved🐛Found a bug or interested in adding a feature?- Create anissue🤗Want to help?- Create a pull-request!
Package: sleepydatapeek
DataPeekA quick way to peek at local datafiles.Welcome to sleepydatapeek!In short, it's hand to have something be able to spit out a configurable preview of data from a file, and bonus points if you can just as easily output in markdown. It would also be nice if said tool could read all the formats.DataPeekhas entered the chat!Table of Contents📖Get StartedUsageTechnologiesContributeAcknowledgementsLicense/Stats/AuthorGet Started 🚀pipinstallsleepydatapeek
pipinstall--upgradesleepydatapeekUsage ⚙Fetch dependencies:pipinstall-rrequirements.txtSet a function in your shell environment to run a script like:# pip install sleepydatapeek# pip install --upgrade sleepydatapeekfromsleepydatapeekimportsleepydatapeek
fromsysimportargv,exitsleepydatapeek(argv[1:])exit(0)Presuming you've named said functionemoji, print the help message:sleepydatapeek--helpTechnologies 🧰PandasTabulateTyperContribute 🤝If you have opinions, submit a PR 😊.Acknowledgements 💙Cheers to the chaos of modern life for needing personalized agility in schema assessment.License, Stats, Author 📜SeeLicensefor the full license text.This package was authored byIsaac Yep.
Package: sleepyemoji
SleepyEmojiFetch your favorite emojis fast!Welcome to sleepyemoji!There's now a paralyzing volume of unicode characters known as "emojis", which is great for creative expression, but bad for fetching the ~%10 of emojis you ever care to use.SleepyEmoji has entered the chat!Table of Contents📖Get StartedUsageTechnologiesContributeAcknowledgementsLicense/Stats/AuthorGet Started 🚀pipinstallsleepyemoji
pipinstall--upgradesleepyemojiUsage ⚙Fetch dependencies:pipinstall-rrequirements.txtSet a function in your shell environment to run a script like:# pip install sleepyemoji# pip install --upgrade sleepyemojifromsleepyemojiimportsleepyemoji
fromsysimportargv,exitsleepyemoji(argv[1:])exit(0)Presuming you've named said functionemoji, print the help message:emoji--helpTechnologies 🧰prettytabletyperContribute 🤝If you feel slighted by your favorite emojis not being list inemoji_toolchain/emojis, submit a PR 😊.Acknowledgements 💙Thanks to my late cat Merlin, who whispered best practices in my ear while I wrote this.License, Stats, Author 📜SeeLicensefor the full license text.This package was authored byIsaac Yep.
Package: sleepyq
Sleepyq is an library for accessing the SleepIQ API from Python.SleepIQis an addon forSleepNumber beds.To install:python3-mpipinstallsleepyqTo get started using the library, here’s the full usage:>>> from sleepyq import Sleepyq
>>> from pprint import pprint
>>>
>>> client = Sleepyq('your-login', 'your-password')
>>> client.login()
>>> pprint(client.sleepers())
>>> pprint(client.beds())
>>> pprint(client.bed_family_status())
>>> client.set_light(lightNumber, setting, bedId='')
>>> pprint(client.get_light(lightNumber, bedId=''))
>>> client.preset(preset, side, bedId='', slowSpeed=False)
>>> client.set_foundation_position(bedNumber, actuator, position, side, bedId='', slowSpeed=False)
>>> client.set_foundation_massage(bedNumber, footSpeed, headSpeed, side, timer=0, mode=0, bedId='')
>>> client.set_sleepnumber(side, sleepnumber, bedId='')
>>> client.set_favsleepnumber(side, sleepnumber, bedId='')
>>> pprint(client.get_favsleepnumber(bedId=''))
>>> client.stop_motion(bedId='', side)
>>> client.stop_pump(bedId='')
>>> pprint(client.foundation_status(bedId=''))
>>> pprint(client.foundation_system(bedId=''))
>>> pprint(client.foundation_features(bedId=''))The API is undocumented, so this library does not make much attempt to structure the data from the API into objects.Development NotesThe SleepIQ API wasannounced at CES 2016but there has yet to be any public documentation.https://sleepiq.sleepnumber.comappears to use the SleepIQ API internally, and methods here were written based on observing use of the site with Chrome Developer Tools and by running the Android app through a proxy. There was also prior art athttps://github.com/erichelgeson/sleepiq(the API has changed since then) andhttps://github.com/natecj/sleepiq-phpThe first request to happen is to login. This returns a key (_k) that needs to be used on subsequent requests as a parameter. Subsequent requests also need to be part of the same ‘session’, since those calls expect some cookies to be set.TodoError check response for non-200 code, or errors returned as JSONExplore API more. There are a few more API calls out there, like updating profile, modifying sleep for previous night, but they seem less immediately useful for automation.
Package: sleepytime
SleepytimeA simple gui that can prompt you to hibernate your computer. Use task scheduler to have it prompt you at night.
If you click delay, it'll sleep an hour and prompt you again.If it detects a mouse movement over the course of the last 5 minutes, it'll wait to start the gui. In other words, as long as the mouse moves
at least once every 5 minutes, it won't prompt to hibernate.If you delay and want to exit, right click the system tray icon and hit exit.Right now this only works on Windows... PRs are welcome for other OSes.GUITo Run:Download a release exe (built via Github Actions!).. then run viasleepytime.exeOr if you have Python 3.10 or greater already:# install once
pip install sleepytime

# run as often as you'd like after
python -m sleepytime
Package: sleepytimes
Package to analyze EEG, ECoG and other electrophysiology formats.
It allows for visualization of the results and for a GUI that can be used to score sleep stages.FeaturesReader and writer for EDF, EGI MFF, Fieldtrip, FIFF file formatsInterface for Sleep ScoringComputes frequency analysis (spectrogram), time-frequency analysis (Morlet wavelet)Spindle detection and analysisPure PythonInstallationInstall sleepytimes by running:pip install sleepytimesIf you want to scroll recordings and do some sleep scoring (requires PyQt5)sleepytimesRequirementsPython 3.5numpyscipy(optional for sleep scoring GUI) PyQt5LicenseThe project is licensed under the GPLv3 license.
Other licenses available upon request.Note on authorshipThis package is built upon an existing package by Gio Piantoni, available here:https://github.com/gpiantoni/phypno.git
Package: slender
SlenderSlenderprovides chainable, type-safe, enhanced datastructures over the well-known built-ins.Listis an enhanced list having all the functionalities that the basiclistbuitl-in type does but extended with a lot of useful functions.Setis a superset of the built-in one, works as the generalsettype but it does a lot more
that.Dictionaryis a key-value pair container, likedict, which is built with heavy functionalities.Tupleis a finate ordered list over the built-intuple.InstallpipinstallslenderUsagefromslenderimportList,Setprint(List([1,2,3,4,5])\.delete_if(lambdax:x%2==0)\.map(lambdax:x*2)\.chain(['a','b'])\.each_with_index()\.to_list())# => [[0, 2], [1, 6], [2, 10], [3, 'a'], [4, 'b]]print((Set({1,2,2,3,6,7,8})\.subtract(Set({3,5,10}))\.select(lambdax:x%2==0)\<<4\<<5\).map(lambdax:x*2))# => {4, 8, 10, 12, 16}DocumentationFor further information, read the documentation that can be found:https://slender.readthedocs.ioContributionFork it!Make your changes!Send a PR!
Package: slepa
Self-Learning Entropic Population AnnealingDescriptionThis is a Python package that is designed for interpretable materials design in combinatorial search spaces based on entropic population annealing.Required PackagesPython >= 3.6numpyscipyphysbomodlampInstallFrom PyPI (recommended)pip3installslepaTo update modlamp to the latest version, run the following:pipinstall--upgradeslepaFrom source (for developers)Update pip (>= 19.0)pip3install-UpipDownload or clone the github repositorygit clone https://github.com/tsudalab/SLEPAInstall via pippip3install./SLEPAUninstallpip3uninstallslepaUsage'examples/simple.py'is a simple example.LicenseSLEPA package is distributed under GNU General Public License version 3 (GPL v3) or later.Copyright©2021- The University of Tokyo. All rights reserved.
Package: slepc
SLEPc is a software library for the solution of large scale sparse
eigenvalue problems on parallel computers. It is an extension of PETSc
and can be used for either standard or generalized eigenproblems, with
real or complex arithmetic. It can also be used for computing a
partial SVD of a large, sparse, rectangular matrix, and to solve
nonlinear eigenvalue problemsNoteTo installPETSc,SLEPc,petsc4py, andslepc4py(mpi4pyis optional but highly recommended) use:$ python -m pip install numpy mpi4py  (or pip install numpy mpi4py)
$ python -m pip install petsc petsc4py (or pip install petsc petsc4py)
$ python -m pip install slepc slepc4py (or pip install slepc slepc4py)TipYou can also install the in-development versions with:$ python -m pip install Cython numpy mpi4py
$ python -m pip install --no-deps https://gitlab.com/petsc/petsc/-/archive/main/petsc-main.tar.gz
$ python -m pip install --no-deps https://gitlab.com/slepc/slepc/-/archive/main/slepc-main.tar.gzProvide anySLEPc./configure options using the environmental variableSLEPC_CONFIGURE_OPTIONS.
Package: slepc4py
Python bindings for SLEPc.InstallIf you have a working MPI implementation and thempicccompiler
wrapper is on your search path, it highly recommended to installmpi4pyfirst:$ pip install mpi4pyEnsure you have NumPy installed:$ pip install numpyand finally:$ pip install petsc petsc4py slepc slepc4pyCitationsIf SLEPc for Python been significant to a project that leads to an
academic publication, please acknowledge that fact by citing the
project.L. Dalcin, P. Kler, R. Paz, and A. Cosimo,Parallel Distributed Computing using Python,
Advances in Water Resources, 34(9):1124-1139, 2011.https://doi.org/10.1016/j.advwatres.2011.04.013V. Hernandez, J.E. Roman and V. Vidal.SLEPc: A Scalable and Flexible Toolkit for the
Solution of Eigenvalue Problems,
ACM Transactions on Mathematical Software, 31(3):351-362, 2005.https://doi.org/10.1145/1089014.1089019
Package: sleplet
SLEPLETSLEPLETis a Python package for the construction of Slepian wavelets in the
spherical and manifold (via meshes) settings. The API ofSLEPLEThas been
designed in an object-orientated manner and is easily extendible. Upon
installation,SLEPLETcomes with two command line interfaces -sphereandmesh- which allows one to easily generate plots on the sphere and a set of
meshes usingplotly.To read more about Slepian wavelets please see the following publicationsInstallationThe recommended way to installSLEPLETis viapippipinstallslepletTo install the latest development version ofSLEPLETclone this repository
and runpipinstall-e.This will install two scriptssphereandmeshwhich can be used to generate
the figures inthe associated papers.Supported PlatformsSLEPLEThas been tested with.
Windows is not currently supported asSLEPLETrelies onpysshtandpys2letwhich do not work on Windows.
These can hopefully be replaced withs2fftands2wavin the future when they
are available onPyPI.Example UsageSLEPLETmay be interacted with via the API or the CLIs.API UsageThe following demonstrates the first wavelet (ignoring the scaling function) of
the South America region on the sphere.importslepletB,J,J_MIN,L=3,0,2,128region=sleplet.slepian.Region(mask_name="south_america")f=sleplet.functions.SlepianWavelets(L,region=region,B=B,j_min=J_MIN,j=J)f_sphere=sleplet.slepian_methods.slepian_inverse(f.coefficients,f.L,f.slepian)sleplet.plotting.PlotSphere(f_sphere,f.L,f"slepian_wavelets_south_america_{B}B_{J_MIN}jmin_{J_MIN+J}j_L{L}",normalise=False,region=f.region,).execute()CLI UsageThe demonstrates the first wavelet (ignoring the scaling function) of the head
region of a Homer Simpson mesh for a per-vertex normals field.meshhomer-e320-mslepian_wavelet_coefficients-u-zDocumentationSee here for thedocumentation.
This includes demonstrations of the figures from the associated papers along
with the API documentation. Further examples are included in theexamples folder.Community GuidelinesWe'd love any contributions you may have, please see thecontributing guidelines.CitingIf you useSLEPLETin your research, please cite the paper.@article{Roddy2023,title={{SLEPLET: Slepian Scale-Discretised Wavelets in Python}},author={Roddy, Patrick J.},year=2023,journal={Journal of Open Source Software},volume=8,number=84,pages=5221,doi={10.21105/joss.05221},}Please also citeS2LETupon whichSLEPLETis built, along withSSHTin the spherical setting orlibiglin the mesh setting.
Package: sle-prjmgr-tools
sle-prjmgr-toolsThis is a repository containing shared release management tools for SUSE. Tools are expected to be version agnostic,
release or version specific tools should be clearly documented.How to install & useThe preferred way are the RPMs.You may install the tool via either:zypper in sle-prjmgr-toolspip install sle-prjmgr-toolspip install git+https://github.com/openSUSE/sle-prjmgr-tools.gitor you install it from the locally built RPMs or via pip.Tool overviewFor an overview seesle-prjmgr-tools -horsle-prjmgr-tools <tool_name> -h.Archive of the old codeThis repository has its root (before open-sourcing it) in the internal SUSE Gitlab. If you have access then you may
visit the historyhere.
Package: sleuren
AgentServer Monitoring (sleuren.com) is a web service that monitors and displays statistics of your server performance.Agent is OS agnostic software compatible with Python 2.7, 3.5, and 3.6. It's been optimized to have low CPU consumption and comes with an extendable set of useful plugins.DocumentationYou can find the full documentation atdocs.sleuren.com.Automatic Installation (All Linux Distributions)You can install the default configuration of Sleuren on all Linux distributions with just one click.Connect to your server via SSH.Find yourTOKEN. To do so,go to the project installation page.Run the following command:wget-q-Nhttps://sleuren.com/sleuren.sh&&bashsleuren.shTOKENManual InstallationTo customize installation options, install sleuren agent manually.Connect to your server via SSH.Run the following command, which differs depending on your server platform:Debian GNU/Linux:apt-getinstallpython3-develpython3-setuptoolspython3-pip
pip3installsleuren
wget-O/etc/sleuren.inihttps://sleuren.com/scripts/sleuren.iniFedora/CentOS version 6 or earlier (python 2.7):yuminstallpython-develpython-setuptoolsgcc
easy_installsleurennetifacespsutil
wget-O/etc/sleuren.inihttps://sleuren.com/scripts/sleuren.iniFedora/CentOS version 7 and later (python 3):yuminstallpython36-develpython36gcc
pip3installsleuren
wget-O/etc/sleuren.inihttps://sleuren.com/scripts/sleuren.iniFind yourTOKEN. To do so,go to the project installation page.Run the following command (TOKEN is the one you got during the previous step):sleurenhelloTOKEN/etc/sleuren-token.iniCreate a systemd service at/etc/systemd/system/sleuren.serviceby adding the following:[Unit]Description=Sleuren agent[Service]ExecStart=/usr/local/bin/sleurenUser=sleuren[Install]WantedBy=multi-user.targetRun the following command:chmod644/etc/systemd/system/sleuren.service
systemctldaemon-reload
systemctlenablesleuren
systemctlstartsleuren