Saravanan666/pypi-org huggingface dataset:
Package: xt-nlp
xt-nlpDescriptionThis repo contains common NLP pre/post processing functions, loss functions, metrics, and helper functions.InstallationFrom PyPI:pipinstallxt-nlpFrom source:gitclonehttps://github.com/XtractTech/xt-nlp.git
pipinstall./xt-nlpUsageSee specific help on a class or function usinghelp. E.g.,help(SESLoss).Defining SES Metrics and Lossfromxt_nlp.metricsimportSESF1fromxt_nlp.metricsimportSESLosseval_metrics={'f1':SESF1(threshold=0.8)}loss_fn=SESLoss()Read BRAT annotations for sequence extraction into data loaderfromxt_nlp.utilsimportget_brat_examples,split_examples,get_features,build_ses_dataloader# tokenizer =# max_sequence_length =# doc_stride =# class_dict = Dictionary mapping classname ==> list of classes to group into this class# classes =# batch_size =# workers =examples=get_brat_examples(datadir='./data/datadir',classes=classes)train_examples,val_examples=split_examples(examples,train_prop=.9,seed=4000)train_features=get_features(examples=train_examples,tokenizer=tokenizer,all_ans_types=classes,max_seq_len=max_sequence_length,doc_stride=doc_stride,mode='train')train_loader=build_ses_dataloader(train_features,classes,class_dict,batch_size=batch_size,workers=workers,max_seq_length=max_sequence_length,shuffle=True)
Package: x-to-nwb
Converting ABF/DAT files to NWBThe scriptx-to-nwballows to convert ABF/DAT files to NeurodataWithoutBorders v2 files.For programmatic use the functionconvertis designed as public interface.fromx_to_nwbimportconverthelp(convert)ABF specialitiesAs of 9/2018 PClamp/Clampex does not record all required amplifier settings.
For gathering these please see themcc_get_settings.pyscript in the ipfx
repository which gathers all amplifier settings from all active amplifiers and
writes them to a file in JSON output.In case you don't have a JSON settings file pass--no-searchSettingsFileto avoid warnings.By default all AD and DA channels are outputted into the NWB file. You can
select to only export some AD channels withx-to-nwb--includeChannelABCD2018_03_20_0000.abfOr to discard some AD channels usex-to-nwb--discardChannelABCD2018_03_20_0000.abfRequired input filesABF files acquired with Clampex/pCLAMP.If custom waveforms are used for the stimulus protocol, the source ATF files are required as well.ExamplesConvert a single filex-to-nwb2018_03_20_0000.abfConvert a single file with overwrite and use a directory for finding custom waveformsSome acquired data might use custom wave forms for defining the stimulus
protocols. These custom waveforms are stored in external files and don't reside
in the ABF files. We therefore allow the user to pass a directory where
these files should be searched. Currently only custom waveforms in ATF (Axon
Text format) are supported.x-to-nwb--overwrite--protocolDirprotocols2018_03_20_0000.abfConvert a folder with ABF filesThe following command converts all ABF files which reside insomeFolderto a single NWB file.x-to-nwb--fileType".abf"--overwritesomeFolderDisabling compressionThe following command disables compression of the HDF5 datasets (intended for debugging purposes).x-to-nwb--no-compression2018_03_20_0000.abfDAT specialitiesRequired input filesDAT files acquired with Patchmaster version 2x90.ExamplesConvert a single file creating one NWB file per Groupx-to-nwbH18.28.015.11.12.datConvert a single file creating one NWB file with all Groupsx-to-nwb--multipleGroupsPerFileH18.28.015.11.12.datOutputting DAT/ABF metadata files for debugging purposesx-to-nwb--outputMetadata*.dat*.abf
Package: xtor
xtorxtor is a simple tool for managing Tor instances.InstallationLinuxsudo apt-get install torsudo apt-get install obfs4proxyWindowsDownload and install Tor Expert Bundlehttps://archive.torproject.org/tor-package-archive/torbrowser/12.5a6/tor-expert-bundle-12.5a6-windows-x86_64.tar.gzhttps://archive.torproject.org/tor-package-archive/torbrowser/12.5a6/tor-expert-bundle-12.5a6-windows-i686.tar.gzThen install the python package:pip install xtorUsagefromxtorimportTortor=Tor.startTor(port=9052,control_port=9053,host="127.0.0.1",password="passw0rd",init_msg_handler=print,path="/usr/bin/tor",# optional, primarily for windows)withtor:print(tor.ip)print(tor.client.get("https://api.ipify.org").text)# connect to an existing tor instancetor=Tor(port=9052,control_port=9053,host="127.0.0.1",password="passw0rd",)withtor:print(tor.ip)print(tor.client.get("https://api.ipify.org").text)tor.new_identity(wait=True)# get a new identity and wait for it to be ready (new ip)print(tor.ip)CLIxtor--help
Package: xtpwrapper
===========XTP-Wrapper (Chinese Stock Market Quote and Trade Python API)===========Chinese Stock Market Quote and Trade API by dealer, Python Wrapper C++ Interface.|travis| |appveyor| |codacy| |pypi| |status| |pyversion|Version: v1.1.18.13Platform: Linux 64bit, Windows 64bit, MacOSPython Requirement: x86-64Install=======Before you install xtpwrapper package, you need to make sure you havealready install cython package.>>>pip install cython --upgrade>>>pip install xtpwrapper --upgradeDonate [捐助]============|alipay| |wechat|Contact=======Email: 365504029@qq.com.. |travis| image:: https://travis-ci.org/nooperpudd/xtpwrapper.svg?branch=master:target: https://travis-ci.org/nooperpudd/xtpwrapper.. |appveyor| image:: https://ci.appveyor.com/api/projects/status/cbpvidl5hoocmic3/branch/master?svg=true:target: https://ci.appveyor.com/project/nooperpudd/xtpwrapper/branch/master.. |codacy| image:: https://api.codacy.com/project/badge/Grade/2dd3feb2897c425c9ec725c8be170695:target: https://www.codacy.com/app/nooperpudd/xtpwrapper?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=nooperpudd/xtpwrapper&amp;utm_campaign=Badge_Grade.. |pypi| image:: https://img.shields.io/pypi/v/xtpwrapper.svg:target: https://pypi.python.org/pypi/xtpwrapper.. |status| image:: https://img.shields.io/pypi/status/xtpwrapper.svg:target: https://pypi.python.org/pypi/xtpwrapper.. |pyversion| image:: https://img.shields.io/pypi/pyversions/xtpwrapper.svg:target: https://pypi.python.org/pypi/xtpwrapper.. |alipay| image:: img/alipay.png.. |wechat| image:: img/wechat.jpg
Package: xtr
xallDeveloper GuideSetup# create conda environment$mambaenvcreate-fenv.yml# update conda environment$mambaenvupdate-nbnx--fileenv.ymlInstallpipinstall-e.# install from pypipipinstallbnxnbdev# activate conda environment$condaactivatebnx# make sure the bnx package is installed in development mode$pipinstall-e.# make changes under nbs/ directory# ...# compile to have changes apply to the bnx package$nbdev_preparePublishing# publish to pypi$nbdev_pypi# publish to conda$nbdev_conda--build_args'-c conda-forge'$nbdev_conda--mambabuild--build_args'-c conda-forge -c dsm-72'UsageInstallationInstall latest from the GitHubrepository:$pipinstallgit+https://github.com/dsm-72/bnx.gitor fromconda$condainstall-cdsm-72bnxor frompypi$pipinstallbnxDocumentationDocumentation can be found hosted on GitHubrepositorypages. Additionally you can find
package manager specific guidelines oncondaandpypirespectively.
Package: xtrace
This module printsfunction traceto stdout from the moment it is called:import xtrace
xtrace.start()
...
xtrace.stop()It is also possible to callxtraceas module from the command line:python -m xtrace <script.py> [param] ...or use as a standalone script:python xtrace.py <script.py> [param] ...The output format is inspired by Xdebug function traces and will likely to
merge with ithttp://xdebug.org/docs/execution_traceto be compatible with
PHP inspection tools. But I didn’t have enough time to polish it, so feel
free to send a patch if you know how to bring them closer.This code is released into public domain. Enjoy!History0.5 - fix major crash when function in executed script tried to read
variables in its global scope0.4 - added beep function which beeps in DEBUG mode when excited0.3 - fix AttributeError when running from console (issue #2)0.2 - added version info, support running from command line, moved main
functions into a class to isolate used variables in local namespace0.1 - initial releaseCreditsAmaury Forgeot d’Arc, for valuable insight into Python internalsDebuggingTo see various internal events thatxtraceproduces on top of standard
data provided by Python, enable DEBUG option:import xtrace
xtrace.DEBUG = TrueThis will callbeepfunctiton for every interesting event. Feel free to
override it (monkeypatch) with your own to filter messages, forward, etc.Known Python BugsPython bugs affecting trace output in unexpected way:http://bugs.python.org/issue15005(Python 2, Linux only)captured stdout from subprocess call becomes corrupted
under a trace function that prints to the screen
Package: xtraceback
XTraceback is an extended Python traceback formatter with support for variable
expansion and syntax highlighting.ExamplesAs a context manager - the stdlib traceback module is monkey patched:>>> import sys
>>> import traceback
>>> import xtraceback
>>>
>>> def some_func():
...     some_var = 2*2
...     raise Exception("exc")
>>>
>>> with xtraceback.StdlibCompat():
...     try:
...         some_func()
...     except:
...         traceback.print_exc(file=sys.stdout) #doctest: +ELLIPSIS +REPORT_NDIFF
Traceback (most recent call last):
  File "<doctest README.rst[...]>", line 3, in <module>
    1 with xtraceback.StdlibCompat():
    2     try:
--> 3         some_func()
              g:some_func = <function some_func at 0x...>
              g:sys = <module 'sys' (built-in)>
              g:traceback = <module 'traceback' from='<stdlib>/traceback.pyc'>
              g:xtraceback = <package 'xtraceback' from='xtraceback'>
    4     except:
    5         traceback.print_exc(file=sys.stdout) #doctest: +ELLIPSIS +REPORT_NDIFF
  File "<doctest README.rst[...]>", line 3, in some_func
    1 def some_func():
    2     some_var = 2*2
--> 3     raise Exception("exc")
          some_var = 4
Exception: excAs a sys.excepthook:>>> xtraceback.compat.install_sys_excepthook()
>>> print sys.excepthook #doctest: +ELLIPSIS
<bound method StdlibCompat.print_exception of <xtraceback.stdlibcompat.StdlibCompat object at 0x...>>
>>> raise Exception("exc") #doctest: +ELLIPSIS
Traceback (most recent call last):
  File "<stdlib>/doctest.py", line 1231, in __run
    compileflags, 1) in test.globs
  File "<doctest README.rst[...]>", line 1, in <module>
    raise Exception("exc") #doctest: +ELLIPSIS
