Saravanan666/pypi-org huggingface dataset:
Package: temperature-sensor-reader-xzf8971
temperature_sensor_readerThis is a temperature sensor package designed for modbus. Implemented in pymodbus only. PyPI website:https://pypi.org/project/temperature-sensor-reader-xzf8971/Installfrom pypi:pipinstalltemperature-sensor-reader-xzf8971from github:pip install git+https://github.com/xzf89718/temperature_sensor_readerJiandarenke modbus RS485 as exampleBefore run scriptsCheck the COM and chmodchmod666\dev\ttyUSBxImport modulesfrommodbus_configuretoolsimporttemperature_sensor.RS485_JiandarenkeasRS485_JDRKfrommodbus_configuretoolsimporttemperature_sensor.JDRKAddressConfigasConfigConfigure parameters for Jiandarenke RS485 sensorIt's OK to set None for unkown value# Modify these config values# Please configure these value in temperature_sensor before read or write values# SLAVEID must be specified. If SLAVEID is none, set to 1# ADDRESS_HUMIDITY = 0x0000# ADDRESS_TEMPERATURE_DEW_POINT = 0x0001# ADDRESS_TEMPERATURE = 0x0002# ADDRESS_TEMPERATURE_CALI = 0x0050# ADDRESS_HUMUDITY_CALI = 0x0051# ADDRESS_SLAVEID = 0x07D0# ADDRESS_BAUDRATE = 0x07D1# TEMPERATURE_CALI = 164# HUMIDITY_CALI = 7# SLAVEID = 1# BAUDRATE = 1myconfig=Config(ADDRESS_HUMIDITY,ADDRESS_TEMPERATURE_DEW_POINT,ADDRESS_TEMPERATURE,ADDRESS_SLAVEID,ADDRESS_BAUDRATE,ADDRESS_TEMPERATURE_CALI,ADDRESS_HUMUDITY_CALI,TEMPERATURE_CALI,HUMIDITY_CALI,SLAVEID,BAUDRATE)Calibration of sensor. Not necessary calibration every timesensor.CalibrationJiandarenke(myconfig)Set slaveID and baudratePlease make sure only 1 sensor connect to the modbus bussensor.WriteSlaveIDAndBaudrate(myconfig)Init and read measured values from sensor# Create a wrapper for JDRK sensorsensor=RS485_JDRK(port="/dev/ttyUSB0")# Init and connect clientsensor.InitClient()# Read slaveID and baudrateslaveID,baudrate=sensor.ReadSalveIDAndBaudrate(myconfig)# Read temperature, dew point, humidity in one request# Only correct for specified sensortemperature,dew_point_temperature,humidity=sensor.ReadTemperatureAndHumidity(myconfig)# Read temperature onlytemperature=sensor.ReadTemperature(myconfig)# Read dew point temperaturedew_point_temperature=sensor.ReadTemperatureDewPoint(myconfig)# Read humidity onlyhumidity=sensor.ReadTemperature(myconfig)Close the sensorsensor.close()
Package: tempered
Tempered (Beta)A modern html templating library for pythonDocumentationPyPiGithubpipinstalltemperedFeaturesFast: Sub-millisecond render times. Roughly 5x faster than jinja, 50x faster than djangoScoped and Bundled CSS: CSS is scoped per file and then bundled together into a single stylesheet per pageNative Preprocesser Support: Native support for Sass and TypescriptComponent Based: Each template is a components and can call other componentsLayouts: Templates can use layouts, based on jinja2's implementationDyanimcly Typed: Optional dynamic type information can be built with components for better intelisense.fromtemperedimportTemperedtempered=Tempered("./templates")html=tempered.render_template("image.html",src="/example.png",alt="Example Post",)print(html)<!-- templates/Image.html -->{% param src: str %}
{% param alt: str = "" %}<imgsrc="{{src}}"alt="{{alt}}"><style>img{width:100px;height:100px;}</style><imgalt="Example Post"src="/example.png"class=image-83dc><style>img.image-83dc{width:100px;height:100px}</style>TranspiledTemplates are transpiled into python functions to provide increased performance.View Benchmarks HereType HintedDynamically created type information allows improved IDE intergration.Type Hinting.webm
Package: temper-windows
Temper-WindowsAllows you to access the temperature in celsius of a Temper USB device on Windows.Installationpip install temper-windowsDemoimport temper_windows

