Skip to content

Instantly share code, notes, and snippets.

View yayoimizuha's full-sized avatar
🎓
Busy...

Tomokazu Katayama yayoimizuha

🎓
Busy...
View GitHub Profile
@kyo-takano
kyo-takano / making-the-most-of-local-llms.ipynb
Last active March 22, 2025 05:03
ローカルLLMはこーやって使うの💢
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wellflat
wellflat / HelloONNX.vue
Last active January 29, 2024 09:01
Image Classification using ONNX Runtime for Web (ORT Web)
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<canvas width="32" height="32" ref="canvas"></canvas>
<button type="button" @click="inference">inference</button>
<span>{{ infoLabel }}</span>
</div>
</template>
<script lang="ts">
@DirtyF
DirtyF / hugo_build.sh
Last active September 1, 2021 16:17
Bash script to run Hugo with support for Hugo modules on Vercel
#!/bin/bash
# default versions
if [ -z $GO_VERSION ]; then GO_VERSION='1.15.5'; fi
if [ -z $HUGO_VERSION ]; then HUGO_VERSION='0.80.0'; fi
# install Go
curl -sSOL https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz
tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
@Huud
Huud / Calculate_Mean_and_std_of_dataset.py
Created July 23, 2020 14:18
How to calculate the mean and standard deviation of an image dataset
# calculate mean and std deviation
from pathlib import Path
import cv2
imageFilesDir = Path(r'C:\your\dataset\dir\here\trainData')
files = list(imageFilesDir.rglob('*.png'))
# Since the std can't be calculated by simply finding it for each image and averaging like
# the mean can be, to get the std we first calculate the overall mean in a first run then
'use strict';
const consumerKey = 'CONSUMER_KEY'
const consumerSecret = 'CONSUMER_SECRET'
const client = TwitterClient.getInstance(consumerKey, consumerSecret)
/**
* ①Twitterで作ったアプリに登録するための callbackUrl を取得する
* 実行後 『表示』→『ログ』でURLを確認してTwitterアプリに登録
@shadero
shadero / getName.py
Last active February 24, 2025 23:16
私の名前はこのスクリプトで作りました。
# MIT LICENSE: Copyright (c) 2020, yanorei32 All rights reserved.
import random
base = list("でっどぷろとたいぷえちえちしすこんしゃっきん")
def getName(length=4):
return ''.join([random.choice(base) for _ in range(length)])
def main():
for _ in range(200):
@curious-eyes
curious-eyes / tkinter.py
Created January 13, 2019 01:33
Tkinter: 画像キャンバス更新にはGlobal変数が必要
"""
Tkinter サンプル
"""
import tkinter
from datetime import datetime
from PIL import ImageTk
def get_imagename():
""" ファイル名生成 """
@skysan87
skysan87 / jmaMeteoInfo.gs
Last active August 17, 2022 04:20
[JS][GAS]気象庁防災情報XMLフォーマット形式電文を取得するスクリプト
// 気象庁防災情報XMLフォーマット形式電文の公開(PULL型)の高頻度フィード(随時)を取得
// see: http://www.data.jma.go.jp/developer/xmlpull.html
function pullMeteoHeadline() {
var url = 'http://www.data.jma.go.jp/developer/xml/feed/extra.xml';
var xml = UrlFetchApp.fetch(url).getContentText();
var xmlDoc = XmlService.parse(xml);
var rootDoc = xmlDoc.getRootElement();
var nsDefault = XmlService.getNamespace("", 'http://www.w3.org/2005/Atom');
@voluntas
voluntas / death_march.md
Last active April 29, 2025 05:49
デスマーチが起きる理由 - 3つの指標

デスマーチが起きる理由 - 3つの指標

著者: 青い鴉(ぶるくろ)さん @bluecrow2

これは結城浩さんの運用されていた YukiWiki に当時 Coffee 様 (青い鴉(ぶるくろ)さん)がかかれていた文章です。 ただ 2018 年 3 月 7 日に YukiWiki が運用停止したため消えてしまいました。その記事のバックアップです。

今は 404 ですが、もともとの記事の URL は http://www.hyuki.com/yukiwiki/wiki.cgi?%A5%C7%A5%B9%A5%DE%A1%BC%A5%C1%A4%AC%B5%AF%A4%AD%A4%EB%CD%FD%CD%B3 になります。

昔、自分がとても感銘を受けた文章なので、このまま読めなくなるのはとてももったいないと思い、バックアップとして公開しています。

#!/usr/bin/env bash
# --slave /usr/bin/$1 $1 /usr/bin/$1-\${version} \\
function register_clang_version {
local version=$1
local priority=$2
update-alternatives \
--install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-${version} ${priority} \