Skip to main content

Binary to Gray code conversion package for efficient data encoding.

Project description

grikod3 (Grikod, Gri Kod, Gray Code, GrayCode): binary ↔ grikod


grikod3 logo

DOI

WorkflowHub DOI

Anaconda-Server Badge Anaconda-Server Badge Anaconda-Server Badge Anaconda-Server Badge Open Source AGPL-3.0-or-later License

Python CI codecov Documentation Status Binder PyPI version PyPI Downloads Linted with Ruff


PyPI PyPI version
Conda conda-forge version
DOI DOI
License: AGPL-3.0-or-later License


A Python library for converting binary numbers to Gray Code with ease.


Tanım (Türkçe)

Gri Kod: grikod3 İkili sayıları Gri Koda çevirir.

Description (English)

Gri Kod: grikod3 converts binary numbers to Gray Code.


Kurulum (Türkçe) / Installation (English)

Python ile Kurulum / Install with pip, conda, mamba

pip install grikod3 -U
python -m pip install -U grikod3
conda install bilgi::grikod3 -y
mamba install bilgi::grikod3 -y
- pip uninstall grikod3 -y
+ pip install -U grikod3
+ python -m pip install -U grikod3

PyPI

Test Kurulumu / Test Installation

pip install -i https://test.pypi.org/simple/ grikod3 -U

Github Master Kurulumu / GitHub Master Installation

Terminal:

pip install git+https://github.com/WhiteSymmetry/grikod3.git

Jupyter Lab, Notebook, Visual Studio Code:

!pip install git+https://github.com/WhiteSymmetry/grikod3.git
# or
%pip install git+https://github.com/WhiteSymmetry/grikod3.git

Kullanım (Türkçe) / Usage (English)

import grikod3
grikod3.__version__
import grikod3
grikod3.ikili_2_gri_kod("1010")
import grikod3

def main():
    # Binary numbers: ikili sayılar
    binary_numbers = ["0", "1", "10", "11", "100", "101", "1111"]

    for binary in binary_numbers:
        try:
            gray_code = grikod3.ikili_2_gri_kod(binary)
            print(f"Binary: İkili: {binary} -> Gri Kod: {gray_code}")
        except grikod3.InvalidBinaryError as e:
            print(f"İkili: {binary} -> Hata: {e}")

if __name__ == "__main__":
    main()
Binary: İkili: 0 -> Gri Kod: 0
Binary: İkili: 1 -> Gri Kod: 1
Binary: İkili: 10 -> Gri Kod: 11
Binary: İkili: 11 -> Gri Kod: 10
Binary: İkili: 100 -> Gri Kod: 110
Binary: İkili: 101 -> Gri Kod: 111
Binary: İkili: 1111 -> Gri Kod: 1000


#Input: 100
#Output example
#000:000
#001:001
#010:011
#011:010
#100:110
#101:111
#110:101
#111:100
import grikod3

def main():
    print("🌟 Gri Kod Dönüştürücü - grikod3 Paketi ile")
    print("Geçerli bir ikili sayı girin (örneğin: 1101)")
    print("Çıkmak için 'q' yazın.\n")

    while True:
        user_input = input("İkili sayı: ").strip()

        if user_input.lower() == 'q':
            print("👋 Çıkılıyor. İyi günler!")
            break

        try:
            gray_code = grikod3.ikili_2_gri_kod(user_input)
            print(f"✅ Gri Kod: {gray_code}\n")
        except grikod3.InvalidBinaryError as e:
            print(f"❌ Giriş Hatası: {e}\n")
        except Exception as e:
            print(f"⚠️ Beklenmeyen hata: {e}\n")

if __name__ == "__main__":
    main()
import grikod3

if __name__ == "__main__":
    print("🚀 grikod3 Etkileşimli Moduna Hoş Geldiniz!")
    grikod3.run_interactive_converter()

Development

# Clone the repository
git clone https://github.com/WhiteSymmetry/grikod3.git
cd grikod3

