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 farmbot import Farmbot, FarmbotToken | |
import threading | |
import time | |
import wx | |
class MyHandler: | |
def on_connect(self, bot, mqtt_client): | |
bot.send_message("Hello, farmbot!") |
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
add_library('svg') | |
scl = 10 | |
margin = 5 | |
cols = 20 | |
rows = 35 | |
OUTPUT_SVG_FILE = './svg/golden-mess.svg' | |
def setup(): | |
size(500, 500) | |
background(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
console.log(Object.getOwnPropertyNames(myObject).filter(function (m) { | |
return typeof myObject[m] === 'function'; | |
})); |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
# install virtualenv | |
pip install virtualenv | |
# reach your project directory | |
cd my_project_folder | |
# create a local virtual environment (here : python3) | |
virtualenv -p /usr/bin/python3 py3env | |
# activate venv | |
source py3env/bin/activate | |
# install project package(s) | |
pip install package-name |