主頁 >  其他 > 云端煉丹,算力白嫖,基于云端GPU(Colab)使用So-vits庫制作AI特朗普演唱《國際歌》

云端煉丹,算力白嫖,基于云端GPU(Colab)使用So-vits庫制作AI特朗普演唱《國際歌》

2023-05-16 20:36:23 其他

人工智能AI技術早已深入到人們生活的每一個角落,君不見AI孫燕姿的歌聲此起彼伏,不絕于耳,但并不是每個人都擁有一塊N卡,沒有GPU的日子總是不好過的,但是沒關系,山人有妙計,本次我們基于Google的Colab免費云端服務器來搭建深度學習環境,制作AI特朗普,讓他高唱《國際歌》,

Colab(全名Colaboratory ),它是Google公司的一款基于云端的基礎免費服務器產品,可以在B端,也就是瀏覽器里面撰寫和執行Python代碼,非常方便,貼心的是,Colab可以給用戶分配免費的GPU進行使用,對于沒有N卡的朋友來說,這已經遠遠超出了業界良心的范疇,簡直就是在做慈善事業,

配置Colab

Colab是基于Google云盤的產品,我們可以將深度學習的Python腳本、訓練好的模型、以及訓練集等資料直接存放在云盤中,然后通過Colab執行即可,

首先訪問Google云盤:drive.google.com

隨后點擊新建,選擇關聯更多應用:

接著安裝Colab即可:

至此,云盤和Colab就關聯好了,現在我們可以新建一個腳本檔案my_sovits.ipynb檔案,鍵入代碼:

hello colab

隨后,按快捷鍵 ctrl + 回車,即可運行代碼:

這里需要注意的是,Colab使用的是基于Jupyter Notebook的ipynb格式的Python代碼,

Jupyter Notebook是以網頁的形式打開,可以在網頁頁面中直接撰寫代碼和運行代碼,代碼的運行結果也會直接在代碼塊下顯示,如在編程程序中需要撰寫說明檔案,可在同一個頁面中直接撰寫,便于作及時的說明和解釋,

隨后設定一下顯卡型別:

接著運行命令,查看GPU版本:

!/usr/local/cuda/bin/nvcc --version  
  
!nvidia-smi

程式回傳:

nvcc: NVIDIA (R) Cuda compiler driver  
Copyright (c) 2005-2022 NVIDIA Corporation  
Built on Wed_Sep_21_10:33:58_PDT_2022  
Cuda compilation tools, release 11.8, V11.8.89  
Build cuda_11.8.r11.8/compiler.31833905_0  
Tue May 16 04:49:23 2023         
+-----------------------------------------------------------------------------+  
| NVIDIA-SMI 525.85.12    Driver Version: 525.85.12    CUDA Version: 12.0     |  
|-------------------------------+----------------------+----------------------+  
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |  
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |  
|                               |                      |               MIG M. |  
|===============================+======================+======================|  
|   0  Tesla T4            Off  | 00000000:00:04.0 Off |                    0 |  
| N/A   65C    P8    13W /  70W |      0MiB / 15360MiB |      0%      Default |  
|                               |                      |                  N/A |  
+-------------------------------+----------------------+----------------------+  
                                                                                 
+-----------------------------------------------------------------------------+  
| Processes:                                                                  |  
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |  
|        ID   ID                                                   Usage      |  
|=============================================================================|  
|  No running processes found                                                 |  
+-----------------------------------------------------------------------------+

這里建議選擇Tesla T4的顯卡型別,性能更突出,

至此Colab就配置好了,

配置So-vits

下面我們配置so-vits環境,可以通過pip命令安裝一些基礎依賴:

!pip install pyworld==0.3.2  
!pip install numpy==1.23.5

注意jupyter語言是通過嘆號來運行命令,

注意,由于不是本地環境,有的時候colab會提醒:

Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/  
Collecting numpy==1.23.5  
  Downloading numpy-1.23.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB)  
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.1/17.1 MB 80.1 MB/s eta 0:00:00  
Installing collected packages: numpy  
  Attempting uninstall: numpy  
    Found existing installation: numpy 1.22.4  
    Uninstalling numpy-1.22.4:  
      Successfully uninstalled numpy-1.22.4  
