原创 C++遍歷STL容器

#include <boost/foreach.hpp> BOOST_FOREACH(double r, TestData) std::cout << r << std::endl;

原创 python的各種tips

1.查看某個庫的所有函數 import QuantLib as ql dir(ql) 2.查看庫、函數的參考文檔、用法 help(Annual) 3.查看所有可更新的模塊: pip list --outdated 4.更新

原创 Linux服務器關閉後臺運行的進程

1.先查看所有進程 ps -ux 2.根據進程號關閉程序 kill -9 pid

原创 codeblocks下配置boost庫

1.下載boost庫源碼 https://www.boost.org/ 2.配置gcc編譯環境 a、將Mingw工具鏈目錄添加到系統的環境變量PATH中(eg:G:\codeblocks\MinGW\bin) b、將mingw32

原创 爬取商戶編碼——招行

import requests from lxml import etree import pandas as pd from sqlalchemy import create_engine import time import

原创 Not enough memory to open this page

解決: 使用jupyter notebook時經常會遇到這個問題,之前我一直以爲是計算量過大內存不足而掛掉,後來才發現是print()輸出太多,頁面放不下。 所以當循環次數很多時,不要大量使用print()

原创 version 'xxxx' requested but 'xxxx' not found and version '8.3.0' of default 'g++' does not match

原碼 在CodeBlocks環境下的編譯boost庫時 bjam install --toolset=gcc--prefix="G:\Library\boost_1_72_0" --build-type=complete 報錯

原创 WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None))

安裝boost時候報錯 Looking in indexes: https://pypi.douban.com/simple WARNING: Retrying (Retry(total=4, connect=None, read

原创 如何卸載pip

python -m pip uninstall pip==9.0.1

原创 熱力圖顏色搭配

#4394C2 #66A9D7 #96C6DD #18639E #1260A8 #82B8DA #125CA3 #83BCDA #549EC7 #3B8BBE #CCDEF2 #D0E1F3

原创 ImportError: Unable to import required dependencies

報錯 ImportError: Unable to import required dependencies: numpy: Something is wrong with the numpy installation. Whil

原创 core dumped(吐核)

原因: 1.內存越界 2.使用的非線程安全的函數 3.全局數據未加鎖保護 4.非法指針 5.堆棧溢出 解決: 需要檢查訪問的內存、資源 strace 命令 命令前加 strace,控制檯打印的跟蹤信息進行分析和定位問題。

原创 Could not find OpenSSL. Install an OpenSSL development package or configure CMake with -DCMAKE_US

安裝cmake時,運行 ./configure 報錯 --------------------------------------------- CMake 3.17.0-rc2, Copyright 2000-2020 Kit

原创 error while loading shared libraries: libQuantLib.so.0: cannot open shared object file: No such ...

安裝完quantlib後,在測試quanlib是否能使用時,運行 ./CDS 報錯 ./CDS: error while loading shared libraries: libQuantLib.so.0: cannot op

原创 ...failed updating 66 targets... ...skipped 12 targets... ...updated 1092 targets......

安裝boost時候,運行 ./b2 報錯 …failed updating 66 targets… …skipped 12 targets… 解決 1.查看報錯原因 ./b2 -q 2.我這是由於python版本的問題,於是