Saravanan666/pypi-org huggingface dataset:
Package: simple-pipes
PipesSubprocess utilsStatusSourceShieldsProjectPublishersDownloadsRaisedInstallingTo install the package from pypi:pipinstallsimple_pipesAlternatively, you can clone the repo and build the package locally.UsagePass a command in exec form:fromsimple_pipesimportpipe_call,pipe_capturepipe_call(["echo","Hello"])This is equivalent to:importsubprocesssubprocess.Popen(["echo","Hello"],stdout=subprocess.PIPE,stderr=subprocess.STDOUT)Changing directory before execxution:pipe_call(["echo","Hello"],cwd=".")If you're running a command does not terminate, such as starting a server, the program will remain attached.To detach the running process on a given string output:wrapper=pipe_call(["echo","Hello"],break_str="Hello"):You must keep the wrapper object in scope or the detached process will be terminated in garbage collection.Often you want to run a process until it terminates and capture the entire output:output=pipe_capture(["echo","Hello"],cwd=".")print(output)>>HelloDocsAdditional details are available in thefull documentation.To generate the documentation locally:multi-jobdocsTestsUnit tests and behaviour tests are written with the pytest framework.To run tests:multi-jobtestsAdditionally, an html report will be saved to the local directory.ContributingPlease readCONTRIBUTING.mdfor details on our code of conduct, and the process for submitting pull requests.VersioningSemVeris used for versioning. For a list of versions available, see the tags on this repository.Bump2version is used to version and tag changes.
For example:bump2versionpatchReleases are made on every major change.AuthorJoel Lefkowitz-Initial work-Joel LefkowitzSee also the list of contributors who participated in this project.LicenseThis project is licensed under the MIT License - see theLICENSE.mdfile for detailsAcknowledgmentsNone yet!
Package: simplepipreqs
simplepipreqsPython module to generate requirement.txt for a given python / Ipython projectUsageTo make requirments.txt for current directorysimplepipreqsTo make requirments.txt for a target directorysimplepipreqs -p <path_of_dir>To use a different pip versionsimplepipreqs -v <pip_version<example:pip3>>InstallingA step by step series of examples that tell you how to get a development env runningInstall the Requirements:pip install simplepipreqsContributingWe are egarly looking for contributors and maintainers to move this project forward.AuthorsAtharva Gundawar-Initial work-Github handleSee also the list ofcontributorswho participated in this project.LicenseThis project is licensed under the MIT License - see theLICENSE.mdfile for detailsAcknowledgmentsInspired byPipreqs
Package: simplepki
simplepkiSimple Public Key Infrastructure intends to provide most of the components needed
to manage a PKI. (With a few missing tools as of right now)CLIGet the CLI:pip install simplepkiYou can pass--passto most of these and it will ask for a passphrase to use to protect the keyCreate the root CA:# You can also pass the following through arguments if you do not want to use env variables.exportSP_ROOT=/tmp/simplepkiexportSP_CA=rootexportSP_CN="Acme Inc. - Root CA"exportSP_ORGANIZATION="Acme Inc."exportSP_ORGANIZATIONAL_UNIT=ITexportSP_COUNTRY=USexportSP_LOCALITY="Agloe"exportSP_PROVINCE="New York"mkdir$SP_ROOTsimplepkicreaterootCreate a server certificate for blog.acme.com andwww.acme.com:# You can also pass the following through arguments if you do not want to use env variables.exportSP_ROOT=/tmp/simplepkiexportSP_CA=rootexportSP_ORGANIZATION="Acme Inc."exportSP_ORGANIZATIONAL_UNIT=ITexportSP_COUNTRY=USexportSP_LOCALITY="Agloe"exportSP_PROVINCE="New York"simplepkicreatecertwww.acme.com--dnsblog.acme.com--dnswww.acme.comCreate an intermediate CA:# You can also pass the following through arguments if you do not want to use env variables.exportSP_ROOT=/tmp/simplepkiexportSP_CA=rootexportSP_CN="Acme Inc. - Internal CA"exportSP_INTERMEDIATE=intermedaiteexportSP_ORGANIZATION="Acme Inc."exportSP_ORGANIZATIONAL_UNIT=ITexportSP_COUNTRY=USexportSP_LOCALITY="Agloe"exportSP_PROVINCE="New York"simplepkicreateintermediateCreate a wildcard certificate for internal use, signed by the intermediate ca:# You can also pass the following through arguments if you do not want to use env variables.exportSP_ROOT=/tmp/simplepkiexportSP_CA=intermediateexportSP_ORGANIZATION="Acme Inc."exportSP_ORGANIZATIONAL_UNIT=ITexportSP_COUNTRY=USexportSP_LOCALITY="Agloe"exportSP_PROVINCE="New York"simplepkicreatecert*.internal.acme.com--dns*.internal.acme.comAfter running all the commands above you will end up with this/tmp/simplepki/
├── [drwxrwxr-x]  intermediate
│   ├── [drwxrwxr-x]  certs
│   │   ├── [-rw-r--r--]  root.cert.pem
│   │   └── [-rw-r--r--]  wildcard_.internal.acme.com.cert.pem
│   └── [drwx------]  private
│       ├── [-r--------]  root.key.pem
│       └── [-r--------]  wildcard_.internal.acme.com.key.pem
└── [drwxrwxr-x]  root
    ├── [drwxrwxr-x]  certs
    │   ├── [-rw-r--r--]  root.cert.pem
    │   └── [-rw-r--r--]  www.acme.com.cert.pem
    └── [drwx------]  private
        ├── [-r--------]  root.key.pem
        └── [-r--------]  www.acme.com.key.pemYou will find the generated certificates in$SP_ROOT/ca_name/certs/and