# Install in development mode
python -m pip install -ve . # Install package in development mode

# Run tests
pytest

Notebook, Jupyterlab, Colab, Visual Studio Code
!python -m pip install git+https://github.com/WhiteSymmetry/grikod3.git

Citation

If this library was useful to you in your research, please cite us. Following the GitHub citation standards, here is the recommended citation.

BibTeX

APA

Keçeci, M. (2025). grikod3 [Data set]. WorkflowHub. https://doi.org/10.48546/workflowhub.datafile.13.1

Keçeci, M. (2025). grikod3. GitHub, PYPI, Anaconda, Zenodo. https://doi.org/10.5281/zenodo.15352206

Chicago

Keçeci, Mehmet. grikod3 [Data set]. WorkflowHub. https://doi.org/10.48546/workflowhub.datafile.13.1

Keçeci, Mehmet. "grikod3". Zenodo, 06 Mayıs 2025. https://doi.org/10.5281/zenodo.15352206

Lisans (Türkçe) / License (English)

This project is licensed under the AGPL-3.0-or-later License.

FOSSA Status

Pixi:

Pixi

pixi init grikod3

cd grikod3

pixi workspace channel add https://repo.prefix.dev/bilgi --prepend

✔ Added https://repo.prefix.dev/bilgi

pixi add grikod3

✔ Added grikod3 >=0.1.0,<2

pixi install

pixi shell

pixi run python -c "import grikod3; print(grikod3.version)"

Çıktı: 0.1.0

pixi remove grikod3

conda install -c https://prefix.dev/bilgi grikod3

pixi run python -c "import grikod3; print(grikod3.version)"

Çıktı: 0.1.0

pixi run pip list | grep grikod3

grikod3 0.1.0

pixi run pip show grikod3

Name: grikod3

Version: 0.1.0

Summary: Converts binary numbers to Gray Code. grikod3 (Gray Code, Grey Code)

Home-page: https://github.com/WhiteSymmetry/grikod3

Author: Mehmet Keçeci

Author-email: Mehmet Keçeci <...>

License: AGPL-3.0-or-later License

Copyright (c) 2025 Mehmet Keçeci

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

grikod3-0.1.5-cp315-cp315-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.15Windows x86-64

grikod3-0.1.5-cp315-cp315-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.15manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

grikod3-0.1.5-cp315-cp315-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.15macOS 11.0+ ARM64

grikod3-0.1.5-cp314-cp314-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.14Windows x86-64

grikod3-0.1.5-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

grikod3-0.1.5-cp314-cp314-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

grikod3-0.1.5-cp313-cp313-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.13Windows x86-64

grikod3-0.1.5-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

grikod3-0.1.5-cp313-cp313-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

grikod3-0.1.5-cp312-cp312-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.12Windows x86-64

grikod3-0.1.5-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

grikod3-0.1.5-cp312-cp312-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

grikod3-0.1.5-cp311-cp311-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.11Windows x86-64

grikod3-0.1.5-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

grikod3-0.1.5-cp311-cp311-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file grikod3-0.1.5-cp315-cp315-win_amd64.whl.

File metadata

  • Download URL: grikod3-0.1.5-cp315-cp315-win_amd64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.15, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for grikod3-0.1.5-cp315-cp315-win_amd64.whl
Algorithm Hash digest
SHA256 30350754fe3173c1c3248401ec67cc37eda312952d257ff1086c5efeae4b49b5
MD5 29a647f7ebd63a8013478958f03f543e
BLAKE2b-256 3010f900c20d8630a7a6eb228f6ed197e795cd08cbca8af34e85b257675c7093

See more details on using hashes here.

Provenance

The following attestation bundles were made for grikod3-0.1.5-cp315-cp315-win_amd64.whl:

Publisher: workflow.yml on WhiteSymmetry/grikod3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file grikod3-0.1.5-cp315-cp315-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for grikod3-0.1.5-cp315-cp315-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 607424d052b1510a0014cb027151567a96750170b4adca2a8c773be1edca7804
MD5 39fb21b7c7945662195836d7f51d5d85
BLAKE2b-256 48247396363961186a61092623bcfe82fa890ea8712bc7d0cb0f2389a8d15b82