Successfully installed numpy-1.23.5  
WARNING: The following packages were previously imported in this runtime:  
  [numpy]  
You must restart the runtime in order to use newly installed versions.

此時numpy庫需要重啟runtime才可以匯入操作,

重啟runtime后,需要再重新安裝一次,直到系統提示依賴已經存在:

Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/  
Requirement already satisfied: numpy==1.23.5 in /usr/local/lib/python3.10/dist-packages (1.23.5)

隨后,克隆so-vits專案,并且安裝專案的依賴:

import os  
import glob  
!git clone https://github.com/effusiveperiscope/so-vits-svc -b eff-4.0  
os.chdir('/content/so-vits-svc')  
# install requirements one-at-a-time to ignore exceptions  
!cat requirements.txt | xargs -n 1 pip install --extra-index-url https://download.pytorch.org/whl/cu117  
!pip install praat-parselmouth  
!pip install ipywidgets  
!pip install huggingface_hub  
!pip install pip==23.0.1 # fix pip version for fairseq install  
!pip install fairseq==0.12.2  
!jupyter nbextension enable --py widgetsnbextension  
existing_files = glob.glob('/content/**/*.*', recursive=True)  
!pip install --upgrade protobuf==3.9.2  
!pip uninstall -y tensorflow  
!pip install tensorflow==2.11.0

安裝好依賴之后,定義一些前置工具方法:

os.chdir('/content/so-vits-svc') # force working-directory to so-vits-svc - this line is just for safety and is probably not required  
  
import tarfile  
import os  
from zipfile import ZipFile  
# taken from https://github.com/CookiePPP/cookietts/blob/master/CookieTTS/utils/dataset/extract_unknown.py  
def extract(path):  
    if path.endswith(".zip"):  
        with ZipFile(path, 'r') as zipObj:  
           zipObj.extractall(os.path.split(path)[0])  
    elif path.endswith(".tar.bz2"):  
        tar = tarfile.open(path, "r:bz2")  
        tar.extractall(os.path.split(path)[0])  
        tar.close()  
    elif path.endswith(".tar.gz"):  
        tar = tarfile.open(path, "r:gz")  
        tar.extractall(os.path.split(path)[0])  
        tar.close()  
    elif path.endswith(".tar"):  
        tar = tarfile.open(path, "r:")  
        tar.extractall(os.path.split(path)[0])  
        tar.close()  
    elif path.endswith(".7z"):  
        import py7zr  
        archive = py7zr.SevenZipFile(path, mode='r')  
        archive.extractall(path=os.path.split(path)[0])  
        archive.close()  
    else:  
        raise NotImplementedError(f"{path} extension not implemented.")  
  
# taken from https://github.com/CookiePPP/cookietts/tree/master/CookieTTS/_0_download/scripts  
  
# megatools download urls  
win64_url = "https://megatools.megous.com/builds/builds/megatools-1.11.1.20230212-win64.zip"  
win32_url = "https://megatools.megous.com/builds/builds/megatools-1.11.1.20230212-win32.zip"  
linux_url = "https://megatools.megous.com/builds/builds/megatools-1.11.1.20230212-linux-x86_64.tar.gz"  
# download megatools  
from sys import platform  
import os  
import urllib.request  
import subprocess  
from time import sleep  
  
if platform == "linux" or platform == "linux2":  
        dl_url = linux_url  
elif platform == "darwin":  
    raise NotImplementedError('MacOS not supported.')  
elif platform == "win32":  
        dl_url = win64_url  
else:  
    raise NotImplementedError ('Unknown Operating System.')  
  
dlname = dl_url.split("/")[-1]  
if dlname.endswith(".zip"):  
    binary_folder = dlname[:-4] # remove .zip  
elif dlname.endswith(".tar.gz"):  
    binary_folder = dlname[:-7] # remove .tar.gz  
else:  
    raise NameError('downloaded megatools has unknown archive file extension!')  
  
