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
jowilf/starlette-admin
https://github.com/jowilf/starlette-admin
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
examples/beanie/models.py
null
null
null
null
null
null
Python
2026-05-04T01:32:20.672432
from enum import Enum from typing import Optional from beanie import Document, Link from pydantic import EmailStr, Field, HttpUrl, PastDate class Category(Enum): ELECTRONICS = "Electronics" FASHION = "Fashion" HOME = "Home" BEAUTY = "Beauty" class Product(Document): name: str = Field(min_length...
jowilf/starlette-admin
https://github.com/jowilf/starlette-admin
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
examples/beanie/dependencies.py
null
null
null
null
null
null
Python
2026-05-04T01:32:20.685426
import os from pathlib import Path from typing import List from beanie import init_beanie from motor.motor_asyncio import AsyncIOMotorClient from pydantic import BaseModel, TypeAdapter from .models import Category, Manager, Product, Store ALL_MODELS = [Product, Store, Manager] MONGO_URI: str = os.environ.get("MONGO...
jowilf/starlette-admin
https://github.com/jowilf/starlette-admin
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
examples/auth/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:32:20.730303
from sqlalchemy import create_engine from sqlalchemy.orm import declarative_base from .config import ENGINE_URI engine = create_engine(ENGINE_URI, connect_args={"check_same_thread": False}, echo=True) Base = declarative_base()
jowilf/starlette-admin
https://github.com/jowilf/starlette-admin
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
examples/custom_actions/app.py
null
null
null
null
null
null
Python
2026-05-04T01:32:21.501833
import os from starlette.applications import Starlette from starlette.responses import HTMLResponse from starlette.routing import Route from starlette_admin.contrib.sqla import Admin from . import Base, engine from .config import DATABASE_FILE from .models import Article, ArticleView from .seed import fill_db def i...
jowilf/starlette-admin
https://github.com/jowilf/starlette-admin
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
examples/mongoengine/app.py
null
null
null
null
null
null
Python
2026-05-04T01:32:21.931853
from starlette.applications import Starlette from starlette.responses import HTMLResponse from starlette.routing import Route from starlette_admin.contrib.mongoengine import Admin, ModelView from mongoengine import connect, disconnect from .models import File, Image, Post, Tag, Todo, User app = Starlette( routes...
jowilf/starlette-admin
https://github.com/jowilf/starlette-admin
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
examples/mongoengine/models.py
null
null
null
null
null
null
Python
2026-05-04T01:32:22.053408
from datetime import datetime import mongoengine as db class User(db.Document): name = db.StringField(max_length=40) tags = db.ListField(db.ReferenceField("Tag")) password = db.StringField(max_length=40) class Tag(db.Document): name = db.StringField(max_length=10) class Todo(db.Document): tit...
jowilf/starlette-admin
https://github.com/jowilf/starlette-admin
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
examples/custom-backend/app.py
null
null
null
null
null
null
Python
2026-05-04T01:32:22.150138
from starlette.applications import Starlette from starlette.responses import HTMLResponse from starlette.routing import Route from starlette_admin import BaseAdmin as Admin from tinydb import TinyDB from .config import DATABASE_FILE from .view import PostView db = TinyDB(DATABASE_FILE) app = Starlette( routes=[ ...
jowilf/starlette-admin
https://github.com/jowilf/starlette-admin
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
examples/custom-backend/view.py
null
null
null
null
null
null
Python
2026-05-04T01:32:22.160470
from operator import attrgetter from typing import Any, Dict, List, Optional, Sequence, Union from starlette.requests import Request from starlette_admin import ( BaseModelView, CollectionField, IntegerField, ListField, StringField, TextAreaField, ) from starlette_admin.exceptions import FormVa...
jowilf/starlette-admin
https://github.com/jowilf/starlette-admin
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
examples/custom-backend/models.py
null
null
null
null
null
null
Python
2026-05-04T01:32:22.175630
import re from dataclasses import asdict, dataclass, field from typing import Any, Dict, List, Optional, TypedDict from tinydb import Query from tinydb.table import Document class Comment(TypedDict): username: str body: str @dataclass class Post: title: str body: str tags: List[str] comment...
jowilf/starlette-admin
https://github.com/jowilf/starlette-admin
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
examples/custom_actions/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:32:22.357422
from sqlalchemy import create_engine from sqlalchemy.orm import declarative_base from .config import ENGINE_URI engine = create_engine(ENGINE_URI, connect_args={"check_same_thread": False}, echo=True) Base = declarative_base()
jowilf/starlette-admin
https://github.com/jowilf/starlette-admin
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
examples/odmantic/app.py
null
null
null
null
null
null
Python
2026-05-04T01:32:22.479460
from starlette.applications import Starlette from starlette.responses import HTMLResponse from starlette.routing import Route from starlette_admin.contrib.odmantic import Admin, ModelView from odmantic import AIOEngine from .models import Author, Book from .views import AuthorView engine = AIOEngine() app = Starlett...
jowilf/starlette-admin
https://github.com/jowilf/starlette-admin
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
examples/odmantic/models.py
null
null
null
null
null
null
Python
2026-05-04T01:32:22.619699
from enum import Enum from typing import List, Optional from pydantic import EmailStr from odmantic import EmbeddedModel, Field, Model, Reference class Address(EmbeddedModel): street: str = Field(min_length=3) city: str = Field(min_length=3) state: Optional[str] zipcode: Optional[str] class Author...
jowilf/starlette-admin
https://github.com/jowilf/starlette-admin
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
examples/sqla-file/app.py
null
null
null
null
null
null
Python
2026-05-04T01:32:22.748291
from sqlalchemy import create_engine from starlette.applications import Starlette from starlette.responses import HTMLResponse from starlette.routing import Route from starlette_admin.contrib.sqla import Admin, ModelView from .config import ENGINE_URI from .models import Author, Base, Book, Dump from .storage import c...
jowilf/starlette-admin
https://github.com/jowilf/starlette-admin
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
examples/odmantic/views.py
null
null
null
null
null
null
Python
2026-05-04T01:32:22.751010
from typing import Any from starlette.requests import Request from starlette_admin.contrib.odmantic import ModelView from .models import Author class AuthorView(ModelView): exclude_fields_from_list = [Author.addresses] fields_default_sort = [Author.last_name, ("first_name", True)] async def repr(self, ...
jowilf/starlette-admin
https://github.com/jowilf/starlette-admin
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
examples/sqla-file/config.py
null
null
null
null
null
null
Python
2026-05-04T01:32:22.775771
DATABASE_FILE = "sample_db.sqlite" ENGINE_URI = "sqlite:///" + DATABASE_FILE UPLOAD_DIR = "upload/"
jowilf/starlette-admin
https://github.com/jowilf/starlette-admin
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
examples/sqla-file/storage.py
null
null
null
null
null
null
Python
2026-05-04T01:32:23.312219
import os from libcloud.storage.base import StorageDriver from libcloud.storage.providers import get_driver from libcloud.storage.types import ContainerDoesNotExistError, Provider from sqlalchemy_file.storage import StorageManager from .config import UPLOAD_DIR def get_or_create_container(driver: StorageDriver, con...
jowilf/starlette-admin
https://github.com/jowilf/starlette-admin
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
examples/sqla-file/models.py
null
null
null
null
null
null
Python
2026-05-04T01:32:23.424376
from sqlalchemy import Column, ForeignKey, Integer, String from sqlalchemy.orm import declarative_base, relationship from sqlalchemy_file import FileField, ImageField from sqlalchemy_file.validators import ContentTypeValidator, SizeValidator Base = declarative_base() class Author(Base): __tablename__ = "author" ...
jowilf/starlette-admin
https://github.com/jowilf/starlette-admin
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
examples/sqla-pydantic/models.py
null
null
null
null
null
null
Python
2026-05-04T01:32:23.648225
import uuid from sqlalchemy import Column, DateTime, ForeignKey, Integer, String, Text from sqlalchemy.orm import declarative_base, relationship from sqlalchemy_utils import ( EmailType, IPAddressType, URLType, UUIDType, ) Base = declarative_base() class User(Base): __tablename__ = "model" ...
jowilf/starlette-admin
https://github.com/jowilf/starlette-admin
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
examples/sqla/models.py
null
null
null
null
null
null
Python
2026-05-04T01:32:24.295904
import enum from datetime import datetime from sqlalchemy import ( Column, Date, DateTime, Enum, ForeignKey, Integer, String, Table, Text, Unicode, ) from sqlalchemy.orm import declarative_base, relationship Base = declarative_base() class User(Base): __tablename__ = "use...
jowilf/starlette-admin
https://github.com/jowilf/starlette-admin
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
examples/sqla-pydantic/app.py
null
null
null
null
null
null
Python
2026-05-04T01:32:24.458964
from sqlalchemy import ( create_engine, ) from starlette.applications import Starlette from starlette.responses import HTMLResponse from starlette.routing import Route from starlette_admin.contrib.sqla import Admin from starlette_admin.contrib.sqla.ext.pydantic import ModelView from .config import ENGINE_URI from ...
jowilf/starlette-admin
https://github.com/jowilf/starlette-admin
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
examples/sqla/views.py
null
null
null
null
null
null
Python
2026-05-04T01:32:24.741880
from datetime import date, timedelta from typing import Any, Dict from sqlalchemy.exc import IntegrityError from starlette.requests import Request from starlette_admin import EnumField, ExportType, StringField from starlette_admin.contrib.sqla import ModelView from starlette_admin.exceptions import FormValidationError...
jowilf/starlette-admin
https://github.com/jowilf/starlette-admin
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
examples/sqla_multiple_pks/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:32:24.877151
from sqlalchemy import create_engine from sqlalchemy.orm import declarative_base, sessionmaker from .config import ENGINE_URI __all__ = ["Base", "engine"] engine = create_engine(ENGINE_URI, connect_args={"check_same_thread": False}, echo=True) Base = declarative_base()
jowilf/starlette-admin
https://github.com/jowilf/starlette-admin
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
examples/custom_actions/models.py
null
null
null
null
null
null
Python
2026-05-04T01:32:26.248345
import enum from typing import Any, List from sqlalchemy import Column, Enum, Integer, String, Text from sqlalchemy.orm import Session from starlette.requests import Request from starlette.responses import RedirectResponse, Response from starlette_admin import RowActionsDisplayType, action, link_row_action, row_action...
jowilf/starlette-admin
https://github.com/jowilf/starlette-admin
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
examples/custom_actions/seed.py
null
null
null
null
null
null
Python
2026-05-04T01:32:26.334472
import random from sqlalchemy.orm import Session from . import engine from .models import Article, Status fixture = [ { "title": "His mother had always taught him", "body": "His mother had always taught him not to ever think of himself as better than others. He'd tried to live by this motto. He n...
jowilf/starlette-admin
https://github.com/jowilf/starlette-admin
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
examples/sqla-pydantic/schemas.py
null
null
null
null
null
null
Python
2026-05-04T01:32:28.713750
import uuid from datetime import datetime from typing import Optional from pydantic import BaseModel, EmailStr, Field, HttpUrl, IPvAnyAddress, validator class UserIn(BaseModel): id: Optional[int] uuid: Optional[uuid.UUID] full_name: str = Field(min_length=3) website: HttpUrl email: EmailStr i...
jowilf/starlette-admin
https://github.com/jowilf/starlette-admin
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
examples/sqla/app.py
null
null
null
null
null
null
Python
2026-05-04T01:32:28.988384
from sqlalchemy import create_engine from starlette.applications import Starlette from starlette.responses import HTMLResponse from starlette.routing import Route from starlette_admin import DropDown from starlette_admin.contrib.sqla import Admin, ModelView from starlette_admin.views import Link from .config import EN...
lzjun567/zhihu-api
https://github.com/lzjun567/zhihu-api
null
null
null
null
987
null
null
mit
null
null
null
null
null
null
null
zhihu/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:32:31.382561
#!/usr/bin/env python3 import zhihu from zhihu.models import answer from zhihu.models import user from zhihu.models import question from zhihu.models import column from zhihu.models import account from zhihu.models import collection __author__ = 'liuzhijun' __license__ = 'MIT' __all__ = ["Answer", "User", "Question",...
lzjun567/zhihu-api
https://github.com/lzjun567/zhihu-api
null
null
null
null
987
null
null
mit
null
null
null
null
null
null
null
test/column.py
null
null
null
null
null
null
Python
2026-05-04T01:32:31.437633
# encoding: utf-8 import unittest from zhihu import Column class ColumnTestCase(unittest.TestCase): def test_followers_with_slug(self): slug = "pythoneer" data = Column(slug=slug).followers(limit=10) self.assertEqual(10, len(data)) def test_followers_with_url(self): url = "h...
lzjun567/zhihu-api
https://github.com/lzjun567/zhihu-api
null
null
null
null
987
null
null
mit
null
null
null
null
null
null
null
test/common.py
null
null
null
null
null
null
Python
2026-05-04T01:32:31.495972
# encoding: utf-8 import time import unittest from zhihu import User from zhihu.error import ZhihuError class CommonTestCase(unittest.TestCase): def test_user_profile(self): """ 获取用户信息 :return: """ user = User() profile = user.user(user_slug="xiaoxiaodouzi") ...
lzjun567/zhihu-api
https://github.com/lzjun567/zhihu-api
null
null
null
null
987
null
null
mit
null
null
null
null
null
null
null
test/login.py
null
null
null
null
null
null
Python
2026-05-04T01:32:31.496973
# Python 3.6.1 import requests.utils import pickle from http.cookies import SimpleCookie from zhihu import User from zhihu import Answer from zhihu import Account zhihu = User() print(zhihu.cookies) # 用户登录 account = Account() result = account.login() print(result) # 查看用户profile 成功 # profile = zhihu.profile(user_sl...
lzjun567/zhihu-api
https://github.com/lzjun567/zhihu-api
null
null
null
null
987
null
null
mit
null
null
null
null
null
null
null
test/user.py
null
null
null
null
null
null
Python
2026-05-04T01:32:31.550459
# encoding: utf-8 import unittest from zhihu.models.user import User __author__ = 'liuzhijun' class UserTestCase(unittest.TestCase): def test_user_profile(self): """ 获取用户信息 :return: """ profile = User().profile(user_url="https://www.zhihu.com/people/zhijun-liu") ...
lzjun567/zhihu-api
https://github.com/lzjun567/zhihu-api
null
null
null
null
987
null
null
mit
null
null
null
null
null
null
null
zhihu/decorators/slug.py
null
null
null
null
null
null
Python
2026-05-04T01:32:31.949195
# encoding: utf-8 """ 判断方法中的是否有 usr_slug 参数的方法 如果有user_url,就自动专程user_slug """ from zhihu.error import ZhihuError def slug(func): def wrapper(self, *args, **kwargs): if "user_url" not in kwargs and 'user_slug' not in kwargs: raise ZhihuError("至少指定[user_url, user_slug]中的任意一个关键字参数") if ...
lzjun567/zhihu-api
https://github.com/lzjun567/zhihu-api
null
null
null
null
987
null
null
mit
null
null
null
null
null
null
null
zhihu/decorators/auth.py
null
null
null
null
null
null
Python
2026-05-04T01:32:32.003345
# encoding: utf-8 """ 用户认证装饰器(判断用户是否已经登录) """ import requests import requests.utils from zhihu.models.account import Account def authenticated(func): def wrapper(self, *args, **kwargs): success = False # 先判断有没有cookie文件, 再判断cookie是否有效 if 'z_c0' in requests.utils.dict_from_cookiejar(self....
lzjun567/zhihu-api
https://github.com/lzjun567/zhihu-api
null
null
null
null
987
null
null
mit
null
null
null
null
null
null
null
zhihu/error.py
null
null
null
null
null
null
Python
2026-05-04T01:32:32.027561
# encoding: utf-8 __author__ = 'liuzhijun' class ZhihuError(Exception): def __init__(self, *args, **kwargs): super(ZhihuError, self).__init__(*args, **kwargs)
lzjun567/zhihu-api
https://github.com/lzjun567/zhihu-api
null
null
null
null
987
null
null
mit
null
null
null
null
null
null
null
zhihu/models/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:32:32.090457
# encoding: utf-8 import os import platform import re import subprocess from enum import Enum import requests import requests.packages.urllib3 as urllib3 from bs4 import BeautifulSoup from zhihu import settings from zhihu.error import ZhihuError from zhihu.url import URL urllib3.disable_warnings(urllib3.exceptions....
lzjun567/zhihu-api
https://github.com/lzjun567/zhihu-api
null
null
null
null
987
null
null
mit
null
null
null
null
null
null
null
zhihu/main.py
null
null
null
null
null
null
Python
2026-05-04T01:32:32.091649
#!/usr/bin/env python3 import logging # from zhihu import Answer # from zhihu import Account # account = Account() # account.login("邮箱地址或者手机号码", "这里是密码") # account.login("+33752962193", "zhihudetail") # from zhihu import Zhihu # # z = Zhihu() # z.user(user_slug="liuzhijun001") # # # def vote_up_with_id(): # data...
lzjun567/zhihu-api
https://github.com/lzjun567/zhihu-api
null
null
null
null
987
null
null
mit
null
null
null
null
null
null
null
test/answer.py
null
null
null
null
null
null
Python
2026-05-04T01:32:32.133996
# encoding: utf-8 import random from zhihu import Answer import unittest import time class AnswerTestCase(unittest.TestCase): def test_vote_up_with_id(self): data = Answer(id=14005147).vote_up() self.assertIn("voting", data) self.assertIn("voteup_count", data) def test_vote_up_with_u...
lzjun567/zhihu-api
https://github.com/lzjun567/zhihu-api
null
null
null
null
987
null
null
mit
null
null
null
null
null
null
null
zhihu/models/account.py
null
null
null
null
null
null
Python
2026-05-04T01:32:32.158111
# encoding: utf-8 import os import logging import re import time from bs4 import BeautifulSoup import execjs # 加密 from urllib.parse import urlencode from urllib.parse import quote from zhihu import settings from zhihu.models.base import Model from zhihu.error import ZhihuError from zhihu.models import RequestDataTyp...
lzjun567/zhihu-api
https://github.com/lzjun567/zhihu-api
null
null
null
null
987
null
null
mit
null
null
null
null
null
null
null
test/question.py
null
null
null
null
null
null
Python
2026-05-04T01:32:32.202256
# encoding: utf-8 import unittest from zhihu import Question class QuestionTestCase(unittest.TestCase): def test_follow_question_with_id(self): data = Question(id=32096743).follow_question() self.assertEqual({"is_following": True}, data) def test_unfollow_question_with_id(self): data...
lzjun567/zhihu-api
https://github.com/lzjun567/zhihu-api
null
null
null
null
987
null
null
mit
null
null
null
null
null
null
null
setup.py
null
null
null
null
null
null
Python
2026-05-04T01:32:32.203676
# -*- encoding: UTF-8 -*- try: from setuptools import setup, find_packages except ImportError: from distutils.core import setup import io VERSION = '0.2.6' with io.open("README.md", encoding='utf-8') as f: long_description = f.read() install_requires = open("requirements.txt").readlines() setup( nam...
lzjun567/zhihu-api
https://github.com/lzjun567/zhihu-api
null
null
null
null
987
null
null
mit
null
null
null
null
null
null
null
zhihu/models/answer.py
null
null
null
null
null
null
Python
2026-05-04T01:32:32.540838
# encoding: utf-8 import os import re from urllib.parse import urlparse import requests from bs4 import BeautifulSoup from zhihu.decorators.auth import authenticated from zhihu.error import ZhihuError from zhihu.models.base import Model from zhihu.url import URL class Answer(Model): def __init__(self, id=None,...
lzjun567/zhihu-api
https://github.com/lzjun567/zhihu-api
null
null
null
null
987
null
null
mit
null
null
null
null
null
null
null
zhihu/models/base.py
null
null
null
null
null
null
Python
2026-05-04T01:32:32.624885
# encoding: utf-8 """ 获取知乎数据对象的抽象既基类,任何对象都可以继承该类 比如 Answer, Question, Account """ import os import execjs # 加密 from urllib.parse import urlencode import platform import re from http import cookiejar import subprocess import hmac from hashlib import sha1 import json import base64 import requests import requests....
lzjun567/zhihu-api
https://github.com/lzjun567/zhihu-api
null
null
null
null
987
null
null
mit
null
null
null
null
null
null
null
zhihu/models/collection.py
null
null
null
null
null
null
Python
2026-05-04T01:32:32.652976
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Date : 2019-06-26 20:08:54 # @Author : Kelly Hwong from zhihu.models.base import Model from zhihu.decorators.auth import authenticated from zhihu.decorators.slug import slug from zhihu.error import ZhihuError from zhihu.url import URL class Collection(Model): ...
lzjun567/zhihu-api
https://github.com/lzjun567/zhihu-api
null
null
null
null
987
null
null
mit
null
null
null
null
null
null
null
zhihu/models/column.py
null
null
null
null
null
null
Python
2026-05-04T01:32:32.695629
# encoding: utf-8 import re from zhihu.decorators.auth import authenticated from zhihu.models.base import Model from zhihu.error import ZhihuError from zhihu.settings import ZHUANLAN_HEADERS from zhihu.url import URL class Column(Model): """ 专栏 """ def __init__(self, slug=None, url=None): s...
lzjun567/zhihu-api
https://github.com/lzjun567/zhihu-api
null
null
null
null
987
null
null
mit
null
null
null
null
null
null
null
zhihu/models/question.py
null
null
null
null
null
null
Python
2026-05-04T01:32:32.721423
# encoding: utf-8 import re from zhihu.decorators.auth import authenticated from zhihu.models.base import Model from zhihu.error import ZhihuError from zhihu.url import URL class Question(Model): def __init__(self, id=None, url=None): id = id if id is not None else self._extract_id(url) if not i...
lzjun567/zhihu-api
https://github.com/lzjun567/zhihu-api
null
null
null
null
987
null
null
mit
null
null
null
null
null
null
null
zhihu/settings.py
null
null
null
null
null
null
Python
2026-05-04T01:32:32.724720
# encoding: utf-8 import os.path # UserAgent list user_agent_list = [ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) " "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" ] USER_AGENT = user_agent_list[0] HEADERS = { "Host": "www.zhihu.com", "Referer": "https://www.zhihu.com...
lzjun567/zhihu-api
https://github.com/lzjun567/zhihu-api
null
null
null
null
987
null
null
mit
null
null
null
null
null
null
null
zhihu/models/user.py
null
null
null
null
null
null
Python
2026-05-04T01:32:32.736921
# encoding: utf-8 """ 通用的操作放在此模块中 """ from zhihu.models.base import Model from zhihu.decorators.auth import authenticated from zhihu.decorators.slug import slug from zhihu.error import ZhihuError from zhihu.url import URL class User(Model): @authenticated def send_message(self, content, user_id=None, user_ur...
lzjun567/zhihu-api
https://github.com/lzjun567/zhihu-api
null
null
null
null
987
null
null
mit
null
null
null
null
null
null
null
zhihu/url.py
null
null
null
null
null
null
Python
2026-05-04T01:32:32.765525
# encoding: utf-8 """ 通用URL类,知乎官方URL接口地址 """ import time class URL(object): host = "https://www.zhihu.com" zhuanlan_host = "https://zhuanlan.zhihu.com" @classmethod def api_login(cls): # API登陆 return cls.host + "/api/v3/oauth/sign_in" @classmethod def api_captcha(cls): ...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/factories/assistant_factory.py
null
null
null
null
null
null
Python
2026-05-04T01:32:41.585718
"""Factory for assistant transcript entries. This module handles creation of AssistantTranscriptEntry content into MessageContent subclasses: - AssistantTextMessage: Claude's text responses - ThinkingMessage: Extended thinking blocks """ from typing import Optional from ..models import ( AssistantTextMessage, ...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/factories/system_factory.py
null
null
null
null
null
null
Python
2026-05-04T01:32:41.624361
"""Factory for system transcript entries. This module handles creation of MessageContent from SystemTranscriptEntry: - SystemMessage: Regular system messages with level (info, warning, error) - HookSummaryMessage: Hook execution summaries Also provides: - is_system_message: Check if text content is a system message t...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/factories/agent_metadata_factory.py
null
null
null
null
null
null
Python
2026-05-04T01:32:41.625715
"""Parser for the trailing metadata block on Task/agent tool_results. Teammate-spawned agents (and async task agents — issues #79, #90, #91) embed a structured metadata block at the end of their response, e.g.: agentId: a4ca7529859c158c2 (use SendMessage with to: '...' to continue this agent) worktreePath: /....
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/factories/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:32:41.652719
"""Factory modules for creating typed objects from raw data.""" from .agent_metadata_factory import ( parse_agent_result_metadata, ) from .meta_factory import ( # Metadata creation create_meta, ) from .system_factory import ( # System message detection is_system_message, # System message creati...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/factories/task_notification_factory.py
null
null
null
null
null
null
Python
2026-05-04T01:32:41.698981
"""Factory for ``<task-notification>`` content in User entries (issue #90). Async-spawned ``Task`` agents (the kind with ``run_in_background=True``) return their final result via a synthetic User entry that Claude Code injects into the trunk session when the agent completes. The entry's ``message.content`` is a raw st...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/factories/meta_factory.py
null
null
null
null
null
null
Python
2026-05-04T01:32:41.765398
"""Factory for creating MessageMeta from transcript entries. This module handles extraction of common metadata from transcript entries that is shared across all message types. """ from ..models import BaseTranscriptEntry, MessageMeta def create_meta(transcript: BaseTranscriptEntry) -> MessageMeta: """Create Mes...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/cli.py
null
null
null
null
null
null
Python
2026-05-04T01:32:41.766607
#!/usr/bin/env python3 """CLI interface for claude-code-log.""" import logging import os import sys from pathlib import Path from typing import Optional import click from git import Repo, InvalidGitRepositoryError from .converter import ( convert_jsonl_to, convert_jsonl_to_html, ensure_fresh_cache, g...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/dag.py
null
null
null
null
null
null
Python
2026-05-04T01:32:41.879228
"""DAG-based message ordering for Claude Code transcripts. Replaces timestamp-based ordering with parentUuid → uuid graph traversal. Works at the TranscriptEntry level (before factory/rendering). See dev-docs/dag.md for the full architecture spec. """ import logging from dataclasses import dataclass, field from typi...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/cache.py
null
null
null
null
null
null
Python
2026-05-04T01:32:41.880354
#!/usr/bin/env python3 """SQLite-based cache management for Claude Code Log.""" import json import logging import os import re import sqlite3 import zlib from contextlib import contextmanager from datetime import datetime, timezone from pathlib import Path from typing import Any, Dict, Generator, List, Optional from ...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/factories/teammate_factory.py
null
null
null
null
null
null
Python
2026-05-04T01:32:42.096059
"""Factory for <teammate-message> content in User entries. Teammate messages land in User entries whose `message.content` is a raw string (loaded as a single TextContent item by create_message_content). The text carries one or more `<teammate-message>` blocks like: <teammate-message teammate_id="alice" color="blu...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/factories/tool_factory.py
null
null
null
null
null
null
Python
2026-05-04T01:32:42.169298
"""Factory for tool use and tool result content. This module handles creation of tool-related content into MessageContent subclasses: - ToolUseMessage: Tool invocations with typed inputs (BashInput, ReadInput, etc.) - ToolResultMessage: Tool results with output and context Also provides creation of tool inputs into t...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/factories/transcript_factory.py
null
null
null
null
null
null
Python
2026-05-04T01:32:42.196233
"""Factory for creating TranscriptEntry and ContentItem instances from raw data. This module creates typed model instances from JSONL transcript data: - TranscriptEntry subclasses (User, Assistant, Summary, System, QueueOperation) - ContentItem subclasses (Text, ToolUse, ToolResult, Thinking, Image) Also provides: - ...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/factories/user_factory.py
null
null
null
null
null
null
Python
2026-05-04T01:32:42.209087
"""Factory for user transcript entries. This module handles creation of MessageContent from user transcript entries: - SlashCommandMessage: Slash command invocations - CommandOutputMessage: Local command output - BashInputMessage: Bash command input - BashOutputMessage: Bash command output - UserTextMessage: Regular u...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/html/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:32:42.229057
"""HTML-specific rendering utilities package. Re-exports all functions from utils and formatter modules for backward compatibility. """ from .utils import ( css_class_from_message, escape_html, get_message_emoji, get_template_environment, is_session_header, render_collapsible_code, render_...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/html/ansi_colors.py
null
null
null
null
null
null
Python
2026-05-04T01:32:42.310956
#!/usr/bin/env python3 """ANSI escape code to HTML conversion. This module provides utilities for converting terminal ANSI escape codes to HTML with appropriate CSS classes for styling. """ import html import re from typing import Any def _escape_html(text: str) -> str: """Escape HTML special characters in text...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/html/assistant_formatters.py
null
null
null
null
null
null
Python
2026-05-04T01:32:42.372193
"""HTML formatters for assistant message content. This module formats assistant message content types to HTML. Part of the thematic formatter organization: - system_formatters.py: SystemMessage, HookSummaryMessage - user_formatters.py: SlashCommandMessage, CommandOutputMessage, BashInputMessage - assistant_formatters....
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/html/async_formatter.py
null
null
null
null
null
null
Python
2026-05-04T01:32:42.395670
"""HTML formatters for the async-agents feature (issue #90). Renders: - ``TaskOutput`` polling-tool input + output cards (minimal — the agent's full transcript already inlines as a sidechain elsewhere). - ``TaskNotificationMessage`` cards: the User entry Claude Code injects when an async-spawned ``Task`` finishes...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/html/renderer_code.py
null
null
null
null
null
null
Python
2026-05-04T01:32:42.471959
#!/usr/bin/env python3 """Code rendering utilities for syntax highlighting and diffs. This module provides utilities for rendering source code with syntax highlighting (using Pygments) and rendering diffs with intra-line highlighting. """ import difflib import fnmatch import html import os import re from typing impor...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/html/renderer.py
null
null
null
null
null
null
Python
2026-05-04T01:32:42.484674
"""HTML renderer implementation for Claude Code transcripts.""" from __future__ import annotations from pathlib import Path from typing import TYPE_CHECKING, Any, Optional, Tuple, cast if TYPE_CHECKING: from ..dag import SessionTree from ..cache import get_library_version from ..models import ( AssistantTex...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/html/system_formatters.py
null
null
null
null
null
null
Python
2026-05-04T01:32:42.677096
"""HTML formatters for system message content. This module formats SystemTranscriptEntry-derived content types to HTML. Part of the thematic formatter organization: - system_formatters.py: SystemMessage, HookSummaryMessage - user_formatters.py: SlashCommandMessage, CommandOutputMessage, etc. - assistant_formatters.py:...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/html/teammate_formatter.py
null
null
null
null
null
null
Python
2026-05-04T01:32:42.739449
"""HTML formatters for the experimental teammates feature. Renders: - ``TeammateMessage`` content (one card per ``<teammate-message>`` block via ``format_teammate_content``). - The six teammate tool-input/-output cards used by the team-lead to manage teams and teammates (``format_teamcreate_input`` … ``format_s...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/html/tool_formatters.py
null
null
null
null
null
null
Python
2026-05-04T01:32:42.791848
"""HTML rendering functions for tool use and tool result content. This module contains all HTML formatters for specific tools: - AskUserQuestion tool (input + result) - ExitPlanMode tool (input + result) - TodoWrite tool - Read/Write/Edit/Multiedit tools - Bash tool - Task tool - Generic parameter table rendering - To...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/html/user_formatters.py
null
null
null
null
null
null
Python
2026-05-04T01:32:42.808079
"""HTML formatters for user message content. This module formats non-tool user message content types to HTML. Part of the thematic formatter organization: - system_formatters.py: SystemMessage, HookSummaryMessage - user_formatters.py: SlashCommandMessage, CommandOutputMessage, etc. - assistant_formatters.py: Assistant...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/html/utils.py
null
null
null
null
null
null
Python
2026-05-04T01:32:42.812025
"""HTML-specific rendering utilities. This module contains all HTML generation code: - CSS class computation from message type and modifiers - Message emoji generation - HTML escaping and markdown rendering - Collapsible content rendering - Tool-specific HTML formatters - Message content HTML rendering - Template envi...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/image_export.py
null
null
null
null
null
null
Python
2026-05-04T01:32:42.904587
"""Image export utilities for Claude Code transcripts. This module provides format-agnostic image export functionality that can be used by both HTML and Markdown renderers. """ import base64 import binascii from pathlib import Path from typing import TYPE_CHECKING if TYPE_CHECKING: from .models import ImageConte...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/markdown/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:32:42.973748
"""Markdown renderer for Claude Code transcripts.""" from .renderer import MarkdownRenderer __all__ = ["MarkdownRenderer"]
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/markdown/renderer.py
null
null
null
null
null
null
Python
2026-05-04T01:32:43.036259
"""Markdown renderer implementation for Claude Code transcripts.""" from __future__ import annotations import functools import html as _html import json import re from pathlib import Path from typing import TYPE_CHECKING, Any, Optional import mistune from mistune.renderers.markdown import MarkdownRenderer as _Mistun...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/migrations/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:32:43.065126
"""Database migrations for Claude Code Log cache.""" from .runner import run_migrations __all__ = ["run_migrations"]
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/models.py
null
null
null
null
null
null
Python
2026-05-04T01:32:43.387902
"""Pydantic models for Claude Code transcript JSON structures.""" from dataclasses import dataclass, field from enum import Enum from typing import Any, Union, Optional, Literal from pydantic import BaseModel, Field class MessageType(str, Enum): """Primary message type classification. This enum covers both...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/parser.py
null
null
null
null
null
null
Python
2026-05-04T01:32:43.906489
#!/usr/bin/env python3 """Parse and extract data from Claude transcript JSONL files. This module provides utility functions for parsing transcript data: - extract_text_content: Extract text from content items - parse_timestamp: Parse ISO timestamps For transcript entry and content item creation, see factories/. """ ...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/migrations/runner.py
null
null
null
null
null
null
Python
2026-05-04T01:32:43.908172
"""Migration runner for SQLite cache database.""" import hashlib import re import sqlite3 from datetime import datetime from pathlib import Path from typing import List, Tuple def _get_migrations_dir() -> Path: """Get the migrations directory path.""" return Path(__file__).parent def _compute_checksum(cont...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/renderer_timings.py
null
null
null
null
null
null
Python
2026-05-04T01:32:43.909803
"""Timing utilities for renderer performance profiling. This module provides timing and performance profiling utilities for the renderer. All timing-related configuration and functionality is centralized here. """ import os import time from contextlib import contextmanager from typing import Tuple, Iterator, Any, Cal...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/tui.py
null
null
null
null
null
null
Python
2026-05-04T01:32:43.911937
#!/usr/bin/env python3 """Interactive Terminal User Interface for Claude Code Log.""" import os import webbrowser from datetime import datetime from pathlib import Path, PurePath from typing import Any, ClassVar, List, Optional, cast from textual.app import App, ComposeResult from textual.binding import Binding, Bind...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
scripts/extract_message_samples.py
null
null
null
null
null
null
Python
2026-05-04T01:32:44.115294
#!/usr/bin/env python3 """Extract sample messages for documentation. This script finds examples of each message type and content type from real session data and creates: 1. Abbreviated JSON files (readable, for documentation) 2. Full JSONL lines (complete data, for reference) The output message categories map input J...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
test/test_askuserquestion_rendering.py
null
null
null
null
null
null
Python
2026-05-04T01:32:44.712988
#!/usr/bin/env python3 """Test cases for AskUserQuestion tool rendering.""" from claude_code_log.html import ( format_askuserquestion_input, format_askuserquestion_result, ) from claude_code_log.models import ( AskUserQuestionInput, AskUserQuestionItem, AskUserQuestionOption, ) class TestAskUserQ...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
test/test_ansi_colors.py
null
null
null
null
null
null
Python
2026-05-04T01:32:44.717357
"""Tests for ANSI color code conversion to HTML.""" from claude_code_log.html.ansi_colors import convert_ansi_to_html class TestAnsiColorConversion: """Test ANSI escape code to HTML conversion.""" def test_standard_colors(self): """Test standard ANSI color codes.""" text = "\x1b[31mRed text\...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
test/test_async_agents.py
null
null
null
null
null
null
Python
2026-05-04T01:32:44.731365
"""Parser + integration tests for the async-agents feature (issue #90). Covers: - ``has_task_notification`` detection. - ``create_task_notification_message`` parsing (positive cases + edge cases). - ``parse_taskoutput_output`` parsing of the polling tool result body. - End-to-end fixture loading: Phase 3 fold (notifi...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
test/test_bash_rendering.py
null
null
null
null
null
null
Python
2026-05-04T01:32:44.756367
#!/usr/bin/env python3 """Test cases for bash command rendering functionality.""" import json import tempfile from pathlib import Path from claude_code_log.converter import load_transcript from claude_code_log.html.renderer import generate_html def test_bash_input_rendering(): """Test that bash input commands a...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
test/test_cache_integration.py
null
null
null
null
null
null
Python
2026-05-04T01:32:45.255387
#!/usr/bin/env python3 """Integration tests for cache functionality with CLI and converter.""" import json from pathlib import Path from typing import Generator from unittest.mock import patch import pytest from click.testing import CliRunner from claude_code_log.cli import main from claude_code_log.converter import...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
test/test_cache.py
null
null
null
null
null
null
Python
2026-05-04T01:32:45.363487
#!/usr/bin/env python3 """Tests for caching functionality.""" import tempfile from pathlib import Path from unittest.mock import patch import pytest from claude_code_log.cache import ( CacheManager, get_library_version, SessionCacheData, ) from claude_code_log.models import ( UserTranscriptEntry, ...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
claude_code_log/utils.py
null
null
null
null
null
null
Python
2026-05-04T01:32:45.580002
#!/usr/bin/env python3 """Utility functions for message filtering and processing.""" import re from datetime import datetime, timezone from pathlib import Path from typing import Optional from .models import ( ContentItem, DetailLevel, TextContent, TranscriptEntry, UserTranscriptEntry, ) from .fac...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
test/conftest.py
null
null
null
null
null
null
Python
2026-05-04T01:32:46.495494
"""Pytest configuration and shared fixtures.""" from pathlib import Path from typing import TYPE_CHECKING, Generator import pytest if TYPE_CHECKING: from claude_code_log.cache import CacheManager from test.snapshot_serializers import ( NormalisedHTMLSerializer, NormalisedMarkdownSerializer, ) # ======...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
test/test_cli.py
null
null
null
null
null
null
Python
2026-05-04T01:32:50.423854
#!/usr/bin/env python3 """Tests for CLI functionality and helper functions.""" import json from pathlib import Path from typing import Generator import pytest from click.testing import CliRunner from claude_code_log.cli import ( _clear_caches, _clear_output_files, _discover_projects, get_default_proj...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
test/test_combined_transcript_link.py
null
null
null
null
null
null
Python
2026-05-04T01:32:50.452460
"""Tests for combined transcript link functionality in session HTML generation.""" import tempfile from pathlib import Path from types import SimpleNamespace from claude_code_log.cache import CacheManager from claude_code_log.html.renderer import generate_session_html class TestCombinedTranscriptLink: """Test ...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
test/test_command_handling.py
null
null
null
null
null
null
Python
2026-05-04T01:32:50.482302
#!/usr/bin/env python3 """Test cases for command message handling and parsing.""" import json import tempfile from pathlib import Path from claude_code_log.converter import load_transcript from claude_code_log.html.renderer import generate_html def test_slash_command_handling(): """Test that user messages with s...
daaain/claude-code-log
https://github.com/daaain/claude-code-log
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
test/test_cache_sqlite_integrity.py
null
null
null
null
null
null
Python
2026-05-04T01:32:50.482956
#!/usr/bin/env python3 """Comprehensive SQL-level integrity tests for SQLite cache.""" import json import sqlite3 import threading import time from pathlib import Path import pytest from claude_code_log.cache import CacheManager, SessionCacheData from claude_code_log.models import ( AssistantMessageModel, As...
rmunro/pytorch_active_learning
https://github.com/rmunro/pytorch_active_learning
null
null
null
null
987
null
null
mit
null
null
null
null
null
null
null
diversity_sampling.py
null
null
null
null
null
null
Python
2026-05-04T01:32:52.443064
#!/usr/bin/env python """DIVERSITY SAMPLING Diversity Sampling examples for Active Learning in PyTorch This is an open source example to accompany Chapter 4 from the book: "Human-in-the-Loop Machine Learning" It contains four Active Learning strategies: 1. Model-based outlier sampling 2. Cluster-based sampling 3....
rmunro/pytorch_active_learning
https://github.com/rmunro/pytorch_active_learning
null
null
null
null
987
null
null
mit
null
null
null
null
null
null
null
pytorch_clusters.py
null
null
null
null
null
null
Python
2026-05-04T01:32:52.447942
#!/usr/bin/env python """Cosine distance kernal for KMeans-type clustering This is an open source example to accompany Chapter 4 from the book: "Human-in-the-Loop Machine Learning" It is a general clustering library. In this code-base, it supports three Active Learning strategies: 1. Cluster-based sampling 2. Repre...
rmunro/pytorch_active_learning
https://github.com/rmunro/pytorch_active_learning
null
null
null
null
987
null
null
mit
null
null
null
null
null
null
null
active_learning_basics.py
null
null
null
null
null
null
Python
2026-05-04T01:32:52.455597
#!/usr/bin/env python """INTRODUCTION TO ACTIVE LEARNING A simple text classification algorithm in PyTorch This is an open source example to accompany Chapter 2 from the book: "Human-in-the-Loop Machine Learning" This example tries to classify news headlines into one of two categories: disaster-related not dis...
rmunro/pytorch_active_learning
https://github.com/rmunro/pytorch_active_learning
null
null
null
null
987
null
null
mit
null
null
null
null
null
null
null
advanced_active_learning.py
null
null
null
null
null
null
Python
2026-05-04T01:32:52.458548
#!/usr/bin/env python """Diversity Sampling """ import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import random import math import datetime import csv import re import os import getopt, sys import copy from random import shuffle from collections import defaultdict fr...
rmunro/pytorch_active_learning
https://github.com/rmunro/pytorch_active_learning
null
null
null
null
987
null
null
mit
null
null
null
null
null
null
null
active_learning.py
null
null
null
null
null
null
Python
2026-05-04T01:32:52.463172
#!/usr/bin/env python """ACTIVE LEARNING This is an open source example to accompany Chapters 3 and 4 from the book: "Human-in-the-Loop Machine Learning" This example tries to classify news headlines into one of two categories: disaster-related not disaster-related """ import torch import torch.nn as nn impor...
rmunro/pytorch_active_learning
https://github.com/rmunro/pytorch_active_learning
null
null
null
null
987
null
null
mit
null
null
null
null
null
null
null
uncertainty_sampling.py
null
null
null
null
null
null
Python
2026-05-04T01:32:52.464482
#!/usr/bin/env python """UNCERTAINTY SAMPLING Uncertainty Sampling examples for Active Learning in PyTorch This is an open source example to accompany Chapter 3 from the book: "Human-in-the-Loop Machine Learning" It contains four Active Learning strategies: 1. Least Confidence Sampling 2. Margin of Confidence Sam...