ssh-keygen
ssh-copy-id -i ~/.ssh/id_rsa.pub 1100378@host
# -*- coding: utf-8 -*- | |
from __future__ import print_function | |
import os | |
import csv | |
output_dir = '' | |
input_file = os.path.join(output_dir, 'input0000') | |
output_file = os.path.join(output_dir, 'input0000.tsv') |
with open(input_file) as ifd: | |
csv_reader = csv.reader(ifd, delimiter='\t', quoting=csv.QUOTE_NONE) | |
token_dict = {} | |
for counter, row in enumerate(csv_reader): | |
prd_no = row[0] | |
token_dict[prd_no] = row[1:] | |
with open(output_file, mode='w') as wfd: | |
pickle.dump(token_dict, wfd, protocol=pickle.HIGHEST_PROTOCOL) |
import unittest | |
import os, sys, time | |
import json | |
from subprocess import call | |
import requests | |
import csv | |
parentPath = os.path.abspath("../..") | |
if parentPath not in sys.path: | |
sys.path.insert(0, parentPath) |
import csv | |
import gzip | |
import os | |
file_name = 'input0000' | |
out_file_name = 'input0000.fix' | |
if os.path.exists(out_file_name): | |
os.remove(out_file_name) |
import pandas as pd | |
from sklearn.model_selection import train_test_split | |
# split train, dev set and save to file | |
all_data = pd.read_csv(output_file_balanced, sep='\t') | |
all_data.sample(frac=1) | |
train_set, dev_set = train_test_split(all_data, test_size=0.2) | |
train_set.to_csv(output_file_train, sep='\t', header=False, index=False) | |
dev_set.to_csv(output_file_dev, sep='\t', header=False, index=False) |
http://linuxcommand.org/lc3_wss0120.php
pwdx <PID>