Skip to main content

No project description provided

Project description

GAK allows for easy and customizable conversion of numbers to different bases. Here’s a crash course in usage:

from gak import base

# prints "F"
print(base(15, 16))

base() takes two arguments: the number being converted, and what base to convert the number to. An optional third argument is a custom lookup table for the base conversion that looks as follows:

#prints "bab"
print(base(5, 2, {0: "a", 1: "b"}))

It is a dictionary where the key is the number to be converted and the value is what string the number should become. By default GAK provides a lookup table up to base16.

Project details


Release history Release notifications

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for gak, version 1.0
Filename, size File type Python version Upload date Hashes
Filename, size gak-1.0.tar.gz (1.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page