Saravanan666/pypi-org huggingface dataset:
Package: smart-pdf
SmartPDFA simple python library for AI-powered PDF documents processing.RequirementsLinux, Windows, MacOSPython 3.8.+OpenAI API KeyInstall packagepipinstallsmart_pdfInstall the latest versiongitclonehttps://github.com/bes-dev/smart_pdf.gitcdsmart_pdf
pipinstall-rrequirements.txt
pipinstall.Install the latest versiongitclonehttps://github.com/bes-dev/random_face.gitcdrandom_face
pipinstall-rrequirements.txt
pythondownload_model.py
pipinstall.Demopython-msmart_pdf.smart_pdf--helpExamplefromsmart_pdfimportSmartPDFsmart_doc=SmartPDF(path=<path_to_pdf>,openai_api_key=<openai_api_key>)print(smart_doc)print(f"Summary:{smart_doc.summary()}")print("Press q! to exit")whileTrue:request=input("> ")ifrequest=="q!":breakprint(smart_doc.smart_search(request))
Package: smartphone-connector
Smartphone ConnectorThis simple package exposes methods to interact with smartphones connected to asocket.io serverinstance.ExamplesAll examples and scripts on GitHubDraw 3x3 checker boardfromsmartphone_connectorimportConnectorphone=Connector('https://io.lebalz.ch','FooBar')# draw a 3x3 checker boardphone.set_grid([['black','white','black'],['white','black','white'],['black','white','black']],broadcast=True)# print the letter Aphone.set_grid([[9,9,9,9],[9,0,0,9],[9,9,9,9],[9,0,0,9],[9,0,0,9],])results on all devices in the following screen.Whenbroadcastis set toFalse(default), only theFooBardevices display the checker board.Stream & display gyroscope datafromsmartphone_connectorimportConnector,GyroMsgimportmatplotlib.pyplotaspltphone=Connector('https://io.lebalz.ch','FooBar')MAX_SAMPLES=300y=[]x=[]plt.show()defon_gyro(data:GyroMsg):iflen(x)>MAX_SAMPLES:x.pop(0)y.pop(0)x.append(data.time_stamp)y.append([data.alpha,data.beta,data.gamma])defon_intervall():plt.clf()plt.plot(x,y)plt.pause(0.01)phone.on_gyro=on_gyrophone.subscribe(on_intervall,interval=0)Displays gyroscope data from the smartphone on a Matplotlib-Plot.Package and upload to pip@seethis tutorialrm-rfbuild/dist/smartphone_connector.egg-info/&&\python3setup.pysdistbdist_wheel&&\python3-mtwineuploaddist/*Changelog0.0.115: fix audio path checking0.0.113: fix reporting ofpos_xandpos_yon collisions0.0.111: supporttimerevents from socketio_server0.0.110: add methodreport(value: int | float, report_type: str, to: '__GAME_RUNNER__')0.0.109: fix typo inupdate_ellipse0.0.108: introduceclean_playgroundmethod to remove all sprites and lines from the current playground, but keep the playground config as is. And minor bug fixes.0.0.107: can mix absolute and relative movements withapply_movementsandapply_movement0.0.106: add possibility to control movement distances0.0.105: control repeats of movement sequences0.0.104: add methods to apply movements to objects:# single movementdevice.apply_movement(id='circle',direction=[1,1],time_span=1,speed=3)# movement sequencewithdevice.apply_movements(id='circle')asmovement:movement(direction=[1,0],time_span=1,speed=2)movement(direction=[-1,0],time_span=1,speed=2)adding exampleplayground_flappy.py0.0.103: change function annotation ofset_timeout(callback, time, repeat=1)instead ofset_timeout(callback, interval, iteration_count=inf)0.0.102: add alias methods forsubscribe_async:set_timeout,schedule,execute_in0.0.101: introducemove_to(id: str, pos: [x, y], via: [x, y])method to make jumps easyier. Eventauto_movement_posis triggered when an auto movement within a sequence finished.0.0.100: support image formats.gif,.bmp,.webp0.0.99: introduce methodadd_svg_to_playground(name: str, raw_svg: str)to upload plain svg source text0.0.98 fix iteration count0.0.97: introduce sound - provide aaudio_trackssource directory inconfigure_playgroundand start/stop sounds withplay_sound(name: str, id: Optional[str])/stop_sound(name: Optional[str], id: Optional[str])0.0.96 register multiple callback functions withon(event, clbk)0.0.95 supportborder_styleandborder_widthfor sprites
Package: smart-pinyin
PinyinSmart Chinese-to-Pinyin converter.Getting Startedpip install smart_pinyinUsage>>> from pinyin import Pinyin
>>> pinyin = Pinyin()
>>> ' '.join(pinyin.get_pinyin('银行行长潘玮柏长了一头乌黑的白发， 睡觉睡的很晚, 道行很深', failure=''))
>>> u'yin hang hang zhang pan wei bo zhang le yi tou wu hei de bai fa  shui jiao shui de hen wan  dao heng hen shen'

