Skip to content

Instantly share code, notes, and snippets.

View kaisugi's full-sized avatar

Kaito Sugimoto kaisugi

View GitHub Profile
@ctlllll
ctlllll / longest_chinese_tokens_gpt4o.py
Created May 13, 2024 19:53
Longest Chinese tokens in gpt4o
import tiktoken
import langdetect
T = tiktoken.get_encoding("o200k_base")
length_dict = {}
for i in range(T.n_vocab):
try:
length_dict[i] = len(T.decode([i]))
except:
@kyo-takano
kyo-takano / making-the-most-of-local-llms.ipynb
Last active May 25, 2024 04:10
ローカルLLMはこーやって使うの💢
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@younesbelkada
younesbelkada / finetune_llama_v2.py
Last active May 14, 2024 05:46
Fine tune Llama v2 models on Guanaco Dataset
# coding=utf-8
# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@doraTeX
doraTeX / ocr.sh
Last active April 19, 2024 13:04
A shell script to perform OCR on images/PDFs using macOS built-in OCR engine
#!/bin/bash
SCRIPTNAME=$(basename "$0")
function realpath () {
f=$@;
if [ -d "$f" ]; then
base="";
dir="$f";
else
base="/$(basename "$f")";
@hppRC
hppRC / install-jumanppv2.sh
Created January 4, 2023 07:07
Juman++ V2のインストール手順
ORIGIN_DIR=$(pwd)
JUMANPP_DIR="$HOME/.local/share/jumanpp"
mkdir -p $JUMANPP_DIR
cd $JUMANPP_DIR
curl -LO https://github.com/ku-nlp/jumanpp/releases/download/v2.0.0-rc3/jumanpp-2.0.0-rc3.tar.xz
tar -xf jumanpp-2.0.0-rc3.tar.xz
cd jumanpp-2.0.0-rc3
@xuwei-k
xuwei-k / holiday-scala-steward.yml
Created April 9, 2021 07:48
GitHub Actionsで祝日だったらcron実行をskipするサンプル
on:
schedule:
- cron: '0 0 * * *'
jobs:
scala-steward:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
@Yarakashi-Kikohshi
Yarakashi-Kikohshi / latex-physics.md
Created February 9, 2021 07:36
physics パッケージを自分好みに

physics パッケージを自分好みに

physics パッケージは物理で用いられる数学記号等を簡便に利用できるようにxparse パッケージを利用してコマンドを作成している.また,amsmath パッケージにも依存している.

physics.sty | CTAN

目的

@voluntas
voluntas / webrtc_turn.rst
Last active May 13, 2024 00:58
WebRTC で利用されいる TURN プロトコルの解説

WebRTC で利用されいる TURN プロトコルの解説

日時

2021-01-29

@voluntas

バージョン

2021.2

url

https://voluntas.github.io/

image

@mala
mala / covid19-twitter-research_01.md
Last active December 31, 2021 05:58
生活と意見: ソーシャルディスタンスなどと称してユーザー名や文章にスペースを挟む行為についての苦情

生活と意見: ソーシャルディスタンスなどと称してユーザー名や文章にスペースを挟む行為についての苦情

更新履歴

2020-05-13 追記