- Mastering Scala Machine Learning
- Alex Kozlov
- 212字
- 2021-07-02 16:33:18
Conventions
In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "We can include other contexts through the use of the include
directive."
A block of code is set as follows:
import scala.util.hashing.MurmurHash3._ val markLow = 0 val markHigh = 4096 val seed = 12345 def consistentFilter(s: String): Boolean = { val hash = stringHash(s.split(" ")(0), seed) >>> 16 hash >= markLow && hash < markHigh } val w = new java.io.FileWriter(new java.io.File("out.txt")) val lines = io.Source.fromFile("chapter01/data/iris/in.txt").getLines lines.filter(consistentFilter).foreach { s => w.write(s + Properties.lineSeparator) }
Any command-line input or output is written as follows:
akozlov@Alexanders-MacBook-Pro]$ scala Welcome to Scala version 2.11.7 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_40). Type in expressions to have them evaluated. Type :help for more information. scala> import scala.util.Random import scala.util.Random
New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Run all cells at once by navigating to Cell | Run All."
推薦閱讀
- Java應用與實戰
- Python科學計算(第2版)
- Visual FoxPro程序設計教程
- 單片機C語言程序設計實訓100例:基于STC8051+Proteus仿真與實戰
- 零基礎學Java程序設計
- Building an RPG with Unity 2018
- Solr Cookbook(Third Edition)
- Test-Driven JavaScript Development
- JBoss:Developer's Guide
- Kubernetes進階實戰
- 零基礎學C語言(第4版)
- 現代CPU性能分析與優化
- WCF技術剖析(卷1)
- Koa與Node.js開發實戰
- Practical Responsive Typography