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 zauberzeug/nicegui:2.13.0 | |
COPY main.py . |
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 uuid import uuid4 | |
from nicegui import ui | |
messages = [] | |
@ui.refreshable | |
def chat_messages(own_id): | |
for user_id, avatar, text in messages: | |
ui.chat_message(avatar=avatar, text=text, sent=user_id==own_id) |
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 linncer = Linccer({"api_key": "your_api_key", "server": "sandbox" }); | |
window.onload = function() { | |
if (!Linccer.autoLocate()) { | |
linccer.setEnvironmentCoordinates(longitude, latitude, accuracy); | |
} | |
linccer.on('received', function(data) { | |
// do somthing with the received data |