Halo

A magic place for coding

0%

浅谈关系型数据库与非关系型数据库

  我们经常会接触到各种类型的数据库,比较出名的是MySQL、NoSQL,还有Redis算不算数据库呢?什么是关系型数据库,什么又是非关系型数据库?它们之间有什么区别呢?优缺点分别又是什么?

Read more »

Introduction

  2020年python核心团队宣布将停止对Python2的维护了,那么在这篇博客我就和大家分享一下如何把自己的云端服务器的python环境升级到Python3.

Read more »

Gensim加载速度缓慢

  Gensim是Python的一个专注于主题建模自然语言处理的开源库,最近我在做embedding相关的研究用到了这个包。从网上下载了腾讯AI Lab提供的800w中文embedding语料数据集(传送门),在加载到word2vec模型的时候非常缓慢。

Read more »

介绍

  最近在做一个项目,前端使用Vue-cli搭建,想把静态的页面部署到GitHub Pages上展示。之前我的个人博客使用的是hexo的部署模式,结合Travis CI实现了自动部署(传送门)。但是整个配置还是比较麻烦的,部署分支需要自己管理,编写travis.yml也花费了大量的时间。这次我想换一种简单直接的方法,把静态页面部署到Github Pages上。

Read more »

Problem

In a N x N grid composed of 1 x 1 squares, each 1 x 1 square consists of a /, \, or blank space. These characters divide the square into contiguous regions.

(Note that backslash characters are escaped, so a \ is represented as "\\".)

Return the number of regions.

Read more »

Problem

Given two lists of closed intervals, each list of intervals is pairwise disjoint and in sorted order.

Return the intersection of these two interval lists.

(Formally, a closed interval [a, b] (with a <= b) denotes the set of real numbers x with a <= x <= b. The intersection of two closed intervals is a set of real numbers that is either empty, or can be represented as a closed interval. For example, the intersection of [1, 3] and [2, 4] is [2, 3].)

Read more »

Problem

A query word matches a given pattern if we can insert lowercase letters to the pattern word so that it equals the query. (We may insert each character at any position, and may insert 0 characters.)

Given a list of queries, and a pattern, return an answer list of booleans, where answer[i] is true if and only if queries[i] matches the pattern.

Read more »

Problem

Given a 2D array A, each cell is 0 (representing sea) or 1 (representing land)

A move consists of walking from one land square 4-directionally to another land square, or off the boundary of the grid.

Return the number of land squares in the grid for which we cannot walk off the boundary of the grid in any number of moves.

Read more »