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
""" | |
Support for LG Smartthinq device. | |
This is made for korean only. | |
If you want to apply other county devices, you should change the code little bit. | |
""" | |
import logging | |
import wideq | |
import voluptuous as vol |
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
from datetime import datetime, timedelta | |
import json | |
import time | |
import ephem | |
from flask import Flask | |
import requests | |
from werkzeug.contrib.fixers import ProxyFix | |
from constants import MAIN_LIGHTS_GROUP_ID |
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
from functools import partial | |
import json | |
import multiprocessing | |
import requests | |
from constants import (ALL_LIGHTS_GROUP_ID, GROUP_STATE_URL, LIGHT_IDS, | |
LIGHT_URL, LIGHT_STATE_URL) |
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
# 1) 2 blank spaces between a function definition and end. i.e. | |
import foo | |
def diinosaur(): | |
pass | |
def something_else(): | |
pass |
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
from __future__ import with_statement | |
from fabric.api import * | |
env.roledefs = { | |
'production': ['[email protected]'], | |
'localhost': ['user@localhost'], | |
} | |
REMOTE_APP_DIR = "/path/to/remote/app" |