主頁 >  其他 > 數學建模常用功能

數學建模常用功能

2021-10-20 07:18:51 其他

目錄

pandas讀取資料

查看資料例外

提取指定列

將dataframe資料以numpy形式提取

資料劃分

隨機森林回歸

GBDT回歸

特征重要性可視化

輸出:

? 繪制3D散點圖

匯入自定義包且.py檔案修改時jupyter notebook自動同步

dataframe洗掉某列中重復欄位并洗掉對應行

LASSO回歸

繪制回歸誤差圖

輸出:

? Adaboost回歸

LightGBM回歸

XGBoost

繪制學習曲線

輸出:

繪制dataframe資料分布圖

輸出:

SVM分類

使用貝葉斯優化SVM

輸出:

后續:

繪制ROC曲線

輸出:

PCA降維

PCA降維可視化

輸出:

求解極值

輸出解釋:


pandas讀取資料

import numpy as np
import pandas as pd
import random
Molecular_Descriptor = pd.read_excel('Molecular_Descriptor.xlsx',header=0)
Molecular_Descriptor.head()

查看資料例外

#判斷資料NAN,INF
print(Molecular_Descriptor.isnull().any())
print(np.isnan(Molecular_Descriptor).any())
print(np.isfinite(Molecular_Descriptor).all())
print(np.isinf(Molecular_Descriptor).all())

提取指定列

Molecular_Descriptor.iloc[:,1:]

將dataframe資料以numpy形式提取

#  .values能夠將dataframe中的資料以numpy的形式讀取
X = Molecular_Descriptor.iloc[:,1:].values
Y = ERα_activity.iloc[:,2].values

資料劃分

from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X,
                                                    Y,
                                                    test_size=0.2,
                                                    random_state=0)

#列印出原始樣本集、訓練集和測驗集的數目
print("The length of original data X is:", X.shape[0])
print("The length of train Data is:", X_train.shape[0])
print("The length of test Data is:", X_test.shape[0])

隨機森林回歸

#匯入隨機森林庫
from sklearn.ensemble import RandomForestRegressor
#匯入sklearn度量庫
from sklearn import metrics
#定義分類器
RFRegressor = RandomForestRegressor(n_estimators=200, random_state=0)
#模型訓練
RFregressor.fit(X_train, y_train)
#模型預測
y_pred = RFregressor.predict(X_test)
#輸出回歸模型評價指標
print('Mean Absolute Error:', metrics.mean_absolute_error(y_test, y_pred))
print('Mean Squared Error:', metrics.mean_squared_error(y_test, y_pred))
print('Root Mean Squared Error:',
      np.sqrt(metrics.mean_squared_error(y_test, y_pred)))
#獲得特征重要性
print(RFregressor.feature_importances_)

GBDT回歸

from sklearn.ensemble import GradientBoostingRegressor
gbdt = GradientBoostingRegressor(random_state=0)
gbdt.fit(X_train, y_train)
y_pred = gbdt.predict(X_test)
print('Mean Absolute Error:', metrics.mean_absolute_error(y_test, y_pred))
print('Mean Squared Error:', metrics.mean_squared_error(y_test, y_pred))
print('Root Mean Squared Error:',
      np.sqrt(metrics.mean_squared_error(y_test, y_pred)))

特征重要性可視化

import matplotlib.pyplot as plt
plt.rcParams["font.sans-serif"] = ["SimHei"]   # 用來正常顯示中文標簽
plt.rcParams["axes.unicode_minus"] = False     # 解決負號"-"顯示為方塊的問題

plt.rcParams['savefig.dpi'] = 150 #圖片像素
plt.rcParams['figure.dpi'] = 150 #解析度


def plot_feature_importance(dataset, model_bst):\
    '''
        dataset : 資料集 dataframe
        model_bst : 訓練好的模型
    '''
    list_feature_name = list(dataset.columns[1:])
    list_feature_importance = list(model_bst.feature_importances_)
    dataframe_feature_importance = pd.DataFrame(
        {'feature_name': list_feature_name, 'importance': list_feature_importance})
    dataframe_feature_importance20 = dataframe_feature_importance.sort_values(by='importance', ascending=False)[:20]
    print(dataframe_feature_importance20)
    x = range(len(dataframe_feature_importance20['feature_name']))
    plt.xticks(x, dataframe_feature_importance20['feature_name'], rotation=90, fontsize=8)
    plt.plot(x, dataframe_feature_importance20['importance'])
    plt.xlabel("分子描述符")
    plt.ylabel("重要程度")
    plt.title('重要程度可視化')
    plt.grid()
    #保存影像
    #plt.savefig('重要程度可視化.png')
    plt.show()
    return dataframe_feature_importance20['feature_name']

