Saravanan666/pypi-org huggingface dataset:
Package: txtelegraf
DescriptionA TCP/UDP Telegraf/InfluxDB client for Twisted using the Influx Line
Format.Tested with Telegraf 1.0.1 and Twisted 15.1.0 on Python 2.7.10.Please let me know success/failures testing with other versions of
Telegraf/Influx, Twisted, and Python.How ToAdd the following to your Telegraf config.# Generic TCP listener
[[inputs.tcp_listener]]
service_address = ":8094"
allowed_pending_messages = 10000
max_tcp_connections = 250
data_format = "influx"

# Generic UDP listener
[[inputs.udp_listener]]
service_address = ":8092"
allowed_pending_messages = 10000
data_format = "influx"

# This output is good for testing. Point it at Influx DB otherwise!
[[outputs.file]]
files = ["stdout", "metrics.out"]
data_format = "influx"Run telegraftelegraf -config telegraf.confClone the repo and run the examplegit clone https://github.com/offero/txtelegraf.git
cd txtelegraf
pip install .
python examples/client.py
Package: txTemplate
txTemplate provides adapters for a few popular template engines
to make them easily callable and usable within Twisted Web.txTemplate uses zope.interface to provide a consistent
loader and template interface for every template engine.Supported Template EnginesClearSilverGenshiJinja2Getting StartedAll you really need to do to use txTemplate in twisted is:import itcreate a loader pointed at your template directoryload a template with said loadercall template.render, attach callbacks to the rendered deferred (if desired) and return the deferred from and of your twisted.web.resource.Resource render_* methods.Here’s a code sample of a Twisted Web resource that uses txTemplate
to render a lovely Genshi template to say Hello World in HTML:import os

from twisted.application import internet
from twisted.internet import reactor
from twisted.web import resource
from twisted.web import server

import txtemplate


TEMPLATE_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)),
                            "templates")


class HelloWorld(resource.Resource):
    def __init__(self):
        resource.Resource.__init__(self)
        self.loader = txtemplate.GenshiTemplateLoader(TEMPLATE_DIR)

    def getChild(self, name, request):
        return self

    def render_GET(self, request):
        template_name = "hello.xhtml"
        template = self.loader.load(template_name)
        context = {"greeting": "Hello",
                "greetee": "World"}

        def cb(content):
            request.write(content)
            request.setResponseCode(200)
            request.finish()

        d = template.render(**context)
        d.addCallback(cb)
        return server.NOT_DONE_YET


