Saravanan666/pypi-org huggingface dataset:
Package: slisemap
SLISEMAP: Combine supervised dimensionality reduction with local explanationsSLISEMAP is a supervised dimensionality reduction method, that takes data, in the form of vectors, and predictions from a "black box" regression or classification model as input. SLISEMAP then simultaneously finds local explanations for all data items and builds a (typically) two-dimensional global visualisation of the black box model such that data items with similar local explanations are projected nearby. The explanations consists of interpretable models that locally approximate the "black box" model.SLISEMAP is implemented inPythonusingPyTorchfor efficient optimisation, and optional GPU-acceleration. For more information see thepapers, theexamples, or thedocumentation.This library also includes the faster SLIPMAP variant, that uses "prototypes" to speed up
the calculations (linear time and memory complexity instead of quadratic).
SLIPMAP is largely compatible with SLISEMAP, just change the class name (SlisemaptoSlipmap, see example below).CitationsThe full SLISEMAP paper (arXivandsupplements):Björklund, A., Mäkelä, J., & Puolamäki, K. (2023).SLISEMAP: Supervised dimensionality reduction through local explanations.Machine Learning 112, 1-43. DOI:10.1007/s10994-022-06261-1The short demo paper (videoandslides):Björklund, A., Mäkelä, J., & Puolamäki, K. (2023).SLISEMAP: Combining Supervised Dimensionality Reduction with Local Explanations.Machine Learning and Knowledge Discovery in Databases. ECML PKDD 2022. Lecture Notes in Computer Science, vol 13718. DOI:10.1007/978-3-031-26422-1_41.The new SLIPMAP paper (supplements):Björklund, A., Seppäläinen, L., & Puolamäki, K. (2024).SLIPMAP: Fast and Robust Manifold Visualisation for Explainable AITo appear in: Advances in Intelligent Data Analysis XXII. IDA 2024. Lecture Notes in Computer Science.InstallationTo install the package just run:pipinstallslisemapOr install the latest version directly fromGitHub:pipinstallgit+https://github.com/edahelsinki/slisemapTo use the built-in hyperparameter tuning you also needscikit-optimize, which is automatically installed if you do:pipinstallslisemap[tuning]PyTorchSince SLISEMAP utilises PyTorch for efficient calculations, you might want to install a version that is optimised for your hardware. Seehttps://pytorch.org/get-started/locallyfor details.ExampleimportnumpyasnpfromslisemapimportSlisemapX=np.array(...)y=np.array(...)sm=Slisemap(X,y,radius=3.5,lasso=0.01)sm.optimise()sm.plot(clusters=5,bars=5)To use the faster SLIPMAP variant just replace the relevant lines:fromslisemapimportSlipmapsm=Slipmap(X,y,radius=2.0,lasso=0.01)See theexamplesfor more detailed examples, and thedocumentationfor more detailed instructions.
Package: slisemap-interactive
Slisemap-interactiveInteractive plots forSlisemapusingDash. This package can be used in four different ways:CLI:To start a standalone dash app just runslisemap_interactive path/to/slisemap/object.sm(if the package has been installed) orpython -m slisemap_interactive path/to/slisemap/object.sm(in the root of this repository).REPL:To use it as (interactive) replacement plots for Slisemap from a Python terminal, import theplotfunctionfrom slisemap_interactive import plotand use itplot(slisemap_object).jupyter:To create plots in a jupyter notebook, import theplotfunctionfrom slisemap_interactive import plotand use itplot(slisemap_object).χiplot:As a plugin that adds loading and plotting of Slisemap objects.
To use the plugin, just install the package in the same Python environment asχiplot.ScreenshotsInstallationTo installslisemap_interactiverun one of the following commands:pipinstallslisemap_interactive
pipinstallslisemap_interactive[xiplot]pipinstallgit+https://github.com/edahelsinki/slisemap_interactiveHelpTo see the syntax and arguments for the command line interface run:slisemap_interactive--helpTo see the arguments for the plot function use the?in IPython or Jupyter:fromslisemap_interactiveimportplotplot?DevelopmentWhen developingslisemap_interactiveit is a good idea to do an “editable” install.
An editable install just links “installed” Python files to the Python files in this directory (so that any changes are immediately available).
This takes care of the namespace resolution and also activates the "entry_points" for thestandalone CLIandχiplot-plugin.
To do an editable installation run:pipinstall--editable".[dev]"
Package: slist
SlistThis is a drop in replacement for the built-in mutable python listBut with more post-fixed methods for chaining in a typesafe manner!!Leverage the latest pyright features to spot errors during coding.All these methods return a new list. They do not mutate the original list.Not able to convince your colleagues to use immutable functional data structures? I understand.This library lets you still have the benefits of typesafe chaining methods while letting your colleagues have their mutable lists!pip install slistGitHub:https://github.com/thejaminator/slistQuick StartEasily spot errors when you call the wrong methods on your sequence with mypy.fromslistimportSlistmany_strings=Slist(["Lucy, Damion, Jon"])# Slist[str]many_strings.sum()# Mypy errors with 'Invalid self argument'. You can't sum a sequence of strings!many_nums=Slist([1,1.2])assertmany_nums.sum()==2.2# ok!classCannotSortMe:def__init__(self,value:int):self.value:int=valuestuff=Slist([CannotSortMe(value=1),CannotSortMe(value=1)])stuff.sort_by(lambdax:x)# Mypy errors with 'Cannot be "CannotSortMe"'. There isn't a way to sort by the class itselfstuff.sort_by(lambdax:x.value)# ok! You can sort by the valueSlist([{"i am a dict":"value"}]).distinct_by(lambdax:x)# Mypy errors with 'Cannot be Dict[str, str]. You can't hash a dict itselfSlist provides methods to easily flatten and infer the types of your data.fromslistimportSlist,ListfromtypingimportOptionaltest_optional:Slist[Optional[int]]=Slist([-1,0,1]).map(lambdax:xifx>=0elseNone)# Mypy infers slist[int] correctlytest_flattened:Slist[int]=test_optional.flatten_option()test_nested:Slist[List[str]]=Slist([["bob"],["dylan","chan"]])# Mypy infers slist[str] correctlytest_flattened_str:Slist[str]=test_nested.flatten_list()There are plenty more methods to explore!fromslistimportSlistresult=(Slist([1,2,3]).repeat_until_size_or_raise(20).grouped(2).map(lambdainner_list:inner_list[0]+inner_list[1]ifinner_list.length==2elseinner_list[0]).flatten_option().distinct_by(lambdax:x).map(str).reversed().mk_string(sep=","))assertresult=="5,4,3"
Package: slitflow
SlitflowSlitflowis a Python package that aims to construct a fully reproducible and universally accessible workflow for single-molecule analysis—namely,Single-moleculeLocalization-IntegratedTrajectory analysis workFLOW.Slitflowcomprises a flexible Data class that executes a task and stores the resulting data. A Data object can be input to the next Data object, the network of Data objects forming the entire workflow of complex single-molecule analysis, from image pre-processing to publication-quality figure creation.Slitflowwas designed by considering users who developed analysis tools, validated multiple analysis methods, reproduced workflows without programming skills, and used the results without installing software.Please seedocumentationfor more information aboutSlitflow.InstallationSlitflowcan be installed fromPyPI.pipinstallslitflowHow to useThe simplest script to make an index table is as follows:importslitflowassfD=sf.tbl.create.Index()D.run([],{"type":"trajectory","index_counts":[2,2],"split_depth":0})print(D.data[0])#  img_no  trj_no#       1       1#       1       2#       2       1#       2       2Please see"Getting Started Basic"to overview the functionality by analyzing the trajectories of simulated random walks."Getting Started Advanced"demonstrated the integrity and flexibility of the workflow using 1) a cherry-picked tracking method combining popular tools and 2) various state-of-the-art analyses usingsingle-molecule movies.CitingIfSlitflowwas useful for your research, please consider citing the following our paper:Ito, Y., Hirose, M., and Tokunaga, M. (2023). Slitflow: A Python framework for single-molecule dynamics and localization analysis. SoftwareX 23, 101462.10.1016/j.softx.2023.101462ContributingSlitflowwelcomes any contributions such as bug reports, bug fixes, enhancements, and documentation improvements from interested individuals and groups.
Please seedocumentation.
All contributors to this project are expected to abide by ourcode of conduct.LicenceSlitflowis distributed under theBSD 3-Clause License.
Package: slitherlib
slitherA simple, easy to use framework for adding randomized, anonymous IP addresses and user-agents to web scrapers, crawlers, and penetration testing solutionsSlither is designed to add randomized User-Agent strings and Anonymous IP addresses from proxy sources around the web for use in your web scraping, penetration testing, or data aggregation projects. Please respect the owners and hardware of the data you are scraping.I BEAR NO RESPONIBILITY IF YOU USE THIS SOFTWARE WITHOUT PERMISSION OR TO DO HARM TO WEB ASSETS. RESPECT THE DATA AND PLATFORMS. BE ETHICAL WITH YOUR SCRAPING AND UNDERSTAND THAT ALL ASSETS HAVE FINITE RESOURCES. DONT DDOS THINGS. ITS BAD.SLITHER IS ONYL COMPATIBLE WITH PYTHON 3. NO SUPPORT FOR PYTHON 2 IS PLANNED. That being said, to install on a machine with only Python 3 installed:pip install slitherlibOn a machine with both Python 2 and 3 installed:pip3 install slitherlibFrom there, simply from slitherlib.slither import Snake to add the package to the project file that contains your scraping code.Each instance of the Slither class has two variables, ip and ua for IP Address and User-Agent respectively. The IPs are pulled, in real time, from web proxy sources every time you declare and instance of the Slither class so no need to worry about IPs going stale. The majority of the addresses are less than 20 minutes old when pulled down and many are less than 10. An example of anonymizing your scraper with the Requests library looks like this:importrequestsfromrandomimportchoicefromslitherlib.slitherimportSnakes=requests.Session()snake=Snake()ip_addresses=snake.ipsuser_agents=snake.uasheaders={"User-Agent":choice(user_agents)}try:ip=ip_addresses.pop()r=s.get('https://www.google.com',proxies={'https':ip,'http':ip},headers=headers)print(r.status_code)exceptrequests.exceptions.ProxyError:print('Proxy Timed Out. Removing and Retrying')ip=ip_addresses.pop()r=s.get('https://www.google.com',proxies={'https':ip,'http':ip},headers=headers)exceptIndexError:print("We've run out of IPs and/or User-Agents! Re-run your script to get more!")This method also supports concurrency and adding an individual IP and/or UA to each thread or process that is spawned by your project! Accomplishing this is done as follows:importrequestsfromslitherimportSlitherfromconcurrent.futuresimportThreadPoolExecutor,wait,as_completed# specify the number of threads your scraper will use as the "thread count".# By default, thread_count is set to "all", meaning that you will pull down all available IP addresses and user agents. To specify a specific number, pass the number of desired items as an int to the named `thread_count` argumentnum_of_threads=7futures=list_of_urls_to_scrapenew_slither=Slither(thread_count=num_of_threads)#returns a list of dictionaries of IPs and User-Agentsforiinnew_slither.masks:#spawn your threads here assigning i['address'] to your thread's proxy parameter and#i['user-agent'] to each thread's 'User-Agent' header parameter...Have fun and happy Scraping!
Package: slitherway
SlitherwaySlitherway is a lightweight python wrapper around theFlywayCLI.It allows you to run migrations directly from your python applications and testsIn order to use, you must have the Flyway CLI installed on your machine!ExampleUsing slitherway is simplefromslitherway.commandsimportmigratefromslitherway.modelsimportFlywayCommandArgsargs=FlywayCommandArgs(user=pg.POSTGRES_USER,password=pg.POSTGRES_PASSWORD,locations=["migrations"],url=f"jdbc:postgresql://localhost:{pg.get_exposed_port(5432)}/{pg.POSTGRES_DB}",)migrate(args)
Package: slitlessutils
SlitlessutilsSlitlessutils is a package for simulating and extracting wide-field slitless spectroscopy (WFSS) data, highly focused on data from the Advanced Camera for Surveys (ACS) and Wide-Field Camera 3 (WFC3) on theHubble Space Telescope.Early Development Software WarningSlitlessutils is under active development software and subject to change.QuickstartThe latest released version of this package can be installed using pip
from the command line:pip install slitlessutilsTo install the latest development version of this repository, please use:pip install git+https://github.com/spacetelescope/slitlessutils.gitYou also need to obtain the calibration (reference) files, which are stored in a public box folder, which can be done with the slitlessutils config objects.  Please seeconfiguring slitlessutilsfor instructions and examples.  Please see ourdocumentationfor additional installation instructions and/or methods.We have encountered several frequently-asked questions and give some examples ourFAQ page.
Package: slitronomy
Updated and improved version of the Sparse Lens Inversion Technique (SLIT), developed within the framework of lens modelling softwarelenstronomy.The documentation is available onreadthedocs.org(currently in development).InstallationThis package is available through PyPi.$pipinstallslitronomy--userRequirementsIn addition to standard packages listed inrequirements.txt, lenstronomy needs to be installed to access to python classes for proper initialisation of SLITronomy solvers.The most straghtforward way to use pixel-based solvers of SLITronomy is directly through lenstronomy (version >=1.6.0), by using the‘SLIT_STARLETS’light profiles. SLITronomy can also be used as a standalone tool.Example notebooksAn ensemble of example notebooks are located atthirdparty/notebooks:Pixelated image-to-source plane mappingStarlets decomposition and reconstructionSparse source reconstructionLens model optimizationMulti-band source reconstruction(requiresMuSCADeT)Sparse source and lens light reconstructionsSparse source reconstruction with quasar imagesAcknowledging SLITronomySLITronomy:Galan et al. 2020.Sparse Linear Inversion Technique:Joseph et al. 2019.lenstronomy modelling software:Birrer & Amara 2018.
Package: slixmppbot
The XmppBot framework is powered bySlixmppand allows you to easily write bots that use the XMPP protocol.
You can create commands by decorating functions in your subclass
or customize the bot’s operation completely. MUCs are also supported.You can see some examples inexamplesfolder.You can install and unsintall with:# install
pip3 install slixmppbot
# uninstall
pip3 uninstall slixmppbot
Package: slixmpp-omemo
This library provides an interface topython-omemo.LicenseThis plugin is licensed under GPLv3.Note on the underlying OMEMO libraryAs stated inpython-xeddsa’s
README,
(dependency of python-omemo), this library has not undergone any
security audits. If you have the knowledge, any help is welcome.Please take this into consideration when using this library.InstallationArchLinux (AUR):python-slixmpp-omemo, orpython-slixmpp-omemo-gitPIP:slixmpp-omemoManual:python3 setup.py installExamplesThe repository contains an example bot that contains many comments, and
can be used to test against other setups. To use it:` python examples/echo_bot.py--debug-jfoo@bar-ppasswd--data-dir/foo/bar `It also contains commands. Feel free to open merge requests or issues to
add new useful ones.CreditsFor the help on OMEMO:SyndaceDaniel Gultsch (gultsch.de)And on Slixmpp:Mathieu Pasquet (mathieui@mathieui.net)Emmanuel Gil Peyrot (Link mauve)
Package: slize
Intent and Slot-filling on the ATIS dataset task.Model architectureFor this task, a model was trained to jointly predict a sentence's Intent and Slots (entities).  Each word is embedded (using pre-defined word vectors) to capture the word's meaning while a character-level bidirection Long Short-Term Memory(LSTM) Network encodes the word's letters to capture its lexical structure.The word vector and outputs of the character-level bi-LSTM are then fed into the word-level bi-LSTM which predicts the Intent.  The second layer feeds into a Conditional Random Fields (CRF) layer to predict the individual slots (entities).The model is stored inintents_slots/model.pyWord VectorsThe newly released Poincare word embeddings (100 dimensional) were used as they have been reported to better encode the hierarchical relationships inherent between wordsyou can find the word vectors used inword_vectors/poincare.txtDemoyou can run a demo of the pre-trained model by runningintents_slots/demo.pyTrainingThe model was trained for 50 epochs and stored in the pretrained_models directorypretrained_models/dataset_infocontains all the vocabularies used by the model (character, word, intent, entity) and their mappings to numbers for encoding/decodingpretrained_models/model.h5are the weights to the modelThe model's loss during training over the epochs are shown below:The model's accuracy at predicting intents and entities (slots) over time are shown below:You can retrain the model by runningintents_slots/train.pyTestsJoint:Intents only:Entites only:to above results can be obtained by runningintents_slots/evaluate.pyImprovements:To improve the robustness of the model to out of vocab words, the training data was lemmatised prior to training and the model was retrained.  Numbers were also masked using a placeholder (e.g. *) to avoid out-of-vocab times appearing (e.g. 9:30 may appear in training but not 9:29).The results were slightly improved given the above tweaks.  Precision, Recall and F1 scores improved across the board (for both intents, entities).Perfect scores were achieved using the validation set!??data/atis-2-dev.csvFuture Improvements (TO DO):Balance out training data (its clear that the intent ATIS_FLIGHT dominates the training set)(and 'O' dominates the entity tags)(or if we discount this as an entity tag - then "to/fromloc.city_name" tags)e.g. this can be achieved by subsampling or artificially perterbing data to generate more samples (e.g. increase training instance by sliding each sentences one,two,three,etc places)Investigate the Intents & Entities which are scoring relatively low F1 scorese.g. (intents such as ATIS_DAY_NAME, ATIS_MEAL, ATIS_FLIGHT_TIME, etc)e.g. (entities such as compartment, booking_class, meal_code, etc)Preprocess intent labels with #?Embed unknown words too (if possible) rather than giving them  (1)convert word numbers (e.g. "one") into digitsimprove slot extraction using additional pre-trained Named Entity Recognition (NER)s from various libraries
Package: sllib
SLLibA python library for reading SLG or SL2 files created by Lowrance fishfinders.
Only tested with python 3.6 and 3.7Git Repostitory and homepage located athttps://github.com/opensounder/python-sllibUntil version 1.x.y every change to x will be a possible breaking change.
Otherwise it should follow samever versioning principles.InstallationUsingpippipinstallsllibCloning from gitpython3 setup.py installUsagepython3
>>> import sllib
>>> with open('somefile.sl2', 'rb) as f:
...    reader = sllib.Reader(f)
...    header = reader.header
...    print(header.format)
...    for frame in reader:
...        print(frame.gps_speed)Or have a look athttps://github.com/opensounder/jupyter-notebooksExamples# this will create a file called `small.csv` in current directorypython./examples/tocsv.py./tests/sample-data-lowrance/Elite_4_Chirp/small.sl2Developmentgitclonehttps://github.com/opensounder/python-sllibcdpython-sllib
python3-mvenvvenv
.venv/bin/activate
pipinstall-e.
pipinstall-rdev-requirements.txt# then to test in for example python 3.9# change to what fits your installationtox-epy39# before committing please run lint and fix any issuestox-elintSLG informationBesides trial and errorhttps://www.geotech1.com/forums/showthread.php?11159-Lowrance-MCC-saved-data-structurehttps://www.memotech.franken.de/FileFormats/Navico_SLG_Format.pdf
Package: sllim
Simple Large Language Inference Modelsllimserves as a quality of life wrapper around theopenai-pythonlibrary.
I found myself writing and rewriting the same helper functions with each new project I began, so now I am working to put these functions together into a easy to use library.Nothing here is ground-breaking; everything here is opinionated.UsageUse thechatfunction to connect with theChatCompletion.createmodels. By default, it uses thegpt-3.5-turbomodel, but you can pass amodelparam to usegpt-4fromsllimimportchatchat([{"role":"system","content":"Example system message",},{"role":"user","content":"Example user message",}])completeworks just likeCompletion.create, andembedisEmbedding.create.Map Reducefromsllimimportmap_reducetemplate=[{"role":"system","content":"You are an excellent copy writer and you will rewrite my work into{adjective}words."},{"role":"user","content":"Below is my writing, please improve it.\n\n{writing}"},]writings=[...]# long list of copywritingforadjectivein["clearer","more expressive","fewer"]:# Since `writings` is a list, this is what we will reduce over.# The other variables are treated as constants through the reduction.gen=map_reduce(template,adjective=adjective,writing=writings,model="gpt-4")foridx,resultinenumerate(gen):# This is a multithreaded generator to optimize latency to networked servicesoriginal=writings[idx]print("Was:",original,"\nNow:",result)BenefitsLocal file caching. Each of the functions is locally cached in request-response key-pairs to prevent excessive network activity.Auto-retry. Timeouts for rate limits, retry for internal errors (>=500 status code).Parameter names are in the functions so that you don't have to go looking at the docs constantly.Map reduce prompts onto dataTODO: Cost estimates before running long tasksTODO: Describe task -> run taskTODO: Allow easy estimateTODO: Allow easy logging
Package: slm
slm - Seshat library managerslm (seshatlibrarymanager) is a tool for managing C/C++ library,
inspired by npm.UsageTo initialize with slm, just type$slminitThis command will createlibrary.ymlfile in current working directory.library.ymlThis file is a library spec file just likepackage.jsonfile in
JavaScript package.The file format is a valid YAML syntax.An example oflibrary.ymlfile.name:myawfullibrarydescription:Description of the library.version:1.2.10license:MITscripts:configure:./configure.pymake:makeBuilt-in variablesThere are some variables send to your build tool when run build scripts.LIBRARY_NAMEA string exactlynamefield inlibrary.ymlfile.LIBRARY_VERSIONA string exactlyversionfield inlibrary.ymlfile.SONAMElib{LIBRARY_NAME}.so.{MAJOR VERSION}MAJOR VERSIONis the first part ofLIBRARY_VERSIONwhich is separated with.character.e.g.libmyawfullibrary.so.1SemVerAll slm libraries should followSemantic Versioning 2.0.
Package: slmcontrol
slmcontrolThis is a package that allows one to control a Spatial Light Modulator (SLM) with a simple an intuitive syntax. We support Python 3.7-3.12.If you use this package in your research, please cite it and give it a star on GitHub.LinksPyPIDocumentationSource codeInstalationTo install this package, runpip install slmcontrolon a terminal.It will work of the box for Windows. That is also the expected behavior for MacOS, but it has not been tested. For Linux, you will need to manually installwxPythonbefore using this package.If you encounter the errorlibSDL2-2.0.so.0: cannot open shared object file: No such file or directory, you need to install the packagelibsdl2-2.0-0(on Ubuntu, runsudo apt install libsdl2-dev).If you encounter any problems, please open an issue on GitHub.AuthorsDeveloped by PhD students at the Quantum Optics Laboratory of Universidade Federal Fluminense:Marcos GilAndré JuniorAltilano BarbosaBraian PinheiroThe part of the code that sends image to the SLM (slm.py) was taken from the repositorypyslmfrom Sébastien M. Popoff, with only minor modifications.