Saravanan666/pypi-org huggingface dataset:
Package: dir2md
dir2mddir2mdis a command-line tool that converts directories of files into Markdown code blocks. It also provides a reverse function, md2dir, which converts Markdown code blocks back into their original files.InstallationInstalldir2mdusingpip:pipinstalldir2mdUsagedir2mdcan be used as a command-line tool or imported as a module.Command-Line ToolTo convert a directory of files to Markdown code blocks, run:dir2md[files...]This will print the resulting Markdown to the console.To convert Markdown code blocks back into their original files, run:md2dir[options]This will create the files in the current working directory.For more options and usage details, use the--helpflag.Moduleimportdir2md# Convert a directory of files to Markdown code blocksmarkdown=dir2md.dir2md("file1.py","file2.py")# Convert Markdown code blocks back into their original filesdir2md.md2dir_save(markdown,output_dir="output/")Wildcard supportYou can use wildcards (*) to pass multiple files at once.For example, to include all Python files in the current directory:dir2md*.pyTo do so recursively, use**:dir2md**/*.pydir2mdusesglobto parse your path pattern. To turn this off, use the--no-globflag.Truncationdir2mdnow supports truncating long files with the{start_line,end_line}syntax added to the file or directory path.For example:Get the first 10 lines of a file:dir2md "path/to/file.py[:10]"Get lines 10 to 20:dir2md "path/to/file.py[10:20]"Get everything from line 10 until the end of the file:dir2md "path/to/file.py[10:]"Get the first 10 lines of a file followed by an ellpsis:dir2md "path/to/file.py[:10...]"Negative indices:dir2md "path/to/file.py[-10:]"Multiple truncations:dir2md "path/to/file.py[:10 20:]"Omit the entire contents of the file with an ellipsis:dir2md "path/to/file.py[..]"This syntax can be used with wildcards as well.The quotation marks are required to prevent your shell from interpreting the brackets as special characters.dir2md*.py[:10]# First 10 lines of all .py filesdir2md**/*.py[5:]# All lines after the first 5 lines in all .py files recursivelyHandling missing filesYou can customize the behavior when a specified file is not found using theon_missingoption. By default, it is set to"error"which will raise aFileNotFoundError. To ignore the missing file and continue processing other files, passon_missing="ignore"as an argument to thedir2mdfunction.dir2md("missing_file.py",on_missing="ignore")
Package: dir2opus
dir2opus converts mp3, m4a, and wav files to the free open source Opus format. Opus files are
about 20-25% smaller than mp3s with the same relative sound quality. Your mileage may vary.Keep in mind that converting from mp3 or m4a to opus is a conversion between two lossy formats.
This is fine if you just want to free up some disk space, but if you’re a hard-core audiophile
you may be dissapointed. I really can’t notice a difference in quality with ‘naked’ ears myself.This script converts mp3s to wavs using mpg123 then converts the wavs to opus using opusenc.
m4a conversions require faad. Id3 tag support requires mutagen for mp3s.
Scratch tags using the filename will be written for wav files (and mp3s with no tags!)
Package: diraas
Run server:$ pip install diraas
$ diraas --token=abc123 --host=127.0.0.1 --port=5100 ~/lab/Consume the API:HTTP GET http://127.0.0.1:5100/ls?token=abc123&targets=*.txt%20*.py
HTTP GET http://127.0.0.1:5100/fetch?token=abc123&targets=a.txt%20b.txt
Package: diraccfg
Parser for DIRAC cfg filesdiraccfgprovides a parser for the configuration files used byDIRACand its associated projects.InstallationpipinstalldiraccfgCommand line usageThe command line mode ofdiraccfgprimarily serves to convert the
configuration into a JSON file which can then be processed using standard tools
such asjq.The following examples are ran using the following configuration file:DefaultModules = DIRAC
Sources
{
  DIRAC = git://github.com/DIRACGrid/DIRAC.git
}
Releases
{
  integration
  {
    Modules = DIRAC, WebAppDIRAC, VMDIRAC
    Externals = v6r6p8
    DIRACOS = master
  }
  v7r0-pre19
  {
    Modules = DIRAC, VMDIRAC:v2r4-pre2, RESTDIRAC:v0r5, COMDIRAC:v0r17, WebAppDIRAC:v4r0p7, OAuthDIRAC:v0r1-pre1
    DIRACOS = master
  }
  v6r22p2
  {
    Modules = DIRAC, VMDIRAC:v2r4-pre2, RESTDIRAC:v0r6, COMDIRAC:v0r17, WebAppDIRAC:v4r0p7, OAuthDIRAC:v0r1-pre1
    Externals = v6r6p8
    DIRACOS = v1r3
  }
  v6r22p1
  {
    Modules = DIRAC, VMDIRAC:v2r4-pre2, RESTDIRAC:v0r6, COMDIRAC:v0r17, WebAppDIRAC:v4r0p7, OAuthDIRAC:v0r1-pre1
    Externals = v6r6p8
    DIRACOS = v1r3
  }
}Print as JSON$ diraccfg as-json example.cfg
{"DefaultModules": "DIRAC", "Sources": {"DIRAC": "git://github.com/DIRACGrid/DIRAC.git"}, "Releases": {"integration": {"Modules": "DIRAC, WebAppDIRAC, VMDIRAC", "Externals": "v6r6p8", "DIRACOS": "master"}, "v7r0-pre19": {"Modules": "DIRAC, VMDIRAC:v2r4-pre2, RESTDIRAC:v0r5, COMDIRAC:v0r17, WebAppDIRAC:v4r0p7, OAuthDIRAC:v0r1-pre1", "DIRACOS": "master"}, "v6r22p2": {"Modules": "DIRAC, VMDIRAC:v2r4-pre2, RESTDIRAC:v0r6, COMDIRAC:v0r17, WebAppDIRAC:v4r0p7, OAuthDIRAC:v0r1-pre1", "Externals": "v6r6p8", "DIRACOS": "v1r3"}, "v6r22p1": {"Modules": "DIRAC, VMDIRAC:v2r4-pre2, RESTDIRAC:v0r6, COMDIRAC:v0r17, WebAppDIRAC:v4r0p7, OAuthDIRAC:v0r1-pre1", "Externals": "v6r6p8", "DIRACOS": "v1r3"}}}Extract available releases with usingjq$diraccfgas-jsonexample.cfg|jq'.Releases'{"integration":{"Modules":"DIRAC, WebAppDIRAC, VMDIRAC","Externals":"v6r6p8","DIRACOS":"master"},"v7r0-pre19":{"Modules":"DIRAC, VMDIRAC:v2r4-pre2, RESTDIRAC:v0r5, COMDIRAC:v0r17, WebAppDIRAC:v4r0p7, OAuthDIRAC:v0r1-pre1","DIRACOS":"master"},"v6r22p2":{"Modules":"DIRAC, VMDIRAC:v2r4-pre2, RESTDIRAC:v0r6, COMDIRAC:v0r17, WebAppDIRAC:v4r0p7, OAuthDIRAC:v0r1-pre1","Externals":"v6r6p8","DIRACOS":"v1r3"},"v6r22p1":{"Modules":"DIRAC, VMDIRAC:v2r4-pre2, RESTDIRAC:v0r6, COMDIRAC:v0r17, WebAppDIRAC:v4r0p7, OAuthDIRAC:v0r1-pre1","Externals":"v6r6p8","DIRACOS":"v1r3"}}Get a sorted list of stable version numbers$diraccfgas-jsonexample.cfg|jq'.Releases'|diraccfgsort-versions["v6r22p2","v6r22p1"]Get a sorted list of version numbers including prereleases$diraccfgas-jsonexample.cfg|jq'.Releases'|diraccfgsort-versions--allow-pre-releases["v7r0-pre19","v6r22p2","v6r22p1"]Find the latest releases$diraccfgas-jsonexample.cfg|jq'.Releases'|diraccfgsort-versions|jq-r'.[0]'v6r22p2$diraccfgas-jsonexample.cfg|jq'.Releases'|diraccfgsort-versions--allow-pre-releases|jq-r'.[0]'v7r0-pre19
Package: diracengine
The Dirac Quantum Engine:a tribute to a legendTheDirac engineis aPyhon physics enginewhich simulates quantum phenomena. This includes basic quantum and wave mechanics, spin 1/2 particles and their antimatter partners.In 1928Paul Dirac, an english physicist, was working on a relativistic theory of quantum mechanics. The result is a beautiful equation:$$ i \hbar \gamma^\mu \partial_\mu \ket\psi - m c \ket\psi = 0 $$This equation predicts electron spin, the periodic table, antimatter and thegfactor. It is also the first building block ofquantum field theory: оur best description of reality (yet).This equation is the core of theDirac engine. This is why this name has been chosen for the project. The engine isa tribute to a legend:Paul Dirac, one of the geniuses of the 20th century.Quantum field theory is hard. It requires years of studying just for the basics. But that is not the main problem. Calculations in quantum field theory are beyond the performance limits of modern computers. So, how could we simulate the quantum realm?Fortunately, quantum field theory's predecessor:quantum mechanics, is easier. It does not require you to build a cluster of supercomputers. You can simulate basic quantum phenomena on your own computer.
Package: dirac-webapp-packaging
Build tools for compiling javascript sources in DIRAC WebApp packages.UsageThese instructions assume you are using asetup.cfgfile to usesetuptoolsto build your package with versioning being handled bysetuptools-scm.In order to use this to automatically compile javascript sources as part of wheel generation thepyproject.toml:[build-system]requires=["dirac_webapp_packaging~=1.0","WebAppDIRAC ~=4.3.0a0","setuptools_scm[toml]>=3.4"]build-backend="setuptools.build_meta"[tool.setuptools_scm]# Avoid letting setuptools_scm use old style tags (i.e. vXrYpZ)git_describe_command="git describe --dirty --tags --long --match *[0-9]* --exclude v[0-9]r* --exclude v[0-9][0-9]r*"and, assuming your other metadata is in asetup.cfg, create asetup.pyfile containing:fromdirac_webapp_packagingimportextjs_cmdclassfromsetuptoolsimportsetupsetup(cmdclass=extjs_cmdclass)If you are building an extension to any of the pages in WebAppDIRACpyproject.tomlfile therequiressection underbuild-systemmust be modified slightly:[build-system]# NOTE: Make sure to keep the runtime requirement in setup.cfg in sync with this versionrequires=["dirac_webapp_packaging~=1.0","WebAppDIRAC ~=4.3.0a0","setuptools_scm[toml]>=3.4"]Additionally thediracextension_metadataentrypoint should be modified to declare the static resources:importimportlib.resourcesdefextension_metadata():return{"priority":NNN,"web_resources":{"static":[importlib.resources.files(PKG_NAME)/"WebApp"/"static"],}}Changelog1.0.1Switch back to usingpackage_datainstead ofdata_filesfor distributing assets1.0.0Initial release
Package: dirbpy
DirbpyDescriptionDirbpy - URL BruteforcerThis is a new version of dirb but in python. This version is faster than the normal version in C because it uses thread. Dirbpy is a Web Content Scanner. It looks for hidden Web Objects. It basically works by launching an attack based on a dictionary against a web server and analyzing the response.Link to the original dirb:https://github.com/v0re/dirbInstall with pippip install dirbpyFish completionsgit clonehttps://github.com/marcolivierbouch/dirbpy.gitcd dirbpysudo cp dirbpy.fish /usr/share/fish/completionsDirbpy with DockerPull the Dockerdocker pull marcolivierbouch/dirbpyAfter you need to get inside the dockerdocker run-itmarcolivierbouch/dirbpyCommand exampledirbpy-ohttps://raw.githubusercontent.com/danielmiessler/SecLists/master/Discovery/Web-Content/common.txt-uhttps://[....].comRecommendationsI recommend using the SecLists:https://github.com/danielmiessler/SecLists
Package: dirbrowser
dirbrowser version 1.0b2========================This module is built for python 3, and is not backwards compatiblewith python 2.This module includes a number of functions that provide basicdirectory browser functionality, in an easy to view format, within acommand line environment, e.g. cmd.exe. The display of the directoryis formatted as follows, where the '..', represents the parent directory: ::[1] ..[2] Folder1[3] File1.py[4] File2.txt[5] Folder2Enter a number to select the corresponding directory, or 0 to confirmcurrent directory:Entering the number corresponding to the desired directory changes to thatdirectory, providing the browsing funcitonality.See the README.rst file for more information.
Package: dir-clean
dir_cleanThis package can help you to clean up the directory.Files or directories older than the specified number of days will be deleted.Usageusage:__main__.py[-h][-dKEEP_DAYS][-cCONF_FILE][--dry-run]optionalarguments:-h,--helpshowthishelpmessageandexit-dKEEP_DAYS,--keep-daysKEEP_DAYSdaystokeep(default:7)-cCONF_FILE,--conf-fileCONF_FILEconfigurationfilename(default:dir_clean.conf)--dry-runConfiguration file formatEach line consists of these items, separated by commas:path: path to search.regex: Regular expression to match directories or files to clean. (optional)days: how many days to keep. (optional)Example:/services/www/log,.+,3Date comparisonBy default, the modification date of the file or directory will be read as a comparison with the current date, but you can also specify the date of a file or directory through the regular expression./services/www/log,.+?-(?P<m>\d{2})-(?P<d>\d{2})-(?P<y>\d{4})\.log$,7
Package: dircleaner
cleandirOrganizes a directory's contents into subdirectories based on file extensions.Say goodbye to navigating between hundreds of files in your downloads directory!InstallationpipinstallcleandirUsageJust pass the directory to organize as an argumentcleandir<dir-name>By default, cleandir organizes files using the following rules:audio:      flac, mp3, ogg, wavdocuments:  docx, pdf, pptx, xlsxmisc:       7z, deb, exe, rar, zippictures:   gif, jpg, png, svg, webpvideos:     mkv, mov, mp4, webmExtensions outside this rule are ignoredCustom rules can be passed by creating a JSON file directories and list of extensions:{"audio":["mp3","wav"],"code":["py","c","js"],}cleandir--json-file<json-file><dir-name>If duplicates files exists in the created directory, they can be removed by using the--delete-duplicatesflag:cleandir-d<dir-name>Available help can be seen through the--helpflag:cleandir--help
Package: dirdog
DirDogSimplest Watchdog for a given directory. Allows to register callbacks for newly created, deleted, or modified files.UsagefromdirdogimportDirDogdefnew_file_callback(file_name):print(file_name+" created!")path_of_directory_to_monitor="."d=DirDog(path_of_directory_to_monitor)d.on_new_file(new_file_callback)d.join()
Package: dire
direPython equivalent of Perl'swarn/diefunctions.Synopsisfrom dire import *

