From 81db4df748efab27dd4513719d0c482ae8b380bc Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Thu, 25 Jul 2019 10:14:51 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E7=AB=9E=E8=B5=9B-=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=A0=87=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_gq_second_code_competition.html.erb | 40 ++++++++++++++++++- public/stylesheets/educoder/edu-all.css | 4 +- 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/app/views/competitions/_gq_second_code_competition.html.erb b/app/views/competitions/_gq_second_code_competition.html.erb index 9097eccf..02847743 100644 --- a/app/views/competitions/_gq_second_code_competition.html.erb +++ b/app/views/competitions/_gq_second_code_competition.html.erb @@ -34,8 +34,44 @@ link_url: 'https://blog.csdn.net/wfq784967698/article/details/79551476' }, ], - [{},{},{}], - [{},{},{}] + [{ + name: 'Java项目', + description: "CoreNLP是一个Java自然语言分析库,是斯坦福大学自然语言处理小组的研究成果,它集成了所有的自然语言处理工具:分词、词性标注、依存句法分析、命名实体识别等。

本项目的stanford/nlp/parser/目录中包含了Lexparser、nndep以及Shiftreduce等句法分析算法的Java实现。", + task: '标注../stanford/nlp/parser/目录下的所有代码文件(包括子目录)。', + link_name: 'CSDN, 使用Stanford Parser进行句法分析', + link_url: 'https://blog.csdn.net/u010239102/article/details/78111760' + },{ + name: 'C++项目', + description: "Sentencepiece是Google公司开发的一个C++自然语言处理工具包,它实现了数据驱动、跨语言、高性能、轻量级的面向神经网络文本生成系统的无监督文本词条化工具。

本项目的src/目录中包含了BPE、Unigram以及Char等文本分词算法的C++实现。", + task: '标注../src/目录下的所有.cc和.h代码文件(不包括子目录)。(注:其中模型训练、测试相关代码可以去掉:*_test.cc, *_trainer.cc, *_trainer.h)', + link_name: 'CSDN, sentencePiece入门小结', + link_url: 'https://blog.csdn.net/sinat_33455447/article/details/90265938' + },{ + name: 'Python项目', + description: "NLTK是宾西法尼亚大学计算机和信息科学系开发的一个Python自然语言处理工具包,它提供了易于使用的接口,通过这些接口可以访问超过50个语料库和词汇资源(如WordNet),还有一套用于分类、标记化、词干标记、解析和语义推理的文本处理库。

本项目的nltk/stem/目录中包含了Lancaster、Porter以及Snowball等文本分词算法的Python实现。", + task: '标注../nltk/stem/目录下的所有代码文件。', + link_name: 'CSDN, 英文分词的算法和原理', + link_url: 'https://blog.csdn.net/wisdom77/article/details/79446674' + }], + [{ + name: 'Java项目', + description: "Deeplearning4j是Eclipse公司开发的支持各种深度学习算法的运算框架,它可以实施的技术包括受限玻尔兹曼机、深度置信网络、深度自动编码器、堆叠式降噪自动编码器、循环神经张量网络,以及word2vec、doc2vec和GloVe等。

本项目的nn/layers/recurrent/目录中包含了循环神经网络RNN中LSTM、Bidirectional LSTM等算法的Java实现。", + task: '标注../nn/layers/recurrent/目录下的所有代码文件。', + link_name: '官方,DL4J快速入门指南', + link_url: 'https://deeplearning4j.org/cn/quickstart' + },{ + name: 'C++项目', + description: "TensorFlow是谷歌人工智能团队开发的用于机器学习和深度神经网络研究的开源框架,它在图形分类、音频处理、推荐系统和自然语言处理等场景下都有丰富的应用,提供了丰富的API,包括基本的向量矩阵计算、各种优化算法、各种卷积神经网络和循环神经网络基本单元的实现、以及可视化的辅助工具等。

本项目的core/kernels/rnn/目录中包含了循环神经网络RNN中卷积GEMM、LSTM以及GRU算法的C++实现。", + task: '标注../core/kernels/rnn/目录下的所有代码文件。', + link_name: 'CSDN, 深度学习之RNN(循环神经网络)', + link_url: 'https://blog.csdn.net/qq_32241189/article/details/80461635' + },{ + name: 'Python项目', + description: "Keras是Google公司开发的高度模块化的神经网络学习框架,它是一个高层神经网络API,能够支持简易和快速的原型设计,支持CNN和RNN或二者的结合,且能够支持无缝CPU和GPU切换。

本项目的keras/layers/目录中包含了神经网络运算层中Embedding、CNN以及RNN等算法的Python实现。", + task: '标注../keras/layers/目录下的所有代码文件。', + link_name: '官方, Keras说明文档', + link_url: 'https://keras.io/layers/about-keras-layers/' + }] ] %> diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css index e013221c..be84a7dc 100644 --- a/public/stylesheets/educoder/edu-all.css +++ b/public/stylesheets/educoder/edu-all.css @@ -657,8 +657,8 @@ a.enterLink{cursor: pointer;color: #418CCD!important;background: none!important; .second_code_1{min-height: 791px;} .second_code_2{min-height: 436px;} .second_code_3{min-height: 1460px;padding-top: 190px;box-sizing: border-box;position: relative} -.second_code_4{min-height: 724px;padding-top: 190px;box-sizing: border-box;position: relative} -.second_code_5{min-height: 718px;padding-top: 190px;box-sizing: border-box;position: relative} +.second_code_4{min-height: 1459px;padding-top: 190px;box-sizing: border-box;position: relative} +.second_code_5{min-height: 1464px;padding-top: 190px;box-sizing: border-box;position: relative} .second_code_6{min-height: 1060px;} .second_code_7{min-height: 1116px;} .second_code_8{min-height: 711px;} From 3227be8a7c6ce0d4e329de01dfe85ef1626624c6 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Thu, 25 Jul 2019 10:18:05 +0800 Subject: [PATCH 02/10] newmain:padding-bottom --- public/stylesheets/educoder/edu-main.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/stylesheets/educoder/edu-main.css b/public/stylesheets/educoder/edu-main.css index c46f94bd..87fd616b 100644 --- a/public/stylesheets/educoder/edu-main.css +++ b/public/stylesheets/educoder/edu-main.css @@ -192,7 +192,7 @@ input::-ms-clear{display:none;} .newContainer{ min-height:100%; height: auto !important; height: 100%; /*IE6不识别min-height*/position: relative;} .educontent{width: 1200px;margin:0px auto;box-sizing: border-box}/*中间部分宽度固定为1200*/ .newMain{ margin: 0 auto; padding-bottom: 235px; min-width:1200px;padding-top: 60px}/*padding-bottom根据底部的高度而定*/ -.newMain{ padding-bottom: 120px !important; } +.newMain{ padding-bottom: 110px !important; } /*高度*/ .height-100{height: 100%;} From 4b88683b8426eb194ecd90ec09a66c91ac4d2034 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Thu, 25 Jul 2019 10:32:22 +0800 Subject: [PATCH 03/10] set profile completed false when delete school apply && fix agree identity auth --- app/controllers/managements_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index 98b58614..623268d2 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -1661,7 +1661,7 @@ end # 删除单位 def delete_school school = School.where(:id => params[:school]).first - UserExtensions.where(:school_id => params[:school]).update_all(:school_id => nil, :department_id => nil) + UserExtensions.where(:school_id => params[:school]).update_all(school_id: nil, department_id: nil, profile_completed: false) ApplyAddSchools.where(:school_id => params[:school]).destroy_all ApplyAddDepartment.where(:school_id => params[:school]).destroy_all school.destroy @@ -1752,7 +1752,7 @@ end Tiding.create(:user_id => applied_department.user_id, :trigger_user_id => 0, :container_id => applied_department.id, :container_type =>'ApplyAddDepartment', :belong_container_id => applied_department.department.school_id, :belong_container_type=> 'School', :tiding_type => "System", :status => 2, :extra => params[:reason]) # 删除学校的用户 users = UserExtensions.where("department_id = #{applied_department.department_id}") - users.update_all(:department_id => nil) + users.update_all(department_id: nil, profile_completed: false) applied_department.department.destroy # 已审批删除 elsif params[:tip] == "applied" @@ -3692,7 +3692,7 @@ end diskfile1 = disk_filename("UserAuthentication", apply_user.user_id) +"ID" apply_user.update_attributes(:is_delete => true) - File.delete(diskfile1) + File.delete(diskfile1) if File.exist?(diskfile1) =begin begin From ac54319542a8487e3cc95efb827edc1767b8402d Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 25 Jul 2019 14:02:44 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E8=B6=85=E7=BA=A7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=91=98=E9=A1=B5=E9=9D=A2=E5=A2=9E=E5=8A=A0=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/managements_controller.rb | 3 +++ app/views/managements/update_user.html.erb | 17 ++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index 98b58614..83bee45d 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -220,6 +220,9 @@ class ManagementsController < ApplicationController @user.nickname = params[:nickname] @user.lastname = params[:lastname] @user.business = params[:business].to_i + if params[:admin] + @user.admin = params[:admin].to_i + end @user.firstname = "" @user.mail = params[:mail].strip == "" ? nil : params[:mail] @user.phone = params[:phone].strip == "" ? nil : params[:phone] diff --git a/app/views/managements/update_user.html.erb b/app/views/managements/update_user.html.erb index 4ef8e9e6..af1c59c0 100644 --- a/app/views/managements/update_user.html.erb +++ b/app/views/managements/update_user.html.erb @@ -190,6 +190,14 @@ name="business" value="<%= @user.business? ? "1" : "0" %>" id="person_business" class="magic-checkbox" style="float:left; margin-top: 8px;"> + <% if User.current.admin? %> + + + name="admin" value="<%= @user.admin? ? "1" : "0" %>" id="person_admin" class="magic-checkbox" style="float:left; margin-top: 8px;"> + + + <% end %> +
  • @@ -625,7 +633,14 @@ }else{ document.getElementById('person_business').value = "0"; } - + <% if User.current.admin? %> + var admin_check = document.getElementById('person_admin').checked; + if (admin_check) { + document.getElementById('person_admin').value = "1"; + } else { + document.getElementById('person_admin').value = "0"; + } + <% end %> my_account_form_submit(); }); function my_account_form_submit(){ From 84a1acf9174792781442b259d1c881fd649e24f5 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Thu, 25 Jul 2019 17:42:49 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E7=AB=9E=E8=B5=9B-=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=A0=87=E6=B3=A8=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/competitions/_gq_second_code_competition.html.erb | 6 +++++- public/stylesheets/educoder/edu-all.css | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/views/competitions/_gq_second_code_competition.html.erb b/app/views/competitions/_gq_second_code_competition.html.erb index 02847743..7eb0865d 100644 --- a/app/views/competitions/_gq_second_code_competition.html.erb +++ b/app/views/competitions/_gq_second_code_competition.html.erb @@ -120,7 +120,11 @@

    项目简介

    <%= raw row_data[:description] %>

    标注任务

    -

    <%= row_data[:task] %>

    + <% if index ==2 %> +

    <%= row_data[:task] %>

    + <% else %> +

    <%= row_data[:task] %>

    + <% end %>

    经典算法解读: