作者文章归档:面对疾风吧

部分LINUX终端及Windows下CMD常用命令


防止自己遗忘

Python

#安装Python依赖包:
pip install xxx -i 指定源
#比如需要安装virtualenv模块,则在命令行输入以下内容:
python -m pip install virtualenv -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
#从txt批量安装
pip install -Ur requirements.txt
#生成依赖txt
pip freeze > requirements.txt
#创建虚拟环境(需要安装virtualenv模块):
py -3 

Read more

证件照更换背景


使用Python处理你的证件照

import os
from PIL import Image
from removebg import RemoveBg

def image_matting(old_image_path,new_image_path,api_key,colors):
    rmbg = RemoveBg(api_key,'error.log')
    rmbg.remove_background_from_img_file(old_image_path)

    parent_path = os.path.dirname(old_image_path)

Read more

爬取猫眼TOP100


爬取猫眼电影100榜

import re,os
import requests
import time,openpyxl
headers = {
    'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36'
    }

def get_html(url,headers):
    r = requests.get(url,headers = headers)

Read more

matlab处理三维点云


功能描述

使用matlab读取三维点云,并获取其中点的空间坐标,并截取某个平面

clear;clc;
format long;
j = 0;k = 0;n = 0;
sign = 0;temp = 0;
T = zeros(1,1);
A = pcread('teapot.ply');
figure(1);
pcshow(A);
pause(1);
B = A.Location;
m = length(B);
for i = 1:m
    s = 0;t = i;
    for j = 1:m
        if B(i,3) == B(j,3)
            s = s + 

Read more

上云有感


感慨一下

1

从去年3月份左右开始接触Python,到12月份差不多学完了《Python从入门到实践》这本书,但是有两个工作一直没有完成,一个是把Python外星人入侵游戏打包,另外一个是把Python的学习笔记项目部署到heroku,当然,到现在这两份工作都已经完成,而且还学会了一些爬虫知识。

2

后来,我没事的时候,试着注册了一下github,这也算是打开了新世界的大门吧,注册的第一天就收获了几份大礼,首先是server酱,一个微信提醒程序,项目来自方糖 ,使用github帐号登录即可获取自己的专属SCKEY。其次是一份网易云自动打卡服务,项目来自github,如有需要可以参考作者的帮助文

Read more