主頁 >  其他 > Kaggle經典測驗,泰坦尼克號的生存預測,機器學習實驗----02

Kaggle經典測驗,泰坦尼克號的生存預測,機器學習實驗----02

2021-08-11 06:26:51 其他

Kaggle經典測驗,泰坦尼克號的生存預測,機器學習實驗----02

文章目錄

    • Kaggle經典測驗,泰坦尼克號的生存預測,機器學習實驗----02
      • 一、引言
      • 二、問題
      • 三、問題分析
      • 四、具體操作
        • 1、讀取資料并且進行預處理
        • 2、劃分標簽以及特征并且初始化引數
        • 3、開始線性回歸
        • 4、測驗模型并且進行打分
        • 5、保存資料結果
      • 五、完整代碼
      • 六、本演算法的核心代碼:

在這里插入圖片描述

一、引言

泰坦尼克號(RMS Titanic),又譯作鐵達尼號,是英國白星航運公司下轄的一艘奧林匹克級游輪,排水量46000噸,泰坦尼克號是當時世界上體積最龐大、內部設施最豪華的客運輪船,有“永不沉沒”的美譽 ,

然而不幸的是,在它的處女航中,泰坦尼克號便遭厄運——它從英國南安普敦出發駛向美國紐約,1912年4月14日23時40分左右,泰坦尼克號與一座冰山相撞,造成右舷船艏至船中部破裂,五間水密艙進水,4月15日凌晨2時20分左右,泰坦尼克船體斷裂成兩截后沉入大西洋底3700米處,2224名船員及乘客中,1517人喪生,其中僅333具罹難者遺體被尋回,泰坦尼克號沉沒事故為和平時期死傷人數最為慘重的一次海難,其殘骸直至1985年才被再度發現,目前受到聯合國教育、科學及文化組織的保護,

二、問題

那么,問題來了,想在泰坦尼克號這次災難中存活下來需要具備那些條件呢?

也就是說,如果實作知道一個人的所有情況,我們該如何判斷這個人是否會遇難呢?

這樣就需要機器學習來解決了,

三、問題分析

顯然,在泰坦尼克號這次災難中,一個人要么是遇難,要么是幸存,所以實際上是一個邏輯回歸,但由于這是剛剛起步的一個實驗,我們暫且不使用邏輯回歸,依然采用線性回歸來進行資料的處理和分析,后面我們會再次做這個實驗,屆時,我們將使用邏輯回歸,然而本次就是用線性回歸了啦,

四、具體操作

1、讀取資料并且進行預處理

首先讀入檔案(csv),然后洗掉一些不必要的資料,接下來進行一定的調整,既可以得到下面的結果:



def read_data_of_csv(file_name):
    """
    read the csv files to get the data of the titanic accident
    :param file_name: the name of the file
    :return: df -> the data in the file that is opened above
    """
    df = pandas.read_csv(file_name)
    return df


if __name__ == '__main__':
    """
    main
    """

    # here we need not to split the train and the test !

    """
    1.get data and do the prior things before the machine learning
    """
    df_train = read_data_of_csv("titanic/train.csv")
    # print(df_train)
    # deal with the data first before machine learning
    df_train.drop("Embarked", axis=1, inplace=True)
    # i think embarked is not useful, so i delete this embarked line
    df_train.drop("Cabin", axis=1, inplace=True)
    # delete the cabin
    df_train.drop("Ticket", axis=1, inplace=True)
    # delete the ticket
    df_train.drop("Name", axis=1, inplace=True)
    # delete the name
    df_train.drop("PassengerId", axis=1, inplace=True)
    # delete the passenger id

    for int_number_of_len in range(len(df_train)):
        if df_train.loc[int_number_of_len, "Sex"] == "male":
            df_train.loc[int_number_of_len, "Sex"] = 1
            # if male then set the sex 1
        else:
            df_train.loc[int_number_of_len, "Sex"] = 0
            # if female then set the sex 0
    # change the introduction of sex from string to int 1 or 0
    df_train.dropna(axis=0, how="any", inplace=True)
    # delete the NaN data
    print(df_train)
    # show the result

  

最終的df_train:

     Survived  Pclass Sex   Age  SibSp  Parch     Fare
0           0       3   1  22.0      1      0   7.2500
1           1       1   0  38.0      1      0  71.2833
2           1       3   0  26.0      0      0   7.9250
3           1       1   0  35.0      1      0  53.1000
4           0       3   1  35.0      0      0   8.0500
..        ...     ...  ..   ...    ...    ...      ...
885         0       3   0  39.0      0      5  29.1250
886         0       2   1  27.0      0      0  13.0000
887         1       1   0  19.0      0      0  30.0000
889         1       1   1  26.0      0      0  30.0000
890         0       3   1  32.0      0      0   7.7500

[714 rows x 7 columns]

Process finished with exit code 0

2、劃分標簽以及特征并且初始化引數

需要將資料中的特征以及標簽分開來進行處理

隨后需要進行引數的初始化


    """
    2.split the label and the features
    """
    
    y_train = df_train.loc[:, "Survived"]
    print(y_train)
    # y of the train

    X_train = df_train.loc[:, "Pclass": "Fare"]
    print(X_train)
    # X of the train

    """
    3.set the initial params of the liner regression
    """
    alpha = float(input("input the alpha:\n"))


    list_theta = []
    for number_of_the_total_thetas_list in range(6 + 1):
        list_theta[number_of_the_total_thetas_list] = float(
            input(f"input the theta {number_of_the_total_thetas_list}:\n"))
        # input the theta

3、開始線性回歸

這里是訓練機器的代碼

必須強調一下!!

引數選取非常重要!!!!



    """
    4.make the machine learning of the liner regression operations
    """
    iter_of_regression = int(input("input the number of iter times:\n"))

    for num_of_iter_of_regression in range(iter_of_regression):
        # make iter_of_regression times of the regression
        h_x = list_theta[0] + \
              list_theta[1] * X_train.loc[:, "Pclass"] + \
              list_theta[2] * X_train.loc[:, "Sex"] + \
              list_theta[3] * X_train.loc[:, "Age"] + \
              list_theta[4] * X_train.loc[:, "SibSp"] + \
              list_theta[5] * X_train.loc[:, "Parch"] + \
              list_theta[6] * X_train.loc[:, "Fare"]
        # 7 theta
        # 6 x of the feature

        loss = \
            y_train - h_x
        # calculate the loss

        # loss ^ 2
        print(loss.T.dot(loss))


        # the sum of loss:
        sum_loss = 0
        # plus the loss
        for o in range(len(loss)):
            # print(loss.iloc[o])
            sum_loss += loss.iloc[o]  # float
        # list_theta[0] = list_theta[0] + alpha * sum_loss / len(loss)
        # print(loss)
        list_theta[0] += \
            alpha * sum_loss / len(loss)
        # update the list_theta[0]

        # print(list(X_train.index))
        # 0's index
        for c in [1, 2, 3, 4, 5, 6]:
            list_theta[c] += \
                alpha * (X_train.loc[:, list(X_train)[(c - 1)]].T.dot(loss)) / len(loss)
        # update the list theta of the params
        # X_train.loc[:, c - 1].T.dot(loss)
        # T transfer, dot dot_multiply

        # do all the thetas !!

        # continue

        print(list_theta)
        # theta
        # print(loss.T.dot(loss))
        # print(loss.T.dot(loss))
        # loss ^ 2

        continue


4、測驗模型并且進行打分


    """
    5.do the test of this project
    """

    # the same operation
    df_test = read_data_of_csv("titanic/test.csv")
    df_test.drop("Embarked", axis=1, inplace=True)
    df_test.drop("Cabin", axis=1, inplace=True)
    df_test.drop("Ticket", axis=1, inplace=True)
    df_test.drop("Name", axis=1, inplace=True)
    df_test.drop("PassengerId", axis=1, inplace=True)
    # delete

    for int_number_of_len in range(len(df_test)):
        if df_test.loc[int_number_of_len, "Sex"] == "male":
            df_test.loc[int_number_of_len, "Sex"] = 1
            # if male then set the sex 1
        else:
            df_test.loc[int_number_of_len, "Sex"] = 0
            # if female then set the sex 0
    # change the introduction of sex from string to int 1 or 0

    # delete the NaNs
    df_test.dropna(axis=0, how="any", inplace=True)
    # delete the NaN data

    print(df_test)
    # show the result

    y_test = df_test.loc[:, "Survived"]

    X_test = df_test.loc[:, "Pclass":"Fare"]

    print(y_test)
    print(X_test)

    test_h_x = list_theta[0] + \
        list_theta[1] * X_train.loc[:, "Pclass"] + \
        list_theta[2] * X_train.loc[:, "Sex"] + \
        list_theta[3] * X_train.loc[:, "Age"] + \
        list_theta[4] * X_train.loc[:, "SibSp"] + \
        list_theta[5] * X_train.loc[:, "Parch"] + \
        list_theta[6] * X_train.loc[:, "Fare"]
    # the final function

    """
    6.score the model
    """

    N = len(y_test)
    # the total of the test number
    num_of_win_the_prediction_of_the_model = 0
    # predict the result

    # as long as we are right, whether the person is alive or dead, it does not matter
    for win_number_of_the_test_of_each in range(N):
        if test_h_x.iloc[win_number_of_the_test_of_each] < 0.5:
            test_h_x.iloc[win_number_of_the_test_of_each] = 0
            # prediction < 0.5 => 0
            if y_test.iloc[win_number_of_the_test_of_each] == 0:
                num_of_win_the_prediction_of_the_model += 1
                # right!
                # right, so we num of win ++
            else:
                pass
                # wrong

        else:
            test_h_x.iloc[win_number_of_the_test_of_each] = 1
            # prediction >= 0.5 => 1
            if y_test.iloc[win_number_of_the_test_of_each] == 1:
                num_of_win_the_prediction_of_the_model += 1
                # right
            else:
                pass
                # wrong

    

