Saravanan666/pypi-org huggingface dataset:
Package: pysub20
pysub20 is a LGPL licensed, simple pure Python binding for sub20 library: a software that allows PCs to work with a SUB-20 device.
SUB-20 is a versatile and efficient bridge device providing simple interconnect between PC (USB host) and different HW devices and systems via popular interfaces such as I2C, SPI, MDIO, RS232, RS485, SMBus, ModBus, IR and others.
You could find more information about the SUB-20 device on the official site:http://www.xdimax.com/sub20/sub20.htmlThe main goal of the project is that: to make the use of the SUB-20 library more convenient and pythonic. It’s possible to use SUB-20 dll/so directly but it’s a bit inconvenient, because every time you have to wrap the C library functions with Python c_type signatures.RequirementsYou MUST have a sub20 library installed in your system. To proceed with the installation take a look at the SUB-20 documentation:http://www.xdimax.com/sub20/sub20.html.UsageLow-level API:The low-level API is the raw Python functions converted from the SUB-20 C library functions.
You can use them ‘as is’ with regard to the SUB-20 and Python c_types documentation.>>> from sub20.ctypeslib.libsub import SIGNATURES, sub_version
>>> from sub20.ctypeslib.utils import load_ctypes_library
>>> libname = "sub20.dll" if sys.platform == "win32" else "libsub.so"
>>> libsub = load_ctypes_library(libname, SIGNATURES)
>>> sub_errno = c_int.in_dll(libsub, "sub_errno")
... your code with SUB-20 functions
>>> libsub.sub_open(None)
>>> libsub.close()High-level API:A high level API tries to hide routine operations under the hood and make the SUB-20 library more pythonic and simple. The core of the high-level API is SUBDevice class. You don’t have to load libraries explicitly because it’s happening during the class instantiation.>>> from sub20 import SUBDevice
>>> subdev = sub20.SUBDevice()
>>> subdev.open()Then you can use the implemented functions in your code. To properly use them it’s strongly recommended to read the SUB-20 documentation first:http://www.xdimax.com/sub20/doc/sub20-man.pdfNB: If you don’t have a sub20 library in your system and you try to create a SUBDevice instance then you’ll get an ImportError exception.List of implemented functions:sub_get_serial_number,
sub_get_product_id,
sub_get_version,
sub_get_version_dict,
sub_reset,
sub_eep_read,
sub_eep_write,
sub_i2c_freq,
sub_i2c_config,
sub_i2c_start,
sub_i2c_stop,
sub_i2c_scan,
sub_i2c_read,
sub_i2c_write,
sub_i2c_transfer,
sub_gpio_config,
sub_gpio_read,
sub_gpio_write,
sub_gpiob_config,
sub_gpiob_read,
sub_gpiob_write,
sub_rs_set_config,
sub_rs_get_config,
sub_rs_timing,
sub_rs_xfer,
sub_fifo_config,
sub_fifo_read,
strerrorExamplesUnder construction
Package: pysub-dl
Subtitle downloaderActually now it only supports subscene.com to download the subtitles.InstallationTo install the script do thisOption 1 : Install via pip$ sudo pip install pysub-dlOption 2 : If you have downloaded the source$ sudo python setup.py installDo not forget to upgrade it after a week interval I am modifying so many things very frequently$ sudo pip install pysub-dl --upgradeHow to useUse it like: pysub-dl movie [language][language] is optional, if language is provided you will see subtitles available for that language only or it will show you all.For help$ pysub-dl --helpGeneral usage$ pysub-dl iron-man english

