最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

使用Python實(shí)現(xiàn)各種文件整理自動(dòng)化操作

 更新時(shí)間:2026年01月13日 08:58:45   作者:大神君Bob  
在日常工作中,我們經(jīng)常需要處理大量的文件:整理照片、歸檔文檔、清理臨時(shí)文件、按規(guī)則重命名等,手動(dòng)完成這些任務(wù)不僅耗時(shí),而且容易出錯(cuò),通過Python自動(dòng)化這些操作,可以讓你從繁瑣的文件管理工作中解放出,需要的朋友可以參考下

引言

在日常工作中,我們經(jīng)常需要處理大量的文件:整理照片、歸檔文檔、清理臨時(shí)文件、按規(guī)則重命名等。手動(dòng)完成這些任務(wù)不僅耗時(shí),而且容易出錯(cuò)。通過Python自動(dòng)化這些操作,可以讓你從繁瑣的文件管理工作中解放出來,專注于更有創(chuàng)造性的工作。

使用os庫操作文件目錄

os庫是Python的標(biāo)準(zhǔn)庫之一,提供了與操作系統(tǒng)交互的基本功能,包括文件和目錄操作。

創(chuàng)建和刪除目錄

import os

# 創(chuàng)建單層目錄
def create_directory(directory):
    if not os.path.exists(directory):
        os.mkdir(directory)
        print(f"目錄已創(chuàng)建: {directory}")
    else:
        print(f"目錄已存在: {directory}")

# 創(chuàng)建多層嵌套目錄
def create_nested_directories(directory_path):
    """
    創(chuàng)建多層嵌套目錄,如果父目錄不存在會(huì)自動(dòng)創(chuàng)建
    """
    if not os.path.exists(directory_path):
        os.makedirs(directory_path)
        print(f"多層目錄已創(chuàng)建: {directory_path}")
    else:
        print(f"目錄已存在: {directory_path}")

# 刪除目錄
def remove_directory(directory_path, recursive=False):
    """
    刪除目錄
    recursive: 如果為True,則遞歸刪除目錄及其內(nèi)容
    """
    if not os.path.exists(directory_path):
        print(f"目錄不存在: {directory_path}")
        return
    
    if recursive:
        import shutil
        shutil.rmtree(directory_path)
        print(f"已遞歸刪除目錄: {directory_path}")
    else:
        try:
            os.rmdir(directory_path)
            print(f"已刪除空目錄: {directory_path}")
        except OSError as e:
            print(f"刪除失敗: {e}")

# 使用示例
create_directory("backup")
create_nested_directories("projects/python/automation")
remove_directory("temp", recursive=True)

遍歷目錄結(jié)構(gòu)

import os

def list_directory_tree(directory, indent=0):
    """
    遞歸打印目錄樹結(jié)構(gòu)
    """
    if not os.path.exists(directory):
        print(f"目錄不存在: {directory}")
        return
    
    print(' ' * indent + os.path.basename(directory) + '/')
    
    try:
        entries = os.listdir(directory)
        for entry in sorted(entries):
            full_path = os.path.join(directory, entry)
            if os.path.isdir(full_path):
                list_directory_tree(full_path, indent + 4)
            else:
                print(' ' * (indent + 4) + entry)
    except PermissionError:
        print(' ' * (indent + 4) + "[權(quán)限不足,無法訪問]")

# 使用示例
list_directory_tree("projects")

批量重命名文件

import os
import re

def batch_rename(directory, pattern, replacement):
    """
    批量重命名文件
    directory: 目標(biāo)目錄
    pattern: 正則表達(dá)式模式
    replacement: 替換字符串
    """
    if not os.path.exists(directory) or not os.path.isdir(directory):
        print(f"目錄不存在: {directory}")
        return
    
    renamed_count = 0
    regex = re.compile(pattern)
    
    for filename in os.listdir(directory):
        if os.path.isfile(os.path.join(directory, filename)):
            new_filename = regex.sub(replacement, filename)
            
            if new_filename != filename:
                old_path = os.path.join(directory, filename)
                new_path = os.path.join(directory, new_filename)
                
                os.rename(old_path, new_path)
                renamed_count += 1
                print(f"已重命名: {filename} -> {new_filename}")
    
    print(f"重命名完成,共處理 {renamed_count} 個(gè)文件")

# 使用示例:將所有文件名中的空格替換為下劃線
batch_rename("documents", r"\s+", "_")