site = server.Site(HelloWorld())
reactor.listenTCP(8888, site)
reactor.run()This example is included intxtemplate/examples/txweb.pyand theroot.xhtmltemplate is intxtemplate/examples/templates/root.xhtml.
Package: txtimg
TxtImgA library to easily create text-based images (e.g. images that primarily contain text).This is just a thin layer on top of Pillow.InstallationThis is compatible with Python 3.6 and above.Run the following command to install:$ pip install txtimgExamplefromtxtimgimportTxtImgtext="""What did Sushi A say to Sushi B?What's up B? (WASABI)"""t=TxtImg()img=t.generate_from_text(text)img.save("wasabi.png")ConfigurationYou can specify parameters to theTxtImgconstructor:font - Font used for your text. This is a PIL ImageFont objectbase_img - You can specify a base image to use, rather than the default white background. This is a PIL Image object.horizontal_margin - Horizontal margin in pixelsvertical_margin - Vertical margin in pixelschars_per_row - Number of characters per rowtxt_color - A tuple representing the RGB values, e.g. (255, 0, 0) for red.
Package: txtinstruct
Datasets and models for instruction-tuningtxtinstruct is a framework for training instruction-tuned models.The objective of this project is to support open data, open models and integration with your own data. One of the biggest problems today is the lack of licensing clarity with instruction-following datasets and large language models. txtinstruct makes it easy to build your own instruction-following datasets and use those datasets to train instructed-tuned models.txtinstruct is built with Python 3.7+ andtxtai.InstallationThe easiest way to install is via pip and PyPIpip install txtinstructYou can also install txtinstruct directly from GitHub. Using a Python Virtual Environment is recommended.pip install git+https://github.com/neuml/txtinstructPython 3.7+ is supportedSeethis linkto help resolve environment-specific install issues.ExamplesThe following example notebooks show how to build models with txtinstruct.NotebookDescriptionIntroducing txtinstructBuild instruction-tuned datasets and models
Package: tx.tinymce-linguaplone-root-shortcut
tx.tinymce_linguaplone_root_shortcut====================================Navigate with tinymce to plone site root for language neutral contentWorks for Plone 4.3+ (Should also work on Plone 5)INSTALL:If you are using buildout you can do this:* Add ``tx.tinymce_linguaplone_root_shortcut`` to the list of eggs to install, e.g.:[buildout]...eggs =...tx.tinymce_linguaplone_root_shortcut* Re-run buildout, e.g. with:$ ./bin/buildout -NNavigate to TinyMCE ControlPanel (portal_tinymce/@@tinymce-controlpanel) and add "Root" to Link and Image Shortcuts.Origin reference: http://docs.plone.org/5/en/develop/plone/forms/wysiwyg.html#tinymce-shortcutsChangelog=========1.0-------------------- Initial release
Package: txtmarker
txtmarker: Highlight text in documentstxtmarker highlights text in documents. txtmarker takes a list of (name, text) pairs, scan an input document and creates a modified version with highlights embedded.Current file formats supported:pdfInstallationThe easiest way to install is via pip and PyPIpip install txtmarkerYou can also install txtmarker directly from GitHub. Using a Python Virtual Environment is recommended.pip install git+https://github.com/neuml/txtmarkerPython 3.6+ is supportedExamplesThe examples directory has a series of examples and notebooks giving an overview of txtmarker. See the list of notebooks below.NotebooksNotebookDescriptionIntroducing txtmarkerOverview of the functionality provided by txtmarkerHighlighting with TransformersAI-driven highlighting with TransformersConfigurationThe following section gives an overview of highlighters and available methods/configuration. See the notebooks above for detailed examples.Create a new highlighterfromtxtmarker.factoryimportFactoryhighlighter=Factory.create("pdf")extensionextension:stringType of highlighter to create (i.e. pdf)Optional constructor arguments:formatterformatter:callableFormats queries and input text using this method. Helps with cleanup of files with lots of symbols and other content.chunkschunks:intSplits queries into multiple chunks. This is designed for very long text matches.Highlight texthighlighter.highlight("input.pdf","output.pdf",[("name","text to highlight")])infileinfile:stringFull path to input fileoutfileoutfile:stringFull path to output file, i.e. the highlighted filehighlightshighlights:list of (string, string|regex)List of highlight elements. Each pair has a name (can be None) and text value. The text can either be a string or a regular expression.
Package: txtoJson
The package ‘TxtoJson’ converts a file(.py) specified in the form of path
into java-script object notation format.In order to compute the things
throguh this package, your software must have the following
imperative modules:
1.json module .
2.pathlib module .
So, make sure the above written modules must be in the IDE or in the editor.
In this package, you can generate a json formatteed file by just incepting
the operation of the program using the path pointing out the target file.
Moreover, this package allows you to specify the path of that file which is
generated after the processing.The path should be written in descriptive
manner which means that while entering the path in the terminal, you must
write the complete path in order to demestify the things for the interpreter().
For example:
On windows operating system, the source file ‘m’ is in a folder say ‘x’ which is itself present in another folder ‘y’ and the folder ‘y’ is present in the local disk drive ‘D’
We can write the path by citing the following format in order to facilitate the steps:
path = Path(“d:\y\x\m.type_of_format”)
where:
‘path’ is an object storing the path of a specific file and
‘Path’ is a class embedded in the pathlib module which is
used by an interpreter to get the path of what is going to
be processed in the future.
…
Package: txtoml
txtomlA command-line utility that allows you to quickly and easily copy dependencies from aPoetry pyproject.tomlfile to a pip requirements.txt file.Installation$ pip install txtomlUsage$ txtoml [SOURCE] [OUTPUT]where[SOURCE]is the path to apyproject.tomlfile and[OUTPUT]is the path to arequirements.txtfile (txtoml
will create arequirements.txtfile in the absence of one at the specified path, but thepyproject.tomlfile must
already exist).For example, this:# pyproject.toml[tool.poetry.dependencies]python="^3.9.0"Django="^3.1.5"click="^7.1.2"toml="^0.10.2"pathvalidate="^2.3.2"path="^15.0.1"colorama="^0.4.4"dj-database-url="^0.5.0"after running this:$ txtoml pyproject.toml requirements.txtbecomes this:# requirements.txt