if __name__ == '__main__':
    # 傳入資料集dataframe , 模型對特征重要性進行評估
    gbdt_name = plot_feature_importance(Molecular_Descriptor,gbdt)

輸出:

繪制3D散點圖

z = list(range(0,729))
plt.rcParams['savefig.dpi'] = 150 #圖片像素
plt.rcParams['figure.dpi'] = 150 #解析度
plt.rcParams["font.sans-serif"] = ["SimHei"]   # 用來正常顯示中文標簽
plt.rcParams["axes.unicode_minus"] = False     # 解決負號"-"顯示為方塊的問題
from mpl_toolkits.mplot3d import Axes3D
x = regressor.feature_importances_
y = gbdt.feature_importances_
fig = plt.figure()
plt.subplots_adjust(right=0.8)
ax = fig.add_subplot(111, projection='3d')  # 創建一個三維的繪圖工程
ax.scatter(x,y,z,c='b',s=5,alpha=1)
#設定x、y軸坐標刻標以及對應的標簽
plt.xticks(fontsize=7)
plt.yticks(fontsize=7)
#統一設定x、y、z軸標簽字體
plt.tick_params(labelsize=7)
#設定x、y、z標簽
plt.xlabel("x軸",fontsize=8)
plt.ylabel("y軸",fontsize=8)
ax.set_zlabel('z軸',fontsize=8)
plt.savefig('這是三維圖.png')

匯入自定義包且.py檔案修改時jupyter notebook自動同步

%load_ext autoreload
%autoreload 2

dataframe洗掉某列中重復欄位并洗掉對應行

dataframe_feature_importance = dataframe_feature_importance.drop_duplicates(subset=['feature_name'], keep='first', inplace=False)

LASSO回歸

from sklearn import linear_model

model = linear_model.LassoCV()
model.fit(X_train, y_train)
y_predict = model.predict(X_test)
print('Mean Absolute Error:', metrics.mean_absolute_error(y_test, y_predict))
print('Mean Squared Error:', metrics.mean_squared_error(y_test, y_predict))
print('Root Mean Squared Error:',
      np.sqrt(metrics.mean_squared_error(y_test, y_predict)))

繪制回歸誤差圖

x_t = np.linspace(0, len(np.array(y_test)), len(np.array(y_test)))
plt.plot(x_t, y_test, marker='.', label="origin data")
# plt.xticks([])
plt.plot(x_t, y_predict, 'r-', marker='.', label="predict", lw=1)
plt.xlabel('樣本編號')
plt.ylabel('預測結果')
# plt.figure(figsize=(10,100))
plt.legend(labels=['test','predict'],loc='best')
# plt.xticks([])
score = model.score(X_test,y_test)
print(score)
plt.text(140, 3, 'score=%.4f' % score, fontdict={'size': 15, 'color': 'red'})
plt.savefig('Lasso.png')

輸出:

Adaboost回歸

from sklearn.ensemble import AdaBoostClassifier
clf = AdaBoostRegressor(DecisionTreeRegressor(max_depth=3),
                            n_estimators=5000, random_state=123)
clf.fit(X_train,y_train)
y_predict = clf.predict(X_test)
print('Mean Absolute Error:', metrics.mean_absolute_error(y_test, y_predict))
print('Mean Squared Error:', metrics.mean_squared_error(y_test, y_predict))
print('Root Mean Squared Error:',
      np.sqrt(metrics.mean_squared_error(y_test, y_predict)))

LightGBM回歸

import lightgbm as lgb

clf = lgb.LGBMRegressor(
boosting_type='gbdt',
random_state=2019,
objective='regression')
# 訓練模型
clf.fit(X=X_train, y=y_train, eval_metric='MSE', verbose=50)
y_predict = clf.predict(X_test)
print('Mean Absolute Error:', metrics.mean_absolute_error(y_test, y_predict))
print('Mean Squared Error:', metrics.mean_squared_error(y_test, y_predict))
print('Root Mean Squared Error:',
      np.sqrt(metrics.mean_squared_error(y_test, y_predict)))

XGBoost