使用shutil模塊操作文件和文件夾

shutil模塊是Python的標(biāo)準(zhǔn)庫之一,提供了更高級(jí)的文件和目錄操作功能,可以看作是os模塊的補(bǔ)充。它特別適合用于文件的復(fù)制、移動(dòng)、歸檔等操作。

文件復(fù)制與移動(dòng)

import os
import shutil
from datetime import datetime

def backup_files(source_dir, backup_dir, file_types=None):
    """
    備份指定類型的文件
    source_dir: 源目錄
    backup_dir: 備份目錄
    file_types: 要備份的文件類型列表,如['.docx', '.xlsx']
    """
    if not os.path.exists(source_dir):
        print(f"源目錄不存在: {source_dir}")
        return
    
    # 創(chuàng)建備份目錄(如果不存在)
    if not os.path.exists(backup_dir):
        os.makedirs(backup_dir)
    
    # 創(chuàng)建帶時(shí)間戳的子目錄
    timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
    backup_subdir = os.path.join(backup_dir, f"backup_{timestamp}")
    os.makedirs(backup_subdir)
    
    copied_count = 0
    
    # 遍歷源目錄中的所有文件
    for root, _, files in os.walk(source_dir):
        for file in files:
            file_path = os.path.join(root, file)
            
            # 檢查文件類型
            if file_types is None or any(file.lower().endswith(ft.lower()) for ft in file_types):
                # 保持相對(duì)路徑結(jié)構(gòu)
                rel_path = os.path.relpath(root, source_dir)
                dest_dir = os.path.join(backup_subdir, rel_path)
                
                # 確保目標(biāo)目錄存在
                if not os.path.exists(dest_dir):
                    os.makedirs(dest_dir)
                
                # 復(fù)制文件
                dest_path = os.path.join(dest_dir, file)
                shutil.copy2(file_path, dest_path)  # copy2保留元數(shù)據(jù)(如修改時(shí)間)
                copied_count += 1
                print(f"已備份: {file_path} -> {dest_path}")
    
    print(f"備份完成,共復(fù)制 {copied_count} 個(gè)文件到 {backup_subdir}")
    return backup_subdir

# 使用示例:備份所有Excel和Word文件
backup_files("work_documents", "backups", [".xlsx", ".docx"])

文件移動(dòng)與重組

import os
import shutil
import time

def organize_by_extension(source_dir, target_dir=None):
    """
    按文件擴(kuò)展名整理文件
    """
    if not os.path.exists(source_dir):
        print(f"源目錄不存在: {source_dir}")
        return
    
    # 如果沒有指定目標(biāo)目錄,則在源目錄下創(chuàng)建organized子目錄
    if target_dir is None:
        target_dir = os.path.join(source_dir, "organized")
    
    if not os.path.exists(target_dir):
        os.makedirs(target_dir)
    
    moved_count = 0
    
    for filename in os.listdir(source_dir):
        source_path = os.path.join(source_dir, filename)
        
        # 只處理文件,跳過目錄
        if os.path.isfile(source_path):
            # 獲取文件擴(kuò)展名(不帶點(diǎn))
            _, ext = os.path.splitext(filename)
            ext = ext[1:].lower() if ext else "no_extension"
            
            # 創(chuàng)建擴(kuò)展名對(duì)應(yīng)的目錄
            ext_dir = os.path.join(target_dir, ext)
            if not os.path.exists(ext_dir):
                os.makedirs(ext_dir)
            
            # 移動(dòng)文件
            target_path = os.path.join(ext_dir, filename)
            shutil.move(source_path, target_path)
            moved_count += 1
            print(f"已移動(dòng): {filename} -> {ext}/{filename}")
    
    print(f"整理完成,共移動(dòng) {moved_count} 個(gè)文件")

