This file contains hidden or 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 <Wire.h> | |
#include <Adafruit_BME680.h> | |
#include <Adafruit_SGP30.h> | |
#include <SPI.h> | |
#include <SD.h> | |
const int chipSelect = 10; | |
const int uvPin = A2; | |
const float coeffUV = 5.0 / 1023.0; | |
const unsigned long interval = 15000; |
This file contains hidden or 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 PIL import Image, ImageDraw | |
import qrcode | |
def create_qr_with_black_center(data): | |
"""Crée un QR code avec centre noir (ou le plus proche), en image noir et blanc""" | |
# Paramètres | |
box_size = 10 | |
border = 2 |
This file contains hidden or 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 PIL import Image, ImageDraw | |
import qrcode | |
def create_qr_with_black_center(data): | |
"""Crée un QR code avec centre noir (ou le plus proche), en image noir et blanc""" | |
# Paramètres | |
box_size = 20 | |
border = 2 |
This file contains hidden or 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
//An extract of address points from the LINZ bulk extract: http://www.linz.govt.nz/survey-titles/landonline-data/landonline-bde | |
//Should be this data set: http://data.linz.govt.nz/#/layer/779-nz-street-address-electoral/ | |
var addressPoints = [ | |
[48.66068,6.18521,"1.02"], | |
[48.68752,7.19642,"0.22"], | |
[49.16669,5.85081,"0.26"], | |
[47.40519,0.60228,"0.23"], | |
[43.56975,5.014,"0.68"], | |
[48.88683,2.33307,"4.36"], | |
[43.59839,5.01053,"0.41"], |
This file contains hidden or 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 cv2 | |
from pyimagesearch import imutils | |
import numpy as np | |
import argparse | |
import cv2 | |
class VideoCamera(object): | |
def __init__(self): |
This file contains hidden or 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 argparse | |
import os | |
def folder_calc(folder_raw, folder_processed): | |
for i in os.listdir(folder_raw): | |
if i.endswith('.csv') and ('processed_' + i) in os.listdir(folder_processed): | |
print("--------- SCORE for %s, against image processing %s is %s" % (i, 'processed_'+i, | |
score_calculation(os.path.join( | |
folder_raw, i), os.path.join( |
This file contains hidden or 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
# Heavily based on the XML-RPC implementation in python. | |
# Based on the json-rpc specs: http://json-rpc.org/wiki/specification | |
# The main deviation is on the error treatment. The official spec | |
# would set the 'error' attribute to a string. This implementation | |
# sets it to a dictionary with keys: message/traceback/type | |
import cjson | |
import SocketServer | |
import sys | |
import traceback |
This file contains hidden or 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
char val; // variable to receive data from the serial port | |
void setup() { | |
Serial.begin(9600); // start serial communication at 9600bps | |
} | |
void loop() { |
This file contains hidden or 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
# simple inquiry example | |
# votre module bluetooth doit etre connecte au prealable | |
import bluetooth | |
import sys | |
nearby_devices = bluetooth.discover_devices(lookup_names=True) | |
print("found %d devices" % len(nearby_devices)) | |
for addr, name in nearby_devices: | |
print(" %s - %s" % (addr, name)) |
This file contains hidden or 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
char NOMBRE[10] = "SENS01"; // le nom du module | |
char BPS = '4'; // 1=1200 , 2=2400, 3=4800, 4=9600, 5=19200, 6=38400, 7=57600, 8=115200 | |
char PASS[10] = "1234"; // le mot de passe | |
void setup() | |
{ | |
Serial.begin(9600); | |
pinMode(13,OUTPUT); | |
digitalWrite(13,HIGH); | |
delay(10000); |
NewerOlder