import xgboost as xgb
clf = xgb.XGBRegressor(max_depth=5, learning_rate=0.1, n_estimators=5000, silent=False, objective='reg:gamma')
# 訓練模型
clf.fit(X=X_train, y=y_train)
y_predict = clf.predict(X_test)
print('Mean Absolute Error:', metrics.mean_absolute_error(y_test, y_predict))
print('Mean Squared Error:', metrics.mean_squared_error(y_test, y_predict))
print('Root Mean Squared Error:',
      np.sqrt(metrics.mean_squared_error(y_test, y_predict)))

繪制學習曲線

from sklearn.model_selection import learning_curve
from sklearn.model_selection import ShuffleSplit
def plot_learning_curve(estimator, title, X, y, ylim=None, cv=None,n_jobs=1, train_sizes=np.linspace(.1, 1.0, 5)):
    plt.figure()
    plt.title(title)
    if ylim is not None:
        plt.ylim(*ylim)
    plt.xlabel("Training examples")
    plt.ylabel("Score")
    train_sizes, train_scores, test_scores = learning_curve(
        estimator, X, y, cv=cv, n_jobs=n_jobs, train_sizes=train_sizes)
    train_scores_mean = np.mean(train_scores, axis=1)
    train_scores_std = np.std(train_scores, axis=1)
    test_scores_mean = np.mean(test_scores, axis=1)
    test_scores_std = np.std(test_scores, axis=1)
    plt.grid()

    plt.fill_between(train_sizes, train_scores_mean - train_scores_std,
                     train_scores_mean + train_scores_std, alpha=0.1,
                     color="r")
    plt.fill_between(train_sizes, test_scores_mean - test_scores_std,
                     test_scores_mean + test_scores_std, alpha=0.1, color="g")
    plt.plot(train_sizes, train_scores_mean, 'o-', color="r",
             label="Training score")
    plt.plot(train_sizes, test_scores_mean, 'o-', color="g",
             label="Cross-validation score")

    plt.legend(loc="best")
    return plt
if __name__ == '__main__':
    title = "Learning Curves"
    # Cross validation with 100 iterations to get smoother mean test and train
    # score curves, each time with 20% data randomly selected as a validation set.
    cv = ShuffleSplit(n_splits=10, test_size=0.2, random_state=0)
    estimator =lgb.LGBMRegressor(learning_rate=0.001,
    max_depth=-1,
    n_estimators=10000,
    boosting_type='gbdt',
    random_state=2019,
    objective='regression',)
    #模型 影像標題 資料 標簽 K折
    p = plot_learning_curve(estimator, title, XX, YY, cv=cv, n_jobs=4)
    p.savefig('LearnCurves.png')

輸出:

繪制dataframe資料分布圖

#
name = ['gmin', 'MDEC-22', 'minaaN', 'maxHBint10', 'minHBint10', 'maxdO',
             'C2SP1', 'BCUTw-1h', 'BCUTp-1l', 'MDEN-33', 'VC-4', 'nAtomLAC',
             'SHBint10', 'minHBint4', 'C2SP2', 'MDEC-24', 'hmax', 'SHBint9',
             'fragC', 'LipinskiFailures']
# 提取資料指定列
t = Molecular_Descriptor[name]
#資料歸一化
t = (t-t.min())/(t.max()-t.min())

t.plot(alpha=0.8)
#橫向拉長x軸
N=100
plt.legend(loc=2, bbox_to_anchor=(1.05,1.0),borderaxespad= 0)
# change x internal size
plt.gca().margins(x=0)
plt.gcf().canvas.draw()
tl = plt.gca().get_xticklabels()
# maxsize = max([t.get_window_extent().width for t in tl])
maxsize = 30
m = 0.2  # inch margin
s = maxsize / plt.gcf().dpi * N + 2 * m
margin = m / plt.gcf().get_size_inches()[0]

plt.gcf().subplots_adjust(left=margin, right=1. - margin)
plt.gcf().set_size_inches(s, plt.gcf().get_size_inches()[1])
#合理布局
plt.tight_layout()
plt.savefig("資料分布.png")

輸出:

SVM分類

from sklearn.svm import SVC
from sklearn import metrics
#定義SVM分類器
clf = SVC()
#模型訓練
clf.fit(X_train,y_train)
#模型預測
y_pred = clf.predict(X_test)
#模型評估
print('準確率=%.4f'%metrics.accuracy_score(y_test,y_pred))
print('召回率=%.4f'%metrics.recall_score(y_test, y_pred, pos_label=1))
print('精準率=%.4f'%metrics.precision_score(y_test, y_pred, pos_label=1) )
print('F1=%.4f'%metrics.f1_score(y_test, y_pred, average='weighted',pos_label=1)  )

