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 <iostream> | |
#include <opencv2/core/core.hpp> | |
#include <opencv2/features2d/features2d.hpp> | |
#include <opencv2/highgui/highgui.hpp> | |
#include <opencv2/imgproc/imgproc.hpp> | |
#include <opencv2/nonfree/features2d.hpp> | |
using namespace cv; | |
using namespace std; |
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 <LiquidCrystal.h> | |
// Todo lo que empieza con doble / es un comentario, no necesitás copiarlo. | |
// Inicializar la librería con los pines usados en el LCD: | |
// (RS, Enable, DB4, DB5, DB6, DB7) | |
LiquidCrystal lcd(7, 8, 9, 10, 11, 12); | |
void setup() | |
{ |
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
package main | |
import "fmt" | |
import "os" | |
func main() { | |
defer func() { | |
str := recover() | |
fmt.Println(str) | |
}() |
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
package main | |
import "fmt" | |
func first() { | |
fmt.Println("1st") | |
} | |
func second() { | |
fmt.Println("2nd") | |
} |
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
package main | |
import "fmt" | |
func main() { | |
f() | |
fmt.Println("Returned normally from f.") | |
} | |
func f() { |
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
api: | |
image: counter_app | |
container_name: 'counter' | |
ports: | |
- "3000:3000" | |
volumes: | |
- ./:/app | |
links: | |
- redis:counter_db | |
redis: |
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 node:0.12 | |
RUN npm install -g nodemon | |
ADD start.sh /bin/start | |
WORKDIR /app | |
EXPOSE 3000 |
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
var http = require('http'); | |
var redis = require('redis'); | |
var client = redis.createClient(6379, 'app_db'); | |
http.createServer(function (req, res) { | |
client.incr('counter', function (err, reply) { | |
console.log('Counter value', reply); | |
res.writeHead(200, {'Content-Type': 'application/json'}); | |
res.end(JSON.stringify({ counter: reply }) + "\n"); | |
}); |
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
#!/usr/bin/python | |
import requests | |
import json | |
import math | |
import sys | |
LIMIT = 12 | |
SITES = { |
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 <stdio.h> | |
#include <LiquidCrystal.h> | |
#include <DHT.h> | |
#define DHT_PIN 5 | |
#define DHT_TYPE DHT21 | |
#define LCD_LINE_LENGTH 17 | |
// Initialize library with the numbers of the interface pins: |