def organize_by_date(source_dir, target_dir=None, date_format="%Y-%m"):
    """
    按文件修改日期整理文件
    """
    if not os.path.exists(source_dir):
        print(f"源目錄不存在: {source_dir}")
        return
    
    # 如果沒有指定目標(biāo)目錄,則在源目錄下創(chuàng)建by_date子目錄
    if target_dir is None:
        target_dir = os.path.join(source_dir, "by_date")
    
    if not os.path.exists(target_dir):
        os.makedirs(target_dir)
    
    moved_count = 0
    
    for filename in os.listdir(source_dir):
        source_path = os.path.join(source_dir, filename)
        
        # 只處理文件,跳過目錄
        if os.path.isfile(source_path):
            # 獲取文件修改時(shí)間
            mod_time = os.path.getmtime(source_path)
            date_str = time.strftime(date_format, time.localtime(mod_time))
            
            # 創(chuàng)建日期對(duì)應(yīng)的目錄
            date_dir = os.path.join(target_dir, date_str)
            if not os.path.exists(date_dir):
                os.makedirs(date_dir)
            
            # 移動(dòng)文件
            target_path = os.path.join(date_dir, filename)
            shutil.move(source_path, target_path)
            moved_count += 1
            print(f"已移動(dòng): {filename} -> {date_str}/{filename}")
    
    print(f"整理完成,共移動(dòng) {moved_count} 個(gè)文件")

# 使用示例
organize_by_extension("downloads")
organize_by_date("photos", date_format="%Y-%m")

清理重復(fù)文件

import os
import hashlib
from collections import defaultdict

def find_duplicate_files(directory):
    """
    查找目錄中的重復(fù)文件
    返回一個(gè)字典,鍵為文件內(nèi)容的哈希值,值為具有相同內(nèi)容的文件路徑列表
    """
    if not os.path.exists(directory):
        print(f"目錄不存在: {directory}")
        return {}
    
    # 按文件大小分組,減少哈希計(jì)算
    size_to_files = defaultdict(list)
    
    # 第一步:按文件大小分組
    for root, _, files in os.walk(directory):
        for filename in files:
            file_path = os.path.join(root, filename)
            try:
                file_size = os.path.getsize(file_path)
                size_to_files[file_size].append(file_path)
            except (OSError, IOError) as e:
                print(f"無法訪問文件 {file_path}: {e}")
    
    # 第二步:對(duì)相同大小的文件計(jì)算哈希值
    duplicates = defaultdict(list)
    
    for size, files in size_to_files.items():
        # 只處理有多個(gè)相同大小文件的情況
        if len(files) > 1:
            for file_path in files:
                try:
                    with open(file_path, 'rb') as f:
                        file_hash = hashlib.md5(f.read()).hexdigest()
                        duplicates[file_hash].append(file_path)
                except (OSError, IOError) as e:
                    print(f"無法讀取文件 {file_path}: {e}")
    
    # 過濾掉沒有重復(fù)的文件
    return {hash_val: paths for hash_val, paths in duplicates.items() if len(paths) > 1}

def remove_duplicates(directory, keep_newest=True):
    """
    刪除重復(fù)文件,保留最新的或最舊的文件
    """
    duplicates = find_duplicate_files(directory)
    
    if not duplicates:
        print("未找到重復(fù)文件")
        return
    
    removed_count = 0
    saved_space = 0
    
    for hash_val, file_paths in duplicates.items():
        # 按修改時(shí)間排序
        sorted_paths = sorted(file_paths, key=os.path.getmtime, reverse=keep_newest)
        
        # 保留第一個(gè)文件(最新的或最舊的),刪除其余文件
        keep_file = sorted_paths[0]
        files_to_remove = sorted_paths[1:]
        
        print(f"保留文件: {keep_file}")
        
        for file_path in files_to_remove:
            try:
                file_size = os.path.getsize(file_path)
                os.remove(file_path)
                removed_count += 1
                saved_space += file_size
                print(f"已刪除重復(fù)文件: {file_path}")
            except (OSError, IOError) as e:
                print(f"刪除失敗 {file_path}: {e}")
    
    print(f"清理完成,共刪除 {removed_count} 個(gè)重復(fù)文件,節(jié)省空間 {saved_space / (1024*1024):.2f} MB")

# 使用示例:清理重復(fù)文件,保留最新的版本
remove_duplicates("documents", keep_newest=True)

實(shí)際應(yīng)用場(chǎng)景

場(chǎng)景一:照片整理助手

import os
import shutil
import time
from datetime import datetime
import re
from PIL import Image
import piexif

