Skip to content

Instantly share code, notes, and snippets.

View behitek's full-sized avatar
😎

Hieu Nguyen Van behitek

😎
View GitHub Profile
passages = [
"miHoYo - TECH OTAKUS SAVE THE WORLD",
"Home Home",
"Our Products Our Products",
"About Us About Us",
"Careers Careers",
"CH",
"EN",
"Privacy Policy",
"米哈游用户个人信息及隐私保护政策",
Audio path : common_voice_ja_21409740.mp3
Reference : 祖母は、おおむね機嫌よく、サイコロをころがしている。
Original model : ほぼ思い切りにおけさえコロコロはしている。
Finetuned model: 祖母 は おもい 機嫌 よく サイコロコロ か し て いる
OpenAI model : ほぼ思い切りによってサイコロころがしている。
Audio path : common_voice_ja_22072759.mp3
Reference : 財布をなくしたので、交番へ行きます。
Original model : 財布をなくしたので交番へ行きます。
Finetuned model: 財布 を なくし た の て 交番 て 行き ます
-------< com.mycompany.hospital.management:hospital-management >--------
Building hospital-management 1.0-SNAPSHOT
--------------------------------[ jar ]---------------------------------
--- exec-maven-plugin:3.0.0:exec (default-cli) @ hospital-management ---
HỆ THỐNG QUẢN LÝ BỆNH VIỆN
1. Thêm y tá
2. Tìm kiếm y tá
3. Cập nhật y tá
from datasets import load_dataset, load_metric
from transformers import AutoTokenizer
from transformers import DataCollatorWithPadding
from transformers import AutoModelForSequenceClassification, TrainingArguments, Trainer
import numpy as np
dataset = load_dataset('json', data_files=['data/train_qa_vi_mailong.jsonl'])
checkpoint_name = "xlm-roberta-large"
tokenizer = AutoTokenizer.from_pretrained(checkpoint_name)
import sys
import re
USAGE = """
python data_reader.py <input_file>
"""
"""
File format:
<pattern>
<freq>3</freq>
@behitek
behitek / BFS.cpp
Last active December 23, 2021 13:50
#include <iostream>
#include <utility>
#include <queue>
using namespace std;
#define TRASH 1
#define VISITED 2
#define SIZE 3
int rooms[3][3] = {

classification report threshold 0.1 precision recall f1-score support

accepted       0.97      0.75      0.85      8872
rejected       0.37      0.88      0.52      1505

accuracy                           0.77     10377

macro avg 0.67 0.81 0.68 10377 weighted avg 0.89 0.77 0.80 10377

1 Ha Noi 3358.9 8418883
2 Thanh pho Ho Chi Minh 2061 9411805
3 Hai Phong 1561.8 2069110
4 Da Nang 1284.9 1191381
5 Ha Giang 7929.5 883388
6 Cao Bang 6700.3 535098
7 Lai Chau 9068.8 480588
8 Lao Cai 6364 756083
9 Tuyen Quang 5867.9 797392
10 Lang Son 8310.2 791872
@behitek
behitek / ex.cpp
Last active August 31, 2021 11:23
#include <iostream>
#include <thread>
#include <ctime>
void timer_task(int interval, bool &worker_idle){
std::thread t([=]() {
while(1) {
if (worker_idle == true) std::cout << "timer nha ... " << &worker_idle << "\n";
std::this_thread::sleep_for(std::chrono::milliseconds(interval));
}

Nhìn chung

  • Các bài viết đầy đủ kiến thức, khá trau chuốt
  • Từ bài số 4 trở đi có nhiều tiến bộ hơn
  • Áp dụng thêm 1 số note dưới đây nhé Thắng

Note về công cụ

Dùng shortcode: