Saravanan666/pypi-org huggingface dataset:
Package: xdelta3
Fast delta encoding in python using xdelta3.RequirementsPython 3.5 or 3.6- it’s 2017, you should be using python 3.6 by now anyway.linux- compilation only tested on ubuntu, might work on other platform.Installationpipinstallxdelta3Usageimportxdelta3value_one=b'wonderful string to demonstrate xdelta3, much of these two strings is the same.'value_two=b'different string to demonstrate xdelta3, much of these two strings is the same.'delta=xdelta3.encode(value_one,value_two)# delta is an unreadable byte string: b'\xd6\xc3 ... \x01different\n\x13F\x00'print(f'New string length:{len(value_two)}, delta length:{len(delta)}')value_two_rebuilt=xdelta3.decode(value_one,delta)ifvalue_two_rebuilt==value_two:print('Boo Ya! Delta encoding successful.')(with xdelta3 installed this code should run “as is”, just copy it into ipython or a file and run)How fast?xdelta3-pythonis a thin wrapper aroundxdelta 3.1.1which is a highly optimised c library for delta calculation and compression.
It can encode a delta and decode it again for 5 small changes in a 5.5 million character string
(the complete works of shakespeare) in around 10ms (or 30ms with the highest compression level). Boom.
Seeperformance.py.
Package: xdelta3-accemate
Fast delta encoding in python using xdelta3.RequirementsPython 3.5 or 3.6- it’s 2017, you should be using python 3.6 by now anyway.linux- compilation only tested on ubuntu, might work on other platform.Installationpipinstallxdelta3Usageimportxdelta3value_one=b'wonderful string to demonstrate xdelta3, much of these two strings is the same.'value_two=b'different string to demonstrate xdelta3, much of these two strings is the same.'delta=xdelta3.encode(value_one,value_two)# delta is an unreadable byte string: b'\xd6\xc3 ... \x01different\n\x13F\x00'print(f'New string length:{len(value_two)}, delta length:{len(delta)}')value_two_rebuilt=xdelta3.decode(value_one,delta)ifvalue_two_rebuilt==value_two:print('Boo Ya! Delta encoding successful.')(with xdelta3 installed this code should run “as is”, just copy it into ipython or a file and run)How fast?xdelta3-pythonis a thin wrapper aroundxdelta 3.1.1which is a highly optimised c library for delta calculation and compression.
It can encode a delta and decode it again for 5 small changes in a 5.5 million character string
(the complete works of shakespeare) in around 10ms (or 30ms with the highest compression level). Boom.
Seeperformance.py.
Package: xdg-base-dirs
xdg-base-dirsxdg-base-dirsis a Python module that provides functions to return paths to
the directories defined by theXDG Base Directory Specification, to save
you from duplicating the same snippet of logic in every Python utility you write
that deals with user cache, configuration, or data files. It has no external
dependencies.:warning:xdg-base-dirswas previously namedxdg, and was renamed due to an
import collision withPyXDG. If you usedxdgprior to the rename, update by changing the dependency name fromxdgtoxdg-base-dirsand the import fromxdgtoxdg_base_dirs.InstallationTo install the latest release fromPyPI, usepip:python3-mpipinstallxdg-base-dirsThe latest release ofxdg-base-dirscurrently implements version 0.8 of the
specification, released on 8th May 2021.In Python projects usingPoetryorPDMfor dependency management, addxdg-base-dirsas a dependency withpoetry add xdg-base-dirsorpdm add xdg-base-dirs. Alternatively, sincexdg-base-dirsis only a single
file you may prefer to just copysrc/xdg_base_dirs/__init__.pyfrom the source
distribution into your project.Usagefromxdg_base_dirsimport(xdg_cache_home,xdg_config_dirs,xdg_config_home,xdg_data_dirs,xdg_data_home,xdg_runtime_dir,xdg_state_home,)xdg_cache_home(),xdg_config_home(),xdg_data_home(), andxdg_state_home()returnpathlib.Pathobjectscontaining the value of
the environment variable namedXDG_CACHE_HOME,XDG_CONFIG_HOME,XDG_DATA_HOME, andXDG_STATE_HOMErespectively, or the default defined in
the specification if the environment variable is unset, empty, or contains a
relative path rather than absolute path.xdg_config_dirs()andxdg_data_dirs()return a list ofpathlib.Pathobjects containing the value, split on colons, of the environment variable namedXDG_CONFIG_DIRSandXDG_DATA_DIRSrespectively, or the default defined in
the specification if the environment variable is unset or empty. Relative paths
are ignored, as per the specification.xdg_runtime_dir()returns apathlib.Pathobject containing the value of theXDG_RUNTIME_DIRenvironment variable, orNoneif the environment variable is
not set, or contains a relative path rather than an absolute path.CopyrightCopyright ©Scott Stevenson.xdg-base-dirsis distributed under the terms of theISC license.
Package: xdg-binary-cache
xdg-binary-cacheThis is a simple library that is used to download a pre-compiled binary
into the$XDG_CACHEdirectory. The library is meant to be used bypre-commithooks that I've authored.HackingYou'll want to install the developer dependencies:pip install -e .[develop]This will includenose2which is the test runner of choice. After you make modifications you can run tests withnose2When you're satisfied you'll want to update the version number and do build-and-upload:python setup.py sdist bdist_wheel
twine upload dist/* --verbose
Package: xdg-cache
Installation$[sudo]pipinstallxdg-cacheExamples>>>importxdg_cache>>>xdg_cache.write("key",'value')>>>xdg_cache.read("key")'value'>>>xdg_cache.path("key")'~/.cache/key'>>>xdg_cache.exists("key")True>>>xdg_cache.rm("key")readme42.com
Package: xdgmenu
A ncurses application menu.The missing stone of my i3 setup.DescriptionA simple and lightweight alternative to Desktop Environment’s
application menu. To be used when you do not remember the name of this
new pdf reader you just installed yesterday night…Dependencies:PyXdg: python’s freedesktop bindings, used in order to generate
the menu.Urwid: a framework build on top of ncurses.Keybindings (case insensitive):j,k,l,m or arrow: Navigate between menu entries.c: Cycle through submenu.e: on an application entry, launch it without exiting.b: on a submenu to go back to the parent menu.InstallationPip:pip install xdgmenusetuptools:python setup.py installConfigurationSince i am using i3, a quick how-to integrate it in nicely. Add to your.i3/config:set $term <your terminall emulator>

bindsym <keybinding> $term -e 'xgmenu' --title xdgmenu
for window [title="xdgmenu"] floating enableRoadmapImplement entry description on ‘d’ keypress (a simple text widget
displaying the programm help).Implement a search mode.Find how to correctly handle logging with urwid application.Separate the urwid logic from the application one.Package and upload to pypi.TestsNo test yet but contribution are welcomed ;)
Package: xdgpspconf
XDGPlatformSuitedProjectCONFigurationGistSource Code RepositoryRepositoryDocumentationBadgesDescriptionHandle platform suited xdg-base toRead configuration from standard locations.supported formats:yamljsontomlconf (ini)Write configuration to most general, writable xdg-locationLocate standard directories:xdg_cachexdg_configxdg_dataxdg_stateXDG SpecificationView xdg specificationshere.What does it doReads standard Windows/POSIX locations, current folder and optionally all ancestors and custom locations for xdg-configurationPlatform-specific locations:Windows Locations: Environment Variable%LOCALAPPDATA%\<PROJECT>or%USERPROFILE%\AppData\Local\<PROJECT>POSIX [Linux/MacOS] Locations: Environment Variable$XDG_CONFIG_HOME/<PROJECT>or$HOME/.config/<PROJECT>Environment-declared variable:%<PROJECT>RC%for Windows or$<PROJECT>for POSIXCustom configuration path: supplied in functionRelative path:$PWD/.<PROJECT>rcAncestors: Any of the parents, till project root or mountpoint, that contains__init__.py, where,project root is the directory that containssetup.cfgorsetup.pymountpoint is checked usingpathlib.Path.driveon windows orpathlib.Path.is_mount()on POSIXLists possible xdg-locations (existing and prospective)XDG_CACHE_HOMEis supported for cache locationsXDG_CONFIG_HOME,XDG_CONFIG_DIRSare supported for configuration locationsXDG_DATA_HOME,XDG_DATA_DIRSare supported for data locationsXDG_STATE_HOME,XDG_STATE_DIRSare supported for state locationsTODOImplementation for following variables:XDG_RUNTIME_DIROtherXDG specifications.Arbitrarily definedXDG_.*environment variables
Package: xdgspec
xdgspec Python packagexdgspecis a simple Python package to provideconvenientaccess to the
variables defined in theXDG Base Directory
Specification.What canxdgspecdo?Withxdgspecyou can:Access theXDG Base Directory variableswith Appropriate FallbacksfromxdgspecimportXDGDirectoryprint(XDGDirectory("XDG_CONFIG_HOME").path)print(XDGDirectory("XDG_CACHE_HOME").path)print(XDGDirectory("XDG_DATA_HOME").path)# ...Use a Context Manager to Automatically Create One of theXDG Base Directoriesif it doesn't existfromxdgspecimportXDGDirectorywithXDGDirectory("XDG_CONFIG_HOME")aspath:print("{}is now definitely existing".format(path))Access and Create Package DirectoriesfromxdgspecimportXDGPackageDirectorywithXDGPackageDirectory("XDG_CONFIG_HOME","mypackage")aspath:# path = ~/.config/mypackageprint("{}is now definitely existing".format(path))Loop Over Existing XDG System DirectoriesfromxdgspecimportXDGDirectories# variable contentprint(XDGDirectories("XDG_CONFIG_DIRS").paths)# generator of actually existing, unique directoriesprint(list(XDGDirectories("XDG_CONFIG_DIRS").existing_paths))InstallationThexdgspecpackage is best installed viapip. Run from anywhere:python3-mpipinstall--userxdgspecThis downloads and installs the package from thePython Package
Index.You may also installxdgspecfrom the repository root:python3-mpipinstall--user.DocumentationDocumentation of thexdgspecpackage can be foundhere on
GitLab.
Package: xdice
xdicexdiceis a lightweight python library for managing dice, scores, and
dice-notation patterns.Parse almost any Dice Notation pattern: ‘1d6+1’, ‘d20’, ‘3d%’, ‘1d20//2 - 2*(6d6+2)’, ‘max(1d4+1,1d6)’, ‘3D6L2’, ‘R3(1d6+1)’, ‘3dF’…etc.API help you to easily manipulate dices, patterns, and scores as objectsA command line tool for conveniencePython Versionsxdicehas been tested withpython 3.4+DocumentationFor more, see theDocumentationExamples:import dice

# Roll simple dices with rolldice()
    # eg: 2d6

score = rolldice(6, amount=2)

# manipulates the score as an integer

print(score)
>> 11
print(score * 2)
>> 22
print(score == 11)
>> True

# Or iterates over the results

for result in score:
    print(result)
>> 5
>> 6

# Parse patterns with roll() and get a PatternScore object

ps = roll("2d6+18")

print(ps)
>> 28
print(ps.format())
>> '[5,6]+18'

    # Use special notations, as selective dice
ps = roll("6D%L2")

print(ps)
>> 315
print(ps.format(verbose=True))
>> '6D%L2(scores:[80, 70, 76, 89], dropped:[2, 49])'CLIRunpython roll.py [options] <expr>usage: roll [-h] [-V] [-n] [-v] expression [expression ...]

Command Line Interface for the xdice library

positional arguments:
  expression      mathematical expression(s) containing dice <n>d
 patterns

optional arguments:
  -h, --help      show this help message and exit
  -V, --version   print the xdice version string and exit
  -n, --num_only  print numeric result only
  -v, --verbose   print a verbose resultCONTRIBUTIONAny opinion / contribution is welcome, please contact us.TO INSTALLpip install xdiceLicensexdiceis under GNU LicenseAuthorOlivier Massot, 2017Tagsdice roll d20 game random parser dices role board
Package: xdiff
# XDiffA CLI tool to compare data structures, files, folders, http responses, etc.## Install```bash$ python setup.py install```## Usage```text$ xdiff -husage: xdiff [-h] [--log-level LOG_LEVEL][--compare-files COMPARE_FILES [COMPARE_FILES ...]][--compare-folders COMPARE_FOLDERS [COMPARE_FOLDERS ...]]A CLI tool to compare data structures, files, folders, http responses, etc.optional arguments:-h, --help            show this help message and exit--log-level LOG_LEVELSpecify logging level, default is INFO.--compare-files COMPARE_FILES [COMPARE_FILES ...]Specify origin file and new file to be compared.--compare-folders COMPARE_FOLDERS [COMPARE_FOLDERS ...]Specify origin folder and new folder to be compared.```
Package: xdi-pandas
# XDI PandasThis modules lets you parse <a href="https://github.com/XraySpectroscopy/XAS-Data-Interchange">XDI</a> files into Pandas dataframes.```pythonfrom xdi_pandas import parsedf = parse('file.chir')print(df.metadata)print(df.metadata['Version'])print(df.metadata['Element']['symbol'])print(df['fit'])print(df['residual'])df2 = parse('file2.lcf')```### FieldsXDI Pandas being developed primarily to help generate in batch graphs forAthena generated files, it supports several Athena extension fields.Fields are defined and validated in [./xdi-pandas/xdi_types.py] following <ahref="https://github.com/XraySpectroscopy/XAS-Data-Interchange/blob/master/specification/dictionary.md">the spec</a>.List of supported fields :```bash$ python -c 'from xdi_pandas.xdi_types import xdi_fields; print("\n".join(xdi_fields.keys()))'Beamline.collimationBeamline.focusingBeamline.harmonic_rejectionBeamline.nameDetector.i0Detector.itDetector.ifDetector.irElement.edgeElement.symbolElement.referenceElement.ref_edgeMono.d_spacingMono.nameFacility.currentFacility.energyAthena.bkg_kweightAthena.clampsAthena.dkAthena.drAthena.e0Athena.edge_stepAthena.eshiftAthena.fixed_stepAthena.importanceAthena.k_rangeAthena.kweightAthena.normalization_rangeAthena.phase_correctionAthena.plot_multiplierAthena.post_edge_polynomialAthena.pre_edge_lineAthena.pre_edge_rangeAthena.r_rangeAthena.rbkgAthena.spline_range_energyAthena.spline_range_kAthena.standardAthena.windowAthena.y_offsetScan.start_timeScan.end_timeScan.edge_energySample.nameSample.idSample.stoichiometrySample.prepSample.experimentersSample.temperature```### Tests`nosetest` is used for the tests.`make test` will run the tests### Repository structureThanks to Kenneth Reitz for is super useful <ahref="https://www.kennethreitz.org/essays/repository-structure-and-python">python module directory structure</a>.
Package: xdisplayinfo
X Display InfoLinux CLI utility to easily get information of the current display, the one the
mouse is hovered over, in systems using X server.DependenciesTested with the following dependencies, installed by default in most Linux
distributions using X:bash:4.3+xdotool:3.20160805+xrandr:1.5.0+grep:3.4+InstallationOption A: Usingpippip3installxdisplayinfoOption B: Adding source script to$PATHgitclonehttps://github.com/lu0/current-x-display-infocdcurrent-x-display-info/src/scripts/
ln-srfxdisplayinfo~/.local/bin/xdisplayinfoUsageRunxdisplayinfo -hto see the list of available options.Get information of the current display on systems using X.

USAGE:
  xdisplayinfo   [OPTION]

OPTIONS:
  --window-id    ID of the active window (decimal).
  --offset-y     Y coordinate of the top-left corner.
  --offset-x     X coordinate of the top-left corner.
  --resolution   Resolution as [width]x[height].
  --height       Resolution along the Y axis.
  --width        Resolution along the X axis.
  --name         Name of the current display.
  --all          All properties.
Package: xdist-scheduling-exclusive
xdist-scheduling-exclusivepytest-xdist scheduler that runs some tests on dedicated workers.Can significantly improve runtime by running long tests on separate
workers.Installationpipinstallxdist-scheduling-exclusivepytest-xdistUsageTo integrate with your pytest setup, update conftest.py as follows:fromxdist_scheduling_exclusiveimportExclusiveLoadScopeSchedulingdefpytest_xdist_make_scheduler(config,log):"""xdist-pytest hook to set scheduler."""returnExclusiveLoadScopeScheduling(config,log)Available Schedulers:ExclusiveLoadSchedulingSchedule tests fromexclusive_tests.txtfirst and on dedicated nodes.ExclusiveLoadFileScheduling: Place tests fromexclusive_tests.txtto uniquescopes.
Other tests are grouped as in--dist loadfile: tests from the same file run on the same node.ExclusiveLoadScopeScheduling: Schedule tests fromexclusive_tests.txtfirst and on dedicated nodes.
Other tests are grouped as in--dist loadfile: tests from the same file run on the same node.Optimizing for Long-Running Tests:To identify long-running tests for the exclusive list, utilize pytest's--durationsoption to sort tests by execution time.DevelopersDo not forget to run. ./activate.sh.To see how tests were scheduled use something likepython -m pytest -n 4 --xdist-report -sScriptsmake helpCoverage reportCodecovCoveralls
Package: xdistutils
Authors:Ralf Schmitt <ralf@systemexit.de>Version:0.2.0Date:2012-02-08Download:http://pypi.python.org/pypi/xdistutilsCode:https://github.com/schmir/xdistutilsTable of ContentsInstallationThe recompress commandThe bdist_msi_fixed commandxdistutils currently provides a recompress command for python’s
setup.py scripts. It uses theadvancecomppackage in order to achieve
better compression on .zip, .egg and .tar.gz files.  Other extensions
for distutils may be included in future xdistutils releases.Installationxdistutils can be installed with pip or easy_install. In order to
enable the recompress command, you’ll have to register the package
with distutils. This can be done by adding the following to
~/.pydistutils.cfg:[global]
command-packages=xdistutilsTheadvancecomppackage must be installed on your system.The recompress commandEvery setup.py script now understands a recompress command, which will
call advzip or advdef on any .zip, .egg or .tar.gz file generated by
previous commands:> python setup.py sdist bdist_egg recompress
running sdist
make: Nothing to be done for `all'.
running check
reading manifest template 'MANIFEST.in'
writing manifest file 'MANIFEST'
creating gevent-1.0dev
creating gevent-1.0dev/c-ares
...
writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt
creating 'dist/gevent-1.0dev-py2.7-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
running recompress
advzip -z -4 dist/gevent-1.0dev.zip
     1300236     1243960  95% dist/gevent-1.0dev.zip
     1300236     1243960  95%
advzip -z -4 dist/gevent-1.0dev-py2.7-linux-x86_64.egg
      366596      354053  96% dist/gevent-1.0dev-py2.7-linux-x86_64.egg
      366596      354053  96%The bdist_msi_fixed commandbdist_msi is used on windows in order to create a .msi
installler. It’s part of standard distutils. Though abugin distutils
makes it impossible to upload those .msi files to the python package
index with the upload command. bdist_msi_fixed provides a workaround:> python setup.py bdist_msi_fixed
running bdist_msi_fixed
running bdist_msi
...
> python setup.py bdist_msi_fixed upload
Package: x-django-app
x-django-appDjango application for all my custom stuffFeatures:Models:XActivityto store all user activities in the projectCREATEEDITDELETERESETDOWNLOADBACKUPRESTOREEXPORTIMPORTPUBLISHACCEPTREJECTENABLEDISABLEACTIVATEDEACTIVATEViews:XListViewfor searching in selected fieldsXCreateViewto record create activity inXActivitymodel, also addcreated_byfor the requested userXUpdateViewto record edit activity inXActivitymodel, also addedited_byfor the requested userx_record_delete_objectfunction to record delete activity inXActivitymodelNOTE:x_record_delete_objectis a function not a view used asx_record_delete_object(request, object, message)Tags:class_namereturn the class name for the objectdetect_languagereturn language code to the textget_datachange '' to "" for Jason useto_stringchange number to stringtrunctrnucate text for any selected lengthmake_clearreplace all ' _ ' to ' 'permission_checkcheck if user has specific permission regardless if user is superuser or notx_sortsort model data with selected fieldInstall:Install python > 3.8.8Install using pippip install x-django-appAdd "x_django_app" to your INSTALLED_APPS settings:INSTALLED_APPS = [...'x_django_app',]Use:For viewsfrom x_django_app.views import XListView, XCreateView, XUpdateView, x_record_delete_objectFor tags{% load x_tags %}For paginations{% include 'x_django_app/_pagination.html' %}
Package: xdj-utils
#usage
##installpip install xdj-utils##setting
###additionalUSERNAME_FIELD = 'username'
ROLE_MODEL = 'xdj_system.Role'
DEFAULT_ROLE = ['']
ANONYMOUS_ROLE = ['']###modificationUSERNAME_FIELD = 'username'
ROLE_MODEL = 'xdj_system.Role'
DEFAULT_ROLE = ['']
ANONYMOUS_ROLE = ['']

#settings for modifying
MIDDLEWARE = [
    ...
    xdj_utils.middleware.ApiLoggingMiddleware
]

REST_FRAMEWORK = {
    ...
    'DEFAULT_FILTER_BACKENDS':(
        'xdj_utils.filters.CustomDjangoFilterBackend',
        ...
    ),
    'DEFAULT_PAGINATION_CLASS': 'xdj_utils.pagination.CustomPagination',
    'DEFAULT_AUTHENTICATION_CLASSES':(
        ...
        'xdj_utils.authentications.AnonymousAuthenticated',
    ),
    'EXCEPTION_HANDLER': 'xdj_utils.exception.CustomExceptionHandler',
}

AUTHENTICATION_BACKENDS = [
    'xdj_utils.backends.CustomBackend',
    ...
]

SWAGGER_SETTINGS = {
    ...
    'DEFAULT_AUTO_SCHEMA_CLASS': 'xdj_utils.swagger.CustomSwaggerAutoSchema',
}
Package: xdmenu
Extensible wrapper fordmenu.dmenu is a dynamic menu for X, originally designed for dwm. It manages
large numbers of user-defined menu items efficiently.Source code on GitHubLatest documentationxdmenuis free software and licensed under the GNU Lesser General Public
License v3.FeaturesMany options available in patches built inAdditional options can be addedEasy to extend for other tools such asRofiCreditsThis package was created withCookiecutterand thecblegare/pythontemplateproject template.
Package: xdmf-dolfin-fix
xdmf_dolfin_fixThere is an xdmf import issue in FEniCS/DOLFIN. Quadratic triangles and tetrahedrons
are imported incorrectly. The CLI toolxdmf-dolfin-fixfixes this issue by reordering element numbers.Example usagexdmf-dolfin-fix old.xdmf            # fix old.xdmf
xdmf-dolfin-fix old.xdmf new.xdmf   # create fixed new.xdmf
xdmf-dolfin-fix old.geo -d3         # create fixed old.xdmf from gmsh
xdmf-dolfin-fix old.msh new.xdmf    # create fixed new.xdmf from gmshProblemAt some point of the simulation FEniCS/DOLFIN orders the vertices of all elements
in numerically accending order. Nodes on the edges of elements -- as present
in quadratic triangles and quadratic tetrahedrons -- are not swapped.So internally, the node numbers of an arbitrary quadratic tetrahedron[ vertices |    edges   ]
[ 51 74 12 | 14 72 1003 ]would be reordered to[ 12 51 74 | 14 72 1003 ]Now, the vertex nodes[12 51 74]are sorted, but the edge nodes[14 72 1003]are left unchanged. This results in a twisted geometry.Fixxdmf-dolfin-fixsorts the vertex nodesandreorders the edge nodes accordingly. This
will result in[ 12 51 74 | 1003 14 74 ]A further sorting within DOLFIN has no effect and, thus, will not mess up
this ordering.