repo_full_name stringlengths 6 93 | repo_url stringlengths 25 112 | repo_api_url stringclasses 28
values | owner stringclasses 28
values | repo_name stringclasses 28
values | description stringclasses 28
values | stars int64 617 98.8k | forks int64 31 355 ⌀ | watchers int64 990 999 ⌀ | license stringclasses 2
values | default_branch stringclasses 2
values | repo_created_at timestamp[s]date 2012-07-24 23:12:50 2025-06-16 08:07:28 ⌀ | repo_updated_at timestamp[s]date 2026-02-23 15:23:15 2026-05-03 18:52:12 ⌀ | repo_topics listlengths 0 13 ⌀ | repo_languages unknown | is_fork bool 1
class | open_issues int64 3 104 ⌀ | file_path stringlengths 3 208 | file_name stringclasses 509
values | file_extension stringclasses 1
value | file_size_bytes int64 101 84k ⌀ | file_url stringclasses 627
values | file_raw_url stringclasses 627
values | file_sha stringclasses 624
values | language stringclasses 8
values | parsed_at stringdate 2026-05-04 01:12:36 2026-05-04 19:41:55 | text stringlengths 100 102k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | tests/test_llm_chat_server.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:01.756231 | #!/usr/bin/env python3
"""Unit tests for the generic LLM Chat MCP Server (mcp-servers/llm-chat/server.py).
Tests cover:
- JSON-RPC request handling (initialize, ping, tools/list, tools/call)
- call_llm: success, API errors, 504 retry + fallback model logic
- Notification handling (no response)
"""
import os
import sy... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | tests/test_minimax_chat_server.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:01.764199 | #!/usr/bin/env python3
"""Unit tests for MiniMax Chat MCP Server."""
import json
import os
import sys
import unittest
from unittest.mock import patch, MagicMock
# Add parent dir to path so we can import the server module
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', 'mcp-servers', 'minimax-chat'))
... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | tests/test_deepxiv_fetch.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:01.765592 | import importlib.util
import json
from pathlib import Path
from subprocess import CompletedProcess
import pytest
ROOT = Path(__file__).resolve().parents[1]
MODULE_PATH = ROOT / "tools" / "deepxiv_fetch.py"
def load_module():
spec = importlib.util.spec_from_file_location("deepxiv_fetch", MODULE_PATH)
module... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | tests/test_codex_install_update.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:01.794837 | from __future__ import annotations
import subprocess
from pathlib import Path
REPO_ROOT = Path(__file__).resolve().parents[1]
INSTALL_SCRIPT = REPO_ROOT / "tools" / "install_aris_codex.sh"
UPDATE_SCRIPT = REPO_ROOT / "tools" / "smart_update_codex.sh"
def run(
cmd: list[str], *, cwd: Path | None = None, check: ... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | tests/test_install_aris_tools_symlink.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:01.802531 | #!/usr/bin/env python3
"""Regression test for install_aris.sh #174: project-local .aris/tools symlink.
Covers:
install: fresh project gets `.aris/tools -> <repo>/tools`
install: idempotent on rerun
install: warns and leaves alone if `.aris/tools` already exists with
a different target / as a non-symli... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | tests/test_minimax_integration.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:01.806543 | #!/usr/bin/env python3
"""Integration tests for MiniMax Chat MCP Server.
These tests verify end-to-end behavior including:
- MCP server initialization flow
- Full tool call lifecycle
- API URL correctness
- Temperature clamping in real payloads
Set MINIMAX_API_KEY environment variable to run live API tests.
Tests mar... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | tests/test_watchdog.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:02.830202 | #!/usr/bin/env python3
"""Unit tests for tools/watchdog.py.
Covers task registration/unregistration, session liveness checks,
GPU/download monitoring logic, status writing, and summary generation
— all without spawning real processes or touching the filesystem outside
of a temporary directory.
"""
import json
import ... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | tools/exa_search.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:02.963069 | #!/usr/bin/env python3
"""CLI helper for AI-powered web search via Exa.
Designed to complement arXiv (preprints) and Semantic Scholar (published venues)
with **broad web search**: blog posts, documentation, company pages, news, and
research papers — all with built-in content extraction.
Requires
--------
pip install ... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | tools/experiment_queue/build_manifest.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:02.991753 | #!/usr/bin/env python3
"""build_manifest.py — Convert grid specs into queue_manager manifest.json.
Usage:
python3 build_manifest.py \\
--config grid_spec.yaml \\
--output manifest.json
Grid spec YAML format:
project: my_grid_experiment
cwd: /home/user/your_project
conda: my_env
gpus: [0, 1, 2, 3,... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | tools/experiment_queue/queue_manager.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:03.022088 | #!/usr/bin/env python3
"""queue_manager.py — ARIS experiment-queue scheduler.
Runs on the SSH remote host (or locally for Modal/Vast.ai future support).
Reads a manifest, launches jobs across free GPUs via `screen`, retries on OOM,
cleans stale screens, and writes state continuously to disk.
Usage (on remote):
no... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | tools/deepxiv_fetch.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:03.340817 | #!/usr/bin/env python3
"""Thin ARIS adapter around the installed deepxiv CLI."""
from __future__ import annotations
import argparse
import json
import shutil
import subprocess
import sys
from typing import Sequence
INSTALL_MESSAGE = "deepxiv CLI not found. Install it with: pip install deepxiv-sdk"
def ensure_deep... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | tools/arxiv_fetch.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:03.369504 | #!/usr/bin/env python3
"""CLI helper for searching and downloading arXiv papers.
Used by the ``arxiv`` skill (skills/arxiv/SKILL.md).
Commands
--------
search Search arXiv and print results as JSON.
download Download a paper PDF by arXiv ID.
Examples
--------
python3 tools/arxiv_fetch.py search "attention mechan... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | tools/openalex_fetch.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:03.394486 | #!/usr/bin/env python3
"""
OpenAlex API client for academic paper search.
Documentation: https://developers.openalex.org/
"""
import argparse
import json
import sys
import os
from typing import List, Dict, Optional
try:
import requests
except ImportError:
print(
"OpenAlex requires the 'requests' packa... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | tools/convert_skills_to_llm_chat.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:03.433941 | #!/usr/bin/env python3
"""Convert Codex-native skills to llm-chat MCP compatible versions.
Reads skills from a source directory, replaces all mcp__codex__codex and
mcp__codex__codex-reply references with mcp__llm-chat__chat, removes
Codex-specific parameters, and writes the converted files to a target
directory. Works... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | tools/paper_illustration_image2.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:03.546218 | #!/usr/bin/env python3
"""Integration helper for the paper-illustration-image2 workflow."""
from __future__ import annotations
import argparse
import json
import shutil
import subprocess
import sys
from datetime import datetime, timezone
from pathlib import Path
PNG_SIGNATURE = b"\x89PNG\r\n\x1a\n"
def utc_now() ... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | tools/research_wiki.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:03.619583 | #!/usr/bin/env python3
"""
ARIS Research Wiki — Helper utilities.
Canonical helper for the /research-wiki skill and integration hooks in other
skills. The SKILL.md prose for paper-reading skills (research-lit, arxiv,
alphaxiv, deepxiv, semantic-scholar, exa-search) delegates ingest to this
script; no skill duplicates t... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | tools/semantic_scholar_fetch.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:03.709124 | #!/usr/bin/env python3
"""CLI helper for fetching Semantic Scholar papers.
Designed to complement arxiv_fetch.py: arXiv handles preprints, this tool
handles **published venue papers** (IEEE, ACM, Springer, etc.) with rich
metadata (citations, venue, fieldsOfStudy, TLDR).
Commands
--------
search Relevance searc... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | tools/watchdog.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:03.887479 | #!/usr/bin/env python3
"""
watchdog.py — Server-side unified monitoring daemon for ARIS.
One process per server, monitors all registered tasks (training / download).
Outputs per-task status JSON + aggregated summary.txt for low-frequency polling.
Usage:
# Start the daemon (runs in foreground, use tmux/screen to p... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | tools/extract_paper_style.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:07.536511 | #!/usr/bin/env python3
"""
extract_paper_style.py — extract a *skeleton-only* style profile from a
reference paper, for opt-in use by writer skills via the `--style-ref` flag.
================================================================
CONTRACT (read this before consuming the output in a writer skill)
===========... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | tools/figure_renderer.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:07.538590 | #!/usr/bin/env python3
"""
ARIS FigureSpec → SVG Renderer v2
Converts a FigureSpec JSON into publication-quality SVG for academic papers.
Deterministic: same spec = same SVG, every time.
Usage:
python3 figure_renderer.py render spec.json [--output figures/output.svg] [--preview]
python3 figure_renderer.py val... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | tools/generate_codex_claude_review_overrides.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:07.564114 | #!/usr/bin/env python3
"""Generate Claude-review overrides for the upstream Codex-native skills."""
from __future__ import annotations
import ast
import re
import shutil
from pathlib import Path
REPO_ROOT = Path(__file__).resolve().parents[1]
SRC_ROOT = REPO_ROOT / "skills" / "skills-codex"
DEST_ROOT = REPO_ROOT / ... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | examples.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:14.402373 | infer_from_audio_examples = [
["This is how this machine has taken my voice.", 'English', 'no-accent', "prompts/en-2.wav", None, "Wow, look at that! That's no ordinary Teddy bear!"],
["我喜欢抽电子烟,尤其是锐刻五代。", '中文', 'no-accent', "prompts/zh-1.wav", None, "今天我很荣幸,"],
["私の声を真似するのはそんなに面白いですか?", '日本語', 'no-accent', "... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | data/input_strategies.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:14.609749 | import random
from collections import defaultdict
from concurrent.futures import ThreadPoolExecutor
from typing import Tuple, Type
# from lhotse import CutSet
# from lhotse.dataset.collation import collate_features
# from lhotse.dataset.input_strategies import (
# ExecutorType,
# PrecomputedFeatures,
# _ge... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | descriptions.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:14.612564 | top_md = """
# VALL-E X
VALL-E X can synthesize high-quality personalized speech with only a 3-second enrolled recording of
an unseen speaker as an acoustic prompt, even in another language for a monolingual speaker.<br>
This implementation supports zero-shot, mono-lingual/cross-lingual text-to-speech functionality ... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | data/dataset.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:14.616959 | # Copyright 2023 (authors: Feiteng Li)
#
# See ../../../../LICENSE for clarification regarding multiple authors
#
# 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
... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | data/fbank.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:15.419283 | # Copyright 2023 (authors: Feiteng Li)
#
# See ../../../../LICENSE for clarification regarding multiple authors
#
# 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
#... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | data/datamodule.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:15.859642 | # Copyright 2023 (authors: Feiteng Li)
#
# See ../../../../LICENSE for clarification regarding multiple authors
#
# 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
#... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | data/collation.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:15.970757 | from pathlib import Path
from typing import List, Tuple
import numpy as np
import torch
from utils import SymbolTable
class TextTokenCollater:
"""Collate list of text tokens
Map sentences to integers. Sentences are padded to equal length.
Beginning and end-of-sequence symbols can be added.
Example... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | launch-ui.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:16.084105 | # coding: utf-8
import argparse
import logging
import os
import pathlib
import time
import tempfile
import platform
import webbrowser
import sys
print(f"default encoding is {sys.getdefaultencoding()},file system encoding is {sys.getfilesystemencoding()}")
print(f"You are using Python version {platform.python_version()}... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | data/tokenizer.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:16.102497 | #!/usr/bin/env python3
# Copyright 2023 (authors: Feiteng Li)
#
# 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
... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | models/visualizer.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:16.360420 | #!/usr/bin/env python3
# Copyright 2023 (authors: Feiteng Li)
#
# See ../../../../LICENSE for clarification regarding multiple authors
#
# 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 co... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | macros.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:16.378290 | NUM_LAYERS = 12
NUM_HEAD = 16
N_DIM = 1024
PREFIX_MODE = 1
NUM_QUANTIZERS = 8
SAMPLE_RATE = 24000
lang2token = {
'zh': "[ZH]",
'ja': "[JA]",
"en": "[EN]",
'mix': "",
}
lang2code = {
'zh': 0,
'ja': 1,
"en": 2,
}
token2lang = {
'[ZH]': "zh",
'[JA]': "ja",
"[EN]": "en",
"": "... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | modules/activation.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:16.623887 | from typing import Optional, Tuple, List
import math
import torch
from torch import Tensor
from torch.nn import Linear, Module
from torch.nn import functional as F
from torch.nn.init import constant_, xavier_normal_, xavier_uniform_
from torch.nn.modules.linear import NonDynamicallyQuantizableLinear
from torch.nn.para... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | modules/embedding.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:16.646319 | # Copyright 2023 (authors: Feiteng Li)
#
# 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... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | modules/optim.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:16.793836 | # Copyright 2022 Xiaomi Corp. (authors: Daniel Povey)
#
# See ../LICENSE for clarification regarding multiple authors
#
# 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... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | modules/scheduler.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:17.176187 | #!/usr/bin/env python3
# Copyright 2023 (authors: Feiteng Li)
#
# See ../../../../LICENSE for clarification regarding multiple authors
#
# 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 co... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | modules/scaling.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:17.177702 | # Copyright 2022 Xiaomi Corp. (authors: Daniel Povey)
#
# See ../../../../LICENSE for clarification regarding multiple authors
#
# 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
#
# ... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | modules/transformer.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:17.389248 | import copy
import numbers
from functools import partial
from typing import Any, Callable, List, Optional, Tuple, Union
import torch
from torch import Tensor, nn
from torch.nn import functional as F
from .activation import MultiheadAttention
from .scaling import ActivationBalancer, BalancedDoubleSwish
from .scaling i... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | utils/g2p/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:17.665795 | """ from https://github.com/keithito/tacotron """
import utils.g2p.cleaners
from utils.g2p.symbols import symbols
from tokenizers import Tokenizer
# Mappings from symbol to numeric ID and vice versa:
_symbol_to_id = {s: i for i, s in enumerate(symbols)}
_id_to_symbol = {i: s for i, s in enumerate(symbols)}
class Pho... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | utils/g2p/cleaners.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:17.744360 | import re
from utils.g2p.japanese import japanese_to_romaji_with_accent, japanese_to_ipa, japanese_to_ipa2, japanese_to_ipa3
from utils.g2p.mandarin import number_to_chinese, chinese_to_bopomofo, latin_to_bopomofo, chinese_to_romaji, chinese_to_lazy_ipa, chinese_to_ipa, chinese_to_ipa2
from utils.g2p.english import eng... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | utils/g2p/english.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:17.856172 | """ from https://github.com/keithito/tacotron """
'''
Cleaners are transformations that run over the input text at both training and eval time.
Cleaners can be selected by passing a comma-delimited list of cleaner names as the "cleaners"
hyperparameter. Some cleaners are English-specific. You'll typically want to use... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | utils/g2p/japanese.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:17.986069 | import re
from unidecode import unidecode
# Regular expression matching Japanese without punctuation marks:
_japanese_characters = re.compile(
r'[A-Za-z\d\u3005\u3040-\u30ff\u4e00-\u9fff\uff11-\uff19\uff21-\uff3a\uff41-\uff5a\uff66-\uff9d]')
# Regular expression matching non-Japanese characters or punctuation m... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | utils/g2p/mandarin.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:18.304852 | import os
import sys
import re
import jieba
import cn2an
import logging
# List of (Latin alphabet, bopomofo) pairs:
_latin_to_bopomofo = [(re.compile('%s' % x[0], re.IGNORECASE), x[1]) for x in [
('a', 'ㄟˉ'),
('b', 'ㄅㄧˋ'),
('c', 'ㄙㄧˉ'),
('d', 'ㄉㄧˋ'),
('e', 'ㄧˋ'),
('f', 'ㄝˊㄈㄨˋ'),
('g', 'ㄐㄧˋ... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | utils/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:18.345858 | import torch
import torch.nn as nn
# from icefall.utils import make_pad_mask
from .symbol_table import SymbolTable
# make_pad_mask = make_pad_mask
SymbolTable = SymbolTable
class Transpose(nn.Identity):
"""(N, T, D) -> (N, D, T)"""
def forward(self, input: torch.Tensor) -> torch.Tensor:
return inpu... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | utils/g2p/symbols.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:18.355563 | '''
Defines the set of symbols used in text input to the model.
'''
# japanese_cleaners
# _pad = '_'
# _punctuation = ',.!?-'
# _letters = 'AEINOQUabdefghijkmnoprstuvwyzʃʧ↓↑ '
'''# japanese_cleaners2
_pad = '_'
_punctuation = ',.!?-~…'
_letters = 'AEINOQUabdefghijkmnoprstuvwyzʃʧʦ↓↑ '
'''
'''# korean_... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | utils/download.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:18.398997 | import sys
import requests
def download_file_from_google_drive(id, destination):
URL = "https://docs.google.com/uc?export=download&confirm=1"
session = requests.Session()
response = session.get(URL, params={"id": id}, stream=True)
token = get_confirm_token(response)
if token:
params = {... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | utils/generation.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:18.467283 | # coding: utf-8
import os
import torch
from vocos import Vocos
import logging
import langid
langid.set_languages(['en', 'zh', 'ja'])
import pathlib
import platform
if platform.system().lower() == 'windows':
temp = pathlib.PosixPath
pathlib.PosixPath = pathlib.WindowsPath
else:
temp = pathlib.WindowsPath
... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | utils/prompt_making.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:18.547918 | import os
import torch
import torchaudio
import logging
import langid
import whisper
langid.set_languages(['en', 'zh', 'ja'])
import numpy as np
from data.tokenizer import (
AudioTokenizer,
tokenize_audio,
)
from data.collation import get_text_token_collater
from utils.g2p import PhonemeBpeTokenizer
from macr... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | utils/sentence_cutter.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:18.881112 | import nltk
import jieba
import sudachipy
import langid
langid.set_languages(['en', 'zh', 'ja'])
def split_text_into_sentences(text):
if langid.classify(text)[0] == "en":
sentences = nltk.tokenize.sent_tokenize(text)
return sentences
elif langid.classify(text)[0] == "zh":
sentences = [... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | utils/symbol_table.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:18.931229 | # Copyright 2020 Mobvoi Inc. (authors: Fangjun Kuang)
#
# See ../../../LICENSE for clarification regarding multiple authors
#
# 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
#
# ... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | models/macros.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:20.214251 | # Text
NUM_TEXT_TOKENS = 2048
# Audio
NUM_AUDIO_TOKENS = 1024 # EnCodec RVQ bins
NUM_MEL_BINS = 100 # BigVGAN bigvgan_24khz_100band
# Speaker
NUM_SPEAKER_CLASSES = 4096
SPEAKER_EMBEDDING_DIM = 64
|
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | models/vallex.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:20.215058 | # Copyright 2023 (authors: Feiteng Li)
#
# 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... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | models/transformer.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:20.222905 | # Copyright 2023 (authors: Feiteng Li)
#
# 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... |
Plachtaa/VALL-E-X | https://github.com/Plachtaa/VALL-E-X | null | null | null | null | 7,952 | null | null | mit | null | null | null | null | null | null | null | models/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:20.252860 | import argparse
import torch.nn as nn
# from icefall.utils import AttributeDict, str2bool
from .macros import (
NUM_AUDIO_TOKENS,
NUM_MEL_BINS,
NUM_SPEAKER_CLASSES,
NUM_TEXT_TOKENS,
SPEAKER_EMBEDDING_DIM,
)
from .transformer import Transformer
from .vallex import VALLE, VALLF
from .visualizer impo... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a00_Bert/run_classifier_predict_online.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:22.700063 | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# 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 ... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a00_Bert/tokenization.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:22.708227 | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# 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 ... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a00_Bert/optimization.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:22.710864 | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# 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 ... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a00_Bert/train_bert_toy_task.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:22.712071 | # coding=utf-8
"""
train bert model
"""
import modeling
import tensorflow as tf
import numpy as np
import argparse
parser = argparse.ArgumentParser(description='Describe your program')
parser.add_argument('-batch_size', '--batch_size', type=int,default=128)
args = parser.parse_args()
batch_size=args.batch_size
print("... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a00_Bert/unused/train_bert_multi-label_old.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:22.713356 | # coding=utf-8
"""
train bert model
1.get training data and vocabulary & labels dict
2. create model
3. train the model and report f1 score
"""
import bert_modeling as modeling
import tensorflow as tf
import os
import numpy as np
from utils import load_data,init_label_dict,get_label_using_logits,get_target_label_shor... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a00_Bert/utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:22.721324 | # -*- coding: utf-8 -*-
import pickle
import h5py
import os
import numpy as np
import random
random_number=300
def load_data(cache_file_h5py,cache_file_pickle):
"""
load data from h5py and pickle cache files, which is generate by take step by step of pre-processing.ipynb
:param cache_file_h5py:
:para... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a00_Bert/bert_modeling.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:22.722550 | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# 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 ... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a00_Bert/unused/run_classifier_multi_labels_bert.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:22.742701 | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# 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 ... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a00_Bert/train_bert_multi-label.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:22.772934 | # coding=utf-8
"""
train bert model
1.get training data and vocabulary & labels dict
2. create model
3. train the model and report f1 score
"""
import bert_modeling as modeling
import tensorflow as tf
import os
import numpy as np
from utils import load_data,init_label_dict,get_target_label_short,compute_confuse_matri... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a01_FastText/p5_fastTextB_predict_multilabel.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:23.832244 | # -*- coding: utf-8 -*-
#prediction using model.
#process--->1.load data(X:list of lint,y:int). 2.create session. 3.feed data. 4.predict
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import tensorflow as tf
import numpy as np
from p5_fastTextB_model import fastTextB as fastText
from p4_zhihu_load_data import lo... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a01_FastText/p6_fastTextB_model_multilabel.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:23.833375 | # autor:xul
# fast text. using: very simple model;n-gram to captrue location information;h-softmax to speed up training/inference
# for the n-gram you can use data_util to generate. see method process_one_sentence_to_get_ui_bi_tri_gram under aa1_data_util/data_util_zhihu.py
import tensorflow as tf
class fastTextB:
... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a00_boosting/a08_boosting.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:23.834405 | # -*- coding: utf-8 -*-
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import numpy as np
import tensorflow as tf
#main process for boosting:
#1.compute label weight after each epoch using validation data.
#2.get weights for each batch during traininig process
#3.compute loss using cross entropy with ... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a01_FastText/old_single_label/p5_fastTextB_model.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:23.835506 | # fast text. using: very simple model;n-gram to captrue location information;h-softmax to speed up training/inference
# for the n-gram you can use data_util to generate. see method process_one_sentence_to_get_ui_bi_tri_gram under aa1_data_util/data_util_zhihu.py
print("started...")
import tensorflow as tf
import numpy ... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a01_FastText/old_single_label/p5_fastTextB_predict.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:23.836920 | # -*- coding: utf-8 -*-
#prediction using model.
#process--->1.load data(X:list of lint,y:int). 2.create session. 3.feed data. 4.predict
try:
reload # Python 2
except NameError:
from importlib import reload # Python 3
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import tensorflo... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a02_TextCNN/data_util.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:23.838533 | # -*- coding: utf-8 -*-
import codecs
import random
import numpy as np
from tflearn.data_utils import pad_sequences
from collections import Counter
import os
import pickle
PAD_ID = 0
UNK_ID=1
_PAD="_PAD"
_UNK="UNK"
def load_data_multilabel(traning_data_path,vocab_word2index, vocab_label2index,sentence_len,training_p... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a01_FastText/p6_fastTextB_train_multilabel.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:23.844092 | # -*- coding: utf-8 -*-
"""
training the model.
process--->1.load data(X:list of lint,y:int). 2.create session. 3.feed data. 4.training (5.validation) ,(6.prediction)
fast text. using: very simple model;n-gram to captrue location information;h-softmax to speed up training/inference
for the n-gram,you can use data_util ... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a01_FastText/old_single_label/p5_fastTextB_train.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:23.874149 | # -*- coding: utf-8 -*-
#training the model.
#process--->1.load data(X:list of lint,y:int). 2.create session. 3.feed data. 4.training (5.validation) ,(6.prediction)
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import tensorflow as tf
import numpy as np
from p5_fastTextB_model import fastTextB as fastText
from ... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a02_TextCNN/other_experiement/p7_TextCNN_predict_exp512_0609.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:25.480470 | # -*- coding: utf-8 -*-
#prediction using model.
#process--->1.load data(X:list of lint,y:int). 2.create session. 3.feed data. 4.predict
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import tensorflow as tf
import numpy as np
#from p5_fastTextB_model import fastTextB as fastText
from data_util_zhihu import load... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a02_TextCNN/other_experiement/p7_TextCNN_predict_ensemble.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:25.481831 | from p7_TextCNN_predict import get_logits_with_value_by_input
from p7_TextCNN_predict_exp import get_logits_with_value_by_input_exp
import tensorflow as tf
def main(_):
for start in range(217360):
end=start+1
label_list,p_list=get_logits_with_value_by_input(start,end)
label_list_exp, p_list... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a02_TextCNN/other_experiement/p7_TextCNN_predict_exp512_simple.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:25.492581 | # -*- coding: utf-8 -*-
#prediction using model.
#process--->1.load data(X:list of lint,y:int). 2.create session. 3.feed data. 4.predict
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import tensorflow as tf
import numpy as np
#from p5_fastTextB_model import fastTextB as fastText
from data_util_zhihu import load... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a02_TextCNN/other_experiement/p7_TextCNN_predict_exp512.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:25.523582 | # -*- coding: utf-8 -*-
#prediction using model.
#process--->1.load data(X:list of lint,y:int). 2.create session. 3.feed data. 4.predict
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import tensorflow as tf
import numpy as np
#from p5_fastTextB_model import fastTextB as fastText
from data_util_zhihu import load... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a02_TextCNN/other_experiement/p7_TextCNN_predict_exp.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:25.604480 | # -*- coding: utf-8 -*-
#prediction using model.
#process--->1.load data(X:list of lint,y:int). 2.create session. 3.feed data. 4.predict
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import tensorflow as tf
import numpy as np
#from p5_fastTextB_model import fastTextB as fastText
from data_util_zhihu import load... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a02_TextCNN/other_experiement/p7_TextCNN_model_multilayers.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:25.717105 | # -*- coding: utf-8 -*-
#TextCNN: 1. embeddding layers, 2.convolutional layer, 3.max-pooling, 4.softmax layer.
# print("started...")
import tensorflow as tf
import numpy as np
class TextCNNMultilayers:
def __init__(self, filter_sizes,num_filters,num_classes, learning_rate, batch_size, decay_steps, decay_rate,seque... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a02_TextCNN/other_experiement/data_util_zhihu.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:25.718503 | # -*- coding: utf-8 -*-
import codecs
import numpy as np
#load data of zhihu
import word2vec
import os
import pickle
PAD_ID = 0
from tflearn.data_utils import pad_sequences
_GO="_GO"
_END="_END"
_PAD="_PAD"
#use pretrained word embedding to get word vocabulary and labels, and its relationship with index
def create_voa... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a02_TextCNN/other_experiement/p7_TextCNN_train_exp512.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:26.377587 | # -*- coding: utf-8 -*-
#training the model.
#process--->1.load data(X:list of lint,y:int). 2.create session. 3.feed data. 4.training (5.validation) ,(6.prediction)
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import tensorflow as tf
import numpy as np
from p7_TextCNN_model import TextCNN
from data_util_zhihu ... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a02_TextCNN/p7_temp.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:26.738448 | # -*- coding: utf-8 -*-
import random
def read_write(source_file_path,target_file_path):
# 1.read file
source_file_object=open(source_file_path,mode='r')
target_file_object=open(target_file_path,mode='a')
lines=source_file_object.readlines()
random.shuffle(lines)
# 2.write file
for i,line i... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a03_TextRNN/p8_TextRNN_model.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:27.024583 | # -*- coding: utf-8 -*-
#TextRNN: 1. embeddding layer, 2.Bi-LSTM layer, 3.concat output, 4.FC layer, 5.softmax
import tensorflow as tf
from tensorflow.contrib import rnn
import numpy as np
class TextRNN:
def __init__(self,num_classes, learning_rate, batch_size, decay_steps, decay_rate,sequence_length,
... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a02_TextCNN/other_experiement/p8_TextCNN_predict_exp.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:27.119242 | # -*- coding: utf-8 -*-
#prediction using model.
#process--->1.load data(X:list of lint,y:int). 2.create session. 3.feed data. 4.predict
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import tensorflow as tf
import numpy as np
#from p5_fastTextB_model import fastTextB as fastText
from data_util_zhihu import load... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a02_TextCNN/p7_TextCNN_model.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:27.120516 | # -*- coding: utf-8 -*-
#TextCNN: 1. embeddding layers, 2.convolutional layer, 3.max-pooling, 4.softmax layer.
# print("started...")
import tensorflow as tf
import numpy as np
class TextCNN:
def __init__(self, filter_sizes,num_filters,num_classes, learning_rate, batch_size, decay_steps, decay_rate,sequence_length,... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a02_TextCNN/other_experiement/p7_TextCNN_train_exp_512_0609.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:27.354431 | # -*- coding: utf-8 -*-
#training the model.
#process--->1.load data(X:list of lint,y:int). 2.create session. 3.feed data. 4.training (5.validation) ,(6.prediction)
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import tensorflow as tf
import numpy as np
from p7_TextCNN_model import TextCNN
from data_util_zhihu ... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a03_TextRNN/p8_TextRNN_model_multi_layers.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:27.384411 | # -*- coding: utf-8 -*-
#TextRNN: 1. embeddding layer, 2.Bi-LSTM layer, 3.concat output, 4.FC layer, 5.softmax
import tensorflow as tf
from tensorflow.contrib import rnn
import numpy as np
class TextRNN:
def __init__(self,num_classes, learning_rate, batch_size, decay_steps, decay_rate,sequence_length,
... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a03_TextRNN/p8_TextRNN_predict.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:27.598100 | # -*- coding: utf-8 -*-
#prediction using model.
#process--->1.load data(X:list of lint,y:int). 2.create session. 3.feed data. 4.predict
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import tensorflow as tf
import numpy as np
from p8_TextRNN_model import TextRNN
from data_util_zhihu import load_data_predict,loa... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a04_TextRCNN/p71_TextRCNN_mode2.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:27.735680 | # -*- coding: utf-8 -*-
#TextRNN: 1. embeddding layer, 2.Bi-LSTM layer, 3.concat output, 4.FC layer, 5.softmax
import tensorflow as tf
import numpy as np
import copy
class TextRCNN:
def __init__(self,num_classes, learning_rate, decay_steps, decay_rate,sequence_length,
vocab_size,embed_size,is_train... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a03_TextRNN/p8_TextRNN_train.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:27.828757 | # -*- coding: utf-8 -*-
#training the model.
#process--->1.load data(X:list of lint,y:int). 2.create session. 3.feed data. 4.training (5.validation) ,(6.prediction)
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import tensorflow as tf
import numpy as np
from p8_TextRNN_model import TextRNN
from data_util_zhihu ... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a04_TextRCNN/p71_TextRCNN_model.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:28.233243 | # -*- coding: utf-8 -*-
#TextRNN: 1. embeddding layer, 2.Bi-LSTM layer, 3.concat output, 4.FC layer, 5.softmax
import tensorflow as tf
import numpy as np
import copy
class TextRCNN:
def __init__(self,num_classes, learning_rate, batch_size, decay_steps, decay_rate,sequence_length,
vocab_size,embed_s... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a04_TextRCNN/p71_TextRCNN_predict.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:28.234253 | # -*- coding: utf-8 -*-
#prediction using model.
#process--->1.load data(X:list of lint,y:int). 2.create session. 3.feed data. 4.predict
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import tensorflow as tf
import numpy as np
from data_util_zhihu import load_data_predict,load_final_test_data,create_voabulary,cr... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a05_HierarchicalAttentionNetwork/p1_HierarchicalAttention_model.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:28.763742 | # -*- coding: utf-8 -*-
# HierarchicalAttention: 1.Word Encoder. 2.Word Attention. 3.Sentence Encoder 4.Sentence Attention 5.linear classifier. 2017-06-13
import tensorflow as tf
import numpy as np
import tensorflow.contrib as tf_contrib
class HierarchicalAttention:
def __init__(self, num_classes, learning_rate, b... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a05_HierarchicalAttentionNetwork/p1_HierarchicalAttention_model_transformer.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:28.908209 | # -*- coding: utf-8 -*-
# HierarchicalAttention: 1.Word Encoder. 2.Word Attention. 3.Sentence Encoder 4.Sentence Attention 5.linear classifier. 2017-06-13
import tensorflow as tf
import numpy as np
import tensorflow.contrib as tf_contrib
from a2_multi_head_attention import MultiHeadAttention
from a2_poistion_wise_feed... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a05_HierarchicalAttentionNetwork/p1_HierarchicalAttention_predict.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:28.938625 | # -*- coding: utf-8 -*-
#prediction using model.
#process--->1.load data(X:list of lint,y:int). 2.create session. 3.feed data. 4.predict
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import tensorflow as tf
import numpy as np
from data_util_zhihu import load_data_predict,load_final_test_data,create_voabulary,cr... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a04_TextRCNN/p71_TextRCNN_train.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:29.239869 | # -*- coding: utf-8 -*-
#training the model.
#process--->1.load data(X:list of lint,y:int). 2.create session. 3.feed data. 4.training (5.validation) ,(6.prediction)
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import tensorflow as tf
import numpy as np
from p71_TextRCNN_mode2 import TextRCNN
from data_util_zhi... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a05_HierarchicalAttentionNetwork/p1_HierarchicalAttention_train.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:29.426038 | # -*- coding: utf-8 -*-
#training the model.
#process--->1.load data(X:list of lint,y:int). 2.create session. 3.feed data. 4.training (5.validation) ,(6.prediction)
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import tensorflow as tf
import numpy as np
from p1_HierarchicalAttention_model import HierarchicalAtt... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a05_HierarchicalAttentionNetwork/p1_seq2seq.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:29.538490 | # -*- coding: utf-8 -*-
import tensorflow as tf
# 【该方法测试的时候使用】返回一个方法。这个方法根据输入的值,得到对应的索引,再得到这个词的embedding.
def extract_argmax_and_embed(embedding, output_projection=None):
"""
Get a loop_function that extracts the previous symbol and embeds it. Used by decoder.
:param embedding: embedding tensor for symbol
... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a06_Seq2seqWithAttention/a1_seq2seq.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:29.571850 | # -*- coding: utf-8 -*-
import tensorflow as tf
# 【该方法测试的时候使用】返回一个方法。这个方法根据输入的值,得到对应的索引,再得到这个词的embedding.
def extract_argmax_and_embed(embedding, output_projection=None):
"""
Get a loop_function that extracts the previous symbol and embeds it. Used by decoder.
:param embedding: embedding tensor for symbol
... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a02_TextCNN/other_experiement/p7_TextCNN_train_exp.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:29.683871 | # -*- coding: utf-8 -*-
#training the model.
#process--->1.load data(X:list of lint,y:int). 2.create session. 3.feed data. 4.training (5.validation) ,(6.prediction)
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import tensorflow as tf
import numpy as np
from p7_TextCNN_model import TextCNN
from data_util_zhihu ... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a02_TextCNN/p7_TextCNN_predict.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:31.600786 | # -*- coding: utf-8 -*-
#prediction using model.
#process--->1.load data(X:list of lint,y:int). 2.create session. 3.feed data. 4.predict
# currently this file is not well test, so you can just ignore this file util it is tested or write a function, input is
# a strings,output is predicted labels.
import sys
reload(sys)... |
brightmart/text_classification | https://github.com/brightmart/text_classification | null | null | null | null | 7,942 | null | null | mit | null | null | null | null | null | null | null | a02_TextCNN/p7_TextCNN_train.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:31.629943 | # -*- coding: utf-8 -*-
#import sys
#reload(sys)
#sys.setdefaultencoding('utf-8') #gb2312
#training the model.
#process--->1.load data(X:list of lint,y:int). 2.create session. 3.feed data. 4.training (5.validation) ,(6.prediction)
#import sys
#reload(sys)
#sys.setdefaultencoding('utf8')
import tensorflow as tf
import n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.