Geoserver 以及 Geotools各版本和jdk版本對(duì)照表。
PostGis 與Posgresql 版本對(duì)應(yīng)。PostGIS的GEOS支持版本。Proj 對(duì) PostGIS 的支持版本。對(duì) PostGIS 的 GDAL 支持版本。來源 https://trac.osgeo.org/postgis/wiki/UsersWikiPostgreSQLPostGIS.
No module named ‘config‘,一招解決無法連接到上一級(jí)文件。我自己在運(yùn)行VS CODE環(huán)境下,運(yùn)行我的代碼,調(diào)用上一級(jí)文件config,出現(xiàn)錯(cuò)誤No module named ''''''''config’,然后花了一上午時(shí)間進(jìn)行解決,無果。import os,sys parentdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0,parentdir) from config import opt.
python - 使 argparse 對(duì)待破折號(hào)和下劃線相同。ArgumentParser()parser.add_argument(''--use-unicorns'', action=''store_true'')args = parser.parse_args([''--use-unicorns''])print(args) # returns: Namespace(use_unicorns=True)但是用戶必須記住選項(xiàng)是--use-unicorns還是--use_unicorns;如何讓 argparse 接受 --use-unicorns 和 --use_unicorns 作為定義這個(gè)可選參數(shù)的有效方式?
[root@online ~]# ll /usr/java 總用量 0 lrwxrwxrwx. 1 root root 16 4月 24 10:03 default -> /usr/java/latest drwxr-xr-x. 9 root root 268 4月 24 10:03 jdk1.8.0_171-amd64 lrwxrwxrwx. 1 root root 28 4月 24 10:03 latest -> /usr/java/jdk1.8.0_171-amd64.在文件末尾添加如下內(nèi)容設(shè)置環(huán)境變量: JAVA_HOME=/usr/java/default PATH=$JAVA_HOME/bin:$PATH.
python 項(xiàng)目自動(dòng)生成環(huán)境配置文件requirements.txt.https://blog.csdn.net/pearl8899/article/details/113877334為什么要使用requirements.txt?pip install -r requirements.txt 2.生成方法。在導(dǎo)出當(dāng)前項(xiàng)目使用的類庫(kù)時(shí),先定位到項(xiàng)目根目錄,然后調(diào)用 pipreqs ./ --encoding=utf8 命令,該命令避免編碼錯(cuò)誤,并自動(dòng)在根目錄生成 requirements.txt 文件。pip install -r requirements.txt -i https://pypi.douban.com/simple.
選項(xiàng) 命令----------------------------------------------- 1 java-1.7.0-openjdk.x86_64 (/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.261-2.6.22.2.el7_8.x86_64/jre/bin/java)*+ 2 java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.262.b10-1.el7.x86_64/jre/bin/java)alternatives --install /usr/bin/java java /usr/local/jdk-11.0.2/bin/java 3.
CentOS7安裝MySQL(完整版)[root@localhost ~]# wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm.[root@localhost ~]# yum -y install mysql57-community-release-el7-10.noarch.rpm.[root@localhost ~]# yum -y install mysql-community-server.此時(shí)MySQL已經(jīng)開始正常運(yùn)行,不過要想進(jìn)入MySQL還得先找出此時(shí)root用戶的密碼,通過如下命令可以在日志文件中找出密碼:
A Guide to Building a Full-Stack Web App with LLamaIndex.from flask import request@app.route("/query", methods=["GET"])def query_index():global indexquery_text = request.args.get("text", None)if query_text is None:return ("No text found, please include a ?text=blah parameter in the URL",400,)query_engine = index.as_query_engine()response = query_engine.query(query_text)return str(response), 200.
LangChain+Fine-tune實(shí)現(xiàn)模型定制化。2 LangChain.3 Fine-tuning.接上次的AI初步了解,繼續(xù)探索一下大模型。--如何適應(yīng)大模型。這里的model=gpt-3.5....這是默認(rèn)的gpt模型(openai其實(shí)有很多大模型)。--如何使用大模型。--如何改變大模型。其實(shí)還是迷迷糊糊的,但大致了解了一下大模型的分類以及如果想要研究的話應(yīng)該從哪些方面入手。
python + logging 實(shí)現(xiàn)日志輸出及保存到文件。logger = logging.getLogger(''test'')logger.debug(''debug級(jí)別,一般用來打印一些調(diào)試信息,級(jí)別最低'')logger.info(''info級(jí)別,一般用來打印一些正常的操作信息'')logger.warning(''waring級(jí)別,一般用來打印警告信息'')logger.error(''error級(jí)別,一般用來打印一些錯(cuò)誤信息'')logger.critical(''critical級(jí)別,一般用來打印一些致命的錯(cuò)誤信息,等級(jí)最高'')
conda刪除虛擬環(huán)境。上午查了許多方法都是。conda remove -n your_env_name --all.反正我是都不成功。conda env remove --name your_env_name.conda create -n your_env_name python=3.7 3、conda 列出所有虛擬環(huán)境。conda env list 4、conda 刪除虛擬環(huán)境。2022年8月15 更新 5、conda激活虛擬環(huán)境。conda activate your_env_name.
解決VS Code的高cpu占用率問題。通過網(wǎng)上了解的解決方法,我嘗試了三種,來解決rg.exe、git.exe內(nèi)存占用過大的問題,以及插件的原因。VS Code→文件→首選項(xiàng)→設(shè)置→搜索。VS Code→文件→首選項(xiàng)→設(shè)置→搜索Code Actions On Save。通過前兩種方法,我的電腦cpu占用率從90%多降到了60%。最后記得重啟,我電腦的cpu占用率最終下降到了6%。
Dense(units, name="dense_1") self.dense_2 = keras.layers.variables: [''nested/dense_1/kernel:0'', ''nested/dense_1/bias:0'', ''nested/dense_2/kernel:0'', ''nested/dense_2/bias:0'']Changing trainable status of one of the nested layers...variables: [''nested/dense_2/kernel:0'', ''nested/dense_2/bias:0'', ''nested/dense_1/kernel:0'', ''nested/dense_1/bias:0'']variable ordering changed: True遷移學(xué)習(xí)示例
tensorflow中 tf.reduce_mean函數(shù)。tf.reduce_mean 函數(shù)用于計(jì)算張量tensor沿著指定的數(shù)軸(tensor的某一維度)上的的平均值,主要用作降維或者計(jì)算tensor(圖像)的平均值。import tensorflow as tfx = [[1,2,3],[1,2,3]]xx = tf.cast(x,tf.float32)mean_all = tf.reduce_mean(xx, keep_dims=False)mean_0 = tf.reduce_mean(xx, axis=0, keep_dims=False)mean_1 = tf.reduce_mean(xx, axis=1, keep_dims=False)with tf.
本文將介紹一個(gè)簡(jiǎn)單技巧來在Keras中構(gòu)建自定義loss函數(shù),它可以接收除 y_true 和 y_pred 之外的參數(shù)。import keras.backend as Kdef mean_pred(y_true, y_pred):return K.mean(y_pred)model.compile(optimizer=''rmsprop'', loss=''binary_crossentropy'', metrics=[''accuracy'', mean_pred]) 3. 多參數(shù)loss/metric函數(shù)。注意,我們創(chuàng)建了一個(gè)函數(shù)(不限制參數(shù)的數(shù)量),它返回了一個(gè)合法的loss函數(shù),該函數(shù)可以訪問其封閉函數(shù)的參數(shù)。
def main_func(): import random arr1 = [random.from memory_profiler import profile@profile(precision=4)def main_func(): import random arr1 = [random.randint(1,10) for i in range(100000)] arr2 = [random.randint(1,10) for i in range(100000)] arr3 = [arr1[i]+arr2[i] for i in range(100000)] tot = sum(arr3) print(tot)if __name__ == "__main__": main_func()"%%time" - Measure Execution Time of Cell Code?
window自帶畫圖工具應(yīng)用,畫了圖或者寫了文本之后怎么移動(dòng)該內(nèi)容。
# paddlepaddle codeself.p_conv = Conv2D(inc, 2*kernel_size*kernel_size, filter_size=3, padding=1, stride=stride)self.p_conv.weight = fluid.initializer.# paddlepaddle codeself.p_conv = Conv2D(inc, 2*kernel_size*kernel_size, filter_size=3, padding=1, stride=stride, param_attr=fluid.initializer.
windows 下 node-gyp 的環(huán)境配置前言。node-gyp 是一個(gè)可以編譯 node 插件的工具,在使用 node-gyp 前需要安裝 python 環(huán)境和 C++ 環(huán)境如何安裝1 安裝 windows-build-tools。網(wǎng)上部分文章說 node-gyp 應(yīng)該用 python 版本 2.7 版本,可能是因?yàn)闀r(shí)效性的問題,目前 python2 已經(jīng)不在維護(hù)了,并且 node-gyp 在官方文檔上也說明應(yīng)該用 python3。npm config set msvs_version 2017node-gyp configurenode-gyp build復(fù)制代碼參考文檔。