warn("This will print to sys.stdout")
die("This will `warn` and then `sys.exit(1)`")
die("This will `warn` and then `sys.exit(2)`", exit_val=2)DescriptionI miss having these two functions that in Perl. I find myself defining them in most every program I write, so I'm making this module so I can justimportthem.warn(msg)Thewarnfunction will simplyprint(message, file=sys.stderr).die(msg, exit_val=1)Thediefunction will callwarnwith a message and will then callsys.exitwith theexit_valparameter. NB: In Unix, an exit value of0indicates no error. The default value ofdie.exit_valis 1 simply because it is not zero. You could choose to setexit_val=0to halt program execution without indicating an error.AuthorKen Youens-Clarkkyclark@gmail.com
Package: directdb
directdbA simple library that makes handling SQL databases in python easy without the need to understand the syntax. The library would act like an interface between your code and the database server parsing the data to SQL format.If you enjoy using this project, consider giving it a star as it helps out a ton <3Currently Supported Databases:PostgreSQLSQLiteGithub Repositoryhttps://github.com/cannonballchris/directdbInstallationTo install the library, usepip install directdbLicenseGPL-3.0DocumentationDocumentationUsage/ExamplesUsing the library with a discord botimportasyncioimportdiscordfromdiscord.extimportcommandsfromdirectdbimportPostgresqlclassMyBot(commands.Bot):def__init__(self):super().__init__(command_prefix="!",intents=discord.Intents.all())asyncdefsetup_hook(self):setattr(self,"db",Postgresql(host="localhost",user="username",password="password",database="Database name here",port=5000#Your db port address here))awaitself.db.connect()print("DB Ready")if__name__=="__main__":asyncio.run(MyBot().run("TOKEN"))Using the library normally without a discord bot context.importasynciofromdirectdbimportPostgresqlasyncdefdatabase(host,user,password,database,port):db=Postgresql(host=host,user=user,password=password,database=database,port=port)awaitdb.connect()asyncio.run(database(...))ContributingYou can contribute to this project by providing valueable suggestions and reporting issues in ourDiscord Server
Package: direct-debit
Direct Debit Python ClientComing SoonThis is a Python wrapper around our API, to make it easier for our clients to plug in to our system.We pride ourselves in providing businesses with the ability to automatedebit order collectionvia our flexible, secure and efficientdebit order system. Direct Debit also provides an industry first in our E-Mandate,electronic debit order authorisationandDebiChecksolutions.If you're a developer you can find out more about automating your debit order collections via ourdebit order integrationsanddebit order api.Contact UsGet in touch via email tosupport@directdebit.co.zaor call us on 021 671 9800.
Package: directed_information
# Universal_Directed_InformationPython3 implementation of the universal directed information estimators in Jiantao Jiao, Haim H. Permuter, Lei Zhao, Young-Han Kim, and Tsachy Weissman. “Universal estimation of directed information.” IEEE Transactions on Information Theory 59, no. 10 (2013): 6220-6242.See here: [http://arxiv.org/abs/1201.2334](http://arxiv.org/abs/1201.2334)Also see [MATLAB implementation](https://github.com/EEthinker/Universal_directed_information)## Authors
Eli Pugh, Ethan Shen
Package: directio
This is an interface to read() and write() on a direct I/O context (O_DIRECT flag) from the Python programming language.These system calls are Linux system calls to
* open a file with the O_DIRECT flag, and close it.
* read or write from the file ignores the buffer cache.The O_DIRECT flag introduced in SGI IRIX, where it has alignment restrictions similar to those of Linux 2.4. FreeBSD 4.x introduced a flag of the same name, but without alignment restrictions. Support was added under Linux in kernel version 2.4.10. Older Linux kernels simply ignore this flag.
Package: directions
directions.py=============Provide a common Python API to major routing providers.Please consult the terms of service of each provider before using them.- Google - https://developers.google.com/maps/terms- Mapquest - Contact for licensed data agreement- Mapquest Open - http://developer.mapquest.com/web/info/terms-of-use- Mapbox - (Directions API still in preview and subject to change) https://www.mapbox.com/tos/- Mapzen - https://github.com/mapzen/routing/wiki/OSRM-Service-Details-and-Terms-of-UseUsage-----Create one of the available routers and call the `route()` method.```>>> import directions>>> mq = directions.Mapquest(key)  # You must request a developer key from Mapquest>>> routes = mq.route('1 magazine st. cambridge, ma', 'south station boston, ma')```See the help for `route()` for full documentation:```route(locations): points can be- a sequence of locations- a Shapely LineStringroute(origin, destination, waypoints=None)- origin and destination are a single destination- waypoints are the points to be inserted between theorigin and destinationIf waypoints is specified, destination must also be specifiedEach location can be:- string (will be geocoded by the routing provider. Not allproviders accept this as input)- (longitude, latitude) sequence (tuple, list, numpy array, etc.)- Shapely Point with x as longitude, y as latitudeAdditional parameters---------------------raw : bool, default FalseReturn the raw json dict response from the serviceReturns-------list of Route objectsIf raw is True, returns the json dict instead of converting to Routeobjects```Examples--------```mq = directions.Mapquest(key)routes = mq.route('1 magazine st. cambridge, ma','south station boston, ma')routes = mq.route('1 magazine st. cambridge, ma','south station boston, ma',waypoints=['700 commonwealth ave. boston, ma'])```Use the points in a `LineString` as the complete set of waypoints.```line = LineString(...)routes = mq.route(line)```The different types of location inputs can be mixed.```routes = mq.route(line.coords[0], 'south station boston, ma',waypoints=[(-71.103972, 42.349324)])```Other Tools-----------[geojsonio.py](http://github.com/jwass/geojsonio.py) can be used to quickly display the route on a map. Note that it is against Google's ToS to do this with any of their routes.```routes = mq.route(...)geojsonio.display(routes)```
Package: directize
DirectizeThis project is a package to help the creation of most known DS/ML/AI project structure, this project aims to remove the creating of project structure from the 
    developer plate..Report Bug·Request FeatureTable of ContentsAbout The ProjectBuilt WithGetting StartedPrerequisitesInstallationUsageExamplesAbout The DirectizeThis is a productivity project, the ideal of this project is to help in automating project directory structure, Directize is
