Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block Zweedeend

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Zweedeend /
Created Apr 19, 2017
Data structures in Python3 for Coders of the Caribbean
import math
from operator import sub, add, mul
def hexagonal_to_cubic(col, row):
x = col - row // 2
z = row
y = 0 - x - z
return x, y, z

Keybase proof

I hereby claim:

  • I am Zweedeend on github.
  • I am kallgaard ( on keybase.
  • I have a public key whose fingerprint is 87DE 8D71 8BE6 0F5C 6926 CEED 0E31 A114 FF3E 2D04

To claim this, I am signing this object:

#!/usr/bin/env python3
from ncclient.manager import connect_ssh
# use unencrypted keys from ssh-agent or ~/.ssh keys, and rely on known_hosts
with connect_ssh("", username="stuart") as manager:
assert(":url" in manager.server_capabilities)
with manager.locked("running"):
# create a new checkpoint
manager.copy_config(source="running", target="file:///new_checkpoint.conf")
You can’t perform that action at this time.