Skip to content

Instantly share code, notes, and snippets.

View lttzzlll's full-sized avatar

liutaotao lttzzlll

  • http://metasota.ai/
View GitHub Profile

Python Scope

HELLO = 1

# GLOABLS 字典值包含 __builtins__, __doc__等通用的全局内建函数,模块,
# 以及刚才定义的 HELLO
GLOABLS = globals()

mysql

  1. 主键 超键 候选键 外键

主 键:

数据库表中对储存数据对象予以唯一和完整标识的数据列或属性的组合。一个数据列只能有一个主键,且主键的取值不能缺失,即不能为空值(Null)。

超 键:

@lttzzlll
lttzzlll / https.md
Created May 10, 2018 02:27
about https

HTTPS

@lttzzlll
lttzzlll / scope.script
Created May 9, 2018 06:54
Scope where vs having
rs0 =
SELECT
Start,
Region,
Duration/60.0 AS DurationInMinutes
FROM searchlog
HAVING DurationInMinutes >= 20;
//
rs1 =
import time
from functools import wraps
def log(level='debug'):
if not hasattr(level, '__call__'):
def wrapper(func):
@wraps(func)
def inner(*args, **kwargs):
start = time.time()
import unittest
import random
def partation(nums, low, high):
pivot = nums[random.randrange(low, high + 1)]
while low <= high:
while low <= high and nums[low] < pivot:
low += 1
import random
import unittest
def siftdown(heap, top, end):
pos = end
newitem = heap[pos]
while pos > top:
parentpos = (pos - 1) >> 1
parent = heap[parentpos]
import random
import unittest
def siftdown(heap, top, end):
pos = end
newitem = heap[pos]
while pos > top: