Dataset Viewer
Auto-converted to Parquet Duplicate
text
stringlengths
101
200k
repo_name
stringlengths
5
73
stars
stringlengths
3
6
repo_language
stringlengths
1
24
file_name
stringlengths
2
57
mime_type
stringclasses
22 values
hash
int64
-9,223,369,786,400,666,000
9,223,339,290B
include *.rst include *.txt include LICENSE include INSTALL include tox.ini include capabilities-data/dist/capabilities.json include src/escpos/capabilities.json recursive-include doc *.bat recursive-include doc *.ico recursive-include doc *.py recursive-include doc *.rst recursive-include doc *.txt recursive-include d...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
8,751,525,123,829,401,000
#!/usr/bin/env python import os import sys from setuptools import find_packages, setup base_dir = os.path.dirname(__file__) src_dir = os.path.join(base_dir, "src") # When executing the setup.py, we need to be able to import ourselves, this # means that we need to add the src/ directory to the sys.path. sys.path.ins...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
-8,966,421,625,955,614,000
********* Changelog ********* 2020-05-12 - Version 3.0a8 - "Only Slightly Bent" ------------------------------------------------- This release is the ninth alpha release of the new version 3.0. Please be aware that the API is subject to change until v3.0 is released. This release drops support for Python 2, requiring ...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
7,764,559,013,503,989,000
[metadata] name = python-escpos url = https://github.com/python-escpos/python-escpos description = Python library to manipulate ESC/POS Printers long_description = file: README.rst license = MIT license_file = LICENSE author = Manuel F Martinez and others author_email = dev@pkanzler.de maintainer = Patrick Kanzler main...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
-2,162,109,519,123,499,000
formats: - pdf - epub requirements_file: doc/requirements.txt python: version: 3 setup_py_install: true
python-escpos/python-escpos
535
Python
constants.rst
text/plain
-2,597,302,186,761,692,000
############################################################# python-escpos - Python library to manipulate ESC/POS Printers ############################################################# .. image:: https://travis-ci.org/python-escpos/python-escpos.svg?branch=master :target: https://travis-ci.org/python-escpos/pytho...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
-8,243,748,922,724,695,000
[tox] envlist = py35, py36, py37, py38, docs, flake8 [gh-actions] python = 2.7: py27 3.6: py36 3.7: py37 3.8: py38 [testenv] deps = nose jaconv coverage scripttest mock pytest!=3.2.0,!=3.3.0 pytest-cov pytest-mock hypothesis>4 python-barco...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
-7,474,916,700,184,312,000
python-escpos ============= This library is available over pypi. So for most of the use-cases it should be sufficient to run ``` pip install python-escpos --user # add --pre if you want to install pre-releases ``` For more information please read the documentation at https://python-escpos.readthedocs.io/en/latest/u...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
3,373,681,124,774,981,600
************ Contributing ************ This project is open to any kind of contribution. You can help with improving the documentation, adding fixes to the code, providing test cases in code or as a description or just spreading the word. Please feel free to create an issue or pull request. In order to reduce the amou...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
-7,853,292,627,905,224,000
<!-- Please feel free to delete any sections that aren't relevant. --> <!-- mark with x between the [ ] --> I have: - [ ] searched open and closed issues for duplicates ### Bug description ### Steps to reproduce - add your steps here - as a list - using hyphens ### Device info <!-- Replace examples with your info -...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
2,115,569,181,461,870,300
### Contributor checklist <!-- mark with x between the brackets --> - [ ] I have read the CONTRIBUTING.rst - [ ] I have tested my contribution on these devices: * e.g. Epson TM-T88II - [ ] My contribution is ready to be merged as is ---------- ### Description
python-escpos/python-escpos
535
Python
constants.rst
text/plain
2,569,003,023,291,297,000
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions name: Python package on: push: branches: [ master ] pull_request: branches: [ ma...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
-2,989,410,340,655,484,400
""" ESC/POS configuration manager. This module contains the implementations of abstract base class :py:class:`Config`. """ import os import appdirs import yaml from . import printer from . import exceptions class Config(object): """ Configuration handler class. This class loads configuration from a def...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
-4,319,684,302,181,348,400
""" Image format handling class This module contains the image format handler :py:class:`EscposImage`. :author: `Michael Billington <michael.billington@gmail.com>`_ :organization: `python-escpos <https://github.com/python-escpos>`_ :copyright: Copyright (c) 2016 Michael Billington <michael.billington@gmail.com> :lice...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
3,679,809,759,942,773,000
# -*- coding: utf-8 -*- """Helpers to encode Japanese characters. I doubt that this currently works correctly. """ try: import jaconv except ImportError: jaconv = None def encode_katakana(text): """I don't think this quite works yet.""" encoded = [] for char in text: if jaconv: ...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
5,904,162,900,573,698,000
from .capabilities import CAPABILITIES class CodePageManager: """Holds information about all the code pages (as defined in escpos-printer-db). """ def __init__(self, data): self.data = data def get_all(self): return self.data.values() @staticmethod def get_encoding_name(...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
-2,568,347,272,365,227,000
#!/usr/bin/python # -*- coding: utf-8 -*- """ This module contains the implementations of abstract base class :py:class:`Escpos`. :author: `Manuel F Martinez <manpaz@bashlinux.com>`_ and others :organization: Bashlinux and `python-escpos <https://github.com/python-escpos>`_ :copyright: Copyright (c) 2012-2017 Bashlin...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
4,446,486,996,381,703,700
import re from os import environ, path import pkg_resources import pickle import logging import time import six import yaml from tempfile import gettempdir import platform logging.basicConfig() logger = logging.getLogger(__name__) pickle_dir = environ.get('ESCPOS_CAPABILITIES_PICKLE_DIR', gettempdir()) pickle_path ...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
-8,814,734,423,063,138,000
#!/usr/bin/python # -*- coding: utf-8 -*- """ Main class This module contains the abstract base class :py:class:`Escpos`. :author: `Manuel F Martinez <manpaz@bashlinux.com>`_ and others :organization: Bashlinux and `python-escpos <https://github.com/python-escpos>`_ :copyright: Copyright (c) 2012-2017 Bashlinux and ...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
6,429,261,240,211,131,000
#!/usr/bin/python # -*- coding: utf-8 -*- """ Magic Encode This module tries to convert an UTF-8 string to an encoded string for the printer. It uses trial and error in order to guess the right codepage. The code is based on the encoding-code in py-xml-escpos by @fvdsn. :author: `Patrick Kanzler <dev@pkanzler.de>`_ ...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
-9,031,240,873,397,623,000
# -*- coding: utf-8 -*- """ python-escpos enables you to manipulate escpos-printers """ __all__ = ["constants", "escpos", "exceptions", "printer"] try: from .version import version as __version__ # noqa except ImportError: # pragma: no cover raise ImportError( 'Failed to find (autogenerated) version...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
7,219,379,503,758,235,000
#!/usr/bin/env python # PYTHON_ARGCOMPLETE_OK """ CLI This module acts as a command line interface for python-escpos. It mirrors closely the available ESCPOS commands while adding a couple extra ones for convenience. It requires you to have a configuration file. See documentation for details. """ import argparse t...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
-3,533,310,156,973,077,500
# -*- coding: utf-8 -*- """ ESC/POS Exceptions classes Result/Exit codes: - `0` = success - `10` = No Barcode type defined :py:exc:`~escpos.exceptions.BarcodeTypeError` - `20` = Barcode size values are out of range :py:exc:`~escpos.exceptions.BarcodeSizeError` - `30` = Barcode text not supplied :py:...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
-3,009,662,063,839,996,400
# -*- coding: utf-8 -*- """ Set of ESC/POS Commands (Constants) This module contains constants that are described in the esc/pos-documentation. Since there is no definitive and unified specification for all esc/pos-like printers the constants could later be moved to `capabilities` as in `escpos-php by @mike42 <https:...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
5,072,701,997,978,484,000
#!/usr/bin/python # Adapted script from Adafruit # Weather forecast for Raspberry Pi w/Adafruit Mini Thermal Printer. # Retrieves data from DarkSky.net's API, prints current conditions and # forecasts for next two days. # Weather example using nice bitmaps. # Written by Adafruit Industries. MIT license. # Adapted an...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
-7,359,232,004,411,034,000
"""Prints code page tables. """ import six import sys from escpos import printer from escpos.constants import CODEPAGE_CHANGE, ESC, CTL_LF, CTL_FF, CTL_CR, CTL_HT, CTL_VT def main(): dummy = printer.Dummy() dummy.hw('init') for codepage in sys.argv[1:] or ['USA']: dummy.set(height=2, width=2)...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
2,195,612,550,887,496,200
from escpos.printer import Usb # Adapt to your needs p = Usb(0x0416, 0x5011, profile="POS-5890") # Some software barcodes p.soft_barcode('code128', 'Hello') p.soft_barcode('code39', '1234')
python-escpos/python-escpos
535
Python
constants.rst
text/plain
7,126,506,646,709,017,000
from escpos.printer import Usb # Adapt to your needs p = Usb(0x0416, 0x5011, profile="POS-5890") # Print software and then hardware barcode with the same content p.soft_barcode('code39', '123456') p.text('\n') p.text('\n') p.barcode('123456', 'CODE39')
python-escpos/python-escpos
535
Python
constants.rst
text/plain
6,584,835,139,268,658,000
import sys from escpos.printer import Usb def usage(): print("usage: qr_code.py <content>") if __name__ == '__main__': if len(sys.argv) != 2: usage() sys.exit(1) content = sys.argv[1] # Adapt to your needs p = Usb(0x0416, 0x5011, profile="POS-5890") p.qr(content, center=Tr...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
-3,492,899,907,880,992,000
# Climacons by Adam Whitcroft 75 climatically categorised pictographs for web and UI design by [@adamwhitcroft](https://www.twitter.com/#!/adamwhitcroft). Visit the [Climacons](https://adamwhitcroft.com/climacons/) website for more information. Visit [Adam Whitcroft on GitHub](https://github.com/AdamWhitcroft) ## L...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
8,882,995,023,653,125,000
#!/usr/bin/python # -*- coding: utf-8 -*- """tests for the File printer :author: `Patrick Kanzler <patrick.kanzler@fablab.fau.de>`_ :organization: `python-escpos <https://github.com/python-escpos>`_ :copyright: Copyright (c) 2016 `python-escpos <https://github.com/python-escpos>`_ :license: MIT """ import six impo...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
-5,437,537,316,387,406,000
from nose.tools import assert_raises from escpos.printer import Dummy def test_printer_dummy_clear(): printer = Dummy() printer.text("Hello") printer.clear() assert(printer.output == b'')
python-escpos/python-escpos
535
Python
constants.rst
text/plain
6,691,484,971,770,623,000
#!/usr/bin/python """test the raising of errors with the error module :author: `Patrick Kanzler <patrick.kanzler@fablab.fau.de>`_ :organization: `python-escpos <https://github.com/python-escpos>`_ :copyright: Copyright (c) 2017 `python-escpos <https://github.com/python-escpos>`_ :license: MIT """ import pytest impor...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
-2,295,423,314,651,021,800
#!/usr/bin/python """tests for the text printing function :author: `Patrick Kanzler <patrick.kanzler@fablab.fau.de>`_ :organization: `python-escpos <https://github.com/python-escpos>`_ :copyright: Copyright (c) 2016 `python-escpos <https://github.com/python-escpos>`_ :license: MIT """ import pytest import mock from ...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
6,338,380,797,784,481,000
"""Test for the CLI """ import os import sys from scripttest import TestFileEnvironment from nose.tools import assert_equals, nottest import escpos TEST_DIR = os.path.abspath('test/test-cli-output') DEVFILE_NAME = 'testfile' DEVFILE = os.path.join(TEST_DIR, DEVFILE_NAME) CONFIGFILE = 'testconfig.yaml' CONFIG_YAML...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
5,770,274,282,975,849,000
#!/usr/bin/python # -*- coding: utf-8 -*- import escpos.printer as printer import pytest @pytest.mark.parametrize("bctype,data", [ ('UPC-A', '01234567890'), ('UPC-A', '012345678905'), ('UPC-E', '01234567'), ('UPC-E', '0123456'), ('UPC-E', '012345678905'), ('EAN13', '0123456789012'), ('EA...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
-1,642,696,723,374,885,000
import pytest from escpos.capabilities import get_profile, NotSupported, BARCODE_B, Profile @pytest.fixture def profile(): return get_profile('default') class TestBaseProfile: """Test the `BaseProfile` class. """ def test_get_font(self, profile): with pytest.raises(NotSupported): ...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
3,847,475,499,428,417,500
#!/usr/bin/python """test the facility which enables usage of the with-statement :author: `Patrick Kanzler <patrick.kanzler@fablab.fau.de>`_ :organization: `python-escpos <https://github.com/python-escpos>`_ :copyright: Copyright (c) 2016 `python-escpos <https://github.com/python-escpos>`_ :license: MIT """ import e...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
3,906,324,460,314,315,000
#!/usr/bin/python """verifies that the metaclass abc is properly used by ESC/POS :author: `Patrick Kanzler <patrick.kanzler@fablab.fau.de>`_ :organization: `python-escpos <https://github.com/python-escpos>`_ :copyright: Copyright (c) 2016 Patrick Kanzler :license: MIT """ from nose.tools import raises import escpos...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
-4,230,022,437,427,917,300
import six import escpos.printer as printer from escpos.constants import TXT_NORMAL, TXT_STYLE, SET_FONT from escpos.constants import TXT_SIZE # Default test, please copy and paste this block to test set method calls def test_default_values(): instance = printer.Dummy() instance.set() expected_sequenc...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
4,783,461,750,514,812,000
#!/usr/bin/env python """ Image tests- Check that images from different source formats are correctly converted to ESC/POS column & raster formats. :author: `Michael Billington <michael.billington@gmail.com>`_ :organization: `python-escpos <https://github.com/python-escpos>`_ :copyright: Copyright (c) 2016 `Michael Bil...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
-4,467,554,894,755,001,300
#!/usr/bin/python """tests for panel button function :author: `Patrick Kanzler <patrick.kanzler@fablab.fau.de>`_ :organization: `python-escpos <https://github.com/python-escpos>`_ :copyright: Copyright (c) 2016 `python-escpos <https://github.com/python-escpos>`_ :license: MIT """ import escpos.printer as printer d...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
-8,930,760,248,319,078,000
import six import escpos.printer as printer from escpos.constants import GS def test_cut_without_feed(): """Test cut without feeding paper""" instance = printer.Dummy() instance.cut(feed=False) expected = GS + b'V' + six.int2byte(66) + b'\x00' assert(instance.output == expected)
python-escpos/python-escpos
535
Python
constants.rst
text/plain
-7,600,016,127,120,299,000
#!/usr/bin/python # -*- coding: utf-8 -*- """tests for the non-native part of qr() :author: `Patrick Kanzler <patrick.kanzler@fablab.fau.de>`_ :organization: `python-escpos <https://github.com/python-escpos>`_ :copyright: Copyright (c) 2016 `python-escpos <https://github.com/python-escpos>`_ :license: MIT """ impor...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
8,695,044,394,095,764,000
#!/usr/bin/python import escpos.printer as printer import pytest @pytest.fixture def instance(): return printer.Dummy() def test_soft_barcode_ean8(instance): instance.soft_barcode("ean8", "1234") def test_soft_barcode_ean8_nocenter(instance): instance.soft_barcode("ean8", "1234", center=False)
python-escpos/python-escpos
535
Python
constants.rst
text/plain
596,092,055,490,086,800
#!/usr/bin/python # -*- coding: utf-8 -*- """tests for the magic encode module :author: `Patrick Kanzler <patrick.kanzler@fablab.fau.de>`_ :organization: `python-escpos <https://github.com/python-escpos>`_ :copyright: Copyright (c) 2016 `python-escpos <https://github.com/python-escpos>`_ :license: MIT """ import py...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
-1,910,306,052,007,714,300
#!/usr/bin/python """very basic test cases that load the classes :author: `Patrick Kanzler <patrick.kanzler@fablab.fau.de>`_ :organization: `python-escpos <https://github.com/python-escpos>`_ :copyright: Copyright (c) 2016 `python-escpos <https://github.com/python-escpos>`_ :license: MIT """ import escpos.printer as...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
-7,852,153,827,620,509,000
#!/usr/bin/python import escpos.printer as printer from escpos.capabilities import Profile, BARCODE_B from escpos.exceptions import BarcodeTypeError, BarcodeCodeError import pytest @pytest.mark.parametrize("bctype,data,expected", [ ('EAN13', '4006381333931', b'\x1ba\x01\x1dh@\x1dw\x03\x1df\x00\x1dH\x02\x...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
5,103,487,404,884,939,000
#!/usr/bin/python import escpos.printer as printer from escpos.exceptions import CashDrawerError import pytest def test_raise_CashDrawerError(): """should raise an error if the sequence is invalid. """ instance = printer.Dummy() with pytest.raises(CashDrawerError): # call with sequence that i...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
-5,764,068,517,118,490,000
from nose.tools import assert_raises from escpos.printer import Dummy def test_line_spacing_code_gen(): printer = Dummy() printer.line_spacing(10) assert printer.output == b'\x1b3\n' def test_line_spacing_rest(): printer = Dummy() printer.line_spacing() assert printer.output == b'\x1b2' de...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
5,316,616,200,875,841,000
#!/usr/bin/python """tests for line display :author: `Patrick Kanzler <patrick.kanzler@fablab.fau.de>`_ :organization: `python-escpos <https://github.com/python-escpos>`_ :copyright: Copyright (c) 2017 `python-escpos <https://github.com/python-escpos>`_ :license: MIT """ import escpos.printer as printer def test_f...
python-escpos/python-escpos
535
Python
constants.rst
text/plain
-3,669,681,068,453,013,500
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
189