Saravanan666/pypi-org huggingface dataset:
Package: directorywatcher
Monitors a directory, watching for files that are added or removed.Filters the list of files being watched by regex pattern matching.Runs one function when files are added, another (potentially different) function when files are removed.Releases0.1, 2018-04-12
* Initial releaseLicenseCopyright 2018 Joshua BurnettPermission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
“Software”), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package: direct-redis
Direct-RedisSerialize any python datatypes and executes redis commands using redis-pyWhen loading, it auutomatically converts serialized data into original data typesGetting StartedInstall via pypipip install direct-redisInstantiatefrom direct_redis import DirectRedis
r = DirectRedis(host='localhost', port=6379)Supporting Data TypesBuilt-instringnumber(int, float)dictionarylisttupleetc (all other python built-in types)Module ClassespandasnumpySupporting Redis CommandsDirect-Redis SupportsBasic FunctionsKEYSRANDOMKEYTYPESETGETHash FunctionsHKEYSHSETHMSETHGETHMGETHGETALLHVALSSet FunctionsSADDSREMSMEMBERSSPOPSDIFFSCARD (Default)SRANDMEMBERList FunctionsLPUSHRPUSHLPUSHXRPUSHXLRANGELPOPRPOPLINDEXExamplesStringOriginally redis stores string into bytes.>>> s = "This is a String. \n스트링입니다."
>>> print(s)
This is a String.
스트링입니다.   

>>> r.set('s', s)   

>>> r.get('s')   
'This is a String. \n스트링입니다.'    

>>> type(r.get('s'))
<class 'str'>Numbers>>> mapping = {
...     'a': 29,
...     'b': 0.5335113,
...     'c': np.float64(0.243623466363223),
... }   

>>> r.hmset('nums', mapping)   

>>> r.hmget('nums', *mapping.keys())   
[29, 0.5335113, 0.243623466363223]    

>>> list(mapping.values()) == r.hmget('nums', *mapping.keys())
TrueNested Dictionaries and Lists>>> l = [1,2,3]
>>> d = {'a': 1, 'b': 2, 'c': 3}   

>>> r.hmset('list and dictionary', {'list': l, 'dict': d})   

>>> r.hgetall("list and dictionary")
{'list': [1, 2, 3], 'dict': {'a': 1, 'b': 2, 'c': 3}}

>>> type(r.hgetall("list and dictionary")['list'])
<class 'list'>   

>>> type(r.hgetall("list and dictionary")['dict'])
<class 'dict'>Pandas DataFrame>>> df =  pd.DataFrame([[1,2,3,'235', '@$$#@'], 
                       ['a', 'b', 'c', 'd', 'e']])
>>> print(df)
   0  1  2    3      4
0  1  2  3  235  @$$#@
1  a  b  c    d      e   

>>> r.set('df', df)   

>>> r.get('df')
   0  1  2    3      4
0  1  2  3  235  @$$#@
1  a  b  c    d      e   

>>> type(r.get('df'))
<class 'pandas.core.frame.DataFrame'>Numpy Array>>> arr = np.random.rand(10).reshape(5, 2)
>>> print(arr)
[[0.25873887 0.00937433]
 [0.0472811  0.94004351]
 [0.92743943 0.93898677]
 [0.87706341 0.85135288]
 [0.06390652 0.86362001]]   

>>> r.set('a', arr)   

>>> r.get('a')   
array([[0.25873887, 0.00937433],
       [0.0472811 , 0.94004351],
       [0.92743943, 0.93898677],
       [0.87706341, 0.85135288],
       [0.06390652, 0.86362001]])   