private keys in$SP_ROOT/ca_name/private/For more info about available flags, checkout out the helpsimplepki -h.ContributionsContributions are welcome.
Currently we have a few features missing that we would like to addclient certificatepublish crlsign csr with selected cacreate csrthat index.txt log filecrlnumber fileserial fileDisclaimerThis is based on thehttps://github.com/google/easypkiwhich is written in golang
Package: simpleplayer
Simple PlayerDiscover the pinnacle of audio elegance with thissimpleplayermodule, boasting a sophisticated blend of advanced features and seamless compatibility across multiple platforms.InstallationYou can install the module using pip:pip install simpleplayerTerminal UsageYou can also use the module directly from the terminal:simpleplayer path/to/your/audio/file.wavUsageImport thesimpleplayerclass from thesimpleplayermodule:fromsimpleplayerimportsimpleplayerCreate an instance of the AudioPlayer class, providing the filename of the audio file as a parameter:player=simpleplayer('path/to/your/audio/file.wav')Replace 'path/to/your/audio/file.wav' with the actual path to your audio file.Play AudioTo start playing the audio, call the play() method:player.play()Pause and ResumeYou can pause the audio playback by calling the pause() method:player.pause()To resume the playback, call the resume() method:player.resume()Stop AudioTo stop the audio playback, use the stop() method:player.stop()ExampleHere's an example that demonstrates the usage of the AudioPlayer module:fromsimpleplayerimportsimpleplayer# Create an instance of AudioPlayerplayer=simpleplayer('path/to/your/audio/file.wav')# Start playing the audioplayer.play()player.wait()# Perform actions or wait for the audio to finish# Pause the audio playbackplayer.pause()# Resume the audio playbackplayer.resume()# Stop the audio playbackplayer.stop()Remember to replace 'path/to/your/audio/file.wav' with the actual path to your audio file.Simple Player ExampleVoice GeneratorThevoicegenmodule allows you to convert text to speech and save it as an audio file using thegttslibrary.To use thevoicegenmodule, you need to follow these steps:Import thevoicegenclass from thevoicegenmodule:fromsimpleplayerimportvoicegenCreate an instance of the voicegen class, providing the text, filename, and an optional language parameter:voicegen(text,filename,lang='en')Replace text with the text you want to convert to speech, filename with the desired name of the output audio file, and lang with the language code (default is 'en').If the internet connection is available, the text will be converted into speech and saved as an MP3 file with the specified filename.Example usage:fromsimpleplayerimportvoicegen# Generate the voicevoicegen("Hello, world!","output")This will generate an audio file named output.mp3 containing the speech for the text "Hello, world!".Terminal UsageYou can also use the voicegen module directly from the terminal:voicegen "Hello, world!" outputReplace "Hello, world!" with the desired text and output with the desired filename (without the file extension). The generated audio file will be saved as output.mp3 in the current directory.Note: Ensure that you have a stable internet connection to use the voicegen module successfully.LICENSEThis project is licensed under theMIT License- see the LICENSE file for details.
Package: simpleplots
This library is created with the following idea in mind: "If, for some reason, I need to create a lot of simple linear graphs and save their images, I don't want to worry about memory leaks. It must be easy to plot a simple 2D graph and save the figure, even if it's 100 of them!"Pure Python, lightweight,Pillow-based plotting tool,focused on efficiency and prevention of memory losses. The project is, obviously, not trying to compete withmatplotlibin data analysis, but aims to satisfy a specific purpose ofbeing able to create and save a large number of figures in the most efficient, yet accurate way.InstallationYou can simply install the library fromPyPiusingpip.pipinstallsimpleplotsQuick SnippetAn example of the basic usage. Method.saveautomatically closes the figure by default.fromsimpleplotsimportFigurefig=Figure()fig.plot([2,3,4],[4,2,3],color='red')fig.save('graph.png')PerformanceThe data has been collected usingmemory_profilermodule. You can find more testshere.Usage SamplesThe library also supports plotting multiple axes within one figure.fromsimpleplotsimportFigure# Create a figurefig=Figure()# Plot datafig.plot([2,3,4],[1,4.3,6],color='red',linewidth=7)fig.plot([1,3.5,7],[2,3,5],color='blue',linewidth=10)# Save the image (automatically closes the figure)fig.save('graph.png')Plotting dates:fromsimpleplotsimportFigurefromdatetimeimportdatetimeimportnumpyasnp# Create the data to be plottedstart,end=np.datetime64('2022-01-01'),np.datetime64('2022-01-20')times=np.arange(start,end,np.timedelta64(1,'D'))values=np.random.randn(len(times))# Create a figurefig=Figure()# Plot datafig.plot(times,values,color='red',linewidth=7)# Save the image (automatically closes the figure)fig.save('graph.png')Editing locators and formatters:fromsimpleplotsimportFigurefromsimpleplots.datesimportDateFormatter,HourLocatorfromdatetimeimportdatetimeimportnumpyasnp# Create the data to be plottedstart,end=np.datetime64('2022-01-01 01'),np.datetime64('2022-01-01 23')times=np.arange(start,end,np.timedelta64(1,'h'))values=np.random.randn(len(times))# Create a figurefig=Figure()# Create and assign locatorlocator=HourLocator()fig.set_major_locator(locator,axis='x')# Create and assign formatterformatter=DateFormatter('%H:%M',rotation=45)fig.set_major_formatter(formatter,axis='x')# Plot datafig.plot(times,values,color='red',linewidth=7)# Save the image (automatically closes the figure)fig.save('graph.png')Show legend and add title:fromsimpleplotsimportFigure# Create a figurefig=Figure()# Plot datafig.plot([2,3,4],[1,4.3,6],color='red',label='line1')fig.plot([1,3.5,7],[2,3,5],color='blue',label='line2')# Show legendfig.title('Some data')fig.legend()# Save the image (automatically closes the figure)fig.save('graph.png')Additionalsimpleplotsis a demand-driven library. In case you want to usesimpleplots, but can't find a locator, formatter or functionality you need - leave a message by creating an issue.
Package: simple-plotter
simple-plottersimple-plotteris a code-generator to create python code for plotting functional 2D x,y-plots.
The function equation has to be entered in python syntax (allowing the use of numpy statements).simple-plotterprovides a command line interface (CLI) tool, which takes simple JSON files as inputs to generate the
code.Graphical user interface (GUI) front-ends forsimple-plotterare available as well.Thesimple-plotter-qtpackage provides with a Qt-based GUI-frontend intended for desktop use.simple-plotter4aprovides an alternative kivy-based frontend, created primarily for the Android port, which can be
used on a desktop system as well.See NOTICE and LICENSE files for details on licensing.For install and usage instructions please see theproject documentation.
Package: simple-plotter4a
simple-plotter4a(i.e. simple-plotter for Android) is an alternative front-end tosimple-plotterbased onkivyand thekivy-garden/graphmodule.
While it is a cross-platform (completely written in python) its main purpose is to provide a GUI for mobile/touch
devices.simple-plotter4acan be compiled into a stand-alone APK viabuildozer/python-for-androidand thus requires no
further software installed to run on your Android device.For usage instructions see:https://simple-plotter.readthedocs.io/en/latest/user_guide.htmlsimple-plotter4ais released under the GPLv3 license - for details see NOTICE and LICENSE file.
The binary version (e.g. Android APK) will be linked and/or bundled with 3rd party libraries. The copyright disclaimers
and licenses of the 3rd party components can be found in the ‘Licenses’ folder or in the documentation in the licenses
chapter:https://simple-plotter.readthedocs.io/en/latest/license.html#simple-plotter4a-binary-releases-androidInstalling on desktop and AndroidIf you just want ot use the software please see theGetting startedchapter in thesimple_plotterdocumentation.Compiling for AndroidPrerequisitesMake sure you have the required components installed - seebuildozer/python-for-androiddocumentation for details.simple-plotter4acomes with build instructions forant.
You will need toApache antinstalled in order to run the build.Build the APKTheantbuild script (see build.xml) performs some clean-up and version-control tasks before calling the action build
process viabuildozer.
To build a debug APK simply clone the repository and runantinside:gitclonehttps://gitlab.com/thecker/simple-plotter4a.gitcdsimple-plotter4aantThis will automatically deploy the App to your connected Android device (via adb) and run logcat.For building (unsigned) release APKs you can runantwith thereleasetarget.antreleaseCompiling against a modified version of simple-plotter (base)By default the base modules ofsimple-plotterwill be downloaded and installed via pip from the official PyPI
repository.
If you want to compile the APK against a local, modified base version you should do following.Make sure, that the modified base is cloned from the git.cd~/your_work_dirgitclonehttps://gitlab.com/thecker/simple-plotter.gitNoteIf you use a downloaded zip-file, the compile procedure will fail. Since thesimple-plotteruses setuptools_scm
(which is used retrieve the package version from git tags) the package needs to be installed from a valid git
repository.Afterwards clone this repo:gitclonehttps://gitlab.com/thecker/simple-plotter4a.gitcdsimple-plotter4aEdit thebuildozer.specand uncomment therequirements.source.simple-plotterline and adjust the path
accordingly - e.g.# (str) Custom source folders for requirements
# Sets custom source for any requirements with recipes
requirements.source.simple-plotter = ../simple_plotterNow start the compilation process with:antclean-allantNote to runantclean-allto remove any pre-built dependencies (this step, which will makebuildozerrecompile all
dependencies is not required, if you just make changes tosimple-plotter4a).
It should now compile against your local, modified version of simple-plotter.
Package: simple-plotter-qt
Qt based GUI front-end for the plot code generatorsimple-plotter.simple-plotter-qtis released under the GPLv3+ license.
For details see the LICENSE file.Getting startedIt can be installed with pip:pip install simple-plotter-qtIt depends on:simple-plotterPyQt5matplotlibsetuptools_scmLaunching the applicationsetup-tools will install a script calledsimple-plotter-qt.
It can be launched via a terminal:simple-plotter-qtFurther informationFor further information please visit thesimple-plotterdocumentation:https://simple-plotter.readthedocs.io/en/latest
Package: simple-plugin-loader
Simple Python Plugin LoaderThis module provides a simple way to dynamically load other Python modules as Plugins to your current project.InstallYou can install this python module viapip:pipinstallsimple-plugin-loaderOtherwise the module can be downloaded from PyPI:https://pypi.org/project/simple-plugin-loader/UsageImport the module:fromsimple_plugin_loaderimportLoaderLoad your plugins/modules:# initialize the loaderloader=Loader()# load your pluginsplugins=loader.load_plugins(<plugin_path>,<plugin_base_class>,<specific_plugins>,<recursive>)(Optional)The already loaded plugins/modules can be accessed via thepluginsproperty of the loader instance:plugins=loader.pluginsload_plugins(...)MethodThis method does the actual plugin loading.It loads only Python modules that can be executed in the current environment. For every successfully loaded module a message is populated through the Pythonlogginglibrary (log level:INFO).If a module e.g. contains syntax errors or depends on other not installed Python modules, it will be skipped. So the main program does not fail completely. An error message is populated through the Pythonlogginglibrary (log level:ERROR).Arguments<plugin_path>:strThis string represents the path (relative or absolute) to the directory from where the plugins/modules should be loaded.<plugin_base_class>:class(Default:SamplePlugin)The Loader does not load all found modules that are in the above directory. It only loads classes that aresub-classesof the here specified class.The default value of this argument is theSamplePluginclass. You can use this class as the base class for your plugins:fromsimple_plugin_loader.sample_pluginimportSamplePluginclassYourPlugin(SamplePlugin):pass<specific_plugins>:List[str](Default:[])This list can containcase sensitiveclass names, that should be loaded. Then no other plugins will be loaded. The argument<plugin_base_class>will also be ignored, so any class can be loaded.<recursive>:bool(Default:False)Set this flag toTrueif you wish to load plugins/modules recursively to the above directory.Return valueThe method returns a dictionary that has the following structure:Key: The name of the plugin/module. This name is the module name of the module that contains the plugin class.Value: The plugin class. Not an instance!
Package: simple_plugins
AboutA simple plugin framework inspired by thework of Marty Alchin.Continuous integrationis powered byJenkins.InstallationTo install simple_plugins run:$ pip install simple_pluginsUsage examplesQuick start:>>> from simple_plugins import PluginMount

