This file contains 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
# store account info | |
git config --global credential.helper store |
This file contains 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
# run specific test case | |
mvn -Dtest=TestCircle test | |
# mvn spring boot | |
mvn clean install && cd ./xx-web && mvn spring-boot:run | |
# run with specific setting file | |
mvn clean intall --settings mysetting.xml |
This file contains 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
#查看队列任务 | |
hadoop queue -info [username] -showJobs |
This file contains 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
x = '中文测试' | |
print(x.decode("string_escape")) |
This file contains 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
#coding=utf8 | |
import string | |
import sys | |
import re | |
def conv_wide(char): | |
#全角转半角 | |
code = ord(char) | |
if char == '\u3000': #space | |
code = 32 |
This file contains 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
# mvn run main | |
# 网上的例子给的是:mvn exec:java -D"exec.mainClass"="com.example.Main",但是我这边是去掉 Main 才能跑通 | |
mvn exec:java -D"exec.mainClass"="com.example" | |
# sbt run main (background) | |
setsid nohup sbt -mem 2048 "runMain example.YourClassName ${dataSet} ${normOutput}" > norm.log & |
This file contains 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
total=10 | |
startFrom=0 | |
for ((i=${startFrom}; i<${startFrom}+$total; i++)); do | |
echo starting $i of $total ... | |
done |
This file contains 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 pprint | |
class data: | |
def __init__(self, name, value): | |
self.name = name | |
self.value = value | |
a = data('a', 2) | |
b = data('b', 3) | |
c = data('c', 1) | |
mydict = {'keyOfA':a, 'keyOfB':b, 'keyOfC':c} |
This file contains 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
# 删除 tmp 文件第一行 | |
sed -i '1d' tmp | |
# 给 tmp 文件增加一列 '1' 的标签,分隔符为“\t” | |
cat tmp | awk 'BEGIN{OFS="\t"} {print $0,"1"}' |
This file contains 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
<?php | |
$header_prefix = 'file'; | |
$slots = 6; | |
?> | |
<html> | |
<head> | |
<title>Test upload</title> | |
</head> | |
<body> | |
<?php |