>>> for i in pinyin.get_pinyin_all('自行车'): print list(i)
[u'zi', u'hang', u'che']
[u'zi', u'hang', u'ju']
[u'zi', u'heng', u'che']
[u'zi', u'heng', u'ju']
[u'zi', u'xing', u'che']
[u'zi', u'xing', u'ju']
Package: smart-pipeline
Python Data PipelineProcess any type of data in your projects easily, control the flow of your data!InstallationInstallsmart-pipelinewith:pipinstall-Usmart-pipelineUsagePackage 'smart_pipeline' provides a Pipeline class:# Import Pipeline classfromsmart_pipelineimportPipeline# Create an instancepl=Pipeline()Pipeline class has 3 types of pipes: item, data and stat.Item pipemodifies each item in dataset without changing the whole population of data:data=[1,2,3,4,5]# Define an item functiondefaddOne(item):returnitem+1# Adds function into pipelinepl.addItemPipe(addOne)# Pass the data through pipelineres=pl(data)# res = [2,3,4,5,6]Data pipeis a filter:data=[1,2,3,4,5]defonlyOdd(item):returnFalseifitem%2==0elseTruepl.addDataPipe(onlyOdd)res=pl(data)# res = [1,3,5]Stat pipereduces over the data, passing the accumulated value to each element:data=[1,2,3,4,5]# Function that goes over all items in datasetdefcountNumberStat(stats,item):stats["total"]+=1ifitem%2==0:stats["even"]+=1else:stats["odd"]+=1returnstats# Function to be called at the end with accumulated statsdefprintNumberStat(stats):print(stats["total"],"items were processed in total.")print(stats["even"],"of them are even.")print(stats["odd"],"of them are odd")# Make sure to pass initial state as 3rd argumentpl.addStatPipe(countNumberStat,printNumberStat,{"total":0,"even":0,"odd":0})pl(data)# Output:# 5 items were processed in total.# 2 of them are even.# 3 of them are oddCheck out some examplesIf this library solved some of your problems, please consider starring the project 😉And feel free to create pull requests!
Package: smartplot
SmartplotThis package provides a simple contextmanager which automatically saves data used to make matplotlib plots and automatically generates a script to reproduce the plot at a later stage.Installpip install smartplotBasic UsageA SmartPlotContext contextmanager can be used in conjunction with awithblock as shown below.fromsmartplotimportSmartPlotContextwithSmartPlotContext("./data-save-dir",locals(),overwrite=True)asspl:spl.plot(...)...spl.title(...)spl.show()The resulting context managersplsupport all matplotlib.pyplot function calls.
All calls made tosplare passed onto matplotlib.pyplot as-is and recorded.
The data save directory is dynamically created if it does not exist and is populated with pickle files containing the data used to make the plot.
The automatically generatedmake_plot.pyscript contains code which reloads all data and contains the necessary calls to matplotlib.pyplot used to create the original plot.
This script may then be modified to adjust the plot.
If the data save directory is not empty an exception is raised unlessoverwrite=True.
Passing inlocals()allows SmartPlotContext to infer the original variable names for the objects used for re-use inmake_plot.py.Note that only calls directly to spl are recorded, if you use figures and axes directly, you're on your own for now.Example Usageimportnumpyasnpimportmatplotlib.pyplotaspltfromsmartplotimportSmartPlotContextx_data=np.linspace(0,2*np.pi,1000)y_data=np.sin(x_data)withSmartPlotContext("./data-save-dir",locals(),overwrite=True)asspl:spl.plot(x_data,y_data,c='k',label='sin')spl.plot(x_data,np.cos(x_data),c='b',label='cos')spl.xlabel('xaxis')spl.ylabel('yaxis')spl.title('Title')spl.legend()spl.savefig('plot.pdf')spl.show()This will generate the following directory structuredata-save-dir/
  make_plot.py
  unnamed_arg.pkl
  x_data.pkl
  y_data.pklThe contents ofmake_plot.pywould beimportnumpyasnpimportmatplotlib.pyplotaspltfromsmartplotimportload_picklex_data=load_pickle('x_data.pkl')y_data=load_pickle('y_data.pkl')unnamed_arg=load_pickle('unnamed_arg.pkl')plt.plot(x_data,y_data,c='k',label='sin')plt.plot(x_data,unnamed_arg,c='b',label='cos')plt.xlabel('xaxis')plt.ylabel('yaxis')plt.title('Title')plt.legend()plt.savefig('plot.pdf')plt.show()which should perfectly reproduce the original plot.
