From 206b5136847694cd1ee1862033fce1230a9e582d Mon Sep 17 00:00:00 2001 From: Bruce-Jay Date: Fri, 20 Oct 2023 11:06:30 +0800 Subject: [PATCH] Add declaration at head of python file for chinese comments --- Assignment5.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Assignment5.md b/Assignment5.md index 7a60112..749f1ce 100644 --- a/Assignment5.md +++ b/Assignment5.md @@ -180,7 +180,10 @@ pip3 install --user -i https://mirrors.aliyun.com/pypi/simple clickhouse-driver ##### 2.2)quit()退出python3命令行,让我们运行几个Python代码来实现建表,插入,查询等操作。 > 建立createTable.py文件(若忘记创建文件命令可参考[实验一](https://gitea.shuishan.net.cn/xslu_dase_ecnu_edu_cn/cloud-computing-course/src/branch/master/Assignment1.md)),并复制如下代码。其中username,password,hostIP,port都要替换成你的数据仓库参数。 -``` +```python +#!/usr/bin/env python +# _*_ coding:utf-8 _*_ + import clickhouse_driver # 建立连接 @@ -212,7 +215,10 @@ python3 createTable.py ``` > 向COMPANY表中添加一些记录。建立insertTable.py文件,复制如下代码并运行。 -``` +```python +#!/usr/bin/env python +# _*_ coding:utf-8 _*_ + import clickhouse_driver # 建立连接 @@ -227,7 +233,10 @@ conn.close() ``` > 让我们查询一下刚刚建的表。建立selectTable.py文件,复制如下代码并运行。 -``` +```python +#!/usr/bin/env python +# _*_ coding:utf-8 _*_ + import clickhouse_driver # 建立连接