Skip to content

Instantly share code, notes, and snippets.

fmt.Printf("%+v") # print out struct property names and values
@burukuru
burukuru / python_cheatsheet.txt
Last active July 12, 2019 22:38
Python cheatsheet
# List comprehension
list = []
result = [expr(item) for item in list if item < 5]
# Dict comprehension
dict = dict()
dict = {key: value for key in list}
# Range
x = range(2, 5)
#!/bin/bash [14/29]
set -x
function single_screen() {
xrandr --output HDMI-2 --off --output HDMI-1 --off --output DP-1 --off --output eDP-1 --mode 2560x1600 --pos 0x0 --rotate normal --output DP-2 --off
awesomewm_restart
}
function external_dual() {
SCREEN1=$(echo "$EXT_SCREEN" | xargs | awk '{print $1}')

Keybase proof

I hereby claim:

  • I am burukuru on github.
  • I am burukuru (https://keybase.io/burukuru) on keybase.
  • I have a public key whose fingerprint is 45CA B5A2 0AFF C068 A709 B0B2 BA36 5C5F F799 5AAA

To claim this, I am signing this object: