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
payload: | |
- '136.22.64.0/24' | |
- '136.22.65.0/24' | |
- '136.22.67.0/24' | |
- '136.22.76.0/24' | |
- '136.22.83.0/24' | |
- '136.22.85.0/24' | |
- '136.22.86.0/24' | |
- '136.22.87.0/24' | |
- '136.22.92.0/24' |
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
# When two people using the windows system and the macos system want to access the location on the same NAS system, they often face the need to convert the windows system path and the macos system path. This gist is made for this function. | |
# For example | |
# Mac mount address is | |
# /Volumes/SERVER/Design/F16/ | |
# The Windows mount address is | |
# \\Jashen-nas\server\Design\F16\ | |
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
def pipe_basic_fillna(df=combined): | |
local_ntrain = ntrain | |
pre_combined=df.copy() | |
#print("The input train dimension:\t", pre_combined[0:ntrain].shape) | |
#print("The input test dimension:\t", pre_combined[ntrain:].drop("SalePrice",axis=1).shape) | |
num_cols = pre_combined.drop(["Id","SalePrice"],axis=1).select_dtypes(include=[np.number]).columns | |
cat_cols = pre_combined.select_dtypes(include=[np.object]).columns | |
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
from keras.utils import plot_model | |
plot_model(happyModel, to_file='HappyModel.png') |
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
def calculateRealInterest(amount, months, percentPerMonth): | |
interestAmount = amount * percentPerMonth / 100 * months; #总手续费 | |
amountPermonth = amount / months; #每期占用银行金额 | |
occupyMonths = (1 + months) * (months / 2); #总占用月数 | |
occupyYears = occupyMonths / 12; #占用年数 | |
occupyAmountForOneYear = amountPermonth * occupyYears; #相当于占用了一年的金额 |
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
#!/bin/sh | |
if [ $1 == "start" ] | |
then | |
echo "do start" | |
# hdfs&yarn | |
/usr/local/hadoop/sbin/start-all.sh | |
# spark | |
/usr/local/spark/sbin/start-all.sh |
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
ab \ | |
-p /Users/frank/Desktop/test.json\ | |
-T application/json \ | |
-c 10 \ | |
-n 2000 \ | |
http://datalab:5000/api/GetSimi |
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
_get_module_path = lambda path: os.path.normpath(os.path.join(os.getcwd(), | |
os.path.dirname(__file__), path)) |
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
vim *.cpp | |
qx # start recording to register x | |
:%s/OldString/NewString/g | |
:wnext | |
q # stop recording | |
@x # playback to see if it works correctly | |
999@x # repeat 999 times to complete the job |
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
rsync -rav -e ssh --exclude 'word2vec-1/*' --exclude '.git/*' --exclude '*.pyc' --exclude '*nohup.out*' root@datalab2:~/project/service_test/ ./service/ |
NewerOlder