if not os.path.exists(binary_folder):  
    print('"megatools" not found. Downloading...')  
    if not os.path.exists(dlname):  
        urllib.request.urlretrieve(dl_url, dlname)  
    assert os.path.exists(dlname), 'failed to download.'  
    extract(dlname)  
    sleep(0.10)  
    os.unlink(dlname)  
    print("Done!")  
  
  
binary_folder = os.path.abspath(binary_folder)  
  
def megadown(download_link, filename='.', verbose=False):  
    """Use megatools binary executable to download files and folders from MEGA.nz ."""  
    filename = ' --path "'+os.path.abspath(filename)+'"' if filename else ""  
    wd_old = os.getcwd()  
    os.chdir(binary_folder)  
    try:  
        if platform == "linux" or platform == "linux2":  
            subprocess.call(f'./megatools dl{filename}{" --debug http" if verbose else ""} {download_link}', shell=True)  
        elif platform == "win32":  
            subprocess.call(f'megatools.exe dl{filename}{" --debug http" if verbose else ""} {download_link}', shell=True)  
    except:  
        os.chdir(wd_old) # don't let user stop download without going back to correct directory first  
        raise  
    os.chdir(wd_old)  
    return filename  
  
import urllib.request  
from tqdm import tqdm  
import gdown  
from os.path import exists  
  
def request_url_with_progress_bar(url, filename):  
    class DownloadProgressBar(tqdm):  
        def update_to(self, b=1, bsize=1, tsize=None):  
            if tsize is not None:  
                self.total = tsize  
            self.update(b * bsize - self.n)  
      
    def download_url(url, filename):  
        with DownloadProgressBar(unit='B', unit_scale=True,  
                                 miniters=1, desc=url.split('/')[-1]) as t:  
            filename, headers = urllib.request.urlretrieve(url, filename=filename, reporthook=t.update_to)  
            print("Downloaded to "+filename)  
    download_url(url, filename)  
  
  
def download(urls, dataset='', filenames=None, force_dl=False, username='', password='', auth_needed=False):  
    assert filenames is None or len(urls) == len(filenames), f"number of urls does not match filenames. Expected {len(filenames)} urls, containing the files listed below.\n{filenames}"  
    assert not auth_needed or (len(username) and len(password)), f"username and password needed for {dataset} Dataset"  
    if filenames is None:  
        filenames = [None,]*len(urls)  
    for i, (url, filename) in enumerate(zip(urls, filenames)):  
        print(f"Downloading File from {url}")  
        #if filename is None:  
        #    filename = url.split("/")[-1]  
        if filename and (not force_dl) and exists(filename):  
            print(f"{filename} Already Exists, Skipping.")  
            continue  
        if 'drive.google.com' in url:  
            assert 'https://drive.google.com/uc?id=' in url, 'Google Drive links should follow the format "https://drive.google.com/uc?id=1eQAnaoDBGQZldPVk-nzgYzRbcPSmnpv6".\nWhere id=XXXXXXXXXXXXXXXXX is the Google Drive Share ID.'  
            gdown.download(url, filename, quiet=False)  
        elif 'mega.nz' in url:  
            megadown(url, filename)  
        else:  
            #urllib.request.urlretrieve(url, filename=filename) # no progress bar  
            request_url_with_progress_bar(url, filename) # with progress bar  
  
import huggingface_hub  
import os  
import shutil  
  