5、保存資料結果

我們打開一個txt檔案,將資料保存在里面,


    """
    7.save the model
    """

    with open("result.txt", "w") as f:
        f.write("result record:\n")
        # result

        f.write("the alpha:\n")
        f.write(f"{alpha}")
        f.write("\n")
        # 1.alpha

        f.write("the thetas of the model:\n")
        recording_number_position = 1
        for theta_of_the_last in list_theta:
            f.write(f"{recording_number_position}. ")
            f.write(f"{theta_of_the_last}")
            f.write("\n")
            recording_number_position += 1
            continue
        # 2.write the thetas
        f.write("\n")

        f.write("features:\n")
        r_n_p = 1
        for data_of_feature in list(X_train):
            f.write(f"{r_n_p}. ")
            f.write(f"{data_of_feature}")
            f.write("\n")
            r_n_p += 1
            continue
        f.write("\n")
        # 3.features

        f.write("score:\n")
        f.write(f"{num_of_win_the_prediction_of_the_model / N}")
        f.write("\n")
        f.write(f"  or the 100 :{100 * num_of_win_the_prediction_of_the_model / N}")
        f.write("\n")
        # 4.score

        f.close()
        # close the file

    sys.exit("bye bye!")
"""
END
"""

最后的資料的呈現:

result record:
the alpha:
0.0001
the thetas of the model:
1. 1.2486050331704237
2. -0.16522774554911307
3. -0.48151480883845743
4. -0.00541835063447703
5. -0.04947303449597998
6. -0.011060136497625706
7. 0.0005749482239116638

features:
1. Pclass
2. Sex
3. Age
4. SibSp
5. Parch
6. Fare

score:
0.4954682779456193
  or the 100 :49.546827794561935

從上面的資料可以看出來呢,這個模型并不是很好,以至于連及格都沒有及格了啦,wwww~~

不過沒有關系,后面我們會使用邏輯回歸再做一次這個案例的啦,后面那個顯然會好一點哦,

五、完整代碼

"""

the titanic survival prediction of machine learning

by
author: Hu Yu Xuan

at
time: 2021/8/9

using
method: liner regression

"""


import numpy
import pandas
import sys


def read_data_of_csv(file_name):
    """
    read the csv files to get the data of the titanic accident
    :param file_name: the name of the file
    :return: df -> the data in the file that is opened above
    """
    df = pandas.read_csv(file_name)
    return df


if __name__ == '__main__':
    """
    main
    """

    # here we need not to split the train and the test !

    """
    1.get data and do the prior things before the machine learning
    """

    df_train = read_data_of_csv("titanic/train.csv")
    # print(df_train)
    # deal with the data first before machine learning
    df_train.drop("Embarked", axis=1, inplace=True)
    # i think embarked is not useful, so i delete this embarked line
    df_train.drop("Cabin", axis=1, inplace=True)
    # delete the cabin
    df_train.drop("Ticket", axis=1, inplace=True)
    # delete the ticket
    df_train.drop("Name", axis=1, inplace=True)
    # delete the name
    df_train.drop("PassengerId", axis=1, inplace=True)
    # delete the passenger id

    for int_number_of_len in range(len(df_train)):
        if df_train.loc[int_number_of_len, "Sex"] == "male":
            df_train.loc[int_number_of_len, "Sex"] = 1
            # if male then set the sex 1
        else:
            df_train.loc[int_number_of_len, "Sex"] = 0
            # if female then set the sex 0
    # change the introduction of sex from string to int 1 or 0
    df_train.dropna(axis=0, how="any", inplace=True)
    # delete the NaN data
    print(df_train)
    # show the result

    """
    2.split the label and the features
    """

    y_train = df_train.loc[:, "Survived"]
    print(y_train)
    # y of the train

    X_train = df_train.loc[:, "Pclass": "Fare"]
    print(X_train)
    # X of the train

    """
    3.set the initial params of the liner regression
    """

    alpha = float(input("input the alpha:\n"))
    # alpha
    list_theta = [0, 0, 0, 0, 0, 0, 0]
    # 7 params
    for number_of_the_total_thetas_list in range(6 + 1):
        list_theta[number_of_the_total_thetas_list] = float(
            input(f"input the theta {number_of_the_total_thetas_list}:\n"))
        # input the theta

    """
    4.make the machine learning of the liner regression operations
    """

    iter_of_regression = int(input("input the number of iter times:\n"))

    for num_of_iter_of_regression in range(iter_of_regression):
        # make iter_of_regression times of the regression
        h_x = list_theta[0] + \
              list_theta[1] * X_train.loc[:, "Pclass"] + \
              list_theta[2] * X_train.loc[:, "Sex"] + \
              list_theta[3] * X_train.loc[:, "Age"] + \
              list_theta[4] * X_train.loc[:, "SibSp"] + \
              list_theta[5] * X_train.loc[:, "Parch"] + \
              list_theta[6] * X_train.loc[:, "Fare"]
        # 7 theta
        # 6 x of the feature

        loss = \
            y_train - h_x
        # calculate the loss

        # loss ^ 2
        print(loss.T.dot(loss))


        # the sum of loss:
        sum_loss = 0
        # plus the loss
        for o in range(len(loss)):
            # print(loss.iloc[o])
            sum_loss += loss.iloc[o]  # float
        # list_theta[0] = list_theta[0] + alpha * sum_loss / len(loss)
        # print(loss)
        list_theta[0] += \
            alpha * sum_loss / len(loss)
        # update the list_theta[0]

        # print(list(X_train.index))
        # 0's index
        for c in [1, 2, 3, 4, 5, 6]:
            list_theta[c] += \
                alpha * (X_train.loc[:, list(X_train)[(c - 1)]].T.dot(loss)) / len(loss)
        # update the list theta of the params
        # X_train.loc[:, c - 1].T.dot(loss)
        # T transfer, dot dot_multiply

        # do all the thetas !!

        # continue

        print(list_theta)
        # theta
        # print(loss.T.dot(loss))
        # print(loss.T.dot(loss))
        # loss ^ 2

        continue
# 103.57666895852172
# [1.2448209211390562,
    # -0.164299592246984,
    # -0.48128889342546577,
    # -0.005382484123675659,
    # -0.04934860676751743,
    # -0.01102572287455978,
    # 0.0005836091240344807]
