Saravanan666/pypi-org huggingface dataset:
Package: smart-factory-faker
Smart Factory Fakerhow to usepipinstallsmart-factory-fakerThis is a project that can build a fake data set with a process.
You can define the route of the process and by defining the sensor, you can build a data set of the process in progress.TutorialTutorialversionV 0.1.0define processdefine facilities, and sensorsreturn to dataframeV 0.2.0return to csvreturn by facilies (it will return to seperated datafram by facilities)V 0.2.1Or gate can difine probability for branchingraise erorr when branch probability is not defineV 0.3.0Create BoolSensorV 0.4.0Create method using heap(This function is more accurate Processor class is no longer maintained)V 0.4.1Can visualize the difined routev 0.5.0Huristic visualizer function is created(This function plots a number on a edge)V 0.5.1Visualizer can show sensor infomationV 0.6.0Sensor data can be generated for multiple distributionsMore sophisticated timestamps of sensor data generated by the processV 0.7.0Sensor data can be visualized as a plotV 0.7.1Refactoring the codeV 0.7.2fixed bugV 0.7.3Change the code to get the next nodeV 0.8.0Can be separated by facilityV 0.9.0refactoring codecan see facilities history(Facility performance record => DataFrame(columns = [@timestamp, expire, wait]))
Package: smart-find
smart-findsmart-find makes it easier to access the advanced features of
find and grep.UsageUse the-helpoption to show the smart-find usage.$smart-find-helpUsage:smart-find-help-printthishelp-contains(-c)-grepforstringinfoundfiles-ignore-case(-i)-ignorecasewhengreping-iname(-in)-ignorecaseoffilenames-save-config-writethedefaultconfiginto/Users/barry/Library/Preferences/smart-find.json-debug-printthefindcommandline-<int>-limitfindtoamaxdepthof<int>configurationsmart-find follows the conventions of macOS and Linux XDG to look for configuration files.You can see the default configuration file path in thesmart-find -helpoutputmacos -~/Library/Preferences/smart-find.jsonlinux -~/.config/smart-find.jsonUse thesmart-find -save-configto create a config file with the default
configuration options:The default configuration is:{"folders_to_prune":[".svn",".git",".hg"],"files_to_prune":["*~"]}The following items are supported:folders_to_prune is a list of folders that will be ignoredfiles_to_prune is a list of file patterns that will be ignored
Package: smart-folder
Installation$[sudo]pipinstallsmart-folder$[sudo]npmi-gsmart-folderHow it workstargetsfolderpath/to/<repo1><folder>/<repo1 symlink>path/to/<repo2><folder>/<repo2 symlink>Examplesfind$find~/git-typed-name"*.py"-mindepth1-maxdepth1|xargssmart-folder"py"macOSmdfind$mdfind"kMDItemUserTags == py"-0|xargs-0smart-folder"py"readme42.com
Package: smartfox
Smartfox SDK for PythonNOTE:This is not an offical Smartfox SDK. Only reverse engineered the browser requests.This Python Package enables you to develop applications with the Smartfox.Install:pipinstallsmartfoxExample get a value:fromsmartfoximportSmartfox# Initialize a new smartfox connectionsmartfox=Smartfox("my-smartfox.local")# update the valuessmartfox.getValues()# printprint(smartfox.consumption)# print the valueprint(smartfox.consumption.value)Example set arelayoranalog output:fromsmartfoximportSmartfox# Initialize a new smartfox connectionsmartfox=Smartfox("my-smartfox.local")smartfox.relay1.turnOff()# turn off relay 1smartfox.relay1.turnOn()# turn on relay 1smartfox.analog.set(10)# set analog output to 10%smartfox.analog.setAuto()# set analog output to autosmartfox.analog.off()# set analog output to offValue ObjectsTypeNamesMethodsArgsClass VariablesPowerValueconsumption,pv,carCharger,heatPump,power,effectivePower,heatPumpPower,power,effectivePower,heatPumpPower,heatPumpThermPower,batteryPower--value, unitEnergyValueenergy,returnEnergy,effectiveEnergy,apparentEnergy,dayEnergy,dayReturnEnergy,carChargeCurrentChargeEnergy,carChargeEnergy,heatPumpEnergy,heatPumpThermEnergy--value, unitVoltageValue--value, unitPFValue--value, unitCurrentValue--value, unitTimeValue--value, unitPercentValuesoc--value, unitTempValuebufferHot,bufferCold,warmWater--value, unitExamplefromsmartfoximportSmartfox# Initialize a new smartfox connectionsmartfox=Smartfox("my-smartfox.local")# update the valuessmartfox.getValues()# get powerprint(smartfox.power)# returns stringprint(smartfox.power.value)# returns power as floatprint(smartfox.power.unit)# returns the unit of powerResult:>>powervalue:972.0W>>972.0>>WObjectsTypenamesMethodsArgsClass VariablesPhasephase1,phase2,phase3--voltage: VoltageValue,current: CurrentValue,power: PowerValue,powerFactor: PFValueRelayrelai1,relai2,relai3,relai4turnOn(),turnOff()-id,remainingTime: TimeValue,overallTime: TimeValue,smartfox: SmartfoxAnalogOutanalogset(value),setAuto(),off()-percentage: PercentValue,power: PowervalueExamplefromsmartfoximportSmartfox# Initialize a new smartfox connectionsmartfox=Smartfox("my-smartfox.local")print(smartfox.phase1.power)# returns phase1 powerprint(smartfox.relai4.turnOn())# turns relai4 on
Package: smartframes
Enhanced Python Dataframes for Spark/PySparkMotivationSpark DataFrames provide a nice interface to datasets that have a schema.  Getting data from your code into a DataFrame in Python means creating a Row() object with field names and respective values.  Given that you already have a schema with data types per field, it would be nice to easily take an object that represents the row and create the Row() object automatically.Smartframes allow you to define a class by just creating the schema that represents the fields and datatypes.  You can then create an object and set the values like any other Python class.  When you are ready to store that in a DataFrame, just call the createRow() method.The createRow() method will coerce any values into the correct data types, for example, if a field is defined as an IntegerType and the value set in the class is a String, it will attempt to convert the string to an Integer before creating the Row().This was written when creating Row()’s with Long datatypes and finding that Spark did not handle converting integers as longs when passing values to the JVM.  I needed a consistent manner to create Row() for all of my DataFrames.Installationpip install smartframesExampleSimply create a class that extends from SmartFrame and define the schema as a sorted list of StructFields.  It’s important that the schema is sorted as Spark gets upset if the Row() object is created with fields that are in a different order. Strange, but true.The skipSelectedFields is a list of field names that you normally would not select when creating a select() statement.classSimpleTable(SmartFrames):schema=StructType(sorted([StructField("pk_id",IntegerType()),StructField("first_name",StringType()),],key=lambdax:x.name))skipSelectedFields=[]...s1=SimpleTable()s1.pk_id=1s1.first_name='Don's2=SimpleTable()s2.pk_id=2s2.first_name='Dan'df=self.sqlCtx.createDataFrame(self.sc.parallelize([s1.createRow(),s2.createRow()]),s1.schema)ReleasesVersionDateNotes1.1.010/6/2015Performance improvements1.0.110/3/2015First release of smartframes
Package: smartgarden-x
SmartGarden-XThis package contains functions to monitor and maintain the conditions of a greenhouse gaFree software: MIT licenseDocumentation:https://smartgarden-x.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2020-10-27)First release on PyPI.
Package: smart-getenv
Since environment variables in os.environ are strings, it often appears inconvenient to store and retrieve other
data types such as bool or list. The package provides a single function that wraps os.getenv and allows
you to specify the desired variable type.Tested and supported types: str, int, float, list. tuple, dict.PyPi pageUsageInstall:$pipinstallsmart-getenvPrepare the variables:$exportBOOLEAN=true$exportLIST=a,b,c$exportTRICKY_LIST=d:e:f$exportDICT="{'foo':'bar'}"Get them:>>>fromsmart_getenvimportgetenv>>>>>>getenv('BOOLEAN',type=str)'true'>>>getenv('BOOLEAN',type=bool)True>>>getenv('LIST',type=list)['a','b','c']>>>getenv('LIST',type=tuple)('a','b','c')>>>getenv('TRICKY_LIST',type=list,separator=':')['d','e','f']>>>getenv('DICT',type=dict){'foo':'bar'}>>>getenv('LOST',default='default value anyone?')'default value anyone?'Run tests:$pythontests.py
Package: smart-hashmap
Wrapper for key-value based storage systems. Provides convenient way to organize data for quick searching.Installation1. Using pip:pipinstallsmart_hashmap2. Building from source:makeinstallHow to useFirstly you need to register methods:fromsmart_hashmap.cacheimportCacheCache.register_get_method(YOUR_GET_METHOD)Cache.register_set_method(YOUR_SET_METHOD)Cache.register_update_method(YOUR_UPDATE_METHOD)Cache.register_delete_method(YOUR_DELETE_METHOD)NOTE: Methods signature MUST match their placeholders signatureGET_METHOD=lambdacache,name,key,default=None:None# noqa: E731SET_METHOD=lambdacache,name,key,value:None# noqa: E731UPDATE_METHOD=lambdacache,name,key,value:None# noqa: E731DELETE_METHOD=lambdacache,name,key:None# noqa: E731"""METHODS placeholders. You should register yours."""Now you are all set up to useCache.searchHow it worksIn default setupCachecreates and maintains indexes based onCache.primary_key.So every object save in cache MUST have such key. (By default its_id)On every called action for exampleCache.updateCache looks in pipelineCache.PIPELINE.updatefor middlewares to run before and after main function execution.
For example in current situation after.updatefunction execution indexing middleware will
check if documents fields matching its keys were changed.
If so it will get index data, look for old values invalue.__shadow_copy__remove such index data and create new record with updated values.Adding middlewaresAdding new action is easy:fromsmart_hashmap.cacheimportCache,PipelineContext@Cache.PIPELINE.set.before()defadd_my_field(ctx:PipelineContext):key,value=ctx.argsvalue["my_field"]=1Now every cache value saved withCache.setwill be added'my_field'before main function execution.Custom IndexesTo create custom index you need to simply create new subclass of Index.fromsmart_hashmap.indeximportIndexclassIndexByModel(Index):keys=["_id","model"]NOTE: After that all values MUST have fields_idANDmodelNOTE: Primary key MUST ALWAYS be inkeysSearchingAfter all required indexes created - searching will be as quick as possible.fromsmart_hashmap.cacheimportCachefromsmart_hashmap.indeximportIndexclassIndexByModel(Index):keys=["_id","model"]cache=Cache()cache.search("my_cache",{"model":"1.0"})When.searchis called it will firstly check for indexes containing search fields.
After finding best index, it will get index data and find matching primary keys.
Now searching is as easy as getting values by their key.
Package: smart-hass
# smart_hass[![image](https://img.shields.io/pypi/v/smart_hass.svg)](https://pypi.python.org/pypi/smart_hass)[![image](https://img.shields.io/travis/jlmcgehee21/smart_hass.svg)](https://travis-ci.org/jlmcgehee21/smart_hass)Tools I find useful in my interactions with Home Assistant.Free software: GNU General Public License v3## Installation` $ pip install smart_hass `## UsageThis is a command line tool meant to work in a Unix shell.If you don’t know what to do, try:` $ smass--help`### Binary Bayes introspection
Determine which combinations of observations can cause your Bayesian Binary
sensor to be True/False.Latest functionality can be found via:` $ smass bayes--help`Pipe valid YAML from a Bayesian Binary config:` $ pbpaste | smass bayes `Identify and analyze Bayesian Binary sensors in a config file:` $ smass bayes--conf~/hass_config/binary_sensors.yaml `List all cases where a Bayesian Binary sensor evaluates to True with an
observation ofonforbinary_sensor.bedroom_motion` $ pbpaste | smass bayes-tebinary_sensor.bedroom_modtion-tson | json_pp `### MultisensorGenerate an Arduino sketch for an
[ESP-MQTT-JSON-Multisensor](https://github.com/bruhautomation/ESP-MQTT-JSON-Multisensor)
via:` $ smass multisensor--namekitchen `Yields:./multisensor/multisensor.ino, which can then be flashed to a Node MCU
via the Arduino IDE.In order for this to function properly, you should set the following environment
variables to use for your multisensor.
* WIFI_SSID
* WIFI_PWD
* MQTT_SERVER
* MQTT_USER
* MQTT_PWD
* MQTT_PORT
* OTA_PWD#### Wiring Diagram for Multi Sensor
![MultiSensor Wiring Diagram](assets/wiring_diagram_v2.png)## CreditsThis package was created with
[Cookiecutter](https://github.com/audreyr/cookiecutter) and the
[audreyr/cookiecutter-pypackage](https://github.com/audreyr/cookiecutter-pypackage)
project template.The multisensor is derived from
[ESP-MQTT-JSON-Multisensor](https://github.com/bruhautomation/ESP-MQTT-JSON-Multisensor).History0.1.0 (2017-10-12)First release on PyPI.
Package: smarthomeThailand
Link:https://www.youtube.com/watch?v=JsfIcV_4eikPyPi:https://pypi.org/project/smarthomeThailand/สวัสดีครับ Package นี้คือ Python package ที่แสดงข้อมูลเกี่ยวกับ Smart
Home Thailand มีฟังชั่นแสดงข้อมูล DIY, Blog อธิบาย และ Youtube channelวิธีติดตั้งเปิด CMD / TerminalpipinstallsmarthomeThailandวิธีใช้งานแพ็คเพจนี้เปิด IDLE ขึ้นมาแล้วพิมพ์…fromsmarthomeThailandimportSmartHomesmarthome=SmartHome()#ประกาศชื่อ Classsmarthome.show_name()#Show ชื่อsmarthome.show_youtube()#Show link Yuotubesmarthome.about()#Show Aboutsmarthome.show_art()# Show ภาพ ASCIIพัฒนาโดย: niponle FB:https://www.facebook.com/nipon.leekreingkraiYouTube:https://www.facebook.com/nipon.leekreingkrai
Package: smart-home-tng
Smart Home - Die Nächste GenerationLebe lang und in FriedenHier kommst sie - die nächste Entwicklungstufe der
Hausautomation. Sie basiert auf Home Assistent, dem zurecht beliebten zentralen
Steuerungssystem in einem Smart Home oder Smart House.Wie Home Assistent ist
sie ebenfalls als kostenlose und quelloffene Software konzipiert, die in den
wesentlichen Teilen in Python entwickelt wird und deren Hauptaugenmerk auf
lokaler Steuerung und Privatspäre liegt. Da ich mich allerdings in der c /
c++ / c# - Entwicklung mehr zuhause fühle, werden viele unterstützende
Bibliotheken eher in c++ entwickelt werden. Aus dem gleichen Grund werde ich auch
das eher auf einer "Modulhierarchie" bestehende Grundgerüst auf eine Klassenhierarchie
umstellen (so gut es Python eben zulässt).Dadurch sollte jedem, der sich mit Klassenhierarchien etwas auskennt aber auch
"Einsteigern", relativ schnell klar werden, welche Klasse welche Aufgaben übernimmt,
welche Teile der "Schnittstelle"  von allen benutzt werden dürfen und welche Teile
nur innerhab der Klasse für die Implementierung der Funktionalität vorhanden sind.InstallationFür die Verwendung/Installation vonSmart Home - Die Nächste Generationwird
Python 3.11.4 oder höher benötigt. Die Installation sollte in ein neues virtuelles
Python-Environment erfolgen. Nach dem Download und der Installation der benötigten
Bibliotheken kann es mitsmart-home-tnggestartet werden. Mitsmart-home-tng --helperhälst du eine Übersicht der verfügbaren Parameter/Optionen der Kommandozeile.
Der Ordner mit der Konfiguration fürSmart Home - Die Nächste Generationbefindet
sich unter~/.config/shc, wenn er nicht über die Kommandozeile festgelegt wird.DanksagungenMein Dank gilt allen, die mein Vorhaben unterstützt haben oder noch unterstützen
werden und die aktiv an der Realisierung mitwirken oder durch neue Sichtweisen
und Vorschläge für Verbesserungen dazu beitragen oder bereits beigetragen haben,
meine anfängliche Idee weiter zu verfeinern und abzurunden. Ebenfalls bedanken
möchte ich mich bei allen, deren Vorarbeit ich für die Realisierung dieses
Vorhabens verwenden darf.Besonders und ausdrücklich möchte ich allerdings meiner Freundin für Ihr
Verständnis und Ihre Unterstützung danken, ohne die meine Vision nie
Wirklichkeit wird (weil es oft darauf hinaus läuft, das ich bis spät in der
Nacht und am Wochenende an der Umsetzung und Verfeinerung meiner Idee sitze
und deshalb für gemeinsame Aktivitäten weniger Zeit übrig bleibt, als sie
verdient hätte).LizenzVeröffentlicht zur freien Verwendung/Modifizierung gemäß den Bedingungen derAllgemeinen Öffentlichen GNU-Lizenz v3.Aber "Liebe Liebenden" (wie es Brisko Schneider gesagt hätte), immer daran denken:Dies ist freie Software, ohne irgendeine Garantie auf Funktionalität oder
Verwendbarkeit für einen bestimmten Zweck.
Package: smarthouse
SmartHouseSmartHouse - библиотека для управления умным домом. На текущий момент реализована интеграция с экосистемойЯндекса.Какие задачи решаетКаркас для написания сценариевИспользование устройств как объектов или напрямую через клиентаДоведение устройств до конечного состояния (проверяет с сервера)Введение устройств в карантин, если они не отвечают или как-то еще сломаны, таким образом, чтобы сценарии продолжали работать корректноПри быстром выводе из карантина (происходит опрос устройства) после последней команды доведет устройство до состояния с последней командыХранение последних данных с устройствСистема lock'ов устройствОбнаружение человеческого вмешательства и установка lock'ов, от сценариев на настроенное времяЛегкое хранилище данных в файлеИнтеграция с web для управленияИнтеграция с tg ботом для сообщений об ошибках и управлениемQuick startSmartHouse can be installed using pip:pipinstallsmarthouseUsage example:importasyncioimportdatetimeimporttimefromaiohttpimportwebfromsmarthouse.action_decoratorsimportlooper,schedulerfromsmarthouse.appimportAppfromsmarthouse.yandex_client.deviceimportHSVLamp,LuxSensor,run_asyncfromsmarthouse.storageimportStoragefromsmarthouse.telegram_clientimportTGClientdefcalc_sunset():returndatetime.timedelta(hours=18)@scheduler((calc_sunset,))asyncdefpause_reset():storage=Storage()storage.put("pause",False)@looper(3,(datetime.timedelta(hours=10),calc_sunset))asyncdefadaptive_lights_actions(lux_sensor,lamp_g_1,lamp_g_2):storage=Storage()ifstorage.get("pause"):returnstate_lux=awaitlux_sensor.illumination()iflux_sensor.in_quarantine()andlux_sensor.quarantine().timestamp+5*60>time.time():state_lux=awaitlux_sensor.illumination(proceeded_last=True)needed_b=1-min(state_lux.result,200)/200awaitrun_async([lamp.on_temp(4500,needed_b)forlampin(lamp_g_1,lamp_g_2)])asyncdeftg_pause_handler(tg_client:TGClient,update):storage=Storage()storage.put("pause",True)awaittg_client.write_tg("done")routes=web.RouteTableDef()asyncdefmain():app=App(storage_name="./storage/storage.yaml",yandex_token="YA Token",telegram_token="TG Token",telegram_chat_id="Tg chat id",tg_commands=[("pause","Pause"),],tg_handlers=[(r"/pause",tg_pause_handler),],prod=True,aiohttp_routes=routes,)awaitapp.prepare()lux_sensor=LuxSensor("3d580790-00dc-4ce3-9892-a4cdbb346269","Датчик освещенности")lamp_g_1=HSVLamp("4b950171-0df0-4b23-aaeb-0f21c7393e73","Лампа гостиная 1")lamp_g_2=HSVLamp("ed7f9d93-c79e-44b9-985d-0f252a26c894","Лампа гостиная 2",human_time_func=lambda:time.time()+15*60)tasks=[adaptive_lights_actions(lux_sensor,lamp_g_1,lamp_g_2),pause_reset(),]app.add_tasks(tasks)awaitapp.run()if__name__=="__main__":asyncio.run(main())
Package: smarti
Smarti - Smart Dependency Injection for PythonJust add the@autowireddecorator to the class you want to autoload. To customize the loaded arguments (e.g., input specific enum value, with the argument namenumber) add it to the decorator like so@autowire(number=Enum.one).Furthermore, you can override/pass down arguments recursively usingname_kwargs. This will use the given parameters to initializename.All of the described ways to modify the used arguments are also applicable when initializing the class. This means that you could call an autoloaded class usingA(a=4, b_kwargs={'x' = 3})to modify local usage. These override the corresponding defaults of the decorator ofclass A.When using singletons, different parameters will yield different instances, but the same will yield the same.Everything is thread-safe when theClassLoaderFlags.ALL_DEPENDENCIES_AUTOWIREDis specified. Additionally, this forces you to decorate the whole dependency tree. When using this flag, non-autowired classes raise aRuntimeError. To avoid such errors, useClassLoaderFlags.IGNORE_POSSIBLE_THREAD_ERRORS, but it is not recommended.Installs via pip:pip install smarti
Package: smartie
SMARTieNote:This library is in beta.Please, create a ticket if you run into an issue.This is a pure-python library for getting basic disk information such as model,
serial number, disk health, temperature, etc...It provides a high-level abstraction to enumerate devices and retrieve basic
details:fromsmartie.deviceimportget_all_devicesfordeviceinget_all_devices():print(device.path)print(device.model_number)print(device.temperature)... as well as a lower-level interface for sending SCSI messages:fromsmartieimportstructures,constantsfromsmartie.deviceimportDevicedevice=Device('\\.\PhysicalDrive0')# or /dev/sda on Linuxwithdevice.ioasdio:# Send an SCSI INQUIRY command, and get back both the result data and the# sense response.result,sense=dio.inquiry()# ... or send a raw INQUIRY yourself:inquiry=structures.InquiryResponse()inquiry_command=structures.InquiryCommand(operation_code=constants.OperationCode.INQUIRY,allocation_length=96)sense=dio.issue_command(constants.Direction.FROM,inquiry_command,inquiry)SupportOSSCSI/ATA SupportedNVME SupportedNotesLinuxYesIn-progressSG_IO v3 (Linux 2.6+)WindowsYesIn-progressOS XIn-progress*N/A*IDENTITY and SMART-related commands only.OS X explicitly denies access to SCSI/ATA pass-through,exceptfor IDENTITY
and some SMART-related commands, so this is all we can support. Work for OS X
is currently in-progress.InstallationSMARTie requires Python 3.8 or greater (due to the use of@cached_property).pip install smartieWhy?This library is extracted fromPortableHardwareMonitormonitor, where I don't want to force users to install something like
smartmontools just to support showing disk temperature!This library ended up being great for poking, prodding, testing and debugging
SCSI/ATA with quick iteration, so hopefully it'll be useful to others.ContributingCompatibility contributions are welcome and greatly encouraged, especially
considering the sheer number of variations of devices out there.Changes that severely impact readability in exchange for a bit of performance
may be rejected or rewritten. I'm hopeful this library will develop as a
learning resource, and readability is a priority.FAQThis library isn't returning any of my drives?The APIs this library uses to communicate with devices typically require
root (on Linux) or administrator (on Windows) access to work.My drive doesn't work with this library?Support for drives that don't follow modern standards is still a work in
progress. Open anissue.Library Y does X, can I copy that code?It depends.This library is available under the MIT license and is a fun side
project. I want anyone to be able to use it. Many existing projects are GPL or
LGPL, so you need to avoid them when contributing to this project. Instead:Use the specifications or vendor documentation whenever possible.Use the SG_IO documentation by Danny (https://sg.danny.cz/sg/).Use theconversationsin mailing lists and bug trackers, while avoiding the
code.