# Generated by txtoml on Fri Jan 29 at 15:48:43 UTC

# Dependencies
Django>=3.1.5, <4.0.0
click>=7.1.2, <8.0.0
toml>=0.10.2, <0.11.0
pathvalidate>=2.3.2, <3.0.0
path>=15.0.1, <16.0.0
colorama>=0.4.4, <0.5.0
dj-database-url>=0.5.0, <0.6.0If you noticed thepythondependency from thepyproject.tomlfile isn't present in therequirements.txtfile,
that's intended behavior. Poetry automatically includes it inpyproject.tomlfiles it generates, but pip will throw
an error if you include it in arequirements.txt, so txtoml excludes it during the copying process.Development DependenciesYou can append the--include-devflag to thetxtomlcommand to include dependencies that are listed as development
dependencies in thepyproject.tomlfile.For example, this:# pyproject.toml[tool.poetry.dependencies]python="^3.9.0"Django="^3.1.5"click="^7.1.2"toml="^0.10.2"pathvalidate="^2.3.2"path="^15.0.1"colorama="^0.4.4"dj-database-url="^0.5.0"[tool.poetry.dev-dependencies]Sphinx="^3.4.3"sphinx-rtd-theme="^0.5.1"sphinx-click="^2.5.0"after running this:$ txtoml pyproject.toml requirements.txt --include-devbecomes this:# requirements.txt

# Generated by txtoml on Fri Jan 29 at 15:52:32 UTC

# Dependencies
Django>=3.1.5, <4.0.0
click>=7.1.2, <8.0.0
toml>=0.10.2, <0.11.0
pathvalidate>=2.3.2, <3.0.0
path>=15.0.1, <16.0.0
colorama>=0.4.4, <0.5.0
dj-database-url>=0.5.0, <0.6.0