>>> type(r.get('a'))
<class 'numpy.ndarray'>Authordirect-redisis developed and maintained by Yonghee Cheon (yonghee.cheon@gmail.com).It can be found here:https://github.com/yonghee12/direct-redisSpecial thanks to:Andy McCurdy, the author of redis-py.
Package: direct-redis-new
Direct-RedisSerialize any python datatypes and executes redis commands using redis-pyWhen loading, it auutomatically converts serialized data into original data typesGetting StartedInstall via pypipip install direct_redis_newInstantiatefrom direct_redis import DirectRedis
r = DirectRedis(host='localhost', port=6379)Supporting Data TypesBuilt-instringnumber(int, float)dictionarylisttupleetc (all other python built-in types)Module ClassespandasnumpySupporting Redis CommandsDirect-Redis SupportsBasic FunctionsKEYSTYPESETGETHash FunctionsHKEYSHSETHMSETHGETHMGETHGETALLHVALSSet FunctionsSADDSMEMBERSList FunctionsLPUSHRPUSHLRNAGEExamplesStringOriginally redis stores string into bytes.>>> s = "This is a String. \n스트링입니다."
>>> print(s)
This is a String.
스트링입니다.   

>>> r.set('s', s)   

>>> r.get('s')   
'This is a String. \n스트링입니다.'    

>>> type(r.get('s'))
<class 'str'>Numbers>>> mapping = {
...     'a': 29,
...     'b': 0.5335113,
...     'c': np.float64(0.243623466363223),
... }   

>>> r.hmset('nums', mapping)   

>>> r.hmget('nums', *mapping.keys())   
[29, 0.5335113, 0.243623466363223]    

>>> list(mapping.values()) == r.hmget('nums', *mapping.keys())
TrueNested Dictionaries and Lists>>> l = [1,2,3]
>>> d = {'a': 1, 'b': 2, 'c': 3}   

>>> r.hmset('list and dictionary', {'list': l, 'dict': d})   

>>> r.hgetall("list and dictionary")
{'list': [1, 2, 3], 'dict': {'a': 1, 'b': 2, 'c': 3}}

>>> type(r.hgetall("list and dictionary")['list'])
<class 'list'>   

>>> type(r.hgetall("list and dictionary")['dict'])
<class 'dict'>Pandas DataFrame>>> df =  pd.DataFrame([[1,2,3,'235', '@$$#@'], 
                       ['a', 'b', 'c', 'd', 'e']])
>>> print(df)
   0  1  2    3      4
0  1  2  3  235  @$$#@
1  a  b  c    d      e   

>>> r.set('df', df)   

>>> r.get('df')
   0  1  2    3      4
0  1  2  3  235  @$$#@
1  a  b  c    d      e   

>>> type(r.get('df'))
<class 'pandas.core.frame.DataFrame'>Numpy Array>>> arr = np.random.rand(10).reshape(5, 2)
>>> print(arr)
[[0.25873887 0.00937433]
 [0.0472811  0.94004351]
 [0.92743943 0.93898677]
 [0.87706341 0.85135288]
 [0.06390652 0.86362001]]   

>>> r.set('a', arr)   

>>> r.get('a')   
array([[0.25873887, 0.00937433],
       [0.0472811 , 0.94004351],
       [0.92743943, 0.93898677],
       [0.87706341, 0.85135288],
       [0.06390652, 0.86362001]])   