a simple lightweight package that is designed to make creating DS/AI project easier, it gives you the options of creating a
project structure that is most known in the industry.(back to top)Built WithPythoninstallationInstall and update using[Pip](https://pypi.org/project/pip/)$ pip install directizeUsageA Simple Example# use as an import
    from directize import standard

    standard.create_project()

    # use as A CLI
    python directize -v 
        version = '0.0.3'
    python directize -d standard -p testprojectContributingContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make aregreatly appreciated.Thanks for checking out this project.If you have a suggestion that would make this better, please fork the repo and create a pull request or simply open an issue with the tag "feature update".Don't forget to give the project a star if you like it!Thanks again! Now go create something AMAZING!If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!Fork the ProjectCreate your Feature Branch (git checkout -b feature/AmazingFeature)Commit your Changes (git commit -m 'Add some AmazingFeature')Push to the Branch (git push origin feature/AmazingFeature)Open a Pull RequestLicenseDistributed under the MIT License. Seelicensefor more information.Thanks for checking out this project.
Package: directory-api-client
directory-api-clientGreat API client.Installation$ pip install directory-api-clientThe api client expects the following settings:SettingNotesDIRECTORY_API_CLIENT_BASE_URLDIRECTORY_API_CLIENT_API_KEYUnique to client. Retrieved during the on-boarding process.DIRECTORY_API_CLIENT_SENDER_IDUnique to client. Retrieved during the on-boarding process.DIRECTORY_API_CLIENT_DEFAULT_TIMEOUTThe followingdirectory client core settingsalso apply to directory cms client:SettingNotesDIRECTORY_CLIENT_CORE_CACHE_EXPIRE_SECONDSDuration to store the retrieved content in the cache.DIRECTORY_CLIENT_CORE_CACHE_LOG_THROTTLING_SECONDSDuration to throttle log events for a given url for.And the caching expects the following key in CACHES setting:api_fallbackOnce that is done the API client can be used:fromdirectory_api_client.clientimportapi_clientDevelopment$gitclonehttps://github.com/uktrade/directory-api-client
$cddirectory-api-client
$[createvirtualenvironmentandactivate]$maketest_requirementsUsemake checksto validate the codebase withblackandisort, in dry-run mode
Usemake autoformatto runblackandisortin file-updating modeFallback cacheWhere feasible the response is cached to the client's fallback cache. This allows retrieval later if API returns non successful response or times out.When enabling the fallback cache on a handler make sure that the request's querystring or url path are unique per user, otherwise the User B's details could be leaked User A.For example,api_client.company.profile_retrievelooks up the company for the authenticated user. The authentication header is not used when generating the cache key for the response. This means for that endpoint the querystring and url are the same for all users, so the cache key would therefore also be the same for all users. This means if API was down then all users would see the company details for the last user to successfully retrieve their company.Publish to PyPIThe package should be published to PyPI on merge to master. If you need to do it locally then get the credentials from rattic and add the environment variables to your host machine:SettingDIRECTORY_PYPI_USERNAMEDIRECTORY_PYPI_PASSWORDThen run the following command:$ make publish