>>> class BaseHttpResponse(object):
...     """Mount point is not registered as a plugin"""
...
...     status_code = None
...
...     __metaclass__ = PluginMount
...
...     class Meta:
...         id_field = 'status_code'
...
...     def __repr__(self):
...         return "<%s: %s>" % (self.__class__.__name__, self.status_code)
...

>>> class OK(BaseHttpResponse):
...     status_code = 200
...

>>> class BaseRedirection(BaseHttpResponse):
...     """'Base*' classes are not registered as plugins"""
...     pass
...

>>> class MovedPermanently(BaseRedirection):
...     status_code = 301
...

>>> class NotModified(BaseRedirection):
...     status_code = 304
...

>>> class BadRequest(BaseHttpResponse):
...     status_code = 400
...

>>> class NotFound(BaseHttpResponse):
...     status_code = 404
...

# All plugin info
>>> BaseHttpResponse.plugins.keys()
['valid_ids', 'instances_sorted_by_id', 'id_to_class', 'instances',
 'classes', 'class_to_id', 'id_to_instance']

# Plugin info can be accessed using either dict...
>>> BaseHttpResponse.plugins['valid_ids']
set([304, 400, 404, 200, 301])

# ... or object notation
>>> BaseHttpResponse.plugins.valid_ids
set([304, 400, 404, 200, 301])