def organize_photos(photo_dir, output_dir=None):
    """
    智能整理照片:按拍攝日期分類,重命名,去除重復(fù)
    """
    if not os.path.exists(photo_dir):
        print(f"照片目錄不存在: {photo_dir}")
        return
    
    if output_dir is None:
        output_dir = os.path.join(photo_dir, "organized_photos")
    
    if not os.path.exists(output_dir):
        os.makedirs(output_dir)
    
    # 支持的圖片格式
    image_extensions = [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".tiff"]
    processed_count = 0
    skipped_count = 0
    
    # 遍歷所有文件
    for root, _, files in os.walk(photo_dir):
        for filename in files:
            if any(filename.lower().endswith(ext) for ext in image_extensions):
                file_path = os.path.join(root, filename)
                
                try:
                    # 嘗試從EXIF數(shù)據(jù)獲取拍攝日期
                    date_taken = None
                    try:
                        img = Image.open(file_path)
                        if "exif" in img.info:
                            exif_dict = piexif.load(img.info["exif"])
                            if piexif.ExifIFD.DateTimeOriginal in exif_dict["Exif"]:
                                date_str = exif_dict["Exif"][piexif.ExifIFD.DateTimeOriginal].decode("utf-8")
                                date_taken = datetime.strptime(date_str, "%Y:%m:%d %H:%M:%S")
                    except Exception as e:
                        print(f"無法讀取EXIF數(shù)據(jù) {file_path}: {e}")
                    
                    # 如果無法從EXIF獲取日期,則使用文件修改時(shí)間
                    if date_taken is None:
                        mod_time = os.path.getmtime(file_path)
                        date_taken = datetime.fromtimestamp(mod_time)
                    
                    # 創(chuàng)建年月目錄
                    year_month = date_taken.strftime("%Y-%m")
                    target_dir = os.path.join(output_dir, year_month)
                    if not os.path.exists(target_dir):
                        os.makedirs(target_dir)
                    
                    # 創(chuàng)建新文件名:日期_序號(hào).擴(kuò)展名
                    base_name = date_taken.strftime("%Y%m%d_%H%M%S")
                    _, ext = os.path.splitext(filename)
                    
                    # 處理文件名沖突
                    new_filename = f"{base_name}{ext.lower()}"
                    target_path = os.path.join(target_dir, new_filename)
                    
                    counter = 1
                    while os.path.exists(target_path):
                        new_filename = f"{base_name}_{counter}{ext.lower()}"
                        target_path = os.path.join(target_dir, new_filename)
                        counter += 1
                    
                    # 復(fù)制文件
                    shutil.copy2(file_path, target_path)
                    processed_count += 1
                    print(f"已整理: {filename} -> {year_month}/{new_filename}")
                    
                except Exception as e:
                    print(f"處理失敗 {file_path}: {e}")
                    skipped_count += 1
    
    print(f"整理完成,共處理 {processed_count} 張照片,跳過 {skipped_count} 個(gè)文件")
    return output_dir

# 使用示例
organize_photos("vacation_photos")

場(chǎng)景二:項(xiàng)目歸檔工具

import os
import shutil
import time
import json
import zipfile

