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
/* | |
https://github.com/karpathy/llama2.c/blob/master/run.c | |
GPT-4による解説 | |
このプログラムは、Transformerネットワークを実装し、トークン化されたテキスト入力から次の最も適したトークンを予測します。具体的には以下のようになります: | |
先頭の部分は、TransformerWeightsとRunStateという2つのデータ構造とそれらの関連するメモリの管理を含みます。 | |
Configという構造体は、トランスフォーマーネットワークのパラメータを保持します。 | |
次に、指定されたチェックポイントファイルから重みを初期化する関数があります。この関数は、チェックポイントファイルからトランスフォーマーネットワークの重みを読み込み、適切に配置します。 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// https://github.com/pschatzmann/arduino-audio-tools/ settings for M5Stack Core2 | |
// Audio settings | |
const int sample_rate = 44100; | |
const int channels = 1; | |
// Speaker settings | |
I2SStream out; | |
auto config = out.defaultConfig(TX_MODE); | |
config.sample_rate = sample_rate; |
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
#/bin/sh | |
# M1 Mac環境でAmazon FreeRTOS on ESP32のビルドを行う | |
# FreeRTOSのソースはAWSコンソールのzipから落とさないで、 | |
# https://github.com/aws/amazon-freertos から持ってくること | |
# 参考: | |
# https://docs.aws.amazon.com/freertos/latest/userguide/getting_started_espressif.html#setup-espressif-idf42 | |
# https://github.com/SeanMollet/esp-idf/tree/esp-2020r3-aarch64 | |
# | |
# ビルドは下記のコマンドで | |
# idf.py -DVENDOR=espressif -DBOARD=esp32_wrover_kit -DCOMPILER=xtensa-esp32 build |
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
const functions = require('firebase-functions'); | |
const request = require('request'); | |
const { Translate } = require('@google-cloud/translate'); | |
/* | |
Firebase Functionsの環境変数 | |
slack.bot_user_tokenとgoogle.project_idを適当に設定してください | |
*/ | |
async function postMessage(payload) { |
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
#!/bin/sh | |
RUBY_VERSION=2.6.3 | |
NODE_VERSION=12 | |
# install docker | |
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
sudo apt update |
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
#!/bin/bash | |
# Usage: | |
# GROUP=1003 MYDNSJP_DOMAIN=XXXX.mydns.jp MYDNSJP_MASTERID=mydnsXXXXX MYDNSJP_MASTERPWD=XXXX [email protected] sh set_mydns_and_ssl.sh | |
apt install -y php php-mbstring certbot unzip | |
mkdir -p /usr/local/mydns | |
cd /usr/local/mydns | |
wget 'https://github.com/disco-v8/DirectEdit/archive/master.zip' -O DirectEdit-master.zip | |
unzip -f ./DirectEdit-master.zip |
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
#!/bin/bash | |
VERSION=${VERSION:-2.1523-vsc1.38.1} | |
WORK_DIR=/home/ubuntu/projects | |
USER_ID=1000 | |
GROUP_ID=1000 | |
PORT=8888 | |
TARBALL_URL=https://github.com/cdr/code-server/releases/download/$VERSION/code-server$VERSION-linux-x86_64.tar.gz |
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
#!/bin/bash | |
SE_URL=${SE_URL:-https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/releases/download/v4.29-9680-rtm/softether-vpnserver-v4.29-9680-rtm-2019.02.28-linux-x64-64bit.tar.gz} | |
apt-get update | |
apt install -y bridge-utils gcc make | |
curl -L $SE_URL | tar xfz - -C /usr/local/ | |
cd /usr/local/vpnserver | |
yes 1 | make |