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
#include <M5Unified.h> | |
// Strength of the calibration operation; | |
// 0: disables calibration. | |
// 1 is weakest and 255 is strongest. | |
static constexpr const uint8_t calib_value = 64; | |
// 姿勢角用の設定 | |
static constexpr float COMPLEMENTARY_FILTER = 0.96f; // 相補フィルター係数 |
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
Sub UpdateNaboTable() | |
Dim wsNabo As Worksheet, wsMaster As Worksheet | |
Dim lastRowNabo As Long, lastRowMaster As Long | |
Dim i As Long, j As Long | |
Dim masterPrefecture As String, masterAge As Long, masterNotes As String | |
Dim naboPrefecture As String, naboBirthday As Date | |
Dim currentYear As Long | |
Dim colNaboPrefecture As Range, colNaboBirthday As Range, colNaboNotes As Range | |
Dim colMasterPrefecture As Range, colMasterAge As Range, colMasterNotes As Range |
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
# 各種設定値 | |
$SOURCE_FILE = "file.txt" # 置換前ファイル | |
$SETTING = "param.csv" # 置換のハッシュテーブル。各行ごとに新規ファイル作成 | |
$ENCODING = "UTF8" | |
# 初期処理 | |
$CurrentDir = Split-Path -Parent $MyInvocation.MyCommand.Path | |
Set-Location $CurrentDir |
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 PySimpleGUI as sg | |
from PIL import Image | |
import time | |
import os | |
import win32com.client | |
class TwitterTimeCounter: | |
def __init__(self): | |
self.time = 0 |
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
# -*- coding: utf-8 -*- | |
import pygame | |
from pygame.locals import * | |
import numpy as np | |
import subprocess | |
class Color: | |
"""print文に色をつける | |
用例:print(f'赤:{Color.RED}これは赤色文字です{Color.RESET}') |
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
N = 1_000_000 | |
s = f"N = {N}\nfor i in range(N):\n" | |
with open("FizzBuzz.py", mode='w') as f: | |
f.write(s) | |
for i in range(1, N): | |
if i == 1: | |
s = f"\tif i == {i}:\n\t\tprint({i})\n" | |
elif i % 15 == 0: | |
s = f"\telif i == {i}:\n\t\tprint(\"FizzBuzz\")\n" |
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
REM = r""" | |
SET PYTHON_EXE="python.exe" | |
%PYTHON_EXE% %0 %1 | |
PAUSE | |
EXIT | |
""" | |
import os | |
import glob | |
import time |