def archive_project(project_dir, archive_dir=None, include_patterns=None, exclude_patterns=None):
    """
    智能歸檔項(xiàng)目:壓縮、記錄元數(shù)據(jù)、清理臨時(shí)文件
    """
    if not os.path.exists(project_dir):
        print(f"項(xiàng)目目錄不存在: {project_dir}")
        return
    
    project_name = os.path.basename(project_dir)
    
    # 默認(rèn)歸檔到項(xiàng)目父目錄下的archives文件夾
    if archive_dir is None:
        parent_dir = os.path.dirname(project_dir)
        archive_dir = os.path.join(parent_dir, "archives")
    
    if not os.path.exists(archive_dir):
        os.makedirs(archive_dir)
    
    # 默認(rèn)包含所有文件
    if include_patterns is None:
        include_patterns = ["*"]
    
    # 默認(rèn)排除一些常見的臨時(shí)文件和目錄
    if exclude_patterns is None:
        exclude_patterns = [
            "__pycache__", ".git", ".svn", ".DS_Store", "*.pyc", 
            "*.tmp", "*.temp", "*.log", "node_modules", "venv", "env",
            "*.bak", "~*"
        ]
    
    # 創(chuàng)建時(shí)間戳
    timestamp = time.strftime("%Y%m%d_%H%M%S")
    archive_name = f"{project_name}_{timestamp}"
    archive_path = os.path.join(archive_dir, archive_name)
    os.makedirs(archive_path)
    
    # 收集項(xiàng)目元數(shù)據(jù)
    metadata = {
        "project_name": project_name,
        "archive_date": time.strftime("%Y-%m-%d %H:%M:%S"),
        "original_path": os.path.abspath(project_dir),
        "file_count": 0,
        "total_size": 0,
        "file_types": {}
    }
    
    # 復(fù)制文件到歸檔目錄
    for root, dirs, files in os.walk(project_dir):
        # 跳過被排除的目錄
        dirs[:] = [d for d in dirs if not any(exclude_pattern in d for exclude_pattern in exclude_patterns)]
        
        # 處理文件
        for filename in files:
            # 檢查是否應(yīng)該包含該文件
            if any(exclude_pattern in filename for exclude_pattern in exclude_patterns):
                continue
            
            file_path = os.path.join(root, filename)
            rel_path = os.path.relpath(file_path, project_dir)
            target_path = os.path.join(archive_path, rel_path)
            
            # 確保目標(biāo)目錄存在
            os.makedirs(os.path.dirname(target_path), exist_ok=True)
            
            # 復(fù)制文件
            shutil.copy2(file_path, target_path)
            
            # 更新元數(shù)據(jù)
            file_size = os.path.getsize(file_path)
            metadata["file_count"] += 1
            metadata["total_size"] += file_size
            
            # 統(tǒng)計(jì)文件類型
            _, ext = os.path.splitext(filename)
            ext = ext.lower() if ext else "no_extension"
            if ext in metadata["file_types"]:
                metadata["file_types"][ext] += 1
            else:
                metadata["file_types"][ext] = 1
    
    # 保存元數(shù)據(jù)
    metadata_path = os.path.join(archive_path, "archive_metadata.json")
    with open(metadata_path, "w", encoding="utf-8") as f:
        json.dump(metadata, f, indent=2)
    
    # 創(chuàng)建ZIP壓縮包
    zip_path = f"{archive_path}.zip"
    with zipfile.ZipFile(zip_path, "w", zipfile.ZIP_DEFLATED) as zipf:
        for root, _, files in os.walk(archive_path):
            for file in files:
                file_path = os.path.join(root, file)
                rel_path = os.path.relpath(file_path, archive_path)
                zipf.write(file_path, rel_path)
    
    # 刪除臨時(shí)歸檔目錄
    shutil.rmtree(archive_path)
    
    print(f"項(xiàng)目歸檔完成: {zip_path}")
    print(f"共歸檔 {metadata['file_count']} 個(gè)文件,總大小 {metadata['total_size'] / (1024*1024):.2f} MB")
    return zip_path

# 使用示例
archive_project("my_project", exclude_patterns=["__pycache__", ".git", "*.pyc", "venv"])

通過這些實(shí)用的代碼示例,你可以輕松實(shí)現(xiàn)各種文件整理自動(dòng)化任務(wù),大幅提高工作效率。無論是日常的文件管理,還是專業(yè)的項(xiàng)目歸檔,這些技巧都能幫你節(jié)省大量時(shí)間,讓你的文件井然有序。

以上就是使用Python實(shí)現(xiàn)各種文件整理自動(dòng)化的詳細(xì)內(nèi)容,更多關(guān)于Python文件整理自動(dòng)化的資料請(qǐng)關(guān)注腳本之家其它相關(guān)文章!