使用貝葉斯優化SVM

from sklearn.datasets import make_classification
from sklearn.model_selection import cross_val_score
from sklearn.ensemble import RandomForestClassifier as RFC
from sklearn.svm import SVC

from bayes_opt import BayesianOptimization
from bayes_opt.util import Colours


def svc_cv(C, gamma, X_train, y_train):
    """SVC cross validation.
    This function will instantiate a SVC classifier with parameters C and
    gamma. Combined with data and targets this will in turn be used to perform
    cross validation. The result of cross validation is returned.
    Our goal is to find combinations of C and gamma that maximizes the roc_auc
    metric.
    """
    #設定分類器
    estimator = SVC(C=C, gamma=gamma, random_state=2)
    #交叉驗證
    cval = cross_val_score(estimator, X_train, y_train, scoring='roc_auc', cv=4)
    return cval.mean()
def optimize_svc(X_train, y_train):
    """Apply Bayesian Optimization to SVC parameters."""

    def svc_crossval(expC, expGamma):
        """Wrapper of SVC cross validation.
        Notice how we transform between regular and log scale. While this
        is not technically necessary, it greatly improves the performance
        of the optimizer.
        """
        C = 10 ** expC
        gamma = 10 ** expGamma
        return svc_cv(C=C, gamma=gamma, data=X_train, targets=y_train)

    optimizer = BayesianOptimization(
        f=svc_crossval,
        #設定超參范圍
        pbounds={"expC": (-3, 2), "expGamma": (-4, -1)},
        random_state=1234,
        verbose=2
    )
    optimizer.maximize(n_iter=10)

    print("Final result:", optimizer.max)
if __name__ == '__main__':
    #開始搜索超參
    optimize_svc(X_train, y_train)

輸出:

    |   iter    |  target   |   expC    | expGamma  |
-------------------------------------------------
|  1        |  0.8239   | -2.042    | -2.134    |
|  2        |  0.8973   | -0.8114   | -1.644    |
|  3        |  0.8791   |  0.8999   | -3.182    |
|  4        |  0.8635   | -1.618    | -1.594    |
|  5        |  0.9104   |  1.791    | -1.372    |
|  6        |  0.9213   |  1.099    | -1.502    |
|  7        |  0.9165   |  0.2084   | -1.0      |
|  8        |  0.8727   |  2.0      | -4.0      |
|  9        |  0.9117   |  1.131    | -1.0      |
|  10       |  0.9241   |  0.3228   | -1.88     |
|  11       |  0.9346   |  2.0      | -2.322    |
|  12       |  0.9335   |  1.429    | -2.239    |
|  13       |  0.7927   | -3.0      | -4.0      |
|  14       |  0.927    |  2.0      | -2.715    |
|  15       |  0.9354   |  1.742    | -2.249    |
=================================================
Final result: {'target': 0.9353828944247531, 'params': {'expC': 1.7417094883510253, 'expGamma': -2.248984327197053}}

iter為迭代次數,target為模型所獲得的分數(越高越好),expC、expGamma為需要貝葉斯優化的引數

后續:

如何使用?根據搜索到的超引數'params': {'expC': 1.7417094883510253, 'expGamma': -2.248984327197053}重新訓練分類器即可

clf = SVC(C=10**1.74,gamma=10**(-2.248))
clf.fit(X_train,y_train)
y_pred = clf.predict(X_test)

繪制ROC曲線

import matplotlib.pyplot as plt
from sklearn.metrics import roc_curve, auc
import matplotlib.pyplot as plt
 
plt.rcParams['savefig.dpi'] = 150 #圖片像素
plt.rcParams['figure.dpi'] = 150 #解析度
#傳入真實值和預測值
fpr, tpr, thersholds = roc_curve(y_test, y_pred, pos_label=1)
 
for i, value in enumerate(thersholds):
    print("%f %f %f" % (fpr[i], tpr[i], value))
roc_auc = auc(fpr, tpr)
 
plt.plot(fpr, tpr, 'k--', label='ROC (area = {0:.2f})'.format(roc_auc), lw=2,c='r')
 
plt.xlim([-0.05, 1.05])  # 設定x、y軸的上下限,以免和邊緣重合,更好的觀察影像的整體
plt.ylim([-0.05, 1.05])
plt.xlabel('False Positive Rate')
plt.ylabel('True Positive Rate')  # 可以使用中文,但需要匯入一些庫即字體
plt.title('ROC Curve')
plt.legend(loc="lower right")
plt.savefig('Caco-2分類ROC曲線.png')
plt.show()
print(roc_auc)