class HFModels:  
    def __init__(self, repo = "therealvul/so-vits-svc-4.0",   
            model_dir = "hf_vul_models"):  
        self.model_repo = huggingface_hub.Repository(local_dir=model_dir,  
            clone_from=repo, skip_lfs_files=True)  
        self.repo = repo  
        self.model_dir = model_dir  
  
        self.model_folders = os.listdir(model_dir)  
        self.model_folders.remove('.git')  
        self.model_folders.remove('.gitattributes')  
  
    def list_models(self):  
        return self.model_folders  
  
    # Downloads model;  
    # copies config to target_dir and moves model to target_dir  
    def download_model(self, model_name, target_dir):  
        if not model_name in self.model_folders:  
            raise Exception(model_name + " not found")  
        model_dir = self.model_dir  
        charpath = os.path.join(model_dir,model_name)  
  
        gen_pt = next(x for x in os.listdir(charpath) if x.startswith("G_"))  
        cfg = next(x for x in os.listdir(charpath) if x.endswith("json"))  
        try:  
          clust = next(x for x in os.listdir(charpath) if x.endswith("pt"))  
        except StopIteration as e:  
          print("Note - no cluster model for "+model_name)  
          clust = None  
  
        if not os.path.exists(target_dir):  
            os.makedirs(target_dir, exist_ok=True)  
  
        gen_dir = huggingface_hub.hf_hub_download(repo_id = self.repo,  
            filename = model_name + "/" + gen_pt) # this is a symlink  
          
        if clust is not None:  
          clust_dir = huggingface_hub.hf_hub_download(repo_id = self.repo,  
              filename = model_name + "/" + clust) # this is a symlink  
          shutil.move(os.path.realpath(clust_dir), os.path.join(target_dir, clust))  
          clust_out = os.path.join(target_dir, clust)  
        else:  
          clust_out = None  
  
        shutil.copy(os.path.join(charpath,cfg),os.path.join(target_dir, cfg))  
        shutil.move(os.path.realpath(gen_dir), os.path.join(target_dir, gen_pt))  
  
        return {"config_path": os.path.join(target_dir,cfg),  
            "generator_path": os.path.join(target_dir,gen_pt),  
            "cluster_path": clust_out}  
  
# Example usage  
# vul_models = HFModels()  
# print(vul_models.list_models())  
# print("Applejack (singing)" in vul_models.list_models())  
# vul_models.download_model("Applejack (singing)","models/Applejack (singing)")  
  
    print("Finished!")

這些方法可以幫助我們下載、解壓和加載模型,

音色模型下載和線上推理

接著將特朗普的音色模型和組態檔進行下載,下載地址是:

https://huggingface.co/Nardicality/so-vits-svc-4.0-models/tree/main/Trump18.5k

隨后模型檔案放到專案的models檔案夾,組態檔則放入config檔案夾,

接著將需要轉換的歌曲上傳到和專案平行的目錄中,

運行代碼:

import os  
import glob  
import json  
import copy  
import logging  
import io  
from ipywidgets import widgets  
from pathlib import Path  
from IPython.display import Audio, display  
  
os.chdir('/content/so-vits-svc')  
  
import torch  
from inference import infer_tool  
from inference import slicer  
from inference.infer_tool import Svc  
import soundfile  
import numpy as np  
  
MODELS_DIR = "models"  
  
def get_speakers():  
  speakers = []  
  for _,dirs,_ in os.walk(MODELS_DIR):  
    for folder in dirs:  
      cur_speaker = {}  
      # Look for G_****.pth  
      g = glob.glob(os.path.join(MODELS_DIR,folder,'G_*.pth'))  
      if not len(g):  
        print("Skipping "+folder+", no G_*.pth")  
        continue  
      cur_speaker["model_path"] = g[0]  
      cur_speaker["model_folder"] = folder  
  
      # Look for *.pt (clustering model)  
      clst = glob.glob(os.path.join(MODELS_DIR,folder,'*.pt'))  
      if not len(clst):  
        print("Note: No clustering model found for "+folder)  
        cur_speaker["cluster_path"] = ""  
      else:  
        cur_speaker["cluster_path"] = clst[0]  
  
      # Look for config.json  
      cfg = glob.glob(os.path.join(MODELS_DIR,folder,'*.json'))  
      if not len(cfg):  
        print("Skipping "+folder+", no config json")  
        continue  
      cur_speaker["cfg_path"] = cfg[0]  
      with open(cur_speaker["cfg_path"]) as f:  
        try:  
          cfg_json = json.loads(f.read())  
        except Exception as e:  
          print("Malformed config json in "+folder)  
        for name, i in cfg_json["spk"].items():  
          cur_speaker["name"] = name  
          cur_speaker["id"] = i  
          if not name.startswith('.'):  
            speakers.append(copy.copy(cur_speaker))  
  
    return sorted(speakers, key=lambda x:x["name"].lower())  
  
