This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def time_convert(tmp_str): | |
""" | |
convert linux time cmd's results to seconds. | |
""" | |
tmp_str = tmp_str.strip() | |
result = [ _ for _ in re.split('[ms]', tmp_str) if _.strip()] | |
if len(result) != 2: | |
print("error when convert time ", tmp_str) | |
return None | |
return float(result[0]) * 60 + float(result[1]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import argparse | |
def work(filename, str_pattern): | |
with open(filename, 'r') as fin: | |
content = fin.readlines() | |
if len(content) < 1: | |
print("wrong report") | |
exit(1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import argparse | |
import subprocess | |
import time | |
import requests | |
START_MODE = 0 | |
FINISH_MODE = 1 | |
FULL_MODE = 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "" > /tmp/gpu.log | |
while true; | |
do | |
sleep 0.8 | |
filesize=`ll /tmp/gpu.log |cut -d \ -f 5` | |
maxsize=$((1024*10)) | |
if [ $filesize -gt $maxsize ] | |
then | |
tail -n 100 /tmp/gpu.log > /tmp.gpu2.log | |
mv /tmp/gpu2.log /tmp/gpu.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import pandas as pd | |
import os | |
import re | |
import argparse | |
reports_with_path = {} | |
execute_name = '' | |
execute_times = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -eq 0 ]; then | |
echo "Wrong arguments" | |
exit | |
fi | |
working_dir=$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
rm -f *fatbin* *cudafe* *.ptx *cubin *reg.c *.ii *module_id *.o _cuobj* _ptxplus* _ptx* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deb http://mirrors.ustc.edu.cn/ubuntu/ trusty main restricted universe multiverse | |
deb-src http://mirrors.ustc.edu.cn/ubuntu/ trusty main restricted universe multiverse | |
deb http://mirrors.ustc.edu.cn/ubuntu/ trusty-security main restricted universe multiverse | |
deb-src http://mirrors.ustc.edu.cn/ubuntu/ trusty-security main restricted universe multiverse | |
deb http://mirrors.ustc.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse | |
deb-src http://mirrors.ustc.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse | |
deb http://mirrors.ustc.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This XML file does not appear to have any style information associated with it. The document tree is shown below. | |
<opml version="1.0"> | |
<head> | |
<title> | |
Subscriptions of find from Inoreader [https://www.inoreader.com] | |
</title> | |
</head> | |
<body> | |
<outline text="Blogs" title="Blogs"> | |
<outline text="cgnail's weblog" title="cgnail's weblog" type="rss" xmlUrl="http://cgnail.github.io/atom.xml" htmlUrl="http://cgnail.github.io/"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pytesseract | |
import time | |
from PIL import Image | |
import os | |
import webbrowser | |
path = "/home/find/d/filerecv/xigua.png" | |
import subprocess | |
def get_screen_shot(path): | |
# 这里获取截图,目前的方法太慢了 |