See more details on using hashes here.

Provenance

The following attestation bundles were made for grikod3-0.1.5-cp315-cp315-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl:

Publisher: workflow.yml on WhiteSymmetry/grikod3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file grikod3-0.1.5-cp315-cp315-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for grikod3-0.1.5-cp315-cp315-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b13a2b3954c7445280168728eae197311c1371744e7269ef9b21cfcd747c4c3c
MD5 7cd0d6b917b704888d5b7a608db600cc
BLAKE2b-256 4b8dc16707d0047e940e27eff1058b8df020fdf97292afe51ffb355c9e4c4d6e

See more details on using hashes here.

Provenance

The following attestation bundles were made for grikod3-0.1.5-cp315-cp315-macosx_11_0_arm64.whl:

Publisher: workflow.yml on WhiteSymmetry/grikod3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file grikod3-0.1.5-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: grikod3-0.1.5-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for grikod3-0.1.5-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 5feda192bcf00898f6d5d9d1efd6df0eac2cf0f8574e36fe3f5df266ed0000a3
MD5 92a3d03e5cc1d19b037df8e3c8d3b32c
BLAKE2b-256 d986513188e154fac3198ca1cc17cf3b2bf76767fec904480cf00bddd875c262

See more details on using hashes here.

Provenance

The following attestation bundles were made for grikod3-0.1.5-cp314-cp314-win_amd64.whl:

Publisher: workflow.yml on WhiteSymmetry/grikod3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file grikod3-0.1.5-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for grikod3-0.1.5-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 b25bd6c1254a3585ff7002b289d40e6ceceac6bf9e3b4e3d5a44fff05812f3bf
MD5 4e8ab673858b4d555ab1d7bfb2d73fe4
BLAKE2b-256 836e1a440dc8698ba8ee0f37fc6acc5547cfbd292cdfd3aa2fc509a024313a4a

See more details on using hashes here.

Provenance

The following attestation bundles were made for grikod3-0.1.5-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl:

Publisher: workflow.yml on WhiteSymmetry/grikod3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file grikod3-0.1.5-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for grikod3-0.1.5-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4405579036cdfd8a5e07c0c11b08bddf6e439552e458f48b94024eed53e8a38f
MD5 a130c9fc6d475677f66880ba94be082d
BLAKE2b-256 e6a15030c0b93beca398e03d85223c75bc14bd9adca24f16f3168dde5dbe272c

See more details on using hashes here.

Provenance

The following attestation bundles were made for grikod3-0.1.5-cp314-cp314-macosx_11_0_arm64.whl:

Publisher: workflow.yml on WhiteSymmetry/grikod3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file grikod3-0.1.5-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: grikod3-0.1.5-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for grikod3-0.1.5-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a9f2e2c1a3ad5f9917f4a386a956ce824a36fa05969dc46100c9dd3f1087d7bc
MD5 23b964194ad7d63f6f089796fbdbf405
BLAKE2b-256 28339ff2bc7185c23fff432d93c05238494a23313c129eefaa1679e078b4a567

See more details on using hashes here.

Provenance

The following attestation bundles were made for grikod3-0.1.5-cp313-cp313-win_amd64.whl:

Publisher: workflow.yml on WhiteSymmetry/grikod3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file grikod3-0.1.5-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for grikod3-0.1.5-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 12b9951a1c1abe3d2619cc41f6d9ee33cefec9288db8638ff11fb0f22a0e55b2
MD5 b53519f4d48e2e8e4258b1cd3be44b69
BLAKE2b-256 9af9e2c5a214d8b835e11d3fb42784a14c4679d1737a7de1c434ee29db3d3b08

See more details on using hashes here.

Provenance

The following attestation bundles were made for grikod3-0.1.5-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl:

