This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
# from threading import Event | |
# | |
import pyvisa | |
# | |
rm = pyvisa.ResourceManager() | |
resources = rm.list_resources() | |
print(f"Risorse disponibili: {resources}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@staticmethod | |
def get_dew_point(t_air_c, rel_humidity): | |
"""Compute the dew point in degrees Celsius | |
:param t_air_c: current ambient temperature in degrees Celsius | |
:type t_air_c: float | |
:param rel_humidity: relative humidity in % | |
:type rel_humidity: float | |
:return: the dew point in degrees Celsius | |
:rtype: float |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
import pathlib | |
import hassapi as hass | |
import yaml | |
from appdaemon.appdaemon import AppDaemon | |
SLEEP = "sleep" | |
AWAY = "away" | |
AT_HOME = "at_home" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from base_handler import * | |
class StateToAlarmHandler(BaseHandler): | |
def initialize(self): | |
self.log(f"StateToAlarmHandler Handler") | |
self.on_entering = { | |
AT_HOME: [], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Incrementa il contatore comandi e genera un "tempo di vita" casuale | |
* @return | |
*/ | |
float FingerState::updateCommandsCount() { | |
auto file = SPIFFS.open("/dd.json", "w"); | |
bool should_init = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zigbee2mqtt | 2021-12-17T22:28:22.196Z zigbee-herdsman:controller:log Device '0x00158d0007088bb0' joined | |
zigbee2mqtt | 2021-12-17T22:28:22.197Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,12,69,202,110,121,176,139,8,7,0,141,21,0,0] | |
zigbee2mqtt | 2021-12-17T22:28:22.197Z zigbee-herdsman:controller:log Device '0x00158d0007088bb0' accepted by handler | |
zigbee2mqtt | 2021-12-17T22:28:22.197Z zigbee-herdsman:controller:log Interview '0x00158d0007088bb0' start | |
zigbee2mqtt | Zigbee2MQTT:info 2021-12-17 23:28:22: Starting interview of '0x00158d0007088bb0' | |
zigbee2mqtt | Zigbee2MQTT:info 2021-12-17 23:28:22: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x00158d0007088bb0","ieee_address":"0x00158d0007088bb0","status":"started"},"type":"device_interview"}' | |
zigbee2mqtt | 2021-12-17T22:28:22.203Z zigbee-herdsman:controller:device:log Interview - start device '0x00158d0007088bb0' | |
zigbee2mqtt | 2021-12-17T22:28:22.204Z zigbee-herd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pickle | |
from abc import abstractmethod | |
import numpy as np | |
from matplotlib import pyplot as mp | |
from scipy.linalg import block_diag | |
from scipy.optimize import linprog | |
PRICE_BUY = 0.20 | |
PRICE_SELL = 0.07 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <speechapi_cxx.h> | |
#include <iostream> | |
#include <unistd.h> | |
int main() { | |
using namespace Microsoft::CognitiveServices::Speech; | |
using namespace Microsoft::CognitiveServices::Speech::Audio; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Prova { | |
public: | |
bool dataValid() { | |
return abs(this->data - INVALID_VALUE) > 1; | |
} | |
protected: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.16) | |
project(test_memcpy) | |
add_compile_options(-march=native) | |
set(CMAKE_CXX_STANDARD 14) | |
add_executable(test_memcpy main.cpp) | |
target_link_libraries(test_memcpy pthread) |
NewerOlder