Skip to content

Instantly share code, notes, and snippets.

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close

Writing in Pythonic way

This postion is a notebook to collect the pythonic code I fetch when do code research.

Generate random int list, or just a requirement of loop N times

it's a common requirement and some guys achieve this goal by using Numpy lib, but it's too heavy. you can do in this way:

import random
@dpscott101
dpscott101 / -
Last active August 15, 2018 15:24 — forked from anonymous/-
M6300 Linux setup
System: Host: mint Kernel: 4.8.0-53-generic i686 (32 bit gcc: 5.4.0)
Desktop: Cinnamon 3.4.3 (Gtk 3.18.9-1ubuntu3.3) dm: lightdm Distro: Linux Mint 18.2 Sonya
Machine: System: Dell (portable) product: Precision M6300 Chassis: type: 8
Mobo: Dell model: 0JM680 Bios: Dell v: A04 date: 01/11/2008
CPU: Dual core Intel Core2 Duo T7800 (-MCP-) cache: 4096 KB
flags: (lm nx pae sse sse2 sse3 ssse3 vmx) bmips: 10374
clock speeds: min/max: 800/2601 MHz 1: 1600 MHz 2: 1600 MHz
Graphics: Card: NVIDIA G84GLM [Quadro FX 1600M] bus-ID: 01:00.0 chip-ID: 10de:040d
Display Server: X.Org 1.18.4 drivers: nouveau (unloaded: fbdev,vesa)
Resolution: 1920x1200@59.98hz