Saravanan666/pypi-org huggingface dataset:
Package: smaths
# Square Root Simplification algorithmSmaths stands for SquareMATH. Algorithm written exclusively in Python and used to simplify square roots# How To UseFirstly, import the spl function from the file (from smath import spl). Then, call the spl() function and parse in a string argument; for example if you want the square root of 125, you would parse in “!125”; note this is using the ! instead of the âˆš (that char is not on the keyboard). If you want the simplification of 5âˆš125, you would parse “5!125”.Also note the function returns a string value.Change Log0.0.5 (10/31/2020)-Repaired the âˆšroot returning root instead of âˆšroot if simplification is not possible
Package: smaug
Our mission statement is:* Formalize Application Data Protection in OpenStack (APIs, Services, Plugins, …)* Be able to protect Any Resource in OpenStack (as well as their dependencies)* Allow Diversity of vendor solutions, capabilities and implementations without compromising usability* Open Architecture** Vendors create plugins that implement Protection mechanisms for different OpenStack resources* User perspective: Protect App Deployment** Configure and manage custom protection plans on the deployed resources (topology, VMs, volumes, images, …)* Admin perspective: Define Protectable Resources** Decide what plugins protect which resources, what is available for the user** Decide where users can protect their resources
Package: smawe-pyppeteer
一个使用pyppeteer对指定的请求url进行渲染的库安装pip install smawe-pyppeteer快速开始fromsmawe_pyppeteerimportget,run,goto,loggerif__name__=='__main__':# 写法一frompathlibimportPathasyncdefmain():script="document.cookie"r=awaitget("http://www.fangdi.com.cn/index.html",auto_close=True,delay=5,pretend=True,headless=True,user_data_dir=Path("./test").resolve(),args=[],script=script,callable=handle,enabled_interception=True,enabled_maximize=False,cookies={"name":"k1","value":"v1"})print(r.text)print(r.request)print(r.status)print(r.script_result)print(r.cookies)asyncdefhandle(request):print(request.url)awaitrequest.continue_()run(main())logger.debug("="*50)# 写法二# 等价于r = run(get(*args, **kwargs))r=goto("http://www.fangdi.com.cn/index.html",pretend=True,delay=2)print(r.text)API参考async def smawe_pyppeteer.get(
url, delay=None, wait_for=None, page_width=None, page_height=None,
enabled_interception=None, script=None, callable=None, cookies=None,**kwargs
):使用pyppeteer对指定url进行渲染param url: urlparam wait_for: css选择器或者xpath, 等待指定的元素出现在页面上param delay: 打开指定url后要等待的秒数, 默认为None不进行等待(同时指定了delay和wait_for,则先delay,然后再wait_for)param page_width: 页面宽度param page_height: 页面高度param enabled_interception: 是否启用请求拦截param callable: 启动了请求拦截后要调用的协程函数, 它接受单个request参数, 未提供则使用默认实现.param script: js表达式/js函数, 脚本在最后才执行, 即page关闭前执行. 结果可通过PyppeteerResponse.script_result属性获取.param cookies: 一个字典或者包含字典的可迭代对象, 在当前打开的page中设置cookie(在访问页面之前设置), e.g. {"name": "n1", "value": "v1"}param kwargs(包含以下关键字参数):headless(bool): 是否启动无头模式, 默认是True.(启用了此参数(参数被设置为True时), auto_close被强制设为True)path(str): 要运行的 Chromium 或 Chrome 可执行文件的路径.auto_close(bool): 脚本完成后自动关闭浏览器进程. 默认为 True.window_width(str): 浏览器窗口宽度, 以像素为单位.注意window_width和window_height必须同时设置, 否则会不生效window_height(str): 浏览器窗口高度, 以像素为单位.注意window_width和window_height必须同时设置, 否则会不生效args(list[str]): 传递给浏览器进程的附加参数.enabled_maximize(bool): 是否启用窗口最大化, 默认为True, 如果同时指定了注意window_width和window_height, 此参数不会生效return: PyppeteerResponsesmawe_pyppeteer.run(f: Coroutine)运行future对象(包括协程对象), 返回future的结果smawe_pyppeteer.goto(*args, **kwargs)参数同smawe_pyppeteer.get, 等同于调用run(get(*args, **kwargs)), 返回一个PyppeteerResponse.smawe.loggerlogging.Logger对象, 调用logger.debug("message""), 输出格式如下2023-11-15 22:51:12,342 | DEBUG | message有问题请提交issue
Package: smaxpy
smaxJust a small wrapper to website scraping utilities.It just wraps aroundrequests,bs4andcloudscraper.Installpip3 install smaxpyUsagefromsmaxpyimportSmaxa=Smax("https://www.google.com")print(a.title)All functions from bs4 are inherited now bySmax, so you can use functions such asfind(),find_all()directly.Using the BeautifulSoup's functionsfromsmaxpyimportSmaxa=Smax("https://www.google.com")print(a.find("title").text)# similar to `a.title`© 2021 TheBoringDude
Package: smb-backup
python-smb-backupPytohn library to backup folders to a smb volumeInstallationpip install smb-backupUsagefrom smb_backup import SMB_Backup
# create a new backup object
smb_backup = SMB_Backup(SERVER,SHARE,USERNAME,PASSWORD,retention=RETENTION)
# backup a folder
smb_backup.backup(SOURCE_DIR,TARGET_DIR)Depending on the retention-value the oldest backup will be deleted.
Package: smbc-gp-client
Python SMBC GMO Pay Client LibAn http client to call SMBC GMO Pay APIs. (smbc-gp-client)Upload packagepython3 -m pip install --user --upgrade setuptools wheel twine
python3 setup.py sdist bdist_wheel
twine upload dist/*How to useuse pip install packagesmbc-gp-clientpip3 install smbc-gp-clientin your code:fromsmbc_gp_client.smbc_gp_clientimportSmbcGpClientclient=SmbcGpClient()client.create_transation(...)client.execute_transaction(...)for more details, please refer toSmbcGpClientclass method description.LicenseReferenceSMBC GMO PAYMENThttps://www.smbc-gp.co.jp/
Package: smbgym
smb-gymA Super Mario Bros Gym built without enabling custom levels and data injectionCredits:This project acts as a python bridge ofMario-AI Framework:[Mario-AI] framework was created by Ahmed Khalifa, based on the original Mario AI Framework by Sergey Karakovskiy, Noor Shaker, and Julian Togelius, which in turn was based on Infinite Mario Bros by Markus Persson.This project inspired bygym-super-mario-brosby Kautenja
Package: smbio
smbioSMB protocol wrapper for pythonInstallationpipinstallsmbioUsageimportsmbioconnector=smbio.Connector(url=r"\\localhost\Share",username="Username",password="StrongPa$$w0rd")with(connector.connect()asconn,connector.mount(conn)assession,connector.tree(session)astree,connector.open(tree,r"Directory\Subdirectory")asdirectory):files=smbio.glob(connector,directory,recurse=False)foroutinfiles:ifout.is_directory:continuewith(open(smbio.Path(out.path),mode="rb")asinp_file,connector.open(tree,out.path)asout_file):out_file.write(inp_file.read())
Package: smbios
AboutThis library allow python applications an easy way to read data from system's SMBios without the need of dmidecode.InstallationPyPIpipinstallsmbiosLinux packagesYou can get linux packages (RPM, Deb, arch) from Suse'sOpen Build ServiceUsageimportsmbiosvalue=smbios.Value('chassis','serial')print(value)importsmbiosvalue=smbios.Value('dmi:///chassis/serial')print(value)importsmbiosvalue=smbios.memsize()print(value)print(int(value))importsmbiosfornodeinsmbios.nodes():print(node)forvalueinnode.values():print('{}:{}'.format(value.description,value))
Package: smbjoin
Offline Windows AD domain join tool for SambaImplements a customsmb-net-ads-joinutility, which performs the same
operation asnet ads joinSamba command, but works completely offline.To join a Samba system to an AD domain it needsSYSTEM,SECURITYandSAMregistry hive files from a Windows system that is already joined to
the same domain.Usageusage: smb-net-ads-join [-h] [-v] [-V] [-J] [-o FILE] DIR

positional arguments:
  DIR                   Windows registry hive files directory (e.g. '/Windows/System32/config')

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         print intermediate results and debug info
  -V, --version         show program's version number and exit
  -J, --json            generate 'secrets.json' file in place of 'secrets.tdb'
  -o FILE, --output FILE
                        generated 'secrets.tdb' file name and locationExample invocationAssuming that Windows driveC:\is mounted to/mnt/windows/:$ smb-net-ads-join /mnt/windows/Windows/System32/config
Using short domain name -- DOMAIN
Joined 'HOSTNAME' to realm 'domain.company.com'A new database filesecrets.tdbis created in the current directory.It must be placed into/var/lib/samba/private/and,
with an appropriatesmb.confconfiguration,winbinddwill run as ifnet ads joincommand was executed.Common errorsWhen the Windows machine is not joined to an ADS domain:$ smb-net-ads-join /mnt/windows/Windows/System32/config
WARNING:smbjoin.cli:Registry hive access failed: Did not find $MACHINE.ACC at Policy
CRITICAL:smbjoin.cli:Extracting secrets failed: Machine account password key does not exist
error: Domain machine account data was not found in the registry
Package: smb-lib
Readme de smb-liblibrairie pipy :https://pypi.org/project/smb-lib/librairie anaconda :https://anaconda.org/mohamedchennouf/smb-lib/# How to Use this librairie:import smb_libsmb = smb_lib.smbionet(“192.168.1.17”)  # you can have ip in SMBIONET.md after running ./build.sh
smb.runSmbionet(graphe,ctl)
smb.consulteExperiences()
smb.purge()
…
Package: smb-optimizer
Stochastic Model Building (SMB)This repository includes a new fast and robust stochastic optimization algorithm for training deep learning models. The core idea of the algorithm is based on building models with local stochastic gradient information. The details of the algorithm is given in ourrecent paper.AbstractStochastic gradient descent method and its variants constitute the core optimization algorithms that achieve good convergence rates for solving machine learning problems. These rates are obtained especially when these algorithms are fine-tuned for the application at hand. Although this tuning process can require large computational costs, recent work has shown that these costs can be reduced by line search methods that iteratively adjust the stepsize. We propose an alternative approach to stochastic line search by using a new algorithm based on forward step model building. This model building step incorporates a second-order information that allows adjusting not only the stepsize but also the search direction. Noting that deep learning model parameters come in groups (layers of tensors), our method builds its model and calculates a new step for each parameter group. This novel diagonalization approach makes the selected step lengths adaptive. We provide convergence rate analysis, and experimentally show that the proposed algorithm achieves faster convergence and better generalization in most problems. Moreover, our experiments show that the proposed method is quite robust as it converges for a wide range of initial stepsizes.Keywords: model building; second-order information; stochastic gradient descent; convergence analysisInstallationpip install git+https://github.com/sbirbil/SMB.gitTestingHere is how you can use SMB:importsmboptimizer=smb.SMB(model.parameters(),independent_batch=False)#independent_batch=True for SMBi optimizerforepochinrange(100):# training stepsmodel.train()forbatch_index,(data,target)inenumerate(train_loader):# create loss closure for smb algorithmdefclosure():optimizer.zero_grad()loss=torch.nn.CrossEntropyLoss()(model(data),target)returnloss# forward passloss=optimizer.step(closure=closure)You can also check ourtutorialfor a complete example (or theColab notebookwithout installation). Set the hyper-parameterindependent_batchtoTruein order to use theSMBioptimizer. Ourpaperincludes more information.Reproducing The ExperimentsSee the followingscriptin order to reproduce the results in ourpaper.
Package: smb-path
smb-pathTable of ContentsAboutInstallationUsageCompatibilityLicenseAboutMany tools make use ofpathlib.Pathinternally. This is a problem if the files are located on a fileshare.smb-pathprovides wrapper ofPathwhich acts accordingly but using the SMB protocol for file operations instead of the local hosts file system. Atm.smb-pathfocuses on pure reading of the data. The SMB protocol implementation ofsmbprotocolis used.All the utility functions ofPathshould work forSmbPathas well (like the/operator,with_suffix,parents, etc.).Currently the following SMB dependent functions are implemented:open(and hence dependent funtions likeread_bytes, etc.)stat(and hence dependent functions likelstat,is_file,is_dir,exists, etc.)iterdirIn future versions, some functions probably get overwritten with a dummy since functions likeresolvehave no use for a SMB path.Missing write operations with current version (and questionable whether all of them will come) are:touchmkdirrmdirchmodunlinkrenamereplacesymlink_tohardlink_toInstallationpip install smb-pathUsagesmb-pathjust needs to be installed. After the installation, you just usePath()to instantiate aSmbPath. It is checked whether the provided path string applies to the regex patternr"(//|\\\\)([a-z0-9]+)((\.[a-z0-9]+)*)(\.[a-z]+){1}".The path stringmust start with//or\\must continue with a server name, a-z and 0-9 allowed, eg.filshr33optionally an arbitrary number of periods separated by a., a-z and 0-9 allowed, eg..us.dieterscompanymust continue with an url closing with.then a-z, eg..comcan contain trailing fileshare names, directories or files, eg./myShare/myDir/myFile.txtHence//filshr33.us.dieterscompany.com/myShare/myDir/myFile.txtwould be a valid SMB path.If the pattern does not match, aPathobject like you are used to it is returned(WindowsPathorPosixPath).SMB ConfigurationUsesmbclient.ClientConfigto configure the SMB connection. Eg.smbclient.ClientConfig(username="itsme", password="myPW"). Refer tosmbprotocolfor further information.Compatibilitysmbprotocolis platform agnostic since it does not care about the path separator.Tested with installation into apython -m venvvirtual environment.OSPythonSupportedWindows3.11✅Windows3.7, 3.8, 3.9, 3.10❓Windows3.12❌Linux3.7, 3.8, 3.9, 3.10, 3.11✅Linux3.12❌Licensesmb-pathis distributed under the terms of theMITlicense.
Package: smbus-cffi
This Python module allows SMBus access through the I2C /dev interface on Linux
hosts. The host kernel must have I2C support, I2C device interface support, and
a bus adapter driver.This module is a cffi-based python reimplementation of the python-smbus C-extension
(http://www.lm-sensors.org/browser/i2c-tools/trunk/py-smbus/) and works on PyPy
and CPython (2.6 and up).NotesThe SMBus methods read_block_data and block_process_call are not fully tested,
and might not work correctly, see note below.Note of caution for Raspberry Pi users: when calling read_block_data and
block_process_call the underlying i2c/smbus library/driver causes a kernel
panic on the Raspberry Pi. Testing these features on other hardware would be a
great way to contribute.ExampleAssuming you have a device connected at address 4 on the bus>>> from smbus import SMBus

>>> bus = SMBus(4)

>>> bus.write_quick()

>>> some_reg = 123

>>> bus.write_i2c_block_data(4, some_reg, [1, 4, 7])DependenciesTo install smbus-cffi you will need:A C compileri2c development headerscffi (https://pypi.python.org/pypi/cffi/)PyPy or CPython development headerslibffi-dev is required CPython for cffihttps://metacpan.org/pod/Device::SMBusprovides a good description on how to setup the dependencies.On Debian based distributions these can be installed with:sudo apt-get install build-essential libi2c-dev i2c-tools python-dev libffi-devOn Arch Linux:pacman -S base-devel
pacman -S i2c-toolsFinally install cffi using pip or from source.pip install cffiInstallationThere are several methods to install the package. First install the dependencies as described above.Note:unfortunately at the
moment when installing using pip or setup.py on CPython you need to make sure
that the cffi package already is installed.1. pip install from PyPipip install smbus-cffi2. pip install from gitpip install git+https://github.com/bivab/smbus-cffi.git3. Clone the repository and run setup.pygit clone https://github.com/bivab/smbus-cffi.git
python setup.py installBug ReportingTo submit a bugreport use the GitHub bugtracker for the project:https://github.com/bivab/smbus-cffi/issuesDevelopmentYou can get the latest version from the repository hosted at GitHubhttps://github.com/bivab/smbus-cffiThe file requirements.txt contains the list of dependencies needed to work with
smbus-cffi.The project uses py.test for testing and tox to test on pypy and python.The file test/test_smbus_integration.py contains a set of integration tests for
the smbus wrapper. To run the integrations tests you need an Arduino board
flashed with the sketch provided in test/test_sketch.  The serial port and the
i2c pins of the Arduino board need to be connected to the machine running the
tests. The sketch implements the counterpart of the smbus protocol that reads
and writes data for each test using smbus and the serial port.AuthorsDavid SchneiderAuthor of the original smbus C extension:Mark M. HoffmanCopyrightThis program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.See LICENSE for full license text
Package: smc
Pololu Simple Motor ControllerThis is a python driver library for the Pololu series of Simple Motor
Controllers.Installpip install smcUsagefromsmcimportSMCimporttimemc=SMC('/dev/ttyUSB0',115200)# open serial port and exit safe modemc.init()# drive using 12b modemc.speed(1000)time.sleep(3)mc.speed(-1000)time.sleep(3)# drive using 7b modemc.speed7b(100)time.sleep(3)mc.speed7b(-100)time.sleep(3)# and stop motormc.stop()BoardMIT LicenseCopyright (c) 2017 Kevin J. WalchkoPermission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package: smc3
pysmc3 - Python Library for SMC3 Motor ControllersTable of ContentsAboutFeaturesPrerequisitesInstallationUsageExamplesLimitationsContributingLicenseAboutpysmc3is a Python library designed to interact withSMC3, an Arduino-based software for controlling 3-DOF motion simulators used in gaming. This library provides an alternative to the existing diagnostic tools, which are only available for Windows. The library offers a convenient abstraction of the control box, allowing you to read and write parameters as well as set motor positions.FeaturesAbstraction of the SMC3 control box through thesmc3.Boxclass.Asynchronous communications supported by asyncio.Methods to read and write parameters for the control box.Methods to set motor positions with ease.PrerequisitesPython 3.xInstallationInstall with pippipinstdallsmc3Or clone the GitHub repository and install the required dependencies:gitclonehttps://github.com/zmij/pysmc3.gitcdpysmc3
pipinstall-rrequirements.txtDependenciesasyncioserial_asynciotermcolor (for example programs)UsageHere's a quick example snippet that demonstrates how to move Motor A on a sine wave:fromsmc3importBox,MotorNumberimportmathimporttimebox=Box(device="/dev/tty.usbdevice")print(f"SMC3 Version:{box.get_version()/100}")motor=MotorNumber.Abox.enable_feedback(motor)try:whileTrue:v=int(math.sin(time.clock_gettime(time.CLOCK_MONOTONIC))*512)+512box.set_position(motor,v)box.delay(0.01)exceptKeyboardInterrupt:box.disable_feedback()box.delay(1)ExamplesThe repository includes several example programs:show_version.py: Displays the SMC3 version number.show_status.py: Shows PID settings for all motors and their current status.sine.py: Moves a single motor on a sine wave.rock.py: Rocks the motion simulator back and forth or side to side.puke.py: Moves all three motors on a sine wave with a phase shift of 2π/3.LimitationsWhile the library has been tested on a MacBook connected to a control box from the DOFReality company, further testing is required to identify potential issues.ContributingFeel free to fork the repository and send pull requests. All contributions are welcome!LicenseLicensed under theApache License, Version 2.0.
Package: smc3rateware
python_SMCRatewarePython project forSMC3 RatewareSOAP API integrations.Package DevelopmentExamples:Sample CsvDataFrame Integrationtests/shipments.csv```csv
ship_id,ship_date,origin_zip,origin_country,dest_zip,dest_country,freight_class,weight
0,1/01/19,19106,USA,07981,USA,125,456.2
0,1/01/19,19106,USA,07981,USA,125,500.41
1,1/01/19,07981,USA,07981,USA,200,201.0
2,1/01/19,07981,USA,07981,USA,200,502.1
```.env```dotenv
API_LICENSE_KEY=
API_USERNAME=
API_PASSWORD=
```installpip install smc3rateware.py```python
import smcrateware as smc
import pandas as pd

df = smc.rate_usingLTLRateShipmentMultipleRequest_fromdf('shipments.csv')
```Under Development UsagePrior to packaging this python up for python-smcrateware the code will be finalized for a specific scope.
From there contributions will be allowed on a feature improvement/addition/deletion basis. Until then
this project is to be used with the following steps:Setup .env```dotenv
API_LICENSE_KEY=
API_USERNAME=
API_PASSWORD=
```For windows CMD (need bash configured):git clone https://github.com/NFI-Industries/python_SMCRateware.gitcd python_SMCRatewarestart .drop .env in python_SMCRatewarebash/run.shelse:git clone https://github.com/NFI-Industries/python_SMCRateware.gitcd python_SMCRatewarestart .drop .env in python_SMCRatewarepip install -r requirements.txtpython main.py -T='TariffNAme' -F='Full/Filepath.csvor use the./run.shmethod if you'd like.NOTE:you may need to restart & re-run the notebook after the initial run if you're trying to useexamples/notebooks/example_csv_to_pddataframe.ipynb.
The kernel needs to know the package exists.TODO:design (rate_usingLTLRateShipmentMultipleRequest_fromdf is too explicit)non-LTLRateShipmentMultiple usage
Package: smc.bibencodings
ISO-5426 (MAB2) and MARC (USMARC, ANSEL) encodings for Python. The encodings
are used in bibliographic information systems and Z.3950 interfaces of OPACs.BackgroundISO-5426 and USMARC encodings are historic encodings that are still in use by
bibliographic information systems. They are extensions to Latin codec family
and implement a variable length encoding someward similar to UTF-8 and
decomposed unicode (NFD) forms.Non-ASCII chars are expressed as combining chars. For example umlaut a (LATIN
SMALL LETTER U WITH DIAERESIS) is written in MAB2 encoding as ‘xc8u’, where
‘xc8’ is the sign for combining diaeresis. Contrary to unicode the combining
chars are writte as prefix while unicode has combinig suffixes.Both MAB2 and MARC encoding support up to two combining chars in front of a
letter, for example ‘xc5xc8u’ for LATIN SMALL LETTER U WITH DIAERESIS
AND MACRON.smc.bibencodings implements small deviations from the standards as it supports
all chars from 0x00 to 0x7e as well as more combining chars. The code has been
tested against several German and Swiss OPACs.UsageYou just have to import “smc.bibencodings” somehwere in your code to enable
the codecsiso-5426, iso5426, mab2::standard ISO-5426 encodingiso-5426-xe0, iso5426-xe0, mab2-xe0::special ISO-5426 encoding with special identity mapping for 0xa4, 0xe0-0xffmarc, usmarc, ansel::MARC encoding>>> import smc.bibencodings
>>> b"Abr\xc2eg\xc2e Historique De L'Origine".decode("mab2")
"Abrégé Historique De L'Origine"Data sourceThe encoding tables are extracted from Thomas Berger’s excellent pagehttp://www.gymel.com/charsets/chartab.htmland linked pages. Thank you
very much!AuthorsChristian HeimesCopyrightCopyright (C) 2008-2012 semantics GmbH. All Rights Reserved.:semantics
Kommunikationsmanagement GmbH
Viktoriaallee 45
D-52066 Aachen
Germany

Tel.: +49 241 89 49 89 29
eMail: info(at)semantics.de
http://www.semantics.de/