輸出:

PCA降維

from sklearn.decomposition import PCA
#定義PCA分類器,n_components為需要降到的維數
pca = PCA(n_components=50)
# X.shape = (1974,729)
#資料轉換 (1974,729) -> (1974,50)
new_X = pca.fit_transform(X)
#new_X.shape = (1974,50)

PCA降維可視化

# plt.rcParams['savefig.dpi'] = 150 #圖片像素
# plt.rcParams['figure.dpi'] = 150 #解析度
plt.rcParams["font.sans-serif"] = ["SimHei"]   # 用來正常顯示中文標簽
plt.rcParams["axes.unicode_minus"] = False     # 解決負號"-"顯示為方塊的問題
from mpl_toolkits.mplot3d import Axes3D
# 降到3維
pca = PCA(n_components=3)
pca_test = pca.fit_transform(X_test)
pca_test.shape
fig = plt.figure()
plt.subplots_adjust(right=0.8)
ax = fig.add_subplot(111, projection='3d')  # 創建一個三維的繪圖工程
y_pred==0
#分離0 1
label0 = pca_test[y_pred==0]
label1 = pca_test[y_pred==1]
# label0
ax.scatter(label0[:,0],label0[:,1],label0[:,2],label=0,alpha=0.8)
ax.scatter(label1[:,0],label1[:,1],label1[:,2],label=1,alpha=0.8)
plt.legend()
plt.savefig('Caco2分類三維影像.png')

輸出:

求解極值

# coding=utf-8
from scipy.optimize import minimize
import numpy as np

#設定引數范圍/約束條件
l_x_min = [0,1,2,3]
l_x_max = [4,5,6,7]
def fun():
    #minimize只能求極小值,如果需要極大值,則在函式前添加負號,本案例為求極大值
    v=lambda x: -1*(coef[0]*x[0]+coef[1]*x[1]+coef[2]*x[2]+coef[3]*x[3]+intercept)
    return v
def con():
    # 約束條件 分為eq 和ineq
    #eq表示 函式結果等于0 ; ineq 表示 運算式大于等于0  
    #{'type': 'ineq', 'fun': lambda x: x[0] - l_x_min[0]}表示 x[0] - l_x_min[0]>=0
    cons = ({'type': 'ineq', 'fun': lambda x: x[0] - l_x_min[0]},\
              {'type': 'ineq', 'fun': lambda x: -x[0] + l_x_max[0]},\
             {'type': 'ineq', 'fun': lambda x: x[1] - l_x_min[1]},\
                {'type': 'ineq', 'fun': lambda x: -x[1] + l_x_max[1]},\
            {'type': 'ineq', 'fun': lambda x: x[2] - l_x_min[2]},\
             {'type': 'ineq', 'fun': lambda x: -x[2] + l_x_max[2]},\
            {'type': 'ineq', 'fun': lambda x: x[3] - l_x_min[3]},\
              {'type': 'ineq', 'fun': lambda x: -x[3] + l_x_max[3]})
    
    return cons
 
if __name__ == "__main__":
    #定義常量值
    
    
    cons = con()
    #設定初始猜測值  
    x0 = np.random.rand(4)

    res = minimize(fun(), x0, method='SLSQP',constraints=cons)
    print(res.fun)
    print(res.success)
    print(res.x)

輸出解釋:

#舉例:
[output]:
-1114.4862509294192  # 由于在開始時給函式添加符號,最后還需要*-1,因此極大值為1114.4862509294192
True #成功找到極值
[-1.90754988e-10  6.36254335e+00 -1.25920646e-10  1.90480000e-01] #該極值對應x解

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

標籤:AI

上一篇:NLP 實戰 (7) | 熱榜演算法更新