# Development dependencies
Sphinx>=3.4.3, <4.0.0
sphinx-rtd-theme>=0.5.1, <0.6.0
sphinx-click>=2.5.0, <3.0.0Additional notestxtoml does not support dependencies hosted on a repository other than thePython Package Index,
nor does it support more complex Poetry dependency specifications such as Python restricted dependencies or environment
markers.Licensetxtoml is released under the MIT License.
Package: txtorcon
txtorcondocs:https://txtorcon.readthedocs.orgorhttp://fjblvrw2jrxnhtg67qpbzi45r7ofojaoo3orzykesly2j3c2m3htapid.onion/code:https://github.com/meejah/txtorcontorsocks git clonegit://fjblvrw2jrxnhtg67qpbzi45r7ofojaoo3orzykesly2j3c2m3htapid.onion/txtorcon.gitMIT-licensed;Python 3.8+, PyPy 7.3.7+;depends onTwisted,AutomatTen Thousand Feettxtorcon is an implementation of thecontrol-specforTorusing theTwistednetworking library forPython.This is useful for writing utilities to control or make use of Tor in
event-based Python programs. If your Twisted program supports
endpoints (liketwistddoes) your server or client can make use of
Tor immediately, with no code changes. Start your own Tor or connect
to one and get live stream, circuit, relay updates; read and change
config; monitor events; build circuits; create onion services;
etcetera (ReadTheDocs).Some Possibly Motivational Example Codedownloadfromtwisted.internet.taskimportreactfromtwisted.internet.deferimportinlineCallbacks,ensureDeferredfromtwisted.internet.endpointsimportUNIXClientEndpointimporttreqimporttxtorconasyncdefmain(reactor):tor=awaittxtorcon.connect(reactor,UNIXClientEndpoint(reactor,"/var/run/tor/control"))print("Connected to Tor version{}".format(tor.version))url=u'https://www.torproject.org:443'print(u"Downloading{}".format(repr(url)))resp=awaittreq.get(url,agent=tor.web_agent())print(u"{}bytes".format(resp.length))data=awaitresp.text()print(u"Got{}bytes:\n{}\n[...]{}".format(len(data),data[:120],data[-120:],))print(u"Creating a circuit")state=awaittor.create_state()circ=awaitstate.build_circuit()awaitcirc.when_built()print(u"  path:{}".format(" -> ".join([r.ipforrincirc.path])))print(u"Downloading meejah's public key via above circuit...")config=awaittor.get_config()resp=awaittreq.get(u'https://meejah.ca/meejah.asc',agent=circ.web_agent(reactor,config.socks_endpoint(reactor)),)data=awaitresp.text()print(data)@reactdef_main(reactor):returnensureDeferred(main(reactor))Try It Now On Debian/UbuntuFor example, serve some files via an onion service (akahidden
service):$sudoapt-getinstall--install-suggestspython3-txtorcon$twistd-nweb--port"onion:80"--path~/public_htmlRead MoreAll the documentation startsin docs/index.rst. Also hosted attxtorcon.rtfd.org.You’ll want to start withthe introductions(hosted at RTD).
Package: txTrader
txTrader - Twisted Trading API ControllertxTrader aims to eliminate the complexity of managing and interacting with multiple trading system APIs, presenting a native python interface.FeaturesCross-Platform securities trading API management engineProvides a trader's eye view of the interaction with the trading system API.Decouples business logic from low-level implementation details of interaction with the broker's APIMaintains internal data structures used to verify each step of the order management / trade execution transaction.Supports fault-tolerance by maintaining a continuous connection with the API in the event of application failure.Frees trading software design from timing and architectural constraints imposed by the API implementation.Built on the mature and reliabletwistedpython networking engine.
Package: txtrader-client
txtrader-clientThis module is a minimum dependency client for the txtrader trading api managerInstallationpip install txtrader-clientConfigurationThe following configuration variables are required:TXTRADER_HOST
TXTRADER_USERNAME
TXTRADER_PASSWORD
TXTRADER_HTTP_PORT
TXTRADER_API_ACCOUNTThere are 2 ways to provide the variables:passed as a python dict into the constructorAPI(config={'TXTRADER_HOST': 'localhost', ...})set as environment variablesBasic Usage:from txtrader_client import API

api = API()

print(api.status())

api.add_symbol('TSLA')

order = api.market_order('TSLA', 100)

print(api.query_positions())
Package: txtrader-monitor
txtrader-monitorThis module is a stand-alone package for the monitor component of the txtrader trading api managerInstallationpip install txtrader-monitorConfigurationThe following configuration variables are required:TXTRADER_HOST
TXTRADER_USERNAME
TXTRADER_PASSWORD
TXTRADER_TCP_PORT
TXTRADER_API_ACCOUNTThere are 2 ways to provide the variables:passed as a python dict into the constructorAPI(config={'TXTRADER_HOST': 'localhost', ...})set as environment variablesExample Codefrom txtrader_monitor import Monitor
import json
from sys import stderr

# print status channel messages to stderr
def status_callback(channel, data):
    stderr.write(f"{channel} {data}\n")
    return True

# print json execution to stdout
def execution_data_callback(channel, message):
    print(message)
    return False 

# init with execution-notification and execution-data options enabled
# attach callback funcitions to channels
# and run until a callback returns False

