C Recommend Book List

GENERAL INTRODUCTION/TUTORIAL:

(1) For real beginners looking for a solid introduction:

C Programming: A Modern Approach.
K.N.King.
W.W.Norton & Company, 1996.
ISBN 0-393-96945-2


(2) For somewhat more experienced users looking for a solid introduction:

The C Programming Language, 2nd Ed.
Kernigan & Ritchie.
Prentice Hall, 1988.
ISBN 0-13-110362-8


(3) Other recommended introductory books:


C: How to Program, 2nd Ed.
Deitel, H.M. & Deitel, P.J.
Prentice Hall, 1994.
ISBN: 0-13-226119-7


Reference Books:


C : A Reference Manual, 4th Ed.
Harbison & Steele.
Prentice Hall, 1995.
ISBN 0-13-326224-3


The Standard C Library.
P.J.Plauger.
Prentice Hall, 1992.
ISBN 0-13-131509-9


C Programming FAQs
Steve Summit
Addison-Wesley, 1996.
ISBN 0-201-84519-9


Advanced topics / further exploration

C Traps and Pitfalls.
Andrew Koenig.
Addison-Wesley, 1989.
ISBN 0-201-17928-8


Expert C Programming: Deep C Secrets
Peter Van Der Linden
Prentice Hall, 1994.
ISBN 0-13-177429-8


Practical C Programming.
Steve Oualline.
O'Reilly & Associates, 1993.
ISBN 1-56592-035-X


Problem Solving And Program Design In C, 2nd Ed.
Hanly & Koffman.
Addison-Wesley, 1996.
ISBN 0-201-59063-8


Algorithms in C, 3rd Ed.
Robert Sedgewick
Addison-Wesley, 1998.
ISBN 0-201-31452-5

C Unleashed.
Heathfield, Kirby et al
Sams Publishing, 2000.
ISBN 0-672-31896-2

print("开始执行推荐算法....") #spark.sql(etl_sql).write.jdbc(mysql_url, 'task888', 'overwrite', prop) # 获取:用户ID、房源ID、评分 etl_rdd = spark.sql(etl_sql).select('user_id', 'phone_id', 'action_core').rdd rdd = etl_rdd.map(lambda x: Row(user_id=x[0], book_id=x[1], action_core=x[2])).map(lambda x: (x[2], x[1], x[0])) # 5.训练模型 model = ALS.train(rdd, 10, 10, 0.01) # 7.调用模型 products_for_users_list = model.recommendProductsForUsers(10).collect() # 8.打开文件,将推荐的结果保存到data目录下 out = open(r'data_etl/recommend_info.csv', 'w', newline='', encoding='utf-8') # 9.设置写入模式 csv_write = csv.writer(out, dialect='excel') # 10.设置用户csv文件头行 user_head = ['user_id', 'phone_id', 'score'] # 12.写入头行 csv_write.writerow(user_head) # 13.循环推荐数据 for i in products_for_users_list: for value in i[1]: rating = [value[0], value[1], value[2]] # 写入数据 csv_write.writerow(rating) print("推荐算法执行结束,开始加工和变换推荐结果....") # 14.读取推荐的结果 recommend_df = spark \ .read \ .format('com.databricks.spark.csv') \ .options(header='true', inferschema='true', ending='utf-8') \ .load("data_etl/recommend_info.csv") # 注册临时表 recommend_df.createOrReplaceTempView("recommend") # 构造 spark执行的sql recommend_sql = ''' SELECT a.user_id, a.phone_id, bid,phone_name, phone_brand, phone_price, phone_memory ,phone_screen_size,ROUND(score,1) score FROM recommend a,phone b WHERE a.phone_id=b.phone_id ''' # 执行spark sql语句,得到dataframe recommend_df = spark.sql(recommend_sql) # 将推荐的结果写入mysql recommend_df.write.jdbc(mysql_url, 'recommend', 'overwrite', prop) 解释一下这段代码
06-08
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值