$ pysub-dl hitman spanishIf you do not provide any language it will show you all the available subtitles for that movie for all languages.One request:Do not use space in the movie name, Use ‘-‘(hyphen) instead of ‘ ‘(white space).Movie name is not case sensitive, so all you have to worry about the space only orif you want to use special characters like ‘ you can use double quotesi. e.$ pysub-dl "we're the millers"First you should go to your movie directory then you should execute your code, it will be better causeexecution downloads the subtitle file(s) in the present working directorybut it is not mandatory.On executionit will show the list of subtitles available at the moment at subscene.comfor that particular movie. You have to choose one number from them.Uncertainlyif you give wrong movie name, no problem it will show you the probable movie name and you have to choose from them.For windows users they should download the package manually and extract it. Run it on that directory asC:\master> python pysub-dl incredibles englishPress [Ctrl] + c or [Ctrl] + d to exit immediately.For windows users it is [Ctrl] + z (I think).Reporting BugsPlease report bugs at github issue tracker:https://github.com/iamsudip/pysub-dl/issuesAuthoriamsudip <iamsudip@programmer.net>http://github.com/iamsudip
Package: pysub-parser
pysub-parserUtility to extract the contents of a subtitle file.Supported types:ass:Advanced SubStation Alphassa:SubStation Alphasrt:SubRipsub:MicroDVDtxt:Sub ViewerFor more information:http://write.flossmanuals.net/video-subtitling/file-formatsUsageThe method parse requires the following parameters:path: location of the subtitle file.subtype: one of the supported file types, by default file extension is used.encoding: encoding of the file,utf-8by default.**kwargs: optional parameters.fps: framerate (only used bysubfiles),23.976by default.frompysubparserimportparsersubtitles=parser.parse('./files/space-jam.srt')forsubtitleinsubtitles:print(subtitle)Output:0 > [BALL BOUNCING]
1 > Michael?
2 > What are you doing out here, son? It's after midnight.
3 > MICHAEL: Couldn't sleep, Pops.Subtitle ClassEach line of a dialogue is represented with aSubtitleobject with the following properties:index: position in the file.start: timestamp of the start of the dialog.end: timestamp of the end of the dialog.text: dialog contents.forsubtitleinsubtitles:print(f'{subtitle.start}>{subtitle.end}')print(subtitle.text)print()Output:00:00:36.328000 > 00:00:38.329000
[BALL BOUNCING]

00:01:03.814000 > 00:01:05.189000
Michael?

00:01:08.402000 > 00:01:11.404000
What are you doing out here, son? It's after midnight.

00:01:11.572000 > 00:01:13.072000
MICHAEL: Couldn't sleep, Pops.CleanersCurrently, 4 cleaners are provided:asciiwill translate every unicode character to its ascii equivalent.bracketswill remove anything between them (e.g.,[BALL BOUNCING])formattingwill remove formatting keys like<i>and</i>.lower_casewill lower case all text.frompysubparser.cleanersimportascii,brackets,formatting,lower_casesubtitles=brackets.clean(lower_case.clean(subtitles))forsubtitleinsubtitles:print(subtitle)0 > 
1 > michael?
2 > what are you doing out here, son? it's after midnight.
3 > michael: couldn't sleep, pops.WritersGiven any list ofSubtitleand a path it will output those subtitles in asrtformat.
Package: pysubpub
This package offers a “publish-subscribe” framework.The framework can be used to implement basic “actors” where each “actor” is contained in a python module.
The function “upub” can be used to queue a message in front instead of the normal tail.Small Example## Actor 1 in module1.py
##
from subpub import sub, pub

@sub
def on_topic1(param1):
    print "module1/topic1: ", param1

@sub
def on_topic2(param1):
    print "module1/topic2: ", param1


## Actor 2 in module2.py
##
from subpub import sub, pub

@sub
def on_topic1(param1):
    print "module2/topic1: ", param1

pub("topic1", "value1")
pub("topic2", "value2")The example above would yield:"module1/topic1: value1"
"module2/topic1: value1"
"module1/topic2: value2"
Package: pysubs2
pysubs2 is a Python library for editing subtitle files.
It’s based onSubStation Alpha, the native format ofAegisub; it also supportsSubRip (SRT),MicroDVD,MPL2,TMPandWebVTTformats andOpenAI Whispercaptions.There is a small CLI tool for batch conversion and retiming.$pipinstallpysubs2$pysubs2--shift0.3s*.srt$pysubs2--tosrt*.assimportpysubs2subs=pysubs2.load("my_subtitles.ass",encoding="utf-8")subs.shift(s=2.5)forlineinsubs:line.text="{\\be1}"+line.textsubs.save("my_subtitles_edited.ass")To learn more, pleasesee the documentation.
If you’d like to contribute, seeCONTRIBUTING.md.pysubs2 is licensed under the MIT license (seeLICENSE.txt).
Package: pysubstringsearch
A Python library written in Rust that searches for substrings quickly using a Suffix ArrayTable of ContentsTable of ContentsAbout The ProjectBuilt WithPerformance500MB File7500MB FileInstallationUsageLicenseContactAbout The ProjectPySubstringSearch is a library designed to search over an index file for substring patterns. In order to achieve speed and efficiency, the library is written in Rust. For string indexing, the library useslibsaissuffix array construction library. The index created consists of the original text and a 32bit suffix array struct. To get around the limitations of the Suffix Array Construction implementation, the library uses a proprietary container protocol to hold the original text and index in chunks of 512MB.The module implements a method for searching.search- Find different entries with the same substring concurrently. Concurrency increases as the index file grows in size with multiple inner chunks.search_multiple- same assearchbut accepts multiple substrings in a single callBuilt WithlibsaisPerformance500MB FileLibraryFunctionTime#ResultsImprovement FactorripgrepyRipgrepy('google', '500mb').run().as_string.split('\n')47.2ms59431.0xPySubstringSearchreader.search('google')497µs594395xripgrepyRipgrepy('text_two', '500mb').run().as_string.split('\n')44.7ms1591.0xPySubstringSearchreader.search('text_two')14.9µs1593000x7500MB FileLibraryFunctionTime#ResultsImprovement FactorripgrepyRipgrepy('google', '6000mb').run().as_string.split('\n')900ms628341.0xPySubstringSearchreader.search('google')10.1ms6283489.1xripgrepyRipgrepy('text_two', '6000mb').run().as_string.split('\n')820ms01.0xPySubstringSearchreader.search('text_two')200µs04100xInstallationpip3installPySubstringSearchUsageCreate an indeximportpysubstringsearch# creating a new index file# if a file with this name is already exists, it will be overwrittenwriter=pysubstringsearch.Writer(index_file_path='output.idx',)# adding entries to the new indexwriter.add_entry('some short string')writer.add_entry('another but now a longer string')writer.add_entry('more text to add')# adding entries from file lineswriter.add_entries_from_file_lines('input_file.txt')# making sure the data is dumped to the filewriter.finalize()Search a substring within an indeximportpysubstringsearch# opening an index file for searchingreader=pysubstringsearch.Reader(index_file_path='output.idx',)# lookup for a substringreader.search('short')>>>['some short string']# lookup for a substringreader.search('string')>>>['some short string','another but now a longer string']# lookup for multiple substringsreader.search_multiple(['short','longer',],)>>>['some short string','another but now a longer string']LicenseDistributed under the MIT License. SeeLICENSEfor more information.ContactGal Ben David -gal@intsights.comProject Link:https://github.com/Intsights/PySubstringSearch
Package: pysubversion
PySubversionSVN command-line client wrapper.Explore the docsReport Bug---Request FeatureTable of ContentsAbout The ProjectBuilt WithGetting StartedUsageContributingLicenseContactAcknowledgmentsAbout The ProjectThis client supports the major operations of the svn command-line client. Please put in a feature request if you would like more operations to be added!(back to top)Built WithPythonSubversion CLI Client(back to top)Getting StartedInstallers are available onPypi.python -m pip install --upgrade pysubversion(back to top)Usageinitialize the client oncwdimportpysvnsvn=pysvn.Client()revertRevert a given path + options...svn.revert('foo.txt')svn.revert('foo/',recursive=True)svn.revert('foo.txt',remove_added=True)logShow the log messages for a set of revision(s) and/or path(s)..svn.log()svn.log(revision=12)svn.log(revision='1:3')svn.log(file='foo.txt',revision=Revision.HEAD)diffDisplay local changes or differences between two revisions or pathssvn.diff(1)svn.diff(3,4)updateBring changes from the repository into the working copy.svn.update()svn.update(path='foo.txt')svn.update(path=['foo.txt','bar.c'])(back to top)ContributingContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make aregreatly appreciated.If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!Fork the ProjectCreate your Feature Branch (git checkout -b feature/AmazingFeature)Commit your Changes (git commit -m 'Add some AmazingFeature')Push to the Branch (git push origin feature/AmazingFeature)Open a Pull Request(back to top)LicenseDistributed under the BSD 3-Clause License. SeeLICENSE.txtfor more information.(back to top)ContactRyan Bender -@itsmeryan.hihello-ryan.bender@cfacorp.comProject Link:https://github.com/ryanbender2/pysvn(back to top)Acknowledgmentsleafvmaple(back to top)
Package: py-subwasm-bindings
py-subwasm-bindingsPython bindings for subwasm utility:https://gitlab.com/chevdor/subwasmInstallationCompile for local developmentpip install -r requirements.txt
maturin developBuild wheelhousespip install -r requirements.txt

# Build local OS wheelhouse
maturin buildUsageimportjsonimportsubwasm# Show metadata from WASM filemetadata_str=subwasm.get_metadata("runtime_000.wasm")metadata_json=json.loads(metadata_str)print(json.dumps(metadata_json,indent=4))# Show metadata from local Substrate nodemetadata_str=subwasm.get_metadata("http://127.0.0.1:9933")metadata_json=json.loads(metadata_str)print(json.dumps(metadata_json,indent=4))Licensehttps://github.com/polkascan/py-subwasm-bindings/blob/master/LICENSE
Package: pysubyt
py-SUbyTA Python library for Semantic Uplifting by Templates.An easy way (through python) to produce Linked Data
(aka semantic uplifting)
from classic data files (CSV, XML, JSON) into triples (RDF, turtle)
through jinja-TemplatingUsage and further readingPlease check out the Py-SUbyt documentation. Namely:theuser guidethe supportedfeaturestheexamplesand thestyle guide!
Package: pysudo
pysudoInstallation Instructionsuse pip or pip3 to install the library.pip install pysudoImportingfrom pysudo import solveExample of usage:problem = [[6 , 7 , 0 , 0 , 0 , 0 , 0 , 0 , 2],
           [0 , 0 , 1 , 7 , 9 , 0 , 0 , 3 , 0],
           [0 , 5 , 0 , 0 , 6 , 2 , 0 , 0 , 0],
           [0 , 0 , 0 , 0 , 0 , 0 , 0 , 2 , 5],
           [0 , 0 , 0 , 3 , 0 , 8 , 0 , 0 , 0],
           [2 , 4 , 0 , 0 , 0 , 0 , 0 , 0 , 0],
           [0 , 0 , 0 , 1 , 3 , 0 , 0 , 5 , 0],
           [0 , 8 , 0 , 0 , 5 , 7 , 1 , 0 , 0],
           [5 , 0 , 0 , 0 , 0 , 0 , 0 , 9 , 6]]

solved = solve(problem)The empty cells in the Sudoku puzzle are to be filled by 0.solvedis an array having 9 arrays of row inside it representing the complete solved puzzle.To visualize output use :for rows in solved :
  print(rows)Output[6, 7, 9, 4, 1, 3, 5, 8, 2]
[8, 2, 1, 7, 9, 5, 6, 3, 4]
[3, 5, 4, 8, 6, 2, 9, 7, 1]
[7, 3, 6, 9, 4, 1, 8, 2, 5]
[1, 9, 5, 3, 2, 8, 4, 6, 7]
[2, 4, 8, 5, 7, 6, 3, 1, 9]
[4, 6, 7, 1, 3, 9, 2, 5, 8]
[9, 8, 2, 6, 5, 7, 1, 4, 3]
[5, 1, 3, 2, 8, 4, 7, 9, 6]
Package: pySudokuSolver
Running pySudokuSolverExceute the script “sudoku_solver.py”python sudoku_solver.pyRequirementspython2PyQt4Created and tested using python 2.7 & PyQt4 4.8 on Xubuntu 13.04.HelpHelp on how to use the GUI (for v1.2) -http://guanidene.blogspot.in/2011/07/sudoku-solver-with-gui-written-in.htmlHelp on how the Sudoku Solver works -http://guanidene.blogspot.in/2011/07/how-to-solve-sudoku-puzzle.html
Package: pysuerga
Pysuerga is a very simple static site generator. It was initially created
for [pandas](https://pandas.pydata.org), but is used in other projects.To use Pysuerga you need to create the website structure for your project,
with markdown templates, and Pysuerga will generate the same structure after
rendering the files.It is able to manage variables in a structure way, can use Jinja2 in the templates
and includes plugins for some common pages: team page with GitHub info, blog
aggregator, release information, etc.
Package: pysuez
Get your consumption data from your Suez account (www.toutsurmoneau.fr)This work is inspired by the [Sirus](https://github.com/Sirus10)’s[domoticz sensor](https://github.com/Sirus10/domoticz).
It is also inspired by [pyLinky](https://github.com/pirionfr/pyLinky) code from [Pirionfr](https://github.com/pirionfr).InstallationThe easiest way to install the library is using [pip](https://pip.pypa.io/en/stable/):pip install pySuezYou can also download the source code and install it manually:cd /path/to/pySuez/
python setup.py installUsagePrint your current and history datapySuez -u <USERNAME> -p <PASSWORD> -c <COUNTER_ID> -P <PROVIDER_NAME>You need to get yourCOUNTER_IDeither from your bill or from your history consumption on your Suez’s website. You can find it in the source code of this webpage, right after…/mon-compte-en-ligne/statMData/xxxxxxx?….
If no provider name is given,Tout sur mon eauwill be used. The only one supported here isEau Olivet.Dev envcreate virtual env and install requirementsvirtualenv -p /usr/bin/python3.4 env
pip install -r requirements.txt
Package: pysuffixarray
# pysuffixarray
Suffix array implementation in python.## Usage
### pysuffixarray.core.SuffixArray(string)
Constructs a suffix array.`python from pysuffixarray.core import SuffixArray sa =SuffixArray('MISSISSIPPI')`### SuffixArray.suffix_array()
Returns a suffix array.`python sa =SuffixArray('MISSISSIPPI')sa.suffix_array() >>> [11, 10, 7, 4, 1, 0, 9, 8, 6, 3, 5, 2] `### SuffixArray.longest_common_prefix()
Returns an array of longest common prefix(LCP).
LCP[i] contains the length of common prefix between SA[i] and SA[i-1].`python sa =SuffixArray('MISSISSIPPI')sa.longest_common_prefix() >>> [0, 0, 1, 1, 4, 0, 0, 1, 0, 2, 1, 3] `### SuffixArray.longest_repeated_substring()
Returns one of the longest repeated substrings within the string.`python sa =SuffixArray('MISSISSIPPI')sa.longest_repeated_substring() >>> 'ISSI' `
Package: pysugarcrm
Python API Wrapper for SugarCRM v10Free software: BSD licenseDocumentation:https://pysugarcrm.readthedocs.org.Quickstart$pipinstallpysugarcrmfrompysugarcrmimportSugarCRMapi=SugarCRM('https://yourdomain.sugaropencloud.eu','youruser','yourpassword')# Return info about current userapi.me# A more complex query requesting employeesapi.get('/Employees',query_params={'max_num':2,'offset':2,'fields':'user_name,email'}){u'next_offset':4,u'records':[{u'_acl':{u'fields':{}},u'_module':u'Employees',u'date_modified':u'2015-09-09T13:40:32+02:00',u'email':[{u'email_address':u'John.doe@domain.com',u'invalid_email':False,u'opt_out':False,u'primary_address':True,u'reply_to_address':False}],u'id':u'12364218-7d79-80e0-4f6d-35ed99a8419d',u'user_name':u'john.doe'},{u'_acl':{u'fields':{}},u'_module':u'Employees',u'date_modified':u'2015-09-09T13:39:54+02:00',u'email':[{u'email_address':u'alice@domain.com',u'invalid_email':False,u'opt_out':False,u'primary_address':True,u'reply_to_address':False}],u'id':u'a0e117c0-9e46-aebf-f71a-55ed9a2b4731',u'user_name':u'alice'}]}# Generate a Leadapi.post('/Leads',json={'first_name':'John','last_name':'Smith','business_name_c':'Test John','contact_email_c':'john@smith.com'})Context manager (new in 0.1.4)frompysugarcrmimportsugar_apiwithsugar_api('http://testserver.com/',"admin","12345")asapi:data=api.get('/Employees',query_params={'max_num':2,'offset':2,'fields':'user_name,email'})api.post('/Leads',json={'first_name':'John','last_name':'Smith','business_name_c':'Test John','contact_email_c':'john@smith.com'})# Once we exit the context manager the sugar connection is closed and the user is logged outFeaturesOAuth2 authentication with username and passwordContext processor with auto-logout (new in 0.1.4)TODOAdd more auxiliary methods/propertiesBuild documentationHistory0.1.0 (2015-09-09)First release on PyPI.0.1.1(2015-09-10)More direct importfrom pysugarcrm import SugarCRMAdded some tests0.1.2(2016-03-17)Added POST and PUT methodsImproved error handling0.1.3(2016-03-29)Added platform parameter to constructor0.1.4(2016-03-30)Added close method and context manager for easier usage1.0.0(2016-03-30)Python 3 tests passing1.0.1(2018-03-09)Python 3 import fixes1.0.2(2019-01-24)Remove future library dependency1.0.3(2021-09-06)Fixed misleading error when Sugar connexion is not performed successfully
Package: pysugarNG
IntroductionContentsIntroductionMakina Corpus sponsored softwareA pythonic binding for the SugarCRM SOAP interface,
make it possible to use objects as if they were local ie:>>> import pysugar
>>> sugar_user = 'myuser'
>>> sugar_password = 'mypassword'
>>> sugar_base_url = 'http://myserver/sugar'
>>> sugar_debug = False
>>> sugar_session = pysugar.SugarSession(
... sugar_user, sugar_password, sugar_base_url, sugar_debug)
>>> sugar_store = pysugar.SugarStore(sugar_session)
>>> sugar_lead = sugar_store.m.Leads.add()
>>> sugar_lead.first_name = 'Test Lead'
>>> sugar_lead.post()
>>> print sugar_lead.id
929a26ac-fc47-3232-20a6-4534cdb3290ethen you can test the result in another session…(initialization stuff):>>> id = '929a26ac-fc47-3232-20a6-4534cdb3290e'
>>> sugar_lead = sugar_store.m.Leads.get(id)
>>> print sugar_lead.first_nameid being the previously obtained id string from the sugar serverMakina Corpus sponsored softwarePlanet Makina CorpusContact us
Package: pysugg
This package is designed to give some troubles when exceptions occurred.Like the sample below, it gives you an import suggest, in the situation that the package flask is not imported.python code:fromsrc.pysugg.exception_catcherimportExceptionCatcherfromsrc.pysugg.exception_executors.module_suggest_executorimportModuleSuggestExecutorExceptionCatcher().add_executor(ModuleSuggestExecutor("test",print_trace=True)).start()# For test, you can see we have not imported the 'os' module, but no error raise as usual here.# And, you will find suggested import statements.flaskoutput:Module name 'flask' is not declared, now searching the available modules.
Traceback (most recent call last):
  File "/Users/bitekong/PycharmProjects/pysugg/test.py", line 8, in <module>
    flask
NameError: name 'flask' is not defined
1 from flask.app import Flask
2 from site-packages.flask.app import Flask
3 import flask.cli
4 import flask.app
5 import flask.ctxIn the time that the module name is very long or the hierarchy of the module is very deep,
it's very useful in Jupiter which is without theauto-import feature, a feature initially occurring in Pycharm.These modules support you can easy to choose which module should be imported.In the soon next version,pysuggis considered to support thepip auto downloadfeature,
which can save you much time to search the package you did not import and download.
Package: pysuggest
Python wrapper by Ricardo Niederberger Cabral (ricardo.cabral at imgseek.net).Recommendation engine by George Karypis (http://glaros.dtc.umn.edu/gkhome/suggest/overview).More about the wrapped library (SUGGEST):SUGGEST is a Top-N recommendation engine that implements a variety of recommendation algorithms. Top-N recommender systems, a personalized information filtering technology, are used to identify a set of N items that will be of interest to a certain user. In recent years, top-N recommender systems have been used in a number of different applications such to recommend products a customer will most likely buy; recommend movies, TV programs, or music a user will find enjoyable; identify web-pages that will be of interest; or even suggest alternate ways of searching for information.The algorithms implemented by SUGGEST are based on collaborative filtering that is the most successful and widely used framework for building recommender systems. SUGGEST implements two classes of collaborative filtering-based top-N recommendation algorithms, called user-based and item-based.