예제 #1
0
def resume_post(pars):
    print pars
    pars = dict(pars)
    id = pars.pop('id')
    if id == '0':
        return model.resume().insert(pars)
    else:
        return model.resume().update(pars, {'id': id})
예제 #2
0
def resume_post(pars):
    print pars
    pars = dict(pars)
    id = pars.pop('id')
    if id=='0':
        return model.resume().insert(pars)
    else:
        return model.resume().update(pars, {'id':id})
예제 #3
0
 def index(self):
     users = model.user().getList('*')  ##进行表查询
     self.assign('users', users)  ##设置为模板变量
     jobs = model.job().getList('*')
     self.assign('jobs', jobs)
     resumes = model.resume().getList('*')
     self.assign('resumes', resumes)
     return self.display('index')  ##显示指定模板
예제 #4
0
 def index(self):
     users = model.user().getList('*')  ##进行表查询
     self.assign('users', users)  ##设置为模板变量
     jobs = model.job().getList('*')
     self.assign('jobs', jobs)
     resumes = model.resume().getList('*')
     self.assign('resumes', resumes)
     return self.display('index')  ##显示指定模板
예제 #5
0
 def default(self):
     if not self.isLogin():
         self.assign('msg', '你当前还没有登录,请先登录!')
         return self.display('msg')
     uid = self.getUid()
     resume_info = model.resume().getOne('*', {'uid':uid})
     if resume_info:
         self.assign('resume_info',resume_info)
         resume_id = resume_info['id']
         work_experience = model.work_experience().getList('*', {'resume_id' : resume_id})
         self.assign('work_experience',work_experience)
         study_experience = model.study_experience().getList('*', {'resume_id' : resume_id})
         self.assign('study_experience',study_experience)
     else:
         self.assign('resume_info',{})
     return self.display('resume')
예제 #6
0
def resume_search(pars):
    sql = u'select * from resume where hope_work like "%%%s%%"' % pars
    return model.resume().fetchAll(sql)
예제 #7
0
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')

#parameters
input_dim = 22 * 4
output_dim = 12
n_run = 25
model_name = 'wc_predicter.pt'
train_path = 'data/Train_data/'
train_frame = 200
test_path = 'data/Test_data/'
predict_path = 'data/Test_ML_MD/'
predict_frame = 20
test_frame = 50
atype_dict = {'O': 0, 'H1': 1, 'H2': 2, 'WC0': 3, 'WC1': 4, 'WC2': 5, 'WC3': 6}
atype_inv = {0: 'O', 1: 'H1', 2: 'H2'}

#create model
model = mlp(input_dim=122 * 4, output_dim=12).to(device)

if run_type == 'train':
    train(model, atype_dict, n_run, model_name, train_path, train_frame,
          test_path, test_frame)
else:
    resume(model_name, model)
    model.eval()
    make_prediction(model,
                    predict_path,
                    predict_frame,
                    atype_dict,
                    savedir='predicted_temp')
예제 #8
0
def resume_search(pars):
    sql = u'select * from resume where hope_work like "%%%s%%"' % pars
    return model.resume().fetchAll(sql)