temperature = temper_windows.get_temperature()
print(temperature)


>>> 21.26NotesI only have the TemperX to test on so it may not work on others. Pull requests welcome if it doesn't.Tested on Python 3.6 and 2.7 although will most likely work on earlier versions too.
Package: tempest
Tempest - The OpenStack Integration Test SuiteThis is a set of integration tests to be run against a live OpenStack
cluster. Tempest has batteries of tests for OpenStack API validation,
scenarios, and other specific tests useful in validating an OpenStack
deployment.Documentation:https://docs.openstack.org/tempest/latest/Features:https://specs.openstack.org/openstack/qa-specs/#tempestBugs:https://bugs.launchpad.net/tempest/Release Notes:https://docs.openstack.org/releasenotes/tempestGet in touch viaemail. Use
[tempest] in your subject.
Package: tempest-lib
===========tempest-lib===========OpenStack Functional Testing Library* Free software: Apache license* Documentation: http://docs.openstack.org/developer/tempest-lib* Source: http://git.openstack.org/cgit/openstack/tempest-lib* Bugs: http://bugs.launchpad.net/tempesttempest-lib is a library of common functionality that was originally in tempest(or similar in scope to tempest)**As of the 1.0.0 release tempest-lib as a separate repository and project isdeprecated. The library now exists as part of the tempest project, all futuredevelopment will occur there. To use the library for future releases updateyour imports from tempest_lib to tempest.lib, and add tempest>=10 to yourproject requirements**Features--------Some of the current functionality exposed from the library includes:* OpenStack python-* client CLI testing framework* subunit-trace: A output filter for subunit streams. Useful in conjunctionwith calling a test runner that emits subunit* A unified REST Client* Utility functions:* skip_because: Skip a test because of a bug* find_test_caller: Perform stack introspection to find the test caller.common methods
Package: tempest-nfv-plugin
This project is a plugin to [OpenStack’s Tempest](https://github.com/openstack/tempest) used to test NFV usecases.### InstallationPlease refer to the following [page](https://github.com/redhat-openstack/nfv-tempest-plugin/blob/master/docs/installation.md).### Pre-requisites before running the pluginPlease refer to the following [page](https://github.com/redhat-openstack/nfv-tempest-plugin/blob/master/docs/tests_prerequisites_config.md).### Tests and samplesFor the list of tests with description, please refer to the following [page](https://github.com/redhat-openstack/nfv-tempest-plugin/blob/master/docs/tests.md).For a sample external configuration file, please refer to the following [page](https://github.com/redhat-openstack/nfv-tempest-plugin/blob/master/docs/tests_config.yml.sample).### ContributingPlease refer to the following [page](https://github.com/redhat-openstack/nfv-tempest-plugin/blob/master/docs/contribution.md).
Package: tempf
tempf - TempFilesMultiple temporary files in 1 line of code.TempFiles(X) returns a tuple of X non-used paths.fromtempfimportTempFileswithTempFiles(3)as(path1,path2,path3):withpath1.open('w')asfile1:file1.write('See how easy it is?')Install>>> pip install tempfExampleCompilation process:frompathlibimportPathfromtempfimportTempFilesdefcompile_run_and_check_output(code_path:Path,expected_output:str)->bool:"""Compile the code, run it, and assert the output is as expected.:param code_path: The path to the code to compile.:param expected_output: The expected output from running the code.:returns: True if compilation and run went successful, and the run outputted the expected output."""withTempFiles(4)as(compile_log_path,run_log_path,executable_path,run_output_path):compile_file(code_path,log=compile_log_path,compiled=executable_path)ifnotis_compile_log_ok(compile_log_path):returnFalserun_compiled(executable_path,log=run_log_path,run_output=run_output_path)ifnotis_run_log_ok(run_log_path):returnFalsewithrun_output_path.open('r')asoutput_file:returnexpected_output==output_file.read()
Package: tempfifo
tempfifoThis module creates temporary named pipesInstallationpip3installtempfifoorpip3install--usertempfifoExampleANamedTemporaryFIFOclass is provided and is intended to be used as a
context manager. The filename of the created pipe is accessible as itsnameattribute. For example:fromtempfifoimportNamedTemporaryFIFOwithNamedTemporaryFIFO()asntf:print(ntf.name)
Package: tempfileatexit
tempfileatexitPython library for removing temporary files and directories when program finishes.Installationpip install tempfileatexitUsageAutomatic wayimport tempfileatexit as tfae
(fs, my_tempfile) = tfae.mkstemp()
my_tempdir = tfae.mkdtemp()

print(tempfileatexit.list(verbose=True))Manual wayimport tempfileatexit
import tempfile

(fs, my_tempfile) = tempfile.mkstemp()
my_tempdir = tempfile.mkdtemp()

tempfileatexit.register(my_tempfile)
tempfileatexit.register(my_tempdir)


print(tempfileatexit.list(verbose=True))After you run the code and the program exxists, themy_tempfileandmy_tempdirwill be gone.
Package: tempfolder
tempfolder🗂 Easily create temporary folders, add files into them and don't worry about deleting them, tempfolder will take careDocumentation:https://jalvaradosegura.github.io/tempfolder/Installationtempfolder is published onPyPIand can be installed from there:pip install tempfolderQuick exampleFor a deeper explanation, please check thedocs...Run this and see if you spot the magic, if you don't, please check thedocs:frompathlibimportPathfromtempfolderimportuse_temp_folderdefadd_config_file_to_folder(folder:str):withopen(f'{folder}/config.cfg','w')asf:f.write('I_love=tempfolder')@use_temp_folder('some_folder')deftest_add_config_file_to_folder():add_config_file_to_folder('some_folder')assertPath('some_folder').exists()assertPath('some_folder/config.cfg').exists()deftest_look_for_the_folder_and_the_file():assertnotPath('some_folder').exists()assertnotPath('some_folder/config.cfg').exists()test_add_config_file_to_folder()test_look_for_the_folder_and_the_file()
Package: tempgit
tempgitSome temporal operations over git repositories using, mainly, ssh private keys and a git monitor
to detect changes in a repository.Temporal git repositoryGit monitorTemporal git repositoryThis is used to get a temporal git repository, for example, to clone it, modify and push the changes
without maintaining a local copy of the repository. The syntax is:fromtempgitimportTemporalGitRepository# Using "with" command. The repository will be removed automatically after the "with" command finisheswithTemporalGitRepository(repository,branch=branch,ssh_key=ssh_key,single_branch=False,depth=1,remove=True)asrepo:repo.add(...)repo.commit(...)repo.push()Whererepositoryis the Git repository URL, thebranchthe branch name,ssh_keythe private key to connect with the repository,single_branchTrue to download only the selected branch,depthcreate a shallow clone of that depth,
andremoveif the local copy of the repository will be removed.For example:fromtempgitimportTemporalGitRepository# Using "with" command. The repository will be removed automatically after the "with" command finisheswithTemporalGitRepository(repository,branch=branch,ssh_key=ssh_key)asrepo:repo.add(file1,file2,file3,...)# Add the modificationsrepo.commit('Message')# Commit the changesrepo.push()# Push the commit# With close(). The repository will be removed when you close the object.repo=TemporalGitRepository(repository,branch=branch,ssh_key=ssh_key):repo.add(file1,file2,file3,...)repo.commit('Message')repo.push()repo.close()Git monitorMonitor a Git repository to check if there is any change in the remote repository with respect the local one.frommysutils.gitimportGitMonitor# Function to execute when the is a changedeffunc(*files:str)->None:# Print the changed filesprint(files)# Create a monitor instance to execute one only timemonitor=GitMonitor(func,'local_dir','remote_url','branch_name')# Execute the monitormonitor.monitor()# Execute the monitor as a threadmonitor.start()# If you want to check the git repository several times you need add an interval tomonitor=GitMonitor(func,'local_dir','remote_url','branch_name',interval=30)# 30 seconds# If you want to execute func() the first time although the repository has not changed, use forcemonitor=GitMonitor(func,'local_dir','remote_url','branch_name',force=True,interval=30)
Package: tempground
tempgroundA script that allows you to concisely:create a temp directoryfill the directory with files of known contentrun shell commands in the directorycheck the run resultsFor example, during integration testing of a library, we can create a small temporary project that imports our library. And we check that the library was imported.Example: Testing a Kotlin librarySuppose you have created a Kotlin library namedmylib. You need to test that
third-party projects can usemylibas a dependency.The test can be run by creating a single file like this:# lib_test.pyfromtempgroundimport*withTempGround(files={# minimalistic build script to use the library"build.gradle.kts":"""plugins {id("application")kotlin("jvm") version "1.6.10"}repositories { mavenCentral() }application { mainClass.set("MainKt") }dependencies {implementation("io.github.username:mylib")}""",# additional settings, if necessary"settings.gradle.kts":"""sourceControl {gitRepository(java.net.URI("https://github.com/username/mylib.git")) {producesModule("io.github.username:mylib")}}""",# kotlin code that imports and uses the library"src/main/kotlin/Main.kt":"""import io.github.username:mylib.spanishGreetingfun main() = println(spanishGreeting())"""})asapp:# print report about our mini-projectprint(app.files_content())# run our mini-projectresult=app.run(["gradle","run","-q"])# print what was on stdout, the exit code, etcprint(result)# check everything was as exceptedassertresult.returncode==0assertresult.stdout=="¡Hola!\n"print("Everything is OK!")To run the test on a clean system, installtempgroundand run the script:# assuming pip and python are Python 3.10+# and lib_test.py is a local file$pipinstalltempground
$pythonlib_test.pyLicenseCopyright © 2022Artsiom iG.
Released under theMIT License.
Package: temphelpers
[![Build Status](https://travis-ci.org/wtsi-hgi/python-temp-helpers.svg?branch=master)](https://travis-ci.org/wtsi-hgi/python-temp-helpers)
[![codecov](https://codecov.io/gh/wtsi-hgi/python-temp-helpers/branch/master/graph/badge.svg)](https://codecov.io/gh/wtsi-hgi/python-temp-helpers)
[![PyPI version](https://badge.fury.io/py/temphelpers.svg)](https://badge.fury.io/py/temphelpers)# python-temp-helpers
Python library to help with using temp files and directories
Package: tempinbox
TempInbox - Your Temporary Email Solution 📧Welcome to TempInbox, a Python package designed to simplify your interaction with temporary email addresses. With TempInbox, you can effortlessly generate disposable email addresses and access their content.Installation 🛠️To get started, simply install TempInbox using pip:pipinstalltempinboxUsage Example 🚀fromtempinboximportTempEmail# Create a TempEmail instanceclient=TempEmail()# Generate a temporary email address with specific optionsemail_address=client.generate_temp_email(domain=False,dot_gmail=True,plus_gmail=False)["email"][0]# Get a list of emails for the generated addressemail_list=client.get_mail_list(email_address)# Get the content of a specific email (ID=2)email_content=client.get_mail_content(email_address,id=2)print(email_content)This code snippet demonstrates how to generate a temporary email address with the following options:domain: Generates an email address without an additional domain.(example@exampledomain.com)dot_gmail: Generates an email address with a dot and 'gmail.com' (as in the example). (ex.ex.ex@gmail.com)plus_gmail: Generates an email address without a plus sign followed by 'gmail.com'. (example+exam@gmail.com)Sample Output 📋Generated Email Address:m.ar.io.sgl.ade@gmail.comList of Received Emails:{'messageData':[{'messageID':'ADSVPN','from':'AI TOOLS','subject':'Unleash the power of AI with our ultimate directory of online tools!','time':'Just Now'},{'messageID':'MThiODcwYWI5Mzk3MDYwNg==','from':'GPTDOS Access <hi@gptdos.com>','subject':'GPTDOS Access Code','time':'14 hrs ago'},{'messageID':'MThiODZmNjlhNzhjYmI5Zg==','from':'LOVO <hello@lovo.ai>','subject':'LOVO Newsletter 👻','time':'19 hrs ago'}]}Email Content (ID=2):<divid="subject-header"><b>From:</b>GPTDOS Access&lt;hi@gptdos.com&gt;<br/><b>Subject:</b>GPTDOS Access Code</div><html><head><title></title></head><body>您好,<br>您在使用 GPTDOS, 请输入验证码:<br/><br/><b>81269658</b><br/>GPTDOS<br/><imgsrc="https://u13032898.ct.sendgrid.net/wf/open?upn=rqJJO9-2BJL8i62yHtdgY1cWouC7RdXlcfG3E73dU1e9bPvX1VDl-2BssK4tZTTDPVKiIzaKX2ZiEbmPYpW1BM32GVs-2FvWGiq0R-2BAvavNooikOlxpsMBCJehGSg33aHAZgfSpipfZ1gyuFsxIrfleaNTIuL8Nhu2y5on3fe6rpukhEi-2BHtezMLmZig6IHrWHV12TR94QgEhzPmLoXOHUXx76bqlGEZLGixTo6lCYGECJfgezt6vsLL78PtVSJpanSdYvdoPj-2BNgztK6xsXmw6ZhVWEBeMYBIBQ9BCW7od6JzUo6DaVoLj1iOQcexl-2BOC9COGhif32U42TOV04TnEnFNQ106dIjBtPU3VgTxEZA0cAR35d5AJUgCGRi4-2B-2FqqnPM2-2F"alt=""width="1"height="1"border="0"style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom0 !important;padding-right:0 !important;padding-left:0 !important;"/></body></html>Features 🌟Quickly generate temporary email addresses.Retrieve a list of received emails with details.Access the content of specific emails.Contribution 🤝We welcome contributions! If you'd like to enhance TempInbox, feel free to open an issue or create a pull request.License 📜This project is licensed under the MIT License - see theLICENSEfile for details.Repository ViewsFor more information, visit ourGitHub repository.Happy Emailing!📬🎉
Package: templa
templaTempla is a Python library that offers a flexible and typed building system using
Jinja2 templates for your code. It allows you to easily render, parse, process,
and build. The following are the assumed build processes in Templa:Define the required context with dataclass for rendering a Jinja2 formatted template.Render the template with Jinja2 library using the provided context.Extract relevant information and elements from the rendered template for further processing.Perform necessary processing on the parsed rendered template.Utilize the processed rendered template to generate desired outputs or objects.Installation$pipinstalltemplaExamplefromdataclassesimportdataclassfromtypingimportListfromtypingimportOptionalimportjinja2importyamlfromtempla.builderimportBuilderfromtempla.configimportConfigfromtempla.configimportConfigDatadefparse_rendered_template_yaml_stub(rendered_str:str)->Optional[List[str]]:parsed_rendered_template=yaml.safe_load(rendered_str)assert(isinstance(parsed_rendered_template,list)orparsed_rendered_templateisNone)returnparsed_rendered_templatedefbuild_parsed_rendered_template_yaml_stub(parsed_rendered_template:Optional[List[str]],)->Optional[str]:built=yaml.dump(parsed_rendered_template,Dumper=yaml.SafeDumper)assertisinstance(built,str)returnbuiltclassSampleTemplateGetter:defget_template(self)->jinja2.Template:environment=jinja2.Environment(loader=jinja2.DictLoader({"template.txt":"---\n- {{ foo }}\n- {{ bar }}\n- {{ zoo }}"}))returnenvironment.get_template("template.txt")@dataclass(frozen=True)classSampleConfigData(ConfigData):foo:strbar:strclassSampleBuilder(Builder[List[str],str]):def__init__(self,)->None:super().__init__(config=Config[SampleConfigData]({"foo":"FOO","bar":5},SampleConfigData),template_getter=SampleTemplateGetter(),parse_rendered_template=parse_rendered_template_yaml_stub,build_processed=build_parsed_rendered_template_yaml_stub,)def_build(self,processed:Optional[List[str]])->Optional[str]:ifprocessedisnotNone:processed[2]="ZOO_Updated"returnsuper()._build(processed)defbuild_sample_template()->None:builder=SampleBuilder()initialized_target=builder.init_builder_target()# It will be typing error because the builder variable is in a# state of an unfinished type before the build process is# completed, causing a type error.# builder.build(initialized_target)# ->  Argument 1 to "build" of "Builder" has incompatible type#     "BuilderTargetInitialized"; expected "BuilderTargetProcessed"  [arg-type]processed_target=builder.process_template(initialized_target)built_target=builder.build(processed_target)print(builder.fetch_built(built_target))if__name__=="__main__":build_sample_template()
Package: templado
=====Templado=====Templado is a simple Django app to upload your HTML report templates and generate those reports by filling the fields of form based on JSON template.Detailed documentation is in the "docs" directory.Quick start-----------1. Add "templado" to your INSTALLED_APPS setting like this::INSTALLED_APPS = (...'bootstrap3','templado',)2. Modify also settings with::FILE_UPLOAD_HANDLERS = (...'django.core.files.uploadhandler.MemoryFileUploadHandler','django.core.files.uploadhandler.TemporaryFileUploadHandler',)TEMPLATE_CONTEXT_PROCESSORS = (...'django.contrib.auth.context_processors.auth','django.core.context_processors.request',)from django.conf import settingsREPORT_STATIC_DIR = os.path.join(os.path.join(settings.MEDIA_ROOT, 'media'), 'report-static')3. Include the templado URLconf in your project urls.py like this::url(r'^templado/', include('templado.urls', namespace='templado')),4. Run `python manage.py migrate` to create the templado models.5. Start the development server.6. Visit http://127.0.0.1:8000/templado/ to start using Templado app.
Package: templar
Templar=======[![PyPI version](https://badge.fury.io/py/templar.svg)](https://badge.fury.io/py/templar)[![Build Status](https://travis-ci.org/albert12132/templar.svg?branch=master)](https://travis-ci.org/albert12132/templar)Templar is a static templating engine written in Python that isdesigned to be lightweight and flexible. Templar supports templateinheritance and modular source files, as well as the ability to definecustom Markdown patterns.See the [TemplarWiki](https://github.com/albert12132/templar/wiki/)for help with getting started.Contributing------------1. After cloning the repo, create a virtualenv with Python 3.3 orabove:virtualenv -p python3 .2. Install requirements:pip install -r requirements.txt3. Create a development version of `templar`:python setup.py developYou can use `nose` to run tests from the root:nosetests tests
Package: template-analysis
template-analysisGenerate template and extract variables from texts.
In other words, template-analysis makes reverse template (untemplate).UsageCurrently, this supports to analyze only two texts.fromtemplate_analysisimportanalyzeresult=analyze(["A dog is a good pet","A cat is a good pet","A cat is a pretty pet","A bird is a great pet",])result.to_format_string()# => "A {} is a {} pet"result.args[0]# => ["dog", "good"]result.args[1]# => ["cat", "good"]result.args[2]# => ["cat", "pretty"]result.args[3]# => ["bird", "great"]Concepts / Future plansDevelopment plans1. Untemplate two texts.2. Untemplate multiple / complex texts.3. Untemplate nested / tree-structured texts.4. Support several features for scraping.5. Implement a more efficient algorithm.Image boardsLicenseThe 3-Clause BSD License. See also LICENSE file.
Package: templatebot
vcokltfre/template-bot-v2A rewrite ofTemplateBotwith improvementsUsage:fromtemplatebotimportBotbot=Bot(name="MyBot",command_prefix="!")bot.load_initial_cogs()# Required, even when empty, to load the default cog and jishakubot.run("token")LoggingThe bot has two types of logging, synchronoush and asynchronous. Generally speaking you will want to use async logging, since it won't block while you're running the bot, however if you're logging something before running the bot, you may want to use the sync methods. These methods can be accessed throughtemplatebot.Bot.loggerclassWebhookLogger:...## Synchronous methodsdefdebug_s(self,content):self.send("debug",content)definfo_s(self,content):self.send("info",content)defwarn_s(self,content):self.send("warn",content)deferror_s(self,content):self.send("error",content)defcritical_s(self,content):self.send("critical",content)## Asynchronous methodsasyncdefdebug(self,content):awaitself.send_async("debug",content)asyncdefinfo(self,content):awaitself.send_async("info",content)asyncdefwarn(self,content):awaitself.send_async("warn",content)asyncdeferror(self,content):awaitself.send_async("error",content)asyncdefcritical(self,content):awaitself.send_async("critical",content)