Skip to content

Instantly share code, notes, and snippets.

View tuna2134's full-sized avatar
🌙
眠たい

tuna2134@コマリン親衛隊 tuna2134

🌙
眠たい
View GitHub Profile
  1. スパム禁止(宣伝も含む)
  2. NSFW系禁止
  3. 小児性愛、思春期性愛、 ロリ、ショタ、動物性愛に関する話題は禁止とします。
  • これらの話題は、しばしば意見が衝突するだけで意味を成さないためです
  1. 失礼なことや迷惑になることはやめてください。これらは基本的にモデレーターの裁量によって対処されます。
  • 特に、新しいことを熱心に学ぶ人には失礼のないようにしましょう。誰だって初心者の頃はありますし、自尊心ある初心者を馬鹿にすることは本当に失礼なことです。
  1. メンバーリストの表示順を引き上げるためにニックネームを変更しないでください。一度はモデレーターが戻しますが、もう一度やったらBANします。
  2. 攻撃的なものなど、他人を不快にするようなユーザー名またはニックネームはやめてください。メンションが難しいものも、ここではやめてください
  3. 自分の投稿に反応するユーザーアカウントは禁止とします。
  4. このカテゴリーでは日本語だけを使ってください。機械翻訳を使っての会話はしないでください。<#336642776609456130>以外は英語で話してください。
"use server";
import axios from "axios";
const ExchangeCodePage = ({ searchParams }: { searchParams: { code: string } }) => {
const code = searchParams.code;
console.log(code);
const res = await axios.post(
"/api/auth/cbauth",
{
log syslog all;
router id 172.16.1.1;
protocol bgp {
import all;
export all;
local as 65001;
neighbor 172.16.70.12 as 65002;
}
#!/bin/bash
read -p "Build with master node? (y/n): " MASTER_NODE
read -p "What are you using kubernetes version? (example v1.30): " KUBERNETES_VERSION
# Install Containerd
cat <<EOF | sudo tee /etc/modules-load.d/containerd.conf
overlay
br_netfilter
@tuna2134
tuna2134 / lke-init.sh
Last active November 6, 2023 04:46
lke-init.sh
#!/bin/bash
# <UDF name="token" label="The kubeadm join token to use for cluster init">
# <UDF name="hostname" label="Hostname to use, should match linode label">
# <UDF name="endpoint" label="The kube-apiserver endpoint to use">
# <UDF name="wgapipeers" label="A space separated list of WG Public Keys and their IPs for the API server">
# <UDF name="hosts" label="The hosts to be added to /etc/hosts">
set -e
set -x
(
cat <<EOF > user-data.yml
ssh_pwauth: true
password: sample
EOF
wget https://download.rockylinux.org/pub/rocky/9/images/x86_64/Rocky-9-GenericCloud.latest.x86_64.qcow2
sudo virt-install --name vm \
--memory 2048 \
--vcpus 2 \
@tuna2134
tuna2134 / wg-ubuntu-ipv6.sh
Last active October 3, 2023 16:27
Using wireguard with ipv6
INTERFACE=eth0
clear
echo "[+] checking packages" && sudo apt-get update > /dev/null && sudo apt-get install wireguard qrencode jq -y > /dev/null &&
echo "[+] creating keypars" && rm -rf /etc/wireguard/keypars && mkdir /etc/wireguard/keypars &&
wg genkey | sudo tee -a /etc/wireguard/keypars/server.key > /dev/null
sudo cat /etc/wireguard/keypars/server.key | wg pubkey | tee -a /etc/wireguard/keypars/server.pub > /dev/null
wg genkey | tee -a /etc/wireguard/keypars/client.key > /dev/null
sudo cat /etc/wireguard/keypars/client.key | wg pubkey | tee -a /etc/wireguard/keypars/client.pub > /dev/null
echo "[+] creating config files"
sudo cat <<EOF > /etc/wireguard/wg0.conf

PyTorch CNN(Conv2d解説)

自分のメモのために作りました。

Math

W_OUT = Output width

W_IN = Input width

F_W = Filter width(kernel size)

from torch.utils.data import Dataset, DataLoader
from torchvision import transforms
IMAGE_DIR = Path("images")
class MyDataset(Dataset):
def __init__(self, transform=None):
self.transform = transform
from playwright.async_api import async_playwright
from bs4 import BeautifulSoup
import asyncio
import base64
import aiohttp
import aiofiles
LABEL = input("ラベル名: ")
TYPE = input("タイプ: ")