首页
/ 开源项目 `exercises-in-programming-style` 使用教程

开源项目 `exercises-in-programming-style` 使用教程

2024-09-27 12:56:14作者:滕妙奇

1. 项目的目录结构及介绍

exercises-in-programming-style 项目是一个综合性的编程风格集合,使用简单的计算任务(词频统计)来展示不同的编程风格。项目的目录结构如下:

exercises-in-programming-style/
├── 01-good-old-times/
├── 02-go-forth/
├── 03-arrays/
├── 04-monolith/
├── 05-cookbook/
├── 06-pipeline/
├── 07-code-golf/
├── 08-infinite-mirror/
├── 09-kick-forward/
├── 10-the-one/
├── 11-things/
├── 12-letterbox/
├── 13-closed-maps/
├── 14-abstract-things/
├── 15-hollywood/
├── 16-bulletin-board/
├── 17-introspective/
├── 18-reflective/
├── 19-aspects/
├── 20-plugins/
├── 21-constructivist/
├── 22-tantrum/
├── 23-passive-aggressive/
├── 24-declared-intentions/
├── 25-quarantine/
├── 26-persistent-tables/
├── 27-spreadsheet/
├── 28-lazy-rivers/
├── 29-actors/
├── 30-dataspaces/
├── 31-map-reduce/
├── 32-double-map-reduce/
├── 33-trinity/
├── 34-restful/
├── 35-dense-shallow-under-control/
├── 36-dense-shallow-out-of-control/
├── 37-bow-tie/
├── 38-neuro-monolithic/
├── 39-sliding-window/
├── 40-recurrent/
├── 41-convolutions/
├── test/
├── zothers/
│   └── 34-the-c-flow/
├── .gitignore
├── LICENSE
├── README.md
├── input.txt
├── pride-and-prejudice.txt
├── stop_words.txt
└── test.txt

目录结构介绍

  • 01-good-old-times41-convolutions: 这些目录分别代表了不同的编程风格,每个目录下包含一个或多个示例程序,展示了该风格的实现。
  • test: 包含测试脚本,用于验证新添加的编程风格是否正确。
  • zothers: 包含一些额外的编程风格示例。
  • .gitignore: Git 忽略文件配置。
  • LICENSE: 项目的开源许可证(MIT 许可证)。
  • README.md: 项目的介绍和使用说明。
  • input.txt: 输入文件示例。
  • pride-and-prejudice.txt: 用于词频统计的文本文件。
  • stop_words.txt: 停用词列表。
  • test.txt: 测试文件。

2. 项目的启动文件介绍

项目中没有统一的启动文件,因为每个编程风格目录下都有自己的示例程序。要运行某个编程风格的示例程序,请进入相应的目录并执行以下命令:

python tf-NN.py /path/to/pride-and-prejudice.txt

其中 NN 是目录编号,例如 0102 等。

3. 项目的配置文件介绍

项目中没有统一的配置文件。每个编程风格目录下的示例程序通常会直接读取 pride-and-prejudice.txt 文件进行词频统计。如果需要修改输入文件或停用词列表,可以直接修改 pride-and-prejudice.txtstop_words.txt 文件。


通过以上步骤,您可以了解并运行 exercises-in-programming-style 项目中的不同编程风格示例。

登录后查看全文
热门项目推荐
相关项目推荐