Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
def big_reverse(input): | |
yield from reversed(input) | |
def exec_limiter(max_count): | |
def decorator(f): | |
def wrapper(*args, **kwargs): | |
wrapper.counter += 1 | |
if wrapper.counter <= max_count: | |
f(*args, **kwargs) | |
else: | |
raise Exception(f'Can not execute {f} with {args, kwargs} more than {max_count} times.') | |
wrapper.counter = 0 | |
return wrapper |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
#coding:utf-8 | |
import re | |
from random import uniform | |
from collections import defaultdict | |
from pymongo import MongoClient, ASCENDING | |
sent_end = ('.!?,;:$') | |
comma = ',;:' | |
r_alphabet = re.compile(u'[a-zA-Zа-яёА-ЯЁ0-9-]+|[.,:;?!]+') |