Note that the variable namesx_dataandy_dataare arbitrary and were inferred by the SmartPlotContext using the locals() dict.
Good code structure will always allow SmartPlotContext to infer the correct variable names.
Anonymous arguments, such as the y data of thenp.cosplot are simply saved and named "unnamed_arg" with an integer postfix if multiple unnamed arguments are present.MiscPlease report any bugs or feature requests tojero.wilkinson@gmail.com.
Package: smartprint
smartprintSave a few seconds and a few keystrokes with every print statement! 😎Usual print statment:print("veryLongVariableName : ",veryLongVariableName)Enter smart print:fromsmartprintimportsmartprintassprintveryLongVariableName=25sprint(veryLongVariableName)Output:veryLongVariableName:25Examples:1. smartprint works with multiple variables and different kinds of objectsfromsmartprintimportsmartprintassprintimportnumpyasnpa=[1,22,31]sprint(a,len(a))sprint(np.random.rand())Output:a, len(a) : [1, 22, 31] 3
np.random.rand() : 0.6496177304841092.smartprintincludes pretty print (throughpprintmodule and colored prints throughrichmodule) for lists and dicts as shown below:2 (a) List exampled={-1:"dictionaries",0:"are",100:"keys","boolean":[True,False],6:"printed",50:" with sorted","Nishant":"Kumar",\"numbers":[1,100,-2000,12]}sprint(d)Output:In place print replacementAs suggested by user @nickdelgrosso inIssue 7,
iffromsmartprintimportsmartprintasprintis used, smartprint can be used as an in-place print replacement.
Alternatively, it can be used to override the existing print statements without touching any other parts of the code.Installationpip install smartprintIssuesPlease feel free to start a pull request/ raise an issue.Code coverage plot
Package: smart-progress
Smart progressbar with multiple backends supporting both explicit updating andtqdm-style iterable-wrappingUsageprogressbar(iterable=None,length=None,label=None,show_eta=True,show_percent=None,show_pos=False,item_show_func=None,...,info_sep=' ',...)Checkclick.progressbarfor the parameters and details. As of now, the IPython backend ignores all bar drawing and terminal-related parameters. (The ones not listed above)Examplefromsmart_progressimportprogressbarwithprogressbar([1,2,3])asbar:foriteminbar:do_work(item)orcon=connection(...)withcon,progressbar(length=con.tot_size())asbar:whilenotcon.is_eof():block=con.retrieve_block()do_work(block)bar.update(len(block))Dependenciesclick5.xIPython4.x +ipywidgets(alternatively falls back to IPython 3.x)
Package: smart-prospective-api
Smart Prospective APIThis python library is made to connect to Smart Prospective API, in order to manage your account, users, medias, publish content, bills...Installationpython3 -m pip install smart-prospective-apiCompatibilityPython >=3.6Custom ConfigSMART_PROSPECTIVE_SERVER: If you set this environment variable you can specify the target server (More info):import os
os.environ["SMART_PROSPECTIVE_SERVER"] = "https://custom-server.com"Usagefrom smart-prospective-api import SPApi, APIError