Monitor(
    options={'execution-data':1},
    callbacks={
        '*': None, 
        'STATUS': status_callback, 
        'EXECUTION_DATA': execution_data_callback
    }
).run()Example Use:(txtrader-monitor) mkrueger@vesta:~/src/txtrader-monitor$ python examples/example.py 2>/dev/null | jq .
{
  "ORDER_ID": "9b94c305-b9-001a-3",
  "ORIGINAL_ORDER_ID": "9b94c305-b9-001a",
  "AVG_PRICE": 125.08,
  "BUYORSELL": "Buy",
  "CURRENCY": "USD",
  "CURRENT_STATUS": "COMPLETED",
  "DISP_NAME": "IBM",
  "EXCHANGE": "NYS",
  "EXIT_VEHICLE": "DEMOEUR",
  "FILL_ID": "1549-1323056",
  "ORDER_RESIDUAL": 25,
  "ORIGINAL_PRICE": 0,
  "ORIGINAL_VOLUME": 100,
  "PRICE": 125.08,
  "PRICE_TYPE": "Market",
  "TIME_STAMP": "202008171148032300",
  "TIME_ZONE": "America/New_York",
  "MARKET_TRD_DATE": "2020-08-17",
  "TRD_TIME": "11:48:02",
  "VOLUME": 75,
  "VOLUME_TRADED": 75,
  "CUSIP": "459200101",
  "ACCOUNT": "REALTICKDEMO.REALTICK.DEMO31.TRADING"
}
Package: txtrpacker
Texture Packer CLI toolTexture Packer (based onhttp://www.executionunit.com/blog/2013/04/12/python-script-to-build-a-texture-page-or-sprite-sheet/by Execution Unit Ltd.)Why pack textures/images?If you're making a game then it's more efficient to tell the hardware:use packed texture 1
    draw primitive 1,2,3,4,5,6
    use packed texture 2
    draw primitive 7,8,9,10than touse texture 1
    draw primitive 1
    use texture 2
    draw primitive 2
    ...The less you do, the more efficient rendering is.If you're making a website then again it's quicker to ask the client browser to load one large image (often called a sprite sheet) than to ask it to load many more smaller textures.AlgorithmThe algorithm we are going to use in called Bin Packing. We want to pack the textures in to one larger texture with the minimum of wasted space. Note that there will always be some wasted space, this is an NP complete problem and Bin Packing just gives you a very good solution not a perfect one2D bin packing works by using the source images to subdivide the destination image creating a tree of 'used' areas of the destination image. This sounds a little complication but it's actually pretty simple.UsageThe python code can be run from the command line to pack a set of PNGs that are in a directory:usage:txtrpacker[-h][-v][-padPAD][-sortSORT][-maxdimMAXDIM][--logLOG]srcdstAutilitytotakeasetofpngimagesandpackthemintoapoweroftwoimagewithpading.Theplacementsofthesourceimagesisprintedtostdoutintheformat:"filename x y x2 y2"positionalarguments:srcsrcdirectorydstdestpngfileoptionalarguments:-h,--helpshowthishelpmessageandexit-venableverbosemode-padPADpaddingoneachsideofthetexture(default:2)-sortSORTsortalgorithmoneofmaxheight,maxwidth,maxarea(default:maxarea)-maxdimMAXDIMmaximumtexturesizepermissable.--logLOGLogginglevel(INFO,DEBUG,WARN)(default:INFO)using the example data you could enter:$txtrpacker-pad4./testartoutput.pngContributingPlease use theissue trackerto submit bug reports and feature requests.Licensepython-txtrpacker is distributed under the3-clause BSD license.MaintainerAndreas Bresser,self@andreasbresser.deAuthors / ContributersAuthors and contributers arelisted on github.
Package: txtsplit
txtsplitTortoise TTS's text splitter, repackaged. All credit goes to the author of Tortoise TTS.Installationpip install txtsplit(0 dependencies)Usagefromtxtsplitimporttxtsplitprint(txtsplit("Long text",desired_length=100,max_length=200))License & CreditsMost of the code was taken fromTortoise TTS.Apache 2.0, like Tortoise TTS.
Package: txts.py
:newspaper: txts.pyPython wrapper for interacting withtxts:hammer_and_wrench: ContributingThis project is very much work in progress, any contributions would be appreciatedIf you make a pull request please use proper labels and follow the contributorCode Of Conduct:arrow_down: Installingpython3 -m pip install -U txts.py:bulb: Simple Exampleimporttxtsinstance=txts.TxtInstance('instance_url')print(instance.Status())try:instance.EditPage('username','secret','content')print('Sucessfully updated page!')except:print('Failed to update page!'):link: LinksTxts Discord:headphones:Txts official instance:globe_with_meridians:
Package: txttk
===============================Text Toolkit: txttk===============================.. image:: https://img.shields.io/travis/jeroyang/txttk.svg:target: https://travis-ci.org/jeroyang/txttk.. image:: https://img.shields.io/pypi/v/txttk.svg:target: https://pypi.python.org/pypi/txttkText Toolkit: manipulate text & regular expressionInstallation and Update------------.. code:: bash$ pip install -U txttkUsage-----Module *corpus*~~~~~~~~~~~~~~~.. code:: pythonfrom txttk import corpusfrom txttk import featurefrom txttk import nlptoolsfrom txttk import reportfrom txttk import retoolsFeatures--------* corpus: Handle the corpus, make random division for cross validation* feature: Extract features from a given token* nlptools: Nature Language Processing tools.* retools: Manipulate Regular Expression strings.License---------* Free software: BSD license* Documentation: https://txttk.readthedocs.org.
Package: txttobitmap
Simple script that converts given file to a bitmap.The project emerged as a result of wondering “How to compress long text into a form that does not look scary for a human being?”. While the generated images are obviously useless, it’s still fun to play around with them.RequirementsPython 3.2+Installationpip install txttobitmapUsagetxttobitmap --mode {palette,grayscale} input outputmode- one of the values:palette- use 16 color palette (see:Windows 16-color palette on Wikipedia) and represent each byte as two pixelsgrayscale- represent each byte as grayscale pixelinput- input file to convertoutput- output file to save the bitmap as
Package: txtulip
Twisted is a production-quality event-driven networking engine with built-in support for many protocols (HTTP, DNS, SSH, IMAP), and a large ecosystem of 3rd party libraries.
Twisted works on both Python 2 and a subset of functionality is supported on Python 3.Asyncio (also known as Tulip) is a new networking event loop implementation included with Python 3.4, whose core networking layer was modeled on Twisted APIs.
Trollius is a backport of Asyncio to Python 2.txtulipaims to allow using both Twisted and Tulip/Asyncio/Trollius in the same Python process by:Running the Twisted reactor on top of Asyncio’s event loop.Alternatively, running the Asyncio event loop on top of Twisted’s reactor (work in progress).Hooking up Deferreds and Futures (planned, no code yet).txtulipis licensed under the MIT open source license, and maintained by Itamar Turner-Trauring.txtulipcan be downloaded athttps://pypi.python.org/pypi/txtulipBugs and feature requests shoudl be filed athttps://github.com/itamarst/txtulipStatusThis package is experimental; pull requests are welcome.Twisted on AsyncioThe vast majority of the Twisted test suite does pass on the new reactor.
The remaining test failures are due to:Fragile or buggy tests in Twisted’s test suite.Bugs in asyncio that do not exist in Twisted, especially in the epoll event loop (lack of support for large values incall_later, lack of support for filesystem files which can happen e.g. when they are hooked up to stdin/out).Potentially, bugs intxtulip.RequirementsPOSIX platformEither: Python 3.4, Twisted 14.0 and trunkOr: Python 2.7, Trollius, and a modern version of TwistedUsageTwisted on AsyncioUsing txtulip is easy.
Before importing any Twisted code, install thetxtulipreactor:from txtulip.reactor import install
install()Seeexamples/echoserv.pyfor an example.On Python 2 (or once trial/twistd command line tools are ported to Python 3), you can also specifytrial--reactor=tuliportwistd--reactor=tulip.
Package: txt-utils
txt-utilsCLI to modify text files.Featuresmerge: merge multiple text files into oneextract-vocabulary: extract unit vocabularytranscribe: transcribe unitsreplace: replace textreplace-line: replace text in a linetrim-units: trim unitsremove-units: remove unitscreate-unit-occurrence-stats: create unit occurrence statisticsRoadmapcreate n-gramsmap unitsmerge units right/leftcalculate units TF-IDFInstallationpipinstalltxt-utils--userUsagetxt-utils-cliCitationIf you want to cite this repo, you can use the BibTeX-entry generated by GitHub (seeAbout => Cite this repository).Taubert, S. (2024). txt-utils (Version 0.0.3) [Computer software]. https://doi.org/10.5281/zenodo.10571273AcknowledgmentsFunded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) – Project-ID 416228727 – CRC 1410