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
#ifndef TinyMutex_h | |
#define TinyMutex_h | |
#if defined(_WIN32) || defined(__WIN32__) | |
#define WIN32_LEAN_AND_MEAN | |
#include <windows.h> | |
#include <process.h> | |
#elif defined(__GNUC__) | |
#include <pthread.h> | |
#endif |
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 "strformat.h" | |
#include <iomanip> | |
#include <cassert> | |
strformat::strformat(const std::string &str) : _str(str), _level(1) | |
{ | |
} | |
strformat &strformat::arg(const std::string &str1) |
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 "QConsoleWidget.h" | |
#include <QMutex> | |
#include <QAction> | |
#define HTML_CONSOLE_MODE | |
#if QT_VERSION >= 0x050000 | |
static QtMessageHandler _old_handler = 0; | |
#else | |
static QtMsgHandler _old_handler = 0; |
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 requests | |
from bs4 import BeautifulSoup | |
import pygame | |
from pygame.locals import * | |
import time | |
def readHtml(): | |
payload = {'origine': 'Massy Palaiseau', 'origineCode': 'MPU', 'origineData' : '', 'destination' : '', 'destinationCode' : '', 'destinationData' : ''} | |
r = requests.post('http://www.transilien.mobi/train/result', data=payload) | |
print "STATUS CODE = " + str(r.status_code) |
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 QtQuick 2.0 | |
import Qt.labs.folderlistmodel 2.0 | |
/** | |
--- QML Ken Burns slideshow --- | |
Work well on Raspberry Pi (resize image 1920*1600 max before ...) | |
call : | |
qmlscene slideshow.qml path="/home/img" | |
qmlscene.exe slideshow.qml path="/C:/test/img" | |
**/ | |
Rectangle { |
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 <FastLED.h> | |
#if defined(FASTLED_VERSION) && (FASTLED_VERSION < 3001000) | |
#warning "Requires FastLED 3.1 or later; check github for latest code." | |
#endif | |
#define NUM_LEDS 150 | |
#define DATA_PIN 3 | |
#define BRIGHTNESS 150 | |
#define FRAMES_PER_SECOND 60 |
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 <FastLED.h> | |
#if defined(FASTLED_VERSION) && (FASTLED_VERSION < 3001000) | |
#warning "Requires FastLED 3.1 or later; check github for latest code." | |
#endif | |
#define NUM_LEDS 130 | |
#define DATA_PIN 3 | |
#define BRIGHTNESS 200 | |
#define FRAMES_PER_SECOND 60 |
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
# Change with your IP !!! | |
sensor: | |
- platform: rest | |
resource: http://192.168.1.33/cgi-bin/sendmsg.lua?cmd=EXT+ADRD+2066+1 | |
name: poele_nb_allumage | |
value_template: '{{ value_json.DATA.ADDR_2066 }}' | |
scan_interval: 3600 | |
- platform: rest |