Skip to content

Instantly share code, notes, and snippets.

@kichinosukey
kichinosukey / list-active-network-interfaces-macos.sh
Created June 11, 2025 00:55
Show active network interfaces on macOS and map them to their corresponding Hardware Port names using ifconfig and networksetup.
ifconfig | awk '/^[a-z0-9]+:/{iface=$1} /status: active/{print iface}' | sed 's/://' | while read iface; do
port=$(networksetup -listallhardwareports | awk -v dev="$iface" '
BEGIN {port=""}
/Hardware Port/ {port=$3; for (i=4; i<=NF; i++) port=port " " $i}
/Device/ && $2==dev {print port}
')
echo "$iface : $port"
done
以下の **#Transcript** を読み込み、会議内容をビジネス文体で整理した **#Summary** を作成してください。
▼ 出力フォーマット
会議全体の概要(1-2行)
### 現状認識/進捗
- 箇条書きで簡潔に
### 課題
- 箇条書きで具体的に
@kichinosukey
kichinosukey / poly_gauss_test.py
Created January 13, 2019 15:08
comparison kernel with polynomial and rbf
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns; sns.set()
from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import PolynomialFeatures
from sklearn.kernel_ridge import KernelRidge
from sklearn.linear_model import LinearRegression
def make_data():