相關(guān)文章

  • Python中l(wèi)ogging模塊用法示例總結(jié)

    Python中l(wèi)ogging模塊用法示例總結(jié)

    在Python中l(wèi)ogging模塊是一個(gè)強(qiáng)大的日志記錄工具,它允許用戶將程序運(yùn)行期間產(chǎn)生的日志信息輸出到控制臺(tái)或者寫入到文件中,這篇文章主要介紹了Python中l(wèi)ogging模塊用法的相關(guān)資料,需要的朋友可以參考下
    2025-08-08
  • python中[,a::b]的使用

    python中[,a::b]的使用

    本文通過實(shí)例詳細(xì)介紹了Python中如何使用[a::b]語法來對(duì)數(shù)組進(jìn)行切片操作,包括不同步長b對(duì)數(shù)組索引的影響,文中通過示例代碼介紹的非常詳細(xì),需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2026-03-03
  • 使用Python實(shí)現(xiàn)在PDF中添加空白頁面的方法

    使用Python實(shí)現(xiàn)在PDF中添加空白頁面的方法

    在日常辦公和數(shù)據(jù)處理中,PDF文件因其格式穩(wěn)定性被廣泛使用,本文將介紹Python如何使用Spire.PDF for Python實(shí)現(xiàn)為PDF添加空白頁面,感興趣的小伙伴可以了解下
    2025-11-11
  • python超詳細(xì)實(shí)現(xiàn)完整學(xué)生成績管理系統(tǒng)

    python超詳細(xì)實(shí)現(xiàn)完整學(xué)生成績管理系統(tǒng)

    讀萬卷書不如行萬里路,只學(xué)書上的理論是遠(yuǎn)遠(yuǎn)不夠的,只有在實(shí)戰(zhàn)中才能獲得能力的提升,本篇文章手把手帶你用Java實(shí)現(xiàn)一個(gè)完整版學(xué)生成績管理系統(tǒng),大家可以在過程中查缺補(bǔ)漏,提升水平
    2022-03-03
  • python連接sql?server數(shù)據(jù)庫的方法實(shí)戰(zhàn)

    python連接sql?server數(shù)據(jù)庫的方法實(shí)戰(zhàn)

    當(dāng)我們用Python來編寫網(wǎng)站,必須要能夠通過python操作數(shù)據(jù)庫,下面這篇文章主要給大家介紹了關(guān)于python連接sql?server數(shù)據(jù)庫的相關(guān)資料,文中通過圖文介紹的非常詳細(xì),需要的朋友可以參考下
    2022-08-08
  • Python面向?qū)ο蟪绦蛟O(shè)計(jì)之靜態(tài)方法、類方法、屬性方法原理與用法分析

    Python面向?qū)ο蟪绦蛟O(shè)計(jì)之靜態(tài)方法、類方法、屬性方法原理與用法分析

    這篇文章主要介紹了Python面向?qū)ο蟪绦蛟O(shè)計(jì)之靜態(tài)方法、類方法、屬性方法,結(jié)合實(shí)例形式分析了Python靜態(tài)方法、類方法、屬性方法相關(guān)概念、原理、用法及相關(guān)操作注意事項(xiàng),需要的朋友可以參考下
    2020-03-03
  • Python虛擬環(huán)境virtualenv的安裝與使用詳解

    Python虛擬環(huán)境virtualenv的安裝與使用詳解

    virtualenv可以用來管理互不干擾的獨(dú)立python虛擬環(huán)境,在有些場(chǎng)景下非常有用,下面這篇文章主要給大家介紹了Python虛擬環(huán)境virtualenv安裝與使用的相關(guān)資料,需要的朋友可以參考借鑒,下面來一起看看吧。
    2017-05-05
  • 零基礎(chǔ)寫python爬蟲之抓取糗事百科代碼分享

    零基礎(chǔ)寫python爬蟲之抓取糗事百科代碼分享

    前面我們介紹了如何抓取百度貼吧文章,然后講解了python的神器正則表達(dá)式,下面,我們就把2者結(jié)合起來,詳細(xì)介紹下,如何來抓取到糗事百科里面的指定內(nèi)容
    2014-11-11
  • Python深度學(xué)習(xí)pytorch神經(jīng)網(wǎng)絡(luò)匯聚層理解

    Python深度學(xué)習(xí)pytorch神經(jīng)網(wǎng)絡(luò)匯聚層理解

    通常當(dāng)我們處理圖像時(shí),我們希望逐漸降低隱藏表示的空間分辨率,聚集信息,這樣隨著我們?cè)谏窠?jīng)網(wǎng)絡(luò)層疊的上升,每個(gè)神經(jīng)元對(duì)其敏感的感受野(輸入)就越大
    2021-10-10
  • Django中的CBV和FBV示例介紹

    Django中的CBV和FBV示例介紹

    這篇文章主要給大家介紹了關(guān)于Django中CBV和FBV的相關(guān)資料,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧。
    2018-02-02

最新評(píng)論

万安县| 河间市| 大石桥市| 黄陵县| 朝阳县| 南陵县| 罗江县| 樟树市| 醴陵市| 长汀县| 灵石县| 新宾| 凉城县| 保靖县| 信丰县| 双江| 江达县| 盐源县| 黑龙江省| 昌都县| 郸城县| 阳泉市| 晴隆县| 南和县| 公主岭市| 双江| 铅山县| 黄平县| 迁西县| 北票市| 康乐县| 柳江县| 施甸县| 额敏县| 客服| 土默特右旗| 始兴县| 清镇市| 台东县| 洮南市| 通化县|