下一篇:ORB_SLAM2 原始碼決議 特征匹配 (五)

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(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
最新发布
  • 2023年最新微信小程式抓包教程

    01 開門見山 隔一個月發一篇文章,不過分。 首先回顧一下《微信系結手機號資料庫被脫庫事件》,我也是第一時間得知了這個訊息,然后跟蹤了整件事情的經過。下面是這起事件的相關截圖以及近日流出的一萬條資料樣本: 個人認為這件事也沒什么,還不如關注一下之前45億快遞資料查詢渠道疑似在近日復活的訊息。 訊息是 ......

    uj5u.com 2023-04-20 08:48:24 more
  • web3 產品介紹:metamask 錢包 使用最多的瀏覽器插件錢包

    Metamask錢包是一種基于區塊鏈技術的數字貨幣錢包,它允許用戶在安全、便捷的環境下管理自己的加密資產。Metamask錢包是以太坊生態系統中最流行的錢包之一,它具有易于使用、安全性高和功能強大等優點。 本文將詳細介紹Metamask錢包的功能和使用方法。 一、 Metamask錢包的功能 數字資 ......

    uj5u.com 2023-04-20 08:47:46 more
  • vulnhub_Earth

    前言 靶機地址->>>vulnhub_Earth 攻擊機ip:192.168.20.121 靶機ip:192.168.20.122 參考文章 https://www.cnblogs.com/Jing-X/archive/2022/04/03/16097695.html https://www.cnb ......

    uj5u.com 2023-04-20 07:46:20 more
  • 從4k到42k,軟體測驗工程師的漲薪史,給我看哭了

    清明節一過,盲猜大家已經無心上班,在數著日子準備過五一,但一想到銀行卡里的余額……瞬間心情就不美麗了。最近,2023年高校畢業生就業調查顯示,本科畢業月平均起薪為5825元。調查一出,便有很多同學表示自己又被平均了。看著這一資料,不免讓人想到前不久中國青年報的一項調查:近六成大學生認為畢業10年內會 ......

    uj5u.com 2023-04-20 07:44:00 more
  • 最新版本 Stable Diffusion 開源 AI 繪畫工具之中文自動提詞篇

    🎈 標簽生成器 由于輸入正向提示詞 prompt 和反向提示詞 negative prompt 都是使用英文,所以對學習母語的我們非常不友好 使用網址:https://tinygeeker.github.io/p/ai-prompt-generator 這個網址是為了讓大家在使用 AI 繪畫的時候 ......

    uj5u.com 2023-04-20 07:43:36 more
  • 漫談前端自動化測驗演進之路及測驗工具分析

    隨著前端技術的不斷發展和應用程式的日益復雜,前端自動化測驗也在不斷演進。隨著 Web 應用程式變得越來越復雜,自動化測驗的需求也越來越高。如今,自動化測驗已經成為 Web 應用程式開發程序中不可或缺的一部分,它們可以幫助開發人員更快地發現和修復錯誤,提高應用程式的性能和可靠性。 ......

    uj5u.com 2023-04-20 07:43:16 more
  • CANN開發實踐:4個DVPP記憶體問題的典型案例解讀

    摘要:由于DVPP媒體資料處理功能對存放輸入、輸出資料的記憶體有更高的要求(例如,記憶體首地址128位元組對齊),因此需呼叫專用的記憶體申請介面,那么本期就分享幾個關于DVPP記憶體問題的典型案例,并給出原因分析及解決方法。 本文分享自華為云社區《FAQ_DVPP記憶體問題案例》,作者:昇騰CANN。 DVPP ......

    uj5u.com 2023-04-20 07:43:03 more
  • msf學習

    msf學習 以kali自帶的msf為例 一、msf核心模塊與功能 msf模塊都放在/usr/share/metasploit-framework/modules目錄下 1、auxiliary 輔助模塊,輔助滲透(埠掃描、登錄密碼爆破、漏洞驗證等) 2、encoders 編碼器模塊,主要包含各種編碼 ......

    uj5u.com 2023-04-20 07:42:59 more
  • Halcon軟體安裝與界面簡介

    1. 下載Halcon17版本到到本地 2. 雙擊安裝包后 3. 步驟如下 1.2 Halcon軟體安裝 界面分為四大塊 1. Halcon的五個助手 1) 影像采集助手:與相機連接,設定相機引數,采集影像 2) 標定助手:九點標定或是其它的標定,生成標定檔案及內參外參,可以將像素單位轉換為長度單位 ......

    uj5u.com 2023-04-20 07:42:17 more
  • 在MacOS下使用Unity3D開發游戲

    第一次發博客,先發一下我的游戲開發環境吧。 去年2月份買了一臺MacBookPro2021 M1pro(以下簡稱mbp),這一年來一直在用mbp開發游戲。我大致分享一下我的開發工具以及使用體驗。 1、Unity 官網鏈接: https://unity.cn/releases 我一般使用的Apple ......

    uj5u.com 2023-04-20 07:40:19 more