Skip to content

Instantly share code, notes, and snippets.

@voluntas
voluntas / index.md
Last active January 24, 2025 00:46
Zig 言語リファレンス
  • これは Zig ドキュメント 0.10.1 を DeepL Pro と ChatGPT を利用して翻訳したものです。
    • 一部 master なモノもあります、ごちゃ混ぜです
  • 自分用に翻訳しています
#[
Author: Ward
Example of GetUserName
References:
https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getusernamea
]#
import winim/lean
@devmorita
devmorita / m5stackPlusSPO2.ino
Last active January 8, 2022 04:24
Internet Of SPO2 Things.
#include "M5StickCPlus.h"
#include <Wire.h>
// lcd
uint8_t brightnessLevel = 8;
uint8_t RotateSet = 1; // for right finger
// buttuns
#define BTN_A_PIN 37
#define BTN_B_PIN 39
# https://gist.github.com/FranzDiebold/898396a6be785d9b5ca6f3706ef9b0bc
# https://gist.github.com/okld/0aba4869ba6fdc8d49132e6974e2e662
# https://github.com/komodovaran/stateful_streamlit_enterprise/tree/master/src
from streamlit.report_thread import get_report_ctx
from streamlit.server.server import Server
from streamlit.hashing import _CodeHasher
class _SessionState:
@srndpty
srndpty / zapall.cs
Last active October 28, 2021 12:23
Zap all files from all subdirectories recursively
using System.IO;
namespace ZapAll
{
class Program
{
private static readonly char separator = Path.DirectorySeparatorChar;
static void Main(string[] args)
{
@mongonta0716
mongonta0716 / m5stickv_camera_jpg_test.py
Last active March 26, 2022 08:26
M5StickVで撮影したVGAの画像をLCDに縮小表示しつつファイル保存する。(Maixpyファームウェアv0.6.2)
# Untitled - By: mongonta - 金 4月 23 2021
from Maix import GPIO
from fpioa_manager import *
from board import board_info
import os, lcd, image, time, sensor
#####################################################################
# Settings for M5StickV. Maix series should fix the following lines.
lcd.init(type=3)
fm.register(board_info.BUTTON_A, fm.fpioa.GPIO1, force=True)
@takubokudori
takubokudori / rustberry.md
Last active July 6, 2024 15:54
WSL上のRustでラズパイ用バイナリをビルドする方法
# PCD8544 (Nokia 5110) LCD sample for Raspberry Pi Pico
# Required library:
# https://github.com/mcauser/micropython-pcd8544
# And this sample script is based on above repository.
# Connections:
# [pcd8544:pico(physical pin)]
# Gnd: Pico GND (38)
# BL : Pico GP28(34)
# Vcc: Pico 3V3 (36)
@YoshiRi
YoshiRi / put_japanese_to_cvimg.py
Created January 2, 2021 15:58
日本語の文字をOpenCVの画像ファイルに書き込む関数(PIL経由)
import pyocr
import cv2
import numpy as np
import pyocr.builders
import matplotlib.pyplot as plt
from PIL import Image, ImageDraw, ImageFont
## 参考:https://qiita.com/mo256man/items/82da5138eeacc420499d
def cv2_putJPText(img, text, org, fontFace='C:\Windows\Fonts\HGRPP1.TTC', fontScale=10, color=(255,0,0), mode=0):
"""
@kuc-arc-f
kuc-arc-f / Cargo.toml
Created September 15, 2020 05:16
Rust, rusqlite で、sqlite3を操作する例
[dependencies]
rusqlite = "0.24.0"