logging.getLogger('numba').setLevel(logging.WARNING)  
chunks_dict = infer_tool.read_temp("inference/chunks_temp.json")  
existing_files = []  
slice_db = -40  
wav_format = 'wav'  
  
class InferenceGui():  
  def __init__(self):  
    self.speakers = get_speakers()  
    self.speaker_list = [x["name"] for x in self.speakers]  
    self.speaker_box = widgets.Dropdown(  
        options = self.speaker_list  
    )  
    display(self.speaker_box)  
  
    def convert_cb(btn):  
      self.convert()  
    def clean_cb(btn):  
      self.clean()  
  
    self.convert_btn = widgets.Button(description="Convert")  
    self.convert_btn.on_click(convert_cb)  
    self.clean_btn = widgets.Button(description="Delete all audio files")  
    self.clean_btn.on_click(clean_cb)  
  
    self.trans_tx = widgets.IntText(value=https://www.cnblogs.com/v3ucn/archive/2023/05/16/0, description='Transpose')  
    self.cluster_ratio_tx = widgets.FloatText(value=https://www.cnblogs.com/v3ucn/archive/2023/05/16/0.0,   
      description='Clustering Ratio')  
    self.noise_scale_tx = widgets.FloatText(value=https://www.cnblogs.com/v3ucn/archive/2023/05/16/0.4,   
      description='Noise Scale')  
    self.auto_pitch_ck = widgets.Checkbox(value=https://www.cnblogs.com/v3ucn/archive/2023/05/16/False, description='Auto pitch f0 (do not use for singing)')  
  
    display(self.trans_tx)  
    display(self.cluster_ratio_tx)  
    display(self.noise_scale_tx)  
    display(self.auto_pitch_ck)  
    display(self.convert_btn)  
    display(self.clean_btn)  
  
  def convert(self):  
    trans = int(self.trans_tx.value)  
    speaker = next(x for x in self.speakers if x["name"] ==   
          self.speaker_box.value)  
    spkpth2 = os.path.join(os.getcwd(),speaker["model_path"])  
    print(spkpth2)  
    print(os.path.exists(spkpth2))  
  
    svc_model = Svc(speaker["model_path"], speaker["cfg_path"],   
      cluster_model_path=speaker["cluster_path"])  
      
    input_filepaths = [f for f in glob.glob('/content/**/*.*', recursive=True)  
     if f not in existing_files and   
     any(f.endswith(ex) for ex in ['.wav','.flac','.mp3','.ogg','.opus'])]  
    for name in input_filepaths:  
      print("Converting "+os.path.split(name)[-1])  
      infer_tool.format_wav(name)  
  
      wav_path = str(Path(name).with_suffix('.wav'))  
      wav_name = Path(name).stem  
      chunks = slicer.cut(wav_path, db_thresh=slice_db)  
      audio_data, audio_sr = slicer.chunks2audio(wav_path, chunks)  
  
      audio = []  
      for (slice_tag, data) in audio_data:  
          print(f'#=====segment start, '  
              f'{round(len(data)/audio_sr, 3)}s======')  
            
          length = int(np.ceil(len(data) / audio_sr *  
              svc_model.target_sample))  
            
          if slice_tag:  
              print('jump empty segment')  
              _audio = np.zeros(length)  
          else:  
              # Padding "fix" for noise  
              pad_len = int(audio_sr * 0.5)  
              data = https://www.cnblogs.com/v3ucn/archive/2023/05/16/np.concatenate([np.zeros([pad_len]),  
                  data, np.zeros([pad_len])])  
              raw_path = io.BytesIO()  
              soundfile.write(raw_path, data, audio_sr, format="wav")  
              raw_path.seek(0)  
              _cluster_ratio = 0.0  
              if speaker["cluster_path"] != "":  
                _cluster_ratio = float(self.cluster_ratio_tx.value)  
              out_audio, out_sr = svc_model.infer(  
                  speaker["name"], trans, raw_path,  
                  cluster_infer_ratio = _cluster_ratio,  
                  auto_predict_f0 = bool(self.auto_pitch_ck.value),  
                  noice_scale = float(self.noise_scale_tx.value))  
              _audio = out_audio.cpu().numpy()  
              pad_len = int(svc_model.target_sample * 0.5)  
              _audio = _audio[pad_len:-pad_len]  
          audio.extend(list(infer_tool.pad_array(_audio, length)))  
            
      res_path = os.path.join('/content/',  
          f'{wav_name}_{trans}_key_'  
          f'{speaker["name"]}.{wav_format}')  
      soundfile.write(res_path, audio, svc_model.target_sample,  
          format=wav_format)  
      display(Audio(res_path, autoplay=True)) # display audio file  
    pass  
  
  def clean(self):  
     input_filepaths = [f for f in glob.glob('/content/**/*.*', recursive=True)  
     if f not in existing_files and   
     any(f.endswith(ex) for ex in ['.wav','.flac','.mp3','.ogg','.opus'])]  
     for f in input_filepaths:  
       os.remove(f)  
  