>>> type(r.get('a'))
<class 'numpy.ndarray'>Authordirect-redisis developed and maintained by YongJe Lee (yjlee8510@gmail.com).It can be found here:https://github.com/yonghee12/direct-redisSpecial thanks to:Andy McCurdy, the author of redis-py.
Package: directrix-pkg
# Directrix PackageThis is a simple example package. You can use
[Github-flavored Markdown](https://guides.github.com/features/mastering-markdown/)
to write your content.This requires setuptools, wheel, and twine.To create source and binary distributions in the dist/ folder execute:` python setup.py sdist bdist_wheel `To upload to PyPI test server execute:` twine upload--repository-urlhttps://test.pypi.org/legacy/dist/* `To install from PyPI test server execute:` pip install--index-urlhttps://test.pypi.org/simple/directrix_pkg `To upload to PyPI production server execute:` twine upload dist/* `To install from PyPI production server execute:` pip install directrix_pkg `
Package: direct-sdk-python2
IntroductionThe Python SDK helps you to communicate with theIngenico
DirectServer API. Its primary
features are:convenient Python library for the API calls and responsesmarshalls Python request objects to HTTP requestsunmarshalls HTTP responses to Python response objects or Python
exceptionshandling of all the details concerning authenticationhandling of required meta dataIts use is demonstrated by an example for each possible call. The
examples execute a call using the provided API key.See theIngenico Direct Support
Sitefor more information on how to use the SDK.Structure of this repositoryThis repository consists out of three main components:The source code of the SDK itself:/ingenico/direct/sdk/The source code of the SDK unit tests:/tests/unit/The source code of the example integration tests:/tests/integration/Note that the source code of the unit tests and integration tests can
only be found on GitHub.RequirementsPython 2.7 is required. In addition, the following package is required:requests2.20.0 or higherThis package will be installed automatically if the SDK is installed
manually or using pip following the below instructions.InstallationTo install the SDK using pip, execute the following command:pip install direct-sdk-python2Alternatively, you can install the SDK from a source distribution file:Download the latest version of the Python SDK from GitHub. Choose thedirect-sdk-python2-x.y.z.zipfile from thereleasespage, wherex.y.zis the version number.Execute the following command in the folder where the SDK was
downloaded to:pip install direct-sdk-python2-x.y.z.zipUninstallingAfter the Python SDK has been installed, it can be uninstalled using the
following command:pip uninstall direct-sdk-python2The required package can be uninstalled in the same way.Running testsThere are two types of tests: unit tests and integration tests. The
unit tests will work out-of-the-box; for the integration tests some
configuration is required.First, some environment variables need to be set:direct.api.apiKeyIdfor the API key id to use.direct.api.secretApiKeyfor the secret API key to use.direct.api.merchantIdfor your merchant ID.In order to run the unit and integration tests, themockbackport andmockitopackages are
required. These can be installed using the following command:pip install mock mockitoThe following commands can then be executed from thetestsdirectory
to execute the tests:Unit tests:python run_unit_tests.pyIntegration tests:python run_integration_tests.pyBoth unit and integration tests:python run_all_tests.pyNote: in the current version of the unit tests, two errors will pop up
([Errno 10053] for Windows and [Errno 32] for Linux), indicating that
there was a client disconnect. These errors occur during cleanup of the
tests and do not hinder the tests in any way, and should therefore be
ignored.
Package: direct-sdk-python3
IntroductionThe Python SDK helps you to communicate with theIngenico
DirectServer API. Its primary
features are:convenient Python library for the API calls and responsesmarshalls Python request objects to HTTP requestsunmarshalls HTTP responses to Python response objects or Python
exceptionshandling of all the details concerning authenticationhandling of required meta dataIts use is demonstrated by an example for each possible call. The
examples execute a call using the provided API key.See theIngenico Direct Support
Sitefor more information on how to use the SDK.Structure of this repositoryThis repository consists out of three main components:The source code of the SDK itself:/ingenico/direct/sdk/The source code of the SDK unit tests:/tests/unit/The source code of the example integration tests:/tests/integration/Note that the source code of the unit tests and integration tests can
only be found on GitHub.RequirementsPython 3.5 or higher is required. In addition, the following package is
required:requests2.20.0 or higherThis package will be installed automatically if the SDK is installed
manually or using pip following the below instructions.InstallationTo install the SDK using pip, execute the following command:pip install direct-sdk-python3Alternatively, you can install the SDK from a source distribution file:Download the latest version of the Python SDK from GitHub. Choose thedirect-sdk-python3-x.y.z.zipfile from thereleasespage, wherex.y.zis the version number.Execute the following command in the folder where the SDK was
downloaded to:pip install direct-sdk-python3-x.y.z.zipUninstallingAfter the Python SDK has been installed, it can be uninstalled using the
following command:pip uninstall direct-sdk-python3The required package can be uninstalled in the same way.Running testsThere are two types of tests: unit tests and integration tests. The
unit tests will work out-of-the-box; for the integration tests some
configuration is required.First, some environment variables need to be set:direct.api.apiKeyIdfor the API key id to use.direct.api.secretApiKeyfor the secret API key to use.direct.api.merchantIdfor your merchant ID.In order to run the unit and integration tests, themockbackport andmockitopackages are
required. These can be installed using the following command:pip install mock mockitoThe following commands can then be executed from thetestsdirectory
to execute the tests:Unit tests:python run_unit_tests.pyIntegration tests:python run_integration_tests.pyBoth unit and integration tests:python run_all_tests.py
Package: direct-speech-extractor-ru
Direct Speech ExtractorPython package for extracting direct speech from texts in RussianReturned attributes for the list of extracted quotes:text_wordcount- word count of the whole textdirect_speech_wordcount- word count of all the extracted quotesratio- ratio of the extracted quotes to the whole text (direct_speech_wordcount to text_wordcount)InstallationInstall the package using pip:pipinstalldirect-speech-extractor-ruUsage>>>fromdirect-speech-extractor-ruimportExtractor>>>text="""Он добр и чувствителен, но вспыльчив. Когда на почте кто-нибудь из посетителей протестует, не соглашается или просто начинает рассуждать, то Михаил Аверьяныч багровеет, трясется всем телом и кричит громовым голосом: «Замолчать!», так что за почтовым отделением давно уже установилась репутация учреждения, в котором страшно бывать. Михаил Аверьяныч уважает и любит Андрея Ефимыча за образованность и благородство души, к прочим же обывателям относится свысока, как к своим подчиненным.– А вот и я! – говорит он, входя к Андрею Ефимычу. – Здравствуйте, мой дорогой! Небось я уже надоел вам, а?– Напротив, очень рад, – отвечает ему доктор. – Я всегда рад вам."""In order to extract all the quotes, use thedirect_spech()method:>>>extract_direct=Extractor(text)>>>extracted=extract_direct.direct_speech()>>>extracted[' «Замолчать!»','– А вот и я!','– Здравствуйте, мой дорогой! Небось я уже надоел вам, а?','– Напротив, очень рад,','– Я всегда рад вам.']In order to extract information about the word counts and the ratio, use the methodstatistics():>>>extract_direct.statistics(extracted){'text_wordcount':97,'direct_speech_wordcount':21,'ratio':0.21649484536082475}
Package: directsync
DirectSyncA simple andfastutility to compare/synchronize/mirror folder contents, completely free and open-sourceTM!DemoUsage:directsync [-h] [-add] [-rm] [-ovr] [-mirr] [-trash] [-cache]
           [-latest] [-dry] [-no-bar]
           src-path dst-path

positional arguments:
src-path             The path of the source directory.
dst-path            The path of the destination directory.

optional arguments:
  -h, --help            show this help message and exit
  -add, --add-missing   Copy files from source which are absent in
                        destination.
  -rm, --remove-extra   Remove the files from destination which are absent in
                        source.
  -ovr, --overwrite-content
                        Overwrite the files having same name but different
                        content.
  -mirr, --mirror-contents
                        Make the destination directory exactly same as the
                        source. Shorthand for `-add -rm -ovr`.
  -trash, --use-trash   Send to trash/recycle bin while deleting/overwriting.
  -cache, --use-cache   Whether to use previously cached comparison-check
                        result from disk.
  -latest, --preserve-latest
                        Whether to use the last modified time while
                        comparing files with different content.
  -dry, --dry-run       Just simulate and report the file operations that will
                        be performed with the current configuration.
  -no-bar, --hide-progress-bar
                        Whether to hide the progress bar or not. Will result
                        in a huge speedup iff the 2 directories are structured
                        very differently.Installation:Install Python 3 (>=3.5)pip install directsyncToDo:Give more fine-tuned control of file comparison algorithm to the user.Addignore-patternoption to let the user ignore certain files based on the regex pattern provided.Add test cases.Add code coverage.SetuptoxandTravis CI.Add coloured output.Handle nested structures with symlinks.Provide direct interface with online storage services.Add developer guidelines.Explore parallel processing.Add benchmarks.Add demo.Addsimulateoption.Adduse-trashoption to send to recycle bin instead of delete/overwrite.Addcacheoption to cache the results of the previous difference check to disk.Addpreserve-latestoption: Among the 2 files, the one with the latest modification date should be preserved.
Package: directus-python-client
Directus-Python-ClientThis library aims to provide a simple and easy to use interface to the Directus API. It is written in Python and uses
the requests library.MotivationWorking with APIs can sometimes be a bit cumbersome. If you are not careful, boilerplates can quickly lead to code
duplication. Most of the time they come from similar workflows. Like authentication, request header configuration or
just the execution of the request itself.DocumentationAuthenticationfromdirectus_apiimportDirectusApi# Authenticationapi=DirectusApi(username="username",password="password",endpoint="https://directus.example.com")ItemsRetrieve Items:...# (Optional) Add filter_dict to filter items.# (Optional) Add arg 'show_progress' to show progress bar.# (Optional) Add 'limit' to limit the number of items to retrieve. If None all items will be returned.items=api.get_items(collection="collection_name",limit=42,filter_dict={'match_id':{'_eq':'wzi6xmt37'}},show_progress=True)print(items)Create Items:...# Create a single item or multiple itemsitem=api.create_items(collection="collection_name",data=[{"title":"My new item"}])Update Items:...# Update a single item or multiple items. Primary key (here 'id') is required.item=api.update_items(collection="collection_name",data=[{"title":"My updated item","id":1}])Delete Items:...# Delete a single item by id from a collectionitem=api.delete_item_by_id(collection="collection_name",id=1)# Delete all items from a collectionitem=api.delete_items_by_ids(collection="collection_name",ids=[1,2,3])#

...
Package: directv
Python: DirecTV (SHEF) ClientAsynchronous Python client for DirecTV receivers using theSHEFprotocol.AbooutThis package allows you to monitor and control a DirecTV receiver and its associated client devices.InstallationpipinstalldirectvUsageimportasynciofromdirectvimportDIRECTVasyncdefmain():"""Show example of connecting to your DIRECTV receiver."""asyncwithDIRECTV("192.168.1.100")asdtv:print(dtv)if__name__=="__main__":loop=asyncio.get_event_loop()loop.run_until_complete(main())
Package: dir-edit
MotivationIf you want to rename files in a directory, things get really cumbersome if:the name modifications are not easily automatable (e.g. spelling mistakes)file names contain spaces / special characters (when using a shell)you have to rename a lot of files (when using a GUI)you would need to use temporary files (e.g.mv a tmp ; mv b a ; mv tmp b)etc.This script launches a used-defined text editor with a temporary file, where
every line is a filename in the directory. This enables the user to rename
(edit a line) or delete (blank line) entries. After saving and exiting the
editor, the script checks the file for consistency, detects rename loops and
finally performs the changes.News3.0.02021-03-29Require Python 3.6 (no new features, just usage of “try … from”)2.1.02017-05-01Support renaming of intermediate dirs in recursive mode,
drop--safemode, small bugfixes2.0.02017-03-22Bugfixes, Python 3 support,-oand-Loption,
extensive test suite1.12010-11-21Bugfixes1.02010-05-06First working versionExamplesRename non-hidden files in the current directory:dir_editRename mp3 files in the music directory using gedit:dir_edit -e gedit ~/Music ~/Music/*.mp3Review changes before executing them:dir_edit -vd -L log.txt
view log.txt
sh -e log.txtRename pictures with maximum directory depth 2:find pics -maxdepth 2 -type f -iregex ".*\.\(jpg\|png\)" > file_list
dir_edit -i file_listUsagedir_edit [OPTION]... [DIR] [FILES]...

  DIR        directory to edit (default: current directory)
  FILES      limit to these filenames (default: all non-hidden in directory)

Some options:

  -e CMD, --editor=CMD       use CMD to edit dirfile (default: $EDITOR or vi)
  -d, --dry-run              don't perform any file system modifications
  -v, --verbose              output filesystem modifications to stdout
  -L FILE, --logfile FILE    path to logfile for verbose mode (default: stdout)
  -i FILE, --input FILE      FILE containing paths to be editedCopyrightCopyright (C) 2010-2021 Johannes WeißlLicense GPLv3+:GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>This is free software: you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law.
Package: direg
direg lets you maintain arbitrary registry data (in the form of python dictionaries that can be “merged” in a logical
way (think: global config -vs- user config). With a small amount of work, it is possible to replace hardcoded
values with easily-maintainable and flexible registry entries.Suppose we have a file at/my/path/registry.pywith the following contents.data={'one.Foo.meth.somevar':26804,'one.Foo.somevar':24742,'one.myfunc.somevar':16834,'one.outer.inner.somevar':7678,}Then, in some moduleone, we can do the following:one.pyfromdiregimportget_value,registries# Load the registry with the above data. Note that this could take place in another module and could include an# arbitrary number of registry files.registries.append('/my/path/registry.py')classFoo:somevar=get_value('somevar')# will be 24742defmeth(self):returnget_value('somevar')f=Foo()f.meth()# will return 26804f.somevar# 24742Foo.somevar# also 24742defmyfunc():somevar=get_value('somevar')returnsomevarmyfunc()# will be 16834
Package: direnumerate
DirenumeratePDF documentationDescriptionDirenumerate is an open source tool written in Python designed to automate directory and file enumeration on web servers. It is useful for security professionals and system administrators who want to identify hidden resources and assess the security of web applications.Key FeaturesEnumeration of directories and files on web servers.Creates a wordlist automaticallyWordlist customization.Detailed output of findings.Support for multiple URL schemes (http, https, etc.).install:pip install direnumerateinstall in ubuntu:pip install direnumerate --break-system-packagesCommand line usage:Directory Scan:direnumerate Ds -t testphp.vulnweb.com -w wordlist.txtPost Scan:direnumerate Ps -t 44.228.249.3 -p 22 80 443Finds patterns in logs:direnumerate Fp -log test.log -key ERRORIP Info:direnumerate info -t 8.8.8.8Scripts usage:Directory Scan in Websites:fromdirenumerateimportDirScanurl="testphp.vulnweb.com"wordlist="wordlist.txt"enum=DirScan(url)enum.dir_enum(wordlist)User Accont Scan:fromdirenumerateimportUserScanuser="username"found=UserScan(user)found.found_users()Port Scan:fromdirenumerateimportPortScanip="44.228.249.3"list_ports=[22,80,443]scan=PortScan(ip)scan.scan_ports(list_ports)Finds patterns in logs:fromdirenumerateimportFindPatternslog="test.log"key="ERROR"fp=FindPatterns(log)fp.find_in_log(keyword=key)IP Info:fromdirenumerateimportInfoIpip="8.8.8.8"ipinfo=InfoIp(ip)ipinfo.show_info()
Package: diresa
DIRESAOverviewDIRESAis a Python package for dimension reduction based onTensorFlow. The distance-regularized
Siamese twin autoencoder architecture is designed to preserve distance
(ordering) in latent space while capturing the non-linearities in
the datasets.PrerequisitesTheDIRESApackage depends on thetensorflowandtensorflow_probabilitypackages.
These can be installed with the following commands:pipinstalltensorflowpipinstalltensorflow_probabilityInstallDIRESAInstallDIRESAwith the following command:pipinstalldiresaDocumentationTheDIRESAdocumentation can be found onRead the Docs