rm -rf exchange*
rm -rf data.csv*
ls
gsutil cp gs://mafia_log_charge/data.csv.zip ./
gsutil cp gs://mafia-city/exchange* ./
unzip data.csv.zip
ls
5桶8080端口
fuser -k -n tcp 8080
nohup python start-gate.py >p1.log &
tail -f p1.log
29桶8081端口
fuser -k -n tcp 8081
nohup python start-gate.py >p1.log &
tail -f p1.log
fs = gcsfs.GCSFileSystem(project='heidao_market')
with fs.open(price_path) as f:
price_data = pd.read_csv(f,encoding='utf-8',sep='\t', skiprows=1,usecols=['charge_id', 'price'])
price_data = price_data[price_data['price'].apply(lambda x:str(x).isdigit())]
price_data['price'] = price_data['price'].astype(np.int)
price_map = {0:0, 1:4.99,2:9.99,3:19.99,4:49.99,5:99.99,6:24.99,7:0.99,8:0.03,9:4.99,10:99.99,11:1.98}
price_data['us_price'] = price_data['price'].apply(lambda x:price_map[x])