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
# coding: utf-8 | |
__author__ = 'Mário Antunes' | |
__version__ = '1.0' | |
__email__ = '[email protected]' | |
__status__ = 'Production' | |
__license__ = 'MIT' | |
import sys |
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
import pygame | |
import random | |
WIDTH, HEIGHT = 80, 40 | |
SCALE = 10 | |
display = pygame.display.set_mode((SCALE * WIDTH, SCALE * HEIGHT)) | |
clock = pygame.time.Clock() | |
snake_body = [(40, 20), (39, 20), (38, 20)] |
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
import socket | |
import struct | |
import random | |
import selectors | |
MY_ID = random.randint(0, 100) | |
MC_GROUP = "224.0.0.69" | |
MC_PORT = 10000 |
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
69d26f23df3fcd20e5c49f0922c5eaf1 test_basic.py | |
3ded307291ecde060cb9866fd8ead4e2 test_broker.py | |
f9bea53cee19cc86e5ca5d1980bd9c4e test_subtopic.py | |
5920976c1a94e9b5cdbfb767865851b9 test_wire.py |
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
d41d8cd98f00b204e9800998ecf8427e __init__.py | |
f1d14f77e933b74e6d11eb00ab4ab9a9 test_basic.py | |
5e978cf20e8018ea68adf3b063f8e45a test_dynamic.py | |
e76de97998d3f44c189b18e215ef292e test_finger_table.py | |
113413113d7776722592ae6f471825bf test_utils.py |
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
d41d8cd98f00b204e9800998ecf8427e __init__.py | |
c4cf028e242ddcd5b3736bb12beb1c8b test_basic.py | |
55a5a817db13595189232df95ff417f8 test_protocol.py | |
fdf7a2e47d8367a373f8e607110ed007 test_server.py |
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
import paho.mqtt.client as mqtt | |
import base64 | |
import json | |
server = "eu.thethings.network" | |
up_topic = '+/devices/+/up' | |
user = "my_user" #Application ID | |
password = "ttn-account-v2.verycrazystring" #Application Access Key | |
def on_message(mqttc, obj, msg): |
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
--- a/homeassistant/helpers/translation.py | |
+++ b/homeassistant/helpers/translation.py | |
@@ -4,7 +4,7 @@ from os import path | |
from typing import Any, Dict, Iterable | |
from homeassistant import config_entries | |
-from homeassistant.loader import get_component, bind_hass | |
+from homeassistant.loader import get_component, get_platform, bind_hass | |
from homeassistant.util.json import load_json | |
from .typing import HomeAssistantType |
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
#!/usr/bin/env bash | |
# Based on https://blog.scottlowe.org/2016/12/21/opening-webloc-files-ubuntu/ | |
if ! [ $(command -v xmllint) ]; then | |
echo "xmllint not installed" | |
exit | |
fi | |
if ! [ $(command -v plistutil) ]; then | |
echo "plistutil not installed" |
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
#include <Arduino.h> | |
#define LCD | |
#define ONEWIRE_PIN 2 | |
#define PUMP_PIN 3 | |
#ifdef CONSOLE | |
#include <Console.h> | |
#endif | |
#ifdef LCD |
NewerOlder