Saravanan666/pypi-org huggingface dataset:
Package: tcolorpy
tcolorpySummaryInstallationInstallation: pipInstallation: condaUsageLibrary usageCLI usageDependenciesSummarytcolopy is a Python library to apply true color for terminal text.InstallationInstallation: pippip install tcolorpyInstallation: condaconda install -c conda-forge tcolorpyUsageLibrary usageSample Code:fromtcolorpyimporttcolorprint(tcolor("tcolopy example",color="#ee1177",styles=["bold","italic","underline"]))Output:You can set the followingtcolorarguments:color/bg_colorcolor names ("red","green", etc.) or color code ("#RRGGBB")styles"bold","italic", etc.Other examplesApply true color and styles to text:example source codeYou can also specify colors by name:example source codeCLI usagetcolorpycan be used via CLI:$ python3 -m tcolorpy "tcolopy example" -c "#ee1177" -s bold,italic,underlineCommand helpusage: __main__.py [-h] [-c COLOR] [-b BG_COLOR] [-s STYLES] [--encode ENCODE] string

positional arguments:
  string                string to apply styles.

options:
  -h, --help            show this help message and exit
  -c COLOR, --color COLOR
                        specify a color code (#XXXXXX) or a name. valid names are: black, red, green, yellow, blue, magenta, cyan, white, lightblack, lightred, lightgreen, lightyellow, lightblue, lightmagenta, lightcyan, lightwhite
  -b BG_COLOR, --bg-color BG_COLOR
                        specify a background color code (#XXXXXX) or a name. valid names are: black, red, green, yellow, blue, magenta, cyan, white, lightblack, lightred, lightgreen, lightyellow, lightblue, lightmagenta, lightcyan, lightwhite
  -s STYLES, --styles STYLES
                        specify a comma-separated style. valid values are: bold, dim, italic, underline, blink, invert, strike
  --encode ENCODE       output a text encoded with the specified encodingDependenciesPython 3.7+
no external dependencies.
Package: tcomapi
TcomapiBundle for getting open data from some KZ sites.KGDRetrieving information on tax payments by Kazakhstan companies.Featuresprogressbar with additional infomax output file size limitationUsage$ kgd --help
usage: kgd [-h] [-t TIMEOUT] [-f FSIZE] token fpath date_range


positional arguments:
  token                 KGD API secret token
  fpath                 input file with BINs
  date_range            date range for which we retrieve data

optional arguments:
  -h, --help            show this help message and exit
  -w TIMEOUT, --timeout TIMEOUT
                        server connect and failure timeout (default: 3.0)
  -f FSIZE, --fsize FSIZE
                        size limit for output file (default: 50000000)Usage exampleskgd sdfgggw5gsdg4g4g4435dg /home/user/bins.txt -t 3  2018-01-01:2019-01-01 -f 500000000Note: In this example secret token is fake. To run command successfully
you need get them from KGD government agency.InstallationPython 3.6.1+ required.From PyPI:pip install kgdSGOVRetrieving information on Kazakhstan by business ID(IIN/BIN).Featuresprogressbar with additional infomax output file size limitationUsage
Package: t-common
Thoughtful common packagesInstallationpython3 -m virtualenv venv
source venv/bin/activate
pip install t-commonUsing Packagesrpaframework==28.2.0
ta-bitwarden-cli==0.12.0
thoughtful>=2.2,<3.0
python-docx==0.8.11
retry==0.9.2
pre-commit==2.17.0
pandas==2.1.3
pillow==10.2.0
Office365-REST-Python-Client==2.5.2
setuptools>=65.5.1
google-api-python-client==2.108.0
google-auth-oauthlib==1.1.0
google-auth-httplib2==0.1.1
ta-sites==0.4.14
openpyxl==3.0.10
numpy==1.26.1
Package: tcompress
TCompressTCompress is a Python package for various data processing operations, including image manipulation, file management, and random value generation.Table of ContentsInstallationUsageDocumentationExamplesContributingLicenseInstallationYou can install TCompress using pip:$pipinstalltcompressUsageTo use TCompress in your Python project, import the relevant module and call its functions. Here are the available modules and their respective functions:Image Module (image.py)The Image module provides functions for working with images.Functions:`add_padding``: Adds padding to an image.`round_corners``: Rounds the corners of an image.`turn_to_square``: Converts an image into a square by adding background color.importtcompress.imageasimageimage.add_padding(image_path,padding_value,color)File Module (manage.py)The File module provides functions for file management operations.Functions:read_lines: Reads lines from a file.count_lines: Counts the number of lines in a file.count_folders: Counts the number of folders in a directory.count_files: Counts the number of files in a directory.get_file_info: Gets information about a file.get_file_name: Gets the name of a file.get_file_extension: Gets the extension of a file.get_file_location: Gets the location of a file.is_file: Checks if a path string correspondsimporttcompress.manageasfilelines=file.read_lines(file_path)Random Module (random.py)The File module provides functions for file management operations.Functions:random_integer: Generates a random integer with n digits.random_string: Generates a random string with n uppercase letters.random_serial: Generates a random serial code with n alphanumeric characters.importtcompress.randomasrandomrandom_integer=random.random_integer(n)Time Module (time.py)The Time module provides functions for working with dates and time.Variables:months: A list of month names.Functions:get_date: Returns the current date in the format "MM/DD/YYYY".get_month: Returns the current month index and name.get_year: Returns the current year as an integer.importtcompress.timeastimecurrent_date=time.get_date()Licensetcompresswas created by Talal El Zeini. It is licensed under the terms
of the MIT license.
Package: tconfpy
‘tconfpy’ is an advanced configuration file parser and validator for
Python programs.  By using ‘tconfpy’, Python programmers can provide
their users with an external configuration file for setting program
options, defining defaults, and so on.  ‘tconfpy’ offloads the
responsibility for parsing and validating a configuration file from
the main application. The Python programmer need only deal
with the results and any errors or warnings generated during the
parsing process.‘tconfpy’ recognizes a rich configuration language and provides a
number of sophisticated programming features including:The ability to breakup large configurations into smaller pieces
via the ‘.include’ directive.Support for string substitution and concatenation throughout the
configuration file via string variables.  Variables may be
locally declared, a reference to a symbol already in the
symbol table, or a reference to an environment variable.A complete set of conditional directives for selective
processing of configuration options. Both existential (“If
variable exists …”) and comparison (“if string equals/does not
equal string …”) forms are provided, as is an ‘.else’
directive.The ability to instantiate program options prior to reading a
configuration file and make them mandatory by declaring those
options as Read-Only.Optional type validation to ensure that a user enters a value
appropriate for boolean, integer, floating point, string, or
complex data.Optional value validation to ensure that a configuration option
is either within a specified range or one of an enumerated set
of possible values.  For configuration options which are string
types, ‘tconfpy’, can optionally specify min/max string lengths
and enumerate a set of legitimate regular expressions that the
string must match.The ability to define an arbitrary number of lexical namespaces.The ability to use the various features of ‘tconfpy’ as a pre-
processor for any other text (including source code for other
programming languages and Python itself) via the ‘.literal’
directive.The ability to “template” classes of variables, thereby predefining
the type and value restrictions for such variables.  This makes
‘tconfpy’ useful as a building block for data validation tools.An optional debug capability which returns detailed information
about each line parsed.Includes a test driver program for learning how to program with
‘tconfpy’ and for debugging and testing your own configuration
files.Comes with approximately 40 pages of documentation including a
Programmer’s API Reference and a User’s Guide to the ‘tconfpy’
configuration language.  Documentation is provided in several
formats including Unix ‘man’, Plain Text, html, pdf, and
Postscript.‘tconfpy’ is a Pure Python module and is platform-independent.
It should work identically on any platform on which Python runs.
Package: tcopy
# tcopy_Do not use this._A direct tail call optimizing decorator for Python.## Examples:```pythonfrom tcopy import tco@tcodef fib(n, x=0, y=1):if n == 0:return xreturn fib(n - 1, y, x + y)```The `tco` decorator will rewrite `fib` into the following atdefinition time:```pythondef fib(n, x=0, y=1):while 1:if n == 0:return xn, x, y = n - 1, y, x + y```## Quirks`tco` uses `inspect.getsource` to grab a function's source code fromdisk. Because of this, the decorator does not work in the Python REPL.
Package: tcp2canopsis
This package provides a connector which listen for events on a TCP port.UsageRun the script on a designated port (8000in this example) and with the URL
of the AMQP server :$ tcp2canopsis -p 8000 -a "amqp://guest:guest@localhost:5672/" -t tokenThen usetelnetto publish events :$ telnet localhost 8000
Trying ::1...
Connected to localhost.
Escape character is '^]'.
token
{"connector": "test", "connector_name": "testname", "event_type": "check", "source_type": "resource", "component": "testcmp", "resource": "testrsrc", "state": 0, "output": "test output"}
{"connector": "test", "connector_name": "testname", "event_type": "check", "source_type": "resource", "component": "testcmp", "resource": "testrsrc", "state": 1, "output": "test output 2"}
{"connector": "test", "connector_name": "testname", "event_type": "check", "source_type": "resource", "component": "testcmp", "resource": "testrsrc", "state": 0, "output": "test output 3"}
Connection closed by foreign host.Or in a JSON file :{"tcp2canopsis":{"port":8000,"amqp":"amqp://guest:guest@localhost:5672/","token":"token"}}And load the file using :$ tcp2canopsis -c path/to/config.jsonInstallationJust type :$ pip install tcp2canopsisOr, to install it in a locally :$ ./makefileThis will create a virtual Python environment in the current folder, and install the dependencies listed byrequirements.txt.
Finally, it will perform apython setup.py install.After executing this script, the connector will be available in the current folder (which is now a virtual Python environment).
Package: tcpb
Python TeraChem Protocol Buffer (TCPB) ClientSee thedocumentationPython client to communicate with TeraChem running in server mode.Client uses C-style sockets for communication and Protocol Buffers for data serialization.RequirementsPython 3.6+InstallationpipinstalltcpbNotesThe original, Python 2.7 compatibletcpbclient built by Stefan Seritan was released as version0.6.0. If you depend upon this original release it can be installed by pegging to its version:pipinstalltcpb==0.6.0All future releases will support Python 3+ and MolSSI's QCSchema for data input/output.
Package: tcpbridge
TCP bridge for data transferRequirementsOnly for testspytestpytest-covInstall/UninstallmakeinstallmakeuninstallExampleimportsocketfromtcpbridgeimportSocketSink,TCPBridgesvr_sock=socket.socket(socket.AF_INET,socket.SOCK_STREAM)svr_sock.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR,1)svr_sock.bind(('localhost',9002))svr_sock.listen(1)cli_sock,_=svr_sock.accept()socket_sink=SocketSink(sock=cli_sock)Single endpoint TCP BridgeIn backgroundbridge=TCPBridge(sink=socket_sink,port_in=9000)bridge.start()...bridge.stop()Dual endpoint TCP BridgeIn foregroundbridge=TCPBridge(sink=socket_sink,port_in=9000,port_out=9001)bridge.start(in_background=False)...bridge.stop()
Package: tcpcan
tcpcanA socketCAN on TCP client/serverUsageusage: tcpcan.py [-h] [--host HOST] [--port PORT] [--serve] [-v] canif

Tunnel SocketCAN on TCP.

positional arguments:
  canif          SocketCAN interface

optional arguments:
  -h, --help     show this help message and exit
  --host HOST    TCP host (default: localhost)
  --port PORT    TCP port (default: 20010)
  --serve
  -v, --verboseServertcpcan vcan0 --serveClienttcpcan vcan0ProtocolThis section describes the protocol used by tcpcan. Every message has a two
byte header containing a prefix (1 byte) and a length (1 byte). The protocol is
big endian if nothing else is stated. A connection always starts with a
protocol version negotiation using the Protocol version message. No other
messages than Protocol version messages must be sent before a version agreement
has been met.Message header| --------------- | ----------------- | --------------------------------- |
| Prefix (1 byte) | Length N (1 byte) | Prefix specific payload (N bytes) |
| --------------- | ----------------- | --------------------------------- |MessagesPrefixFormatDescriptionSupported in versionvIProtocol version1dB*SocketCAN data, 16 B (can_frame) or 72 B (canfd_frame)1Protocol version negotiationA client initiates the negotiation by proposing a protocol version it supports,
typically its highest supported version. The server responds with either the
same version number as an acknowledgement that an agreement has been met or it
proposes a lower version number. If the version number is lowered the
negotiation continue until an agreement is made. If the version reaches 0, no
agreement could be made and the connection is terminated. A communicating party
must not respond to a Protocol version message if it contains the same version
number as the party itself has proposed earlier.
Package: tcpchan
TCPChanTCPChanis a TCP connection multiplexing library that enables working with multiplechannelsin a single TCP connection. TCPChan can boost the efficiency of the short-lived connections by eliminating the overhead of connection setup, especially in high-latency links (e.g. cross-continental links).The core part of the library is decoupled from I/O libraries so it's possible to bring your own I/O library. For convenience, an Asyncio-based protocol implementation is provided for easy integration with Asyncio applications.Warning: TCPChan is built for fun and educational purpose, it is not fully tested, and neither is it widely deployed. Use it at your own risk.GuideWIPInstallationInstall via PippipinstalltcpchanInstall latest version from GitHubgit clone --depth 1 https://github.com/frankurcrazy/tcpchan
cd tcpchan; python setup.py installDependenciespython >= 3.7fpack >= 1.0.0UsageWIPChannelInherittcpchan.core.chan.Channeland implementsdata_receivedcallback.fromtcpchan.core.chanimportChannelclassCustomChannel(Channel):defdata_received(self,data):# Do stuff upon data receptionConnectionCreateServerConnectionorClientConnectioninstance upon connection establishment in server/client. And pass the channel factory to the Connection.Server connection creationfromtcpchan.core.connimportServerConnectionconn=ServerConnection(lambda:CustomChannel())Client connection creationfromtcpchan.core.connimportClientConnectionconn=ClientConnection(lambda:CustomChannel())Eventsfromtcpchan.coreimport(HandshakeSuccess,DataTransmit,ChannelCreated,ChannelClosed)AsyncioTCPChan provides an Asyncio-based protocol implementation so that one can easily integrate TCPChan in their Asyncio applications.For server-side application,TCPChanServerProtocolcan be used, likewise, for client-side application,TCPChanClientProtocolcan be used.importasynciofromtcpchan.aioimportTCPChanServerProtocolfromtcpchan.core.chanimportChannelclassCustomChannel(Channel):defdata_received(self,data):# Do stuff upon data reception...classMyProtocol(TCPChanServerProtocol):def__init__(self,*args,**kwargs):super().__init__(*args,**kwargs)self._channels={}# Mapping for channelsdefhandshake_success(self):# Do something on handshake success...defhandshake_failed(self,reason):# Do something on handshake failure...defchannel_created(self,channel):# Do something on channel creationself._channels[channel.channel_id]=channeldefchannel_closed(self,channel_id):# Do something when a channel is closeddelself._channels[channel_id]loop=asyncio.get_event_loop()# To initialize `Protocol`, channel factory function is required.server=awaitloop.create_server(lambda:MyProtocol(lambda:CustomChannel()),host="localhost",port=9487,start_serving=True,)loop.run_forever()LICENSEBSD
Package: tcpconnected
An interface library for Python that connects to and controls TCP Connected
branded lighting through its unofficial and community documented API. This
library is designed to be used as middleware for projects such as home
automation systems.FeaturesTurn on/off lights connected to gatewayTurn on/off rooms connected to gatewayChange intensity of lights connected to gatewayChange intensity of rooms connected to gatewayWhile this library is able to monitor and control lights connected to a TCP
Connected gateway, it is not yet able to generate its own app token. To do
this, you must use another app or library such as stockmopar’s Connected by
TCP Node.js library to generate a token.
Package: tcp-connector
Connector -- A lightweight network programming tool for PythonConnectoris a lightweight network programming tool for Python 3.Connectorwill greatly simplify Client/Server mode's network programming.Connectorcan help a lot in any situations that need message exchanging. All message communication will become very easy. In detail, it can do following things:Share/Send variables between different threads/processes/programs/computers.Put/Get files/folders to/from different programs on different computers.RPC (Remote Procedure Call)Connectoronly provide 2 classes for user to use:ServerandClient. And these two classes make everything easy. Let's getting start!In addition, You can:find full documentation at:https://connector.readthedocs.io/en/latestfind PyPI index at:https://pypi.org/project/tcp-connectorRelease Note0.0.8Optimize close behavior.0.0.7Reconstruct and optimize all code.0.0.5Support finding default IP on Linux by introducingnetifacesmodule;Support sending lambda function by changing modulecloudpicktodill;Use uuid for session id;Remove unneeded queue after a session finished.0.0.4First stable release
Package: tcp-connectors
ConnectorsLibrary to handle any TCP based connection.FeaturesHandles both persistent and non-peristent connections.Support for both pull and push connections.Super light-weight implementations well suited for IoT applications.Fully asynchronous.Currently available connectorsTCPConnector- This will handle peristent TCP connections.GMQTTConnector- This will handle MQTT connections.ServerConnector- Creates a HTTP server that can handle requests and send responses.LicenseThis project is licensed under theMIT License
Package: tc-pdf
This extension provides preview for PDF.FeaturesGiven a PDF URL return preview image of first pageInstallationPrerequisite: Following system libraries are required:ImageMagickGhostscriptInstall usingpip$pipinstalltc_pdfRegister the extension within Thumbor’s configuration fileCOMMUNITY_EXTENSIONS=['tc_pdf',...]Launch thumbor with the Thumbor Community custom application:$thumbor-atc_core.app.AppUsagetc_pdfhandler route requires/pdf/in URL after all filters but before the resource URL part e.g.http://<thumbor_server>/unsafe/240x240/smart/pdf/localhost:8000/media/document/test.pdfIf you are usinglibthumborto generate URLs then you can use thispatchforCryptoURLclass and then use it like this:from crypto import CryptoURL

crypto = CryptoURL(key='my-security-key')

encrypted_url = crypto.generate(
    width=300,
    height=200,
    smart=True,
    image_url='/path/to/my/pdf_file.pdf',
    pdf=True, # <-- Pass this
)
Package: tcp-h2-describe
tcp-h2-describePython library and CLI for running an HTTP/2 proxy that describes each frameInstallpython3 -m pip install --upgrade tcp-h2-describeUsageFor example, on a machine where there is a local HTTP/2 server running on
port 50051:$ tcp-h2-describe --server-port 50051
Starting tcp-h2-describe proxy server on port 24909
  Proxying server located at localhost:50051
...
$ # OR
$ python -m tcp_h2_describe --server-port 50051
Starting tcp-h2-describe proxy server on port 24909
  Proxying server located at localhost:50051
...Options also exist to customize the port where thetcp-h2-describeproxy
runs as well as the remote server that is being proxied:$ python -m tcp_h2_describe --help
usage: tcp-h2-describe [-h] [--proxy-port PROXY_PORT]
                       [--server-host SERVER_HOST] [--server-port SERVER_PORT]

Run `tcp-h2-describe` reverse proxy server. This will forward traffic to a
proxy port along to an already running HTTP/2 server. For each HTTP/2 frame
forwarded (either client->server or server->client) a description will be
printed to the console explaining what each byte in the frame means.

optional arguments:
  -h, --help            show this help message and exit
  --proxy-port PROXY_PORT
                        The port that will be used for running the "describe"
                        proxy. (default: 24909)
  --server-host SERVER_HOST
                        The hostname for the server that is being proxied.
                        (default: None)
  --server-port SERVER_PORT
                        The port for the server that is being proxied.
                        (default: 80)To use directly from Python codeimporttcp_h2_describeproxy_port=13370server_port=50051tcp_h2_describe.serve_proxy(proxy_port,server_port)# OR: Spawn a thread to avoid blockingimportthreadingserver_thread=threading.Thread(target=tcp_h2_describe.serve_proxy,args=(proxy_port,server_port),)server_thread.start()See example output when proxying anHTTP serverand agRPC server.
Additionally, thetcp-h2-describeproxy supports theproxy protocol.DevelopmentTo work on adding a feature or to run the tests, see theDEVELOPMENT docfor more information on how to get started.Licensetcp-h2-describeis made available under the Apache 2.0 License. For more
details, see theLICENSE.
Package: tcping
一个类似于 ping 的系统工具， 检测在连接 tcp 时候的延迟，
比较正确是反应出网络的延迟情况，毕竟 tcp 用途比较广。虽然和 icmp 的 ping 原理不同，ping 命令也能很大程度上反映出网络的延迟，
但是该矫情还是要矫情一把的。Usagepip install tcping➜  ~ tcping api.github.com
Connected to api.github.com[:80]: seq=1 time=236.44 ms
Connected to api.github.com[:80]: seq=2 time=237.99 ms
Connected to api.github.com[:80]: seq=3 time=248.88 ms
Connected to api.github.com[:80]: seq=4 time=233.51 ms
Connected to api.github.com[:80]: seq=5 time=249.23 ms
Connected to api.github.com[:80]: seq=6 time=249.77 ms
Connected to api.github.com[:80]: seq=7 time=235.82 ms
Connected to api.github.com[:80]: seq=8 time=242.30 ms
Connected to api.github.com[:80]: seq=9 time=248.26 ms
Connected to api.github.com[:80]: seq=10 time=251.77 ms

--- api.github.com[:80] tcping statistics ---
10 connections, 10 successed, 0 failed, 100.00% success rate
minimum = 233.51ms, maximum = 251.77ms, average = 243.40ms呵呵，GFW，66666➜  ~ tcping --help
Usage: tcping [OPTIONS] HOST

Options:
  -p, --port INTEGER      Tcp port
  -c, --count INTEGER     Try connections counts
  -t, --timeout FLOAT     Timeout seconds
  --report / --no-report  Show report to replace statistics
  --help其中这个--report可以生成一个 ascii 的 table，好看一点吧。。。➜  ~ tcping api.github.com -c 3 --report
Connected to api.github.com[:80]: seq=1 time=237.79 ms
Connected to api.github.com[:80]: seq=2 time=237.72 ms
Connected to api.github.com[:80]: seq=3 time=258.53 ms

+----------------+------+-----------+--------+--------------+----------+----------+----------+
|      Host      | Port | Successed | Failed | Success Rate | Minimum  | Maximum  | Average  |
+----------------+------+-----------+--------+--------------+----------+----------+----------+
| api.github.com |  80  |     3     |   0    |   100.00%    | 237.72ms | 258.53ms | 244.68ms |
+----------------+------+-----------+--------+--------------+----------+----------+----------+END其实写这个主要是为了测试搭建翻墙 VPS 的 tcp 延迟。。。