Exception: excBy itself:>>> try:
...     raise Exception("exc")
... except:
...     print xtraceback.XTraceback(*sys.exc_info(), color=False) #doctest: +ELLIPSIS
Traceback (most recent call last):
  File "<doctest README.rst[...]>", line 2, in <module>
    1 try:
--> 2     raise Exception("exc")
          g:some_func = <function some_func at 0x...>
          g:sys = <module 'sys' (built-in)>
          g:traceback = <module 'traceback' from='<stdlib>/traceback.pyc'>
          g:xtraceback = <package 'xtraceback' from='xtraceback'>
    3 except:
    4     print xtraceback.XTraceback(*sys.exc_info(), color=False) #doctest: +ELLIPSIS
Exception: exc
<BLANKLINE>In a sitecustomize module:import xtraceback
xtraceback.compat.install()ConfigurationFor options and their defaults seextraceback.XTraceback’s constructor. When
using stdlib compat thextraceback.StdlibCompatclass has adefaultsdictionary which should be updated with your overrides - the default instance
exists at xtraceback.compat:xtraceback.compat.defaults.update(option=value[, ...])InstallationThe package is on PyPI:pip install xtracebackSyntax highlighting depends on the pygments library:pip install pygmentsNose pluginThe nose plugin is enabled with the–with-xtracebackflag. Seenosetests –helpfor other options.
Package: xtracer
X-TracerMulti Tracing ToolExample 1 for python3 file or python3 consoleip_trace()Example>>fromxtracerimportTracer>>trace=Tracer()>>ip_info=trace.ip_trace('142.250.185.78')>>print(ip_info)IP:142.250.185.78Country:Germanycountrycode:DEregion:HERegionName:HesseCity:FrankfurtamMainzipcode:60313timezone:Europe/BerlinISP:GoogleLLCorg:GoogleLLCas:AS15169GoogleLLClatitude:50.1109longitude:8.68213>>.mac_trace()Example>>fromxtracerimportTracer>>trace=Tracer()>>mac_info=trace.mac_trace('00:11:22:33:44:55')>>print(mac_info)Mac:00:11:22:33:44:55MacVendor:CIMSYSIncPrivate:No>>Example 2 for terminal/cmd~$ python3 -m xtracer=========================__  _______             |\ \/ /_   _|            |>  <  | |              |/_/\_\ |_|              ||X-Tracer By: Anikin Luke |-------------------------|Your Ip: 142.250.185.78=========================|[1] ==> (IP Tracer)[2] ==> (MAC Tracer)[0] ==> (Exit)=========================Select~>Installationpython3 -m pip install xtracerorpip3 install xtracerX-Traceronly supports python3InfoNumber of tracers: 2Tracers list:ip_trace('<target_ip>')mac_trace('<target_mac>')
Package: xtract
Code:https://rolln.de/knoppo/xtractDocumentation:https://docs.rolln.de/knoppo/xtract/masterCoverage:https://coverage.rolln.de/knoppo/xtract/masterPython library providing an API to unpack/decompress and pack/compress directories and files.
It’s a wrapper around the supported archive and compression formats.Supported Archives:Archives arealwaysunpacked to a new directory!rarapplication/rarapplication/x-rarzipapplication/zipapplication/x-ziptarno compression (See usage examples below for an example of adding compression)application/tarapplication/x-tarSupported Compressions:gzapplication/gzipapplication/x-gzipxzapplication/xzapplication/x-xzbz2application/bzipapplication/x-bzipInstallationpipinstallxtractSee thequickstart documentationfor more detailed installation instructions.Usage ExamplesThe convenience functionxtractcan be used to unpack/decompress anything:>>>fromxtractimportxtract>>>xtract('my-directory.tar.gz')'/home/<user>/my-directory.tar'Use theallswitch to loop untilFileTypeNotSupportedis raised:>>>xtract('my-directory.tar.gz',all=True)'/home/<user>/my-directory'Compress a file:>>>fromxtractimportbz2>>>bz2('my-file.txt',delete_source=True)'/home/<user>/my-file.txt.bz2'Every function returns the destination (if successful) to chain them:This creates an intermediate.tarfile! Usedelete_source=Trueto delete it afterwards.>>>fromxtractimporttar,gzip>>>gzip(>>>tar('my-directory',['file1.txt','file2.txt']),>>>delete_source=True>>>)'/home/<user>/my-directory.tar.gz'See themanualfor more examples.LicenseCopyright (c) 2017 Mathias StelzerThis program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
Package: xtracto
Xtracto Web Development FrameworkeXtensible, Configurable, and Reusable Automation Component Tool and Organizerfor html through pypxXtracto is a lightweight web development framework designed to simplify the process of creating dynamic web pages using Python.This module is a parser for pypx (custom markup language) to htmlreadpypx.mdto understand the custom markup languageFeaturesParser Class:Easily parse and transform content using theParserclass.Automatic Server Setup:Use theAppclass for hassle-free server setup with FastAPI and Uvicorn.Testing Support:Conduct tests on your content or files using theTestsclass.It is recommended that you use python 3.9 (as of 3rd january 2024) for best compatibilityInstallationpip install xtractoUsage1. Parser ClassInitialize theParserclass with the content or file path:Example with contentfromxtractoimportParsercontent="Your content here"parser=Parser(content=content)Example with a file pathfromxtractoimportParserfile_path="path/to/your/file.pypx"parser=Parser(path=file_path)2. Automatic Server SetupUse theAppclass for automatic server setup:fromxtractoimportAppapp=App()3. CompilationCompile non-dynamic pages to HTML:ExamplefromxtractoimportParserparser=Parser()parser.compile(start_path_for_map="/")Configurationproject root is determined using the presence ofxtracto.config.pyit must be present otherwise will raise error.Paths in the pypx files are relative to the project root.Paths in the config file are relative to the project root.The config file can be empty.Customize project-specific configurations in thextracto.config.pyfile. Update the following parameters:modules_dir: Directory for modules (default: "xtractocomponents").pages_dir: Directory for pages (default: "xtractopages").strip_imports: Whether to strip imports (default: True).raise_value_errors_while_importing: Whether to raise value errors during imports (default: True).
Package: xtractr
xTractrPurposexTractr is a repository of all extraction-related functions that I've had to use for varying projects - generalized to be able to be useful across any range of tasks. Some of the extraction mechanisms are genuinely involved and are useful, others are simply 2 line functions meant to more clearly represent abstractions provided by packages and services like Python-Docx, Selenium, and AWS. The goal of xTractr is to make a variety of disparate 'extraction-related' tasks much more human-readable and simpler to reference in an IDE with autocomplete than having to lookup a method everytime you want to do something.Future WorkRight now, xTractr is kind of barebones - I plan on diversifying some of its functionality and continuing to experiment with effective ways to communicate the purpose of varying packages. Let me know if there's a type of job that I missed as I expand its scope.
Package: xtract-sdk
Xtract SDK v0.0.5Packaging: Creating file group objects for downstream data packaging.Here we have a number of data elements that need to be defined.Group: a collection of files and extractor to be executed on the collection of files. Groups need not have mutually exclusive
sets of files. A group is also intitialized with an empty metadata dictionary.from xtract_sdk.packagers import Group, Family, FamilyBatchgroup1 = Group(files=[{'path': 12388550508, 'mdata': {}}], parser='image'}group2 = Group(files=[{'path': 14546663235, 'mdata': {}}], parser='image'}Family: a collection of groups such that all files in the group are mutually exclusive. This grouping is useful for
parallelizing the download and extraction of separate groups that may contain the  same files. You can easily add Group
objects to a family as follows:fam = Family()fam.add_group(group1)fam.add_group(group2)FamilyBatch: If the number of groups in a family is generally small, you may want to batch the families to increase application
performance. In order to do this, you may add any number of families to a FamilyBatch that enables users to iterate
over families. The family_batch can be directly read by the downloader that will batch-fetch all files therein.fam_batch=FamilyBatch()fam_batch.add_family(fam)Downloaders: coming soon!
Package: xtracture
Xtracture: Open Source Document Content Extractuion LibraryXtracture is an open source library designed to efficiently extract arbitrary elements from documents.FeaturesNatural language rule creation using LLMsSwitchable OCR engines for optimized perfomance and accuracyprerequirementsOpenAI API Key (for LLM rule creation)Installationpip install -U xtractureUsageUse Google Cloud Vision APIGoogle CLoud Vision Credentials must be correctly configured.seeexamples/google_cloud_vision_example.py.Use TesseractTesseract must be installed beforehand.seeexamples/tesseract_example.py.Use only GPT ExtractorYou can input OCR-processed text file.
seeexamples/lambda_example.py.LicenseXtracture is released under the MIT License.
Package: xtrain
XTRAIN: a tiny library for trainingFlaxmodels.Design goals:Help avoiding boiler-plate codeMinimal functionality and dependencyAgnostic to hardware configuration (e.g. GPU->TPU)General workflowStep 1: define your modelclass MyFlaxModule(nn.Module):
  def __call__(self, x):
    ...Step 2: define loss functiondef my_loss_func(**kwargs):
    model_out = kwargs["preds"]
    labels = kwargs["labels"]
    loss = ....
    return lossStep 3: create an iterator that supplies training datamy_data = itertools.cycle(
    zip(sequence_of_inputs, sequence_of_labels)
)Step 4: train# create and initialize a Trainer object
trainer = xtrain.Trainer(
  model = MyFlaxModule(),
  losses = my_loss_func,
)
trainer.initialize(my_data, tx=my_optax_optimizer)