Publisher: workflow.yml on WhiteSymmetry/grikod3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file grikod3-0.1.5-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for grikod3-0.1.5-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2a073adc047d237381a16d7e4fa4934a4fea6af08e39a657058d5e8389aa0aec
MD5 e1a5dc15a27057fb0819d03e100e305c
BLAKE2b-256 f38ffa6f25dc045ec112a13c12b85f9cd479754d26b5b45b42956a71121eb21a

See more details on using hashes here.

Provenance

The following attestation bundles were made for grikod3-0.1.5-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: workflow.yml on WhiteSymmetry/grikod3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file grikod3-0.1.5-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: grikod3-0.1.5-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for grikod3-0.1.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2c9ac2f8c868cbd7fc4da6d16f134761f1b971fff550c71c1e886154de334747
MD5 3fcf47b9551977aac49edeccf03c8b65
BLAKE2b-256 22d92414de6cabd319e3e517991e1998c17efa79eedeb21adda434a81bbf0e28

See more details on using hashes here.

Provenance

The following attestation bundles were made for grikod3-0.1.5-cp312-cp312-win_amd64.whl:

Publisher: workflow.yml on WhiteSymmetry/grikod3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file grikod3-0.1.5-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for grikod3-0.1.5-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e908cbfaa775e1d2fedfe3f20cb6d556b90655fc7f03f037fbcb9cc24a339aa9
MD5 a2df4e5dbb01fc2ed74fa7d8293afbfc
BLAKE2b-256 1d418f0fdb389537700b442fb5070207d1e4acdbe4c519349365e6adad4a1151

See more details on using hashes here.

Provenance

The following attestation bundles were made for grikod3-0.1.5-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl:

Publisher: workflow.yml on WhiteSymmetry/grikod3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file grikod3-0.1.5-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for grikod3-0.1.5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3691f3485bb71dd9fa80813b34e8adfd9dad6465747ec75a04f666e9117dc206
MD5 22f95813c32cae0f7f84bf4ea0e360be
BLAKE2b-256 f733ebad0a1f86aed0b3fed7a2a65ee7342b4209936bee684ea97262ef2b1c67

See more details on using hashes here.

Provenance

The following attestation bundles were made for grikod3-0.1.5-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: workflow.yml on WhiteSymmetry/grikod3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file grikod3-0.1.5-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: grikod3-0.1.5-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for grikod3-0.1.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 566d824be7552b9c0e1170ce9e8b8b101d9fc79f90e37481fa8dd8459bc5804e
MD5 e932ecb4f4b91ed2daf997c5cb489752
BLAKE2b-256 ca82a09790cbd8efc9a48512a3c642588276d8dae1caa1fc9e1de26fa468675b

See more details on using hashes here.

Provenance

The following attestation bundles were made for grikod3-0.1.5-cp311-cp311-win_amd64.whl:

Publisher: workflow.yml on WhiteSymmetry/grikod3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file grikod3-0.1.5-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for grikod3-0.1.5-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 1473c3e9b95873c9c66bb8a53d12745292e9049c8d792830b4bd356efaa08437
MD5 860726218f451b6798bae54d8e38b150
BLAKE2b-256 8b7c0e4efe56a9171f94890f312579ad4061846e87e9f42c8d1cefddfec4ad1e

See more details on using hashes here.

Provenance

The following attestation bundles were made for grikod3-0.1.5-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl:

Publisher: workflow.yml on WhiteSymmetry/grikod3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file grikod3-0.1.5-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for grikod3-0.1.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 17ae039f590330fd3d405d4f3854574e1d2bfe50e94cc644581589ac28da4bd1
MD5 1a783cdbcc47f70e9741d5bad6c73ebd
BLAKE2b-256 df9f0024c553a48d782da67ea739204bdcd0bf2899a4249846d33c6117721e44

See more details on using hashes here.

Provenance

The following attestation bundles were made for grikod3-0.1.5-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: workflow.yml on WhiteSymmetry/grikod3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page