blog icon indicating copy to clipboard operation
blog copied to clipboard

My Blog

Results 164 blog issues
Sort by recently updated
recently updated
newest added

> References: > https://code.visualstudio.com/docs/remote/ssh-tutorial # 1. Install the `Remote - SSH` extension # 2. Remote - SSH 1. Click the new status bar item on the far left at the...

Linux

开发环境: - macOS - Python3.5 References: - https://docs.python.org/3.8/tutorial/venv.html > **虚拟环境**是系统的一个位置,你可以在其中安装包,并将其与其他 Python 包隔离。将项目的库与其他项目分离是有益的,并且为了将项目部署到服务器,这也是必须的。 ![myproject-myvenv-activate-pip-deactivate](https://user-images.githubusercontent.com/19491358/38574121-9fd4416c-3d2a-11e8-9562-d576157772e5.png) # 一、为Python项目新建一个目录,并创建一个虚拟环境 为项目新建一个目录,将其命名为 myproject ,再在终端中切换到这个目录,并创建一个虚拟环境。如果使用的是 Python 3,可使用如下命令来创建虚拟环境( 这里运行了模块 venv ,并使用它来创建一个名为 myvenv 的虚拟环境。): ```shell $ mkdir myproject $...

Python

- macOS 11 Terminal 默认使用 zsh 。 - 此处不使用 [oh-my-zsh](https://github.com/FatliTalk/blog/issues/70) 配置,而是选择手动配置:highlighting 高亮和 git分支名显示。 _在 `~/.zshrc` 文件下新增以下配置:_ ```shell # $ brew install zsh-syntax-highlighting # To activate the syntax highlighting, add the...

Essay

环境: - Ubuntu 16.04 LTS 参考: - Miniconda 介绍和安装说明:https://docs.conda.io/en/latest/miniconda.html - Miniconda 各个下载版本:https://repo.continuum.io/miniconda/ -> https://repo.anaconda.com/miniconda/ - Installing and Uninstalling: https://docs.conda.io/projects/conda/en/latest/user-guide/install/linux.html 因为 conda 包管理工具,本来就有很多依赖包,不能通过 `$ pip install conda` 进行安装,只能通过安装 [Anaconda](https://www.anaconda.com/distribution/) 或 [Miniconda](https://docs.conda.io/en/latest/miniconda.html)...

Python

- 本文内容摘录或参考自《算法图解》 # 一、算法是什么 算法是一组完成任务的指令。任何代码片段都可视为算法。 算法应用场景:使用图算法编写跟踪用户的AI系统;GPS设备使用图算法来计算前往目的地的最短路径;使用K最近邻算法编写推荐系统;使用动态规划来编写下国际跳棋的AI算法。 # 二、二分查找 二分查找是一种算法,其输入是一个有序的元素列表。如果要查找的元素包含在列表中,二分查找返回其位置;否则返回 null 。 使用**简单查找**法查找列表中的元素时,在最糟情况下需要查看每个元素。因此,如果列表包含8个数字,你最多需要检查8个数字。 而使用**二分查找**时,最多需要检查 `log n` 个元素(这里的 log 指的都是 log2 )。如果列表包含8个元素,你最多需要检查3个元素,因为 log 8 = 3(23 = 8)。如果列表包含1024个元素,你最多需要检查10个元素, 因为log 1024 = 10(210...

Algorithms

Table of Contents: 1. Test structure overview 2. setUp vs setUpClass vs setUpTestData 2.1 setUp 2.2 setUpClass 2.3 setUpTestData 2.4 __init__ method 3. How to run the tests 3.1 Running...

Python

# 一、创建Django项目 > https://docs.djangoproject.com/zh-hans/2.2/intro/tutorial01/#creating-a-project ```shell $ django-admin startproject project_name # 目录结构: project_name ├── manage.py └── project_name ├── __init__.py ├── settings.py ├── urls.py └── wsgi.py ``` ```shell # 相比以上新建项目的方式,更推荐使用以下方式新建项目: $ mkdir...

Python

# 新建一个仓库并初始化 ## 新建作为仓库的文件夹 1. `mkdir 文件夹名` :新建文件夹,示例: `mkdir test` 2. `touch 文件名` :新建文件,示例: `touch test.txt` ;或 `cat > 文件名` :创建文件并进入编辑模式( `Control + D` 2次,退出编辑) 3. `cd 文件夹名` :切换到文件夹目录进行其他操作,示例: `cd...

Git

> Git 系列博文参考 https://git-scm.com/book/zh/v2 > > [Git教程 | 图文讲解原理并在线练习Git命令](https://learngitbranching.js.org/) > > 使用开发环境为 macOS # 安装 Git ### 安装 1. https://git-scm.com/downloads 2. macOS 安装 Git:安装 [Homebrew](https://github.com/FatliTalk/blog/issues/59) 后运行 `brew install git` ###...

Git

> References: > https://git-scm.com/book/en/v2/Git-Basics-Tagging # 1. Listing Your Tags Listing the existing tags in Git is straightforward. Just type git tag (with optional -l or --list): ```bash $ git tag...

Git