摘要:
# -*- coding: utf-8 -*- """ Created on Sat Apr 25 18:15:36 2020 @author: Administrator """ import requests import binascii import json import datetime 阅读全文
摘要:
import json import requests # 翻译函数,word 需要翻译的内容 def translate(word): # 有道词典 api url = 'http://fanyi.youdao.com/translate?smartresult=dict&smartresult= 阅读全文
摘要:
import matplotlib.pyplot as plt from matplotlib import animation import numpy as np import math print(math.pi) def drawHeart(): t = np.linspace(0, 3, 阅读全文
摘要:
import requests, base64 # 百度AI开放平台鉴权函数 def get_access_token(): url = 'https://aip.baidubce.com/oauth/2.0/token' data = { 'grant_type': 'client_credent 阅读全文
摘要:
from PIL import Image import sys # 将图片填充为正方形 def fill_image(image): width, height = image.size # 选取长和宽中较大值作为新图片的 new_image_length = width if width > h 阅读全文
摘要:
# -*- coding: utf-8 -*- """ Created on Wed Apr 1 09:20:06 2020 @author: Administrator """ import time import random def getupmsg(): """ 获取正能量语句 :retur 阅读全文
摘要:
# -*- coding: utf-8 -*- """ Created on Fri Apr 10 21:16:57 2020 @author: Administrator """ #执行代码测试 #控制程序自动执行 import os import datetime import time imp 阅读全文
摘要:
e://python/ffmpeg-20200403-52523b6-win64-static/bin/ffmpeg -i e://python/music/a.m4a e://python/music/a.mp3 e://python/ffmpeg-20200403-52523b6-win64-s 阅读全文
摘要:
#创建定长数字def creat_fivenum(num,n=5): for i in range(1,10): s=str(num) j=10**i if (int(num/j)==0): for a in range(1,6-i): s="0"+s return s+"-" 傻子谁还用那种方法: 阅读全文
摘要:
# 查看当前目录文件 ls 查看当前路径 pwd 创建文件 touch 1 1.txt 创建目录 mkdir 1 1.txt 删除文件 rm 1 1.txt 删除目录 rmdir 1 rm -r 1 清屏 clear 查看所有文件 ls -a 查看详细信息 ls -l 查看详细信息并且人性化文件大小 阅读全文