$ docker run -it ubuntu:20.04
$ su -
$ apt update
$ apt upgrade
$ apt install git
$ apt install wget
from m5stack import lcd | |
from m5ui import * | |
import _thread | |
from machine import I2C, Pin | |
from mpu6050 import MPU6050 | |
import time | |
i2c = I2C(sda = 21, scl = 22) | |
sensor = MPU6050(i2c) |
Python 3.8.5 (default, Jul 28 2020, 12:59:40) | |
[GCC 9.3.0] on linux | |
Type "help", "copyright", "credits" or "license" for more information. | |
elapsed_time:0.008502960205078125[sec] |
Python 3.8.2 (heads/rel2.1:da378ef, Jan 12 2021, 15:46:12) | |
[Pyston 2.1.0, GCC 9.3.0] on linux | |
Type "help", "copyright", "credits" or "license" for more information. | |
elapsed_time:0.011014699935913086[sec] |
#-*- using:utf-8 -*- | |
import time | |
if __name__ == '__main__': | |
start = time.time() | |
for i in range(0,100): | |
print "a" | |
elapsed_time = time.time() - start | |
print ("elapsed_time:{0}".format(elapsed_time) + "[sec]") |
$ docker run -it ubuntu:20.04
$ su -
$ apt update
$ apt upgrade
$ apt install git
$ apt install wget
import pyxel | |
from datetime import datetime | |
class App: | |
def __init__(self): | |
pyxel.init(160, 120) | |
self.i = datetime.now().strftime("%Y/%m/%d %H:%M:%S") | |
pyxel.run(self.update, self.draw) | |
#include <WiFi.h> | |
#include "FS.h" | |
#include "SD.h" | |
#include "SPI.h" | |
const char* ssid = ""; | |
const char* password = ""; | |
WiFiServer server(80); |
ui.UIManager.layouts.titleLayout = { | |
"type": "ui.FreeLayout", | |
"frame": [0, 0, Graphics.width, Graphics.height], | |
"music": ($ -> $dataFields.database.system.titleMusic), | |
"controls": [ | |
{ | |
"type": "ui.Image", | |
"image": -> $dataFields.database.system.titleScreen.name or 'bg-generic', | |
"frame": [0, 0, Graphics.width, Graphics.height] | |
}, |
const dash_button = require('node-dash-button'); | |
const exec = require('child_process').exec; | |
const dash = dash_button('xx:xx:xx:xx:xx:xx', null, null, 'all'); | |
dash.on('detected', () => { | |
exec("python3 screenshot.py") | |
console.log("カシャ!"); | |
}); |