- Session 1: Introduction and Principles - https://speakerdeck.com/munetoshi/code-readability-session-1-ver-2-en
- Session 2: Naming - https://speakerdeck.com/munetoshi/code-readability-session-2-ver-2-en
- Session 3: Comments - https://speakerdeck.com/munetoshi/code-readability-session-3-ver-2-en
- Session 4: State - https://speakerdeck.com/munetoshi/code-readability-session-4-ver-2-en
- Session 5: Function - https://speakerdeck.com/munetoshi/code-readability-session-5-ver-2-en
- Session 6: Dependency I - https://speakerdeck.com/munetoshi/code-readability-session-6-ver-2-en
This file contains 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
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: |
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 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
# 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 |
This file contains 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 | |
SCRIPTNAME=$(basename "$0") | |
function realpath () { | |
f=$@; | |
if [ -d "$f" ]; then | |
base=""; | |
dir="$f"; | |
else | |
base="/$(basename "$f")"; |
This file contains 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
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 |
This file contains 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
#installing vscode on Debian | |
You can install vscode using following commands: | |
1- Start by updating the packages index and installing the dependencies by typing: | |
sudo apt update | |
2- sudo apt install software-properties-common apt-transport-https curl | |
3- Import the Microsoft GPG key using the following curl command: | |
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - | |
4- Add the Visual Studio Code repository to your system: | |
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" |
This file contains 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
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 |
physics パッケージは物理で用いられる数学記号等を簡便に利用できるようにxparse パッケージを利用してコマンドを作成している.また,amsmath パッケージにも依存している.
NewerOlder