原创 python使用line_profiler包統計每行代碼的運行時間

安裝line_profiler pip install line_profiler -i https://pypi.tuna.tsinghua.edu.cn/simple # 參考 https://github.com/pyuti

原创 pyecharts實戰之直方圖

code: from pyecharts.charts import Bar from pyecharts import options as opts y_data = [1,2,3,4,5,6,7,8] x_data = [

原创 mac在conda虛擬環境安裝jupyter

安裝conda for mac # 安裝包請在官網下載 https://repo.anaconda.com/archive/ sh Anaconda3-5.2.0-Linux-x86_64.sh #next,...,yes ...

原创 【NLP】詞形還原調研

詞形還原:就是去掉單詞的詞綴,提取單詞的主幹部分(原型),比如: 複數變單數 分詞變原型 形容詞/副詞比較級變原型 相關工具 NLTK 實現:python 安裝:pip install nltk 項目路徑:https://g

原创 python與字符處理

0 初識進制 字符在計算機世界是以0和1表示的,他們有着一一對應的關係,所以我們先從二進制認起 進制 一般表示 Python表示 其他/控制檯打印 2進制 0011 0101 0b0011 0101 8進制 6

原创 python/shell文件下載/斷點續傳

shell wget http://xxx.xxx.xxx python斷點續傳 # -*- coding: utf-8 -*- # 斷點續傳 import sys import requests import os

原创 HLS視頻相關操作入門(ffmpeg)

mp4轉ts ffmpeg -i inputfile -codec copy -bsf h264_mp4toannexb outputfile ts轉MP4 ffmpeg -i inputfile -acodec copy

原创 視頻抽音頻 相關操作(ffmpeg)

視頻中抽音頻 [shell] ffmpeg -i $ID.mp4 -acodec libmp3lame -ac 1 -ar 16000 $ID.mp3 -i: 表示輸入的音頻或視頻 -ac: channel 設置通道3, 默認爲

原创 python多線程編程(1)

前言 全局解釋鎖(GIL) 在python多線程編程學習之前,十分有必要了解下什麼叫python的全局解釋鎖(GIL),這裏我簡單介紹下這個鎖的作用: 任何一個時間點只有一個線程處於執行狀態 多個CPU核的多線程框架下都只允許一

原创 C++11新特性

1 發展歷程 2 c++11新特性 語言 標準庫 參考文獻: # 發展歷程 https://blog.csdn.net/weixin_42837024/article/details/82427780 http://c.bian

原创 【Python應用】交集、並集、差集

Python交併差集

原创 C++ set使用總結

一、Member functions 1 構造函數 std::set<int> first; // empty set of ints int myints[]= {10,20,

原创 C++ vector使用總結

一、Member functions Construct std::vector<int> first; // empty vector of ints std

原创 void* 與string互轉

#include <utility> // std::pair #include <iostream> // std::cout #include <string> int main () { // Cast