Skip to content

Instantly share code, notes, and snippets.

@SchofieChen
SchofieChen / Client
Last active August 20, 2018 14:01
Mqtt Subscribe
import time, signal
import paho.mqtt.client as mqtt
client = None
mqtt_looping = False
class mqtt_client_program():
def __ini__(self,):
pass
def on_connect(self,mq, userdata, rc, _):
@endolith
endolith / example.txt
Last active November 3, 2023 18:20
Parseval's theorem Python NumPy example
In [1]: n = 10000000
In [2]: x = rand(n)
In [3]: X = fft(x)
In [4]: rms_flat(x)
Out[4]: 0.57731639149367697
In [5]: rms_flat(ifft(X))