Skip to content

Instantly share code, notes, and snippets.

<!--
* @Description:
* @Author:: MINUS
* @Version:
* @Date: 2020-10-07 11:29:39
* @LastEditTime: 2020-10-07 17:00:47
* @FilePath: /vue-demo01/src/App.vue
-->
<template>
<!-- <div id="app">
@rovesoul
rovesoul / 遍历xls的sheet.py
Last active March 12, 2020 09:29
xls、csv文件的操作
import pandas as pd, xlrd
path = 'some_one.xls'
def openxls(path):
b = xlrd.open_workbook(path)
count = len(b.sheets())
print(count)
for sheet in b.sheets():
import os
"""
合并多个txt
"""
# 获取目标文件夹的路径
path = "xxxx/xxxx/"
# 获取当前文件夹中的文件名称列表
#!/Users/donghuibiao/anaconda3/bin/python3.7
# # -*- coding:utf-8 -*-
import json , requests, random
import time
session = requests.session()
# 仅翻译单词的
@rovesoul
rovesoul / 倒计时播放.py
Last active February 25, 2020 16:07
Pygame播放音乐
from pygame import mixer
import time
mixer.init()
mixer.music.load('music.mp3')
mixer.music.play(loops=1,start=0.0)
mixer.music.set_volume(1)# 来设置播放的音量,音量value的范围为0.0到1.0。
time.sleep(5) #只播放5秒
mixer.music.stop()
def daojishi():
minute=input('your minute?')
print(f'总练习时间{minute}分钟')
minute=minute-1
while minute >= 0:
for i in reversed(range(0, 60)):
print("\r倒计时:{}分:{}秒".format(minute, i), end="")
time.sleep(1)
minute = minute - 1