Skip to content

Instantly share code, notes, and snippets.

View LuisFDuarte's full-sized avatar

Luis Felipe Duarte Herrera LuisFDuarte

View GitHub Profile
def separar(df,nvel,ndir):
print(df.columns)
limite=df[[nvel]].max()/3
print(limite.values)
limite = limite.values[0]
filtro = df[nvel] <= limite
df1 = df.loc[filtro]
filtro = df[ndir] <= 180
df1 = df1.loc[filtro]
#!/bin/bash
# GUI-related packages
pkgs="
"
# Edu-related packages
pkgs="$pkgs
idle python3-pygame python-pygame
// This #include statement was automatically added by the Spark IDE.
#include "HttpClient/HttpClient.h"
// This #include statement was automatically added by the Spark IDE.
#include "OneWire/OneWire.h"
// This #include statement was automatically added by the Spark IDE.
#include "spark-dallas-temperature/spark-dallas-temperature.h"
#define ONE_WIRE_BUS D2
/ This #include statement was automatically added by the Spark IDE.
#include "LedControl-MAX7219-MAX7221/LedControl-MAX7219-MAX7221.h"
// This #include statement was automatically added by the Spark IDE.
#include "HttpClient/HttpClient.h"
#define VARIABLE_ID "5488b2d576254265c948eb7a" //Change here your variable ID and token
#define TOKEN "pSZJt9W7v5W3fpUsRYNKiDMgJ770NK"
#include "LedControl-MAX7219-MAX7221/LedControl-MAX7219-MAX7221.h"
#include "HttpClient/HttpClient.h"
HttpClient http;
#define VARIABLE_ID "544e4as8f7625426e332b1e8e"
#define TOKEN "pSZJt9W7vdfgW3fpUsRYNKiDMgJ770NK"
int presence = 0;
LedControl *led;// LedControl object
// This #include statement was automatically added by the Spark IDE.
#include "HttpClient/HttpClient.h"
HttpClient http;
#define VARIABLE_ID "544e4sda8f7625426e332b1e8e"//REPLACE HERE WITH YOUR OWN VARIABLE'S ID
#define TOKEN "40RwMVjyvD9H3HOu7p191MsdoqSHg4"//REPLACE HERE WITH YOUR OWN TOKEN
int people = 0;
int tiempo=0;
int presence=0;
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli 'node-red-contrib-openzwave' ]
2 info using npm@1.4.23
3 info using node@v0.10.31
4 warn package.json wifi-util@0.1.0 No repository field.
5 verbose readDependencies using package.json deps
6 verbose cache add [ 'node-red-contrib-openzwave', null ]
[{"id":"9bf9ca58.640638","type":"rpi-gpio in","name":"","intype":"tri","pin":"7","x":101.66668701171875,"y":433.5555419921875,"z":"c3aed0d3.3ce58","wires":[["5e029550.a1fd6c","7d6c3fc1.8293c"]]},{"id":"5e029550.a1fd6c","type":"function","name":"rising edge","func":"// initialise the counter to 0 if it doesn't exist already\ncontext.peoplecount = context.peoplecount || 0; \nif(msg.payload==1){\n\tcontext.peoplecount += 1;\n// make it part of the outgoing msg object\n}\nmsg.peoplecount = context.peoplecount;\n\nreturn msg","outputs":1,"x":303.25,"y":434,"z":"c3aed0d3.3ce58","wires":[["583faff4.a7c05","e366cd03.1c993"]]},{"id":"583faff4.a7c05","type":"debug","name":"People Count","active":true,"console":"true","complete":"true","x":487.25,"y":339.75,"z":"c3aed0d3.3ce58","wires":[]},{"id":"80f1ec3.f7f0e1","type":"debug","name":"contador","active":true,"console":"true","complete":"false","x":682,"y":344,"z":"c3aed0d3.3ce58","wires":[]},{"id":"5d876941.a27898","type":"ubidots","name":"ubidots","auth_token":"40Rw
// This #include statement was automatically added by the Spark IDE.
#include "HttpClient/HttpClient.h"
HttpClient http;
#define VARIABLE_ID "544e4a8f7625426e332b1e8e"
#define TOKEN "40RwMVjyvD9H360HOu7p191MoqSHg4"
int people = 0;
int tiempo=0;
int presence=0;
// This #include statement was automatically added by the Spark IDE.
#include "Adafruit_DHT/Adafruit_DHT.h"
// This #include statement was automatically added by the Spark IDE.
#include "HttpClient/HttpClient.h"
HttpClient http;
#define VARIABLE_ID "53f6caea76254277ef8837cd"
#define VARIABLE_ID2 "53f63fa576254235bec59148"
#define TOKEN "cfaI5R1bcr7wlwf58hAnNZNNvfSoUk"
int lightLevel = 0;