# 103.57666895852172 --- loss ^ 2
# [1.2448209211390562, -0.164299592246984, -0.48128889342546577, -0.005382484123675659, -0.04934860676751743, -0.01102572287455978, 0.0005836091240344807]

    """
    5.do the test of this project
    """

    # the same operation
    df_test = read_data_of_csv("titanic/test.csv")
    df_test.drop("Embarked", axis=1, inplace=True)
    df_test.drop("Cabin", axis=1, inplace=True)
    df_test.drop("Ticket", axis=1, inplace=True)
    df_test.drop("Name", axis=1, inplace=True)
    df_test.drop("PassengerId", axis=1, inplace=True)
    # delete

    for int_number_of_len in range(len(df_test)):
        if df_test.loc[int_number_of_len, "Sex"] == "male":
            df_test.loc[int_number_of_len, "Sex"] = 1
            # if male then set the sex 1
        else:
            df_test.loc[int_number_of_len, "Sex"] = 0
            # if female then set the sex 0
    # change the introduction of sex from string to int 1 or 0

    # delete the NaNs
    df_test.dropna(axis=0, how="any", inplace=True)
    # delete the NaN data

    print(df_test)
    # show the result

    y_test = df_test.loc[:, "Survived"]

    X_test = df_test.loc[:, "Pclass":"Fare"]

    print(y_test)
    print(X_test)

    test_h_x = list_theta[0] + \
        list_theta[1] * X_train.loc[:, "Pclass"] + \
        list_theta[2] * X_train.loc[:, "Sex"] + \
        list_theta[3] * X_train.loc[:, "Age"] + \
        list_theta[4] * X_train.loc[:, "SibSp"] + \
        list_theta[5] * X_train.loc[:, "Parch"] + \
        list_theta[6] * X_train.loc[:, "Fare"]
    # the final function

    """
    6.score the model
    """

    N = len(y_test)
    # the total of the test number
    num_of_win_the_prediction_of_the_model = 0
    # predict the result

    # as long as we are right, whether the person is alive or dead, it does not matter
    for win_number_of_the_test_of_each in range(N):
        if test_h_x.iloc[win_number_of_the_test_of_each] < 0.5:
            test_h_x.iloc[win_number_of_the_test_of_each] = 0
            # prediction < 0.5 => 0
            if y_test.iloc[win_number_of_the_test_of_each] == 0:
                num_of_win_the_prediction_of_the_model += 1
                # right!
                # right, so we num of win ++
            else:
                pass
                # wrong

        else:
            test_h_x.iloc[win_number_of_the_test_of_each] = 1
            # prediction >= 0.5 => 1
            if y_test.iloc[win_number_of_the_test_of_each] == 1:
                num_of_win_the_prediction_of_the_model += 1
                # right
            else:
                pass
                # wrong

    """
    7.save the model
    """

    with open("result.txt", "w") as f:
        f.write("result record:\n")
        # result

        f.write("the alpha:\n")
        f.write(f"{alpha}")
        f.write("\n")
        # 1.alpha

        f.write("the thetas of the model:\n")
        recording_number_position = 1
        for theta_of_the_last in list_theta:
            f.write(f"{recording_number_position}. ")
            f.write(f"{theta_of_the_last}")
            f.write("\n")
            recording_number_position += 1
            continue
        # 2.write the thetas
        f.write("\n")

        f.write("features:\n")
        r_n_p = 1
        for data_of_feature in list(X_train):
            f.write(f"{r_n_p}. ")
            f.write(f"{data_of_feature}")
            f.write("\n")
            r_n_p += 1
            continue
        f.write("\n")
        # 3.features

        f.write("score:\n")
        f.write(f"{num_of_win_the_prediction_of_the_model / N}")
        f.write("\n")
        f.write(f"  or the 100 :{100 * num_of_win_the_prediction_of_the_model / N}")
        f.write("\n")
        # 4.score

        f.close()
        # close the file

    sys.exit("bye bye!")
"""
END
"""

剛開始,我以為我的這個實驗是這樣的:

在這里插入圖片描述

后來做完以后結果是這樣的:
(徹底翻車了,不及格)
在這里插入圖片描述
好在這個是我的第二次實驗,缺乏一些經驗,而且選取的模型也不夠合適,導致了這樣的偏差, 后面我在做一個邏輯回歸,一定會好很多的啦,

六、本演算法的核心代碼:

進行引數值的更新:
(注意更新時的具體代碼!!)

# make iter_of_regression times of the regression
        h_x = list_theta[0] + \
              list_theta[1] * X_train.loc[:, "Pclass"] + \
              list_theta[2] * X_train.loc[:, "Sex"] + \
              list_theta[3] * X_train.loc[:, "Age"] + \
              list_theta[4] * X_train.loc[:, "SibSp"] + \
              list_theta[5] * X_train.loc[:, "Parch"] + \
              list_theta[6] * X_train.loc[:, "Fare"]
        # 7 theta
        # 6 x of the feature

        loss = \
            y_train - h_x
        # calculate the loss

        # loss ^ 2
        print(loss.T.dot(loss))


        # the sum of loss:
        sum_loss = 0
        # plus the loss
        for o in range(len(loss)):
            # print(loss.iloc[o])
            sum_loss += loss.iloc[o]  # float
        # list_theta[0] = list_theta[0] + alpha * sum_loss / len(loss)
        # print(loss)
        list_theta[0] += \
            alpha * sum_loss / len(loss)
        # update the list_theta[0]

        # print(list(X_train.index))
        # 0's index
        for c in [1, 2, 3, 4, 5, 6]:
            list_theta[c] += \
                alpha * (X_train.loc[:, list(X_train)[(c - 1)]].T.dot(loss)) / len(loss)
        # update the list theta of the params
        # X_train.loc[:, c - 1].T.dot(loss)
        # T transfer, dot dot_multiply

        # do all the thetas !!

        # continue

        print(list_theta)
        # theta
        # print(loss.T.dot(loss))
        # print(loss.T.dot(loss))
        # loss ^ 2

        

就寫到這里啦,

后續可以在來看看我的邏輯回歸,這個會更好的啦,

謝謝閱讀了了啊,

如果感興趣的話就點個贊支持一下唄!!!!

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

標籤:AI

上一篇:機器學習面試題 (一)

下一篇:【問答機器人】QA機器人排序模型

標籤雲
其他(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