Skip to content

Instantly share code, notes, and snippets.

@7shi
7shi / test.md
Last active March 1, 2024 20:32
Gemma (2B) Test
ID Language Prompt Result Translation
ar アラビア語 هل يمكنك فهم هذه اللغة؟ نعم، أنا قادر على فهم اللغة العربية. أنا متعلم اللغة العربية من خلال التعرض إلى اللغة في جميع أنحاء حياتي، بما في ذلك الكتب والأنشطة والمسائل.

هل تود أن أتحدث معك باللغة العربية؟
はい、アラビア語を理解することができます。本やアクティビティ、質問など、生涯を通じてアラビア語に触れることで、アラビア語を学んでいます。

アラビア語でお話ししましょうか?
it イタリア語 Riesce a capire questa lingua? Non riesco a capire la lingua in quanto non ho la capacità di leggere, scrivere e conversare in un linguaggio specifico. 私には特定の言語で読み書きや会話をする能力がないため、言葉を理解することができません。
id インドネシア語 Dapatkah Anda memahami bahasa ini? Saya dapat memahami bahasa yang diterjemahkan atau disalin dari bahasa lain. Namun, saya tidak memiliki kemampuan untuk memahami bahasa secara langsung, seperti manusia. 私は他の言語を翻訳したり、コピーした言語を理解することができます。しかし、私には人間のように直接言語を理解する能力はありません。
uk ウクライナ語 Чи розумієте ви цю мову? Я розумію мову, яка використовується в різних контекстах, таких як:* Електронічний час* Філософія* **Мов
@7shi
7shi / test.py
Created February 29, 2024 03:03
[py] Gemma test
# https://huggingface.co/google/gemma-2b
# https://note.com/ngc_shj/n/n81cde9550b37
from datetime import datetime
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "google/gemma-2b"
tokenizer = AutoTokenizer.from_pretrained(
model_id,
trust_remote_code=True
@7shi
7shi / memrise.md
Last active February 15, 2024 03:21
Classic Memrise Official Courses

Classic Memrise Official Courses

english

Arabic

  • 1325837 Arabic 1
  • 1325838 Arabic 2
  • 1325839 Arabic 3
  • 1325840 Arabic 4
@7shi
7shi / README.md
Last active January 16, 2024 14:50
[py] XML Parser
@7shi
7shi / survey.md
Last active November 28, 2023 08:37
[Claude] 🔍Language Survey
@7shi
7shi / speech.html
Last active November 24, 2023 02:49
[はてなブログ] Speech Synthesis API のテンプレート
# 音声設定
音声の再生は環境に依存します。以下に選択肢が出ない言語は再生できません。
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/7shi/web-tts@0.11/speech.min.css">
<script src="https://cdn.jsdelivr.net/gh/7shi/web-tts@0.11/speech.min.js"></script>
<table id="voice_table"></table>
<script>
webTTS.initVoices({
ja: { name: "日本語", prefer: "Nanami Online", test: "こんにちは" },
@7shi
7shi / a.c
Created March 6, 2011 02:16
hello world in UNIX V6 (PDP-11)
main(){write(1,"hello\n",6);}
@7shi
7shi / xml7shi.py
Created June 30, 2012 02:00
Pythonの簡易XMLパーサとC++高速版
# public domain
from StringIO import *
def replaces(s, args):
for key, value in args.iteritems():
s = s.replace(key, value)
return s
def from_entity(s):
return replaces(s, {
@7shi
7shi / baidu.txt
Created August 7, 2023 15:31
Baidu translation examples
アラビア語 في منتصف الطريق من خلال حياتنا ، أجد نفسي في غابة مظلمة ، لأن الطريق الصحيح قد فقدت . Midway through our lives, I found myself in a dark forest because the right path had already been lost.
アゼルバイジャン語 Bizim həyatımızın yolunun ortasında, mən özümü qaranlıq ormanda gördüm, çünki doğru yol kayboldu. In the middle of our life, I saw myself in the dark forest, because the right path was gone.
アルバニア語 Në mes të rrugës së jetës sonë, gjeta veten në një pyll të errët, sepse rruga e duhur ishte humbur. In the middle of our lives, I found myself in a dark forest, because the right path was lost.
アルメニア語 Մեր կյանքի ճանապարհի կենտրոնում ես գտնվեցի մութ անտառում, որովհետև ճիշտ ճանապարհը կորցվել էր: In the middle of our lives, I was in the dark woods because the right way was lost.
アムハラ語 በሕይወታችን መንገድ መካከል በጨለማ ዱር ውስጥ አገኘሁ፥ የቀናውም መንገድ ጠፍቶአልና። For I have found the way of our life in the forest of darkness, and the way of uprightness perisheth.
アッサム語 আমাৰ জীৱনৰ মধ্যবৰ্তী পথ, আমি এটা ডাঠ অঞ্চলত পোৱা গল, কাৰণ সঠিক পথ হেৰাই
@7shi
7shi / capture.fsx
Last active February 12, 2023 12:31
[F#] Screen Capture
#if NETF
#r "System"
#r "System.Drawing"
#r "System.Windows.Forms"
#else
//#r "nuget: System.Drawing.Common, 5.0.2"
#r @"C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\6.0.4\System.Drawing.Common.dll"
#r @"C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\6.0.4\System.Windows.Forms.dll"
#r @"C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\6.0.4\System.Windows.Forms.Primitives.dll"
#r @"C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\6.0.4\Microsoft.Win32.SystemEvents.dll"