>>> BaseHttpResponse.plugins.classes
set([<class '__main__.NotFound'>, <class '__main__.OK'>,
     <class '__main__.NotModified'>, <class '__main__.BadRequest'>,
     <class '__main__.MovedPermanently'>])

>>> BaseHttpResponse.plugins.id_to_class[200]
<class '__main__.OK'>

>>> BaseHttpResponse.plugins.id_to_instance[200]
<OK: 200>

>>> BaseHttpResponse.plugins.instances_sorted_by_id
[<OK: 200>, <MovedPermanently: 301>, <NotModified: 304>, <BadRequest: 400>, <NotFound: 404>]

# Unregister the `NotFound` plugin
>>> NotFound._unregister_plugin()
>>> BaseHttpResponse.plugins.instances_sorted_by_id
[<OK: 200>, <MovedPermanently: 301>, <NotModified: 304>, <BadRequest: 400>]

# Coerce the passed value into the right instance
>>> BaseHttpResponse.coerce(200)
<OK: 200>Please seethe testsandbeam_integralssource code for more examples.ContributeIf you find any bugs, or wish to propose new featuresplease let me know.If you’d like to contribute, simply forkthe repository, commit your changes
and send a pull request. Make sure you add yourself toAUTHORS.
Package: simple-poetry
Simple PoetryA clean, automated setup for publishing simple Python packages to PyPI using Poetry and GitHub Actions.SetupPrepare GitHub repoCreate new GitHub repository / fork this repositorySetup PyPI Credentials in repository secretsPYPI_TOKEN: PyPI API tokenReplace text in filesRenamesimple_poetryfolder to<package_name>Replace allsimple_poetryinstance in files to<package_name>Replace allsimple-poetryinstance in files to<package-name>Replace all3.8instance in files to<target-python-version>Replaceppeetteerrswith<github_user_name>Enter Package Informationpyproject.toml: Project description, authors<package_name>/__init__.py: Author and emailREADME.md: Customize it, change the name and description especiallyFurther Customizationsmkdocs.yaml: Edit theme andmkdocstringspreferences (Can also add sub-pages to API Reference etc.).devcontainer.json: Add preferred extensions / build configurations (e.g. use GPUs)Dockerfile: Install necessary formatters / linters / packages for local testingdocs/: Write your documentation.github/workflows/push.yaml: Remove thetests::Run Testsstep if you need to run tests locally (e.g. if your tests require GPU). Keep the rest to upload Codecov.Publish and Setup GitHub Pagescommitandpushyour changesCreate first releaseGo toSettingsand activate your GitHub Pages using thegh-pagesbranch
Package: simple-portfolio
simple_metrics for RobinhoodSimple portfolio metrics applied to your Robinhood portfolio.example 1fromsimple_metricsimportfetch,exportaccount={'username':'my username','password':'my password'}## export stock trades to -> stock_orders.csv#stock_orders=fetch.stock_trades(account,{})export.stock_orders(stock_orders,{})## export -> option_orders.csv#option_orders=fetch.option_orders(account,{})export.option_orders(option_orders,{})example 2Run thecalculate_options.pyscript  in the examples folder, it generates total and daily returns, as well as fetching greeks for open option positions.installpipinstallsimple_metricspackage apiFunctionality includes:Fetch Stock order historyFetch Option order historyExport Stock order historyExport Option order historylocal developmentGit clone this repo and run,pipinstall.--process-dependency-links--editableAdding--editableallows you to pull in code changes without
having to runpip install.
Package: simpleppt
SimplePPTPython implementation ofSimplePPT algorithm, with GPU acceleration.Please cite the following paper if you use it:Mao et al. (2015), SimplePPT: A simple principal tree algorithm, SIAM International Conference on Data Mining.Installationpipinstall-UsimplepptUsagefromsklearn.datasetsimportmake_classificationimportsimplepptX1,Y1=make_classification(n_features=2,n_redundant=0,n_informative=2,n_clusters_per_class=1,n_classes=3)ppt=simpleppt.ppt(X1,Nodes=30,seed=1,progress=False,lam=10)simpleppt.project_ppt(ppt,X1,c=Y1)GPU dependencies (optional)If you have a nvidia GPU, simpleppt can leverage CUDA computations for speedup in tree inference. The latest version of rapids framework is required (at least 0.17) it is recommanded to create a new conda environment:conda create -n SimplePPT-gpu -c rapidsai -c nvidia -c conda-forge -c defaults \
    rapids=0.19 python=3.8 cudatoolkit=11.0 -y
conda activate SimplePPT-gpu
pip install simpleppt