inference_gui = InferenceGui()

此時系統會自動在根目錄,也就是content下尋找音樂檔案,包含但不限于wav、flac、mp3等等,隨后根據下載的模型進行推理,推理之前會自動對檔案進行背景音分離以及降噪和切片等操作,

推理結束之后,會自動播放轉換后的歌曲,

結語

如果是剛開始使用Colab,默認分配的顯存是15G左右,完全可以勝任大多數訓練和推理任務,但是如果經常用它掛機運算,能分配到的顯卡配置就會漸進式地降低,如果需要長時間并且相對穩定的GPU資源,還是需要付費訂閱Colab pro服務,另外Google云盤的免費使用空間也是15G,如果模型下多了,導致云盤空間不足,運行代碼也會報錯,所以最好定期清理Google云盤,以此保證深度學習任務的正常運行,

轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/552633.html

標籤:其他

上一篇:程式員不得不了解的計算機進制轉換

下一篇:返回列表

標籤雲
其他(159153) Python(38143) JavaScript(25431) Java(18048) C(15227) 區塊鏈(8267) C#(7972) AI(7469) 爪哇(7425) MySQL(7191) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5871) 数组(5741) R(5409) Linux(5340) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4572) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2433) ASP.NET(2403) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) .NET技术(1975) 功能(1967) Web開發(1951) HtmlCss(1937) python-3.x(1918) C++(1917) 弹簧靴(1913) xml(1889) PostgreSQL(1877) .NETCore(1861) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • 網閘典型架構簡述

    網閘架構一般分為兩種:三主機的三系統架構網閘和雙主機的2+1架構網閘。 三主機架構分別為內端機、外端機和仲裁機。三機無論從軟體和硬體上均各自獨立。首先從硬體上來看,三機都用各自獨立的主板、記憶體及存盤設備。從軟體上來看,三機有各自獨立的作業系統。這樣能達到完全的三機獨立。對于“2+1”系統,“2”分為 ......

    uj5u.com 2020-09-10 02:00:44 more
  • 如何從xshell上傳檔案到centos linux虛擬機里

    如何從xshell上傳檔案到centos linux虛擬機里及:虛擬機CentOs下執行 yum -y install lrzsz命令,出現錯誤:鏡像無法找到軟體包 前言 一、安裝lrzsz步驟 二、上傳檔案 三、遇到的問題及解決方案 總結 前言 提示:其實很簡單,往虛擬機上安裝一個上傳檔案的工具 ......

    uj5u.com 2020-09-10 02:00:47 more
  • 一、SQLMAP入門

    一、SQLMAP入門 1、判斷是否存在注入 sqlmap.py -u 網址/id=1 id=1不可缺少。當注入點后面的引數大于兩個時。需要加雙引號, sqlmap.py -u "網址/id=1&uid=1" 2、判斷文本中的請求是否存在注入 從文本中加載http請求,SQLMAP可以從一個文本檔案中 ......

    uj5u.com 2020-09-10 02:00:50 more
  • Metasploit 簡單使用教程

    metasploit 簡單使用教程 浩先生, 2020-08-28 16:18:25 分類專欄: kail 網路安全 linux 文章標簽: linux資訊安全 編輯 著作權 metasploit 使用教程 前言 一、Metasploit是什么? 二、準備作業 三、具體步驟 前言 Msfconsole ......

    uj5u.com 2020-09-10 02:00:53 more
  • 游戲逆向之驅動層與用戶層通訊

    驅動層代碼: #pragma once #include <ntifs.h> #define add_code CTL_CODE(FILE_DEVICE_UNKNOWN,0x800,METHOD_BUFFERED,FILE_ANY_ACCESS) /* 更多游戲逆向視頻www.yxfzedu.com ......

    uj5u.com 2020-09-10 02:00:56 more
  • 北斗電力時鐘(北斗授時服務器)讓網路資料更精準

    北斗電力時鐘(北斗授時服務器)讓網路資料更精準 北斗電力時鐘(北斗授時服務器)讓網路資料更精準 京準電子科技官微——ahjzsz 近幾年,資訊技術的得了快速發展,互聯網在逐漸普及,其在人們生活和生產中都得到了廣泛應用,并且取得了不錯的應用效果。計算機網路資訊在電力系統中的應用,一方面使電力系統的運行 ......

    uj5u.com 2020-09-10 02:01:03 more
  • 【CTF】CTFHub 技能樹 彩蛋 writeup

    ?碎碎念 CTFHub:https://www.ctfhub.com/ 筆者入門CTF時時剛開始刷的是bugku的舊平臺,后來才有了CTFHub。 感覺不論是網頁UI設計,還是題目質量,賽事跟蹤,工具軟體都做得很不錯。 而且因為獨到的金幣制度的確讓人有一種想去刷題賺金幣的感覺。 個人還是非常喜歡這個 ......

    uj5u.com 2020-09-10 02:04:05 more
  • 02windows基礎操作

    我學到了一下幾點 Windows系統目錄結構與滲透的作用 常見Windows的服務詳解 Windows埠詳解 常用的Windows注冊表詳解 hacker DOS命令詳解(net user / type /md /rd/ dir /cd /net use copy、批處理 等) 利用dos命令制作 ......

    uj5u.com 2020-09-10 02:04:18 more
  • 03.Linux基礎操作

    我學到了以下幾點 01Linux系統介紹02系統安裝,密碼啊破解03Linux常用命令04LAMP 01LINUX windows: win03 8 12 16 19 配置不繁瑣 Linux:redhat,centos(紅帽社區版),Ubuntu server,suse unix:金融機構,證券,銀 ......

    uj5u.com 2020-09-10 02:04:30 more
  • 05HTML

    01HTML介紹 02頭部標簽講解03基礎標簽講解04表單標簽講解 HTML前段語言 js1.了解代碼2.根據代碼 懂得挖掘漏洞 (POST注入/XSS漏洞上傳)3.黑帽seo 白帽seo 客戶網站被黑帽植入劫持代碼如何處理4.熟悉html表單 <html><head><title>TDK標題,描述 ......

    uj5u.com 2020-09-10 02:04:36 more
