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
# Description: YouTubeの動画を再生して、その中の富士山が見えるかどうかを判定します。 | |
# あらかじめchromeをインストールし、そのバージョンにあった chromedriver を | |
# 以下からダウンロードしてこのスクリプトと同じフォルダに配置 | |
# https://googlechromelabs.github.io/chrome-for-testing/ | |
# 環境変数 OPENAI_API_KEY に OpenAI の APIキーを設定してください。 | |
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.chrome.service import Service as ChromeService | |
from webdriver_manager.chrome import ChromeDriverManager | |
from PIL import Image |
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
/* | |
* SPDX-FileCopyrightText: 2024 M5Stack Technology CO LTD | |
* SPDX-License-Identifier: MIT | |
* M5Stack LLM Module で日本語対話。Serial MonitorでBoth BL&CRを設定するとよいです。 | |
*/ | |
#include <Arduino.h> | |
#include <M5Unified.h> | |
#include <M5ModuleLLM.h> | |
M5ModuleLLM module_llm; |
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
# シリアルポートで受信したデータを MQTT Broker に投げる | |
from paho.mqtt import client as mqtt_client | |
import random | |
import time | |
import asyncio | |
from serial_asyncio import open_serial_connection | |
import sys | |
args = sys.argv | |
name = args[1] # COM3 などを引数で指定する (例: python serial2mqtt.py COM3 ) |
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 <M5Stack.h> | |
//#include <M5_Ethernet.h> | |
#include <Ethernet2.h> // Please also fix Server.h according to https://twitter.com/ksasao/status/1845423873313079331 | |
#include <BLEDevice.h> | |
#include <BLEUtils.h> | |
#include <BLEScan.h> | |
#include <PubSubClient.h> | |
#include <WiFiClient.h> | |
#include <ArduinoUniqueID.h> |
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
# 顔を検出し、顔をぼかすプログラム | |
# opencv-python >= 4.9.0.80 | |
import cv2 | |
import numpy as np | |
# 円形領域にぼかしを適用 | |
def circle_blur(img, rect): | |
# rectを囲む円形領域を求め、さらにそれを囲むような矩形を求める | |
center_x = int(rect[0] + rect[2] // 2) | |
center_y = int(rect[1] + rect[3] // 2) |
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
// https://github.com/m5stack/M5Unit-ENV | |
#include "M5Atom.h" | |
#include "M5UnitENV.h" | |
SHT4X sht4; | |
BMP280 bmp; | |
// I2C Address for M5Atom Grove Connector | |
#define SDA_PIN 26 | |
#define SCL_PIN 32 |
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
/* | |
This code is derived from the SEFR multi-class classifier algorithm developed by Alan Wang. | |
The original code can be found at https://github.com/alankrantas/sefr_multiclass_classifier. | |
The code is licensed under the MIT License. | |
https://opensource.org/licenses/mit-license.php | |
*/ | |
#include "SEFR.h" | |
uint8_t m_features; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>駅一覧</title> | |
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" /> | |
<style> | |
body { | |
margin: 0; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Fukashigi | |
{ | |
internal class Program | |
{ |
NewerOlder