Saravanan666/pypi-org huggingface dataset:
Package: sensirion-i2c-sht3x
Python I2C Driver for Sensirion SHT3XThis repository contains the Python driver to communicate with a Sensirion sensor of the SHT3X family over I2C.Clickhereto learn more about the Sensirion SHT3X sensor family.Not all sensors of this driver family support all measurements.
In case a measurement is not supported by all sensors, the products that
support it are listed in the API description.Supported sensor typesSensor nameIÂ²C AddressesSHT30A0x44, 0x45SHT300x44, 0x45SHT31A0x44, 0x45SHT310x44, 0x45SHT330x44, 0x45SHT35A0x44, 0x45SHT350x44, 0x45The following instructions and examples use aSHT30.Connect the sensorYou can connect your sensor over aSEK-SensorBridge.
For special setups you find the sensor pinout in the section below.Sensor pinoutPinCable ColorNameDescriptionComments1greenSDAI2C: Serial data input / output2blackGNDGround3yellowSCLI2C: Serial clock input4redVDDSupply Voltage2.15V to 5.5VDocumentation & QuickstartSee thedocumentation pagefor an API description and aquickstartexample.ContributingWe develop and test this driver using our company internal tools (version
control, continuous integration, code review etc.) and automatically
synchronize themasterbranch with GitHub. But this doesn't mean that we
don't respond to issues or don't accept pull requests on GitHub. In fact,
you're very welcome to open issues or create pull requests :-)Check coding styleThe coding style can be checked withflake8:pipinstall-e.[test]# Install requirementsflake8# Run style checkIn addition, we check the formatting of files witheditorconfig-checker:pipinstalleditorconfig-checker==2.0.3# Install requirementseditorconfig-checker# Run checkLicenseSeeLICENSE.
Package: sensirion-i2c-sht4x
Python I2C Driver for Sensirion SHT4XThis repository contains the Python driver to communicate with a Sensirion sensor of the SHT4X family over I2C.Clickhereto learn more about the Sensirion SHT4X sensor family.Supported sensor typesSensor nameI²C AddressesSHT400x44, 0x45SHT410x44, 0x45SHT450x44, 0x45The following instructions and examples use aSHT40.Connect the sensorYou can connect your sensor over aSEK-SensorBridge.
For special setups you find the sensor pinout in the section below.Sensor pinoutPinCable ColorNameDescriptionComments1greenSDAI2C: Serial data input / output2blackGNDGround3yellowSCLI2C: Serial clock input4redVDDSupply Voltage1.1V to 3.6VDocumentation & QuickstartSee thedocumentation pagefor an API description and aquickstartexample.ContributingWe develop and test this driver using our company internal tools (version
control, continuous integration, code review etc.) and automatically
synchronize themasterbranch with GitHub. But this doesn't mean that we
don't respond to issues or don't accept pull requests on GitHub. In fact,
you're very welcome to open issues or create pull requests :-)Check coding styleThe coding style can be checked withflake8:pipinstall-e.[test]# Install requirementsflake8# Run style checkIn addition, we check the formatting of files witheditorconfig-checker:pipinstalleditorconfig-checker==2.0.3# Install requirementseditorconfig-checker# Run checkLicenseSeeLICENSE.
Package: sensirion-i2c-sts3x
Python I2C Driver for Sensirion STS3XThis repository contains the Python driver to communicate with a Sensirion sensor of the STS3X family over I2C.Clickhereto learn more about the Sensirion STS3X sensor family.Supported sensor typesSensor nameIÂ²C AddressesSTS300x4A, 0x4BSTS30A0x4A, 0x4BSTS31A0x4A, 0x4BSTS310x4A, 0x4BSTS320x4A, 0x4BSTS330x4A, 0x4BSTS350x4A, 0x4BThe following instructions and examples use aSTS30.Connect the sensorYou can connect your sensor over aSEK-SensorBridge.
For special setups you find the sensor pinout in the section below.Sensor pinoutPinCable ColorNameDescriptionComments1greenSDAI2C: Serial data input / output2blackGNDGround3yellowSCLI2C: Serial clock input4redVDDSupply Voltage2.15V to 5.5VDocumentation & QuickstartSee thedocumentation pagefor an API description and aquickstartexample.ContributingWe develop and test this driver using our company internal tools (version
control, continuous integration, code review etc.) and automatically
synchronize themasterbranch with GitHub. But this doesn't mean that we
don't respond to issues or don't accept pull requests on GitHub. In fact,
you're very welcome to open issues or create pull requests :-)Check coding styleThe coding style can be checked withflake8:pipinstall-e.[test]# Install requirementsflake8# Run style checkIn addition, we check the formatting of files witheditorconfig-checker:pipinstalleditorconfig-checker==2.0.3# Install requirementseditorconfig-checker# Run checkLicenseSeeLICENSE.
Package: sensirion-i2c-svm40
This package contains the driver for the Sensirion SVM40 Evaluation Kit using
the I²C interface.The driver provides all I²C commands as Python methods and handles all the
low-level things like type conversions, CRC calculation, error handling
etc.Installation and UsageThe user manual is available athttps://sensirion.github.io/python-i2c-svm40/.CHANGELOG0.1.1Add commandsget_compensation_temperature_offset(),set_compensation_temperature_offset(),get_voc_tuning_parameters(),set_voc_tuning_parameters(),store_nv_data(),get_voc_state()andset_voc_state()to support new features for firmware versions >= 2.00.1.0Initial release
Package: sensirion-i2c-svm41
This package contains the driver for the Sensirion SVM41 Evaluation Kit using
the I²C interface.The driver provides all I²C commands as Python methods and handles all the
low-level things like type conversions, CRC calculation, error handling
etc.Installation and UsageThe user manual is available athttps://sensirion.github.io/python-i2c-svm41/.CHANGELOG0.1.0Initial release
Package: sensirion-sensorbridge-i2c-sfm
This repository contains the Python driver to communicate with Sensirion flow
sensors over aSensorBridgeusing
the I²C interface.Install the package withpip installsensirion-sensorbridge-i2c-sfmCHANGELOG0.2.0Specify I2C frequency and voltage in SFM3019 constantsAdd official Python 3.8 supportUse quickstart example from Python file instead of copy-paste the code0.1.0Initial release with SFM3019 support
Package: sensirion-shdlc-driver
This package contains the base driver for Sensirion SHDLC devices. It allows to
transmit and receive SHDLC frames over the serial port and provides some
generic commands (e.g. reading the serial number of a device).NoteNormally you shouldn’t use this driver directly - instead you should use the
device-specific driver for your actual device as it provides additional
commands. But this driver is still useful if you want to transceive raw SHDLC
frames, or if there is no specific driver available yet for your device.Installation and UsageThe user manual is available athttps://sensirion.github.io/python-shdlc-driver/.CHANGELOG0.1.5Move parts ofShdlcDeviceinto new base classShdlcDeviceBase0.1.4Make signature and version offset configurable forShdlcFirmwareImage0.1.3Add propertyis_opentoShdlcPort,ShdlcSerialPortandShdlcTcpPortImprove/extend documentation0.1.2AddShdlcTcpPortclass to communicate with SHDLC devices through TCP/IPAdd propertystart_receivedtoShdlcSerialMisoFrameBuilderAdd methodsopen()andclose()to theShdlcPortinterfaceAdd parameterdo_opento constructor ofShdlcSerialPortto allow
creatingShdlcSerialPortinstances without opening the port yetAdd propertyadditional_response_timetoShdlcSerialPortImprove timeout calculation ofShdlcSerialPortto fix possible response
timeout errorsMakeFirmwareUpdatefailing early if the bitrate cannot be changed0.1.1Add optional dependencyintelhexfor performing firmware updatesAdd bootloader commands:ShdlcCmdBootloaderBase,ShdlcCmdEnterBootloader,ShdlcCmdFirmwareUpdateStart,ShdlcCmdFirmwareUpdateData,ShdlcCmdFirmwareUpdateStopAdd exceptions for the firmware updater:ShdlcFirmwareImageSignatureError,ShdlcFirmwareImageIncompatibilityErrorAdd classes to perform firmware updates over SHDLC:ShdlcFirmwareImage,ShdlcFirmwareUpdateAdd propertylockto theShdlcPortinterface to allow locking the
port from outside the class0.1.0Initial release
Package: sensirion-shdlc-sensorbridge
This package contains the SHDLC driver for theSensirion SEK-SensorBridge.
It provides all SHDLC commands (e.g. reading the serial number) as Python
methods and handles all the low-level things like type conversions, checksum
calculation, error handling etc.Installation and UsageThe user manual is available athttps://sensirion.github.io/python-shdlc-sensorbridge/.CHANGELOG0.2.0Fix for endianness of returned float onmeasure_voltage()command0.1.1Add classSensorBridgeI2cProxyto provide a unified I²C port access0.1.0Initial release
Package: sensirion-shdlc-sfa3x
This package contains the SHDLC driver for the Sensirion SFA3x sensor modules
which have an UART interface using the SHDLC protocol.The driver provides all SHDLC commands as Python methods and handles all the
low-level things like type conversions, checksum calculation, error handling
etc.Installation and UsageThe user manual is available athttps://sensirion.github.io/python-shdlc-sfa3x/.CHANGELOG0.1.0Initial release
Package: sensirion-shdlc-sfc5xxx
This package contains the SHDLC driver for theSensirion SFC5xxxmass flow
controllers andSensirion SFM5xxxmass flow meters which have an RS485
interface using the SHDLC protocol. MFCs and MFMs which do not have an SHDLC
interface are not supported by this driver.The driver provides all SHDLC commands (e.g. set setpoint and read measured
flow) as Python methods and handles all the low-level things like type
conversions, checksum calculation, error handling etc.Installation and UsageThe user manual is available athttps://sensirion.github.io/python-shdlc-sfc5xxx/.CHANGELOG0.1.0Initial release
Package: sensirion-shdlc-svm40
This package contains the SHDLC driver for the SVM40 Evaluation Kit which
has a UART interface using the SHDLC protocol.The driver provides all SHDLC commands as Python methods and handles all the
low-level things like type conversions, checksum calculation, error handling
etc.Installation and UsageThe user manual is available athttps://sensirion.github.io/python-shdlc-svm40/.CHANGELOG0.3.0Updated the commands to support new features for firmware versions >= 2.0set_compensation_temperature_offset(): Added the option to send the
temperature offset parameter using an integer instead of a float which is
supported for firmware versions >= 2.00.2.1First public releaseUsesphinx-versioningto build documentationFix missingimport timein quick start documentation0.2.0Breaking change to support version 2 hardwareCleanup for SHDLC interface to match similar implementationsset_compensation_temperature_offset()will no longer write the value
directly to the flash. Usestore_nv_data()to store the values.0.1.0Initial release
Package: sensirion-shdlc-svm41
This package contains the SHDLC driver for the SVM41 Evaluation Kit which
has a UART interface using the SHDLC protocol.The driver provides all SHDLC commands as Python methods and handles all the
low-level things like type conversions, checksum calculation, error handling
etc.Installation and UsageThe user manual is available athttps://sensirion.github.io/python-shdlc-svm41/.CHANGELOG0.1.0Initial release
Package: sensirion-sps030
Sensirion SPS03 Particulate Sensor Python interfaceA basic python interface for interacting with the Sensirion SPS030 Particulate Matter sensor.  This code has been tested with the following devices: SPS030.This wrapper is based on:https://github.com/FEEprojects/plantowerThis wrapper has been developped as part of on-going work on the use of low-cost PM sensors to monitor air quality in urban areas.
Package: sensirion-uart-scc1
python-uart-scc1This repository provides a Python driver forSensirion SCC1-USB Cable.
The detailed technical description of the SCC1-USB cable is provided in thedatasheet.Feature overviewOn one hand the SCC1-USB exposes an API to efficiently use the supported sensors. So far support is only added for theSLF3x-Sensor family.On the other hand the cable can be used as USB to I2c bridge for any Sensirion I2c sensor that can be plugged to the cable.For both scenarios an example is available in the example subfolder of this repository.Note: Using the cable as USB to I2c bridge will not allow to achieve the same throughput as with the embedded API.The API of the driver is described on thedocumentation pageof this repositoryGetting startedInstallationIt is recommended to use a virtual environment. In any case you can install the package via pip by typing:pipinstallsensirion-uart-scc1If you have cloned the repository you can install the package and all it dependencies usingpoetry.poetryinstallRunning the examplesWe provide two examples to show two basic usage scenarios of the driverSLF3x UsageThis example does not require any additional dependency. Once the packagesensirion-uart-scc1is installed the example is run by typing:python./examples/scc1_slf3x_example/slf3x_usage.py--serial-port<your-com-port>USB-I2c-BridgeThis example shows how a public python driver can be used with the SCC1-USB cable. The example uses the public driversensirion_i2c_sf06_lf. Before you run the example you need to install this driver.pipinstallsensirion_i2c_sf06_lfAfter having installed the driver the example is run by typing:python./examples/scc1_usb_to_i2c/scc1_usb_2_i2c_usage.py--serial-port<your-com-port>ContributingYou are very welcome to open issues and to create pull requests.Nevertheless you need to understand that we cannot consider pull request that do not pass the CI-pipeline.This section explains in short how you can make sure that your contribution passes all the checks of the CI pipeline.The repository uses poetry for dependency management. It is used in the CI pipeline as well.
The easiest way to be conformant to our coding style will be to use poetry for your contributions as well. This will allow to test and check your contributions locally before creating pull requests.Installing and running testsFor testing some extra dependencies are required that need to be installed.poetryinstall--withtestThe tests (including those that are marked) can be executed by tying:poetryrunpytestNote: On github no tests that require hardware can be run. Test cases that rely on attached hardware need to be decorated with@pytest.mark.needs_hardwareChecking code-formattingMake sure that you code is properly formatted. The CI pipeline will check and fail if this is not the case. To check the code-formatting before pushing to the repository type:poetryrunflake8
Package: sensirion-uart-sfx6xxx
This package contains the driver to communicate with a
Sensirion mass flow controller of the SFC6XXX family or a
Sensirion gas flow sensor of the SFM6XXX family over uart.Installation and UsageThe user manual is available athttps://sensirion.github.io/python-uart-sfx6xxxCHANGELOG1.0.0Initial release of SFX6XXX SHDLC driver
Package: sensirion-uart-svm4x
Python UART Driver for Sensirion SVM4XThis repository contains the Python driver to communicate with a Sensirion SVM4X sensor over UART using the SHDLC protocol.Clickhereto learn more about the Sensirion SVM4X sensor.The SVM4x evaluation kit covers evaluation of the SGP40 and SGP41 sensors.Connect the sensorYou can connect your sensor over the provided USB cable.For special setups check out the sensor pinout in the section below.Sensor pinoutPinCable ColorNameDescriptionComments1redVDDSupply Voltage3.3 or 5V2blackGNDGround3greenRXUART: Transmission pin for communication4yellowTXUART: Receiving pin for communication5blueSELInterface selectLeave floating or pull to VDD to select UART6purpleNCDo not connectDocumentation & QuickstartSee thedocumentation pagefor an API description and aquickstartexample.ContributingWe develop and test this driver using our company internal tools (version
control, continuous integration, code review etc.) and automatically
synchronize themasterbranch with GitHub. But this doesn't mean that we
don't respond to issues or don't accept pull requests on GitHub. In fact,
you're very welcome to open issues or create pull requests :-)Check coding styleThe coding style can be checked withflake8:pipinstall-e.[test]# Install requirementsflake8# Run style checkIn addition, we check the formatting of files witheditorconfig-checker:pipinstalleditorconfig-checker==2.0.3# Install requirementseditorconfig-checker# Run checkLicenseSeeLICENSE.
Package: sensitibot
IntroductionSensitiBot is a Python bot that detects data leaks on public repositories.It was conceived as a project for the Software Engineering degree final project.Getting StartedInstall sensitibot using pip. It is advisable to do this in a Python virtualenv without system packages:$ pip install sensitibotNote:Other methods of installation can be found in theinstallation instructions.DocumentationThe documentation can be found at:SensitiBot's Wiki
Package: sensitive-data-logging
Sensitive Data LoggingUtils for handling sensitive data in logs.SetupAfter installing package to use it's features you need to set default logger and dict configurator class.Before using and configuring loggers set this things up:importloggingimportlogging.configfromsensitive_data_logging.loggersimportSensitiveDataLoggerfromsensitive_data_logging.configuratorsimportDictConfiguratorlogging.setLoggerClass(SensitiveDataLogger)logging.config.dictConfigClass=DictConfiguratorConfigurationLogger supplied by this package relies on logging dict configuration. In your configuration dict set (or not) variablessensitive_data_in_extraandsensitive_data_in_message.
They can be used in every logger we want to secure, and event inrootlogger.sensitive_data_in_extra- is list of keys which supplied in loggersextradata should be moved to sensitive_datasensitive_data_in_message- is bool whether move loggers message to sensitive_data or notlogging.config.dictConfig({'version':1,'disable_existing_loggers':False,'root':{'level':'DEBUG','handlers':['console'],},...'loggers':{'first_logger':{'handlers':['console'],},'second_logger':{'handlers':['console'],'sensitive_data_in_extra':['phone_number'],# Key 'phone_number' from extra data will be moved to sensitive_data},'third_logger':{'handlers':['console'],'sensitive_data_in_message':True,# Whole message and args will be moved to sensitive_data},},})You can also usesensitive_data_logging.formatters.SensitiveDataFormatterin development environments to prepend sensitive_data to logged message.Use of loggerWithsensitive_data_logging.loggers.SensitiveDataLoggerset as default you can use additional keyword argument when logging to explicitly supply sensitive_data:logger.info('Some log',sensitive_data={'secret':'value'})LicenseThe Sensitive Data Logging package is licensed under theFreeBSD
License.
Package: sensitive-test
testspip install sensitive-testA small, simple, and fast ordered fail-fast tests suite for Python.importsensitive# any Exception thrown will make the test running it fail,# and the program will immediately return exit code 1.withsensitive.test("test name 1"):print("Oh yes")withsensitive.test("test name 2"):raiseException("Trolled")withsensitive.test("test name 3"):print("oh no")
Package: sensitive-variables
sensitive_variables - strip local variables in tracebackssensitive_variablesis a decorator you can apply to your functions to
prevent certain local variables from being read by debugging tools, such as theDjango crash reporterorSentry.Unlike Django'ssensitive_variablesit is independent of the web framework
you use and also does not rely on debugging tools to know about the decorator
for things to work.Usage:Basicfromsentry_sdkimportinitfromsensitive_variablesimportsensitive_variablesinit()@sensitive_variables('password')deflogin_user(username,password):print("Logging in "+username+" with "+password)# TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'login_user(None,"secret123")results in:Custom scrub functionsensitive_variblescan receive a custom_scrub_fn parameter which will ba called for each local variable.
It receives the local value and variable name and must returnvalue_has_changed, new_value.
Where value_has_changed is a boolean which represents the value being changed or not and new_value is the new value.You can use this to extend scrub for dictionaries and any other custom type.Example:fromsentry_sdkimportinitfromsensitive_variablesimportsensitive_variablesinit()defmy_scrub_fn(value,variable_name):ifvariable_name=='password':returnTrue,'scrubbed-value'returnFalse,value@sensitive_variables(custom_scrub_fn=my_scrub_fn)deflogin_user(username,password):print("Logging in "+username+" with "+password)# TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'login_user(None,"secret123")How does it work?When the decorated function throws an exception,sensitive_variableswalks through the traceback, removes sensitive data fromframe.f_localscalling custom_scrub_fn so custom processing can be made and reraises the exception.This is usually not problematic because a function that just threw an exception is unlikely to still use its local variables.Why would I use this over Django's decorator?Django has a decorator also calledsensitive_variables, which this package is inspired by. It sets an attribute on the function object that contains the variable names.Debugging tools have to know about this attribute and respect it. For anything outside of the Django world, this is unlikely to be the case.The decorator in this package will always work because it actually modifies your locals.Why would I use this over Sentry's datascrubbing options?This decorator does not couple your configuration for what is sensitive data to a specific crash reporting tool.Behavior of the decorator is easily unit-testable (seetests/folder).Why would I not use this?This decorator inherently requires custom code for each Python implementation. Currently this is only tested against CPython 2.7, CPython 3.6, CPython 3.7, CPython 3.8 and PyPy 2.7.LicenseLicensed under the MIT, seeLICENSE.
Package: sensitivities
sensitivitiesMethods for linear and stochastic sensitivities analysis and error propagation.InstallYou can install thesensitivitiesmodule using pip:pipinstallsensitivitiesUsagesensitivities.stochasticThesensitivities.stochasticmodule provides functionality for stochastic sensitivities analysis. It allows you to stochastically sample input parameters from various distributions and evaluate the sensitivities of a function to those inputs. Available distributions areGaussian (given mean and standard deviation)Uniform (between lower and upper bound)Discrete (multiple discrete options)Example for stochastic sampling:fromsensitivities.stochasticimportsample,Gaussian,Uniform,Discrete,seedimportmatplotlib.pyplotaspltdefmy_function(a,b,c=0,d=0):returna+b+c+dsamples=sample(my_function,[Gaussian(10,0.05),Discrete([1,2])],{"c":Uniform(-0.4,0.4),"d":-10},n=100000,)plt.hist(samples,100)plt.show()sensitivities.linearThis module contains thepropagate_errorsfunction for linear propagation of errors for a given function based on the principle of differentials. It makes use of the scipy functionapprox_fprimeto calculate the partial derivatives of the given function. The propagated error is calculated by taking the square root of the sum of squares of the product of the partial derivatives and the uncertainties.Here is a simple usage example:fromsensitivities.linearimportpropagate_errorsdefmy_function(x,y):return[x**2,y]print(propagate_errors(my_function,errors=[0.1,0.2],x0=[1,1]))This will output:np.array([0.2,0.2])