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
let WebSocketClient = require('websocket').client; | |
let uuid = require('uuid'); | |
function runClient(clientIndex) { | |
const port = process.argv[2] || 9160; | |
const id = `${uuid.v4()}-${port}-${clientIndex.toString().padStart(3, '-')}`; | |
let timeoutId = null; | |
const client = new WebSocketClient(); |
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 <ESP8266WiFi.h> | |
#include "MQ135.h" | |
#include "DHTesp.h" | |
DHTesp dht; | |
MQ135 mq135_sensor = MQ135(A0); | |
float accumTemperature = 0.0; | |
float accumHumidity = 0.0; | |
float accumPPM = 0.0; |
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
open import Data.List | |
import Data.List.Any as LAny | |
open import Relation.Binary as B | |
open import Relation.Binary.PropositionalEquality | |
open import Data.Nat | |
_∈_ : ∀ {a} {A : Set a} → A → List A → Set a | |
a ∈ as = LAny.Any (a ≡_) as |
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
open import Data.Nat as Nat | |
module Irrelevance-Issue (someMax₁ : ℕ) where | |
open import Level using () renaming ( _⊔_ to _⊔ₗ_) | |
open import Function | |
open import Data.Fin as Fin renaming (_≟_ to _≟f_) | |
hiding (_<_; _≤_; _+_) | |
open import Data.Product as Product |
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
<!-- | |
MIT License | |
Copyright (c) 2019 Ed Nutting | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
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 os, sys | |
from enum import Enum | |
# Enumerables used to define machine-checkable values | |
# They also make the code more readable and flexible | |
# Stores possible inputs | |
class InputType(Enum): | |
QUIT = -1 # 'q' - Immediately quit the game | |
NONE = 0 # Blank input - indicates nothing |