try:
    # Setup the API credencial (do not perform any request at this moment)
    # Note: The public key starts by "pub_" & The secret key starts by "sec_"
    sp_api = SPApi("your_api_public_key", "your_api_secret_key")

    sp_api.get_medias()  # Get all the medias linked to this account

    sp_api.logout()  # Logout the account, more safe to use it, to avoid potential attacks
except APIError as e:
    print(f"Failure using the Smart Prospective API: {e}")

# Other Method (less common)
token = sp_api.login()  # This call is optionnal, because it's automatic on every call if needed if the token is not set
sp_api.token = token  # Manually set the token (so it won't perform any login() once you call any method)ContactPhone: +33 (0) 1 86 66 01 70Email:dev@smartprospective.com
Package: smartpyml
smartpyml is a comprehensive machine learning library that empowers developers and data scientists to easily apply classical machine learning algorithms and time series analysis techniques. It provides a collection of user-friendly functions and tools for data preprocessing, model training, evaluation, and prediction, making it suitable for both beginners and experienced practitioners in the field of data science and artificial intelligence.Main Features:A wide range of classical machine learning algorithmsTime series analysis and forecasting capabilitiesUser-friendly interfaces for easy implementationData preprocessing utilities for feature engineeringModel evaluation and performance metricsSupport for both numerical and categorical dataWARNING: This library is still in development and may contain bugs.
For more information and examples, visit the GitHub repository:https://github.com/srikresna/smartpyml
Package: smart-queries
Repeat QueriesSmart Queries is a django package which helps django developer to avoid the N+1 queries issue by recording it and keeping a track of it per request.Quick startAdd "repeat_queries" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [
    ...
    'repeat_queries',
]Add 'repeat_queries.middleware.DuplicateQueryMiddleware', to your MIDDLEWARE settings like this ::MIDDLEWARE = [
    ...,
    'repeat_queries.middleware.DuplicateQueryMiddleware',
]Include the repeat_queries URLconf in your project urls.py like this::
For Django version > 2.0path('repeat_queries/', include('repeat_queries.urls')),For earlier versionsurl(r'^repeat_queries/', include('repeat_queries.urls')),Runpython manage.py migrateto create the repeat_queries models.Start the development server, Hit any endpoint/view and visithttp://127.0.0.1:8000/admin/to see your data.ContributingCheck for open issues or open a fresh issue to start a discussion around a feature idea or a bug.Forkthe repositoryon GitHub to start making your changes to the master branch (or branch off of it).Write a test which shows that the bug was fixed or that the feature works as expected.Send a pull request and bug the maintainer until it gets merged and published. :)
Package: smartrandom
smartrandomRandom Data Generators:Allows you to generate random strings of a given length from letters, numbers, symbols.
Helps to generate passwords, service codes (for example, for sending via SMS), hashes and much more.Help:fromsmartrandom.random_masterimportRandomMasterrandom_string=RandomMaster.string.get(length=10)random_number_string=RandomMaster.number.get(length=10)password=RandomMaster.password.get(length=10)random_hash=RandomMaster.hash.get(text='give me hash')random_number_code=RandomMaster.get_code(length=10,number_flag=True)random_string_code=RandomMaster.get_code(length=10,string_flag=True)random_symbol_code=RandomMaster.get_code(length=10,symbol_flag=True)Disclaimer of liability:THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.Copyright:--------------------------------------------------------
Licensed under the terms of the BSD 3-Clause License
(see LICENSE for details).
Copyright © 2018-2023, A.A Suvorov
All rights reserved.
--------------------------------------------------------
Package: smartredis
HomeInstallDocumentationSlackCray LabsSmartRedisSmartRedis is a collection of Redis clients that support
RedisAI capabilities and include additional
features for high performance computing (HPC) applications.
SmartRedis provides clients in the following languages:LanguageVersion/StandardPython3.8, 3.9, 3.10, 3.11C++C++17CC99FortranFortran 2018 (GNU/Intel), 2003 (PGI/Nvidia)SmartRedis is used in theSmartSim library.
SmartSim makes it easier to use common Machine Learning (ML) libraries like
PyTorch and TensorFlow in numerical simulations at scale.  SmartRedis connects
these simulations to a Redis database or Redis database cluster for
data storage, script execution, and model evaluation.  While SmartRedis
contains features for simulation workflows on supercomputers, SmartRedis
is fully functional as a RedisAI client library and can be used without
SmartSim in any Python, C++, C, or Fortran project.Using SmartRedisSmartRedis installation instructions are currently hosted as part of theSmartSim library installation instructionsAdditionally, detailedAPI documentsare also available as
part of the SmartSim documentation.DependenciesSmartRedis utilizes the following libraries:NumPyHiredis1.1.0Redis-plus-plus1.3.5PublicationsThe following are public presentations or publications using SmartRedisCollaboration with NCAR - CGD SeminarUsing Machine Learning in HPC Simulations - paperRelexi — A scalable open source reinforcement learning framework for high-performance computing - paperCitePlease use the following citation when referencing SmartSim, SmartRedis, or any SmartSim related work:Partee et al., "Using Machine Learning at scale in numerical simulations with SmartSim:
An application to ocean climate modeling",
Journal of Computational Science, Volume 62, 2022, 101707, ISSN 1877-7503.
Open Access: https://doi.org/10.1016/j.jocs.2022.101707.bibtex@article{PARTEE2022101707,
    title = {Using Machine Learning at scale in numerical simulations with SmartSim:
    An application to ocean climate modeling},
    journal = {Journal of Computational Science},
    volume = {62},
    pages = {101707},
    year = {2022},
    issn = {1877-7503},
    doi = {https://doi.org/10.1016/j.jocs.2022.101707},
    url = {https://www.sciencedirect.com/science/article/pii/S1877750322001065},
    author = {Sam Partee and Matthew Ellis and Alessandro Rigazzi and Andrew E. Shao
    and Scott Bachman and Gustavo Marques and Benjamin Robbins},
    keywords = {Deep learning, Numerical simulation, Climate modeling, High performance computing, SmartSim},
    }
Package: smartresponder
=========smartresponder=========This is a smartresponder (aka smartresponder.ru)python API wrapper. The goal is to support all API methods (current and future)that can be accessed from server.Installation============::$ pip install smartresponderUsage=====::>>> import smartresponder>>> api = smartresponder.API('my_api_id', 'my_api_secret')>>> subscriber = api.subscribers.list(id='39715947')['list']['elements'][0]>>> print subscriber['email']test@test.ruAll API methods that can be called from server should be supported.See http://goo.gl/DrmQU for detailed API help.Changes=======1.0.0 (2012-08-04)------------------Initial release.
Package: smarts
SMARTSSMARTS (Scalable Multi-Agent Reinforcement Learning Training School) is a simulation platform for multi-agent reinforcement learning (RL) and research on autonomous driving. Its focus is on realistic and diverse interactions. It is part of theXingTiansuite of RL platforms from Huawei Noah's Ark Lab.Check out the paper atSMARTS: Scalable Multi-Agent Reinforcement Learning Training School for Autonomous Driving.Documentation:rotating_light: :bell: Read the docs :notebook_with_decorative_cover: atsmarts.readthedocs.io. :bell: :rotating_light:ExamplesEgolessSimulate a SMARTS environment without any ego agents, but with only background traffic.Egolessexample.Control TheorySeveral agent control policies and agentaction typesare demonstrated.Chase Via Pointsscript:control/chase_via_points.pyMulti agentActionSpaceType: LaneWithContinuousSpeedTrajectory Trackingscript:control/trajectory_tracking.pyActionSpaceType: TrajectoryOpEn Adaptive Controlscript:control/ego_open_agent.pyActionSpaceType: MPCLanerscript:control/laner.pyMulti agentActionSpaceType: LaneParallel environmentsscript:control/parallel_environment.pyMultiple SMARTS environments in parallelActionSpaceType: LaneWithContinuousSpeedRL ModelDrive. SeeDriving SMARTS 2023.1 & 2023.2for more info.VehicleFollowing. SeeDriving SMARTS 2023.3for more info.PG. SeeRLlibfor more info.PG Population Based Training. SeeRLlibfor more info.RL EnvironmentULTRAprovides a gym-based environment built upon SMARTS to tackle intersection navigation, specifically the unprotected left turn.Issues, Bugs, Feature RequestsFirst, read how to communicate issues, report bugs, and request featureshere.Next, raise them using appropriate tags athttps://github.com/huawei-noah/SMARTS/issues.Cite this workIf you use SMARTS in your research, please cite thepaper. In BibTeX format:@misc{SMARTS,title={SMARTS: Scalable Multi-Agent Reinforcement Learning Training School for Autonomous Driving},author={Ming Zhou and Jun Luo and Julian Villella and Yaodong Yang and David Rusu and Jiayu Miao and Weinan Zhang and Montgomery Alban and Iman Fadakar and Zheng Chen and Aurora Chongxi Huang and Ying Wen and Kimia Hassanzadeh and Daniel Graves and Dong Chen and Zhengbang Zhu and Nhat Nguyen and Mohamed Elsayed and Kun Shao and Sanjeevan Ahilan and Baokuan Zhang and Jiannan Wu and Zhengang Fu and Kasra Rezaee and Peyman Yadmellat and Mohsen Rohani and Nicolas Perez Nieves and Yihan Ni and Seyedershad Banijamali and Alexander Cowen Rivers and Zheng Tian and Daniel Palenicek and Haitham bou Ammar and Hongbo Zhang and Wulong Liu and Jianye Hao and Jun Wang},url={https://arxiv.org/abs/2010.09776},primaryClass={cs.MA},booktitle={Proceedings of the 4th Conference on Robot Learning (CoRL)},year={2020},month={11}}
Package: smartschool
Smartschool parserUnofficial interpreter to interface against smartschool's website.How to use?Copy thecredentials.yml.examplefile tocredentials.ymland adjust the contents with the username/password and school uri.fromsmartschoolimportSmartSchool,PathCredentials,CoursesSmartSchool.start(PathCredentials())forcourseinCourses():print(course.name)Implemented:AgendaLessonsAgendaHoursAgendaMomentInfosTopNavCoursesCoursesFutureTasksPeriodsResultsStudentSupportLinksMessageHeadersMessageAttachmentsMarkMessageUnreadAdjustMessageLabelMessageMoveToArchiveMessageMoveToTrashContributing?To get started (I always use mamba/conda to create an environment)gitclonehttps://github.com/svaningelgem/smartschool.gitcdsmartschool
mambacreate-nsmartschoolpython=3.11
mambaactivatesmartschool
pipinstallpoetry
poetryinstallNow you can start contributing.To run the test suite:poetryrunpytest
Package: smartscoutscrape
Smartscout-scrapeLightweight data-extraction & general use library for smartscout.com.ProxyIncluded is a simple Tailscale configuration that serves a SOCKS5 proxy on your local machine.Copy the contents of.env-exampleinto.env, populate the fields and then perform the following command on a machine that has docker installed:docker-composeup-dThen, you can use the--proxyflag to use the proxy.poetryrunamzscout-scrape--proxysocks5://localhost:1055And it’s further described in this paragraph.See the docs 📚for more info.Licensed under the terms of theApache License 2.0.New issuesand pull requests are welcome.
Please refer to thecontributing guideandsecurity policy.
Generated withTyrannosaurus.