Skip to content

Instantly share code, notes, and snippets.

Zweedeend

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
Zweedeend / datastructures.py
Created Apr 19, 2017
Data structures in Python3 for Coders of the Caribbean
View datastructures.py
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
View keybase.md

Keybase proof

I hereby claim:

  • I am Zweedeend on github.
  • I am kallgaard (https://keybase.io/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:

View stuart.py
#!/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("192.168.3.3", 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.