diff --git a/12 语言特性/递归.py b/12 语言特性/1 递归.py similarity index 100% rename from 12 语言特性/递归.py rename to 12 语言特性/1 递归.py diff --git a/12 语言特性/装饰/反射装饰.py b/12 语言特性/2 装饰/反射装饰.py similarity index 100% rename from 12 语言特性/装饰/反射装饰.py rename to 12 语言特性/2 装饰/反射装饰.py diff --git a/12 语言特性/装饰/装饰器.py b/12 语言特性/2 装饰/装饰器.py similarity index 100% rename from 12 语言特性/装饰/装饰器.py rename to 12 语言特性/2 装饰/装饰器.py diff --git a/12 语言特性/生成器.py b/12 语言特性/3 生成器.py similarity index 100% rename from 12 语言特性/生成器.py rename to 12 语言特性/3 生成器.py diff --git a/12 语言特性/异步.py b/12 语言特性/4 异步.py similarity index 100% rename from 12 语言特性/异步.py rename to 12 语言特性/4 异步.py diff --git a/12 语言特性/内省.py b/12 语言特性/5 内省.py similarity index 100% rename from 12 语言特性/内省.py rename to 12 语言特性/5 内省.py diff --git a/12 语言特性/反射/反射_函数.py b/12 语言特性/6 反射/反射_函数.py similarity index 100% rename from 12 语言特性/反射/反射_函数.py rename to 12 语言特性/6 反射/反射_函数.py diff --git a/12 语言特性/反射/反射_类.py b/12 语言特性/6 反射/反射_类.py similarity index 100% rename from 12 语言特性/反射/反射_类.py rename to 12 语言特性/6 反射/反射_类.py diff --git a/13 计算设备/数据共享/1 文件共享.py b/13 计算设备/数据共享/1 文件共享.py new file mode 100644 index 0000000..8ac399e --- /dev/null +++ b/13 计算设备/数据共享/1 文件共享.py @@ -0,0 +1,2 @@ + +# 文件或者共享变量 \ No newline at end of file diff --git a/13 计算设备/存储/数据库/ORM/DataQuery.py b/13 计算设备/数据共享/2 数据库/ORM/DataQuery.py similarity index 100% rename from 13 计算设备/存储/数据库/ORM/DataQuery.py rename to 13 计算设备/数据共享/2 数据库/ORM/DataQuery.py diff --git a/13 计算设备/存储/数据库/ORM/createDb.py b/13 计算设备/数据共享/2 数据库/ORM/createDb.py similarity index 100% rename from 13 计算设备/存储/数据库/ORM/createDb.py rename to 13 计算设备/数据共享/2 数据库/ORM/createDb.py diff --git a/13 计算设备/存储/数据库/ORM/processData.py b/13 计算设备/数据共享/2 数据库/ORM/processData.py similarity index 100% rename from 13 计算设备/存储/数据库/ORM/processData.py rename to 13 计算设备/数据共享/2 数据库/ORM/processData.py diff --git a/13 计算设备/数据共享/2 数据库/tf.db b/13 计算设备/数据共享/2 数据库/tf.db new file mode 100644 index 0000000..b389e30 Binary files /dev/null and b/13 计算设备/数据共享/2 数据库/tf.db differ diff --git a/13 计算设备/存储/数据库/数据库.py b/13 计算设备/数据共享/2 数据库/数据库.py similarity index 100% rename from 13 计算设备/存储/数据库/数据库.py rename to 13 计算设备/数据共享/2 数据库/数据库.py diff --git a/13 计算设备/存储/内存队列.py b/13 计算设备/数据共享/3 内存队列.py similarity index 100% rename from 13 计算设备/存储/内存队列.py rename to 13 计算设备/数据共享/3 内存队列.py diff --git a/13 计算设备/数据共享/4 网络.py b/13 计算设备/数据共享/4 网络.py new file mode 100644 index 0000000..e69de29 diff --git a/14 人机交互/Web_MVC/flask/app.py b/14 人机交互/Web/MVC/app.py similarity index 100% rename from 14 人机交互/Web_MVC/flask/app.py rename to 14 人机交互/Web/MVC/app.py diff --git a/14 人机交互/Web_MVC/flask/models.py b/14 人机交互/Web/MVC/models.py similarity index 100% rename from 14 人机交互/Web_MVC/flask/models.py rename to 14 人机交互/Web/MVC/models.py diff --git a/14 人机交互/Web_MVC/flask/templates/index.html b/14 人机交互/Web/MVC/templates/index.html similarity index 100% rename from 14 人机交互/Web_MVC/flask/templates/index.html rename to 14 人机交互/Web/MVC/templates/index.html diff --git a/14 人机交互/Web_MVC/tf-33.py b/14 人机交互/Web_MVC/tf-33.py deleted file mode 100644 index a0b6c87..0000000 --- a/14 人机交互/Web_MVC/tf-33.py +++ /dev/null @@ -1,45 +0,0 @@ -import sys, collections -from cppy.cp_util import * - -class WordFrequenciesModel: - """ 模型:数据 """ - def __init__(self, path_to_file): - self.update(path_to_file) - - def update(self, path_to_file): - try: - self.freqs = collections.Counter( extract_file_words(path_to_file) ) - except IOError: - print("File not found") - self.freqs = {} - - -class WordFrequenciesView: - """ 视图:数据展现 """ - def __init__(self, model): - self._model = model - - def render(self): - sorted_freqs = sort_dict(self._model.freqs) - print_word_freqs(sorted_freqs) - - -class WordFrequencyController: - """ 控制:操作逻辑 """ - def __init__(self, model, view): - self._model, self._view = model, view - view.render() - - def run(self): - while True: - print("Enter the file path (or 'q' to quit): ", file=sys.stderr, flush=True) - filename = sys.stdin.readline().strip() - if filename.lower() == 'q': break - self._model.update(filename) - self._view.render() - - -m = WordFrequenciesModel( testfilepath ) -v = WordFrequenciesView(m) -c = WordFrequencyController(m, v) -c.run() \ No newline at end of file diff --git a/14 人机交互/桌面/PyQT.py b/14 人机交互/视窗/PyQT.py similarity index 100% rename from 14 人机交互/桌面/PyQT.py rename to 14 人机交互/视窗/PyQT.py diff --git a/14 人机交互/桌面/test.txt b/14 人机交互/视窗/test.txt similarity index 100% rename from 14 人机交互/桌面/test.txt rename to 14 人机交互/视窗/test.txt