最新发布
  • 云端煉丹,算力白嫖,基于云端GPU(Colab)使用So-vits庫制作AI特朗

    人工智能AI技術早已深入到人們生活的每一個角落,君不見AI孫燕姿的歌聲此起彼伏,不絕于耳,但并不是每個人都擁有一塊N卡,沒有GPU的日子總是不好過的,但是沒關系,山人有妙計,本次我們基于Google的Colab免費云端服務器來搭建深度學習環境,制作AI特朗普,讓他高唱《國際歌》。 Colab(全名C ......

    uj5u.com 2023-05-16 20:36:23 more
  • 程式員不得不了解的計算機進制轉換

    程式員不得不了解的計算機進制轉換 最近在備考軟考的軟體設計師考試,學到了關于計算機的資料表示,由于我是半路出家學的Java,導致計算機基礎知識很差,在這里記錄一下學習感受 為啥要用二進制 早期計算機的存盤介質是晶體管,晶體管根據電壓不同,只能表示2種狀態,也就是0和1 計算機使用二進制運算更加方便 ......

    uj5u.com 2023-05-16 20:35:46 more
  • Windows本地認證之NTML哈希和LM哈希

    Windows本地認證之NTML哈希和LM哈希 一、本地認證的流程 Windows的登陸密碼是儲存在系統本地的SAM檔案中的,在登陸Windows的時候,系統會將用戶輸入的密碼與 SAM檔案中的密碼進行對比,如果相同,則認證成功。 SAM檔案是位于C:\Windows\System32\config ......

    uj5u.com 2023-05-16 20:35:29 more
  • 分享一個國內可用的ChatGPT網站,免費無限制,支持AI繪畫 - AI 百曉

    背景 ChatGPT作為一種基于人工智能技術的自然語言處理工具,近期的熱度直接沸騰🌋。 作為一個AI愛好者,翻遍了各大基于ChatGPT的網站,終于找到一個免費!免登陸!手機電腦通用!國內可直接對話的ChatGPT,也有各種提供作業效率的工具供大家使用。 產品名稱 百曉生 網站地址 https:/ ......

    uj5u.com 2023-05-16 20:34:42 more
  • 淺析AIGC for MMKG

    摘要:AIGC和多模態知識圖譜(MMKG)中的知識獲取又是怎么實作的呢?他們之間有什么關聯呢? 本文分享自華為云社區《GPT-4發布,AIGC時代的多模態還能走多遠?系列之四 AIGC for MMKG》,作者:碼上開花_Lancer。 與傳統知識圖譜不同,MMKG以多模態資料作為源頭,從多方面描述 ......

    uj5u.com 2023-05-16 20:33:49 more
  • 統計學習方法筆記-感知機學習方法

    感知機(Perceptron) 1.感知機模型 1.1感知機定義 ? 輸入空間$ \mathcal{X} \subseteq \mathbb{R}^n$ ,輸出空間$\mathcal{Y}$={+1, -1} ; ? 輸入$x \in \mathcal{X}$表示的實體的特征向量,對應于輸入空間的點 ......

    uj5u.com 2023-05-16 20:20:32 more
  • 云端煉丹,算力白嫖,基于云端GPU(Colab)使用So-vits庫制作AI特朗

    人工智能AI技術早已深入到人們生活的每一個角落,君不見AI孫燕姿的歌聲此起彼伏,不絕于耳,但并不是每個人都擁有一塊N卡,沒有GPU的日子總是不好過的,但是沒關系,山人有妙計,本次我們基于Google的Colab免費云端服務器來搭建深度學習環境,制作AI特朗普,讓他高唱《國際歌》。 Colab(全名C ......

    uj5u.com 2023-05-16 20:08:59 more
  • 資料智能加持下,中小微企業告別“融資難”

    摘要:資料智能是一個跨學科的研究領域,它結合大規模資料處理、資料挖掘、機器學習、可視化等技術,為基于資料制定決策或執行任務提供有效智能支持。面對資料智能藍海,開發者該如何發力呢?賽道參與者該如何走向成功呢? 本文分享自華為云社區《讓資料應用更智能!華為云助力開發者重慶譽存打造數字金融綜合解決方案》, ......

    uj5u.com 2023-05-16 20:08:05 more
  • 資料結構之堆疊

    Stack 型別定義 堆疊是限定僅在表尾進行插入和洗掉操作的線性表,又稱為后進先出(last in first out)的線性表(LIFO結構),表尾稱為堆疊頂,表頭稱為堆疊底,不含元素則稱為空堆疊; 抽象資料型別: InitStack(&S) //構造空堆疊S DestoryStack(&S) //銷毀堆疊S ......

    uj5u.com 2023-05-16 20:06:58 more
  • 程式員不得不了解的計算機進制轉換

    程式員不得不了解的計算機進制轉換 最近在備考軟考的軟體設計師考試,學到了關于計算機的資料表示,由于我是半路出家學的Java,導致計算機基礎知識很差,在這里記錄一下學習感受 為啥要用二進制 早期計算機的存盤介質是晶體管,晶體管根據電壓不同,只能表示2種狀態,也就是0和1 計算機使用二進制運算更加方便 ......

    uj5u.com 2023-05-16 19:53:05 more