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
| def getWorkList(course_id): | |
| global service | |
| try: | |
| pageToken=None | |
| params = {} | |
| params["courseId"] = course_id #ここにコースのIDを書く | |
| params["pageSize"] = 50 | |
| if pageToken: | |
| params["pageToken"] = pageToken | |
| response = service.courses().courseWork().list(**params).execute() |
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
| def getCourseList(): | |
| # Google Classroom APIから授業リストを取得する処理 | |
| global service #serviceのインスタンスは別で生成済みとします | |
| # クラスルームの一覧(コース一覧)を取得 | |
| results = service.courses().list(pageSize=10).execute() | |
| courses = results.get('courses', []) | |
| #出力の例 | |
| # for course in courses: | |
| # print(course['name'],course['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
| $latex = 'platex'; | |
| $bibtex = 'pbibtex'; | |
| $dvipdf = 'dvipdfmx %O -o %D %S'; | |
| $makeindex = 'mendex %O -o %D %S'; | |
| $pdf_mode = 3; | |
| $ENV{TZ} = 'Asia/Tokyo'; | |
| $ENV{OPENTYPEFONTS} = '/usr/share/fonts//:'; | |
| $ENV{TTFONTS} = '/usr/share/fonts//:'; |
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
| import cv2 | |
| import pykinect_azure as pykinect | |
| from tkinter import filedialog | |
| # ファイル選択ダイアログを表示し、動画ファイルを選択 | |
| video_filename = filedialog.askopenfilename(filetypes=[("動画ファイル", "*.mkv")]) | |
| # ライブラリを初期化する | |
| pykinect.initialize_libraries(track_body=True) |
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
| import cv2 | |
| import pykinect_azure as pykinect | |
| from tkinter import filedialog | |
| # ファイル選択ダイアログを表示し、動画ファイルを選択 | |
| video_filename = filedialog.askopenfilename(filetypes=[("動画ファイル", "*.mkv")]) | |
| # ライブラリを初期化する | |
| pykinect.initialize_libraries(track_body=True) |
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
| import cv2 | |
| import numpy as np | |
| import pykinect_azure as pykinect | |
| from tkinter import filedialog | |
| # ファイル選択ダイアログを表示し、動画ファイルを選択 | |
| video_filename = filedialog.askopenfilename(filetypes=[("動画ファイル", "*.mkv")]) | |
| # ライブラリを初期化する | |
| pykinect.initialize_libraries(track_body=True) |
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
| def removeStudentNameInFile(directory): | |
| """ | |
| Googleフォームで投稿されたファイルから学生の名前を削除する | |
| Args: | |
| directory (str): ファイルが保存されているディレクトリのパス | |
| """ | |
| # ディレクトリ内のすべてのファイルを処理 | |
| for filename in os.listdir(directory): | |
| # " - "の位置を検索 | |
| pos = filename.find(" - ") |
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
| import cv2 | |
| import mediapipe as mp | |
| mp_face_mesh = mp.solutions.face_mesh | |
| face_mesh = mp_face_mesh.FaceMesh(static_image_mode=False, max_num_faces=1, min_detection_confidence=0.5, min_tracking_confidence=0.5) | |
| mp_drawing = mp.solutions.drawing_utils | |
| drawing_spec = mp_drawing.DrawingSpec(thickness=1, circle_radius=1) | |
| cap = cv2.VideoCapture(1) |
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
| import asyncio | |
| import uuid | |
| from bleak import BleakScanner, BleakClient | |
| from bleak.exc import BleakError | |
| device_name = "ESP32" | |
| read_UUID = uuid.UUID("6E400003-B5A3-F393-E0A9-E50E24DCCA9E") | |
| async def ble_scan(): | |
| devices = await BleakScanner.discover() |
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
| import asyncio | |
| from bleak import BleakScanner, BleakClient | |
| ADDRESS = None | |
| async def ble_scan(): | |
| global ADDRESS | |
| device_name = "ESP32" | |
| devices = await BleakScanner.discover() | |
| target_device = next((d for d in devices if d.name == device_name), None) |