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
# -*- coding: utf-8 -*- | |
import os | |
import numpy as np | |
import subprocess as sp | |
import re | |
def polar(afile, re, *args,**kwargs): | |
"""calculate airfoil polar and load results |
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
start_x=1 | |
dtparam=spi=on | |
dtparam=i2c_arm=on | |
enable_uart=1 | |
dtoverlay=w1-gpio | |
# turn off rpi rainbow | |
disable_splash=1 | |
# for utronics 7" touchscreen |
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
#!/bin/bash | |
# usage: export_to_csv.sh <database.sqlite> | |
sqlite3 $1 "SELECT tbl_name FROM sqlite_master WHERE type='table' and tbl_name not like 'sqlite_%';" | while read table; do | |
echo $table | |
sqlite3 $1 <<! | |
.headers on |
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
{ | |
"anytime" : [ | |
"Hey there sexy!" | |
], | |
"morning" : [ | |
"Good morning, sunshine!", | |
"Who needs coffee when you have your smile?", | |
"Go get 'em, Tiger!" | |
], | |
"afternoon" : [ |
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 <dht.h> | |
#include <SPI.h> | |
#include <RH_RF95.h> | |
// Singleton instance of the radio driver | |
RH_RF95 rf95; | |
float frequency = 915.0; //frequency settings | |
dht DHT; | |
#define DHT11_PIN A0 | |
float temperature,humidity,tem,hum; |
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
/* | |
Private LoRa protocol example : | |
Support Devices: LG01 Single Channel LoRa Gateway | |
This sketch is running in LG01. LG01 with firmware version v4.3.3 or above | |
Example sketch shows how to get sensor data from remote LoRa Sensor and Store the data into LG01. | |
The LG01 has daemon script to check the data periodically and update the data to IoT server. | |
The LoRa Protocol use here is private LoRa protocol which base on RadioHead Library. | |
Created 26 March 2018 | |
by Dragino Tech <support@dragino.com> |
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
#!/bin/sh | |
#Check If we have set debug | |
DEBUG=`uci get iot-services.general.debug` | |
DEBUG=`echo $DEBUG| awk '{print int($0)}'` | |
UPDATE_INTERVAL=5 | |
old=`date +%s` |
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
using WaterLily | |
using StaticArrays | |
function block(L=2^5;Re=250,U=1,amp=0,ϵ=0.5,thk=2ϵ+√2) | |
# Set viscosity | |
ν=U*L/Re | |
# Create dynamic block geometry | |
function sdf(x,t) | |
# SDF defines form a paddle (a rectangle) |
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
/* | |
* 2020 Jon Robinson | |
* MIT License | |
* Arduino sketch which using envelope/peak detector circuit output signal to detect if music playing. | |
* Opens/ closes a relay accordingly - relay intended to switch amp on and off. | |
*/ | |
// Two analog pins connected to envelope detector circuits | |
// one for left channel, one for right channel |
NewerOlder