train_iter = trainer.train(my_data) # returns a python iterator

# iterate the train_iter trains the model
for step in range(train_steps):
    avg_loss = next(train_iter)
    if step // 1000 == 0:
        print(avg_loss)
        trainer.reset()Full documentationhttps://jiyuuchc.github.io/xtrain/
Package: xtralien
pyxtralienThis module is a simple interface to Ossila's Source Measure Unit.DescriptionXtralien is an open-source project from the Engineers atOssilato allow control of their equipment easily and Pythonically.
It is based on CLOI, the Command Language for Ossila Instruments.InstallationUsingpip:pipinstallxtralienIf you want to control the equipment using USB you will also need to installpySerial.UsageBelow is a simple example of taking a measurement using the library.importtimefromxtralienimportDevicecom_port='com5'channel='smu1'# Connect to the Source Measure Unit using USBwithDevice(com_port)asSMU:# Turn on SMU 1SMU[channel].set.enabled(1,response=0)# Set voltage, measure voltage and currentvoltage,current=SMU[channel].oneshot(set_v)[0]# Print measured voltage and currentprint(f'V:{voltage}V; I:{current}A')# Reset output voltage and turn off SMU 1SMU[channel].set.voltage(0,response=0)time.sleep(0.1)SMU[channel].set.enabled(False,response=0)For more documentation examples see ourprogramming guide.
Package: xtreme-vision
Xtreme-VisionGo to PyPI page>HereThis is the Official Repository of Xtreme-Vision. Xtreme-Vision is a High Level Python Library which is built with simplicity in mind for Computer Vision Tasks, such as Object-Detection, Human-Pose-Estimation, Segmentation Tasks, it provides the support of a list of state-of-the-art algorithms, You can Start Detecting with Pretrained Weights as well as You can train the Models On Custom Dataset and with Xtreme-Vision you have the Power to detect/segment only the Objects of your interestCurrently, It Provides the Solution for the following Tasks:Object DetectionPose EstimationObject SegmentationHuman Part SegmentationFor Detection with pre-trained models it provides:RetinaNetCenterNetYOLOv4TinyYOLOv4Mask-RCNNDeepLabv3+ (Ade20k)CDCL (Cross Domain Complementary Learning)For Custom Training It Provides:YOLOv4TinyYOLOv4RetinaNet with (resnet50, resnet101, resnet152)If You Like this Project, Sponser it hereDependencies:tensorflow >= 2.3.0kerasopencv-pythonnumpypillowmatplotlibpandasscikit-learnscikit-imageimgauglabelme2cocoprogressbar2scipyh5pyconfigobjGet Started:!pipinstallxtreme-visionFor More Tutorials of Xtreme-Vision, ClickHereYOLOv4ExampleImage Object DetectionUsingYOLOv4fromxtreme_vision.DetectionimportObject_Detectionmodel=Object_Detection()model.Use_YOLOv4()model.Detect_From_Image(input_path='kite.jpg',output_path='./output.jpg')fromPILimportImageImage.open('output.jpg')
Package: xtrf-api
XTRF Home Portal API enables you to perform operations on Projects, Quotes, Customers, Vendors etc. as a XTRF Home Portal user. &lt;br&gt;The documentation is generated from OpenAPI specification 3.0 available &lt;a href&#x3D;&quot;/home-api/openapi.json&quot;&gt;here&lt;/a&gt; &lt;br&gt;   The API client/consumer code may be easily generated in 60+ programming languages using an open source code generator available at the time of writing this documentation at &lt;a href&#x3D;&#x27;https://editor.swagger.io/&#x27;&gt;https://editor.swagger.io/&lt;/a&gt; Thank you for using XTRF Application Programming interface (XTRF API). By using the API you agree to the terms below. If you disagree with any of these terms, XTRF does not grant you a license to use the XTRF API. XTRF reserves the right to update and change these terms from time to time without a prior notice of API users. You can always find the most recent version of these terms here:   # noqa: E501